Robust State Estimation for a Nonlinear Hybrid Model of the Alternating Activated Sludge Process Using Filtered High-Gain Observers

In this paper, a robust state estimation method based on a filtered high-gain observer is developed for the alternating activated sludge process (AASP) considered as a nonlinear hybrid system. Indeed, we assume that the biodegradable substrate and the ammonia concentrations in the AASP model are unmeasured due to the high cost of their sensors whose maintenance is also very expensive. *e observer design is based on the association of the classical high-gain observer and the idea of the application of linear filters on the observation error to deal with measurement noise. It is shown through a Lyapunov analysis that the designed observer ensures the estimation of the unmeasured states (the biodegradable substrate and the ammonia concentrations) based on the measured dissolved oxygen and nitrate concentrations subject to noise. A comparison with the classical high-gain observer is performed via numerical simulations in order to show the robustness of the suggested estimation approach against Gaussian measurement noise.


Introduction
Safe water is a fundamental human need to ensure good health and hygiene. Many wastewater treatment technologies are required to provide environmental protection and ecosystem preservation. e alternating activated sludge process (AASP) [1] represents a famous biological wastewater treatment process. is process consists of two separate phases: the aeration phase where the ammonium is converted into nitrate and the anoxic phase where the nitrate is used for organic carbon removal. In order to preserve the effluent quality of water as specified by the NPDES (National Pollutant Discharge Elimination System) [2], modeling the alternating activated sludge process has attracted many scientific research studies. Indeed, different models have been proposed [3][4][5][6]. To reduce the complexity of previous models, the authors have presented, in [7], a new reduced model for the activated sludge process which can be considered as a nonlinear hybrid system. Motivated by the advantages of the latter model, we consider in this paper the problem of high-gain observer (HGO) design for a nonlinear hybrid model of the alternating activated sludge process subject to measurement noise.
Hybrid systems are characterized by the combination of both continuous and discrete dynamics and have recently attracted several research studies in both control and observation problems. Switched systems represent a special class of hybrid systems which are defined by a collection of subsystems connected by a switching rule: see reference [8] in which an overview on switched systems is developed. Moreover, in [9], various issues on the stability and design of switched systems have been presented. To analyze the stability of switched and hybrid systems, multiple Lyapunov functions have been introduced in [10]. In particular, the problem of observation of hybrid and switched systems has been investigated in the last decade. Indeed, many control and observation techniques from the literature of automatic controls such as high-gain techniques [11], sliding-mode techniques [12], and linear matrix inequality (LMI) techniques [13] have been extended and exploited to solve the problem of estimation of hybrid and switched systems. For instance, in [14], the authors have given sufficient and necessary conditions to ensure the observability of hybrid systems. In [11], a high-gain observer (HGO) is designed for a class of uniformly observable nonlinear hybrid systems. In [15], a high-order sliding-mode observer is proposed for a class of nonlinear switched systems. Moreover, the authors have proposed, in [16], a sliding-mode observer for robust fault diagnosis of switched systems with application to a DC-DC power electronic converter, through linear matrix inequalities. In [17], a sliding-mode observer is synthesized for a switched system based on the switched Lyapunov function approach with application to fault detection and reconstruction of switched power electronics systems. In addition, in [18], an unknown input observer has been developed and applied to an activated sludge process modeled as a hybrid nonlinear system. A hybrid observer has been also proposed in [19] to provide a robust fault detection approach for a linear switched system. Moreover, in [20], a hybrid sliding-mode observer has been designed to estimate conjointly states and unknown inputs for a switched system. Recently, in [21], the authors have designed an observer-based adaptive finite-time tracking control for a class of nonlinear switched systems with unmodeled dynamics. In addition, the authors [22] have developed a fuzzy logic system-based switched observer to approximate unmeasured states for a switched purefeedback nonlinear system with average dwell time. However, the observation of nonlinear switched systems is still yet an open issue, and many problems which have been solved for classical nonlinear systems may be generalized and extended to the hybrid case, and many existing estimation methods may be extended to switched systems. One of the most important observation methods which have been well developed in the literature for a class of continuous nonlinear systems is the high-gain observer-based estimation approach characterized by the easiness of its implementation and its good estimation performance. High-gain observers are designed under particular assumptions such as the triangular canonical form as well as the Lipschitz condition, and several high-gain observer structures are available in the literature. Indeed, a high-gain observer has been proposed for a large class of MIMO nonlinear systems, in [23]. In [24], the unmeasured states and the unknown inputs have been estimated by designing cascaded high-gain observers. Recently, in [25], an adaptive nonlinear high-gain observer is proposed to estimate the speed of an induction motor.
Despite the several advantages which characterize highgain observers, the main drawback of these observers consists in their high sensitivity to measurement noise. Many alternative solutions have been proposed in the literature to deal with this problem. Indeed, in order to provide good state estimation in the presence of measurement noise, authors have proposed to modify the observer gain structure by switching between high and low gain values, in [26]. A gain parameter adaptation process has been suggested in [27] to improve the performance of the high-gain observer in the presence of noise.
Recently, a robust high-gain observer including a linear filter has been suggested in [28,29]. e latter observer consists of a filtered high-gain observer (FHGO) characterized by a simple structure.
Motivated by its good estimation performances and its robustness against measurement noise, we adopt, in this paper, the filtered high-gain observer developed in [29], and we extend the procedure design to a class of nonlinear switched systems which include the activated sludge process model. Indeed, in the alternating activated sludge process, some concentrations are hardly measured in practice, due to the high cost of concentration sensors whose maintenance is also expensive. Moreover, concentration sensors are always subject to measurement noise. In this paper, we propose a filtered high-gain observer for a class of nonlinear hybrid systems subject to measurement noise and its application to the alternating activated sludge process. A Lyapunov analysis is provided to establish the convergence of the estimation errors in each mode despite the presence of measurement noise. Numerical simulations using Matlab/ Simulink software are carried out with a comparative study between the proposed filtered high-gain observer adopted in this work and the classical high-gain observer in order to validate our theoretical results and illustrate the good performances of the proposed observer in terms of state estimation and robustness against measurement noise. is paper is organized as follows: in the second section, a description of the alternating activated sludge process (AASP) and its model are presented, and then, the problem of state estimation is formulated. In Section 3, a filtered highgain observer is designed for a class of switched systems and applied to the AASP. Numerical simulations are devoted, in Section 4, to highlight the robustness and the estimation performances of the proposed observer compared to the classical high-gain observer. Finally, we conclude with some remarks. e activated sludge process presented in Figure 1 can ensure biological nitrogen removal which is very necessary to preserve the environment. e purpose of this process is to eliminate polluting components existing in the water by the action of bacteria whose activity is related to the presence of oxygen. Indeed, activated sludge is defined by sludge particles reacting with organisms (bacteria) that need oxygen to grow in aeration tanks. e alternating activated sludge process (AASP) is identified by three main components. e unique aeration tank (Vae � 0.03 m 3 ) represents the first component that is composed of an aeration surface whose role is to inject oxygen in the reactor which is very necessary to provide an aerobic phase (S O2 ≠ 0 and KLa ≠ 0) and an anoxic phase (S O2 ≃ 0 and KLa � 0). e settler which represents the second component allows the separation of activated sludge (AS) and treats wastewater. e majority of AS must be returned to the aeration tank to guarantee a high number of organisms. is function is provided by the return activated sludge which represents the third component. It is to be noticed that the waste activated sludge must be eliminated from the system and the purified water should be delivered to natural water. e AASP is characterized by two phases: firstly, an aerobic phase (aeration period) is active, where a high quantity of air is added in the reactor to provide oxygen and convert ammonium to nitrate. When the oxygen is exhausted and the aerobic phase (nitrification) is finished, the anoxic phase (denitrification) is started. During the anoxic phase, a source of carbon is added to convert nitrate into nitrogen. At the moment when aeration is restarted, the oxygen concentration is different to zero, and a new aerobic phase is started.

Model of the Alternating Activated Sludge Process.
e reduced state model of the activated sludge process suggested by [7] is constituted by four states: S s is the biodegradable substrate, S NO3 is the nitrate concentration, S NH4 is the ammonia concentration, and S O2 is the dissolved oxygen concentration. e latter model is given by the following equations: is model is characterized by the following input variables: the concentration of substrate soluble in water S sin and the ammonia input concentration S NH4in . e alternating phase operation is ensured by the oxygen transfer coefficient KLa which is characterized by a high value during the aerobic phase and a near zero value during the anoxic phase. S sc is the concentration of the external source of carbon. e mathematical expressions of Υ 1 , Υ 2 , . . . , Υ 5 are presented in the following equations:  Table 1 in Section 4.

Problem Statement.
In this paper, we investigate the problem of estimation of the unmeasured states of the alternating activated sludge process model despite the presence of measurement noise. To that end, we present first a general class of nonlinear hybrid systems subject to measurement noise for which the problem of robust estimation will be addressed, and then, we show that the considered class of hybrid systems includes the considered activated sludge process with its two modes (the aerobic phase and the anoxic phase).

A General Class of Nonlinear Hybrid Systems.
We consider the following class of nonlinear hybrid systems which constitutes an extension of the class of nonlinear continuous systems considered in reference [30] to the hybrid case: k � 1, . . . , q r and p r � n r 1 ≥ n r 2 · · · ≥ n r q r , q r k�1 n r k � n r , y r ∈ R p r is the output, the input u ∈ U a compact subset of R n , g r (u, x r ) ∈ R n r with g r k ∈ R n r k , and w(t) is the output noise. e piecewise constant function is designed to characterize switched systems: σ: where τ i is a monotone nondecreasing finite sequence of time points. We assume that each subsystem is uniformly observable. In addition, it is assumed that there exists a diffeomorphism on the interval . . , L n r −1 g r (x r )] that transforms system (3) into the following form which represents an extension of a similar form presented in [30] to the hybrid case: where L g r (x r ) is the Lie derivative of h r (x r ) in the direction of g r (x r ) and z r ∈ R n r is the state. e matrices A r and C r are as follows: For the high-gain observer design in the presence of measurement noise, we make the following assumptions: Assumption 1: the state x r (t) and the input u(t) are uniformly bounded. Assumption 2: the unknown function ε is uniformly bounded and ∃δ ε > 0; Sup t≥0 Ess‖ε(t)‖ ≤ δ ε . Assumption 3: w is a bounded noise signal and ∃δ w > 0; Sup t≥0 Ess‖w(t)‖ ≤ δ w . Assumption 4: ∀k ∈ 1, . . . , q r − 1 , ∀x r ∈ R n r , ∀u ∈ U: ∃α, β > 0 such that Assumption 5: the evolution duration of each subsystem of system (3) is known. Assumption 6: the dwell time (τ i+1 − τ i ) > τ min with τ min is a positive real and i ∈ π � 1, 2, . . . , M { }.
Remark 1. Note that Assumption 5 means that we do not consider systems with the Zeno phenomenon. Furthermore, when the duration of evolution τ i of each system is measurable, the instability due to τ i is excluded. On the other hand, it is to be noticed that Assumption 6 means that the dwell time which represents the duration between two switches should be sufficient to ensure the perfect convergence of the synthesized observer to the real system before a new switch [11].

e Alternating Activated Sludge Process Modeled as a Nonlinear Hybrid System.
In this section, we show that the AASP (2) may be written in the form of the nonlinear hybrid system (3). Indeed, the studied process is composed by two subsystems: r ∈ 1, 2 { }. In fact, when KLa ≠ 0 and S O2 ≠ 0, r � 1: the aerobic phase is active. When KLa � 0 and S O2 near zero, r � 2: the anoxic phase is active. Refer to reference [31] where we have also considered a nonlinear hybrid model of the alternating activated sludge process.
(1) Aerobic Phase. During this phase r � 1, the state vector is where e output vector, (2) Anoxic Phase. During anoxic phase r � 2, the state vector is where g 2 1 (u,

A Filtered High-Gain Observer (FHGO)
In this section, we propose a filtered high-gain observer for the general nonlinear hybrid system (3), and we apply it to the considered alternating activated sludge process (2) considered in this work. To that end, we anticipate our procedure design by applying an appropriate state transformation to the considered nonlinear hybrid system (3) similar to that used in reference [29].

State Transformation.
Proceeding as in [29], the change of coordinates is given by As shown in [30], it may be established that the transformation Φ r transforms system (3) in the following structure: with φ r k (u, z r ) ∈ R n r 1 , k � 1, . . . , q r , A r and C r are given, respectively, by (5) and (6). In the sequel, we rather focus on the transformed nonlinear hybrid system described by equation (12).

A Filtered High-Gain Observer for Nonlinear Hybrid Systems.
A filtered high-gain observer for the obtained class of nonlinear hybrid systems given by (12) is now introduced. e observer design is based on the combination of the highgain observer design procedure in the measurement-free noise case developed in [30] for a class of nonlinear continuous systems in the triangular canonical form and the design procedure of FHGO in the presence of noisy measurements proposed in [29]. In addition, we suggest an extension of the above design procedures to the class of nonlinear hybrid systems (3) which include the alternated activated sludge process (2) considered in this paper. e filtered high-gain observer that we propose provides the estimation of unmeasured states in each mode despite the presence of measurement noise.
For the observer design, we require the following additional assumption: Assumption 7: ϕ r (u, ϕ c (z r )) and φ r (z r , u) are globally Lipschitz with respect to z r uniformly in u. ϕ c (z r ) is the converse of ϕ r .
Before defining the candidate observer, we introduce the following notations: Λ r (x r , u) is the bloc diagonal matrix defined by (Λ r ) + represents the left inverse of Λ r , and K r � diag C 1 n r , . . . , C n r n r , (15) with C k n r � ((n r !)/((n r − k)!k!)), k � 1, . . . , n r . Let where θ is a positive real.

(21)
It is easy to check that From (22) and seeing the commutation of K r and Δ θ with each other, one has where e r (t) � θ n r − 1 Δ θ e r (t). Furthermore, using (22), one gets � −2θe r (t) + θ A r T e r (t) + θ C r T C r z r − θ n r C r T w(t).

(24)
Now, equations (23) and (24) can be assembled in a compact form as follows: where Z r � z r e r . Let V r (Z r ) � (Z r ) T PZ r be the Lyapunov function with P being symmetric positive definite matrix. One gets

Mathematical Problems in Engineering
We note that thanks to the triangular structure of φ r , we have Similarly, taking into consideration the triangular structure of (zϕ r /zx r )(u, ϕ c (z r )), we can show that Finally, Γ r is lower triangular with zeros on the main diagonal; then, one obtains with K i � C k n r � ((n r !)/((n r − k)!k!)), k � 1, . . . , n r and ‖e r (t)‖ ≤ ‖Z r ‖. Using (27)-(29), we have Now, we choose θ such that −2μθ + 2λ M (Υ n r i�1 or equivalently, Using the comparison lemma, it arises that is yields to Next, set Z r (t) � z r e r . One has for θ ≥ 1 and for all t ≥ 0‖Z r (t))‖ ≤ ‖(Z r (t))‖ ≤ θ n r − 1 ‖Z r (t))‖. So we have which completes the proof. □ Remark 2. e designed filtered high-gain observer (FHGO) for a class of switched systems represents an extension of the FHGO which has been recently developed in references [28,29] for a class of nonlinear systems in the canonical form of observability and having a triangular structure. Indeed, we rather consider in our paper a more general class of nonlinear switched systems subject to measurement noise, which enlarges the applicability of our proposed robust estimation approach. e main disadvantage of the FHGO scheme consists in the fact that it requires the resolution of (n + m) ordinary differential equations (ODE) instead of only n ODE for the standard HGO. Such drawback can restrict the application of the FHGO to the relatively fast plants which need a high sampling rate. e filtered high-gain observer used in this paper may be compared with the work in [29] where a FHGO has been designed for a class of uncertain nonlinear systems with sampled outputs to overcome the latter hindrance. Extending our work to the case of filtered continuous-discrete high-gain observer design when a weak and a variable sampling of the output measurement can be used is one of our main interests in the future works.

Observer Design in the Original Coordinates.
Proceeding as in references [29,30], the proposed observer (18) can be written in the original coordinates x r as follows: Now, our main objective is to apply the proposed filtered high-gain observer to the considered alternating activated sludge process (2). According to the corresponding model (1), the whole observer is composed by two-alternated-FHGO scheme as follows: For r � 1 (aerobic phase), x 1 1 � S NO3 S O2 ∈ R 2 is the measured states vector and x 1 2 �

S s S NH4
∈ R 2 is unmeasured states vector. In this case, we have with On the other hand, for r � 2 (anoxic phase), x 2 1 � S NO3 ∈ R is the measured state. x 2 2 � S NH4 and x 2 3 � S s are the unmeasured states. So, one obtains Mathematical Problems in Engineering 9 with dg 2 1 u, We recall that, for r � 1 (KLa ≠ 0, S O2 ≠ 0), the aerobic phase is active, and for r � 2 (KLa � 0, S O2 ≃0), the anoxic phase is active.

Remark 3.
e problem of adaptive and robust observer design for switched systems remains an open research field to be explored. Indeed, many existing estimation methods which have been designed in the literature for classical continuous linear and nonlinear systems may be extended and generalized for hybrid systems and in particular for switched system. For instance, the robust and efficient estimation approach based on terminal sliding-mode observers may be extended to switched systems. Indeed, terminal sliding-mode observers have very interesting finitetime convergence properties. We report for instance the recent reference [32] in which the authors have designed an adaptive terminal sliding-mode observer to compensate for mismatched uncertainties of a class of nonlinear systems.

Numerical Simulations
Numerical simulations are dedicated to highlight the good state estimation performances and the robustness of the proposed observer against measurement noise compared to the classical high-gain observer. For both phases, the input signal u(t) � (S sc , S sin , S NH4in ) T � (1600, 200, 70) T . e initial value of the activated sludge process state is fixed as x(0) � 0.3 0 10 5.3 T . e initial estimated states for the classical high-gain observer and the proposed filtered highgain observer are chosen as x(0) � 0.3 0 12 5.7 T . θ is set to 12. e outputs are corrupted by a Gaussian noise with a 0.02 variance value. e different parameters of the ASP model are defined in Table 1.
Numerical simulations are carried out using Matlab/ Simulink software. e state estimation provided by the classical HGO and the proposed FHGO observers is illustrated in Figures 2-5. It is shown that the proposed filtered high-gain observer provides better performances in terms of state estimation and robustness against measurement noise compared to the classical one. Indeed, Figures 2 and 3 prove that the biodegradable substrate S s and the ammonia concentration S NH4 are quite estimated by the filtered high-gain observer despite the presence of measurement noise, whereas the estimation performances are degraded when using the classical high-gain observer.
In order to further illustrate the robustness properties of the adopted FHGO in this paper, additional simulations are carried out in a more realistic scenario where the considered AASP system is simultaneously corrupted by an unknown input ε(t) in its dynamics and measurement noise w(t) in the output equations. We notice that the unknown input ε(t) may include disturbances and modeling uncertainties. For simulations, we assume that the unknown input consists of a disturbance signal ε(t) � 50 sin(20πt), and the measurement noise w(t) is a Gaussian noise with a 0.02 variance value. In addition, we select the high-gain design parameter as θ � 12. To emphasize the robustness properties of the adopted estimation approach, we simulate simultaneously the proposed FHGO and the classical HGO for the AASP system. e simulation results are given in Figures 6 and 7.
It is shown in Figures 6 and 7 that the adopted FHGO is able to estimate perfectly the unmeasured biodegradable concentration S s and the unmeasured ammonia concentration S NH4 despite the presence of disturbances in the dynamics and the presence of Gaussian measurement noise, contrary to the case of the classical HGO where we observe a degradation on the estimation performances as illustrated in Figures 6 and 7. Indeed, it is well known that the main disadvantage of the classical HGO consists in its high sensitivity to measurement noise. Moreover, it is to be noticed that when designing a classical HGO, in practice, it is very difficult to find an optimal choice of the design parameter θ to reject simultaneously the effect of the disturbance ε(t) and the measurement noise w(t). To overcome the drawbacks of the classical HGO, the proposed FHGO in this paper allows to reduce the sensitivity to measurement noise thanks to the idea of applying linear filters on the observation error while keeping its ability to compensate for disturbances present in the dynamics of the nonlinear system by choosing sufficiently high values of the design parameter θ. e latter properties have been clearly shown in Figures 6 and 7 where we illustrate the superiority of the proposed FHGO compared to the classical HGO in terms of robustness against disturbances and measurement noise.

Conclusion
In this paper, we have designed a filtered high-gain observer (FHGO) for a class of nonlinear hybrid systems in order to solve simultaneously the problems of the high cost of reliable sensors and the high sensitivity to measurement noise. e proposed estimation method was applied to the alternating activated sludge plant model where we have shown that a quite estimation of the ammonia concentration and the biodegradable substrate is achieved when only the noisy dissolved oxygen and nitrate concentrations are used. e simulation results show clearly the filtering capabilities of the FHGO that inhibits the noise amplification in the estimation of unavailable state variable (such aspect is known as the main hindrance for the standard HGO). Extending our work to the case of continuous-discrete HGO where outputs are only available at the sampling time represents one of our main interests in the future works.

Notation
‖ · ‖: Euclidean norm 0 j×k : Null matrix with j rows and k columns I n r 1 : Identity matrix with n r 1 × n r 1 dimension 0 n r 1 : n r 1 × n r 1 null matrix I n r k+1 : n r k+1 × n r k+1 identity matrix.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e authors declare that they have no conflicts of interest.