Finite-Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion

An activated sludge process (ASP) is a biochemical process employed for treating sewage and industrial waste-water, which uses microorganisms and air (or oxygen) to biologically oxidize organic pollutants, producing a waste sludge (or floc) containing the oxidized material. The optimal operation of the biological treatment processes is a challenging task because of the stringent effluent requirements, the complexity of processes as an object of control and the need to reduce the operation cost. US law has strict requirements on the effluent quality of the ASP; similar strict requirements were adopted during the last decade in Europe and in South Africa (Maine Department of Environmental Protection, Augusta, ME, 2010; Tzoneva, 2007).


Introduction
An activated sludge process (ASP) is a biochemical process employed for treating sewage and industrial waste-water, which uses microorganisms and air (or oxygen) to biologically oxidize organic pollutants, producing a waste sludge (or floc) containing the oxidized material.The optimal operation of the biological treatment processes is a challenging task because of the stringent effluent requirements, the complexity of processes as an object of control and the need to reduce the operation cost.US law has strict requirements on the effluent quality of the ASP; similar strict requirements were adopted during the last decade in Europe and in South Africa (Maine Department of Environmental Protection, Augusta, ME, 2010;Tzoneva, 2007).
Polluted water contains a wide range of inorganic and organic chemical species and microorganisms, including pathogens.Filtered concentrated sludge is produced at initial stages of the treatment.The objectives of the key subsequent stage are eliminating potential pathogenic micro-organisms and reducing organic chemical content, which might act as a substrate for further microbial growth, to an acceptable level.Autothermal thermophilic aerobic digestion (ATAD) is a process that is widely used to achieve these goals.ATAD makes use of bacterial growth within the sludge both to reduce organic chemical content and to kill pathogenic bacteria; aeration of the sludge promotes the growth of aerobic bacteria, which feed on and reduce the organic substrates in the sludge.A review of the ATAD origin, design and operation can be found in Bojarski et al. (2010); Capon-Garcia et al. (2010); Graells et al. (2010); Layden (2007); Rojas & Zhelev (2009).

Waste-water treatment plant operation
This subsection is extracted from Rojas et al. (2010).
ATAD is operated as a batch or semi-batch process.A large reactor containing sludge receives an additional volume of untreated sludge at the start of a batch via a feed inlet (see Figures 1

Finite-Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion
and 2).During the batch reaction air is pumped continuously into the reactor providing both the oxygenation required for aerobic bacterial growth and the mechanical mixing of the sludge.Digestion of organic substrates proceeds with bacterial growth, predominantly of thermophiles due to elevated temperature.At the end of the batch period, a fraction of the treated volume is removed and is immediately replaced by the next batch of intake sludge.Thus the outflow sludge has the same composition as the sludge in the reactor at the end of the batch reaction time t.Batch outflow and inflow cannot be opened at the same time to prevent the untreated inflow sludge might from be drawn off with and taint the outflow sludge.The time between successive batch intakes is typically fixed at 24 hours for staffing  reasons.In order to achieve the desired treatment outcomes, treatment plant designs may include a single ATAD reactor stage (as is shown in Figure 1), or two reactors in series with outflow from the first reactor being inflow into the second.

Models of ASP and ATAD
In order to improve efficiency of ATAD process, in recent decades various control strategies for the ASP have been developed by engineers.Simple strategies are typically limited to the maintenance of some desired values for easily determinable process parameters, such as food-microorganism ratio, sludge recycle flow rate, or oxygen concentration in the aeration basin (Holmberg, 1982).More complex models take into consideration that the process also depends on a number of working conditions, such as air pump power to regulate the mean oxygen concentration (Rinaldi et al., 1979).Optimal working conditions and control strategies are usually established with a support of mathematical models (Brune, 1985;Kobouris & Georgakakos, 1991;Moreno, 1999;Moreno et al., 2006;Tzoneva, 2007); relevant studies and comparison of control strategies have been done by Debuscher et al. (1999); Fikar et al. (2005); Lindberg (1998); Lukasse et al. (1998); Potter et al. (1996); Qin et al. (1997).
Obviously, a particular solution depends on the model that was employed; over the last 50 years a variety of models of different level of complexity were proposed for ASP.It should be taken into consideration, however, that there is considerable uncertainty in inferring both the functional description of processes and the accuracy of parameterizations when applying laboratory-derived models to a real-life system.In particular, many existing models of the waste-water treatment are motivated by microbiological and engineering interest and have been constructed with an intention to incorporate as much as possible of the apparent understanding of underlying processes.As a result, such models tend to include too many variables, processes and parameters, which are known with a substantial degree of uncertainty.
Laboratory scale experiments provided understanding (to varying degrees) of many of the microbiological and chemical processes involved.By encapsulating much of this understanding in mathematical models, engineers provided tools for computer simulations that can be used in the design process.
The "Activated Sludge Model 1" (ASM1) (Henze et al., 2000) has achieved a broad level of acceptance in the waste-water treatment community.Based on the dominance of the ASM1 model in the field, its extension to the ATAD process as set out by Gomez et al. (2007) appears to create a de facto standard for modeling this process.The drawbacks of the model are also obvious (Rojas et al., 2010).The full-scale ASM1 model incorporates large numbers of variables and functional responses, and consequently requires many parameters.The motivation for including these particularities in the model is predominantly microbiological, and seems to arise from the urge to include all possible components about which there is some knowledge.However, details for many of these functional responses are unknown, and the accuracy of parameter values is uncertain: they are dependent on the chemical and microbiological make-up of the particular sludge, and therefore typically used as fitting parameters.With such a highly parameterized model, sets of parameter values can be found to fit most data, but it is unclear whether the model remains reliable in such situations.Applying a parameterized model under different (but physically reasonable) operating conditions may give spurious modeling artifacts.This may also cause numerical difficulties in attempting any optimization.Moreover, a mathematical model is not very useful, if it cannot be completely investigated using existing optimization methods.Mathematical optimization can be conducted with the use of optimal control theory.

93
Finite-Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion www.intechopen.com

Optimal control of nonlinear models
Optimal control problem for a system of ordinary differential equations is the problem of finding an extremum of a functional (objective function) under differential restrictions in the infinite dimensional functional space (for example, the space of all bounded piecewise continuous functions).This is a challenging mathematical problem.There are a number of approaches that allow to reduce the problem to the analysis of a finite dimensional problem; one such effective approach is the Pontryagin Maximum Principle (PMP) (Pontryagin et al., 1962), which is a necessary condition for optimality in the original infinitely dimensional problem.It reduces the optimal control problem to the analysis of two point boundary value problem of the Maximum Principle.This boundary value problem is finite in the sense that its solutions, phase vector and adjoint variable, depend either on the initial or terminal conditions, which belong to the elements of a finite dimensional Euclidean space.The optimal control is uniquely determined by the so-called maximum condition.Therefore, a desirable control depends on the variables selected as the initial or terminal conditions of the phase vector and the adjoint variable.Thus, the considered optimal control problem can be reduced to a finite problem, and the well-known methods can be applied to solve it (Fedorenko, 1978).Of course, these arguments exclude from considerations possibilities such as singular arcs in the corresponding optimal control (Bonnard & Chyba, 2003), or situations when the control has an infinite number of switchings on a finite time interval (Bressan & Piccoli, 2007).Under the assumptions above, look at the boundary value problem of the Maximum Principle on the other side.For a system of ordinary differential equations which is linear in controls, the maximum condition almost everywhere uniquely determines the optimal control in the form of a piecewise constant function with a finite number of switchings.If we take the moments of switching as the corresponding variables, then the phase vector and adjoint variable become dependent on these switchings, and the considered optimal control problem becomes finite in the sense that the required control belongs to the class of piecewise constant functions with an estimated finite number of switchings determined from the analysis of the maximum condition.Grigorieva & Khailov (2010a;b), which are associated with the problem of optimizing the waste-water treatment process, support these arguments.The considered model, which is due to Brune (1985), is sufficiently simple to be investigated analytically, while it adequately describes the principal features of the ASP and water cleaning control process Brune (1985) formulated an optimal control problem for the minimization of the waste concentration in the ASP and offered the PMP for its solution.However, the analysis of the corresponding boundary value problem for the Maximum Principle was not completed; instead the author offered a numerical solution to the problem for different piecewise constant controls.Grigorieva & Khailov (2010a;b) deal with the complete analysis of this model for a different objective functions.Grigorieva & Khailov (2010a) formulated the optimal control problem of minimizing the pollution concentrations at the terminal time and found optimal solutions for this.Authors also investigated how these optimal solutions depend on initial conditions and conducted numerical simulation of the ASP for different parameter values.Grigorieva & Khailov (2010b) stated an optimal control problem of minimizing the water pollution concentrations on a given time interval.The optimal solutions for this problem is found in two stages: firstly, the authors investigated the optimal control problem using the PMP.Secondly, an approach based on Green's Theorem (Hájek, 1991), was applied.As a result of this study the authors obtained possible types of optimal solutions.This study reviled a possibility of the existence of singular arcs at corresponding optimal trajectories (Bonnard & Chyba, 2003); this fact makes an analytical study of the problem extremely difficult.However, the approach based on Green's Theorem enabled the authors to prove the absence of singular arcs at optimal trajectories.In the same time, this approach overestimates the number of switchings for optimal controls.Ultimately, a combination of the results obtained applying these different approaches allowed to solve the considered optimal control problem analytically.
The model studied in these papers is not intended to be the finest or the most precise ASP model; on the contrary, it is robust and rather basic.However, it includes all the essential features of the process.Furthermore, the model is nonlinear and assumes a bounded control; these features make the model very interesting from the mathematical point of view.
An alternative approach, which also allows a reduction of the original optimal control problem to a finite dimensional problem, is a constructing of a finite dimensional parametrization by the moments of switching for some piecewise constant controls of the corresponding attainable set, which fully characterizes the behavior of the original control system.This approach can be applied to solve a range of problems, including: • estimating of control opportunity, that is investigating where trajectories of the system can lead under different admissible controls; • solving the controllability problem; • solving optimal control problems with a terminal functional, such as the problem of minimizing pollution at a terminal time; • solving a time optimal control problem (that is, how to move a system from an initial state to the terminal state for minimal time).
Methods for solving these problems, except the last one, with particular application to the optimal control for ATAD will be discussed in this Chapter.A time optimal control problem and optimal control problems with an integral functional, such as the problem of minimizing pollution for a specified time interval and the problem of minimizing energy consumption for aeration on a given time interval, are subjects of future research.

Rational and basic assumptions for modeling
The ATAD process is efficient but it can be costly, as it requires continuous aeration that generally is energy-consuming.Optimizing the aeration can significantly reduce the cost of operation.Existing ATAD models are far too large and complex, and this complexity prevents the application of the usual optimization techniques.Our aim is, therefore, to construct a model that retains the fundamental properties of the process (as well as these of the large scale existing models) while being sufficiently simple to allow the use of optimization procedures.With this intention in mind, we formulate and investigate a simplified model of the ATAD reaction based on the existing ASM1 model at thermophilic temperatures.
In this Chapter we formulate a model that (in contrast to a rather complex ASP1 model) we are capable of investigating analytically and optimizing numerically.This model includes the essential mechanisms of the ATAD process while ignoring the issues, which, though 95 Finite-Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion www.intechopen.commicrobiologically known, are not material to the process within the likely range of operating conditions.It is our expectation that this model will describe the process with a sufficient degree of accuracy while providing a suitable basis for optimization.A number of simplifying assumptions permit us to reduce the complexity of the model while retaining the essential aspects of the processes.These assumptions are summarized as follows: • We assume that the reactor in well-stirred (as it is in practice), and hence concentrations of the reagents are homogeneous throughout the volume.
• All the biological activity takes place only in the reactor.
• The batch outflow and inflow stages are of sufficiently short duration, and the biological activity during these stages is negligible.
• Aeration is sufficient, and anaerobic metabolic activity is negligible.
• We consider this process as a reaction with three reagents, namely: oxygen with concentration x(t), organic matter of concentration y(t), and bacteria of concentration z(t).
• The reaction is governed by the low of mass action.
• The aeration rate u(t) is the only control.This control function is bounded.

Mathematical model
In order to describe the process of aerobic biotreatment, we consider a simple mathematical model, which represent the process as a chemical reaction with three reagents, namely the concentration of oxygen x(t), organic matter with concentration y(t), and the thermophilic aerobic bacteria with concentration z(t).It is assumed that the mass in the reactor is well stirred, and hence the reactant concentrations are homogeneous in the volume.The changes of concentrations of the reagents are described by a three-dimensional nonlinear control system Its nonlinearity is justified by the law of mass action (Krasnov et al., 1995) describing the dependence of the rate of chemical reaction on the concentrations of initial substances.The first equation of system (1) represents the evolution of oxygen concentration: the first term, −x(t)y(t)z(t), describes the process of its absorption in the reaction, whereas the second term describes influx of oxygen (by pumping) into the reactor from outside.Here, u(t) is the rate of aeration, which at the same time is the control function.The second equation describes a decrease of the organic matter in the reaction.The third equation of system (1) shows an evolution of the active biomass concentration; the bacteria mass grows at the rate x(t)y(t)z(t) and decays at a rate b.The original system also includes positive initial conditions and a restriction on the rate of pumping air.We consider all possible Lebesgue measurable functions u(t), which for almost all t ∈ [0, T] satisfy the inequality 96 Industrial Waste www.intechopen.comas the admissible controls D(T).
The phase variables x, y, z of system (1) satisfy the following properties.
Lemma 1.Let u(•) ∈ D(T) be an arbitrary control.Then the corresponding solution w(t)= (x(t), y(t), z(t)) ⊤ of the system (1) is defined on the interval [0, T],thecomponentsx(t),y(t),z(t) of which satisfy the following inequalities: where x max ,y max ,z max -some positive constants depending on initial conditions x 0 ,y 0 ,z 0 and parameters m, b, u max , T of the original system.
Here and below, symbol ⊤ means transpose.
Proof.Let x(t), y(t), z(t) be solutions of system (1), which regarding the Existence and Uniqueness Theorem for the system of differential equations (Hartman, 1964), are defined on the biggest semi-interval Δ ⊆ [0, T].
We will write the solution of the second equation of system (1) as From this formula it follows that y(t) > 0forallt ∈ Δ.
Next, by analogy, we obtain the solution of the third equation of the considered system Finally, we can write the solution of the first equation of system (1) as From this formula regarding inequality (2) we find that x(t) > 0forallt ∈ Δ.
Therefore, we obtain the inequalities: that are valid for all t ∈ Δ.
Further, considering positiveness of solutions x(t) and z(t),f r o mf o r m u l a( 4 )w efi n dt h e inequality y(t) < y 0 for all t ∈ Δ.

97
Finite-Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion www.intechopen.com Then we find the inequality x(t) < x 0 + mu max T for all t ∈ Δ.
Using restrictions on solutions x(t) and y(t) obtained above, from formula (5) we have the relationship z(t) < z 0 e t 0 x(ξ)y(ξ)dξ < z 0 e y 0 T(x 0 +mu max T) .Therefore, we find the inequality z(t) < z 0 e y 0 T(x 0 +mu max T) for all t ∈ Δ.
Thus, solutions x(t), y(t), z(t) of system (1) on the semi-interval Δ ⊆ [0, T] are bounded, and so they cannot go to infinity.Regarding Corollary from Lemma ( §14) (Demidovich, 1967), solutions x(t), y(t), z(t) of considered system are defined on entire interval [0, T] and satisfy on it inequalities (3).The proof is completed.
Restrictions on the function x(t) are specified as follows.
Lemmas 1 and 2 imply that for any control u(•) ∈ D(T) solutions x(t), y(t), z(t) of the system (1) retain their physical meanings for all t ∈ [0, T].

Attainable set and its properties
Let X(T) ⊂ R 3 be the attainable set for system (1) from an initial point w 0 =( x 0 , y 0 , z 0 ) ⊤ at the moment of time T;t h a ti s ,X(T) is the set of all ends w(T)=( x(T), y(T), z(T)) ⊤ of trajectories w(t)=(x(t), y(t), z(t)) ⊤ of system (1) under all possible controls u(•) ∈ D(T).B y Lee & Markus (1967) and Lemma 1, it follows that set X(T) isacompactsetinR 3 located into the region We denote by ∂Q and intQ the boundary and the interior of the compact set, Q ⊂ R 3 , respectively.
98 Industrial Waste www.intechopen.com Next, we study the boundary of the attainable set X(T).C o n s i d e r a p o i n t w =( x, y, z) ⊤ , such that w ∈ ∂X(T).It corresponds to control u(•) ∈ D(T) and a trajectory w(t)= (x(t), y(t), z(t)) ⊤ , t ∈ [0, T], of system (1), such that w = w(T).Then it follows from Lee & Markus (1967) that there exists a non-trivial solution for which, by Lemma 2, the following relationship is valid: Here L(t)=ψ 1 (t).F u n c t i o n L(t) is the so-called switching function and its behavior determines the type of control u(t).
For convenience in subsequent arguments, we introduce the following auxiliary functions: Using the adjoint system (7), we write for functions L(t), G(t), P(t) the following system of linear differential equations The validity of the following Lemma immediately follows from the non-triviality of solution ψ(t)=(ψ 1 (t), ψ 2 (t), ψ 3 (t)) ⊤ of the adjoint system (7).
Lemma 3. The switching function L(t) and the auxiliary functions G(t) and P(t) are nonzero solutions of system (9).
Lemma 3 allows us to rewrite the relationship (8) in the form At points of discontinuity we will define function u(t) by its limit from the left.Consequently, the control u(t), t ∈ [0, T], corresponding to a point w ∈ ∂X(T), is a piecewise constant function, taking values {0, u max }.Proof.Let us introduce for system (9) new variables: where functions q 1 (t), q 2 (t) must be determined.Using new variables r(t), v(t), μ(t) system (9) has the following form We will select such functions q 1 (t) and q 2 (t) that in system (11) the expressions inside brackets by r(t) and v(t) are zero.Now, we have for functions q 1 (t), q 2 (t) the system of differential equations Then system (11) will be rewritten as In system (13) we will make the following substitutions: where q 3 (t) is the function that must be determined.Then system (13) will be rewritten as We will choose function q 3 (t) so that in system ( 14) the expression inside brackets by r(t) will become zero.Now, we have for function q 3 (t) the equation Then system of equations ( 14) will be rewritten as and the system of differential equations for functions q 1 (t), q 2 (t), q 3 (t),r e g a r d i n g relationships( 12)and( 15),isfollowing Next, we will rewrite system (17) in a matrix form.At first, we define symmetric matrices A 1 (t), A 2 (t), A 3 (t) as follows: Then we introduce vectors b 1 (t), b 2 (t), b 3 (t) as: At last, we define functions c 1 (t), c 2 (t), c 3 (t) by relationships: Then we obtain the following system of equations where q(t)=(q 1 (t), q 2 (t), q 3 (t)) ⊤ .Now, we will show that for system (18) there exists a solution defined on the entire interval [0, T].Assume the contradiction, i. e. that an arbitrary solution q(t) of system ( 18) is defined on the interval [0, t 1 ), t 1 ∈ (0, T], which is the biggest interval of the existence of this solution.Then, from Lemma (Chapter 4, §14) (Demidovich, 1967) for solution q(t) it follows 101 Finite-Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion www.intechopen.comthe relationship lim Its validity leads to the existence of values ρ > 0a n dt 0 ∈ [0, t 1 ), for which the inclusion q(t) ∈ Ω holds for all t ∈ [t 0 , t 1 ).HereΩ = q ∈ R 3 : q ≥ρ .
Let us evaluate on the interval [t 0 , t 1 ) the derivative of function q(t) regarding system (18).
We have the equality Next, we will estimate the upper boundary of the expressions inside brackets using inequalities (2), (3).
First, we have the inequality for the terms inside the third brackets where C = x 2 max y 2 max + u 2 max .Next, we will estimate the terms inside the second brackets.We obtain the relationship where B = 7b 2 + 7u 2 max + 9y 2 max z 2 max + 8z 2 max x 2 max + 8x 2 max y 2 max .At last, for the terms inside the first brackets we have the inequality q 1 (t)q ⊤ (t)A 1 (t)q(t)+q 2 (t)q ⊤ (t)A 2 (t)q(t)+q 3 (t)q ⊤ (t)A 3 (t)q(t) Separately, for the first two terms in ( 21) we obtain the inequalities: Next, we will find the eigenvalues of matrix A 3 (t).We have the formulas: 102 Industrial Waste www.intechopen.com Therefore, for the last term from ( 21) we find the relationship Finally, we obtain for expression (21) the following inequality where Substituting these inequalities into formula (20) we finally find a differential inequality Now, we will consider the quadratic equation Let define the sign of its discriminant.We have a chain of equalities: It is easy to see that discriminant D is positive.Now, we will introduce function V(q)= q + K 0 , q ∈ Ω,w h e r ev a l u eK 0 is defined as a biggest root of equation ( 23).Then, we have the formula Let us rewrite differential inequality (22) for function V(q).We have the inequality After necessary transformations regarding relationship AK 2 0 − BK 0 + C = 0, we find the differential inequality At last, let us consider the auxiliary Cauchy problem It is easy to see that for value χ 0 the inequality Let us find a solution of Cauchy problem (25).Solving the corresponding Bernoulli equation and satisfying to the initial condition we obtain the following formula From ( 26) we have negativeness of the terms inside brackets in formula ( 27).Therefore, function χ(t) is positive and increasing on the interval [t 0 , T].Then we find the inequality Thus, from differential inequality (24), Cauchy problem (25) and the Chaplygin's Theorem (Tikhonov et al., 1985) regarding the condition we have the inequalities: that contradict to (19).Our assumption was wrong.Therefore, there exists solution q(t) of system (17) on entire interval [0, T].
Then, the solution of system ( 16) is also defined on the interval [0, T].Using in system ( 16) the generalization of the Rolle's Theorem (Dmitruk, 1992) we conclude that function L(t)=r(t) hasatmosttwozeroesontheinterval[0, T].The proof is completed.
Based on the obtained results, we formulate the following statement.
Theorem 1.Let point w =( x, y, z) ⊤ belong to the boundary of the attainable set X(T).Then the control u(t),t∈ [0, T], which is associated with this point w, is a piecewise constant function taking values {0, u max } and having at most two switchings on the interval (0, T).

Auxiliary set and its properties
Using Theorem 1, we now can proceed to constructing a parametrization for the attainable set X(T) with moments of switching of piecewise constant controls.For this task, we consider the set For every point θ ∈ Λ(T) we form the control u θ (•) ∈ D(T) by formula We denote by w θ (t), t ∈ [0, T] the solution of system (1) corresponding to the control u θ (t).
Finally, we define the mapping F(•, T) : Λ(T) → R 3 as For this mapping we have the following proposition.
Applying the Gronwall's inequality (Robinson, 2004), we obtain as a result the relationship where L w is a positive constant.Assuming that t = T in the inequality, we find that mapping F(•, T) satisfies the Lipschitz condition (Robinson, 2004) on the set Λ(T).T h e r e q u i r e d continuity of the mapping F(•, T) on the set Λ(T) immediately follows from this fact.The proof is completed.
Using the mapping F(•, T), we introduce the auxiliary set Z(T)=F(Λ(T), T), which consists of all ends w θ (T) of trajectories w θ (t) of system (1) under all possible controls u θ (t), t ∈ [0, T], defined by formula (28).Every element of set Z(T) is a result of a bang-bang control u θ (t), t ∈ [0, T], with at most three switchings on the interval (0, T).Now, we have to discuss some properties of auxiliary set Z(T).Considering a point θ ∈ intΛ(T), its corresponding control u θ (t) defined by ( 28) and a trajectory w θ (t), t ∈ [0, T],we can reformulate the Cauchy problem (1) in the form 105 Finite-Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion

www.intechopen.com
where A is a 3 × 3 matrix, c ∈ R 3 , and functions g(w) and ϕ(w) are a vector and a scalar functions, respectively, such that For the system (29), we define a function Φ θ (t), t ∈ [0, T], as a solution of the matrix Cauchy problem where E is the identity matrix.Let us evaluate the derivatives ∂w θ ∂θ i (T), i = 1, 3. Using an approach which is due to Hájek (1991), one can find that the derivatives satisfy the following equalities: Now we are in a position to state the following theorem.
Theorem 2. The following equalities hold:
Proof.Firstly, we consider the set intΛ(T).The mapping F(•, T) is continuously differentiable on the set intΛ(T),andforeverypointθ ∈ intΛ(T), by (31), the following equalities hold: The continuity of these derivatives on the set intΛ(T) is determined by a continuous dependence of the trajectory w θ (t) and solution Φ θ (t) of the matrix Cauchy problem (30) in variables θ i , i = 1, 3. It is established by arguments, which are similar to the arguments presented in Lemma 5.
Furthermore, set intΛ(T) is a convex set, and the set intZ(T) is path connected.Indeed, the mapping F(•, T) transforms any segment of intΛ(T) into a curve located completely inside intZ(T).For every point of intΛ(T) the Local Theorem on an implicit function (Partasarathy, 1983) holds.Then the last statement of the proposition follows from the Global Theorem 3 on an implicit function (Shigeo, 1985).Hence the validity of the second equality of (32) follows.
The proof is completed.

Remark. We extend by continuity the derivatives ∂F ∂θ i (θ, T),i= 1, 3 of the mapping F(•, T) onto the boundary of the set Λ(T). As a result, we have continuous partial derivatives of the mapping F(•, T) on the entire set Λ(T).
From the definitions of attainable set X(T) and the auxiliary set Z(T), and Theorems 1 and 2, the following inclusions hold:

Z(T) ⊆ X(T), ∂X(T) ⊆ ∂Z(T).
(35) These explain why the set Z(T) plays such an important role in the study of the attainable set X(T).
Further investigation of the auxiliary set Z(T) involves the study of its supplement R 3 \ Z(T).
The following statement is valid.
Proof.Let F i (θ, T), i = 1, 3, be the components of mapping F(•, T).We define the following values: By Lemma 5 and the Extension Theorem of Brouwer-Urysohn (Hausdorff, 1962), we construct continuous mapping Π(•, T) defined on the whole space R 3 , which coincides with the mapping F(•, T) for all points of the set Λ(T).In addition, for the components Π i (θ, T), i = 1, 3, of this mapping at each point θ ∈ R 3 the following inequalities hold: We now define continuous functions ξ i (θ), i = 1, 3, as With these functions, we define a continuous mapping Ψ(•, T) of the whole space R 3 onto whole space R 3 as where Ψ i (θ, T), i = 1, 3, are the components of mapping Ψ(•, T).
Furthermore, the open set R 3 \ Λ(T) is path connected, and hence it is a connected set (Hall & Spencer, 1955).By Theorem 2, the continuous mapping Ψ(•, T) transfers the set R 3 \ Λ(T) onto the set R 3 \ Z(T), which is also open and connected (Hall & Spencer, 1955).
Then the set R 3 \ Z(T) simultaneously is a path connected set.This completes the proof.

Parametric description of attainable set
Finally, we now able to establish the validity of the main result of this paper.
Theorem 4. For the attainable set X(T) and the auxiliary set Z(T), the equality X(T)=Z(T) holds.
Proof.It follows from the first inclusion in (35) that in order to prove the hypothesis it is sufficient to show the validity of the inclusion X(T) ⊆ Z(T).Let us assume the opposite, i.e. assume that there exists a point w such that holds.Consider a point w / ∈ X(T).
The arguments presented in Theorems 2 and 3 show that the boundary of set Z(T) divides R 3 into two path connected subsets intZ(T) and R 3 \ Z(T).The path connectedness of the second set ensures the existence of a continuous curve σ(s), s ∈ [0, 1],a sw e l la s w = σ(0), w = σ(1),a n dσ(s) / ∈ Z(T) for all s ∈ (0, 1).By Theorem 36 on "transition through customs" in (Schwartz, 1967), there is a value s ∈ (0, 1) such that σ(s ) ∈ ∂X(T).Therefore, there is a defined point w = σ(s ), such that the relationships: simultaneously hold.This contradicts to the second inclusion in (35).Hence the assumption is incorrect, and the required inclusion holds.The proof is completed.
We have obtained analytically the properties of the attainable set X(T).The moments of switching of controls u θ (t) from ( 28), which form the set Λ(T), together with the mapping F(•, T) play the role of parametrization for the set X(T) (its interior and boundary).This

Industrial Waste
www.intechopen.comimplies that each point on the boundary of the attainable set X(T) can be reached by a bang-bang control u θ (t) with at most two switchings, and every point of the interior of the set X(T) is the result of such control with precisely three switchings.

Remark.
To establish these results we utilize an approach that was developed for another class of control systems by Grigorieva & Khailov (2001;2005).Example 1. (Figure 3) The initial conditions and parameters of the system (1) are:

Controllability problem
Let us consider for system (1) the controllability problem.To do this, we add to it given positive terminal conditions: The controllability problem consists of finding the terminal time T and the control u(•) ∈ D(T), which steers system (1) from initial point w 0 to the terminal point w 1 =( x 1 , y 1 , z 1 ) ⊤ .
Using terminology of the attainable set X(T), the considered problem is reformulated as follows.It is necessary to find such terminal time T, for which the inclusion w 1 ∈ X(T) holds.
Using the parametrization of the set X(T) constructed above, the controllability problem is rewritten as the problem of finite dimensional minimization of the auxiliary function in variables θ =(θ 1 , θ 2 , θ 3 ) ⊤ ∈ Λ(T) and T > 0.
An important property of this problem is the validity of the fact following from the arguments above.
Lemma 6.Let the controllability problem for system (1) with condition (36) has a solution.Then the minimum of the function G(θ, T) on the set Λ(T) × (0, +∞) equals zero.
The problem of the minimization of the function G(θ, T) is solved numerically.In order to find the minimum of this function, the iterative gradient projection method (Vasil'ev, 2002) is used.Corresponding numerical algorithm is written in C ++.
The rule of stop of the iterative process following from Lemma 6 is an execution on some k-iterative step of the following condition G(θ k , T k ) ≤ ε,whereθ k , T k are values of variables of the minimization on this step.Positive value ε is an accuracy of calculations of the minimum of the function G(θ, T).
The convergence of the using method at the considered problem depends on a validity of two following conditions: • continuous differentiability of the function G(θ, T) in variables θ =(θ 1 , θ 2 , θ 3 ) ⊤ , T on the set Λ(T) × [T min , T max ]; • satisfaction for the gradient of the function G(θ, T) the Lipschitz condition where L G is a some positive constant.Here T min , T max are given positive parameters.From the analysis of formula (37) it follows that the conditions formulated above hold if the function F(θ, T) is continuous differentiable on the set Λ(T) × [T min , T max ] and the Lipschitz condition is valid for this function and its partial derivatives ∂F ∂θ i (θ, T), i = 1, 3, ∂F ∂T (θ, T): where L F , K θ , K T are also some positive constants.In the inequalities (38)-( 41) the values θ 1 , θ 2 , T 1 , T 2 are arbitrary and satisfy the inclusions: (θ 1 , θ 2 , θ 3 ) ⊤ are the required moments of switching of the piecewise constant control u θ (t),d e fi n e db y formula (28), which steers system (1) from initial point w 0 to the terminal point w 1 ; T is the required terminal time such that on the interval [0, T] this transfer occurs; ε is the accuracy of calculations of the minimum of the function G(θ, T).
For Example 1 the dynamics of the attainable set X(T) for solving the controllability problem isshowninFigure10.

Minimizing of pollution concentration at terminal time
Let us consider for system (1) the problem of minimizing of pollution concentration at the terminal time T as The existence of the optimal control u * (t) and its corresponding optimal trajectory w * (t)=(  Bressan & Piccoli, 2007).We denote by J * the minimum of the functional J(u),i .e .J * = J(u * ).
Then the optimal control problem (1), ( 42) we reformulate as an equivalent problem of finding minimum on the attainable set X(T) of the type where p 0 =(0, 1, 0) ⊤ ∈ R 3 .
Using the parametrization of the set X(T) constructed above, the problem ( 43) is rewritten as the problem of finite dimensional minimization Obviously, the components θ * i , i = 1, 3 of the vector θ * ∈ Λ(T) that minimize the function J(θ) are the moments of switching of the optimal control u * (t).
For numerical solution of the problem (44) again the iterative gradient projection method (Vasil'ev, 2002) is used.Corresponding numerical algorithm is written in C ++.The basing of the convergence of this method is presented in the previous section.
In Table 2 the results of the corresponding numerical solution of the optimal control problem (1), ( 42) are demonstrated for Examples 1-7 considered above.Here (θ * 1 , θ * 2 , θ * 3 ) ⊤ are the required moments of switching of the piecewise constant optimal control u * θ (t)=u * (t), defined by formula (28); J * is the minimum of the function J(θ); ε is the accuracy of calculations of this minimum.
Example 1 1.0000 1.0000 1.0000 0.219408 0.0001 Example 2 6.0000 6.0000 6.0000 29.984309 0.0001 Example 3 6.0000 6.0000 6.0000 2.451992 0.0001 Example 4 6.0000 6.0000 6.0000 37.896490 0.0001 Example 5 6.0000 6.0000 6.0000 73.949615 0.0001 In Figures 11-14 the graphs of the optimal control u * (t) for Examples 1-7 are presented.The graphs imply that for the considered parameters of system (1) the minimization of pollution concentration at terminal time T can be achieved only at the maximal rate of aeration during the entire time interval [0, T].Numerical calculations were made for other parameters of the system.It was found that at the given accuracy of calculations ε the corresponding optimal control u * (t) was a piecewise constant function with one and two switchings.

Conclusions
The ultimate aim of this Chapter is to reduce the operational cost of the aerobic biotreatment process via an increasing of its energy efficiency.In order to achieve this objective, we attempted constructing an optimal control for this process.Results of this Chapter can be immediately applied to practical ATAD reaction design.Having in mind the goal of developing the optimal control, in this Chapter we analytically obtained the detailed structure of an attainable set X(T) for the model of the process.Furthermore, we succeeded in proving that the optimal control for this particular process is a bang-bang process, with at most two switchings.The moments of switching of the controls u θ (t) in (28), which form the set Λ(T), together with the mapping F(•, T), play the role of parametrization for the set X(T) (for both its interior and boundary).We also proved that each point on the boundary of set X(T) can be reached by a control from the above mentioned class (that is, a bang-bang control with at most two switchings), and that every point of the interior of set X(T) is the result of a bang-bang control with precisely three switchings.This results serve as a basis for a computer Finite-Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion www.intechopen.comcode, which allows to construct attainable sets for a variety of initial conditions and the system parameters.
All these results are of instantaneous practical importance, as they, firstly, immensely narrow the class of functions, which should be considered as candidates for optimal control.This result is highly nontrivial, taking into consideration the nonlinearity of the model and it three dimensions, and it enables us to use a computer-assisted design for constructing an optimal control for a real-life situation.
In this Chapter we consider a particularly simple mathematical model of the process, which is composed of three variables.We postulate that the reaction is governed by the mass action law.Our objective is to present a rigorous mathematical analysis rather than a straightforward numerical simulation of the process so that more complicated models which incorporate specific features of ATAD are not addressed here.Nonetheless, we obtain a number of results that are of direct relevance to common practice.It is shown that the bang-bang control is applicable for this nonlinear model (it is a non-trivial result), and that at most two switchings are needed.However, it can be expected that the same results will be valid for a more complex system, such as Michaelis-Menten kinetics (functional responses with saturation) or models with larger numbers of variables.
Applied to more complicated models, these results may significantly reduce a choice for possible optimal controls, and thus considerably decrease the amount of computations which are needed to find these optimal controls numerically.It is also noteworthy that the general approach, which in this Chapter we applied to a particular problem of the optimal control for the aerobic biotreatment process, can be successfully used for a considerably wider range of real-life problems.Thus, this Chapter provides a general notion of how modern optimal control theory can be used in everyday practice.

Fig. 2 .
Fig. 2. Scheme of the reactor for waste-water treatment.

103Finite-
Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion www.intechopen.com

107Finite-
Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion www.intechopen.comSuch bounded continuous mapping Π(•, T) is called an extension of the mapping F(•, T) from the set Λ(T) on the whole space R 3 .

Figures 3
Figures 3 to 9 show examples of attainable sets X(T),c o n s t r u c t e dw i t hM A T L A Bu s i n g Theorem 4.
Next, we estimate the number of switchings of control function u(t), t ∈ [0, T].It follows from (10) that it is sufficient to estimate the number of zeros of the function L(t) on the interval (0, T).The following important statement is valid.
Such type of control is usually called a bang-bang control.99Finite-Dimensional Methods for Optimal Control of Autothermal Thermophilic Aerobic Digestion www.intechopen.com

Table 1 .
39)-(41) are proved by arguments, which are similar to the arguments presented inLemma5andTheorem2. Results of solving of controllability problem for Examples 1-7.In Table1the results of corresponding numerical calculations are demonstrated for Examples 1-7 considered above.Here (x 1 , y 1 , z 1 ) ⊤ are coordinates of the terminal point w 1 ;