4. Advanced control solutions for the activated sludge bioprocess

In the following sections, some advanced control solutions are proposed in order to be implemented at level 2 of the DCS-WTP Calafat. More precisely, multivariable adaptive and robust control algorithms are proposed for the activated sludge process that takes place at WTP Calafat. The main control objective at this level is to maintain the pollution level at a desired low value despite the load and concentration variations of the pollutant. The controlled variables are the concentrations of pollutant and dissolved oxygen inside the aerator. Therefore, some of the control loops described in the previous section will be used, and other loops will be modified. The simulations performed in realistic conditions and using an adapted model of the activated sludge process showed that the performance of the overall control system can be increased. The implementation of the proposed control algorithms at WTP Calafat will be ensured within the research project TISIPRO [19].

#### 4.1. Dynamical model of the activated sludge bioprocess and control objective

The activated sludge process which works at WTP Calafat is an aerobic process of biological wastewater treatment. As it was mentioned above, this process is operated in at least two interconnected tanks: a bioreactor (aerator) in which the biodegradation of the pollutants takes place and a sedimentation tank (settler) in which the liquid is clarified (the biomass is separated from the treated wastewater) (Figure 8). This bioprocess is very complex, highly nonlinear, and characterized by parametric uncertainties. In the literature there are many models that try to describe the activated sludge processes. The best-known model is ASM1 (Activated Sludge Model No. 1) [3, 10–12]. The main drawback of ASM1 is its complexity, such that it becomes unusable in control issues. Thus, in this chapter a simplified model of a process

with <sup>ξ</sup><sup>∈</sup> <sup>ℜ</sup><sup>n</sup>, <sup>ϕ</sup>ð Þ� <sup>∈</sup> <sup>ℜ</sup><sup>m</sup>, <sup>K</sup> <sup>∈</sup> <sup>ℜ</sup><sup>n</sup>�<sup>m</sup>, <sup>D</sup> <sup>∈</sup> <sup>ℜ</sup><sup>n</sup>�<sup>n</sup>, and <sup>v</sup> <sup>∈</sup> <sup>ℜ</sup><sup>n</sup>. The nonlinear character of model (2) is

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions

The main control objective is to maintain the pollution level at a desired low value despite the load and concentration variations of the pollutant. Because in any aerobic fermentation a proper aeration is essential in order to obtain an efficient process, then an adequate control of dissolved oxygen concentration in aerator is very important [3, 8, 11]. Thus, the controlled variables are concentrations of pollutant S and dissolved oxygen O inside the aerator, that is, <sup>y</sup> <sup>¼</sup> ½ � S O <sup>T</sup>. As control inputs we chose the dilution rate <sup>D</sup> and the aeration rate FO, that is,

inputs and two outputs [12]. Since in model (1) the relative degrees [20] of both controlled

, <sup>θ</sup> <sup>¼</sup> <sup>μ</sup>X, Bð Þ¼ <sup>ξ</sup>

The matrix Bð Þ ξ is nonsingular and so invertible as long as Sin � ð Þ 1 þ r S and αð Þ Osat � O are

S tð Þ KS <sup>þ</sup> S tð Þ � O tð Þ

where μmax is the maximum specific growth rate of microorganisms and KS and KO are the

Consequently, based on the input-output model (4), the main control objective is to make output y to asymptotically track some desired trajectories denoted y<sup>∗</sup> ∈ ℜ<sup>2</sup> despite any influent pollutant variation and uncertainty and time-varying of some process parameters and also of

Firstly, we consider the ideal case where maximum prior knowledge concerning the process is available; that is, model (2) is completely known (i.e., μ is assumed completely known and all the state variables, and all the inflow rates are available by online measurements). Then, a multivariable decoupling exact feedback linearizing control law can be designed. Since the relative degree of the input-output model (4) is equal to 1, then for the closed loop system, we impose

different from zero, conditions that are satisfied in a normal operation of the reactor. We consider that the specific growth rate μ is a double Monod-type model, i.e., [8]

variables S and O are equal to one, then the dynamic of output y can be written as

�K0=Y

μðÞ¼ t μmax

saturation constants for substrate S and for oxygen, respectively.

the following first-order linear stable dynamical behavior:

<sup>T</sup>. So, we have a multivariable control problem of a squared process with two

<sup>y</sup>\_ <sup>¼</sup> <sup>Ψ</sup>ð Þþ <sup>ξ</sup> <sup>Φ</sup><sup>T</sup>ð Þ <sup>ξ</sup> <sup>θ</sup> <sup>þ</sup> <sup>B</sup>ð Þ <sup>ξ</sup> u, (4)

Sin � ð Þ 1 þ r S 0 Oin � ð Þ 1 þ r O αð Þ Osat � O (5)

http://dx.doi.org/10.5772/intechopen.74827

165

KO <sup>þ</sup> O tð Þ (6)

given by the reaction kinetics, its modeling being the most difficult task.

u ¼ ½ � D FO

where <sup>Ψ</sup>ð Þ <sup>ξ</sup> , <sup>Φ</sup><sup>T</sup>ð Þ <sup>ξ</sup> , <sup>θ</sup>, and <sup>B</sup>ð Þ <sup>ξ</sup> are given by.

, <sup>Φ</sup><sup>T</sup>ð Þ¼ <sup>ξ</sup> �1=<sup>Y</sup>

Model (4) is linear with respect to control input u(t).

<sup>Ψ</sup>ð Þ¼ <sup>ξ</sup> ð Þ� <sup>1</sup>=<sup>Y</sup> <sup>μ</sup>S<sup>X</sup>

ð Þ� K0=Y μSX

unavailability of some process states.

4.2.1. Exact feedback linearizing control

4.2. Control strategies

Figure 8. Schematic view of an activated sludge process.

for the removal of the pollutant S from the treated water will be used. The model is based on the model of Nejjari et al. [8], adapted for WTP Calafat. The dynamics of the plant (aerator + settler) is described by the mass balance equations [8, 9]:

$$\begin{aligned} \dot{X}(t) &= \mu(t)X - \mu\_S X - D\left(1 + r\right)X + rDX\_{\prime\prime} \\ \dot{S}(t) &= -(1/Y)\left(\mu(t)X - \mu\_S X\right) - D\left(1 + r\right)S + DS\_{\text{inv}} \\ \dot{O}(t) &= -(K\_0/Y)\left(\mu(t)X - \mu\_S X\right) - D\left(1 + r\right)O + aF\_O(O\_{\text{sat}} - O) + DO\_{\text{inv}} \\ \dot{X}\_r(t) &= (1 + r)DX - \left(r + \beta\right)DX\_{\prime\prime} \end{aligned} \tag{1}$$

where X, S, O, and Xr are the concentrations of biomass (active sludge) in the aerator, of substrate (pollutant), of dissolved oxygen, and of recycled biomass, respectively, Osat is the saturation concentration of dissolved oxygen, D=Fin/V is the dilution rate (Fin is the influent flow rate, V is the constant aerator volume), μ is the specific growth rate, μ<sup>S</sup> is the decay coefficient for biomass, Y is the consumption coefficient of substrate S, r is the rate of recycled sludge, β is the rate of removed sludge, FO is the aeration rate, and α is the oxygen transfer rate. Sin and Oin are the substrate and dissolved oxygen concentrations in influent substrate.

If we define <sup>ξ</sup> <sup>¼</sup> XSOXr ½ �<sup>T</sup> the state vector of model (1), <sup>ϕ</sup> <sup>¼</sup> <sup>μ</sup>ðÞ�� <sup>μ</sup><sup>S</sup> � �X the reaction rate, v ¼ 0 DSin DOin þ αFOOsat ½ Þ 0� <sup>T</sup> the vector of mass inflow rates and gaseous transfer rates, and <sup>K</sup> <sup>¼</sup> ½ � <sup>1</sup> � <sup>1</sup>=<sup>Y</sup> � <sup>K</sup>0=<sup>Y</sup> <sup>0</sup> <sup>T</sup> the yield vector, then model (1) can be written as

$$
\dot{\xi} = K\phi(\xi) - \overline{D}\xi + \upsilon \tag{2}
$$

where D is the matrix of dilution rates, whose structure is the next one:

$$
\overline{D} = \begin{bmatrix}
D(1+r) & 0 & 0 & -rD \\
0 & D(1+r) & 0 & 0 \\
0 & 0 & D(1+r) + aF\_O & 0 \\
\end{bmatrix}.
\tag{3}
$$

In fact, model (2) describes the dynamics of a large class of bioprocesses carried out in stirred tank reactors and is referred as general dynamic state-space model of this class of bioprocesses [3, 7], with <sup>ξ</sup><sup>∈</sup> <sup>ℜ</sup><sup>n</sup>, <sup>ϕ</sup>ð Þ� <sup>∈</sup> <sup>ℜ</sup><sup>m</sup>, <sup>K</sup> <sup>∈</sup> <sup>ℜ</sup><sup>n</sup>�<sup>m</sup>, <sup>D</sup> <sup>∈</sup> <sup>ℜ</sup><sup>n</sup>�<sup>n</sup>, and <sup>v</sup> <sup>∈</sup> <sup>ℜ</sup><sup>n</sup>. The nonlinear character of model (2) is given by the reaction kinetics, its modeling being the most difficult task.

The main control objective is to maintain the pollution level at a desired low value despite the load and concentration variations of the pollutant. Because in any aerobic fermentation a proper aeration is essential in order to obtain an efficient process, then an adequate control of dissolved oxygen concentration in aerator is very important [3, 8, 11]. Thus, the controlled variables are concentrations of pollutant S and dissolved oxygen O inside the aerator, that is, <sup>y</sup> <sup>¼</sup> ½ � S O <sup>T</sup>. As control inputs we chose the dilution rate <sup>D</sup> and the aeration rate FO, that is, u ¼ ½ � D FO <sup>T</sup>. So, we have a multivariable control problem of a squared process with two inputs and two outputs [12]. Since in model (1) the relative degrees [20] of both controlled variables S and O are equal to one, then the dynamic of output y can be written as

$$\dot{y} = \Psi(\xi) + \Phi^T(\xi)\,\theta + \mathcal{B}(\xi)\,\mu,\tag{4}$$

where <sup>Ψ</sup>ð Þ <sup>ξ</sup> , <sup>Φ</sup><sup>T</sup>ð Þ <sup>ξ</sup> , <sup>θ</sup>, and <sup>B</sup>ð Þ <sup>ξ</sup> are given by.

for the removal of the pollutant S from the treated water will be used. The model is based on the model of Nejjari et al. [8], adapted for WTP Calafat. The dynamics of the plant (aerator +

O t \_ ðÞ¼�ð Þ <sup>K</sup>0=<sup>Y</sup> <sup>μ</sup>ð Þ<sup>t</sup> <sup>X</sup> � <sup>μ</sup>S<sup>X</sup> � � � <sup>D</sup>ð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> <sup>O</sup> <sup>þ</sup> <sup>α</sup>FOð Þþ Osat � <sup>O</sup> DOin,

where X, S, O, and Xr are the concentrations of biomass (active sludge) in the aerator, of substrate (pollutant), of dissolved oxygen, and of recycled biomass, respectively, Osat is the saturation concentration of dissolved oxygen, D=Fin/V is the dilution rate (Fin is the influent flow rate, V is the constant aerator volume), μ is the specific growth rate, μ<sup>S</sup> is the decay coefficient for biomass, Y is the consumption coefficient of substrate S, r is the rate of recycled sludge, β is the rate of removed sludge, FO is the aeration rate, and α is the oxygen transfer rate. Sin and Oin are the substrate and dissolved oxygen concentrations in influent substrate.

(1)

� �X the reaction rate,

: (3)

<sup>T</sup> the vector of mass inflow rates and gaseous transfer rates,

<sup>ξ</sup>\_ <sup>¼</sup> <sup>K</sup>ϕ ξð Þ� <sup>D</sup><sup>ξ</sup> <sup>þ</sup> <sup>v</sup> (2)

settler) is described by the mass balance equations [8, 9]:

Figure 8. Schematic view of an activated sludge process.

<sup>X</sup>\_ <sup>r</sup>ðÞ¼ <sup>t</sup> ð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> DX � <sup>r</sup> <sup>þ</sup> <sup>β</sup> � �D Xr,

S t

164 Wastewater and Water Quality

v ¼ 0 DSin DOin þ αFOOsat ½ Þ 0�

D ¼

X t \_ ðÞ¼ <sup>μ</sup>ð Þ<sup>t</sup> <sup>X</sup> � <sup>μ</sup>S<sup>X</sup> � <sup>D</sup>ð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> <sup>X</sup> <sup>þ</sup> rDXr,

\_ðÞ¼�ð Þ <sup>1</sup>=<sup>Y</sup> <sup>μ</sup>ð Þ<sup>t</sup> <sup>X</sup> � <sup>μ</sup>S<sup>X</sup> � � � <sup>D</sup>ð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> <sup>S</sup> <sup>þ</sup> D Sin,

If we define <sup>ξ</sup> <sup>¼</sup> XSOXr ½ �<sup>T</sup> the state vector of model (1), <sup>ϕ</sup> <sup>¼</sup> <sup>μ</sup>ðÞ�� <sup>μ</sup><sup>S</sup>

where D is the matrix of dilution rates, whose structure is the next one:

and <sup>K</sup> <sup>¼</sup> ½ � <sup>1</sup> � <sup>1</sup>=<sup>Y</sup> � <sup>K</sup>0=<sup>Y</sup> <sup>0</sup> <sup>T</sup> the yield vector, then model (1) can be written as

Dð Þ 1 þ r 0 0 �rD 0 Dð Þ 1 þ r 0 0 0 0 Dð Þþ 1 þ r αFO 0 �Dð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> 0 0 D r <sup>þ</sup> <sup>β</sup> � �

In fact, model (2) describes the dynamics of a large class of bioprocesses carried out in stirred tank reactors and is referred as general dynamic state-space model of this class of bioprocesses [3, 7],

$$\Psi(\xi) = \begin{bmatrix} (1/Y) \cdot \mu\_{\mathcal{S}} X \\ (\mathcal{K}\_0/Y) \cdot \mu\_{\mathcal{S}} X \end{bmatrix}, \Phi^\mathsf{T}(\xi) = \begin{bmatrix} -1/Y \\ -\mathcal{K}\_0/Y \end{bmatrix}, \mathcal{O} = \mu X, \mathcal{B}(\xi) = \begin{bmatrix} S\_{\text{in}} - (1+r)S & 0 \\ O\_{\text{in}} - (1+r)O & a(O\_{\text{out}} - O) \end{bmatrix} \tag{5}$$

Model (4) is linear with respect to control input u(t).

The matrix Bð Þ ξ is nonsingular and so invertible as long as Sin � ð Þ 1 þ r S and αð Þ Osat � O are different from zero, conditions that are satisfied in a normal operation of the reactor.

We consider that the specific growth rate μ is a double Monod-type model, i.e., [8]

$$
\mu(t) = \mu\_{\text{max}} \frac{\mathcal{S}(t)}{K\_{\mathcal{S}} + \mathcal{S}(t)} \cdot \frac{\mathcal{O}(t)}{K\_{\mathcal{O}} + \mathcal{O}(t)} \tag{6}
$$

where μmax is the maximum specific growth rate of microorganisms and KS and KO are the saturation constants for substrate S and for oxygen, respectively.

Consequently, based on the input-output model (4), the main control objective is to make output y to asymptotically track some desired trajectories denoted y<sup>∗</sup> ∈ ℜ<sup>2</sup> despite any influent pollutant variation and uncertainty and time-varying of some process parameters and also of unavailability of some process states.

#### 4.2. Control strategies

#### 4.2.1. Exact feedback linearizing control

Firstly, we consider the ideal case where maximum prior knowledge concerning the process is available; that is, model (2) is completely known (i.e., μ is assumed completely known and all the state variables, and all the inflow rates are available by online measurements). Then, a multivariable decoupling exact feedback linearizing control law can be designed. Since the relative degree of the input-output model (4) is equal to 1, then for the closed loop system, we impose the following first-order linear stable dynamical behavior:

$$
\Lambda \left( \dot{y}^\* - \dot{y} \right) + \Lambda \cdot \left( y^\* - y \right) = 0,\tag{7}
$$

For a good understanding, we resume here only some aspects. If in model (11) q ≤ n, states are

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions

where ζ<sup>1</sup> (dimζ<sup>1</sup> ¼ q) denotes the measured variables and ζ<sup>2</sup> (dimζ<sup>2</sup> ¼ n � q ¼ s) represents the variables that have to be estimated, and the matrices K1, K2, A11, A12, A21, A22, b1, and b2,

The observers (9) and (10) were developed under the next assumptions about model (11) [12, 15–17]: (H1) K, A(t), and b(t) are known, ∀t ≥ 0; (H2) ϕ ξð Þ ; t is unknown, ∀t ≥ 0; (H3) rank K<sup>1</sup> ¼ rank K ¼ p with p ≤ m < n; and (H4) A(t) is bounded, i.e., there exist two constant

The auxiliary variable <sup>w</sup> ð Þ dim <sup>w</sup> <sup>¼</sup> <sup>s</sup> is defined as w tðÞ¼ <sup>N</sup>ξð Þ<sup>t</sup> , with <sup>N</sup> <sup>¼</sup> ½ � <sup>N</sup>1⋮N<sup>2</sup> <sup>∈</sup> <sup>ℜ</sup><sup>s</sup>�<sup>n</sup>, where <sup>N</sup><sup>1</sup> <sup>∈</sup> <sup>ℜ</sup><sup>s</sup>�<sup>q</sup> and <sup>N</sup><sup>2</sup> <sup>∈</sup> <sup>ℜ</sup><sup>s</sup>�<sup>s</sup> checks the equation <sup>N</sup>1K<sup>1</sup> <sup>þ</sup> <sup>N</sup>2K<sup>2</sup> <sup>¼</sup> 0. If <sup>N</sup><sup>2</sup> can be arbitrarily

over, if N<sup>2</sup> is invertible, then the unmeasured states ζ<sup>2</sup> can be calculated from

<sup>2</sup> W tð ÞN<sup>2</sup> <sup>¼</sup> <sup>A</sup>22ð Þ� <sup>t</sup> <sup>K</sup>2K<sup>∗</sup>

<sup>ζ</sup> ðÞ¼ t A�

<sup>22</sup> are the corresponding partitions of A� and A<sup>þ</sup>, specified in (H4). Since in

if the next conditions hold [15]: (a) Wζ,ijð Þt ≥ 0 and ∀i 6¼ j, that is, W<sup>ζ</sup> is a Metzler matrix [22]; (b)

model (2) rank K ¼ 1, under the above conditions, let us consider the next state partitions:

which are induced on the matrices K, A, and b from model (11) the following partitions:

N<sup>2</sup> ¼ kIs, where k > 0 is a real arbitrary parameter and Is is the s-dimensional unity matrix. The stability of the observers (9) and (10) can be analyzed by using the observation error

<sup>~</sup>ζ<sup>2</sup> <sup>¼</sup> <sup>ζ</sup><sup>2</sup> � <sup>b</sup>ζ2, whose dynamics obtained from models (9) and (12) is given by ~\_

with suitable dimensions, are the corresponding partitions of K, A, and b, respectively.

ζ2ðÞ¼ t K2ϕ ξð Þþ ; t A<sup>21</sup> ζ<sup>1</sup> þ A<sup>22</sup> ζ<sup>2</sup> þ b2ð Þt , (12)

http://dx.doi.org/10.5772/intechopen.74827

167

<sup>1</sup> is a generalized pseudo-inverse of K<sup>1</sup> [15, 21]. More-

<sup>1</sup> is, the observers (9) and (10) are asymptotically stable

<sup>22</sup>ð Þ� <sup>t</sup> <sup>K</sup>2K<sup>∗</sup>

<sup>ζ</sup><sup>1</sup> <sup>¼</sup> ½ � S O <sup>T</sup> and <sup>ζ</sup><sup>2</sup> <sup>¼</sup> X Xr ½ �<sup>T</sup>: (14)

� �X,

�Dð Þ 1 þ r 0 ⋮ 0 0 0 �Dð Þ� 1 þ r αFO ⋮ 0 0 ⋯⋯⋯ ⋯⋯⋯⋯⋯⋯⋯ ⋮ ⋯⋯⋯ ⋯⋯⋯⋯⋯ 0 0 ⋮ �Dð Þ 1 þ r rD 0 0 <sup>⋮</sup> <sup>D</sup>ð Þ� <sup>1</sup> <sup>þ</sup> <sup>r</sup> D r <sup>þ</sup> <sup>β</sup> � �

1A�

ζ2ðÞ¼ t Wζð Þt

<sup>12</sup> and

,

(15)

<sup>1</sup>A12ð Þt : (13)

<sup>12</sup>ð Þt , where A<sup>þ</sup>

<sup>2</sup> ð Þ w � N1ζ<sup>1</sup> . This condition is satisfied if N<sup>2</sup> is chosen as

measured online, and then model (11) can be rewritten as [12, 15–17]:

<sup>ζ</sup>1ðÞ¼ <sup>t</sup> <sup>K</sup>1ϕ ξð Þþ ; <sup>t</sup> <sup>A</sup><sup>11</sup> <sup>ζ</sup><sup>1</sup> <sup>þ</sup> <sup>A</sup><sup>12</sup> <sup>ζ</sup><sup>2</sup> <sup>þ</sup> <sup>b</sup>1ð Þ<sup>t</sup> , \_

matrices A� and A<sup>þ</sup> such as A� ≤ A tð Þ ≤ A<sup>þ</sup> and ∀t ≥ 0.

<sup>1</sup>, where K<sup>∗</sup>

<sup>W</sup>ζðÞ¼ <sup>t</sup> <sup>N</sup>�<sup>1</sup>

<sup>ζ</sup> are Hurwitz stable matrices, with W�

� � ¼ �½ � <sup>1</sup>=<sup>Y</sup> � <sup>K</sup>0=<sup>Y</sup> <sup>⋮</sup>1 0 T, ϕ ξð Þ¼ ; <sup>t</sup> <sup>μ</sup>ð Þ� <sup>S</sup>; <sup>O</sup> <sup>μ</sup><sup>S</sup>

chosen, then <sup>N</sup><sup>1</sup> ¼ �N2K2K<sup>∗</sup>

<sup>~</sup>ζ2ð Þ<sup>t</sup> , with

W�

A<sup>þ</sup>

<sup>ζ</sup> and W<sup>þ</sup>

<sup>22</sup> and A�

<sup>K</sup> <sup>¼</sup> <sup>K</sup><sup>T</sup>

A tðÞ¼

b tðÞ¼ <sup>b</sup><sup>T</sup>

<sup>1</sup> <sup>⋮</sup>b<sup>T</sup> 2

<sup>1</sup> ⋮K<sup>T</sup> 2

A<sup>11</sup> ⋮ A<sup>12</sup> ⋯⋮⋯ A<sup>21</sup> ⋮ A<sup>22</sup>

� �<sup>T</sup> <sup>¼</sup> ½ � DSin <sup>α</sup>FOOsat <sup>þ</sup> DOin <sup>⋮</sup> 0 0 <sup>T</sup>:

w tðÞ¼ <sup>N</sup><sup>1</sup> <sup>ζ</sup>1ðÞþ <sup>t</sup> <sup>N</sup><sup>2</sup> <sup>ζ</sup>2ð Þ<sup>t</sup> as <sup>ζ</sup><sup>2</sup> <sup>¼</sup> <sup>N</sup>�<sup>1</sup>

It was proven (see [21]) that whatever K<sup>∗</sup>

<sup>12</sup> and A�

\_

where <sup>y</sup><sup>∗</sup> <sup>¼</sup> <sup>S</sup><sup>∗</sup> <sup>O</sup><sup>∗</sup> ½ �<sup>T</sup> is a desired piecewise constant output, <sup>Λ</sup> <sup>¼</sup> diagf g <sup>λ</sup><sup>i</sup> , <sup>λ</sup><sup>i</sup> <sup>&</sup>gt; 0, and <sup>i</sup> <sup>¼</sup> <sup>1</sup>, 2. Then, from models (4) and (7), one obtains a multivariable decoupling feedback linearizing control law:

$$\boldsymbol{\mu} = \boldsymbol{B}(\boldsymbol{\xi})^{-1} \left[ \boldsymbol{\Lambda} \left( \boldsymbol{y}^\* - \boldsymbol{y} \right) - \boldsymbol{\Psi}(\boldsymbol{\xi}) - \boldsymbol{\Phi}^T(\boldsymbol{\xi}) \boldsymbol{\Theta} + \dot{\boldsymbol{y}}^\* \right]. \tag{8}$$

The control law (8) leads to a linear error model described as <sup>e</sup>\_ ¼ �Λe, where <sup>e</sup> <sup>¼</sup> <sup>y</sup><sup>∗</sup> � <sup>y</sup> is the tracking error, which for λ<sup>i</sup> > 0, i ¼ 1, 2 has an exponential stable point at e ¼ 0.

This controller will be used both for developing of the adaptive and robust controllers and as benchmark, because it yields the best behavior and can be used for comparison.

#### 4.2.2. Adaptive control strategy

Since the prior knowledge concerning the process previously assumed is not realistic, we will design an adaptive control strategy under the following conditions:


Recall that the control objective is to make output y to asymptotically track some specified references y<sup>∗</sup> ∈ ℜ<sup>2</sup> despite the unknown kinetics, any time variation of Sin, Oin, and Fin and time-varying of some process parameters. Under the above conditions, an adaptive controller is obtained as follows. The unmeasured variables X and Xr can be estimated by using an appropriate form of the reaction rate-independent asymptotic observer developed in [12], described by the next equations (for details, see [12, 15–17]):

$$
\hat{\tilde{w}}\left(\hat{t}\right) = \mathcal{W}(t)\hat{w}(t) + Z(t)\zeta\_1(t) + Nb(t), \quad \hat{w}(0) = N\hat{\xi}(0) \quad \hat{\zeta}\_2(t) = N\_2^{-1}(\hat{w}(t) - N\_1\zeta\_1(t)) \tag{9}
$$

with

$$W(t) = (N\_1 A\_{12}(t) + N\_2 A\_{22}(t)) N\_2^{-1}, \quad Z(t) = N\_1 A\_{11}(t) + N\_2 A\_{21}(t) - W(t) N\_1 \tag{10}$$

This observer was developed for the following class of nonlinear models [12, 15–17]:

$$
\dot{\xi}(t) = K\phi(\xi, t) + A(t)\xi(t) + b(t), \tag{11}
$$

that can describe the dynamics of numerous bioprocesses, with <sup>x</sup><sup>∈</sup> <sup>ℜ</sup><sup>n</sup>, <sup>ϕ</sup>ð Þ� <sup>∈</sup> <sup>ℜ</sup><sup>m</sup>, <sup>K</sup> <sup>∈</sup> <sup>ℜ</sup><sup>n</sup>�<sup>m</sup>, A ∈ ℜ<sup>n</sup>�<sup>n</sup>, and b∈ ℜ<sup>n</sup>. Note that the aerobic process modeled by model (2) belongs to this class. For a good understanding, we resume here only some aspects. If in model (11) q ≤ n, states are measured online, and then model (11) can be rewritten as [12, 15–17]:

<sup>y</sup>\_<sup>∗</sup> ð Þþ � <sup>y</sup>\_ <sup>Λ</sup> � <sup>y</sup><sup>∗</sup> ð Þ¼ � <sup>y</sup> <sup>0</sup>, (7)

<sup>2</sup> w t <sup>b</sup> ð Þ� <sup>N</sup>1ζ<sup>1</sup> ð Þ ð Þ<sup>t</sup> (9)

<sup>2</sup> , ZtðÞ¼ N1A11ð Þþ t N2A21ð Þ� t W tð ÞN<sup>1</sup> (10)

<sup>ξ</sup>\_ðÞ¼ <sup>t</sup> <sup>K</sup>ϕ ξð Þþ ; <sup>t</sup> A tð Þξð Þþ <sup>t</sup> b tð Þ, (11)

<sup>u</sup> <sup>¼</sup> <sup>B</sup>ð Þ <sup>ξ</sup> �<sup>1</sup> <sup>Λ</sup> <sup>y</sup><sup>∗</sup> ð Þ� � <sup>y</sup> <sup>Ψ</sup>ð Þ� <sup>ξ</sup> <sup>Φ</sup><sup>T</sup>ð Þ <sup>ξ</sup> <sup>θ</sup> <sup>þ</sup> <sup>y</sup>\_ <sup>∗</sup> � �: (8)

where <sup>y</sup><sup>∗</sup> <sup>¼</sup> <sup>S</sup><sup>∗</sup> <sup>O</sup><sup>∗</sup> ½ �<sup>T</sup> is a desired piecewise constant output, <sup>Λ</sup> <sup>¼</sup> diagf g <sup>λ</sup><sup>i</sup> , <sup>λ</sup><sup>i</sup> <sup>&</sup>gt; 0, and <sup>i</sup> <sup>¼</sup> <sup>1</sup>, 2. Then, from models (4) and (7), one obtains a multivariable decoupling feedback linearizing control law:

The control law (8) leads to a linear error model described as <sup>e</sup>\_ ¼ �Λe, where <sup>e</sup> <sup>¼</sup> <sup>y</sup><sup>∗</sup> � <sup>y</sup> is the

This controller will be used both for developing of the adaptive and robust controllers and as

Since the prior knowledge concerning the process previously assumed is not realistic, we will

• The online available measurements are the output pollution level S; the oxygen concen-

Recall that the control objective is to make output y to asymptotically track some specified references y<sup>∗</sup> ∈ ℜ<sup>2</sup> despite the unknown kinetics, any time variation of Sin, Oin, and Fin and time-varying of some process parameters. Under the above conditions, an adaptive controller is obtained as follows. The unmeasured variables X and Xr can be estimated by using an appropriate form of the reaction rate-independent asymptotic observer developed in [12], described by the

trations Oin and O, respectively; and the influent substrate concentration Sin.

This observer was developed for the following class of nonlinear models [12, 15–17]:

that can describe the dynamics of numerous bioprocesses, with <sup>x</sup><sup>∈</sup> <sup>ℜ</sup><sup>n</sup>, <sup>ϕ</sup>ð Þ� <sup>∈</sup> <sup>ℜ</sup><sup>m</sup>, <sup>K</sup> <sup>∈</sup> <sup>ℜ</sup><sup>n</sup>�<sup>m</sup>, A ∈ ℜ<sup>n</sup>�<sup>n</sup>, and b∈ ℜ<sup>n</sup>. Note that the aerobic process modeled by model (2) belongs to this class.

tracking error, which for λ<sup>i</sup> > 0, i ¼ 1, 2 has an exponential stable point at e ¼ 0.

benchmark, because it yields the best behavior and can be used for comparison.

design an adaptive control strategy under the following conditions:

• All the other kinetic and process coefficients are known.

• The variables X and Xr are not accessible.

next equations (for details, see [12, 15–17]):

W tðÞ¼ ð Þ <sup>N</sup>1A12ð Þþ <sup>t</sup> <sup>N</sup>2A22ð Þ<sup>t</sup> <sup>N</sup>�<sup>1</sup>

\_

with

• The specific growth rate μ is time-varying and completely unknown.

• The inflow rate Fin and the rate of recycled sludge r are time-varying.

<sup>w</sup><sup>b</sup> ðÞ¼ <sup>t</sup> W tð Þw t <sup>b</sup> ð Þþ Z tð Þζ1ð Þþ <sup>t</sup> Nb tð Þ, <sup>w</sup>bð Þ¼ <sup>0</sup> <sup>N</sup>bξð Þ<sup>0</sup> <sup>b</sup>ζ2ðÞ¼ <sup>t</sup> <sup>N</sup>�<sup>1</sup>

4.2.2. Adaptive control strategy

166 Wastewater and Water Quality

$$\dot{\zeta}\_1(t) = K\_1 \phi(\xi, t) + A\_{11} \zeta\_1 + A\_{12} \zeta\_2 + b\_1(t), \quad \dot{\zeta}\_2(t) = K\_2 \phi(\xi, t) + A\_{21} \zeta\_1 + A\_{22} \zeta\_2 + b\_2(t), \tag{12}$$

where ζ<sup>1</sup> (dimζ<sup>1</sup> ¼ q) denotes the measured variables and ζ<sup>2</sup> (dimζ<sup>2</sup> ¼ n � q ¼ s) represents the variables that have to be estimated, and the matrices K1, K2, A11, A12, A21, A22, b1, and b2, with suitable dimensions, are the corresponding partitions of K, A, and b, respectively.

The observers (9) and (10) were developed under the next assumptions about model (11) [12, 15–17]: (H1) K, A(t), and b(t) are known, ∀t ≥ 0; (H2) ϕ ξð Þ ; t is unknown, ∀t ≥ 0; (H3) rank K<sup>1</sup> ¼ rank K ¼ p with p ≤ m < n; and (H4) A(t) is bounded, i.e., there exist two constant matrices A� and A<sup>þ</sup> such as A� ≤ A tð Þ ≤ A<sup>þ</sup> and ∀t ≥ 0.

The auxiliary variable <sup>w</sup> ð Þ dim <sup>w</sup> <sup>¼</sup> <sup>s</sup> is defined as w tðÞ¼ <sup>N</sup>ξð Þ<sup>t</sup> , with <sup>N</sup> <sup>¼</sup> ½ � <sup>N</sup>1⋮N<sup>2</sup> <sup>∈</sup> <sup>ℜ</sup><sup>s</sup>�<sup>n</sup>, where <sup>N</sup><sup>1</sup> <sup>∈</sup> <sup>ℜ</sup><sup>s</sup>�<sup>q</sup> and <sup>N</sup><sup>2</sup> <sup>∈</sup> <sup>ℜ</sup><sup>s</sup>�<sup>s</sup> checks the equation <sup>N</sup>1K<sup>1</sup> <sup>þ</sup> <sup>N</sup>2K<sup>2</sup> <sup>¼</sup> 0. If <sup>N</sup><sup>2</sup> can be arbitrarily chosen, then <sup>N</sup><sup>1</sup> ¼ �N2K2K<sup>∗</sup> <sup>1</sup>, where K<sup>∗</sup> <sup>1</sup> is a generalized pseudo-inverse of K<sup>1</sup> [15, 21]. Moreover, if N<sup>2</sup> is invertible, then the unmeasured states ζ<sup>2</sup> can be calculated from w tðÞ¼ <sup>N</sup><sup>1</sup> <sup>ζ</sup>1ðÞþ <sup>t</sup> <sup>N</sup><sup>2</sup> <sup>ζ</sup>2ð Þ<sup>t</sup> as <sup>ζ</sup><sup>2</sup> <sup>¼</sup> <sup>N</sup>�<sup>1</sup> <sup>2</sup> ð Þ w � N1ζ<sup>1</sup> . This condition is satisfied if N<sup>2</sup> is chosen as N<sup>2</sup> ¼ kIs, where k > 0 is a real arbitrary parameter and Is is the s-dimensional unity matrix.

The stability of the observers (9) and (10) can be analyzed by using the observation error <sup>~</sup>ζ<sup>2</sup> <sup>¼</sup> <sup>ζ</sup><sup>2</sup> � <sup>b</sup>ζ2, whose dynamics obtained from models (9) and (12) is given by ~\_ ζ2ðÞ¼ t Wζð Þt <sup>~</sup>ζ2ð Þ<sup>t</sup> , with

$$W\_{\zeta}(t) = \mathbf{N}\_{2}^{-1}\mathbf{W}(t)\mathbf{N}\_{2} = A\_{22}(t) - \mathbf{K}\_{2}\mathbf{K}\_{1}^{\*}A\_{12}(t). \tag{13}$$

It was proven (see [21]) that whatever K<sup>∗</sup> <sup>1</sup> is, the observers (9) and (10) are asymptotically stable if the next conditions hold [15]: (a) Wζ,ijð Þt ≥ 0 and ∀i 6¼ j, that is, W<sup>ζ</sup> is a Metzler matrix [22]; (b) W� <sup>ζ</sup> and W<sup>þ</sup> <sup>ζ</sup> are Hurwitz stable matrices, with W� <sup>ζ</sup> ðÞ¼ t A� <sup>22</sup>ð Þ� <sup>t</sup> <sup>K</sup>2K<sup>∗</sup> 1A� <sup>12</sup>ð Þt , where A<sup>þ</sup> <sup>12</sup> and A<sup>þ</sup> <sup>22</sup> and A� <sup>12</sup> and A� <sup>22</sup> are the corresponding partitions of A� and A<sup>þ</sup>, specified in (H4). Since in model (2) rank K ¼ 1, under the above conditions, let us consider the next state partitions:

$$\mathcal{L}\_1 = \begin{bmatrix} \mathbf{S} & \mathbf{O} \end{bmatrix}^T \text{ and } \zeta\_2 = \begin{bmatrix} \mathbf{X} \ \mathbf{X}\_{\mathcal{T}} \ \end{bmatrix}^T. \tag{14}$$

which are induced on the matrices K, A, and b from model (11) the following partitions:

$$\begin{aligned} \boldsymbol{K} &= \begin{bmatrix} \mathbf{K}\_1^T; \mathbf{K}\_2^T \end{bmatrix} = \begin{bmatrix} -1/Y & -K\_0/Y & \mathbf{1} & \mathbf{0} \end{bmatrix}^T, \phi(\xi, t) = \begin{pmatrix} \mu(S, \mathbf{O}) - \mu\_\mathbf{S} \end{pmatrix} \mathbf{X}, \\ \boldsymbol{A}(t) &= \begin{bmatrix} A\_{11} & \vdots & A\_{12} \\ \cdots & \vdots & \cdots \\ A\_{21} & \vdots & A\_{22} \end{bmatrix} = \begin{bmatrix} -D(1+r) & \mathbf{0} & \vdots & \mathbf{0} & \mathbf{0} \\ \mathbf{0} & -D(1+r) - aF\_\mathcal{O} & \vdots & \mathbf{0} & \mathbf{0} \\ \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots \\ \vdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots & \cdots \\ \mathbf{0} & \mathbf{0} & \vdots & -D(1+r) & rD \\ \mathbf{0} & \mathbf{0} & \vdots & D(1+r) & -D(r+\beta) \end{bmatrix}, \\ \boldsymbol{b}(t) &= \begin{bmatrix} \mathbf{b}\_1^T; \mathbf{b}\_2^T \end{bmatrix}^T = \begin{bmatrix} \mathbf{D} \mathbf{S}\_{\mathrm{in}} \ a \mathbf{F}\_\mathrm{O} \mathrm{O}\_{\mathrm{st}} + \mathbf{D} \mathrm{O}\_{\mathrm{in}} & \vdots \ \mathbf{0} \ \mathbf{0} \end{bmatrix}. \end{aligned} \tag{15}$$

If the matrix N<sup>2</sup> is chosen as N<sup>2</sup> ¼ I2, then the matrix N<sup>1</sup> from N ¼ ½ � N1⋮N<sup>2</sup> takes the form:

$$N\_1 = -N\_2 K\_2 K\_1^\* = \frac{1}{\left(1/Y\right)^2 + \left(K\_0/Y\right)^2} \cdot \begin{bmatrix} 1/Y & K\_0/Y\\ 0 & 0 \end{bmatrix}.\tag{16}$$

The unmeasured states X and Xr are obtained by using the asymptotic observers (9) and (10) where W(t) and Z(t) are described by the following matrices:

$$W(t) = \begin{bmatrix} -D(1+r) & rD \\ D(1+r) & -D(\beta+r) \end{bmatrix} \tag{17}$$

4.2.3. Robust control strategy

in, respectively, are given. • The variables X and Xr are not accessible.

Figure 9. Structure of the adaptive controlled bioprocess.

varying, but for these, the bounds μ�

• The available online measurements are S and O.

• All the other kinetic and process coefficients are known.

• The inflow rate Fin is time-varying.

FO ¼ � Oin � ð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> <sup>O</sup>

where

and O<sup>þ</sup>

We will develop a robust control strategy under realistic conditions as follows:

• <sup>r</sup> is time-varying, but <sup>r</sup><sup>∈</sup> <sup>r</sup>�; <sup>r</sup><sup>þ</sup> ½ �, where the bounds <sup>r</sup><sup>∓</sup> are given.

follows. First, the components D and FO of the control law (8) are written as

<sup>D</sup> <sup>¼</sup> <sup>1</sup>

<sup>ð</sup>Sin � ð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> <sup>S</sup>Þ � <sup>α</sup>ð Þ Osat � <sup>O</sup> <sup>λ</sup><sup>1</sup> <sup>S</sup><sup>∗</sup> ð Þþ � <sup>S</sup> <sup>f</sup> <sup>D</sup>

f <sup>D</sup> ¼ ð Þ 1=Y μ � μ<sup>S</sup>

but some lower and upper bounds, possible time-varying, denoted by S�

• Sin and Oin are not measurable; that is, in model (11) the vector b(t) is incompletely known,

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions

• μ is uncertain and time-varying, because both μmax and KS are uncertain and time-

To control process (1) under the above conditions, we will develop a robust control strategy as

Sin � ð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> <sup>S</sup> <sup>λ</sup><sup>1</sup> <sup>S</sup><sup>∗</sup> ð Þþ � <sup>S</sup> <sup>f</sup> <sup>D</sup>

<sup>þ</sup>

To estimate the unknown variable X from Eq. (23), we cannot use anymore the asymptotic observers (9) and (10) because Sin and Oin are not measurable. Hence, by using a suitable

X, f <sup>O</sup> <sup>¼</sup> ð Þ <sup>K</sup>0=<sup>Y</sup> <sup>μ</sup> � <sup>μ</sup><sup>S</sup>

max and K�

<sup>S</sup> and K<sup>þ</sup>

1

, (21)

<sup>α</sup>ð Þ Osat � <sup>O</sup> <sup>λ</sup><sup>2</sup> <sup>O</sup><sup>∗</sup> ð Þþ � <sup>O</sup> <sup>f</sup> <sup>O</sup>

X: (23)

max and μ<sup>þ</sup>

in and S<sup>þ</sup>

http://dx.doi.org/10.5772/intechopen.74827

<sup>S</sup> , respectively, are known.

, (22)

in and O� in 169

$$Z(t) = \frac{1}{\left(1/Y\right)^2 + \left(K\_0/Y\right)^2} \begin{bmatrix} 0 & -(K\_0/Y)aF\_0(1+r) \\ -(1/Y)D(1+r) & -(K\_0/Y)D(\beta+r) \end{bmatrix}.\tag{18}$$

Since N<sup>2</sup> ¼ I2, then WζðÞ¼ t W tð Þ. It is obvious that if 0 < D� ≤ D ≤ D<sup>þ</sup> and 0 ≤ r� ≤ r ≤ rþ, where D� and D<sup>þ</sup> and r� and r<sup>þ</sup> represent a lower and, respectively, an upper bound of D and r, and 1 ≥ β ≥ 0, then two stable bounds denoted W� <sup>ζ</sup> and W<sup>þ</sup> <sup>ζ</sup> can be calculated for the stable matrix Wζð Þt .

To obtain the online estimates <sup>μ</sup><sup>b</sup> of the unknown rate <sup>μ</sup>, we will use an observer-based parameter estimator (OBE) (for details, see [3, 7, 21]).

Since for the aerobic digestion we must estimate only one incompletely known reaction rate, using only the dynamics of S and O, then the OBE is particularized as [3, 7, 12]

$$\dot{\hat{S}}(t) = -(1/\mathcal{Y}) \left( \widehat{\mu} - \mu\_S \right) \widehat{X} - D(1+r) \mathbf{S} + D \mathbf{S}\_{\text{int}} + \omega\_1 \left( \mathbf{S} - \widehat{\mathbf{S}} \right),\\ \dot{\mathcal{O}}(t) = -(\mathbf{K}\_0/\mathcal{Y}) \left( \widehat{\mu} - \mu\_S \right) \widehat{X}$$

$$-D(1+r) \mathbf{O} + a \mathbf{F}\_O (\mathbf{O}\_{\text{sat}} - \mathbf{O}) + D \mathbf{O}\_{\text{int}} + \omega\_2 \left( \mathbf{O} - \widehat{\mathbf{O}} \right),\\ \dot{\widehat{\mu}}(t) = -(1/\mathcal{Y}) \widehat{X} \cdot \boldsymbol{\mathcal{Y}}\_1 \cdot \left( \mathbf{S} - \widehat{\mathbf{S}} \right)$$

$$-(\mathbf{K}\_0/\mathcal{Y}) \widehat{X} \cdot \boldsymbol{\mathcal{Y}}\_2 \cdot \left( \mathbf{O} - \widehat{\mathbf{O}} \right),\tag{19}$$

where Xb is the online estimate of X, calculated by using the state asymptotic observer given in Eqs. (9) and (10), and ω1, ω<sup>2</sup> < 0 and γ1, γ<sup>2</sup> > 0 are design parameters at the user's disposal to control the stability and the tracking properties of the estimator.

Finally, the complete adaptive control algorithm is made up by combination of the observer Eqs. (9), (10), and (14)–(18) and parameter estimator Eq. (19) with the linearizing control law (8) rewritten as

$$
\begin{bmatrix} D \\ F\_O \end{bmatrix} = \begin{bmatrix} S\_{in} - (1+r)\mathbf{S} & \mathbf{0} \\ O\_{in} - (1+r)\mathbf{O} & a(O\_{\rm sat} - O) \end{bmatrix}^{-1} \left( \begin{bmatrix} \lambda\_1 & \mathbf{0} \\ \mathbf{0} & \lambda\_2 \end{bmatrix} \cdot \begin{bmatrix} \mathbf{S}^\* - \mathbf{S} \\ \mathbf{O}^\* - O \end{bmatrix} \right)
$$

$$
$$

A block diagram of the designed multivariable adaptive system is shown in Figure 9.

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions http://dx.doi.org/10.5772/intechopen.74827 169

Figure 9. Structure of the adaptive controlled bioprocess.

#### 4.2.3. Robust control strategy

If the matrix N<sup>2</sup> is chosen as N<sup>2</sup> ¼ I2, then the matrix N<sup>1</sup> from N ¼ ½ � N1⋮N<sup>2</sup> takes the form:

The unmeasured states X and Xr are obtained by using the asymptotic observers (9) and (10)

Since N<sup>2</sup> ¼ I2, then WζðÞ¼ t W tð Þ. It is obvious that if 0 < D� ≤ D ≤ D<sup>þ</sup> and 0 ≤ r� ≤ r ≤ rþ, where D� and D<sup>þ</sup> and r� and r<sup>þ</sup> represent a lower and, respectively, an upper bound of D and r, and

<sup>ζ</sup> and W<sup>þ</sup>

To obtain the online estimates <sup>μ</sup><sup>b</sup> of the unknown rate <sup>μ</sup>, we will use an observer-based

Since for the aerobic digestion we must estimate only one incompletely known reaction rate,

where Xb is the online estimate of X, calculated by using the state asymptotic observer given in Eqs. (9) and (10), and ω1, ω<sup>2</sup> < 0 and γ1, γ<sup>2</sup> > 0 are design parameters at the user's disposal

Finally, the complete adaptive control algorithm is made up by combination of the observer Eqs. (9), (10), and (14)–(18) and parameter estimator Eq. (19) with the linearizing control law

� ��<sup>1</sup> λ<sup>1</sup> 0

� � � <sup>X</sup><sup>b</sup>

� � � <sup>X</sup><sup>b</sup>

A block diagram of the designed multivariable adaptive system is shown in Figure 9.

þ

S\_ ∗ O\_ ∗ " #!

using only the dynamics of S and O, then the OBE is particularized as [3, 7, 12]

� �X<sup>b</sup> � <sup>D</sup>ð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> <sup>S</sup> <sup>þ</sup> D Sin <sup>þ</sup> <sup>ω</sup><sup>1</sup> <sup>S</sup> � <sup>b</sup><sup>S</sup>

�Dð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> <sup>O</sup> <sup>þ</sup> <sup>α</sup>FOð Þþ Osat � <sup>O</sup> DOin <sup>þ</sup> <sup>ω</sup><sup>2</sup> <sup>O</sup> � <sup>O</sup><sup>b</sup> � �

to control the stability and the tracking properties of the estimator.

<sup>¼</sup> Sin � ð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> <sup>S</sup> <sup>0</sup>

� �ð Þ� <sup>1</sup>=<sup>Y</sup> <sup>μ</sup><sup>b</sup> � <sup>μ</sup><sup>S</sup>

�ð Þ� <sup>K</sup>0=<sup>Y</sup> <sup>μ</sup><sup>b</sup> � <sup>μ</sup><sup>S</sup>

Oin � ð Þ 1 þ r O αð Þ Osat � O

" #

<sup>D</sup>ð Þ� <sup>1</sup> <sup>þ</sup> <sup>r</sup> <sup>D</sup> <sup>β</sup> <sup>þ</sup> <sup>r</sup> � � � �

W tðÞ¼ �Dð Þ <sup>1</sup> <sup>þ</sup> <sup>r</sup> rD

ð Þ <sup>1</sup>=<sup>Y</sup> <sup>2</sup> <sup>þ</sup> ð Þ <sup>K</sup>0=<sup>Y</sup> <sup>2</sup> � <sup>1</sup>=Y K0=<sup>Y</sup>

0 0 � �

0 �ð Þ K0=Y αFOð Þ 1 þ r

�ð Þ <sup>1</sup>=<sup>Y</sup> <sup>D</sup>ð Þ� <sup>1</sup> <sup>þ</sup> <sup>r</sup> ð Þ <sup>K</sup>0=<sup>Y</sup> <sup>D</sup> <sup>β</sup> <sup>þ</sup> <sup>r</sup> � � � �

� �

, \_

0 λ<sup>2</sup> � � � <sup>S</sup><sup>∗</sup> � <sup>S</sup> <sup>O</sup><sup>∗</sup> � <sup>O</sup>

: (20)

� � �

, (19)

: (16)

: (18)

� �X<sup>b</sup>

� �

, (17)

<sup>ζ</sup> can be calculated for the stable matrix Wζð Þt .

, O t \_ ðÞ¼�ð Þ <sup>K</sup>0=<sup>Y</sup> <sup>μ</sup><sup>b</sup> � <sup>μ</sup><sup>S</sup>

<sup>μ</sup>bðÞ¼� <sup>t</sup> ð Þ <sup>1</sup>=<sup>Y</sup> <sup>X</sup><sup>b</sup> � <sup>γ</sup><sup>1</sup> � <sup>S</sup> � <sup>b</sup><sup>S</sup>

<sup>1</sup> <sup>¼</sup> <sup>1</sup>

<sup>N</sup><sup>1</sup> ¼ �N2K2K<sup>∗</sup>

where W(t) and Z(t) are described by the following matrices:

ð Þ <sup>1</sup>=<sup>Y</sup> <sup>2</sup> <sup>þ</sup> ð Þ <sup>K</sup>0=<sup>Y</sup> <sup>2</sup>

Z tðÞ¼ <sup>1</sup>

1 ≥ β ≥ 0, then two stable bounds denoted W�

S t

168 Wastewater and Water Quality

(8) rewritten as

\_ðÞ¼�ð Þ <sup>1</sup>=<sup>Y</sup> <sup>μ</sup><sup>b</sup> � <sup>μ</sup><sup>S</sup>

D FO � �

parameter estimator (OBE) (for details, see [3, 7, 21]).

�ð Þ <sup>K</sup>0=<sup>Y</sup> <sup>X</sup><sup>b</sup> � <sup>γ</sup><sup>2</sup> � <sup>O</sup> � <sup>O</sup><sup>b</sup> � �

We will develop a robust control strategy under realistic conditions as follows:


To control process (1) under the above conditions, we will develop a robust control strategy as follows. First, the components D and FO of the control law (8) are written as

$$D = \frac{1}{S\_{\rm in} - (1 + r)S} \left(\lambda\_1 (S^\* - S) + f\_D\right),\tag{21}$$

$$F\_O = -\frac{O\_{\rm in} - (1+r)O}{(S\_{\rm in} - (1+r)S) \cdot a \left(O\_{\rm sat} - O\right)} \left(\lambda\_1 (S^\* - S) + f\_D\right) + \frac{1}{a \left(O\_{\rm sat} - O\right)} \left(\lambda\_2 (O^\* - O) + f\_O\right), \tag{22}$$

where

$$f\_D = (\mathbf{1}/\mathbf{Y}) \left(\boldsymbol{\mu} - \boldsymbol{\mu}\_{\mathcal{S}}\right) \mathbf{X}\_{\prime} \\ f\_O = (\mathbf{K}\_{\mathcal{0}}/\mathbf{Y}) \left(\boldsymbol{\mu} - \boldsymbol{\mu}\_{\mathcal{S}}\right) \mathbf{X}. \tag{23}$$

To estimate the unknown variable X from Eq. (23), we cannot use anymore the asymptotic observers (9) and (10) because Sin and Oin are not measurable. Hence, by using a suitable observer interval, based on the known lower and upper bounds of Sin and Oin, we estimate lower and upper bounds of X, in-between it evolve. The interval observer is achieved by using the designed asymptotic observers (9) and (10). For this purpose, the hypothesis (H1) is modified into (H1<sup>0</sup> ) as follows: (H1<sup>0</sup> ) K and A(t) are known, ∀t ≥ 0, and the next additional hypotheses are introduced [15, 16, 21]: (H5) the input vector b(t) is unknown, but guaranteed bounds, possibly time-varying, are given as b�ð Þt ≤ b tð Þ ≤ bþð Þt ; and (H6) the initial state conditions are unknown, but guaranteed bounds are given as ξ�ð Þ0 ≤ ξð Þ0 ≤ ξþð Þ0 .

else if 1ð Þ � <sup>ε</sup> and <sup>O</sup> <sup>&</sup>gt; ð Þ <sup>1</sup> <sup>þ</sup> <sup>ε</sup> <sup>O</sup><sup>∗</sup>

FO ¼ � <sup>O</sup><sup>þ</sup>

FO ¼ � <sup>O</sup>�

FO ¼ � <sup>O</sup><sup>þ</sup>

where.

and <sup>X</sup><sup>b</sup> �

S�

S�

and <sup>X</sup><sup>b</sup> <sup>þ</sup>

S<sup>þ</sup>

S�

, then

<sup>D</sup> <sup>¼</sup> <sup>1</sup> S�

<sup>D</sup> <sup>¼</sup> <sup>1</sup> S<sup>þ</sup>

<sup>D</sup> <sup>¼</sup> <sup>1</sup> S<sup>þ</sup>

<sup>D</sup> <sup>¼</sup> <sup>1</sup>=<sup>Y</sup> <sup>∓</sup> ð Þ <sup>μ</sup>� � <sup>μ</sup><sup>S</sup>

In Eq. (26) the values of μ<sup>þ</sup> and μ� of μ are calculated as μ� ¼ μ�

controlled variables to be as close as possible to their desired values.

in and O�

in � 1 þ r� ð ÞO

in � 1 þ r<sup>þ</sup> ð ÞO

in � <sup>1</sup> <sup>þ</sup> <sup>r</sup>� ð Þ<sup>S</sup> � � � <sup>α</sup>ð Þ Osat � <sup>O</sup>

in � 1 þ r� ð ÞO

in � <sup>1</sup> <sup>þ</sup> <sup>r</sup><sup>þ</sup> ð Þ<sup>S</sup> � � � <sup>α</sup>ð Þ Osat � <sup>O</sup>

correspond to S�

in � <sup>1</sup> <sup>þ</sup> <sup>r</sup><sup>þ</sup> ð Þ<sup>S</sup> � � � <sup>α</sup>ð Þ Osat � <sup>O</sup>

else if <sup>S</sup> <sup>&</sup>gt; ð Þ <sup>1</sup> <sup>þ</sup> <sup>ε</sup> <sup>S</sup><sup>∗</sup> and <sup>O</sup> <sup>&</sup>lt; ð Þ <sup>1</sup> � <sup>ε</sup> <sup>O</sup><sup>∗</sup>

else if <sup>S</sup> <sup>&</sup>gt; ð Þ <sup>1</sup> <sup>þ</sup> <sup>ε</sup> <sup>S</sup><sup>∗</sup> and <sup>O</sup> <sup>&</sup>gt; ð Þ <sup>1</sup> <sup>þ</sup> <sup>ε</sup> <sup>O</sup><sup>∗</sup>

f �

4.3. Simulation results and discussions

simulation scenarios were taken into consideration:

in � <sup>1</sup> <sup>þ</sup> <sup>r</sup><sup>þ</sup> ð Þ<sup>S</sup> <sup>λ</sup><sup>1</sup> <sup>S</sup><sup>∗</sup> ð Þþ � <sup>S</sup> <sup>f</sup>

<sup>λ</sup><sup>1</sup> <sup>S</sup><sup>∗</sup> ð Þþ � <sup>S</sup> <sup>f</sup>

<sup>λ</sup><sup>1</sup> <sup>S</sup><sup>∗</sup> ð Þþ � <sup>S</sup> <sup>f</sup>

<sup>λ</sup><sup>1</sup> <sup>S</sup><sup>∗</sup> ð Þþ � <sup>S</sup> <sup>f</sup>

, f �

As can be observed from the structure of the control scheme (25) (block diagram in Figure 10) and from the simulation results presented in the next section, this control strategy forces the

The performance of adaptive controller given by Eq. (20) and of robust controller given by Eqs. (25) and (26) by comparison to the exact linearizing controller (8) (used as benchmark) has been tested by performing extensive simulation experiments. For a proper comparison, the simulations were carried out by using the process model (1) under identical conditions. The values of process and kinetic parameters [8, 12] are adapted for WTP Calafat as in Table 1. Two

in and O<sup>þ</sup>

in and S<sup>þ</sup>

Remark 1. Note that in a normal operation of the bioreactor the terms S<sup>þ</sup>

in � <sup>1</sup> <sup>þ</sup> <sup>r</sup><sup>þ</sup> ð ÞS, and <sup>α</sup>ð Þ Osat � <sup>O</sup> from control law (25) are different from zero.◆

� � <sup>þ</sup>

� � <sup>þ</sup>

, then

in � 1 þ r� ð ÞS

, then

in � 1 þ r� ð ÞS

� �X<sup>b</sup> �

� � <sup>þ</sup>

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions

þ D

� D

� D

1

� �X<sup>b</sup> �

maxS<sup>=</sup> <sup>K</sup> <sup>∓</sup>

1

1

<sup>α</sup>ð Þ Osat � <sup>O</sup> <sup>λ</sup><sup>2</sup> <sup>O</sup><sup>∗</sup> ð Þþ � <sup>O</sup> <sup>f</sup>

http://dx.doi.org/10.5772/intechopen.74827

<sup>α</sup>ð Þ Osat � <sup>O</sup> <sup>λ</sup><sup>2</sup> <sup>O</sup><sup>∗</sup> ð Þþ � <sup>O</sup> <sup>f</sup>

<sup>α</sup>ð Þ Osat � <sup>O</sup> <sup>λ</sup><sup>2</sup> <sup>O</sup><sup>∗</sup> ð Þþ � <sup>O</sup> <sup>f</sup>

� �, (25)

þ O 171

� O

þ O

(26)

� �

� �

� �,

<sup>S</sup> <sup>þ</sup> <sup>S</sup> � � � <sup>O</sup>=ð Þ KO <sup>þ</sup> <sup>O</sup> ,

in � 1 þ r� ð ÞS,

� �,

� D

<sup>λ</sup><sup>1</sup> <sup>S</sup><sup>∗</sup> ð Þþ � <sup>S</sup> <sup>f</sup>

þ D

<sup>λ</sup><sup>1</sup> <sup>S</sup><sup>∗</sup> ð Þþ � <sup>S</sup> <sup>f</sup>

� D

<sup>O</sup> <sup>¼</sup> <sup>K</sup>0=<sup>Y</sup> <sup>∓</sup> ð Þ <sup>μ</sup>� � <sup>μ</sup><sup>S</sup>

in, respectively.

� �,

Interval observers work as a bundle of two observers: an upper observer, which produces an upper bound of the state vector, and a lower observer producing a lower bound, providing this way a bounded interval in which the state vector is guaranteed to evolve [15–17, 23]. The design is based on properties of monotone dynamical systems or cooperative systems (see [15–16, 21, 24]). Then, under hypotheses (H1<sup>0</sup> )-(H6), a robust interval observer for the system (2) can be described as [12, 15–17, 21]

$$\begin{aligned} \left(\Sigma^{+}\right) &= \begin{cases} \dot{w}^{+}(t) = W(t)w^{+}(t) + Z(t)\zeta\_{1}(t) + Mv^{+}(t), & w(0)^{+} = N\xi(0)^{+}, \\ \zeta\_{2}^{+}(t) &= N\_{2}^{-1}(w^{+}(t) - N\_{1}\zeta\_{1}(t)), \end{cases} \\\\ \left(\Sigma^{-}\right) &= \begin{cases} \dot{w}^{-}(t) = W(t)w^{-}(t) + Z(t)\zeta\_{1}(t) + Mv^{-}(t), & w(0)^{-} = N\,\xi(0)^{-}, \\ \zeta\_{2}^{-}(t) &= N\_{2}^{-1}(w^{-}(t) - N\_{1}\zeta\_{1}(t)), \end{cases} \end{aligned} \tag{24}$$

where W tð Þ and Z tð Þ are given by (10), ζ<sup>þ</sup> <sup>2</sup> ð Þt and ζ� <sup>2</sup> ð Þt are upper and lower bounds of the estimated state ζ2ð Þt and M ¼ N1⋮jN1,ijj⋮N<sup>2</sup> � �, and <sup>v</sup>þðÞ¼ <sup>t</sup> <sup>b</sup><sup>þ</sup> <sup>1</sup> þ b� 1 � �=2 b<sup>þ</sup> <sup>1</sup> � b� 1 � �=2 b<sup>þ</sup> 2 � �<sup>T</sup> and v�ðÞ¼ t b<sup>þ</sup> <sup>1</sup> þ b� 1 � �=<sup>2</sup> � <sup>b</sup><sup>þ</sup> <sup>1</sup> � b� 1 � �=2 b� 2 � �<sup>T</sup> , with b<sup>þ</sup> <sup>1</sup> , b<sup>þ</sup> <sup>2</sup> and b� <sup>1</sup> , b� <sup>2</sup> , are the partitions of the known upper and lower bounds of the input vector b(t). Since N<sup>2</sup> must have to be invertible, then it is chosen as N<sup>2</sup> ¼ kIs, where Is is the identity matrix and k > 0 is a real arbitrary parameter.

If the matrix Wζð Þt defined in Eq. (13) is cooperative [15–16, 23], then under hypotheses (H1<sup>0</sup> )– (H6), the pair of systems Σþ; Σ� ð Þ constitutes a stable robust interval observer generating trajectories ζ<sup>þ</sup> <sup>2</sup> ð Þt and ζ� <sup>2</sup> ð Þt , and it guarantees that ζ� <sup>2</sup> ð Þt ≤ ζ2ð Þt ≤ ζ<sup>þ</sup> <sup>2</sup> ð Þt and ∀t ≥ 0 as soon as ξ�ð Þ0 ≤ ξð Þ0 ≤ ξþð Þ0 [15–16, 21]. The convergence of observer (24) can be proven like in [21].

Since the control objective is to maintain the wastewater degradation S at a desired low-level S\* with a proper aeration, then under the next realistic conditions S� in ≤ Sin ≤ S<sup>þ</sup> in, O� in ≤ Oin ≤ O<sup>þ</sup> in, μ� max ≤ μmax ≤ μ<sup>þ</sup> max, K� <sup>S</sup> ≤ KS ≤ K<sup>þ</sup> <sup>S</sup> , <sup>r</sup>� <sup>≤</sup> <sup>r</sup> <sup>≤</sup> <sup>r</sup>þ, and <sup>X</sup><sup>b</sup> � <sup>≤</sup> <sup>X</sup><sup>b</sup> <sup>≤</sup> <sup>X</sup><sup>b</sup> <sup>þ</sup> (where Xb is the estimated value of <sup>X</sup>, but <sup>X</sup><sup>b</sup> � and <sup>X</sup><sup>b</sup> <sup>þ</sup> are its lower and upper bounds achieved by using the interval observer (24)), we can define the following robust control strategy.

If <sup>S</sup> <sup>&</sup>lt; ð Þ <sup>1</sup> � <sup>ε</sup> <sup>S</sup><sup>∗</sup> and <sup>O</sup> <sup>&</sup>lt; ð Þ <sup>1</sup> � <sup>ε</sup> <sup>O</sup><sup>∗</sup> , where 0 < ε ≤ 0:05, represent a dead zone, then\*\*\*

$$D = \frac{1}{S\_{in}^- - (1 + r^+)S} \left(\lambda\_1 (S^\* - S) + f\_D^+\right),$$

$$F\_O = -\frac{O\_{in}^- - (1 + r^+)O}{\left(S\_{in}^+ - (1 + r^-)S\right) \cdot a \left(O\_{\rm sat} - O\right)} \left(\lambda\_1 (S^\* - S) + f\_D^+\right) + \frac{1}{a \left(O\_{\rm sat} - O\right)} \left(\lambda\_2 (O^\* - O) + f\_O^-\right).$$

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions http://dx.doi.org/10.5772/intechopen.74827 171

else if 1ð Þ � <sup>ε</sup> and <sup>O</sup> <sup>&</sup>gt; ð Þ <sup>1</sup> <sup>þ</sup> <sup>ε</sup> <sup>O</sup><sup>∗</sup> , then

$$\begin{aligned} D &= \frac{1}{S\_{\text{in}}^- - (1 + r^+)S} \Big(\lambda\_1 (S^\* - S) + f\_D^+ \big), \\\\ \frac{O\_{\text{in}}^+ - (1 + r^-)O\_{\text{in}}^+}{\text{min}} & \left(\lambda\_1 (S^\* - S) + f\_D^- \right) + \frac{1}{(1 - r^-)} \left(\lambda\_2 (O^\* - O) + f\_D^+ \right) \end{aligned}$$

$$F\_O = -\frac{O\_{\rm in}^{\rm \gamma} - (1 + r^{-})O}{\left(S\_{\rm in}^{-} - (1 + r^{+})S\right) \cdot a \left(O\_{\rm sat} - O\right)} \left(\lambda\_1 (S^{\*} - S) + f\_D\right) + \frac{1}{a \left(O\_{\rm sat} - O\right)} \left(\lambda\_2 (O^{\*} - O) + f\_D\right)$$

else if <sup>S</sup> <sup>&</sup>gt; ð Þ <sup>1</sup> <sup>þ</sup> <sup>ε</sup> <sup>S</sup><sup>∗</sup> and <sup>O</sup> <sup>&</sup>lt; ð Þ <sup>1</sup> � <sup>ε</sup> <sup>O</sup><sup>∗</sup> , then

$$D = \frac{1}{S\_{in}^{+} - (1 + r^{-})S} \left(\lambda\_1 (S^\* - S) + f\_D^{-} \right) \tag{25}$$

þ O

$$F\_O = -\frac{O\_{\rm in}^- - (1 + r^+)O}{\left(S\_{\rm in}^+ - (1 + r^-)S\right) \cdot a \left(O\_{\rm sat} - O\right)} \left(\lambda\_1 (S^\* - S) + f\_D^+\right) + \frac{1}{a \left(O\_{\rm sat} - O\right)} \left(\lambda\_2 (O^\* - O) + f\_O^-\right)$$

else if <sup>S</sup> <sup>&</sup>gt; ð Þ <sup>1</sup> <sup>þ</sup> <sup>ε</sup> <sup>S</sup><sup>∗</sup> and <sup>O</sup> <sup>&</sup>gt; ð Þ <sup>1</sup> <sup>þ</sup> <sup>ε</sup> <sup>O</sup><sup>∗</sup> , then

$$D = \frac{1}{S\_{\text{int}}^{+} - (1 + r^{-})S} \left(\lambda\_1 (S^\* - S) + f\_D^{-} \right),$$

$$F\_O = -\frac{O\_{\text{in}}^{+} - (1 + r^{-})O}{\left\{S\_{\text{in}}^{-} - (1 + r^{+})S\right\} \cdot a \left(O\_{\text{sat}} - O\right)} \left(\lambda\_1 (S^\* - S) + f\_D^{-} \right) + \frac{1}{a \left(O\_{\text{sat}} - O\right)} \left(\lambda\_2 (O^\* - O) + f\_O^{+} \right),$$

where.

observer interval, based on the known lower and upper bounds of Sin and Oin, we estimate lower and upper bounds of X, in-between it evolve. The interval observer is achieved by using the designed asymptotic observers (9) and (10). For this purpose, the hypothesis (H1) is

hypotheses are introduced [15, 16, 21]: (H5) the input vector b(t) is unknown, but guaranteed bounds, possibly time-varying, are given as b�ð Þt ≤ b tð Þ ≤ bþð Þt ; and (H6) the initial state condi-

Interval observers work as a bundle of two observers: an upper observer, which produces an upper bound of the state vector, and a lower observer producing a lower bound, providing this way a bounded interval in which the state vector is guaranteed to evolve [15–17, 23]. The design is based on properties of monotone dynamical systems or cooperative systems (see

<sup>2</sup> ðÞ¼ <sup>t</sup> <sup>N</sup>�<sup>1</sup>

<sup>2</sup> w�ð Þ� t N1ζ<sup>1</sup> ð Þ ð Þt ,

<sup>2</sup> ð Þt and ζ�

� �, and <sup>v</sup>þðÞ¼ <sup>t</sup> <sup>b</sup><sup>þ</sup>

2

If the matrix Wζð Þt defined in Eq. (13) is cooperative [15–16, 23], then under hypotheses (H1<sup>0</sup>

ξ�ð Þ0 ≤ ξð Þ0 ≤ ξþð Þ0 [15–16, 21]. The convergence of observer (24) can be proven like in [21]. Since the control objective is to maintain the wastewater degradation S at a desired low-level S\*

<sup>2</sup> ð Þt , and it guarantees that ζ�

<sup>S</sup> , <sup>r</sup>� <sup>≤</sup> <sup>r</sup> <sup>≤</sup> <sup>r</sup>þ, and <sup>X</sup><sup>b</sup> �

with a proper aeration, then under the next realistic conditions S�

<sup>D</sup> <sup>¼</sup> <sup>1</sup> S�

(H6), the pair of systems Σþ; Σ� ð Þ constitutes a stable robust interval observer generating

in � <sup>1</sup> <sup>þ</sup> <sup>r</sup><sup>þ</sup> ð Þ<sup>S</sup> <sup>λ</sup><sup>1</sup> <sup>S</sup><sup>∗</sup> ð Þþ � <sup>S</sup> <sup>f</sup>

<sup>λ</sup><sup>1</sup> <sup>S</sup><sup>∗</sup> ð Þþ � <sup>S</sup> <sup>f</sup>

� � <sup>þ</sup>

of the known upper and lower bounds of the input vector b(t). Since N<sup>2</sup> must have to be invertible, then it is chosen as N<sup>2</sup> ¼ kIs, where Is is the identity matrix and k > 0 is a real

<sup>Σ</sup>� ð Þ¼ <sup>w</sup>\_ �ðÞ¼ <sup>t</sup> W tð Þw�ð Þþ <sup>t</sup> Z tð Þζ1ð Þþ <sup>t</sup> M v�ð Þ<sup>t</sup> , wð Þ<sup>0</sup> � <sup>¼</sup> <sup>N</sup>ξð Þ<sup>0</sup> �,

, with b<sup>þ</sup>

<sup>≤</sup> <sup>X</sup><sup>b</sup> <sup>≤</sup> <sup>X</sup><sup>b</sup> <sup>þ</sup>

are its lower and upper bounds achieved by using the interval observer

� �,

þ D

, where 0 < ε ≤ 0:05, represent a dead zone, then\*\*\*

þ D

1

w\_ þðÞ¼ t W tð Þwþð Þþ t Z tð Þζ1ð Þþ t M vþð Þt , wð Þ0 <sup>þ</sup> ¼ Nξð Þ0 <sup>þ</sup>,

<sup>2</sup> wþðÞ� t N1ζ<sup>1</sup> ð Þ ð Þt ,

<sup>1</sup> , b<sup>þ</sup>

<sup>2</sup> ð Þt ≤ ζ2ð Þt ≤ ζ<sup>þ</sup>

tions are unknown, but guaranteed bounds are given as ξ�ð Þ0 ≤ ξð Þ0 ≤ ξþð Þ0 .

ζ<sup>þ</sup>

) K and A(t) are known, ∀t ≥ 0, and the next additional

)-(H6), a robust interval observer for the system

<sup>2</sup> ð Þt are upper and lower bounds of the

<sup>1</sup> , b�

in ≤ Sin ≤ S<sup>þ</sup>

<sup>1</sup> � b� 1 � �=2 b<sup>þ</sup>

<sup>2</sup> ð Þt and ∀t ≥ 0 as soon as

in, O�

(where Xb is the estimated value of

<sup>α</sup>ð Þ Osat � <sup>O</sup> <sup>λ</sup><sup>2</sup> <sup>O</sup><sup>∗</sup> ð Þþ � <sup>O</sup> <sup>f</sup>

in ≤ Oin ≤ O<sup>þ</sup>

� O

� �

<sup>2</sup> , are the partitions

� �<sup>T</sup>

<sup>1</sup> þ b� 1 � �=2 b<sup>þ</sup>

<sup>2</sup> and b�

(24)

2

)–

in,

modified into (H1<sup>0</sup>

170 Wastewater and Water Quality

and v�ðÞ¼ t b<sup>þ</sup>

arbitrary parameter.

trajectories ζ<sup>þ</sup>

max ≤ μmax ≤ μ<sup>þ</sup>

<sup>X</sup>, but <sup>X</sup><sup>b</sup> �

μ�

) as follows: (H1<sup>0</sup>

[15–16, 21, 24]). Then, under hypotheses (H1<sup>0</sup>

(

�

where W tð Þ and Z tð Þ are given by (10), ζ<sup>þ</sup>

estimated state ζ2ð Þt and M ¼ N1⋮jN1,ijj⋮N<sup>2</sup>

<sup>1</sup> þ b� 1 � �=<sup>2</sup> � <sup>b</sup><sup>þ</sup>

<sup>2</sup> ð Þt and ζ�

max, K�

If <sup>S</sup> <sup>&</sup>lt; ð Þ <sup>1</sup> � <sup>ε</sup> <sup>S</sup><sup>∗</sup> and <sup>O</sup> <sup>&</sup>lt; ð Þ <sup>1</sup> � <sup>ε</sup> <sup>O</sup><sup>∗</sup>

and <sup>X</sup><sup>b</sup> <sup>þ</sup>

FO ¼ � <sup>O</sup>�

S<sup>þ</sup>

<sup>S</sup> ≤ KS ≤ K<sup>þ</sup>

(24)), we can define the following robust control strategy.

in � 1 þ r<sup>þ</sup> ð ÞO

in � <sup>1</sup> <sup>þ</sup> <sup>r</sup>� ð Þ<sup>S</sup> � � � <sup>α</sup>ð Þ Osat � <sup>O</sup>

ζ�

<sup>2</sup> ðÞ¼ <sup>t</sup> <sup>N</sup>�<sup>1</sup>

� �<sup>T</sup>

<sup>1</sup> � b� 1 � �=2 b�

(2) can be described as [12, 15–17, 21]

Σ<sup>þ</sup> ð Þ¼

$$f\_D^{\pm} = (1/Y^{\mp}) \left(\mu^{\pm} - \mu\_S\right) \hat{\mathbf{X}}^{\pm}, \\ f\_O^{\pm} = (\mathbf{K}\_0/Y^{\mp}) \left(\mu^{\pm} - \mu\_S\right) \hat{\mathbf{X}}^{\pm} \tag{26}$$

In Eq. (26) the values of μ<sup>þ</sup> and μ� of μ are calculated as μ� ¼ μ� maxS<sup>=</sup> <sup>K</sup> <sup>∓</sup> <sup>S</sup> <sup>þ</sup> <sup>S</sup> � � � <sup>O</sup>=ð Þ KO <sup>þ</sup> <sup>O</sup> , and <sup>X</sup><sup>b</sup> � and <sup>X</sup><sup>b</sup> <sup>þ</sup> correspond to S� in and O� in and S<sup>þ</sup> in and O<sup>þ</sup> in, respectively.

Remark 1. Note that in a normal operation of the bioreactor the terms S<sup>þ</sup> in � 1 þ r� ð ÞS, S� in � <sup>1</sup> <sup>þ</sup> <sup>r</sup><sup>þ</sup> ð ÞS, and <sup>α</sup>ð Þ Osat � <sup>O</sup> from control law (25) are different from zero.◆

As can be observed from the structure of the control scheme (25) (block diagram in Figure 10) and from the simulation results presented in the next section, this control strategy forces the controlled variables to be as close as possible to their desired values.

#### 4.3. Simulation results and discussions

The performance of adaptive controller given by Eq. (20) and of robust controller given by Eqs. (25) and (26) by comparison to the exact linearizing controller (8) (used as benchmark) has been tested by performing extensive simulation experiments. For a proper comparison, the simulations were carried out by using the process model (1) under identical conditions. The values of process and kinetic parameters [8, 12] are adapted for WTP Calafat as in Table 1. Two simulation scenarios were taken into consideration:

Figure 10. Structure of the multivariable robust controlled system.


Table 1. Kinetic and process parameters values.

Case 1. We analyzed the behavior of closed-loop system using the adaptive controller (20), by comparison to exact linearizing control law (8) under the following conditions:

> The behavior of closed-loop system using adaptive controller (20), by comparison to exact linearizing control law (8), is presented in Figures 13–16. To verify the regulation properties,

> To be close to reality, we considered that the measurements of controlled variables S and O are corrupted with additive zero mean white noises (2.5% from their nominal values), as well as the measurements of the influent variables Sin and Oin are corrupted with an additive zero mean white noise (2.5% from their nominal values). The gains of control laws (8), respectively, (20) are λ<sup>1</sup> ¼ λ<sup>2</sup> ¼ 2, and the tuning parameters of adaptive controller have been set to the

> The evolution of the estimate of unknown variable X provided by the observers (9), (10), and (14)–(18) is presented in Figure 17, and the profile of estimate of unknown specific growth rate μ provided by the OBE (19) is given in Figure 18. It can be noticed that both state observer and parameter estimator provide proper results. From graphics in Figures 13 and 14, it can be seen

, some piece-wise constant variations were considered.

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions

http://dx.doi.org/10.5772/intechopen.74827

173

for references S\* and O\*

Figure 12. Evolution of Oin and of its bounds.

Figure 11. Evolution of Sin and of its bounds.

values ω<sup>1</sup> ¼ ω<sup>2</sup> ¼ 0:5 and γ<sup>1</sup> ¼ γ<sup>2</sup> ¼ 0:75.


Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions http://dx.doi.org/10.5772/intechopen.74827 173

Figure 11. Evolution of Sin and of its bounds.

Figure 12. Evolution of Oin and of its bounds.

Case 1. We analyzed the behavior of closed-loop system using the adaptive controller (20), by

<sup>S</sup>ð Þ 1 þ 0:25 sin ð Þ πt=12 þ π=2 .

<sup>S</sup> are time-varying parameters described as <sup>μ</sup>maxðÞ¼ <sup>t</sup> <sup>μ</sup><sup>0</sup>

inð1 þ 0:2 sin ð Þþ πt=25 0:05 sin

in 6.75 m<sup>3</sup>

in 200 mg/l

in 0.025 h�<sup>1</sup>

max

/min

• Sin and Oin are time-varying (Figures 11 and 12), but they are assumed measurable.

Parameter Value Parameter Value

max 0.15 h�<sup>1</sup> <sup>α</sup> 0.018

<sup>S</sup> 100 g/l β 0.2 KO 2 mg/l r<sup>0</sup> 0.6

K<sup>0</sup> 0.5 mg/g V 3800 m3

comparison to exact linearizing control law (8) under the following conditions:

• The rate of recycled sludge <sup>r</sup> is time-varying as r tðÞ¼ <sup>r</sup><sup>0</sup>ð Þ <sup>1</sup> <sup>þ</sup> <sup>0</sup>:5 sin ð Þ <sup>π</sup>t=<sup>36</sup> .

• The specific growth rate μ is unknown and time-varying.

Figure 10. Structure of the multivariable robust controlled system.

Y 65 g/g F<sup>0</sup>

<sup>μ</sup><sup>S</sup> 0. 0002 h�<sup>1</sup> <sup>S</sup><sup>0</sup>

Osat 10 mg/l O<sup>0</sup>

max and <sup>K</sup><sup>0</sup>

• The influent flow rate Fin is time-varying as FinðÞ¼ <sup>t</sup> <sup>F</sup><sup>0</sup>

• The variables S and O are known (measurable).

• All the other coefficients (Y, KO, μS, β, α) are constant and known.

• The states X and Xr are unmeasurable (X and Xr will be estimated).

• The kinetic coefficients μ<sup>0</sup>

ð ÞÞ πt=4 .

μ0

172 Wastewater and Water Quality

K0

ð Þ <sup>1</sup> <sup>þ</sup> <sup>0</sup>:5 sin ð Þ <sup>π</sup>t=<sup>10</sup> , KSðÞ¼ <sup>t</sup> <sup>K</sup><sup>0</sup>

Table 1. Kinetic and process parameters values.

The behavior of closed-loop system using adaptive controller (20), by comparison to exact linearizing control law (8), is presented in Figures 13–16. To verify the regulation properties, for references S\* and O\* , some piece-wise constant variations were considered.

To be close to reality, we considered that the measurements of controlled variables S and O are corrupted with additive zero mean white noises (2.5% from their nominal values), as well as the measurements of the influent variables Sin and Oin are corrupted with an additive zero mean white noise (2.5% from their nominal values). The gains of control laws (8), respectively, (20) are λ<sup>1</sup> ¼ λ<sup>2</sup> ¼ 2, and the tuning parameters of adaptive controller have been set to the values ω<sup>1</sup> ¼ ω<sup>2</sup> ¼ 0:5 and γ<sup>1</sup> ¼ γ<sup>2</sup> ¼ 0:75.

The evolution of the estimate of unknown variable X provided by the observers (9), (10), and (14)–(18) is presented in Figure 17, and the profile of estimate of unknown specific growth rate μ provided by the OBE (19) is given in Figure 18. It can be noticed that both state observer and parameter estimator provide proper results. From graphics in Figures 13 and 14, it can be seen

Figure 13. Time evolution of output S (Case 1).

Figure 14. Time evolution of output O (Case 1).

Figure 15. Profile of control input D (Case 1).

that the behavior of overall system with adaptive controller (20) is correct, being very close to the behavior of closed-loop system in the ideal case obtained using the linearizing controller (8) when the model is known. Note also the regulation properties and ability of the controller to maintain the controlled output y very close to its desired value, despite the high variation of Sin and Fin as well as of the unmeasurable influent dissolved concentration Oin and time variation of some process parameters. Even if the control inputs are more affected by noisy

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions

http://dx.doi.org/10.5772/intechopen.74827

175

measurements, the behavior of the controlled system remains satisfactory.

Figure 16. Profile of control input FO (Case 1).

Figure 17. Estimate of unknown X (Case 1).

Figure 18. Estimate of unknown rate μ (Case 1).

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions http://dx.doi.org/10.5772/intechopen.74827 175

Figure 16. Profile of control input FO (Case 1).

Figure 17. Estimate of unknown X (Case 1).

Figure 18. Estimate of unknown rate μ (Case 1).

that the behavior of overall system with adaptive controller (20) is correct, being very close to the behavior of closed-loop system in the ideal case obtained using the linearizing controller (8) when the model is known. Note also the regulation properties and ability of the controller

Figure 13. Time evolution of output S (Case 1).

174 Wastewater and Water Quality

Figure 14. Time evolution of output O (Case 1).

Figure 15. Profile of control input D (Case 1).

to maintain the controlled output y very close to its desired value, despite the high variation of Sin and Fin as well as of the unmeasurable influent dissolved concentration Oin and time variation of some process parameters. Even if the control inputs are more affected by noisy measurements, the behavior of the controlled system remains satisfactory.

Case 2. In this case the closed-loop system is based on the structure of robust controllers (25) and (26) under the following assumptions:


In our analysis we assume that the time variations of μmax and KS are those from Case 1, that is μmax ∈ μ� max; μ<sup>þ</sup> max � � <sup>¼</sup> <sup>0</sup>:5μ<sup>0</sup> max; 1:5μ<sup>0</sup> max � �, and KS <sup>∈</sup> <sup>K</sup>� <sup>S</sup> ; K<sup>þ</sup> S � � <sup>¼</sup> <sup>0</sup>:75K<sup>0</sup> <sup>S</sup>; 1:25K<sup>0</sup> S � �.

We assume also that the time variation of <sup>r</sup> is like in Case 1, that is, <sup>r</sup><sup>∈</sup> <sup>r</sup>�; <sup>r</sup><sup>þ</sup> ½ �¼ <sup>0</sup>:5r<sup>0</sup>; <sup>1</sup>:5r<sup>0</sup> � �. As we mentioned above, in the control laws (25) and (26), the values of μ<sup>þ</sup> and μ� are calculated as μ� ¼ μ� maxS<sup>=</sup> <sup>K</sup> <sup>∓</sup> <sup>S</sup> <sup>þ</sup> <sup>S</sup> � � � <sup>O</sup>=ð Þ KO <sup>þ</sup> <sup>O</sup> .

The behavior of closed-loop system using robust controllers (25) and (26) by comparison to the linearizing law (8) is presented in Figures 19–22. The gains of control laws (25) are the same as in the first case, i.e., λ<sup>1</sup> ¼ λ<sup>2</sup> ¼ 2. The estimates of lower and upper bounds of variable X are presented in Figure 23. The estimated values <sup>X</sup><sup>b</sup> <sup>þ</sup> and <sup>X</sup><sup>b</sup> � are obtained by using the interval observers (24) and (14)–(18), where the input vectors v<sup>þ</sup> and v� contain the known bounds S� in and O� in and S<sup>þ</sup> in and O<sup>þ</sup> in, respectively. The state initial conditions are unknown, but some

guaranteed lower and upper bounds are assumed as 245 ¼ X�ð Þ0 ≤ Xð Þ0 ≤ Xþð Þ¼ 0 255 (g/l). The time evolution of the uncertain but bounded time-varying parameter μ as well as of its

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions

http://dx.doi.org/10.5772/intechopen.74827

177

bounds is shown in Figure 24.

Figure 22. Profile of control input FO—Case 2.

Figure 20. Time evolution of output O—Case 2.

Figure 21. Profile of control input D—Case 2.

Figure 19. Time evolution of output S—Case 2.

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions http://dx.doi.org/10.5772/intechopen.74827 177

Figure 20. Time evolution of output O—Case 2.

Case 2. In this case the closed-loop system is based on the structure of robust controllers (25)

max ≤ μmaxð Þt ≤ μ<sup>þ</sup>

• The rate of recycled sludge r and the yield coefficient Y are time-varying, but some lower

• All the other kinetics and process coefficients are constant and known; states X and Xr are

In our analysis we assume that the time variations of μmax and KS are those from Case 1, that is

We assume also that the time variation of <sup>r</sup> is like in Case 1, that is, <sup>r</sup><sup>∈</sup> <sup>r</sup>�; <sup>r</sup><sup>þ</sup> ½ �¼ <sup>0</sup>:5r<sup>0</sup>; <sup>1</sup>:5r<sup>0</sup> � �. As we mentioned above, in the control laws (25) and (26), the values of μ<sup>þ</sup> and μ� are

The behavior of closed-loop system using robust controllers (25) and (26) by comparison to the linearizing law (8) is presented in Figures 19–22. The gains of control laws (25) are the same as in the first case, i.e., λ<sup>1</sup> ¼ λ<sup>2</sup> ¼ 2. The estimates of lower and upper bounds of variable X are

observers (24) and (14)–(18), where the input vectors v<sup>þ</sup> and v� contain the known bounds S�

in and O<sup>þ</sup>

<sup>S</sup> are two uncertain and time-varying parameters, but some lower and upper

in, respectively).

and <sup>X</sup><sup>b</sup> �

in, respectively. The state initial conditions are unknown, but some

<sup>S</sup> ; K<sup>þ</sup> S � � <sup>¼</sup> <sup>0</sup>:75K<sup>0</sup>

max and K�

<sup>S</sup> ≤ KSð Þt ≤ K<sup>þ</sup>

<sup>r</sup> and Xþ, X<sup>þ</sup>

S .

<sup>S</sup>; 1:25K<sup>0</sup> S

are obtained by using the interval

in

� �.

<sup>r</sup> will be estimated,

in and O� in

• Sin and Oin are not measurable, but some lower and upper bounds, denoted by S�

in, respectively, as in Figures 11 and 12, are given.

• Fin is time-varying as in Case 1, and the variables S and O are known (measurable).

and upper bounds of them are known, i.e., r� ≤ r tð Þ ≤ r<sup>þ</sup> and Y� ≤Y tð Þ ≤Y<sup>þ</sup>.

unmeasurable (the lower and upper bounds X�, X�

max; 1:5μ<sup>0</sup>

in and S<sup>þ</sup>

max � �, and KS ∈ K�

<sup>S</sup> <sup>þ</sup> <sup>S</sup> � � � <sup>O</sup>=ð Þ KO <sup>þ</sup> <sup>O</sup> .

in and O�

maxS<sup>=</sup> <sup>K</sup> <sup>∓</sup>

presented in Figure 23. The estimated values <sup>X</sup><sup>b</sup> <sup>þ</sup>

in and O<sup>þ</sup>

Figure 19. Time evolution of output S—Case 2.

and (26) under the following assumptions:

bounds of them are known, i.e., μ�

and S<sup>þ</sup>

176 Wastewater and Water Quality

max and <sup>K</sup><sup>0</sup>

• μ<sup>0</sup>

μmax ∈ μ�

and O�

in and O<sup>þ</sup>

corresponding to S�

max; μ<sup>þ</sup> max � � <sup>¼</sup> <sup>0</sup>:5μ<sup>0</sup>

calculated as μ� ¼ μ�

in and S<sup>þ</sup>

Figure 21. Profile of control input D—Case 2.

Figure 22. Profile of control input FO—Case 2.

guaranteed lower and upper bounds are assumed as 245 ¼ X�ð Þ0 ≤ Xð Þ0 ≤ Xþð Þ¼ 0 255 (g/l). The time evolution of the uncertain but bounded time-varying parameter μ as well as of its bounds is shown in Figure 24.

The implemented DCS-SCADA architecture of the WTP was organized as a distributed and hierarchized control system, developed on four levels. The first three levels were approached in this chapter: the field level, the direct control level, and the plant supervisory level. The structure and the functionality of these levels were described. The primary control loops were dedicated to the control of main technological variables such as levels, dissolved oxygen

Distributed Control Systems for a Wastewater Treatment Plant: Architectures and Advanced Control Solutions

http://dx.doi.org/10.5772/intechopen.74827

179

The analysis of the WTP behavior showed that the performance improvement of the control system is possible by developing advanced control solutions for the activated sludge bioprocess that takes place in the WTP. Therefore, multivariable adaptive and robust control

The main control objective for the activated sludge process is to maintain the pollution level at a desired low value in spite of load and concentration variations of the pollutant. The controlled variables were the concentrations of pollutant and dissolved oxygen. Two nonlinear control strategies were proposed: an adaptive control scheme and a robust control structure. The adaptive control law was developed under the assumption that the growth rates were unknown but the influent flow rate was measurable. The robust control structure was designed under more realistic suppositions that the growth rates are uncertain and the influent concentrations are completely unknown, but lower and upper bounds of growth rates and of influent organic load (possibly time-varying) are known. Also, the uncertain process parameters were replaced by

The proposed control strategies were tested in realistic simulation scenarios, by using noisy measurements of the available states. Taking into account all the uncertainties, disturbances, and noisy data acting on the bioprocess, the conclusion is that the adaptive and especially the robust controllers can constitute a good choice for the control of such class of wastewater treatment bioprocesses. As future research, the implementation of the proposed control algorithms for the activated sludge process at WTP Calafat will be ensured within the project TISIPRO. The proposed control architecture and solutions envisaged the WTP Calafat but can

This work was supported by UEFISCDI, project ADCOSBIO no. 211/2014 (2014–2017); by the University of Craiova and Water Company Oltenia, contract no. 168/2017; and by the Compet-

The authors declare that there is no conflict of interest about the publication of this chapter.

itiveness Operational Program, project TISIPRO no. P\_40\_416/105736 (2016–2021).

concentrations, recirculation flows, activated sludge flows, etc.

their lower and upper bounds assumed known.

Acknowledgements

Conflict of interest

algorithms were proposed and will be implemented at level 2 of the DCS.

be adapted and implemented for other similar WTPs from the WCO.

Figure 23. Estimates of bounds of X—Case 2.

Figure 24. Profiles of μ and its bounds—Case 2.

Note that the reference profiles of S\* and O\* are the same as in the first case. As in the adaptive case, the measurements of controlled variable S and O are corrupted with additive zero mean white noises (2.5% from their nominal values). From Figures 19–22, it can be seen that the behavior of overall system with robust controllers (25) and (26), even if this controller uses much less a priori information and is affected by measurement noises, is correct, being close to the behavior of closed-loop system with adaptive controller (20) as well as to the behavior of closed-loop system in the ideal case (process completely known).

#### 5. Conclusions

In this chapter, a distributed and hierarchized control system implemented at WTP Calafat was presented and analyzed. Also, advanced control solutions for the activated sludge bioprocess taking place in the WTP were proposed.

The implemented DCS-SCADA architecture of the WTP was organized as a distributed and hierarchized control system, developed on four levels. The first three levels were approached in this chapter: the field level, the direct control level, and the plant supervisory level. The structure and the functionality of these levels were described. The primary control loops were dedicated to the control of main technological variables such as levels, dissolved oxygen concentrations, recirculation flows, activated sludge flows, etc.

The analysis of the WTP behavior showed that the performance improvement of the control system is possible by developing advanced control solutions for the activated sludge bioprocess that takes place in the WTP. Therefore, multivariable adaptive and robust control algorithms were proposed and will be implemented at level 2 of the DCS.

The main control objective for the activated sludge process is to maintain the pollution level at a desired low value in spite of load and concentration variations of the pollutant. The controlled variables were the concentrations of pollutant and dissolved oxygen. Two nonlinear control strategies were proposed: an adaptive control scheme and a robust control structure. The adaptive control law was developed under the assumption that the growth rates were unknown but the influent flow rate was measurable. The robust control structure was designed under more realistic suppositions that the growth rates are uncertain and the influent concentrations are completely unknown, but lower and upper bounds of growth rates and of influent organic load (possibly time-varying) are known. Also, the uncertain process parameters were replaced by their lower and upper bounds assumed known.

The proposed control strategies were tested in realistic simulation scenarios, by using noisy measurements of the available states. Taking into account all the uncertainties, disturbances, and noisy data acting on the bioprocess, the conclusion is that the adaptive and especially the robust controllers can constitute a good choice for the control of such class of wastewater treatment bioprocesses. As future research, the implementation of the proposed control algorithms for the activated sludge process at WTP Calafat will be ensured within the project TISIPRO. The proposed control architecture and solutions envisaged the WTP Calafat but can be adapted and implemented for other similar WTPs from the WCO.
