Optimizing Biogas Yield and Carbon-Nitrogen Balance in Agricultural Anaerobic Digestion via a Hybrid CNN-LSTM Attention Model: A Pathway to Circular Bioeconomy
Research Article  ·  Published: 27 June 2026
Issue cover
Digital Intelligence in Agriculture
Volume 2, Issue 2, 2026: 88-102
Research Article Open Access

Optimizing Biogas Yield and Carbon-Nitrogen Balance in Agricultural Anaerobic Digestion via a Hybrid CNN-LSTM Attention Model: A Pathway to Circular Bioeconomy

1 College of Computer Science, Sichuan University, Chengdu 610065, China
2 School of Economics and Management, Beijing City University, Beijing 101309, China
* Corresponding Author: Yongqiang Wei, [email protected]
Volume 2, Issue 2

Article Information

Abstract

The transition to a circular bioeconomy in agriculture demands precise, real-time optimization of organic waste valorization, with anaerobic digestion (AD) being a central process. However, the inherent non-linearity, time-varying dynamics, and complex microbial interactions in large-scale agricultural AD reactors pose significant challenges to traditional kinetic models and human operators. This study proposes a novel data-driven hybrid CNN-LSTM-attention model to predict and optimize biogas yield and carbon-nitrogen (C/N) ratios using high-frequency multi-sensor data. By integrating real-time sensor feeds of pH, volatile fatty acids (VFAs), total solids (TS), and historical biogas production, the model captures both spatial feature correlations and long-term temporal dependencies, while the attention mechanism enhances interpretability by dynamically weighting input features. Validated on a 12-month dataset from a 500 m³ commercial AD plant, the hybrid model achieved a MAPE of 4.27% for 24-hour ahead biogas prediction, significantly outperforming standalone LSTM (6.75%) and traditional ARIMA models (9.83%). Model-guided C/N ratio optimization increased cumulative methane yield by 12.4% and reduced digestate processing costs by 9.8%. This framework provides an intelligent precision management tool for agricultural waste-to-energy systems, directly supporting the technological pillars of the circular bioeconomy.

Graphical Abstract

Optimizing Biogas Yield and Carbon-Nitrogen Balance in Agricultural Anaerobic Digestion via a Hybrid CNN-LSTM Attention Model: A Pathway to Circular Bioeconomy

Keywords

circular bioeconomy agricultural anaerobic digestion attention mechanism biogas optimization precision agriculture

Data Availability Statement

Data will be made available on request.

Funding

This work was supported by the 14th Five-Year Plan of Beijing Educational Science in 2025 under Grant CDGB25543.

Conflicts of Interest

The authors declare no conflicts of interest.

AI Use Statement

The authors declare that no generative AI was used in the preparation of this manuscript.

Ethical Approval and Consent to Participate

Not applicable.

References

  1. Leong, H. Y., Chang, C. K., Khoo, K. S., Chew, K. W., Chia, S. R., Lim, J. W., ... & Show, P. L. (2021). Waste biorefinery towards a sustainable circular bioeconomy: a solution to global issues. Biotechnology for Biofuels, 14(1), 87.
    [CrossRef] [Google Scholar]
  2. Geissdoerfer, M., Savaget, P., Bocken, N. M., & Hultink, E. J. (2017). The Circular Economy–A new sustainability paradigm?. Journal of cleaner production, 143, 757-768.
    [CrossRef] [Google Scholar]
  3. Hartmann, H., & Ahring, B. K. (2005). Anaerobic digestion of the organic fraction of municipal solid waste: influence of co-digestion with manure. Water research, 39(8), 1543-1552.
    [CrossRef] [Google Scholar]
  4. European Commission. (2019). A European Green Deal. Retrieved May 15, 2025, from https://ec.europa.eu/info/strategy/priorities-2019-2024/european-green-deal_en
    [Google Scholar]
  5. Möller, K., & Müller, T. (2012). Effects of anaerobic digestion on digestate nutrient availability and crop growth: A review. Engineering in Life Sciences, 12(3), 242–257.
    [CrossRef] [Google Scholar]
  6. Wainaina, S., Awasthi, M. K., Sarsaiya, S., Chen, H., Singh, E., Kumar, A., ... & Taherzadeh, M. J. (2020). Resource recovery and circular economy from organic solid waste using aerobic and anaerobic digestion technologies. Bioresource technology, 301, 122778.
    [CrossRef] [Google Scholar]
  7. Harirchi, S., Wainaina, S., Sar, T., Nojoumi, S. A., Parchami, M., Parchami, M., ... & Taherzadeh, M. J. (2022). Microbiological insights into anaerobic digestion for biogas, hydrogen or volatile fatty acids (VFAs): a review. Bioengineered, 13(3), 6521-6557.
    [CrossRef] [Google Scholar]
  8. Xue, S., Zhao, N., Song, J., & Wang, X. (2019). Interactive effects of chemical composition of food waste during anaerobic co-digestion under thermophilic temperature. Sustainability, 11(10), 2933.
    [CrossRef] [Google Scholar]
  9. Angelidaki, I., Ellegaard, L., & Ahring, B. K. (2003). Applications of the anaerobic digestion process. Biomethanation ii, 1-33.
    [CrossRef] [Google Scholar]
  10. Wang, X., Lu, X., Li, F., & Yang, G. (2014). Effects of temperature and carbon-nitrogen (C/N) ratio on the performance of anaerobic co-digestion of dairy manure, chicken manure and rice straw: focusing on ammonia inhibition. PloS one, 9(5), e97265.
    [CrossRef] [Google Scholar]
  11. Andrews, J. F. (1969). Dynamic model of the anaerobic digestion process. Journal of the Sanitary Engineering Division, 95(1), 95-116.
    [CrossRef] [Google Scholar]
  12. Ling, J. Y. X., Chan, Y. J., Chen, J. W., Chong, D. J. S., Tan, A. L. L., Arumugasamy, S. K., & Lau, P. L. (2024). Machine learning methods for the modelling and optimisation of biogas production from anaerobic digestion: a review. Environmental Science and Pollution Research, 31(13), 19085-19104.
    [CrossRef] [Google Scholar]
  13. Gupta, R., Zhang, L., Hou, J., Zhang, Z., Liu, H., You, S., ... & Li, W. (2023). Review of explainable machine learning for anaerobic digestion. Bioresource technology, 369, 128468.
    [CrossRef] [Google Scholar]
  14. Yu, Y., Si, X., Hu, C., & Zhang, J. (2019). A review of recurrent neural networks: LSTM cells and network architectures. Neural computation, 31(7), 1235-1270.
    [CrossRef] [Google Scholar]
  15. Kim, T. Y., & Cho, S. B. (2019). Predicting residential energy consumption using CNN-LSTM neural networks. Energy, 182, 72–81.
    [CrossRef] [Google Scholar]
  16. Zhou, H., Zhang, S., Peng, J., Zhang, S., Li, J., Xiong, H., & Zhang, W. (2021, May). Informer: Beyond efficient transformer for long sequence time-series forecasting. In Proceedings of the AAAI conference on artificial intelligence (Vol. 35, No. 12, pp. 11106-11115).
    [CrossRef] [Google Scholar]
  17. Hodge, V., & Austin, J. (2004). A survey of outlier detection methodologies. Artificial intelligence review, 22(2), 85-126.
    [CrossRef] [Google Scholar]
  18. Hastie, T., Tibshirani, R., & Friedman, J. (2009). The Elements of Statistical Learning: Data Mining, Inference, and Prediction. Springer Science & Business Media.
    [CrossRef] [Google Scholar]
  19. LeCun, Y., Bengio, Y., & Hinton, G. (2015). Deep learning. Nature, 521(7553), 436-444.
    [CrossRef] [Google Scholar]
  20. Gers, F. A., Schmidhuber, J., & Cummins, F. (2000). Learning to forget: Continual prediction with LSTM. Neural computation, 12(10), 2451-2471.
    [CrossRef] [Google Scholar]
  21. Kingma, D.P., & Ba, J. (2014). Adam: A Method for Stochastic Optimization. arXiv preprint arXiv:1412.6980.
    [CrossRef] [Google Scholar]
  22. Caruana, R., Lawrence, S., & Giles, L. (2000, January). Overfitting in neural nets: backpropagation, conjugate gradient, and early stopping. In Proceedings of the 14th International Conference on Neural Information Processing Systems (pp. 381-387).
    [Google Scholar]
  23. Box, G.E.P., Jenkins, G.M., & Reinsel, G.C. (2008). Time Series Analysis: Forecasting and Control (4th ed.). Hoboken, NJ: Wiley.
    [CrossRef] [Google Scholar]
  24. Drucker, H., Burges, C.J.C., Kaufman, L., Smola, A., & Vapnik, V. (1996). Support Vector Regression Machines. Advances in Neural Information Processing Systems, 9.
    [Google Scholar]
  25. Diebold, F. X., & Mariano, R. S. (2002). Comparing predictive accuracy. Journal of Business & economic statistics, 20(1), 134-144.
    [CrossRef] [Google Scholar]
  26. Mao, C., Feng, Y., Wang, X., & Ren, G. (2015). Review on research achievements of biogas from anaerobic digestion. Renewable and sustainable energy reviews, 45, 540-555.
    [CrossRef] [Google Scholar]
  27. National Bureau of Statistics of China. (2024). China Statistical Yearbook 2024. Beijing: China Statistics Press. https://www.stats.gov.cn/sj/ndsj/2024/indexeh.htm
    [Google Scholar]
  28. European Commission. (2024). Carbon Border Adjustment Mechanism: Questions and Answers. Retrieved May 20, 2024, from https://ec.europa.eu/commission/presscorner/detail/en/qanda_23_3701
    [Google Scholar]
  29. Ministry of Agriculture and Rural Affairs of China. (2024). Subsidy Standards for Rural Biogas Projects (2024 Revision). Beijing. http://www.reea.agri.cn/zqbwh/202411/P020241111348620824667.pdf
    [Google Scholar]
  30. FAO. (2024). The State of Food and Agriculture 2024: Bioeconomy Solutions for Smallholder Farmers. Rome: FAO. https://www.fao.org/agrifood-economics/publications/detail/en/c/1722598/
    [Google Scholar]
  31. UNFCCC. (2024). UN Climate Change Quarterly Update: Q1 2024. https://unfccc.int/about-us/reports/quarterly-updates/un-climate-change-quarterly-update-q1-2024
    [Google Scholar]
  32. Lekkas, D. F., Panagiotakis, I., & Dermatas, D. (2021). A digital circular bioeconomy–Opportunities and challenges for waste management in this new era. Waste management & research, 39(3), 407-408.
    [CrossRef] [Google Scholar]
  33. Shen, R., Sun, P., Liu, J., Luo, J., Yao, Z., Zhang, R., ... & Zhao, L. (2024). Robust prediction for characteristics of digestion products in an industrial-scale biogas project via typical non-time series and time-series machine learning algorithms. Chemical Engineering Journal, 498, 155582.
    [CrossRef] [Google Scholar]
  34. Yildirim, O., & Ozkaya, B. (2023). Prediction of biogas production of industrial scale anaerobic digestion plant by machine learning algorithms. Chemosphere, 335, 138976.
    [CrossRef] [Google Scholar]
  35. Niu, Z., Zhong, G., & Yu, H. (2021). A review on the attention mechanism of deep learning. Neurocomputing, 452, 48–62.
    [CrossRef] [Google Scholar]
  36. European Parliament. (2024). Artificial Intelligence Act (AI Act). Retrieved May 20, 2024, from https://www.europarl.europa.eu/doceo/document/TA-9-2024-0138_EN.html
    [Google Scholar]
  37. United Nations. (2015). Transforming our world: the 2030 Agenda for Sustainable Development, A/RES/70/1. New York. https://basus.info/wp-content/uploads/2025/04/A_RES_70_1_E.pdf
    [Google Scholar]
  38. European Commission. (2022). Circular Bioeconomy Strategy 2030, COM(2022) 678 final. Brussels. Retrieved May 20, 2024, from https://eur-lex.europa.eu/legal-content/EN/TXT/?uri=CELEX:52022PC0678
    [Google Scholar]
  39. Jiang, X., Sommer, S. G., & Christensen, K. V. (2011). A review of the biogas industry in China. Energy Policy, 39(10), 6073-6081.
    [CrossRef] [Google Scholar]
  40. Mazzucato, M., & Semieniuk, G. (2017). Public financing of innovation: new questions. Oxford Review of Economic Policy, 33(1), 24-48.
    [CrossRef] [Google Scholar]
  41. Jeon, J., Nguyen, H. T., Yeo, G., Lee, C., Cho, S. K., & Oh, S. (2026). Integrating metagenomics and explainable artificial intelligence for modeling of food waste treatment using full-scale anaerobic digestion. Bioresource Technology, 453, 134649.
    [CrossRef] [Google Scholar]
  42. Kalina, M., Ogwang, J. Ò., & Tilley, E. (2022). From potential to practice: rethinking Africa's biogas revolution. Humanities and Social Sciences Communications, 9, 374.
    [CrossRef] [Google Scholar]
  43. Zhang, Y., Li, L., Ren, Z., Yu, Y., Li, Y., Pan, J., Lu, Y., Feng, L., Zhang, W., & Han, Y. (2022). Plant-scale biogas production prediction based on multiple hybrid machine learning technique. Bioresource Technology, 363, 127899.
    [CrossRef] [Google Scholar]
  44. Jeong, K., Abbas, A., Shin, J., Son, M., Kim, Y. M., & Cho, K. H. (2021). Prediction of biogas production in anaerobic co-digestion of organic wastes using deep learning models. Water Research, 205, 117697.
    [CrossRef] [Google Scholar]
  45. Shen, R., Sun, P., Liu, J., Luo, J., Yao, Z., Zhang, R., & Zhao, L. (2024). Robust prediction for characteristics of digestion products in an industrial-scale biogas project via typical non-time series and time-series machine learning algorithms. Chemical Engineering Journal, 498, 155582.
    [CrossRef] [Google Scholar]
  46. European Commission. (2024). Carbon Border Adjustment Mechanism: Implementation Guidelines. Brussels. Retrieved May 20, 2025, from https://taxation-customs.ec.europa.eu/carbon-border-adjustment-mechanism_en
    [Google Scholar]
  47. National Development and Reform Commission of China. (2021). 14th Five-Year Plan for Bioeconomy Development. Beijing. https://leap.unep.org/en/countries/cn/national-legislation/14th-five-year-plan-bioeconomy-development
    [Google Scholar]
  48. U.S. Department of Energy. (2022). Inflation Reduction Act: Rural Energy Subsidies. Washington, DC. https://www.rd.usda.gov/inflation-reduction-act
    [Google Scholar]
  49. FAO. (2022). Scaling up inclusive digitalization in agricultural value chains (Meeting document). Bangkok, Thailand: FAO. https://openknowledge.fao.org/handle/20.500.14283/nh651en
    [Google Scholar]
  50. Li, C., He, P., Peng, W., Lü, F., Du, R., & Zhang, H. (2022). Exploring available input variables for machine learning models to predict biogas production in industrial-scale biogas plants treating food waste. Journal of Cleaner Production, 380, 135074.
    [CrossRef] [Google Scholar]

Cite This Article

APA Style
Li, Y., & Wei, Y.(2026). Optimizing Biogas Yield and Carbon-Nitrogen Balance in Agricultural Anaerobic Digestion via a Hybrid CNN-LSTM Attention Model: A Pathway to Circular Bioeconomy. Digital Intelligence in Agriculture, 2(2), 88-102. https://doi.org/10.62762/DIA.2026.512329
Export Citation
RIS Format
Compatible with EndNote, Zotero, Mendeley, and other reference managers
TY  - JOUR
AU  - Li, Yiyang
AU  - Wei, Yongqiang
PY  - 2026
DA  - 2026/06/27
TI  - Optimizing Biogas Yield and Carbon-Nitrogen Balance in Agricultural Anaerobic Digestion via a Hybrid CNN-LSTM Attention Model: A Pathway to Circular Bioeconomy
JO  - Digital Intelligence in Agriculture
T2  - Digital Intelligence in Agriculture
JF  - Digital Intelligence in Agriculture
VL  - 2
IS  - 2
SP  - 88
EP  - 102
DO  - 10.62762/DIA.2026.512329
UR  - https://www.icck.org/article/abs/DIA.2026.512329
KW  - circular bioeconomy
KW  - agricultural anaerobic digestion
KW  - attention mechanism
KW  - biogas optimization
KW  - precision agriculture
AB  - The transition to a circular bioeconomy in agriculture demands precise, real-time optimization of organic waste valorization, with anaerobic digestion (AD) being a central process. However, the inherent non-linearity, time-varying dynamics, and complex microbial interactions in large-scale agricultural AD reactors pose significant challenges to traditional kinetic models and human operators. This study proposes a novel data-driven hybrid CNN-LSTM-attention model to predict and optimize biogas yield and carbon-nitrogen (C/N) ratios using high-frequency multi-sensor data. By integrating real-time sensor feeds of pH, volatile fatty acids (VFAs), total solids (TS), and historical biogas production, the model captures both spatial feature correlations and long-term temporal dependencies, while the attention mechanism enhances interpretability by dynamically weighting input features. Validated on a 12-month dataset from a 500 m³ commercial AD plant, the hybrid model achieved a MAPE of 4.27% for 24-hour ahead biogas prediction, significantly outperforming standalone LSTM (6.75%) and traditional ARIMA models (9.83%). Model-guided C/N ratio optimization increased cumulative methane yield by 12.4% and reduced digestate processing costs by 9.8%. This framework provides an intelligent precision management tool for agricultural waste-to-energy systems, directly supporting the technological pillars of the circular bioeconomy.
SN  - 3069-3187
PB  - Institute of Central Computation and Knowledge
LA  - English
ER  - 
BibTeX Format
Compatible with LaTeX, BibTeX, and other reference managers
@article{Li2026Optimizing,
  author = {Yiyang Li and Yongqiang Wei},
  title = {Optimizing Biogas Yield and Carbon-Nitrogen Balance in Agricultural Anaerobic Digestion via a Hybrid CNN-LSTM Attention Model: A Pathway to Circular Bioeconomy},
  journal = {Digital Intelligence in Agriculture},
  year = {2026},
  volume = {2},
  number = {2},
  pages = {88-102},
  doi = {10.62762/DIA.2026.512329},
  url = {https://www.icck.org/article/abs/DIA.2026.512329},
  abstract = {The transition to a circular bioeconomy in agriculture demands precise, real-time optimization of organic waste valorization, with anaerobic digestion (AD) being a central process. However, the inherent non-linearity, time-varying dynamics, and complex microbial interactions in large-scale agricultural AD reactors pose significant challenges to traditional kinetic models and human operators. This study proposes a novel data-driven hybrid CNN-LSTM-attention model to predict and optimize biogas yield and carbon-nitrogen (C/N) ratios using high-frequency multi-sensor data. By integrating real-time sensor feeds of pH, volatile fatty acids (VFAs), total solids (TS), and historical biogas production, the model captures both spatial feature correlations and long-term temporal dependencies, while the attention mechanism enhances interpretability by dynamically weighting input features. Validated on a 12-month dataset from a 500 m³ commercial AD plant, the hybrid model achieved a MAPE of 4.27\% for 24-hour ahead biogas prediction, significantly outperforming standalone LSTM (6.75\%) and traditional ARIMA models (9.83\%). Model-guided C/N ratio optimization increased cumulative methane yield by 12.4\% and reduced digestate processing costs by 9.8\%. This framework provides an intelligent precision management tool for agricultural waste-to-energy systems, directly supporting the technological pillars of the circular bioeconomy.},
  keywords = {circular bioeconomy, agricultural anaerobic digestion, attention mechanism, biogas optimization, precision agriculture},
  issn = {3069-3187},
  publisher = {Institute of Central Computation and Knowledge}
}

Article Metrics

Citations
Crossref
0
Scopus
0
Views
104
PDF Downloads
3

Publisher's Note

ICCK stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and Permissions

CC BY Copyright © 2026 by the Author(s). Published by Institute of Central Computation and Knowledge. 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/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made.
Digital Intelligence in Agriculture
Digital Intelligence in Agriculture
ISSN: 3069-3187 (Online)
Portico
Preserved at
Portico