Keywords

1 Introduction

Wastewater Treatment Plants (WWTP) commonly involve a series of biological transformation processes that are usually very complex in terms of biochemical and biokinetics understanding [1], and therefore, also in terms of everything related to its modelling, optimization, and automatic control [2, 3]. The type of waste treated is mostly organic, including urban sewage and agricultural effluents with a multi-variety of organic compounds like carbohydrates, lipids, and proteins. These compounds are typically expressed as Chemical Oxygen Demand (COD) and are the main substrate for a wide variety of microorganisms working in a symbiotic relationship. WWTP may be classified into two large groups: Aerobic (in the presence of oxygen), and Anaerobic (in the absence of oxygen), although Anoxic units [4] (anaerobic, but oxygen is available from nitrates, nitrites, or NO) are also included in industrial and municipal WWTP. The most representative aerobic WWTP include Activated Sludge (AS) [2] and Aerated Lagoons [5], while Anaerobic Digestion (like Upflow Anaerobic Sludge Blanket (UASB) [6]) and Dark Fermentation [7] are among the most common anaerobic WWTP [8]. Other WWTP configurations also combine anaerobic and aerobic units [9]. In these processes, organic matter is degraded and converted into microbial biomass, residual organic matter, and eventually in biogas in the case of Anaerobic Digestion (AD) processes [10, 11], being this last the only biological WWT process capable of treating directly wastewater with an organic load higher than 15–20 gCOD/L [9]. In the following in this contribution, in order not to disperse the information too much, efforts will be concentrated mainly on AS and AD continuous processes.

Whether in industry, in the countryside, or in cities, WWTP technologies are undoubtedly indispensable elements to ensure the conditions of industrialization, urbanization, and sustainability of modern society. Thus, their good enough functioning is necessary to meet all kinds of required standards. However, talking about proper operation involves more than just periodic monitoring and maintenance. In reality, WWTP are subject to several disturbances and uncertainties that make difficult to meet such objectives. Effluents that reach the WWTP have a varying and changing composition affecting their physical, chemical, and physicochemical characteristics. Variations in flow, temperature, pH, organic compounds concentration and even the presence of inhibitors affect the biological performance of microbial communities, which are very sensitive to all these parameters, and therefore, also impact their efficiency. Changes in these parameters represent serious disturbances of different nature. The most typical example is seasonal abrupt flow rate step changes (e.g., in the rainy season), but important steps in all these parameters can also occur weekly or even daily simply by changes in environmental conditions and even by the effect of human activity. Most of these disturbances are difficult to foresee or are of a relatively high monitoring cost.

Taking into account these issues, it is clear that current WWTP operate under important uncertainty conditions from a process control point of view, which may cause serious problems in their industrial, agro-industrial or urban implementation. These features, together with the ecological norms requirements, make evident the importance to implement Instrumentation, Control, and Automation (ICA) systems in WWTP [3].

In order to show the benefits of the application of modern control approaches to WWTP, this paper is intended to present different approaches that have proved their usefulness in the modelling, parameter estimation, and regulation of WWTP. These approaches certainly have demonstrated to be robust against process input disturbances, and uncertainties, and have a strong potential for optimizing the performance of WWTP. Actual application examples and successful cases are also shown and demonstrate that they are a useful and efficient alternative that may be implemented at a relatively low cost.

2 Modelling

Modelling WWTP can become a difficult task mainly because their growth kinetics exhibit a highly nonlinear behavior [12], which in turn is due to the involved microbial consortia being among the most diverse ecosystems in nature [13]. An additional disadvantage is that the high complexity in the microbial populations leads also to high uncertainty in the kinetic parameters of current WWTP models.

Certainly, the attempt to adapt microbial communities to different operating conditions, and to the abovementioned disturbances makes them very changeable. The constant distribution of the different species in the consortium causes that their kinetic parameters are also uncertain and change over time. For these reasons, the first step to control and to optimize WWTP is to have models as closely as possible to reality in such a way that the sources of uncertainty are reduced, but at the same time, a relative simplicity is preserved to facilitate the application of control techniques.

Nowadays, one of the most complete and ambitious AD model is the ADM1 (Anaerobic Digestion Model) [14], while concerning AS, the most used models are the series ASM (Activated Sludge Model) [2]. Both models have been developed by the International Water Association (IWA). Several updates and reviews have been developed until now and still remain an active research field. For instance, in [15, 16] seven variants of the ASM series are exhaustively analyzed, verified and evaluated concerning aspects like stoichiometric and kinetic rate expressions, fermentation features, autotrophic and heterotrophic microbial growth, phosphorus removal, nitrification and denitrification, alkalinity, and others. Model parameter estimation and recalibration are also carried out frequently as in [17,18,19], where stochastic parameter estimation approaches together with Monte Carlo simulations and sensitivity analysis are used to fit ASM models to industrial actual data. Theoretical advances have been also further developed recently in [20].

Regarding AD, an additional issue in comparison to aerobic WWTP is its high sensibility to pH variations, and more exactly to alkalinity. Certainly, inlet concentration disturbances may affect partially or even completely the so-called System Operational Stability (SOS) [21, 22]. Such disturbances may compromise the physicochemical equilibrium that is directly related to the SOS preservation [23]. Furthermore, it is known that the presence of strong ions provokes a physicochemical unbalancing that affects directly microbial activity [24, 25]. Even when ADM1 consider anion-cation balancing, pH is not explicit in their equations [14, 26]. In this concern, some efforts have been developed for taking into account a more physicochemical framework [27, 28]. However, even with these modifications, the ADM1 model remains very large to be useful for control purposes, but it is still used rather for state variables estimation [29], experimental validation [30], and monitoring. Thus, in order to obtain greater applicability, reduced order AD models have been also proposed [31, 32]. Particularly, the so-called AM2 Model [33] has taken on great importance not only for being easier to handle from a mathematical point of view, but for taking into account specifically the strong ions concentration, which at pH 7 is very close to alkalinity [34, 35]. Without demerit of any other model described in the literature, and only for illustrating one of them in this contribution, AM2 model is depicted as follows [33]:

$$\begin{aligned} \dot{x}_1 & = \left( {\mu_1 - \alpha D} \right)x_1 \\ \dot{x}_2 & = \left( {\mu_2 - \alpha D} \right)x_2 \\ \dot{S}_1 & = D\left( {S_1^{in} - S_1 } \right) - k_1 \mu_1 x_1 \\ \dot{S}_2 & = D\left( {S_2^{in} - S_2 } \right) + k_2 \mu_1 x_1 - k_3 \mu_2 x_2 \\ \dot{Z} & = D\left( {Z_1^{in} - Z} \right) \\ \dot{C} & = D\left( {C^{in} - C} \right) - k_L \left( {C + S_2 - Z - k_H P_{CO_2 } } \right) + k_4 \mu_1 x_1 - k_5 \mu_2 x_2 \\ \end{aligned}$$
(12.1)

with

$${\mu }_{1}=\frac{{\mu }_{max1}{S}_{1}}{{k}_{S1}+{S}_{1}} , {\mu }_{2}=\frac{{\mu }_{max2}{S}_{2}}{{k}_{S2}+{S}_{2}+{(\frac{{S}_{2}}{{k}_{I}})}^{2}}$$
(12.2)

where \(x_1\) (g/L) and \(x_2\) (g/L) represent the acidogenic and methanogenic biomass concentrations respectively, \(S_1\) (g/L) is the organic matter concentration expressed as COD, and \(S_2\) (mmol/L) is the volatile fatty acids concentration. \(C\) (mmol/L) is the total inorganic carbon and \(Z\) (mEq/L) is the strong ions concentration. The superscript \(in\) represents “input concentration” for these variables. \(k_L\) (1/d) is the liquid–gas transfer coefficient, \(P_{CO_2 }\) is the CO2 partial pressure, while \(k_H\) is the Henry’s constant. \(\mu_1\) (1/d) (Monod type) and \(\mu_2\) (1/d) (Haldane type) are the microbial specific growth rates for acidogenic bacteria and methanogenic archea, respectively, where \({\mu }_{max1}\) and \({\mu }_{max2}\) (1/d) are the maximum growth rates, \({k}_{S1}\) (g/L), and \({k}_{S2}\) (mmol/L) represent the half saturation constants, while \({k}_{I}\) [(mmol/L)]1/2 represents the inhibition constant. The parameters \(k_1\) to \(k_5\) are yield coefficients in the corresponding units. \(D\) (1/d) is the dilution rate, which usually is used as manipulable control input in several control approaches. The parameter \(\alpha\) (dimensionless) denotes the biomass fraction that is retained for the reactor bed, i.e., \(\alpha = 0\) stands for an ideal fixed-bed reactor, while \(\alpha = 1\) stands for an ideal continuous stirred reactor tank [33].

This model has been also used for optimization, state and parameter estimation, and process control purposes (see for instance [36,37,38,39]), and for modeling the alkalinity spatial distribution in an up-flow fixed bed anaerobic digester [40].

3 Control and Optimisation

It is important to remark that the application of modern control approaches (i.e., those developed from the 60s) to WWTP is relatively recent. Control algorithms used in the past in the field of WWTP were basically on/off type, Proportional Integral (PI) or Proportional Integral Derivative (PID) [41]. However, this situation is changing very quickly. Even when classical control methods may offer satisfactory results in relatively simple systems, more recent approaches nowadays do take into account specifically the nonlinear features of biological WWT systems. For instance, adaptive control or predictive control, which are better adapted to face nonlinear behavior, are finding more and more applications in this field. Furthermore, as it has been mentioned before, the main “SOS” lack indicator in AD is alkalinity, because it involves all the physical–chemical equilibria, and therefore, several studies have been developed for regulating it [42].

One of the most typical control variables in WWTP is the COD, since its reduction is certainly the ultimate goal in these processes. However, due to the uncertainties and disturbances, to which treatment plants are exposed in terms of process inputs, it has become necessary to include control approaches being robust against such disturbances and lack of knowledge [22]. In [43], for example, interval observers have been included to estimate ranges of values in biomass concentrations, as these cannot be measured, and then they were combined with an adaptive control approach for regulating COD, also within a preset control interval. But, uncertainties in the growth kinetics of microbial populations in WWTP often lead researchers to propose different nonlinear type control techniques, see for instance [44, 45]. Moreover, some types of nonlinear tracking controls have been proposed. For instance in [46], an adaptive nonlinear tracking control was proposed for regulating the concentration of biomass in an AS-type WWTP based on the input flow, and thus, proportional to it, using a simplified model.

Furthermore, in particular in relation to aerobic processes such as AS-type WWTP, it is well known that in order to maintain adequate oxygen levels, the main parameter to be controlled is oxygen transfer efficiency, and therefore, the main unit operation is aeration. This demands high levels of energy consumption and other costs that need to be optimized [47,48,49]. Different adaptive and predictive control strategies have been proposed in the past for this purpose [50, 51]. In addition to COD reduction, and not less important, the removal of nitrogen and phosphorus from wastewater is also  one of the main targets in WWTP [52]. Several classical and advanced control techniques proposed in this sense have been used and applied successfully [53]. However, as the efficiency of the operation is closely related to the aeration energy, which is a costly process, control objectives are compromised at the same time with concentration set-points and minimal use of energy, and thus, with cost reduction. For instance in [54], adaptive control techniques were used to improve the removal of these nutrients, while reduced the aeration energy required in three WWTP in Switzerland. Nevertheless, Model Predictive Control and other optimization approaches seem to be preferred [55, 56]. However, it is important to note that a common feature in many of the strategies used today, both for AS and AD WWTP is the use of benchmarking [57,58,59]. In such strategies, accumulated knowledge in monitoring, modeling, and control is used to provide a framework for assessing both well-known techniques to be industrially implemented and new approaches to evaluate its correct performance. Certainly, it is in the systematic current form more efficient to simulate WWTP and to take profit from models representing them.

Many modern applications include artificial networks as well lagged regression models, among other methods, that have been used for preventing indirectly the failure of the system due to alkalinity mismatches [60, 61]. These approaches has been also used in cases, when bioreactors have been stopped and then launched after a long time of starvation for bacterial communities in order to recover their correct functioning [62]. Fuzzy logic approaches have also seen a growing interest in the last three decades. For instance in [63], it is depicted how fuzzy logic based modules are used to assess the state of an up-flow fixed bed AD bioreactor, while in [64] similar approaches together with expert systems are proposed and experimentally validated as a methodology for assessing and improving the efficiency of agricultural biogas plants. Neural network and fuzzy approaches have been also used for optimizing energy consumption [65] and regulating the dissolved oxygen concentration [66] in AS processes. Finally, it is important to mention an important current trend in nonlinear control of WWTP, consisting of Sliding Mode approaches that have been used together with models both classical deterministic type [30], and those described by neural networks and fuzzy logic as well [67,68,69]. Finally, it is important to underline that modern control and optimization approaches are currently possible thanks to the existence of Supervisory Control and Data Acquisition (SCADA) systems that play a preponderant role in real-time ICA approaches implementation.

4 Conclusions

The use of Instrumentation Control and Automation (ICA) approaches in WWTP has allowed a greater development of these technologies for wide-scale implementation. The modeling, which is complemented and fed back with monitoring, as well as parameter and state estimation techniques have allowed for a greater understanding of the chemical, physicochemical and biological processes that are carried out in WWTP. The most widely disseminated models, e.g., the ADM1 models and the ASM series of the International Water Association (IWA), are of deterministic type, but models developed from other approaches such as neural networks and diffuse logic have also had extensive development.

As these models are highly nonlinear, the great majority of researchers have developed robust and nonlinear predictive adaptive control approaches. Such approaches allow capturing this nonlinear nature and admitting variations in kinetics and other parameters as well as in operating conditions, which make them robust in the face of these variations as well as in the face of uncertainties and disturbances. This paper has underlined the most important variables to consider in anaerobic and aerobic processes, being alkalinity and oxygen transfer efficiency, respectively, and examples of the main approaches developed for modeling and controlling such variables have been cited.

Advances made in these approaches and technologies over the last 3 decades have enabled good practice reference frameworks in modeling, monitoring, and control of WWTP, which have been validated in different scenarios and have given way to the development of benchmarking strategies that are widely used nowadays. Thus, the use of these techniques has allowed both biological technologies to remove contaminants increasingly efficiently as well as to achieve continuous optimization and improvement of WWTP.