Nonlinear Optimization-Based Robust Control Approach for a Two-Stage Anaerobic Digestion Process
Abstract
A two-stage anaerobic digestion (AD) process has been applied to improve the efficiency of methane production from various organic materials. However, the performance of traditional process controllers may be limited by differences in the rate of biochemical reactions, process uncertainties, and the consequences of interconnection between the two bioreactors. In this work, a nonlinear optimization-based control strategy that applies an analytical model predictive control (AMPC) scheme with an adaptive optimal set-point is proposed for the control of the two-stage AD system. The objectives of the proposed control system are to stabilize the system under uncertain operating conditions and maximize biomethane production. The optimal set-points for the controller are adapted in real-time operation, and then the control system is performed to manipulate the controlled output to the optimal trajectories. Compensators and nonlinear state observers are applied to handle the process/model mismatch and estimate unmeasured variables. The proposed control system is applied to the process with disturbances, fluctuations of inlet stream concentrations, and changes in the bacterial growth rate, and the control performance is investigated. Simulation results show that the developed control scheme automatically adjusts the optimal set-points and provides adequate control actions to maintain the maximum rate of methane production. The results of this investigation demonstrate that the control strategy promotes different biochemical reactions, avoids the inhibition effect, and handles the mutual effects between acidogenic and methanogenic bioreactors for methane production effectively.
1. Introduction
Anaerobic digestion (AD) is a biochemical process to convert various organic materials to biogas that provides incentives for wastewater treatment. Since the AD process involves different microbial communities, the growth of microorganisms and the consumption of substrates in wastewater are important factors for methane production. Several advantages of the AD process include high efficiency of organic removal, smaller space requirements, and low sludge production [1]. However, the optimal condition for the whole microbial community is crucial because each microbial community requires different conditions for its growth [2]. Furthermore, some microorganisms are highly sensitive to environmental factors, thereby making it difficult to control and stabilize the AD processes. Control strategies for the AD processes have been proposed to improve efficiency, maintain stability, and meet environmental regulations.
During the past decades, several works have been proposed to develop control systems for bioprocesses, different types of control techniques and structures were developed to achieve their control objectives and desired targets [3, 4]. Liu et al. proposed a cascade model predictive control (MPC) and proportional integral derivative (PID) control strategy for the Benchmark Simulation Model 1 (BSM1) [5]. The analysis of control performance was conducted by a simulation using the identified prediction error method (PEM) to control the effluent NO3 concentration. Since the methanogenic bacteria consume volatile fatty acids (VFAs) to produce methane, control strategies have been developed to regulate the VFAs’ concentration in bioreactor systems. García-Sandoval et al. proposed a cascade hybrid (continuous-discrete) controller for single-stage AD systems [6]. A continuous inner loop of the control system is used to control the VFA concentration and updates its reference according to the discrete outer loop information of the COD concentration. Rincón et al. developed an adaptive controller for a single-stage anaerobic digester with input constraints [7]. The control system was formulated by an application of Lyapunov-like function method; a state observer was combined to handle the saturation of the control input and estimate the unknown parameters. Robles et al. developed a fuzzy-logic controller to maximize biomethane production by controlling the VFA content in the effluent of a fixed-bed anaerobic reactor [8]. The controller was applied to a pilot-scale reactor to improve the process performance of a winery wastewater treatment. Recently, Kil et al. developed a control system based on nonlinear model predictive control (NMPC) algorithms for an AD system; the control approach was applied to the reduced model of a single-stage AD process [9]. In the studies, biogas flow rate was controlled to follow a defined set-point, and then the simulation results were compared with a traditional PID controller. Lara-Cisneros et al. proposed an extremum-seeking control strategy with a sliding mode to achieve the dynamic optimization of methane production for a single-stage AD process [10]. An open-loop analysis for a two-population model in the work showed that the accumulation of VFAs in the bioreactor can lead to system instability. The controller was designed to regulate the VFA concentration close to the optimal set-point while improving methane production.
However, the performance of widespread application AD processes may be limited by the highly nonlinear behaviors, such as differences in the rate of biochemical reactions, constraints on state and manipulated variables, and uncertainties of the system. To improve the stability and efficiency of the process, a novel bioreactor configuration design based on biological pathways has been proposed [11]. Pohland and Ghosh proposed to increase the production rate and improve the process stability of an AD process using two different reactors [12]. The first reactor is used to promote hydrolysis and acidogenesis, while the second reactor is applied to support acetogenesis and methanogenesis. Experimental studies have been conducted to support the significant motivation of this concept, develop process models, and improve the process operation [11, 13, 14]. Advanced control systems have been proposed to handle the process disturbances of the two-stage AD system and avoid the process instability. Furthermore, computer technologies have been applied to AD systems for process monitoring and control [15]. Méndez-Acosta et al. have proposed an extended study of the hybrid cascade controller to regulate both VFA and COD concentrations in two-stage AD processes [6, 15]. The change in concentration of the inlet stream is an important problem that commonly occurs in AD processes. The inlet stream with a low substrate concentration can reduce the methane production rate, but the inlet stream with a very high concentration leads to the inhibition of bacterial growth [16, 17]. A consequence of the interconnection between the two bioreactors is changes in the inlet VFA concentration of the second-stage reactor, which can reduce the methane production rate or inhibit the growth rate of methanogens. Because the two bioreactors of two-stage AD processes are connected in series, conventional controllers are usually applied to each reactor separately without consideration of variables that mutually affect the operation of the other one.
In this work, a nonlinear optimization-based control strategy that applies an analytical model predictive control (AMPC) technique with adaptive optimal set-points is proposed for the control of a two-stage AD system. The concept of AMPC is based on the input/output (I/O) linearization, which is considered a specific case of the model predictive control framework. The control action can be derived by minimizing a function norm of the deviations of the controlled outputs from its requesting linear reference trajectories. The main objectives of the proposed control system are to stabilize the system under uncertain operating conditions and maximize biomethane production. The AMPC controllers apply the adaptive optimal set-points, integral actions, and nonlinear state observer to enhance control robustness. The first control subsystem employs the inlet stream variables to compute the updated set-points that enhance the VFA formulation. The second control subsystem aims to enhance methane production at each time point by handling the bacterial growth rate and avoiding inhibition effects from a high concentration of accumulated VFAs. The state estimation can be used as an alternative task to estimate unmeasured states for the monitoring system, especially in the case of signal lacking from the online measurement. To promote the consumption of organic substrate and production of biomethane, the state and control variables of the two reactors must be incorporated by the control system to provide optimal control actions. Control performance of the control strategy is investigated by computer simulation and then compared with the results of a traditional PID controller. The advantages of the proposed control system, compared to classical controllers, are the ability to maximize the methane production rate during the operation; the availability of adaptive optimal set-points; and the application with few required tuning parameters to achieve the updated targets.
2. Preliminaries
2.1. Problem Formulation
2.2. Control Strategy for the Two-Stage Anaerobic Digestion Process
The second control subsystem attempts to maximize methane production by regulating the input stream that supports the growth of methanogens in the second bioreactor. It should be noted that the adjustment of the first control subsystem can cause a fluctuation of the substrate concentration for the second stage. Furthermore, the maximum growth rate of two-stage methanogens could change due to the diversity of the microbial group, thereby making it difficult to compute the control actions that can attain the maximum rate of methane production. A winery wastewater treatment is used to demonstrate the coupled effects of the first-stage substrate concentration and the second-stage maximum growth rate of methanogens on the methane production rate. An open-loop profile of methane flow rate is simulated by varying the inlet substrate concentration of the first-stage reactor and the second-stage maximum growth rate of methanogens. The evolution of the open-loop profile with an optimal set of dilution rate [18] is illustrated in Figure 1. More details of the mathematical model are given in the next section.

3. Mathematical Model of a Two-Stage Anaerobic Digestion Process
The wine industry produces a large amount of wastewater with variability throughout the year [23]. A two-stage AD process for winery wastewater treatment is considered as a case study in this work. As shown in Figure 2, the process composes of two continuous stirred-tank reactors (CSTR) connected in series. The bacterial populations are assumed to be divided into two groups with homogeneous characteristics. Anaerobic digestion can be described by two-step biological reactions for each reactor, acidogenesis and methanogenesis [1]. In acidogenesis, the organic substrate (characterized by chemical oxygen demand, COD) is converted to volatile fatty acids (VFAs) and carbon dioxide (CO2) by acidogenic bacteria. Then, the methanogenic bacteria use the accumulated VFAs from the first stage for their growth and produce methane and CO2. The operating conditions for two-stage bioreactors are generally designed to promote different biochemical reactions. The first reactor is used to promote hydrolysis/acidification, while the second one is used to support acetogenesis/methanogenesis.

-
(A1) The bacterial populations in the CSTR system are divided into two main groups, acidogens and methanogens. The anaerobic digestion of each reactor can be described by acidogenesis and methanogenesis.
-
(A2) The pH of each reactor is effectively regulated in a range; the impact of pH on bacterial growth can be ignored.
-
(A3) COD and VFA concentrations are available online in normal operations.
Parameter | Meaning | Value |
---|---|---|
X1,in | Inlet concentration of acidogen | 0.1 g/L |
X2,in | Inlet concentration of methanogen | 0.1 g/L |
S1,in | Inlet concentration of organic substrate | 10 g/L |
S2,in | Inlet concentration of VFAs | 40 mmol/L |
Zin | Inlet concentration of alkalinity concentration | 62 mmol/L |
Cin | Inlet concentration of inorganic carbon concentration | 65 mmol/L |
μ1max | Maximum growth rate of acidogenic biomass | 4.2 d−1 |
μ2max | Maximum growth rate of methanogenic biomass | 0.36 d−1 |
KS1 | Half-saturation constant for S1 | 0.023 g/L |
KS2 | Half-saturation constant for S2 | 2.3 mmol/L |
KI2 | Inhibition constant for S2 | 66.67 mmol/L |
Y1 | Biomass yield for acidogens | 0.11 g/g |
Y2 | Biomass yield for methanogens | 0.00236 g/mmol |
Y3 | Yield for CO2 production | 50.6 mmol/g |
Y4 | Yield for CO2 production | 343.6 mmol/g |
Ym | Yield for CH4 production | 1.07 mmol/g |
c | Stoichiometric coefficient of the conversion of S1 to S2 | 16.95 mmol/g |
PT | Total pressure | 1 atm |
KH | Henry’s constant | 0.0246 kg·mol/m3bar |
KLa | Liquid/gas transfer rate | 19.8 d−1 |
4. Formulation of the Control System
4.1. Nonlinear Optimization Problem for the Two-Stage Anaerobic Digestion Process
4.2. Nonlinear State Observer and Integral Action
4.3. The Control System
Consider a compact form of the process with unmeasured disturbances as follows:

The flowchart in Figure 4 demonstrates the procedure of the developed control system applied to the two-stage AD process. The developed control system is performed to provide the control actions u1 and u1 for the two-stage process: the input constraints are applied to limit the adjustment of the manipulated inputs, the dilution rate for each reactor, and to avoid the washout of biomass. Then, the state variables, including the outputs, are fed back to the controller and are applied to calculate the integral actions for the next time step. A computer-implemented simulation in MATLAB is conducted to investigate the closed-loop responses of the proposed control system.

5. Results and Discussion
5.1. Closed-Loop Responses
The process model presented in equation (11) is simulated to express the dynamic behaviors of the two-stage anaerobic digestion process. Simulations are performed for the closed-loop system; and the control performances are investigated through various problems. The initial conditions are applied: X1(0) = 0.1 g/L, X3(0) = 0.1 g/L, X4(0) = 0.1 g/L, S2(0) = 40 mmol/L, Z(0) = 62 mmol/L, and C(0) = 65 mmol/L [18]. The closed-loop simulation results of the proposed control system are compared with a traditional PID controller, with the tuning parameters, Kp,1 = 10, KI,1 = 0.001, Kd,1 = 0.00001, Kp,2 = 0.08, KI,2 = 0.0000001, and Kd,2 = 0.0000001. In all simulations, the two-stage process is operated with the same initial conditions used in the closed-loop system. The developed controller employs the adaptive set-points with the tuning parameters, ε1 = 0.5s, ε2 = 1s, λ1 = 0.1s−1, and λ2 = 0.1s−1. The maximum difference in the dilution rates between the reactors is 30%, with lower bounds and upper bounds, u1,lb = 0.1d−1u2,lb = 0.1d−1, u1,ub = 0.7d−1, and u2,ub = 0.7d−1. Closed-loop responses of the VFA concentration, methanogenic biomass concentration, the dilution rates, and methane flow rates are shownin Figures 5–7, respectively. As explained above, the operating condition of the first-stage reactor is adjusted to promote the VFA formulation, and then the accumulated VFAs are fed to support the methanogenesis in the second one. Thus, a high VFA concentration is presented in the process response of the first bioreactor, while the responses of the second bioreactor showed a high methane flow rate corresponding to the growth of the second-stage methanogens. The simulation results show that the controllers successfully force the controlled outputs to follow the adaptive optimal set-points asymptotically. From the results, it is clear that the developed control system can be used to support different control objectives for the two-stage bioreactor. The results demonstrate that the developed control system could achieve better control performance with faster responses compared with the PID controller.



5.2. Control Performance
The robustness of the developed control system is investigated by changing the inlet COD concentration in the feed for the first bioreactor [30, 31]. The process is operated with the same parameters applied in the closed-loop system before unmeasured disturbances, being a 20% increase in the inlet COD concentration (S1,in) after 25 days and a 50% increase in S1,in after 40 days, are introduced. Then, the inlet COD concentration changes to 13 g/L after 5 days and 17 g/L after 60 days. The responses of the proposed control scheme to the regulatory tests, compared to the PID control responses, are illustrated in Figures 8 and 9. To handle the problem, the first-stage optimal set-points corresponding to the fluctuating substrate concentration were adjusted and the first-stage control subsystem is performed to manipulate the controlled output at the optimal trajectories. Due to the changes in the first-stage VFA outlet concentration, affected by the proposed disturbances, the second-stage control subsystem needs to handle the fluctuations of the interconnecting stream and stabilize the process to maintain the maximum methane flow rate. It can be seen that the developed control system successfully forces the outputs to follow the optimal conditions updated at each time instant under the process constraints. Notice that the developed control scheme is capable of handling the introduced problems; the manipulated inputs of the second bioreactor were adjusted properly under the condition with fluctuating concentrations of inlet VFAs to enhance the methane production and avoid the effects of the inhibition. Meanwhile, the process responses under the PID controller showed the ability to manipulate a range of changes and are nearly uncontrollable after 45 days.


Since AD processes involve different microbial communities, regulatory tests related to the maximum growth rate are introduced during the process operation to investigate the robustness of the proposed control system. The process is operated with the same parameters applied in the normal closed-loop system before unmeasured disturbances, being a 20% increase in μ2max after 25 days and a 30% increase in μ1max after 35 days, are introduced. Following this, unmeasured step disturbances are added: 30% decrease in μ1max and 10% decrease in μ2max after 40 days, 20% increase in μ2max after 45 days, 30% increases in μ1max and μ2max after 50 days, and 50% increase in μ1max and μ2max after 55 days. To handle this problem, the control system is required to maintain the maximum rate of methane production under the condition with changes in the bacterial growth rate. The responses to the proposed control scheme on the tests are depicted in Figures 10 and 11. The optimal set-point was automatically adjusted to create trajectories that can maximize methane production, and the second-stage control subsystem can stabilize the system with high methane production rates under the process constraints. Due to the limitation of the PID controller under the highly nonlinear processes, the responses showed that it can only stabilize the process with small changes in the maximum growth rate.


The developed control system is further investigated by introducing coupled disturbances, and changes in both the maximum growth rate and inlet COD concentration. The process is operated with the same parameters applied in the closed system before unmeasured disturbances, being a 30% increase in μ1max and μ2max after 30 days, are introduced. For this test, the following coupled step disturbances are added: 30% increase in S1, in after 40 days, 30% decrease in μ1max and 10% decrease of μ2max after 50 days, and 30% increase in S1,in, 50% increase in μ1max and μ2max after 60 days. The responses of the proposed control scheme on the regulatory tests are depicted in Figures 12 and 13. It is clear from the results that the proposed control strategy successfully improved the robustness and performance of the two-stage AD process.


6. Conclusion
This research has proposed a nonlinear optimization-based control system for the two-stage anaerobic digestion process. The control strategy was developed to handle the problems that mutually affect the two reactors and reject the unmeasured disturbances while maintaining methane production at a maximum rate. In simulation experiments, fluctuations in inlet stream concentration and changes in the bacterial growth rate were introduced to investigate the control performance and robustness. The control system presented excellent performance under conditions of coupled disturbances by automatically adjusting the optimal set-points and providing adequate control actions to achieve the updated targets. The advantages of the resulting control scheme are that the controller requires only a few tuning parameters and it can maximize methane production under conditions of severe disturbances and process constraints.
Abbrevation
-
- c:
-
- Stoichiometric coefficient of the conversion of S1 to S2 (mmol/g)
-
- C:
-
- Inorganic carbon concentration (mmol/L)
-
- D:
-
- Dilution rate
-
- f, h, M, N:
-
- Nonlinear functions
-
- KI2:
-
- Inhibition constant for S2 (mmol/L)
-
- KH:
-
- Henry’s constant (kg mol/m3bar)
-
- KLa:
-
- Liquid/gas transfer rate (d-1)
-
- KS1:
-
- Half-saturation constant for S1 (g/L)
-
- KS2:
-
- Half-saturation constant for S2 (mmol/L)
-
- PT:
-
- Total pressure (atm)
-
- Q:
-
- Gas flow rate
-
- r:
-
- Relative order
-
- S1:
-
- Concentration of organic substrate (g/L)
-
- S2:
-
- Concentration of VFAs (mmol/L)
-
- t:
-
- Time
-
- u:
-
- Vector of manipulated input
-
- X:
-
- Biomass concentration (g/L)
-
- Y1:
-
- Biomass yield for acidogens (g/g)
-
- Y2:
-
- Biomass yield for methanogens (g/mmol)
-
- Y3:
-
- Yield for CO2 production (mmol/g)
-
- Y4:
-
- Yield for CO2 production (mmol/g)
-
- Ym:
-
- Yield for CH4 production (mmol/g)
-
- y:
-
- Vector of controlled output
-
- Z:
-
- Alkalinity concentration (mmol/L)
-
- ε:
-
- Tuning parameter
-
- η:
-
- The integral of error
-
- μ1max:
-
- Maximum growth rate of acidogenic biomass (d−1)
-
- μ2max:
-
- Maximum growth rate of methanogenic biomass (d−1)
-
- ξ:
-
- Vector of state variables
-
- ν:
-
- Compensated set-point
-
- in:
-
- Inlet concentration
-
- sp:
-
- Set-point.
Conflicts of Interest
The authors declare that there is no conflict of interest regarding the publication of this paper.
Acknowledgments
This work was supported by King Mongkut’s University of Technology North Bangkok (Contract no. KMUTNB-62-KNOW-10). Support from this source is gratefully acknowledged.
Open Research
Data Availability
All data generated or analyzed during this study are included in this published article.