Machine learning-based optimization of biogas and methane yields in UASB reactors for treating domestic wastewater

Biodegradation. 2025 Jun 26;36(4):55. doi: 10.1007/s10532-025-10152-2.

Abstract

This study aimed to optimize biogas and methane production from Up-flow anaerobic sludge blanket reactors for treating domestic wastewater using advanced machine learning models-namely, eXtreme Gradient Boosting (XGBoost) and its hybridized form, XGBoost, integrated with particle swarm optimization (XGBoost-PSO). The key operational variables included time, flow rate, chemical oxygen demand (COD), pH, volatile fatty acids, total suspended solids, hydraulic retention time, alkalinity, and the organic loading rate. Empirical data used to train and validate the predictive models were acquired from the sequential treatment of laboratory-prepared low-strength synthetic wastewater and actual municipal wastewater samples. Data was collected from two treatment phases: synthetic wastewater (COD: 335.45 ± 28.32 mg/L) was treated from days 0 to 270, followed by real domestic wastewater (COD: 225.28 ± 65.98 mg/L) from days 0 to 130. Gas production was continuously monitored throughout. The XGBoost-PSO model outperformed the standard XGBoost algorithm in both the training and testing phases. For biogas prediction during training, XGBoost-PSO achieved an RMSE of 0.0405, an MAE of 0.0225, and an R2 of 0.9832, whereas for methane, the values were an RMSE of 0.0257, an MAE of 0.0175, and an R2 of 0.9942. The testing results further confirmed the model's robustness, with RMSE, MAE, and R2 values of 0.1017, 0.0676, and 0.9404 for biogas and 0.0694, 0.0519, and 0.9717 for methane, respectively. These findings highlight the potential of integrating artificial intelligence-driven approaches to optimize bioenergy recovery in wastewater treatment systems.

Keywords: Biogas; Methane; Up-flow anaerobic sludge blanket; XGBoost; XGBoost-PSO.

MeSH terms

  • Anaerobiosis
  • Biofuels* / analysis
  • Biological Oxygen Demand Analysis
  • Bioreactors* / microbiology
  • Machine Learning*
  • Methane* / analysis
  • Methane* / metabolism
  • Sewage / microbiology
  • Waste Disposal, Fluid* / methods
  • Wastewater*

Substances

  • Methane
  • Biofuels
  • Wastewater
  • Sewage