Sensor bias impact on ef ﬁ cient aeration control during diurnal load variations

This study highlights the need to increase our understanding of the interplay between sensor drift and the performance of the automatic control system. The impact from biased sensors on the automatic control systems is rarely considered when different control strategies are assessed in water resource recovery facilities . Still, the harsh measurement environment with negative effects on sensor data quality is widely acknowledged. Simulations were used to show how sensor bias in an ammonium cascade feedback controller impacts aeration energy ef ﬁ ciency and total nitrogen removal in an activated sludge process. Response surface methodology was used to reduce the required number of simulations, and to consider the combined effect of two simultaneously biased sensors. The effects from ﬂ ow variations, and negatively biased ammonium ( (cid:1) 1 mg/L) and suspended solids sensors ( (cid:1) 500 mg/L) reduced the nitri ﬁ cation aeration energy ef ﬁ ciency by between 7 and 25%. Less impact was seen on total nitrogen removal. There were no added non-linear effects from the two simultaneously biased sensors, apart from an interaction between a biased ammonium sensor and dissolved oxygen sensor located in the last aerated zone. Negative effects from sensor bias can partly be limited if the expected bias direction is considered when the controller setpoint-limits are de ﬁ ned.


INTRODUCTION
Automatic control has developed to be an essential tool for balancing consistent treatment and energy efficiency (Olsson ).Substantial efforts have been devoted to develop different aeration control strategies (Åmand et al. ).Most control system studies, however, assume an ideal situation with accurate sensor measurements (Santín et al. ).In practice, on-line measurements are far from ideal.The water resource recovery facility (WRRF) constitutes a harsh measurement environment.This is generally recognized, and the commonly accepted standpoint is that biased measurements are widespread and have a negative impact on the desired control target.To our knowledge, this assumption has not been verified in studies although tools have been developed for that purpose (Rosen et al. ).
We consider accurate measurements and adequate automatic control to be increasingly important for four reasons.First, stricter effluent permits reduce the time when control can be out of specifications without violating the regulations.Second, retrofitted advanced treatment processes that need to operate together with existing processes makes control more elaborate and sensitive for consequential errors.Third, control is essential for a resource-efficient treatment process.Last, automatic control can attenuate negative effects from increasing influent variations that are expected due to global warming.Therefore, we need to identify the most critical sensors and prioritize sensor maintenance to minimize bias impact as the number of sensors steadily increases.Ultimately, these aspects in combination can aggravate the operation and make it important to understand the impact from biased sensors on control.
Different methodologies can be used for studying the impact of biased sensors.Both full-scale and simulation experiments have been applied to assess the impact of biased dissolved oxygen (DO) sensors (Carlsson & Zambrano ).Full-scale studies are, however, time-consuming and impractical for assessing the effects of the combination of many biased sensors.It is also difficult (commonly impossible) to control the influent load, which would be needed to repeatedly assess whether the impact of biased sensors depends on different load conditions.Thus, simulation studies are preferred.Simulations also enable a precise interpretation (as interpreted within the model's predictive accuracy), without noise that can mask small effects on a full-scale plant.The widely used benchmark simulation model platform (Jeppsson et al. ) is well suited for sensor bias evaluation.
Even a suitable model simulation will be time-consuming and difficult to evaluate when a vast number of simulation results are to be compared.As an example, the total number of combinations for 10 biased sensors with three bias magnitudes (consider, for example, bias of À1, 0, þ1) is 3 10 ¼ 59,049.Thus, it is clearly a challenge to assess interaction effects between several biased sensors at different load scenarios also in simulation studies.
In this study, we adopt the response surface methodology (Myers et al. ), which limits the required number of simulations, but still enables identification of the key effects.The method is reliant on a representative set of simulations (Box & Behnken ) that are interpreted via linear regression coefficients.
The goal of this study is to assess the impact of sensor bias on ammonium cascade feedback control at different influent variations.The energy efficiency of applying this type of controller has been demonstrated in practice (Ingildsen et al. ; Åmand ; Rieger et al. ), but it is possible that biased sensors can reduce its advantage.Here, we study how different degrees of diurnal variations in the influent (flow and concentration variations) combined with sensor bias impact aeration energy efficiency and total nitrogen removal.Bias in DO, ammonium (NH) and suspended solids (SS) sensors are studied.The results show that the bias direction is critical and can be both beneficial and detrimental depending on the control target.

MATERIALS AND METHODS
This section describes the methodology (section 'Methodology') and how the simulated system with related influent scenarios and sensors bias were defined (section 'System description').The applied response surface methodology is described in section 'Response surface methodology'.

Methodology
A dynamic process model was simulated with different sensor bias magnitudes and evaluated with respect to their impact on two process performance indicators, the energy efficiency of nitrification (NIT eff ), and total nitrogen removal (N rem ).Bias in five sensors (three DO, one NH and one SS sensor) and variations in influent flow rate and concentrations were studied at three different magnitudes.The combinatorial complexity, and likewise the required number of simulations, were reduced by applying a reduced factorial design (Box & Behnken ) and evaluated using response surface methodology (RSM) (Bezerra et al. ).The findings indicated by regression coefficients produced by RSM were further analysed for causal explanations by evaluating the simulation results in detail.

System description
The studied system was a dynamic model of a continuous activated sludge process (CAS) representing parts of the Henriksdal WRRF in Stockholm, Sweden (750,000 p.e. (population equivalent)).The CAS consists of pre-denitrification followed by three aerated zones for nitrification and a final deaeration zone (Figure 1).The model is further described in Lindblom et al. ().

Controller configuration
The CAS air supply was controlled by an ammonium cascade feedback controller with DO PI-controllers (PI: proportionalintegral) operating as slave controllers under the master ammonium PI-controller (Figure 1).Each aerated zone had a separate slave DO-controller with equal setpoints provided by the master ammonium controller.This setting was developed by Åmand () and is currently in use at Henriksdal WRRF.In practice, there is also an airflow rate slave controller for each DO-controller, which was excluded in this study.
The solids retention time (SRT) was controlled by adjusting the wastage of active sludge with a PI-controller to obtain an average SS concentration of 2,500 mg/L.In practice, and in the studied model, this resulted in a variable SRT of 16 ± 3 days.The large SRT variability was due to the studied influence of the bias in the SS-sensor, which is described in section 'Sensor bias magnitudes'.The SRT was sufficient to achieve near complete nitrification for the studied ammonium load and temperature of 14 C for the whole range of studied scenarios.
All PI-controllers were tuned with the Lambda method (Åström & Hägglund ).A relatively fast disturbance rejection rate was chosen to ensure that the NH-controller reacted on diurnal variations.The controller parameters obtained from the tuning are given in Table 1 with DO setpoint-limits.

Process performance indicators
The two process indicators NIT eff and N rem were defined as where the prefix m refers to the mass of removed total nitrogen (Nred), total nitrogen in the influent (Ntot, in), and nitrified ammonium nitrogen (NHred); and k L a(z) is the total k L a (used as proxy for the mass of oxygen transferred from air to water) in zone z.In practice, the k L a depends on the current airflow rate and α factor where the α factor is the ratio between k L a at process and clean water conditions.Both these factors are site-specific and difficult to assess in practice.The results should therefore be interpreted in terms of an efficient aeration system (constant k L a per airflow rate, regardless of load situation, and new diffusers) and an influent free from surfactants that may reduce k L a and α:

Sensor bias magnitudes
The studied sensor bias magnitudes are given in The assumed accuracy in an SS sensor is reflected by the accuracy for laboratory samples that are used during calibration.Here, the laboratory samples had a ±20% analytical uncertainty at a 95% confidence interval.This would correspond to a bias of ±500 mg/L at 2,500 mg/L concentration.
NH measurements can be conducted with ion-selective probes and gas-sensitive and spectrophotometric analysers.The latter two are expected to have a higher accuracy than the former.The expected bias should be small in absolute terms if following the same reasoning about analytical uncertainty during calibration, as for the SS sensor.This is because the effluent NH concentration is expected to be low (0-3 mg/L) in nitrifying WRRFs.Our experience is, however, that ion-selective sensors can show substantial drift (Samuelsson et al. ), although the NH sensor drift was not explicitly assessed in that study.
In the end, we limited the NH bias magnitude to À1 mg/L.This is the largest possible bias before the sensor would measure a negative concentration.Similarly, the positive NH bias was limited to þ1 mg/L to use the same magnitude in absolute terms, which facilitates interpretation of the results described in section 'Response surface methodology'.
A DO sensor bias of ±1 mg/L was assumed.An approximate 1 mg/L negative bias was obtained after about 1 month of biofilm growth without manual cleaning on an electrochemical sensor.By contrast, an optical DO sensor showed a correspondingly large positive bias after 14 days of biofilm growth without manual cleaning and only automatic air cleaning (Samuelsson et al. ).

Influent variations
Three levels of variations were defined for both influent flow and concentrations: constant, normal and high influent variations (Figure 2).The purpose was to assess if bias in sensors is more critical at large variations.
The 'normal diurnal influent' and reference scenario was produced by combining measurements from the influent monitoring programme with diurnal influent flow and load patterns to Henriksdal WRRF.The model by Gernaey et al. () was used to estimate chemical oxygen demand (COD) fractions required in the simulation model.Both influent concentration variations (nitrogen and carbon) and influent flow show similar diurnal patterns (Figure 2).
The constant variation scenarios were produced by either setting the influent flow or the influent concentration to be constant.The diurnal mass influents of both NH and COD were kept identical to the normal scenario by adjusting the influent concentration or flow mean value correspondingly.
The high variation scenarios were produced by stretching the normal variation by multiplying the dynamic diurnal profile by two, but still compensating its mean value so that an identical mass influent as the reference scenario was obtained (Figure 2).
Variations in flow and concentrations were treated as separate factors to assess if either of them would give a larger impact in combination with biased sensors.
The study was purposefully limited to consider only diurnal influent variations, neglecting other variations such as temperature.The reason was to learn about the sensor bias impact during the most common disturbances.For the Henriksdal WRRF, the diurnal variations represent the typical disturbance pattern for about 80% of the time.It is expected that impact from weekly and seasonal variations are similar to diurnal load variations, but with a changed mass load.Here, we assess interactions between variations in flow/concentration and sensor bias at a fixed diurnal mass load, to allow a fair comparison.This would be slightly different if seasonal and weekly variations were to be included.
The impact from rain and drainage water can be substantial, both in terms of flow and impact on the wastewater temperature.How such stormwater events impact the WRRF will, however, be very site-specific, and therefore be difficult to generalize.We also expect a large (possibly the largest) negative effect on the settler operation.These conditions are difficult to model and would introduce uncertainty to the result interpretation.The results here assume a biological treatment process with good settling properties.For these reasons, we limit this study to daily normal variations that still represent the main time of operation.

Response surface methodology
RSM originally gained interest as a tool for industrial product and process optimization, and is iterative in its The experimental design and evaluation were conducted in MODDE 12.1 (Sartorius), a software package for experimental design.The model simulations and evaluations were conducted in MATLAB/SIMULINK version R2020a (MathWorks).
Step 1. Design of experiment Three levels were considered for the seven quantitative factors: sensor bias (factor 1-5, Table 2) and influent variations (factor 6-7, constant/normal/high flow and concentration variations).Three levels are required to identify any quadratic effects, which would here require 3 7 ¼ 2,187 combinations for a full factorial design.The reduced design suggested in Box & Behnken () was used, which required only 57 combinations.The Box-Behnken design was preferred over the more common central composite design since extreme points are excluded (Bezerra et al. ).Extreme points refer to combinations where all factors are at their minimum or maximum levels.Here, these extreme points would correspond to a situation when all sensors have, for example, a positive bias simultaneously as the influent flow and concentration variations are high.This is not expected to be common in practice, and the exclusion of those combinations was therefore not expected to influence the applicability of the results.The dependent variables (responses) NIT eff and N rem are defined in Equations ( 1) and (2).
Step 2. Simulation procedure The model was simulated with the different combinations of factor settings described in Step 1.For each factor setting, the model was first simulated to reach steady state with a constant load for 60 days.Next, the same factor settings were simulated for an additional 120 days with the dynamic influent, which allowed the SS to reach steady state.The last 7 days were then used for evaluation.
Step 3. Construct a valid model An initial linear regression model was defined to contain all linear, quadratic, and two-factor interaction terms.Nonsignificant model terms measured by the corresponding confidence intervals were removed.This procedure was repeated until the final model with only significant model terms remained.
The final model was assessed by verifying a large (>0.8)Q 2 , which measures the regression model's predictive ability, in contrast to the common R 2 , which only measures the explained variation in the output.Both measures are used to assess the model validity.Golub et where x n are the inputs that consist of seven factors (sensor bias and influent variation) and y n are the observed outputs NIT eff and N rem for the n dynamic model simulations.X is an n-by-7 matrix that contains the factor settings for the n dynamic model simulations.y is the mean of all observed outputs (dynamic model simulations) and ŷn is the regression model's predicted output for the corresponding simulation n.In total, N dynamic model simulations were performed with the bias and influent settings obtained from the Box-Behnken design.The regression was conducted by regressing the observed values (dynamic model simulations) on the Yaxis for the predicted values on the X-axis (regression model predictions) as suggested by Piñeiro et al. ().
Step 4. Interpret the results The regression coefficients from the final model were analysed with causal analysis from the dynamic simulation results.

RESULTS
First, an overview of the results is given, expressed as the obtained regression models where the validity of the regression models is also analysed.Then, the impact of biased sensor measurements on the process indicators are interpreted.Last, the effects from changes in influent variations and interactions are analysed.

The obtained regression model and its interpretation
The simulation results resulted in two different regression models with six and ten significant model terms for NIT eff and N rem , see Figure 3(a) and 3(b) respectively.Changes in the influent flow (F) were significant in contrast to influent concentration variations that did not have a significant effect on any of the process indicators.In general, the impact on NIT eff was larger than the impact on N rem (Figure 3, note the different scales).The largest effects were seen from biased NH and SS sensors that included both significant linear and quadratic model terms.Interaction effects with other factors were seen for the ammonium sensor and are further analysed in the next section.
The regression models were obtained by removing nonsignificant model terms as described in section 'Response surface methodology'.Both models showed a good predictive fit (Q 2 NITeff ¼ 0.82; Q 2 Nrem ¼ 0.94) and were assumed valid for further analysis.The agreement between predicted and simulated values is shown in Figure 4.It is worth noting that the reference scenario showed a larger value for NIT eff than the model prediction (blue square Figure 4).This will not violate the conclusions made from the regression model.However, it highlights the fact that certain combinations of levels and  factors will produce results that deviate from the general conclusions, which ought to influence the interpretation of the results.We therefore complement the regression model analysis with a causal model evaluation of the mass flows and time series in the underlying simulation results where non-obvious explanations can be made.
To avoid confusion about how to interpret the bias direction (positive or negative) and the signs and magnitudes of the regression coefficients we here exemplify how to read Figure 3.
A positive regression coefficient in Figure 3 indicates an increase in the performance indicator when the corresponding model term has a positive value.For example, a positive bias in DO5 will result in an increased NIT eff and N rem since the regression coefficients for DO5 are positive (yet small) in Figure 3.Note that a positive bias in DO5 will result in a lower DO concentration than the desired setpoint.Similarly, negative coefficients for a biased NH sensor indicate the opposite relationship.That is, a negative bias in the ammonium sensor (and likewise an increased effluent ammonium) will increase NIT eff and N rem as indicated in Figure 3.
The magnitude of a regression coefficient for a main effect should be interpreted as the impact on the process indicator for a unit change in the factor related to the coefficient, while keeping remaining factors constant.Here, a unit change is defined as a 1 mg/L bias for DO and ammonium sensors, and 500 mg/L bias in the SS sensor (section 'System description').As an example, the regression coefficient for the NH sensor main linear effect was À0.17.This indicates that a 1 mg/L ammonium sensor bias is expected to reduce NIT eff with about 17% on average from the linear effect.

Ammonium sensor bias
A bias in the ammonium sensor had the largest influence on both NIT eff and N rem , as remarked in section 'The obtained regression model and its interpretation'.When both quadratic and linear effects are added (as a straightforward summation), a bias in the NH sensor showed the largest impact on NIT eff of all factors.The reduction in NIT eff was about 25% for a 1 mg/L bias as predicted by the regression model (Figure 3).A large effect from bias in the NH sensor was expected, since it is the key information used in the NH-controller.This reduction in energy efficiency is larger than what is expected to be gained from the ammonium cascade feedback controller in the first place (compared to DO-controllers with fixed setpoints), see Åmand ().This emphasizes the importance of unbiased measurements to achieve the desired benefits from automatic control.
The reason for the reduced NIT eff was that a positive NH sensor bias will result in a lowered effluent NH concentration that requires more aeration energy per mass nitrified nitrogen.In effect, the 'true' NH-setpoint is 0 mg/L at 1 mg/L bias and 1 mg/L NH-setpoint.To reach such low NH effluents, extensive aeration is required.The NH-controller solved this by assigning high DO-setpoints close to, or at, the maximum setpoint-limit during peak loads, with a poor NIT eff as consequence.The opposite reasoning can be applied to a negative NH bias.
A positive bias in the NH sensor had a negative effect not only on NIT eff , but also on N rem (Figure 3(b)).Again, high DOsetpoints were the reason for the reduced nitrogen removal.High DO-setpoints cause a higher DO concentration in the last unaerated zone and the oxygen is recirculated to the pre-denitrification (Figure 2) resulting in a decreased pre-denitrification rate and N rem .The same effect on N rem was seen for a negative bias in DO6 (higher DO than desired).The effect was even more pronounced when NH and DO6 simultaneously had a negative bias, which was amplified through their interaction effect (Figure 5).
A negative bias in the NH sensor (lowered DO-setpoints) also led to a decrease in N rem .The reason for this was that less nitrification also lowered the total nitrogen removal rate as less nitrate became available for denitrification.Note that both NH bias directions had a negative effect on the total nitrogen removal.This raises the question whether the NH-setpoint was optimal with respect to the N rem requirement.The possibility of an optimum is further supported by the presence of the quadratic NH model term (Figure 3(b)).The consequences of a biased NH sensor for NIT eff and N rem are demonstrated in Figure 6.In Figure 6(b), the modelled main effect (linear and quadratic) for NH is shown for different bias magnitudes, which indeed shows an optimum at À0.5 mg/L NH bias.The explanation for the optimum is that for this specific WRRF configuration and load, a certain amount of nitrification is needed to obtain a low (<0.5 mg/L) DO in the recirculation stream.This occurs at an NH effluent concentration of 1.5 mg/L, i.e. the optimum in Figure 6(b).If the NH effluent is larger than 1.5 mg/L, the minimum DO-setpoint at 1 mg/L instead increases the recirculated DO concentration.

DO sensor bias in the ammonium loop
Bias in the DO sensor in cascade with the ammonium controller cannot be neglected.As noted in section 'Ammonium sensor bias', increased DO concentrations reduced both NIT eff and N rem .Similarly, a negative bias in any DO sensor (higher DO than measured) also resulted in reduced NIT eff and N rem (Figure 3).It was initially expected that the NH master controller would compensate for any bias inside the DO slave controller.After all, a positively biased DO sensor causing an increase in NH effluent should be possible to compensate for with an increased DO-setpoint.The mistake in the previous reasoning is that the setpoint-limits of the slave controllers were not considered.An increase in both the minimum and maximum setpoint-limits due to negative bias in DO4 will be unfavourable as shown in Figure 7.For example, during low loads at night, the minimum true DO concentration is 2 mg/L instead of the desired 1 mg/L minimum setpoint.
It should be noted that the location of the biased DO sensor matters, since the impact direction was different for NIT eff compared to N rem (Figure 3).Bias in the DO4 sensor had the largest effect on NIT eff , which contrasts N rem and the results obtained with a biased DO6.This is in agreement with previous studies of the optimal DO-profile, where a lower DO in first zone was shown to be the most energy efficient (Åmand & Carlsson ).

Suspended solids sensor bias
A negative 500 mg/L bias in the SS sensor resulted in a moderate increase in NIT eff (about 6%) and N rem (about 2%), see Figure 3.This indicates that there would only be positive effects from an increased SS concentration.This is logical as the biomass is the limiting factor for reducing ammonium peaks (Rieger et al. ).We acknowledge that the key limitation for reaching a high SS is the sedimentation capacity, which is not fully described in the applied model.Especially operating issues related to the bacterial sludge composition are not considered.Still, the results highlight the importance of striving for the maximum practically feasible SS concentration.We further  expect the impact from a biased SS sensor, on N rem , to increase if the activated sludge process is operating close to its maximum capacity where occasional ammonium break-through is expected.This would be especially critical during cold wastewater temperatures where a higher SRT is needed to maintain nitrification.Here, the NH load was within the modelled plant nitrification capacity even for the reduced SS concentration.

Interactions between sensors and influent flow variations
As expected, a decrease in influent flow variations also led to an increase in NIT eff .It was less expected that the effluent NH concentration decreased with increasing influent variations.At a first glance, this is non-intuitive but is reasonable since the opposite applied for aeration energythe aeration energy increased with increased influent variations.The reason is that the NH-controller increases the DO-setpoint during peak loads, resulting in an increased nitrification at the cost of increased energy consumption.The effluent ammonium concentration was below the setpoint of 1 mg/L, apart from simulations with a constant influent mass flow.This was not a consequence of poor tuning of the controller but caused by the DO-setpointlimits.During low loads at night, the ammonium effluent concentration approaches zero, which should produce a zero setpoint value to the DO-controller.However, as there was a minimum DO-setpoint value of 1 mg/L, the ammonium concentration remains below the setpoint value until the load increases and justifies a DO-setpoint of 1 mg/L.
Note that in contrast to the effect from influent flow variations, there were no significant effects from influent concentration variations (Figure 3).A possible reason is that concentration changes are within the NH-control authority and that the nitrification rate can temporarily be increased with increased aeration.Such action, however, is not enough to compensate for short hydraulic retention times due to flow variations.This needs to be verified by further studies.
There were no significant interaction terms between influent variations and sensor bias (apart from a minor interaction term between NH and F, Figure 3(b)).This indicates that avoiding a biased sensor does not become more important when influent variations increase, compared to when the influent flow is constant.The results, however, may be different during storm water conditions, or when a sudden load increase temporarily exceeds the plant treatment capacity.
Apart from the interaction between bias in NH and DO6 mentioned in section 'Ammonium sensor bias', there were no large interactions between a pair of two biased sensors.Thus, we should expect that the combination of several biased sensors will not be more problematic, compared to the problems caused by bias in the individual sensors, one at a time.The lack of non-linear interaction effects opposes the common assumption of the non-linear nature of wastewater treatment models.Instead, the result indicated fairly linear changes for the studied scenarios, which can simplify and reduce the needed scope for future studies.

DISCUSSION
The consequences of sensor bias are discussed in wider context, including relation to costs in section 'Sensor bias impact on costs'.The impact from bias direction and the interplay with controller setpoint-limits are discussed in section 'Sensor bias direction matters' and 'The interplay between controller setpoints and sensor bias', respectively.The impact on effluent permits is analysed in section 'Sensor bias impact on effluent permits'.The applicability of the RMS method is evaluated in section 'Benefits and risks with response surface methodology'.Lastly, possible mitigating actions are considered in section 'Preventive actions to mitigate negative effects from biased sensors'.

Sensor bias impact on costs
A negative bias in the NH sensor will cause an increase in electricity costs due to the reduced NIT eff .For the studied 750,000 p.e. WRRF, a 1 mg/L NH sensor bias (consistently during a full year) would correspond to a substantial annual cost increase, equivalent to employing eight full-time instrument technicians!.Similarly, the added energy cost for a biased DO sensor would correspond to one additional instrument technician, despite the small change as measured in percentages.The motivation for sensor maintenance and purchasing the best available NH sensor is obvious.
In practice we should only expect biased sensors for part of the time.The probability of having a biased sensor is not easy to estimate as it would require a redundant and accurate reference sensor.A cost-benefit analysis of conditionbased sensor maintenance, in contrast to the current timebased sensor maintenance, would motivate further studies about the probability of biased sensors in practice.
The results have demonstrated that cost and energy reduction enabled by advanced automatic control can be easily lost using inaccurate on-line sensor measurements.This is rarely considered during benchmarking of new control strategies.Therefore, we suggest a critical review of aeration control strategies, with respect to their sensitivity towards biased sensor measurements.

Sensor bias direction matters
Only a negative bias in DO sensors and positive bias in the NH and SS sensors had a negative impact on NIT eff and N rem .It is problematic to have an undesirable negative DO-bias since the common problem with biofilm formation on electrochemical membrane-based DO sensors has been shown to cause such negative drift (Samuelsson et al. ).In Samuelsson et al. (), there were indications of a negative drift in an ion-selective NH sensor, although the drift direction was not studied in detail.In general, research about sensor drift direction in practice has been limited to a few studies (Samuelsson et al. ; Ohmura et al. ; Thürlimann et al. ).For that reason, we also lack knowledge about whether different sensor technologies result in different drift direction, for example caused by fouling.The findings here emphasize that knowledge about sensor drift direction is essential.Further studies are needed, especially for NH and SS sensors.
Apart from the bias direction, it was remarked in section 'DO sensor bias in the ammonium loop', that the location of a biased DO sensor had an impact on NIT eff and N rem .This knowledge should be considered when sensor maintenance routines are developed to prioritize the sensor maintenance order.During such prioritization, large interactions between two biased sensors should also be considered, which would here apply to NH and DO6.
As mentioned, it is still not fully understood whether drift direction can differ between different sensor technologies, and even between different sensor makes.If it could the expected drift direction should be considered during the sensor procurement.The expected drift direction would be essential product information.

The interplay between controller setpoints and sensor bias
Ammonium cascade feedback control is reliant on DO setpoint-limits to avoid undesirable DO concentrations.The influence from how these setpoint-limits are assigned increases when sensor bias is considered.The common strategy is to assign tight setpoint-limits, e.g.limit DO between 1 and 2 mg/L.This will avoid unfavourable excess aeration during peak loads at the cost of reduced disturbance rejection rate.Tight limits will also reduce the impact from biased sensors as a negative 1 mg/L DO bias in practice instead would lead to setpoint-limits between 2 and 3 mg/L.Using only a fixed DO-setpoint of, for example, 2 mg/L would minimize the influence from a DO bias to þ/À its magnitude.A better approach would be to tighten only the setpoint-limit that will be affected by the expected drift direction.For example, an expected negative drift direction for the DO sensor would lead to too high DO concentrations.A slightly lower maximum DO setpoint of, for example, 1.5 mg/L could counteract unnecessary aeration in the presence of bias, at the cost of reduced disturbance rejection capability.
In this study a proper anti-windup has been applied.Problems related to absence of anti-windup are expected to increase with biased sensors.The reason is that the NH-controller would operate at its setpoint-limits during longer periods due to the sensor bias.

Sensor bias impact on effluent permits
Sensor bias will have an impact on achieving effluent permits.Many WRRFs have permits for the maximum effluent ammonium concentration.The timescale for this maximum differs between countries and WRRFs.In Sweden, yearly or monthly maximum mean values are prevalent, but other countries require compliance for shorter timescales.This will influence which amplitude and time period can be accepted with sensor bias, while still satisfying effluent requirement.Thus, the importance of sensor bias is clearly both WRRF-and regulatory-specific and the methodology applied here could readily be extended to include such aspects.
Seasonal variations, such as cold wastewater temperature during wintertime in Sweden, could impact the nitrification efficiency substantially.When approaching the minimum SRT, the consequence of a biased SS-sensor would be of increasing importance.Similarly, an (undesired) reduced aeration due to bias in either a DO or an NH-sensor could then become more critical than was observed here.A relevant future study would therefore identify controller setpoints that lie in the borderline for critical SRT, minimum temperature and maximum influent flow.We expect that the optimization tools in RSM would be feasible for this purpose and could be an extension of the methodology applied here.

Benefits and risks with response surface methodology
The main benefit with using RSM compared to evaluating scenario by scenario is that a good overview of the key influential sensor bias can be obtained with less effort.This can guide new rules-of-thumb that can be used in practice, for example, 'avoid negatively biased NH and SS sensors both for cost and nitrogen removal reasons'.
One drawback of the RSM is that the obtained regression coefficients only indicate the average effect, and that there may exist combinations of biased sensors that produce results deviating from what the regression model predicts.This risk increases when a full factorial experiment is reduced by, for example, Box-Behnken design, which was applied here.
The regression coefficients cannot be interpreted separately but require a causal interpretation from the simulations.Otherwise, the possibility to transfer the insights to similar systems will be limited.
The RSM methodology resembles a sensitivity analysis.A sensitivity analysis for optimizing controller setpoint values could also have been used to analyse sensor bias impact.Thus, the dual goal of process optimization and critical sensor analyses can be achieved simultaneously and would probably increase the motivation for executing similar studies in practice.

Preventive actions to mitigate negative effects from biased sensors
Based on the results from this simulation study some practical advice can be given.
1.The most common drift direction and expected magnitude should be assessed for the current plant conditions and seasonal variations, and sensor makes.This will make it easier to identify critical problems in practice.
If simulations are to be conducted, this will also reduce the need to simulate and interpret non-existing sensor bias combinations.2. The impact from the DO-controller's setpoint-limits should be studied and assigned while considering the expected sensor drift direction.3. A multi-criteria analysis should be conducted to identify which of the expected harmful effects from biased sensors are the most important.A trade-off between treatment costs, treatment efficiency, and achieving effluent permits ought to be identified.From such analysis, the most critical sensor(s) with respect to bias can be identified.Consequently, the maintenance of these sensors should be prioritized.
4. It could also be possible to facilitate detection of biased sensors by transferring knowledge about fault symptoms indicated in the simulations to the operator or fault management system.For example, if a positive drift in the NH sensor is expected to produce a higher DO-setpoint than desired, then the operator should monitor the duration of maximum DO-setpoints during peak loads, as they will be affected by such bias.

CONCLUSIONS
There is an obvious need to assess the reliability of on-line sensor data used for automatic control.This aspect is not commonly included in control system benchmarking but is critical to ensure that the real system is optimized at realistic conditions.
It is concluded that: • biased sensors and influent variations considered as sep- arate factors have a large impact on nitrification energy efficiency and less impact on total nitrogen removal.The impact from biased sensors do not, however, increase as influent diurnal flow and concentration variations increase.
• to implement preventive measures, it is important to know the expected sensor bias direction.Positive bias in NH and SS sensors and negative bias in DO sensors should be avoided to maintain a high total nitrogen removal and energy efficient nitrification.

Figure 4 |
Figure 4 | Observed (simulated) and predicted values for NIT eff (a) and N rem (b) from the RSM model (note that 'Predicted' refers to the RSM model prediction and 'Observed' are the computed values from the dynamic model simulations).Each circle represents one simulation with a combination of sensor bias magnitudes and influent variations as given by the Box-Behnken experimental design.Interaction effects between several biased sensors can be assessed since the biased sensors are not evaluated one at a time.Blue squares are the reference simulation with normal influent variations and no sensor bias.Please refer to the online version of this paper to see this figure in colour: http://dx.doi.org/10.2166/wst.2021.031.

Figure 5 |
Figure 5 | Effect of interaction between NH and DO6 on N rem .When DO6 has a negative bias (À1 mg/L) simultaneously as NH sensor has positive bias (NH (high)) there is an additional decrease in N rem .

Figure 7 |
Figure 7 | The effect from a negative bias in DO4.Ammonia effluent (green solid and dashed lines) and DO setpoints (black, grey, and dashed purple lines) during a diurnal cycle.Dotted grey lines indicate DO setpoint-limits at 1 mg/L and 3.8 mg/L respectively.Please refer to the online version of this paper to see this figure in colour: http://dx.doi.org/10.2166/wst.2021.031.

Figure 6 |
Figure 6 | Main effects of a biased NH sensor (±1 mg/L) including both linear and quadratic model terms for NIT eff (a) and N rem (b).95% confidence intervals are indicated with dashed lines.

Table 2 |
The three sensor bias magnitudes (levels) considered in the study

Table 1 |
Controller parameter settings used in the study; K is the controller gain and Ti