Next Article in Journal
Image Recognition of Wind Turbine Blade Defects Using Attention-Based MobileNetv1-YOLOv4 and Transfer Learning
Next Article in Special Issue
Advances in the Monitoring, Diagnosis and Optimisation of Water Systems
Previous Article in Journal
Dissecting Latency in 360° Video Camera Sensing Systems
Previous Article in Special Issue
Chlorine Concentration Modelling and Supervision in Water Distribution Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Economic Linear Parameter Varying Model Predictive Control of the Aeration System of a Wastewater Treatment Plant †

1
Advanced Control Systems Group, Automatic Control Department, Edifici Gaia Campus de Terrassa, Universitat Politècnica de Catalunya, Rambla Sant Nebridi, 22, 08222 Terrassa, Spain
2
Institut de Robòtica i Informàtica Industrial (CSIC-UPC), Llorens i Artigas, 4-6, 08028 Barcelona, Spain
3
ADASA Sistemas, S.A.U. C/Ignasi Iglesias, 217, 08820 El Prat de Llobregat, Spain
*
Author to whom correspondence should be addressed.
This paper is an extended version of our paper published in Proceedings of the 27th European Symposium on Computer Aided Process Engineering (ESCAPE 27), Barcelona, Spain, 1–5 October 2017.
Sensors 2022, 22(16), 6008; https://doi.org/10.3390/s22166008
Submission received: 10 May 2022 / Revised: 2 August 2022 / Accepted: 9 August 2022 / Published: 11 August 2022

Abstract

:
This work proposes an economic model predictive control (EMPC) strategy in the linear parameter varying (LPV) framework for the control of dissolved oxygen concentrations in the aerated reactors of a wastewater treatment plant (WWTP). A reduced model of the complex nonlinear plant is represented in a quasi-linear parameter varying (qLPV) form to reduce computational burden, enabling the real-time operation. To facilitate the formulation of the time-varying parameters which are functions of system states, as well as for feedback control purposes, a moving horizon estimator (MHE) that uses the qLPV WWTP model is proposed. The control strategy is investigated and evaluated based on the ASM1 simulation benchmark for performance assessment. The obtained results applying the EMPC strategy for the control of the aeration system in the WWTP of Girona (Spain) show its effectiveness.

1. Introduction

Biological wastewater treatment plants (WWTPs) are complex nonlinear systems with large variations in their flow rates and feed concentrations. These plants have to be operated continuously taking care of strict environmental regulations. Thus, the use of advanced control strategies becomes necessary to make them more efficient.
The most widely used biological wastewater treatment is the activated sludge process (ASP). In the ASP, microorganisms are mixed with wastewater. The pollutants of the wastewater constitute the nutrient of the microorganisms. As the organisms feed on the organic pollutants in the wastewater, the pollutants are converted to more organisms, biomass, and some by-products. Following an adequate amount of treatment time, the mixture of microorganisms and wastewater, the mixed liquor flows from the aeration tank to a clarifier or settler where the sludge is separated from the treated water. Some of the settled sludge is continuously recirculated from the clarifier to the aeration tank to ensure the maintenance of adequate amounts of microorganisms in this tank. The microorganisms are again mixed with incoming wastewater where they are reactivated to consume organic nutrients. There are five major groups of microorganisms generally found in the aeration basin of the activated sludge process: (i) aerobic bacteria responsible for removing the organic nutrients, (ii) protozoa to remove and digest dispersed bacteria and suspended particles, (iii) metazoa to dominate longer age systems and clarify effluent, (iv) filamentous bacteria or bulking sludge, which are present when operating conditions change, (v) algae and fungi, which are photosynthetic organisms that are present with pH changes and older sludge.
The majority of the culture is mixed and reused with inlet wastewater to keep high reaction rates and sludge age characteristics. In particular, nitrogen is eliminated as follows: First, ammonium is oxidized producing nitrate under nitrification in the aerobic step. The nitrate that is produced is then converted into nitrogen gas by means of denitrification in the anoxic step. Thus, the control of aeration is very important because a low amount of dissolved oxygen can cause the biomass death. On the other hand, an excess of dissolved oxygen could cause the sludge to settle insufficiently. Moreover, because 60% to 80% of the global energy consumption is due to aeration and the operating costs of a WWTP [1], an excessive aeration is not desirable regarding economic efficiency.
The models that are usually considered for characterizing the WWTP processes are the ones developed by the International Association on Water Quality (IAWQ) known as Activated Sludge Models (ASMs) [2].
In this paper, optimal economic operation of the aeration system is considered to improve the efficiency and reliability of an ASP with intermittent aeration, which is used for the removal of nitrogen from domestic wastewater. The objective of the control is to design an aeration strategy (air-on and air-off periods) which minimizes the energy dissipated by the aeration system, with adherence to the limits of the effluent requirements and the operating constraints. The implementation of optimal operation strategies is therefore interesting because WWTPs face the challenge of treating water properly albeit ensuring the minimization of operational costs. This has been the driving force for the active research in the development of advanced control techniques and hierarchical control schemes to improve the operation of the WWTPs, see for example [3,4].
Model predictive control (MPC) has been the most successful advanced control approach applied to control WWTPs. This is due to the fact that MPC controllers allow in a straightforward manner the different operational requirements, the multivariate nature of the control problem (that could even include delay) and directly handling constraints on the control inputs, system outputs and/or internal states [5]. It can also include disturbance prediction, allowing to anticipate the appropriate control actions (feedforward) to achieve optimal performance according to defined criteria in the cost function, which can include different quality criteria and operational costs. Adjusting the MPC control strategy is carried out by suitable manipulating prioritization of different objectives of the performance index that could also include the use of soft constraints. In this way, MPC has become an attractive control strategy for a considerable number of WWTP applications in the last few years. Some examples of MPC control of WWTP can be found in [6,7]. In [6], a benchmarking of different hierarchical control structures for WWTPs that combines static and dynamic real-time optimization (RTO) and nonlinear model predictive control (NMPC) is presented. In [8], a procedure to find the best controlled variables in an economic sense for the activated sludge process in a wastewater treatment plant, despite the large load disturbances, is introduced.
Classical MPC formulation considers pre-established set points, and the objective functions related with error and energy effort have quadratic forms [5]. However, the determination of optimal and reachable reference set points in real time is not an easy task because of the existence of disturbances, set-point changes, time-varying parameters and model uncertainties, among others. This constitutes one of the main limitations of classical MPC. To remedy this issue, real-time optimizers (RTO) or steady-state target optimizers (SSTO) are used to pre-compute the reference set- points at a supervisory layer in the control hierarchy. Then, these pre-computed set points are sent to the lower layer, where a classical MPC behaves as a regulatory controller, forcing the process to follow the desired set points. However, in spite of the use of an RTO, not reachable trajectories might be generated because of the appearance of unexpected disturbances or set points variations, among others. Moreover, there is a delay between the different layers, because the lower layer receives the reference set points determined from the upper layer before its execution. These problems can be avoided by using economic MPC (EMPC) that optimizes process performance directly (e.g., by means of economic objective functions), eliminating the need of generating reachable reference set points [9]. The first results of the application of EMPC to DO concentration control in WWTPs have been presented in a previous work from the authors [10] considering the nonlinear model of the plant. However, this leads to a nonlinear optimization problem.
Alternatively, this paper proposes an EMPC strategy using the linear parameter-varying (LPV) framework to optimize the effluent quality and minimize the operational cost of a WWTP under operating and physical constraints. The objective is to minimize the energy used by the aeration system with the control of the dissolved oxygen (DO) concentrations in the aerated reactors and maintain the effluent concentration under the required limits. The proposed approach is based on real-time dynamic optimization methods. Optimization in MPC with nonlinear models presents a non-convex problem which is computationally demanding, especially when dealing with large-scale plants with complex dynamics such as the WWTP. Thus, the LPV framework allows the embedding of these nonlinearities in scheduling variables, which are functions of system states (i.e., qLPV). This allows obtaining a pseudo-linear model which is linear in state space but nonlinear in the parameter space and deriving a less demanding convex MPC optimization problem, since convex quadratic optimization tools can be applied. The stability and recursive feasibility of MPC with LPV models has been studied (see [11] for a review of the recent results). The application of dynamic optimization methods requires a sufficiently accurate mathematical model describing the wastewater treatment process. The present work uses the Activated Sludge Model No. 2 (ASM2) [12]. To illustrate the proposed approach a WWTP located in Girona (Spain) is considered as a case study.
In Section 2, the WWTP is described and modeled using a reduced ASM2 model, which is then represented in a qLPV form. The proposed EMPC strategy is introduced and described in Section 3, while the proposed MHE approach is presented in Section 4. The results are presented in Section 5, with simulation scenarios obtained from the application of the EMPC strategy on the Girona WWTP. Finally, some conclusions are given in Section 6.

2. WWTP Description and Modeling

2.1. WWTP Description

The Girona WWTP is a biological treatment plant designed to treat the wastewater generated by 200,000 inhabitant equivalents with a medium daily inflow of 35,000 m3/d. The processes of the plant can be divided into two main treatment lines: water and sludge (see Figure 1). The water line is separated into three phases: pre-treatment, primary treatment and secondary treatment. The secondary treatment is designed to convert biodegradable, organic wastewater constituents and certain inorganic fractions into new cell mass and by-products. The plant uses an activated sludge system and has three lines composed of three main reactors that are divided into various compartments and three clarifiers. Each line is made of two anoxic reactors located at the beginning, three aerated tanks and an anoxic tank followed by an aerated one. With this configuration, the plant can nitrify and denitrify with great efficiency. The anoxic and aerobic tanks have volumes of 1335, 4554, 1929, and 1929 m 3 for anoxic and 1929, 1276, and 1409 m 3 for aerobic, respectively. Oxygen is supplied to aerated tanks by the aeration system, which delivers air to each of the aeration tanks. The wastewater and activated sludge are separated into three parallel secondary settlers. The volume of each secondary settler is approximately 5024 m 3 . The activated sludge is internally recirculated from the last aerobic zone to the anoxic tank ( 210 % of influent waste). Additionally, the wastewater is recirculated from the secondary settlers to the anoxic tank (45 to 100% of influent waste).
Figure 2 shows a standard WWTP technological layout. The wastewater flow enters into the biological part after the mechanical treatment. The nutrient removal takes place in the activated sludge reactor through the biological treatment. The first zone in this treatment is anaerobic, where phosphorus is released. The mixed liquor internal recirculation originates from the anoxic zone. The denitrification occurs in the second zone. The activated sludge returned from the clarifiers bottom, and the internal recirculation from the aerobic zones end is directed toward the anoxic zone.

2.2. WWTP Modeling

The Benchmark Simulation Model (BSM1), developed within the framework of COST Actions 624 and 682 [2], has been adapted to represent the Girona WWTP (see Figure 1).
Figure 1. Girona Wastewater Treatment Plant.
Figure 1. Girona Wastewater Treatment Plant.
Sensors 22 06008 g001
The Activated Sludge Model No. 1 (ASM1) describes the biological phenomena that takes place in the biological reactors, and it is supposed that no biological reactions take place in the settlers. Due to the complexity of the nonlinear model describing the different complex processes in the plant, various reduced models have been proposed in the literature [13,14,15] to aid in the online implementation of certain modern control schemes (e.g., MPC), which would have otherwise presented ill-conditioned or stiff numerical problems due to slow and fast dynamic interactions. In [15,16], one can see some successful implementations using reduced WWTP models in various areas of control applied to WWTPs. The reduced model as suggested in [14], which primarily involves certain simplification criteria for a reduced order of the rigorous high dimensional WWTP model, has been adapted to conditions representing the Girona WWTP. This basically involves the derivation of the reactor model based on mass balances of the wastewater species, which are generally expressed as follows:
A c c u m u l a t i o n = I n f l o w O u t f l o w + R e a c t i o n
Validation of the reduced model considering data from the ASM1 and the reduced model has been undertaken in [14]. In simplifying the complex model, a systematic reduction process of the high-dimensional model considers some assumptions, with the principal conditions given as follows:
  • The soluble ( S S ) and particulate ( X S ) organic compounds are aggregated as a single variable X C O D , the chemical oxigen demand (COD).
  • Through reduction by time scale from the theory of singular pertubation, the slow dynamics of the variables X I , X B H and X B A together with the soluble inert organic compounds ( S I ) are excluded.
  • Finally, simplification of complicated kinetic process, assumption of no alkalinity and separation of aerobic and anoxic conditions are considered.
Under these conditions, the resultant state variables of the reduced model are therefore the chemical oxygen demand ( X C O D ), the dissolved oxygen concentration, ( S O ), heterotrophic biomass, X B H , ammonia concentration ( S N H ), nitrate concentration ( S N O ) and autotrophic biomass ( X B A ). The control of oxygen concentration ( S 0 ) in the aerobic tanks is via the manipulation of the control input, the oxygen transfer coefficient K L a ( t ) .
The states and input vectors are thus given as:
x ( t ) = X C O D ( t ) , S O ( t ) , X B H ( t ) , S N H ( t ) , S N O ( t ) , X B A ( t ) T
u ( t ) = K L a ( t )
The WWTP process is therefore described by the following dynamic equations of the reduced model:
X ˙ C O D ( t ) = 1 Y h θ 1 ( t ) + θ 2 ( t ) + 1 f p θ 4 ( t ) + θ 5 ( t ) + ϑ 1 ( t ) ,
S ˙ O ( t ) = Y h 1 Y h θ 1 ( t ) + Y a 4.57 Y a θ 3 ( t ) + ϑ 2 ( t ) ,
S ˙ N H ( t ) = i x b θ 1 ( t ) + θ 2 ( t ) i x b + 1 Y a θ 3 ( t ) + i x b f p i x p θ 4 ( t ) + θ 5 ( t ) + ϑ 3 ( t ) ,
S ˙ N O ( t ) = Y h 1 2.86 Y h θ 2 ( t ) + 1 Y a θ 3 ( t ) + ϑ 4 ( t ) ,
X ˙ B H ( t ) = θ 1 ( t ) + θ 2 ( t ) θ 4 ( t ) + ϑ 5 ( t ) ,
X ˙ B A ( t ) = θ 3 ( t ) θ 5 ( t ) + ϑ 6 ( t ) .
where
θ 1 ( t ) = μ h X C O D ( t ) K C O D + X C O D ( t ) S O ( t ) K O H + S O ( t ) X B H ( t ) θ 2 ( t ) = μ h η N O g X C O D ( t ) K C O D + X C O D ( t ) S N O ( t ) K N O + S N O ( t ) K O H K O H + S O ( t ) X B H ( t ) θ 3 ( t ) = μ a S N H ( t ) K N H , A + S N H ( t ) S O ( t ) K O , A + S O ( t ) X B A ( t ) θ 4 ( t ) = b H X B H ( t ) θ 5 ( t ) = b A X B A ( t )
With the flow rate given as Q i n ( t ) , V o as the volume of the aerobic tank and considering that S 0 i n ( t ) , S N O i n ( t ) , X B A i n ( t ) are equal to zero. ϑ 1 ( t ) , ϑ 2 ( t ) , , ϑ 6 ( t ) are given as follows:
ϑ 1 ( t ) = Q i n ( t ) V o X C O D i n ( t ) X C O D ( t ) ϑ 2 ( t ) = Q i n ( t ) V o S O ( t ) + K L a ( t ) S O s a t S O ( t ) ϑ 3 ( t ) = Q i n ( t ) V o S N H i n ( t ) S N H ( t ) ϑ 4 ( t ) = Q i n ( t ) V o S N O ( t ) ϑ 5 ( t ) = Q i n ( t ) V o X B H i n ( t ) f w ( 1 + f r ) f r + f w X B H ( t ) ϑ 6 ( t ) = Q i n ( t ) V o X B A ( t ) f w ( 1 + f r ) f r + f w X B A ( t )
where Y H , Y A , f r , f w , b h , b A , i x b , and f p are the stoichiometric parameters and μ h , K C O D , K O H , μ a , K N H , A , and K O , A are the kinetic parameters.
Figure 2. Layout of Girona WWTP.
Figure 2. Layout of Girona WWTP.
Sensors 22 06008 g002

2.3. LPV Representation of the WWTP

For ease of computational burden, the nonlinear reduced model is represented in a LPV form which involves the embedding of nonlinearities in varying parameters, resulting in a linear representation in state space. This procedure offers benefits when applied to MPC over its nonlinear MPC [15] and linear MPC [17] counterparts as applied on the WWTP by providing a faster run time and the avoidance of numerical problems with respect to the former and the ability to operate in a wide range of operating points with regard to the latter. The nonlinear model in this case is defined by linear systems at each time instance based on some time-varying parameters σ ( t ) R n σ , with an assumption that the parameters σ ( t ) are not known a priori but can be measured or estimated online [18]. The dynamic behavior of the LPV model is therefore described as:
x ˙ ( t ) = A ( σ ( t ) ) x ( t ) + B ( σ ( t ) ) u ( t )
y ( t ) = C ( σ ( t ) ) x ( t ) + D ( σ ( t ) ) u ( t )
where x ( t ) R n x and u ( t ) R n u are the states and inputs, respectively, with y ( t ) R n y as the measured signals. A ( σ ( t ) ) , B ( σ ( t ) ) , C ( σ ( t ) ) and D ( σ ( t ) ) are time-varying matrices of appropriate dimensions that are affine in σ ( t ) R n σ . In the quasi LPV case, the scheduling parameters are dependent on measured signals, y s ( t ) R k y ( t ) R n y , such that
σ ( t ) = f ( y s ( t ) )
where f : R k R n σ is a continuous mapping [19]. With observed states and exogenous inputs ( w ( t ) ), nonlinearities involving the system states can be “hidden” in the varying parameters, σ ( t , y s ( t ) , w ( t ) ) .
Therefore, from the generic nonlinear form
x ˙ ( t ) = f ( x ( t ) , u ( t ) , w ( t ) ) y ( t ) = g ( x ( t ) , u ( t ) )
a linear quadruple ( A ( σ ( t , y s ( t ) , w ( t ) ) ) , B ( σ ( t , y s ( t ) , w ( t ) ) ) , C ( σ ( t , y s ( t ) , w ( t ) ) ) , a n d   D ( σ ( t , y s ( t ) , w ( t ) ) ) estimate is formulated and incorporated into the EMPC for a convex optimization problem. In the following, the function σ ( t , y s ( t ) , w ( t ) ) ) will simply be represented as σ ( t ) . The choice of scheduling parameters considering the origin of nonlinearities in the reduced model (1) are
σ 1 ( t ) = Q i n ( t ) , σ 2 ( t ) = X C O D ( t ) K C O D + X C O D ( t ) X B H ( t ) K O H + S O ( t ) , σ 3 ( t ) = X C O D ( t ) K C O D + X C O D ( t ) S N O ( t ) K N O + S N O ( t ) K O H K O H + S O ( t ) , σ 4 ( t ) = 1 K O A + S O ( t ) S N H ( t ) K N H + S N H ( t ) X B H ( t ) , σ 5 ( t ) = S O ( t ) .
The dynamic LPV model is thus given as:
x ˙ = A ( σ ( t ) ) x ( t ) + B ( σ ( t ) ) u ( t ) + E w ( t ) .
with the time-varying matrices, A ( σ ( t ) ) , B ( σ ( t ) ) , and time-invariant disturbance matrix E as:
A ( σ ( t ) ) = a 11 ( t ) 0 0 0 a 15 ( t ) a 16 0 a 22 ( t ) 0 0 a 25 ( t ) 0 0 a 32 ( t ) 0 0 a 35 ( t ) a 36 0 a 42 ( t ) 0 0 a 45 ( t ) 0 0 0 0 0 a 55 ( t ) 0 0 a 62 ( t ) 0 0 0 a 66 ( t ) ,
B ( σ ( t ) ) = 0 b 12 ( t ) 0 0 0 0   and   E = 1 V O 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 .
where
a 11 ( t ) = σ 1 ( t ) V o , a 15 ( t ) = μ h Y h σ 2 ( t ) + 1 f p b h μ h η N O g Y h σ 3 ( t ) , a 16 = 1 f p b a , a 22 ( t ) = σ 1 ( t ) V O 4.57 Y a Y a μ a σ 4 ( t ) , a 25 ( t ) = Y h 1 Y h μ h σ 2 ( t ) a 32 ( t ) = i x b + 1 Y a μ a σ 4 ( t ) , a 35 ( t ) = i x b f p i x p b h i x b μ h σ 2 ( t ) i x b μ h σ 3 ( t ) , a 36 = i x b f p i x b b a , a 42 ( t ) = 1 Y a μ a σ 4 ( t ) , a 45 ( t ) = Y h 1 2.86 Y h μ h η N O g σ 3 ( t ) , a 55 ( t ) = μ h σ 2 ( t ) b h σ 1 ( t ) V O f w ( 1 + f r ) f r + f w b a , a 62 ( t ) = μ a σ 4 ( t ) , a 66 ( t ) = σ 1 ( t ) V O f w ( 1 + f r ) f r + f w 1 b a , b 12 ( t ) = S s a t σ 5 ( t ) .
The input concentrations are
w ( t ) = Q i n ( t ) X C O D i n ( t ) Q i n ( t ) S N H i n ( t ) Q i n ( t ) X B H i n ( t ) T .
Remark 1.
In this work, it is assumed that all the concentrations are measured online, but it must be noted that in practice, not all the concentrations, such as, e.g., X C O D i n can be measured.

3. EMPC of a WWTP

3.1. Operational Goals

The immediate control goal of a WWTP is to meet water quality levels established by regulators while operating efficiently by reducing operational cost. As discussed in the introduction, predictive control techniques may be used to compute strategies which achieve this goal while at the same time optimizing the system performance in terms of different operational indices. To achieve this objective, the control of dissolved oxygen concentration as well as nitrates within certain limits is necessary. The MPC presents the advantage of being a non-conservative control strategy, such that in periods of low influents, with a minimal level of pollutants, the effluent quality can be achieved by regulating the levels of S 0 and S N O below the stipulated reference point to avoid waste of energy. Subsequently, during periods of high influents levels, it is then important to meet the predefined set points to reduce pollutants, avoiding the violation of the standard effluent quality set by authorities [15]. In this work, a PI-EMPC control strategy is employed: PI designed by authors of the BSM1 for the regulation of S N O and a designed EMPC for the control of S O in the aeration tank. In the proposed LPV EMPC, the following objectives are then considered:
  • Economic costs. The main economic costs associated with WWTP are primarily due to treatment and electricity costs. Water through the WWTP involves important electricity costs in pumping stations in charge of internal and external water recirculations as well as aeration in the aerobic tanks. In our case, only the aeration energy is considered with an objective of minimizing the cost associated with supply of oxygen for controlled culture growth. The performance index is described as follows
    J e c o ( k ) = S o s a t 1800 V o K L a ( k ) kwh day .
  • DO concentration control. In order to control the S o within some bounds in the EMPC during the aeration process, slack variables are introduced in the optimization problem, which seek to penalize the dissolved oxygen states, such that they are maintained in a range to maintain effluent quality. Selecting slack variables, ( λ + > 0 and λ > 0 ) , additional terms of soft constraints (see (16c) and (16d)) and a quadratic objective index are introduced with x s p as the selected DO concentration value. The introduction of the slack variables ensures that the DO concentration varies within a boundary around x s p aided by the appropriate selection of weights in the objective function. The performance index is thus given as
    J λ ( k ) = λ ( k ) 2 2 ,
    where λ ( k ) = λ ( k ) , λ + ( k ) ) T .
  • Smooth set points for equipment conservation. The operation of WWTP and main valves and pumps usually requires smooth flow set-point variations. To obtain such a smoothing effect, the proposed MPC controller includes a third term in the objective function to penalize the control signal variation between consecutive time intervals. This term is expressed as
    J s m o ( k ) = Δ u ( k ) T W u Δ u ( k ) .
    Therefore, the performance function J considering the aforementioned control objectives has the form
    J = w 1 k = 0 H p 1 J e c o ( k ) + w 2 k = 0 H p 1 J s m o ( k ) + w 3 k = 1 H p J λ ( k ) .

3.2. Control Strategy Computation

The control strategy is determined by the computation of an optimal sequence of control actions for a prediction horizon, H p .
u ˜ k = u ( k j ) j = 0 H p 1 = u ( k 0 ) , u ( k 1 ) , , u ( k H p 1 ) .
We solve at each time instance k, the following optimal control problem with initial state obtained from measurements (or state estimation) of the dynamics WWTP model and prediction in the MPC loop with the qLPV plant model (10),
min u ˜ k J ( u ˜ k , k )
subject to
x ( i + 1 | k ) = A ( σ ( k ) ) x ( i | k ) + B ( σ ( k ) ) u ( i | k ) + E w ( i | k ) i = 0 , , H p 1 ,
x s o ( i | k ) > = x s p + λ + ( i | k ) , i = 1 , , H p ,
x s o ( i | k ) < = x s p λ ( i | k ) , i = 1 , , H p ,
u ( i | k ) U i = 0 , , H p 1 ,
x ( i | k ) X i = 1 , , H p ,
y ( i | k ) Y j = 0 , , H p ,
λ + ( i | k ) , λ ( i | k ) > = 0
where x s o is the dynamic state representing the soluble oxygen. (16c–f) are described by the box constraints:
U = u R n u u min u u max , X = x R n x x min x x max , Y = y R n y y min y y max .
which are determined from the maximum residual concentrations imposed in order to cope with the European Union effluent standards on chemical oxygen demand COD, suspended solids S S and total nitrogen T N :
C O D C O D m a x = 125 g m 3 ,
S S S S m a x = 35 g m 3 ,
T N T N m a x = 10 g m 3 .
The first control action of the sequence u ( k 0 ) is applied to the WWTP plant to obtain the system measurements and/or MHE estimated states, which are then used in the succeeding optimization problem, resulting in a recursive procedure. Not all the state variables are measured as stated earlier; the moving horizon estimator (MHE), which is the dual of the MPC controller, estimates the unmeasurable states.

4. Moving Horizon Estimation

Since some states cannot be measured online in the operation of the WWTP, a design of an estimator, in our case the MHE, is necessary for the prediction of system outputs, bearing in mind that apart from purposes of feedback control, the quasi-LPV formulation relies on information of the system states for the model construction. By solving a constrained optimization problem, the MHE utilizes a limited N-prediction horizon of past measurements through an error minimization scheme aided by information of the system model in a prediction window to estimate the system states. The optimization problem is therefore set up with the discretized plant model as:
min { x ^ ( i | k ) } i = N 0 x ^ ( N | k ) x o T P o x ^ ( N | k ) x o + i = N k ϵ ( i | ) T Q ϵ ( i | k ) + s ( i | k ) T R s ( i | k ) s . t . x ^ ( i + 1 | k ) = A ( σ ( i | k ) ) x ^ ( i | k ) + B ( σ ( i | k ) ) u ( i | k ) + E w ( i | k ) + ϵ ( i | k ) i = N , , 1 , y ( i | k ) = C x ( i | k ) + s ( i | k ) , x ^ k X .
where R = R T R n y × n y > 0 , Q = Q T R n x × n x 0 and P o = P o T R n x × n x 0 are the weighting matrices that are defined according to uncertainty levels induced respectively by the noise, disturbance and unknown initial conditions ( x o ). X bounds the estimated states. At every iteration, N sets of control inputs, { u ( i | k ) } i = N 1 R n u × N , measurements { y ( i | k ) } i = N 1 R n y × N and N sets of LPV matrices { A i } i = N 1 R ( n x × n x ) N , { B i } i = N 1 R ( n x × n u ) N are taken as inputs into the optimization problem to predict the state sequence { x ^ ( i | k ) } i = N 0 R n x × ( N + 1 ) by solving the dynamical optimization problem (18). The last element of the sequence { x ^ ( i | k ) } i = N 0 is subsequently chosen as the estimated states, the measurements and inputs are then discarded, and the procedure is repeated. The ammonia concentration ( S N H ) , nitrate concentration ( S N O ) and the soluble oxygen ( S o ) are supposedly measurable; therefore, the MHE is designed for the estimation of [ X C O D , X B H , X B A ] T as shown in Figure 3, Figure 4 and Figure 5 .

5. Simulation Results

5.1. LPV EMPC Implementation Details

To illustrate LPV EMPC approach presented in this paper, the Girona WWTP case study presented in Section 2 is used. The constituents of the influent wastewater of Girona WWTP varies during the day between the following bounds:
  • Qin (between 10,000–35,000 m 3 /d);
  • COD (between 400–650 mg/L);
  • DBO (175–225 mg/L); and
  • Nitrogen (between 40–65 mg/L).
The inflow of Girona WWTP is shown in Figure 6.
With a quasi-linear approximation of the nonlinear WWTP via the LPV representation, the constrained optimization problem (16) is solved using quadratic programming formulation using the CPLEX® solver in MATLAB® on an Intel Core i7, 8 GB of RAM PC. A sampling time of 15 min and a prediction horizon of 6 h is chosen for simulation. The process is simulated for 7 days in a Simulink environment representing the dynamics of the Girona WWTP, as shown in Figure 1.
Using the weights w i associated with the multiobjective EMPC cost function, (14) is tuned using the procedure as performed in [20,21] with the aim of maintaining the quality of the exit water at some levels within the current regulations regardless of the entry at a minimum cost.
Some control scenarios are selected to show different behaviors of the proposed scheme by altering X s p and manipulating weights w i , ideally to illustrate the different actions of aeration corresponding to different dissolved oxygen requirements for a quality effluent.

5.2. First Scenario

The first scenario consists of controlling the dissolved oxygen concentration in the exit of the biological treatment plant between the bounds ( 1.5 , 2.5 ) . Figure 7 shows the dynamics of the DO concentration (above) and its corresponding aeration energy (below). The operation of the aeration, as stated in the preceding section, corresponds to the variation of the influents during the day; therefore, the DO concentration varies between the defined bounds in relation to the amount of pollutants at each time instance in the influents, which can be inferred from Figure 6.

5.3. Second Scenario

The second scenario also consists of controlling the DO concentration between the ranges of 0.5 to 1.2 mg/L with minimum aeration energy consumption.
From Figure 8, a similar behavior of oxygen in the tanks as in the first scenario is realized with an expected less aeration energy, as less DO is required for treatment. The nitrates in the exit of the WWTP (Figure 9) range approximately between 5 and 7 mg/L.

6. Conclusions

In this paper, an LPV EMPC strategy for the control of dissolved oxygen concentration in the aerated reactors of a WWTP is proposed and applied to the Girona (Spain) case study. The proposed approach combines two improvements with respect to the existing approaches in the literature: First, differently from standard tracking MPC, the proposed EMPC strategy optimizes the economic performance of the plant instead of following some pre-established set points. Second, a reduced model of the WWTP is represented in a quasi-LPV form allowing the real-time implementation of the controller thanks to the use of quadratic programming optimization tools. If otherwise, the nonlinear model plant was used, nonlinear programming algorithms are required that usually prevent the real-time implementation because of the large computational time. Moreover, an LPV moving horizon state estimation scheme has also been proposed that allows the implementation of the LPV EMPC with the available sensors in the WWTP. The effectiveness of the proposed scheme has been illustrated in the considered case study with two scenarios aiming at keeping the DO within some bounds.
As future work, real testing in the WWTP plant will be conducted to further validate the performance of the proposed solution. Another issue to take into consideration is the application of the proposed methodology for aerobic conditions maintenance in sewer networks [22].

Author Contributions

Conceptualization, F.N., B.K. and V.P.; methodology, F.N., B.K. and V.P.; software, B.K. and J.P.; writing—original draft preparation, F.N.; writing—review and editing, F.N., B.K, V.P., J.P., J.Q. and S.d.C.; supervision, F.N., B.K and V.P. All authors have read and agreed to the published version of the manuscript.

Funding

This work has been co-financed by the Spanish State Research Agency (AEI) and the European Regional Development Fund (ERFD) through the project SaCoAV (ref. MINECO PID2020-114244RB-I00), by the European Regional Development Fund of the European Union in the framework of the ERDF Operational Program of Catalonia 2014–2020 (ref. 001-P-001643 Looming Factory), and by the DGR of Generalitat de Catalunya (SAC group ref. 2017/SGR/482).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

All the required data are included in the paper.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
ASMActive Sludge Model
ASPActive Sludge Process
BSMBenchmark Simulation Model
CODChemical Oxygen Demand
DODissolved Oxygen
EMPCEconomic Model Predictive Control
qLPVQuasi-Linear Parameter Varying
LPVLinear Parameter Varying
MHEMoving Horizon Estimator
MPCModel Predictive Control
NEMPCNonlinear Economic Model Predictive Control
NMPCNonlinear Model Predictive Control
RTOReal-Time Optimization
SSTOSteady-State Target Optimizator
WWTPWastewater Treatment Plant

References

  1. Chachuat, B.; Roche, N.; Lati, M. Long-term optimal aeration strategies for small-size alternating activated sludge treatment plants. Chem. Eng. Process. 2005, 44, 593–606. [Google Scholar] [CrossRef]
  2. Jeppsson, U.; Pons, M.N. The cost benchmark simulation model current state and future perspective. Control Eng. Pract. 2004, 12, 299–304. [Google Scholar] [CrossRef]
  3. Holenda, B.; Domokos, E.; Redey, A.; Fazakas, J. Dissolved oxygen control of the activated sludge wastewater treatment process using model predictive control. Comput. Chem. Eng. 2008, 32, 1270–1278. [Google Scholar] [CrossRef]
  4. Santin, I.; Pedret, C.; Vilanova, R. Fuzzy control and model predictive control configurations for effluent violations removal in wastewater treatment plants. Control Eng. Pract. 2015, 54, 2763–2775. [Google Scholar] [CrossRef]
  5. Maciejowski, J.M. Predictive Control: With Constraints; Pearson Education: London, UK, 2002. [Google Scholar]
  6. Vega, P.; Revollar, S.; Francisco, M.; Martin, J. Integration of set point optimization techniques into nonlinear MPC for improving the operation of WWTPs. Comput. Chem. Eng. 2014, 68, 2763–2775. [Google Scholar] [CrossRef]
  7. Ostace, G.S.; Cristea, V.M.; Agachi, P. Cost reduction of the wastewater treatment plant operation by MPC based on modified ASM1 with two-step nitrification/denitrification model. Comput. Chem. Eng. 2011, 35, 2469–2479. [Google Scholar] [CrossRef]
  8. Francisco, M.; Skogestad, S.; Vega, P. Model predictive control for the self-optimized operation in wastewater treatment plants: Analysis of dynamic issues. Comput. Chem. Eng. 2015, 82, 259–272. [Google Scholar] [CrossRef]
  9. Rawlings, J.; Angeli, D.; Bates, C. Fundamentals of economic model predictive control. In Proceedings of the 51st IEEE Conference on Decision and Control, Maui, HI, USA, 10–13 December 2012; pp. 3851–3861. [Google Scholar]
  10. Nejjari, F.; Puig, V.; Quevedo, J.; Pascual, J.; de Campos, S. Economic Model Predictive Control of Aeration Systems in a Full Scale Biological Wastewater Treatment Plant. In Computer Aided Chemical Engineering (Proceedings of the 27th European Symposium on Computer Aided Process Engineering); Elsevier: Amsterdam, The Netherlands, 2017; Volume 40, pp. 1579–1584. [Google Scholar]
  11. Morato, M.M.; Normey-Rico, J.E.; Sename, O. Model predictive control design for linear parameter varying systems: A survey. Annu. Rev. Control 2020, 49, 64–80. [Google Scholar] [CrossRef]
  12. Olsson, G.; Newell, B. Wastewater Treatment Systems: Modeling, Diagnosis and Control; IWA Publishing: London, UK, 1999. [Google Scholar]
  13. Jeppsson, U.; Olsson, G. Reduced Order Models for On-Line Parameter Identification of the Activated Sludge Process. Water Sci. Technol. 1993, 28, 173–183. [Google Scholar] [CrossRef]
  14. Chachuat, B.; Roche, N.; Latifi, A. Réduction du modèle ASM 1 pour la commande optimale des petites stations d’épuration à boues activées. Rev. Des Sci. de l’eau 2003, 16, 5. [Google Scholar] [CrossRef]
  15. Revollar, S.; Vega, P.; Vilanova, R.; Francisco, M. Optimal Control of Wastewater Treatment Plants Using Economic-Oriented Model Predictive Dynamic Strategies. Appl. Sci. 2017, 7, 813. [Google Scholar] [CrossRef]
  16. Boulkroune, B.; Darouach, M.; Zasadzinski, M.; Gillé, S.; Fiorelli, D. A nonlinear observer for an activated sludge wastewater treatment process. J. Process Control 2009, 19, 1558–1565. [Google Scholar] [CrossRef]
  17. Harja, G.; Vlad, G.; Nascu, I. MPC advanced control of dissolved oxygen in an activated sludge wastewater treatment plant. In Proceedings of the 2016 IEEE International Conference on Automation, Quality and Testing, Robotics (AQTR), Cluj-Napoca, Romania, 19–21 May 2016; pp. 1–6. [Google Scholar] [CrossRef]
  18. Shamma, J.; Cloutiert, J. Gain-Scheduled Missile Autopilot Design using Linear Parameter Varying Transformation. J. Guid. Control Dyn. 1993, 16, 256–263. [Google Scholar] [CrossRef]
  19. Kwiatkowski, A.; Werner, H. Parameter reduction for LPV systems via principle components analysis. IFAC Proc. Vol. 2005, 38, 596–601. [Google Scholar] [CrossRef]
  20. Toro, R.; Ocampo-Martinez, C.; Logist, F.; Impe, J.V.; Puig, V. Tuning of Predictive Controllers for Drinking Water Networked Systems. IFAC Proc. Vol. 2011, 44, 14507–14512. [Google Scholar] [CrossRef]
  21. Ocampo-Martinez, C.; Toro, R.; Puig, V.; Van Impe, J.; Logist, F. Multi-Objective-Based Tuning of Economic Model Predictive Control of Drinking Water Transport Networks. Water 2022, 14, 1222. [Google Scholar] [CrossRef]
  22. Freire Diogo, A.; Oliveira, M.A. A preliminary numerical approach for the study of compressed air injection in inverted siphons. J. Hydraul. Eng. 2013, 139, 772–784. [Google Scholar] [CrossRef]
Figure 3. MHE estimate of oxygen demand concentration ( X C O D ) for 7 days.
Figure 3. MHE estimate of oxygen demand concentration ( X C O D ) for 7 days.
Sensors 22 06008 g003
Figure 4. MHE estimate of heterotrophic biomass ( X B H ) for 7 days.
Figure 4. MHE estimate of heterotrophic biomass ( X B H ) for 7 days.
Sensors 22 06008 g004
Figure 5. MHE estimate of autotrophic biomass ( X B A ) for 7 days.
Figure 5. MHE estimate of autotrophic biomass ( X B A ) for 7 days.
Sensors 22 06008 g005
Figure 6. WWTP inflow.
Figure 6. WWTP inflow.
Sensors 22 06008 g006
Figure 7. (Above): DO concentraton variation. (Below): Aeration flow for Scenario 1.
Figure 7. (Above): DO concentraton variation. (Below): Aeration flow for Scenario 1.
Sensors 22 06008 g007
Figure 8. (Above): DO concentration variation and (Below): Aeration flow for Scenario 2.
Figure 8. (Above): DO concentration variation and (Below): Aeration flow for Scenario 2.
Sensors 22 06008 g008
Figure 9. Nitrate concentration variation.
Figure 9. Nitrate concentration variation.
Sensors 22 06008 g009
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Nejjari, F.; Khoury, B.; Puig, V.; Quevedo, J.; Pascual, J.; de Campos, S. Economic Linear Parameter Varying Model Predictive Control of the Aeration System of a Wastewater Treatment Plant. Sensors 2022, 22, 6008. https://doi.org/10.3390/s22166008

AMA Style

Nejjari F, Khoury B, Puig V, Quevedo J, Pascual J, de Campos S. Economic Linear Parameter Varying Model Predictive Control of the Aeration System of a Wastewater Treatment Plant. Sensors. 2022; 22(16):6008. https://doi.org/10.3390/s22166008

Chicago/Turabian Style

Nejjari, Fatiha, Boutrous Khoury, Vicenç Puig, Joseba Quevedo, Josep Pascual, and Sergi de Campos. 2022. "Economic Linear Parameter Varying Model Predictive Control of the Aeration System of a Wastewater Treatment Plant" Sensors 22, no. 16: 6008. https://doi.org/10.3390/s22166008

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop