+ All Categories
Home > Documents > MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD...

MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD...

Date post: 26-Sep-2018
Category:
Upload: vantuong
View: 227 times
Download: 0 times
Share this document with a friend
50
UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEM ´ ATICAS M ´ ASTER EN MATEM ´ ATICAS AVANZADAS Mathematical Optimization in Industrial Processes. Application to the design of bioreactors for water treatment. Mar´ ıa Crespo Moya Advisors: Angel Manuel Ramos del Olmo and Benjamin Ivorra Collaborators: Alain Rapaport and J´ erˆomeHarmand Madrid – 19th of September, 2013
Transcript
Page 1: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

UNIVERSIDAD COMPLUTENSE

DE MADRID

FACULTAD DE CIENCIAS MATEMATICAS

MASTER EN MATEMATICAS AVANZADAS

Mathematical Optimization

in Industrial Processes.

Application to the design of bioreactors

for water treatment.

Marıa Crespo Moya

Advisors: Angel Manuel Ramos del Olmo

and Benjamin Ivorra

Collaborators: Alain Rapaport and Jerome Harmand

Madrid – 19th of September, 2013

Page 2: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2

Page 3: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

3

Resumen

En este trabajo, tratamos el problema de descontaminacion de agua mediante el uso de biorreac-tores. Primero, se introduce el concepto de biorreactor y se presentan dos modelos matematicos quedescriben la dinamica entre el biorreactor y la fuente contaminada. El primer modelo, basado en ecua-ciones diferenciales ordinarias, considera distribucion homogenea del contaminante en el biorreactor; elsegundo modelo considera una no homogeneidad del contaminante en el biorreactor y se basa en ecua-ciones en derivadas parciales. Luego, se aborda un problema de optimizacion con el que se pretendeminimizar el tiempo de descontaminacion de la fuente, mediante la eleccion del flujo de entrada delbiorreactor. En el caso homogeneo se comparan resultados teoricos ya existentes con los obtenidos eneste trabajo, y en el caso no homogeneo se resuelve el problema de optimizacion mediante un algoritmogenetico hıbrido.

Abstract

In this work, we deal with the problem of water treatment by using bioreactors. First, we introducethe concept of bioreactor and present two mathematical models which describe the dynamics betweenthe bioreactor and the water resource. The first model considers homogeneous distribution of thecontaminant in the bioreactor; the second model considers inhomogeneity of the contaminant in thebioreactor and is based on partial differential equations. Then, we tackle an optimization problemwhich aims to minimize the time needed to clean the contaminated resource, by choosing an optimalbioreactor inflow. In the homogeneous case we compare existing theoretical results with the onesobtained here, and in the inhomogeneous case we solve the optimization problem by using an HybridGenetic Algorithms.

Page 4: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

4

Page 5: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

CONTENTS 5

Contents

1. Introduction 7

2. Bioreactors 8

2.1. Mathematical Model for a bioreactor: An ODE Approach . . . . . . . . . . . . . . . . . . 82.1.1. Description of the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92.1.2. Nondimensionalization of the system . . . . . . . . . . . . . . . . . . . . . . . . . . 102.1.3. Particular case: Steady states and stability analysis . . . . . . . . . . . . . . . . . 11

2.2. Mathematical Model for the Bioreactor: A PDE Approach . . . . . . . . . . . . . . . . . . 142.2.1. Description of the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

3. Dynamics in the water resource and coupled system 18

3.1. An ODE Approach for the Bioreactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.1.1. Description of the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183.1.2. Nondimensionalization of the water resource equation . . . . . . . . . . . . . . . . 193.1.3. Quasi-Steady State Approximation . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

3.2. A PDE Approach for the Bioreactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203.2.1. Description of the model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

4. Numerical Results 21

4.1. An ODE Approach for the Bioreactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.2. A PDE Approach for the Bioreactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

5. Optimization problem 24

5.1. Bioreactor with ODE model. Theoretical results . . . . . . . . . . . . . . . . . . . . . . . 255.1.1. Case 1: Flux is constant on time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.1.2. Case 2: Flux is a time variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

5.2. Bioreactor with PDE model. Genetic Algorithms . . . . . . . . . . . . . . . . . . . . . . . 285.2.1. Case 1: Flux is constant on time . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285.2.2. Case 1: Flux is a time variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

6. Genetic Algorithms 29

6.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296.2. Description of the algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29

6.2.1. Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306.2.2. Crossover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316.2.3. Mutation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.2.4. Elitism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326.2.5. Stopping Criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6.3. Code Implementation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336.4. Hybrid Genetic Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

6.4.1. Gradient Descent Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356.5. Some benchmarks of the considered HGA . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

7. Numerical Optimization Results 36

7.1. An ODE Approach of the Bioreactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367.2. A PDE Approach for the Bioreactor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 387.3. Comparison between ODE Approach and PDE Approach Optimization Results . . . . . . 40

7.3.1. Flux constant in time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407.3.2. Flux is a time variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

8. Conclusions 42

Page 6: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

CONTENTS 6

9. Future work 43

A. Nonlinear Stability Analysis 45

B. Existence and Uniqueness Theorems 46

C. Benchmark Functions 47

Page 7: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

1. Introduction 7

Acknowledgements

Foremost, I would like to express my appreciation to my advisors, Dr. Angel Manuel Ramos delOlmo and Dr. Benjamin Ivorra, for their continuous support during my master thesis research. Specialthanks to Dr. Angel Manuel Ramos for his motivation, knowledge, and for teaching me to highlight everyconcept studied in this work. It was an honor for me to work with Dr. Benjamin Ivorra for his patience,disponibility and his experience in the field of numerical simulation. I would also like to express mygratitude to MOMAT researching group, which has provided me with the technological support neededto run my simulations. I also wish to thank my advisors for giving me the opportunity to participatein the Spanish-National-Proyect MTM2011-22658, which has funded this work. I received generous feed-back from Dr. Alain Rapaport during my stay in the INRA Institute in Montpellier, which helped meto develop my background in bioreactor theory. I am particularly grateful for the advices given by Dr.Miguel Angel Sanz, who introduced me in the mathematical researching and encouraged me to follow thisMaster’s degree.

I wish to thank my office mates Marcos, Luis, Dani, Edwuin and Silvia, for creating a comfortableatmosphere, for their mathematical advices and for all the time we have spent together this year. I wouldalso like to thank my family for their endless love and support. Finally, I would like to thank my colleagueand friend Laura, who during this year has been my pillar not only academically, but in my personal life.

1. Introduction

The decontamination of water resources constitute a major environmental issue in the areas of pre-vention of eutrophication and wastewater treatment. Eutrophication is a process whereby water resourcesbecomes too rich in organic material and mineral nutrients. Household products (phosphorus detergents)and products used in agriculture (nitrate fertilizers) are the main causes of pollution of water resources.As a result, some plants (in particular planktonic algae) can grow rapidly and reduce the available oxygenof the aquatic ecosystem resulting, for instance, in the death of local bio-organisms (such as fishes). A wayof fighting eutrophication consists in connecting the water resource in a closed circuit with a bioreactor(i.e., a device in which biological reaction occurs), applying an specific flow rate Q controlled by the user.The objective of decontamination is to reduce the pollutant concentration to an acceptable value Slim .

In order to minimize the cleaning time, control theory is applied to the flow rate Q, which is adjustedaccording to the pollutant concentration measured in the water resource. For this work we assume ho-mogeneous distribution of the pollutant in the water resource. In addition, as a first approach, we makethe assumption of an homogeneous distribution of the pollutant in the reactor, which leads to a modelbased on ordinary differential equations [4]. Since this assumption is not realistic, a second approachconsists in using a model of partial differential equations, which takes into account the spatial disparityin the reactor. A control law for the flow rate Q has been studied only for models of ordinary differentialequations [4]. In order to find an optimal flow rate Q in the case where the partial differential equationsmodel is used, we use a particular optimization algorithm, called Hybrid Genetic Algorithm.

In Section 2 we introduce the concept of bioreactor and present two models which describe its dynamics:one using ordinary differential equations and the other one using partial differential equations. Section 3details the coupled system between the reactor and the water resource. Section 4 presents some numericalresults corresponding to the theoretical models explained in Sections 2 and 3. In Section 5 we state theoptimization problem which aims to minimize the time needed to decontaminate the water resource. Sec-tion 6 gives an introduction to the Genetic Algorithm (GA) theory, which is used to solve the optimizationproblem when partial differential equations model is considered in the reactor. Finally, the numerical op-timization results obtained when solving the optimization problem with the partial differential equationsmodel with the previous GA are shown in Section 7.

Page 8: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2. Bioreactors 8

2. Bioreactors

A bioreactor is a vessel in which biological interactions take place. It can be used to perform chemicalprocesses for either producing or degrading biochemical substances. A bioreactor is composed of twoelements:

The substratres required for the growth of microrganisms. Examples of substrate are glucose andsulfites.

The microrganisms that develop by substrate consumption. This microrganisms are called biomassesand they can be of different nature. Examples of biomasses are bacteria and enzymes.

Bioreactors are used for a wide range of applications (fermentation, drug conception, water treatment,etc). Figure 1 shows a bioreactor used to produce wine. During the chemical process, the grape juice istreated in the reactor so that the sugar in the juice is converted into alcohol.

Figure 1: Bioreactor used in wine fermentation

The bioreactors operating continously are also called chemostats. The chemostat was invented by JacquesMonod, Aaron Novick and Leo Szilard in 1950. Jacques Monod was studying the growth kinetics of thebacteria Escherichia coli in a medium that contained both glucose and lactose, when Szilard suggested toprovide both sugars continuouly at the speed that bacteria consumed them. The hypothesis of Szilardderived in the invention of the chemostat. The continuous bioreactors are generally used to study thegrowth of microrganisms and their interactions.

In this work we focus on bioreactors used for water treatment. These bioreactors are commonly cylindri-cal, ranging in size from litres to cubic metres, and are often made of stainless steel. Two examples canbe seen in Figure 2

Figure 2: Bioreactors used for water treatment

2.1. Mathematical Model for a bioreactor: An ODE Approach

The objective of the process is to make the concentration of the pollutant in a water resource decreaseas much as possible. A bioreactor is able to treat polluted water by using biomass to remove the substrate

Page 9: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2.1 Mathematical Model for a bioreactor: An ODE Approach 9

considered to be in excess. This biological reactor is fed from the resource with a flow rate Q (m3/s), andits output returns the treated water with the same flow rate Q.

biomass

substrate

substrate+ biomass

Figure 3: Dynamics of the bioreactor.

2.1.1. Description of the Model

We consider the following chemostat model, presented in [4], to describe the dynamics of the bioreactor:

dSrdt

(t) = −µ(Sr(t))Br(t) + Q(t)Vr

(Se(t) − Sr(t)), t > 0,

dBrdt

(t) = µ(Sr(t))Br(t) −Q(t)VrBr(t), t > 0,

Sr(0) = Sr,0, Br(0) = Br,0,

(1)

where Sr (mol/m3) and Br (mol/m3) indicate the concentration (inside the bioreactor) of substrate andbiomass respectively, Se (mol/m3) is the value of concentration of substrate that enters into the reactor,Vr (m3) is the volume of the reactor and µ(·) (s−1) is the growth rate function, that refers to the growthrate of the biomass as the substrate is being reduced.

Remark 2.1. Let us notice that if we rewrite system (1) as ddt

(Sr

Br

)

= F (t, Sr, Br), F is defined

on D = [0,+∞)3. If function µ(·) ∈ C1([0,+∞)), then it is easy to check that F is locally Lipschtizin (Sr, Br) ∈ [0,+∞)2 (see Definition B.1). Moreover, if Se,Q ∈ C([0,+∞)), then following Picard-Lindelof Theorem (see Theorem B.3) we conclude that system (1) has a unique solution (Sr, Br) such that(Sr(0), Br(0)) = (Sr,0, Br,0). Furthermore, we conclude that solution (Sr, Br) is C1(I) where I is sometime interval.Notice that we can relax the regularity of F (i.e., the regularity of µ, Se and Q) by considering Picard-Lindelof Theorem piecewise, and consequently the solution (Sr, Br) is piecewise C1(I) where I is sometime interval.

Remark 2.2. Since we are interested in the case in which system (1) has a unique solution, from now weassume that Q and Se are piecewise continous functions in [0,+∞). We assume that µ(·) is increasingand concave (see Assumption A1), and moreover we consider the case in which µ(·) is piecewise C1 in[0,+∞).

To have a better understanding of the model, we observe Figure 3, pointing out that water withsubstrate enters into the reactor, inside the reactor there is biomass and water with both substrate and

Page 10: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2.1 Mathematical Model for a bioreactor: An ODE Approach 10

biomass exit the reactor after the process. When the bioreactor starts operating (which in the followingis considered as the initial time t = 0 in (1)), there is no substrate concentration inside of the bioreactor,and the substrate is inmediately expanded into the reactor, so Sr,0 is usually set as set Se(0).

Following [4] we assume that the growth rate function µ(·) fulfills the following properties:

Assumption A1:

1. Function µ(·) is increasing and µ(0) = 0.

2. Function µ(·) es concave.

An example of growth rate function is given by the Monod equation [4], which is used to relatemicrobial growth rates in an aqueous environment to the concentration of a limiting nutrient.Its general expression is:

µ(S) = µmaxS

K + S, (2)

where

µ is the specific growth rate of the microorganisms

S is the concentration of limiting nutrient for growth

µmax is is the maximum specific growth rate of the microorganisms

K is the half-velocity constant, i.e, the value of S when µ(S) = µmax

2

Observe that µmax and K are empirical coefficients to the Monod equation. They will differ betweenspecies and based on the ambient environmental conditions.

2.1.2. Nondimensionalization of the system

Nondimensionalization is the partial or full removal of units from an equation involving physical quan-tities by a suitable substitution of variables. This technique can simplify and parametrize problems wheremeasured units are involved.

1. List all of the variables, parameters, and their dimensions:

Variable Dimension Parameter Dimension

Br mol/m3 Vr m3

Sr mol/m3 Se(0) mol/m3

t s Br,0 mol/m3

Q m3/s

Se mol/m3

µ s−1

2. Take each variable and create a new variable by dividing by the combination of parameters that hasthe same dimension in order to create a dimensionless variable:

br =Br

Bsr =

Sr

S, tr =

t

τr, q =

Q

Z, se =

Se

E, µ(sr) =

µ(Sr)

β,

where B, S, τr, Z, E, and β are suitable scales.

Page 11: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2.1 Mathematical Model for a bioreactor: An ODE Approach 11

3. Rewrite the differential equation in terms of the new variables:

dSr

dt=

dSr

dsr·dsrdtr

·dtrdt

=S

τr

dsrdtr

,

dBr

dt=

dBr

dbr·dbrdtr

·dtrdt

=B

τr

dbrdtr

.

Thus,

dsrdtr

(tr) = − τrβµ(sr(tr))Bbr(tr)S

+ τrq(tr)ZVr

(Ese(tr)−Ssr(tr))S

,

dbrdtr

(tr) = τrβµ(sr(tr))br(tr) −τrq(tr)Zbr(tr)

Vr,

sr(0) = Se(0)S, br(0) =

Br,0

B.

As we will see in Section 3, we are interested in the case where the entering substrate Se(t) isdecreasing along time and Sr(t) ≤ Se(t) for all t ≥ 0. Taking this into account, E = S = Se(0) arechosen. Furthermore, let us recall that following Assumption A1, one has that µ(·) is increasingfunction. Therefore, µ(Sr(t)) ∈ (µ(0), µ(Sr,0)) = (0, µ(Se(0)). Consequently, in order to obtain adimensionless function, we set β = µ(Se(0)).

dsrdtr

(tr) = −µ(Se(0))τrµ(sr(tr))Bbr(tr)Se(0)

+ τrZVrq(tr)(se(tr) − sr(tr)),

dbrdtr

(tr) = µ(Se(0))τrµ(sr(tr))br(tr) −τrZVrq(tr)br(tr),

sr(0) = 1, br(0) =Br,0

B.

In order to choose the scale Z we take into account that we are interested in the case in whichQ(t) < Vrµ(Se(t)) for all t > 0 (see Remarks 2.8 and 3.3). Since we are also interested in decreasingfunction Se(t), one has Q(t) < Vrµ(Se(0)) for all t > 0. Consequently, Z = Vrµ(Se(0)) is chosen.We also set B = Se(0) in order to simplify the system.Finally, taking τr = Vr

Z= 1

µ(Se(0))the nondimensionalization of the system follows as:

dsrdtr

(tr) = −µ(sr(tr))br(tr) + q(tr)(se(tr) − sr(tr)),

dbrdtr

(tr) = µ(sr(tr))br(tr) − q(tr)br(tr),

sr(0) = 1, br(0) = α,

(3)

where α =Br,0

Se(0).

2.1.3. Particular case: Steady states and stability analysis

Let us consider the case in which se and q are constant. Then,

dsrdtr

(tr) = −µ(sr(tr))br(tr) + q(1 − sr(tr)),

dbrdtr

(tr) = µ(sr(tr))br(tr) − qbr(tr),

sr(0) = 1, br(0) = α.

(4)

Remark 2.3. Let us notice that if we rewrite system (3) as ddtr

(srbr

)

= F (tr, sr, br), following Remark

2.1 we conclude that it has a unique solution (sr, br) such that (sr(0), br(0)) = (1, α). Furthermore, it

Page 12: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2.1 Mathematical Model for a bioreactor: An ODE Approach 12

is easy to proof that sr and br are bounded (see proof of Lemma 2.7), and thus, using Picard-LindelofTheorem (see Theorem B.3) we conclude that solution (sr, br) is C1([0,+∞)).

The equilibria of (4) are the points (sr, br) solution of

dsrdtr

= 0

dbrdtr

= 0

.

From the second equation one gets br[µ(sr) − q] = 0, so either br = 0 or µ(sr) = q. In the first case, fromthe first equation one gets sr = 1. In the second case, from the first equation it follows that br = 1 − sr.Consequently, system (4) has two fixed points:

(s∗r , b∗

r ) = (1, 0).

(s∗r , b∗

r ) = (sqr , 1 − sqr ), where sqr fulfills q = µ(sqr ).

In order to analyse the stability of the equilibria of (4) we follow the theory explained in Appendix A.

Lemma 2.4. If q < 1, the equlibrium point E1 = (1, 0) is unstable, and the equilibrium point E2 =(sqr , 1 − sqr ) is asymptotically stable.

Proof. To investigate the stability of the equilibria, we use the Jacobian matrix

J(sr, br) =

dsrdsr

dsrdbr

dbrdsr

dbrdbr

=

−µ′(sr)br − q −µ(sr)

µ′(sr)br µ(sr) − q

.

E1 = (1, 0)

J(s∗r , b∗

r ) =

−q −µ(1)

0 µ(1) − q

.

Let us recall that µ(1) = µ(Se)µ(Se)

= 1. Thus, the associated eigenvalues are the ones which fulfill thefollowing second order equation:

|λI − J(s∗r , b∗

r )| =

∣∣∣∣∣∣

λ+ q 1

0 λ− 1 + q

∣∣∣∣∣∣

= 0 ⇔ λ2 + (2q − 1)λ+ q2 − q = 0.

Thus,

λ1,2 =−2q + 1 ±

(2q − 1)2 − 4(q2 − q)

2=

−2q + 1 ± 1

2.

The associated eigenvalues are λ1 = −q < 0 and λ2 = −q + 1. Let us recall that we are considering thecase in which q < 1, so λ2 > 0 and the equilibrium point is unstable.

E2 = (sqr , 1 − sqr )

J(s∗r , b∗

r ) =

−µ′(sqr )(1 − sqr ) − q −q

µ′(sqr )(1 − sqr ) 0

.

The associated eigenvalues are those satisfying the following second order equation:

|λI − J(s∗r , b∗

r )| =

∣∣∣∣∣∣

λ+ µ′(sqr )(1 − sqr ) + q +q

−µ′(sqr )(1 − sqr ) λ

∣∣∣∣∣∣

= 0

Page 13: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2.1 Mathematical Model for a bioreactor: An ODE Approach 13

⇔ λ2 + (µ′(sqr )(1 − sqr ) + q)λ+ qµ′(sqr )(1 − sqr ) = 0.Thus,

λ1,2 =−(µ′(sqr )(1 − sqr ) + q) ±

(µ′(sqr )(1 − sqr ) + q)2 − 4qµ′(sqr )(1 − sqr )

2

=−(µ′(sqr )(1 − sqr ) + q) ±

(µ′(sqr )(1 − sqr ) − q)2

2

=−(µ′(sqr )(1 − sqr ) + q) ± |µ′(sqr )(1 − sqr ) − q|

2.

If sqr > 1, then applying function µ(·) to this inequality and taking into account Assumption A1, we wouldhave µ(sqr ) > µ(1) = 1, i.e, q > 1. This enters in contradiction with our hypothesis of q < 1, so we canconclude sqr < 1. Again using Assumption A1 one has

µ′(sγr )(1 − sqr ) + q > 0.

We are left in the task of determining the sign of the real part of the eigenvalues. Denoting by ∆ =µ′(sqr )(1 − sqr ) − q, two different cases arise:

If ∆ 6= 0, then λ1 = −q and λ2 = −µ′(sqr )(1 − sqr ). Both eigenvalues are negative. In this case, wesay that E2 is asymptotically stable.

If ∆ = 0, then there is just one eigenvalue λ1 = − µ′(sqr )(1−s

qr )+q

2 < 0. In this case, we say that E2 isasymptotically stable.

Corollary 2.5. If q > 1, the equlibrium point E1 = (1, 0) is asymptotically stable, and the equilibriumpoint E2 = (sqr , 1 − sqr ) is unstable.

Proof. Following the same reasoning as in Lemma 2.4, the stability of the equilibria results as:

E1 = (1, 0) : In this case, λ1 and λ2 are both real negative numbers. Consequently, E1 is asymp-totically stable.

E2 = (sqr , 1 − sqr ): In this case, if ∆ = µ′(sqr )(1 − sqr ) − q = 0, both eigenvalues are positive realnumbers and the equilibrium is unstable. If ∆ 6= 0 we would have one negative eigenvalue andanother positive, and consequently the equilibrium is again unstable.

Remark 2.6. If q = 1, both equilibria becomes the same, E = (1, 0). In this case, the associatedeigenvalues are λ1 = −1 and λ2 = 0, and according to the Hartman-Grobman Theorem (see Appendix A)we cannot conclude the stability of the equilibrium with the linear test. In order to study the stability, weuse Poincare-Bendixson and Dulac’s criterion (see Appendix A) to see that E = (1, 0) is asymptoticallystable.

Lemma 2.7. If q = 1, the equilibrium point E1 = (1, 0) is asymptotically stable.

Proof. We consider the set K = (sr, br)|sr + br ≤ 1 + α and D = (sr, br)|sr + br ≤ 1, as is depictedin Figure 4. First of all, we would like to see that any trajectory of (4) relays in the compact set K. Inorder to see this, we consider the function mr(tr) = sr(tr) + br(tr) − 1. From system (4), one has that

dmr

dtr(tr) =

dsrdtr

(tr) +dbrdtr

(tr) = −sr(tr) − br(tr) + 1 = −mr(tr).

Page 14: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2.2 Mathematical Model for the Bioreactor: A PDE Approach 14

0 10

1

s r(t

r)

b r(t

r)

K

D

Figure 4: Sets D and K.

One can conclude thatmr(tr) = mr(0)e−tr , withmr(0) = sr(0)+br(0) = 1+α. Consequently limtr→∞mr(tr) =0, and moreover, limtr→∞ sr(tr) + br(tr) = 1.Now using Poincare-Bendixson Theorem (see Theorem A.9), one has that the trajectories approach eitheran equilibrium point or either a closed orbit of K. Taking into account that the only equilibrium point inK is the point E1 = (1, 0), it is sufficient to show that there are no closed orbits in K in order to concludethat the equilibrium point E1 is asymptotically stable. In this direction, we are able to use the Dulac’scriterion (see Theorem A.10).In this case D is the simply connected set considered in Dulac’s criterion, and ψ(sr, br) = 1. It is necessary

to check that div(F ) has constant sign in D, where F : R2 → R2 fulfills

dsrdtr

dbrdtr

= F (sr, br) in system

(4). In this case,

div(F ) =d

dsr(dsrdtr

) +d

dbr(dbrdtr

) = −µ′(sr)︸ ︷︷ ︸

<0 A1

−1 + µ(sr) − 1︸ ︷︷ ︸

(∗)

Let us recall that from Assumption A1 the function µ is increasing and moreover sr ∈ [0, 1], since we areconsidering (sr, br) ∈ D. Consequently µ(sr) ≤ µ(1) = 1 for any sr ∈ [0, 1], and thus (∗) ≤ 0. Therefore,div(F ) ≤ −1 < 0 for all (sr, br) ∈ D, and there are no closed orbits in D. In order to conclude that thereare no closed orbits in K we take into account that any trajectory starting in K \ D is approaching Dexponentially, so the fact that there are no closed orbits in D implies that there are not closed orbits inK either.

Remark 2.8. The equilibrium point E1 = (1, 0) corresponds to the extinction of the biomass concentra-tion, due to the fact that it is washed out. As we will see in Section 3 the aim for using a bioreactor isthe decontamination, i.e, the elimination of substrate supposed to be in excess. Consequently we will beinterested in attaining the equilibrium point E2 = (sqr , 1 − sqr ), and consequently, we must consider thecase q < 1. In terms of dimensional variables, we are considering the case in which Q < Vrµ(Se).

2.2. Mathematical Model for the Bioreactor: A PDE Approach

In Section 2.1, the concentrations of biomass and substrate have been considered homogeneous insidethe reactor and the water resource. In order to analyze spatial disparity into the reactor, we consider thetransport phenomena. Transport of substances involves two main concepts:

Advection: Transport of the substance related with the flow of the fluid. The general equation foradvection is:

dc

dt+ ∇ · (uc) = 0, (5)

where c is the variable of interest, ∇· is the divergence operator and u is the velocity field.

Page 15: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2.2 Mathematical Model for the Bioreactor: A PDE Approach 15

Diffusion: Spreading of the substance by the natural movement of their particles. The generalequation for diffusion is:

dc

dt= ∇ · (D∇c), (6)

where D is the diffusion coefficient.

In this section we consider the modelization of the reactor with Advection-Diffusion equation.

2.2.1. Description of the Model

The bioreactor in consideration is a cylinder Ω∗ as that depicted in Figure 5. As in Section 2.1, at thebeginning of the process, there is a certain amount of biomass inside Ω∗ that is reacting with the pollutedwater entering the device through the inlet Γ∗

in(upper boundary of the cylinder). Treated water leavesthe reactor through the outlet Γ∗

out (lower boundary of the cylinder).

Γin∗

Γout∗

Γwall∗ Ω∗

Figure 5: 3D reactor

Following [1] we consider the succeeding chemostat model to describe the dynamics in the reactor, whichincludes advection-diffusion phenomena:

dSrdt

= ∇ · (DS∇Sr) − u∇Sr − µ(Sr)Br ∀x ∈ Ω∗ , t > 0,

dBrdt

= ∇ · (DB∇Br) − u∇Br + µ(Sr)Br ∀x ∈ Ω∗ , t > 0,

Sr(0, x) = Se(0) ∀x ∈ Ω∗,

dSrdt

(0, x) = 0 ∀x ∈ Ω∗,

Br(0, x) = Binit ∀x ∈ Ω∗,

dBrdt

(0, x) = 0 ∀x ∈ Ω∗,

n · (−DS∇Sr + uSr) = −Q(t)Se(t) ∀x ∈ Γ∗

in, t > 0,

n · (−DB∇Br + uBr) = 0 ∀x ∈ Γ∗

in, t > 0,

n · (−DS∇Sr) = 0 ∀x ∈ Γ∗

wall ∪ Γ∗

out, t > 0,

n · (−DB∇Br) = 0 ∀x ∈ Γ∗

wall ∪ Γ∗

out, t > 0

(7)

Page 16: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2.2 Mathematical Model for the Bioreactor: A PDE Approach 16

where

Sr = Sr(t, x) (mol/m3) is the substrate concentration inside the reactor.

Br = Br(t, x) (mol/m3) is the biomass concentration inside the reactor.

DS (m2/s) and DB (m2/s) correspond to the diffusion coefficients of substrate and biomass, respec-tively.

The fluid flow is taken as u = (0, 0,−Q(t)) where Q (m/s) is the flow rate per unit of area. Q fulfillsthe equation Q(t) = Q(t)/A, where Q (m3/s) is the flow rate defined in Section 2.1 and A (m2) isthe area of the basis of the cylinder.

Se(t) (mol/m3) is the concentration of substrate that enters into the reactor at time t.

Binit (mol/m3) is the concentration of biomass inside the reactor before the process starts.

n is the outward unit normal vector on the boundary of the domain.

Notice that besides the Advection-Diffusion terms, we also have the term corresponding to the reaction ofbiomass and substrate, governed by the growth rate function µ(·) (1/s−1). Again we assume that functionµ(·) satisfies Assumption A1.

In order to obtain the boundary conditions, we follow the reasoning below. We take into account thatthe flux in this model is the one corresponding to diffusion and advection, i.e, if we denote J the flux, itfollows:

J = −D∇c+ uc,

where c is the variable of interest, D is the diffusion coefficient and u is the fluid flow. Let us recall thatthe flux J that leaves the water resource is the same that the flux that enters the bioreactor. Equally,the flux that enters the bioreactor is the same that the flux that leaves it.For instance, for the substrate boundary condition in Γ∗

in, one has −DS∇Se + u · Se = −DS∇Sr + u · Sr.Furthermore, since we are considering that Se is a nonspatial variable, we conclude that ∇Se = 0 and wehave −DS∇Sr + uSr = u · Se. Moreover, since u = (0, 0,−Q(t))and n = (0, 0, 1) in Γ∗

in, it follows theboundary condition

n · (−DS · ∇Sr + uSr) = −Q(t) · Se(t) ∀x ∈ Γ∗

in.

For the biomass, one has −DB∇Br + u ·Br = 0, so the boundary condition is

n · (−DB · ∇Br + uBr) = 0 ∀x ∈ Γ∗

in.

In Γ∗

wall one has for the two concentrations (substrate and biomass) the equation (−D∇c+ u · c) · n = 0.Taking into account that u = (0, 0,−Q(t)) and in this case the unity normal vector n is perpendicular tou, we have the boundary condition

n · (−D · ∇c) = 0 ∀x ∈ Γ∗

wall, c = Sr, Br.

Finally, for Γout we assume that there is no diffusion for the two concentrations after leaving the reactor.Thus, if there is no flux u, biomass and substrate do not exit the bioreactor. Consequently, one has theequation −D∇c + u · c = uc, and taking into account that n = (0, 0,−1) in Γ∗

out, the correspondingboundary condition is

n · (−D · ∇c) = 0 ∀x ∈ Γ∗

out, c = Sr, Br.

Remark 2.9. In this work we do not proof the existence and uniqueness of solution of System (7). Thisresult will be tackled as a future work.

Page 17: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

2.2 Mathematical Model for the Bioreactor: A PDE Approach 17

We can consider that the device’s geometry is a solid of revolution, and consequently, it can be char-acterized by a 2D model (see Figure 6). By passing to cilindrical coordinates (r, z) where r is the distanceto the cylinder axis, system (7) can be rewritten as:

dSrdt

= 1r

ddr

(rDSdSrdr

) + ddz

(DSdSrdz

) + Q(t)dSrdz

− µ(Sr)Br ∀(r, z) ∈ Ω , t > 0,

dBrdt

= 1r

ddr

(rDBdBrdr

) + ddz

(DBdBrdz

) + Q(t)dBrdz

+ µ(Sr)Br ∀(r, z) ∈ Ω , t > 0,

Sr(0, r, z) = Se(0) ∀(r, z) ∈ Ω

dSrdt

(0, r, z) = 0 ∀(r, z) ∈ Ω,

Br(0, r, z) = Binit ∀(r, z) ∈ Ω,

dBrdt

(0, r, z) = 0 ∀(r, z) ∈ Ω,

DSdSrdz

+ Q(t)Sr = Q(t)Se(t) (r, z) ∈ Γin, t > 0,

DBdBrdz

+ Q(t)Br = 0 ∀(r, z) ∈ Γin, t > 0,

dSrdr

= 0 ∀(r, z) ∈ Γwall ∪ Γsym ∪ Γout, t > 0,

dBrdr

= 0 ∀(r, z) ∈ Γwall ∪ Γsym ∪ Γout, t > 0,

(8)

where in this case our domain is the rectangle Ω = [0, L] × [0, H], as is depicted in Figure 6. Moreover,Γsym = 0 × (0, H) generates the axis of symmetry, Γin = (0, L) × H is the inlet through which thepolluted water enters the reactor, and Γout = (0, L)×0 is the outlet through which treated water leavesthe reactor. We denote Γwall = δΩ \ (Γin ∪ Γout ∪ Γsym), where no flux is considered.

Γin

Γwall

Γout

Γsym

Ω

H

0 L

Figure 6: 2D simplification

Remark 2.10. It is of interest to study the nondimensionalization of system (8) in order to see therelation between the advection and the diffusion coefficients. Steady state solutions and stability analysisis also of interest. These topics will be tackled as a future work.

Page 18: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

3. Dynamics in the water resource and coupled system 18

3. Dynamics in the water resource and coupled system

It is of interest to study spatial inhomogeneity in the water resource. First studies have been done, forinstance, in [4]. Nevertheless, in this work we focus in the case where spatial homogeneity is consideredin the water resource.Particularly, we consider a natural water resource of volume V (m3) polluted with a substrate of con-centration Sl (mol/m3). The objective of the treatment is to make the concentration of the pollutantdecrease as quickly as possible to a prescribed value Slim (mol/m3), with the help of a continous bioreactorof volume Vr (m3). The reactor is fed from the resource with a flow rate Q (m3/s), and the treated wateris immediately recycled into the water resource with the same flow rate Q, after separation of biomass andsubstrate in a settler (see Figure 7). The settler avoids the presence of biomass used for the treatment inthe natural resource, which could result undesirable and possibly lead to an increase of eutrophication.

Figure 7: Connection of the bioreactor with the resource

3.1. An ODE Approach for the Bioreactor

3.1.1. Description of the model

Following [4], an ordinary differential equation is used to model the dynamics into the water resource.It can be described by:

dS1dt

(t) = −Q(t)V

(S1(t) − Sr(t)), t > 0,

S1(0) = Sl,0,

(9)

where Sr(t) is the substrate concentration into the bioreactor at time t, given by equation (1). The coupledsystem between the water resource and the bioreactor is given by equation (9) coupled with system (1),with the concentration of substrate that enters into the reactor being the same as the concentration inthe water resource, i.e, Se = S1(t). Furthermore, Sr,0 is usually set as S1,0.A reasonable hypothesis is to assume that the volume of the resource is much larger than the one of thebioreactor, i.e, V >> Vr, and Q(t) < Vrµ(S1,0) for all t. Otherwise, biomass is washed out from thereactor (see Remarks 2.8 and 3.3).

Remark 3.1. Let us notice that if we rewrite equation (9) as dS1dt

= F (t, S1), F is defined on D =[0,+∞)2. Following Remark 2.1 we assume that Q is piecewise continous in [0,+∞) and we consequentlySr is also piecewise continous in I, where I is some time interval. Consequently, using Picard-LindelofTheorem (see Theorem B.3) we conclude that equation (9) has a unique solution S1 such that S1(0) = S1,0.Furthermore, S1 is piecewise C1(I) where I is some time interval.

Page 19: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

3.1 An ODE Approach for the Bioreactor 19

3.1.2. Nondimensionalization of the water resource equation

Proceeding as in Section 2.1.2, the nondimensionalization of equation (9) follows as:

1. List all of the variables, parameters, and their dimensions:

Variable Dimension Parameter Dimension

S1 mol/m3 V m3

t s Sl,0 mol/m3

Sr mol/m3

Q m3/s

2. Take each variable and replace it with an scaled one:

s1 =S1

P, t1 =

t

τ1, sr =

Sr

R, q =

Q

Z,

where P , Z, R and τ1 are suitable scales to be determined.

3. Rewrite the differential equation in terms of the new variables:

dS1

dt=

dS1

ds1·ds1dt1

·dt1dt

=P

τ1

ds1dt1

ds1dt1

(t1) = −τ1q(t1)Z

V(s1(t1) −

sr(t1)RP

),

s1(0) =Sl,0

P,

For the substrate concentration scale in the water resource, P = Sl,0 is chosen. With respect withthe nondimensionalization of Q(t), same argument than in Section 2.1.2 is used, i.e, Z = Vrµ(S1,0).Moreover, taking R = S1,0 and τl = V

Qmax= V

Vr

1µ(S1,0) as scaling values, the nondimensionalization

follows as:

ds1dt1

(t1) = −q(t1)(s1(t1) − sr(t1)),

s1(0) = 1.

Notice that scales chosen in Section 2.1.2 for the substrate Sr and for the flux Q are the same thatin this case, so in order to unify notation we conclude that the nondimensionalization of the systemis:

ds1dt1

(t1) = −q(t1)(s1(t1) − sr(t1)),

s1(0) = 1.

(10)

We have seen the nondimensionalization of system (1) and (9) separately. Following the same process,we can derive the nondimensionalization of the coupled system, and we obtain:

dsrdt1

(t1) = −αµ(sr(t1))br(t1) + αq(t1)(s1(t1) − sr(t1)) t1 > 0,

dbrdt1

(t1) = αµ(sr(t1))br(t1) − αq(t1)br(t1) t1 > 0,

dsldt1

(t1) = −q(t1)(s1(t1) − sr(t1)) t1 > 0,

sr(0) = 1, br(0) = β, sl(0) = 1,

(11)

where α = VVr

and β =Br,0

Sr,0.

Page 20: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

3.2 A PDE Approach for the Bioreactor 20

3.1.3. Quasi-Steady State Approximation

Definition 3.2. A reacting system is in quasi-steady state with respect to certain species, if the rates ofchange of their concentrations are negligibly small compared to the overall rate of reaction, during somerelevant time interval.

Let us recall that a reasonable hypothesis in the model is to consider Vr << V , where Vr is thebioreactor volume, and V represents the volume of the water resource. Therefore, nondimensionalization ofsystems (1) and (9) provided us with their respectively time scales. Consequently, taking into account thatthe time scale obtained for the reactor is τr = 1

µ(S1,0) and the one for the water resource is τ1 = VVr

1µ(S1,0) ,

one has τr << τ1, i.e, the dynamics of (3) is fast with respect to the dynamics of (10). This implies thatin terms of a reasonable time for (10), system (3) gets close to its equilibrium point almost instantly.

Remark 3.3. Notice that in terms of a reasonable time of the dynamics of (3), the time scale is τr, theentering substrate concentration s1(t1) and flux q(t1) hardly changes. Henceforth, they can be considered asconstants and the stability analysis from Section 2.1.3 can be used. Furthermore, the hypothesis formulatedin Remark 2.8 can be reformulated as q(t1) < µ(s1(t1)) for all t1 > 0.

Remark 3.4. Observe that q is a variable parameter, and the quasi-steady state depends on its value. Ifq is constant, this is actually a steady state.

Thereafter, when dealing with time scales of interest for big water resource, system (10) can beapproximated by

ds1dt1

(t1) = −q(t1)(s1(t1) − sqr(t1)), t1 > 0,

s1(0) = 1,

(12)

where sqr(t1) fulfills µ(sq

r(t1)) = q(t1), i.e, (s∗r , b∗

r ) = (sqr (t1), s1(t1) − sqr (t1)) is the quasi-steady state ofsystem (4). Since µ is an increasing function (see Assumption A1), the existence of sqr (t1) satisfying thisequality is guaranteed. Then system (12) can be rewritten as

ds1dt1

(t1) = −µ(sqr(t1))(s1(t1) − sq

r(t1)), t1 > 0,

sl(0) = 1.

(13)

Here sqr(t1) ∈ (0, sl(t1)). Notice that if sqr (t1) ≥ s1(t1), applying function µ(·) to this inequality, one has

µ(sqr (t1)) ≥ µ(s1(t1)). Consequently, this would imply that q(t1) ≥ µ(s1(t1)), in contradiction with thehypothesis stated in Remarks 2.8 and 3.3.

3.2. A PDE Approach for the Bioreactor

3.2.1. Description of the model

In this case, the dynamics into the water resource can be described as follows:

dS1dt

(t) = −Q(t)V

(S1(t) − Sout(t)), t > 0,

S1(0) = Sl,0,

(14)

where Sout(t) (mol/m3) denotes the substrate concentration that leaves the reactor at time t. Notice thatwe cannot use variable Sr in equation (14) due to the fact that this is an spatial variable. In order to

obtain a nonspatial variable approximation to Sr, we compute Sout(t) =

ΓoutSr(t,r,z)dr

L. Consequetly, in

order to describe the coupled system between the reactor and the water resource we consider system (8)using Se(t) ≡ S1(t), coupled with equation (14).

Page 21: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

4. Numerical Results 21

4. Numerical Results

In this Section we present the numerical simulation of models presented in Sections 2.1, 2.2 and 3.1,in the particular case of considering Monod equation µ(·) (see Equation 2) and flux Q constant in time.

4.1. An ODE Approach for the Bioreactor

Let us recall that in the case of considering the ODE approach for the bioreactor, nondimensionalresults have been obtained. Thus, in this section numerical simulation is done with dimensionless param-eters. For instance, the nondimensionalization of the Monod Equation corresponds to µ(sr) = µmax

µ(Se)sr

KSe

+sr.

We run the numerical computation of system (4) using ode45 function of MATLAB and consideringthat the entering substrate Se is constant in time. Simulations have been conducted with K

Se= 0.2,

µmax

µ(Se)= 1.2, α = 0.5 and q = 0.5. The results are shown in Figure 8, where it can be observed that

(sr(tr), br(tr))tr→∞−−−−→ (0.14, 0.86). As we have seen in Section 2.1.3, this corresponds to one of the equilib-

ria, which is asymptotically stable when q < 1.

0 2 4 6 8 100

0.2

0.4

0.6

0.8

1

1.2

1.4

Time

s r(t

r)

b r(t

r)

Figure 8: Solution of system (4) with q = 0.5, α = 0.5 and µ(·) Monod function.

In order to simulate numerically the stability analysis done in Section 2.1.3, three phase portraits ofsystem (4) are shown in Figure 9. The vector field is plotted in red, some solutions of the system areplotted in blue and the equilibrium point is painted with a green circle. The plotted solutions are theones corresponding to initial values α = 0.7, 0.5 and 0.3, respectively.Figure 9-(a) shows the behavior of the system when q < 1 is chosen. We can observe that, as Lemma 2.4states, the system converges to the equilibrium point (sqr , 1− sqr ). Figure 9-(b) shows the behavior of thesystem when q > 1. As Corollary 2.5 states, we can observe that the system converges to the equilibriumpoint (1, 0). Finally, Figure 9-(c) shows the behavior of the system when q = 1 and, as Lemma 2.7 states,we can observe that the system converges to the equilibrium point (1, 0).In relation with Section 3.1.3, it is of interest to check if for a reasonable time for equation (9), system(1) is achiving its equilibrium point as quickly as expected. Thus, we run the numerical approximation ofsystem (11) with ode45 function of MATLAB. Simulations have been conducted for α = 1000, β = 0.5.The purpose is to decrease the substrate s1 to slim = 0.1. Taking q = 0.1 and following relation q = µ(sqr ),it is expected to achieve the equilibrium point (s∗r , b

r ) = (0.0526, sl(t1)−0.0526) in a nondimensional timesmall compared to the nondimensional time that system (11) needs to get sl close to slim. In this casethis time is t1 ≈ 60.In Figure 10 the dynamics of system (11) is shown. Figure 11 is a zoom during a small period of nondi-mensional time of the process. Substrate and biomass concentration are compared with the equilibrium

Page 22: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

4.1 An ODE Approach for the Bioreactor 22

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

s r(t

r)

b r(t

r)

(a) Phase portrait when q = 0.5.

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

s r(t

r)

b r(t

r)

(b) Phase portrait when q = 1.5.

0 0.2 0.4 0.6 0.8 10

0.2

0.4

0.6

0.8

1

s r(t

r)

b r(t

r)

(c) Phase portrait when q = 1.

Figure 9: Different phase portraits for system (4).

0 10 20 30 40 50 600

0.2

0.4

0.6

0.8

1

1.2

1.4

Time

s 1

(t 1

)

b r(t

1)

s r(t

1)

Figure 10: Dynamics of (11) for achieving slim = 0.1. Flux is taken as q = 0.1

Page 23: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

4.2 A PDE Approach for the Bioreactor 23

0 0.02 0.04 0.06 0.080

0.2

0.4

0.6

0.8

1

Time

s r(t

1)

s r∗

0 0.02 0.04 0.06 0.080.5

0.6

0.7

0.8

0.9

1

1.1

1.2

1.3

1.4

Time

b r(t

1)

b r∗

Figure 11: Zoom to see the equilibrium approximation of sr and br.

point. It is easy to observe that the equilibrium is achieved around t1 = 0.1, time extremely small com-pared to t1 ≈ 60. This is another evidence for constating that the quasi-steady state approximation donein Section 3.1.3 is reasonable.

4.2. A PDE Approach for the Bioreactor

We present numerical tests computed in cylindrical coordinates using the Finite Element Method(FEM) solver COMSOL Multiphysics 4.2. For more information see the Reference Guide inhttp://fab.cba.mit.edu/classes/S62.12/docs/COMSOL_Multiphysics.pdf

Following [4] we choose the dimensional parameters µmax = 1.0 (1/s) and K = 1 (mol/m3). Moreover,we take H = L = 0.68 (m) as cilynder parameters, in order to obtain Vr ≈ 1 (m3). We show the numericalsimulation of system (8) in the special case for which the entering substrate Se is considered constant.It is of interest to know if system (8) behaves as system (1). For instance, we want to check if system (8)

achieves the equilibrium point (SQr , Se − SQ

r ) when Q < Vrµ(Se)A

. Particularly, for Se = 5 (mol/m3), wecompute the critical value Q ≈ 0.57 (m/s). In Figures 12 and 13 we plot the surface average of substrateand biomass at each time, that we denote with Sr(t) and Br(t) respectively. Figure 12 shows the behaviorof system (8) with diffusion coefficients DS = DB = 100 (m2/s), when Q < 0.57 (m/s) and Q ≥ 0.57(m/s)are taken.We can observe that when Q < 0.57, the solution of system (8) tends to the equilibrium point (SQ

r , Se −SQ

r ) = (1, 4) and in the other case the solution of system (8) tends to the equilibrium point (Se, 0) = (5, 0),i.e, the biomass become extinct.Figure 13 shows the behavior of system (8) with diffusion coefficients DS = DB = 0.01 (m2/s), whentwo different flux values are taken. We can observe that system (8) achieves the equilibrium point(SQ

r , Se − SQr ) ≈ (0.12, 0.48) when Q = 0.08 but not when Q = 0.2. Thus, we conclude that system (8)

behave as system (1) with diffusion coefficients DS = DB = 100 (m2/s), but not with diffusion coefficientsDS = DB = 0.01 (m2/s).

Remark 4.1. It is reasonable to think that an smaller flux value is needed in order to compensate lowdiffusivity coefficients. Maybe a suitable nondimensionalization of system (8) could give us the criticalvalue of Q depending on the diffusion coefficients. This will be tackled as a future work.

Page 24: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

5. Optimization problem 24

0 5 10 150.5

1

1.5

2

2.5

3

3.5

4

4.5

5

Time(seconds)

S r(t)

B r(t)

(a) Q = 0.35 < 0.57

0 5 10 150

1

2

3

4

5

Time (seconds)

S r(t)

B r(t)

(b) Q = 0.6 > 0.57

Figure 12: Solution of system (8) with Se = 5 (mol/m3), Binit = 0.5 (mol/m3) and DS = DB = 100(m2/s).

0 2 4 6 8 100

1

2

3

4

5

Time (seconds)

S r(t)

B r(t)

(a) Q = 0.08

0 2 4 6 8 100

1

2

3

4

5

Time (seconds)

S r(t)

B r(t)

(b) Q = 0.2

Figure 13: Solution of system (8) with Se = 5 (mol/m3), Binit = 0.5 (mol/m3) and DS = DB = 0.01(m2/s).

5. Optimization problem

We consider the optimization problem consisting of driving down the substrate concentration of thewater resource, S1(t), to a prescribed value Slim > 0 in a minimal amount of time by choosing a suitablecontrol variable Q(t) ≥ 0. Again, we have to make a distinction between the coupled system withbioreactor modeled with ODE and PDE approaches.

Page 25: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

5.1 Bioreactor with ODE model. Theoretical results 25

5.1. Bioreactor with ODE model. Theoretical results

In the case where ODE approach is considered in the reactor, the optimization problem can bemathematically formulated as follows:

Find Qopt ∈ X, such thatT (Qopt) = minQ∈X T (Q),

(15)

where T (Q) is the time required for achiving S1(T (Q)) = Slim, with S1 being the solution of (9). FollowingRemarks 3.1 and 2.8, we stablish that the function space is X = Q piecewise C1([0,+∞)) : 0 ≤ Q(t) <Vrµ(S1(t)) ∀t ≥ 0.

In terms of nondimensionalization, optimization problem (15) can be rewritten as

Find qopt ∈ Y, such thatT1(q

opt) = minq∈Y T1(q),(16)

where T1(q) is the time required for achiving s1(T1(q)) = slim = SlimS1,0

, with s1 being the solution of (10).

In this case, Y = q piecewise C1([0,+∞)) : 0 ≤ q(t1) < µ(s1(t1)) ∀t1 ≥ 0.Due to Assumption A1, we can also express T1(q) as a function of sq

r as T ∗

1 (sqr) = T1(q). For the sake of

simplicity, we denote both functions by T1. Thus, problem (16) can be rewritten as

Find sopt

r ∈ Z, such that

T1(soptr ) = mins

qr∈Z T1(s

qr ),

(17)

where Z = sqr piecewise C1([0,+∞)) : 0 ≤ sqr (t1) < s1(t1) ∀t1 ≥ 0.

5.1.1. Case 1: Flux is constant on time

Lemma 5.1. Under assumption A1, if q is constant and sqr is given by q = µ(sqr ), then the time requiredfor the solution of (13) to attain the value slim is:

T1(sqr ) =

1

µ(sqr )ln(

1 − sqrslim − sqr

). (18)

Proof. (This proof has been done in Proposition 1 of [4] for the dimensional case).When q is constant the explicit solution of (13) is given by

s1(t1) = (1 − sqr )e−µ(sq

r )t1 + sqr . (19)

From (19) it may be calculated the time for which the substrate concentration achieves the prescribedvalue slim:

slim = (1 − sqr )e−µ(sq

r )T1 + sqr ⇒1 − sqrslim − sqr

= eµ(sqr )T1 .

Taking logarithms we obtain

ln(1 − sqrslim − sqr

) = µ(sqr )t1

and therefore

T1(sqr ) =

1

µ(sqr )ln(

1 − sqrslim − sqr

).

Page 26: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

5.1 Bioreactor with ODE model. Theoretical results 26

Remark 5.2. This result can be converted to the dimensional case in the following way:

T (SQr ) = τ1T1(s

qr ) =

µ(Se(0))V

VrT1(s

qr ) =

1Vr

V µ(Se(0))µ(sqr )

ln (1 − S

Qr

S1,0

SlimS1,0

− SQr

S1,0

) =1

VrVµ(SQ

r )ln (

S1,0 − SQr

Slim − SQr

).

Lemma 5.3. Assuming 1 > slim, optimization problem (16) has a unique solution.

Proof. (This proof has been done in Proposition 1 of [4] for the dimensional case).Lemma 5.1 implies that T1(s

qr ) → +∞ as sqr → slim or sqr → 0, and consequently its minimum is reached

on the interval (0, slim). In terms of q, the minimum time is attained with q ∈ (0, µ(slim)). Even though itcannot be concluded that the function (18) is convex, it has a minimum that we denote as T ∗

1 and thereis an associated constant control s∗r which realizes the minimum T ∗

1 in (18). From (19), the dynamics ofthe substrate concentration in the water resource is the following

s1(t1) = (1 − sqr )e−µ(sq

r )t1 + sqr .

Considering sqr as a variable parameter, let us reformulate the above equation as:

s1(t1, sqr ) = (1 − sqr )e

−µ(sqr )t1 + sqr .

For a fix t1 > 0, the mapFt1 : (0, slim) −→ (0, 1)

sqr −→ Ft1(sqr ) = s1(t1, s

qr )

is strictly convex. Indeed,

dFt1

dsqr= 1 + [−1e−µ(sq

r )t1 + (1 − sqr )(−µ′(sqr )t1e

−µ(sqr )t1)]

= 1 − (e−µ(sqr )t1)[1 + (1 − sqr )µ′(s

qr )t1].

ddsqr

(dFt1

dsqr) = e−µ(sq

r )t1 µ′(sqr )t1[1 + µ′(sqr )(1 − sqr )] − e−µ(sqr )t[µ′′(sqr )(1 − sqr )t− µ′(sqr )t1]

= e−µ(sr)t1t1︸ ︷︷ ︸

>0

[2µ′(sqr ) + µ′(sqr )(1 − sqr )︸ ︷︷ ︸

>0(A1.1)

− µ′′(sqr )︸ ︷︷ ︸

<0(A1.2)

(1 − sqr )︸ ︷︷ ︸

>0

]) > 0.

Particularly, if we consider t1 = T ∗

1 , the map FT ∗

1(·) := s1(T

1 , ·) is strictly convex. Moreover, FT∗

1(sqr ) ≥

slim for all constant control sqr ∈ (0, slim), and FT∗

1(s∗r ) = slim. Consequently the constant control s∗r is

unique.

5.1.2. Case 2: Flux is a time variable

As we pointed out at the beginning of Section 5, we can either choose sqr or q as control variable,where sqr fulfills q = µ(sqr ). For the sake of simplicity, in this section we will work with sqr as the controlvariable.

Definition 5.4. If a functional relation of the form

sqr (t1) = ω(s1(t1))

can be found for the optimal control at time t1 for problem (16), then ω is called optimal feedback.

Lemma 5.5. An optimal feedback soptr must fulfill

soptr (t1) = arg min

sqr (t1)∈(0,s1(t1))

µ(sqr (t1))(sqr (t1) − s1(t1)), (20)

or equivalently,µ′(sopt

r (t1))(sl(t1) − soptr (t1)) = µ(sopt

r (t1)). (21)

Moreover, t1 → qopt(t1) is decreasing along any optimal trajectory.

Page 27: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

5.1 Bioreactor with ODE model. Theoretical results 27

Proof. (This proof has been done in Proposition 2 of [4] for the dimensional case).It is clear that any optimal feedback sopt

r must make the time derivative of s1(t1) in equation (13) themost negative at any given time, i.e, it must fulfill

soptr (t1) ∈ arg min

sqr (t1)∈(0,s1(t1))

µ(sqr (t1))(sqr (t1) − s1(t1)).

Considering sqr as a time variable and for a fix t1 > 0 let us define the map:

Gt1 : (0, s1(t1)) −→ R

s −→ Gt1(s) = µ(s)(s− s1(t1))

Let us notice that function Gt1 is convex, i.e,d2Gt1ds2 > 0.

dGt1ds

= µ′(s)(s− s1(t1)) + µ(s),

d2Gt1ds2 = µ′′(s)

︸ ︷︷ ︸

<0(A1.2)

(s− s1(t1))︸ ︷︷ ︸

<0

+2 µ′(s)︸ ︷︷ ︸

>0(A1.1)

> 0

Consequently, for any t1 ≥ 0 we have that soptr (t1) is unique. Thus, the control variable sopt

r is unique,and the equality in (20) holds.

In order to look for a explicit expression for soptr , we recall that a necessary condition for optimality

in (20) is thatdGt1ds

(soptr (t1)) = 0. Therefore,

dGt1

ds(sopt

r (t1)) = µ′(soptr (t1))(s

optr (t1) − s1(t1)) + µ(sopt

r (t1)) = 0

⇔ µ′(soptr (t1))(sl(t1) − sopt

r (t1)) = µ(soptr (t1)).

It remains to prove that the map t1 → qopt(t1) is decreasing along any optimal trajectory, i.e, dqopt

dt1< 0.

Since qopt(t1) = µ(soptr (t1)), one has dqopt

dt1= µ′(sopt

r )︸ ︷︷ ︸

>0(A1.1)

dsoptr

dt1. Thus, we only need to proove that ds

optr

dt1< 0,

to show that for qopt(t1) is decreasing.

Taking the time derivative of expression (21), one obtains

dsoptr

dt1µ′′(sopt

r )(s1 − soptr ) + µ′(sopt

r )(ds1dt1

−dsopt

r

dt1) =

dsoptr

dt1µ′(sopt

r )

dsoptr

dt1[2µ′(sopt

r ) + µ′′(soptr )(sopt

r − s1)] = µ′(soptr )

ds1dt1

and therefore

dsoptr

dt1=

>0(A1.1)︷ ︸︸ ︷

µ′(soptr )

<0︷︸︸︷

ds1dt1

2 µ′(soptr )

︸ ︷︷ ︸

>0(A1.1)

− µ′′(soptr )

︸ ︷︷ ︸

<0(A1.2)

(s1 − soptr )

︸ ︷︷ ︸

>0

< 0,

which completes the proof.

Remark 5.6. Once we have found the optimal feedback soptr (t1) with Lemma 5.5, we can obtain qopt(t1)

with the equation qopt(t1) = µ(soptr (t1)).

Page 28: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

5.2 Bioreactor with PDE model. Genetic Algorithms 28

Remark 5.7. Taking into account that the optimal feedback should fulfill equation (20), this result canbe converted to the dimensional case in the following way:

µ′(soptr )(sl − sopt

r ) = µ(soptr ) ⇔ Sl,0βµ

′(Soptr )(

Sl − Soptr

Sl,0) = βµ(Sopt

r ) ⇔ µ′(Soptr )(Sl − Sopt

r ) = µ(Soptr ).

Remark 5.8. Particularly, when µ(·) is the nondimensionalized Monod function (see Equation (2)), itis easy to check that sopt

r (tl) = KS1,0

[√

1 + s1(t1) − 1].

Remark 5.9. The fact that the control variable qopt is decreasing along time can be interpreted physicallyas follows: as time goes on, the substrate in the water resource is decreasing and the water that enters thebioreactor is less polluted. Therefore, if the flux does not decrease, the biomass does not recieve enoughsubstrate to reproduce, and eventually it becomes extinct.

5.2. Bioreactor with PDE model. Genetic Algorithms

In the case where PDE approach is considered in the reactor, the optimization problem can be math-ematically formulated as follows:

Find Qopt ∈ X, such thatT (Qopt) = minQ∈X T (Q),

(22)

where T (Q) is the time required for achiving S1(T (Q)) = Slim, with S1 being the solution of the equation(14). Notice that we have not proved any result of existence and uniqueness for system (8) yet (seeRemark 2.9). Thus, we can not set properly the function space X, but we consider the same space as theone considered in Section 5.1, that is X = Q piecewise in C1([0,+∞)) : 0 ≤ Q(t) < Vrµ(S1(t)) ∀t ≥ 0.

Remark 5.10. It is of interest to know if optimization problem (22) has a unique solution. This willdepend on the election of the function space X, which it is also important in order to prove the existenceand uniqueness of solution of system (8). The problem of finding X will be tackled as a future work.

As in Section 5.1, we consider the cases in which Q is constant in time and Q is a time variable. Inboth cases optimization is solved using Genetic algorithms (explained in Section 6).

5.2.1. Case 1: Flux is constant on time

In this case, the optimization problem is reduced to find the optimal constant Q such that 0 ≤ Q <Vrµ(Slim). Let us recall that the results obtained in Section 4.2 seem to show that when the diffusioncoefficients take small values, the search space [0, Vrµ(Slim)) may not be appropiate, i.e., there exists acritic value Qmax ∈ [0, Vrµ(Slim)) such that for all Q ∈ [Qmax, Vrµ(Slim)), the biomass concentration inthe bioreactor becomes extinct and no decontamination is produced. Therefore, we first do a randomsearch in the larger interval [0, Vrµ(Slim)) in order to approximate the value Qmax and then we computethe genetic algorithm in the obtained search space [0, Qmax).

5.2.2. Case 1: Flux is a time variable

In this case, we look for a time variable flux Q(t). In order to compute it, we work with 5 optimizationparameters, denoted by Q0, Q1, Q2, Q3 and Q4. Those optimization parameters correspond to the valueof the flux Q(t) at five different fixed times t0, t1, t2. t3 and t4, starting from time t0 = 0. Thus, the timevariable Q(t) is calculated with a Constant Interpolation Algorithm. This interpolation approach locatesthe nearest data value and assign the same value. Particularly in this case it produces the interpolated

Page 29: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

6. Genetic Algorithms 29

function:

Q(t) =

Q0, if t ∈ [0, t12 ],

Q1, if t ∈ ( t12 ,

t2−t12 ],

Q2, if t ∈ ( t2−t12 , t3−t2

2 ],

Q3, if t ∈ ( t3−t22 , t4−t3

2 ],

Q4, if t ∈ ( t4−t32 , t4].

Remark 5.11. It would be interesting to compute the time variable Q(t) with a Cubic Spline Interpo-lation (see [11]), in order to obtain a smooth function comparable to the one obtained in Section 5.1.Nevertheless, this option seems to lead to high computational time and will be tackled as a future work.

Following Remark 5.9, we conclude that the flux Q must be decreasing on time. Thus, we need tocompute the optimization parameters Q0, Q1, Q2, Q3 and Q4 in such a way that

Q0 > Q1 > Q2 > Q3 > Q4.

To do so, we consider the optimization parameter Q0 ∈ [0, Vrµ(S1,0)) and we define new optimizationparameters α1, α2, α3 and α4 in (0, 1) such that the interpolation data follows as:

Q1 = α1Q0, Q2 = α2α1Q0, Q3 = α3α2α1Q0, Q4 = α4α3α2α1Q0.

Notice that for small diffusion coefficients (as DS = DB = 0.01 (m2/s)), we must fix a suitable upperbound Qmax for Q0. As in Section 5.2.1, we first do a random search in the larger interval [0, Vrµ(S1(0)))to approximate the value Qmax and then we compute the genetic algorithm in the obtained search spaceΘ = [0, Qmax) × [0, 1]4.

6. Genetic Algorithms

6.1. Introduction

We consider a general optimization problem of the form

minx∈Θ

f(x) (23)

where f : Θ → R is the fitness function and x is the optimization parameter, belonging to a search spaceΘ ⊂ R

N , N ∈ N. Problem (23) can be solved, for instance, by considering a genetic algorithm. A geneticalgorithm (GA) is an optimization method for solving both constrained and unconstrained optimizationproblems based on a natural selection process that mimics biological evolution. The algorithm repeatedlymodifies a population of individuals (i.e., a set of points in Θ) in such a way that at each step, GA randomlyselects individuals from the current population and uses them to produce new individuals (called children)for the next generation. Over successive generations (i.e., iterations), the population may evolve towardan optimal solution. One of the advantadges of genetic algorithms is that they can solve a large range ofoptimization problems, including problems in which the fitness function is discontinuous, nondifferentiable,stochastic, or highly nonlinear.

6.2. Description of the algorithm

A first family of possible solutions of the optimization problem (23) is randomly created in the searchspace Θ. We call it population and we denote it by X0 = x0

j = (x0j,1, . . . , x

0j,N ) ∈ Θ, j = 1, . . . , Np,

where each x0j is called individual and Np ∈ N is the number of individuals created. We call gene to each

component x0j,k of an individual, k = 1, . . . , N . In this case, each individual component is a real number

Page 30: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

6.2 Description of the algorithm 30

and the considered GA use the so called real codificacion (in opposition to the binary codification, whereeach component is converted to a binary code).Starting from the initial population X0, we recursively generate Ng ∈ N new populations, which we callgenerations and we denote by Xi = xi

j ∈ Θ, j = 1, . . . , Np with i = 1, . . . , Ng − 1. Each new generation

Xi is created by the modification of the previous generation applying 4 stochastic steps, called selection,crossover, mutation and elitism. These stochastic methods are described in detail in Sections 6.2.1, 6.2.2,6.2.3 and 6.2.4, respectively. The genetic search is terminated when Ng generations are computed, orfollowing a user-specified stopping criteria. Some possible termination criteria are presented in Section6.2.5.

6.2.1. Selection

Selection is the process that consist in selecting individuals according to their fitness value (i.e., ina minimization problem the lower is the fitness value of an individual, the higher is its chance to beselected). It realizes The fittest will survive principle. There exist various methods to select individuals(see for instance [5], [16] or [20]). Some of them are described below:

Roulette Wheel Selection: Parents are selected according to their fitness value. Taking intoaccount that we want to obtain the minimum of a function, the probability of choosing a certainindividial is inversely proportional to its fitness value. The inverse proportion for each individualxi

j can be computed as follows

aj =

∑Np

j=1 f(xij)

f(xij)

, j = 1, 2, . . . , Np,

and so the corresponding percentage in the roullete wheel for each individual xij is

pj =aj × 100∑Np

j=1 aj

.

For instance, we consider the data presented in Table 1:

Individual number Individual Fitness value % of Total

1 (0, 1) 169 22.722 (1, 0) 576 6.673 (0, 0) 64 59.994 (1, 1) 361 10.63

Total 1170 100.0

Table 1: Roulette Wheel Selection.

Considering the example in Table 1, the corresponding roulette wheel is depicted in Figure 14. Inorder to create a new population, we spin the roulette wheel Np times, in such a way that at eachstep, the algorithm chooses a parent from the portion in which the wheel stops.

Tournament Selection : We randomly choose pairs of individuals and the one with lowest fitnessvalue (in the case of minimization problem) pass to the next generation. We repeat the processNp times in order to obtain Np individuals after the selection process. Considering the populationpresented in Table 1, one iteration of this Selection Tournament is depicted in Figure 15.

Stochastic Uniform Selection: We compute a line in which each parent corresponds to a sectionof the line of length inversely proportional to its fitness value. After fixing a step size, we considera point chosen randomly in the line and perform random jumps less or iqual to this fixed step size.At each step, the algorithm allocates a parent from the section the point lands on. An example ofStochastic Uniform Selection applied to Table 1 is depicted in Figure 16.

Page 31: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

6.2 Description of the algorithm 31

3

6.67%2

10.63%

4

1

22.62%

59.98%

Figure 14: Roulette wheel Selection

Figure 15: Tournament Selection

Figure 16: Stochastic Uniform Selection

6.2.2. Crossover

The crossover operator is used to create a new solution candidate by combining the characteristics oftwo existing individuals xi

j , xik from the population Xi (selected during the previous selection process),

that we call parents. The two considered individuals are combined with a probability pc given by theuser. There are many methods of combining individuals (see for instance [3], [5] or [16]). Some of themare described below:

Single Point Crossover: We randomly choose an integer n between 1 and N . The process ofcrossing two existing individuals xi

j , xik is the following:

- We select vector entries numbered less than or equal to n from the first parent.- We select vector entries numbered greater than n from the second parent.- We concatenate these entries to form a child vector.For instance, for the following individuals in the search space Θ = [0, 1]8:

Parent 1 (0.77, 0.98, 0.18, 0.52, 0.23, 0.90, 0.83, 0.45)

Parent 2 (0.91, 0.44, 0.8, 0.53, 0.55, 0.57, 0.64, 0.15)

Table 2: Individuals for crossover.

If n = 3 one has the two new individuals

child 1 = (0.77, 0.98, 0.18, 0.53, 0.55, 0.57, 0.64, 0.15)child 2 = (0.91, 0.44, 0.8, 0.52, 0.23, 0.90, 0.83, 0.45)

Page 32: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

6.2 Description of the algorithm 32

Arithmetic Crossover: We linearly combine two parents to produce two new children accordingto the following equations:

Chil1 = a · Parent1 + (1 − a) · Parent2

Chil2 = (1 − a) · Parent1 + a · Parent2

where a ∈ [0, 1] is a random weighting factor.

Heuristic Crossover: This crossover operator returns a child that lies on the line containing theparents, a small distance away from the parent with the lowest fitness value in the opposite directionfrom the parent with the highest fitness value. Thus, if the first parent has a lower fitness valuethan the second, Heuristic Crossover creates the new individual

child = Parent1 + r · (Parent2 - Parent1)

where r is a random number between 0 and 1.

6.2.3. Mutation

The mutation operator randomly modifies the value of one or more genes of an individual. It providesdiversity in the population and intends to avoid the prematured convergence phenomenon (i.e., populationconcentrated near a local minimum). Each gene of an individual can be mutated with a probability pm

given by the user. There exists many methods to make small random changes in the individuals in orderto mutate them (see for instancer [3] or [16] for more details). Some of them are presented below:

Uniform Mutation: We replace the value of the chosen genes with a uniform random valueselected between the lower and upper bounds of the gene search space.

Non-Uniform Mutation: This mutation operator (also called Gaussian Mutation) decrease theprobability of mutation as the generation number increases. Let assume that gmax is the maximumnumber of iterations and are at the generation g . If want to mutate an individual x, we compute

x′ =

x+ ∆(g, b− x) if τ = 0x− ∆(g, b− x) if τ = 1

where τ is a binary random number and

∆(g, y) = (1 − r(1− g

gmax)b

),

where r is a random number in [0, 1] and b is a parameter given by the user, determining the degreeof dependency on the iteration number.

Boundary Mutation: We replace the value of the chosen genes with either the lower or the upperbound for that gene (chosen randomly). Thus, if we want to mutate x, being xmin and xmax thelower and upper bounds for x, respectively, we compute

x′ =

xmin if τ = 0xmax if τ = 1

here τ is a binary random number.

6.2.4. Elitism

Elitism operator ensures that at least one copy of the best individual(s) of the current generation isdirectly copied to the next generation. The main advantage of elitism is that a decreasing convergence isguaranteed. For more details about elitism operator see for instance [16] or [20].

Page 33: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

6.3 Code Implementation 33

6.2.5. Stopping Criteria

The stopping criterion is the condition for which the genetic algorithm decides whether to continueor to stop the search. Each of the considered stopping criterion is checked after each generation to see ifthe algorithm stops. There are many ways to stop the search (see for instance [5], [12] or [20] for moredetails). Some of them are presented below:

Generation number: The genetic search is terminated when a user-specied maximum number ofgenerations have been reached. This stopping method is generally chosen, and it can be combinedwith other termination criteria.

Evolution Time: The genetic search is terminated when the elapsed evolution time exceeds auser-specied maximum computational time.

No Improvement generation number: The genetic search is terminated after a user-speciednumber of generations withouth improvement, i.e., the fitness value of the best element does notdecrease.

Fitness Threshold: This termination method is appropiated for minimization problems in whichthe solution is already known. The genetic search is terminated when the best fitness of the currentpopulation becomes close enough to the fitness of a global minimum. If x∗ is a global minimum, weconsider that x is significantly close to x∗ if

|f(x∗) − f(x)| ≤ ǫ1|f(x∗)| + ǫ2,

where ǫ1 and ǫ2 are real numbers (close to zero) chosen by the user (e.g., ǫ1 = 10−2 and ǫ2 = 10−3).

Fitness Convergence: The genetic search is terminated when the fitness value does not decreasesignificantly over two succesive generations. For instance, if xi,∗ and xi+1,∗ are the individuals withlowest fitness value of the i-esim and the (i+1)-esim generation respectively, the genetic search stopsif

|f(xi+1,∗)| ≤ τ |f(xi,∗)|,

where τ is a user-specified real number between 0 and 1.

6.3. Code Implementation

We have implemented the Genetic Algorithm in MATLAB script language, following the scheme pre-sented below:

Inputs: - Ng (natural): Number of generations.- Np (natural): Number of population in each generation.- pc (float): Crossover probablity.- pm (float): Mutation probablity.- l (float): Vector of length N specifing the lower bounds of our variable.- u (float): Vector of length N specifing the upper bounds of our variable.- fmin (float): Fitness of the global minimum (in the case it is known beforehand).

Outputs: - xsol (float): Vector of length N , solution of the minimization problem (23).- f(xsol) (float): Fitness value of the solution vector xsol.

Algorithm

call INITIAL SOLUTIONS % We randomly create an initial solution X = X0 ∈ Θ.

call FITNESS EVALUATION % We calculate f(X)

Repeat (Loop 1 )

Page 34: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

6.3 Code Implementation 34

call THREE STEPS GENETIC % We reproduce the population X following the

three stochastic processes below, obtaining X ′

call SELECTION

call CROSSOVER

call MUTATION

call FITNESS EVALUATION % We calculate f(X ′)call ELITISM % We calculate X ′′

X = X ′′ % We update the population

until stopping criteria (end Loop1 )

Following [12], we notice that the Genetic Algorithm can be written using a matrix representation. Thei-esim generation can be rewritten as a real valued matrix with size (Np, N) as follows

Xi =

xi1(1) · · · xi

1(N)...

......

xiNp

(1) · · · xiNp

(N)

,

ans the new generation is computed following the equation

Xi+1 = (IN − E i)(CiSiXi + Mi) + E iXi (24)

where IN is the identity matrix in RN , and Si, Ci, Miand Mi represent respectively the Selection,

Crossover, Mutation and Elitism operators described in matrix-form.

Remark 6.1. Notice that equation (24) can not be performed with all operator described in Section6.2. We present the matrix-form for Roulette wheel Selection, Arithmetic Crossover and Non-UniformMutation.

Roulette wheel selection: Matrix Si is a binary matrix with size (Np, Np), satisfying Sij,k = 1 if the

k-esim individual in Xi is the j-esim when spining the roulette, and Sij,k = 0 in other case. The

modified population isXi+1,1 = SiXi.

Arithmetic Crossover: Matrix Ci is a real valued matrix with size (Np, Np), satisfying Ci2j−1,2j−1 =

λ1, Ci2j−1,2j = 1 − λ1, C

i2j,2j = λ2 and Ci

2j,2j−1 = 1 − λ2, where

λ1 = λ2 = 1 with probability 1 − pc

λ1, λ2 ∈ U(0, 1) in other case

The modified population isXi+1,2 = CiXi+1,1.

Non Uniform Mutation: Matrix Mi is a real valued matrix with size (Np, N), satisfying

Mj =

~0 with probability 1 − pm

∆(g, y) in other case

The modified population isXi+1,3 = Xi+1,2 + Mi.

Elitism: E i is a binary matrix with size (Np, Np), satisfying E i(b, b) = 1 if xib (the individual situated

in the b-esim raw of the generation Xi) has b etter fitness than all the individuals obtained inXi+1,3.Thus, we have copied the individual xi

b to the b-esim raw of the generation Xi. In other case E ij,k = 0

for j = k = 1, . . . , Np. Consequently, the modified population is

Xi+1 = (IN − E i)(Xi+1,3) + E iXi.

Page 35: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

6.4 Hybrid Genetic Algorithm 35

6.4. Hybrid Genetic Algorithm

Hybrid genetic algorithms (HGA) (see Chapter 4, [16]) are generally used when additional auxiliaryinformation such as derivatives or other specific knowledge is known about the fitness function. The basicidea is to divide the optimization task into two complementary parts. The coarse, global optimizationis done by the genetic algorithm, while local refinement is done by other method, for instance, GradientDescent method. In order to solve optimization problem (23) we perform a first coarse search of globalminimum with GA, and afterwards, we refine the local search by using a Gradient Descent method, ex-plained below.

6.4.1. Gradient Descent Method

Descent methods are used in optimization theory in order to obtain the minimum value of fuctionsf ∈ C1(RN ,R), by choosing an appropiate descent direction ρk. Starting with a given x0 ∈ R

N , then theiteration is given by

xk+1 = xk + αkρk,

where the positive scalar αk is called the step length.The succes of a descent method depends on the suitable choices of both direction ρk and the step lengthαk. Particularly, Gradient Descent method uses the descent direction ρk = −∇f(xk). Moreover, the steplength must fulfill the equation

f(xk + αkρk) ≤ f(xk + αρk), for all α ≥ 0.

This is equivalent to solve another optimization problem, given by

minαf(xk − α∇f(xk)). (25)

Solving optimization problem (25) can increase the complexity of optimization problem (23). Therefore,in practice we use Secant or Dichotomy methods in order to obtain the step length αk (for more detailssee [11]). We calculate the step length at each iteration, αk, as follows:

1. We compute the fitness values f(xk − α∇f(xk)) for α = 10−6, 10−5, . . . , 105, 106, and we choose αthe scalar α for which the lowest fitness value is attained.

2. We use dichotomy algorithm using the scalar α obtained in the previous step.

Dichotomy Algorithm

α+ = 2α, α− = 12 α.

xk+1 = xk − α∇f(xk), x+k+1 = xk − α+∇f(xk), x−k+1 = xk − α−∇f(xk).

¯α = α, α+, α− depeding if the lowest fitness value is f(xk+1), f(x+k+1) or f(x−k+1).

If ¯α = α+

Repeat (Loop 1 )¯α = ¯αα+.f(xk + ¯α∇f(xk)).

while the fitness value is decreased ( end Loop 1 )

Else If ¯α = α−

Repeat (Loop 2 )¯α = ¯αα−.

f(xk + ¯α∇f(xk)).while the fitness value is decreased ( end Loop 2 )

Page 36: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

6.5 Some benchmarks of the considered HGA 36

End If

αk = ¯α.

6.5. Some benchmarks of the considered HGA

In order to validate the efficiency of the considered hybrid genetic algorith (HGA) we study its behav-ior with some functions (called Benchmark Functions), available in literature (see, for instance [9]). Themain characteristic of these functions is that their global minima is known, and present some difficultiesfound in many optimization problems, such a the existence of various local minima, flat function, highoscillations, etc. There are several classes of such test functions: one dimensional / multidimensional,convex / nonconvex, multiple extreme functions, etc. Some of them are presented in Appendix C and areused during this work.

For numerical experiments we have chosen parameters following [12]. Thus, we use Ng = Np = 100,Roulette Wheel Selection, Arithmetic Crossover with probability pc = 0.4 and Non-Uniform Mutationwith b = 1 and probability pm = 0.3. Since the global minima is known or Benchmark functions, we usethe Fitness Treshold Stopping Criterion (see Section 6.2.5). In order to validate our results, we comparethe convergence succes with the genetic algorithm function ga of MATLAB. For ga documentation seehttp://www.mathworks.com/discovery/geneticalgorithm.html. Hereinafter, we will denote by MGAthe genetic algorithm function ga of MATLAB.The comparison can be seen in Table 3, where the number of function evaluations is also compared.

Function Convergence HGA Convergence MGA Evaluations HGA Evaluations GA

Branin Yes Yes 1926 2056Easom Yes Yes 5237 2133Goldstein Price Yes Yes 4433 4293Shubert Only with Hybrid GA Yes 8167 7393Hartmann -3 Yes Yes 3863 6073Rosenbrock 2 Yes Yes 33760 2783Shekel 5 Only with hybrid GA No 260257 -Zakharov 5 Yes Yes 5002 3766

Table 3: Comparison between HGA and MGA using some benchmarks.

In the case of the benchmarks Branin, Easom, Goldstein Price, Schubert, Hartmann -3,Rosenbrock-2 andZakharov-5 both algorithms converge, and the number of function evaluations is comparable. BenchmarkShekel-5 does not converge with MGA, but converge with HGA. Thus, we conclude that the presentedHybrid Genetic Algorithm (HGA) works as efficiently as the function ga of MATLAB (MGA), improvingit in some cases.

7. Numerical Optimization Results

In this section we solve numerically the optimization problem presented in Section 5 for both cases:ODE and PDE approaches for the bioreactor model, and using the Monod Function (see Equation 2) asfunction µ(·). Model parameters are taken as in Section 4, but in this case the value for the flux Q isgiven by solving an optimization problem.

7.1. An ODE Approach of the Bioreactor

In this section, we run numerical simulations related with the theory results presented in Lemmas 5.3and 5.5. We use the following schemes:

Page 37: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

7.1 An ODE Approach of the Bioreactor 37

Optimal constant control:

- Input: slim- Output: T opt

1 , qoptODE(const)

- Sketch of the algorithm:- T opt

1 = mins∈(0,slim) T1(s), with T1(s) given by (18). The minimum is obtained

using function min of MATLAB. Moreover, soptr is such that T1(s

optr ) = T opt

1 .

- qoptODE(const)=µ(sopt

r ).

Optimal feedback:

- Input: slim- Output: T opt

1 , s1(t1), qoptODE(feed)

- Sketch of the algorithm:- qopt

ODE(feed)= µ(soptr (t1)), where sopt

r (t1) is computed numerically with any

suitable numerical scheme, or analitically for special simple cases, as the

Monod Function, where it is computed as showed in Remark (5.8).

- Numerical approximation of s1(t1) is done using the optimal feedback soptr (t1)

in System (13) and applying ode45 of MATLAB to solve it.

- T opt1 is the time when s1(t1) reaches slim. Using the function odeset of

MATLAB we stop the numerical approximation of s1(t1) when it reaches slimand T opt

1 corresponds to this final time.

Figure 17-(a) refers to the nondimensional time that System (13) takes to decrease the substrate concen-tration in the resource, s1, to a prescribed value slim, when using control variable sqr ∈ (0, slim). In thiscase we choose slim = 0.1. The optimal control variable sopt

r is represented by a red circle. We can observethat T1(s) is going to infinity when s tends to 0. Figure 17-(b) shows the convergence to infinity when stends to slim. Thus, the mimimun is attained somewhere between 0 and slim, as Lemma 5.3 states.It is also of interest to know whether to use constant control or optimal feedback strategies to reach the

0 0.02 0.04 0.06 0.08 0.10

50

100

150

200

250

300

350

400

s r q

Tim

e

s r opt

T 1

(s r q)

(a) General view

0.099 0.0996 0.1 0.10020.8

1

1.2

1.4

1.6

1.8

2x 105

s r q

Tim

e

T 1

(s r q)

(b) Zoom when sqr → slim

Figure 17: T (sqr ) with slim = 0.1

prescribed concentration of substrate slim in the water resource. Figure 18 shows the nondimensional timethat the model takes to decrease the substrate concentration in the water resource, sl, to a prescribedslim. Simulations have been conducted slim in the range [0.01, 0.1]. We can observe that for instance,

Page 38: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

7.2 A PDE Approach for the Bioreactor 38

for slim = 0.01, the minimal time for constant control can be as twice as longer than the one given bythe optimal feedback. Figure 19 shows the nondimensional optimal controls qopt

ODE(const) and qoptODE(feed)

when slim = 0.1. We can observe that, indeed, the optimal feedback is decreasing along time.

0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.10

50

100

150

200

250

300

350

400

s lim

Tim

e

T1opt with control q

ODE opt (const)

T1opt with control q

ODE opt (feed)

Figure 18: Comparison of optimal nondimensional times using optimal constant controls or optimalfeedbacks.

0 5 10 15 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Time

q ODE opt (feed)

q ODE opt (const)

Figure 19: Comparison of optimal constant control and optimal feedback when slim = 0.1.

7.2. A PDE Approach for the Bioreactor

In this Section, we solve numerically the optimization problem (22) described in Section ??, with theHybrid Genetic Algorithm strategy presented in that Section. All experiments have been performed ona Pentium 4 with 3.4 Ghz and 2Gb of RAM by using MATLAB script language. We use the GeneticAlgorithm parameters Ng = Np = 50, Roulette Wheel Selection, Arithmetic Crossover with probabilitypc = 0.4 and Non-Uniform Mutation with b = 1 and probability pm = 0.2. We use the terminationcriterion No improvement generation number (see 6.2.5), stopping the algorithm after 30 generationswithout improvement. Moreover, when computing the time dependent flux, the interpolation times t0 = 0(s), t1 = 20000(s), t2 = 40000(s), t3 = 60000(s) and t4 = 80000(s) are choosen.Taking into account thateach function evaluation in optimization problem (22) takes around 12 seconds, the total computationaltime for solving optimization problem (22) is around 8 hours.

Remark 7.1. It would be interesting to run the numerical simulations with higher values of parametersng and np in order to validate the results presented in this Section. This improvement could increasedrastically the computational time and will be tackled as a future work.

Page 39: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

7.2 A PDE Approach for the Bioreactor 39

In the following Tables we show the obtained numerical results for the optimal constant flux, thatwe denote with Qopt

HGA(const), and the optimal time dependent flux, that we denote as QoptHGA(Tdep).

Numerical simulation of system (8) coupled with the water resource equation (14) is run with bothcontrols. We show the time (in seconds) needed to achieve the prescribed value of substrate concentrationin the water resource, Slim = 0.1 (mol/m3), using different values of initial substrate concentration in thewater resource, S1(0) (mol/m3).

S1(0) QoptHGA(const) Time Qopt

HGA(const) QoptHGA(Tdep) Time Qopt

HGA(Tdep)(mol/m3) (m/s) (s) (m/s) (s)

5 0.0758 72750

Q0 = 0.3092

49390α1 = 0.3345α2 = 0.5252α3 = 0.1042α4 = 0.1277

10 0.0778 81840

Q0 = 0.3625

51560α1 = 0.3383α2 = 0.4428α3 = 0.8226α4 = 0.3170

20 0.0797 90760

Q0 = 0.4037

55010α1 = 0.2843α2 = 0.6722α3 = 0.5219α4 = 0.4759

Table 4: Difference between QoptHGA(const) and Qopt

HGA(Tdep) with DS = DB = 100 (m2/s)

Table 4 corresponds to the comparison described previously when DS = DB = 100 (m2/s). We canobserve that for the three values of S1(0), the time needed to achieve the target with the optimal timedependent control is around 60% of the time needed with the optimal constant control.

S1(0) QoptHGA(const) Time Qopt

HGA(const) QoptHGA(Tdep) Time Qopt

HGA(Tdep)(mol/m3) (m/s) (s) (m/s) (s)

5 0.0522 87710

Q0 = 0.1461

60120α1 = 0.5954α2 = 0.5760α3 = 0.7616α4 = 0.7277

10 0.0550 100360

Q0 = 0.1851

62990α1 = 0.5304α2 = 0.5912α3 = 0.6185α4 = 0.1598

20 0.0885 58870

Q0 = 0.2246

23340α1 = 0.9976α2 = 0.6013α3 = 0.8187α4 = 0.9007

Table 5: Difference between QoptHGA(const) and Qopt

HGA(Tdep) with DS = DB = 0.01 (m2/s)

Table 5 corresponds to the comparison described previously but when DS = DB = 0.01 (m2/s). We canobserve that for values of S1(0) = 5 and 10 (mol/m3), the time needed to achieve the target with the

Page 40: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

7.3 Comparison between ODE Approach and PDE Approach Optimization Results 40

optimal time dependent control is around 65% of the time needed with the optimal constant control. Thisproportion achieves the 40% when S1(0) = 20 (mol/m3).

Remark 7.2. Notice that for diffusion coefficients DS = DB = 0.01 (m2/s) the cleaning time corre-sponding to the initial substrate concentration S1(0) = 20 (mol/m3) is smaller than the cleaning time forS1(0) = 5, 10 (mol/m3). It could be interesting to do this comparison with a broader range of values ofS1(0). This will be tackled as a future work.

7.3. Comparison between ODE Approach and PDE Approach Optimization Results

An interesting study is to check if the optimization results obtained in Sections 7.1 and 7.2 are similar.We first consider the case when the flux is constant in time, and then when it is a time variable. Numericalresults related with Section 7.1 are shown in their dimensional form, in order to compare them with thenumerical results related with Section 7.2.

7.3.1. Flux constant in time

In the following Tables 6 and 7 we show the difference between the optimal constant controls obtainedwith Lemma 5.3, denoted by Qopt

ODE(const), and the one obtained with the Hybrid genetic algorithm,

denoted by QoptHGA(const). Numerical simulation of system (8) coupled with the water resource equation

(14) is run with both optimal constant controls. We show the time (in seconds) needed to achieve theprescribed value of substrate concentration in the water resource, Slim = 0.1 (mol/m3), using differentvalues of initial substrate concentration in the water resource, S1(0) (mol/m3).

S1(0) QoptODE(const) Time Qopt

ODE(const) QoptHGA(const) Time Qopt

HGA(const)(mol/m3) (m/s) (s) (m/s) (s)

5 0.0775 74770 0.0758 72750

10 0.0756 82070 0.0778 81840

20 0.0801 91000 0.0797 90760

Table 6: Values of QoptODE(const) and Qopt

HGA(const) with DS = DB = 100 (m2/s)

Table 6 corresponds to the comparison described previously whenDS = DB = 100 (m2/s). We can observethat both flux, Qopt

ODE(const) and QoptHGA(const), are significantly close and also the time is comparable

(the difference is below 1% for the three values of S1(0)).

S1(0) QoptODE(const) Time Qopt

ODE(const) QoptHGA(const) Time Qopt

HGA(const)(mol/m3) (m/s) (s) (m/s) (s)

5 0.0775 S1 does not achieve Slim 0.0522 87710

10 0.0756 S1 does not achieve Slim 0.0550 100360

20 0.0801 S1 does not achieve Slim 0.0885 58870

Table 7: Values of QoptODE(const) and Qopt

HGA(const) with DS = DB = 0.01 (m2/s)

Table 7 corresponds to the comparison described previously but when DS = DB = 0.01 (m2/s). Wecan observe significant differences in the optimal constant flux and in the succes to achieve the target.We observe that for the three values of S1(0), if the optimal constant control Qopt

ODE(const) obtained byLemma 5.3 is used, we are not able to achieve the target. This is due to the fact that biomass becomesextinct before the substrate concentration in the water resource decrease to the value Slim, and thus, nomore reaction is produced. Nevertheless, the target is achieved when the optimal flux Qopt

HGA(const) givenby hybrid genetic algorithm is used.

Page 41: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

7.3 Comparison between ODE Approach and PDE Approach Optimization Results 41

7.3.2. Flux is a time variable

In the following Tables 8 and 9 we show the difference in terms of decontamination time betweenusing the optimal feedback obtained with Lemma 5.5 (denoted by Qopt

ODE(feed) (m/s)), or the optimal

time dependent control obtained with the Hybrid genetic algorithm (denoted by QoptHGA(Tdep)). We have

choosen the interpolation times t0 = 0 (s), t1 = 20000(s), t2 = 40000(s), t3 = 60000(s) and t4 = 80000(s).Numerical simulation of system (8) coupled with the water resource equation (14) is run with both optimalcontrols. We show the time (in seconds) needed to achieve the prescribed value Slim = 0.1 (mol/m3) ofsubstrate concentration in the water resource, using different values of initial substrate concentration inthe water resource, S1(0) (mol/m3).

S1(0) (mol/m3) Time QoptODE(feed) (s) Time Qopt

HGA(Tdep) (s)

5 46020 49390

10 47920 51560

20 49480 55010

Table 8: Difference in terms of econtamination time between using QoptODE(feed) or Qopt

HGA(Tdep) withDS = DB = 100 (m2/s).

Table 8 corresponds to the comparison described below when DS = DB = 100 (m2/s). We can observethat both times are comparable (the difference is below 1.5% for the three values of S1(0)). In order toanalyze the similarities between the obtained optimal controls Qopt

ODE(feed) and QoptHGA(Tdep) we plot them

in Figure 20. This comparison is done for the initial substrate concentrations S1(0) = 5, 10, 20 (mol/m3)in Figures 20-(a), 20-(b) and 20-(c), respectively. The interpolation data is depicted with green circles.We can observe that the interpolated data is comparable in some of the interpolation times, speciallyfor times t1 = 20000(s), t2 = 40000(s) and t3 = 60000(s). This is another evidence for constating thatwhen high diffusions are considered, the optimal control Qopt

HGA(Tdep), obtained with the Hybrid genetic

algorithm, approaches the optimal control QoptODE(feed) obtained with Lemma 5.5.

S1(0) (mol/m3) Time QoptODE(feed) (s) Time Qopt

HGA(Tdep) (s)

5 S1 does not achieve Slim 60120

10 S1 does not achieve Slim 62990

20 S1 does not achieve Slim 23340

Table 9: Difference in terms of econtamination time between using QoptODE(feed) or Qopt

HGA(Tdep) withDS = DB = 100 (m2/s)

Table 9 corresponds to the comparison described below but when DS = DB = 0.01 (m2/s). We noticethat for the three values of S1(0), if the optimal flux Qopt

ODE(feed) (obtained by Lemma 5.3) is used, we arenot able to achieve the target. This is due to the fact that biomass becomes extinct before the substrateconcentration in the water resource decrease to the value Slim, and thus, no more reaction is produced.Nevertheless, the target is achieved when the optimal flux Qopt

HGA(Tdep) (given by the hybrid geneticalgorithm) is used.

Page 42: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

8. Conclusions 42

0 2 4 6 8x 10

4

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Time (seconds)

Q ODE opt (feed)

Q HGA opt (Tdep)

(a) S1(0) = 5 (mol/m3)

0 2 4 6 8x 10

4

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Time (seconds)

Q HGA opt (Tdep)

Q ODE opt (feed)

(b) S1(0) = 10 (mol/m3)

0 2 4 6 8x 10

4

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

Time (seconds)

Q HGA opt (Tdep)

Q ODE opt (feed)

(c) S1(0) = 20 (mol/m3)

Figure 20: Comparison between the feedbacks QoptODE(feed) and Qopt

HGA(Tdep).

8. Conclusions

In this work, we have dealt with the problem of water treatment by using bioreactors. We havepresented two mathematical models, assuming homogeneity or inhomogeneity of substrate concentrationin the bioreactor, which describe the dynamics between the bioreactor and the water resource. We havetackled an optimization problem which aims to minimize the time needed to clean the polluted resource,by choosing an optimal bioreactor inflow. In the case of considering homogeneity of the contaminant inthe bioreactor, it is possible to obtain an optimal flux with non numerical theoretical results. In the caseof considering inhomogeneity of the contaminant in the bioreactor, it is possible to obtain an optimal fluxusing an Hybrid genetic algorithm. We have shown that with both methods the time needed to depollutethe water resource is smaller if the flux is a time variable rather than constant in time. Moreover, we haveobserved that when considering high diffusivities of substrate and biomass concentration (for instanceDS = DB = 100 (m2/s)) both optimal fluxes, the theoretical one and the one obtained with Hybridgenetic algorithm, are similar. Nevertheless, when considering small diffusivities of substrate and biomassconcentration (for instance DS = DB = 0.02 (m2/s)) the theoretical results are not suitable, in the sensethat the substrate concentration in the water resource does not decrease to the desired value.

Page 43: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

9. Future work 43

9. Future work

There are several lines of research arising from this work which should be pursued.Firstly, we have been working under the assumption that the growth rate function µ(·) is continouslydifferentiable. It is our intention to investigate the existence and uniqueness of solution for the systemspresented in the ODE approach for the bioreactor, by considering other assumptions on function µ(·),for instance, boundedness. The resulting framework could allow us to find results of maximal existenceinterval of solutions for these systems of ordinary differential equations.A second line of research, is to give a suitable nondimensionalization for the system presented in the PDEapproach for the bioreactor, which could give us a suitable upper bound for the flux. In this direction,another possibility would be to give an existence and uniqueness result for this system of partial differentialequations, which could give us the exact regularity required for the flux.So far, the application of an Hybrid Genetic Algorithm to solve the optimization problem has providedus some numerical results that could be validated, perharps improved, by making a broader explorationin the search space.The influence of considering inhomogeneity in the water resource has came about through a collaborationwith researchers of the ”Institut National de la Recherche Agronomique- (INRA)”, who have alreadytackled this problem by dividing the water resource into several compartments, and then applying asimilar control law to the obtained system. Another topic emerged from this collaboration involves otheroptimization parameters (apart from the flux), for instance, an optimal shape for the bioreactor.

Page 44: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

REFERENCES 44

References

[1] J.M Bello Rivas, J. Harmand, B. Ivorra, A.M Ramos, and A Rapaport. Bioreactor shape optimizationmodeling, simulation, and shape optimization of a simple bioreactor for water treatment. pages 125–141, 2011.

[2] E.A Coddington and N. Levinson. Theory of Ordinary Differential Equations. McGraw-Hill Inc.,NewYork, 1990.

[3] K. Deb. Multi-Objective Optimization using Evolutionary Algorithms. Wiley Interscience Series inSystems and Optimization. Wiley, 2001.

[4] P. Gajardo, J. Harmand, H. Ramırez C., and A. Rapaport. Minimal time bioremediation of naturalwater resources. Automatica, 47(8):1764 – 1769, 2011.

[5] D.E. Goldberg. Genetic Algorithms in Search, Optimization, and Machine Learning. ArtificialIntelligence. Addison-Wesley, 1989.

[6] J.-P. Grivet. Nonlinear population dynamics in the chemostat. Computing in Science Engineering,3, 2001.

[7] J. Guckenheimer and P. Holmes. Nonlinear Oscillations, Dynamical Systems, and Bifurcations ofVector Fields. Number v. 42 in Applied Mathematical Sciences. Springer, 1983.

[8] J.K. Hale. Ordinary differential equations. Pure and applied mathematics. Wiley-Interscience, 1969.

[9] M.J Hirsch, P.M Pardalos, and M. Resende. Speeding up continuous grasp. Journal of OperationalResearch, 2006.

[10] J. A. Infante, B. Ivorra, A. M. Ramos, and J. M. Rey. On the modelling and simulation of high pres-sure processes and inactivaction of enzymes in food engineering. Mathematical Models and Methodsin Applied Sciences, 19(12):2203–2229, 2009.

[11] J.A Infante and J.M. Rey. Metodos Numericos: Teorıa, Problemas y Practicas con MATLAB. Cienciay tecnica Piramide. Piramide, 2002.

[12] B. Ivorra, B. Mohammad, and A.M. Ramos. A multi-layers semi deterministic method to improveoptimization algorithms. 2013.

[13] J.L. Lions. Quelques methodes de resolution des problemes aux limites non lineaires. EtudesMathematiques. Gauthier-Villars, 1969.

[14] J. Nocedal and S. J. Wright. Numerical Optimization. Springer, New York, 2nd edition, 2006.

[15] Angel Manuel Ramos del Olmo. Introduccion al Analisis Matematico del Metodo de ElementosFinitos. Editorial Complutense, 2012.

[16] R. R. Sharapov. Genetic Algorithms: Basic Ideas, Variants and Analysis. InTech, 2007.

[17] H. Smith and P. Waltman. The theory of the Chemostat. In Cambridge studies in Mathematicalbiology, volume 13. Cambridge: Cambridge University Press, 1995.

[18] G. Teschl. Ordinary Differential Equations and Dynamical Systems. Graduate Studies in Mathemat-ics. American Mathematical Society, 2012.

[19] F.A. Verhulst. Nonlinear Differential Equations and Dynamical Systems. Hochschultext / Universi-text. Springer-Verlag GmbH, 1996.

[20] Thomas Weise. Global Optimization Algorithms - Theory and Application. Self-Published, secondedition, 2009.

Page 45: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

A. Nonlinear Stability Analysis 45

A. Nonlinear Stability Analysis

We consider the nonlinear autonomous system

x′ = F (x)x(0) = x0

(26)

where x : R → Rn and F : Rn → R

n is a smooth function. We assume that the solution exist for everyt ≥ 0 and is unique when initial data is provided.

Definition A.1. We define the flow of (26) as φ(t, ·) : Rn → Rn, φ(t, x0) = x(t, x0).

Definition A.2. A critical point x∗ (also called an equilibrium, fixed, or stationary point) satisfies

F (x∗) = 0

We would like to analyze the behavior of system (26) in a neighbourhood U(x∗, ǫ), 0 < |ǫ| < 1. In orderto do that we need to linearize system (26) by approximating the function F (x) around the equilibriumpoint x∗ by its tangent around that fixed point. Thus, using Taylor’s expantion one has

F (x) ∼ F (x∗) +DF (x∗)(x− x∗),

where DF (x∗) = dFdx

is the Jacobian Matrix of fuction F (x) = [F1(x∗

1, · · · , x∗

n), · · · , Fn(x∗1, · · · , x∗

n)]T .Considering z = x− x∗ the linearization of (26) can be writen as:

z′ = DF (x∗)z, z ∈ U(0, ǫ). (27)

Thus, the flux on the liniearized system around the equilibrium ponint x∗ is obtained by the integrationof (27) and is of the form

z(t) = (x0 − x∗)etDF (x∗). (28)

Theorem A.3 (Theorem 3.1, [19]). Suppose x∗ is a critical point of the nonlinar system (26) and supposethe real part of the eigenvalues of DF (the linearization) are negative. Then the critical point is locallyasymptotically stable.

Theorem A.4 (Theorem 3.2, [19]). Suppose x∗ is a critical point of the nonlinar system (26) and atleast one eigenvalue of DF is possitive. Then the critical point is unstable.

Theorem A.5 (Theorem 9.9, [18]). Hartman-Grobman Theorem:Suppose x∗ is a hyperbolic critical point (i,.e the real part of the eigenvalues of DF are not zero). Thenthe phase portrait of the linearization and the nonlinear equations are locally homeomorphic, i.e, there isan homomorphism h : Rn → R

n defined locally on a neighbourhood U of x∗ such that

h etDF = φ(t, ·) h,

where φ is the flux of system (26).

Remark A.6. Particularly, if the critical point x∗ has associated a zero eigenvalue, two different situ-ations arise. If the other eigenvalue is positive, the critical point is unstable. If the other eigenvalue isnegative, the linearization may not describe the nonlinear system.

Definition A.7. Given x ∈ Rn, the set

γ(x) = φ(t, x) : t ∈ R

is called orbit of x. Notice that if y ∈ γ(x), then y ∈ φ(t, x) and hence γ(x) = γ(y). Moreover

γ+(x) = φ(t, x) : t ∈ R+

is called the positive semiorbit of x, and the set

γ−(x) = φ(t, x) : t ∈ R−

is called the negative semiorbit of x.

Page 46: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

B. Existence and Uniqueness Theorems 46

Definition A.8. Given x ∈ Rn, the α-limit and the ω-limit sets of x (with respect to (26)) are defined

respectively by

α(x) =⋂

y∈γ(x)

γ−(y)

andω(x) =

y∈γ(x)

γ+(y)

Particularly for the planar case, i.e, if we consider the system (26) with x ≡ (x, y) ∈ R2 and F ≡

(F1, F2) : R2 → R2, one has the two following theorems.

Theorem A.9 (Theorem 7.16, [18]). Generalized Poincare Bendixson Theorem:If the positive orbit γ+(x) in (26) is contained in a compact set K, where K only contains a finite numberof critical points, then one of the following situations occur:

ω(x) is a critical point.

ω(x) is a periodic orbit.

ω(x) is a connected set composed of a finite number of fixed points together with homoclinic andheteroclinic orbits connecting these fixed points.

Theorem A.10 (Theorem 1.8.2, [7]). Dulac’s Criterion:Let D be a simply connected region in the phase plane. If there exists a continously differentiable functionψ(x, y) such that

d

dx(ψ(x, y)F1(x, y)) +

d

dy(ψ(x, y)F2(x, y))

has constant sign in D, then the dynamical system

x′ = F1(x, y)

y′ = F2(x, y)

has no closed orbits lying enterly in D.

Definition A.11. A function F defined on a domain D in Rn+1 is said to be Locally Lipschtiz in x if

for any closed bounded set U in D there exists kU ∈ (0,+∞) such that |f(t, x) − f(t, y)| ≤ kU|x− y| for(t, x), (t, y) in U . If f(t, x) has contionus first partial derivatives with respect to x in D, then f(t, x) islocally lipschtiz in x.

B. Existence and Uniqueness Theorems

Definition B.1. A function F : D → Rn, with D a domain in R

n+1, is said to be Locally Lipschtiz inx ∈ R

n if for any closed bounded set U in D there exists k = kU such that ‖F (t, x)− F (t, y)‖ ≤ k‖x− y‖for (t, x), (t, y) in U .

Remark B.2. If F (t, x) has contionus first partial derivatives with respect to x in D, then F (t, x) islocally lipschtiz in x.

Theorem B.3 (Theorem 2.2, [18]). Picard-Lindelof Theorem:Let F ∈ C(U,Rn) where U is an open subset of Rn+1 and (t0, x0) ∈ U . If F is Locally Lipschtiz in x,then there exists a unique solution x(t) ∈ C1(I) for the initial value problem

x′ = F (t, x)

where I is some interval around t0.More specific, if V = [t0, t0 +T ]×Bδ(x0) ⊂ U and M denotes the maximum of |f | in V , then the solutionexists at least for t ∈ [t0, t0 + T0] and remains in Bδ(x0), where T0 = min(T, δ

M).

Page 47: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

C. Benchmark Functions 47

C. Benchmark Functions

Branin Function

BR(x) = (x2 −5

4π2x21 + 1

π5x1 − 6)2 + 10(1 − 1

8π) cos(x1) + 10.

Domain: [−5, 15]2.Local minima: There are no local minima, apart from global minima.Global Minima: x• = (−π, 12.275), (π, 2.275), (9.42478, 2.475), BR(x•) = 0.397887.

Easom Function

EA(x) = − cos(x1) cos(x2) = e−(x1−π)2−(x2−π)2 .Domain:: [−100, 100]2,Local Minima: Various. Global Minima (unique): x• = (π, π), EA(x•) = −1.

Goldstein and Price Function

GP (x) = [1 + (x1 + x2 + 1)2(19− 14x1 + 3x21 − 14x2 + 6x1x2 + 3x2

2)][30 + (2x1 − 3x2)2(18− 32x1 +

12x21 + 48x2 − 36x1x2 + 27x2

2)].Domain: [−2, 2]2.Local Minima: Various.Global Minima (unique): x• = (0,−1), GP (x•) = 3.

Shubert Function

SH(x) = (∑5

i=1 i cos((i+ 1)x1 + i))(∑5

i=1 i cos((i+ 1)x1 + i)).Domain: [−10, 10]2.Local Minima: Various.Global Minima (one of the 18): x• = (5.48242188, 4.85742188, 1), SH(x•) = −186.7309.

Hartmann-3 Function

H3,4(x) = −∑4

i=1 αie−

∑3j=1 A

(3)IJ

(xj−P(3)ij )2 .

α = [1, 1.2, 3, 3.2]T , A(3) =

3.0 10 300.1 10 353.0 10 300.1 10 35

, P (3) = 10−4

6890 1170 26734699 4387 74701091 8732 5547381 5743 8838

.

Domain: [0, 1]3.Local Minima: 4.Global Minima (unique): x• = (0.114614, 0.555649, 0.852547), H3,4(x

•) = −3.86278.

Hartmann-6 Function

H6,4(x) = −∑4

i=1 αie−

∑6j=1 A

(6)IJ

(xj−P(6)ij )2 .

α = [1, 1.2, 3, 3.2]T , A(6) =

3.0 10 17 3.05 1.7 80.05 10 17 0.1 8 143 3.5 1.7 10 17 817 8 0.05 10 0.1 14

,

P (6) = 10−4

1312 1696 5569 124 8283 58862329 4135 8307 3736 1004 99912348 1451 3522 2883 3047 66504047 8828 8372 5743 1091 381

.

Domain: [0, 1]6.Local Minima: 6.Global Minima (unique): x• = (0.20169, 0.150011, 0.476874, 0.275332, 0.311652, 0.6573),H6,4(x

•) = −3.32237.

Rosenbrock Function

Rn(x) = (∑n−1

j=1 [100(x2j − xj+1)

2 + (xj − 1)2].

Page 48: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

C. Benchmark Functions 48

Domain: [−10, 10]n.Local Minima: 6.Global Minima (unique) :x• = (1, . . . , 1), Rn(x•) = 0.

Shekel Function

S4,m(x) = −∑m

j=1[∑4

i=1(xi − aij)2 + ci]

−1.

c = [0.1, 0.2, 0.2, 0.4, 0.4, 0.6, 0.3, 0.7, 0.5, 0.5]

a =

4.0 1.0 8.0 6.0 3.0 2.0 5.0 8.0 6.0 7.04.0 1.0 8.0 6.0 7.0 9.0 5.0 1.0 2.0 3.64.0 1.0 8.0 6.0 3.0 2.0 5.0 8.0 6.0 7.04.0 1.0 8.0 6.0 7.0 9.0 5.0 1.0 2.0 3.6

Domain: [0, 10]4.Local Minima: m.Global Minima (unique): x• = (4, 4, 4, 4), S4,5(x

•) = −10.15319538, S4,7(x•) = −10.40281868.

Zakharov Function

Zn(x) =∑n

i=1 x2i + (

∑ni=1 0.5ixi)

2 + (∑n

i=1 0.5ixi)4.

Domain: [−5, 10]n.Local Minima: There are no local minima apart from global minima.Global Minima (unique): x• = (0, . . . , 0), Zn(x•) = 0.

The two-dimensional version of functions Branin, Easom, Goldstein Price, Schubert, Rosenbrock andZakharov are depicted in Figures 21-(a), 22-(a), 23-(a), 24-(a), 25-(a) and 26-(a), respectively. Moreover,we represent the contour lines (curves along which the function has a constant value) of these functionsin Figures 21-(b), 22-(b), 23-(b), 24-(b), 25-(b) and 26-(b), respectively.

−50

510 0 5 10 15

0

50

100

150

200

250

300

350

(a) 3D Plot

−5 0 5 100

5

10

15Global minima

(b) Contour Plot

Figure 21: Branin Function

Page 49: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

C. Benchmark Functions 49

−100 −50 0 50 100−100−50050100

−0.1

−0.08

−0.06

−0.04

−0.02

0

(a) 3D Plot

2 2.5 3 3.5 4 4.5

2

2.5

3

3.5

4

4.5 Global minimum

(b) Contour Plot

Figure 22: Easom Function

−2 −1 0 1 2−2

020

2

4

6

8

10

12x 10

5

(a) 3D Plot

−2 −1.5 −1 −0.5 0 0.5 1 1.5 2−2

−1.5

−1

−0.5

0

0.5

1

1.5

2

Global minimum

(b) Contour Plot

Figure 23: Goldstein Price Function

−10−5

05

10

−10−5

05

10−200

−100

0

100

200

(a) 3D Plot

−10 −8 −6 −4 −2 0 2 4 6 8 10−10

−5

0

5

10Global minima

(b) Contour Plot

Figure 24: Schubert Function

−10−5

05

10

−10

0

100

5

10

15x 10

5

(a) 3D Plot

−10 −8 −6 −4 −2 0 2 4 6 8 10−10

−5

0

5

10Global minimum

(b) Contour Plot

Figure 25: Rosenbrock Function

Page 50: MASTER EN MATEM´ ATICAS AVANZADAS´ - UCMivorra/papers/TFM_MariaCrespo.pdf · UNIVERSIDAD COMPLUTENSE DE MADRID FACULTAD DE CIENCIAS MATEMATICAS´ MASTER EN MATEM´ ATICAS AVANZADAS´

C. Benchmark Functions 50

−50

510

−50

510

0

1

2

3

4

5

6x 10

4

(a) 3D Plot

−5 0 5 10−5

0

5

10Global minimum

(b) Contour Plot

Figure 26: Zakharov Function


Recommended