Modeling phosphorous dynamics in a wastewater treatment process using Bayesian optimized LSTM

Laura Debel Hansen, Mikkel Stokholm-Bjerregaard, Petar Durdevic

Research output: Contribution to journalJournal articleResearchpeer-review

30 Citations (Scopus)
87 Downloads (Pure)


This study presents a systematic framework to develop data-driven models for phosphorus concentration in a full-scale wastewater treatment plant (WWTP). The dynamics of wastewater treatment exhibit nonlinear behavior, and are time varying, non-stationary, and coupled in a complex manner, which makes them difficult to predict using mechanistic models. Two long short-term memory (LSTM) models are proposed. The first estimates the phosphorus concentration using data describing environmental conditions and process operation, and the second model which additionally utilizes the previous phosphorus measurement. Additionally, the hyperparameters are tuned using Bayesian optimization, as this is an effective tool to determine the best model and prevent over-fitting and long training duration of the data-driven models. The two models show good prediction performances and are suitable to predict up to 24 hours into the future, with R 2 close to 0.7-0.8 for data well presented in the training data set.

Original languageEnglish
Article number107738
JournalComputers & Chemical Engineering
Publication statusPublished - Apr 2022


  • Dynamic model
  • Full scale plant data
  • Hyperparameter tuning
  • Neural networks
  • Phosphorus
  • Time series prediction


Dive into the research topics of 'Modeling phosphorous dynamics in a wastewater treatment process using Bayesian optimized LSTM'. Together they form a unique fingerprint.

Cite this