scieee AI-readable full text Open interactive document viewer

Full-Scale Digesters: An Online Model Parameter Identification Strategy

Cortés Ocaña, Luis Gabriel; Barbancho Concejero, Julio; Larios Marín, Diego Francisco; Marín-Batista, José Daniel; Fernández Mohedano, Ángel; Portilla Caicedo, Christian Roviro; Rubia Romero, María de los Ángeles de la

Abstract

This work presents a new standard in the model, identification, and control of monitoring purposes over anaerobic reactors. One requirement that guarantees a normal controller operation is for the faculty to measure the data needed periodically. Due to its inability to easily obtain the concentrations of acidogenic bacteria and methanogenic archaea periodically using reliable and commercial sensors, this paper presents an algorithm composed of an asymptotic observer (considering the reaction rates are unknown), aiming to estimate these concentrations. This method represents a significant advantage because it is possible to perform a resource-saving strategy using standard measurements, such as pH or alkalinity, to calculate them analytically in natural environments. Additionally, two yield parameters were included in the original anaerobic model two (AM2) to unlock implementations for a wide range of organic substrates. The static parameter identification was improved using a new method called step-ahead optimization. It demonstrates significant improvements fitting the mathematical model to data until a 78.7% increase in efficiency (compared with the traditional optimization method genetic algorithm). After the period of convergence, the state observer evidences a small error with a maximum 2% deviation. Finally, numerical simulations demonstrate the structure’s strengths, which constitutes a significant step in paving the way further to implement feasible, cost-effective controls and monitoring systems in the industry.

Full text

Citation: Cortés, L.G.; Barbancho, J.; Larios, D.F.; Marin-Batista, J.D.; Mohedano, A.F.; Portilla, C.; de la Rubia, M.A. Full-Scale Digesters: An Online Model Parameter Identification Strategy. Energies 2022, 15, 7685. https://doi.org/10.3390/ en15207685 Academic Editor: Giovanni Esposito Received: 21 August 2022 Accepted: 8 October 2022 Published: 18 October 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/). energies Article Full-Scale Digesters: An Online Model Parameter Identification Strategy Luis G. Cortés 1,*, J. Barbancho 1, D. F. Larios 1, J. D. Marin-Batista 2,3, A. F. Mohedano 3, C. Portilla 4 and M. A. de la Rubia 3 1Departamento de Tecnología Electrónica, Escuela Politécnica, Universidad de Sevilla, 41011 Seville, Spain 2Efuels Technologies Ltd., 42-44 Bishopgate, London EC2N 4AH, UK 3Departamento de Ingeniería Química, Campus de Cantoblanco, Universidad Autonoma de Madrid, 28049 Madrid, Spain 4Facultad de Minas, Universidad Nacional de Colombia, Robledo, Medellín 050034, Colombia *Correspondence: luicor[email protected] Abstract: This work presents a new standard in the model, identification, and control of monitoring purposes over anaerobic reactors. One requirement that guarantees a normal controller operation is for the faculty to measure the data needed periodically. Due to its inability to easily obtain the concentrations of acidogenic bacteria and methanogenic archaea periodically using reliable and commercial sensors, this paper presents an algorithm composed of an asymptotic observer (considering the reaction rates are unknown), aiming to estimate these concentrations. This method represents a significant advantage because it is possible to perform a resource-saving strategy using standard measurements, such as pH or alkalinity, to calculate them analytically in natural environments. Additionally, two yield parameters were included in the original anaerobic model two (AM2) to unlock implementations for a wide range of organic substrates. The static parameter identification was improved using a new method called step-ahead optimization. It demonstrates significant improvements fitting the mathematical model to data until a 78.7% increase in efficiency (compared with the traditional optimization method genetic algorithm). After the period of convergence, the state observer evidences a small error with a maximum 2% deviation. Finally, numerical simulations demonstrate the structure’s strengths, which constitutes a significant step in paving the way further to implement feasible, cost-effective controls and monitoring systems in the industry. Keywords: anaerobic digestion; asymptotically observer; homogeneous reaction systems; step-ahead; volatile fatty acids 1. Introduction Anaerobic digestion (AD) is a complex biological process wherein anaerobic microorganisms break down the biodegradable fraction of the biomass into biogas (a mixture of gases, mainly 50–80% CH 4 and 30–50% CO 2 ), which can be used as a valuable energy source (5.5–7 kWh/m 3 of biogas) [ 1 ]. In the EU, the development of the biogas industry was prompted by the introduction of various support schemes (feed-in-tariff, green certificates, and fiscal incentives/subsidies) and changes in energy and climate policies [ 2 ]. Nowadays, the EU is the world leader in biogas electricity production, with 10 GW installed capacity and a number of 17.667 biogas plants running on energy crops (39%), animal manures (39%), sewage sludge (5%), food and beverage (4%), municipal waste (4%), and others (9%) [ 3 ]. Despite the widespread application of AD technology, full-scale biogas plants are mainly operated manually [ 4 ]. Consequently, plant operators struggle to achieve efficient operations while striving with intrinsic difficulties of the AD process, such as: (i) highly nonlinear behavior; (ii) high sensitivity to uncontrollable input perturbations; (iii) limited online measurement of state variables [ 5 – 7 ]. This is why the control and online monitoring of the anaerobic digestion process is a hot area of research and development [8]. Energies 2022,15, 7685. https://doi.org/10.3390/en15207685 https://www.mdpi.com/journal/energies Energies 2022,15, 7685 2 of 17 In the last decade, several control methodologies for a closed-loop feed control of AD have been proposed to achieve process stabilization and/or maximization of methane production. It is well-known that classical control methods (e.g., proportional-integral- derivative (PID) controllers and PID controller cascades) yield unsatisfactory performances when the plant is subjected to significant set-point changes, as they cannot cope with the nonlinearities of the AD process. Gaida et al. [ 4 ], García-Diéguez et al. [ 6 ], and Méndez-Acosta et al. [ 8 ] have reported summaries of the advantages and drawbacks of several control schemes, pointing out that adaptive control strategies and rule-based expert approaches (e.g., fuzzy controls, artificial neural networks) account for nonlinearities of the AD process. However, these control strategies cannot be applied to full-scale plants because large amounts of data are needed to train the neural network, and very often, it is not possible to obtain data covering a broad range of operating conditions [9]. In recent years, non-linear model predictive control (NMPC) has become the principal advanced control methodology to describe the behavior of a highly non-linear bioprocess [10] . NMPC stems from the idea of employing a representative model of the process, which is used to predict the future behavior of the plant. This prediction capability allows optimal control problems to be solved online, where tracking errors (namely the differences between the predicted output and the desired reference) are minimized over a future horizon [ 11 ]. To date, few studies are available where NMPC has been used to control the AD process. For instance, Mauky et al., 2016 [ 12 ] proposed an NMPC to adapt biogas production according to a fluctuating timetable of energy demand. Briefly, the set point (reference) of the system output (in this case, biogas flow) varies concerning the requested energy from the power grid. Thus, the control input (feeding rate) was computed by the NMPC so that the system output follows the reference scenario. This controller was validated by full-scale experiments and showed promising results [13]. Nevertheless, the accuracy of NMPC depends on the capacity of the phenomenological-based model to represent reality, which derives from the accuracy of the model parameters [14]. A practical model for control is the named anaerobic model two (AM2) proposed by Bernald et al. [ 15 ], which consists only of two reaction dynamics (the acidogenesis step and the methanogenesis step) and six state variables: acidogenic bacteria (X 1 ), methanogenic archaea ( X2 ), organic substrate concentration ( S1 ) expressed as total chemical oxygen demand (COD), volatile fatty acids (VFA) ( S2 ), inorganic carbon ( C ), and total alkalinity ( Z ). The growth of acidogens is assumed to follow Monod kinetics and the growth of methanogens to follow Haldane kinetics [ 15 ]. The model can be tailored to include relevant AD phenomena, such as ammonia inhibition owing to the hydrolysis of proteins while preserving a simple structure [ 16 ]. Although AM2 has already proved its usefulness for nonlinear control schemes of AD process in several works [ 17 , 18 ], it often exhibits operational difficulties that must be addressed to achieve the effectiveness for NMPC. The parameter identification procedure followed by Bernard et al. [ 15 ] is based on determining main values from steady-state variables and is then correlated by equations coming from the model assumptions. However, reliable steady states are challenging for full-scale plants due to inevitable inlet flow disturbances and substrate composition fluctuations [ 10 ]. Additionally, X1 and X2 are state variables unable to be measured in a real-time fashion. In practice, the measurements of each microbial-population concentration are costly, and usually, only qualitative information can be drawn from existing techniques [ 19 ]. The drawbacks above trigger identification problems when linear methods are applied, as well as inaccurate model predictions (since some kinetic parameters cannot be determined independently). The phenomenology is frequently poorly comprehended because the anaerobic digestion processes are related to the existence of microorganisms. Then, mathematically replicating the same operating conditions is not regularly possible due to the uncertainty and variation in yield parameters because of changes in metabolism. This paper provides a novel software beyond traditional methods, where performance depends on measured data and new software sensor strategies that capture reality with high reliability. To perform a long-term plan to achieve feasible control schemes for industrial purposes, the first step is to Energies 2022,15, 7685 3 of 17 ensure the existence of a measurable layer that provides continued data to the mathematical model [ 16 ]. Although these observer strategies have been widely used on different types of microorganisms inside a reactor, there are still obstacles in trying to define a method that guarantees full knowledge of the data inside a reaction [20]. Asymptotic observers (the desirable alternative used in the literature) estimate the state variables that cannot be measured directly over systems. Depending on the information available, the design of the observer mainly depends on two conditions: the information regarding the reaction kinetics and the yield parameters. This paper uses the mathematical model AM2 with additional terms to consider a wide range of organic matter modeled at the inlet. Using this model, it is still not possible to obtain information on the state variables concentrations of acidogens and methanogens using feasible online sensors. Additionally, there is no complete knowledge of the process kinetics. Therefore, based on the preliminary information, this paper focuses on developing an asymptotic observer conditioned by the following characteristics: the state variables X1 and X2 are unknown, the reaction rates are unknown, and the yield parameters are known and calculated using a parameter identification procedure based on optimization. The main challenge resides in using real data from an industrial process that evaluates the proposed methodology in a wide range of possibilities [21,22]. In order to demonstrate the performance indicators in the online model parameter identification strategy, the following sections are proposed in this paper. Section 2presents a reduced model AM2 with additional terms for control purposes. Then, in Section 3, experimental results are used as a basis for setting the experimental conditions to test the methods proposed. Section 4presents the parameter identification algorithm, where an optimization problem is solved to find the values that better fit the dynamics of the mathematical model and the experimental data. Section 5proposes an asymptotic observer, considering the information from reaction rates is unknown. This algorithm aims to estimate the concentrations of acidogenic and methanogenic microorganisms. Finally, in the conclusions, some remarks are discussed from evaluating the performance of the proposed strategy. 2. The Anaerobic Digestion Mass-Balance Model The AM2 reduced model that was initially selected, as described by Bernard et al. [ 15 ], considers biological phase reactions, as mentioned above, dividing the consortium into two homogeneous groups, acidogens, and methanogens, which represent the destabilization phenomenon [23]; Equations (1) to (6) described this model. dX1 dt =X1(µ1−αD)(1) dX2 dt =X2(µ2−αD)(2) dS1 dt =D(S1in −S1)−k1ψ1S1 KS1+S1(3) dS2 dt =D(S2in −S2) + k2ψ1S1 KS1+S1−k3ψ2S2 KS2+S2(4) dZ dt =D(Zin −Z)(5) dC dt =D(Cin −C)−qC+k4µ1X1+k5µ2X2(6) where X1 represents the concentration of acidogenic bacteria, X2 represents the concentration of methanogenic archaea, S1 represents the concentration of organic substrate characterized by its COD (kg/m 3 ), S2 represents the concentration of volatile fatty acids (VFA) (kg acetic acid/m 3 ), Z represents the total alkalinity (mol/m 3 ), C represents the total inorganic carbon concentration (mol/m 3 ). The variables S1in , S2in , Cin , and Zin are, respectively, the influent concentrations of S1 , S2 , C , and Z . The variable α is the fraction of Energies 2022,15, 7685 4 of 17 biomass which remains in the liquid phase; D is the dilution rate (d −1 ) and is inverse to the solid retention time (SRT). ψ1 is the maximum acidogenic bacteria growth rate (d −1 ), ψ2 is the maximum methanogenic archaea growth rate (d −1 ), KS1 is the half-saturation constant of S1 (kg/m 3 ), and KS2 is the half-saturation constant of S2 (kg acetic acid/m 3 ). The yield parameters k1 is a constant for substrate degradation, k2 is a constant for VFA production (mol/kg), k3 is a constant for VFA consumption (mol/kg), k4 is a constant for CO 2 production (mol/kg), k5 is a constant for CO 2 production (mol/kg), and k6 is a constant for CH4production (mol/kg). qCis represented by the Equation (7). qC=kLa[C+S2−Z−KHPC](7) where PCand Φcondense some variables, explained elsewhere (Bernard et al. [15]), PC=Φ−pΦ2−4KHPT(C+S2−Z) 2KH (8) with: Φ=C+S2−Z+KHPT+k6 kLaµ2X2(9) Regarding Equations (7) – (9) , the variable kLa is the liquid–gas transfer constant (d −1 ), KH Henry’s constant (mol/m 3 atm), and PT is the total pressure (atm). Bernard et al. [15] not considers the influence of ammonium (a usual compound generated during the fermentation and microbial growth metabolism) on alkalinity. During the development of our model proposal, we considered important to add a term taking ammonium into account, to apply the model to a broader spectrum of usable organic matter. Thus, two yield parameters were added to represent this effect, KZ,1 and KZ,2 , respectively. Based on the considerations by Kil et al. [ 11 ] and the Equation (5) , a new term was added to the dynamic of the total alkalinity equation proposed by Bernard et al. [15], as the Equation (5’). dZ0 dt =D(Zin −Z) + kZ,1ψ1S1 KS1+S1+kZ,2ψ2S2 KS2+S2, (5’) The Monod-type Equations (10) and (11) characterize the dynamics of the two reaction rates considered. µ1=ψ1S1 KS1+S1(10) µ2=ψ2S2 KS2+S2. (11) Monod-type kinetics describe the growth of acidogenic bacteria ψ1 and methanogenic archaea ψ2 because, in the fermentation process, the biomass does not register possible VFA accumulation and consequently inhibition. Finally, the methane flow rate produced qM is proportional to the reaction rate of methanogenesis, as shown in Equation (12). qM=k6ψ2S2 KS2+S2(12) The AM2 extended model assumes that the parameters temperature and enthalpy of formation, considered initially on the mass balance equation model for homogeneous reaction systems, are constant. It can be done assuming the total mass inside the reactor is constant ( m(t) = m ) in all the experiments. On the other hand, the effect of toxins is not considered inside the homogeneous system due to the reactor operating with high values in SRT (making all material inside the reactor diluted). Additionally, there is no evidence of inhibitions. Therefore, the influence of these parameters is discarded [10,14]. Energies 2022,15, 7685 5 of 17 3. Experimental Results and Characteristics of the Reactor Real data from a continuously stirred tank reactor (CSTR) of 150 L of work volume (pilot plant digester) operating on the AD of sewage sludge (thickened combined primary and secondary waste sludge from the Guadalete Wastewater Treatment Plant (Jerez de la Frontera, Spain) were used. The temperature, held at 55 º C (thermophilic range), was regulated via an internal coil (heat unit) using a PID 140 controller linked by a temperature sensor. The feedstock was added from once to thrice a day, including the weekend, to determine the effect of solid retention time (SRT) on the reactor performance. More details of the reactor setup can be found elsewhere at de la Rubia et al. [24]. Chemical oxygen demand (COD), total solids (TS), and volatile solids (VS) were determined on influent and effluent, while pH, individual VFA, alkalinity, and ammoniacal nitrogen were measured on effluent. Analytical determination of COD, TS, VS, pH, alkalinity, and ammoniacal nitrogen were performed according to APHA [ 25 ]. The concentration of VFA was determined by gas chromatography (Shimadzu GC-17 A) [ 24 ]. The volume of biogas produced in the reactor was directly measured with a mass flow sensor. While, biogas composition (methane and carbon dioxide) was analyzed by gas chromatography separation (Shimadzu GC-14 B) [24]. The study was conducted for 338 days, starting up with a SRT of 75 days (maintained 45 days), which gradually decreased to check the behavior of the system at SRT of 40 days (maintained 40 days), 27 days (maintained 85 days), 20 days (maintained 73 days), and finally 15 days (maintained 85 days). Only a specific range of data was used to discard unstable scenarios, such as a start-up (SRT of 75 days) and the last period (SRT of 15 days ) when the reactor operated closer to boundaries. These data are unfavorable for modeling purposes due to deviations related to reactions [ 24 ]. Therefore, we selected the data obtained during 207 days of the experiment, starting on day 46, when the reactor operated at 40 days of SRT with an organic loading rate (OLR) of 1.5 kg COD/m 3 d, and moved forward until the end of the stage of SRT 20 days, aiming to work with standard patterns of microorganisms as much as possible. The reactor was fed with raw sludge. The concentration of COD (see Figure 1a) remained relatively constant at the first stage, which kept the values around 60 kg/m 3 . In the subsequent stages, the values oscillated at around 70 kg/m 3 . Due to the use of real sewage sludge and the daily changing conditions, exceptionally, some values remained scattered from the mean value. Figure 1b,c shows the values of COD and VFA in the effluent. The value of COD remained constant during SRT 40 days, at 18 kg/m 3 . The SRT diminishing (to 27 days and 20 days) was related to an OLR increase, decreased COD removal, and showed a growing irregular tendency. The degree of dispersion was much larger than in the previous period. On the other hand, the values of VFA varied widely, except on SRT at 40 days (see Figure 1b), when remained constant at around 3 g/L. Figure 2shows the consequences of the microbial dynamics derived from the current state of the reactor. The pH level during the period selected, as can be seen, was above 7.5, enough for the proper development of the anaerobic microorganisms. The volume of CH 4 , shown in Figure 2b, has a specific behavior at each stage. At SRT 40 days, the production was around 0.035 m 3 CH 4 /d, showing a slow linear progression in the volume of CH 4 produced related to the growth of methanogens [ 26 ]. After an increase was observed when the SRT decreased (until 27 days), the volume remained with no substantial variations over the mean until day 210, when the reactor had been operated at 20 days of SRT (since some weeks ago). A moderate stationary tendency was observed beyond the middle of the stage SRT 27 until day 200. Going beyond the data used for modeling purposes, the volume of CH 4 on stage SRT 15 days showed a nonstationary tendency, maybe because it was closer to the operational limits. Energies 2022,15, 7685 6 of 17 (a) (b) (c) Figure 1. Time-course of ( a ) chemical oxygen demand concentration on the influent (kg/m 3 ); ( b ) chemical oxygen demand concentration on the effluent (kg/m 3 ). ( c ) total volatile fatty acids on the effluent (kg acetic acid/m3). (a) (b) Figure 2. Time-course of. (a) pH in the effluent; (b) methane volume rate production (m3CH4/d). The reduction of the SRT from 40 to 20 days was related to an increase in the methane volume production. 4. An Adaptive Modeling Identification Strategy for Anaerobic Reactors The most common methods used for modeling identification on bioprocess are linear regressions and other strategies based on optimization [ 23 , 27 ]. The linear regression strategy proposed by Bernard et al. [ 15 ] uses the extended mathematical model AM2 as the core (being the best option for control and monitoring purposes found in the literature so far. Consequently, the deal is to calculate (calibrate) the parameters to assist the mathematical model in closely tracking the experimental data when it runs over steady states. The validation procedure is supported, based on the premise that it has to be tuned on steadystate and evaluated during the process of convergence over transients [28]. The transient was tested step-by-step once the inlet conditions changed. However, despite the numerous advantages, such as the guarantee of identifiability of parameters, a rigorous identification procedure that covers a wide range of operational conditions, and the ability to validate the performance during transients, especially over unstable phases, this method exhibited several disadvantages. The most important being: the supposition of linearity using independent and dependent variables, the sensitivity to noise, and the presence of outliers and overfitting [ 14 ]. As the optimal parameter identification has shown better results [ 13 , 29 ], in the following section, a well-known parameter optimization method is presented [ 14 , 30 ]; however, further on, the alternative presented in the literature, a new parameter optimization method is proposed, aiming to increase considerably the performance in comparison with traditional methods. Energies 2022,15, 7685 7 of 17 4.1. Parameter Identification Based on Optimization Considering the mathematical model for AD over reactors on Equations (1) – (6) . The parameters to be identified were p(k)e{µ1max , µ2max , KS1 , KS2 , k1 , k2 , k3 , k4 , k5 , k6 , KZ1 , KZ2 , Zin} , and were calculated from an algorithm that used specific information measured from the reactor, see Figure 3a. This method solves an optimization problem to find the values of parameters aiming to minimize the difference between the measured data and the dynamics from the mathematical model AM2 [ 10 , 31 ]. Figure 3a shows all the details that explain the architecture proposed for the algorithm optimization. The data used from the reactor are Fout = { CH 4} , the volume of methane produced as a consequence of the metabolism of methanogenic archaea, nm = {S1 , S2 , Z} , the measured states considered by the mathematical model AM2, the organic substrate concentration COD, VFA concentration, and total alkalinity; uin = { COD in , VFA in , D} are the COD, the VFA, and the dilution rate at inlet; uout = {nnm , nm , pH } are the non-measured data, the measured data, and pH, respectively [32,33]. (a) (b) Figure 3. Optimal-based schematics procedures. ( a ) identification parametric diagram; ( b ) identification parametric algorithm. Qin is the energy used to maintain the reactor within a thermophilic range (not considered by the mathematical model). Figure 3b shows the rules used by the parametric identification algorithm to calculate the optimal values of p(k) . As shown, the parameters p(k) are considered constant during the experiment. Equation (13) shows the optimization problem proposed to be solved [34]. min p(k),...,p(k+NF)J(u(k),p(k),x(k)) s.t. x(k+1) = f(x(k),p(k)), y(k) = g(x(k),u(k)), (13) ymin ⩽y(k)⩽ymax,∀k=1, . . . , Np, pmin,⩽u(k)⩽pmax,∀k=1, . . . , Nu The equation J(u(k) , p(k) , x(k)) is the functional cost that contains the criteria to minimize. It depends on the inputs u(k), the parameters p(k) , and the state variables of the mathematical model x(k) ; g ( ·) represents the controlled input; ymin and ymax are the lower and upper operational constraints. Finally, pmin and pmax are the lower and upper limits of the parameters to be calculated p(k)[34]. J(u(k),p(k),x(k))=norm(xmod(k)−xe)2(14) Equation (14) shows the cost function: the norm of the squared difference between the mathematical model dynamics and variables xmod(k) , and the correspondent data xe obtained from the experiment. Finally, Equation (15) represents the mean square error Energies 2022,15, 7685 8 of 17 between the experimental data ( ne m(k) , pHe(k) y qe M(k) ) and the correspondent data obtained by the mathematical model ( nmod m(k) , pHmod(k) y qmod M(k) ). On nmod m(k) and ne m(k) , the subscript mrepresents the known dynamics of the experiment. J(nm(k),u(k))=normnmod m(k)−ne m(k)2+ pHmod(k)−pHe(k)2+qmod M(k)−qe M(k)2(15) The identifiability of these parameters is conditioned by isolated structures conformed into subsystems that depend on their natural interactions. Equations (1) and (3) can be grouped in one subsystem because the state variables S1 and X1 are not influenced by others, and so, by the correspondent parameters. Equation (5’) is independent and can be run separately. Then, the subsystems composed by Equations (1) – (4) can be considered independently. Under normal operational scenarios, the reactor has three equilibrium operational points. The first occurs when the reactor operates under a stable region over operational constraints. The second is when the system operates under instability scenarios, and the third is when the reactor experiments a washout, so that X1∼ = 0 and S1=S1in . When the subsystem composed by Equations (1) and (3) converges, Equations (2) and (4) will do the same toward a stability region. In the same way, Equations (5’) and (6) will converge at the same time [19,35]. 4.1.1. Static Parameter Identification Procedure: Genetic Algorithms Genetic algorithms evolve inspired by the ability of nature to adapt and evolve conditioned by the environment and the genetic characteristics of their predecessors. The algorithm is based on a random rough search around the solution space area, thus, the convergence depends on the number of iterations until the optimal solution is encountered. This option is used as a reference because it is considered one of the best alternatives found in the literature [36]. 4.1.2. Static Parameter Identification Procedure: Step-Ahead Figure 4a shows the algorithm’s structure and the step-by-step designing process that aims to estimate the parameters of the experiment. The technique, called step-ahead, places a mathematical model as the core (AM2 in our case) to predict the evolution of the system dynamics over each time step, considering X (0) as the starting point (represented by a black circle • ). At this time, the algorithm uses the mathematical model to calculate one feasible step forward, aiming to discover the system’s evolution in advance (represented by a black triangle N ). Now, on X1 , the new measured value (the • ) is compared with the previous prediction (the N ). Step-by-step, this procedure measures the differences between the values of • and N ( errorstep # = •step # −Nstep # ), which means the errors encountered step-by-step aim to be minimized throughout the experiment. To calculate the prediction of the system in advance, X (0) requires the information of the initial conditions, the inputs us(0), and the value of the parameters to be calculated p(0). E= [error1,error2, . . . , errorn](16) In the next step, aiming to perform a new prediction (on X (1)), the algorithm updates the initial conditions (replacing the value of the previous prediction N with the new initial condition, or the values measured, • ). This strategy allows adjusting the deviation (or error) at each step. At the end of the simulation, the result is a vector that stores all the errors encountered over each step [37]. Energies 2022,15, 7685 9 of 17 (a) (b) Figure 4. The proposed structures in the anaerobic digestion process. ( a ) step-ahead algorithm; (b) asymptotic observer structure. If the step-ahead algorithm is used, the objective of the optimization problem changes drastically, the algorithm will work on minimizing the errors encountered on each step. Compared with Equation (13) , the operational and physical boundaries are the same. The new optimization problem is shown in the following Equation (17). min u(k)E s.t. nm(k+1) = f(nm(k),u(k)), (17) nnm(k+1) = f(nnm(k),u(k)), 0⩽u(k)⩽pmax,∀k=1, ..., tf In the following Section 4.2, a specific algorithm is proposed to complete the information needed to establish the minimal data condition measurements from the reactor. The observer will focus on estimating the concentration of acidogenic bacteria and methanogenic archaea, which is not possible to obtain using reliable commercial transductors or protocols over analytical procedures in situ. 4.2. An Asymptotic Observer for State Estimation When Reaction Rates Are Unknown We need all measurements available to control and monitoring an anaerobic digester. The absence of information due to the lack of reliable sensors, and the inadequate strategies to constantly test all measurements from laboratory analyses, opens up an opportunity to substitute the uncertainty by using online software sensors [13,29]. The online software state sensors or the so-called state observers [ 19 ] estimate the state variables over homogeneous reaction systems using other information relatively easy to obtain and tied to the system. Based on the previously existing data (the reaction kinetics and static parameters), different state observers are proposed in the literature [ 38 ]. Additionally, there is a substantial restriction, the data from the reaction kinetics are unknown; therefore, this observer is a consequence of the strictly challenging requirement that the information from kinetics needs to be known [ 38 ]. All previous conditions result in a particular category of observers named asymptotically because they estimate the nonexisting measurable states based on two conditions: the system is still not exponentially observable, and the reaction kinetics are unknown. In order to adapt the design of the state observer, we consider the general homogeneous reaction systems described by the general nonlinear state space model, i.e., [38]. dξ dt =Kφ(ξ,t)−Dξ−Q(ξ) + F(18) Energies 2022,15, 7685 16 of 17 Data Availability Statement: The initial experimental results developed in this study are in the next link: https://doi.org/10.1016/j.procbio.2005.03.073. Conflicts of Interest: The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. References 1. Lora Grando, R.; de Souza Antune, A.M.; da Fonseca, F.V.; Sánchez, A.; Barrena, R.; Font, X. Technology overview of biogas production in anaerobic digestion plants: A European evaluation of research and development. Renew. Sustain. Energy Rev. 2017 , 80, 44–53. [CrossRef] 2. Scarlat, N.; Dallemand, J.F.; Fahl, F. Biogas: Developments and perspectives in Europe. Renew. Energy 2018 ,129, 457–472. [CrossRef] 3. European Biogas Association. EBA Statistical Report; European Biogas Association: Brussels, Belgium, 2017. 4. Gaida, D.; Wolf, C.; Bongards, M. Feed control of anaerobic digestion processes for renewable energy production: A review. Renew. Sustain. Energy Rev. 2017,68, 869–875. [CrossRef] 5. Dewasme, L.; Sbarciog, M.; Rocha-Cózatl, E.; Haugen, F.; Vande Wouwer, A. State and unknown input estimation of an anaerobic digestion reactor with experimental validation. Control Eng. Pract. 2019,85, 280–289. [CrossRef] 6. García-Diéguez, C.; Bernard, O.; Roca, E. Reducing the Anaerobic Digestion Model No. 1 for its application to an industrial wastewater treatment plant treating winery effluent wastewater. Bioresour. Technol. 2013,132, 244–253. [CrossRef] 7. Costello, D.; Greenfield, P.; Lee, P. Dynamic Modelling of a Single-stage High-rate Anaerobic Reactor—I. Model Derivation. Water Res. 1991,25, 847–858. [CrossRef] 8. Méndez-Acosta, H.; Palacios-Ruiz, B.; Alcaraz-González, V.; González-Álvarez, V.; García-Sandoval, J. A robust control scheme to improve the stability of anaerobic digestion processes. J. Process Control 2010,20, 375–383. [CrossRef] 9. Chaib Draa, K.; Zemouche, A.; Alma, M.; Voos, H.; Darouach, M. A discrete-time nonlinear state observer for the anaerobic digestion process. Int. J. Robust Nonlinear Control 2019,29, 1279–1301. [CrossRef] 10. Marquez-Ruiz, A.; Mendez-Blanco, C.; Porru, M.; Özkan, L. State and Parameter Estimation Based On Extent Transformations. Comput. Aided Chem. Eng. 2018,44, 583–588. 11. Hoil, K.; Li, D.; Yugeng, X.; Jiwei, L. Model Predictive Control with On-line Model Identification for Anaerobic Digestion Processes. Biochem. Eng. J. 2017,128, 63–75. 12. Mauky, E.; Weinrich, S.; Jacobi, H.; Naegele, H.J.; Liebetrau, J.; Nelles, M. Model Predictive Control for Demand-Driven Biogas Production in Full Scale. Chem. Eng. Technol. 2016,39, 652–664. [CrossRef] 13. Zhang, Z.; Wu, Z.; Rincon, D.; Garcia, C.; Christofides, P.D. Operational safety of chemical processes via Safeness-Index based MPC: Two large-scale case studies. Comput. Chem. Eng. 2019,125, 204–215. [CrossRef] 14. Marquez-Ruiz, A.; Mendez-Blanco, C.; Ozcan, L. Constrained Control and Estimation of Homogeneous Reaction Systems Using Extent-Based Linear Parameter Varying Models. Ind. Eng. Chem. Res. 2020,59, 2242–2251. [CrossRef] 15. Bernard, O.; Hadj-Sadok, Z.; Dochain, D.; Genovesi, A.; Steyer, J. Dynamical Model Development and Parameter Identification for an Anaerobic Wastewater Treatment Process. Biotechnol. Bioeng. 2001,75, 424–438. [CrossRef] [PubMed] 16. Hassam, S.; Ficara, E.; Leva, A.; Harmand, J. A generic and Systematic Procedure to Derive a Simplified Model from the Anaerobic Digestion Model No. 1 (ADM1). Biochem. Eng. J. 2015,99, 193–203. [CrossRef] 17. Flores Estrella, R.; Alcaraz-González, V.; García-Sandoval, J.; González-Álvarez, V. Robust output disturbance rejection control for anaerobic digestion processes. J. Process Control 2019,75, 15–23. [CrossRef] 18. Lara-Cisneros, G.; Aguilar-López, R.; Femat, R. On the dynamic optimization of methane production in anaerobic digestion via extremum-seeking control approach. Comput. Chem. Eng. 2015,75, 49–59. [CrossRef] 19. Isaza-Hurtado, J.; Botero-Castro, H.; Alvarez, H. Robust Estimation for LPV Systems in the Presence of Non-uniform Measurements. Automatica 2020,115, 108901. [CrossRef] 20. Rossi, E.; Pecorini, I.; Ferrara, G.; Iannelli, R. Dry Anaerobic Digestion of the Organic Fraction of Municipal Solid Waste: Biogas Production Optimization by Reducing Ammonia Inhibition. Energies 2022,15, 5515. [CrossRef] 21. Andrews, J.F. A Mathematical Model for the Continuous Culture of Microorganisms Utilizing Inhibitory Substrates. Biotechnol. Bioeng. 1968,10, 707–723. [CrossRef] 22. Song, Y.J.; Kyung-Su, O.; Lee, B.; Pak, D.W.; Cha, J.H.; Park, J.G. Characteristics of Biogas Production from Organic Wastes Mixed at Optimal Ratios in an Anaerobic Co-digestion Reactor. Energies 2021,14, 6812. doi: 10.3390/en14206812. [CrossRef] 23. Ahmed, W.; Rodríguez, J. A model predictive optimal control system for the practical automatic start-up of anaerobic digesters. Water Res. 2020,174, 115599. [CrossRef] [PubMed] 24. de la Rubia, M.; Perez, M.; Romero, L.; Sales, D. Effect of Solids Retention Time (SRT) on Pilot Scale Anaerobic Thermophilic Sludge Digestion. Process Biochem. 2006,41, 79–86. [CrossRef] 25. APHA. Standard Methods for the Examination of Water and Wastewater; American Public Helath Association/American Water Works Association/Water Environment Federation Stable: Washington, DC, USA, 2017. Energies 2022,15, 7685 17 of 17 26. Heng, G.C.; Isa, M.H.; Lock, S.S.M.; Ng, C.A. Process Optimization of Waste Activated Sludge in Anaerobic Digestion and Biogas Production by Electrochemical Pre-Treatment Using Ruthenium Oxide Coated Titanium Electrodes. Sustainability 2021 ,13, 4874. [CrossRef] 27. Emebu, S.; Pecha, J.; Janáˇcová, D. Review on anaerobic digestion models: Model classification & elaboration of process phenomena. Renew. Sustain. Energy Rev. 2022,160, 112288. 28. Batstone, D.; Keller, J.; Angelidaki, I.; Kalyuzhnyi, S.; Pavlostathis, S.; Rozzi, A.; Sanders, W.; Siegrist, H.; Vavilin, V. Anaerobic Digestion Model No 1 (ADM1). Water Sci. Technol. 2002,45, 65–73. [CrossRef] 29. Rawlings, J.B.; Patel, N.R.; Risbeck, M.J.; Maravelias, C.T.; Wenzel, M.J.; Turney, R.D. Economic MPC and real-time decision making with application to large-scale HVAC energy systems. Comput. Chem. Eng. 2018,114, 89–98. [CrossRef] 30. Vukov, M.; Gros, S.; Horn, G.; Frison, G.; Geebelen, K.; Jørgensen, J.; Swevers, J.; Diehl, M. Real-time nonlinear MPC and MHE for a large-scale mechatronic application. Control Eng. Pract. 2015,45, 64–78. [CrossRef] 31. Said, Z.; Nguyen, T.H.; Sharma, P.; Li, C.; Ali, H.M.; Nguyen, V.N.; Pham, V.V.; Ahmed, S.F.; Van, D.N.; Truong, T.H. Multi- Attribute Optimization of Sustainable Aviation Fuel Production-process from Microalgae Source. Fuel 2022 ,324, 124759. [CrossRef] 32. Chandra, R.; Takeuchi, H.; Hasegawa, T. Hydrotermal Pretreatment of Rice Straw Biomass: A Potential and Promising Method for Enhanced Methane Production. Appl. Energy 2012,94, 129–140. [CrossRef] 33. Hanema, J.; Lazar, M.; Tóth, R. Tube-based LPV Constant Output Reference Tracking MPC with Error Bound. IFAC-Pap. Line 2017,50, 8612–8617. [CrossRef] 34. Núñez-Mata, O.; Palma-Behnke, R.; Valencia, F.; Mendoza-Araya, P.; Jimenez-Estevez, G. Adaptive Protection System for Microgrids Based on a Robust Optimization Strategy. Energies 2018,11, 308. doi: 10.3390/en11020308. [CrossRef] 35. Haldane, J. Enzynmes; MIT Press: Cambridge, MA, USA, 1965; p. 184. 36. Well control optimization in waterflooding using genetic algorithm coupled with Artificial Neural Networks. Upstream Oil Gas Technol. 2022,9, 100071. [CrossRef] 37. Srinivasan, B.; Amrhein, M.; Bonvin, D. American Institute of Chemical Engineers. AIChE J. 1998,44, 1858–1867. [CrossRef] 38. Bastin, G.; Dochain, D. On-Line Estimation and Adaptive Control of Bioreactors, Process Measurement and Control; Elsevier: Amsterdam, The Netherlands, 1990.