OPTIMAL CONTROL OF A YSTEM OF REACTION · PDF fileOPTIMAL CONTROL OF A SYSTEM OF...

30
O PTIMAL C ONTROL OF A S YSTEM OF R EACTION -D IFFUSION E QUATIONS M ODELING THE W INE F ERMENTATION P ROCESS Juri Merger * Alfio Borzì Roland Herzog October 1, 2015 This work was supported in part by the BMBF Verbundprojekt 05M2013 ‘ROENOBIO: Robust energy optimization of fermentation processes for the production of biogas and wine’. The investigation of a reaction-diffusion system with new nonlinear reac- tions kinetics to model the fermentation of wine is presented. The reactive part extends existing ordinary differential models by taking into account oxygen availability and ethanol toxicity. The presence of spatial diffusion and the inclusion of a heat equation allow geometrical and thermal effects in the model. Existence, uniqueness, and regularity of solutions to this system of reaction- diffusion partial differential equations are discussed. A boundary optimal control problem is formulated with the purpose of steering an ideal fermen- tation process. This optimal control problem is theoretically investigated and numerically solved in the adjoint method framework. The existence of an optimal control is proved, and its solution is characterized by means * University of Würzburg, Faculty of Mathematics, Professorship Scientific Computing, D– 97074 Würzburg, Germany, [email protected], http://www.mathematik. uni-wuerzburg.de/personal/merger.html University of Würzburg, Faculty of Mathematics, Professorship Scientific Computing, D– 97074 Würzburg, Germany, alfi[email protected], http://www.mathematik. uni-wuerzburg.de/borzi/ Technische Universität Chemnitz, Faculty of Mathematics, Professorship Numerical Mathematics (Par- tial Differential Equations), D–09107 Chemnitz, Germany, [email protected], http://www.tu-chemnitz.de/herzog

Transcript of OPTIMAL CONTROL OF A YSTEM OF REACTION · PDF fileOPTIMAL CONTROL OF A SYSTEM OF...

OPTIMAL CONTROL OF A SYSTEM OFREACTION-DIFFUSION EQUATIONS

MODELING THE WINE FERMENTATIONPROCESS

Juri Merger∗ Alfio Borzì† Roland Herzog‡

October 1, 2015

This work was supported in part by the BMBF Verbundprojekt 05M2013 ‘ROENOBIO: Robustenergy optimization of fermentation processes for the production of biogas and wine’.

The investigation of a reaction-diffusion system with new nonlinear reac-tions kinetics to model the fermentation of wine is presented. The reactivepart extends existing ordinary differential models by taking into accountoxygen availability and ethanol toxicity. The presence of spatial diffusionand the inclusion of a heat equation allow geometrical and thermal effectsin the model.

Existence, uniqueness, and regularity of solutions to this system of reaction-diffusion partial differential equations are discussed. A boundary optimalcontrol problem is formulated with the purpose of steering an ideal fermen-tation process. This optimal control problem is theoretically investigatedand numerically solved in the adjoint method framework. The existenceof an optimal control is proved, and its solution is characterized by means

∗University of Würzburg, Faculty of Mathematics, Professorship Scientific Computing, D–97074 Würzburg, Germany, [email protected], http://www.mathematik.uni-wuerzburg.de/personal/merger.html

†University of Würzburg, Faculty of Mathematics, Professorship Scientific Computing, D–97074 Würzburg, Germany, [email protected], http://www.mathematik.uni-wuerzburg.de/∼borzi/

‡Technische Universität Chemnitz, Faculty of Mathematics, Professorship Numerical Mathematics (Par-tial Differential Equations), D–09107 Chemnitz, Germany, [email protected],http://www.tu-chemnitz.de/herzog

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

of the corresponding optimality system. To solve this system, an implicit-explicit (IMEX) splitting approach is considered, and a BFGS optimizationscheme is implemented. Results of numerical experiments demonstrate thevalidity of the fermentation model and of the proposed control strategy.

Keywords: nonlinear PDEs; optimal control; reaction-diffusion; modeling; wine fer-mentation; first order necessary optimality conditions

1. INTRODUCTION

The quest for making excellent wines is thousands of years old Pellechia [2006] and in-volves the entire wine production process from planting vineyards to bottling. A crucialstep in this process is fermentation, which is the main topic of past and present researchin the wine industry. This research effort is now increasingly focusing on mathematicalmethodologies to model and optimize the wine fermentation process. The modelingof fermentation is based on ordinary differential equations (ODEs) that describe thekinetics of the bio-chemical reactions occurring in the fermentation processes. Theseprocesses play a central role in food, chemical, and pharmaceutical production. In Lianet al. [2002], tea fermentation kinetics coupled with the flow of air through porous me-dia is discussed. Beer fermentation is considered in Andres-Toro et al. [2004], Gee andRamirez [1988] and also in Ramirez and Maciejowski [2007], where evolutionary algo-rithms are used for optimization. See Chojnacka for a review of fermentation processes.

Regarding models of wine fermentation, we refer to David et al. [2010] and David et al.[2011], where the evolution of the yeast biomass together with the concentrations ofnitrogen, sugar, and ethanol are modeled. In this model, the growth of the yeast popu-lation that consumes nitrogen is governed by a Michaelis-Menten term, which is oftenused for the description of enzymatic biological reactions Johnson and Goody [2011].Another kinetic component of this model governs the conversion of sugar into ethanol,taking into account that high concentrations of ethanol decelerate the fermentation ofsugar, which is modeled by an inhibition term. A similar model is also presented in[Velten, 2009, Chapter 3.10.2], whereas an advanced model is proposed in Malherbeet al. [2004] that emphasizes the effect of nitrogen and takes into account the fact that ni-trogen is also needed for the sugar transport in the yeast cells. Furthermore, in Colom-bié et al. [2007] thermal phenomena in the fermentation process as the production ofheat by the yeast and the heat loss to the environment are considered. In Charnomordicet al. [2010] results of ODE simulations of a fermentation are presented. A first attemptto formulate wine fermentation optimal control problems can be found in Sablayrolles[2009] with the aim to improve energy saving and aromatic profile.

Our contribution to this research effort is the formulation of a refined fermentationmodel including space dependent concentrations and variable temperature, and a con-trol strategy for an ideal fermentation profile. In particular, we augment the diffusionoperators with Robin-type boundary conditions for the temperature that accommodate

2

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

a control mechanism driven by an external temperature of a water cooling/heatingsystem.

In this paper, we theoretically and numerically investigate our reaction-diffusion modeland discuss a related optimal control problem. The analysis of reaction-diffusion equa-tions is strongly dependent on the characteristics of the reaction term. For some reactionterms there may exist an invariant set of the state space such that if the initial values ofthe reaction-diffusion system lie in this region their values will also belong to this set forall future times Smoller [1994]. Another approach for investigating reaction-diffusionequations can be found in [Pao, 1992, Chapter 8]. In this reference, quasi-monotone typereactions are solved by constructing a sequence of coupled upper and lower solutionsthat converge from above and below to the unique solution, respectively. In addition, itis possible to use the Leray-Schauder’s fixed point theorem as in, e.g., Borzì and Griesse[2006] and the Banach’s fixed point theorem as in, e.g., [Evans, 2010, Part III 9.2.1]. Thelatter is used in our proofs.

We formulate the set of equations that model the wine fermentation process and provethat these equations admit a unique solution. Furthermore, this solution depends con-tinuously on the initial values and the external temperature. These results are obtainedby applying established results for parabolic problems, combined with a cut-off tech-nique, which is motivated by the fact that the ODE models have the property that theinitial values determine a bound for the solutions.

With our fermentation model, we consider goals for an optimal fermentation processand define a cost functional to be minimized. The resulting optimal control problemand the characterization of its solutions based on the corresponding optimality sys-tem are investigated. In particular, we prove existence of globally optimal controls anddiscuss their regularity. Further, we discuss the numerical solution of the optimallycontrolled fermentation process. An optimal control is calculated by a BFGS iterativeoptimization procedure. The gradient of the reduced cost functional is evaluated bysolving the forward and backward reaction-diffusion equations appearing in the opti-mality system. These equations are discretized by IMEX finite differences, where thediffusion terms are treated implicitly and the reaction terms are treated explicitly.

This work is organized as follows. The reaction-diffusion system that describes thewine fermentation process is presented in Section 2, subsequently the unique solvabil-ity of this system is proved in Section 3. The optimal control problem is discussed inSection 4, where also the existence of optimal solutions and the first order necessary op-timality conditions are proven. Section 5 deals with the discretization of the optimalitysystem and the optimization algorithm. In Section 6, we present results of numericalexperiments that demonstrate the validity of our model and of the corresponding opti-mal control formulation. Conclusions of our work are given in Section 7.

3

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

2. FERMENTATION MODEL EQUATIONS

In this section, we discuss a refined model of the wine fermentation process. We com-bine features of the models in David et al. [2010] and Velten [2009], and we includeadditional terms and capabilities. The unknown variables of the system are the space-time dependent functions representing the yeast biomass concentration X, the concen-trations of nitrogen N, oxygen O, sugar S, and ethanol E, and the temperature T. Thereaction of these quantities is modeled through the following two mechanisms

a2N + a3O + a4Sµ1−→ a1X, (2.1a)

a5Sµ2−→ a6E + a7T. (2.1b)

The first reaction equation (2.1a) expresses the yeast growth, due to each existing yeastcell generating new ones from nitrogen, oxygen, and sugar. With (2.1b), we model theaction of the yeast population that transforms sugar into ethanol and produces heat.The constants a1, . . . , a7 are yield coefficients and the reaction rates µ1 and µ2 are mod-eled as follows

µ1(X, N, O, S, T) = (T − b1)N

c1 + NO

c2 + OS

c3 + SX, (2.2a)

µ2(X, S, E, T) = (T − b2)S

c4 + Sc5

c5 + EX. (2.2b)

The structure of the reaction rates in (2.2) is similar as in Velten [2009]. The temperaturedependence is assumed to be linear with offsets b1 and b2 representing stagnation tem-peratures. For the nutrients N, O and S, the Michaelis-Menten terms N

c1+N etc. lead to asaturation of the reaction rate for high concentrations. Moreover, it prohibits a reactionif any nutrient is consumed. The Michaelis constants ci (i = 1, . . . , 4) correspond to theconcentrations of the corresponding substance where the reaction rate equals half themaximal possible reaction rate. In contrast to the model in Velten [2009], we add oxy-gen and sugar as additional nutrients, because the yeast changes its metabolism fromaerobic to anaerobic in the absence of oxygen and stops cell division. The inhibitionproperty of ethanol for the sugar consumption is taken into account by a term of theform c5

c5+E , which yields a lower reaction rate for high ethanol concentrations.

We remark that Michaelis-Menten kinetics usually feature a temperature dependentmaximum reaction velocity V(T) in the numerator, see Gee and Ramirez [1988] and[Fogler, 2010, Appendix C]. This velocity is modeled by the following Arrhenius func-tion V(T) = V0 exp

(−e

R(T+273)

), where V0 is the Arrhenius frequency factor, e is the

Arrhenius activation energy, and R is the gas constant. Equation (2.2) can be seen asa linearization of these terms, justified by the rather narrow temperature regime inwhich wine fermentation takes place. Clearly, this limits the applicability of our model.We mention that the inclusion of Arrhenius terms would not impose any significantmathematical difficulty, but for the sake of notational convenience and numerical im-plementation we work with the linear temperature dependence of the reaction velocity

4

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

as given in (2.2). For the same reasons we also neglect temperature dependencies of theMichaelis constants ci (i = 1, . . . , 4) and the inhibition constant c5, which have a similarform as the one of the maximum reaction velocity.

The resulting partial differential equations that also include diffusion are as follows,

∂X∂t− σ1∆X = +a1µ1(X, N, O, S, T)−Φ(E)X, (2.3a)

∂N∂t− σ2∆N = −a2µ1(X, N, O, S, T), (2.3b)

∂O∂t− σ3∆O = −a3µ1(X, N, O, S, T), (2.3c)

∂S∂t− σ4∆S = −a4µ1(X, N, O, S, T)− a5µ2(X, S, E, T), (2.3d)

∂E∂t− σ5∆E = + a6µ2(X, S, E, T), (2.3e)

∂T∂t− σ6∆T = + a7µ2(X, S, E, T). (2.3f)

These equations are defined in the space-time cylinder Q := Ω× (0, t f ), where Ω ⊂ R3

is a bounded domain with Lipschitz boundary representing the interior of the fer-menter, and t f is the final time of the fermentation process. The diffusivity coefficientsσ1, . . . , σ6 are positive constants.

Note on the one hand that the energy equation (2.3f) (without the Laplacian) can bederived from ∂T

∂t = k ∂E∂t and (2.2b), where k is a factor that is dependent on the heat

capacity and density of the must as well as the energy production of the exothermic al-coholic fermentation. See Colombié et al. [2007] and references therein for more details.

On the other hand, we include the term−Φ(E)X in (2.3a) in order to model the dying ofthe yeast population at the end of the fermentation process due to a toxic concentrationof ethanol. In contrast to Velten [2009], where a linear dependence between the deathrate and ethanol is assumed, we use the following term,

Φ(E) =(

0.5 +1π

arctan(k1(E− Etol)

))k2(E− Etol)

2. (2.4)

Expression (2.4) represents a trigger function built from the inverse tangent functionarctan, because ethanol acts toxic only above a certain tolerance value Etol. Hence,in simulations, after an initial growth transient, we can observe an almost constantyeast population before an exponential decay of the number of living yeast cells sets in.This behavior is in agreement with experimental measurements and it is more realisticthan a linear model of toxicity of the ethanol, where the yeast population immediatelyplunges after the growth phase is over. For more information on the ODE model that(2.3) is based on, see Borzì et al. [2014].

Next, we discuss the boundary conditions for the reaction-diffusion system. We as-sume that the fermenter is held closed for the entire fermentation process. Therefore,

5

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

there is no flux of the substances X, N, O, S and E across the boundary and we applyhomogeneous Neumann boundary conditions on Γ := ∂Ω. For the heat equation, weimpose Robin-type boundary conditions, as there exists no ideal insulator. Moreover,we assume that one part of the fermenter wall is covered by a water cycle, while theother part is exposed to the environment. Hence, we divide the boundary into twodisjoint subsets of non-zero measure according to Γ = Γ1 ∪ Γ2. The imposed boundaryconditions are as follows

σ1∂X∂n

= σ2∂N∂n

= σ3∂O∂n

= σ4∂S∂n

= σ5∂E∂n

= 0 on Σ := Γ× (0, t f ),

where n denotes the outward unit normal to Γ. We also impose

σ6∂T∂n

=

τair(Text − T) on Σ1 := Γ1 × (0, t f ),τwater(u− T) on Σ2 := Γ2 × (0, t f ).

The external temperature Text and the controllable temperature u of the cooling/heatingcycle are time dependent functions on the lateral boundaries Σ1 and Σ2, respectively,which we assume to be homogeneous in space. The positive parameters τair and τwaterrepresent the thermal conductivity of the fermenter wall exposed to air and water, re-spectively.

We denote the initial conditions for the concentrations of the substances as follows

X(0) = X0, N(0) = N0, O(0) = O0 in Ω,S(0) = S0, E(0) = E0, T(0) = T0 in Ω.

(2.5)

In practice, the initial data X0, N0, O0, S0, E0 and T0 are non-negative constants, and weobtain them from measurements of these quantities at the beginning of the fermentationprocess. The assumptions on all problem data are given in Section 3.

For simplicity of notation, we introduce the vector y := (X, N, O, S, E, T)> and writethe equations, together with the boundary and initial conditions, in short as follows

∂y∂t− D∆y = f (y) in Q,

D∂y∂n

+ Zy = g(u) on Σ,

y(0) = y0 in Ω,

(2.6)

where the diffusion matrix is D = diag(σ1, σ2, σ3, σ4, σ5, σ6). The reaction terms, i.e., thecollection of right hand sides in (2.3), are denoted by f (y), while Z and g are given by

Z =

diag(0, 0, 0, 0, 0, τair) on Σ1,diag(0, 0, 0, 0, 0, τwater) on Σ2

(2.7)

and

g(u) =

(0, 0, 0, 0, 0, τairText)> on Σ1,(0, 0, 0, 0, 0, τwater u)> on Σ2.

(2.8)

6

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

We conclude this section by pointing out some properties of the reaction function f . Inthe theorems that follow in this work we show that the state y is component-wise non-negative, which is important as the right hand side f in (2.3) has several singularities,e.g. for N = −c1. Moreover, the derivative of f is unbounded when its arguments tendto +∞, due to the products TX and E2X. Nevertheless, the entries of the Jacobian f ′(y)are, up to a constant, bounded by M2 for arguments y with values in the interval [0, M].Hence, the function f is locally Lipschitz continuous for non-negative arguments, i.e.,there exists a constant L > 0 independent of M such that

‖ f (y1)− f (y2)‖ ≤ LM2‖y1 − y2‖, (2.9)

for all y1, y2 ∈ x ∈ R6 : 0 ≤ xi ≤ M, i = 1, . . . , 6. In fact, the result remains trueif we allow −ε (for some ε > 0) in place of zero as a lower bound, as long as we stayclear of the singularities N = −c1 etc., see (2.2). This will be utilized in the proof ofTheorem 4.2.

3. EXISTENCE AND UNIQUENESS OF SOLUTIONS

We follow [Dautray and Lions, 1992, Chapter XVIII] to discuss the reaction-diffusionsystem (2.6). In particular, we use the Banach’s fixed point theorem and the weak max-imum principle to prove existence and uniqueness of solutions to (2.6).

Let W(0, t f ) be the space of vector-valued functions associated to the evolution tripleV → H → V∗, i.e.,

W(0, t f ) =

y ∈ L2(0, t f ; V) :dydt∈ L2(0, t f ; V∗)

,

where V = H1(Ω; R6) and H = L2(Ω; R6). We call y a (weak) solution of (2.6) ify ∈W(0, t f ), y(0) = y0, and

ddt

∫Ω

y(t)Tv dx +∫

Ω∇y(t)TD∇v dx +

∫Γ

y(t)TZv ds

=∫

Ωf (y(t))Tv dx +

∫Γ

g(u)Tv ds for all v ∈ V.

Throughout the remainder of the paper, we work under the following assumptions.

1. The yield coefficients ai (i = 1, . . . , 7) in (2.3), stagnation temperatures bi (i =1, 2) and Michaelis constants ci (i = 1, . . . , 5) in (2.2), diffusivities σi (i = 1, . . . , 6)in (2.3) as well as τair and τwater in (2.8) are positive numbers. Moreover, thecoefficients ki (i = 1, 2) and Etol appearing in (2.4) are positive numbers.

2. The external temperature Text in (2.8) belongs to L∞(0, t f ) and satisfies Text ≥ max(b1, b2).

3. The initial conditions y0 = (X0, N0, O0, S0, E0, T0)> in (2.5) belong to L∞(Ω; R6).They are non-negative a.e. in Ω and in addition T0 ≥ max(b1, b2) holds.

7

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

Assumptions 2 and 3 ensure that the reaction rates (2.2) remain positive and the reac-tions are not reversed.The following theorem states the existence and uniqueness of solutions to (2.6).

Theorem 3.1. Suppose that u belongs to L∞(0, t f ) and satisfies u ≥ max(b1, b2). Thenthere exists a unique solution to (2.6) and this solution satisfies the following estimate

‖y‖W(0,t f ) + ‖y‖L∞(Q;R6) ≤ q(‖y0‖L∞(Ω;R6), ‖u‖L∞(0,t f ), ‖Text‖L∞(0,t f )

), (3.1)

where the function q depends on the problem data.

Proof. Theorem A.3 in the Appendix states the unique solvability of a reaction-diffusionsystem for reaction functions that are globally Lipschitz continuous. However, the re-action function f of our fermentation model (2.3) is only locally Lipschitz continuousfor arguments that are component-wise positive. Now, we define for some M > 0 atruncated reaction term given by

f M(y) := f (max(`, min(y, M))), (3.2)

where the maximum and minimum is understood component-wise with the constantlower bound ` = (0, 0, 0, 0, 0, max(b1, b2)) and variable upper bound M in all compo-nents. The truncation renders the function f M globally Lipschitz continuous. Hence,by Theorem A.3 there exists, for each M > 0, a unique solution yM ∈ W(0, t f ) ofyt − D∆y = f M(y) subject to the same boundary and initial conditions of (2.6).

In the following, we show that this solution satisfies ` ≤ yM ≤ K, where K is a constantindependent of M. We denote by [XM], [NM], [OM], [SM], [EM] and [TM] the compo-nents of max(`, min(y, M)) and use Theorem A.1 and Theorem A.2 to prove the boundsfor yM in the following eight steps.

1. As yM satisfies the equation yt − D∆y = f M(y), we conclude that the yeast con-centration XM satisfies the following linear equation,

∂XM

∂t− σ1∆XM − αXM = 0 in Q, (3.3)

subject to the same boundary and initial conditions as in (2.6), where

α :=(

a1µ1([XM], [NM], [OM], [SM], [TM])−Φ([EM])[XM]) 1

XM

belongs to L∞(Q). As X0 ≥ 0 holds, Theorem A.1 (i) yields XM ≥ 0.

2. The nitrogen concentration NM satisfies the following linear equation,

∂NM

∂t− σ2∆NM + αNM = 0 in Q, (3.4)

8

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

subject to the same boundary and initial conditions as in (2.6), where

α := a2([TM]− b1)[NM]

NM(c1 + [NM])

[OM]

c2 + [OM]

[SM]

c3 + [SM][XM] ≥ 0

and α belongs to L∞(Q). Since N0 ≥ 0 holds, Theorem A.1 (ii) yields 0 ≤ NM ≤ess sup N0.

3. By the same argument, we get

0 ≤ OM ≤ ess sup O0 and 0 ≤ SM ≤ ess sup S0

for the oxygen and sugar concentrations.

4. The ethanol concentration EM satisfies the linear equation

∂EM

∂t− σ5∆EM = F in Q, (3.5)

subject to the same boundary and initial conditions as in (2.6), where

F := a6([TM]− b2)[SM]

c4 + [SM]

c5

c5 + [EM][XM] ≥ 0 (3.6)

and F belongs to L∞(Q). Since E0 ≥ 0 holds, Theorem A.1 (i) yields EM ≥ 0.

5. An application of Theorem A.2 to equations (3.3) and (3.4) for XM and NM yieldsan upper bound for XM. Hence, there exists a C such that XM ≤ C. Note that wemay ignore the non-positive term −Φ([EM])[XM] in (3.5) since a negative sourceterm does not affect an upper bound.

6. The shifted temperature function T∗ = TM −max(b1, b2) satisfies the followingheat equation

∂T∗

∂t− σ6∆T∗ = α in Q,

σ6∂T∗

∂n+ βT∗ = G on Σ,

T∗(0) = T0 −max(b1, b2) in Ω,

(3.7)

where

α := a6

([TM]− b2

) [SM]

c4 + [SM]

c5

c5 + [EM][XM] ≥ 0

belongs to L∞(Q). Moreover, G ≥ 0 holds, as G = τair(Text − max(b1, b2))holds on Σ1 and G = τwater(u − max(b1, b2)) on Σ2, compare (2.8). SinceT0, Text, u ≥ max(b1, b2) holds, Theorem A.1 (i) yields TM ≥ max(b1, b2).

9

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

7. To derive the upper bound of the temperature TM we transform its equation intoa heat equation with non-negative right hand sides. Therefore, we must take careof two separate sources that can contribute to an increase of the temperature TM.Besides the shift

T∗ = TM − b2 (3.8)

we use the following transformation

T∗∗ = e−λtT∗ (3.9)

to account for the heat generation of the yeast, where λ := a7 C. Moreover, thefollowing mapping

T∗∗∗ = γ− T∗∗, (3.10)

takes care of the boundary and initial conditions with γ := ess sup T0 +ess sup Text + ess sup u. After some straightforward calculations we find that theright hand sides of the resulting parabolic problem for T∗∗∗ are non-negative,and an application of Theorem A.1 (i) yields T∗∗∗ ≥ 0, which is equivalent toTM ≤ γ eλt f + b2 after reversing the transformations (3.8)–(3.10).

8. Finally, we find that the right hand side F in the equation for the ethanol con-centration EM, see (3.5)–(3.6), is bounded by a6 γ eλt f C. Using the transformationE∗ := ess sup E0 + t a6 γ eλt f C− EM, we conclude from Theorem A.1 (i) the bound

EM ≤ ess sup E0 + t f a6 γ eλt f C. (3.11)

Notice that above bounds depend only on the parameters and the boundary and initialconditions, but not on M. We therefore conclude that there exists K > 0 such that` ≤ yM ≤ K for all M > 0. Consequently, it holds that ` ≤ yK ≤ K, which impliesf K(yK) = f (yK). Thus yK is the unique solution of (2.6), as it satisfies yK

t − D∆yK =f K(yK) = f (yK).

By the previous considerations, we have a boundedness result in the L∞(Q)-norm, i.e.,there exists a function p such that

‖y‖L∞(Q;R6) ≤ p(‖y0‖L∞(Ω;R6), ‖u‖L∞(0,t f ), ‖Text‖L∞(0,t f )

)(3.12)

holds. For the estimate in the W(0, t f )-norm, we use the boundedness result for theheat equation of Theorem A.1 and obtain the following

‖y‖W(0,t f ) ≤ C(‖y0‖L∞(Ω;R6) + ‖u‖L∞(0,t f ) + ‖Text‖L∞(0,t f ) + ‖ f (y)‖L2(Q;R6)). (3.13)

As the function f is locally Lipschitz continuous for non-negative inputs, we conclude

that ‖ f (y)‖L2(Q;R6) ≤√

6 t f |Ω| L ‖y‖3L∞(Q;R6)

, see (2.9). Hence, the desired stabilityresult (3.1) holds.

10

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

4. OPTIMAL CONTROL PROBLEM

In this section, we formulate an optimal control problem for the wine fermentationprocess and investigate its solution. To characterize this solution, we discuss the first-order necessary optimality conditions.

First, we define the goal for the optimization process. We assume that desired trajec-tories Xd, Nd, Od, Sd, Ed, Td ∈ L2(Q) for the concentrations and for the temperature aregiven. Moreover, we wish to reach a desired final state that is given by Xt f , Nt f , Ot f , St f , Et f , Tt f ∈L2(Ω). In addition, technical restrictions on the control u are modeled by a set of ad-missible controls as follows

Uad :=

u ∈ L2(0, t f ) : ua ≤ u ≤ ub a.e. in (0, t f )

. (4.1)

The bounds are given by ua, ub ∈ L∞(0, t f ). In addition to the assumptions given in thebeginning of Section 3 we assume that ua(x) ≥ max(b1, b2) in order guarantee that thetemperature dependent terms in our model, T− b1 and T− b2, remain positive and thereaction kinetics are not reversed, see (2.2).

Our optimal control problem reads as follows:

minu∈Uad

J(X, N, O, S, E, T, u) :=λ

2‖u− Text‖2

L2(0,t f )

+ ∑C∈X,N,O,S,E,T

(αC

2‖C− Cd‖2

L2(Q) +βC

2‖C(·, t f )− Ct f ‖2

L2(Ω)

)subject to (2.6), (4.2)

where αC, βC and λ are non-negative constants. The objective functional J in (4.2) pe-nalizes control temperatures u, which deviate from the external temperature Text andtherefore it takes into account the energy requirement of the heat regulation. The fol-lowing theorem addresses the existence of optimal controls.

Theorem 4.1. There exists at least one globally optimal solution to the optimal controlproblem (4.2).

We prove this theorem following standard arguments [Lions, 1971, Chapter III.15],[Tröltzsch, 2010, Chapter 4.3] and emphasize the weak continuity of the control-to-stateoperator.

Proof. We denote by y(u) the unique solution to (2.6) for a given u ∈ Uad, see Theo-rem 3.1. As J is bounded from below, there exists j := inf

u∈UadJ(y(u), u) and a sequence

(un) ⊂ Uad such that limn→∞

J(y(un), un) = j. The sequence (un) is bounded in L2(0, t f ),

as Uad is a bounded set. Hence, there exists u ∈ L2(0, t f ) and a subsequence, which

11

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

we also denote by un, such that un u weakly in L2(0, t f ). Uad is convex and closedin L2(0, t f ) and therefore weakly closed [Tröltzsch, 2010, Theorem 2.11]. Consequently,the limit u ∈ Uad is admissible. The corresponding states yn := y(un) are boundedin the Hilbert space W(0, t f ) by Theorem 3.1. By extracting a subsequence, which wedenote again by un and yn, we obtain a weak limit y ∈ W(0, t f ) of yn. It remains toshow that y = y(u) holds, and that u is a global minimizer.

The reaction term dn := f (yn) is bounded in L∞(Q; R6), since the state is bounded inL∞(Q; R6) by Theorem 3.1, and since the reaction function f is locally Lipschitz contin-uous. Hence, dn is also bounded in L2(Q; R6) and we can extract a weakly convergingsubsequence with a weak limit d in that space. The state yn is the solution of the follow-ing heat equation

∂yn

∂t− D∆yn = dn in Q,

D∂yn

∂n+ Zyn = g(un) on Σ,

yn(0) = y0 in Ω

(4.3)

with right hand sides dn and g(un). The mapping from un and dn onto the uniquesolution yn of the heat equation is affine and continuous from L2(0, t f )× L2(Q; R6) intoW(0, t f ), and hence weakly continuous. We conclude that the weak limit y is the uniquesolution to

∂y∂t− D∆y = d in Q,

D∂y∂n

+ Zy = g(u) on Σ,

y(0) = y0 in Ω.

(4.4)

It remains to show d = f (y), which has y = y(u) as a consequence.

By the Rellich-Kondrachov Theorem [Adams and Fournier, 2003, Chapter 6] and theLemma of Aubin-Lions Aubin [1963] the embedding W(0, t f ) → L2(0, t f ; L6−ε(Ω; R6))is compact for any ε > 0. Hence, the convergence of yn is strong, e.g.,

yn → y in L2(Q; R6). (4.5)

We also know from Theorem 3.1 that the states yn are bounded component-wise by aconstant M. By (4.5), the same holds for y. Together with the local Lipschitz continuityof f , see (2.9), we obtain

‖ f (yn)− f (y)‖L2(Q;R6) ≤ LM2‖yn − y‖L2(Q;R6) → 0 (4.6)

and the strong convergence dn = f (yn) → f (y) in L2(Q; R6) ensues. But dn has theweak limit d. As the limit in both topologies must be the same, we find that d = f (y)and consequently, y = y(u).

12

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

Finally, the continuity and convexity of the objective functional J yields its weak se-quential lower semi-continuity and it follows that

j = limn→∞

J(yn, un) ≥ J( limn→∞

yn, w-limn→∞

un) = J(y, u). (4.7)

Therefore, u is a global solution of (4.2), which completes the proof.

Next, we discuss the characterization of locally optimal solutions by their first-ordernecessary optimality conditions. For this purpose, we investigate the differentiabilityof the control-to-state operator. We prove the following theorem.

Theorem 4.2. The mapping S : u 7→ y, given by the solution of (2.6), is Fréchet differen-tiable from Uad (endowed with the L∞(0, t f ) topology) into L∞(Q; R6). For ∈ L∞(0, t f )the directional derivative = S′(u) is given by the unique solution of the following ini-tial value problem,

∂t− D∆ = f ′(y) in Q,

D∂

∂n+ Z = g′(u) on Σ,

(0) = 0 in Ω,

(4.8)

where y = S(u) is the state of the system corresponding to the control u, and f ′(y)denotes the Jacobian of f .

Proof. We define the function spaces Y := L∞(Q; R6), U := L∞(0, t f ) and V :=L∞(Q; R6). For an arbitrary u∗ ∈ Uad Theorem 3.1 ensures that y∗ := S(u∗) ∈ Y andy∗ ≥ 0 holds. In order to define a neighbourhood of (u∗, y∗), we choose an arbitraryopen set OU ⊂ U such that u∗ ∈ OU . Moreover, we define OY ⊂ y ∈ Y : y ≥ −ε,where 0 < ε < mincj|j = 1, . . . , 5, in order to avoid singularities of f . Hence,f : OY → L∞(Q; R6) is continuously differentiable [Tröltzsch, 2010, Lemma 4.12].

Similar to the proof in Barthel et al. [2010] we define SQ : L∞(Q; R6) → L∞(Q; R6),SΣ : L∞(Σ; R6) → L∞(Q; R6), and SΩ : L∞(Ω; R6) → L∞(Q; R6), as the linear andcontinuous solution operators for the heat equation

∂y∂t− D∆y = f in Q,

D∂y∂n

+ Zy = g on Σ,

y(0) = h in Ω

in the sense that: SQ : f 7→ y with g = h = 0, SΣ : g 7→ y with f = h = 0, andSΩ : h 7→ y with f = g = 0. We refer to [Casas, 1997, Theorem 5.1] for the proof ofessentially bounded solutions to the heat equation for L∞ data.

13

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

In the following we want to apply the implicit function theorem ([Zeidler, 1995, Chapter4.8] or [Ciarlet, 2013, Chapter 7.13]) to the mapping F : OU ×OY → V defined by

F(u, y) := y− SQ( f (y))− SΣ(g(u))− SΩ(y0), (4.9)

at the point (u∗, y∗). It is F(u∗, y∗) = 0, because y∗ = SQ( f (y∗)) + SΣ(g(u∗)) + SΩ(y0)is equivalent to the system (2.6). F is continuously differentiable since the same holdsfor f and the other mappings involved are affine and continuous.

Next, we show the continuous invertibility of the partial Fréchet derivative

Fy(u∗, y∗) : w 7→ w− SQ( f ′(y∗)w).

To this end, we show that for each v ∈ V there exists a unique element w ∈ Y, such that

v = Fy(u∗, y∗)w, (4.10)

which depends continuously on v. Equivalently, we can search for an r := w − v, asSQ( f ′(y∗)w) = r equals (4.10). The corresponding parabolic problem for r is

∂r∂t− D∆r− f ′(y∗)r = f ′(y∗)v in Q

D∂r∂n

+ Zr = 0 on Σ

r(0) = 0 in Ω,

(4.11)

where we used f ′(y∗)w = f ′(y∗)r + f ′(y∗)v. Since y∗ is the state corresponding toan admissible control, it takes values in a finite interval not including the singularitiesc1, . . . , c5 of f . Hence, the matrix function f ′(y∗) is bounded, and therefore the initialvalue problem (4.11) has a unique solution r in L∞(Q; R6), which depends continuouslyon the data v ∈ V. We conclude that the mapping v 7→ r is continuous and bounded.The same holds true for v 7→ w = r + v, which shows the continuous invertibility ofFy(u∗, y∗). Therefore, the assumptions of the implicit function theorem are satisfied andit follows that there exists a continuously differentiable function S such that

(u, y) ∈ OU × OY|F(u, y) = 0=(u, y) ∈ OU × OY|y = S(u)

(4.12)

in some neighbourhoods OU of u∗ and OY of y∗. Since F(u, S(u)) = 0 holds for allu ∈ Uad we have S(u) = S(u). This shows the continuous Fréchet differentiability ofthe control-to-state operator at the arbitrarily chosen point u∗.

In order to derive a formula for the derivative of S we take into account that all map-pings in the equation

S(u) = SQ( f (S(u))) + SΣ(g(u)) + SΩ(y0), (4.13)

14

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

are Fréchet differentiable. As the mappings SQ and SΣ are linear, taking the derivativewith respect to u in (4.13) leads to

S′(u) = SQ( f ′(S(u)) S′(u) ) + SΣ(g′(u) ). (4.14)

Due to = S′(u) and y = S(u) equation (4.14) is equivalent to the initial value problem(4.8), which completes the proof.

Now, the optimal control problem (4.2) is equivalent to minimizing the reduced func-tional J(u) := J(S(u), u) over the set of feasible controls Uad. Standard arguments[Tröltzsch, 2010, Lemma 2.20] lead to the first-order necessary optimality conditions fora locally optimal solution as follows.

Theorem 4.3. Every locally optimal solution u (in the sense of L∞(0, t f )) of the problem

minu∈Uad

J(u) (4.15)

satisfies the following variational inequality

J′(u)(u− u) ≥ 0 for all u ∈ Uad. (4.16)

Notice that the assumptions of a convex control set Uad and the Fréchet differentiabil-ity of the functional J are fulfilled, as both mappings J and S are Fréchet differentiable.Furthermore, the introduction of the adjoint state leads to the characterization of theoptimal solution in terms of the state, adjoint and control variables. We have the fol-lowing optimality system

Theorem 4.4. Let u be a solution of the optimal control problem (4.2), y = y(u) bethe corresponding state that solves the forward state equation (2.6), and p = p(u) ∈W(0, t f ) be the adjoint state defined as the solution to the following linear backward intime adjoint equation

−∂p∂t− D∆p = f ′(y)T p + α (y− yd) in Q,

D∂p∂n

+ Zp = 0 on Σ,

p(t f ) = β (y(t f )− yt f ) in Ω,

(4.17)

where

α = diag(αX, αN , αO, αS, αE, αT), yd = (Xd, Nd, Od, Sd, Ed, Td)>,

β = diag(βX, βN , βO, βS, βE, βT), yt f = (Xt f , Nt f , Ot f , St f , Et f , Tt f )>.

15

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

Then the variational inequality∫ t f

0

(λ (u− Text) +

∫Γ2

τwater p6 ds)(u− u)dt ≥ 0 for all u ∈ Uad (4.18)

is fulfilled.

5. DISCRETIZATION SCHEMES AND OPTIMIZATION

ALGORITHM

In this section, we briefly discuss the numerical solution of the optimality system, con-sisting of the forward model (2.6), the adjoint model (4.17), and the variational inequal-ity (4.18). Specifically, we illustrate a suitable discretization scheme for the forwardand backward equations, and employ a BFGS quasi-Newton optimization method tosolve this system in reduced formulation. We follow here an optimize–then–discretizeapproach.

The purpose of this section is to explore the potential of water temperature controls onthe amount of sugar converted. The numerical examples that are described in Section 6use realistic model parameters. Under these conditions, it turned out that neither thelower bound (depending on the stagnation temperatures b1 and b2) nor the technologi-cal upper bound for the control became active in the solution. We therefore describe inSection 5.3 only the solution of the unconstrained problem, for which (4.18) is replacedby the equation

λ (u− Text) +∫

Γ2

τwater p6 ds = 0 a.e. in [0, t f ].

5.1. DISCRETIZATION OF THE FORWARD STATE EQUATION

We discuss the discretization of the reaction-diffusion system (2.6). Since these equa-tions are non-linear, any scheme implicit in time would incur the need to solve non-linear algebraic equations. On the other hand, it is well known that an explicit schemeis only conditionally stable and would incur the need to use very small time steps.In order to avoid both difficulties, we discretize the equation with an implicit-explicit(IMEX) Runge-Kutta scheme, proposed in Ascher et al. [1997], whose stability and con-vergence properties were examined in Koto [2008].

In order to illustrate this scheme in detail, we semi-discretize (2.6) in space, e.g., by afinite element or finite difference scheme, to obtain

y′ = Lhy + ϕh(u) + fh(y). (5.1)

The matrix Lh contains contributions from the Laplacian and ϕ(u) accounts for theboundary conditions. For the solution of this ordinary differential equation, we divide

16

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

the time interval [0, t f ] into M equidistant subintervals and the vector ym represents the

approximation of the solution of equation (5.1) at time tm := m δt, where δt =t fM . On

this time grid the resulting system of ordinary differential equations is discretized bythe IMEX Runge-Kutta scheme proposed in Ascher et al. [1997], which can be writtenwith one intermediate step yω as follows

yω = ym + δt ω (Lhyω + ϕh(u(tm + ω δt))) + δt ω f (ym), (5.2a)

ym+1 = ym + δt (1−ω) (Lhyω + ϕh(u(tm + ω δt))) + δt κ f (ym)

+ δt ω(

Lhym+1 + ϕh(u(tm+1)))+ δt (1− κ) f (yω),

(5.2b)

where ω = 2−√

22 and κ = 1− 1

2ω . This scheme is second-order accurate in time andpossesses a larger stability region compared to the slightly simpler IMEX trapezoidalscheme Koto [2008].

5.2. DISCRETIZATION OF THE BACKWARD ADJOINT EQUATION

At this point, it would seem natural to use the discrete adjoint scheme for the backwardequation. However, numerical tests show that the discrete adjoint scheme results in anexplicit treatment of the reaction part of the adjoint equation, given by

− ∂p∂t− D∆p = f ′(y)T p + α (y− yd). (5.3)

The resulting scheme is, however, not able to recover the actual behavior, due to largeeigenvalues of the Jacobian f ′(y) of the reaction function. We therefore implement the(implicit) Crank-Nicolson scheme for (5.3), i.e.,

−pm − pm−1

δt=

12

(Lhpm + f ′h(y)

Tpm + α (ym − yd))

+12

(Lhpm−1 + f ′h(y)

Tpm−1 + α (ym−1 − yd))

.(5.4)

We remark that this numerical scheme has second-order convergence in time as well[Hundsdorfer and Verwer, 2003, Chapter I. 4.2].

5.3. THE BFGS OPTIMIZATION ALGORITHM

For the optimization problem (4.2), we employ the matrix-free quasi-Newton BFGSscheme; see, e.g., [Nocedal and Wright, 2006, Algorithm 7.4] or [Borzì and Schulz, 2012,Chapter 4.2.2]. Given a control u, we evaluate the gradient w.r.t. the L2(0, t f )-topologyof the reduced cost functional J at this point in the following way:

1. solve the state equation (2.6) for y with the given control u;

17

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

2. solve the adjoint equation (4.17) for the adjoint state p, inserting the state functiony into the reaction part and terminal condition;

3. compute the gradient ∇ J by the following formula,

∇ J(u) = λ (u− Text) +∫

Γ2

τwater p6 ds ∈ L2(0, t f ). (5.5)

The BFGS optimization algorithm reads as follows1: Choose an initial approximation u0 and compute g0 = ∇ J(u0).2: Choose tolerance tol and set k = 03: while k < kmax do

4: Compute search direction vk = −gk −k−1∑

i=0$i [(si, gk) ri − (zi, gk) si].

5: Compute step length αk ≈ minα>0

J(uk + α vk).

6: Stop if ‖αk vk‖L∞(0,t f ) < tol

7: Compute new approximation uk+1 = uk + αk pk and gk+1 = ∇ J(uk+1).8: Compute

yk = gk+1 − gk, sk = αkvk = uk+1 − uk, $k = (yk, sk)−1,

zk = yk +k−1

∑i=0

$i [(si, yk) ri − (zi, yk) si] , dk = 1 + $k(yk, zk), rk = dk sk − zk

9: Set k = k + 1.10: end while

Notice that the scalar product (·, ·) denotes the L2(0, t f ) inner product. The auxiliaryvariables yk, sk, $k, zk, dk and rk in step 8 of the optimization algorithm are necessary tocalculate the action of the approximate Hessian of J, taken as an operator L2(0, t f ) →L2(0, t f ). This approximation is initialized with the identity.

For the line search in step 5 we utilize Algorithm 3.5 in Nocedal and Wright [2006],which generates step lengths such that the strong Wolfe conditions

J(uk + αk vk) ≤ J(uk) + δ1 αk(∇ J(uk), vk) (5.6a)

|(∇ J(uk + αk vk), vk)| ≥ δ2(∇ J(uk), vk) (5.6b)

are satisfied. These conditions (5.6) are sufficient to maintain positive definiteness ofthe quasi-Newton operator.

6. NUMERICAL EXPERIMENTS

In this section, we focus on the numerical validation of our optimal control formulation.In particular, we compare the simulation of the fermentation process with constant con-trol temperature and with optimized control temperature. For convenience, we choose

18

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

σ1 = 10−9 m2

s σ2 = 10−9 m2

s σ3 = 10−9 m2

sσ4 = 10−9 m2

s σ5 = 10−9 m2

s σ6 = 0.144 · 10−3 m2

sτwater = 4 · 10−7 m

s τair = 8 · 10−4 ms

a1 = 1 · 10−5 1Ks a2 = 5 · 10−8 1

Ks a3 = 1 · 10−9 1Ks

a4 = 1 · 10−7 1Ks a5 = 1 · 10−6 1

Ks a6 = 0.511 a5a7 = 2 a5 b1 = 9 C b2 = 9 Cc1 = 0.05 kg

m3 c2 = 0.001 kgm3 c3 = 50 kg

m3

c4 = 5 kgm3 c5 = 34 kg

m3 Etol = 70 kgm3

k1 = 10 m3

kg k2 = 6 · 10−9(

m3

kg

)21s Text = 12 C

Table 6.1: Parameter values that were used in numerical experiments.

a two-dimensional spatial domain Ω = (0, 0.5)× (0, 1), which respresents a fermenterof 50 cm width and 1 m height. A usual tank has a cooling mantle on the lateral bound-ary. Therefore, we define the control boundary as Γ2 = (x1, x2) ∈ Γ : 0.3 ≤ x2 ≤ 0.7.We have the following initial conditions

X0 = 0.5 gl , N0 = 0.2 g

l , O0 = 0.004 gl ,

S0 = 200 gl , E0 = 0 g

l , T0 = 16 C,(6.1)

and integrate the differential equations for t f = 30 days, or 2 592 000 seconds. Inour numerical experiments, see Figure 6.1 and Figure 6.2, we work on a grid of 41× 81points in space and 401 points in time. Further, we choose realistic diffusion coefficientsand reaction parameter values that are shown in Table 6.1. In fact, these parameters de-pend strongly on the actual experimental setting, and we have not applied a parameterestimation for a special yeast culture and fermenter. We rather want to show the gen-eral ability of the optimal control framework presented in this work to optimize thefermentation process. Therefore, we use parameters that result in qualitatively goodsimulation results (private communication with Dr. Christian von Wallbrunn, Depart-ments of Microbiology & Biochemistry, Geisenheim University). With this setting anda constant control temperature u = 16 C, we obtain the fermentation results plottedin blue color in Figure 6.1. We see that the yeast population cannot consume all of thesugar before dying out. This phenomenon is called stagnation, and it results in a greatloss of quality of the fermented wine. The reason is that additional yeast cells wouldhave be added at a very late stage of the fermentation process in order to obtain a drywine with almost zero sugar concentration. These additional yeast cultures change thetaste of the wine, and the product will be not as good as desired. Therefore stagnationmust be avoided. Our control objective is to maximize the sugar consumption in thefermentation process. Moreover, the working temperature T should not deviate toomuch from an ideal fermentation temperature of 16 C, as thermal stress applied to theyeast culture results in compounds that influence the taste in a negative way. Therefore,we set the objective coefficients in (4.2) to zero except for

αT = 10−5, βS = 10, λ = 10−7.

19

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

t [d]0 10 20 30

X# g l

$

0

10

20

30

40

t [d]0 10 20 30

N# g l

$0

0.05

0.1

0.15

0.2

t [d]0 10 20 30

O# g l

$

#10-3

0

1

2

3

4

t [d]0 10 20 30

S# g l

$

0

50

100

150

200

t [d]0 10 20 30

E# g l

$

0

20

40

60

80

100

t [d]0 10 20 30

T[/C]

14

16

18

20

22

24

26

Figure 6.1: Space-averaged values of X, N, O, S, E and T over 30 days of fermentation.The two different control functions u correspond to the dashed lines in thelower right plot. Results for constant control in blue and for optimized con-trol in red.

Furthermore, we define the following desired trajectory for temperature and final statefor sugar

Td(t) = 16 C, St f = 0gl

.

With this setting, we apply the optimization scheme starting from an initial guess u =16 C. The results of the optimization process are shown in red color in Figure 6.1. Wesee that, in the optimally controlled fermentation process, the amount of sugar left after30 days is significantly lower. Moreover, one can observe that the mean temperature isnear 16 C, except for the late stage of the fermentation process, where the lack of yeastmust be compensated by high temperatures to ensure a sufficiently large reaction rate.

The temperature distribution in the fermenter is shown in Figure 6.2. In the first stageof the fermentation the yeast produces much heat, and the tank must be cooled. The

20

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

temperature within the vessel can differ up to one degree Celsius. In contrast, there isalmost no activity during the last days, and there is a fairly homogeneous temperature.

T [/C] at t = 7:5 d

x [m]0 0.1 0.2 0.3 0.4 0.5

y[m

]

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

15.1

15.2

15.3

15.4

15.5

15.6

15.7

15.8

15.9

16

16.1

16.2

16.3

16.4

16.5

T [/C] at t = 15 d

x [m]0 0.1 0.2 0.3 0.4 0.5

y[m

]

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

18.7

18.8

18.9

19

19.1

19.2

19.3

19.4

19.5

19.6

19.7

T [/C] at t = 22:5 d

x [m]0 0.1 0.2 0.3 0.4 0.5

y[m

]

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

18.07

18.08

18.09

18.1

18.11

Figure 6.2: Distribution of temperature at three different time points.

Furthermore, we want to give some evidence that the proposed optimality system iscorrect. We discretize the partial differential equation along with the correspondingobjective functional, which results in a finite dimensional optimization problem withcontrol u ∈ RM+1. The gradient∇ J(u) of the reduced functional in the discrete L2-normon our uniform time grid can be approximated component-wise by a finite differenceapproach as follows:

(∇ Jdisc(u))j :=J(u + α ej)− J(u− α ej)

2 α δt. (6.2)

The j-th unit vector is denoted by ej. Hence, with substantial computational effort (solv-ing the forward equation 2 (M + 1) times) we can approximate the discrete gradient∇ Jdisc(u). Afterwards, we solve the forward and backward equation and obtain an ap-proximation of the gradient ∇ J(u) by discretizing the continuous optimality system.When refining the mesh, we see in Table 6.2 the difference between these two gradientsat the control u = 16 C decreases to zero and we have a numerical verification that thederived optimality system for our proposed optimal control problem is correct.

Moreover, we compute the optimal solution on different grids and the difference be-tween the optimal control, its corresponding state, and adjoint state of two subsequentgrids. The results in Table 6.3 indicate the convergence of the solution of the optimalitysystem.

21

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

Nx Ny M relative error (eoc)5 9 201 0.38969 17 201 0.1853 (1.07)

17 33 201 0.0875 (1.08)33 65 201 0.0402 (1.12)65 129 201 0.0175 (1.20)

Table 6.2: Experimental order of convergence (eoc) of the relative error‖∇ J(u)−∇ Jdisc(u)‖L2

δt/‖∇ J(u)‖L2

δtof the optimize–before–discretize

gradient (5.5) computed with Nx, Ny and M grid points in x-, y- andt-direction, respectively.

Nx, Ny, M 21,41,401 41,81,401 (eoc)X 8.76 · 10−6 2.44 · 10−6 (1.84)N 4.29 · 10−5 1.68 · 10−5 (1.35)O 4.29 · 10−5 1.68 · 10−5 (1.35)S 5.51 · 10−6 1.39 · 10−6 (1.97)E 1.98 · 10−6 4.99 · 10−7 (1.99)T 3.31 · 10−6 1.09 · 10−6 (1.61)p1 7.65 · 10−5 2.35 · 10−5 (1.70)p2 9.87 · 10−5 2.87 · 10−5 (1.78)p3 9.87 · 10−5 2.87 · 10−5 (1.78)p4 1.15 · 10−5 4.95 · 10−6 (1.21)p5 2.32 · 10−5 9.72 · 10−6 (1.25)p6 5.40 · 10−3 1.88 · 10−3 (1.60)u 7.14 · 10−6 2.46 · 10−6 (1.54)

Table 6.3: Convergence rates of the optimal solution, its state and adjoint state. Theerror measures the difference of the solutions of two subsequent grids by‖Ch − C2h‖L2

h,δt/‖C2h‖L2

h,δt, where the finer grid is specified in the top row of

the table. The mesh width parameter is denoted by h.

22

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

7. CONCLUSION

The formulation of an optimal control of the wine fermentation process was investi-gated. For this purpose a refined model of wine fermentation with new reaction ki-netics and a term modeling the toxicity of ethanol was discussed and extended to aspace-dependent model by adding diffusion mechanisms for concentrations and forheat. The resulting system of reaction-diffusion equations was theoretically investi-gated proving existence and uniqueness of solutions. Further, an optimal control prob-lem with thermal boundary control was formulated. Existence of optimal solutions andits characterization as solutions to the corresponding optimality system was discussed.Results of numerical experiments were presented to demonstrate the effectiveness ofthe proposed control framework.

A. RESULTS ON PARABOLIC PROBLEMS

Theorem A.1. If σ > 0, α ∈ L∞(Q), β ∈ L∞(Σ), β ≥ 0 a.e. in Q, f ∈ L2(Q), g ∈ L2(Σ)and y0 ∈ L2(Ω), then there exists a unique solution y ∈W(0, t f ) for the heat equation

∂y∂t− σ∆y + α y = f in Q,

σ∂y∂n

+ β y = g on Σ,

y(0) = y0 in Ω.

and there is a constant c independent of f , g and y0 such that

‖y‖W(0,t f ) ≤ c(‖y0‖L2(Ω) + ‖g‖L2(Σ) + ‖ f ‖L2(Q)

).

Furthermore,

(i) if f ≥ 0, g ≥ 0 and y0 ≥ 0 holds, then y ≥ 0.

(ii) if α ≥ 0, f = β = g = 0, y0 ∈ L∞(Ω) and y0 ≥ 0 holds, then

0 ≤ y ≤ ess sup y0.

Proof. The proof is similar to that in [Dautray and Lions, 1992, Chapter XVIII § 4.5].

Theorem A.2. Assume that σ1, σ2 > 0 and f : R2 → R. Let v and w satisfy the followingreaction-diffusion system

∂v∂t− σ1∆v = f (v, w),

∂w∂t− σ2∆w = − f (v, w)

23

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

subject to homogeneous Neumann boundary conditions and non-negative initial con-ditions v0, w0 ∈ L∞(Ω). Assume that f (v, 0) = f (0, w) = 0 for all v, w ∈ R andf (v, w) ≥ 0 for v, w ≥ 0, then there exists a constant M only dependent on the initialcondition, the reaction function f and the diffusion coefficients, such that

0 ≤ v, w ≤ M.

Proof. See Masuda [1983] for a detailed discussion on this class of problems.

Theorem A.3. Let fk : Rm → R be Lipschitz continuous, σk > 0, αk ≥ 0, gk ∈ L2(Σ)and yk0 ∈ L2(Ω) for all 1 ≤ k ≤ m. Then the system

∂yk

∂t− σk∆yk = fk(y) in Q,

σk∂yk

∂n+ αkyk = gk on Σ,

yk(0) = yk0 in Ω

has a unique solution y := (y1, . . . , ym) ∈W(0, t f ).

Proof. A similar theorem is stated in [Pao, 1992, Theorem 9.2] and [Evans, 2010, Theo-rem 2 in Part III 9.2.1]. We show in the following necessary extensions. The basic ideais to use Banach’s fixed point theorem in the space X = C(0, t f ; L2(Ω; Rm)) with thefollowing norm

‖v‖ := max0≤t≤t f

‖v(t)‖L2(Ω;Rm).

Therefore, take a fixed y ∈ X and denote by F(y) = w the solution of the following muncoupled linear parabolic equations

∂wk

∂t− σk∆wk = fk(y) in Q,

σk∂wk

∂n+ αkwk = gk on Σ,

wk(0) = yk0 in Ω.

Notice that, if y ∈ X we know that f (y) ∈ L2(Q; Rm), as f is Lipschitz continuous.By the theory for linear parabolic PDEs [Dautray and Lions, 1992, Chapter XVIII § 3]we know that these equations admit a unique solution w = (w1, . . . , wm) ∈ W(0, t f )and consequently w ∈ X, due to the embedding W(0, t f ) → X. Hence, the operatorF : X → X is well-defined. In order to show that F is a contraction, if the time window[0, t f ] is small enough, let y, y ∈ X be arbitrarily chosen. Then the difference of their

24

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

images w and w satisfies the following partial differential equations

∂(wk − wk)

∂t− σk∆(wk − wk) = fk(y)− fk(y) in Q,

σk∂(wk − wk)

∂n+ αk(wk − wk) = 0 on Σ,

(wk − wk)(0) = 0 in Ω.

The standard energy equation yields

12‖(wk − wk)(τ)‖2

L2(Ω)

=−∫ τ

0

(∫Ω

σk‖∇(wk − wk)‖2 dx +∫

Γαk(wk − wk)

2 ds)

dt

+∫ τ

0

∫Ω( fk(y)− fk(y))(wk − wk)dx dt.

≤∫ τ

0

(L2

2

∫Ω‖y− y‖2 dx +

12

∫Ω(wk − wk)

2 dx)

dt

≤∫ τ

0

(L2

2‖y− y‖2

L2(Ω;Rm) +12‖wk − wk‖2

L2(Ω)

)dt

≤t f L2

2max

0≤t≤t f‖(y− y)(t)‖2

L2(Ω;Rm)

+t f

2max

0≤t≤t f‖(wk − wk)(t)‖2

L2(Ω).

As this is valid for all τ ∈ [0, t f ], we can deduce

max0≤t≤t f

‖(wk − wk)(t)‖2L2(Ω) ≤ t f L2‖(y− y)(t)‖2

X

+ t f max0≤t≤t f

‖(wk − wk)(t)‖2L2(Ω).

Hence, for t f < 1 it holds that

max0≤t≤t f

‖(wk − wk)(t)‖2L2(Ω) ≤

t f L2

1− t f‖(y− y)(t)‖2

X

and moreover the following is true

‖w− w‖2X ≤

m t f L2

1− t f‖y− y‖2

X.

Assume that t f is small enough such that m t f L2

1−t f< 1. Then f is a contraction and we can

apply Banach’s fixed point theorem. This yields a unique fix point for the operator F in

25

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

the time interval [0, t f ], which is a solution of the system of reaction-diffusion equations.If the converse is true and the time window t f is so big that F is not a contractionanymore, we can divide this interval into small parts and use the argument describedabove for each subinterval. After a finite number of iterations a unique solution for thewhole time interval [0, t f ] is found, which completes the proof.

26

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

REFERENCES

Robert A. Adams and John J. F. Fournier. Sobolev Spaces, volume 140 of Pure and Ap-plied Mathematics (Amsterdam). Elsevier/Academic Press, Amsterdam, second edi-tion, 2003. ISBN 0-12-044143-8.

B Andres-Toro, JM Giron-Sierra, P Fernandez-Blanco, JA Lopez-Orozco, and E Besada-Portas. Multiobjective optimization and multivariable control of the beer fermenta-tion process with the use of evolutionary algorithms. Journal of Zhejiang UniversitySCIENCE, 5(4):378–389, 2004. doi: 10.1631/jzus.2004.0378.

Uri M. Ascher, Steven J. Ruuth, and Raymond J. Spiteri. Implicit-explicit Runge-Kutta methods for time-dependent partial differential equations. Applied Numer-ical Mathematics. An IMACS Journal, 25(2-3):151–167, 1997. ISSN 0168-9274. doi:10.1016/S0168-9274(97)00056-1. Special issue on time integration (Amsterdam,1996).

Jean-Pierre Aubin. Un théorème de compacité. Comptes Rendus de l’Acadèmie des Sci-ences, Paris, 256:5042–5044, 1963.

Werner Barthel, Christian John, and Fredi Tröltzsch. Optimal boundary control of asystem of reaction diffusion equations. ZAMM. Zeitschrift für Angewandte Mathematikund Mechanik. Journal of Applied Mathematics and Mechanics, 90(12):966–982, 2010. ISSN0044-2267. doi: 10.1002/zamm.200900359.

A. Borzì and R. Griesse. Distributed optimal control of lambda-omega systems. Jour-nal of Numerical Mathematics, 14(1):17–40, 2006. ISSN 1570-2820. doi: 10.1163/156939506776382120.

Alfio Borzì and Volker Schulz. Computational Optimization of Systems Governed by PartialDifferential Equations, volume 8 of Computational Science & Engineering. Society forIndustrial and Applied Mathematics (SIAM), Philadelphia, PA, 2012. ISBN 978-1-611972-04-7.

Alfio Borzì, Juri Merger, Jonas Müller, Achim Rosch, Christina Schenk, DominikSchmidt, Stephan Schmidt, Volker Schulz, Kai Velten, Christian von Wallbrunn, et al.Novel model for wine fermentation including the yeast dying phase. arXiv preprintarXiv:1412.6068, 2014.

Eduardo Casas. Pontryagin’s principle for state-constrained boundary control prob-lems of semilinear parabolic equations. SIAM Journal on Control and Optimization, 35(4):1297–1327, 1997. ISSN 0363-0129. doi: 10.1137/S0363012995283637.

B. Charnomordic, R. David, D. Dochain, N. Hilgert, J.-R. Mouret, J.-M. Sablayrolles, andA. Vande Wouwer. Two modelling approaches of winemaking: first principle andmetabolic engineering. Mathematical and Computer Modelling of Dynamical Systems.Methods, Tools and Applications in Engineering and Related Sciences, 16(6):535–553, 2010.ISSN 1387-3954. doi: 10.1080/13873954.2010.514701.

27

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

K Chojnacka. Fermentation products. Chemical Engineering and Chemi-cal Process Technology, V:12. http://www.eolss.net/outlinecomponents/Chemical-Engineering-Chemical-Process-Technology.aspx.

Philippe G. Ciarlet. Linear and Nonlinear Functional Analysis with Applications. Societyfor Industrial and Applied Mathematics, Philadelphia, PA, 2013. ISBN 978-1-611972-58-0.

Sophie Colombié, Sophie Malherbe, and Jean-Marie Sablayrolles. Modeling of heattransfer in tanks during wine-making fermentation. Food Control, 18(8):953–960, 2007.doi: 10.1016/j.foodcont.2006.05.016.

Robert Dautray and Jacques-Louis Lions. Mathematical Analysis and Numerical Methodsfor Science and Technology. Vol. 5. Springer-Verlag, Berlin, 1992. ISBN 3-540-50205-X; 3-540-66101-8. doi: 10.1007/978-3-642-58090-1. Evolution Problems. I, Withthe collaboration of Michel Artola, Michel Cessenat and Hélène Lanchon, Translatedfrom the French by Alan Craig.

Robert David, Denis Dochain, Jean-Roch Mouret, Alain Vande Wouwer, Jean-MarieSablayrolles, et al. Dynamical modeling of alcoholic fermentation and its link withnitrogen consumption. In Proceedings of the 11th International Symposium on ComputerApplications in Biotechnology (CAB 2010). Leuven, Belgium, pages 496–501, 2010.

Robert David, Denis Dochain, Jean-Roch Mouret, Alain Vande Wouwer, Jean MarieSablayrolles, et al. Modeling of the aromatic profile in wine-making fermentation:the backbone equations. In Proceedings of the 18th IFAC World Congress, Milano, pages10597–10602, 2011.

Lawrence C. Evans. Partial Differential Equations, volume 19 of Graduate Studies in Math-ematics. American Mathematical Society, Providence, RI, second edition, 2010. ISBN978-0-8218-4974-3. doi: 10.1090/gsm/019.

H Scott Fogler. Essentials of Chemical Reaction Engineering. Pearson Education, 2010.

Douglas A Gee and W Fred Ramirez. Optimal temperature control for batch beer fer-mentation. Biotechnology and Bioengineering, 31(3):224–234, 1988. doi: 10.1002/bit.260310308.

Willem Hundsdorfer and Jan Verwer. Numerical Solution of Time-Dependent Advection-Diffusion-Reaction Equations, volume 33 of Springer Series in Computational Math-ematics. Springer-Verlag, Berlin, 2003. ISBN 3-540-03440-4. doi: 10.1007/978-3-662-09017-6.

Kenneth A Johnson and Roger S Goody. The original michaelis constant: translationof the 1913 michaelis–menten paper. Biochemistry, 50(39):8264–8269, 2011. doi: 10.1021/bi201284u.

28

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

Toshiyuki Koto. IMEX Runge-Kutta schemes for reaction-diffusion equations. Journalof Computational and Applied Mathematics, 215(1):182–195, 2008. ISSN 0377-0427. doi:10.1016/j.cam.2007.04.003.

Guoping Lian, A. Thiru, Andrew Parry, and Steve Moore. Cfd simulation of heat trans-fer and polyphenol oxidation during tea fermentation. Computers and Electronics inAgriculture, 34(1):145–158, 2002. doi: 10.1016/S0168-1699(01)00184-3.

J.-L. Lions. Optimal Control of Systems Governed by Partial Differential Equations. Trans-lated from the French by S. K. Mitter. Die Grundlehren der mathematischen Wis-senschaften, Band 170. Springer-Verlag, New York-Berlin, 1971. doi: 10.1007/978-3-642-65024-6.

S Malherbe, V Fromion, N Hilgert, and J-M Sablayrolles. Modeling the effects of assim-ilable nitrogen and temperature on fermentation kinetics in enological conditions.Biotechnology and Bioengineering, 86(3):261–272, 2004. doi: 10.1002/bit.20075.

Kyûya Masuda. On the global existence and asymptotic behavior of solutions ofreaction-diffusion equations. Hokkaido Mathematical Journal, 12(3):360–370, 1983. ISSN0385-4035.

Jorge Nocedal and Stephen J. Wright. Numerical Optimization. Springer Series in Opera-tions Research and Financial Engineering. Springer, New York, second edition, 2006.ISBN 978-0387-30303-1; 0-387-30303-0.

C. V. Pao. Nonlinear Parabolic and Elliptic Equations. Plenum Press, New York, 1992.ISBN 0-306-44343-0.

Thomas Pellechia. Wine: The 8,000-year-old Story of the Wine Trade. Running Press, 2006.ISBN 978-0-786745-77-7.

W Fred Ramirez and Jan Maciejowski. Optimal beer fermentation. Journal of the Instituteof Brewing, 113(3):325–333, 2007. doi: 10.1002/j.2050-0416.2007.tb00292.x.

JM Sablayrolles. Control of alcoholic fermentation in winemaking: Current situa-tion and prospect. Food Research International, 42(4):418–424, 2009. doi: 10.1016/j.foodres.2008.12.016.

Joel Smoller. Shock Waves and Reaction-Diffusion Equations, volume 258 of Grundlehrender Mathematischen Wissenschaften [Fundamental Principles of Mathematical Sciences].Springer-Verlag, New York, second edition, 1994. ISBN 0-387-94259-9. doi: 10.1007/978-1-4612-0873-0.

Fredi Tröltzsch. Optimal Control of Partial Differential Equations, volume 112 of GraduateStudies in Mathematics. American Mathematical Society, Providence, RI, 2010. ISBN978-0-8218-4904-0. doi: 10.1090/gsm/112. Theory, methods and applications, Trans-lated from the 2005 German original by Jürgen Sprekels.

29

Optimal Control of Wine Fermentation Merger, Borzì, Herzog

Kai Velten. Mathematical Modeling and Simulation. Wiley-VCH Verlag GmbH & Co.KGaA, Weinheim, 2009. ISBN 978-3-527-40758-8. doi: 10.1002/9783527627608. In-troduction for scientists and engineers.

Eberhard Zeidler. Applied Functional Analysis, volume 109 of Applied MathematicalSciences. Springer-Verlag, New York, 1995. ISBN 0-387-94422-2. doi: 10.1007/978-1-4612-0821-1. Main principles and their applications.

30