Evaluating the potential impact of energy-efficient ammonia control on the carbon footprint of a full-scale wastewater treatment plant.

An assessment was performed for elucidating the possible impact of different aeration strategies on the carbon footprint of a full-scale wastewater treatment plant. Using a calibrated model, the impact of different aeration strategies was simulated. The ammonia controller tested showed its ability in ensuring effluent ammonia concentrations compliant with regulation along with significant savings on aeration energy, compared to fixed oxygen set point (DOsp) control strategies. At the same time, nitrous oxide emissions increased due to accumulation of nitrification intermediates. Nevertheless, when coupled with the carbon dioxide emissions due to electrical energy consumption for aeration, the overall carbon footprint was only marginally affected. Using the local average CO2 emission factor, ammonia control slightly reduced the carbon footprint with respect to the scenario where DOsp was fixed at 2 mg·L-1. Conversely, no significant change could be detected when compared against the scenarios where the DOsp was fixed. Overall, the actual impact of ammonia control on the carbon footprint compared to other aeration strategies was found to be strictly connected to the sources of energy employed, where the larger amount of low CO2-emitting energy is, the higher the relative increase in the carbon footprint will be.


INTRODUCTION
In wastewater treatment, effluent ammonia nitrogen is an important parameter that needs to be compliant with prescribed regulatory limits. Over time, the strong influent wastewater fluctuations with respect to flow rate and concentrations have increased the need for automatic control applications aimed at stabilizing process performance (Olsson 2007). In the aerated tanks of wastewater treatment plants (WWPTs), oxygen controllers are now commonly applied (Khatri et al. 2020). These controllers automatically change the oxygen or air supply in order to minimize the difference between a fixed dissolved oxygen set point (DO sp ) and the measured DO concentration. By keeping the oxygen concentration to a particular level, the operator attempts to ensure a good nitrification rate all the time, which is needed to keep effluent ammonia compliant with regulations. However, the choice of the optimal DO sp is not always straightforward and frequent manual adjustments may need to take place to ensure good effluent quality under unfavourable influent and environmental conditions. As a matter of fact, under nitrogen loading higher than usual, the chosen DO sp may be lower than the optimal one, leading to effluent ammonia nitrogen higher than the limit. On the other hand, under low nitrogen loading conditions the chosen DO sp may be higher than the optimal one, thus leading to a waste of energy linked to air supply. To automate the change of DO sp , feedback ammonium controllers were later developed (Medinilla et al. 2020). Ammonia control is based on automatically changing the DO sp in function of the discrepancy between a set point for effluent ammonium concentration and its measurement. While ensuring effluent ammonia concentrations compliant with regulations, this control strategy can actually save on energy for the air supply system. In turn, the emissions of carbon dioxide (CO 2 ) due to the production of energy are expected to decrease. However, the carbon footprint of WWTPs is given not only by the CO 2 emissions related to power consumption but also by the emissions of methane and nitrous oxide (N 2 O). The latter is a powerful greenhouse gas with a global warming potential about three hundred times larger than that of CO 2 (IPCC 2007). In the last couple of decades, the problem of N 2 O emissions from WWTPs has increasingly gained attention (Law et al. 2012;Daelman et al. 2015;Mannina et al. 2016;Boiocchi et al. 2017a). There are various pathways according to which N 2 O is found to be generated in a WWTP (Kampschreur et al. 2009). Low oxygen concentrations in aerated tanks are known to trigger autotrophic denitrification, where ammonia-oxidizing bacteria (AOB) use nitrite nitrogen instead of oxygen as an electron acceptor for ammonia oxidation and thus produce N 2 O as an end product of nitrite enzymatic reduction (Peng et al. 2014). Based on this, an ammonia control strategy reducing the oxygen concentration to what is strictly need to have effluent ammonia concentration compliant with regulation may potentially trigger N 2 O emissions. In addition, an incomplete heterotrophic denitrification due to excessive oxygen and/or low biodegradable carbon in the anoxic compartment can lead to N 2 O accumulation and thus increase N 2 O emissions (Law et al. 2012). Furthermore, another AOB-mediated N 2 O-producing pathwayknown as incomplete hydroxylamine (NH 2 OH) oxidationwas found to be favoured by very high oxygen concentrations (Domingo-Félez et al. 2017). Therefore, it is not clear from a theoretical perspective how the application of an ammonia control strategy will affect the N 2 O emissions from WWTPs and, considering the possible reduction in the CO 2 emissions due to expected aeration energy savings, how the overall carbon footprint will be. With the increasing demand for carbon neutral WWTP operation, it is important to understand the overall behaviour of the carbon footprint in WWTPs under different aeration regulation patterns. A control strategy may be able to reduce N 2 O emissions on one hand, while increasing the aeration energy consumption and the CO 2 emitted thereby on the other. In some of these cases, the advantage in terms of N 2 O emission reduction may be negatively compensated by increased CO 2 emissions linked to aeration energy (Santín et al. 2017). It can also be that in some scenarios reducing the N 2 O emissions will not lead to an increased energy demand. For these reasons, the present work aims at elucidating the combined effect that different aeration control strategies may have on the carbon footprint of WWTPs. This is performed according to a model-based integrated approach where other basic performance parameters such as the effluent quality and the energy consumption are considered as well. This is because, when studying the carbon footprint of WWTPs, the main target of ensuring good effluent quality within reasonable energy costs is still of great importance.

MATERIALS AND METHODS
To achieve the goal presented in the introduction, the work was structured as follows: first, a model mathematical structure for the WWT system described in Section 2.1 was defined as presented in Section 2.2; secondly, the model was calibrated as described in Section 2.3; and, thirdly, simulations with different aeration setups were run using the calibrated model and the results obtained thereby were compared against one another as defined in Section 2.4.

System description
In this work, a model is developed and calibrated in order to describe the main biological and physical processes occurring in one of the six activated sludge lines of a WWTP located in Northern Italy with an overall treatment capacity of 330,000 p.e. As shown in Figure 1, the modelled plant layout consists of a biological compartment with an overall volume of 7250 m 3 followed by two secondary clarifiers in parallel, each having a horizontal area of 934 m 2 and a side water depth of approximately 4 meters. The biological compartment is made of four non-aerated compartments in series followed by a sequence of eight aerated compartments. These last are equipped with an air supply system consisting of a single air blower providing air to fine-bubble membrane diffusers.
The WTTP must comply with local regulation in force (Regional Council of Veneto 2009).

Definition of the model mathematical structure
The biological processes occurring in the biological compartment were mathematically described by the Activated Sludge Model for Nitrogen by Hiatt & Grady (2008) updated with the AOB-mediated processes by Pocquet et al. (2016). While the former incorporates the N 2 O production by heterotrophic biomass, the latter includes the production of N 2 O according to both AOB denitrification and incomplete NH 2 OH oxidation pathways. Thus, all the main N 2 O production pathways were considered. Abiotic N 2 O-producing processes were not included in virtue of their low rates under the typical pH values established during the typical nitrogen removal processes (Su et al. 2019). The Petersen matrix of the resulting biological model used in this work is presented in Supplementary Material (A). In addition, the liquid-gas mass transfer of N 2 O was included as a function of the oxygen mass transfer coefficient and the ratio between oxygen and N 2 O molecular diffusivities in water according to Foley et al. (2010). As carried out by Flores-Alsina et al. (2014), the mass transfer of nitric oxide and dinitrogen was modelled with the same approach of N 2 O.
In an effort to reproduce realistically its actual operation, the air supply system was modelled using algebraic equations defining first the standard oxygen transfer rate (SOTR) (see Equation (1)) and, secondly, the oxygen mass transfer coefficient (see Equation (2)).
In Equations (1) and (2), SOTE is the Standard Oxygen Transfer Efficiency, a is the alpha-factor, r O 2 is the density of oxygen, f O 2 ,air is the mass percentage of oxygen in the aspirated air, Q air,tot is the total volumetric air flow rate diffused in standard conditions, u is the temperature correction factor for the oxygen mass transfer, d is the correction factor for the oxygen saturation concentration (C sat ), and V is the liquid wastewater volume.
Additionally, with regards to Equation (1), the characteristic relationship between the SOTE and the air flow rate from each diffuser was implemented based on the diffuser data sheet. Furthermore, real minimum and maximum boundaries for the total air flow rate carried to the biological system were retrieved from the operating curve of the air blower and thus considered during simulation. Finally, although more work should be done to characterize the relationship between the αfactor and the mixed liquor qualitative characteristics, a constant α-factor of 0.7 was chosen for all the aerated tanks for the sake of simplicity. In absence of specific data, introducing complex formulas for the estimation of α-factor would increase model uncertainty. The choice of using the value of 0.7 was taken based on the works by (Jiang et al. 2017;Ahmed et al. 2021). Ahmed et al. (2021) found a relationship between the α-factor and the reactor concentration of soluble COD. Using this relationship with the soluble COD concentration predicted in our system, the α-factor results equal or higher than 0.7. The same work showed much lower values only when the soluble COD concentration is much higher (up to 350 mg COD·L À1 ). This scenario of very high COD concentrations typically occurs at the beginning of the cycle in sequencingbatch reactors while the system modelled in this work is continuous. Similar considerations can be made by using the correlation between COD concentration and α-factor proposed by ( Jiang et al. 2017). For better choice in the future, more efforts should be done to characterize the variability of α-factor in function of reactor concentrations of soluble COD, dissolved and suspended solids.
Thanks to these modelling efforts, the actual operation and limitation of the air supply system were taken into account in this work. This allows a more realistic quantification of the electrical energy spent and, in turn, of the carbon footprint linked to aeration.
Finally, the secondary clarifiers were modelled as flat bottom unreactive tanks with constant area along the height according to the one-dimensional settling model by Takacs et al. (1991). Thus, N 2 O production in secondary clarifiers was neglected. This was in virtue of much more limited mixing conditions inside clarifiers compared to those in the biological tanks, which means that, even if N 2 O were produced, there would be very low emissions of it due to a low stripping capability. Furthermore, the same poor mixing conditions limit the contact between substrate and biomass, thus leading to rather low kinetic rates for the anoxic N 2 O producing processes. In addition, high denitrification rates within secondary clarifiers should lead to problems related to rising sludge and consequent poor settling efficiencies due to high nitrogen gas production (Henze et al. 1993). However, the TSS data used in our work do not suggest any sludge settling issues. In literature, evidences about the contribution of N 2 O emissions from secondary clarifiers compared to the contributions from the biological tanks seem limited and contradictory. As a matter of fact, only one published work found significant N 2 O emission contribution from secondary clarifiers (Mikola et al. 2014) whereas (Caniani et al. 2019) found the opposite.

Model calibration
Two independent data sets were employed for model calibration: one collected during the plant operation under fixed DO sp control (Data Set 1) and the other collected during the plant operation with the ammonia fuzzy-logic controller described in Bertanza et al. (2021a) (Data Set 2). It is important to point out that the DO sp could not always be tracked due to physical limitations of the air supply system where the lower saturation limit of the air flow rate was reached at low influent TKN loads and consequently the oxygen concentration became higher than the set point. The use of both data sets obtained under different oxygenation regulations allowed calibrating the biomass response to a highly heterogeneous oxygen profile, which in turn could augment the model descriptive reliability. Both the first and the second data sets comprise the daily average influent concentrations of ammonium, TKN, COD, BOD, the daily average temperature with varying frequencies within a week, and the influent flow rate with a 15-minute frequency. For Data Set 1, mean and standard deviation values for ammonium, TKN, COD, BOD, temperature and flow rate are as follows: 11.5 + 4.9 g N·m À3 , 18.1 + 6.9 g N·m À3 , 202 + 66 g COD·m À3 , 111.1 + 36.2 g BOD 5 ·m À3 , 15.8 + 3.6°C, 36,946 + 8,900 m 3 ·d À1 , respectively, while for Data Set 2 the same variables are as follows: 12.1 + 5.2 g N·m À3 , 19.8 + 7.9 g N·m À3 , 177.7 + 36.7 g COD·m À3 , 88.9 + 37 g BOD 5 ·m À3 , 18.6 + 4.7°C, 39,772 + 9,694.8 m 3 ·d À1 , respectively. Unmeasured daily average influent data were estimated by linear interpolation between the two closest known values. Then, the mapping of the influent data obtained thereby into the state variables of the model described in Section 2.1 was performed as illustrated in Supplementary Material (B). After the mapping, in an effort to include more realism, daily dynamic profiles for the influent concentrations of pollutants and influent temperature were created based on the measured dynamic profile of the flow rate. A more detailed description of this procedure is provided in Supplementary Material (C).
Besides the influent characterization, operating conditions such as the instantaneous oxygen concentrations in the sixth aerobic compartment and the daily average TSS concentrations in the last aerobic compartment and in the stream recycled from the secondary clarifier were provided. To reproduce the same operating conditions during calibration, an ideal proportional-integral (PI) controller having dynamic set points for the DO in the sixth aerobic tank equal to the instantaneous measured ones was implemented, while another PI controller was employed to regulate the wastage flow rate at the aim of establishing the TSS concentrations in the last aerobic tank equal to measured ones. The internal recycle flow rate was deduced based on reported working days of dedicated pumps. Regarding the effluent data, both Data Set 1 and Data Set 2 provided the effluent daily average concentrations of ammonia, nitrite and nitrate nitrogen while only Data Set 1 provided additionally the effluent daily average TSS concentrations. No data regarding N 2 O emissions was available.
Starting from their default values reported in literature (Hiatt & Grady 2008;Pocquet et al. 2016), the model parameters related to the solid settling velocity and the aerobic activity of AOB and nitrite-oxidising bacteria (NOB), as well as the anoxic reduction factor for the heterotrophic yield and the nitrate half-saturation coefficient for heterotrophs, were iteratively changed until a sufficiently good match between model predictions and the corresponding effluent data was achieved. A root mean squared errors (RMSE) was computed in order to quantify the discrepancy between data and model outputs, as carried out by (Vangsgaard et al. 2013). The parameters describing the N 2 O production by AOB were kept the same as those by Pocquet et al. (2016) while those describing the N 2 O production by HB were kept the same as those by . Given the relatively low effluent concentrations of ammonium and nitrite measured, the inhibition by free ammonia and free nitrous acid on the autotrophic biomass activity originally modelled by Hiatt & Grady (2008) were suppressed during calibration.
Based on its high computational speed, the software chosen here was GPS-X 8.1 (Hydromantis).

Model simulations and scenario comparison
Using the influent characterization of Data Set 1 along with the related time series of external and internal recycle flow rates, different simulations were run with the following aeration supply setups: fixed DO sp PI control with set points at 0.5, 1 and 2 mg·L À1 ; the ammonia fuzzy-logic control described in Bertanza et al. (2021a); fixed air flow rates set at the averages of those established by the controllers during the previous simulation scenarios. The wastage flow rate was kept the same as the ideal one identified by the TSS controller described in Section 2.3. For each scenario, the following quantities were evaluated: the effluent concentrations of ammonium, nitrite and nitrate nitrogen; the N 2 O emissions; the electrical energy consumed by air supply system; and the carbon footprint. Specifically, the instantaneous electrical energy consumed for air supply (P aer ) was calculated according to Metcalf and Eddy (1991), as mathematically expressed by Equation (3).
In Equation (3), Q eff air is the actual mass air flow rate provided in standard conditions [kg·s À1 ], R is the molar gas constant equal to 8.314 [J·K À1 ·mol À1 ], T asp is the air temperature in the air aspiration pipe [K], p out is the absolute pressure in the air delivery pipe [atm], p in is the absolute pressure in the air aspiration pipe [atm], n is the air constant equal to 0.283, h comp is the efficiency of the compressor system assumed equal to 69%, and N h is number of working hours per day [h·d À1 ].
For the calculation of the carbon dioxide (CO 2 ) emitted due to the production of electrical energy linked to the aeration supply system, different emission factors (EF elec CO 2 ) were used given the diversity of values in function of the country-specific energy-mix. Different energy mixes occur due to the employment of energy sources such as fossil, renewable (e.g. wind, photovoltaic) and nuclear energy having specific CO 2 emissions. According to the data by European Environment Agency (2017), while Sweden had an emission factor of only 9.27 g CO 2 ·kWh À1 , Estonia in the same year had an emission factor of 922.4 g CO 2 ·kWh À1 which is two orders of magnitude larger. To take into account this variability, the following values were chosen for EF elec CO 2 in this study: • the value of 258.8 g CO 2 ·kWh À1 characterizing the average emission factor for Italy where the plant described in Section 2.1 is located; • the values of 9.27 g CO 2 ·kWh À1 and 922.4 g CO 2 ·kWh À1 representing two realistic extremes with regards to the emission factors for electrical energy.
In order to merge the carbon footprint contributions due to the production of electrical energy for air supply and due to the emission of N 2 O, Equation (4) was used.
In Equation (4), GHG tot is the overall daily load of CO 2 equivalent emitted for the production of electricity for air supply and due to N 2 O emissions from the plant mainstream, N 2 O is the overall daily nitrous oxide load emitted from the mainstream activated sludge compartment as daily mass load, and CO N 2 O 2,eq is the CO 2 equivalent for N 2 O. Although the IPCC report recommends 265 as the CO 2 equivalent for N 2 O (IPCC 2014), a value of 300 g CO 2 ·g À1 N 2 O was chosen for CO N 2 O 2,eq , which is very close to the one suggested by the statistical office of the European Union (i.e. 298 g CO 2 ·g À1 N 2 O). More insights on how this choice can change the overall carbon footprint predictions could be achieved in the future.
It can be observed that the CO 2 contributions linked to the electrical energy consumed by systems other than the one for air supply such as the various pumping devices (e.g. the sludge recycle, the internal recycle and the sludge wastage pumps), as well as the energy consumed in the pre-treatment compartment, were not included in Equation (4). This is because, as previously mentioned, these contributions were kept the same from one scenario to the other and only the air supply was regulated differently. Hence, the energy consumed by electrical devices other than the air supply system does not change from one scenario to the other. Besides this, the effect of different aeration setups on the carbon dioxide emissions in the side-stream treatment compartments is here assumed negligible. As a matter of fact, although more studies could be performed in the future for verification, the production of wastage sludge and the corresponding methane losses from the anaerobic digester as well as the energy used for sludge dewatering were assumed to be impacted only marginally by the different aeration setups in the mainstream of the same WWTP.
With regards to the software employed, GPS-X could not be used to simulate the fuzzy-logic controller. Hence, MATLAB R2020b (The MathWorks, Natick, MA) was used for all the simulations described in this section.

RESULTS AND DISCUSSION
In this section, using the model whose calibration results are presented in Supplementary Material (D), a comparison among the different simulation scenarios described in Section 2.4 in terms of effluent quality, nitrous oxide emissions, energy consumption and carbon footprint is presented. The results obtained are analysed in terms of: effluent nitrogen species such as ammonium, nitrite and nitrate (Section 3.1), N 2 O emissions (Section 3.2), power consumption by the air supply system (Section 3.3), and total carbon footprint (Section 3.4). As mentioned in Section 2.4, besides the scenarios where the air flow rate is automatically changed to achieve either a prefixed DO sp (in the 6th aerobic tank) or a fixed value for effluent ammonium concentration, other four scenarios were run with air flow rate constant over time. The values of these flow rates were found by calculating the averages of the same variables obtained from the previously described scenarios as follows: 82,896, 92,033, and 100,879 Nm 3 ·d À1 , respectively from the scenarios with DO sp fixed at 0.5, 1 and 2 mg·L À1 , and 77,841 Nm 3 ·d À1 from the ammonia control scenario. Table 1 shows the annual average effluent concentrations for ammonium, nitrite, and nitrate. In addition, the dynamic profiles for the effluent concentrations of the same N species during a high TKN loading rate period between the 230th and the 240th days) are shown in Figure 2. During that 10-day period, the average influent TKN load is 974 kg N·d À1 , namely 50% larger than the overall average TKN load of 663 kg N·d À1 .

Effluent nitrogen species
Among the scenarios where the air flow rate is changed over time, effluent ammonia nitrogen concentrations result the highest when oxygen concentration is controlled at a set point of 0.5 mg·L À1 . However, as the set point is increased, effluent ammonia concentrations are drastically reduced. When ammonia control is applied in place of the control strategies with constant DO sp at 1 or 2 mg·L À1 , the average effluent ammonia concentration increases. Nevertheless, based on the dynamic behaviour of effluent ammonia nitrogen, it was observed that the limit of 5 mg NH 4 þ ·L À1 imposed by the local regulation in force is never exceeded. This indicates that, when ammonia control is adopted, oxygen is supplied in an amount strictly needed for ammonia not to overcome the local regulatory limits. On the other hand, when the control strategy with fixed Uncorrected Proof DO sp of 2 mg·L À1 is applied, oxygen is supplied excessively to the amount strictly needed, thus leading to effluent ammonia nitrogen concentrations abundantly lower than the limit. With regards to those cases where an air flow rate constant in time is applied, effluent ammonia concentrations result much higher than any other cases where the air flow rate is not constant, Uncorrected Proof with the exception of the case when the air flow rate is set to the average one achieved with fixed DO sp equal to 2 mg·L À1 (see Figure 2(a)). Besides ammonia, it can be observed that, among the control strategies changing the oxygen supply over time, the highest nitrite concentrations in the effluent occur when the ammonia controller and the controller with DO sp equal to 0.5 mg·L À1 are applied (see also Figure 2(b)). It can further be noted that effluent nitrite decreases with the increase in the DO sp . This can be explained by the fact that the larger the oxygen concentration is, the higher the NOB activity is, the lower the effluent nitrite concentration is expected. Based on these considerations, the results suggest that, although nitrite resulted below the national regulation limit of 0.6 mg N·L À1 (Legislative Decree 3rd April n.152 2006), effluent nitrite concentrations must be kept under close surveillance.
Finally, the general behaviour of effluent nitrate can be observed to be negatively correlated with the effluent ammonia: the lower the effluent ammonia is, the higher the effluent nitrate is expected (see Figure 2(c)). This is because, being the influent characterization the same, when more ammonia is oxidized, more nitrate is produced, provided nitrite is oxidized at a high rate.  (Daelman et al. 2015), these simulated values can be considered to fall within the literature typical ranges. As can be further observed, among the scenarios where a constant air flow rate is applied, N 2 O emissions and the emission factors decrease at increasing influent air flow rates. Similarly, N 2 O emissions decrease at increasing DO set points for those scenarios where the DO set point is kept constant. Furthermore, when the fuzzy-logic ammonia controller is implemented, N 2 O emissions result significantly higher compared to any of those cases with fixed DO sp control.

Nitrous oxide emissions
In order to better understand the underlying environmental conditions determining the various N 2 O emission predictions, one-by-one correlations between the total N 2 O emitted and the average aerobic concentrations of nitrification intermediates (such as nitrite and hydroxylamine) and of oxygen were evaluated, as presented in Figure 3. The reason for considering average values for the correlation study was in order to avoid the confounding effect of time delay between the instantaneous accumulation of a nitrogen species such as hydroxylamine or nitrite and the consequent instantaneous N 2 O emission (Bertanza et al. 2021b). In fact, by considering the average over long periods, the time delay effect on the correlation gets largely reduced.
As can be seen in Figure 3, the N 2 O emissions appear to be strongly positively correlated with the average concentrations of both the nitrification intermediates, and negatively correlated with the average oxygen concentration. By comparing the obtained regression coefficients (R 2 ) with one another as done by (Daelman et al. 2015), the correlation of N 2 O with the  Uncorrected Proof oxygen concentration can be considered weaker than the one with the nitrification intermediates. Nevertheless, these results suggest that suboptimal oxygen concentrations can be the leading cause for high N 2 O emissions by promoting the accumulation of nitrification intermediates. This is confirmed by a large number of studies found in literature (Tallec et al. 2008;Stein 2011;Peng et al. 2014Peng et al. , 2015He et al. 2017;Kuokkanen et al. 2021). It must be acknowledged that this is only a preliminary analysis and that more investigations about the N 2 O dynamics predicted by the model used in this work need to be conducted.

Aeration energy requirements
The estimated annual average electrical energy consumptions by the air supply system are reported in Table 3 while Figure 4 shows the dynamic profiles of the air flow rate supplied according to the different control strategies along with the influent TKN load under high and low influent TKN load conditions (Figure 4(a) and 4(b), respectively). As can be seen from Table 3, for the scenarios where a fixed DO sp is imposed, aeration energy consumption increases at increased set points. Similarly, for the scenarios with constant air supply, energy consumptions increase at increased air flow rate supplied. Importantly, the ammonia control is found to lead to a significant saving on aeration energy compared to the cases with fixed DO sp control. Specifically, the average savings over one year of operation were estimated to range between 7   and 23% depending on whether the comparison is made against the control strategy with fixed DO sp equal to 0.5 mg·L À1 or against the control strategy with fixed DO sp equal to 2 mg·L À1 , respectively. As can be seen in Figure 4, the higher the influent TKN load is, the larger the difference among the various air flow rates become. Conversely, when the influent TKN load is low, the controllers reach the lower boundary specific of the blower and the air flow rate values become closer to one another (see Figure 4(b)). It follows that the advantages in terms of energy savings through ammonia control occur mainly at high influent TKN loads. Finally, it is here important to acknowledge that these results could change if a different α-factor were assumed during the simulations. More work and data are needed to identify the true relationship between α-factor and environmental conditions such as reactor concentrations of solids and soluble COD altogether.

Carbon footprint
The total carbon footprints calculated as the sum of the contribution by the N 2 O emissions and the CO 2 emitted for the production of electrical energy for aeration by assuming different CO 2 emission factors for electrical energy production and their relative contributions are displayed in Figure 5. As can be seen by looking at Figure 5(b) obtained by assuming emission factors equal to 0.2588 kg CO 2 ·kWh À1 (the average emission factor for Italy related to the year 2017), the contribution by the aeration energy results significantly larger than the one by N 2 O emissions. This happens regardless of the aeration regulation setup applied. Given the preponderant contribution by aeration energy, the carbon footprint increases when the fixed DO sp increases (see Figure 5(a)). Similarly, when the constant air flow rate is increased, the overall carbon footprint increases. The impact of applying ammonia control instead of oxygen control on the carbon footprint is found to be limited. Specifically, only when compared to the scenario with fixed DO sp equal to 2 mg·L À1 , ammonia control shows its potential to reduce the carbon footprint. This is because the advantage in terms of reduction of CO 2 emissions linked to aeration overcomes the disadvantage linked to increased N 2 O emissions. However, the same advantages and disadvantages seem to balance each other out when the ammonia control scenario is compared against the control scenarios with fixed DO sp at 0.5 and 1 mg·L À1 . It was found that assuming an emission factor only slightly lower than the average Italian one (i.e. 0.256 kg CO 2 ·kWh À1 ) could equate the carbon footprint led by the implementation of ammonia control to the one led by the implementation of oxygen control with set point at 1 mg·L À1 . Nevertheless, this situation drastically changes for a different energy mix. For instance, if the emission factor assumed were the same as the one of Sweden (i.e. 0.00927 kg CO 2 ·kWh À1 ), N 2 O emissions would become the largest influence on the carbon footprint (see Figure 5(c)). Specifically, the contribution by N 2 O emissions on the total carbon footprint changes from 20% in the Italian case to 80-90% in the Swedish case. Due to the increased N 2 O emission contribution, the ammonia controller turns out to increase the overall carbon footprint if implemented in place of a fixed DO sp controller (see Figure 5(a)). A converse effect would result if the emission factor assumed were the same as the one of Estonia (i.e. 0.922 kg CO 2 ·kWh À1 ) due to the clear preponderant contribution by the aeration energy (i.e. 90%) as shown in Figure 5(d).
These results suggest that the evaluation of the overall carbon footprint is very case specific dependingamong several factorson the source of energy which in turn affects the overall value for the CO 2 emission factors for electrical energy. CO 2 emissions linked to aeration energy could be drastically reduced by employing more carbon neutral energy sources while plant operation should be optimized to minimize N 2 O emissions.
Besides the impact of CO 2 emission factor, it is also important to note that the reported variability of those model parameters used to describe the rates of N 2 O producing processes (Pocquet et al. 2016) can represent another relevant source of uncertainty for the estimation of the overall carbon footprint. Additional simulations can be run with other model parameter values perturbed within their uncertainty range to see how the predicted carbon footprint results can change.

NOVELTIES AND LIMITATIONS OF THE WORK
Although there is already a significant amount of modelling work regarding full-scale N 2 O emissions and carbon footprint from wastewater treatment plants (Corominas et al. 2012;Guo et al. 2012;Flores-Alsina et al. 2014), substantial steps forward a better N 2 O model prediction have been taken in this work. Specifically, the model used here was calibrated with respect to the main nitrogen species involved in the production of N 2 O such as ammonium, nitrite and nitrate using long-term data obtained during diverse full-scale WWTP operation modes. This represents the basis from which N 2 O production and emission can be reliably predicted. As a matter of fact, while ammonium oxidation represents the starting process for N 2 O production, nitrite accumulation and the ratio between nitrate produced and ammonium consumed in the aerobic zone of a WWTP were found to play a key role (Daelman et al. 2015;Boiocchi et al. 2017aBoiocchi et al. , 2017b. Conversely, works about full-scale N 2 O modelling applications such as the one by (Guo et al. 2012), (Flores-Alsina et al. 2014) and (Corominas et al. 2012) use models not calibrated against any full-scale data, not even with respect to full-scale ammonium, nitrite and nitrate Figure 5 | Percent contributions by the N 2 O emissions (in red) and by the CO 2 emitted for the production of aeration energy (in blue) obtained assuming the following CO 2 emission factors for electrical energy: (a) total carbon footprint expressed in emissions CO 2 equivalent according to the three CO 2 emission factors (in red dot, the case of ammonia control), (b) 0.2588 kg CO 2 ·kWh À1 , (c) 0.00927 kg CO 2 ·kWh À1 , and (d) 0.922 kg CO 2 ·kWh À1 . Water Science & Technology Vol 00 No 0, 12 Uncorrected Proof concentrations. ) discussed the importance of calibrating full-scale wastewater models with data from fullscale WWTPs rather than from lab-scale reactors and the relevance of modelling the nitritation process correctly for reliable N 2 O predictions. Furthermore, while incorporating the N 2 O production by heterotrophic and autotrophic denitrification (apart from (Corominas et al. 2012) who considered only heterotrophic denitrification), they neglect the incomplete NH 2 OH oxidation pathway. With this regards, it is important to note that incomplete NH 2 OH oxidation pathway may still be triggered under some operational pattern in wastewater treatment plants and may even become preponderant over other N 2 O producing processes (Tumendelger et al. 2014(Tumendelger et al. , 2019. Limitations of the results are essentially connected to the reliability of the model used in terms of description of the biological processes determining the effluent quality and the N 2 O production and emission. Supplementary Material (D) deals with the challenges that can lead to poor model descriptive reliability. To overcome this weakness, detailed monitoring campaigns in full-scale WWTPs need to be properly scheduled (Vasilaki et al. 2019). It is important to point out that this is an intrinsic problem related to the calibration of full-scale models as the monitoring is usually carried out with the main aim of verifying compliance with regulation in force (Regional Council of Veneto 2009). Conversely, given its high demand in terms of costs and staff to be involved, long-term detailed monitoring for modelling purposes is opted more sparingly and restricted to few treatment units and short time periods (Liwarska-Bizukojc et al. 2011;Boiocchi et al. 2020). Furthermore, emerging issues such as N 2 O emissions are not always the top priority. The other weakness is related to the fact that the results may be context specific for the design, location and influent characterization of the WWTP considered. For instance, in future plants under pressure for smaller construction than the WWTP modelled in this study in light of embodied carbon reduction (Hammond & Jones 2011), ammonia oxidation may occur at lower rates than the one modelled here and this could in turn change aeration energy requirements, N 2 O emissions and the carbon footprint.

CONCLUSIONS
The present work has dealt with the potential advantages and disadvantages of implementing an ammonia controller in place of an oxygen controller. The model-based results achieved in this work suggest that, while enabling the respect of effluent regulations in terms of ammonium concentrations, the ammonia controller can lead to significant energy savings. However, with ammonia control, nitrite can build up in the system and the overall nitrous oxide emissions were found to increase. Based on correlations, the build-up of nitrification intermediates in the aerobic zone of the system along with suboptimal oxygen levels were suggested as the leading cause for increased N 2 O production. At the same time, when coupling the contribution by N 2 O with the one by the aeration system, no conclusive statement about the overall carbon footprint could be made. Specifically, the variation in carbon footprint from one scenario to the other was found to be strongly affected by the source of energy, which in turn affects the average CO 2 emission factor for electrical energy. Regardless, when the CO 2 emission factor was assumed as the average one for Italy, the increased carbon footprint due to N 2 O emissions when ammonia control was implemented in place of oxygen control with a set point of 1 mg·L À1 resulted compensated by the reduction in the CO 2 emissions linked to aeration energy. The results from this study suggest the need of adopting integrated evaluations for the determination of greenhouse gas emissions upon implementation of both conventional and unconventional control strategies.