Sensor de software para un reactor UASB a escala de laboratorio

Martínez Sibaja, Albino1 Rodríguez Jarquin, José Pastor1* Bello Ramírez, Angélica Mara1 Posada Gómez, Rubén2 Juárez Barojas, Isaías1 González Morán, Carlos Omar3
1 Instituto Tecnológico de Orizaba. Tecnológico Nacional de México. Orizaba, Veracruz, México
2 Centro Regional de Optimización y Desarrollo de Equipo de Orizaba. Tecnológico Nacional de México. Orizaba, Veracruz, México
3 Ingeniería Industrial Avanzada. Universidad Autónoma del Estado de México. Atizapán de Zaragoza, Estado de México, México

Martínez Sibaja, Albino1  ; Rodríguez Jarquin, José Pastor1*  ; Bello Ramírez, Angélica Mara1  ; Posada Gómez, Rubén2  ; Juárez Barojas, Isaías1  ; González Morán, Carlos Omar3 

Recibido: 04-may-2026

Aceptado: 01-jul-2026

Publicado: 30-sep-2026

Correspondencia: jprj_02@hotmail.com

Software sensor for a laboratory-scale UASB reactor

RESUMEN

Este trabajo propone un sensor de software para estimar el flujo de gas metano y las concentraciones de bacterias acidogénicas y metanogénicas en un reactor anaerobio. El observador propuesto se desarrolla a partir del Modelo de Digestión Anaerobia No. 1 (ADM1), que describe los principales procesos biológicos y fisicoquímicos involucrados en la digestión anaerobia. El enfoque está dirigido a reactores anaerobios continuos de manto de lodos de flujo ascendente (UASB, por sus siglas en inglés). Una de sus principales ventajas es la posibilidad de monitorear el balance dinámico entre los procesos anabólicos, asociados con la síntesis biológica y el crecimiento de la biomasa, y los procesos catabólicos, relacionados con la producción de metano. Esta estimación puede realizarse sin requerir mediciones directas de la biomasa dentro del reactor. La metodología propuesta se evaluó mediante el tratamiento anaerobio de aguas residuales industriales generadas por una cervecería. La validación experimental se realizó con datos obtenidos de un reactor UASB a escala de laboratorio de 2.1 L. La comparación entre las variables estimadas y las mediciones experimentales permitió evaluar el desempeño del observador. Los resultados indican que el sensor de software puede proporcionar información útil sobre el estado biológico y el comportamiento operativo del proceso de digestión anaerobia. Por lo tanto, el observador propuesto representa una alternativa práctica para monitorear variables importantes que son difíciles de medir directamente en reactores UASB.

Palabras clave: ADM1, sensor de software, reactor UASB a escala de laboratorio

ABSTRACT

This paper proposes a software sensor for estimating the methane gas flow rate and the concentrations of acidogenic and methanogenic bacteria in an anaerobic reactor. The proposed observer is developed using the Anaerobic Digestion Model No. 1 (ADM1), which describes the main biological and physicochemical processes involved in anaerobic digestion. The approach is intended for continuous Upflow Anaerobic Sludge Blanket (UASB) reactors. One of its main advantages is the possibility of monitoring the dynamic balance between anabolic processes, associated with biological synthesis and biomass growth, and catabolic processes, related to methane production. This estimation can be performed without requiring direct measurements of biomass inside the reactor. The proposed methodology was evaluated through the anaerobic treatment of industrial wastewater generated by a brewery. Experimental validation was performed using data obtained from a 2.1 L laboratory-scale UASB reactor. The comparison between the estimated variables and the experimental measurements allowed the performance of the observer to be assessed. The results indicate that the software sensor can provide useful information about the biological state and operational behavior of the anaerobic digestion process. Therefore, the proposed observer represents a practical alternative for monitoring important variables that are difficult to measure directly in UASB reactors.

Keywords: ADM1, software sensor, laboratory-scale UASB reactor

Introduction

Anaerobic reactors are widely employed for wastewater treatment; however, their operation and control can be challenging because of the considerable uncertainty associated with the mathematical representation of the biological processes involved. This difficulty is also related to the limited availability of sensors capable of continuously measuring several important variables during reactor operation [1], [2]. In this context, state observers, commonly known as software sensors [3], provide an effective alternative for estimating variables that cannot be directly measured in real time. These computational tools use mathematical models and available process measurements to infer relevant information about the internal state of the reactor.

Several studies have demonstrated the application of software sensors to estimate important variables in anaerobic treatment systems, including Chemical Oxygen Demand (COD), biomass concentration, substrate concentration, and other process parameters. Their application is particularly useful when direct measurements are expensive, technically difficult, or unavailable [4]. Nevertheless, the successful implementation of a software sensor depends strongly on the mathematical model used to represent the process. An inaccurate or poorly calibrated model [5] can lead to significant errors in the estimated variables and consequently reduce the reliability of the observer. Recently, these software sensors have been integrated with deep learning and data fusion techniques to further enhance this real-time reliability [6], [7].

Modeling anaerobic digestion is especially complex because the process involves multiple biological reactions and interactions between different microbial populations. Therefore, the development of appropriate mathematical models is essential for obtaining reliable estimations and improving the monitoring and control of anaerobic reactors. Traditional approaches, such as the Monod equation, have been widely used to represent microbial growth; however, these simplified formulations may not fully describe the complexity of anaerobic digestion. Consequently, more comprehensive models are required when software sensors are intended to estimate unmeasured variables and provide reliable information for process monitoring and control [8].

The mathematical modeling of anaerobic reactors has received considerable attention over the past several decades, evolving from relatively simple approaches based on the assumption of a single microbial population to more comprehensive models that incorporate several bacterial groups and their interactions within the digestion process [9], [10], [11], [12], [13], [14], [15], [16]. This evolution has made it possible to obtain more detailed representations of the biological phenomena occurring inside anaerobic reactors and to improve the understanding of their dynamic behavior.

Despite these advances, the nonlinear characteristics of biological systems make it difficult to directly observe all of the variables involved in the process [17]. In many cases, some states cannot be measured experimentally or are only partially observable through the available sensors. Therefore, instead of attempting to determine each individual state variable independently, it may be more appropriate to estimate relationships or combinations between process parameters, which can provide useful information about the overall system behavior [18], [19].

In this context, Dochain [19] proposed a methodology for analyzing the global observability and detectability of biological reactors. This approach provides a theoretical basis for the design of asymptotic observers, which can be used to estimate certain unmeasured state variables associated with anaerobic digestion even when uncertainties exist in the process kinetics. These observers represent an important tool for monitoring biological processes because they allow information that cannot be obtained directly through conventional sensors to be reconstructed from available measurements and mathematical models.

However, the application of asymptotic observers to anaerobic reactors presents an important practical limitation. Their implementation generally requires measurements of all the process input variables, a condition that is difficult to satisfy under normal operating conditions because not every input can be continuously measured with sufficient accuracy, and sensors may be prone to sampling delays or faults [20], [21]. To address this limitation, Alcaraz-Gonzalez and Gonzalez-Alvarez [22] proposed the use of an interval observer as an alternative estimation strategy. Unlike conventional observers that attempt to obtain a single precise value for an unmeasured state, the interval observer provides upper and lower bounds within which the actual state is guaranteed to lie, as long as appropriate limits for the process inputs are known. This approach can therefore provide reliable information about unmeasured variables while taking into account the uncertainty and variability inherent to anaerobic digestion processes [22], [23].

The present study is based on the work of Alcaraz-González and González-Álvarez [22], who developed an observer for estimating several important variables in a continuous fixed-bed pilot bioreactor. Their approach focused on the estimation of acidogenic and methanogenic bacterial concentrations, total inorganic carbon, and strong-ion concentrations. Building upon this previous research, the present work extends the application of interval-observer techniques to the estimation of key variables associated with methane production and microbial activity in anaerobic digestion systems.

The main objective is to develop an interval observer based on the Anaerobic Digestion Model No. 1 (ADM1) for estimating the methane gas flow rate at the reactor outlet, as well as the concentrations of acidogenic and methanogenic microorganisms, aligning with recent efforts to optimize adaptive observers for maximized gas production [24], [25]. The proposed methodology is intended for the treatment of industrial wastewater and seeks to provide information about the internal biological conditions of the reactor without requiring direct measurements of biomass. In particular, the observer is designed to facilitate the analysis of the dynamic relationship between anabolic processes, which are associated with biological synthesis and microbial growth, and catabolic processes, which are related to the degradation of organic matter and methane formation, where methane yield effectively indicates the metabolic behavior of the system [26].

The use of an interval observer is particularly relevant for anaerobic systems because several important process variables cannot be measured continuously under practical operating conditions. Rather than providing a single deterministic estimate, the observer can characterize the possible range of the unmeasured variables while considering uncertainties associated with the process. This feature can contribute to more reliable monitoring of microbial activity and methane production in anaerobic reactors.

To evaluate the proposed methodology, experimental validation is performed using a laboratory-scale Up-flow Anaerobic Sludge Blanket (UASB) reactor with a working volume of 2.1 L. The reactor is operated with wastewater originating from a brewery, providing an industrially relevant substrate for the anaerobic treatment process. The experimental data obtained from the reactor are used to assess the capability of the proposed interval observer to estimate the selected variables and to represent the dynamic behavior of the anaerobic digestion process [22].

Model description

The Anaerobic Digestion Model No. 1 (ADM1) [10] provides a comprehensive representation of the main physicochemical and biochemical phenomena involved in anaerobic digestion. Its formulation incorporates several interconnected processes that describe the transformation of organic matter and the formation of biogas. The physicochemical component represents phenomena such as acid-base reactions, ion association and dissociation, as well as the transfer of dissolved compounds between the liquid and gas phases. These processes are described mathematically through differential and algebraic equations that allow the dynamic behavior of the reactor to be represented, an approach consistent with recent advancements in the dynamic modeling of biological wastewater treatment processes [2].

The biochemical part of ADM1 describes the sequential degradation of complex organic substrates. Initially, particulate carbohydrates, proteins, and lipids undergo disintegration and hydrolysis, producing simpler compounds such as sugars, amino acids, and long-chain fatty acids (LCFA). These soluble products are subsequently converted through acidogenic reactions into volatile fatty acids (VFA), hydrogen, and other intermediate compounds. The resulting VFA and LCFA are further transformed during the acetogenic stage, producing substrates that can be utilized by methanogenic microorganisms. Finally, methane is generated through methanogenesis, mainly through the conversion of acetate and the utilization of hydrogen together with carbon dioxide.

For practical modeling purposes, anaerobic digestion is sometimes simplified into two principal biological stages: acidogenesis and methanogenesis, a structural simplification commonly adopted to design hierarchical controllers and state observers for two-stage processes [24]. Acidogenesis corresponds to the microbial conversion of organic substrates into intermediate products, particularly volatile fatty acids, under anaerobic conditions. Methanogenesis represents the final stage of the degradation pathway, in which methane is produced from different substrates. Two major methanogenic pathways are generally distinguished: acetoclastic methanogenesis, which converts acetate into methane, and hydrogenotrophic methanogenesis, in which hydrogen reacts with carbon dioxide to form methane.

In the present approach, these two methanogenic pathways are considered together as a single overall methane-production process. This simplification facilitates the analysis of the relationship between microbial growth and methane formation while retaining the main characteristics of the anaerobic digestion process. According to Michaud et al. [26], a theoretical methane yield of approximately \(0.35~\mathrm{L\,CH_4}\) per gram of COD removed can be considered for a methanogenic consortium. This value provides an important relationship between the degradation of organic matter and methane generation. Consequently, the methane yield can be interpreted as the result of a dynamic balance between anabolic fluxes, associated with biological synthesis and microbial growth, and catabolic fluxes, associated with substrate degradation and methane production [26].

Figura 1. Schematic diagram of a UASB reactor.

The study case presented in this paper is a laboratory-scale UASB reactor of 2.1 L, which contains a reaction chamber, an internal settler and a three-phase separator (biogas, treated water and biomass). This configuration builds upon the foundational upflow sludge blanket concepts [14] and aligns with recent optimized modeling efforts for bioenergy production in continuous UASB systems [25]. Figura 1 displays a schematic diagram of a UASB reactor. Wastewater is distributed throughout the reaction section (at the bottom of the reactor) and then it flows upward through the sludge bed. In the sludge bed, dissolved organic matter in wastewater is converted into biogas, which always tends to go up, thus achieving an appropriate mix of mud and water and thus, avoiding the need for mechanical mixing [13]. In the UASB reactor biogas is collected through the three-phase separator, while the mixture of water and mud flows through the sediment that is in the top of the reactor, where biomass is captured and returned by gravity to the reaction compartment. The mathematical model of a continuous UASB reactor, considering ADM1 terminology for each reaction step, is given by: \[\begin{equation} \label{eq:model} \begin{aligned} \dot{x}_1 &= Y_1 K_{m,1}\frac{s_1}{K_{s,1}+s_1}\,I_{\mathrm{pH}}\,x_1 - aD(t)\,x_1 - K_d\,x_1\\ \dot{x}_2 &= Y_2 K_{m,2}\frac{s_2}{K_{s,2}+s_2}\,I_{\mathrm{pH}}\,I_{\mathrm{NH_3}}\,x_2 - aD(t)\,x_2 - K_d\,x_2\\ \dot{Q}_{\mathrm{CH_4}} &= Y_{\mathrm{CH_4}} K_{m,1}\frac{s_1}{K_{s,1}+s_1}\,I_{\mathrm{pH}}\,x_1 - Q_{\mathrm{CH_4}}\\ \dot{s}_1 &= D\left(s_1^{i}-s_1\right) - K_{m,1}\frac{s_1}{K_{s,1}+s_1}\,I_{\mathrm{pH}}\,x_1\\ \dot{s}_2 &= D\left(s_2^{i}-s_2\right) + \left(1-Y_1\right)f_1 K_{m,1}\frac{s_1}{K_{s,1}+s_1}\,I_{\mathrm{pH}}\,x_1 - K_{m,2}\frac{s_2}{K_{s,2}+s_2}\,I_{\mathrm{pH}}\,I_{\mathrm{NH_3}}\,x_2 \end{aligned} \end{equation}\] with: \[\begin{align*} I_{\mathrm{pH}} &= \frac{1+2\cdot 10^{0.5\left(\mathrm{pH}_{\mathrm{LL}}-\mathrm{pH}_{\mathrm{UL}}\right)}}{1+10^{\left(\mathrm{pH}-\mathrm{pH}_{\mathrm{UL}}\right)}+10^{\left(\mathrm{pH}_{\mathrm{LL}}-\mathrm{pH}\right)}},\\ I_{\mathrm{NH_3}} &= \frac{1}{1+\dfrac{s_{\mathrm{NH_3}}}{K_{\mathrm{NH_3}}}}, \end{align*}\] where \(x_1\) and \(x_2\) are the concentrations of acidogenic and methanogenic bacteria, respectively. \(s_1\) and \(s_2\) are the effluent concentration of COD and VFA, respectively. \(Q_{\mathrm{CH_4}}\) is the output methane gas flow rate. \(D(t)\) is the dilution rate, \(K_{m,i}\) (\(i=1,2\)) are the specific rates, \(K_{s,i}\) (\(i=1,2\)) are the half saturation constants for acidogenic and methanogenic bacteria, respectively. \(K_d\) is the specific rate of biomass decay, \(Y_1\) and \(Y_2\) are yield coefficients, \(s_1^{i}\) and \(s_2^{i}\) are the influent concentrations of the substrates. \(I_{\mathrm{pH}}\) represents the inhibition by pH, where \(\mathrm{pH}_{\mathrm{LL}}\) and \(\mathrm{pH}_{\mathrm{UL}}\) are the pH lower and upper limits, respectively. \(I_{\mathrm{NH_3}}\) represents the inhibition by free ammonia in methanogenesis process. \(s_{\mathrm{NH_3}}\) and \(K_{\mathrm{NH_3}}\) are the concentration of free ammonia and inhibition constant, respectively. In order to determine the model parameters listed in Tabla 1, many simulations with different literature values were performed, a critical step given the sensitivity of ADM1 parameters [5]. For the acidogenesis process, the best results were obtained with the parameters introduced by [9]. For the methanogenesis process, the methane yield \(Y_{\mathrm{CH_4}}\) was obtained from [26]. The dimensionless parameter, \(a\), was heuristically obtained. All other values were obtained from ADM1 model parameters [10].

Tabla 1. Model parameters.

Parameter Value and units
\(K_{m,1}\) \(5.1~\mathrm{g\,COD/(g\,COD\,d)}\)
\(K_{m,2}\) \(8~\mathrm{g\,COD/(g\,COD\,d)}\)
\(K_{s,1}\) \(0.5~\mathrm{g\,COD/L}\)
\(K_{s,2}\) \(0.15~\mathrm{g\,COD/L}\)
\(K_d\) \(0.02~\mathrm{d^{-1}}\)
\(Y_1\) \(0.1~\mathrm{g\,COD/g\,COD}\)
\(Y_2\) \(0.05~\mathrm{g\,COD/g\,COD}\)
\(Y_{\mathrm{CH_4}}\) \(0.35~\mathrm{L\,CH_4/g\,COD}\)
\(K_{\mathrm{NH_3}}\) \(0.0018~\mathrm{mol/L}\)
\(a\) \(0.5\) (dimensionless)

The model given in Ec. [eq:model] can be rewritten as follows: \[\begin{equation} \label{eq:state} \dot{x}(t) = \left[\dot{x}_1\;\; \dot{x}_2\;\; \dot{Q}_{\mathrm{CH_4}}\;\; \dot{s}_1\;\; \dot{s}_2\right]^{\top} = C\,f\left(x(t),t\right) + A(t)\,x(t) + b(t) \end{equation}\] with: \[\begin{align*} f\left(x(t),t\right) &= \left[\mu_1 x_1\;\; \mu_2 x_2\right]^{\top},\\ \mu_1 &= \frac{K_{m,1}\,s_1}{K_{s,1}+s_1}\,I_{\mathrm{pH}},\\ \mu_2 &= \frac{K_{m,2}\,s_2}{K_{s,2}+s_2}\,I_{\mathrm{pH}}\,I_{\mathrm{NH_3}},\\ C &= \left[C_1^{\top}\;\; C_2^{\top}\right]^{\top} = \left[\begin{array}{ccc|cc} Y_1 & 0 & Y_{\mathrm{CH_4}} & -1 & \left(1-Y_1\right)f_1\\ 0 & Y_2 & 0 & 0 & -1 \end{array}\right]^{\top}, \end{align*}\] \[\begin{align*} A(t) &= \begin{bmatrix} A_{11}(t) & A_{12}(t)\\ A_{21}(t) & A_{22}(t)\end{bmatrix} = \left[\begin{array}{ccc|cc} -\left(aD(t)+K_d\right) & 0 & 0 & 0 & 0\\ 0 & -\left(aD(t)+K_d\right) & 0 & 0 & 0\\ 0 & 0 & -1 & 0 & 0\\ \hline 0 & 0 & 0 & -D(t) & 0\\ 0 & 0 & 0 & 0 & -D(t) \end{array}\right],\\ b &= \left[b_1^{\top}\;\; b_2^{\top}\right]^{\top} = D(t)\left[\begin{array}{ccc|cc} 0 & 0 & 0 & s_1^{i}(t) & s_2^{i}(t)\end{array}\right]^{\top}. \end{align*}\] where \(x(t)\in\mathbb{R}^{n}\) is the state vector, \(C\in\mathbb{R}^{m\times n}\) is the yield coefficient matrix and \(f(x(t),t)\in\mathbb{R}^{m}\) is the vector containing the nonlinear functions, which can be assumed completely unknown. The time-varying matrix \(A(t)\in\mathbb{R}^{n\times n}\) is the state matrix and \(b(t)\in\mathbb{R}^{n}\) is the vector of the inputs to the observer, which are time-varying functions. This state-space representation forms the mathematical foundation necessary for designing robust state and parameter estimators in nonlinear biological systems [17], [22].

Asymptotic observer

In order to design an asymptotic observer for the model described by Ec. [eq:model], it was assumed that both, the dilution rate \(D(t)\) and the input variables of the reactor are known. Therefore, \(A(t)\) and \(b(t)\) are known \(\forall\, t \ge 0\). In addition, the variations of \(D(t)\) were bounded to ensure that \(A(t)\) was bounded. The equilibrium points \(x_1=0\), \(x_2=0\), \(Q_{\mathrm{CH_4}}=0\), \(s_1=s_1^{i}\) and \(s_2=s_2^{i}\) (called wash-out steady states) were obtained from Ec. [eq:model] by setting the right-hand side functions equal to zero. In order to avoid the wash-out steady states of the reactor, the upper limit of the dilution rate was bounded at \(D(t)<1\). On the other hand, the lower limit of the dilution rate was bounded at \(D(t)>0.05\) to ensure the observer stability and the maintenance of the continuous mode operation of the reactor, a critical constraint when designing nonlinear observers for stable bioprocess performance [17]. Since the nonlinearities \(f(x(t),t)\) are unknown, the asymptotic observer was designed such that unmeasured states could be reconstructed from measured states (Chen, 1992). This can be achieved by finding a suitable linear combination of the state variables \(w(t)=N\,x(t)\) with \(N\in\mathbb{R}^{s\times n}\) such that: \[\begin{equation} \label{eq:NC} N\,C = 0 \end{equation}\] The state space can be divided such that Ec. [eq:state] is rewritten as: \[\begin{align*} \dot{x}_a(t) &= C_1 f\left(x(t),t\right) + A_{11}(t)\,v_1(t) + A_{12}(t)\,v_2(t) + b_1(t),\\ \dot{x}_b(t) &= C_2 f\left(x(t),t\right) + A_{21}(t)\,v_1(t) + A_{22}(t)\,v_2(t) + b_2(t), \end{align*}\] where \(m\) measured states have been grouped in the vector \(v_2(t)\) and the variables to be estimated are represented by \(v_1(t)\).

Hypothesis 1 [22]: \(\operatorname{rank} C = \operatorname{rank} C_2 = c\). This implies the following properties:

  1. \(m\) and \(s\) are fixed, where \(m \ge c\), and also \(s \le n - c\).

  2. \(C_1\) can be written as a linear combination of \(C_2\): \(C_1 = K\,C_2\), with \(K\in\mathbb{R}^{s\times m}\).

  3. The nontrivial solution of Ec. [eq:NC] admits at least \(s\) columns of \(N\) to be chosen arbitrarily.

A nontrivial solution of Ec. [eq:NC] can be stated as follows: \(N\) can be rewritten as \(N=[N_1\;\; N_2]\) with \(N_1\in\mathbb{R}^{s\times s}\), \(N_2\in\mathbb{R}^{s\times m}\) and Ec. [eq:NC] can be rewritten as \(N_1 C_1 + N_2 C_2 = 0\). Then by properties b) and c), the simple solution of Ec. [eq:NC] is to choose arbitrarily \(N_1\) in order to calculate \(N_2\) as follows: \(N_2 = -N_1 C_1 C_2^{\dagger}\), where \(C_2^{\dagger}\) is a generalized pseudo-inverse of \(C_2\), such that \(C_2 C_2^{\dagger} C_2 = C_2\).

Under hypothesis 1, the system represented by Ec. [eq:asym] is an asymptotic observer, which is independent of the nonlinearities of the model described by Ec. [eq:model], highlighting its robustness for wastewater treatment applications where reaction kinetics are highly uncertain and difficult to model [4], [22]. \[\begin{equation} \label{eq:asym} \begin{aligned} \dot{\hat{w}}(t) &= W(t)\,\hat{w}(t) + g(t)\,v_2(t) + N\,b(t),\\ \hat{w}(0) &= N_1\hat{v}_1(0) + N_2\hat{v}_2(0),\\ \hat{x}_a(t) &= N_1^{-1}\left(\hat{w}(t) - N_2 v_2(t)\right) \end{aligned} \end{equation}\] with: \[\begin{align*} W(t) &= \left(N_1 A_{11}(t) + N_2 A_{21}(t)\right)N_1^{-1},\\ g(t) &= N_1 A_{12}(t) + N_2 A_{22}(t) - W(t)\,N_2. \end{align*}\] In this paper \(m=2\) measured states have been grouped in the vector \(v_2(t)=[s_1\;\; s_2]^{\top}\) (\(\dim v_2(t)=2\)) and variables to be estimated are represented by \(v_1(t)=[x_1\;\; x_2\;\; Q_{\mathrm{CH_4}}]^{\top}\) (\(\dim v_1(t)=s=n-m=3\)). The matrices \(A_{11}(t)\in\mathbb{R}^{3\times 3}\), \(A_{12}(t)\in\mathbb{R}^{3\times 2}\), \(A_{21}(t)\in\mathbb{R}^{2\times 3}\), \(A_{22}(t)\in\mathbb{R}^{2\times 2}\), \(C_1\in\mathbb{R}^{3\times 2}\), \(C_2\in\mathbb{R}^{2\times 2}\), \(b_1(t)\in\mathbb{R}^{3}\) and \(b_2(t)\in\mathbb{R}^{2}\) are the corresponding partitions of \(A(t)\), \(C\) and \(b(t)\) respectively. For the calculation of the matrix \(N\), \(N_1\) was chosen arbitrarily as an identity matrix to compute \(N_2\) as follows: \(N_2=-N_1 C_1 C_2^{\dagger}\), obtaining the following result: \[\begin{equation*} N_1 = \begin{bmatrix} 1 & 0 & 0\\ 0 & 1 & 0\\ 0 & 0 & 1\end{bmatrix},\qquad N_2 = \begin{bmatrix} Y_1 & 0\\ \left(1-Y_1\right)f_1 Y_2 & Y_2\\ Y_{\mathrm{CH_4}} & 0\end{bmatrix} \end{equation*}\] Substituting \(N_1\) and \(N_2\) in Ec. [eq:asym] yields: \[\begin{equation*} W(t) = W_s(t) = \begin{bmatrix} -\left(aD(t)+K_d\right) & 0 & 0\\ 0 & -\left(aD(t)+K_d\right) & 0\\ 0 & 0 & -1\end{bmatrix} \end{equation*}\]

Software sensor based on an interval observer

To overcome the problems associated with measuring all the input variables for the UASB reactor —a well-documented challenge due to the limitations of robust continuous monitoring instrumentation [1]— an interval observer was designed. A necessary condition for the design of an interval observer is that there must be a hypothetical observer of known inputs. The asymptotic observer presented in the previous section was used as the basis for the design of the interval observer that is presented below. It is recalled that the asymptotic observer was designed under the assumption that all variables in the input vector \(b(t)\) were known, but in practice this is not entirely true, which is a very common problem in anaerobic reactors where sensor signals may be incomplete, delayed, or subject to operational faults [20], [21]. To overcome this problem an interval observer was proposed, based on the assumption that it is possible to design an asymptotic observer for a system in which the values of the input variables vector \(b(t)\), its upper limits \(b^{+}(t)\) and lower limits \(b^{-}(t)\) are known, such that \(b^{-}(t)\le b(t)\le b^{+}(t)\). Then the asymptotic observer presented in Ec. [eq:asym] serves as the basis for the design of the following interval observer. For the upper limit interval observer: \[\begin{equation} \label{eq:upper} \left\{\begin{aligned} \dot{\hat{w}}^{+}(t) &= W\hat{w}^{+}(t) + g(t)\,v_2(t) + M\beta^{+}(t)\\ \hat{w}^{+}(0) &= N_1\hat{v}_1^{+}(0) + N_2 v_2(0)\\ \hat{x}_a^{+}(t) &= N_1^{-1}\left(\hat{w}^{+}(t) - N_2 v_2(t)\right) \end{aligned}\right. \end{equation}\] For the lower limit interval observer: \[\begin{equation} \label{eq:lower} \left\{\begin{aligned} \dot{\hat{w}}^{-}(t) &= W\hat{w}^{-}(t) + g(t)\,v_2(t) + M\beta^{-}(t)\\ \hat{w}^{-}(0) &= N_1\hat{v}_1^{-}(0) + N_2 v_2(0)\\ \hat{x}_a^{-}(t) &= N_1^{-1}\left(\hat{w}^{-}(t) - N_2 v_2(t)\right) \end{aligned}\right. \end{equation}\] with: \[\begin{align*} M &= \left[\begin{array}{c|c|c} N_1 & N_2 & \left|N_{2,ij}\right|\end{array}\right]^{\top},\\ \beta^{+}(t) &= \left[\begin{array}{c|c|c} b_1^{+}(t) & \dfrac{1}{2}\left(b_2^{+}(t)+b_2^{-}(t)\right) & \dfrac{1}{2}\left(b_2^{+}(t)-b_2^{-}(t)\right)\end{array}\right]^{\top},\\ \beta^{-}(t) &= \left[\begin{array}{c|c|c} b_1^{-}(t) & -\dfrac{1}{2}\left(b_2^{+}(t)+b_2^{-}(t)\right) & -\dfrac{1}{2}\left(b_2^{+}(t)-b_2^{-}(t)\right)\end{array}\right]^{\top}. \end{align*}\] The convergence of the upper and lower limit observers, or equivalently, the convergence of the interval observers is based on the principle of cooperativity defined by (Smith, 1995). A brief analysis about the convergence of an interval observer based on the principle of cooperativity is presented in [27].

Experimental results

To verify experimentally the operation of the proposed interval observer, a 2.1 L laboratory-scale UASB reactor was fed with industrial wastewater from a brewery, which was diluted and conditioned to ensure an experimental influent \(s_1^{i}\) concentration at \(3~\mathrm{g\,COD/L}\) and \(\mathrm{pH}=7\). However, taking into account the possibility of human error in the dilution process, a tolerance of \(\pm 5\,\%\) was established, so that the variations of the \(s_1^{i}\) were bounded at the next interval: \(\left(s_1^{i}\right)^{-}=2.7~\mathrm{g\,COD/L}\) and \(\left(s_1^{i}\right)^{+}=3.3~\mathrm{g\,COD/L}\). In addition, through experimental offline measurements was determined that, after the dilution process, \(s_2^{i}\) is always bounded to the next interval: \(\left(s_2^{i}\right)^{-}=0~\mathrm{g\,COD/L}\) and \(\left(s_2^{i}\right)^{+}=0.3~\mathrm{g\,COD/L}\). Reactor temperature was fixed at \(35\,^{\circ}\mathrm{C}\). Measurements of the dilution rate \(D(t)\), \(s_1\) and \(s_2\) were performed on-line (Figuras 2 to 4).

A data acquisition (DAQ) card (USB6008 by National Instruments) was used together with a standard personal computer (PC) for DAQ and data processing in the study. A monitoring interface, designed using LabVIEW 7.1i (National Instruments), displays the on-line measured signals, \(D(t)\), \(s_1\), \(s_2\) and \(Q_{\mathrm{CH_4}}\), and the estimated states, \(\hat{x}_1\), \(\hat{x}_2\) and \(\hat{Q}_{\mathrm{CH_4}}\). In order to obtain on-line information on the methane content in the biogas, an infrared gas sensor was integrated in a new on-line gas meter for a laboratory-scale anaerobic bioreactor that was developed for this project, aligning with recent technological integration of online physical sensors and soft-sensor monitoring schemes for anaerobic digestion [1], [3], [7]. In addition, the dilution rate measurements, \(D(t)\), (Figura 2) was obtained by means of the DAQ of the voltage signal of the feeding pump control card. Substrate concentration measurements, \(s_1\) and \(s_2\), (Figuras 3 and 4) were available from periodic (\(T=12\) hours) assays. For the interval observer implementation, these measurements were assumed to remain constant between the assays, a standard zero-order hold assumption when dealing with multi-rate sampled measurements in bioreactor monitoring [20].

Figura 2. Experimental on-line measurements of \(D\).

Figura 3. Experimental on-line effluent \(s_1\) concentration.

Figura 4. Experimental on-line effluent \(s_2\) concentration.

The asymptotic observer Ec. [eq:asym] was tested with two sets of initial conditions (see lines marked with the letter (a) in Figuras 5 and 6), showing excellent stability properties in both cases. For the asymptotic observer, the measurements of \(s_1^{i}\) and \(s_2^{i}\) were obtained from off-line data and they were assumed constant between measurements. On the other hand, the lines (b) and (c), in Figuras 5 and 6, are the estimated states for the upper limit interval observer and the lower limit interval observer, respectively. For the interval observer, the measurements of \(s_1^{i}\) and \(s_2^{i}\) were not used, only the bounded intervals for these input variables were used. Figuras 5 and 6 show that although the interval observer does not use the measurements of \(s_1^{i}\) and \(s_2^{i}\), the estimated states by this observer shows excellent stability properties and are quite close to the estimated states by the asymptotic observer, demonstrating the convergence and stability of observer designs under bounded system uncertainties [17].

Figura 5. Estimate of the acidogenic bacteria concentration, \(\hat{x}_1\), by means of: (a) Asymptotic Observer, (b) Upper limit Interval Observer and (c) Lower limit Interval Observer.

Figura 6. Estimate of the methanogenic bacteria concentration, \(\hat{x}_2\), by means of: (a) Asymptotic Observer, (b) upper limit Interval Observer and (c) lower limit Interval Observer.

Methane yield is an energetic parameter that expresses a dynamic balance between anabolic (biological synthesis) and catabolic (methane production) fluxes [26]. Theoretically, the methane yield of a methanogenic consortium \(Y_{\mathrm{CH_4}}\) is \(0.35~\mathrm{L_{CH_4}/gCOD_{removed}}\) at a low organic load rate (\(\mathrm{OLR}=1~\mathrm{gCOD/(L\,d)}\)). The increase of the OLR in an anaerobic reactor tends to increase the anabolic activity of the biomass, therefore, decreasing the organic carbon flow toward methane production and \(Y_{\mathrm{CH_4}}\). Figura 7 shows the experimental measurement and the estimation of the output methane gas flow rate of the UASB reactor. Three periods can be distinguished. From time 30 to 35 days, the OLR was held at approximately \(1~\mathrm{gCOD/(L\,d)}\). It can be seen that the experimental on-line measurements of the output methane gas flow rate (line (a)) lies between the lines (b) and (c), which represent the estimation of the output methane gas flow rate by means of the upper limit interval observer and lower limit interval observer, respectively. This indicates that the methane yield is very close to \(0.35~\mathrm{L_{CH_4}/gCOD_{removed}}\), which reflects a perfect balance between anabolic (biological synthesis) and catabolic (methane production) fluxes in the reactor. From time 35 to 41 days, the OLR was increased and held at approximately \(1.5~\mathrm{gCOD/(L\,d)}\). It can be seen that the experimental on-line measurements of the output methane gas flow rate (line (a)) lies under the lines (b) and (c). This indicates that the reactor tends to increase the anabolic activity of the biomass, therefore, decreasing the organic carbon flow toward methane production and \(Y_{\mathrm{CH_4}}\). After 41 days, the OLR was reduced and held at approximately \(1~\mathrm{gCOD/(L\,d)}\). It can be seen that the methane yield is again very close to \(0.35~\mathrm{L_{CH_4}/gCOD_{removed}}\).

Figura 7. (a) Experimental on-line measurements of the output methane gas flow rate, and its estimation, \(\hat{Q}_{\mathrm{CH_4}}\), by means of: (b) upper limit and (c) lower limit Interval Observer.

Conclusions

This study presented the development and application of an interval observer for estimating relevant variables in an anaerobic digestion process, particularly the methane gas flow rate at the reactor outlet and the concentrations of acidogenic and methanogenic microorganisms. The proposed observer was formulated using the general structure of the Anaerobic Digestion Model No. 1 (ADM1), allowing the main biochemical processes involved in anaerobic treatment to be incorporated into the estimation strategy.

The performance of the proposed approach was experimentally evaluated using real measurements obtained from a 2.1 L laboratory-scale Up-flow Anaerobic Sludge Blanket (UASB) reactor. The reactor was operated for the treatment of wastewater generated by a brewery, providing experimental conditions representative of an industrial anaerobic treatment application. The experimental validation demonstrated the applicability of the interval-observer methodology for estimating variables that are difficult to measure directly during reactor operation.

An additional contribution of the proposed approach is the possibility of analyzing the evolution of the methanogenic biomass through the methane yield, without requiring direct measurements of biomass concentration inside the reactor. This provides an alternative means of monitoring the biological activity associated with methane production and can be particularly useful when online biomass measurements are unavailable. Overall, the results indicate that the combination of the ADM1 model and an interval observer can provide valuable information for monitoring the dynamic behavior of anaerobic reactors and for assessing the relationship between microbial activity and methane production.

Créditos de los Autores

Martínez Sibaja, Albino: Conceptualización, Administración del proyecto, Redacción - borrador original.
Rodríguez Jarquin, José Pastor: Conceptualización, Investigación, Redacción - borrador original, Redacción - revisión y edición.
Bello Ramírez, Angélica Mara: Análisis formal, Investigación, Validación.
Posada Gómez, Rubén: Investigación, Metodología, Validación.
Juárez Barojas, Isaías: Redacción - revisión y edición.
González Morán, Carlos Omar: Investigación, Metodología, Supervisión.

[1]
J. Ibarra-Esparza, F. E. Ibarra-Esparza, M. E. González-López, A. Garcia-Gonzalez, and M. S. Gradilla-Hernández, “Instrumentation and continuous monitoring for the anaerobic digestion process: A systematic review,” IEEE Access, 2025.
[2]
Z. Parsa, R. Dhib, and M. Mehrvar, “Dynamic modelling, process control, and monitoring of selected biological and advanced oxidation processes for wastewater treatment: A review of recent developments,” Bioengineering, vol. 11, no. 2, 2024, doi: 10.3390/bioengineering11020189.
[3]
P. Yan, M. Gai, Y. Wang, and X. Gao, “Review of soft sensors in anaerobic digestion process,” Processes, vol. 9, no. 8, p. 1434, 2021, doi: 10.3390/PR9081434.
[4]
O. Bernard et al., “Advanced monitoring and control of anaerobic wastewater treatment plants: Software sensors and controllers for an anaerobic digester,” Water Science and Technology, vol. 43, no. 7, 2001, doi: 10.2166/wst.2001.0418.
[5]
M. Oualid, C. Abdelhani, and S. Samia, “ADM1-guided optimization of anaerobic digestion model parameters via whale optimization algorithm,” in 2024 international conference on advances in electrical and communication technologies (ICAECOT), 2024, pp. 1–6.
[6]
R. Jia, Y. C. Song, D. M. Piao, K. Kim, C. Y. Lee, and J. Park, “Exploration of deep learning models for real-time monitoring of state and performance of anaerobic digestion with online sensors,” Bioresource Technology, vol. 363, p. 127908, 2022, doi: 10.1016/J.BIORTECH.2022.127908.
[7]
X. Wang et al., “Machine learning algorithm integrated with real-time in situ sensors and physiochemical principle-driven soft sensors toward an anaerobic digestion-data fusion framework,” ACS ES&T Water, vol. 4, no. 3, pp. 1061–1072, 2024.
[8]
A. Martínez-Sibaja, A. Alvarado-Lassman, R. Posada-Gómez, J. M. M. Contreras, B. E. Gonzalez-Sanchez, and O. Sandoval-González, “Dedicated observer scheme for fault diagnosis and isolation in instruments of an anaerobic reactor,” Procedia Technology, vol. 7, 2013, doi: 10.1016/j.protcy.2013.04.022.
[9]
I. Angelidaki, L. Ellegaard, and B. K. Ahring, “A mathematical model for dynamic simulation of anaerobic digestion of complex substrates: Focusing on ammonia inhibition,” Biotechnology and Bioengineering, vol. 42, no. 2, 1993, doi: 10.1002/bit.260420203.
[10]
D. J. Batstone et al., “The IWA anaerobic digestion model no 1 (ADM1),” Water Science and Technology, vol. 45, no. 10, pp. 65–73, 2002.
[11]
M. Denac, A. Miguel, and I. J. Dunn, “Modeling dynamic experiments on the anaerobic degradation of molasses wastewater,” Biotechnology and Bioengineering, vol. 31, no. 1, 1988, doi: 10.1002/bit.260310102.
[12]
N. Gupta, S. K. Gupta, and K. B. Ramachandran, “Modelling and simulation of anaerobic stratified biofilm for methane production and prediction of multiple steady states,” Chemical Engineering Journal, vol. 65, no. 1, 1997, doi: 10.1016/S1385-8947(96)03116-6.
[13]
S. V. Kalyuzhnyi, “Batch anaerobic digestion of glucose and its mathematical modeling. II. Description verification and application of model,” Bioresource Technology, vol. 59, no. 2–3, 1997, doi: 10.1016/S0960-8524(96)00125-3.
[14]
G. Lettinga, A. F. M. van Velsen, S. W. Hobma, W. de Zeeuw, and A. Klapwijk, “Use of the upflow sludge blanket (USB) reactor concept for biological wastewater treatment, especially for anaerobic treatment,” Biotechnology and Bioengineering, vol. 22, no. 4, 1980, doi: 10.1002/bit.260220402.
[15]
P. L. McCarty and F. E. Mosey, “Modelling of anaerobic digestion processes (a discussion of concepts),” Water Science and Technology, vol. 24, no. 8, 1991, doi: 10.2166/wst.1991.0216.
[16]
M. T. Suidan, J. R. V. Flora, P. Biswas, and G. D. Sayles, “Optimization modelling of anaerobic biofilm reactors,” Water Science and Technology, vol. 30, no. 12, 1994, doi: 10.2166/wst.1994.0634.
[17]
Z. Xiao and Z. Duan, “Observer design for state and parameter estimation for two-time-scale nonlinear systems,” Processes, vol. 12, no. 12, p. 2875, 2024.
[18]
C. A. Aceves-Lara et al., “Kinetic parameters estimation in an anaerobic digestion process using successive quadratic programming,” Water Science and Technology, vol. 52, no. 1–2, pp. 419–426, 2005.
[19]
D. Dochain, “State and parameter estimation in chemical and biochemical processes: A tutorial,” Journal of Process Control, vol. 13, no. 8, 2003, doi: 10.1016/S0959-1524(03)00026-X.
[20]
H. Li et al., “Multi-rate sampled and delayed output signal prediction-based observer design for two-stage anaerobic digestion process,” International Journal of Robust and Nonlinear Control, vol. 36, no. 4, pp. 1693–1710, 2026.
[21]
S. Safavi, M. A. Safavi, H. Hamid, and S. Fallah, “Multi-sensor fault detection, identification, isolation and health forecasting for autonomous vehicles,” Sensors, vol. 21, no. 7, 2021, doi: 10.3390/s21072547.
[22]
V. Alcaraz-Gonzalez and V. Gonzalez-Alvarez, “Robust nonlinear observers for bioprocesses: Application to wastewater treatment,” in Selected topics in dynamics and control of chemical and biological processes, Springer, 2007, pp. 119–164.
[23]
A. Martínez-Sibaja et al., “Simplified interval observer scheme: A new approach for fault diagnosis in instruments,” Sensors, vol. 11, no. 1, 2011, doi: 10.3390/s110100612.
[24]
H. Li, Y. Tian, H. Wang, I. Simeonov, and N. Christov, “A volatile fatty acids adaptive observer-based hierarchical optimal controller design to maximum gas production of two-stage anaerobic digestion process,” Computers & Chemical Engineering, vol. 181, p. 108524, 2024.
[25]
T. P. Silva et al., “Optimized ADM1 modeling for maximized bioenergy production from fruit and vegetable waste in mesophilic UASB reactors,” Engenharia Sanitária e Ambiental, vol. 31, p. e031S112, 2026, doi: 10.1590/S1413-4152031S112.
[26]
S. Michaud, N. Bernet, P. Buffière, and J. P. Delgenès, “Use of the methane yield to indicate the metabolic behaviour of methanogenic biofilms,” Process Biochemistry, vol. 40, no. 8, 2005, doi: 10.1016/j.procbio.2004.12.017.
[27]
V. Alcaraz-González, J. P. Steyer, J. Harmand, A. Rapaport, V. González-Alvarez, and C. Pelayo-Ortiz, “Application of a robust interval observer to an anaerobic digestion process,” Developments in Chemical Engineering and Mineral Processing, vol. 13, no. 3–4, pp. 267–278, 2005.