ABSTRACT
Accurately characterizing the substrate used in anaerobic digestion is crucial for predicting the biogas plant's performance. This issue makes particularly challenging the application of modeling in codigestion plants. In this work, a novel methodology called substrate prediction module (SPM) has been developed and tested, using virtual codigestion data. The SPM aims to estimate the inlet properties of the substrate based on the reverse application of the anaerobic digestion model n1 (ADM1). The results show that, while the SPM can estimate some properties of the substrate based on certain output parameters, there are limitations in accurately determining all required variables.
HIGHLIGHTS
Extensive substrate characterization is challenging, especially for codigestion.
A reverse modeling approach is proposed to estimate unknown substrate properties.
The substrate prediction module processes measured AD data based on the ADM1.
Two data processing strategies are assessed: 7-day moving block and daily data.
The SPM could estimate some substrate properties but there are limitations.
INTRODUCTION
Anaerobic digestion (AD) is a consolidated technology that produces biogas, biomethane, and an organic alternative to chemical fertilizer. AD is expected to play a key role in fighting climate change since it can potentially reduce 10% of the world's current greenhouse gases (GHG) emissions through renewable energy generation and through avoided emissions from crop burning, deforestation, landfill gas, and fertilizer manufacture emissions (Morton & Thompson 2019).
Process modeling is the representation of a process through equations, where the most important phenomena that take place are considered (e.g. physiochemical or biological). In the context of an AD plant, mathematical modeling allows the operator to rely on a virtual prototype of the digester, which can run in parallel to the operation, providing a flexible tool for scenario predictions, optimization, and anticipation of process imbalance, among others. Modeling should become a central part of the monitoring and supervision of AD in the forthcoming years, given the increasing adoption of process instrumentation and automation, as well as the need for better control and supervision (Wu et al. 2021b). Mathematical modeling of the AD process has been studied for over 20 years, particularly since the Anaerobic Digestion Model No.1 (ADM1) was released (Batstone et al. 2002). The common practice of modeling in AD comprises model implementation, calibration with a certain set of data, and validation with an independent dataset, and then the model can be exploited (Donoso-Bravo et al. 2011). Over the years of modeling applications in AD, a big challenge has been lurking: the need for an extensive substrate characterization as model input, which is particularly critical when using the ADM1 (Wu et al. 2021a). The substrate characterization should comprise key parameters including the biodegradable and inert fractions of the influent, organic matter measured as COD (chemical oxygen demand), and the macromolecular composition (proteins, lipids, and carbohydrates) for both particulate and soluble fractions. Additionally, it is essential to include measurements of ammonia nitrogen, inorganic carbon, volatile fatty acids (VFAs), and other relevant parameters. A proper substrate characterization is required for the model to accurately predict the output variables such as biogas, VFAs, or ammonia. There have been some attempts for the adaptation of more conventional measurements, such as total COD, volatile solids (VS), alkalinity to the needs of the ADM1 model; however, those methodologies still fall short in covering all the required input variables while still demanding an excessive experimental workload (Kleerebezem & Van Loosdrecht 2006; Poggio et al. 2016). Therefore, this issue still lacks a solution and remains one of the main factors impeding the implementation of modeling applications in biogas plants (Wu et al. 2019). This situation can become even more problematic considering the increasing application of codigestion of different organic wastes, with different physicochemical characteristics from different origins, that are fed in the same digester.
All the experience with the ADM1 has left behind large sets of calibrated and validated parameters in the literature. Therefore, with a collection of experimental measurements, it may seem feasible to use the model to estimate the inlet characterization of the substrate in a reversed modeling application. Incipient attempts at doing this were presented in Donoso-Bravo et al. (2020) where the cationic and inert fractions were estimated from the data along with other conventional kinetic parameters. This study aims to assess the reverse engineering of the ADM1 for its exploitation as a soft sensor model to characterize the substrate fed into anaerobic digesters.
A novel methodology, called the substrate prediction module (SPM), is proposed. SPM provides an estimation of part of the substrate's properties, that are not measured onsite, after processing the measured inputs and outputs of the digester by a mechanistic modeling approach. The underlying hypothesis of the SPM is that the measured output(s) in the digester must be sensitive to some changes in the substrate properties; therefore, the properties could be estimated to some extent by the variation of the digester outputs.
METHODS
General rationale
Methodology of the SPM applied to estimate the unknown substrate characteristics.
Methodology of the SPM applied to estimate the unknown substrate characteristics.
It is worth noting that the proposed approach would be valid only if the ADM1 model is correctly calibrated in all its parameters (e.g., kinetic parameters, yield coefficients, etc.). Therefore, an initial stage of model calibration should be carried out, as has been done in the literature.
Numerical evaluation of the concept
To prove the idea, in this work, the SPM was evaluated at a conceptual level by using a subrogated modeling approach. Instead of using data from a real digester, synthetic data generated from another ADM1-based model was used.
The models
Two ADM1-based models were employed to first generate synthetic operational data and secondly to test the SPM. To generate the data, a modified version of the ADM1 enabling the simulation of the codigestion process (AcoD) was used. A description of this model can be found in Donoso-Bravo et al. (2020). In other words, this model was used to generate the operating data that were afterwards used to test the actual SPM. For the SPM, the original ADM1 together with the parameters and model tweaks proposed by Rosen & Jeppsson (2006) was used. The utilization of slightly varied models for data generation and methodology testing imparts a heightened level of realism to the results.
The AcoD model and the SPM were implemented and simulated in Matlab 2021®. The solver ODE15s was used to solve the ordinary differential equations system. The initial conditions of the model for both the surrogate modeling and the SPM itself were obtained from prior simulations where steady-state conditions were reached, and process values were similar to the initial values of the experimental data.
The parameters estimation
The Matlab toolbox fminsearchbnd was used for the optimization procedure. Like fminsearch, fminsearchbnd implements the Nelder–Mead algorithm, but unlike fminsearch, it allows for bounds to be applied to the variables. fminsearch is suitable only for unbounded searches. Compared to fmincon, which is a gradient-based method, fminsearchbnd has less risk of getting trapped in local minima, offering greater stability and higher convergence success.
The operational conditions
A virtual digester of 13,600 m3 total volume (10% volume headspace) at mesophilic conditions (35 °C) treating sewage sludge (primary and secondary sludge) was simulated for a period of 365 days. For the virtual AcoD digester operation in continuous mode, two operating scenarios were considered: (1) the sporadic addition of a carbohydrate-rich wastewater as co-substrate up to day 250 and (2) the implementation of thermal hydrolysis (TH) of secondary sewage sludge leading to a stepwise increment of the proportion of soluble COD in the inlet after the day 250.
The output processing approaches
Two output processing data strategies were evaluated: daily data and moving blocks of 7-day data. The daily data strategy used the output data from a certain day to determine the input condition related to that day. The daily simulated data represent an average of the complete dataset generated during a day of simulation. The 7-day moving block strategy used the average value of the output calculated over seven consecutive days (days 1–7) to determine the input condition of day 1. The use of moving blocks was chosen and applied to minimize the effect of the variability of the daily data, assuming that taking a 7-day average is a compromise that smooths the data but gets results reasonably close to the actual events.
COD fractionation of substrate and relationship with selected input variables in SPM numerical assessment.
COD fractionation of substrate and relationship with selected input variables in SPM numerical assessment.
The experimental design comprised the use of three ADM1 output variables as input data for the SPM: biogas (B), VFAs, and pH, to predict three substrates' properties. Table 1 summarizes the assessed virtual experimental conditions for each of the nine experiments, called C1–C9.
Experimental conditions assessed in the SPM
Estimated parameter . | Input data for SPM . | ||
---|---|---|---|
B . | B, VFAs . | B, VFAs, pH . | |
fin | C1 | C4 | C7 |
fin, fsCOD/tCOD | C2 | C5 | C8 |
fin, fsCOD/tCOD, fCH | C3 | C6 | C9 |
Estimated parameter . | Input data for SPM . | ||
---|---|---|---|
B . | B, VFAs . | B, VFAs, pH . | |
fin | C1 | C4 | C7 |
fin, fsCOD/tCOD | C2 | C5 | C8 |
fin, fsCOD/tCOD, fCH | C3 | C6 | C9 |
fin, inert fraction; fsCOD/tCOD, organic soluble fraction; fCH, carbohydrate fraction; B, biogas; VFAs, volatile fatty acids.
RESULTS AND DISCUSSION
Virtual digester operation
Input data from the virtual digester modeled through the ADM1-AcoD: (a) organic loading rate and hydraulic retention time over time, and (b) total and soluble COD over time.
Input data from the virtual digester modeled through the ADM1-AcoD: (a) organic loading rate and hydraulic retention time over time, and (b) total and soluble COD over time.
Output data of the (a) biogas and (b) digestate line of the virtual digester modeled through the ADM1-AcoD under the operating conditions of codigestion and thermal hydrolysis.
Output data of the (a) biogas and (b) digestate line of the virtual digester modeled through the ADM1-AcoD under the operating conditions of codigestion and thermal hydrolysis.
SPM assessment
7-day moving block strategy
Substrate parameter values over a year of operation of the virtual digester estimated through the SPM tool using the 7-day moving block strategy. Dashed lines represent the exact values used in the simulation for data generation.
Substrate parameter values over a year of operation of the virtual digester estimated through the SPM tool using the 7-day moving block strategy. Dashed lines represent the exact values used in the simulation for data generation.
When a second parameter related to the substrate properties is added to the estimation procedure, fin still shows some sensitivity to the biogas production (C2), although this sensitivity is less than the observed in C1. Conversely, fsCOD/tCOD cannot be accurately estimated under the evaluated conditions due to erratic behavior, especially during the TH period, where a downward trend was observed instead of the expected increase. When VFAs are included in the minimization function (C5), the sensitivity of both parameters improves, in terms of stability relative to the operational conditions. However, the actual value of fin is not properly estimated, similar to what was observed in C4. During the incorporation of TH, there is a delay in the estimation of fsCOD/tCOD, as the parameter does not show sensitivity at the start of the process. This can be explained by the averaging performed with the 7-day block strategy. Adding pH as an output parameter to the minimization procedure (C8) slightly improves the sensitivity of fsCOD/tCOD, while maintaining the sensitivity of fin. Additionally, it reduces the delay in fsCOD/tCOD sensitivity, compared to what was observed in C5.
A significant impact on the optimization procedure is observed when a third input parameter, such as fCH, is incorporated. Using only biogas production (C3), fCH cannot be determined throughout the entire evaluated period. The parameters fin and fsCOD/tCOD still exhibit some sensitivity, but the values estimated by the SPM deviate further from the actual ones. Interestingly, fsCOD/tCOD during the TH period is better predicted compared to when only two input parameters were estimated (C2, C5, and C8). The addition of VFA and pH as output values in the cost function (C6 and C9) has a significantly negative impact on the estimation of the input parameters, as no sensitivity is observed during the evaluated period.
Daily estimation
Substrate parameter values over a year of operation of the virtual digester estimated through the SPM tool using the daily data strategy. Dashed lines represent the exact values used in the simulation for data generation.
Substrate parameter values over a year of operation of the virtual digester estimated through the SPM tool using the daily data strategy. Dashed lines represent the exact values used in the simulation for data generation.
When the second input parameter fsCOD/tCOD is incorporated, using only biogas as an output (C2), fin shows some sensitivity, and its estimated value is close to the actual one, whereas fsCOD/tCOD is not properly determined. Unlike the 7-day block strategy, fsCOD/tCOD is mostly stuck at the upper extreme of the optimization boundary, with random drops in its value. When the variables VFAs and pH are added to the cost function (C5 and C8), the estimation of the inlet parameters does not yield positive results, as a large dispersion of their values is obtained. This dispersion is more significant than that observed using the 7-day block strategy, where the sensitivity of the parameters was still visible and related to the operational events.
With the introduction of a third input parameter, fCH, the SPM demonstrates limitations in estimating trends in substrate properties correlated with the simulated operational conditions using daily estimation. This is especially noticeable for C6 and C9.
Key aspects and limitations
Several factors can affect the performance of this methodology. First, the mismatch between the HRT and the cadence of the data processing. Given that the HRT of digesters typically ranges from 30 to 35 days, the first data processing approach, based on a 7-day block of data, aims to leverage the inherent delay response and natural dynamics of the anaerobic digester process. AD processes are known to exhibit slower kinetics compared to aerobic activated sludge systems or high-rate anaerobic digesters such as upflow anaerobic sludge blanket (UASB) and expanded granular sludge bed (EGSB) reactors, which operate with HRTs in the order of hours. The daily data showed worse results as digesters may exhibit sensitivity to short-term variations in input (as noted from field experience by the author), this sensitivity alone does not appear to be adequate to reliably estimate unknown inputs.
A second aspect is the relationship between the number of outputs considered in the cost function and the number of inlet parameters being estimated. Including more outputs, such as ammonia or methane content could enhance the SPM's capacity to estimate additional inlet properties. A difficulty that arises is that these outputs are often not measured and if they are, they are not measured with the same frequency. Therefore, a post-processing data procedure needs to be assessed and implemented. A typical digester follow-up spreadsheet may contain the average data for a day of an online sensor and data points measured once a week or month to comply with regulations. In the cases where outputs such as, phosphate or H2S content are measured, model modifications would be required to include the biochemical reactions involved in generating these compounds, as the ADM1 does not currently incorporate these variables.
Overall, the SPM tool cannot accurately predict all the values of the inlet parameters characterizing the substrate, but it does show sensitivity to the variations in the data it uses as input (output data from the digester). A tool that can predict some properties of the substrate fed daily into the digester would be quite useful, as half of the recommendations for avoiding instabilities in the AD plant are related to the characteristics of the inlet conditions (Drosg 2013).
CONCLUSIONS
A novel methodology for estimating some properties of the substrate being fed to an anaerobic digester was developed and evaluated in this study. The methodology is based on the ADM1 model and an optimization procedure that adjusts substrate properties to minimize the difference between measured outputs. Three outputs and three substrate properties were assessed using two data collection and processing strategies: the 7-day moving block and daily data.
The 7-day moving block was demonstrated to be more effective in capturing the dynamic of the substrate properties affecting digester behavior, although averaging too much data could lead to unexpected results. A critical prerequisite for the effective application of this SPM is the prior comprehensive characterization of the digester through model calibration. Evaluating a set of different measured outputs could improve the estimation of inlet substrate properties, thereby enhancing the module's predictive capability.
DATA AVAILABILITY STATEMENT
All relevant data are included in the paper or its Supplementary Information.
CONFLICT OF INTEREST
The authors declare there is no conflict.