Minimization of Pollution Concentration on a Given Time Interval for theWasteWater Cleaning Plant

A model of a waste water treatment plant is investigated. The model is described by a nonlinear system of two differential equations with one bounded control. An optimal control problem of minimizing concentration of the polluted water on the given time interval is stated and solved analytically with the use of the Pontryagin Maximum Principle and Green’s Theorem. Computer simulations of a model of an industrial waste water treatment plant show the advantage of using our optimal strategy. Possible applications are discussed.


Introduction
The activated sludge process (ASP) is a biochemical process for treating sewage and industrial waste water that uses air (or oxygen) and microorganisms to biologically oxidize organic pollutants, producing a waste sludge (or floc) containing the oxidized material.In general, an activated sludge process has an aeration tank where air (or oxygen) is injected and thoroughly mixed into the waste water and a settling tank (usually referred to as a "clarifier" or "settler").Flocculation-agglomeration is a process where a solute comes out of solution in the form of floc or flakes.Part of the waste sludge is recycled to the aeration tank where the remaining waste sludge is removed for further treatment and ultimate disposal.A diagram of the process is shown in Figure 1.
The optimal operation of the waste water processes with biological treatment is challenging because of the strong effluent requirements, the complexity of these processes as an object of control, and the need to reduce the operation cost [1].
During the last 30 years various control strategies for the ASP have been developed [2,3].Establishing optimal working conditions and control strategies is frequently accomplished with the aid of mathematical models [1,[4][5][6][7].Relevant work in the investigation and comparison of control strategies was done by [8][9][10][11][12][13].Obviously, the solution depends on the model.What unites all these papers is that either the considered models are so complex that they cannot be solved analytically or that the controls are not bounded and therefore the realism of the model is questionable.The model proposed in [4] is simple enough that it can be investigated analytically.On the other hand, it properly corresponds to the main steps of the ASP and water cleaning control process.In [4] an optimal control problem of the minimization of the waste concentration in the ASP was stated and the Pontryagin Maximum Principle [14] was offered for its solution.However, the complete analysis of the corresponding boundary value problem for the Maximum Principle was not conducted.The author simply offered a numerical solution to the problem at different piecewise constant controls.
The traditional method for solution of optimal control problems is the Pontryagin Maximum Principle (PMP).Moreover, there exist optimal control problems, for which the PMP gives a complete analytical solution.It occurs when the two-point boundary value problem for the Maximum Principle has a unique solution, or when the PMP is not only a necessary, but also a sufficient optimality condition [15].There exist other optimal control problems, for which the approach based on Green's Theorem is an effective tool for obtaining the complete analytical solutions [16,17].In [7] there is an example of such an optimal control problem.
In practical applications one has to take into account the presence of several perturbations, which may degrade the performance of obtained optimal control law.For example, the parameters of the model may not be precisely known.The evolution of the model may be affected by random external perturbations.At last, the state variables of the model may not be accurately measured.Therefore, it is important to design a robust feedback optimal control, which still accomplishes the desired task in the presence of appointed perturbations.Different approaches to the solution of this problem for the ASP are considered in [7,[18][19][20][21][22][23][24].
The optimal control problem stated in [4] does not fit either the first or the second types of the optimal control problems.In fact, on one hand, using the PMP shows a possibility of the existence of singular arcs at corresponding optimal trajectories [25].The presence of them greatly complicates the analytical analysis of the considered problem.On the other hand, using the approach based on Green's Theorem proves the absence of singular arcs at optimal trajectories.Simultaneously, this approach overestimates the number of switchings of optimal controls.Lastly, only a combination of results from these different approaches allows us to solve the considered optimal control problem analytically.
Our paper deals with the complete analysis of the model and its corresponding optimal control problem proposed by [4].It is organized as follows.In Section 2, we discuss the model.In Section 3, we state optimal control problem of minimizing water pollution concentrations on a given time interval.In Section 4, we establish properties of the state variables.Then we find optimal solutions of the considered problem in two stages.At first, in Section 5 we investigate the optimal control problem using the Pontryagin Maximum Principle.Then, in Section 6 we apply to the considered problem the approach based on Green's Theorem.As a final result of these investigations we obtain possible types of optimal solutions.They allow us in Section 7 to reduce the optimal control problem to problem of the finite dimensional optimization.The last problem is solved numerically.
A numerical simulation of the ASP for different parameters of the model is conducted in Section 8. Finally, Section 9 presents our conclusions.

The Model
Let us consider the model of an activated sludge process.A simplified diagram can be shown in Figure 2.
The process has a reaction tank and a settling tank.Polluted water is introduced into the reaction tank at rate b and concentration a 2 .Simultaneously, the reaction tank receives biomass x at a rate u with concentration a 1 .Once in the reaction tank, biomass feast on contaminants.The lesspolluted water now leaves the reaction tank and proceeds to a filter.The growth rate of the biomass is assumed to be of the Michaelis-Menten type.Flocculation-agglomeration allows a solute to come out of solution in the form of flock or flakes.Part of the waste sludge is recycled to the aeration tank where the remaining waste sludge is removed for further treatment.This process can be described by the following system of differential equations: Here x(t) is the concentration of biomass, s(t) is the concentration of polluted water, Y is the substrate utilizationyield coefficient, μ 0 is the maximal-specific rate of bacteria growth, k the saturation coefficient.
We consider the value u as a control function u(t) and the set P(T) is the set of all Lebegue measurable functions u(t) such that 0 < u 1 ≤ u(t) ≤ u 2 for almost all t ∈ [0, T].The recycle sludge rate u(t) is not allowed to take values below a certain lower limit u 1 in order to prevent the biomass from being swept out of the aeration tank.An upper limit u 2 for u(t) is given by the limited power of the recycle pump.
For the model (1) assume k s.This case is realistic since one normally tries to keep the substrate-to-biomass ratio comparatively low.Denoting μ = μ 0 /k the simplified system can be written as Numerical modeling conducted in [4] shows that the second term in the first equation of ( 2) can be ignored.Finally we obtain the following system: ( This model will be considered further.

Optimal Control Problem of Minimizing Pollution Concentration on a Given Time Interval
Let s(t) be the pollution concentration at moment t.For system (3) we will consider an optimal control problem of minimizing the total concentration of pollution over the time interval [0, T].The problem can be written as Let us rewrite the problem (3), (4) in the form, which is more convenient for the subsequent analysis.For this we will use the following substitutions of the state variables: and the control v = b + u.Moreover, we denote σ = μa 1 /Y.Further, instead of the set P(T) we will consider the set D(T), which consists of all Lebegue measurable functions v(t) such that the inequalities Then problem (3), ( 4) can be rewritten as the following optimal control problem: where The existence of the optimal control v * (t) and its corresponding optimal solutions x * 1 (t), x * 2 (t) for the optimal control problems (7), and (8) follows from [26].

Properties of the State Variables
We have the following statement, which can be easily proven using direct integration of the system (7).Lemma 1.Let v(•) ∈ D(T) be some control function.Then there exist corresponding to this control, v(t), solutions x 1 (t), x 2 (t) to the system (7), which on the closed interval [0, T] satisfy the inequalities Analyzing system of ( 7) with the use of Lemma 1 we can conclude that if at some moment of time t ∈ [0, T] we have that By analogy if at some moment t we have x 2 (t) = 1, then from ( 6) we obtain relationship The validity of these relationships leads to the following statement.
From results of Lemma 2 the following statement is true.
Lemma 3. Let v(•) ∈ D(T) be some control function.Suppose that at some moments of time η 1 , η 2 ∈ (0, T) the following relationships hold: Moreover, we have the statement.

Lemma 4. Let v(•)
∈ D(T) be some control function.Suppose that at some moments of time θ 1 , θ 2 ∈ (0, T) the following relationships hold: then one has inequalities respectively.
The validity of Lemma 4 follows from the relationships (6), and (7).

Pontryagin Maximum Principle
In order to solve the optimal control problems (7), and ( 8) at first we will apply the Pontryagin Maximum Principle [14,15].For the optimal control v * (t) and corresponding optimal trajectories x * 1 (t), x * 2 (t) there exist nontrivial solutions ψ * 1 (t), ψ * 2 (t) of the adjoint system for which the control v * (t) is given by where is the switching function.As it follows from (17), the function L(t) determines the type of the optimal control v * (t).Systems of ( 7), ( 16) and relationships (17) form the two point boundary value problem for the Maximum Principle.Let us study this problem.
Lemma 5. Let v * (t) be the optimal control, x * 1 (t) and x * 2 (t) are optimal trajectories and ψ * 1 (t), ψ * 2 (t) are the solutions of the adjoint system (16) corresponding to them.Then the following inequalities hold: The proof of this statement is based on integration of the system (16) with the use of Lemma 1.
Using equations of the systems (7), and ( 16) let us find the derivative of the switching function L(t).We have the expression Now, let us study the properties of the optimal control v * (t).The following statements are true.Lemma 6.There exists such time θ ∈ [0, T) that for the optimal control v * (t) the equality v * (t) = v 2 is valid for all t ∈ (θ, T]. Proof.For the switching function L(t) from the terminal conditions of the system (16) and formulas (18), and (20) we have that From Lemma 1 we obtain the inequality L(T) < 0. Since L(t) is continuous function, there exists value θ ∈ [0, T) such that L(t) > 0 for all t ∈ (θ, T].Furthermore, from (17) we have v * (t) = v 2 for t ∈ (θ, T].

Lemma 7.
Let there exists such moment of time τ ∈ [0, T) that Proof.From results of Lemmas 1, 2, and 5 for the switching function L(t) the inequality L(t) > 0 is true for all t ∈ [τ, T].Therefore, the desired result follows from (17).
From Lemma 7 it immediately follows that if the optimal trajectory (x * 1 (t), x * 2 (t)) gets into the region then the corresponding optimal control v * (t) takes value v 2 .Therefore, the following investigations will be conducted under the condition x 1 > 1.
Let us strengthen the result from Lemma 7. We have the statement.
The validity of this fact follows from the inequality L(τ) > 0, the continuity of the switching function L(t), and the formula (17) for the optimal control v * (t).
From this statement we have the existence of the region located in the set and attached from the right to the set Q, in which the optimal control v * (t) also takes value v 2 .At Figure 3 this region is shown hatched.

Green's Theorem
For the subsequent analysis of the optimal control problems (7), and (8) we will use the approach, based on the applying of Green's Theorem [16,17].Following from arguments in [16], at first we will conduct auxiliary investigations.
For all (x 1 , x 2 ) ∈ W we consider the function: Let us study the curve Φ(x 1 , x 2 ) = 0. We have the following function We see that it is defined only by x 1 > x 1 , where Moreover, the relationships hold Note that for the derivatives ḟ (x 1 ), f (x 1 ) of the function x 2 = f (x 1 ) at x 1 > x 1 we have the expressions Then the function x 2 = f (x 1 ) is decreasing and concave up.The graph of this function and the allocation of signs of the function Φ(x 1 , x 2 ) are shown in Figure 4.
For the curve Φ(x 1 , x 2 ) = 0 we have the following statement.
Lemma 10.In the region W there are no interval Δ ⊂ [0, T] and values of control v(•) ∈ D(T) such that the curve Φ(x 1 , x 2 ) = 0 is a trajectory of the system (7).Moreover, if there exists a moment of time τ ∈ (0, T) such that for the trajectories x 1 (t), x 2 (t) of the system (7), corresponding to the control v(•) ∈ D(T), the equality Φ(x 1 (τ), x 2 (τ)) = 0 is valid, then the following inequalities hold: Proof.It is sufficient to show the validity of inequalities (29).
The first inequality follows from Lemma 4. In order to prove the second inequality we substitute the function into the second equation of the system (7).After necessary transformations we find the expression The statement is proven.
Remark 11.Lemma 10 is valid for the optimal control v * (t) and its corresponding optimal trajectories x * Now, for all (x 1 , x 2 ) ∈ W for which Φ(x 1 , x 2 ) / = 0 we consider the function Let us study the curve Ω(x 1 , x 2 ) = 0. We have the following function: We see that it is defined only by x 1 > x 1 , where Moreover, the relationships hold where x 2 = 2b/σ.Note that for the derivatives ġ(x 1 ), g(x 1 ) of the function x 2 = g(x 1 ) at x 1 > x 1 we have the expressions Therefore, the function x 2 = g(x 1 ) is decreasing and concave up.The graph of this function and the allocation of signs of the function Ω(x 1 , x 2 ) are shown in Figure 5.

Lemma 12. In the region
The validity of this fact follows from the easily checked inequality f ( x 1 ) < x 2 and the properties of the functions x 2 = f (x 1 ), x 2 = g(x 1 ) obtained above.Lemma 13.In the region W there are no interval Δ ⊂ [0, T] and values of control v(•) ∈ D(T) such that the curve Ω(x 1 , x 2 ) = 0 is a trajectory of the system (7).Moreover, if there exists a moment of time θ ∈ (0, T) such that for the trajectories x 1 (t), x 2 (t) of the system (7), corresponding to the control v(•) ∈ D(T), the equality Ω(x 1 (θ), x 2 (θ)) = 0 is valid, then the following inequalities hold: Proof.It is sufficient to show the validity of inequalities (36).The first inequality follows from Lemma 4. In order to prove the second inequality we substitute the function x 2 = g(x 1 ) into the second equation of the system (7).After necessary transformations we find the expression The statement is proven.
Remark 14. Lemma 12 is valid for the optimal control v * (t) and its corresponding optimal trajectories x * Next, using the preceding properties of the functions Φ(x 1 , x 2 ), Ω(x 1 , x 2 ) we conduct the arguments, which are similar to the arguments presented in [16].One of these arguments is the use of Green's Theorem.In this way, we establish the validity of the bang-bang principle for the optimal control problems (7), and (8).
Theorem 15.Let v * (t) be the optimal control, and x * 1 (t), x * 2 (t) are its corresponding optimal trajectories in the problems (7), and (8).Then at every moment of time t ∈ (0, T), for which in the region W the relationships hold the control v * (t) takes only values v 1 and v 2 .
Now, using the definitions of the sets Q, W and results from Lemmas 7, 10, and 12 we will strengthen Theorem 13.As a result, we will formulate the final statement about the type of the optimal control v * (t).
Theorem 16.At the problems (7), and (8) the optimal control v * (t) is the piecewise constant function, which takes only values v 1 and v 2 .
Next, we study the question about the number of switchings of the optimal control v * (t).
At first, we note that as it follows from Lemma 7, if the optimal trajectory (x * 1 (t), x * 2 (t)) gets into the region Q, then the corresponding optimal control v * (t) has no switchings and takes only value v 2 .Now, let us consider the region W. We conduct the arguments, which are similar to the arguments presented in [16].As in Theorem 13 one of these arguments is the use of Green's Theorem.In this way, we obtain the following statements.
Lemma 17.Let v * (t) be the optimal control, and x * 1 (t), x * 2 (t) are its corresponding optimal trajectories in the problems (7), and (8).Suppose there exists such interval Δ ⊂ [0, T], on which the following inequalities hold: Then on this interval Δ the control v * (t) takes either the constant value from {v 1 ; v 2 }, or it has the moment of switching τ ∈ Δ, for which Lemma 18.Let v * (t) be the optimal control, and x * 1 (t), x * 2 (t) are its corresponding optimal trajectories in the problem (7), (8).Suppose there exists such interval Δ ⊂ [0, T], on which the following inequalities hold: Then on this interval Δ the control v * (t) takes either the constant value from {v 1 ; v 2 }, or it has the moment of switching θ ∈ Δ, for which Lemma 19.Let v * (t) be the optimal control, and x * 1 (t), x * 2 (t) are its corresponding optimal trajectories in the problems (7), and (8).Suppose there exists such interval Δ ⊂ [0, T], on which the following inequalities hold: Then on this interval Δ the control v * (t) takes either the constant value from {v 1 ; v 2 }, or it has the moment of switching η ∈ Δ, for which Lemma 20.Let there exists the moment of time τ ∈ (0, T) such that for the optimal trajectories x * 1 (t), x * 2 (t) the equality Ω(x * 1 (τ), x * 2 (τ)) = 0 is valid.Then the value τ is not the moment of switching for the corresponding optimal control v * (t).
From Lemmas 15-17 we make the following conclusion.
Corollary 21.Let v * (t) be the optimal control, and x * 1 (t), x * 2 (t) are its corresponding optimal trajectories.Let one suppose that V ⊂ [0, T] is the interval of the maximum length, on which the functions Φ(x 1 , x 2 ), Ω(x 1 , x 2 ) are sign defined.Then on this interval V the control v * (t) is piecewise constant function with values from {v 1 ; v 2 }, which has at most one moment of switching.
The possible types of switchings of the optimal control v * (t) in dependence on signs of the functions ) are presented by Lemmas 15-17.
Let us introduce the sets It is clear that W = Π Ψ G. Sets Π, Ψ, G are shown in Figure 6.
Summarizing the preceding arguments we conclude the following.
If the optimal trajectory (x * 1 (t), x * 2 (t)) gets into the region G (higher than the curve Ω(x 1 , x 2 ) = 0), then the corresponding optimal control v * (t) is either constant with values from {v 1 ; v 2 }, or it has the switching from v 2 to v 1 .
If the optimal trajectory (x * 1 (t), x * 2 (t)) gets into the region Π (to the left of the curve Φ(x 1 , x 2 ) = 0 and to the right of the line x 1 = 1), then the corresponding optimal control v * (t) is either constant with values from {v 1 ; v 2 }, or it has the switching from v 2 to v 1 .
Lemma 22.Let v * (t) be the optimal control, and x * 1 (t), x * 2 (t) are its corresponding optimal trajectories.Suppose that on the some interval Δ ⊂ [0, T] the trajectory (x * 1 (t), x * 2 (t)) gets into the region Π.Then on this interval Δ the control v * (t) is the constant function with value v 2 .
Proof.Let us assume the contradiction.Then from Lemma 17 it follows that the optimal control v * (t) has the moment of switching τ ∈ Δ, for which the equalities (44) hold.
Next, we consider two possible cases.Our mathematical investigation of the activated sludge process can be summarized by the following components: (1) Complete investigation of a model (7) of the activated sludge process with one bounded control and its corresponding optimal control problem.
(2) Development of an optimal control strategy for the recycle flow rate analytically.
(3) Computer simulation of the controlled activated sludge process for different model parameters.
Finally, it should be noted that the ideas presented in this study can be applied to other control systems with similar properties.

1 b, a 2 Figure 2 :
Figure 2: Simplified diagram of an activated sludge process.
Then from Lemma 6 it follows the existence of the interval (θ, T], θ > τ, on which the control v * (t) takes value v 2 .Therefore, on the interval (τ, θ) there exists the moment of time η, in which the switching of the control v * (t) from v 1 to v 2 occurs.This fact contradicts Lemma 17.Case 24.For the trajectory (x * 1 (t), x * 2 (t)) the inclusionx * 1 (T), x * 2 (T) ∈ Q