Machine Learning-Based Prediction and Optimisation of Methane Yield from Cattle Manure Anaerobic Digestion and Thermodynamic Analysis of Temperature–pH Interactions

Authors

Keywords:

Anaerobic digestion, cattle manure, biogas, machine-learning, Thermodynamics

Abstract

The research involved the use of machine learning approaches to assess the impact of temperature and pH on methane yield during anaerobic digestion of cattle manure, as well as finding the best operating conditions. The literature-based data set consisting of 97 experimental points obtained from peer-reviewed publications was applied for building predictive models. Four different regression models – Linear Regression, Polynomial Regression, Support Vector Regression (SVR) and Random Forest – were trained and tested using methane yield as an output variable. Performance of models was estimated by calculating the coefficient of determination (R²), root mean squared error (RMSE) and mean absolute error (MAE). The Random Forest algorithm showed better predictive performance with test-set R² of 0.4476, RMSE of 53.88 L CH₄/kg volatile solids (VS) and MAE of 44.48 L CH₄/kg VS. Robustness of the developed model was also proven by five-fold cross-validation, resulting in average R² value of 0.386 ± 0.171. Feature importance analysis revealed the contribution of pH equal to 70.4% and temperature – 29.6%, thus emphasizing the greater importance of pH for the studied operational parameters range. Response Surface Analysis determined optimal operating conditions as temperature = 53.7°C and pH = 7.17 leading to maximal methane yield of 272.7 L CH₄/kg VS. Also, the interaction between temperature and pH showed the tendency to shift in optimal pH values depending on temperature increase, which coincided with thermodynamics predictions obtained according to van't Hoff equation. In this work, a new approach involving machine learning and thermodynamics has been used for predicting methane yield and optimising temperature and pH for anaerobic digestion of cattle manure.

Author Biographies

Ibifubara Humphrey

Senior Lecture at the Department of Physics, University of Lagos. A member of NIP.

Godwin Oluchukwu Unomaha

Physics

Nsikan Ime Obot

Senior Lecturer at the Department of Physics, University of Lagos. A member of NIP.

Olamide Florence Humphrey

Lecturer at the Department of Biological Sciences, Mountain Top University, Ibafo, Ogun State.

Dimensions

1. Achinas, S., Achinas, V., & Euverink, G. J. W. (2023). Biogas production from agricultural waste: a state-of-the-art review. Applied Microbiology, 3(2), 418–435. https://doi.org/10.3390/applmicrobiol3020030

2. Alengebawy, A., Ran, Y., Abdelkhalek, S. T., Mahrous, T., Ragheb, A., Samer, M., & Ai, P. (2026). A Comprehensive Review of the Key Factors Affecting Biogas Production From Anaerobic Digestion of Organic Waste. CleanMat, 3(2), 74–98. https://doi.org/10.1002/clem.70031.

3. Alrawahi, T., Al Mamun, A., Kadir, M. O. A., & Ismail, A. F. (2023). Fundamentals of wastewater treatment and biogas production via anaerobic digestion. Journal of Environmental Chemical Engineering, 11(5), 110547. https://doi.org/10.1016/j.jece.2023.110547

4. Aminov, D., Pines, D., Kiefer, P. M., Daschakraborty, S., Hynes, J. T., & Pines, E. (2019). Intact carbonic acid is a viable protonating agent for biological bases. Proceedings of the National Academy of Sciences, 116(42), 20837-20843. https://doi.org/10.1073/pnas.1909498116

5. Arshad, M., Ansari, A. R., Qadir, R., Tahir, M. H., Nadeem, A., Mehmood, T., Alhumade, H., & Khan, N. (2022). Green electricity generation from biogas of cattle manure: an assessment of potential and feasibility in Pakistan. Renewable Energy, 187, 1–10. https://doi.org/10.1016/j.renene.2022.01.039

6. Castro-Ramos, J. J., Solís-Oba, A., Solís-Oba, M., Calderón-Vázquez, C. L., Higuera-Rubio, J. M., & Castro-Rivera, R. (2022). Effect of the initial pH on the anaerobic digestion process of dairy cattle manure. Amb Express, 12(1), 162. https://doi.org/10.1186/s13568-022-01486-8.

7. Chen, W., Wang, J., & Liu, W. (2023). A View of Anaerobic Digestion: Microbiology, Advantages and Optimization. Academic Journal of Environment & Earth Science, 5(1). https://doi.org/10.25236/ajee.2023.050101

8. Chinwendu, D., Sunkanmi, F., Joshua, O., & Blessing, O. (2024). Investigating the synergistic effect of temperature and pH dynamics on biogas yield from lignocellulosic biomass codigested with cow dung. Journal of Advances in Microbiology, 24(12), 139-162. https://doi.org/10.9734/jamb/2024/v24i12879

9. Cruz, I. A., Andrade Rodrigues, L. H., da Silva Medeiros, D., de Araújo Nascimento, R., Bhatt, P., Bhatt, K., Chaturvedi, P., & Ferreira, L. F. R. (2022). Applications of machine learning in anaerobic digestion: a systematic review. Bioresource Technology, 345, 126433. https://doi.org/10.1016/j.biortech.2021.126433

10. Emebu, S., Pecha, J., & Janáčová, D. (2022). Review on anaerobic digestion models: Model classification & elaboration of process phenomena. Renewable and Sustainable Energy Reviews, 160, 112288. https://doi.org/10.1016/j.rser.2022.112288

11. Food and Agriculture Organization of the United Nations. (2021). World Livestock: Transforming the Livestock Sector through the Sustainable Development Goals. FAO, Rome.

12. Gao, Z., Ren, Z., Cui, T., & Fu, Y. (2025). Machine learning-based analysis of microplastic-induced changes in anaerobic digestion parameters influencing methane yield. Journal of Environmental Management, 377, 124627. https://doi.org/10.1016/j.jenvman.2025.124627.

13. Gong, X., Wu, M., Jiang, Y., & Wang, H. (2021). Effects of different temperatures and pH values on volatile fatty acids production during codigestion of food waste and thermal-hydrolysed sewage sludge and subsequent volatile fatty acids for polyhydroxyalkanoates production. Bioresource technology, 333, 125149.

14. Günel, G., İnce, O., Uzun, Ö., Erdem, E. I., & İnce, B. (2025). Enhancing biomethane production from cattle manure by integrating rumen bacteria: a microbial analyses with next-generation sequencing and quantitative PCR. Biomass Conversion and Biorefinery, 15(23), 30359-30373. https://doi.org/10.1007/s13399-025-06783-3

15. Gupta, R., Zhang, L., Hou, J., Zhang, Z., Liu, H., You, S., Ok, Y. S., & Li, W. (2023). Review of explainable machine learning for anaerobic digestion. Bioresource Technology, 369, 128468. https://doi.org/10.1016/j.biortech.2022.128468

16. Hagos, K., Zong, J., Li, D., Liu, C., & Lu, X. (2021). Anaerobic co-digestion process for biogas production: progress, challenges and perspectives with special focus on organic loading rate. Bioresource Technology Reports, 14, 100694. https://doi.org/10.1016/j.biteb.2021.100694

17. Hossain, M. S., Emon, A. S., Mhamud, R., Robin, H. M., Mourshed, M., & Rahman, M. A. A. (2025). Anaerobic Co-digestion of Cow Dung and Poultry Litter for Sustainable Biogas Production: A Green Energy Solution for Bangladesh’s Garment Industry. Energy, 139144. https://doi.org/10.1016/j.energy.2025.139144.

18. Humphrey, I., Obot, N. I., Humphrey, O. F., & Afuwape, N. F. (2025). Temperature and pH optimization in mesophilic anaerobic digestion for enhanced biogas production. Biofuels, 16(6), 592-603.

19. Kafle, G. K., Kim, S. H., & Sung, K. I. (2023). Anaerobic digestion treatment of various livestock manures: characterization of the feedstocks, methane potentials, kinetics, and degradation efficiencies. Processes, 11(3), 859. https://doi.org/10.3390/pr11030859

20. Karidio Daouda Idrissa, O. K., Tsuanyo, D., Kouakou, R. A., Konaté, Y., Sawadogo, B., & Yao, K. B. (2024). Analysis of the criteria for improving biogas production: focus on anaerobic digestion. Environment, Development and Sustainability, 26(11), 27083-27110. https://doi.org/10.1007/s10668-023-03788-8.

21. Knapp, B. D., Willis, L., Gonzalez, C., Vashistha, H., Jammal-Touma, J., Tikhonov, M., ... & Huang, K. C. (2025). Metabolic rearrangement enables adaptation of microbial growth rate to temperature shifts. Nature microbiology, 10(1), 185-201. https://doi.org/10.1038/s41564-024-01841-4.

22. Leite, V. D., Ramos, R. O., Lopes, W. S., de Araújo, M. C. U., de Almeida, V. E., da Silva Oliveira, N. M., & Viriato, C. L. (2024). Kinetic modeling of anaerobic co-digestion of plant solid waste with sewage sludge: Synergistic influences of total solids and substrate particle size in biogas generation. BioEnergy Research, 17(1), 744-755. https://doi.org/10.1007/s12155-023-10677-5

23. Liu, Y., Wang, T., Xing, Z., Ma, Y., Nan, F., Pan, L., & Chen, J. (2022). Anaerobic co-digestion of Chinese cabbage waste and cow manure at mesophilic and thermophilic temperatures: Digestion performance, microbial community, and biogas slurry fertility. Bioresource technology, 363, 127976. doi.org/10.1016/j.biortech.2022.127976.

24. Lundberg, S. M., & Lee, S. I. (2017). A unified approach to interpreting model predictions. Advances in Neural Information Processing Systems, 30, 4765–4774.

25. Mao, C., Feng, Y., Wang, X., & Ren, G. (2022). Review on research achievements of biogas from anaerobic digestion. Renewable and Sustainable Energy Reviews, 125, 109877. https://doi.org/10.1016/j.rser.2020.109877

26. Mo, R., Guo, W., Batstone, D., Makinia, J., & Li, Y. (2023). Modifications to the anaerobic digestion model no. 1 (ADM1) for enhanced understanding and application of the anaerobic treatment processes–A comprehensive review. Water research, 244, 120504.

27. Møller, H. B., Sørensen, P., & Olesen, J. E. (2021). Anaerobic digestion of animal manure and influence of organic loading rate and temperature on process performance, microbiology, and methane emission from digestates. Frontiers in Energy Research, 9, 740314. https://doi.org/10.3389/fenrg.2021.740314

28. Moset, V., Poulsen, M., Wahid, R., Højberg, O., & Møller, H. B. (2015). Mesophilic versus thermophilic anaerobic digestion of cattle manure: methane productivity and microbial ecology. Microbial Biotechnology, 8(5), 787–800. https://doi.org/10.1111/1751-7915.12271

29. Namakka, M., Rahman, M. R., & Bakri, M. K. B. (2026). Waste biomass pellets for green energy production-A sustainable alternative for energy security. Renewable and Sustainable Energy Reviews, 226, 116315. https://doi.org/10.1016/j.rser.2025.116315

30. National Bureau of Statistics Nigeria. (2020). Nigeria Livestock Report. NBS, Abuja.

31. Ponce‐Bobadilla, A. V., Schmitt, V., Maier, C. S., Mensing, S., & Stodtmann, S. (2024). Practical guide to SHAP analysis: Explaining supervised machine learning model predictions in drug development. Clinical and translational science, 17(11), e70056. https://doi.org/10.1111/cts.70056.

32. Pratama, R. K. M., Syahputra, N. D., Mufid, M. Y., Pratama, M. S., Amalia, D., Yogafanny, E., & Wardani, N. A. (2025). Influence of pH and pre-treatment on biogas production in anaerobic digestion: a review. RSF Conference Series Engineering and Technology, 4(1), 220–227. https://doi.org/10.31098/cset.v4i1.1036

33. Qiu, J. (2024). An analysis of model evaluation with cross-validation: techniques, applications, and recent advances. Advances in Economics, Management and Political Sciences, 99, 69-72. https://doi.org/10.54254/2754-1169/99/2024OX0213

34. Salman, H. A., Kalakech, A., & Steiti, A. (2024). Random forest algorithm overview. Babylonian Journal of Machine Learning, 2024, 69-79. https://doi.org/10.58496/BJML/2024/007

35. Sarker, S., Lamb, J. J., Hjelme, D. R., & Lien, K. M. (2019). A review of the role of critical parameters in the design and operation of biogas production plants. Applied Sciences, 9(9), 1915. https://doi.org/10.3390/app9091915.

36. Silas, M. Z., & Verma, A. K. (2026). Evaluating the viability of biogas as a sustainable transport fuel in Nigeria: Policy gaps, analytical insights, and strategic roadmap. Energy for Sustainable Development, 90, 101888. https://doi.org/10.1016/j.esd.2025.101888

37. Sun, H., Yang, Z., Zhao, Q., & Kurbanov, M. (2024). Ammonia inhibition and toxicity in anaerobic digestion: a critical review. Bioresource Technology, 394, 130254. https://doi.org/10.1016/j.biortech.2023.130254

38. Walters, K. A., Myers, K. S., Ingle, A. T., Donohue, T. J., & Noguera, D. R. (2024). Effect of temperature and pH on microbial communities fermenting a dairy coproduct mixture. Fermentation, 10(8), 422. https://doi.org/10.3390/fermentation10080422

39. Zhen, G., Lu, X., Kobayashi, T., Li, Y. Y., & Xu, K. (2020). Influence of temperature on anaerobic digestion: A review. Bioresource Technology Reports, 11, 100443. https://doi.org/10.1016/j.biteb.2020.100443

40. Zhu, X., Chen, L., Wen, Z., & Alvarado, V. (2023). Machine learning applications in anaerobic digestion for biogas production: A review. Bioresource Technology, 370, 128490. https://doi.org/10.1016/j.biortech.2022.128490.

Published

2026-10-02

How to Cite

Humphrey, I., Unomaha, G. O., Obot, N. I., & Humphrey, O. F. (2026). Machine Learning-Based Prediction and Optimisation of Methane Yield from Cattle Manure Anaerobic Digestion and Thermodynamic Analysis of Temperature–pH Interactions. Nigerian Journal of Physics, 35(S), 329-345. https://doi.org/10.62292/

How to Cite

Humphrey, I., Unomaha, G. O., Obot, N. I., & Humphrey, O. F. (2026). Machine Learning-Based Prediction and Optimisation of Methane Yield from Cattle Manure Anaerobic Digestion and Thermodynamic Analysis of Temperature–pH Interactions. Nigerian Journal of Physics, 35(S), 329-345. https://doi.org/10.62292/