Quantifying the Benefit of a Dynamic Performance Assessment of WWTP

: In this work a comprehensive analysis of the environmental impact of the operation of a wastewater treatment plant (WWTP) using different control strategies is carried out considering the dynamic evolution of some environmental indicators and average operation costs. The selected strategies are PI (proportional integral) control schemes such as dissolved oxygen control in the aerobic zone (DO control), DO control and nitrates control in the anoxic zone (DO + NO control) and regulation of ammonium control at the end of aerobic zone (Cascade S NHSP ) commonly used in WWTPs to maintain the conditions that ensure the desired effluent quality in a variable influent scenario. The main novelty of the work is the integration of potential insights into environmental impact from the analysis of dynamic evolution of environmental indicators at different time scales. The consideration of annual, bimonthly and weekly temporal windows to evaluate performance indicators makes it possible to capture seasonal effects of influent disturbances and control actions on environmental costs of wastewater treatment that are unnoticed in the annual ‐ based performance evaluation. Then, in the case of periodic events, it is possible to find solutions to improve operation by the adjustment of the control variables in specific periods of time along the operation horizon. The analysis of the annual average and dynamic profiles (weekly and bimonthly) of environmental indicators showed that ammonium ‐ based control (Cascade S NHSP ) produce the best compromise solution between environmental and operation costs compared with DO control and DO + NO control. An alternative control strategy, named S NHSP var Q carb var , has been defined considering a sequence of changes on ammonium set ‐ point (S NHSP ) and carbon dosage (Q carb ) on different temporal windows. It is compared with DO control considering weekly and bimonthly profiles and annual average values leading to the conclusion that both strategies, Cascade S NHSP and S NHSP var Q carb var , produce an improvement of dynamic and annual average environmental performance and operation costs, but benefits of Cascade S NHSP strategy are associated with reduction of electricity consumption and emissions to water, while S NHSP var Q carb var strategy reduces electricity consumption, use of chemicals (reducing external carbon dosage) and operation costs.


Introduction
Historically, the primary objective for collecting wastewater was sanitation to prevent the spread of waterborne diseases. Nowadays, wastewater treatment continuously evolves as the awareness of emerging environmental problems grows. The knowledge about the influence of human activities on climate change has widened the scope for treatment plants beyond only effluent water quality and cost. Today greenhouse gas emissions, energy efficiency and resource recovery also need to be considered when evaluating operational strategies by also minimizing the operational costs in order to achieve sustainable treatments. The optimization of the operations of a wastewater treatment plant (WWTP) is not an easy task. The influent load is constantly varying in flow and concentration, is naturally uncontrolled and arrives every hour of the day, all year round. Rainfall events affect wastewater composition because, in combined sewers, these events increase the flow and pollutants stored in sewer sediments and/or deposited on impervious surfaces are washed out [1,2]. A wastewater treatment plant cannot shut down for review and maintenance. Moreover, the construction with sequential unit processes in combination with multiple return feeds create numerous feed-back effects that makes the processes interconnected in an intricate manner. A WWTP should be considered as an integrated process, where primary/secondary clarifiers, activated sludge reactors, anaerobic digesters, thickener/flotation units, dewatering systems, storage tanks are interconnected and need to be operated and controlled not as individual unit operations, but taking into account all the interactions amongst the processes. Models should describe the processes and their interactions in detail considering the ambient conditions. Thereby, the plant-wide effects are captured so that the overall result can be surveyed, analyzed and sub-optimization avoided. In this complex scenario mathematical modelling and simulation provide a solid base for decision support when evaluating WWTP operations.
Researchers and design engineers in wastewater treatment (WWT) are aware of alternative modelling approaches that can be used to evaluate the appropriateness of control strategies to ensure the quality of the treated water with respect to the regulations in the presence of frequent and large disturbances and variable influent characteristics. The control of the activated sludge process (ASP) is crucial for the appropriate operation of WWTPs. ASP is a commonly used biological treatment, especially in large wastewater catchments. In this biological process, the control of aeration is particularly demanding: its optimization is linked to the minimization of the energy used in a plant [3]. Through modelling and simulation studies, not only can the present operations be evaluated but also future scenarios investigated, for example: load forecasts, plant expansions or alternative operational strategies. Some recent works [4,5] have demonstrated how model-based tools can be used in practice to improve the performance of WWTPs. A scenario-based optimization approach that connects effluent quality variables and energy demand and production, by a simulation procedure is proposed in [4] to improve the energy efficiency of an Italian WWTP using the model developed and calibrated in [6]. Potential savings on annual average energy consumption are reported and effluent quality is improved by operational changes, furthermore, the results showed that modifications in design could affect positively the energy and greenhouse gas balance of the plant. In [5], mass balances have been used to evaluate the impact of operation and plant parameters on nitrogen and organic matter removal efficiencies in another Italian WWTP.
An appropriate management of WWTP can produce significant economic and environmental benefits. A holistic assessment procedure that considers the environmental costs of wastewater treatment is necessary to attain a sustainable operation, minimizing energy consumption and greenhouse emissions. Previous works [7][8][9][10][11] address the integration of the analysis of environmental impact on the evaluation of performance of control strategies applied to WWTP. Specifically, annualbased life-cycle assessment (LCA) is used for the evaluation of economic and environmental performance of a WWTP in [8,9], LCA is applied considering annual average inventory. Global performance indicators are proposed in [10,11]. In [10] an integral performance index that quantifies the effect of the main control actions on water quality, operational cost and greenhouse gas emissions is used to measure the global positive effect of control systems on the plant operation. In [11], an overall efficiency index is used as the controlled variable of a holistic optimizing proportional integral (PI)-control strategy that introduce plantwide considerations.
Nevertheless, there are few studies discussing the additional benefit of adding a new dimension related to dynamic analysis within the performance evaluation procedures [12]. Regarding the LCA methodology that is typically used to evaluate environmental impact of production systems, several authors have critic the lack of a temporal dimension, even though inputs and environmental mechanisms are time varying [12]. Few works can be found that consider the time dependency of indicators of environmental performance of WWTPs. In [12] a dynamic LCA methodology is proposed and a WWTP is used as case study to evaluate the sensitivity of LCA results to temporal parameters. In [11], the evolution of environmental performance indicators is considered in [11] to evaluate the impact of control strategies. In [13], a dynamic model of activated sludge reactors working under an intermittent aeration regime is developed to evaluate the link between aeration and effluent quality, the analysis of airflow rate influence on performance allow to increase process efficiency, producing a reduction of 14.5% on power consumption. The selection of a time horizon is equivalent to giving a weight to time and is one of the most critical parts of the carbon accounting processes [14,15].
The Benchmark Simulation Model No. 2 (BSM2) is a standard simulation model developed as a reference scenario to implement and evaluate control strategies [7][8][9][10][11][16][17][18][19]. The BSM2 represents the water line and the sludge line of a municipal WWTP considering a dynamic influent that contains everything from short-term diurnal variations and weekend effects to long-term variations for temperature and holidays periods [14,[17][18]. The BSM2 platform is selected in this work to represent a municipal WWTP, in order to demonstrate the benefit of adding this extra dynamic dimension to the simulation.
In this paper a comprehensive analysis of the environmental impact of control/operational strategies is performed through a dynamic perspective from a WWTP operation. The main novelty of the work is the introduction of potential insights into environmental impact from the analysis of the evolution of environmental indicators considering different time scales: annual, bimonthly and weekly. The consideration of different temporal windows makes possible to capture periodic seasonal effects associated with influent variations and interactions between control actions and environmental costs of wastewater treatment that are unnoticed in the traditional performance evaluation based on the analysis of annual average indicators. Indeed, the analysis of plant behavior in shorter time horizons makes possible to capture dynamic effects that are hidden by the evaluation using annual based indicators of performance.
The main objective is to show the benefits that result from adding dynamic perspective to plant performance evaluation criteria evaluation of control/operational strategies. The analysis makes possible to find solutions to improve operation by the adjustment of the control variables in specific periods of time along the operation horizon. It allows to improve the wastewater treatment in terms of energy efficiency, resources recovery and greenhouse gas emissions, while not compromising effluent quality and still maintaining control of the operational cost.
The remainder of this paper is organized as follows. Descriptions of a reference wastewater treatment plant (BSM2 model), control strategies and environmental performance indicators are presented in Section 2. Results of the evaluation of annual average and dynamic (weekly and bimonthly temporal widows) of environmental costs considering the selected control strategies and the results of the comparison with alternative operation strategy are presented in Section 3, closing with some conclusions.

Description of the Wastewater Treatment Plant and Control Strategies. Benchmark Simulation Model No. 2 (BSM2) Platform
The process lines commonly distinguished in a municipal WWTP are water line, where pollution removal is carried out, sludge line and gas line. In this work, the water and sludge lines of a municipal WWTP are represented using the BMS2. This recognized simulation platform describes the plant layout, the simulation model, the influent profile and the evaluation protocol [17][18][19]. The BSM2 plant comprises primary clarification and activated sludge process units in the water line and anaerobic digestion, thickening and dewatering operations in the sludge line ( Figure 1). The plant is designed for an average influent dry weather flow rate of 20,648.36 m 3 /d and an average biodegradable chemical oxygen demand (COD) in the influent of 592.53 g/m 3 . Its hydraulic retention time, computed considering average dry weather flow rate and total tank volume of 18,900 m 3 , is 22 h (total tank volume includes: primary clarifier (900 m 3 ) + biological reactor (12,000 m 3 ) + secondary clarifier (6000 m 3 )) [18,19].
In the water line, a modification of the benchmark simulation model 1 (BSM1) is used to represent the activated sludge process (ASP) where biological nitrogen and organic matter removal take place by means of nitrification and denitrification processes [16]. In nitrification process, nitrogenated compounds (mostly in the form of ammonium NH4) are sequentially oxidized to nitrite and to nitrate by autotroph bacteria that are strict aerobes, while heterotrophs transform nitrates in nitrogen gas (N2) by denitrification. These biological processes are carried out in a system of 5 bioreactors in series. The first two reactors are anoxic and perfectly mixed to facilitate denitrification, the last three reactors are aerated to promote the nitrification step. Nitrate is recirculated from the aerobic to the anoxic zone (internal recycle flow Qa). A secondary clarifier separates clean water from sludge. The clean effluent (Qe) is discharged and the sludge is partly a wastage flow (Qw) that is fed to the sludge line and partly recycled to the anoxic zone (external recycle flow Qr). The Activated Sludge Model no. 1 (ASM1) [20,21] describes these biological processes and the effect of temperature in the biological kinetics considering eight biological processes and 13 state variables on each reactor. The settler (secondary clarifier) is described using the model of Takács et al. [22].
In the sludge line, a thickener prepares the sludge collected from the primary and secondary clarifiers for the anaerobic digestion. A dewatering unit is used to increase the concentration of the stabilized sludge. As shown in Figure 1, there is a storage tank before recycling the remaining sludge to the water line and the liquids collected in the thickening and dewatering steps are recycled to the primary settler [18]. The digester is modeled using the anaerobic digestion model (ADM1) of [23].

Significant Operating Variables and Control Strategies
Since the main objective of a BSM2 plant is nitrogen removal, the aim of the control strategies applied to the BSM2 plant is to ensure the appropriate conditions for nitrification/denitrification processes in the ASP. Dissolved oxygen (DO) concentration in the aerobic zone is a determining variable for oxidation mechanisms involved in nitrification process. On the other hand, carbon dosage is a key variable when external carbon source is required in the anoxic zone to provide readily biodegradable substrate to heterotrophs. The sludge age or solids retention time (SRT), which is a measure of the time that sludge (cells, microorganisms) remain in the system, and the food to microorganism ratio (F:M), that represents the balance between the quantity of substrate available and the quantity of microorganisms in the biological reactors, are other important factors for the appropriate course of biological reactions.
The available control handles in the ASP bioreactors are the airflow rate, the internal recirculation (Qa), the sludge recirculation (Qr), the sludge purge flow (Qw) and the external carbon dosage (Qcarb). Then, DO control or ammonium-based supervisory control (regulation of ammonium concentration SNH) in the aerobic basin is performed by manipulation of the airflow rate. Control of nitrates concentration (SNO) in the anoxic zone is carried out by manipulation of internal recirculation flow (Qa) that transport nitrates produced in the aerobic zone to anoxic zone. Moreover, carbon dosage (Qcarb) is a manipulated variable that affects nitrates concentration (SNO) also. In practice, it is usual to maintain constant values of Qa and Qcarb over long periods of time to regulate SNO. Purge flow (Qw) is used to regulate the sludge age (or SRT) and external recirculation (Qr) regulates the F:M ratio. A detailed description can be found in [24,25].
In the sludge line, the loading rate, given in part by ASP purge flow (Qw), and the composition of the input sludge flow affect the characteristics of the biogas and stabilized sludge in the anaerobic digestion. Temperature is another critical variable, that is maintained between 32-35 °C using energy from biogas to heat the sludge input flow. Other important operation variables are the solids retention time (more than 20 days) and pH (6.8-7.2).


Operation strategies: BSM2 default strategy and modifications The default operation strategy of BSM2 plant includes a DO control scheme in the activated sludge process, distinguished as a DO default control scheme, and open-loop actions to regulate the levels of nitrates in the system, sludge age, F:M ratio control and digester temperature: The objective of operation strategy is to maintain levels of pollutants in the effluent, such as Nitrogen (Ntot), ammonium (SNH), nitrates (SNO), total chemical oxygen demand (CODt), total suspended solids (TSS) and biological oxygen demand (BOD5), bellow the limits given by effluent quality requirements. The indicators considered in this work are given by BSM2 platform [17][18][19]: Ntot < 18 gN/m 3 , SNH < 4 gN/m 3 , CODt < 100 gCOD/m 3 In this work, two alternatives to the DO control scheme of the default BSM2 strategy described above (Figure 2a - The addition of a closed loop for the control of nitrates concentration at the end of the anoxic zone using the internal recycle (Qa). The combination of both loops, DO default and nitrates control, is similar to the default control strategy of BSM1 platform [13]. 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 the anti-windup constant. The tuning parameters of the controllers can be found in [19] for DO controller, [20] for nitrates controller and [10] for ammonium controller. Table 1 summarizes the BSM2 operation strategy, including the three possible control schemes studied in this paper and the effluent quality objectives.

Performance evaluation protocol
The BSM2 platform provides an evaluation protocol for the control strategies tested in the plant [12]. These indicators are computed, using a code provided by BSM2 simulator for an evaluation period of one year, starting 1 July. The program computes the most important variables associated with the load and composition of influent, effluent, biogas and sludge in a given temporal window. The notation for the interesting variables (most of them ASM1 variables): SI-soluble inert organic matter, SS-readily biodegradable substrate, XI-particulate inert organic matter, XS-slowly biodegradable substrate, XB,H-active heterotrophic biomass, XB,A-active autotrophic biomass, XPparticulate products arising from biomass decay, SO-oxygen, SNO-nitrate and nitrite nitrogen, SNH-NH4 + + NH3 nitrogen, SND-soluble biodegradable organic nitrogen, XND-particulate biodegradable organic nitrogen, Qin-influent flowrate, Qe-effluent flowrate, Tin-influent temperature, Tdigester temperature A sub-index is used to indicate the number of the reactor associated with the variables when is necessary.
Some indicators given by BSM2 platform are the effluent quality index (EQI) that measures the effluent water quality as a weighted average of effluent COD, BOD, ammonia, nitrate and total solid loads, the overall cost index (OCI) [17][18][19] that provides a relative comparison for the operational cost including, power for mixing aeration and pumping, carbon source addition, heating of the digester, utilization of biogas and disposal of sludge. A modification is introduced in this work to obtain direct carbon dioxide (CO2) emissions produced in ASP.
The effluent quality index [19,20] where the subscript index: e is used to distinguish the variables in the effluent. The influent quality index (IQI) has been defined to characterize the influent [19,20]: where SSi, CODi, Ntoti, BODi are analogous to SSe, CODe, Ntote, BODe but the subscript index: i is used to denote the variables in the influent. The global operational cost (OCI) is: 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 and HEnet is [19,20]: where HE is heating energy necessary to heat the sludge to the digester operating temperature and METprod is the methane production (kg/d).
Regarding greenhouse emissions, direct emissions from activated sludge process are calculated as in [26], considering the following equations:

Evaluation of the Impact of Dynamic Behavior Actions on Environmental and Operating Costs
Several characteristics of WWTPs make the optimization of their operation a challenging problem: 1. The objective of a WWTP is to minimize the emissions to water; however, wastewater treatment implies environmental impacts associated with energy consumption, use of chemicals and emissions to soil and air (solids and greenhouse gases). The control actions carried out to ensure the desired elimination of water pollutants (i.e., emissions to water) affect those environmental costs as well as the operation costs. Then, for a sustainable operation of WWTPs control systems should lead to operating conditions that satisfy the compromise between environmental costs, operating costs and appropriated plant performance. 2. The influent is constantly varying in flow and concentration mainly due to seasonal and daily variations of population activities, which modifies continuously the load to be treated. Temperature and rainfall effects produce significant changes in the processes affecting its efficiency. Since biological processes are non-linear, the variability of the inputs produces a variable behavior, which makes it difficult to find and maintain operating conditions that ensure the desired process performance with an optimal use of resources and minimum evitable emissions. 3. Due to the interactions and interconnections between the different units, the control actions performed in ASP have an impact in the whole plant effecting, sludge and biogas production which are emissions to soil and air, respectively.
Then, dynamic analysis of the effect of control actions on environmental and operating costs facilitate to detect dynamic effects on environmental indicators that are hidden in the annual based analysis of environmental impact [12,27] but can be relevant at smaller time scales. Identifying the effect of periodic variations and particular events in the influent in different temporal windows along the year provide the means to determine alternative control actions that can be applied to improve plant efficiency in such scenarios.
Conflicts regarding energy use, greenhouse gases emissions and use of chemicals are considered in the analysis: 1. Electricity used to perform control actions is the most important factor in the operating costs being aeration the main contribution [28] and it is also the major source of indirect carbon dioxide (CO2) emissions, then, the minimization of electricity consumption in the control actions improve economics as well as environmental costs. 2. Heating requirements to keep the temperature of the anaerobic digestion close to 35 °C are covered using the biogas obtained as by-product. Biogas in excess can be used to produce electricity and reduce operating costs, but indirect emissions of CO2 are produced when using biogas to obtain energy. 3. An external carbon source is required to provide enough organic matter to heterotrophs for denitrification. Carbon dosage can decrease the concentration of nitrates, reducing total nitrogen emissions to water but it is a chemical additive that increases also operating costs. 4. Biological processes in ASP produce greenhouse gases as CO2. Biogas from anaerobic digestion contains methane, CO2 and hydrogen. The sludge for disposal is a solid residue that affects soil.

Analysis Procedure
The general idea is to evaluate the impact of the control actions to find an operation strategy that produce a satisfactory trade-off between environmental and operating costs. It should be considered that wastewater treatment plants (WWTP) are subject to large disturbances related to variations in the flow and composition of the incoming wastewater. These variations are associated with human activity in the catchment or rainfall effects and seasonal effects due to the temperature changes along the year. The influent variations affect process behavior and produce a reaction of the control system to reject disturbances and maintain the appropriated operating conditions. Annual, bimonthly and weekly periods are considered to capture such cause-effect relations in different operating windows. The annual average values of the environmental indicators and operating costs (OCI) measures the performance in the full operating horizon. The weekly profiles capture the effect of short time variations associated with rain events and human activities and bimonthly profile allows the observation of long-time effects in influent flow and temperature associated with the different seasons. This analysis makes it possible to identify the changes on operation variables that can be made in a specific temporal window to improve the plant behavior.
The criteria to select the environmental indicators considered in this study is the possibility of being affected by control actions, even though data provided by BSM2 protocol can be used to perform a more detailed environmental analysis. The selected indicators are: For energy: -Electricity consumption (kW) that includes aeration energy in the ASP (AE), pumping energy (PE) and mixing energy (ME) used in the whole plant.

-
Heating energy (HE) in kW h required to maintain the sludge fed to digester at 35 °C.

-
For chemicals usage: - The load of the external carbon source that is methanol with a concentration of 40,000 g/m 3 with a flowrate given by Qcarb.
For emissions to air: -Amount in g of methane (Biogas CH4) and carbon dioxide (CO2-digester) produced in anaerobic digester. Operational costs are measured using the OCI in euros/day (EUR/d).
All indicators are computed for a given temporal window and are expressed with respect average influent flow Qin (m 3 /h) in such time period. Then, Ntot Load/Qin (g/m 3 ) and SNH Load/Qin (g/m 3 ) are referred as concentrations Ntot and SNH.

 Temporal characterization of BSM2 dynamic influent
The BSM2 model represents a plant located in the northern hemisphere. The available dynamic influent profile describes seasonal changes of temperature and influent flowrate, characteristic daily and weekly variations associated with population activities and precipitations [8,12]. Both daily and seasonal variations of temperature are modelled with a sinus function [8]. The evaluation period contemplated in the simulation platform is one year, starting 1 July in a plant located in the northern hemisphere.
The characterization of influent behavior is important to identify the significant events on influent behavior that affect operating conditions and the temporal window that capture such an event. Weekly and bimonthly profiles of the most important influent variables: temperature, influent flow Qin, and influent concentrations of COD and Ntot (Equations (3) and (4)) are presented in Figure  3. It is observed that temperature profile (weekly or bimonthly) follows a senoidal function with a minimum in the colder (4th) bimester and a maximum in the warmer (1st) bimester. Weekly profiles of influent flow (Qin), total nitrogen (Ntot) and COD observed in Figure 3 exhibit frequent disturbances with eventual minimums and peaks due to population activities and rain events, while bimonthly profiles show the seasonal effects as the period with the highest influent flow (Qin) that is the 3rd bimester, the driest period (1st bimester), the period with lower load (3rd bimester) and the period with the lowest load (2nd bimester). Table 2 summarizes the annual averages of influent variables as well as the maximum and minimum values in the different time scales, quantifying the variations observed in Figure 3. The information provided by Table 2 allows us to demonstrate that WWTP influent exhibits variations of temperature of approximately 10 °C between the colder and warmer period that affect significantly biological processes kinetics. Moreover, the quantification of the differences between the maximum and minimum values of influent flow and load in the different time scales, shows how relevant are the changes in the influent that affect WWTP behavior. In order to maintain the desired WWTP performance, different control actions are executed to face these appreciable variations of influent characteristics detected in different time horizons. These actions affect environmental performance of WWTP; a dynamic analysis of environmental indicators is interesting to determine the impact of control actions considering the time varying characteristics of the process.

Results
The evaluation of process behavior is performed for an operation cycle of one year using the control strategies described in Table 1 (DO default, DO + NO control and Cascade SNHSP). The selected environmental indicators and operating costs are computed considering the different temporal windows to capture: (1) the impact of slow disturbances associated with seasonal behavior of influent, and (2) the impact of variations on influent flowrate and load detected in weekly and bimonthly periods.
Following the BSM2 protocol, a simulation of 609 days is carried out but only the last 365 days (one year) are considered to compute the performance indices and environmental indicators [11]. The .output data is stored with a sampling time of 15 min. These outputs are used for the calculation of the environmental indicators and the OCI. Thus, the annual, bimonthly and weekly mean of the selected environmental indicators (Section 2.2.1) are computed, and weekly and bimonthly dynamic profiles are obtained to show the effect of control actions and influent variations on different temporal windows.
This is a first step of the analysis, whereby different control strategies are compared and the control scheme that produce the best compromise between environmental and operational costs is selected. In a second stage, the effect of set-point changes and carbon dosage (Qcarb) on plant behavior with the selected control strategy is evaluated, in order to determine control movements that improves environmental and operating costs in a given operation window.


Analysis of behavior in the full operating period (one year) Table 3 presents the annual average values of environmental indicators and operation costs computed with respect to the volume of treated wastewater.
Energy consumption. The lowest consumption of electricity is attained with the Cascade SNHSP scheme. This strategy varies DO set-point to regulate effluent ammonium concentration which reduces the consumption of energy for aeration, while the other schemes keep a constant DO setpoint of 2 g/m 3 in the full operating period. Regarding heating requirement of digester, the heating energy (HE) is equal with the three control schemes.
Use of chemicals. A constant carbon dosage (Qcarb = 2 m 3/ d) is applied in all cases.
Emissions to air and emissions to soil. The amount of CH4, CO2 (emissions to air) and sludge (emissions to soil) produced in anaerobic digester is the same with the three control schemes. Conversely, the amount of CO2 produced by biological processes in ASP varies with the different control schemes, attaining the lowest levels with Cascade SNHSP scheme.
Emissions to water. The lowest Ntot concentration in the effluent is obtained with Cascade SNHSP scheme but also the highest concentration of ammonium (SNH). The Cascade scheme exhibits the lowest EQI, i.e., the lowest pollution load in the effluent considering nitrogenated compounds, organic matter and biomass. The concentration of COD in the effluent is similar for the three schemes.
The OCI depends on electricity, heating energy, chemicals and sludge treatment. Electricity usage is the only factor of OCI that varies with the different control schemes, therefore, the lower OCI is obtained with Cascade SNHSP scheme due to the reduction of energy requirements attained with this control scheme. Table 4 present the variation of environmental and operating costs indicators observed with ammonium-based control (Cascade SNHSP) and DO and nitrates control (DO + NO control) relative to the DO default control scheme. The major impact of Cascade SNHSP scheme is observed on total nitrogen concentration with an improvement of 16.2% and SNH levels with a significant increment of 121%. The Cascade control scheme has a positive effect on five of the six indicators (5/6) decreasing its annual average values and the indicators that are worsened, and the levels of SNH (1.053 g/m 3 ) are still below the desired limits (4 g/m 3 in Table 1) with a back-off of 70%. Therefore, it can be concluded from the annual analysis that Cascade SNHSP scheme produce the best trade-off between environmental and operating costs. Now, dynamic analysis is carried out in to provide insight on the dynamic effect of control actions on environmental and operational costs that are hidden when annual average values of indicators are considered.   Analysis of dynamic behavior considering weekly and bimonthly time scales The dynamic evolution of the environmental indicators considering weekly and bimonthly temporal windows is presented here. For simplicity, a profile of total CO2 emissions is presented instead of separated profiles of CO2 from the digester and CO2 from the ASP, and Ntot, SNH and EQI profiles are considered to characterize emissions to water. Figure 4 presents the bimonthly and weekly dynamic profiles of environmental indicators associated with energy usage: electricity consumption and heating energy (HE). The dynamic profile of electricity consumption with the three control schemes exhibits the combined effect of influent flow, COD and Ntot that affect the load to be treated. There are peaks on weeks 6, 7 and 50 and minimums on weeks 22, 24 and 46 corresponding to extreme values of influent variables in the weekly profiles (See Figure 2). A seasonal effect is detected in the bimonthly profile, electricity consumption is maximum in the first and second bimesters, that is the driest period of the year, and more energy is required to track DO set-point in these conditions and decreases significantly in the 3rd bimester, that is the period with the largest influent flow and lowest concentration of pollutants. The temperature effect is not evidenced in the evolution of this indicator. Electricity consumption is associated with control movements of the control schemes (i.e., aeration energy, pumping energy), then the frequent variations observed in the weekly profile of the control schemes that keep a constant DO set-point (DO default and DO + NO control) are associated with control actions that keep DO close to set-point in the presence of disturbances in the load. The similitude between DO default and DO + NO control profiles suggest that variations in electricity consumption are mainly produced by aeration. On the other hand, the Cascade SNHSP scheme exhibits variations with load similar to the variations observed with DO-based control schemes, but electricity consumption is significantly reduced since it is not necessary to increase aeration to keep a fixed DOset point. In the bimonthly profiles, the periods of maximum and minimum consumption coincide with DO-based schemes, but the variation pattern is completely different.
Regarding heating energy (HE) profiles, a clear effect of temperature with maximum heating requirements in the colder period and minimum requirements in the warmer season are observed in weekly and bimonthly profiles. The profiles with the three control schemes coincide exactly, which indicates that the effect of tested control schemes on energy requirements of digester is negligible. Figure 5 shows the weekly and bimonthly profiles of the environmental indicators associated with emissions to air and soil: CH4 content on biogas, sludge production and carbon dioxide emissions. There is no evidence of a significant temperature effect in the profiles of the three variables. The weekly and bimonthly profiles of CH4 content on biogas reproduce the variation of COD concentration in the influent; it is recognized that COD content in the digester feed have a significant effect on biogas production [19], so influent variations of COD are reflected in the composition of Qw that is fed to the digester. In the case of sludge for disposal, the dynamic pattern does not coincide with influent variations, except for the periods of minimum production in the third bimester that coincides with the maximum influent flow and minimum Ntot and COD concentration. Regarding the effect of control schemes, identical weekly and bimonthly profiles of CH4 content in biogas and sludge for disposal are obtained with the three control schemes indicating a negligible influence of control actions on these variables. CO2 production in ASP is governed by biological processes that are affected by load to be treated, so the effect of influent variables is evidenced in the profiles of CO2 emissions. The frequent changes observed in the weekly profiles coincide with continuous influent variations and bimonthly profiles, allowing us to distinguish a period with the lowest emissions in the 3rd bimester and higher emissions in the driest period, the 1st and 2nd bimesters. The CO2 emissions profiles with the three control schemes exhibit the same pattern of variation but different magnitudes, the Cascade SNHSP scheme produces the lowest CO2 emissions in the full operation horizon since treatment intensity is reduced due to reduction in aeration, but on the other hand DO + NO control produces the higher emissions since strict treatment requirements are imposed by simultaneous regulation of DO and NO set-point. Figure 6 shows the weekly and bimonthly profiles of the environmental indicators associated with emissions to water: total nitrogen (Ntot), ammonium concentration (SNH) and EQI. The influence of influent variation is evidenced by the valleys between weeks 5 and 7, in all indicators, and some peaks that coincide with extreme values of influent concentration and flowrate. Seasonal effect of temperature and load are observed in the bimonthly profiles, especially in the case of SNH and EQI that exhibits higher values of the indicators in the period of lower temperature (4th bimester) and lower values in the warmer period (1st bimester). These variables determine the effluent quality attained with wastewater treatment, and then they are significantly affected by control actions. The weekly and bimonthly profiles of total nitrogen (Ntot) are completely different depending on control strategy. In the case of the DO control and DO + NO control schemes, it is evident that variations associated with changes in the influent load are attenuated by control actions that regulate nitrogen removal adjusting DO concentration to a constant DO set-point. The bimonthly profiles with DObased control schemes do not suggest a seasonal effect. In the case of the Cascade SNHSP scheme, larger variations associated with changes in influent load are observed in the weekly profile and, in the bimonthly profile, it is observed how Ntot increases in the colder period, where biological removal is slower, and decreases in the warmer bimesters, where microorganism activity increases. This control scheme varies the DO set-point with ammonium concentration in the last bioreactor, then pressure on biological nitrogen removal is reduced and the effect of other variables is more notorious. Regarding the SNH and EQI profiles, they exhibit a similar variation pattern with the three control strategies with significant differences in the magnitudes of the indicators. The regulation of nitrates concentration with the DO + NO control scheme produce minimum levels of ammonium in the effluent in the full operation period while the highest values are attained with Cascade SNHSP scheme. EQI measures pollution content in the effluent including COD, BOD, total nitrogen and ammonium, and this indicator exhibits the lower values with the Cascade SNHSP scheme but, it is detected that in the periods of largest influent flow, lowest concentration of influent pollutants and lower temperature, the 3rd and 4th bimester, Cascade SNHSP scheme and DO control attain the same values. The worst EQI profiles correspond to DO + NO control.  Summarizing, the analysis of the weekly and bimonthly profiles provide evidence that the effect of control strategies on environmental indicators associated with the sludge line as heating energy (HE), CH4 content in biogas and sludge production is minimal. The dynamic profiles allow us to detect the significant effect of influent temperature for HE, and CH4 content in biogas, while sludge production is affected by seasonal behavior of influent flow rate. The electricity consumption is associated with manipulated variables of the control schemes such as aeration energy and pumping energy, so the dynamics of electricity consumption depends on control actions performed to deal with frequent and seasonal changes in the influent load. Dynamic behavior of indicators of emissions to water and CO2 emissions is determined by control actions performed to regulate the nitrogen removal process. However, analysis of those dynamic profiles allows to detect seasonal effects of influent load and temperature in CO2 emissions, SNH, EQI and Ntot, that cannot be observed in a study based on the evaluation of annual average environmental indicators. Then, analysis of dynamic performance considering different time scales provides insights into the effect of seasonal and periodic influent disturbances that can be useful to take adequate control decisions. Moreover, it allows us to capture the interactions between control actions and environmental impacts that can be addressed by the opportune adjustment of control variables.
This statement can be supported by comparing maximum difference between the values of indicators for the weekly and bimonthly profiles and the average annual value (DO control is used as a reference for comparison) shown in Table 5. Average values provide a quantification of performance in the full operational horizon, while dynamic profiles provide information of the changes experimented by indicators along the operation horizon that cannot be appreciated using annual based indicators. The possibility to detect such dynamic effects increases as the operation window decreases. In Table 5, the differences between the maximum and minimum values for the weekly time scales are attenuated in the bimonthly time scale. In order to select the control strategy that exhibits the best dynamic performance, a quantitative comparison of the mean bimonthly values of environmental indicators significantly affected by control actions (Electricity, Ntot and EQI) is presented in Table 6. It presents the variation of indicators obtained with the Cascade SNHSP scheme and DO + NO control with respect to the DO control scheme, since it is the typical strategy implemented in WWTPs. Weekly mean values of indicators are not presented, because a large amount of data had to be reported and qualitative information from  Table 5 evidence the improvement of electricity consumption, Ntot concentration and EQI attained with the Cascade SNHSP scheme in the full operation period with respect to the DO control scheme. Effluent SNH concentration is worsened, but the highest value of SNH in the weekly profile is still significantly below the desired limit (4 g/m 3 ), so it is admissible. The DO + NO control scheme improves only SNH concentration and worsens Ntot concentration, attaining values that violates the desired limits in the weekly and bimonthly profiles. Thus, the analysis of the average annual indicators and the qualitative observation of dynamic profiles leads to the conclusion that the best performance in terms of environmental and operational costs is achieved with the Cascade SNHSP scheme.
In order to determine the effect of other control actions on environmental indicators when using Cascade SNHSP scheme, in the next sections the effect of ammonium set-point SNHSP and external carbon dosage Qcarb variations is evaluated. For the sake of simplicity, the analysis is performed considering the annual average values of the indicators significantly affected by SNHSP and Qcarb variations, the weekly dynamic profiles for ammonium set-point changes and bimonthly profiles for carbon dosage variation and the comparison of the bimonthly mean values. The idea is to detect this through observation of the dynamic effect of these control actions, when the changes with respect to default Cascade SNHSP scheme with constant SNHSP = 1 g/m 3 and Qcarb = 2 m 3 /d can be favorable to environmental performance.

Different Set-Points for the Ammonium-Based Control Scheme (Cascade SNHSP)
Three possible set-points are considered for the Cascade SNHSP scheme, default set-point 1 g/m 3 , a set-point close to the admitted limit 4 g/m 3 and a relaxed set-point 6 g/m 3 . The annual average values of the environmental indicators affected by control actions (Electricity consumption, CO2 emissions and effluent variables: Ntot, SNH and EQI) are presented in Table 6, together with the variations relative default Cascade scheme with SNHSP = 1 g/m 3 .
Increasing ammonium set-point implies increasing ammonium concentration in the effluent (SNH) as is observed in the values reported in Table 7, it reflects also on EQI. However, other indicators as energy consumption, CO2 emissions, Ntot in the effluent and operation costs (OCI) are improved when requirements on ammonium concentration in the effluent are reduced. Moreover, the negative impact of relaxing SNH set-point can be tolerable if it is compensated by a significant improvement on other indicators, since SNH in the effluent is still separated from its limit (4 g/m 3 ) with an approximated back off of 56% in the worst case (SNHSP = 6) and the increment on EQI is small (1.9%). The analysis of dynamic behavior of the indices allows us to detect particular situations in a given temporal window where combination of the effects of influent variations, control actions and ammonium set-point variation produce a positive effect on environmental performance. Weekly profiles are considered since ammonium set-point changes affects biological processes that occur in a short time scale [8]. Table 7. Annual values of environmental indicators and operating costs of a BSM2 plant with respect to the volume of treated wastewater using the ammonium-based control scheme (Cascade SNHSP) with different set-points and variation relative to 1 g/m 3 set-point.  Figure 7 presents weekly profiles of electricity consumption and CO2 emissions and Figure 8 presents weekly profiles of the indicators associated with emissions to water: Ntot, SNH and EQI. The variation of bimonthly means of electricity, Ntot, SNH and EQI obtained with the Cascade scheme with SNHSP = 4 g/m 3 and SNHSP = 6 g/m 3 with respect to original SNHSP = 1 g/m 3 is presented in Table 7. In Figure 7 it can be observed that profiles of electricity consumption and CO2 emissions decreases their magnitude as SNHSP increases but exhibit the same pattern of variation. The variation of electricity consumption reported in Table 8 provide evidence that the changes are larger between the 3rd and 5th bimesters where load and temperature effects are significant. Regarding indicators of emissions to water, in Figure 8 it is observed that magnitude of Ntot profile decreases as ammonium set-point increases, but the effect is notorious in the colder weeks . The opposite effect is observed in SNH and EQI profiles, ammonium concentration in the effluent and EQI increases as SNHSP increases, but it is more notorious in the colder weeks. Moreover, SNH values are significantly affected while the impact on EQI can be negligible in the warmer weeks. These observations are supported by the quantitative information reported in Table 8.
The solution to improve plant performance modifying ammonium set-point (SNHSP) depends on different factors. Increasing the SNHSP reduces electricity consumption and CO2 emissions and minimizes Ntot but increases ammonium emissions (SNH). The SNH set-point could be increased in specific periods of time, where other factors compensate the deterioration of EQI and emissions of ammonium to water, to produce a positive effect on electricity consumption, CO2 emissions and Ntot. The adjustment of carbon dosage, the effect of which is evaluated in the next section, can produce conditions favorable to increase ammonium set-points in particular temporal windows.

Effect of Variation of External Carbon Dosage (Qcarb) with the Ammonium-Based Control Scheme (Cascade SNHSP)
In the default operation strategy, an external carbon source with a concentration of 40,000 g/m 3 is added to the first anoxic reactor at a constant flowrate Qcarb = 2 m 3 /d. The effect of variations of Qcarb to lower values, including Qcarb = 0 is evaluated considering annual and bimonthly time scales since it affects biological processes in a medium time scale, and it is easier to appreciate this effect using bimonthly profiles. Table 9 presents the annual average values of environmental indicators and operating costs computed with respect to the volume of treated wastewater, and the variations observed on the annual average values of the indicators relative to the default Qcarb = 2 m 3 /d are presented in Table 10.
In Tables 9 and 10 it is observed that variation of Qcarb affect, even slightly, all environmental indicators from the water and sludge line. Decreasing carbon dosage produce a slight positive effect ranging between 1% to 4% on electricity consumption, CO2 emissions from the digester, sludge production, SNH concentration in the effluent and heating energy (HE). On the other hand, a slight negative impact is observed in biogas production, CO2 emissions from ASP and COD in the effluent.
The reduction in the use of chemicals, measured as the amount in kg COD of external carbon, is proportional to Qcarb. Carbon dosage affects directly the operation costs since OCI includes a term that accounts external carbon with a cost factor of 3 EUR/kg, then operation costs can be reduced 15.6% when half of the carbon dosage is used and can be reduced to 30% eliminating carbon dosage (Qcarb = 0).
The variables that are significantly affected by Qcarb are Ntot and EQI which vary up to 33.1% and 13.8% respectively. The amount of organic matter provided by Qcarb is used as substrate by heterotrophs for denitrification, then reducing available substrate to transform nitrates (SNO) to N2 gas increases the amount of nitrates in the effluent and consequently Ntot and EQI.
The dynamic behavior of total nitrogen in the effluent (Ntot) and EQI is observed using bimonthly profiles (Figure 9), since the effect of Qcarb variation on these variables is clearly observed considering this time scale. The Ntot and EQI profiles shown in figure 9 exhibit the same variation patterns with different magnitudes for the different values of Qcarb, and the magnitude of the profiles increases proportionally to Qcarb reduction. There is only one exception in the case of EQI that exhibits a different trend in the 4th bimester with Qcarb = 2 g/m 3 . Table 11 presents the variation of bimonthly mean values of Ntot and EQI for the different Qcarb values relative to the default Qcarb = 2 g/m 3 .
Decreasing carbon dosage implies a significant reduction in the use of chemicals and operating costs but produces a negative impact on total nitrogen and effluent quality index. A comprehensive evaluation of Qcarb effect allows us to determine the temporal windows where other effects compensate the negative impact on Ntot and EQI of Qcarb reduction, to minimize operation costs and the use of chemicals. Table 9. Annual values of environmental indicators and operating costs of the BSM2 plant with respect to the volume of treated wastewater using the ammonium-based control scheme (Cascade SNHSP) with SNHSP = 1 g/m 3 and different values of Qcarb.

Selection of the Alternative Strategy for the Best Trade-off Solution
The ammonium-based control scheme with constant SNHSP = 1 g/m 3 and Qcarb = 2 m 3 /d is selected as the best trade-off solution between environmental and operational costs compared with the DO default control and DO + NO control schemes. The analysis of the dynamic behavior in the weekly and bimonthly time scales, including the effect of variations of ammonium set-point SNHSP and Qcarb, allows us to determine how control actions and influent variables affects environmental indicators in different temporal windows. The analysis makes it possible to determine the temporal windows where different control actions can be applied to improve the environmental indicators. Thus, different combinations of ammonium set-points and a fixed sequence of changes of carbon dosage Qcarb have been evaluated to find the combination of control actions in the operational period that produce a positive effect on environmental and operation costs, preserving the desired performance. The sequence of control movements on SNHSP and Qcarb is presented in Figure 10. From the analysis of dynamic behavior (weekly and bimonthly profiles), a period between the 3rd and 4th bimesters has been detected where influent conditions and low temperature affects negatively the indicators of emissions to water: Ntot, SNH concentration and EQI. As shown in Figure  10, strict ammonium set-point SNHSP = 1 g/m 3 and default Qcarb = 2 g/m 3 are maintained between weeks 17 and 37, where these effects are notorious, and the three different ammonium set-points (1, 4 and 6 g/m 3 ) are considered for the rest of the operation period. A fixed sequence of movements of Qcarb is applied, in the first 6 weeks where low Ntot and SNH levels are observed with the different ammonium set-points ( Figure 8) carbon dosage is reduced to Qcarb = 1 g/m 3 , in between weeks 7 and 9 the minimum values of Ntot and SNH are attained, then carbon dosage is cut, it is increased to Qcarb = 2 g/m 3 between weeks 17 and 37, and it is finally reduced to Qcarb = 1 g/m 3 in the last weeks when Ntot and SNH levels decrease. The combination of the sequence of different ammonium set-points and given sequence for carbon dosage, produce three different strategies named: SNHSP = 1 Qcarb var, SNHSP = 4 Qcarb var and SNHSP = 6 Qcarb var. The weekly and bimonthly dynamic profiles of the different environmental indicators affected by the aforementioned strategies are shown in Figures A1-A3 in Appendix A. From the observation of weekly and bimonthly profiles of environmental indicators, the changes that produce a positive effect detected in a specific temporal window are selected to produce a strategy named SNHSP var Qcarb var, that combines the sequence of SNHSP changes and Qcarb changes presented in Figure 10. Those changes are SNHSP = 6 g/m 3 between weeks 1 and 8 where SNH levels are the minimum, improvement attained with stricter ammonium set-point is not significant, but electricity consumption can be reduced by increasing SNHSP, SNHSP = 4 g/m 3 between weeks 8 and 16 and weeks 38 to 53 to reduce electricity consumption and attain acceptable levels of SNH and SNHSP = 1 g/m 3 between weeks 17 to 37 where treatment is difficult due to load and temperature effect. The proposed strategies are summarized in Table 12.
It is important to mention that the control decisions described above have been motivated by the observation of situations on specific periods of time (weeks or bimesters) on dynamic profiles, that can be changed to improve environmental performance. These situations could not be detected by a traditional analysis of annual average environmental indicators. Qcarb sequence shown in Figure  The performance of SNHSP var Qcarb var strategy is compared with the Cascade SNHSP scheme with SNHSP = 1 g/m 3 . First, weekly and bimonthly profiles of environmental indicators are obtained and compared to observe the temporal windows where environmental indicators are affected by the proposed strategy. Afterwards, the two alternative strategies are compared with DO default scheme, that is the usual control strategy implemented in WWTPs, considering the annual average values of environmental indicators and operating costs to evaluate the global improvement of the control actions determined after the dynamic analysis of behavior Figure 11 shows the weekly and bimonthly profile for electricity consumption, Figure 12 shows the bimonthly profiles of the indicators of biogas and sludge production, and Figure 13 the weekly and bimonthly profile for CO2 emissions. In Figure 11 it is observed that weekly and bimonthly profiles of the proposed SNHSP var Qcarb var strategy attains lower values than Cascade SNHSP scheme in the full operation horizon except for the period between weeks 17 and 37, where identical control actions are applied, and profiles coincide. The reduction of electricity consumption obtained with the SNHSP var Qcarb var strategy is 4.7% and 3.1% in the 1st and 2nd bimesters and 3.8% and 4.6% in the 5th and 6th bimesters. A slight reduction of biogas (ranging between 1.4 and 2.2%) and sludge production (only 1%) is achieved with the proposed strategy as observed in Figure 12, where SNHSP var Qcarb var profile is below Cascade SNHSP profile in the full operation period except for the period between weeks 17 and 37. A similar positive effect is observed in Figure 13 for CO2 emissions that are slightly reduced by proposed strategy.
The weekly and bimonthly profile of the indicators associated with emissions to water (effluent Ntot, SNH and EQI) with the proposed SNHSP var Qcarb var strategy and Cascade SNHSP scheme are presented in Figure 14. The control actions of the proposed scheme produce a negative effect on Ntot, SNH and EQI profiles that are worsened in most of the operation period with respect to the Cascade SNHSP scheme. Considering the first bimester as the worst temporal period, Ntot is worsened up to 8.7% and EQI is increased up to 4.5%, while SNH increases up to 28% in the 2nd bimesters even though the worst situation, identified in the week 18, is still distant from the limit value that is 4 g/m 3 .
The annual average values are presented in Table 13 and the comparison relative to the DO default scheme is presented in Table 14. Despite deterioration of the SNH indicator, that is a consequence of the application of ammonium control with variable DO set-point, SNHSP var Qcarb var strategy and Cascade SNHSP strategy with SNHSP = 1 g/m 3 and Qcarb = 2 g/m 3 produce a significant improvement to the rest of environmental indicators and operation costs in comparison with DO default strategy. The variations of SNHSP and Qcarb in the appropriated temporal windows reduce the use of chemicals, electricity consumption and consequently operation costs, which could compensate the increment in the levels of SNH in the effluent.      In order to provide a condensed view of the advantages and disadvantages of the control schemes considered in this work: DO control, DO + NO control, Cascade SNHSP and the proposed modification named SNHSP var Qcarb var., Table 15 summarizes the most important effects of control actions on environmental costs. The consideration of different temporal windows to observe WWTP behavior under different control schemes, on a dynamic influent scenario, have been a useful tool to detect seasonal effects and the influence of control actions performed to maintain the desired operating conditions on environmental indicators. The analysis of weekly and bimonthly dynamic profiles allows us to capture the interactions between control actions and environmental impacts that can be addressed by the opportune adjustment of control variables. The proposed methodology that combines the comprehensive analysis of annual average indicators and the qualitative observation of dynamic profiles allows us to determine the control scheme that produces the best compromise solution between environmental and operation costs. Moreover, the introduction of the analysis of dynamic profiles in the evaluation of the environmental impact of wastewater treatment makes it possible to determine the temporal windows where different control actions that can be applied to improve the environmental indicators. Thus, in this specific case study, the Cascade SNHSP scheme was selected from existing control strategies, and its overall performance has been improved introducing different combinations of ammonium set-points and a sequence of changes of carbon dosage Qcarb.
As can be observed from Table 15, the minimization of electricity consumption is an expected advantage of control strategies. Electricity consumption is strongly dependent on control actions associated with aeration and pumping performed to deal with frequent and seasonal changes in the influent load. Since, energy consumption is a crucial variable for improving WWTP efficiency, it affects simultaneously the operation costs and environmental costs. So, systematic analysis of its dynamic behavior can be helpful for the decision-making process on WWTPs management. For future work, the available tools that describe aeration system [13] and alternative renewable energy sources [29] can be useful to implement innovative operation strategies oriented to upgrade environmental performance of the plant by applying appropriate energy-management strategies.
On the other hand, behavior of indicators of CO2 emissions and indicators of emissions to water is determined by control actions performed to regulate nitrogen removal process. Some control strategies such as DO control can affect positively all indicators of emissions to water, with the corresponding increase of electricity consumption as indicated in Table 15. The DO+ NO and Cascade SNHSP-based strategies have to deal with the compromise of improving ammonium removal or total nitrogen concentration in the effluent. It is affected also by carbon dosages, that have a significant influence on operation costs. Then, dynamic analysis allows us to detect seasonal effects of influent load and temperature in CO2 emissions, SNH, EQI and Ntot, that cannot be observed in a study based on the evaluation of annual average environmental indicators, carbon dosage Qcarb can be regulated considering the operation periods where it is possible to reduce carbon dosage preserving the desired Ntot vs. SNH compromise in the effluent load.
It is important to mention that the control decisions described above have been motivated by observation of situations during specific periods of time (weeks or bimesters) on dynamic profiles, that can be changed to improve environmental performance. These situations could not be detected by a traditional analysis of annual average environmental indicators. Moreover, the comparison of the annual average indicators provides a global perspective of environmental and economic performance of control strategies in the full operational period. Nevertheless, the analysis of the evolution of environmental indicators considering different temporal windows (weekly and bimonthly) allows us to determine which situations produce such overall result, when this situations occurs, in the case of seasonal variations of influent conditions and, in the case of the interactions between control actions and environmental costs of the treatment in the presence of influent variations.

Conclusions
In this paper the assessment of environmental costs of the operation of a WWTP employing three different control strategies (DO control scheme, DO + NO control, Cascade SNHSP) integrating analysis of dynamic performance in different time scales (annual, bimonthly and weekly) has been carried out. The dynamic assessment has been based on environmental indicators classified into the following categories: energy indicators that measure electricity consumption and heating energy, indicators of emissions to air measuring CO2 emissions from the activated sludge process and anaerobic digestion, emissions to soil associated with the production of sludge for disposal and emissions to water indicators associated with total nitrogen concentration in the effluent Ntot, ammonium concentration SNH and pollution to effluent measured with the effluent quality index (EQI).
The analysis of dynamic profiles on different temporal windows makes it possible to identify operation periods where load, temperature effects and control actions have a significant impact on environmental indicators. These effects cannot be detected in a study based on the evaluation of annual average environmental indicators. The analysis of dynamic profiles of environmental indicators considering different time scales allows us to identify the seasonal influent disturbances and periodic variations that affect environmental performance such as seasonal changes of temperature and influent flow rate. This information is useful to take adequate control decisions that improve the environmental performance of the plant in these situations. Moreover, it allows us to capture interactions between control actions and environmental impacts occurring in specific periods of time that can be addressed by the opportune adjustment of control variables.
The observation of the annual average values of environmental indicators and operational costs showed that ammonium-based control (Cascade SNHSP) produces the best compromise solution between environmental and operating cost compared with DO default control and DO + NO control. The analysis of dynamic profiles (weekly and bimonthly) showed that the Cascade SNHSP perform better than the other control schemes in the periods where disturbances on load and seasonal effects of temperature and influent flow rate affect plant behavior. The ammonium-based control relaxes the requirements on ammonium concentration in the effluent, but reduces energy consumption, CO2 emissions, total nitrogen concentration, and EQI. This is appreciated in the annual-based analysis of environmental performance, but also in the weekly and bimonthly dynamic profiles. The evaluation of the effect of SNH set-point changes and carbon dosage on performance of the Cascade SNHSP scheme allows us to determine the specific temporal windows where these actions produce a positive effect. Thus, a control strategy SNHSP var Qcarb var defined by a sequence of changes on SNHSP and carbon dosage is proposed. The comparison of the proposed strategies with DO default control considering dynamic profiles and annual averages values leads to the conclusion that both alternatives improve environmental performance, but benefits of the Cascade SNHSP scheme are associated with improvement of electricity consumption and emissions to water indicators Ntot and EQI, while the SNHSP var Qcarb var strategy reduces electricity consumption, use of chemicals (reducing external carbon dosage), and operational costs.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
As shown in Figure 10, strict ammonium set-point SNHSP = 1 g/m 3 and default Qcarb = 2 g/m 3 are maintained between weeks 17 and 37, and the three different ammonium set-points (1, 4 and 6 g/m 3 ) are considered for the rest of the operational period. A fixed sequence of movements of Qcarb is applied, in the first 6 weeks Qcarb = 1 g/m 3 , carbon dosage is cut between weeks 7 and 9 and then, it is increased to Qcarb = 2 g/m 3 between weeks 17 and 37, to be finally reduced to Qcarb = 1 g/m 3