Eco-Efficiency Assessment of Control Actions in Wastewater Treatment Plants

This work explores the possibilities of improving the eco-efficiency of Wastewater Treatment Plants (WWTPs) introducing a plant-wide perspective in the formulation of the control strategy. Ecoefficiency goals are contemplated in the analysis of the appropriateness of control actions, considering the seasonal effects of temperature into the decision-making process. Plant-wide control strategy handles are the operation variables of the activated sludge process, the volume of the primary clarifier, and the temperature of the anaerobic digester. Performance is evaluated in terms of energy use, biogas production, effluent quality, emissions to air and soil, considering annual and bimestrial average values of indicators to capture seasonal effect of temperature. The result is a set of possible solutions, obtained from a multi-objective decision-making procedure, consisting on a sequence of control actions applied at different temporal windows that improve the eco-efficiency indicators of the plant. The results obtained when applying the different solutions make evident how the application of plant-wide control strategies is useful to improve performance indicators that represent individual goals, leading to trade-off solutions that describe WWTPs’ eco-efficiency.


Introduction
The eco-efficiency concept is proposed as a new paradigm within an industrial framework as defined by the World Business Council for Sustainable Development (WBCSD): "eco-efficiency is achieved by the delivery of competitively priced goods and services that satisfy human needs and bring quality of life, while progressively reducing ecological impacts and resource intensity throughout the life-cycle to a level at least in line with the Earth's estimated carrying capacity" [1]. Eco-efficiency is a management philosophy that encourages business to search for environmental improvements that yield parallel economic benefits. It focuses on business opportunities and allows companies to become more environmentally responsible and profitable.
Wastewater Treatment Plants (WWTPs) are crucial to mitigate the impact of pollutants on water bodies. The urban wastewater treatment plants (WWTPs) comprise a water line, where pollutants are removed from wastewater, a sludge line, where sludge is stabilized while biogas is obtained as by-product, and a gas line for biogas conditioning [2]. In WWTPs facilities, efficiency of the process is determined by the amount of energy used to remove pollution [3]. Then, energy consumption and energy recovery from biogas are important issues to be considered in processes oriented to produce environmental benefits, since the use of energy from external sources to treat wastewater involve additional environmental impacts (i.e., emissions of greenhouse gasses, GHG). Moreover, the use of chemicals agents for nutrient removal and sludge conditioning affect toxicity, but it also involves environmental impacts associated with the production and transportation of chemicals [4].
Thus, WWTPs exhibit an interesting compromise between environmental costs and energy consumption. Energy is required to treat wastewater to avoid polluting emissions to water, mainly reducing eutrophication potential, but energy and chemical consumption implies environmental costs associated with global warming potential and toxicity [4]. As an important part of the urban water cycle, WWTPs face significant challenges to improve its efficiency to achieve a sustainable management of water [5] and to contribute to the circular economy, through energy generation, water reuse, and material recycling [5,6]. Then, in urban environments it is necessary to consider environmental impacts from a wider viewpoint, not only mitigating emissions to water, but also avoiding the transference of environmental impacts of wastewater treatment over time or space [7,8].
The attainment of eco-efficiency targets when running WWTPs is a complex task, where a holistic viewpoint is necessary. Regarding the implementation of technological solutions based on the optimization of control system performance, the challenges faced by control systems designers rely on the complexity of biological processes, the dynamic effects of temperature, and influential variables and interactions between the different units. WWTPs comprise several units working at different time scales: primary/secondary clarifiers for physical separation, activated sludge reactors for biological treatment, anaerobic digesters for sludge stabilization, thickener/flotation units, dewatering systems, and storage tanks. The configuration of the plant with sequential unit processes constituting the water line, the sludge line, and the gas line and numerous returns of mass flows produce an integrated system with several units interconnected in an intricate manner [2,9]. Moreover, the influent load exhibits fluctuations associated with human activity in the catchment, or rainfall in the case of combined sewage systems, and seasonal effects due to temperature and influent flowrate variations. This complex system should be operated and controlled considering plant-wide effects, addressing the interactions between the different subsystems and the multi-objective nature of the problem to consider eco-efficiency targets.
Recent works of the research group [2,9] address the improvement of the overall efficiency of wastewater treatment plants, considering the compromise between energy consumption, as one part of operation costs, and environmental costs. The Benchmark Simulation Model 2 (BSM2), that is a widely accepted simulation model [10], is used as a reference plant in both cases, even though the analysis and methodology could be extended to real applications. A holistic perspective of WWTP control system performance is introduced in [9], where an optimizing PI-control strategy is used to regulate an overall efficiency index (N/E index), that represents the ratio between the amount of nitrogenated compounds eliminated (kgN) and the energy (kWh) consumed in the whole plant. Moreover, a dynamic evaluation of an index that measures the ratio between environmental benefits of WWTP, and the energy required to achieve that goal, is used to optimize the operation of the plant. The proposed strategy is compared with typical WWTP control strategies used in real practice. In [2], a comprehensive analysis of the environmental impact of typical control/operational strategies through a dynamic perspective has been performed. This work shows the advantage of considering different temporal windows to identify dynamic effects and the impact of slow and fast disturbances on performance indicators that are hidden when evaluation focuses only on annual-based indicators.
In this paper, the wider concept of eco-efficiency is considered to address the environmental impacts associated with WWTP operation. Energy recovery from biogas is considered as an important factor that affects energy efficiency of the process. Moreover, the evaluation of dynamic performance is focused, in this case, on capturing seasonal effects of temperature on effluent quality and energy recovery from biogas. The idea of the application of a plant-wide control strategy to introduce a holistic perspective into WWTP operation strategy to improve eco-efficiency is adopted from [9]. In [9] overall performance was considered, but control actions were limited to activated sludge process (ASP). In this paper, control actions are also applied to the digester's operation temperature and primary settler, considering the possibility of affecting biogas production, electricity consumption, and effluent quality, taking into consideration the eco-efficiency philosophy. Moreover, while previous works [2,9] focus on the evaluation of the performance of different control schemes applied to the activated sludge process, this work focuses on the evaluation of the impact of different control decisions involving different operation variables, under cascaded control of ammonium in the ASP, which exhibited the best performance in terms of energy consumption in [2,9]. This paper aims to promote the transition to the sustainability of the WWTP operation taking advantage of systems thinking to identify root causes and implement better solutions [11]. The plant-wide conception of the control problem and the selection of control actions is important to exploit the resources of a plant considering eco-efficiency goals.
The remainder of this paper is organized as follows. A description of the reference wastewater treatment plant (BSM2 model), control strategies, and environmental performance indicators is presented in Section 2. In Section 3, the results and discussion of the evaluation of control actions and the evaluation of the proposed plant-wide control solutions are presented. Conclusions of the work are presented in Section 4.

Description of the Wastewater Treatment Plant Represented by BSM2 Platform
The Benchmark Simulation Model (BSM2) has been selected as a reference WWTP model, where the units of the water and sludge line are "linked together and need to be operated and controlled not only on a local level as individual processes but by supervisory systems taking into account all the interactions between the processes" [10,12,13]. However, the proposed methodology and analysis of the impact of control actions, considering the available data, measurements, and control systems, can be adapted to full scale WWTPs to attain eco-efficiency goals.
The BSM2 simulation environment [10,12,13] describes the plant layout, the simulation model, the influent profile, and the evaluation protocol. The BSM2 represents a WWTP comprising two operating lines: the water line and the sludge line ( Figure 1). The water line includes primary clarification and activated sludge process units, and the sludge line includes anaerobic digestion, thickening units, and dewatering units. The BSM2 plant is described in [10,12,13], a detailed description of influent modelling is presented in [14], and the main characteristics associated with this study can be found in [2,9]. Table 1 summarizes the characteristic influence parameters.    In the water line of the BSM2 plant, a primary clarifier performs a pre-treatment of wastewater, which is the physical separation of the settleable solids from raw wastewater. The overflow is the input flow of the activated sludge process. The underflow is the primary sludge, which is treated in the sludge line. The volume of primary clarifier (VP) affects hydraulic retention time (t h ), which affects the removal efficiency of the soluble from the particulate organic matter measured as COD (chemical oxygen demand) [10]. In the BSM2 model, VP is defined as a fixed operation condition; however it is possible to directly change this operation variable; the input and output streams adjust to meet mass balances.
The activated sludge process (ASP) where biological elimination of nitrogen and organic matter takes place, is represented using the Benchmark Simulation Model 1 (BSM1) [15]. The BSM1 plant, represents a series of activated sludge reactors, the first two reactors are anoxic and perfectly mixed to facilitate the denitrification process, which is affected by internal recirculation (Q a ) that transfer nitrates from the aerobic zone. The last three reactors are aerated to promote the nitrification step, which depends on Dissolved Oxygen (DO) concentration in the aerobic zone, which is regulated manipulating the air supply from the aeration system. The clean effluent (Q e ) is discharged, and wastage flow (Q w ) is fed to the sludge line and partly recycled to the anoxic zone (external recycle flow Q r ). External carbon dosage (Q carb ) is necessary to keep the levels of biodegradable substrate required by heterotrophs for denitrification. The sludge recirculation (Q r ) and the sludge purge flow (Q w ) affect the food to microorganism ratio (F:M) and the sludge age or solids' retention time (SRT), respectively.
Primary clarifier underflow (Q pu ), named primary sludge, and wastage flow (Q w ), named secondary sludge, connect the water line and sludge line. Due to the energy potential of biogas produced in anaerobic digestion, sludge management is crucial for the attainment of eco-efficiency goals [16].
In the sludge train, the thickener thickens the secondary sludge prior to being mixed with the primary sludge. The mixed sludge is fed to the anaerobic digester where organic matter is transformed, in the absence of oxygen, into biogas (65-70% CH 4 , 30-33% CO 2, 1-2% H 2 ) and digestate (digested sludge) [16]. The anaerobic digestion is affected by the loading rate, operation temperature of digester (Top), the solid's retention time (more than 20 days), and pH (6.8-7.2). The biogas is used to provide the heating energy (HE) required by the sludge fed to the digester to reach the operation temperature (Top). The digester should be between 30 and 38 • C for mesophilic digestion [17]. BSM2 default value is Top = 35 • C. Then, the dewatering unit thickens the digestate (flow rate Q ad ). The reject water is recycled to the primary clarifier while the sludge for disposal can be used as fertilizer [4]; however, treatment could be necessary to guaranty health and safety conditions.
The biogas produced in anaerobic digestion can be used for electricity generation, or for the simultaneous production of heat and electricity. The cogeneration, attained by the use of Combined Heat and Power technologies (CHP) is a sound solution to cover heating requirements and reduce electricity consumption from external sources [16,17]. Thus, cogeneration reduces operation and environmental costs. Biogas-fueled CHP systems are available for installation in WWT facilities, and some alternatives are internal combustion engines, micro-gas turbines, combustion turbines, and fuel cells [16,18].
BSM2 considers a micro gas turbine for immediate electricity and heat production, required to heat the digester [19]. In this work, reciprocating engine (Rich-burn), with a 29.1% electrical efficiency, power to heat ratio of 0.62 and 76% CHP efficiency [20] is selected to produce energy from biogas. The energy content of biogas is estimated to be 13.89 kWh/kg CH 4 in the BSM2 evaluation tool. Then, electricity produced from biogas is estimated to be 29.1% of the energy content of the biogas produced in the anaerobic digester (MET prod ).

Plantwide Control Strategy
For integrated processes comprised of several interconnected units, the application of plant-wide control approaches produces significant benefits. In BSM2, more than 60 control handles are available for the application of plant-wide control strategies, including almost all volumetric flow rates, external carbon dosage, and all possible combinations of mixing and aeration in ASP bioreactors [12,13,19]. The reference control system implemented in BSM2 considers aeration control based on a DO sensor in the fourth ASP reactor (set point 2 g/m 3 ) and direct manipulation of the oxygen transfer coefficient (K La4 ), while transfer coefficients of the third and fifth reactors (K La3 and K La5 ) are proportionally adjusted [10,15]. In practice, airflow rate is used as manipulated variable in the aerobic zone of ASP. An alternative control system that can be used in real practice (if an ammonium sensor is available) is the cascade control of ammonium concentration in the fifth ASP reactor (S NH5 ), (set-point 1 g/m 3 ) by manipulating DO set points in the aerobic ASP reactors [21]. Ammonium-based control varies DO set point, in most cases to levels below set-point (2 g/m 3 ) imposed by a DO control selected as the reference control system in BSM2. Consequently, aeration intensity is reduced in the periods of lower load, producing significant energy savings while total Nitrogen (N tot ) removal is improved, as have been shown in previous works [2,9].
According to Riegler et al. [21] the application of an ammonium-based control to limit aeration minimizes the impact of actuators of the aeration system, reduces energy consumption, and reduces operation costs. It partially limits nitrification rate and increases denitrification; it improves nitrogen removal while maintaining the levels of ammonia in the effluent below legal limits. This strategy reduces energy consumption of the ASP process and improves performance, avoiding the unnecessary use of resources (air supply), which is a desired characteristic to improve WWTP eco-efficiency goals.
Hence, the operation strategy considered in this paper for the BSM2 plant (summarized in Table 2) combines the cascade control of ammonium concentration in the last ASP reactor, which is an improvement of the ammonium-based control strategy used in [2,9], with the control actions contemplated in the reference BSM2 operation strategy [10]. In the proposed ammonium control scheme (Figure 2), an external Proportional Integral (PI) loop manipulates DO set-point of the fourth ASP reactor, and the DO reference control system is the secondary control loop of cascade scheme. This strategy, named Default Strategy, reduces energy consumption with respect to [2,9], because the variation of the DO set-point is reduced to 1.0-2.5 g/m 3 . The PI controllers used in the cascaded ammonium control scheme are of the form: where u is the manipulated variable, y is the controlled variable, y sp the desired set-point, y lim the limit values of the controlled variables, Kp is the proportional gain and Ti the integral time, and Tt is the anti-windup constant Table 2 summarizes the main parameters involved on BSM2 operation strategy considered in this paper. It is identified as the Default strategy. the effluent below legal limits. This strategy reduces energy consumption of the ASP process and improves performance, avoiding the unnecessary use of resources (air supply), which is a desired characteristic to improve WWTP eco-efficiency goals. Hence, the operation strategy considered in this paper for the BSM2 plant (summarized in Table 2) combines the cascade control of ammonium concentration in the last ASP reactor, which is an improvement of the ammonium-based control strategy used in [2,9], with the control actions contemplated in the reference BSM2 operation strategy [10]. In the proposed ammonium control scheme (Figure 2), an external Proportional Integral (PI) loop manipulates DO set-point of the fourth ASP reactor, and the DO reference control system is the secondary control loop of cascade scheme. This strategy, named Default Strategy, reduces energy consumption with respect to [2,9], because the variation of the DO set-point is reduced to 1.0-2.5 g/m 3 . The PI controllers used in the cascaded ammonium control scheme are of the form: where u is the manipulated variable, y is the controlled variable, ysp the desired set-point, ylim the limit values of the controlled variables, Kp is the proportional gain and Ti the integral time, and Tt is the anti-windup constant  Table 2 summarizes the main parameters involved on BSM2 operation strategy considered in this paper. It is identified as the Default strategy.
Selected BSM2 operation strategy: ammonium-based control scheme in activated sludge process (ASP).

Selection of Control Actions to Improve Eco-Efficiency of WWTP
The effects of control actions are evaluated in Section 3 to find the conditions with a positive effect on WWTP eco-efficiency in the full operation horizon, or in a given period of time. The analysis is performed from a plant-wide perspective, since control handles associated with different units of the plant are considered. The control handles to be evaluated are selected considering the possibility increase biogas availability and reduce energy consumption, with a minimum effect on effluent quality.
The selected control handles are: Preliminary simulations of BSM2 response have been performed to determine magnitude of the changes applied on selected control handles with a significant effect on plant response and eco-efficiency indicators. Table 3 summarizes selected control changes and variations. The control handles are changed from default condition to a lower and larger value. Each variation is maintained in the full operation horizon (one year), and its effect on performance indicators is evaluated considering the impact on average annual values of indicators and the impact on the dynamic input profile when seasonal effects are relevant. Table 3. Possible variations on selected control handles.

Control Handle Default Value Variation
Primary clarifier volume (VP-m 3 ) 900 m 3 800 m 3 1000 m 3 The knowledge of process behavior and process model, and the observation of preliminary simulation, make it possible to distinguish between slow dynamics control actions and faster dynamics control actions.
Anaerobic digestion exhibits a large time constant, with solid retention time over 20 days, and the effect of changes on Top on plant performance indicators is evidenced on larger periods of time (weeks to months). Regarding the volume of primary clarifier, in real practice VP is affected by seasonal variations of influent flow, therefore, VP can change on larger periods of time (months). Clarifier sludge blanket depth is regulated by sludge withdrawal, it affects VP. Then, in this study, modification of VP and Top are considered slow dynamic control actions. On the other hand, Q a , Q w , DO sp , and S NHSP are ASP operation variables, and the process exhibits and hydraulic retention time of 12-24 h; Q a and Q w modifications affect WWTP behavior on a scale of hours to days, and DO sp and S NHSP modifications affect behavior on a scale of minutes to hours.
It is important to mention, that in BSM2 model, primary clarifier overflow Q po and Q bypass (Figure 1) are available as control handles. In simulations VP has been changed directly as the reference of a closed loop level control system, then Q po has been adjusted to keep the equilibrium. The other possible way of changing VP is bypassing from ASP (Activating Q bypass in BSM2 model), but this modification significantly increases pollution levels in the effluent, and it is discarded as a control action.

Performance Indicators and Energy Recovery
The BSM2 platform provides a systematic protocol for the evaluation of the operational strategies tested in the plant [10,15]. The most important variables associated with the load and composition of influent, effluent, biogas, and sludge are computed for a given evaluation period (from t o to t f ). Key performance indicators are included to measure influent and effluent quality, violations of the limits imposed over the levels of pollutants in the effluent, energy requirements, and overall operation costs. The default evaluation period is one year, starting the 1st of July, but shorter or larger temporal windows can be considered. The effluent quality is determined by the levels of pollutants in the effluent: Nitrogen (N tot ), ammonium (S NH ), nitrates (S NO ), total Chemical Oxygen Demand (COD), total Suspended Solids (TSS), and Biological Oxygen Demand (BOD5). The effluent quality requirements considered in this work, as are those given by the BSM2 platform [10,13,15]: N tot < 18 gN/m 3 , S NH < 4 gN/m 3 , COD <100 gCOD/m 3 , TSS < 30 g/m 3 .
The effluent quality index defined in theBSM2 protocol to measure pollution load of the plant discharge [8,14] is defined as follows: where C 1 = 1 T·1000 and T is the evaluation period, from t o to t f in days. The biological oxygen demand (BOD), chemical oxygen demand (COD), total nitrogen concentration (N tot ), and suspended solids (SS) are computed in terms of ASM1 variables as shown in [10,15].
The Influent Quality Index (IQI) is also defined to measure influent pollution [10,15]: where SS i , COD i , N toti , and BOD i are analogous to SS e , COD e , N tote , and BOD e but the subscript index i denotes that indicators are measured in the influent. The global operational cost index (OCI) is [10,19]: where AE represents the aeration energy in the activated sludge process, PE is the pumping energy in the full plant (involving all flows), ME is the mixing energy in the full plant, SP is the sludge production for disposal, EC is the external carbon addition, and MP is the methane production. The indicators associated with energy use and heating energy production from biogas considered in the BSM2 evaluation protocol are presented here to address energy efficiency. In the following equations, T is the evaluation period, from t o to t f in days Pumping energy is computed considering the pumps available on each unit [10]: Q a is the internal recycle flow, Q r is the external recirculation flow, Q w is the wastage flow, Q pu is the primary clarifier bottom flow, Q tu is the thickener feed flow, and Q du is the dewatering unit bottom flow.
The aeration energy depends on aeration system characteristics: type of diffuser, bubble size, and depth of submersion. It is computed from the oxygen transfer coefficient on each reactor KLa k , S O,sat concentration of saturation of oxygen and volume V k , for Degrémont DP230 porous disks at an immersion depth of 4 m [10]: The mixing energy (ME) is computed for activated sludge reactors if KLa k (t) < 20d −1 (V k is the volume of each reactor) and digester volume V ad [10]: Methane produced in anaerobic digester is used to cover its heating requirements; therefore, the BSM2 protocol calculates the net heating energy HE net as [10,17]: where HE is heating energy necessary to heat the sludge to the digester operating temperature and MET prod is the methane production (kg/d) [10,18]: where Qgas is the total flow of gas from the anaerobic digester, p gas, CH4 is the partial pressure of methane in the mixture of gases, and P gas is total pressure of the gas that contains methane, carbon dioxide, and hydrogen, R is the ideal gases constant 0.083 barL/molK, Top is the operation temperature of digester, and P atm is atmospheric pressure.
The heat required to reach the operation temperature of digester is computed from the following expression, where Q ad is digester feed flow [10], Q pu is primary clarifier underflow, Q ad is thickener output flow, and T pu is temperature of primary clarifier underflow and T tu is thickener output temperature: The CHP system produces the heat required to cover digester requirements according to Equation (7), but the selected reciprocating engine exhibits a heat to power ratio of 0.62, then total heating energy produced is computed as: and heat in excess is calculated from: Finally, net energy used by BSM2 plant with reciprocating engine for cogeneration is computed as: It is interesting to use efficiency indices as a measure of performance. In this case, the ratio between pollution removed by BSM2 plant in kg and the energy consumed to achieve such objective (kWh) is considered. For comparison purposes, two versions of the index are used, the ratio between pollution removed and the total energy required and the ratio between pollution removed and net energy used. The analysis is carried out considering the annual average values of indicators and the dynamic evolution of indicators to capture seasonal effects associated with influent temperature variations (Tin). In the BSM2 model a sine function is used to represent the gradual variation of temperature in a year. Warmer seasons with temperatures close to 20 • C and colder seasons with temperatures close to 10 • C are distinguished, as well as periods of mild temperatures close to 15 • C. To differentiate the seasons, a bimestrial dynamic profile is considered. Then, the operation horizon is divided in six (6) temporal windows. The first one is the warmest period, the second and the sixth are periods of moderate temperatures, the third and fifth bimesters are colder, and the fourth is the coldest period ( Figure 3a).
The assessment of the effect of control actions on performance is carried out considering eco-efficient indicators of energy consumption and the potential to produce energy from biogas, energy self-sufficiency, effluent quality, emissions to air (CO 2 produced in anaerobic digestion), and emissions to soil (sludge for disposal).
Then, the indicators selected for the evaluation of the impact of control actions are: • Biogas flow (Qgas-m 3 /d) • Heating energy (HE-kWh) (Equation (9) Analysis focuses in BSM2 variables, and, therefore, chemical or biological elimination of phosphorus is not considered in the performance analysis.
The result of the analysis of the effect of control actions is a set of possible solutions (control strategies), that combines sequences of changes on control handles that improve WWTP eco-efficiency, either in the full operation period or in a specific season defined by bimestrial temporal windows. The comparison of the proposed solutions is performed through the analysis of the dynamic profiles of the mentioned indicators of performance and the evaluation of the average annual values of indicators of effluent quality, energy efficiency, and economic performance as:  Comparison of net energy consumption of WWTP using biogas to cover heating requirements (no cogeneration) and using CHP to cover electricity and heating requirements (CHP), together with heat in excess available when CHP is used.

Assesment of the Effect of Individual Control Actions on WWTP Eco-Efficiency
The effect of each control movement on energy consumption, biogas production, energy recovery from biogas, effluent quality, CO2 produced in anaerobic digestion, and sludge for disposal is evaluated. Annual average values of indicators are computed to measure the performance in the full operation period, and bimestrial variations are considered to capture relevant and beneficial seasonal effects associated with temperature variation.
The selected control handles (Section 2.2.1) are varied, increasing, and decreasing their default values (see Table 3), and the effect on performance indicators (Section 2.3.1) Comparison of net energy consumption of WWTP using biogas to cover heating requirements (no cogeneration) and using CHP to cover electricity and heating requirements (CHP), together with heat in excess available when CHP is used.

Energy Issues Associated with CHP Implementation
The Combined Heat and Power (CHP) system, used to obtain electricity and heat from biogas, is a key element to achieve eco-efficiency goals in the WWTP. Furthermore, it determines the connection between the water line and sludge line in terms of energy flows. The bimestrial profiles of electricity (Electricity, PE +AE + ME-kWh/d), heating energy requirements (Equation (9)) of BSM2 plant under Default strategy (Table 2) are presented in Figure 3a together with an influent temperature profile. As expected, heating energy requirements increase as temperature decreases while the electricity profile does not exhibit temperature dependency. It is also observed that heating energy requirements are significantly lower than electricity requirements in the warmer bimesters (1,2,6), but in the colder bimesters (3,4,5) energy requirements for heating purposes and electricity use are similar in magnitude. Figure 3b compares net energy of the plant when biogas is used only for heating purposes and when the CHP system is used to generate electricity and heat (E net , Equation (13)). The difference between blue and green lines in Figure 3b (no cogeneration and CHP) evidence the significant reduction on external energy demand, as biogas provides approximately 85% of electricity, while heat in excess (black line) is still available to other purposes in WWTP. When biogas is used only for heating, it is assumed that biogas in excess is flared, and electricity is obtained from external sources with the corresponding impact on operation costs and direct and indirect emissions of greenhouse gases (GHG). The comparison illustrates the importance of cogeneration system to selfsufficiency and energy efficiency of the WWTP. A detailed review of biogas energy recovery options can be found in [17,20].

Assesment of the Effect of Individual Control Actions on WWTP Eco-Efficiency
The effect of each control movement on energy consumption, biogas production, energy recovery from biogas, effluent quality, CO 2 produced in anaerobic digestion, and sludge for disposal is evaluated. Annual average values of indicators are computed to measure the performance in the full operation period, and bimestrial variations are considered to capture relevant and beneficial seasonal effects associated with temperature variation.
The selected control handles (Section 2.2.1) are varied, increasing, and decreasing their default values (see Table 3), and the effect on performance indicators (Section 2.3.1) is analyzed. Results for slower dynamics control actions are separated from faster dynamics control action to facilitate discussion of results. The percentage deviations of performance indicators, with respect to Default Strategy for each variation on control actions, are computed. Except for biogas flow (Qgas/Qin), a positive deviation implies that the evaluated control action produces an improvement on energy consumption, effluent quality or sludge for disposal reducing the magnitude of the performance indicator. Only in the case of biogas flow does a negative deviation represent a beneficial effect of the control action since it is desired to increase biogas production to increase the potential production of energy. Table 4 shows the effect on annual average indicators of the changes applied to primary clarifier volume (VP) and digester temperature (Top). These are considered to be slower dynamic control actions. Symmetrical dynamic profiles have been observed on performance indicators; therefore, results of bimestrial evaluation are not presented here. Performance indicators for Default Strategy are presented in the first column and deviations for each control action are presented in the subsequent columns. There, it is observed that increasing VP to 1000 m 3 produces a significant reduction of net energy (E net ) which reduces energy consumption from external sources. It also produces a slight increase of biogas production, and a slight decrease on heating energy (HE) and electricity consumption. Minor undesirable effects are also observed on effluent quality (EQI) and total nitrogen (N tot ) removal and no effect is observed on the production of sludge for disposal. On the other hand, Top variation only affects heating energy requirements (HE) and consequently, net energy (E net ), producing considerable benefits when Top is reduced to 32 • C. These control actions affect energy efficiency with a minimum impact on effluent quality. Their effect could be complementary and affect digester operation variables in similar time scales. VP affects biogas production of the digester and consequently, net energy, and Top affects heating energy of digester (HE), and consequently, net energy (E net ).

Impact on Annual Average Performance Indicators
The effects of control actions that exhibit faster dynamics Q a , Q w , DO sp , and S NHSP on annual average values of performance indicators are presented in Table 5. First, it is observed that most of these control actions do not affect indicators associated with digester operation: biogas production, heating energy (HE), and sludge for disposal production. On the other hand, as in the case of slower dynamic control actions, all actions produce a significant variation of net energy. Regarding effluent quality indicators, ammonium concentration in the effluent (S NH ) is affected by all these faster dynamic control actions, but the effect of the slow dynamics control actions was negligible. Internal recycle flow (Q a ) and ammonium set-point (S NHSP ) also affects total nitrogen (N tot ) concentration in the effluent. Regarding wastage flow manipulation (Q w ), changes applied on this control handle, produce negative effects on WWTP eco-efficiency. However, it is the only selected control handle that affects the amount of sludge for disposal. Biogas production decreases and net energy consumption is significantly increased when constant Q w = 300 m 3 /d is kept for the full operation period, while effluent quality is worsened when constant Q w = 450 m 3 /d is maintained. In all instances of evaluation of the impact of control actions on annual average values of performance indicators, net energy is affected because the sludge line and water line are connected by energy flow when biogas is used to produce electricity; therefore, it is affected by any action that affects any operation line. On the other hand, changes in Q w , that are another link between water and sludge lines, produce an appreciable impact in all performance indicators considered in the study. An approximate constant CH 4 /CO 2 ratio of 0.69 is computed for all the changes on control actions (Tables 4 and 5), then variations are neglectable in all cases that suggest that CO 2 production in anaerobic digester with respect to biogas production is not affected by selected control actions.

Impact on Bimestrial Average Performance Indicators
Primary settler volume VP and digester operation temperature Top, are the only control actions that affect indicators of performance of anaerobic digester, then bimestrial profiles of biogas flow and methane content of biogas are presented in Figure 4a,b for simultaneous variation of VP to 1000 m 3 and Top to 32 • C. Figures show how the magnitude of indicators in both profiles increases uniformly in the whole operation horizon. Therefore, the changes in these slow dynamics operation conditions can be applied in the full operation period to increase the amount and the quality of biogas.
Since faster dynamic control actions, Q a , Q w , DO sp , and S NHSP exhibited a significant impact on effluent quality indicators (EQI, N tot , S NH ), and electricity consumption in ASP is crucial for process efficiency, the analysis focuses only on Electricity, EQI, N tot , and S NH indicators. Table 6 shows the effect of selected faster dynamic control actions on performance indicators considering bimestrial temporal windows. Percentage deviations of performance indicators with respect to Default Strategy (Table 2), for each variation on control actions, are computed for each bimester. From the observation of the table, different situations where performance indicators exhibit different reactions to control actions on different periods of time are detected. For instance, relaxing DO set-point range to 0.5-4 g/m 3 , decreases electricity consumption in the first and sixth bimesters, but increases consumption from the second to the fifth bimester. Total Nitrogen (N tot ) is worsened in the 3rd and 4th bimesters but improved the rest of the bimesters. This is an interesting observation that allows us to define specific periods of time where certain control actions could be applied to improve performance. Moreover, even though the effect of a control movement is beneficial or unfavorable for performance in the whole operation horizon, the percentage variations of performance indicators in the different bimesters are heterogeneous, which indicates a non-linear effect of the same control action along the operation horizon. Figure 5a,b show the bimestrial profile of electricity consumption and effluent quality index (EQI) for changes in the faster dynamics control actions. It is observed that profiles are not uniformly separated parallel lines, but variations of different magnitude and tendency are observed on each bimester. However, differences between the different profiles seem to be larger in the colder bimester. Variability of the magnitude of the profiles for different control actions is considerable for electricity consumption, while effluent quality does not exhibit significant variations between different control actions.  Since faster dynamic control actions, Qa, Qw, DOsp, and SNHSP exhibited a significant impact on effluent quality indicators (EQI, Ntot, SNH), and electricity consumption in ASP is crucial for process efficiency, the analysis focuses only on Electricity, EQI, Ntot, and SNH indicators. Table 6 shows the effect of selected faster dynamic control actions on performance indicators considering bimestrial temporal windows. Percentage deviations of performance indicators with respect to Default Strategy (Table 2)

Plantwide Control Solutions to Improve WWTP Eco-Efficiency Framework
Bimestrial variations of performance indicators have been used to determine the temporal windows where specific control actions produce beneficial effects that can be translated to improvements of WWTP eco-efficiency. Data presented in Table 6 and bimestrial profiles of performance indicators were examined, and multiple objectives were considered to select the appropriated control actions to be applied in each bimester. Improving WWTP eco-efficiency implies attaining a compromise solution between these goals: reducing energy consumption (net energy, electricity consumption), increasing biogas vol-

Plantwide Control Solutions to Improve WWTP Eco-Efficiency Framework
Bimestrial variations of performance indicators have been used to determine the temporal windows where specific control actions produce beneficial effects that can be translated to improvements of WWTP eco-efficiency. Data presented in Table 6 and bimestrial profiles of performance indicators were examined, and multiple objectives were considered to select the appropriated control actions to be applied in each bimester. Improving WWTP eco-efficiency implies attaining a compromise solution between these goals: reducing energy consumption (net energy, electricity consumption), increasing biogas volumetric flow to produce as much as necessary heat and electricity for self-sustaining operation, and improving effluent quality indicators, or at least, producing the minimum deterioration on effluent quality indicators.
Four possible solutions are proposed from the examination of Table 6 and bimestrial profiles of each indicator: Solution 1, Solution 2, Solution 1 VP, Top and Solution 2 VP, Top. Each possible solution has been designed following a simple multi-objective optimization procedure.
The first strategy, named Solution 1, is obtained from the selection of the changes on faster dynamic control actions that improve the major number of indicators on each bimester, disregarding the effects on ammonium concentration in the effluent (S NH ). An exception is considered in the third bimester, where electricity consumption is minimal, so the priority for the selection of control action was the improvement of effluent quality indicators. The criteria to formulate the second strategy, named Solution 2, is the selection of the possible combination of control actions that improve the major number of indicators, avoiding significant deterioration of ammonium concentration in the effluent (S NH ). VP and Top conserve their default values VP = 900 m 3 and Top = 35 • C. On the other hand, from the analysis of Section 3.1, VP = 1000 m 3 and Top = 32 • C could be applied in the full operation horizon to increase biogas production that is a desired effect to enhance WWTP eco-efficiency. This condition is combined with Solution 1 and Solution 2, to obtain the strategies named Solution 1 VP, Top and Solution 2 VP, Top. The changes on faster control actions performed of each bimester for each proposed solution are presented in Table 7. Table 7. Selected faster dynamics control actions considered in the formulation of Solution1 and Solution 2 control strategies. The four possible solutions (control strategies), consisting of sequences of changes on control handles applied on each bimester that improve WWTP eco-efficiency goals are implemented in BSM2 plant. Electricity consumption and EQI are presented in Figure 5, but for the sake of simplicity the dynamic profiles of the other indicators are not presented in the paper, since the same information is presented in Table 6.

Bimesters
The comparison of Default Strategy and proposed solutions considering the annual average values of indicators of effluent quality, energy efficiency and economic performance, is presented in Table 8.
The comparison of Default Strategy and Solutions 1 and 2, the three strategies where VP = 900 m 3 and Top = 35 • C, considering information of Table 8, shows that selected changes on faster dynamics control actions produce slight to moderate improvements on the indicators associated with operation costs and energy consumption (OCI and energy consumption indicators associated with electricity use). Heating energy requirements and available heating energy in excess are not affected by changes in the faster dynamics control actions. Therefore, the favorable effect of Solution 1 and Solution 2 is associated with energy savings attained with the application of selected faster dynamic control actions and exploitation of electricity produced by the CHP system. Regarding the effect on effluent quality, violations of the N tot and S NH limits are slightly worsened on percentage, incidence, and duration with proposed solutions, but deterioration is not significant except for N tot violations with Solution 1, the impact on EQI is not significant. Similar ratios between pollution removal and energy required and pollution removal and net energy are observed for the Default Strategy and proposed solutions. Operation costs quantified by OCI are slightly reduced applying Solution 1 and Solution 2. On the other hand, information in Table 8 reveals that Solution 1 VP, Top and Solution 2 VP, Top, produce a significant improvement on net energy due to the increase of biogas production and a slight decrease on electricity usage. Reduction of heating energy of digester (HE) makes a larger amount of heating energy available that can be used for other purposes. The effect on effluent quality indicators is similar to that observed with Solution 1 and Solution 2. The ratio between pollution removal and energy required decrease from 0.133 for Default Strategy to 0.122, and the ratio between pollution removal is reduced from 0.009 for Default Strategy to 0.006 for the proposed solutions with VP = 1000 m 3 and Top = 32 • C. A moderate reduction of OCI is observed.
It is important to note that control actions considered in Solution 1 and Solution 2, are limited to control handles of activated sludge process, but Solution 1 VP, Top and Solution 2 VP, Top include control movements in different processes of water line (ASP and primary clarifier) and Top in sludge line. It means that consideration of the interactions between different units, that is a characteristic of plant-wide control strategies, is better addressed in the formulation of Solution 1 VP, Top and Solution 2 VP, Top. Therefore, Solution 1 VP, Top and Solution 2 VP, Top exhibit better performance indicators, producing a significant improvement of WWTP eco-efficiency. Figure 6 shows in Figure 6a the bimestrial profile of pollution/energy (kg/kWh) ratio, that is computed considering the energy required to run the process, and in Figure 6b the bimestrial profile of pollution/energy net (kg/kWh) computed considering the net energy used to remove that amount of pollution (E net ). The profiles show how efficiency of wastewater treatment varies in the different bimesters. The temperature effect is evidenced  Figure 6a, with lower values of Pollution/Energy (kg/kWh) ratio in the colder bimesters. This temperature effect is not appreciable in Figure 6b, where energy net is considered to compute pollution removal efficiency index. It suggests that heat and electricity obtained from biogas exploitation compensate the impact of seasonal variations of temperature on energy requirements. Moreover, the advantage of Solution 1 VP, Top and Solution 2 VP, Top over the other control strategies is more noticeable when efficiency is expressed in terms of net energy, suggesting that the effectivity of the control actions is notorious when interconnection between the water line and sludge is considered in the evaluation of performance. Solution 2 VP, Top over the other control strategies is more noticeable when efficiency is expressed in terms of net energy, suggesting that the effectivity of the control actions is notorious when interconnection between the water line and sludge is considered in the evaluation of performance. Figure 7a shows effluent quality index (EQI) and Figure 7b shows net energy bimestrial profiles. In the first case, temperature effects are noticed since the EQI profile increases in the colder season and decreases in the warmer period because microbial growth rate increases with temperature. It is also observed that magnitude of EQI profile is similar for all the proposed strategies, which demonstrates that improvements on energy efficiency achieved by application selected control actions produced a minimal deterioration of effluent quality, despite the trade-off between both objectives (reducing energy consumption and improving effluent quality). Net energy profile (Figure 7b) is influenced by temperature, slow, and fast dynamics control actions, which explains its variability. Figure 8a,b show bimestrial profiles of total nitrogen concentration in the effluent (Ntot) and ammonium concentration in the effluent (SNH), respectively. In both cases, temperature effects are noticed, with higher values of indicators in the colder season because biomass growth rate increase with temperature with a positive effect on nitrification and denitrification. Finally, the comparison of the control strategies resulting from the application of this methodology with strategies resulting from previous work [9] is carried out considering OCI and EQ, which are the common performance indicators used in actual and previous work. In [9], the cascaded ammonium control strategy and the proposed N/E control strategy, produce EQI values of 5374 kg/d and 5494 kg/d, OCI values of 9023 EUR/d and 8760 Figure 6. (a) Bimestrial evolution of pollution/energy (kg/kWh): the ratio between pollution removed (IQI-EQI) and total energy required to remove that amount of pollution (AE + PE + HE + ME) in BSM2 plant. (b) Bimestrial evolution of pollution/energy net (kg/kWh): the ratio between pollution removed (IQI-EQI) and net energy used to remove that amount of pollution (E net ) exploiting biogas produced in digestion unit of the BSM2 plant. Figure 7a shows effluent quality index (EQI) and Figure 7b shows net energy bimestrial profiles. In the first case, temperature effects are noticed since the EQI profile increases in the colder season and decreases in the warmer period because microbial growth rate increases with temperature. It is also observed that magnitude of EQI profile is similar for all the proposed strategies, which demonstrates that improvements on energy efficiency achieved by application selected control actions produced a minimal deterioration of effluent quality, despite the trade-off between both objectives (reducing energy consumption and improving effluent quality). Net energy profile (Figure 7b) is influenced by temperature, slow, and fast dynamics control actions, which explains its variability. Figure 8a,b show bimestrial profiles of total nitrogen concentration in the effluent (N tot ) and ammonium concentration in the effluent (S NH ), respectively. In both cases, temperature effects are noticed, with higher values of indicators in the colder season because biomass growth rate increase with temperature with a positive effect on nitrification and denitrification. The results presented in this section make evident how the application of plant-wide control strategies is useful to improve performance indicators that represent individual goals, while their trade-offs describe WWTP eco-efficiency. A systematic study of the effect of control actions on energy efficiency indicators, biogas production and effluent quality, considering dynamic effects associated with temperature variations can lead to the   Finally, the comparison of the control strategies resulting from the application of this methodology with strategies resulting from previous work [9] is carried out considering OCI and EQ, which are the common performance indicators used in actual and previous work. In [9], the cascaded ammonium control strategy and the proposed N/E control strategy, produce EQI values of 5374 kg/d and 5494 kg/d, OCI values of 9023 EUR/d and 8760 EUR/d, and Electricity consumption of 5016 kwh/d and 4757 kWh/d, respectively. Form observation of Table 8, it is determined that all solutions proposed in this paper improve those EQ values, but only Solution 1 VP, Top and Solution 2 VP, Top, that consider control actions in WWTP units different from ASP, improves OCI with respect to the N/E strategy. A comparison with strategies presented in [2] is difficult since variations on carbon dosage are considered, so performance is affected by different control actions.
The consideration of energy recovery from biogas complements the assessment of global performance addressed in [9], and the implementation of a control strategy based on the dynamic monitoring of performance could be the next step for the implementation of a comprehensive methodology to address WWTP eco-efficiency.
The results presented in this section make evident how the application of plant-wide control strategies is useful to improve performance indicators that represent individual goals, while their trade-offs describe WWTP eco-efficiency. A systematic study of the effect of control actions on energy efficiency indicators, biogas production and effluent quality, considering dynamic effects associated with temperature variations can lead to the formulation of control strategies that produce significant improvements on WWTP eco-efficiency. Other methodologies proposed in the literature to address WWTP ecoefficiency [4,22] and energy efficiency [2] could be considered in future work to improve the proposed procedure entailing to a systematic analysis of WWTPs eco-efficiency.

Conclusions
In this paper, different solutions based on plant-wide control strategies have been designed based on the evaluation of the impact of different control actions on the WWTP eco-efficiency considering annual and bimestrial behavior. In particular, performance indicators that measure potential energy recovery from biogas, electricity consumption, CO 2 emissions, production of sludge for disposal, and effluent quality have been considered. Such performance indicators are mainly associated with global warming potential, toxicity, and eutrophication potential. The annual-based analysis of performance indicators showed that sludge production and CO 2 emissions are not affected by selected control actions. Digester operation temperature do not affect effluent quality variables, and selected ASP variables (Q a , Q w , DO set-point range, and S NHSP ) do not affect biogas production in the digester, but all selected control actions affect net energy, that is the connection between the water line and sludge line.
The evaluation of bimestrial profiles of performance indicators under selected control actions to address the seasonal effect of temperature, led us to distinguish between slow and fast dynamic control actions. The slow dynamic control actions, VP and Top, produce a unidirectional effect on dynamic profiles of performance indicators in the full operation horizon, while the faster dynamic variable (Q a , Q w , DO set-point range, and S NHSP ) effect varies in magnitude and impact (positive or negative) in the different bimesters.
The analysis allowed us to find the conditions that increase biogas availability (reducing Top and increase VP) as well as the faster dynamic control actions that reduce energy consumption, with a minimum deterioration of effluent quality. The result has been a set of possible solutions, obtained from a multi-objective decision-making procedure, consisting of a sequence of control actions applied at different temporal windows that improve the eco-efficiency indicators of the plant. The results obtained when applying the different solutions make evident how the application of plant-wide control strategies is useful to improve performance indicators that represent individual goals, leading to trade-off solutions that describe WWTP eco-efficiency.
The results evidence the importance of systematic study on the effect of control actions on energy efficiency indicators, biogas production, and effluent quality, considering dynamic effects of input variables to produce significant improvements in WWTP efficiency. Other methodologies proposed in the literature to address WWTP eco-efficiency [4,21] and energy efficiency [2] could be considered in future work to improve the proposed procedure entailing a systematic analysis of WWTP eco-efficiency.

Informed Consent Statement: Not applicable.
Data Availability Statement: Data is contained within the article. The data presented in this study has been generated using BSM2 platform [10].