# Modelling and optimal control of an electro-fermentation process within a batch culture

Ihab I. Haidar, Elie Desmond-Le Quéméner, Jean-Pierre Barbot, Jérôme Harmand, Alain Rapaport

► To cite this version:

Ihab I. Haidar, Elie Desmond-Le Quéméner, Jean-Pierre Barbot, Jérôme Harmand, Alain Rapaport. Modelling and optimal control of an electro-fermentation process within a batch culture. Processes, 2022, 10 (3), 10.3390/pr10030535. [https://doi.org/10.3390/pr10030535](https://doi.org/10.3390/pr10030535)

HAL Id: hal-03593854

https://hal.inrae.fr/hal-03593854

Submitted on 2 Mar 2022

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Article

# Modelling and optimal control of an electro-fermentation process within a batch culture

Ihab Haidar <fnref n="1" />*, Elie Desmond-Le Quéméner <fnref n="2" />, Jean-Pierre Barbot <fnref n="1" />,<fnref n="3" />, Jérôme Harmand <fnref n="2" /> and Alain Rapaport <fnref n="4" />

**Abstract:** The electro-fermentation is a novel process that consists in coupling a microbial fermentative metabolism with an electrochemical system. In such a process the electrodes act either as electron sinks or sources modifying the fermentation balance of a microbial fermentative metabolism and provide new options for the control of microbial activity. A theoretical framework for the analysis and control of fermentations using electro-fermentation is currently lacking. In this paper, we propose a simple electro-fermentation model in which a population of fermentative bacteria switch between two metabolic behaviors in response to different electrode potentials. We then mathematically analyze optimal strategies to maximize the production of one of the rising products in a batch fermentation using Pontryagin's Maximum Principle. The obtained results show that, in some experimental configurations, a dynamic control of the electrode potential is required for the maximization of the desired product. Consequences of the obtained optimal strategy for driving electro-fermentation experiments are discussed through a realistic example. This analysis also highlights that the transition rates between fermentation and electro-fermentation behaviors are currently unknown and would be crucial to quantify in order to apply such a control approach.

**Keywords:** Electro-fermentation; microbial electrochemical technologies; bioprocess models; batch culture; optimal control.

## 1. Introduction

The knowledge of electroactive microorganisms has rapidly grown over the last 20 years with the development of microbial electrochemical technologies such as microbial fuel cells (MFC) and microbial electrolysis cells (MEC) for the production of electricity or hydrogen from organic matter [1]. The development of electromicrobiology has also led to several promising applications such as electro-fermentation (EF) in which reducing power provided by means of an electrode can redirect fermentation pathways [2]. In that case, the electrodes act as either electron sinks or sources modifying the fermentation balance of a microbial fermentative metabolism and providing new options for the control of microbial communities [3,4]. EF has been successfully applied on mixed culture fermentations and pure culture fermentations and has proven efficient for increasing yields in various products such as hydrogen, acetate, propionate, butyrate, lactate, 3-hydroxypropanoic acid, ethanol, 1,3-propanediol, 2,3-butandiol, butanol or acetone [5–16]. For example, a metabolic shift occurred in *Clostridium pasteurianum* when taking up electrons from an electrode poised at +0.045 V vs. SHE (Standard Hydrogen Electrode) with an increased production of reduced products such as butanol from glucose and 1,3-propanediol from glycerol [12]. From a biotechnological point of view, EF could lead to significant improvements of industrial fermentations using only a small amount of

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

**Citation:** I. Haidar, E. Desmond-Le Quéméner, J.-P. Barbot, J. Harmand and A. Rapaport Modelling and optimal control of an electro-fermentation process within a batch culture. *Journal Not Specified* **2021**, *1*, 0. https://doi.org/

Received:

Accepted:

Published:

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Submitted to *Journal Not Specified* for possible open access publication under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

<footnote n="1">¹ Quartz EA 7393, ENSEA, Cergy-Pontoise, France.</footnote>

<footnote n="2">² INRAE, Univ Montpellier, LBE, Narbonne, France</footnote>

<footnote n="3">³ LS2N-CNRS UMR 6004, Nantes, France.</footnote>

<footnote n="4">⁴ MISTEA, Université de Montpellier, Institut Agro, INRAE, France.</footnote>

<footnote>* Correspondence: ihab.haidar@ensea.fr</footnote>
electrical power. Moreover, the use of an electrode for the triggering of the EF effect in the
fermentation system introduce the possibility of a dynamic control of the fermentation.
However, mathematical models describing the EF effect are currently lacking. In EF,
the voltage applied between electrodes is a variable that could be adjusted dynamically,
typically with the objective of maximizing the total production over a time interval.
We shall state and study such an optimization problem with the help of the theory of
optimal control, for which several analytical and numerical tools are available. Optimal
control has been successfully applied to various bioprocesses, providing practical control
strategies, mostly in terms of feedback control (e.g. [17]), as we shall consider here.

Here we consider a pure culture of a fermentative microorganism growing on a limiting resource in a batch culture. As described above, the application of an external potential through the implementation of an electrode in the bioreactor leads to a switching of the metabolism between two different metabolic pathways. This EF effect is modeled by considering two microbial subpopulations producing different metabolites ($f_1, f_2$) giving rise to two different products ($s_1, s_2$). The switching between the fermentation behaviors depends on the electrode potential

<figure><img src="image_2.png" /><figcaption>**Figure 1.** Scheme of the switching between the fermentation behaviors of a fermentative bacteria depending on the electrode potential *V*.</figcaption></figure>

$V$. The control parameter is simply chosen in such a way that its variation between two constants values (which correspond to two different values of $V$) leads to a transition between the two considered metabolic behaviors. The bioreactor equations in batch culture are simply used to establish the model [18]. Based on this model, an optimal control problem for the maximization of the production of $s_2$ is formulated. The Pontryagin's Maximum Principle [17,19] is applied for the design of the optimal control strategy. The obtained results show that the optimal strategy is not trivial, in the sense that the control is not always constant (equal to that which correspond to $f_2$), where in some cases the metabolic behavior $f_1$ should be visited by the fermentative bacteria. The present mathematical analysis of the optimal strategies will serve as an experimental guide to design relevant experiments for testing if these strategies are eventually better, and thus contribute to the validation of the model.

The paper is organized as follows. In Section 2, we give the electro-fermentation model and introduce the optimization problem. A preliminary result analyzing the behavior of the optimal control in the case of proportional growth functions is given in Section 3. The main part of the paper is devoted to the synthesis of an optimal control strategy in two cases: case of identical growth functions in Section 4 and case of constant growth functions in Section 5. Finally, discussion and numerical simulations are given in Section 6.

## 2. Model description and optimization problem

In order to describe the switching between the two metabolic pathways described in the introduction, we suppose that the fermentative population is split into two sub-populations $x_1$ and $x_2$ in a commensal relationship to consume a substrate $s$. The sub-population $x_1$ with microbial growth rate $\mu_1$ gives rise to a product $s_1$ and the sub-population $x_2$ with microbial growth rate $\mu_2$ gives rise to a product $s_2$. We suppose that in the absence of polarized electrodes the fermentation is mainly guided by the population $x_1$ and when the external voltage is sufficiently large the metabolic function switches to
a metabolism guided by $x_2$. This electro-fermentation process can be described by the following system of ordinary differential equations:

$$ 
\begin{aligned}
\dot{s} &= -\frac{1}{Y_1}\mu_1(s)x_1 - \frac{1}{Y_2}\mu_2(s)x_2 \\
\dot{x}_1 &= \mu_1(s)x_1 - \alpha r_1 x_1 + (1-\alpha)r_2 x_2 \\
\dot{x}_2 &= \mu_2(s)x_2 + \alpha r_1 x_1 - (1-\alpha)r_2 x_2
\end{aligned}
\quad (1) $$

where $Y_1, Y_2$ are the yields coefficients, $r_1, r_2 > 0$ are positive constants and $\alpha \in \{0, 1\}$ is a control variable which is directly related to the external potential $V$ and satisfies the following property:

$$ \alpha = 0 \text{ if } V < V_0, \quad \text{and} \quad \alpha = 1 \text{ if } V \geq V_0, \quad (2) $$

where $V_0 > 0$ is a threshold on the external potential over which the metabolic pathway is guided by $x_2$. The value of the threshold potential $V_0$ depends on the microorganisms $x_1$ and $x_2$. We shall assume that growths do not present inhibition, which amounts to consider the following hypothesis.

**Assumption 1.** The growth functions $\mu_i$ are non decreasing with $\mu_i(s) > 0$ for $s > 0$.

A classical model for the growth rates kinetics $\mu_i$ is given by the following Monod type functions

$$ \mu_i(s) = \frac{k_i s}{K_i + s}, \quad i = 1, 2 \quad (3) $$

for some positive real numbers $k_i, K_i$, for $i = 1, 2$.

Observe that, due to the migration phenomenon between the two sub-populations, the relation between $x_1$ and $x_2$ is not simply reduced to a competition phenomenon.

We shall assume that the two sub-populations have the same conversion factor.

**Assumption 2.** $Y_1 = Y_2 = Y$.

Note that at the price of change of units of $x_1$ and $x_2$, one can without loss of generality assume that $Y = 1$; this is conventional when dealing with chemostat type systems [20]. Therefore, we shall consider the simpler model

$$ 
\begin{aligned}
\dot{s} &= -\mu_1(s)x_1 - \mu_2(s)x_2 \\
\dot{x}_1 &= \mu_1(s)x_1 - \alpha r_1 x_1 + (1-\alpha)r_2 x_2 \\
\dot{x}_2 &= \mu_2(s)x_2 + \alpha r_1 x_1 - (1-\alpha)r_2 x_2,
\end{aligned}
\quad (4) $$

where $(s(0), x_1(0), x_2(0)) = (s_0, x_{10}, x_{20}) \in (\mathbb{R}_+ \setminus \{0\})^3$. Observe that one has $s(t) + x_1(t) + x_2(t) = s(0) + x_1(0) + x_2(0) := c > 0$ at any $t \geq 0$. Therefore, we can consider the reduced dynamics in the plane

$$ 
\begin{aligned}
\dot{x}_1 &= \mu_1(c - x_1 - x_2)x_1 - \alpha r_1 x_1 + (1-\alpha)r_2 x_2 \\
\dot{x}_2 &= \mu_2(c - x_1 - x_2)x_2 + \alpha r_1 x_1 - (1-\alpha)r_2 x_2.
\end{aligned}
\quad (5) $$

The objective is to maximize the total production of the sub-population $x_2$ over an interval of time $[0, T]$, among functions $\alpha(\cdot)$ that are measurable time functions taking values in $\{0, 1\}$, which amounts to maximize the criterion

$$ J[\alpha(\cdot)] = \int_{0}^{T} \mu_{2}(s(t))x_{2}(t)dt, \quad (6) $$

where $T > 0$ is a fixed finite time horizon.
**Remark 1.** From the condition given by (2), the control variable $\alpha$ is constrained to take values in the non-convex set $\{0, 1\}$. In this case, one can not a priori guarantee the existence of optimal solutions for the problem (5)-(6). However, a technical approach consists into first considering the convexified problem, i.e., solve the problem with $\alpha$ taking values in the whole interval $[0, 1]$, for which the existence of solutions is guaranteed (see for instance [21]). Then, the optimal solution can be approached with an arbitrary precision via chattering controls [22], which consist in commuting rapidly between the values 0 and 1 so that the averaged dynamics behave close from that one with $\alpha$ different from 0 and 1.

We shall use the Maximum Principle of Pontryagin (PMP) [19] to obtain necessary optimality conditions. Defining the Hamiltonian

$$H(x, p, \alpha) = p_1\mu_1(c - x_1 - x_2)x_1 + (p_2 + 1)\mu_2(c - x_1 - x_2)x_2 + (p_2 - p_1)(\alpha r_1 x_1 - (1 - \alpha)r_2 x_2), \quad (7)$$

where $p = (p_1, p_2)$ is the adjoint vector, the Pontryagin Maximum Principle claims that for any optimal solution, there exists an absolutely continuous function $p : [0, T] \to \mathbb{R}^2$ solution of the adjoint equation

$$\dot{p}(t) = -\partial_x H(x(t), p(t), \alpha(t)), \quad \text{a.e. } t \in [0, T] \quad (8)$$

with the terminal condition

$$p(T) = 0 \quad (9)$$

and an optimal control $\alpha^*$ that satisfy the maximization of the Hamiltonian

$$\bar{H}(x(t), p(t)) := \max_{\alpha} H(x(t), p(t), \alpha) = H(x(t), p(t), \alpha^*(t)), \quad \text{a.e. } t \in [0, T]. \quad (10)$$

In addition, the map $t \mapsto \bar{H}(x^*(t), p^*(t))$ is constant. Let

$$\phi(t) = p_2(t) - p_1(t) \quad (11)$$

be the switching function. From the maximization of the Hamiltonian, one gets the property for an optimal control

$$\alpha^*(t) = \begin{cases} 1 & \text{if } \phi(t) > 0, \\ 0 & \text{if } \phi(t) < 0, \end{cases} \quad \text{a.e. } t \ge 0 \text{ such that } \phi(t) \ne 0. \quad (12)$$

### 3. Sufficient condition for the absence of singular arc

In this section we give a sufficient condition under which any optimal solution of problem (5)-(6) does not admit singular arc. Recall that a singular arc is a piece of an optimal trajectory for which the switching function $\phi$ given by (11) vanishes in an interval of time $[t_1, t_2]$, for some $t_2 > t_1 \ge 0$. In that case, the maximization of the Hamiltonian (7) over $[t_1, t_2]$ becomes more difficult to study and additional techniques need to be involved in order to solve the problem on $[t_1, t_2]$. Accordingly to Remark 1, we can guarantee in absence of singular arc that the optimal solution is reached with $\alpha$ taking only values 0 and 1 (even though the number of switches might be large or infinite).

Suppose that the growth rate functions satisfy the following assumption.

**Assumption 3.** There exists a positive real $a \ne 1$ such that $\mu_1(s) = a\mu_2(s)$, for $s \ge 0$.

Note that Assumption 3 is not unrealistic. Indeed, when the growth rates follow the Monod expression (3), the linear approximation
$$ \mu_i(s) \approx \frac{k_i}{K_i} s \quad (i = 1, 2) $$

151 is valid for relatively small values of s.

152

153

One has the following proposition.

154 **Proposition 1.** Suppose that Assumption 3 holds. An optimal solution of the problem (6)-(4) has no singular arc.

155

156

**Proof.** The adjoint equations are

$$ \begin{aligned} \dot{p}_1 &= -p_1\mu_1(s) + p_1\mu_1'(s)x_1 + (p_2+1)\mu_2'(s)x_2 - \alpha r_1(p_2-p_1) \\ \dot{p}_2 &= -(p_2+1)\mu_2(s) + p_1\mu_1'(s)x_1 + (p_2+1)\mu_2'(s)x_2 + (1-\alpha)r_2(p_2-p_1) \end{aligned} \quad (13) $$

157 with $s = c - x_1 - x_2$. If $\phi = 0$ on a time interval, one has $p_1 = p_2$ and $\dot{\phi} = 0$, which gives

$$ p_1 = a(p_2 + 1). $$

158

Therefore, $p_1, p_2$ have to be constant on this time interval, given by

$$ p_1 = p_2 = \frac{a}{1-a}. $$

159

Then, $\dot{p}_1 = \dot{p}_2 = 0$ gives the equations

$$ \begin{aligned} p_1\mu_1'(s)x_1 + (p_2+1)\mu_2'(s)x_2 &= p_1\mu_1(s) \\ p_1\mu_1'(s)x_1 + (p_2+1)\mu_2'(s)x_2 &= (p_2+1)\mu_2(s) \end{aligned} $$

160

from which we obtain that $p_1\mu_1(s) = (p_2+1)\mu_2(s)$. Replacing $p_1, p_2$ by their expression and using Assumption 3 we obtain that $a = 1$ and thus a contradiction. □

161

162

Thanks to Proposition 1, the optimal control of problem (5)-(6) is a sequence of commutation between $\alpha = 0$ and $\alpha = 1$.

163

164

4. Optimal synthesis with identical growth functions

165

We investigate here the simple case for which one can assume that the two sub-populations have exactly the same growth rate. Such an assumption might be considered quite unrealistic. However, it could happen that growth rates are indeed quite close to each other when the concentration $s$ is not too large, which could then justify this assumption as a good approximation.

166

167

168

169

170

**Proposition 2.** Consider the problem (6)-(5) and let $T > 0$. Assume that one has $\mu_1(s) = \mu_2(s) := \mu(s)$ for any $s > 0$. Then, the constant control $\alpha^* \equiv 1$ is optimal on $[0, T]$.

171

172

**Proof.** Let $b = x_1 + x_2$. Then $b(\cdot)$ is the solution of

$$ \dot{b} = \mu(c-b)b, \quad b(0) = x_1(0) + x_2(0) \quad (14) $$

173

whatever is the control $\alpha(\cdot)$. Then, the variable $X_2 = x_2/b$ is solution of

$$ \dot{X}_2 = \alpha r_1(1 - X_2) - (1 - \alpha)r_2X_2, \quad X_2(0) = x_2(0)/(x_1(0) + x_2(0)). \quad (15) $$

174

Note that at any time $t$, $\dot{X}_2$ is maximal for $\alpha = 1$, whatever is $X_2 \in [0, 1]$. Let $\bar{X}_2(\cdot)$ be the solution for the control $\alpha$ identically equal to 1. From standard results of comparison of solutions of scalar ordinary equations, one has $X_2(t) \le \bar{X}_2(t)$ at any $t$, whatever is the control $\alpha(\cdot)$. Therefore, one has

175

176

177
$$J[\alpha(\cdot)] = \int_{0}^{T} \mu(c - b(t))b(t)X_{2}(t)dt \leq \int_{0}^{T} \mu(c - b(t))b(t)\bar{X}_{2}(t)dt = J[1]$$

and we conclude that the constant control $\alpha^* = 1$ is optimal. □

Proposition 2 shows that, in the case of identical growth functions, the optimal strategy in order to maximize (6) is by keeping $\alpha$ constantly equal to one, i.e., by keeping an external potential sufficiently larger than $V_0$.

## 5. Optimal synthesis with constant growth functions

We consider here distinct growth rates, but that we assume to be constant for non-null concentration s.

**Assumption 4.** One has $\mu_i(s) = a_i > 0$ for any $s > 0$ ($i = 1, 2$).

Indeed, if one considers that population growths follows the classical Monod function (3) and that the concentration $s(0)$ is quite large, having $\mu_i(s) = a_i$ can be a good approximation on the finite time horizon $[0, T]$ (provided $T$ not to be too large).

The following definition will be useful in the following.

**Definition 1.** Denote $L = \frac{a_1}{a_2}$ and $K = \frac{r_1-a_1}{a_2}$ and define

$$\tilde{\phi}(p_2) = \begin{cases} \frac{K+L-K(L-1)p_2-(L+K)(p_2+1)^{-K}}{K(K+1)} & K \notin \{-1,0\} \\ (1-L)p_2+L\log(p_2+1) & K=0 \\ -L+L(p_2+1)+\log(p_2+1)(1-L) & K=-1 \end{cases} \quad (16)$$

Define also, when $L > 1$, the number

$$\bar{\tau} := \frac{\log(\inf\{p_2 > 0; \tilde{\phi}(p_2) < 0\} + 1)}{a_2}. \quad (17)$$

**Remark 2.** One can straightforwardly check that when $L > 1$ (that is when $a_1 > a_2$) one has

$$\lim_{p_2 \to +\infty} \tilde{\phi}(p_2) = -\infty$$

whatever is $K > -L$ (i.e. $r_1 > 0$). We deduce that $\bar{\tau}$ is well-defined.

On has the following result.

**Proposition 3.** Suppose that Assumption 4 holds. Consider the problem (6)-(5) and let $T > 0$. One has the following two cases:

• If $a_1 \le a_2$, then $\alpha^* = 1$ is optimal on $[0, T]$.

• If $a_1 > a_2$, then the control

$$\alpha^*(t) = \begin{cases} 1 & \text{if } t \ge \min(0, T - \bar{\tau}) \\ 0 & \text{otherwise} \end{cases}$$

is optimal on $[0, T]$.

**Proof.** The adjoint equations are written
$$ 
\begin{aligned}
\dot{p}_1 &= -a_1 p_1 - \alpha r_1 (p_2 - p_1) \\
\dot{p}_2 &= -a_2 (p_2 + 1) + (1 - \alpha) r_2 (p_2 - p_1)
\end{aligned}
\qquad (18) $$

Note that system (18) is decoupled from the dynamics of $x_1, x_2$ and can be studied independently to the initial condition $(x_1(0), x_2(0))$. The switching function satisfies

$$ \dot{\phi} = -a_2 + a_1 p_1 - a_2 p_2 + \phi(r_2 + \alpha(r_1 - r_2)). \qquad (19) $$

At terminal time $T$, one has $\phi(T) = 0$ with $\dot{\phi}(T) = -a_2 < 0$. So we conclude about the existence of the number

$$ \bar{t}_1 := \inf\{t > 0; \phi(\tau) > 0, \tau \in (t, T)\} $$

and the optimality of $\alpha = 1$ on the interval $[\bar{t}_1, T]$. On this interval, one has

$$ 
\begin{aligned}
\dot{p}_2 &= -a_2(p_2 + 1) \\
\dot{\phi} &= -a_2 + (a_1 - a_2)p_2 + (r_1 - a_1)\phi
\end{aligned}
\qquad (20) $$

Note that $p_2(T) = 0$ implies that one has necessarily $p_2 > 0$ on $[\bar{t}_1, T)$.

If $a_1 < a_2$, $\phi$ cannot cross 0 from below because $\phi = 0$ implies $\dot{\phi} < 0$. We deduce from (20) that $\phi$ is negative on $[\bar{t}_1, T)$, and thus $\bar{t}_1$ has to be equal to 0. We conclude that $\alpha^* = 1$ is optimal on $[0, T]$.

Consider now the case $a_1 > a_2$. Let us show that an optimal solution cannot present a singular arc, i.e. a time interval on which $\phi$ is identically null. If not, $\dot{\phi} = 0$ and $\phi = 0$ implies from equation (19) that $p_2$ has to be constant on such an interval with $p_2 = a_2/(a_1 - a_2) > 0$. But from equations (18) with $\dot{p}_2 = 0$ and $p_2 = p_1$, one obtains $p_2 = -1 < 0$, and thus a contradiction. We deduce that an optimal solution is a concatenation of arcs with $\alpha = 0$ or $\alpha = 1$. Note, from equation (19), that $\dot{\phi}$ is continuous at switching times (with $\dot{\phi} = -a_2 + (a_1 - a_2)p_2 = -a_2 + (a_1 - a_2)p_1$). If $\bar{t}_1 > 0$, we consider the number

$$ \bar{t}_0 := \inf\{t > 0; \phi(\tau) < 0, \tau \in (t, \bar{t}_1)\}. $$

On the interval $(\bar{t}_0, \bar{t}_1)$, $\alpha = 0$ is optimal and one has

$$ 
\begin{aligned}
\dot{p}_1 &= -a_1 p_1 \\
\dot{\phi} &= -a_2 + (a_1 - a_2)p_1 + (r_2 - a_2)\phi.
\end{aligned}
\qquad (21) $$

Note that one has $p_1(\bar{t}_1) = p_2(\bar{t}_1) > 0$, which implies $p_1(t) > p_1(\bar{t}_1)$ for $t \in [\bar{t}_0, \bar{t}_1)$. As $\phi$ changes its sign at $\bar{t}_1$ (from negative to positive values), one has necessarily $\dot{\phi}(\bar{t}_1) \ge 0$ (with $\phi(\bar{t}_1) = 0$). If $\bar{t}_0 > 0$, one should have $\phi(\bar{t}_0) = 0$ with $\dot{\phi}(\bar{t}_0) = -a_2 + (a_1 - a_2)p_1(\bar{t}_0) > -a_2 + (a_1 - a_2)p_1(\bar{t}_1) = \dot{\phi}(\bar{t}_1) \ge 0$, which contradicts the change of sign of $\phi$ at $\bar{t}_0$. We conclude that one has necessarily $\bar{t}_0 = 0$ and thus the optimal solution consists in at most one switch from $\alpha = 0$ to $\alpha = 1$.

Finally, let us consider the dynamics (20) in the backward time $\tau = T - t$:

$$ 
\begin{aligned}
\frac{dp_2}{d\tau} &= a_2(p_2 + 1), \quad p_2(0) = 0 \\
\frac{d\phi}{d\tau} &= a_2 - (a_1 - a_2)p_2 - (r_1 - a_1)\phi, \quad \phi(0) = 0.
\end{aligned}
\qquad (22) $$

Note that the map $\varphi: \tau \mapsto p_2(\tau)$ defines a diffeomorphism from $\mathbb{R}^+$ to $\mathbb{R}^+$. The solution $\phi$ can then be parameterized by $p_2$, as solution of the non-autonomous scalar differential equation

$$ \frac{d\tilde{\phi}}{dp_2} = 1 - L \frac{p_2}{p_2+1} - K \frac{\tilde{\phi}}{p_2+1}, \quad \tilde{\phi}(0) = 0, \qquad (23) $$
where L and K are given by Definition 1. The solution of (23) can be made explicit as given by (16). As it is underlined by Remark 2, when $L > 1$ (that is when $a_1 > a_2$) the number $\bar{\tau}$ is well-defined. Then, we have that $\phi(\bar{\tau}) = 0$ with $\phi(\tau) > 0$ for $\tau \in (0, \bar{\tau})$. Therefore, one gets $\bar{t}_1 = \max(0, T - \bar{\tau})$ and the control

232

$$ \alpha^*(t) = \begin{cases} 1 & \text{if } t \ge \min(0, T - \bar{\tau}) \\ 0 & \text{otherwise} \end{cases} $$

is optimal. □

233

**Remark 3.** Let us underline that when $\mu_i$ are constant functions, the optimal synthesis does not depend on the initial state. Also, it is worth noting that in this case the optimal control $\alpha^*$ does not depend on $r_2$, the migration rate constant from population $x_2$ to population $x_1$. This is clearly recognizable from the statement of Proposition 3 and Definition 1.

234

235

236

237

## 6. Numerical simulations and discussions

239

### 6.1. Constant growth rates

Let us consider system (5) where the growth rate functions follow Assumption 4 (constant values) with values given in table 1. In this case the switching time $\bar{\tau}$ introduced

241

<table><caption>Table 1: Numerical values of the different parameters: case of constant growth rates.</caption><thead><tr><th>a<sub>1</sub></th><th>a<sub>2</sub></th><th>r<sub>1</sub></th><th>r<sub>2</sub></th><th>Y<sub>1</sub></th><th>Y<sub>2</sub></th><th>T</th></tr></thead><tbody><tr><td>2</td><td>1/2</td><td>1</td><td>0.1 - 0.5</td><td>1</td><td>1</td><td>2</td></tr></tbody></table>

242

by equation (17) is given by $\bar{\tau} = \log(4)$ and the optimal control is given by

243

$$ \alpha^*(t) = \begin{cases} 1 & \text{if } t \ge \min(0, 2 - \log(4)) \\ 0 & \text{otherwise.} \end{cases} $$

<figure><img src="image_3.png" /><figcaption>**Figure 2.** Exact optimal control (top) and optimal control computed with Bocop (top) for $r_2 = 0.1$ (left) and $r_2 = 0.5$ (right).</figcaption></figure>
As underlined in Remark 2, the optimal control $a^*$ does not depend on the migration rate constant $r_2$. On Figure 2, we plot (with Matlab) the optimal control given by Proposition 3 together with the optimal trajectories in the two cases $r_2 = 0.1$ (bottom-left) and $r_2 = 0.5$ (bottom-right). As a verification, these plots are also compared with the ones obtained with Bocop [23], which is a numerical optimization software dedicated to optimal control problems (using direct method) on Figure 2 (top).

## 6.2. Monod growth rates

In this section, we consider system (5) with variable growth rate functions instead of constants ones, using the Monod expression (3).

<figure><img src="image_4.png" /><figcaption>**Figure 3.** Kinetic growth rates of Monod type.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>**Figure 4.** Optimal control computed with Bocop for $c = 100$ (top-left), $c = 30$ (top-right), $c = 20$ (bottom-left), and $c = 15$ (bottom-right).</figcaption></figure>

Using the numerical solver Bocop, we simulate the optimal control together with the optimal trajectories in similar conditions than before with model parameters given in Table 2, and for different values of initial control $c = s(0) + x_1(0) + x_2(0)$. Observe that, in this example, the growth kinetic functions $\mu_1$ and $\mu_2$ satisfy Assumption 3. Thus,
<table><caption>Table 2: Numerical values of the different parameters: case of Monod type growth rates (3).</caption><thead><tr><th>k<sub>1</sub></th><th>k<sub>2</sub></th><th>K<sub>s1</sub></th><th>K<sub>s2</sub></th><th>r<sub>1</sub></th><th>r<sub>2</sub></th><th>Y<sub>1</sub></th><th>Y<sub>2</sub></th><th>T</th></tr></thead><tbody><tr><td>2</td><td>1/2</td><td>1</td><td>1</td><td>1</td><td>0.1</td><td>1</td><td>1</td><td>2</td></tr></tbody></table>

thanks to Proposition 1, no singular arcs are present in this case. We observe in Figure 4 that the optimal trajectories have the same structure than for constant growth rates given by Proposition 3, but here the optimal switching time depends on the initial condition.

### 6.3. *Consequences for the control of electro-fermentation experiments*

We have proposed a model describing the effect of electro-fermentation on the metabolic profile of a fermentative bacteria in a batch culture. Fermentation and electro-fermentation behaviors ($f_1, f_2$), each gives rise to different products ($s_1, s_2$). The switching between the fermentation behaviors depends on the electrode potential $V$. As shown in Proposition 2, the optimal control strategy is trivial in the case where the electro-fermentation $f_2$ growth rate is higher or equal to the fermentation $f_1$ growth rate ($a_2 \ge a_1$). This indicates that in some experimental configurations a dynamic control is not necessary to optimize the system. For example, in the case of *Clostridium autoethanogenium* electro-fermentation with $[\text{Co}(\text{trans}-\text{diammac})]^{3+}$ as mediator reported by Kracke et al. [13], the electro-fermentation led to a 35-fold increase in lactate production but the growth rate was not significantly impacted. In that case the optimization of lactate production is straightforward and requires a constant polarization of the electrode at the electro-fermentation potential (-603 mV vs. Standard Hydrogen Electrode). However, in other cases the electro-fermentation growth rate is lower than the fermentation growth rate ($a_2 < a_1$). In those cases, the dynamic control strategy proposed in Proposition 3 would be required to optimize the production of the targeted product. This is the case, for example, for the electro-fermentation of glucose by *Clostridium pasteurianum* reported by Choi et al. [12]. In that case, they reported a 2.4-fold increase of butanol production associated with a 1.6-fold decrease in growth rate. Using values estimated in their experiments $a_1 = 0.41 \text{ h}^{-1}$ and $a_2 = 0.25 \text{ h}^{-1}$, and assuming a relatively high transition rate $r_1 = 1 \text{ h}^{-1}$ the switching time $\bar{\tau}$ is then calculated using equation (17): $\bar{\tau} \approx 5 \text{ h}$. This means that the optimal production of butanol would then be obtained with a first period of fermentation without polarization of the electrode followed by 5 h of electro-fermentation. In the experiment reported by Choi et al. [12], according to Figure 3, the fermentation starts after a 15 h lag phase and ends around 23 h. The optimal control would then correspond to polarizing the electrode at +45 mV vs. Standard Hydrogen Electrode after 18 h. This calculation also shows that the estimation of the true value of the transition rate $r_1$ would be crucial for such a control approach.

## 7. Conclusion and perspectives

We propose a model describing the metabolic switching holding in an electro-fermentation process within a pure batch culture. Based on this model, an optimal control problem is formulated in order to maximize the production of one of the rising fermentation products. The Pontryagin's Maximum Principle is applied for the analysis of the optimization problem. A preliminary result analyzing the behavior of the optimal control in the case of proportional growth functions is given. An optimal control is synthesised in two particular cases: similar and constant (but different) growth rate kinetics. The obtained results show that the optimal control strategy is far from being trivial, in the sense that undesirable metabolic pathways may be visited by the fermentative bacteria for the maximization of a desired fermentation product. Consequences of the obtained optimal strategy for driving electro-fermentation experiments are discussed through a realistic example. This study is elaborated under the hypothesis of identical yield factors. The optimality for the case of different yield factors with more general growth kinetics,
304 is an open problem, that will be explored in a near future. This theoretical approach

305 also underscores the importance of evaluating biological parameters such as transition

306 rates between fermentation mode and electro-fermentation mode for the application of

307 the optimal control. The proposed model as well as the optimal control law need to be

308 confronted with experimental data, and this will be the subject of future experimental

309 investigation within the LBE laboratory.

## References

1. Logan, B.E.; Rabaey, K. Conversion of Wastes into Bioelectricity and Chemicals by Using Microbial Electrochemical Technologies. *Science* **2012**, *337*, 686–690. doi:10.1126/science.1217412.

2. Rabaey, K.; Rozendal, R.A. Microbial electrosynthesis — revisiting the electrical route for microbial production. *Nature Reviews Microbiology* **2010**, *8*, 706–716.

3. Moscoviz, R.; Toledo-Alarcon, J.; Trably, E.; Bernet, N. Electro-Fermentation: How To Drive Fermentation Using Electrochemical Systems. *Trends in Biotechnology* **2016**, *34*, 856–865. doi:https://doi.org/10.1016/j.tibtech.2016.04.009.

4. Schievano, A.; Pepé Sciarria, T.; Vanbroekhoven, K.; De Wever, H.; Puig, S.; Andersen, S.J.; Rabaey, K.; Pant, D. Electro-Fermentation – Merging Electrochemistry with Fermentation in Industrial Applications. *Trends in Biotechnology* **2016**, *34*, 866–878. doi:10.1016/j.tibtech.2016.04.007.

5. Zhou, M.; Freguia, S.; Dennis, P.G.; Keller, J.; Rabaey, K. Development of bioelectrocatalytic activity stimulates mixed-culture reduction of glycerol in a bioelectrochemical system. *Microbial Biotechnology* **2015**, *8*, 483–489. doi:10.1111/1751-7915.12240.

6. Xafenias, N.; Anunobi, M.O.; Mapelli, V. Electrochemical startup increases 1,3-propanediol titers in mixed-culture glycerol fermentations. *Process Biochemistry* **2015**, *50*, 1499–1508. doi:10.1016/j.procbio.2015.06.020.

7. Moscoviz, R.; Trably, E.; Bernet, N. Electro-fermentation triggering population selection in mixed-culture glycerol fermentation. *Microbial Biotechnology* **2018**, *11*, 74–83. doi:https://doi.org/10.1111/1751-7915.12747.

8. Toledo-Alarcón, J.; Moscoviz, R.; Trably, E.; Bernet, N. Glucose electro-fermentation as main driver for efficient H2-producing bacteria selection in mixed cultures. *International Journal of Hydrogen Energy* **2019**, *44*, 2230–2238. doi:10.1016/j.ijhydene.2018.07.091.

9. Paiano, P.; Premier, G.; Guwy, A.; Kaur, A.; Michie, I.; Majone, M.; Villano, M. Simplified Reactor Design for Mixed Culture-Based Electrofermentation toward Butyric Acid Production. *Processes* **2021**, *9*, 417. doi:10.3390/pr9030417.

10. Emde, R.; Schink, B. Oxidation of glycerol, lactate, and propionate by Propionibacterium freudenreichii in a poised-potential amperometric culture system. *Archives of Microbiology* **1990**, *153*, 506–512. doi:10.1007/BF00248435.

11. Choi, O.; Um, Y.; Sang, B.I. Butyrate production enhancement by Clostridium tyrobutyricum using electron mediators and a cathodic electron donor. *Biotechnology and Bioengineering* **2012**, *109*, 2494–2502. doi:https://doi.org/10.1002/bit.24520.

12. Choi, O.; Kim, T.; Woo, H.M.; Um, Y. Electricity-driven metabolic shift through direct electron uptake by electroactive heterotroph Clostridiumpasteurianum. *Scientific Reports* **2015**, *4*, 6961. doi:10.1038/srep06961.

13. Kracke, F.; Virdis, B.; Bernhardt, P.V.; Rabaey, K.; Krömer, J.O. Redox dependent metabolic shift in Clostridium autoethanogenum by extracellular electron supply. *Biotechnology for Biofuels* **2016**, *9*.

14. Kim, M.Y.; Kim, C.; Ainala, S.K.; Bae, H.; Jeon, B.H.; Park, S.; Kim, J.R. Metabolic shift of Klebsiella pneumoniae L17 by electrode-based electron transfer using glycerol in a microbial fuel cell. *Bioelectrochemistry* **2019**, *125*, 1–7. doi:https://doi.org/10.1016/j.bioelechem.2018.08.002.

15. Engel, M.; Holtmann, D.; Ulber, R.; Tippkötter, N. Increased Biobutanol Production by Mediator-Less Electro-Fermentation. *Biotechnology Journal* **2019**, *14*, 1800514. doi:https://doi.org/10.1002/biot.201800514.

16. Zhang, Y.; Li, J.; Meng, J.; Sun, K.; Yan, H. A neutral red mediated electro-fermentation system of Clostridium beijerinckii for effective co-production of butanol and hydrogen. *Bioresource Technology* **2021**, *332*, 125097. doi:10.1016/j.biortech.2021.125097.

17. Harmand, J.; Lobry, C.; Rapaport, A.; Sari, T. Optimal Control in Bioprocesses: Pontryagin's Maximum Principle in Practice, Vol. 3, Chemical Engineering Series - Chemostat and Bioprocesses, Wiley, 2019; p. 244 p.

18. Smith, H.; Waltman, P. *The Theory of the Chemostat: Dynamics of Microbial Competition*; Cambridge University Press, 1995.

19. Pontryagin, L.; Boltyanski, V.; Gamkrelidze, R.; Michtchenko, E. *The Mathematical Theory of Optimal Processes*; The Macmillan Company, 1964.

20. Haidar, I.; Rapaport, A.; Gérard, F. Effects of spatial structure and diffusion on the performances of the chemostat. *Mathematical Biosciences and Engineering* **2011**, *8*, 953–971.

21. Lee, E.B.; Markus, L. *Foundations of optimal control theory*; John Wiley, 1967.

22. Zelikin, M.I.; Borisov, V.F. *Theory of Chattering Control: with applications to Astronautics, Robotics, Economics, and Engineering*; Systems & Control: Foundations & Applications, Birkhäuser, 1994.

23. Team Commands, I.S. BOCOP: an open source toolbox for optimal control. http://bocop.org, 2017.