Enhancing wastewater treatment through artificial intelligence: A comprehensive study on nutrient removal and effluent quality prediction

Offir Inbar, Dror Avisar*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review


With over 80 % of the world's wastewater discharged without treatment and 2 billion people lacking access to adequate sanitation facilities, optimizing sewage treatment processes is crucial. Utilizing a comprehensive 11-year dataset covering 43 parameters from all stages in a full-scale wastewater treatment plant (WWTP) in Israel, we first examined nutrient removal and key wastewater-quality parameters analysis, revealing seasonal and annual trends' effects on influent and effluent water-quality levels. High temperatures during the summer led to a decrease in the concentration of influent BOD, COD, TSS, and NH4, which can be explained by increased biological activity, enhanced sedimentation, and accelerated nitrification. We then introduced a novel method to forecast total phosphorus in effluent by applying various machine and deep learning algorithms, focusing on binary predictions for regulatory compliance. XGBoost achieved the best results with 87 % accuracy and 85 % precision, while random forest exhibited the highest recall at 90 % on the testing set. Consistent and balanced performance in training and testing indicated neither overfitting nor underfitting. Addressing scenarios without secondary total phosphorus monitoring, time-series LSTM models with a look-back period of 2 days achieved the best results with 77 % accuracy, helping prioritize critical input features for precise predictions in resource-constrained WWTPs. The models enable choosing higher recall or precision rates based on regulations/limitations. The overall results indicate that integrating knowledge of the nutrient-removal process with the application of artificial intelligence enhances WWTP monitoring and mitigates the discharge of low-quality effluent.

Original languageEnglish
Article number105212
JournalJournal of Water Process Engineering
StatePublished - May 2024


FundersFunder number
Keren Kayemeth LeIsrael-Jewish National Fund


    • Artificial intelligence
    • Nutrient removal
    • Phosphorus
    • Sewage treatment
    • Wastewater


    Dive into the research topics of 'Enhancing wastewater treatment through artificial intelligence: A comprehensive study on nutrient removal and effluent quality prediction'. Together they form a unique fingerprint.

    Cite this