Model-based optimal recovery of methane production in an anaerobic digestion reactor

An unhealthy condition of a biogas reactor is an abnormal situation characterized by a large reduction of the concentration of the microorganisms in the reactor, causing a reduction of the biogas production. This condition may occur due to too high feeding rate to the reactor. If an unhealthy condition continues for several days, the reactor may get into a washout situation where the methane production may drop considerably. By monitoring the alkalinity ratio or the methane production rate, an unhealthy condition can be recognized. Threshold of the alkalinity ratio or the methane production volume level can be determined by users for the start of applying the optimal recovery procedure. The goal of this study is an investigation on optimal recovery of methane production after determining an unhealthy condition. Our approach is model-based optimization, applied to a simulated reactor. The AM2 model is assumed.


Introduction
Anaerobic digestion, AD, is a biological process in which various microorganisms continuously decompose the organic matter, e.g. waste water sludge, in the absence of oxygen, and generate methane as the most useful product. The microorganisms should remain in the reactor in appropriate concentrations. Microorganisms may under unfortunate conditions exit the reactor at a too high rate, called washout. The washout situation may have several causes. Having too short hydraulic retention time (HRT) can lead to a biomass washout of alkalinity and potentially methanogenic bacteria Aquafix-Team (2019), Usack et al. (2012). Generally, a hydraulic shock can result in washout of filamentous organisms and the drop of removal efficiency. At low HRT, by a hydraulic overload, the microorganisms responsible for the degradation of LCFA were the most susceptible to washout Couras et al. (2014). Even more, transition of the operational temperature from mesophilic to thermophilic was reported as a reason for washout Couras et al. (2014).
The operating condition is not the only reason for biomass washout. Also, the content of sludge is a factor. For instance, lipid-rich waste can be regarded as an agent to produce floating biomass due to being adsorbed to the microbial biomass surface Cirne et al. (2007). Hence, sludge washout can also occur when the wastewater contains large fractions of suspended solids De Mes et al. (2003).
In this case study, we assume that the washout situation is caused by a too short HRT, again caused by too large dilution rate. We use the Anaerobic Digestion Model number 2 (AM2) Bernard et al. (2001), with six state variables to represent the AD reactor.
One previous work is the optimal recovery of biogas production after assumed washout at Foss Biolab, Norway Lie and Haugen (2012).
The outline of the article is as follows. A process and model description is in Section 2. This section also explains unhealthy conditions and how to recognize these conditions. The results of optimal recovery of methane production are presented in Section 3, where we also discuss the optimal steady state dilution rate. Discussion and conclusions are given in Section 4.

Process and model description
An upflow fixed-bed reactor with the effective volume of 0.948 m 3 is assumed Bernard et al. (2001). Reactor feed is raw industrial wine distillery vinasses from local wineries in Narbonne, France. The volume of organic material inside the reactor is assumed constant. The reactor temperature is assumed constant at 35C.
In the AM2 model, biological reactions are acidogenesis and methanogenesis.
• Acidogenesis: (1) • Methanogenesis: By consuming the organic substrate, S 1 , via the acidogenic bacteria, X 1 , carbon dioxide and volatile fatty acids, S 2 , are produced in the acidogenesis step. The methanogenic bacteria, X 2 , uses S 2 for producing the methane and carbon dioxide gases. The reaction rates of the acidogenesis and the methanization are µ 1 X 1 and µ 2 X 2 , respectively, where µ 1 is specific growth rate of acidogenic assuming Monod type kinetics and µ 2 is specific mathanogenic growth rate assuming Haldane kinetics.
The following differential equations, which constitute a state space model of the AD reactor, are obtained from material balances Bernard et al. (2001).
where Z in , S 1in , S 2in , C in in (5)-(8) are, respectively, concentration of the inflow of alkalinity, substrate, VFA and dissolved inorganic carbon. D is the dilution rate, or normalized flow, defined in (9).
F is flow rate and V is the effective volume of the reactor.
The flow of inorganic carbon from the liquid phase to the gas phase, q C , is calculated according to Henry's law, cf. (10).
where k L a is liquid-gas transfer coefficient, K H is Henry's constant, and P C is CO 2 partial pressure. According to (2), the methane flow is directly related to the methanogenic rate, µ 2 , cf. (11).
The three outputs considered here, are flow rates of methane and carbon dioxide, and pH in the reactor, which is given by (12).

Unhealthy reactor conditions
We relate an unhealthy reactor condition to the following two alternative quantities discussed in subsequent sections: 1. Alkalinity ratio (AR) 2. Volumetric methane production threshold
The AR represents reactor stability Lee et al. (2015). AR should be below 0.3 to have a stable AD process in general Drosg (2013). For every specific biogas reactor, the stability limit with regard to AR is different, but the maximum AR reported for stable bioprocesses is 0.8 Drosg (2013).
The model parameters, the initial state values and the profile of the feed sludge are assumed according to Tables 1, 2 and 3, respectively.
The steady state AR changes for different dilution rates, cf. the steady state simulations presented in Figure 1 for dilution rates between 0 and 2.5 d −1 . The threshold of dilution rate to have a stable system (AR ≤ 0.3) is 0.95 d −1 . Therefore, the dilution rate should be less than this threshold to have a stable biogas reactor. If AR > 0.8, most bioprocesses are unstable Drosg (2013). From Figure 1, AR > 0.8 corresponds to D > 1.08 d −1 , which is then the range of D making the AD process unstable. 42.14 -

Methane production volume
Volumetric methane production threshold can be determined by user as a set-point to check the quality .12 * Bin is insignificant at low pH * * ka is affinity constant equals 1.5× 10 −5 mol/L of the reactor. If the methane production volume becomes less than this set-point, the dilution rate will be optimally manipulated to achieve a maximum methane production volume during a certain period. For instance, in Section 3.2.1, the volumetric methane production threshold is assumed 15 mmol/L/d.

Results
We find here the optimal steady state dilution rate from a steady state simulation. The results of the recovery based on this steady state dilution rate will be compared with the results of optimal methane recovery.

Steady state methane gas production
The result of the steady state simulation of a biogas reactor based on Bernard's work Bernard et al. (2001) for 500 days is studied in Attar and Haugen (2017). The methane production in steady state on a range of manipulated dilution rate from 0 to 2.5 d −1 is shown in Figure 2. With a rising dilution rate also methane production increases but only until an optimal point. Figure 2 shows that the optimal steady state dilution rate,D s,opt is 0.94 d −1 . For the dilution rate larger than 0.95, the AD process is in an unhealthy condition. If the dilution rate becomes larger than 1.25 d −1 , there is almost no methane production and washout exists.

Optimal methane recovery of reactor after unhealthy conditions
It is assumed that the dilution rate is constant and the reactor works in a steady state stable condition. Suddenly, the dilution rate is increased to a value larger than D s,opt . This causes the methane production to increase in a transient phase, but the reactor becomes unstable after few hours. We here state optimal recovery of the reactor as an optimization problem where the (accumulated) volume In dilution rate axes, the green band shows a range of dilution rate for which the AD process is stable. The red band represents instability.
of the methane production during a certain number days, T , is maximized. The optimization problem is stated as where is the objective function. The time 0 refers to the start of the recovery period. T is a recovery period and it is assumed 100 days here. MATLAB's fmincon function is used to solve the optimization problem. The optimal dilution rate for the optimal recovery has a dynamic variation, and is thus different from the steady state optimal dilution rate which is constant. Figure 3 illustrates the results on biogas production consisting of the flow rates of methane and carbon dioxide, pH, the state variables and AR over three reactors conditions.

The volumetric methane production threshold
It is assumed that the operating dilution rate is 0.43 d −1 , corresponding to a steady state stable condition. Then, we change the dilution rate to 1.45 d −1 . This causes the methane production to increase from 80 to 160 mmol/L/d, while the amount of both acidogenic and methanogenic bacteria concentrations dramatically decrease. The reactor becomes unhealthy after few hours, and 80% of the volume of the methane production decreases during about 12 days, see the cyan and black curves in Figure 3 over the stable operating condition and the unhealthy condition. The start point of the optimal recovery is based on considering a methane production threshold equal to 15 mmol/L/d. Both the optimal recovery dilution rate and the optimal steady state dilution rate are shown for the recovery period. The optimal recovery of methane production explains how dilution rate should be changed to return to a healthy condition with maximum methane production, see the blue curve in Figure  3. If we apply the optimal steady state dilution immediately after recognizing the unhealthy condition, recovery takes more days to reach the stable methane production, so-called recovery time (T r ), compared to applying the optimal recovery dilution rate. In this case, the recovery with the optimal steady state dilution rate needs 53 days to become a stable system while the optimal recovery just takes 17 days, see Table 4. Also, compare the magenta curve with the blue curve in Figure 3. To summarize, with optimal recovery, the methane production goes to steady state faster and the system becomes stable quicker compared to immediately switching the dilution rate to the optimal steady state dilution rate obtained.

Washout condition
As the unhealthy condition becomes worse, more microorganisms leave the digester. The worst unhealthy condition is washout. Here, we assumed the washout situation occurs when methane production rate be-

Unhealthy condition
Optimal recovery Recovery based on applying optimal steady state dilution rate Figure 3: Optimal recovery of methane production based on methane production threshold of 15 mmol/L/d. Along the time axis, the blue band represents stable operation conditions. The red band represents unhealthy conditions, and the green band is the recovery period.  Figure 4: Optimal recovery of the methane production after a washout situation. In time axis, the blue band is a stable operating condition. The red band represents unhealthy condition and the green band is the recovery period. comes less than 0.1 mmol/L/d. Figure 3 shows the results of the optimal recovery after washout has occurred.
The results are as follows. Firstly, we need more days to be able to compare the results of the optimal recovery and the recovery by optimal steady state dilution rate. Comparisons are over 400 days. The optimal recovery needs 50 days to return back to a stable system, while as applying the optimal steady state dilution rate needs 271 days to become stable again after washing out. There is a comparison between two methods of recovery in Table 5.

Alkalinity ratio threshold
The alkalinity ratio criterion gives a relatively fast indication of an unhealthy condition. The simulation is repeated in the same assumptions in above, now with the Alkalinity ratio criterion of 1. The results are shown in Figure 5.
The behaviour of the optimal dilution rate is shown in Figure 6. For about 10 hours, the dilution rate is relatively low, around 0.05 d −1 . In this period, AR  decreases, and gets into the range of 0.3 -0.8. Then, the dilution rate increase to D s,opt during 2 days. The methane production rate becomes stable after 15 days, see Table 6.

Discussion and conclusions
This paper is based on a model-based simulation study. There are several models for representing an AD reactor. The AM2 model is used in this study because the AM2 model is a recognized model, which is also relatively simple making the comprehensive numerical  Figure 6: The behaviour of the optimal dilution rate regarding AR criterion > 1.
calculations in this article practicable. The unplanned washout of microorganisms is a crucial problem in the operation of biogas reactors. It is important to know whether there is any optimal solution for recovery of the reactor. In this study, we simulated the consequences of considerably reducing the concentration of microorganisms inside the reactor by feeding abruptly too high dilution rate.
The unhealthy condition is recognized here by alkalinity ratio or volumetric methane production threshold as a start time for applying a recovery method. The start time for recovering is an important parameter. If the reactor is in an unhealthy condition for a few days, washout would happen. Therefore, the more microorganism left the reactor and recovering takes more time.
The methane recovery is applied by manipulating the dilution rate.
In this case study, we applied two recovery procedures. The first procedure is recovering based on applying a steady state optimal dilution rate. The second procedure is an optimal recovery based on an optimization problem to maximize methane production with regard to dilution rate. The results of the optimal methane recovery show that we should reduce the dilution rate dramatically in the start of a recovery period and then it would be increased during a few days until a stable level is reached close to the optimal steady state dilution rate. This pattern of the dilution rate gives time to microorganisms to grow up again. By the optimal recovery, the reactor not only produces more methane but also becomes stable faster.

Nomenclature
The nomenclature is in alphabetical order.