*Article* **Best Operating Conditions for Biogas Production in Some Simple Anaerobic Digestion Models**

**Tewfik Sari**

ITAP, INRAE, Institut Agro, University of Montpellier, 34196 Montpellier, France; tewfik.sari@inrae.fr

**Abstract:** We consider one-step and two-step simple models of anaerobic digestion that are able to adequately capture the main dynamical behaviour of the full anaerobic digestion model ADM1. We do not consider specific growth functions. We only require them to satisfy certain qualitative assumptions. These assumptions are satisfied for concave growth functions, but they are also satisfied for a large class of growth functions found in many applications. We consider the maximisation of the biogas production with respect to the operating parameters of the model, which are the dilution rate and the substrate input concentration. We give the best operating conditions and we describe them as a subset of the set of operating parameters. Our models incorporate biomass decay terms, corresponding to maintenance. Numerical plots with specified growth functions and biological parameters illustrate the obtained results.

**Keywords:** anaerobic digestion; biogas; chemostat; maintenance; operating diagram; optimization; productivity; stability

**MSC:** 34D20; 34H20; 65K10; 92C75

#### **1. Introduction**

Anaerobic digestion (AD) is a well known and established technology for treating waste in the methanisation of sewage sludge from wastewater treatment plants. AD enables the water industry to treat waste water as a resource for generating energy and recovering valuable by-products. In the context of renewable energy, it has now become an attractive alternative to fossil carbon [1]. AD is a complex biological process in which organic material is converted into biogas (methane) in an environment without oxygen [2–6]. One of its main disadvantages is its sensitivity to disturbances, which can lead to instability problems, in addition to a decrease in the biogas production rate [7]. Indeed, the conditions and technological parameters characterising the methane fermentation process include many parameters: hydraulic retention time, organic loading rate, anaerobic sludge concentration in the bioreactor, substrate dewatering, organic matter content, substrate dosage, mixing method and frequency, temperature, and many others.

When the experimenter does not have a mechanistic mathematical model of the process being studied, one method for selecting the best conditions for biogas production is to carry out multi-variant tests and select the most efficient variants and then optimise them and develop a mathematical model. This first approach is presented in [8–10]. On the other hand, when the experimenter has a model of the process being studied and knows or has identified its biological parameters, a good way to optimise biogas production is to look for the optimal flow rate of the bioreactor that produces the most biogas. This approach is presented in [11–21]. Therefore, mechanistic mathematical models are a good basis for monitoring and developing control strategies to optimise the operation of such processes. The present paper is a contribution to this second approach to the problem: we assume that we know a mechanistic mathematical model of the process and that we have already identified its biological parameters, and then we look to the best operating conditions for biogas production.

**Citation:** Sari, T. Best Operating Conditions for Biogas Production in Some Simple Anaerobic Digestion Models. *Processes* **2022**, *10*, 258. https://doi.org/10.3390/pr10020258

Academic Editors: Philippe Bogaerts and Alain Vande Wouwer

Received: 22 December 2021 Accepted: 24 January 2022 Published: 28 January 2022

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

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

However, having a model of AD is not that easy. Indeed, the complexity of AD has motivated the development of mechanistic mathematical models, such as the widely used Anaerobic Digestion Model Model No. 1 (ADM1) [2]. This model has a large number of state variables and parameters. It is impossible to obtain an analytical characterization of the steady states and to describe the operating diagram (OD), that is to say, to identify the asymptotic behaviour of existing steady states as a function of the operating parameters (substrate inflow concentrations and dilution rate). To the author's knowledge, only numerical investigations are available [3]. Therefore, although ADM1 is a complex model that is widely accepted as a common platform for AD process modelling and simulation, it has a large number of parameters and states that hinder its analytic study. Due to the analytic intractability of the full ADM1, progress has been made towards the construction of simpler models that preserve biological meaning. The simplest model of the chemostat with only one biological reaction, where one substrate is consumed by one microorganism, is well understood [22–24]. However a one-step model is too simple to encapsulate the essence of AD.

More realistic models of AD are two-step models. An important contribution to the modelling of AD as a two-step is the model presented in [25], hereafter denoted as the AM2 model and studied in [15,26]. It has been shown that under some circumstances, this very simple two-step model is able to adequately capture the main dynamical behaviour of the full ADM1 [27,28]. AM2 is a four-dimensional system of ordinary differential equations and takes acidogenesis and methanogenesis into consideration. In the first step, the organic substrate is consumed by the acidogenic bacteria and produces a substrate, the Volatile Fatty Acids (VFA), while in the second step, the methanogenic population consumes VFA and produces biogas.

Another interesting simple AD model, with eight state variables, was considered in [21,29,30]. This model takes into consideration acidogenesis, acetogenesis, and methanogenesis. We also mention the mathematical model considered in [31], which also added the hydrolysis step in the model. It is also worth mentioning the models of AD that include the evolution of biogas and hydrogen [32–34].

The problem of optimising biogas production for one-step AD models is studied in [13,14] and for the AM2 model in [11,15–18]. This problem is also analysed in [21,31,35], where models with more steps for AD are considered.

The OD of a model has operating parameters as its coordinates, and the various regions defined within it correspond to qualitatively different asymptotic behaviours. The operating parameters are the input concentrations of substrates and the flow rate. We call them operating parameters, although they are not always under the control of the experimenter. Indeed, in most practical cases, one can at best store material upstream and control the flow rate. The concentration of the input substrate is rarely a control parameter. However, this parameter is known to the experimenter and is not of the same nature as the biological parameters, on which the experimenter can only act with great difficulty. In most of the results, we will assume that the input concentration of substrate is fixed, and we want to determine the corresponding optimal flow rate. Apart from the operating parameters, which can vary, all other parameters have biological meaning and are fitted using experimental data from ecological and/or biological observations of organisms and substrates. When the biological parameters are determined, it is then easy to plot the operating diagram and thus have a prediction of the behaviour of the system as a function of the operating parameters.

The OD is then the bifurcation diagram that shows how the system behaves when we vary the operating (control) parameters. This diagram shows how extensive the parameter region is, where some asymptotic behaviours occur. This bifurcation diagram is very useful to understand the model from both the mathematical and biological points of view. Its importance for bioreactors was emphasized in [36]. This diagram is often constructed both in the biological literature [15,29,35–38] and the mathematical literature [3,21,30,39–44].

In the present work, we consider the one-step model and the AM2 model, and we give the best operating conditions for biogas production, that is to say, we give the subset of the OD corresponding to the maximal flow rate of the biogas. This set of the best operating conditions in the OD indicates to the experimenter how to choose the operating condition such that the system produces the maximum of biogas. The surprising result for AM2 is that the optimal steady state can involve the extinction of the acidogenic bacteria [11]. This property was also observed for more complex models [21,31]. We address this problem and fully describe the operating conditions under which this situation is encountered. Another very important phenomenon, which was observed in [35], is that the best biogas produced is sometimes obtained for operating parameters for which the system has bistability. This issue is also addressed, and the set of operating parameters for which the system may be in such a situation is fully described.

The paper is organized as follows. In Section 2, we describe the one-step and two-step models of AD that are studied in this paper. We give the steady states of the models and their biogas flow rate or productivity. We state the problems of optimisation that will be considered later. The results for one-step models are given in Section 3.1. The particular case when the biomass mortality is neglected is considered in Section 3.1.8, and applications to various growth functions that were considered in the literature are given in Appendix A.5. The results for two-step models are listed in Section 3.2, and the applications of our theory to the classical AM2 model are emphasized in Section 3.2.4. We discuss and compare our results with the results of the existing literature in Section 3.3. Finally, Sections 4 and 5 draw some discussions, conclusions, and perspectives. The proofs and supplementary information are given in Appendixes A and B.

#### **2. Materials and Methods**

We consider a continuous stirred-tank reactor (CSTR), also called a bioreactor or a chemostat, where a single population of micro-organisms is growing on a single limiting substrate. We also consider the more complex situation where this population produces a substrate which is itself consumed by a second population. The limiting substrate is fed into the culture vessel with a constant concentration at flow rate *Q*. The culture medium is withdrawn at the same flow rate *Q* so that the culture volume *V* in the vessel is kept constant.

The dilution rate *D* is defined as *D* = *Q*/*V* and is the inverse of the residence time. We will take into account that the residence time of the liquid (culture medium) in the bioreactor may be shorter than that of the solids (micro-organisms), which is common in bioreactors.

We also take maintenance into account. Consumption of energy for all processes other than growth is called maintenance. In situations where microbial cells are located in a favourable environment, maintenance can often be neglected. In other situations, however, a significant portion of the energy-yielding substrate that could be used for growth is consumed for maintenance [45]. In the ADM1 model and also in some simple models of AD, maintenance is taken into account as decay [2,37,38,43,44].

It is assumed that the other required substrates are provided in excess, that the culture medium is perfectly mixed and that the environmental conditions (temperature and pH) are regulated at appropriate constant values.

#### *2.1. One-Step Models*

Although the one-step model is too simple to encapsulate the essence of AD, it is useful for the understanding of some basic facts concerning optimization of biogas in bioreactors. Consider a one-step model of the form:

$$kS \stackrel{r}{\longrightarrow} X + k\_1 \text{CH}\_4 \tag{1}$$

where one substrate *S* is consumed by one micro-organism *X* and produces biogas with reaction rate *r* = *μ*(*S*)*X*, where *μ* is the growth function and *k* and *k*<sup>1</sup> are pseudo-stoichiometric coefficients. Let *D* be the dilution rate and *Sin* the concentrations of input substrate. The dynamical equations of the model are [22–24,46,47]

$$\begin{array}{rcl} \dot{S} & = & D\left(\dot{S}^{in} - S\right) - k\mu(S)X\\ \dot{X} & = & (\mu(S) - D\_1)X \end{array} \tag{2}$$

where *D*1, the removal rate of the micro-organisms, takes the form

$$D\_1 = \mathfrak{a}D + a\_\prime \tag{3}$$

where *a* is the decay term corresponding to maintenance effects and *α* ∈ (0, 1] is a parameter allowing us to decouple the Hydraulic Retention Time, HRT = 1/*D* and the Solid Retention Time SRT = 1/(*αD*). The stoichiometric coefficient *k*<sup>1</sup> in (1) appears in the mathematical equations of the model when we consider the biogas flow rate; see Section 2.1.2. The stoichiometric coefficient *k* can be reduced to 1; see Appendix A.1. However, since the stoichiometric coefficient has its own importance for the biologist, and since our aim is to give the biologist a useful tool for the best operating conditions of the chemostat model, we do not make this reduction and we present the results in the original model (2). The mathematical analysis of (2) is well-known [22,24]. For the convenience of the reader, we recall in this paper the main results and state them using the OD; see Appendix A.2.

#### 2.1.1. Steady States

We assume that *μ* is not necessarily monotonic, i.e., that the inhibition by substrate *S* can be taken into account in the model. We make now the following hypothesis.

**Hypothesis 1.** *The function <sup>μ</sup> is* <sup>C</sup><sup>1</sup> *and satisfies <sup>μ</sup>*(0) <sup>=</sup> <sup>0</sup>*, and there exists <sup>S</sup><sup>m</sup>* <sup>∈</sup> (0, <sup>+</sup>∞]*, such that μ* (*S*) > 0 *for* 0 < *S* < *Sm. If Sm* < +∞*, then, in addition, μ* (*S*) < 0 *for S* > *Sm.*

The case *S<sup>m</sup>* = +∞ corresponds to an increasing function. This case is called the *Monod case*, since it is satisfied by the usual Monod growth function

$$
\mu(S) = \frac{wS}{K+S}.\tag{4}
$$

The case *S<sup>m</sup>* < +∞ corresponds to an increasing and then decreasing function and models the inhibition by the substrate at high concentrations. This case is called the *Haldane case*, since it is satisfied by the usual Haldane growth function

$$
\mu(S) = \frac{mS}{\mathcal{K} + \mathcal{S} + \mathcal{S}^2 / \mathcal{K}\_i}.\tag{5}
$$

We need to define the break-even concentrations:

**Definition 1.** *When S<sup>m</sup>* = +∞*, the break-even concentration λ*(*D*) *is the unique solution of equation μ*(*S*) = *D. It is defined for D* < *μ*(+∞)*. When S<sup>m</sup>* < +∞*, there can be two breakeven concentrations λ*(*D*) *and λ*¯(*D*)*. They are the solutions of equation μ*(*S*) = *D, such that λ*(*D*) < *S<sup>m</sup>* < *λ*¯(*D*)*. The first one is defined for* 0 < *D* < *μ*(*Sm*)*. The second one is defined for μ*(+∞) < *D* < *μ*(*Sm*)*. They have the same limit value λ*(*Dm*) = *λ*¯(*Dm*) *for D<sup>m</sup>* = *μ*(*Sm*)*. If D* > *μ*(*Sm*)*, by convention we let λ*(*D*)=+∞ *and λ*¯(*D*)=+∞*.*

Besides the washout steady state *F*<sup>0</sup> = (*Sin*, 0), (2) has the positive steady states

$$F\_1 = \left(\lambda(D\_1), \frac{D}{kD\_1} \left(S^{in} - \lambda(D\_1)\right)\right), \qquad F\_2 = \left(\bar{\lambda}(D\_1), \frac{D}{kD\_1} \left(S^{in} - \bar{\lambda}(D\_1)\right)\right). \tag{6}$$

When *S<sup>m</sup>* = +∞, only *F*<sup>1</sup> exists. The conditions of existence an stability of the steady state, together with the OD of (2), are given in Appendix A.2. Note that *F*<sup>1</sup> is stable whenever its exists, while *F*<sup>2</sup> is unstable whenever its exists.

#### 2.1.2. Steady State Optimization of Biogas Production

The biogas is simply a product of the biological reactions and it has no feedback on the dynamical Equation (2). The biogas flow rate, denoted by *G*CH4 , is proportional to the microbial activity, as proposed in [46,48–50]:

$$G\_{\rm CIH\_4} = k\_1 \mu(S^\*) X^\* \tag{7}$$

where (*S*∗, *X*∗) is a steady state of (2). Let us denote by *Gi*, the rate of production of biogas, defined by (7), and evaluated at steady state *Fi*, *i* = 0, 1, 2. One has *G*<sup>0</sup> = 0, and using the components of the steady states *F*<sup>1</sup> and *F*<sup>2</sup> given in (6), *G*<sup>1</sup> and *G*<sup>2</sup> are given by

$$\begin{aligned} \mathcal{G}\_1(D, S^{in}) &= \frac{k\_1}{k} D (S^{in} - \lambda (aD + a)) \quad \text{for} \quad S^{in} \ge \lambda (aD + a), \\ \mathcal{G}\_2(D, S^{in}) &= \frac{k\_1}{k} D (S^{in} - \bar{\lambda} (aD + a)) \quad \text{for} \quad S^{in} \ge \bar{\lambda} (aD + a). \end{aligned} \tag{8}$$

Our aim is to determine the set of operating conditions for which the biogas production is maximal. We consider the biogas flow rate *G*<sup>2</sup> corresponding to the unstable equilibrium *F*<sup>2</sup> because we do not know if this flow rate is always lower than that of the stable equilibrium *F*1. If it was possible that, for some operating condition *D* and *Sin*, *G*2 - *D*, *Sin* > *G*<sup>1</sup> - *D*, *Sin* , then the problem of the stabilization of the reactor at its unstable steady state *F*<sup>2</sup> by using some feedback control would have been an interesting challenge. However, this possibility is excluded, as stated in the following remark.

**Remark 1.** *Note that <sup>G</sup>*<sup>2</sup> *is defined if and only if <sup>S</sup>in* <sup>≥</sup> *<sup>λ</sup>*¯(*α<sup>D</sup>* <sup>+</sup> *<sup>a</sup>*)*. Since <sup>λ</sup>*¯(*α<sup>D</sup>* <sup>+</sup> *<sup>a</sup>*) <sup>&</sup>gt; *<sup>λ</sup>*(*α<sup>D</sup>* <sup>+</sup> *a*)*, G*<sup>1</sup> *is also defined and we have G*1(*D*, *Sin*) > *G*2(*D*, *Sin*)*.*

Hence, the operating conditions *D* and *Sin* which produce the maximum of biogas are obtained by the maximization of *G*<sup>1</sup> - *D*, *Sin* .

#### **Problem 1.** *Determine the set of operating conditions for which G*<sup>1</sup> *is maximal.*

#### 2.1.3. Steady State Optimization of Biomass Production

AD is used because it allows material to be degraded without producing too much biomass, which is a good thing because in the environmental field we do not really know what to do with the sludge produced. If we want to produce biomass, it is rather in biotechnologies such as pharmaceuticals or food processing that we should be looking. Let us forget about AD for a moment and assume that the industrial goal of the process is the production of micro-organisms. When a continuous culture system is viewed as a production process, its performance may be judged by the quantity of bacteria produced, which is called the productivity of biomass. The total output from a continuous culture unit in the steady state is equal to the product of flow rate and concentration of organisms. Therefore, the productivity of (2) at steady state (*S*∗, *X*∗) is given by [20,47]

$$P = QX^\* \tag{9}$$

where *Q* = *VD* is the flow rate, and *V* is the volume of the CSTR. Let us denote by *Pi*, the productivity evaluated at steady state *Fi*, *i* = 0, 1, 2. One has *P*<sup>0</sup> = 0 and using the components of the steady states *F*<sup>1</sup> and *F*2, given in (6), *P*<sup>1</sup> and *P*<sup>2</sup> are given by

$$\begin{array}{ll} P\_1 \left( D\_\prime S^{in} \right) = \frac{VD^2}{k(aD + a)} \left( S^{in} - \lambda (aD + a) \right) \quad \text{for} \quad S^{in} \ge \lambda (aD + a),\\ P\_2 \left( D\_\prime S^{in} \right) = \frac{VD^2}{k(aD + a)} \left( S^{in} - \lambda (aD + a) \right) \quad \text{for} \quad S^{in} \ge \lambda (aD + a). \end{array} \tag{10}$$

Our aim is to determine the set of operating conditions for which the productivity is maximal. Note that, as for the biogas flow rate, the productivity at *F*<sup>1</sup> is greater the the productivity at *F*2: *P*1(*D*, *Sin*) > *P*2(*D*, *Sin*). Hence, the operating conditions *D* and *Sin* that maximize productivity are obtained by maximizing *P*<sup>1</sup> - *D*, *Sin* .

**Problem 2.** *Determine the set of operating conditions for which P*<sup>1</sup> *is maximal.*

#### 2.1.4. The Case without Mortality

Note that when *a* = 0, we have

$$\begin{array}{ll} G\_1(D, S^{in}) = \frac{k\_1}{k} D \left( S^{in} - \lambda \left( aD \right) \right), & G\_2(D, S^{in}) = \frac{k\_1}{k} D \left( S^{in} - \bar{\lambda} \left( aD \right) \right), \\ P\_1 \left( D, S^{in} \right) = \frac{V}{ka} D \left( S^{in} - \lambda \left( aD \right) \right), & P\_2 \left( D, S^{in} \right) = \frac{V}{ka} D \left( S^{in} - \bar{\lambda} \left( aD \right) \right). \end{array}$$

Therefore, *Gi* and *Pi*, *i* = 1, 2 are proportional. Hence, we can make the following remark.

**Remark 2.** *When a* = 0*, optimizing P*1*, given by* (10)*, is the same as optimizing G*1*, given by* (8)*; that is, Problems 1 and 2 have the same solution. However, this is no longer true when a* > 0*.*

For increasing functions (i.e., *S<sup>m</sup>* = +∞), in the case *a* = 0, the equivalent Problems 1 and 2 have been solved in [51]; in the case *a* > 0, Problem 1 has been solved in [52] and Problem 2 in [53]. In Sections 3.1.1 and 3.1.5, we will give the solutions to these problems in the more general case where the growth function *μ* satisfies the Hypothesis 1 and is not necessarily monotonic.

#### *2.2. Two-Step Models*

We consider the general two-step model with a cascade of two biological reactions, where one substrate *S*<sup>1</sup> is consumed by one microorganism *X*<sup>1</sup> (*acidogenic* bacteria, in the AM2 model), to produce a product *S*<sup>2</sup> that serves as the main limiting substrate for a second microorganism *X*<sup>2</sup> (*methanogenic* bacteria in the AM2 model) as schematically represented by the following reaction scheme (see [25]):

$$k\_1 \mathcal{S}\_1 \stackrel{r\_1}{\longrightarrow} X\_1 + k\_2 \mathcal{S}\_2, \quad k\_3 \mathcal{S}\_2 \stackrel{r\_2}{\longrightarrow} X\_2 + k\_4 \mathcal{C} \mathcal{H}\_4 \tag{11}$$

where *r*<sup>1</sup> = *μ*1(*S*1)*X*<sup>1</sup> and *r*<sup>2</sup> = *μ*2(*S*2)*X*<sup>2</sup> are the kinetics of the reactions and *ki*, *i* = 1, ... , 4 are pseudo-stoichiometric coefficients. In fact, biological reactions also produce CO2; see Equations (1) and (2) in [25]. However, since in this section we are only interested in the biogas production, we do not focus on the CO2 production. Let *D* be the dilution rate and *Sin* <sup>1</sup> and *<sup>S</sup>in* <sup>2</sup> the concentrations of input substrates *S*<sup>1</sup> and *S*2, respectively. The dynamical equations of the model take the form:

$$\begin{array}{rcl} \dot{S}\_{1} &=& D\left(S\_{1}^{in} - S\_{1}\right) - k\_{1}\mu\_{1}(S\_{1})X\_{1\prime} \\ \dot{X}\_{1} &=& (\mu\_{1}(S\_{1}) - D\_{1})X\_{1\prime} \\ \dot{S}\_{2} &=& D\left(S\_{2}^{in} - S\_{2}\right) + k\_{2}\mu\_{1}(S\_{1})X\_{1} - k\_{3}\mu\_{2}(S\_{2})X\_{2\prime} \\ \dot{X}\_{2} &=& (\mu\_{2}(S\_{2}) - D\_{2})X\_{2\prime} \end{array} \tag{12}$$

where, as in (3), the removal rates of the micro-organisms *D*<sup>1</sup> and *D*<sup>2</sup> take the form

$$D\_i = a\_i D + a\_{i\prime} \quad \text{i} = 1\text{, } 2,\tag{13}$$

where *α<sup>i</sup>* ∈ (0, 1], *i* = 1, 2, is a parameter allowing us to decouple the HRT and the SRT. This decoupling is necessary when considering technology such as systems where biomass is fixed onto supports (as in fixed or fluidized bed reactors) or still retained in the system by membranes such as in MBRs (Membrane Bioreactors); see [54,55]. The model (12) is an

extension of the AM2 model presented in [25], with *α*<sup>1</sup> = *α*2, *a*<sup>1</sup> = *a*<sup>2</sup> = 0, and kinetics *μ*<sup>1</sup> and *μ*<sup>2</sup> of Monod and Haldane types, respectively.

The pseudo-stoichiometric coefficients *ki* in (12) can be reduced to 1; see Appendix B.1. However, since these coefficients have their own importance for the biologist and since our aim is to discuss the best operating conditions, we do not make this reduction and we present the results in the original model (12). The model has a cascade structure which renders its analysis easy. We give in Appendix B.3 the main results on the existence and stability of the steady states of (12), and we express them using the OD.

#### 2.2.1. Steady States

We consider (12) with general kinetics functions *μ*<sup>1</sup> and *μ*2, satisfying the following qualitative properties:

**Hypothesis 2.** *The function <sup>μ</sup>*<sup>1</sup> *is* <sup>C</sup>1*, <sup>μ</sup>*1(0) = <sup>0</sup>*, <sup>μ</sup>* <sup>1</sup>(*S*1) > 0 *for S*<sup>1</sup> > 0*. Let m*<sup>1</sup> = *μ*1(+∞)*.*

**Hypothesis 3.** *The function <sup>μ</sup>*<sup>2</sup> *is* <sup>C</sup>1*, <sup>μ</sup>*2(0) <sup>=</sup> <sup>0</sup>*, <sup>μ</sup>*2(+∞) = <sup>0</sup>*, and there exists <sup>S</sup><sup>m</sup>* <sup>2</sup> > 0 *such that μ* <sup>2</sup>(*S*2) > <sup>0</sup> *for* <sup>0</sup> < *<sup>S</sup>*<sup>2</sup> < *<sup>S</sup><sup>m</sup>* <sup>2</sup> *, and μ* <sup>2</sup>(*S*2) < <sup>0</sup> *for S*<sup>2</sup> > *<sup>S</sup><sup>m</sup>* 2 *.*

We consider the break-even concentrations as stated in Definition 1. The growth function *μ*<sup>1</sup> admits only one break-even concentration, denoted *λ*1, while the growth function *μ*<sup>2</sup> admits two break-even concentrations, which will be denoted *λ*<sup>2</sup> and *λ*¯ 2. We summarize in Table 1 the definitions of these break-even concentrations, together with two auxiliary functions that are used in the description of the biogas flow-rates at steady states of (12).

**Table 1.** Break-even concentrations and auxiliary functions.


The system (12) can have up to six steady states, denoted *Eij*, where *i* = 0, 1 and *j* = 0, 1, 2. The components of the steady states are given in Table A3. The existence and stability conditions of the steady states of (12) are given in Appendix B.3. Note that *E*<sup>11</sup> is stable whenever it exists, while *E*<sup>01</sup> is stable if and only if it exists and *E*<sup>11</sup> does not exist. Moreover the steady states *E*<sup>02</sup> and *E*<sup>12</sup> are unstable whenever they exist.

#### 2.2.2. Steady State Optimization of Biogas Production

As in the one-step model, the biogas is simply a product of the biological reactions and it has no feedback on the dynamical Equation (12). As we noticed in (7), the mass flow of the methane production, denoted by *G*CH4 , is proportional to the microbial activity (see Equation (12) in [25]):

$$G\_{\rm CH\_4} = k\_4 \mu\_2(S\_2) X\_2.1$$

Let us denote by *Gij* the production of biogas at steady states *Eij* for *i* = 0, 1 and *j* = 0, 1, 2. Using the components of the steady states given in Table A3, it is seen that *G*<sup>00</sup> = *G*<sup>10</sup> = 0 and *Gij* for *i* = 0, 1 and *j* = 1, 2 are defined as in Table 2.

**Biogas Production Domain of Definition** *<sup>G</sup>*01\$ *D*, *Sin* 2 % = *<sup>k</sup>*<sup>4</sup> *<sup>k</sup>*<sup>3</sup> *D* \$ *Sin* <sup>2</sup> − *λ*2(*D*2) % *<sup>λ</sup>*2(*D*2) <sup>≤</sup> *<sup>S</sup>in* 2 *<sup>G</sup>*02\$ *D*, *Sin* 2 % = *<sup>k</sup>*<sup>4</sup> *<sup>k</sup>*<sup>3</sup> *D* \$ *Sin* <sup>2</sup> <sup>−</sup> *<sup>λ</sup>*¯ <sup>2</sup>(*D*2) % *<sup>λ</sup>*¯ <sup>2</sup>(*D*2) <sup>≤</sup> *<sup>S</sup>in* 2 *<sup>G</sup>*11\$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % = *<sup>k</sup>*<sup>4</sup> *<sup>k</sup>*<sup>3</sup> *D* \$ *Sin* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* <sup>1</sup> − *H*1(*D*) % *<sup>λ</sup>*1(*D*1) <sup>≤</sup> *<sup>S</sup>in* <sup>1</sup> , *<sup>H</sup>*1(*D*) <sup>≤</sup> *<sup>S</sup>in* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* 1 *<sup>G</sup>*12\$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % = *<sup>k</sup>*<sup>4</sup> *<sup>k</sup>*<sup>3</sup> *D* \$ *Sin* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* <sup>1</sup> − *H*2(*D*) % *<sup>λ</sup>*1(*D*1) <sup>≤</sup> *<sup>S</sup>in* <sup>1</sup> , *<sup>H</sup>*2(*D*) <sup>≤</sup> *<sup>S</sup>in* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* 1

**Table 2.** The biogas production at steady state *Eij*, *i* = 0, 1, *j* = 1, 2; *λ*2(*D*), *λ*¯ <sup>2</sup>(*D*) and *Hj*(*D*), *j* = 1, 2, are defined in Table 1.

Our aim is to find set of operating conditions for which the flow rate of biogas is maximal.

**Remark 3.** *We always have G*<sup>01</sup> > *G*<sup>02</sup> *and G*<sup>11</sup> > *G*12*; see Section 3.2.1.*

Hence, the operating conditions *D*, *Sin* <sup>1</sup> , and *<sup>S</sup>in* <sup>2</sup> , which produce the maximum of biogas, are obtained by the maximization of *G*01- *D*, *Sin* 2 or *G*11- *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 . The main problem is then to compare the maximum of biogas production *G*<sup>11</sup> at *E*11, where both species are present, with the maximum of biogas production *G*<sup>01</sup> at *E*<sup>01</sup> where species *X*<sup>1</sup> is extinct and species *X*<sup>2</sup> is present. Surprisingly, the optimal biogas production does not always occur at *E*11, as was noticed by [11,21,31]. Therefore we have to solve the following problem.

**Problem 3.** *Determine the sets of operating conditions, for which G*<sup>01</sup> *and G*<sup>11</sup> *are maximal. Compare the maximum of G*<sup>01</sup> *to that of G*11*.*

#### **3. Results**

*3.1. One-Step Models*

The OD of the one-step model (2) is described in Appendix A.2.

#### 3.1.1. Best Operating Conditions for Biogas Production

Let *<sup>G</sup>*<sup>1</sup> defined by (8) and *<sup>S</sup>in* fixed. Our aim is to maximize the function *<sup>D</sup>* → *G*1(*D*, *Sin*). Note that this function is proportional to the function *G* defined by

$$G(D) = D(S^m - \lambda(aD + a)).\tag{14}$$

The function *<sup>G</sup>* is depending on the parameter *<sup>S</sup>in*. It is defined for *<sup>D</sup>* <sup>∈</sup> *<sup>I</sup>*(*Sin*), where the interval *I*(*Sin*) is given by

$$I(S^{in}) = \begin{cases} \left[0, \delta(S^{in})\right] & \text{if } S^{in} < S^{m} \\\ \left[0, \delta(S^{m})\right] & \text{if } S^{in} \ge S^{m} \end{cases} \quad \text{with} \quad \delta(S) = \frac{\mu(S) - a}{a} \tag{15}$$

The function *G*<sup>1</sup> has an absolute maximum if *G* has one and this maximum is reached at the same point where *G* reaches its maximum. By the *Extreme Value Theorem*, since *G* is continuous on the closed interval *I*(*Sin*), it must attain a maximum. Let us consider the set of arguments of the maximum of *G*, denoted by *g*(*Sin*) and defined by

$$\log(S^{\dot{m}}) = \underset{D \in I(S^{\dot{m}})}{\text{argmax}} \; G := \left\{ D^\* \in I(S^{\dot{m}}) : G(D) \le G(D^\*) \text{ for all } D \in I(S^{\dot{m}}) \right\}.\tag{16}$$

To obtain the maximum value of *G*(*D*), we differentiate (14) with respect to *D*, and we solve the equation *G* (*D*) = 0. The derivative of *G* is given by

$$G'(D) = \mathcal{S}^m - \gamma(D)$$

where *γ* is defined by

$$
\gamma(D) = \lambda(aD + a) + \mathfrak{a}D\lambda'(aD + a). \tag{17}
$$

**Remark 4.** *Since μ*(*λ*(*D*)) = *D, we have λ* (*D*) = 1/*μ* (*λ*(*D*))*. Therefore the function γ is written*

$$\gamma(D) = \lambda(aD + a) + \frac{aD}{\mu'(\lambda(aD + a))}.$$

We have the following result

**Proposition 1.** *Let D*<sup>∗</sup> <sup>∈</sup> *<sup>g</sup>*(*Sin*)*. We have Sin* <sup>=</sup> *<sup>γ</sup>*(*D*∗)*, where <sup>γ</sup> is defined by* (17)*.*

**Proof.** The proof is given in Appendix A.3.1.

Therefore, the curve

$$\Gamma = \left\{ (D, S^{in}) : S^{in} = \gamma(D) \right\} \tag{18}$$

of SOP contains the operating conditions for which *G*<sup>1</sup> is maximal.

In Figure 1, we plot the Γ curve in the OD of (2). We have shown a curve Γ, which is the graph of an increasing function. However, this does not always happen; see Appendix A.5.5. When Γ is not increasing, there may be several maxima of the biogas flow. In Section 3.1.3, we give sufficient conditions for the maximum to be unique. Since *λ* (*D*) > 0, we deduce that *γ*(*D*) > *λ*(*αD* + *a*) for *D* > 0. On the other hand,

$$\gamma(0) = \lambda(a), \quad \text{and} \quad \lim\_{D \to \delta(S^m)} \gamma(D) = +\infty.$$

From these properties we deduce the following remark.

**Figure 1.** The OD of (2). The curve Γ is the set of best operating conditions.

**Remark 5.** *If <sup>S</sup><sup>m</sup>* = +∞*, the curve* <sup>Γ</sup> *is contained in the region* <sup>J</sup><sup>1</sup> *(the green region) of the OD, see Figure 1a. If <sup>S</sup><sup>m</sup>* <sup>&</sup>lt; <sup>+</sup>∞*,* <sup>Γ</sup> *is contained in* <sup>J</sup><sup>1</sup> ∪ J<sup>2</sup> *(the green and pink regions), and, since μ* (*Sm*) = 0*, the vertical line* Λ<sup>1</sup> *is an asymptote of* Γ*, see Figure 1b. Note that in the Haldane case (S<sup>m</sup>* <sup>&</sup>lt; <sup>∞</sup>*), the curve* <sup>Γ</sup> *enters in the bistability region* <sup>J</sup><sup>2</sup> *at point* (*Dc*, *<sup>S</sup>c*)*.*

#### 3.1.2. How to Determine the Maximum of Biogas Production

From Proposition 1, to obtain *g*(*Sin*), we must solve the equation *Sin* = *γ*(*D*). However, this equation can be complicated to solve because *γ*(*D*) is itself defined by *λ*(*D*), which is the solution of the equation *μ*(*S*) = *D*. We have at our disposal another description of *g*(*Sin*). Indeed, we can write

$$G(D) = \frac{1}{a} H(\lambda(aD + a)),\tag{19}$$

where *H* is defined by

$$H(\mathcal{S}) = (\mu(\mathcal{S}) - a)(\mathcal{S}^{in} - \mathcal{S}), \quad \text{for} \quad \lambda(a) \le \mathcal{S} \le \mathcal{S}^{in} \tag{20}$$

From (19), it is deduced that the absolute maximum of *G* corresponds to the absolute maximum of *H* and vice versa. To obtain the maximum value of *H*(*S*), we differentiate *H* with respect to *S* and we solve the equation *H* (*S*) = 0. The derivative of *H* is given by

$$H'(S) = \mu'(S)(S^{\mathrm{in}} - S) - \mu(S) + a.s.$$

Hence, *H* (*S*) = 0 if and only if *Sin* = *η*(*S*), where *η*(*S*) is defined by

$$
\eta(S) = S + \frac{\mu(S) - a}{\mu'(S)} \quad \text{for} \quad S \ge \lambda(a). \tag{21}
$$

We have the following result.

**Proposition 2.** *Let <sup>S</sup>*<sup>∗</sup> *be the maximum of <sup>H</sup> on* (*λ*(*a*), *<sup>S</sup>in*)*. Let <sup>D</sup>*<sup>∗</sup> = *<sup>μ</sup>*(*S*∗)−*<sup>a</sup> <sup>α</sup> . Then D*<sup>∗</sup> ∈ *g*(*Sin*)*. Moreover, we have Sin* = *η*(*S*∗)*, where η is defined by* (21)*.*

**Proof.** The proof is given in Appendix A.3.2.

**Remark 6.** *With the first method, we must first solve the equation μ*(*S*) = *D to obtain λ*(*D*) *and then solve the equation <sup>γ</sup>*(*D*) = *<sup>S</sup>in to obtain the optimal <sup>D</sup>*<sup>∗</sup> <sup>∈</sup> *<sup>g</sup>*(*Sin*)*. With the second method, we simply solve the equation η*(*S*) = *Sin to get the maximum S*<sup>∗</sup> *and then take D*<sup>∗</sup> = *μ*(*S*∗)−*a <sup>α</sup>* <sup>∈</sup> *<sup>g</sup>*(*Sin*)*.*

#### 3.1.3. Uniqueness of the Maximum

Hypothesis 1 is not enough to guarantee that the biogas flow rate admits a unique global maximum; see Appendix A.5.5. We make the following hypothesis.

**Hypothesis 4.** *For all Sin* > 0*, g*(*Sin*)*, defined by* (16)*, has a unique element, which is denoted by D*∗ *<sup>G</sup>*(*Sin*)*.*

From Proposition 1 we deduce then the answer to Problem 1: assume that Hypotheses 1 and 4 are satisfied. Then, the set of best operating conditions for biogas production of (2) is the curve Γ of SOP defined by:

$$\Gamma = \left\{ (D, S^{\dot{m}}) : S^{\dot{m}} = \gamma(D) \right\} = \left\{ (D, S^{\dot{m}}) : D = D\_G^\*(S^{\dot{m}}) \right\}.\tag{22}$$

From Propositions 1 and 2, it is deduced that Hypothesis 4 is satisfied when the equations

$$S^{in} = \gamma(D) \quad \text{or} \quad S^{in} = \eta(S).$$

have a unique solution. A sufficient condition for this is that the functions *γ*(*D*) and *η*(*S*) are increasing. The following result gives sufficient conditions for Hypothesis 4 to be valid.

**Lemma 1.** *Assume that Hypothesis <sup>1</sup> is satisfied and, in addition, <sup>μ</sup> is* <sup>C</sup>2*. The following conditions are equivalent*

*1. <sup>γ</sup>* <sup>&</sup>gt; <sup>0</sup> *on* \$ 0, *<sup>μ</sup>*(*Sm*)−*<sup>a</sup> α* % *. 2.* (*μ* − *a*)*μ* < 2(*μ* ) <sup>2</sup> *on* (*λ*(*a*), *Sm*)*. 3.* \$ <sup>1</sup> *μ*−*a* % > 0 *on* (*λ*(*a*), *Sm*)*. 4. η* > 0 *on* (*λ*(*a*), *Sm*)*.*

*If these equivalent conditions are satisfied, then Hypothesis 4 is satisfied. If μ* < 0 *on* (*λ*(*a*), *Sm*)*, then the conditions are satisfied.*

#### **Proof.** The proof is given in Appendix A.3.3.

#### 3.1.4. Best Operating Conditions

We first analyse the Monod case (*S<sup>m</sup>* = ∞). We show in Figure 2 the set Γ of best operating conditions and we describe how to use this set to obtain practically the maximum of biogas production. Let *Sin* be fixed. The intersections of Γ and Λ with the horizontal line where *Sin* is kept constant define the values *D*<sup>∗</sup> *<sup>G</sup>*(*Sin*), defined in Hypothesis 4, and *<sup>δ</sup>*(*Sin*) = *<sup>μ</sup>*(*Sin*)−*<sup>a</sup> <sup>α</sup>* , defined by (15), see Figure 2a. The function *D* → *G*<sup>1</sup> - *D*, *Sin* is defined on [0, *δ*(*Sin*)] and attains its maximum *G*∗(*Sin*) for *D* = *D*<sup>∗</sup> *<sup>G</sup>*(*Sin*); see Figure 2b.

**Figure 2.** The best operating conditions of biogas flow rate for the Monod case. (**a**): The curve Γ in SOP shows the optimal value *D*∗ *<sup>G</sup>*(*Sin*). (**b**): The function *<sup>D</sup>* → *<sup>G</sup>*1(*D*, *<sup>S</sup>in*) is defined on [0, *<sup>δ</sup>*(*Sin*)], and attains its maximum, *G*∗(*Sin*), for *D* = *D*<sup>∗</sup> *<sup>G</sup>*(*Sin*).

In the Haldane case (*S<sup>m</sup>* < ∞), the description is a little more complicated. If *Sin* is fixed, the function *D* → *G*<sup>1</sup> - *D*, *Sin* attains its maximum *G*<sup>∗</sup> <sup>1</sup> (*Sin*) for *<sup>D</sup>* = *<sup>D</sup>*<sup>∗</sup> *<sup>G</sup>*(*Sin*), obtained by taking the intersection of Γ with the horizontal line where *Sin* is kept constant, as it is seen in Figure 3. However, there exist two threshold values *S<sup>c</sup>* and *Sm*, depicted in Figure 1b. If *<sup>S</sup>in* <sup>≤</sup> *<sup>S</sup>m*, only *<sup>G</sup>*<sup>1</sup> is defined (see Figure 3a) while *<sup>G</sup>*<sup>1</sup> and *<sup>G</sup>*<sup>2</sup> are both defined when *Sin* > *S<sup>m</sup>* (see Figure 3b,c). On the other hand, if *Sin* > *Sc*, then the dilution rate *D*∗ *G* - *Sin* , which maximises biogas production, corresponds to the bistability mode of the chemostat; see Figure 3c. More precisely, we make the following remark.

**Remark 7.** *Assume that Hypotheses 1 and 4 hold. Let D* = *D<sup>c</sup> be the unique solution to equation γ*(*D*) = *λ*¯(*αD* + *a*)*. Let S<sup>c</sup>* = *γ*(*Dc*)*.*


Indeed, since *γ* is increasing and *λ*¯ is decreasing, curves Γ and Λ<sup>2</sup> have a unique intersection point (*Dc*, *Sc*); see Figure 1b. The OD shows that if *Sin* < *S<sup>c</sup>* then - *D*∗ *<sup>G</sup>*(*Sin*), *<sup>S</sup>in* ∈ J1, that is to say, the best operating conditions are in the green region J1, where *F*<sup>1</sup> is GAS and if *Sin* > *Sc*, then - *D*∗ *<sup>G</sup>*(*Sin*), *<sup>S</sup>in* ∈ J2; that is to say, the best operating conditions are in the pink region J<sup>2</sup> of bistability of *F*<sup>0</sup> and *F*1.

**Figure 3.** The set of best operating conditions Γ (in red) shows the optimal dilution rate *D*∗ *<sup>G</sup>*(*Sin*) corresponding to three typical values of *Sin*.

Figure 3 shows three typical values of *Sin* and the corresponding optimal dilution rates *D*∗ *<sup>G</sup>*(*Sin*). The corresponding biogas productions are depicted in the same figure. The main results are summarized as follows:


#### 3.1.5. Best Operating Conditions for Biomass Production

Let *<sup>P</sup>*<sup>1</sup> be defined by (10) and *<sup>S</sup>in* fixed. Our aim is to maximise the function *<sup>D</sup>* → *<sup>P</sup>*1(*D*, *<sup>S</sup>in*). Note that this function is proportional to the function *<sup>P</sup>* : *<sup>D</sup>* → *<sup>p</sup>*(*D*) defined by

$$P(D) = \frac{D^2}{aD + a} \left( S^{in} - \lambda (aD + a) \right), \quad \text{for} \quad D \in I(S^{in}) \tag{23}$$

where *I*(*Sin*) is defined by (15). Therefore *P*<sup>1</sup> has an absolute maximum if *P* has one and this maximum is reached at the same point where *P* reaches its maximum. As in the case of the biogas flow rate, we consider the arguments of the maximum of *P*

$$p(S^{in}) = \underset{D \in I(S^{in})}{\text{argmax}} \; p := \left\{ D^\* \in I(S^{in}) : P(D) \le P(D^\*) \text{ for all } D \in I(S^{in}) \right\}.\tag{24}$$

To obtain the maximum value of *P*(*D*), we differentiate (23) with respect to *D*, and we solve the equation *P* (*D*) = 0. The derivative of *P* is given by

$$P'(D) = \frac{D(aD + 2a)}{(aD + a)^2} \left( S^{in} - \pi(D) \right)$$

where *π* is defined by

$$
\pi(D) = \lambda(aD + a) + \frac{aD(aD + a)}{aD + 2a} \lambda'(aD + a). \tag{25}
$$

**Remark 8.** *Using λ* (*D*) = 1/*μ* (*λ*(*D*))*, the function π can be written*

$$\pi(D) = \lambda(aD + a) + \frac{aD(aD + a)}{(aD + 2a)\mu'(\lambda(aD + a))}.$$

We have the following result

**Proposition 3.** *Let D*<sup>∗</sup> <sup>∈</sup> *<sup>p</sup>*(*Sin*)*. We have Sin* <sup>=</sup> *<sup>π</sup>*(*D*∗)*, where <sup>π</sup> is defined by* (25)*.*

**Proof.** The proof is given in Appendix A.4.1.

Therefore, the curve

$$\Pi = \left\{ (D\_\prime S^{in}) : S^{in} = \pi(D) \right\} \tag{26}$$

of SOP contains the operating conditions for which *P*<sup>1</sup> is maximal. In Figure 4, this set is shown in the OD depicted in Figure 1, together with the set Γ. Note that if *a* > 0, then

$$
\lambda \left( \mathfrak{a} D + \mathfrak{a} \right) < \pi(D) < \gamma(D). \tag{27}
$$

Therefore, curve Π is above curve Λ and below curve Γ; see Figure 4.

**Figure 4.** The curves Γ (in red) and Π (in blue).

3.1.6. How to Determine the Maximum of Biomass Production?

From Proposition 3, to obtain *p*(*Sin*) we must solve the equation *Sin* = *π*(*D*), which can be difficult to solve. We have at our disposal another description of *p*(*Sin*). We can write

$$P(D) = \frac{1}{a^2} Q(\lambda(aD + a)),\tag{28}$$

where *Q* is defined by

$$Q(S) = \frac{(\mu(S) - a)^2}{\mu(S)}(S^{in} - S), \quad \text{for} \quad \lambda(a) \le S \le S^{in} \tag{29}$$

From (28), it is deduced that the absolute maximum of *P* corresponds to the absolute maximum of *Q* and vice versa. To obtain the maximum value of *Q*(*S*), we differentiate *Q* with respect to *S*, and we solve the equation *Q* (*S*) = 0. The derivative of *Q* is given by

$$Q'(S) = \frac{(\mu(S) - a)(\mu(S) + a)\mu'(S)}{(\mu(S))^2} \left(S^{in} - S\right) - \frac{(\mu(S) - a)^2}{\mu(S)}I$$

Hence, *Q* (*S*) = 0 if and only if *Sin* = *ρ*(*S*), where *ρ*(*S*) is defined by

$$\rho(S) = S + \frac{(\mu(S) - a)\mu(S)}{(\mu(S) + a)\mu'(S)}, \quad \text{for} \quad S \ge \lambda(a). \tag{30}$$

More precisely, we have the following result.

**Proposition 4.** *Let <sup>S</sup>*<sup>∗</sup> *be the maximum of <sup>p</sup> on* (*λ*(*a*), *<sup>S</sup>in*)*. Then <sup>D</sup>*<sup>∗</sup> = *<sup>μ</sup>*(*S*∗)−*<sup>a</sup> <sup>α</sup> . We have <sup>D</sup>*<sup>∗</sup> <sup>∈</sup> *<sup>p</sup>*(*Sin*)*. Moreover, we have Sin* <sup>=</sup> *<sup>ρ</sup>*(*S*∗)*, where <sup>ρ</sup> is defined by* (30)*.*

**Proof.** The proof is given in Appendix A.4.2.

**Remark 9.** *With the first method we must first solve the equation μ*(*S*) = *D to obtain λ*(*D*)*, and then solve the equation <sup>π</sup>*(*D*) = *<sup>S</sup>in to obtain the optimal <sup>D</sup>*<sup>∗</sup> <sup>∈</sup> *<sup>p</sup>*(*Sin*)*. With the second method, we simply solve the equation ρ*(*S*) = *Sin to get the maximum S*<sup>∗</sup> *and then take D*<sup>∗</sup> = *μ*(*S*∗)−*a <sup>α</sup>* <sup>∈</sup> *<sup>p</sup>*(*Sin*)*.*

3.1.7. Uniqueness of the Maximum

Hypothesis 1 is not enough to guarantee that the biomass productivity admits a unique global maximum; see Appendix A.5.5. We make the following hypothesis.

**Hypothesis 5.** *For all Sin* > 0*, p*(*Sin*)*, defined by* (24)*, has a unique element, which is denoted by D*∗ *<sup>P</sup>*(*Sin*)*.*

From Proposition 3, we obtain the answer to Problem 2: Assume that Hypotheses 1 and 5 hold. Then, the set of best operating conditions for the productivity of (2) is the curve Π of SOP defined by:

$$\Pi = \left\{ (D, S^{\dot{m}}) : S^{\dot{m}} = \pi(D) \right\} = \left\{ (D, S^{\dot{m}}) : D = D\_P^\star(S^{\dot{m}}) \right\}.\tag{31}$$

From (27), we deduce that if *a* > 0, then *D*∗ *<sup>G</sup>*(*Sin*) < *<sup>D</sup>*<sup>∗</sup> *<sup>P</sup>*(*Sin*); see Figure 4.

From Propositions 3 and 4, it is deduced that the uniqueness of *D*∗ *<sup>P</sup>*(*Sin*) is guaranteed when the equations

$$S^{in} = \pi(D) \quad \text{or} \quad S^{in} = \rho(S)$$

have a unique solution. A sufficient condition for this is that the functions *π*(*D*) and *ρ*(*S*) are increasing. The following result gives sufficient conditions for Hypothesis 5 to be valid.

**Lemma 2.** *Assume that Hypothesis <sup>1</sup> is satisfied and, in addition, <sup>μ</sup> is* <sup>C</sup>2*. The following conditions are equivalent*

$$\begin{array}{ll} 1. & \pi' > 0 \text{ on } \left(0, \frac{\mu(S^{\mathfrak{m}}) - a}{\mathfrak{a}}\right). \\ 2. & \frac{\left(\mu - a\right)\left(\mu + a\right)}{\mu + 2a} \mu^{\prime \prime} < 2\left(\mu^{\prime}\right)^{2} \text{ on } \left(\lambda\left(a\right), S^{\mathfrak{m}}\right). \\ 3. & \rho^{\prime} > 0 \text{ on } \left(\lambda\left(a\right), S^{\mathfrak{m}}\right). \end{array}$$

*If these equivalent conditions are satisfied, then Hypothesis 5 is satisfied. If μ* < 0 *on* (*λ*(*a*), *Sm*) *or* \$ <sup>1</sup> *μ*−*a* % > 0 *on* (*λ*(*a*), *Sm*)*, then the conditions are satisfied.*

**Proof.** The proof is given in Appendix A.4.3.

#### 3.1.8. The Case without Mortality

The functions *γ*, *H*, and *η*, defined by (17), (20), and (21), respectively, that were used for the optimization of the biogas flow rate *G* are summarized in Table 3. Note that the functions *G* and *H* are related by formula (19). Similarly, the functions *π*, *Q*, and *ρ*, defined by (25), (29) and (30), respectively, which were used for the optimization of the productivity *P*, are summarized in Table 3. Note that the functions *P* and *Q* are related by formula (28).

**Table 3.** The functions *γ*, *H* and *η* used for the optimization of the biogas flow rate *G*. The functions *π*, *Q* and *ρ* used for the optimization of the productivity *P*. Note that *G*(*D*) = <sup>1</sup> *<sup>α</sup> H*(*λ*(*αD* + *a*)) and *P*(*D*) = <sup>1</sup> *<sup>α</sup> Q*(*λ*(*αD* + *a*)).


Table 3 shows that in the case without mortality, one has *G* = *αP*, *γ* = *π*, *H* = *Q*, and *η* = *ρ*. Hence, if *a* = 0, we have *D*∗ *<sup>G</sup>*(*Sin*) = *<sup>D</sup>*<sup>∗</sup> *<sup>P</sup>*(*Sin*). In the following, this value is referred to as *D*∗(*Sin*). Therefore, for the optimization of the biogas flow rate or the productivity of the biomass, a first method consists in solving the equation

$$
\lambda(\mathfrak{a}D) + \mathfrak{a}D\lambda'(\mathfrak{a}D) = \mathbb{S}^{in}.
$$

to obtain the optimal value of the dilution rate *D*∗(*Sin*). The second method consists in solving the equation

$$
\eta(S) = S^{in}, \quad \text{where} \quad \eta(S) := S + \frac{\mu(S)}{\mu'(S)} \tag{32}
$$

to get the maximum *S*∗(*Sin*) and then take *D*∗(*Sin*) = <sup>1</sup> *αμ* - *S*∗(*Sin*) . Hence, without loss of generality, one can put *α* = 1 and solve Equation (32) or equation

$$
\gamma(D) = S^{\text{in}}, \quad \text{where} \quad \gamma(D) := \lambda(D) + D\lambda'(D). \tag{33}
$$

The results of Lemmas 1 and 2 become the same in the case that *a* = 0. We summarize them below, in this special case.

**Lemma 3.** *Assume that Hypothesis <sup>1</sup> is satisfied and, in addition <sup>μ</sup> is* <sup>C</sup>2*. The following conditions are equivalent*


*If these equivalent conditions are satisfied, then each of Equations* (32) *and* (33) *has a unique solution; i.e., Hypothesis 4 is satisfied. If μ* < 0 *on* (0, *Sm*)*, then the conditions are satisfied.*

In Appendix A.5, we apply the preceding results to various growth functions that were considered in the literature.

#### *3.2. Two-Step Models*

The steady state and their stability of the two-step model (12) are given in Appendix B.2, and the OD is described in Appendix B.3.

3.2.1. Comparison of Biogas Flow Rates

Recall that *E*<sup>11</sup> is stable whenever it exists; *E*<sup>01</sup> can be stable but is unstable whenever *E*<sup>11</sup> exists, and *E*<sup>02</sup> and *E*<sup>12</sup> are unstable whenever they exist. Is it possible that for some operating condition *D*, *Sin* <sup>1</sup> , and *<sup>S</sup>in* <sup>2</sup> , the biogas production at an unstable steady state is greater than at a stable one? This possibility is excluded, as is stated in the following result.

#### **Proposition 5.**


**Proof.** The proof is given in Appendix B.5.1.

This result shows that *G*<sup>01</sup> > *G*<sup>02</sup> and *G*<sup>11</sup> > *G*12, which justifies Remark 3. Therefore, in Problem 3, we can restrict our attention to the maximisation of *G*<sup>01</sup> and *G*11. The result also shows that when *E*<sup>11</sup> and *E*<sup>01</sup> are both defined, then we have *G*<sup>11</sup> > *G*01. Table A6 shows that both *E*<sup>11</sup> and *E*<sup>01</sup> exist simultaneously only in regions I6, I7, and I8, and that in this case *E*<sup>11</sup> is stable while *E*<sup>01</sup> is unstable. However, it is possible for one to be defined without the other being defined, as shown in Table A6. Indeed, in the regions I<sup>1</sup> and I2, *E*<sup>01</sup> exists and is stable, while *E*<sup>11</sup> does not exist and in the regions I<sup>4</sup> and I5, *E*<sup>11</sup> exists and is stable, while *E*<sup>01</sup> does not exist. Therefore, the maximum of *G*<sup>11</sup> and *G*<sup>01</sup> can be obtained for different values of the dilution rate *D*, and the last part of Problem 3 is to fix *Sin* <sup>1</sup> and *<sup>S</sup>in* 2 and compare

$$\max\_{D} G\_{01}(D\_{\prime}S\_{2}^{in}) \quad \text{and} \quad \max\_{D} G\_{11}(D\_{\prime}S\_{1}^{in}, S\_{2}^{in}) .$$

3.2.2. Best Operating Conditions for *G*<sup>01</sup> and *G*<sup>11</sup>

Let us fix the operating parameters *Sin* <sup>1</sup> and *<sup>S</sup>in* <sup>2</sup> . We restrict our attention to the case *a*<sup>1</sup> = *a*<sup>2</sup> = 0 and *α*<sup>1</sup> = *α*<sup>2</sup> = *α*, which was considered in [11]. The general case can be considered without added difficulty. Our aim is to compute the values of *D* for which the functions

> *<sup>D</sup>* → *<sup>G</sup>*01- *D*, *Sin* 2 and *<sup>D</sup>* → *<sup>G</sup>*11- *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2

reach their maxima. These functions are proportional to the functions

$$\mathcal{G}\_{\mathbb{O}}(D) = D \left( \mathcal{S}\_2^{in} - \lambda\_2(aD) \right) \tag{34}$$

$$G\_1(D) = D\left(S\_2^{in} + \frac{k\_2}{k\_1}S\_1^{in} - \lambda\_2(aD) - \frac{k\_2}{k\_1}\lambda\_1(aD)\right) \tag{35}$$

respectively, where *λ*<sup>1</sup> and *λ*<sup>2</sup> are defined in Table 1. Therefore, *G*<sup>01</sup> has an absolute maximum if *G*<sup>0</sup> has one, and this maximum is reached at the same point where *G*<sup>0</sup> reaches its maximum. Similarly, *G*<sup>11</sup> has an absolute maximum if *G*<sup>1</sup> has one, and this maximum is reached at the same point where *G*<sup>1</sup> reaches its maximum. To obtain the maximum of *G*0, we differentiate *G*<sup>0</sup> with respect to *D*. The derivative is given by

$$G\_0'(D) = S\_2^{in} - \gamma\_2(aD)$$

where *γ*<sup>2</sup> is defined by

$$
\gamma\_2(D) = \lambda\_2(D) + D\lambda\_2'(D). \tag{36}
$$

Similarly, the derivative of *G*<sup>1</sup> is given by

$$G\_1'(D) = S\_2^{in} - \gamma\_2(aD) + \frac{k\_2}{k\_1} \left( S\_1^{in} - \gamma\_1(aD) \right)$$

where *γ*<sup>1</sup> is defined by

$$
\gamma\_1(D) = \lambda\_1(D) + D\lambda\_1'(D). \tag{37}
$$

**Remark 10.** *Using λ* <sup>1</sup>(*D*) = 1/*μ* <sup>1</sup>(*λ*1(*D*)) *and λ* <sup>2</sup>(*D*) = 1/*μ* <sup>2</sup>(*λ*2(*D*))*, the functions γ*<sup>2</sup> *and γ*<sup>1</sup> *can be written*

$$\gamma\_2(D) = \lambda\_2(D) + \frac{D}{\mu\_2^\*(\lambda\_2(D))'} , \quad \gamma\_1(D) = \lambda\_1(D) + \frac{D}{\mu\_1^\*(\lambda\_1(D))} .$$

We make the following assumptions:

**Hypothesis 6.** *The function <sup>γ</sup>*<sup>2</sup> : *<sup>I</sup>*<sup>2</sup> <sup>→</sup> (<sup>0</sup> <sup>+</sup> <sup>∞</sup>)*, defined on <sup>I</sup>*<sup>2</sup> = (0, *<sup>μ</sup>*2(*S<sup>m</sup>* <sup>2</sup> )) *by* (36)*, is* <sup>C</sup>1*, and for all D* ∈ *I*<sup>2</sup> *we have γ* <sup>2</sup>(*D*) > 0*.*

**Hypothesis 7.** *The function <sup>μ</sup>*<sup>1</sup> : *<sup>I</sup>*<sup>1</sup> <sup>→</sup> (<sup>0</sup> <sup>+</sup> <sup>∞</sup>)*, defined on <sup>I</sup>*<sup>1</sup> = (0, *<sup>m</sup>*1) *by* (37)*, is* <sup>C</sup><sup>1</sup> *and for all D* ∈ *I*<sup>1</sup> *we have γ* <sup>1</sup>(*D*) > 0*.*

If Hypothesis 6 is satisfied, then the function *γ*<sup>2</sup> is invertible, and for each *Sin* <sup>2</sup> , the equation

$$S\_2^m = \gamma\_2(aD) \tag{38}$$

has a unique solution, denoted

$$D\_0^\*\left(S\_2^{in}\right) = \frac{1}{a} \gamma\_2^{-1}(S\_2^{in}),\tag{39}$$

where *γ*−<sup>1</sup> <sup>2</sup> is the inverse function of *γ*2. On the other hand, if Hypotheses 6 and 7 are satisfied, the function *γ*<sup>2</sup> + *<sup>k</sup>*<sup>2</sup> *k*1 *<sup>γ</sup>*<sup>1</sup> is <sup>C</sup><sup>1</sup> and increasing, since it is the sum of two increasing functions. Therefore, for each *Sin* <sup>1</sup> and *<sup>S</sup>in* <sup>2</sup> , the equation

$$S\_2^{in} + \frac{k\_2}{k\_1} S\_1^{in} = \gamma\_2(aD) + \frac{k\_2}{k\_1} \gamma\_1(aD) \tag{40}$$

has a unique solution, denoted

$$D\_1^\*\left(S\_1^{in}, S\_2^{in}\right) = \,\_a^1\gamma^{-1} \left(S\_2^{in} + \,\_{k\_1}^{k\_2} S\_1^{in}\right),\tag{41}$$

where *γ*−<sup>1</sup> is the inverse function of *γ* := *γ*<sup>2</sup> + *<sup>k</sup>*<sup>2</sup> *k*1 *γ*1.

The following result gives the answer to the first part of Problem 3.

**Proposition 6.** *Assume that Hypotheses 2, 3, 6, and 7 are satisfied. Then G*01- *D*, *Sin* 2 *reaches its maximum at D*∗ 0 - *Sin* 2 *, defined by* (39) *and G*11- *D*, *Sin* <sup>2</sup> , *<sup>S</sup>in* 2 *reaches its maximum at the right-hand end of its defining interval, or at D*∗ 1 - *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 *, defined by* (41)*.*

**Proof.** The proof is given in Appendix B.5.2.

The set of best operating conditions for biogas production at *E*<sup>01</sup> is the surface Γ<sup>0</sup> of SOP, defined by:

$$\Gamma\_0 = \left\{ (D, S\_1^{in}, S\_2^{in}) : S\_2^{in} = \gamma\_2(aD) \right\} = \left\{ (D, S\_1^{in}, S\_2^{in}) : D = D\_0^\* \left( S\_2^{in} \right) \right\} \tag{42}$$

It is the set of operating conditions that produce the maximum of *G*01. The set of best operating conditions for biogas production at *E*<sup>11</sup> is the surface Γ<sup>1</sup> of SOP, defined by:

$$\Gamma\_1 = \left\{ (D, S\_1^{in}, S\_2^{in}) : S\_2^{in} + \frac{k\_2}{k\_1} S\_1^{in} = \gamma(aD) \right\} = \left\{ (D, S\_1^{in}, S\_2^{in}) : D = D\_1^\* \left( S\_1^{in}, S\_2^{in} \right) \right\} \tag{43}$$

This is the set of operating conditions which produce the maximum of *G*11.

We plot the sets Γ<sup>0</sup> and Γ<sup>1</sup> in the 2-dimensional ODs in the (*D*, *Sin* <sup>1</sup> )-plane shown in Figure 5. Since *Sin* <sup>2</sup> is fixed, the set Γ0, in blue in the figures, is the vertical line *D* = *D*<sup>∗</sup> <sup>0</sup> (*Sin* <sup>2</sup> ), while Γ1, in red in the figures, is the curve of equation *Sin* <sup>1</sup> <sup>=</sup> *<sup>k</sup>*<sup>1</sup> *k*2 - *<sup>γ</sup>*(*αD*) <sup>−</sup> *<sup>S</sup>in* 2 . Let *Sin* <sup>1</sup> and *Sin* <sup>2</sup> be fixed. Consider the OD for which *<sup>S</sup>in* <sup>2</sup> is equal to the fixed value considered and look for the intersections of Γ<sup>0</sup> and Γ<sup>1</sup> with the horizontal line where *Sin* <sup>1</sup> is kept constant at the fixed value considered. The abscissas of these intersections are the optimal dilution rates *D*∗ 0 - *Sin* 2 and *D*∗ 1 - *Sin* 2 defined by (39) and (41), respectively.

**Figure 5.** The 2-dimensional OD in \$ *D*, *Sin* 1 % , obtained by cuts at *Sin* <sup>2</sup> constant of the 3-dimensional OD shown in Figure A6. The curve Γ1, in red, is the set of maximisation of *G*11. The vertical line Γ0, in blue, is the set of maximisation of *G*01.

**Remark 11.** *As for the one-step model with a Haldane type growth function, shown in Figure 1b, there exists a threshold value S<sup>c</sup>* <sup>1</sup> *corresponding to the intersection point* (*Dc*, *<sup>S</sup><sup>c</sup>* <sup>1</sup>) *of curves* Γ<sup>1</sup> *and* Λ5*, such that, if Sin* <sup>1</sup> > *<sup>S</sup><sup>c</sup>* <sup>1</sup>*, then the best operating point lies in the bistability pink region; see Figure 6a. The value D* = *D<sup>c</sup> is the solution of equation*

$$
\lambda\_2(aD) = \lambda\_2(aD) + aD\lambda\_2'(aD) + \frac{k\_2}{k\_1} aD\lambda\_1'(aD), \tag{44}
$$

*which gives the abscissa of the point of intersection of* Γ<sup>1</sup> *and* Λ5*, and S<sup>c</sup>* <sup>1</sup> *is given by*

$$S\_1^\varepsilon = \lambda\_1(\alpha D^\varepsilon) + \frac{k\_1}{k\_2} \left(\bar{\lambda}\_2(\alpha D^\varepsilon) - S\_2^{in}\right).$$

**Figure 6.** (**a**): The point (*Dc*, *S<sup>c</sup>* <sup>1</sup>) = <sup>Γ</sup><sup>1</sup> <sup>∩</sup> <sup>Λ</sup>5. (**b**): A zoom showing the points *<sup>P</sup>*<sup>0</sup> <sup>=</sup> <sup>Γ</sup><sup>0</sup> <sup>∩</sup> <sup>Λ</sup><sup>1</sup> and *<sup>P</sup>*<sup>1</sup> <sup>=</sup> <sup>Γ</sup><sup>1</sup> <sup>∩</sup> <sup>Λ</sup>1. (**c**): The function *<sup>D</sup>* → *<sup>G</sup>*01(*D*, *<sup>S</sup>in* <sup>2</sup> ) in blue and the functions *<sup>D</sup>* → *<sup>G</sup>*11(*D*, *<sup>S</sup>in* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ), in red, for *Sin* <sup>1</sup> = *<sup>S</sup>*<sup>0</sup> <sup>1</sup> and *<sup>S</sup>in* <sup>1</sup> = *<sup>S</sup>*<sup>1</sup> 1.

3.2.3. The Maximum of *G*<sup>01</sup> Can Be Larger than the Maximum of *G*<sup>11</sup>

In addition to the threshold *S<sup>c</sup>* <sup>1</sup>, Figures 5 and 6 show two other thresholds obtained by considering the intersection of the Γ<sup>0</sup> and Γ<sup>1</sup> curves with the Λ<sup>1</sup> curve. We depict in Figure 6 a typical situation and show in a zoom the points of intersection. Let *P*<sup>0</sup> = (*D*0, *S*<sup>0</sup> <sup>1</sup>) be the point of intersection of Γ<sup>0</sup> with Λ1; see Figure 6b. If *Sin* <sup>1</sup> = *<sup>S</sup>*<sup>0</sup> <sup>1</sup>, then the productivity *G*<sup>11</sup> is defined for 0 <sup>≤</sup> *<sup>D</sup>* <sup>≤</sup> *<sup>D</sup>*<sup>0</sup> and reaches its maximum for some *<sup>D</sup>*<sup>∗</sup> <sup>1</sup> (*S*<sup>0</sup> <sup>1</sup>, *<sup>S</sup>in* <sup>2</sup> ) < *<sup>D</sup>*0. Moreover, we have

$$\max\_D G\_{01}(D, S\_2^{in}) = G\_{01}(D^0, S\_2^{in}) = G\_{11}(D^0, S\_1^0, S\_2^{in}).$$

Therefore, see Figure 6c, we have

$$\max\_{D} G\_{11}(D\_{\prime}S\_{1\prime}^{0}S\_{2}^{in}) > \max\_{D} G\_{01}(D\_{\prime}S\_{2}^{in}).$$

Since the function *Sin* <sup>1</sup> → *<sup>G</sup>*11(*D*, *<sup>S</sup>in* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) is increasing, the same result is true for any *Sin* <sup>1</sup> > *<sup>S</sup>*<sup>0</sup> <sup>1</sup>. Note that *<sup>S</sup>*<sup>0</sup> <sup>1</sup> depends on *<sup>S</sup>in* <sup>2</sup> and is a solution of the set of equations

$$S\_1^{in} = \lambda\_1(\mathfrak{a}D)\_\prime \qquad S\_2^{in} = \gamma\_2(\mathfrak{a}D)\_\prime$$

which give the point of intersection of Λ<sup>1</sup> and Γ0. Therefore, (*S*<sup>0</sup> <sup>1</sup>, *<sup>S</sup>in* <sup>2</sup> ) belongs to the curve

$$\Sigma\_0 = \left\{ \left( S\_1^{in}, S\_2^{in} \right) : S\_2^{in} = \gamma\_2 \left( \mu\_1 \left( S\_1^{in} \right) \right) \right\}. \tag{45}$$

Similarly, let *P*<sup>1</sup> = (*D*1, *S*<sup>1</sup> <sup>1</sup>) be the point of intersection of the curves Γ<sup>1</sup> and Λ1; see Figure 6b. If *Sin* <sup>1</sup> = *<sup>S</sup>*<sup>1</sup> <sup>1</sup> then the productivity *<sup>G</sup>*<sup>11</sup> is defined for 0 <sup>≤</sup> *<sup>D</sup>* <sup>≤</sup> *<sup>D</sup>*<sup>1</sup> and reaches its maximum for *D* = *D*1. Since *D*<sup>1</sup> < *D*0, we have (see Figure 6c),

$$G\_{11}(D^1, \mathcal{S}\_1^1, \mathcal{S}\_2^m) = G\_{01}(D^1, \mathcal{S}\_2^m) < G\_{01}(D^0, \mathcal{S}\_2^m).$$

Therefore,

$$\max\_{D} G\_{11}(D\_{\prime}S\_{1\prime}^{\dagger}S\_{2}^{in}) < \max\_{D} G\_{01}(D\_{\prime}S\_{2}^{in}) .$$

The same result is true for any *Sin* <sup>1</sup> < *<sup>S</sup>*<sup>1</sup> <sup>1</sup>, because the function *<sup>S</sup>in* <sup>1</sup> → *<sup>G</sup>*11(*D*, *<sup>S</sup>in* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) is increasing. Note that *S*<sup>1</sup> <sup>1</sup> depends on *<sup>S</sup>in* <sup>2</sup> and is a solution to the set of equations

$$S\_1^{\rm in} = \lambda\_1(aD), \qquad S\_2^{\rm in} + \frac{k\_2}{k\_1}S\_1^{\rm in} = \gamma\_2(aD) + \frac{k\_2}{k\_1}\gamma\_1(aD),$$

which give the point of intersection of Λ<sup>1</sup> and Γ1. Therefore (*S*<sup>1</sup> <sup>1</sup>, *<sup>S</sup>in* <sup>2</sup> ) belongs to the curve

$$\Sigma\_1 = \{ (S\_1^{in}, S\_2^{in}) : S\_2^{in} = \sigma\_1(S\_1^{in}) \}, \quad \text{where} \quad \sigma\_1(S\_1^{in}) = \gamma\_2 \{ \mu\_1(S\_1^{in}) \} + \frac{k\_2}{k\_1} \frac{\mu\_1(S\_1^{in})}{\mu\_1'(S\_1^{in})}.\tag{46}$$

The curves Σ<sup>0</sup> and Σ<sup>1</sup> are illustrated in Figure 7b. We have the following result.

**Proposition 7.** *Let* Σ<sup>0</sup> *and* Σ<sup>1</sup> *be the curves of the* (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) *plane defined by* (45) *and* (46)*, respectively. If* (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) *is at the right of* Σ0*, then we have*

$$\max\_{D} G\_{11}(D\_{\prime}S\_{1\prime}^{1}S\_{2}^{\prime m}) > \max\_{D} G\_{01}(D\_{\prime}S\_{2}^{\prime m}).$$

*If the function μ*1/*μ* <sup>1</sup> *is increasing and* (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) *is at the left of* Σ1*, then we have*

$$\max\_{D} G\_{11}(D, \mathcal{S}\_{1'}^{1}, \mathcal{S}\_{2}^{1m}) < \max\_{D} G\_{01}(D, \mathcal{S}\_{2}^{1m}).$$

**Proof.** The proof is given is Appendix B.5.3.

**Figure 7.** To the left of the curve Σ we have max *<sup>D</sup> <sup>G</sup>*<sup>01</sup> <sup>&</sup>gt; max *<sup>D</sup> <sup>G</sup>*<sup>11</sup> and to its right we have max *<sup>D</sup> <sup>G</sup>*<sup>01</sup> <sup>&</sup>lt; max *<sup>D</sup> <sup>G</sup>*11.

Now, we give the curve Σ lying between the Σ<sup>0</sup> and Σ<sup>1</sup> curves, such that the maximum of biogas flow rate is obtained for *E*<sup>01</sup> at the left of Σ and for *E*<sup>11</sup> at the right of Σ; see Figure 7a. We need the following hypothesis.

**Hypothesis 8.** *We assume that the function φ defined by φ*(*D*) = *D*2*λ* <sup>2</sup>(*D*) *is increasing.*

Therefore, *φ* has an inverse function *φ*−<sup>1</sup> defined by *D* = *φ*−1(*B*) if and only if *D* is the solution to equation *φ*(*D*) = *B*. Consider the curve Σ defined by the parametric equations

$$S\_2^{\dot{m}} = \gamma\_2(\Delta(D)), \quad S\_1^{\dot{m}} = \gamma\_1(aD) + \frac{k\_1}{k\_2}(\gamma\_2(aD) - \gamma\_2(\Delta(D)))\tag{47}$$

where Δ(*D*) is defined by

$$\Delta(D) := \phi^{-1}\left(a^2 D^2 \left(\lambda\_2'(aD) + \frac{k\_2}{k\_1} \lambda\_1'(aD)\right)\right). \tag{48}$$

The following result gives the answer to the second part of Problem 3.

**Proposition 8.** *Assume that Hypothesis 8 is satisfied and, in addition, the curve* C *defined by the parametric Equation* (47) *is the graph of an increasing function Sin* <sup>2</sup> → *<sup>S</sup>in* <sup>1</sup> *. Then it is the subset of the* (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) *plane, where*

$$\max\_{D} G\_{01}(D, S\_2^{\text{in}}) = \max\_{D} G\_{11}(D, S\_1^{\text{in}}, S\_2^{\text{in}}).\tag{49}$$

*To the left of* C*, we have* max *<sup>D</sup> <sup>G</sup>*<sup>01</sup> <sup>&</sup>gt; max *<sup>D</sup> <sup>G</sup>*<sup>11</sup> *and to its right, we have* max *<sup>D</sup> <sup>G</sup>*<sup>01</sup> <sup>&</sup>lt; max *<sup>D</sup> <sup>G</sup>*11*.* **Proof.** The proof is given in Appendix B.5.4.

**Remark 12.** *By combining the result of Remark 11 with that of Proposition 8, we deduce that the curve* Σ *and the straight line* C *defined by*

$$\mathcal{C} := \left\{ (S\_1^{in}, S\_2^{in}) : S\_2^{in} + \frac{k\_2}{k\_1} S\_1^{in} < \gamma\_2 (\mathfrak{a} D^c) + \frac{k\_2}{k\_1} \gamma\_1 (\mathfrak{a} D^c) \right\} / \mathfrak{a}$$

*where D* = *D<sup>c</sup> is the solution of Equation* (44)*, divide the plane* (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) *into three regions:*

> <sup>R</sup><sup>0</sup> :<sup>=</sup> (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) *lies to the left of* Σ <sup>R</sup><sup>1</sup> :<sup>=</sup> (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) *lies to the right of* Σ *and to the left of* C <sup>R</sup><sup>2</sup> :<sup>=</sup> (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) *lies to the right of* Σ *and* C .

*In the region* R0*, we have* max*<sup>D</sup> G*<sup>10</sup> > max*<sup>D</sup> G*11*. In the region* R1*, we have* max*<sup>D</sup> G*<sup>10</sup> < max*<sup>D</sup> G*11*, and the optimal dilution rate corresponds to the global asymptotic stability of E*11*. In the region* R2*, we also have* max*<sup>D</sup> G*<sup>10</sup> < max*<sup>D</sup> G*11*, but the optimal dilution rate corresponds to the bistability of E*<sup>11</sup> *and E*10*.*

Since the steady state *E*<sup>10</sup> does not produce biogas, if the bioreactor is operated in the R<sup>2</sup> region, care should be taken to initialise it in the basin of attraction of *E*<sup>11</sup> and not in the basin of *E*10. The regions are illustrated in Figure 8a, obtained with the parameter values given in Table A8. Let us illustrate the behaviour of *G*01(*D*, *Sin* <sup>2</sup> ) and *<sup>G</sup>*11(*D*, *<sup>S</sup>in* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ), as functions of *D*, for the operating points *ok* ∈ R*k*, *k* = 0, 1, 2, shown in Figure 8a. Figure 8b shows the OD in the (*D*, *Sin* <sup>1</sup> ) plane and *<sup>S</sup>in* <sup>2</sup> = 15. The horizontal lines *<sup>S</sup>in* <sup>1</sup> = 1.5, 10, and 50, corresponding to the points *o*<sup>0</sup> = (1.5, 15), *o*<sup>1</sup> = (10, 15), and *o*<sup>2</sup> = (50, 15), respectively, give the optimal dilution rates. For *o*0, the maximum of the biogas flow is obtained for *E*01; see Figure 8c. For *o*1, the maximum of the biogas flow is obtained for *E*11, and *E*<sup>11</sup> is GAS; see Figure 8d. For *o*2, the maximum of the biogas flow is obtained for *E*11, but *E*<sup>11</sup> is only LAS; see Figure 8e.

**Figure 8.** The biogas flow rates *<sup>D</sup>* → *<sup>G</sup>*01(*D*, *<sup>S</sup>in* <sup>2</sup> ) in blue, *<sup>D</sup>* → *<sup>G</sup>*11(*D*, *<sup>S</sup>in* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) in red, and *D* → *G*12(*D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) in dashed red, corresponding to the operating points (**c**) *o*<sup>0</sup> = (1.5, 15), (**d**) *o*<sup>1</sup> = (10, 15) and (**e**) *o*<sup>2</sup> = (50, 15). The flow rate biogas of a stable steady state is drawn in bold, while it is drawn in dashed line when the steady state is unstable.

#### 3.2.4. Applications to the Classical AM2 Model

The dynamical equations of the model are

$$\begin{array}{rcl} \dot{S}\_{1} &=& D\left(S\_{1}^{in} - S\_{1}\right) - k\_{1}\mu\_{1}(S\_{1})X\_{1}, \\ \dot{X}\_{1} &=& (\mu\_{1}(S\_{1}) - aD)X\_{1}, \\ \dot{S}\_{2} &=& D\left(S\_{2}^{in} - S\_{2}\right) + k\_{2}\mu\_{1}(S\_{1})X\_{1} - k\_{3}\mu\_{2}(S\_{2})X\_{2}, \\ \dot{X}\_{2} &=& (\mu\_{2}(S\_{2}) - aD)X\_{2}. \end{array} \tag{50}$$

where the kinetics *μ*<sup>1</sup> and *μ*<sup>2</sup> are given by

$$\mu\_1(\mathcal{S}\_1) = \frac{m\_1 S\_1}{K\_1 + S\_1 \prime} \qquad \mu\_2(\mathcal{S}\_2) = \frac{m\_2 S\_2}{K\_2 + S\_2 + S\_2^2 / K\_i \prime} \tag{51}$$

For the Monod and Haldane functions, Hypotheses 2 and 3 are satisfied and the break-even concentrations can be calculated explicitly. For the convenience of the reader we summarize in Table 4 the expressions of the break even concentrations and the auxiliary functions that are needed in the description of the results. The OD in the three dimensional SOP, corresponding to the biological value parameters given in Table A8 is shown in Figure A6 of the Appendix. The two-dimensional diagrams in the (*D*, *Sin* <sup>1</sup> ) plane, where *<sup>S</sup>in* 2 is kept constant, are depicted in Figure A7. The two-dimensional diagrams in the (*Sin* <sup>1</sup> , *<sup>S</sup>in* 2 ) plane, where *D* is kept constant, are depicted in Figure A8.

**Table 4.** Auxiliary function in the classical AM2 model.


Since *μ* <sup>1</sup> < 0 and *μ* <sup>2</sup> < 0 on (0, *<sup>S</sup><sup>m</sup>* <sup>2</sup> ), from Lemma 3 we deduce that *γ* <sup>1</sup> > 0 and *γ* <sup>2</sup> > 0. Therefore Hypotheses 6 and 7 are satisfied. From Proposition 6, we deduce that the curves Γ<sup>0</sup> and Γ1, defined by (42) and (43) are the sets of best operating conditions for *G*<sup>01</sup> and *G*11, respectively. These sets are shown in Figure 5, for some of the ODs depicted in Figure A7.

On the other hand, since *λ* <sup>2</sup> > 0, we deduce that *<sup>φ</sup>* > 0, where *<sup>φ</sup>*(*D*) = *<sup>D</sup>*2*λ* <sup>2</sup>(*D*). Hence Hypothesis 8 is satisfied. The inverse function of *φ* can be computed explicitly. We have

$$\phi^{-1}(B) = m\_2 \frac{(m\_2 K\_i + 2B)\sqrt{B K\_2 K\_i (m\_2 K\_i + B)} - (m\_2 K\_i + B)K\_i B}{K\_2 m\_2^2 K\_i^2 + (4K\_2 - K\_i)(m\_2 K\_i + B)B}$$

Note that the function *μ*1/*μ* <sup>1</sup> is increasing. Therefore, the result of Proposition 7 is true. Straightforward computation shows that the curve Σ is increasing. Hence, the result of Proposition 8 is true. The curve Σ of the (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> )-plane,

$$\max\_{D} G\_{01}(D, S\_2^{in}) = \max\_{D} G\_{11}(D, S\_1^{in}, S\_2^{in})\_{\prime}$$

and the curves Σ<sup>0</sup> and Σ<sup>1</sup> are shown in Figure 7. Finally the regions R0, R1, and R<sup>2</sup> and the behaviour of the biogas flow rates *<sup>D</sup>* → *<sup>G</sup>*01(*D*, *<sup>S</sup>in* <sup>2</sup> ) and *<sup>D</sup>* → *<sup>G</sup>*11(*D*, *<sup>S</sup>in* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) are depicted in Figure 8 for three operating points *oj* ∈ R*j*, *j* = 0, 1, 2.

#### *3.3. Relationship with Previous Results*

The OD of the one-step model is well known in the existing literature [22,36]. In these references, the dilution rate is shown on the vertical axis, and the input substrate concentration is shown on the horizontal axis. In this paper, we have reversed the axes, because, as we then consider the biogas flow rate, or productivity, as a function of the dilution rate, it is interesting to have the dilution rate on the horizontal axis in all graphs.

In practical applications, when maximising biogas or biomass production, the substrate concentration *Sin* is given and the optimal dilution rate *D*∗(*Sin*), depending on *Sin*, that maximises biogas or biomass production must be determined. For the Monod function, the formula giving the optimal dilution appears in several reference books; see for example Formula (13.70) in [12] or Formula (6.83) in [19]. For the Monod and Haldane functions, it appears in [20,21] and were used for the optimization of bioreactors by extremum seeking. The approach used here is to try to directly exploit the equation of which the optimal *D* is a solution and to represent its solutions in the OD. To the best of our knowledge, the set of best operating conditions for biogas or bimass production have only recently been drawn in the OD [51–53]. In these papers the main problem is to consider the optimisation of biogas flow rate or biomass productivity in the serial chemostat and to compare the performances of the serial chemostat with a single chemostat of the same total volume.

In the case without biomass mortality, the mathematical analysis of the two-step model was given in [15], in the case *α* = 1, and in [26] in the case *α* ≤ 1. The OD was given in [42]. Here we have extended these results to the case including mortality. The maximization of biogas flow for this model has been well studied in [11]. For example, the curves Σ<sup>0</sup> and Σ<sup>1</sup> were described( see Figure 4 in [11]), where the curves are called *C*<sup>2</sup> and *C*3, respectively. The existence of the curve Σ was predicted; see Remark 7 in [11]. However, neither its analytical equation nor its numerical representation was given in [11]. Note that the curves Σ<sup>0</sup> and Σ<sup>1</sup> have vertical asymptotes; see Figure 7. We deduce that the curve Σ also has one. Therefore, the region <sup>R</sup><sup>0</sup> is not wide. That is to say, for an *<sup>S</sup>in* <sup>2</sup> as large as one wants, it is enough that *Sin* <sup>1</sup> exceeds a certain threshold, corresponding to the vertical asymptote, for the system to be in the R<sup>1</sup> or R<sup>2</sup> region.

The representation of the set of optimal operating conditions in the OD, as well as its use to deduce the various properties of biogas production, is not found in the existing literature. In particular, the identification of the threshold at which the system will operate in a bistability regime is new and answers practical questions of great interest for bioreactors and their management. These questions are related to the so-called stability criteria named "overloading tolerance" or "destabilization risk index" [26,56]. This index alerts the experimenter as soon as the system approaches a regime of bistability. Bistability in the model occurs when the unstable steady states *E*<sup>02</sup> or *E*<sup>12</sup> exist. For example, although the steady state *E*<sup>12</sup> is unstable, if it exists, its existence completely changes the functioning of the system. Indeed, in this case, the steady state *E*10, of washout of the methanogenic bacteria (without biogas production), becomes stable, and the positive steady state *E*<sup>11</sup> loses its global stability. This important issue is not addressed in [11], where the authors do not consider the steady states *E*<sup>02</sup> and *E*12. They justify their disregard by the fact that these steady states are unstable, that their biogas flow rate is lower than the biogas flow rate of the associated steady states *E*<sup>01</sup> and *E*11, and also because according to them their conditions of existence are the same as those of the steady states *E*<sup>01</sup> and *E*11; see Section 3 in [11]. The first two reasons are of course correct, but the third is not. Indeed, *E*<sup>11</sup> can exist without *E*<sup>12</sup> existing. On the other hand, when *E*<sup>12</sup> exists, *E*<sup>11</sup> must also exist, and we have the phenomenon of bistability of *E*<sup>10</sup> and *E*11. In this paper, we considered all steady states, which allowed us to highlight the important region of bistability (coloured in pink in the figures) and thus to provide a valuable tool for the experimenter to avoid monitoring the system in this region, or at least to be very careful if he should do so.

#### **4. Discussion**

In this paper, we have determined the set of operating parameters that optimise the biogas flow in simple AD models. We have represented these sets in the OD of the model. This representation allowed us to obtain a simple graphic visualisation of the optimal operating conditions. It also allows direct discovery of the properties of these optimal conditions.

To illustrate the simplicity with which the properties appear in the OD, let us consider the case with inhibition by the substrate when its concentration is high (Haldane function). It is well known that when the inflowing substrate concentration of the bioreactor is high, the system presents bistability, with a risk of convergence towards the washout steady state. It is natural then to ask whether operating conditions that maximise the biogas flow can lead to this bistability situation. This phenomenon was already observed, using the OD, in a more complex system [35]. The main result of this paper is to address this problem and to give a complete answer in one-step and two-steps models. Although we have an explicit formula for the optimal dilution rate as a function of the substrate input concentration, this formula does not allow us to easily determine whether or not the system is in the instability zone. On the other hand, drawing the set of optimal conditions in the OD immediately shows that this set enters the bistability zone and allows to find the critical threshold of the substrate input concentration at which the system will operate in the instability zone; see the threshold *S<sup>c</sup>* in Figure 1b. This shows the value of the OD in understanding the model.

The contribution of the OD to the understanding of the system's behaviour is even more spectacular in the case of the AM2 model. In this case, there are three operating parameters, and the OD must be represented in the plane formed by two of them by fixing the third. The role of this third parameter is described by a series of diagrams. The sets of optimal operating conditions are surfaces in the space of the three operating parameters, whose traces in the two dimensional ODs are curves. It is immediately apparent whether these curves fall within the areas where the system behaviour may be at risk and the thresholds can be easily found. Three regions can then be determined in the plane of the concentrations of the two input substrates. In one of the regions, the maximum biogas flow rate of the steady state where both acidogenic and methanogenic bacteria are present is reached for a value of the dilution ratio for which the acidogenic bacteria are washed out. In a second region, the maximum is reached for a value of the dilution rate for which the positive steady state is GAS. In a third region, the maximum is reached for a value of the dilution rate for which the system presents à bistability behaviour; see Figure 8. These regions have not been identified in the existing literature.

Some figures in this paper (see Figures 1–4, 6, A4, and A5) are made without graduations on the axes because they represent generic situations where the growth functions verify our general hypothesis and the biological parameters are not specified. However, in practice, to construct an OD, one fixes the growth functions and biological parameters and then draws the curves separating the regions of the OD. Indeed, the OD is a tool for the experimenter who knows the biological parameter values of the model he is considering, and then plots its OD. We do that in Appendix A.5 for some classical growth functions; see Figures A1–A3. See also Figures 5, 7 and 8 in Section 3.2, for the AM2 model, whose biological parameters are given in Table A8. See also Figures A6–A8 in the Appendix B.

Another result obtained with the help of the OD of a two-step model is worth mentioning here. It was shown in [42,57] that under certain circumstances, increasing the dilution rate can globally stabilize two-step biological systems. This kind of surprising and unexpected result was obtained also for a two-step model where the first reaction has a Contois kinetics instead of a Monod one [58]. These studies have shown how unexpected properties can be discovered and studied by analysing the OD of the model. Our findings in this paper are a further illustration of the relevance of the OD in the study of one-step and two-step models.

The two-step models of the form (12) present a commensalistic relationship between microorganisms. For definitions and complementary information on commensalism, the reader may consult [59]. Methanogenic bacteria use for their growth the product of the acidogenic bacteria, but acidogenic bacteria are not affected by the growth of the methanogenic bacteria. More complex models are those studied in [38–40,43], which present a syntrophic relationship between the micro organisms: the first population is affected by the growth of the second population. For more details and information on commensalism and syntrophy, the reader is referred to [40,43,59–64] and the references therein. The ODs of some of these models are well understood; see [38–40,43]. Studying the biogas or biomass production for these more complex and more realistic models of AD is a challenging question. It is the subject for future research directions. The determination of the OD and the optimal productivity of synthetic microbial communities considered in [65] is also an interesting question that deserves further attention.

#### **5. Conclusions**

In this work, we considered one-step and two-step simple models of AD which are able to adequately capture the main dynamical behaviour of the full ADM1 and have the advantage that a complete analysis for the existence and local stability of their steady states is available. These models have been validated on real data. We considered that the biological parameters of the models have been calibrated on the data. Therefore, the OD of the model can be constructed, and the results can be illustrated in the OD. The best operating conditions for biogas production or biomass production are obtained as subsets of the OD.

For a one-step model, the set Γ of best operating conditions for biogas production is described as a curve of equation *Sin* = *γ*(*D*); see Figure 2 for the Monod case and Figure 3 for the Haldane case. These curves permit the optimal dilution *D*∗ *<sup>G</sup>*(*Sin*) for which the biogas production is maximal to be obtained graphically and easily. The explicit expression for *D*∗ *<sup>G</sup>*(*Sin*) is not always available, and even when it is known, see Appendix A.5. On the other hand, the graphical visualisation of *D*∗ *<sup>G</sup>*(*Sin*) in the OD allows us to predict the behaviour of the system when it is operated at this optimal dilution rate, as illustrated in Figures 2 and 3 and A1–A3.

When there are no maintenance terms included in the model, it is known that biogas production and biomass production are given by the same expressions. Therefore, the maximum of these quantities is obtained for the same operating conditions. However, when maintenance is included in the model, the subsets of best operating conditions for biogas production and biomass production are not the same; see Figure 4.

For a two-step model, we obtain two subsets, Γ<sup>0</sup> and Γ1, of maximal biogas production, corresponding to the steady states *E*<sup>01</sup> and *E*11, respectively; see Figure 5. The steady state *E*<sup>01</sup> corresponds to the washout of the first biomass, while *E*<sup>11</sup> corresponds to the persistence of the two populations. For certain operating conditions, the biogas production of *E*<sup>01</sup> can be higher than that of *E*11. We have determined the set of values for the input substrate concentrations for which this occurs; see Figure 7. We have identified two other subsets of operating conditions in which the system behaves in different ways; see Figure 8. In one set the optimal dilution rate corresponds to an operating regime where the system is functioning at a GAS steady state, while, in the second, there is bistability. It may be in the experimenter's interest to run the system with operating parameters that give rise to bistability, since the biogas flow rate is then greater. However, they must be careful to initialise it in the basin of attraction of the steady state *E*11, because otherwise it may converge towards the steady state *E*10, which does not produce biogas.

Our findings illustrate how the OD is a useful tool for the understanding of the behaviour of one-step and two-step models. The OD can be constructed once the biological parameters of the model are fixed. It can also be constructed qualitatively, without specifying the values of the biological parameters. It is therefore a powerful tool for the mathematical analysis of a model when the growth functions are not specified. It is also a tool that allows us to answer important and natural questions that we might not have asked ourselves without this tool. Therefore, the OD allows new interesting questions to

be asked and answered about the model. When studying any problem concerning the chemostat, it is useful to represent the results obtained in the OD. This gives a very clear overview of the system and its operating modes. In this paper, we have illustrated the effectiveness of this approach in the study of the maximisation of the biogas flow rate and the productivity of the biomass.

**Funding:** This research received no external funding.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Data Availability Statement:** Data sharing is not applicable to this article as no datasets were generated or analysed during the current study.

**Acknowledgments:** The author is grateful to Radhouane Fekih-Salem and Jérôme Harmand for insightful comments on this work. The author is also grateful to two anonymous reviewers for comments that greatly improved this manuscript. The author thanks the UNESCO ICIREWARD project ANUMAB and the Euro-Mediterranean research network Treasure (http://www.inrae.fr/ treasure) (accessed on 20 January 2022).

**Conflicts of Interest:** The author declares no conflict of interest.

#### **Abbreviations**

The following abbreviations are used in this manuscript:


#### **Appendix A. One-Step Model**

#### *Appendix A.1. Model Reduction*

We consider the chemostat model (2). It is usual in mathematical theory [22,24] to make the change of variable *x* = *kX*, which transforms (2) into

$$\begin{array}{rcl} \mathcal{S} & = & D\left(S^{in} - \mathcal{S}\right) - \mu(\mathcal{S})\mathbf{x} \\ \dot{\mathbf{x}} & = & (\mu(\mathcal{S}) - D\_1)\mathbf{x} \end{array}$$

Therefore, the stoichiometric coefficient *k* can be reduced to 1 in (2).

#### *Appendix A.2. The Operating Diagram of the One-Step Model*

In order to construct the OD of (2), one needs to determine and compute the boundaries of the regions of the diagram, i.e., to compute the parameter values at which a qualitative change in the dynamic behaviour of (2) occurs. For (2), these boundaries are the curves

$$\begin{array}{rcl} \Lambda &=& \left\{ \left( D, S^m \right) : S^m = \lambda (aD + a) \right\} , \\ \Lambda\_2 &=& \left\{ \left( D, S^m \right) : S^{in} = \bar{\lambda} (aD + a) \right\} , \\ \Lambda\_1 &=& \left\{ \left( D, S^{in} \right) : aD + a = \mu (S^m) \text{ and } S^{in} \ge S^m \right\} \end{array} \tag{A1}$$

These curves separate the Set of Operating Parameters (SOP)

$$\text{SOP} = \left\{ (D\_\prime S^{in}) : D \ge 0 \text{ and } S^{in} \ge 0 \right\} \prime$$

in three regions, denoted J0, J1, and J2, corresponding to different behaviours of (2), as depicted in Table A1.

**Table A1.** Existence and stability of steady states of (2) in the three regions of the operating space. The last column shows the color in which the region is depicted in the OD shown in Figures 1–4 and A1–A3.


GAS, LAS, and U mean that the steady state is Globally Asymptotically Stable, Locally Asymptotically Stable, or Unstable, respectively. No letter means that the steady state does not exist in the region. Note that

$$\Lambda \cup \Lambda\_2 = \left\{ \left( D, S^{in} \right) \, : \, D = \frac{\mu(S^{in}) - a}{a} \right\}.$$

We plot in Figure 1 the curves Λ, Λ1, and Λ<sup>2</sup> in SOP and the regions delimited by these curves. This figure, together with Table A1, is the OD of (2). This diagram is well known in the literature [22,36]. When *S<sup>m</sup>* = +∞, then only Λ exists (Λ<sup>1</sup> = Λ<sup>2</sup> = ∅). In this case, the OD contains only the regions J<sup>0</sup> and J1. The main difference between Figure 1a, obtained for the Monod case (*S<sup>m</sup>* = +∞), and Figure 1b, obtained for the Haldane case (*S<sup>m</sup>* <sup>&</sup>lt; <sup>+</sup>∞), is the appearance of the region of bistability <sup>J</sup>2. In this region, both steady states *F*<sup>0</sup> and *F*<sup>1</sup> are LAS and the asymptotic behaviour of a solution depends on its initial condition. If the initial condition belongs to the basin of attraction of *F*0, then the species *X* is washed out from the chemostat. If the initial condition belongs to the basin of attraction of *F*1, then, when *t* → +∞, the concentration *X*(*t*) of the species tends to *X*<sup>∗</sup> = *<sup>D</sup> kD*<sup>1</sup> - *<sup>S</sup>in* <sup>−</sup> *<sup>λ</sup>*(*D*1) . The green region J<sup>1</sup> is the "target" operating regions, as it corresponds to the global stability of the steady state, where the species survive. The pink region J<sup>2</sup> corresponds to the bistability of *F*<sup>0</sup> (no biogas production) and *F*<sup>1</sup> (with biogas production). If the chemostat is operated in the region J2, then, for a good operation of the system, its state at start up should correspond to the convergence toward *F*<sup>1</sup> rather than *F*0.

#### *Appendix A.3. Maximization of Biogas Production*

#### Appendix A.3.1. Proof of Proposition 1

The function *<sup>G</sup>* defined by (14) is <sup>C</sup><sup>1</sup> on the interior of *<sup>I</sup>*(*Sin*) and its derivative is given by

$$G'(D) = \mathcal{S}^{in} - \gamma(D)\_{\prime\prime}$$

where *γ* is defined by (17). Therefore, if *g*(*Sin*) is in the interior of *I*(*Sin*), by Fermat's theorem, any point *<sup>D</sup>*<sup>∗</sup> <sup>∈</sup> *<sup>g</sup>*(*Sin*) is a critical point of *<sup>G</sup>*; i.e., *<sup>G</sup>* (*D*∗) = 0, which is equivalent to *Sin* = *γ*(*D*∗). The proof of the proposition is complete if we prove that the set *g*(*Sin*) is in the interior of *<sup>I</sup>*(*Sin*). If *<sup>S</sup>in* <sup>&</sup>lt; *<sup>S</sup>m*, then *<sup>G</sup>* is defined for 0 <sup>≤</sup> *<sup>D</sup>* <sup>≤</sup> *<sup>δ</sup>*, where *<sup>δ</sup>* <sup>=</sup> *<sup>μ</sup>*(*Sin*)−*<sup>a</sup> <sup>α</sup>* , is positive if 0 < *D* < *δ* and satisfies *G*(0) = 0 and

$$G(\delta) = \delta(S^{\dot{m}} - \lambda(a\delta + a)) = \delta(S^{\dot{m}} - \lambda(\mu(S^{\dot{m}}))) = \delta(S^{\dot{m}} - S^{\dot{m}}) = 0.$$

Therefore, the maximum cannot be attained in 0 or *δ*. Similarly if *S<sup>m</sup>* < +∞ and *<sup>S</sup>in* <sup>≥</sup> *<sup>S</sup>m*, then *<sup>G</sup>* is defined for 0 <sup>≤</sup> *<sup>D</sup>* <sup>≤</sup> *<sup>δ</sup>*, where *<sup>δ</sup>* <sup>=</sup> *<sup>μ</sup>*(*Sm*)−*<sup>a</sup> <sup>α</sup>* , is positive if 0 < *D* < *δ* and satisfies *G*(0) = 0 and

$$G(\delta) = \delta(S^{\dot{m}} - \lambda(a\delta + a)) = \delta(S^{\dot{m}} - \lambda(\mu(S^m))) = \delta(S^{\dot{m}} - S^m) \ge 0.$$

Moreover, if *Sin* > *Sm*, we have

$$\lim\_{D \to \mu(S^m)} \lambda'(D) = +\infty.$$

Hence,

$$\lim\_{D \to \delta} G'(D) = -\infty.$$

Therefore, the maximum cannot be attained in 0 or *δ* and *g*(*Sin*) is in the interior of *I*(*Sin*).

#### Appendix A.3.2. Proof of Proposition 2

Since *H*(*λ*(*a*)) = *H*(*Sin*) = 0 and *H*(*S*) > 0 for *λ*(*a*) < *S* < *Sin*, the maximum of *<sup>H</sup>* is attained at a point *<sup>S</sup>*<sup>∗</sup> <sup>∈</sup> (*λ*(*a*), *<sup>S</sup>in*). By Fermat's theorem, *<sup>S</sup>*<sup>∗</sup> is a critical point of *<sup>H</sup>*; i.e., *H* (*S*∗) = 0. We have

$$G'(D) = H'(\lambda(\alpha D + a))\lambda'(\alpha D + a).$$

Hence, *<sup>H</sup>* has a maximum at *<sup>S</sup>*<sup>∗</sup> if and only if *<sup>G</sup>* has a maximum at *<sup>D</sup>*<sup>∗</sup> = *<sup>μ</sup>*(*S*∗)−*<sup>a</sup> <sup>α</sup>* . The derivative of *H* is given by

$$H'(S) = \mu'(S)(S^{\mathrm{in}} - S) - \mu(S) + a.s$$

Hence, *H* (*S*) = 0 if and only if *Sin* = *η*(*S*), where *η* is defined by (21). From *H* (*S*∗) = 0, it is deduced that *Sin* = *η*(*S*∗).

Appendix A.3.3. Proof of Lemma 1

If *<sup>μ</sup>* is <sup>C</sup>2, so is *<sup>λ</sup>* and the derivative of *<sup>γ</sup>* is given by

$$
\gamma'(D) = 2a\lambda'(aD + a) + a^2 D \lambda''(aD + a).
$$

Using *μ*(*λ*(*D*)) = *D*, we have

$$
\lambda'(D) = \frac{1}{\mu'(\lambda(D))} \quad \text{and} \quad \lambda''(D) = -\frac{\mu''(\lambda(D))\lambda'(D)}{\left(\mu'(\lambda(D))\right)^2}.\tag{A2}
$$

Hence,

$$\gamma'(D) = a\lambda'(aD + a)\left(2 - \frac{aD\mu''(\lambda(aD + a))}{\left(\mu'(\lambda(aD + a))\right)^2}\right).$$

Since *λ* > 0 it is deduced that *γ* (*D*) <sup>&</sup>gt; 0 if and only if for all *<sup>D</sup>* <sup>∈</sup> (0, *<sup>δ</sup>*(*Sm*)),

$$\left(\alpha D\mu^{\prime\prime}(\lambda(\alpha D + a)) < 2\left(\mu^{\prime}(\lambda(\alpha D + a))\right)\right)^2.$$

Using the change of variable *S* = *λ*(*αD* + *a*), this condition is equivalent to: for all *<sup>S</sup>* <sup>∈</sup> (*λ*(*a*), *<sup>S</sup>m*),

$$(\mu(S) - a)\mu''(S) < 2\left(\mu'(S)\right)^2.$$

Therefore (1) ⇔ (2). Moreover, we have

$$\left(\frac{1}{\mu - a}\right)' = -\frac{\mu'}{(\mu - a)^2}, \qquad \left(\frac{1}{\mu - a}\right)' = \frac{2(\mu')^2 - (\mu - a)\mu''}{(\mu - a)^3}.$$

Hence, (1/(*μ* − *a*)) > 0 if and only if (*μ* − *a*)*μ* < 2(*μ* )2. Therefore (2) <sup>⇔</sup> (3). The derivative of *η* is given by

$$\eta'(S) = 2 - \frac{\left(\mu(S) - a\right)\mu''(S)}{\left(\mu'(S)\right)^2}.$$

Therefore (2) <sup>⇔</sup> (4). If *<sup>μ</sup>* <sup>&</sup>lt; 0 on (0, *<sup>S</sup>m*), then since *<sup>μ</sup>* <sup>&</sup>gt; 0 on (*λ*(*a*), *<sup>S</sup>m*), the condition (*μ*(*S*) − *a*)*μ*(*S*) < (*μ* (*S*)) <sup>2</sup> is obviously satisfied.

#### *Appendix A.4. Maximization of Biomass Production*

#### Appendix A.4.1. Proof of Proposition 3

The function *<sup>P</sup>* defined by (23) is <sup>C</sup><sup>1</sup> on the interior of *<sup>I</sup>*(*Sin*), and its derivative is given by

$$P'(D) = \frac{D(aD + 2a)}{(aD + a)^2} \left( S^{in} - \pi(D) \right),$$

where *π* is defined by (25). Therefore, if the set *p*(*Sin*) is in the interior of *I*(*Sin*), by Fermat's theorem, any point *<sup>D</sup>*<sup>∗</sup> <sup>∈</sup> *<sup>p</sup>*(*Sin*) is a critical point of *<sup>P</sup>*; i.e., *<sup>P</sup>* (*D*∗) = 0, which is equivalent to *Sin* = *π*(*D*∗). The proof that *p*(*Sin*) is in the interior of *I*(*Sin*) is the same as the proof that *g*(*Sin*) is in the interior of *I*(*Sin*) given in Appendix A.3.1.

#### Appendix A.4.2. Proof of Proposition 4

Since *Q*(*λ*(*a*)) = *Q*(*Sin*) = 0 and *Q*(*S*) > 0 for *λ*(*a*) < *S* < *Sin*, the maximum of *<sup>Q</sup>* is attained at a point *<sup>S</sup>*<sup>∗</sup> <sup>∈</sup> (*λ*(*a*), *<sup>S</sup>in*). By Fermat's theorem, *<sup>S</sup>*<sup>∗</sup> is a critical point of *<sup>Q</sup>*, i.e., *Q* (*S*∗) = 0. We have

$$P'(D) = \frac{1}{\alpha} Q'(\lambda(\alpha D + a))\lambda'(\alpha D + a)$$

Hence, *<sup>Q</sup>* has a maximum at *<sup>S</sup>*<sup>∗</sup> if and only if *<sup>P</sup>* has a maximum at *<sup>D</sup>*<sup>∗</sup> = *<sup>μ</sup>*(*S*∗)−*<sup>a</sup> <sup>α</sup>* . Moreover, *Q* (*S*) = 0 if and only if *Sin* = *ρ*(*S*), where *η* is defined by (30). From *Q* (*S*∗) = 0, it is deduced that *Sin* = *ρ*(*S*∗).

#### Appendix A.4.3. Proof of Lemma 2

If *<sup>μ</sup>* is <sup>C</sup>2, so is *<sup>λ</sup>*, and the derivative of *<sup>π</sup>* is given by

$$\pi'(D) = \pi \frac{aD + a}{aD + 2a} \left( \frac{2(aD + 3a)}{aD + 2a} \lambda'(aD + a) + aD\lambda''(aD + a) \right).$$

Using (A2), we have

 $\pi'(D) = \pi \frac{aD + a}{aD + 2a}$  $\lambda'(aD + a) \left(\frac{2(aD + 3a)}{aD + 2a} - \frac{aD\mu''(\lambda(aD + a))}{\left(\mu'(\lambda(aD + a))\right)^2}\right).$ 

Since *λ* > 0 it is deduced that *π* (*D*) <sup>&</sup>gt; 0 if and only if for all *<sup>D</sup>* <sup>∈</sup> (0, *<sup>δ</sup>*(*Sm*)),

$$\varkappa D \frac{aD + 2a}{aD + 3a} \mu^{\prime\prime}(\lambda(aD + a)) < 2(\mu^{\prime}(\lambda(aD + a)))^2.$$

Using the change of variable *S* = *λ*(*αD* + *a*), this condition is equivalent to the following: for all *<sup>S</sup>* <sup>∈</sup> *<sup>λ</sup>*(*a*)0, *<sup>S</sup>m*),

$$\frac{\left(\mu(S) - a\right)\left(\mu(S) + a\right)}{\mu(S) + 2a}\mu''(S) < 2\left(\mu'(S)\right)^2.$$

Therefore, (1) ⇔ (2). The derivative of *ρ* is given by

$$\rho'(S) = \frac{\mu(S)}{(\mu(S) + a)^2 (\mu'(S))^2} \left( 2(\mu(S) + 2a)(\mu'(S))^2 - (\mu(S) - a)(\mu(S) + a)\mu''(S) \right).$$

Therefore (2) <sup>⇔</sup> (3). If *<sup>μ</sup>* <sup>&</sup>lt; 0 on (*λ*(*a*), *<sup>S</sup>m*), then, since *<sup>μ</sup>* <sup>&</sup>gt; 0 on (*λ*(*a*), *<sup>S</sup>m*), the condition (*μ*(*S*) − *a*)*μ*(*S*) < (*μ* (*S*)) <sup>2</sup> is obviously satisfied. Moreover, we have seen in Lemma <sup>1</sup> that if the condition \$ <sup>1</sup> *μ*−*a* % (*S*) > 0 holds, then we have

$$(\mu(S) - a)\mu''(S) < 2(\mu'(S))^2.$$

Therefore, we have

$$\frac{(\mu(S)-a)(\mu(S)+a)}{\mu(S)+2a}\mu''(S) < (\mu(S)-a)\mu''(S) < 2(\mu'(S))^2\mu''$$

which is the condition 2 in the lemma.

#### *Appendix A.5. Applications to Some Usual Growth Functions*

For simplicity, we restrict our attention to the case where *α* = 1 and *a* = 0. In this case, *D*∗(*Sin*) is obtained by solving Equation (33). One can also solve Equation (32), to get the maximum *S*∗(*Sin*), and then take

$$D^\*(S^{\text{ll}}) = \mu(S^\*(S^{\text{ll}})).\tag{A3}$$

Appendix A.5.1. Monod Growth Rate

This growth function is given by (4). This function satisfies Hypothesis 1 with *S<sup>m</sup>* = +∞. Since *μ* < 0, using Lemma 3, we obtain that Hypothesis 4 is satisfied. Straightforward computations show that

$$\lambda(D) = \frac{DK}{m - D}, \qquad \gamma(D) = \frac{DK(2m - D)}{(m - D)^2}, \qquad \eta(S) = S^2/K + 2S.$$

Hence, *S*∗(*Sin*), the (unique) solution of equation *Sin* = *η*(*S*), and *D*∗(*Sin*) are given by

$$S^\*(S^{in}) = \sqrt{K^2 + KS^{in}} - K, \quad D^\*(S^{in}) = \mu(S^\*(S^{in})) = m\left(1 - \sqrt{\frac{K}{K + S^{in}}}\right).$$

This formula for *D*∗(*Sin*) is well known in the literature; see for example [12,19,20]. In Figure A1a, we show the OD, together with the set of best operating conditions Γ and the biogas flow rate *G*(*D*, *Sin*), with *Sin* = 10, for the Monod growth function (4), with *m* = 1 and *K* = 5. This figure shows how the optimal dilution rate *D*∗(*Sin*) can be graphically determined. Although we have an explicit formula for *D*∗(*Sin*), this graphical construction can be very useful as it allows the dilution rate that the experimenter should choose to optimise the biogas flow rate to be visualised in the OD.

#### Appendix A.5.2. Hill Growth Rate

This growth function is given by

$$
\mu(S) = \frac{mS^p}{K^p + S^p}, \qquad p \ge 1. \tag{A4}
$$

This function satisfies Hypothesis 1 with *S<sup>m</sup>* = +∞. Moreover, we have

$$\left(\frac{1}{\mu}\right)^{\prime\prime}(S) = \frac{p(p+1)K^p}{mS^{p+2}}$$

Hence, (1/*μ*) > 0, and using Lemma 3, we obtain that Hypothesis 4 is satisfied. Notice that for *p* > 1, the Hill function (A4) is not concave on (0, +∞). Straightforward computations show that

$$\lambda\left(D\right) = \left(\frac{D}{m-D}\right)^{\frac{1}{p}} K, \qquad \gamma(D) = \left(\frac{D}{m-D}\right)^{1/p} \frac{(p+1)m - pD}{p(m-D)} K, \qquad \eta(S) = \frac{K^{-p}S^{p+1} + (p+1)S}{p}.$$

Hence, *S*∗(*Sin*), the (unique) solution of equation *Sin* = *η*(*S*) is the positive solution of equation

$$\mathcal{K}^{-p}\mathcal{S}^{p+1} + (p+1)\mathcal{S} - p\mathcal{S}^{in} = 0.$$

One has explicit formulas for *S*∗(*Sin*) when *p* = 1 (the Monod case) and *p* = 2

$$S^\*(S^{in}) = \left(K^2 S^{in} + \sqrt{K^6 + K^4 (S^{in})^2} \right)^{1/3} - \frac{k^2}{\left(K^2 S^{in} + \sqrt{K^6 + K^4 (S^{in})^2} \right)^{1/3}} \quad \text{if} \quad p = 2.1$$

We can deduce also the explicit expression of *D*∗(*Sin*), the (unique) solution to equation *Sin* = *γ*(*D*) by using (A3). This example illustrates the fact that the second method is much more practicable than the first one, since the direct resolution of equation *Sin* = *γ*(*D*) is not easy.

In Figure A1b, we show the OD, together with the set of best operating conditions Γ and the biogas flow rate *G*(*D*, *Sin*), with *Sin* = 10, for the Hill growth function (A4), with *p* = 2, *m* = 1 and *K* = 5. This figure shows how the optimal dilution rate *D*∗(*Sin*) can be graphically determined. This graphical construction is very useful as it allows the dilution rate that the experimenter should choose to optimise the biogas flow rate to be visualised in the OD. Indeed, the above explicit formula for *S*∗(*Sin*), and hence for *D*∗(*Sin*), is not very informative. Moreover, for *p* > 2, we do not have an explicit formula for *D*∗(*Sin*), whereas the graphical construction can be done for any *p*.

**Figure A1.** The set of best operating conditions Γ (in Red) shows the optimal dilution rate *D*∗(*Sin*) for three increasing growth functions and *Sin* = 10, *a* = 0, *α* = 1.

Appendix A.5.3. Desmond–Le Quéméner and Bouchez Growth Rate

This growth function is given by [66]

$$
\mu(S) = m\varepsilon^{-k/S}.\tag{A5}
$$

This function satisfies Hypothesis 1 with *S<sup>m</sup>* = +∞. Moreover, we have

$$\left(\frac{1}{\mu}\right)^{\prime\prime}(S) = \frac{k}{mS^3} \left(2 + \frac{k}{S}\right) e^{k/S}.$$

Hence, (1/*μ*) > 0, and using Lemma 3, we obtain that Hypothesis 4 is satisfied. Notice that the function (A5) is not concave on (0, +∞). Straightforward computations show that

$$\lambda(D) = \frac{k}{\ln(m/D)}, \qquad \gamma(D) = \frac{k}{\ln(m/D)} \left( 1 + \frac{1}{\ln(m/D)} \right), \qquad \eta(S) = S + \frac{S^2}{k}.$$

Therefore

$$S^\*(S^{in}) = \frac{\sqrt{k^2 + 4kS^{in}} - k}{2} \quad \text{and} \quad D^\*(S^{in}) = \mu \left( S^\*(S^{in}) \right) = me^{-\frac{\sqrt{k^2 + 4kS^{in}} + k}{2S^{in}}}.$$

In Figure A1c, we show the OD, together with the set of best operating conditions Γ and the biogas flow rate *G*(*D*, *Sin*), with *Sin* = 10, for the growth function (A5), with *m* = 1 and *k* = 5. This figure shows how the optimal dilution rate *D*∗(*Sin*) can be graphically determined. Although we have an explicit formula for *D*∗(*Sin*), this graphical construction can be very useful as it allows visualising in the OD the dilution rate that the experimenter chooses to optimise the biogas flow rate.

#### Appendix A.5.4. Haldane Growth Rate

This growth function is given by (5). It satisfies Hypothesis 1, with

$$S^m = \sqrt{\mathbb{K}K\_i} \quad \text{and} \quad \max\_{S \ge 0} \mu(S) = \mu(S^m) = \frac{m}{1 + 2\sqrt{K/K\_i}}.$$

Since *μ*(*S*) < 0 on (0, *Sm*), using Lemma 3, we obtain that Hypothesis 4 is satisfied. We have

$$\lambda(D) = \frac{m - D - \sqrt{\Delta}}{2D} K\_i = \frac{2D}{m - D + \sqrt{\Delta}} K\_\prime \qquad \bar{\lambda}(D) = \frac{m - D + \sqrt{\Delta}}{2D} K\_{i\prime}$$

where <sup>Δ</sup> = (*<sup>m</sup>* <sup>−</sup> *<sup>D</sup>*)<sup>2</sup> <sup>−</sup> <sup>4</sup>*D*2*K*/*Ki*, defined for 0 <sup>≤</sup> *<sup>D</sup>* <sup>≤</sup> *<sup>μ</sup>*(*Sm*). Note that <sup>Δ</sup> tends toward (*<sup>m</sup>* <sup>−</sup> *<sup>D</sup>*)<sup>2</sup> when *Ki* <sup>→</sup> <sup>+</sup>∞. Hence *<sup>λ</sup>*(*D*) <sup>→</sup> *DK <sup>m</sup>*−*<sup>D</sup>* and *<sup>λ</sup>*¯(*D*) <sup>→</sup> <sup>+</sup>∞. We find the case of Monod. Straightforward calculations show that

$$\gamma(D) = \frac{2DK(2m - D + 4DK/K\_i)}{\Lambda + (m - D + 4DK/K\_i)\sqrt{\Lambda}'} \qquad \eta(S) = \frac{(2K + S)K\_iS}{KK\_i - S^2}.$$

The solution of *Sin* = *η*(*S*) is given by

$$S^\*(S^{in}) = \frac{\sqrt{\mathbb{K}K\_i\left((K+S^{in})K\_i + (S^{in})^2\right)} - \mathbb{K}K\_i}{K\_i + S^{in}}.$$

Hence, *D*∗(*Sin*), the solution of *Sin* = *γ*(*D*), is given by (A3), i.e.,

$$D^\*(S^{\dot{m}}) = \mu(S^\*(S^{\dot{m}})) = \frac{m(k\_i + S^{\dot{m}}) \left(\sqrt{K k\_i ((K + S^{\dot{m}}) k\_i + (S^{\dot{m}})^2)} - K k\_i\right)}{2K \left((K + S^{\dot{m}}) k\_i + (S^{\dot{m}})^2\right) + (k\_i + S^{\dot{m}} - 2K) \sqrt{K k\_i ((K + S^{\dot{m}}) k\_i + (S^{\dot{m}})^2)}}.$$

These formulas for *S*∗(*Sin*) and *D*∗(*Sin*) are known in the literature [20]. Note that the equation *Sin* = *γ*(*D*) is equivalent to an algebraic quadratic equation of degree two which can be solved explicitly. We obtain the formula

$$D^\*(S^{in}) = \begin{cases} m\left(\frac{K\_i}{K\_i - 4K} - \frac{K\_i + 2S^{in}}{K\_i - 4K}\sqrt{\frac{KK\_i}{(K + S^{in})K\_i + (S^{in})^2}}\right) & \text{if } K\_i \neq 4K\_i\\ m\frac{S^{in}(4K + S^{in})}{2(2K + S^{in})^2} & \text{if } K\_i = 4K\_i \end{cases}$$

Note that when *Ki* <sup>→</sup> <sup>+</sup>∞, then *<sup>D</sup>*∗(*Sin*) <sup>→</sup> *<sup>m</sup>* \$ 1 − ( *K <sup>K</sup>*+*Sin* % . We find the case of Monod.

On the other hand, equation *γ*(*D*) = *λ*¯(*D*) is equivalent to the third-degree polynomial equation:

$$(4K - K\_i)^2 D^3 + 3mK\_i(4K - K\_i)D^2 + 3m^2K\_i(K\_i - K)D - m^3K\_i^2 = 0.1$$

Therefore *Dc*, considered in Remark 7, is the unique positive solution of this equation and can be computed explicitly. Let us illustrate the results of Section 3.1.4 in the particular case of the Haldane function given by *m* = 1, *K* = 5, and *Ki* = 5. The OD and the set Γ of best operating conditions are depicted in Figure A2. The biogas flow is shown for five values of *Sin*. The curves Γ and Λ<sup>2</sup> intersect at (*Dc*, *Sc*)=(0.293, 9.397). If *Sin* > *Sc*, then the optimal dilution rate *D*∗- *Sin* corresponds to the bistability region (pink region) J2. Depending on the initial condition, the system can go to the washout of the species with no biogas production, or its persistence, with maximal biogas production.

**Figure A2.** The set of optimal biogas production for the Haldane function (5), with *m* = 1, *K* = 5, *Ki* = 5. We have *S<sup>m</sup>* = 5, *D<sup>c</sup>* = 0.293, and *S<sup>c</sup>* = 9.397.

#### Appendix A.5.5. An Example with Two Maxima

It is known that Hypothesis 1 is not enough to guarantee that the biogas flow rate admits a unique global maximum (Hypothesis 4); see Figure 5.1 in [14]. Even if the function *f* is increasing, it is possible that the biogas flow rates have two maxima. For example, consider the function

$$\mu(S) = \frac{mS^6 + S}{K^6 + S^6 + S'} \quad \text{ with } m = 2, \quad K^6 = 0.1,$$

which is obtained from the Hill function (A4) (with *p* = 6) by adding *S* to the numerator and denominator. This function is increasing; see Figure A3a. However, for some values of *Sin*, the biogas flow rate has three local extrema; see Figure A3d. Numerical exploration shows that the the set of arguments of the maximum of *G* is as follows

$$\mathcal{g}(\mathcal{S}^{\dot{m}}) = \begin{cases} \begin{array}{c} 0.705 \\ \{0.786, 1.277\} \end{array} & \text{if} \quad \mathcal{S}^{\dot{m}} = 1 \\\ \begin{array}{c} 0.786, 1.277\text{f} \end{array} & \text{if} \quad \mathcal{S}^{\dot{m}} = 1.7625 \\\ 1.475 & \text{if} \quad \mathcal{S}^{\dot{m}} = 2.1 \end{array}$$

This behaviour is consistent with the plot of the curve Γ; see Figure A3c. The function *η* is given by:

$$\eta(\mathcal{S}) = \mathcal{S} + \frac{\mu(\mathcal{S})}{\mu'(\mathcal{S})} = \mathcal{S} + \frac{(\mathcal{S} + m\mathcal{S}^{\delta})(\mathcal{K}^{\delta} + \mathcal{S} + \mathcal{S}^{\delta})}{\mathcal{K}^{\delta} + \mathcal{S}(m-1)\mathcal{S}^{\delta} + 6\mathcal{K}^{\delta}m\mathcal{S}^{\delta}}.$$

The plot of this function shows that it is not increasing; see Figure A3b. Therefore, from Lemma 3, we can easily predict that the function *γ* is not increasing, as depicted in Figure A3c. Hence, Hypothesis 4 is not satisfied.

**Figure A3.** An increasing growth function with two maxima of the biogas flow rate.

#### **Appendix B. Two-Step Models**

*Appendix B.1. Model Reduction*

The linear change of variables

$$s\_1 = \frac{k\_2}{k\_1} S\_{1\prime} \quad x\_1 = k\_2 X\_{1\prime} \quad s\_2 = S\_{2\prime} \quad x\_2 = k\_3 X\_{2\prime}$$

transforms (12) into

$$\begin{array}{rcl} \dot{s}\_1 &=& D(s\_1^{\text{in}} - s\_1) - f\_1(s\_1)x\_{1\prime} \\ \dot{x}\_1 &=& (f\_1(s\_1) - D\_1)x\_{1\prime} \\ \dot{s}\_2 &=& D(s\_2^{\text{in}} - s\_2) + f\_1(s\_1)x\_1 - f\_2(s\_2)x\_{2\prime} \\ \dot{x}\_2 &=& (f\_2(s\_2) - D\_2)x\_{2\prime} \end{array} \tag{A6}$$

where

$$s\_1^{in} = \frac{k\_2}{k\_1} S\_1^{in}, \quad s\_2^{in} = S\_1^{in}, \quad f\_1(s\_1) = \mu\_1 \left(\frac{k\_1}{k\_2} s\_1\right), \quad f\_2(s\_2) = \mu\_2(s\_2)$$

Therefore, the stoichiometric coefficients *ki*, *i* = 1, 2, 3 are reduced to 1. However, as explained in Section 2.2, we do not work with the reduced model (A6) and we present the results in the original model (12).

#### *Appendix B.2. The Steady States of a Two-Step Model*

The model (12) has a cascade structure, which renders its mathematical analysis easy. There is no additional difficulty compared to the case considered in [26] in which *α*<sup>1</sup> = *α*<sup>2</sup> = *α* and *a*<sup>1</sup> = *a*<sup>2</sup> = 0. We recall that the break-even concentrations were defined in Table 1. We summarize in Table A2 the definitions of some additional auxiliary functions that are used in the description of the steady states of (12).

**Table A2.** Auxiliary functions. The functions *λ*1, *λ*2, and *λ*¯ <sup>2</sup> and *Hi*, *i* = 1, 2 are defined in Table 1.


The system (12) can have up to six steady states, denoted *Eij*, where *i* = 0, 1 and *j* = 0, 1, 2. The convention used is as follows: if *i* = 0, it means that *X*<sup>1</sup> = 0 and if *i* = 1, then *X*<sup>1</sup> > 0. Similarly, if *j* = 0, it means that *X*<sup>2</sup> = 0 and if *j* = 1, 2, then *X*<sup>2</sup> > 0. It should be noticed that *E*00, where *X*<sup>1</sup> = 0 and *X*<sup>2</sup> = 0, is the washout steady state where acidogenic and methanogenic bacteria are extinct; *E*0*i*, *i* = 1, 2, where *X*<sup>1</sup> = 0 and *X*<sup>2</sup> > 0, is the steady state of washout of acidogenic bacteria, while methanogenic bacteria are maintained; *E*10, where *X*<sup>1</sup> > 0 and *X*<sup>2</sup> = 0 is the steady state of washout of methanogenic bacteria, while acidogenic bacteria are maintained; *E*1*i*, *i* = 1, 2, where *X*<sup>1</sup> > 0 and *X*<sup>2</sup> > 0 is the steady state of coexistence of acidogenic and methanogenic bacteria. The components of the steady states are given in Table A3.

**Table A3.** The steady states of (12). The functions *λ*1, *λ*2, and *λ*¯ <sup>2</sup> are defined in Table 1. The functions *<sup>S</sup>in*<sup>∗</sup> <sup>2</sup> , *<sup>X</sup>*<sup>∗</sup> <sup>1</sup> , *X*2*<sup>i</sup>* and *X*<sup>∗</sup> 2*i* , *i* = 1, 2 are defined in Table A2.


**Table A4.** Necessary and sufficient conditions for the existence and stability of steady states of (12). The functions *λ*1, *λ*2, *λ*¯ 2, and *Hi*, *i* = 1, 2 are defined in Table 1.



Λ<sup>1</sup> = 3 (*D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) : *<sup>S</sup>in* <sup>1</sup> = *λ*1(*D*1) := *λ*1(*α*1*D* + *a*1) 4 Λ<sup>2</sup> = 3 (*D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) : *<sup>S</sup>in* <sup>2</sup> = *λ*2(*D*2) := *λ*2(*α*2*D* + *a*2) 4 Λ<sup>3</sup> = 3 (*D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) : *<sup>S</sup>in* <sup>2</sup> <sup>=</sup> *<sup>λ</sup>*¯ <sup>2</sup>(*D*2) :<sup>=</sup> *<sup>λ</sup>*¯ <sup>2</sup>(*α*2*<sup>D</sup>* <sup>+</sup> *<sup>a</sup>*2) 4 Λ<sup>4</sup> = 3 (*D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) : *<sup>S</sup>in* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* <sup>1</sup> = *H*1(*D*) 4 Λ<sup>5</sup> = 3 (*D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) : *<sup>S</sup>in* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* <sup>1</sup> = *H*2(*D*) 4 Λ<sup>6</sup> = 3 (*D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) : *<sup>D</sup>* <sup>=</sup> *<sup>δ</sup>*<sup>2</sup> :<sup>=</sup> *<sup>μ</sup>*2(*S<sup>m</sup>* <sup>2</sup> )−*a*<sup>2</sup> *α*2 4 , I<sup>0</sup> = 3 ( \$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % : *Sin* <sup>1</sup> <*λ*1(*D*1) and *<sup>S</sup>in* <sup>2</sup> < *λ*2(*D*2) 4 I<sup>1</sup> = 3 ( \$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % : *Sin* <sup>1</sup> <*λ*1(*D*1) and *<sup>λ</sup>*2(*D*2)<*Sin* <sup>2</sup> <sup>≤</sup>*λ*¯ <sup>2</sup>(*D*2) 4 I<sup>2</sup> = 3 ( \$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % : *Sin* <sup>1</sup> <*λ*1(*D*2) and *<sup>S</sup>in* <sup>2</sup> <sup>&</sup>gt; *<sup>λ</sup>*¯ <sup>2</sup>(*D*2) 4 I<sup>3</sup> = 3 ( \$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % : *Sin* <sup>1</sup> >*λ*1(*D*1) and *<sup>S</sup>in* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* <sup>1</sup> < *H*1(*D*) 4 I<sup>4</sup> = 3 ( \$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % : *Sin* <sup>1</sup> >*λ*1(*D*1), *<sup>S</sup>in* <sup>2</sup> <sup>≤</sup>*λ*2(*D*2) and *<sup>H</sup>*1(*D*)<sup>&</sup>lt; *<sup>S</sup>in* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* <sup>1</sup> ≤ *H*2(*D*) 4 I<sup>5</sup> = 3 ( \$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % : *Sin* <sup>1</sup> >*λ*1(*D*1), *<sup>S</sup>in* <sup>2</sup> <sup>≤</sup>*λ*2(*D*2) and *<sup>S</sup>in* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* <sup>1</sup> > *H*2(*D*) 4 I<sup>6</sup> = 3 ( \$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % : *Sin* <sup>1</sup> >*λ*1(*D*1), *<sup>S</sup>in* <sup>2</sup> >*λ*2(*D*2) and *<sup>S</sup>in* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* <sup>1</sup> ≤ *H*2(*D*) 4 I<sup>7</sup> = 3 ( \$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % : *Sin* <sup>1</sup> >*λ*1(*D*1), *<sup>λ</sup>*2(*D*2) < *<sup>S</sup>in* <sup>2</sup> <sup>≤</sup>*λ*¯ <sup>2</sup>(*D*2) and *<sup>S</sup>in* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* <sup>1</sup> > *H*2(*D*) 4 I<sup>8</sup> = 3 ( \$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % : *Sin* <sup>1</sup> >*λ*1(*D*1) and *<sup>S</sup>in* <sup>2</sup> <sup>&</sup>gt;*λ*¯ <sup>2</sup>(*D*2) 4

*Appendix B.3. Operating Diagram*

In order to construct the OD of (12), one needs to determine and compute the boundaries of the regions of the diagram, i.e., to compute the parameter values at which a qualitative change in the dynamic behaviour of (12) occurs. These boundaries are six surfaces, denoted Λ*i*, *k* = 1 . . . 6, in the Set of Operating Parameters (SOP)

$$\text{SOP} = \left\{ (D\_\prime S\_1^{in}, S\_2^{in}) : D \ge 0, S\_1^{in} \ge 0 \text{ and } S\_2^{in} \ge 0 \right\}.$$

These surfaces separate SOP in nine regions, denoted I*k*, *k* = 0, ... , 8. These regions correspond to the system behaviour shown in Table A6.


**Table A6.** Existence and stability of steady states of (12) in the nine regions of the operating space. The last column shows the color in which the region is depicted in Figures 5, 6, 8, A4, A5, A7, and A8.

The definitions of the surfaces Λ*<sup>i</sup>* and the regions I*<sup>k</sup>* are given in Table A5. We plot in Figure A6 these surfaces with the biological parameters fixed as in Table A8. Since it is not easy to visualize regions in the three-dimensional operating parameters space, *D* and *Sin* 1 are used as coordinates of the OD, while *Sin* <sup>2</sup> is kept constant. The effects of *<sup>S</sup>in* <sup>2</sup> are shown in a series of operating diagrams; see Figures 5 and A7.

**Remark A1.** *In Figures 5, 6, 8, A4, A5, A7, and A8, presenting ODs, a region is coloured according to the colour in Table A6. Each colour corresponds to different asymptotic behaviour:*


Appendix B.3.1. Operating Diagram in (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) Where *D* Is Kept Constant

The fact that there are nine regions is easily seen when considering the sections of SOP through a plane (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) where *D* is kept constant. Let us denote

$$\delta\_1 = \frac{w\_1 - a\_1}{a\_1}, \quad \delta\_2 = \frac{\mu\_2 (S\_2^m) - a\_2}{a\_2} \tag{A7}$$

The surface Λ<sup>1</sup> is defined for *D* < *δ*1, the surfaces Λ<sup>2</sup> and Λ<sup>3</sup> are defined for *D* < *δ*2, and the surfaces Λ<sup>4</sup> and Λ<sup>5</sup> are defined for *D* < min(*δ*1, *δ*2), where *δ*<sup>1</sup> and *δ*<sup>2</sup> are given by (A7). The intersections of the surfaces Λ*i*, *i* = 1 ... 5, with a plane where *D* is kept constant are straight lines: vertical line for Λ1, horizontal lines for Λ<sup>2</sup> and Λ3, and oblique lines forΛ<sup>4</sup> and Λ5; see Figure A4. We consider in this figure the case *δ*<sup>1</sup> > *δ*2. This case corresponds to the situation where *α*<sup>1</sup> = *α*2, *a*<sup>1</sup> = *a*2, and

$$\mu\_2(\mathcal{S}^{\mathfrak{m}}) = \max\_{\mathcal{S}\_2 \ge 0} \mu\_2(\mathcal{S}\_2) < \max\_{\mathcal{S}\_1 \ge 0} \mu\_1(\mathcal{S}\_1) = \mu\_1(+\infty),$$

which is most likely to occur in a real model. The case *δ*<sup>1</sup> ≤ *δ*<sup>2</sup> is similar; see [42]. Since the curves are straight lines, the nine regions of the OD are easy to picture. The regions are coloured according to the colours in Table A6. This table gives the system behaviour in the nine regions.

Figure A4 shows the following features. For 0 < *D* < *δ*2, all regions exist; see Figure A4a. For increasing *D*, the vertical line Λ<sup>1</sup> moves to the right and tends towards the vertical line defined by *Sin* <sup>1</sup> = *λ*1(*αδ*<sup>2</sup> + *a*1). At the same time, the horizontal lines Λ<sup>2</sup> and Λ<sup>3</sup> move towards each other and tend toward the horizontal line defined by *Sin* <sup>2</sup> = *<sup>S</sup><sup>m</sup>* 2 , so that the regions I1, I4, I6, and I<sup>7</sup> shrink and disappear; see Figure A4b. For *D* = *δ*2, the OD changes dramatically, since regions I1, I4, I6, and I<sup>7</sup> shrink and disappear; see Figure A4b, obtained for *D* < *δ*<sup>2</sup> and *D* ≈ *δ*2. For *D* > *δ*<sup>2</sup> and *D* ≈ *δ*2, regions I0, I<sup>3</sup> invade the whole operating plane, so that regions I2, I5, and I<sup>8</sup> also disappear; see Figure A4c. For *δ*<sup>2</sup> < *D* < *δ*1, only regions I<sup>0</sup> and I<sup>3</sup> appear; see Figures A4d. For increasing *D*, the vertical line Λ<sup>1</sup> moves to the right and tends towards infinity, so that, for *D* ≥ *δ*1, only region I<sup>0</sup> appears.

In Figure A4, the axes are not graduated, because the figure corresponds to a general case where the growth functions *μ*<sup>1</sup> and *μ*<sup>2</sup> verify Hypotheses 2 and 3 and the biological parameters are not specified. The intersections of the OD with planes where *D* is constant provide an easy way to see that the OD contains nine regions. However, as we are interested in this paper in the biogas flow rate as a function of *D*, it is preferable to have ODs that

include *D* as a coordinate and in which, for example, *Sin* <sup>2</sup> is fixed. We describe these diagrams in the following section.

**Figure A4.** The 2-dimensional OD in \$ *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % , obtained by cuts at the *D* constant of the 3 dimensional OD of (12), where *δ*<sup>1</sup> and *δ*<sup>2</sup> are given by (A7). If *D* ≥ *δ*1, the region I<sup>0</sup> invades the whole plane.

Appendix B.3.2. Operating Diagram in (*D*, *Sin* <sup>1</sup> ) Where *<sup>S</sup>in* <sup>2</sup> Is Kept Constant

Since we want to plot the intersections of the regions <sup>J</sup>*<sup>k</sup>* with a - *D*, *Sin* 1 -plane, where *Sin* <sup>2</sup> is kept constant, we must determine the intersections of the surfaces Λ*<sup>i</sup>* with this plane. These intersections are the curves whose equations are given in Table A7.

**Table A7.** Intersections of <sup>Λ</sup>*<sup>k</sup>* with a \$ *D*, *Sin* 1 % -plane, where *Sin* <sup>2</sup> is kept constant.


From the equations of curves Λ<sup>4</sup> and Λ<sup>4</sup> and using the *λ*<sup>2</sup> < *λ*¯ 2, we see that the curve Λ<sup>5</sup> is above the curve Λ4, which is itself above the curve Λ1. Note that Λ<sup>1</sup> and Λ<sup>4</sup> are increasing, while Λ<sup>5</sup> is not necessarily increasing, since *H*2(*D*) is the sum of the increasing function *<sup>k</sup>*<sup>2</sup> *k*1 *λ*1(*α*1*D* + *a*1) and the decreasing function *λ*¯ <sup>2</sup>(*α*2*D* + *a*2). In Figure A5, we have depicted the curves in the particular case where the curve Λ<sup>5</sup> is decreasing. The general case is left to the reader. It is similar to the case (B) and (C) considered in [42].

**Figure A5.** The 2-dimensional OD in \$ *D*, *Sin* 1 % obtained by cuts at the *Sin* <sup>2</sup> constant of the 3 dimensional OD of (12).

From the equations of the curves given in Table A7, we deduce that if 0 <sup>≤</sup> *<sup>S</sup>in* <sup>2</sup> <sup>≤</sup> *<sup>S</sup><sup>m</sup>* 2 , then curves Λ4, Λ<sup>5</sup> and Λ<sup>6</sup> intersect at point

$$\Lambda\_4 \cap \Lambda\_5 \cap \Lambda\_6 = \left\{ \left( \delta\_{2, \frac{k\_1}{k\_2}} (S\_2^m - S\_2^{in}) + \lambda\_1 (a\_1 \delta\_2 + a\_1) \right) \right\} \dots$$

while curves Λ1, Λ<sup>2</sup> and Λ<sup>4</sup> intersect at point

$$\Lambda\_1 \cap \Lambda\_2 \cap \Lambda\_4 = \left\{ \left( \delta(S\_2^{in}), \lambda\_1 (a\_1 \delta(S\_2^{in}) + a\_1) \right) , \quad \text{where} \quad \delta(S\_2^{in}) = \frac{\mu\_2(S\_2^{in}) - a\_2}{a\_2};$$

see Figure A5a,b. Similarly, if *Sin* <sup>2</sup> = *<sup>S</sup><sup>m</sup>* <sup>2</sup> , then

$$
\Lambda\_2 = \Lambda\_3 = \Lambda\_6 \quad \text{and} \quad \Lambda\_1 \cap \Lambda\_5 \cap \Lambda\_6 = \{ (\delta\_2, \lambda\_1 (a\_1 \delta\_2 + a\_1)) \};
$$

see Figure A5c, and if *Sin* <sup>2</sup> > *<sup>S</sup><sup>m</sup>* <sup>2</sup> , then

$$\Lambda\_1 \cap \Lambda\_3 \cap \Lambda\_5 = \left\{ \left( \delta(S\_2^{in}), \lambda\_1(a\_1 \delta(S\_2^{in}) + a\_1) \right) \right\}, \quad \Lambda\_1 \cap \Lambda\_6 = \left\{ (\delta\_{2'} \lambda\_1(a\_1 \delta\_2 + a\_1)) \right\};$$

see Figure A5d. Therefore, the curves intersect as depicted in Figure A5, where the regions are coloured according to the colours in Table A6. This figure shows the following features: For *Sin* <sup>2</sup> <sup>=</sup> 0, only the regions <sup>I</sup>0, <sup>I</sup>3, <sup>I</sup>4, and <sup>I</sup><sup>5</sup> exist; see Figure A5a. For 0 <sup>&</sup>lt; *<sup>S</sup>in* <sup>2</sup> < *<sup>S</sup><sup>m</sup>* 2 , the curve Λ<sup>2</sup> appears, giving birth to I1, I6, and I<sup>7</sup> regions; see Figure A5b. For increasing *Sin* <sup>2</sup> , Λ4, and Λ<sup>5</sup> curves are translated downwards, while the vertical line Λ<sup>2</sup> moves to the right and tends towards the vertical line Λ6, as *Sin* <sup>2</sup> tends to *<sup>S</sup><sup>m</sup>* <sup>2</sup> . For *<sup>S</sup>in* <sup>2</sup> = *<sup>S</sup><sup>M</sup>* <sup>2</sup> , the curve Λ<sup>4</sup> disappears, while Λ<sup>2</sup> becomes equal to Λ6, so that I<sup>4</sup> and I<sup>5</sup> regions have disappeared; see Figure A5c. For *Sin* <sup>2</sup> > *<sup>S</sup><sup>m</sup>* <sup>2</sup> , the curve Λ<sup>3</sup> appears, giving birth to I<sup>2</sup> and I<sup>8</sup> regions; see Figure A5d. For increasing *Sin* <sup>2</sup> , the vertical line Λ<sup>3</sup> moves to the left, while the Λ<sup>5</sup> curve is translated downwards.

#### *Appendix B.4. The Operating Diagram to the AM2 Model*

In this section, we show the ODs of the model (50,51), with the biological parameter values given in Table A8. These parameter values can be found in Tables III and V of [25]. These values have been also used by [11]. The OD in the three-dimensional SOP is shown in Figure A6. The two-dimensional diagrams in the (*D*, *Sin* <sup>1</sup> ) planes where *<sup>S</sup>in* <sup>2</sup> is kept constant are depicted in Figure A7. The two-dimensional diagrams in the (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) planes where *D* is kept constant are depicted in Figure A8.

**Figure A6.** The surfaces Λ<sup>1</sup> (in Blue), Λ<sup>2</sup> and Λ<sup>3</sup> (in Green), Λ<sup>4</sup> and Λ<sup>5</sup> (in Red), and Λ<sup>6</sup> (in Yellow), defined in Table A5 separate the 3-dimensional operating space \$ *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % in 9 regions I*k*, *k* = 0, ··· , 8. Front (**a**), rear (**b**), left (**c**), and right (**d**) view of the surfaces Λ*i*. The biological parameter values are given in Table A8.

**Figure A7.** The 2-dimensional OD in \$ *D*, *Sin* 1 % , obtained by cuts at *Sin* <sup>2</sup> constant of the 3-dimensional OD shown in Figure A6.

**Figure A8.** The 2-dimensional OD in \$ *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 % , obtained by cuts at *D* constant of the 3-dimensional OD shown in Figure A6.


**Table A8.** Nominal parameters values, and *α* = 0, used in Figures 5, 7, 8, A6, A7, and A8.

*Appendix B.5. Maximization of Biogas Production*

Appendix B.5.1. Proof of Proposition 5

From Table 2, it is seen that *G*<sup>02</sup> is defined if and only if *λ*¯ <sup>2</sup>(*D*2) < *Sin* <sup>2</sup> . Since *<sup>λ</sup>*¯ <sup>2</sup>(*D*2) <sup>&</sup>gt; *λ*2(*D*2), the results show that *G*<sup>01</sup> is also defined and *G*01- *D*, *Sin* 2 > *G*02- *D*, *Sin* 2 . This proves the first item of the proposition.

From Table 2, it is seen that *G*<sup>12</sup> is defined if and only if *H*2(*D*) < *Sin* <sup>2</sup> <sup>+</sup> *<sup>k</sup>*<sup>2</sup> *k*1 *Sin* 1 . Since *H*2(*D*) > *H*1(*D*), the results show that *G*<sup>11</sup> is also defined and *G*11- *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 > *G*12- *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 . This proves the second item of the proposition.

If *G*<sup>11</sup> is defined, then *Sin* <sup>1</sup> > *λ*1(*D*1). Hence,

$$S\_2^{in} + \frac{k\_2}{k\_1} S\_1^{in} - H\_1(D) = S\_2^{in} - \lambda\_2(D\_2) + \frac{k\_2}{k\_1} \left( S\_1^{in} - \lambda\_1(D\_1) \right) > S\_2^{in} - \lambda\_2(D\_2).$$

Therefore, if *G*<sup>01</sup> is defined, we have *G*11- *D*, *Sin* <sup>1</sup> , *<sup>S</sup>in* 2 > *G*01- *D*, *Sin* 2 . This proves the third item of the proposition.

#### Appendix B.5.2. Proof of Proposition 6

The proof follows the same ideas and computations as the proof of Proposition 1. See Appendix A.3.1 for the details.

#### Appendix B.5.3. Proof of Proposition 7

Since the functions *γ*<sup>2</sup> and *μ*<sup>1</sup> are increasing, the function *Sin* <sup>1</sup> → *γ*<sup>2</sup> - *μ*1 - *Sin* 1 is increasing. Therefore, the condition *Sin* <sup>1</sup> > *<sup>S</sup>*<sup>0</sup> <sup>1</sup> is equivalent to the fact that the point (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) lies to the right of the curve Σ0. Similarly, if the function *μi*/*μ* <sup>1</sup> is increasing, then the function

$$S\_1^{in} \mapsto \gamma\_2\left(\mu\_1\left(S\_1^{in}\right)\right) + \frac{k\_2}{k\_1} \frac{\mu\_1(S\_1^{in})}{\mu\_1'(S\_1^{in})}$$

is increasing. Therefore the condition *Sin* <sup>1</sup> < *<sup>S</sup>*<sup>1</sup> <sup>1</sup> is equivalent to the fact that the point (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) lies to the left of the curve Σ1.

Appendix B.5.4. Proof of Proposition 8

Equation (49) is equivalent to the equation

*G*0(*D*<sup>∗</sup> <sup>0</sup> (*Sin* <sup>2</sup> )) = *G*1(*D*<sup>∗</sup> <sup>1</sup> (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ))

where *D*∗ <sup>0</sup> (*Sin* <sup>2</sup> ) is the solution to (38) and *D*<sup>∗</sup> <sup>1</sup> (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) is the solution to (40). Therefore, using (34) and (35), we deduce that we need to solve the following system of three equations with four unknowns *Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> , *D*0, and *D*1.

$$D\_0 \left( S\_2^{in} - \lambda\_2(aD\_0) \right) = D\_1 \left( S\_2^{in} + \frac{k\_2}{k\_1} S\_1^{in} - \lambda\_2(aD\_1) - \frac{k\_2}{k\_1} \lambda\_1(aD\_1) \right),\tag{A8}$$

$$S\_2^{in} = \gamma\_2(aD\_0),$$
 
$$.$$

$$S\_2^{in} + \frac{k\_2}{k\_1} S\_1^{in} = \gamma\_2(aD\_1) + \frac{k\_2}{k\_1} \gamma\_1(aD\_1). \tag{A10}$$

Substituting (A9) and (A10) into (A8), we obtain

$$D\_0(\gamma\_2(aD\_0) - \lambda\_2(aD\_0)) = D\_1\Big(\gamma\_2(aD\_1) + \frac{k\_2}{k\_1}\gamma\_1(aD\_1) - \lambda\_2(aD\_1) - \frac{k\_2}{k\_1}\lambda\_1(aD\_1)\Big).$$

Replacing *γ*<sup>2</sup> and *γ*<sup>1</sup> by their expressions (36) and (37), respectively, we obtain

$$D\_0^2 \lambda\_2'(\mathfrak{a} D\_0) = D\_1^2 \left(\lambda\_2'(\mathfrak{a} D\_1) + \frac{k\_2}{k\_1} \lambda\_1'(\mathfrak{a} D\_1)\right).$$

Therefore, *αD*<sup>0</sup> is a solution to equation

$$
\phi(aD\_0) = a^2 D\_1^2 \left(\lambda\_2'(aD\_1) + \frac{k\_2}{k\_1} \lambda\_1'(aD\_1)\right),
$$

where *φ* is as in Hypothesis (8). Using this hypothesis, we obtain *αD*<sup>0</sup> = Δ(*D*1), where Δ is given by (48). Substituting in (A9) and (A10), we obtain

$$S\_2^{\dot{m}} = \gamma\_2(\Delta(D\_1)), \qquad \gamma\_2(\Delta(D\_1)) + \frac{k\_2}{k\_1}S\_1^{\dot{m}} = \gamma\_2(aD\_1) + \frac{k\_2}{k\_1}\gamma\_1(aD\_1).$$

These equations show that the point (*Sin* <sup>1</sup> , *<sup>S</sup>in* <sup>2</sup> ) belongs to the curve C, defined by equations (47). The system formed by the three Equations (A8)–(A10) shows that the reciprocal is also true, i.e., any point on curve C is a point where max*<sup>D</sup> G*<sup>0</sup> = max*<sup>D</sup> G*1. Since the partial derivative of *G*<sup>1</sup> with respect to *Sin* <sup>1</sup> is positive, we see that we have max*<sup>D</sup> G*<sup>1</sup> > max*<sup>D</sup> G*<sup>0</sup> to the right of curve C.

#### **References**

