Reducing energy demand by the combined application of advanced control strategies in a full scale WWTP

Two advanced control strategies were applied in the secondary and tertiary stages, respectively, of a full scale wastewater treatment plant (WWTP). This has a nominal capacity of 330,000 population equivalent (PE), a complex configuration (having been upgraded several times through the years), and it faces significant seasonal load fluctuations (being located in a touristic area, in Northern Italy). The lifting station of the tertiary treatments (devoted to phosphorus precipitation and UV disinfection) was optimized by adjusting the pumped flowrate, depending on influent phosphorus concentration. A preliminary simulation showed that a 15% reduction of pumping energy could be achieved. This result was confirmed by field measurements. Moreover, a fuzzy control system was designed and applied to one of the six parallel nitrification reactors, yielding a reduction of more than 25% of the power requirement for aeration. Overall, the combined application of the two controllers led to a 7% reduction of the total energy consumption of the plant. This result is particularly promising given that the fuzzy controller was applied only to one of six biological reactors.


INTRODUCTION
Stricter limitations on wastewater effluent quality, together with the rising awareness of the importance of energy saving, lead to the need for smart design in every component of a wastewater treatment plant (WWTP). Electrical energy used for water supply and wastewater treatment worldwide represents more than 2% of the world's electrical energy consumption (Plappally & Lienhard ). In conventional WWTPs, electricity consumption may account for over 25% of operation expenditures (OPEX), depending on plant size, configuration and local conditions (Li et al. ; Bertanza et al. ). In particular, oxygen supply for the biological process is responsible for approximately 50-60%, or even more, of the overall energy consumption (Rosso et al. ; WEF ; Brandt et al. ), whereas wastewater pumping accounts for about 15% (Soares et al. ). Actually, several investigations revealed that there is room for improving the energy efficiency of WWTPs (Foladori et al. ; Papa et al. ; Bertanza et al. ; Vaccari et al. ). Many conventional as well as innovative options aiming at reducing the power demand are available along different directions. Examples of conventional strategies are the adoption of high efficiency bubble diffusers and the use of inverters for adjusting the motor speed. More complex solutions may involve modifications of the process configuration (e.g. nitrogen removal from the recirculated liquor from the sludge line by means of partial nitritation/anammox process or the adoption of sludge pre-treatment through thermal or enzymatic hydrolysis). A further improvement direction, considered in this paper, concerns the adoption of innovative control strategies.
Over the last years, automatic control systems have been introduced and spread in this sector, aiming at reducing the energy consumption without compromising the effluent quality (Dieu et  . Some simplified control solutions are available on the market and can be easily applied. Nevertheless, in the case of complex plant configurations and/or adoption of more sophisticated (and likely more efficient) control systems, preliminary detailed studies should be carried out. Moreover, for boosting the potential of automatic control strategies, a plant-wide application to several compartments is recommended. Results of such a combined approach in full scale WWTPs are scarcely reported in the literature. This paper aims to contribute to fill this gap.
The plant under investigation is characterized by a complex configuration, since it underwent several upgrading interventions through time. For many years, power consumption optimization has not been the main focus of plant managers, attention being addressed to tackle progressive influent load increase, together with the adoption of stricter effluent standards. As a consequence, energy saving is now regarded as a priority. The goal of this research was to reduce the energy requirement of the plant, by introducing two innovative controllers, in two high power-demanding compartments: tertiary treatments and aerated biological reactors. Due to their high flexibility and adaptability, both controllers are applicable to a variety of other plant configurations, ensuring a potential wide interest for the results of this experience among researchers and practitioners in the field of WWTP management.

The wastewater treatment plant
The WWTP hosting the research activity described in the paper is a conventional activated sludge plant (design size 330,000 people equivalent, PE), built around 1980. The original configuration consisted of three lines of primary sedimentation, four parallel biological stages, with A2O process for biological nutrient removal, eight final clarifiers and two anaerobic digesters for sludge stabilization. The current layout is pretty different, since the primary sedimentation is by-passed, two additional biological reactors and four final settlers were built, biological phosphorus removal is no longer adopted, anaerobic digesters are no longer in operation, and a new tertiary treatment station was built. In more detail, the current plant layout is as follows: • pre-treatments: two coarse screenings, two fine screenings, two aerated tanks for grit/sand and oil removal, two bio-filters for minimizing odour emission; • three primary settlers from the original configuration, now used for overflow water accumulation during rain events; • six circular biological reactors with pre-denitrification scheme; • ten secondary settlers; • tertiary treatments: coagulation tank, two flocculation tanks, four lamella clarifiers, eight sand filters and two channels for UV disinfection.
As expected, the compartments responsible for most of the overall energy consumption are the initial wastewater lifting station, the biological reactors (including aeration, sludge and mixed liquor recirculation, and mixing), the tertiary treatment stage (lifting, sludge recirculation, reagent dosage, mixing, filter backwashing, and UV disinfection). Data concerning the energy consumption recorded in 2018 are shown in Figure 1. The compartments considered in this research (biological reactors and tertiary treatments) accounted, on a yearly basis, for almost 80% of the overall consumption: the plant energy consumption in total was 9,252 MWh, and the biological process and tertiary stage consumed 6,242 and 1,202 MWh, respectively.

Design of the control systems
In this section, the two installed control systems are described. Figure 2 shows the WWTP stages involved and the principles of the adopted control strategies.

Tertiary treatments
Two pumping units are in operation in the plant. The first is devoted to raising the incoming wastewater flow. The second unit, located downstream the final clarifiers, is in charge of lifting the wastewater to feed the tertiary compartment. The optimization of the tertiary stage involved both the pumping compartment and the dosage of precipitating chemicals (aluminium sulphate is used as the coagulant, while the polyelectrolyte Dryfloc 974, purchased by SNF Italia srl, is the employed flocculant). In particular, the energetic costs for water lifting account approximatively for two thirds of the total OPEX of the tertiary treatments.
Nowadays, the pumps are set up to keep the raised flow rate at 4,500 m 3 /h, when the water level in the lifting chamber is higher than 1.80 m (this level ensures the pumps are submerged). When the incoming flow rate is higher than 4,500 m 3 /h, the exceeding flow by-passes the tertiary treatments. In this configuration, it may happen that this fixed flow rate is lifted even if not strictly required for complying with the effluent standards. The most striking situation occurs when the incoming concentration of the target pollutants (i.e. P and Escherichia coli) is already lower than the respective thresholds fixed by law. Thus, the lifting stage was optimized using the mass balance of P as reference. The control algorithm determines how to split the incoming flow rate (Q in [m 3 /h]) in two flows: one to be lifted and treated in the tertiary stage (Q lift [m 3 /h]) and one to be by-passed (Q byÀpass [m 3 /h]). Considering the P concentration in the influent of the tertiary treatments ([P] in [g/m 3 ], which is also equal to the concentration in the by-passed flow [P] by_pass [g/m 3 ]), downstream from the tertiary treatments ([P] out_ter [g/m 3 ]), and in the (mixed) effluent of the plant ([P] out [g/m 3 ]), the mass balance (steady state conditions) is given by Equation (1).
In Figure 3, a schematic representation of the tertiary stage is given; note that online flowrate measuring sensors as well as P concentration analysers (PHOSPHAX sc, © HACH-LANGE GmbH) are installed, for plant monitoring and control.
By adopting a reasonable safety factor with respect to the legal limit, a set point for the effluent P concentration may be determined ([P] out_SP [g/m 3 ]). A suitable value of P concentration to be achieved by the tertiary treatments [P] out_ter_SP ([g/m 3 ]) may also be decided by the operator. The dosage of chemicals during the coagulation-flocculation stage will be adjusted consequently, as described below. It is assumed that Q in ¼ Q out (water volume used for filter backwashing is neglected). Q in is measured as well as [P] in . Therefore, the only unknown variable of the mass balance   is the flow rate Q P_lift ([m 3 /h]) to be raised (Equation (2)): the subscript 'P_lift' is used for the flowrate, in order to specify that the calculation is based on the P mass balance.
An analogous calculation is performed with reference to the other target pollutant (E. coli), to get another value of the flowrate to be lifted (Q EC_lift [m 3 /h]). Of course, the maximum between Q P_lift and Q EC_lift will be adopted as In order to determine the required coagulant dosage, the P load to be removed by the tertiary treatments must be calculated, based on the raised flowrate (Q max_lift ), the influent P concentration ([P] in ) and the P concentration in the effluent of the tertiary treatments ([P] out_ter ). This coincides with the set point concentration ([P] out_ter_SP ) used in Equation (2), if the flowrate to be raised is calculated based on P mass balance (Q max_lift ¼ Q P_lift ). However, in other conditions, it may be the case that [P] out_ter is different form [P] out_ter_SP . This can occur under the following circumstances: • high influent P load: in this case, the wastewater to be lifted, determined on the basis of the P mass balance, exceeds the maximum of 4,500 m 3 /h, so that Q max_lift ¼ 4,500 m 3 /h; • low influent P load: the calculation gives a flowrate to be lifted lower than 2,000 m 3 /h, i.e. the minimum safety value established by the plant manager; in this case, it is assumed that Q max_lift ¼ 2,000 m 3 /h; • the limiting factor is E. coli, instead of P, so that In all the above situations, the P concentration to be achieved in the effluent of tertiary treatments [P] out_ter is calculated based on Equation (3): Eventually, the chemical dosage (D [L/h]) is determined by Equation (4): where: Using aluminium sulphate solution, with a density of 1.28 kg/L and a minimum grade of 8%, the stoichiometric dosage is 0.016075 litres of solution per g of phosphorus to be removed; • k [-]: empirical correction factor, aiming at taking into account the effect of water composition on reagent demand. It ranges from 1 to 10 and is continuously adjusted proportionally to the measured difference (ΔP) between the real P concentration in the effluent of the tertiary treatments ([P] out_ter_real [g/m 3 ]) and the desired one ([P] out_ter ).
[P] out_ter and [P] out_ter_real are calculated using Equations (3) and (5), respectively: Before applying the control system on the real plant, a simulation was performed to assess in advance the expected performances over a one year period (loading conditions are variable due to the location of the plant in a touristic area). The simulation consisted in the calculation, on a spreadsheet, of monthly mass balances, determined on the basis of the plant behaviour recorded in a typical working day selected within each month. In short, starting from the analysis of the influent pollutants load over the year, the raised flowrate and the reagent consumption were estimated for the controlled process. The wastewater volume to be raised was easily calculated, by applying the mass balance equations. On the contrary, the coagulant consumption was not determined using equations, because it depends on many factors beside the P mass balance, and is continuously adjusted by the controller. Therefore, the coagulant consumption was estimated considering the amount of coagulant dosed per kg of P removed, based on historical data. Finally, regarding the flocculant consumption, the simulation was carried out by assuming (see Equation (6)) that the reagent dosage (D floc_sim [kg/h]) is proportional to the treated flowrate (Q treat_sim [m 3 /h]), the specific dosage per cubic meter of treated wastewater (d [kg/m 3 ]) being 0.3 * 10 À3 kg/m 3 .
For cost estimation, the power consumption (P [kW]) due to wastewater pumping was calculated using Equation (7). where: • γ w is the specific weight of water, assumed as 9,810 N/m 3 ; • η pump is the efficiency of the pumps, assumed as 65%; • ΔH is the head that must be overcome, equal to 5.3 m.
Given the hourly values of the flowrate, the corresponding power consumption was calculated using Equation (7). The hourly energy consumption (kWh) was then determined as the product (P [kW] · 1 [h]). Summing hourly consumption values, daily and yearly energy consumption values were determined.
Eventually, the annual cost (Cost [€/y]) related to lifting was calculated as: where PrEn is the price of energy (0.15 €/kWh).
The following specific reagent costs were assumed: 0.075 €/kg for the coagulant and 2.69 €/kg for the flocculant.

Nitrification reactor
Concerning air supply in the biological reactor, in general, the most commonly adopted control strategy consists in keeping dissolved oxygen (DO) concentration as close as possible to a fixed set point, by using a feedback chain. Traditional controllers such as proportional integral (PI) or proportional integral derivative (PID) are used in most cases (Åmand et al. ). The limitations of such a simple approach are documented in the literature (Beltrán et al. ), where issues like lack of flexibility, process instability, and low energetic efficiency are reported. Since the activated sludge treatment is a complex system with variable boundary conditions and a living biomass, with a range of time constants, and never reaches steady-state conditions (Åmand et al. ), advanced process control strategies are required to obtain high performance.
In the present research, an advanced control system adopting a fuzzy logic strategy (called Oxyfuzzy in the following, since it was derived from a European patent of the University of Brescia: Bertanza et al. ) was installed on the sixth biological reactor of the WWTP. A prototype application of the controller was previously tested (Baroni et al. ) and a simulation, carried out in the BSM2 framework, showed high potential to reduce energy demand respect to other control strategies (Bertanza et al. ). The controller receives as inputs the effluent ammonium concentration and the ammonium variation rate and produces as output a percentage variation of the DO set point. The goal is to ensure that the effluent ammonium concentration remains within a predefined range; thus, the DO set point varies dynamically on the basis of current process conditions. The control logic consists of a set of fuzzy rules defined by WWTP management experts and then tuned on field. More details of the controller can be found in Baroni et al. ().
The studied biological reactor has a volume of 7,250 m 3 (2,165 m 3 intended for the denitrification phase and 5,085 m 3 for nitrification) and is equipped with 1,696 high efficiency fine bubble plate diffusers. Air is supplied by a volumetric blower, with an inverter for the variation of the impeller velocity. The blower, with a flowrate of 7,000 Nm 3 /h, is exclusively dedicated to the sixth oxidation tank during the summer period, whereas in the winter period it is shared between the fifth and the sixth oxidation tanks. The blower was previously governed by a traditional PI controller in charge of keeping a fixed DO concentration in the biological reactor. The original configuration is reported in Figure 4: the DO concentration is measured at the intermediate section of the biological reactor, by means of an LDO -OxyMax W COS 61 (© Endress þ Hauser) probe, and the value is sent to the programmable logic controller (PLC), which regulates the blower accordingly.
The main components of the Oxyfuzzy system (see Figure 4) are: an analyser (AMTAX sc, © HACH-LANGE GmbH) for measuring the effluent ammonium concentration, a DO probe, a SCADA system for data acquisition from the field, and the fuzzy controller. The actual effluent ammonium concentration and its variation rate over a period of 60 minutes are used for calculating the required percent variation of the DO set point. Every 15 minutes, the new DO set point is sent to the PLC, which is in charge of keeping the desired value of DO concentration in the tank, by means of a PI controller that regulates the blower velocity.
Data regarding the operation of the previous air supply system were analysed, in order to assess the effects of the advanced controller installed during the research. As reported above, a fixed DO set point is selected by the operator depending on the influent load: during high influent load periods (summer) it is set at a value of 1.5 mg/L, whereas during the winter period it is set at 1 mg/L, thus allowing for energy saving. The typical performance of the traditional controller is shown in Figure 5: during the morning hours the DO is stable at around 1.5 mg/L (the set point), and the effluent ammonium concentration is very low. Given that the effluent ammonium concentration should not exceed 5 mg/L, as a mean value over 24 h, this behaviour leads to unnecessarily high energy consumption with respect to the actual needs of the biological process. The installation of the fuzzy controller was first aimed at avoiding the energy wastage occurring in this situation. On the other hand, in the following hours the ammonium concentration starts to increase while DO decreases at the same time, even though the compressor is operating at full regime. Of course, this shows that the air supply system is not able to satisfy the air supply needed to achieve the set point of 1.5 mg/L. However, it is also evident that keeping a DO concentration of 1.5 mg/L is not necessary to comply with the effluent ammonium concentration limit of 5 mg/L. In other words, the fixed DO set point does not correspond to the actual needs of the biological process.
The purpose of the Oxyfuzzy controller is to continuously adapt the DO concentration in the biological reactor, in such a way that the effluent ammonium concentration remains in a predefined range: it was decided to implement fuzzy rules to keep the ammonium concentration around the value of 3 mg/L, in order to safely comply with the limit and to save energy at the same time.
The first version of the Oxyfuzzy controller was installed on the 7th of January 2020; a period of tuning followed, during which minor modifications have been applied to the fuzzy rules. In particular, the reactivity of the controller to loading condition variations has been adjusted in accordance with the desiderata of the plant managers, who expressed a preference for a slightly slower, hence smoother, controller behaviour with respect to the first installed version. This was meant to avoid too quick variations in process conditions and to limit mechanical stress on the components of the air supply system. The present version of the software was put in operation on the 19th of February 2020. Moreover, since the 15th of June, periods of alternation with the traditional controller have been arranged, in order to compare the performances of the two systems.

Tertiary treatments
The comparison between the standard process and the simulation leads to the following results:  • regarding the lifting stage, 129 MWh can be saved in a year, which corresponds to almost 20,000 € (15% of the effective cost); • regarding the coagulation phase, a possible reduction of dosed coagulant of almost 75 t in a year can be achieved, with a saving of approximatively 5,000 € (12% of the effective cost); • regarding the flocculation phase, a possible reduction of dosed flocculant of 850 kg in a year can be obtained, corresponding to a saving of 3,000 € (15% of the effective cost).
By summing up all the contributions, as shown in Table 1, a reduction of the annual cost of almost 28,000 € (namely 14% of the OPEX) is expected.
Due to the pandemic SARS-CoV-2 event, the tourist flow in the area was very low in summer 2020. This led to a very low influent P load during the test period. This did not allow a prolonged monitoring campaign, useful to experimentally assess the controller performance. Nevertheless, in order to evaluate the reliability of the new controller, two tests were performed on 24 June, 2020, and 17 September, 2020, even though the P influent concentration was low. The result of the second test is reported, as an example, in Figure 6. At the beginning of the test, the influent P concentration (in red) was around 1 mg/L, which is the maximum allowable effluent concentration. Thus, the flowrate to be lifted was calculated, by the control system, based on the P mass balance: this circumstance is evidenced by the yellow colour of the flowrate pattern in Figure 6 and by the Q symbol subscript 'P_lift'. On the contrary, when, in the subsequent hours, the influent P concentration decreased, the flowrate to be lifted was determined on the basis of the E. coli mass balance (the flowrate pattern is coloured in green and the Q symbol subscript is 'EC_lift'). The E. coli concentration during this test was assumed to be 10,000 UFC/100 mL and the abatement efficiency was assumed equal to 99.66% (the latter as the 25th percentile of historical data). Indeed, measurements of E. coli  concentration are not available at a frequency which could be used as a 'continuous' input to the controller. Thus, it was decided to assume a constant influent concentration, depending on past seasonal data. These tests showed a reduction of the wastewater volume raised to the tertiary treatments (with respect the one which would be raised by using the previous controller) of 12% during the first trial day and of 15% during the second one. These outcomes essentially confirm the previous simulation results.

Nitrification reactor
Comparing the conventional and advanced control systems is complicated, because, as usually happens in full scale applications, the external conditions are continuously changing, while the comparison should be carried out under similar incoming loads. Moreover, the comparison is meaningful only if an appropriate performance of the nitrification process is ensured. Indeed, achieving energy saving while not complying with the emission limits would not be acceptable. Furthermore, if other perturbation events (e.g. overloading) occur during the monitoring campaigns, result misinterpretation may arise. In addition, in the WWTP under investigation, the loading conditions of the sixth line (which is different from the others and equipped with a more efficient final sedimentation) are continuously adjusted by the manager in order to satisfy the operational needs of the whole plant. For these reasons, as a first approach, the behaviour of the two systems was characterised by selecting single days in which very similar influent loading conditions were recorded and working conditions were considered normal. Note, however, that the Oxyfuzzy controller was in operation under a variety of conditions and was continuously monitored by the plant staff, its performance being considered always satisfactory. However, as explained above, a reliable comparison was possible only by referring to a number of days with normal operational conditions. The Oxyfuzzy controller performance was assessed in terms of energy consumption with respect to the original controller. Moreover, the actual trend of ammonium concentration was compared with the desired one. . It can be seen that, with both the controllers, the effluent ammonium concentration was stably below the value of 5 mg/L. Nevertheless, with the introduction of the Oxyfuzzy controller, the ammonium concentration was kept around the value of 3 mg/L, by regulating the blower velocity on the basis of the measured values of the ammonium concentration itself, whereas in the traditional configuration it was mostly kept close to 0 mg/L in order to maintain the DO concentration around the fixed set point value.
In Figure 7, the typical behaviour of the traditional controller can be observed: the blower provides air to maintain the required DO concentration even if the effluent ammonium concentration is low, leading to an excess of energy consumption. It can be observed in particular that the fixed DO set point, which is actually not attained most of the time due to the physical limits of the air supply system, turns out to be unnecessarily high under these loading conditions. A lower DO concentration turns out to be sufficient to keep effluent ammonium concentration close to zero. On the other hand, Figure 8 reports the representative operation of the Oxyfuzzy controller: the blower velocity is at the minimum if the effluent ammonium concentration is low, while it increases when the effluent ammonium concentration rises. Slow oscillations of the effluent N-NH 4 þ concentration, roughly with a period of a few hours, can be observed. These are related to variations of the influent load and can be explained by two main facts: • Since blowers have a minimum operation speed, it is impossible to reduce air supply under a certain limit, hence very low values of effluent N-NH 4 þ concentration are attained under low load conditions.
• The plant managers required to keep effluent N-NH 4 þ concentration as close as possible to 5 mg/l, while avoiding overcoming this threshold and, as already mentioned, expressed a preference for smoother controller reactions to load condition changes.
Altogether, the controller behaviour was considered satisfactory by the plant managers, while investigating possible further improvements is left to future work.
The overall energy consumption recorded in the above days for the operation of the studied reactor (including air supply, sludge and mixed-liquor recirculation, mixers) is reported in Table 2: with the advanced controller in operation, a reduction of 20-27% was achieved. Regarding the energy consumption related to aeration, a reduction of 26-36% was achieved.

CONCLUSIONS
The implementation and setting up of combined innovative control strategies led to a reduction of the energy consumption. During the monitoring campaigns, approximately 15% saving was recorded for the lifting stage of the tertiary treatment and above 25% for the air supply in the sixth biological reactor. The corresponding reduction of the overall plant energy consumption was 7%, the fuzzy controller being applied only to one of the six biological reactors. Both controllers required a testing phase in order to evaluate the reliability of hardware and software components under significantly fluctuating load conditions. Given the reliability shown and the savings achieved, the manager of the plant is planning to extend the implementation of the fuzzy controller into other compartments.
Even though the adopted solutions were developed and tested for the WWTP analysed, they do not include any structural feature specifically depending on this plant: the two control approaches adopted are general by nature and can be adjusted and applied with a moderate effort to a variety of configurations, where they promise to yield similarly significant energy savings.