LSTM-Based Neural Network Controllers as Drop-In Replacements for PI Controllers in a Wastewater Treatment Plant
Source abstract
Abstract
Wastewater Treatment Plants (WWTPs) rely on automatic control strategies to regulate pollutant concentrations and comply with environmental standards. Among them, Proportional Integral (PI) controllers are widely adopted for their simplicity and robustness, yet their effectiveness is limited by the nonlinear and time-varying dynamics of biological processes. In this work, Long Short-Term Memory (LSTM)-based Artificial Neural Network (ANN) PI controllers are proposed as data-driven replacements for conventional PIs in key WWTP feedback loops. Using the Benchmark Simulation Model No. 1 (BSM1), ANN controllers were trained to replicate the behavior of default nitrate and nitrite nitrogen (SNO,2) and dissolved oxygen (SO,5) loops, under both time-agnostic and time-aware strategies with three- and four-input configurations. The four-input time-aware model delivered the best results, reproducing PI behavior with high accuracy (coefficient of determination, R2≈0.99) and considerably reducing control errors. For instance, under storm influent conditions, the SO,5 controller reduced the Integral of Squared Error (ISE) and Integral of Absolute Error (IAE) by 84.7% and 68.4%, respectively, compared with the default PI. Beyond loop-level improvements, a Transfer Learning (TL) extension was explored: the trained SO,5 controller was directly applied to additional aerated reactors (SO,3 and SO,4) without retraining, replacing fixed aeration and demonstrating adaptability while reducing design effort. Plant-wide evaluation with the SNO,2 loop and three dissolved oxygen loops (SO,3–SO,5), all controlled by LSTM-based PI controllers, under storm influent conditions, showed further reductions in the Effluent Quality Index (EQI) and the Overall Cost Index (OCI) by 0.84% and 1.47%, respectively, highlighting simultaneous gains in effluent quality and operational economy. Additionally, the actuator and energy analyses showed that the LSTM-based controllers produced realistic and smooth control signals, maintained consistent energy use, and ensured stable overall operation, confirming the practical feasibility of the proposed approach.
Source: crossref · Quality: baseline
Research context
OpenAlex topics: Wastewater Treatment and Nitrogen Removal · Advanced Control Systems Optimization · Hydrological Forecasting Using AI
SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.
Affiliations
Advanced Systems for Automation and Control (ASAC) Group, Escola d’Enginyeria, Universitat Autònoma de Barcelona, 08193 Bellaterra, Spain
Funding
Agencia Estatal de Investigación
References (26)
Show source-provided references
1. Monitoring and diagnosis of energy consumption in wastewater treatment plants. A state of the art and proposals for improvement10.1016/j.apenergy.2016.07.043 ↗
2. Rethinking Wastewater Treatment Plant Effluent Standards: Nutrient Reduction or Nutrient Control?10.1021/acs.est.7b01186 ↗
3. Greenhouse Gases from Wastewater Treatment—A Review of Modelling Tools10.1016/j.scitotenv.2016.01.163 ↗
4. Nitrous Oxide Emissions from Municipal Wastewater Treatment10.1021/es00009a030 ↗
5. Nitrogen and Phosphorous Removal in Municipal Wastewater Treatment Plants in China: A Review10.1155/2010/914159 ↗
6. Copp, J.B. (2002). The COST Simulation Benchmark: Description and Simulator Manual (COST Action 624 and Action 682), Office for Official Publications of the European Union. Available online: https://op.europa.eu/en/publication-detail/-/publication/8448ef88-37dd-4d1a-823f-3143e7902429.
7. Gernaey, K.V., Jeppsson, U., Vanrolleghem, P.A., and Copp, J.B. (2014). Benchmarking of Control Strategies for Wastewater Treatment Plants, IWA Publishing. Available online: https://library.oapen.org/handle/20.500.12657/43788.10.2166/9781780401171 ↗
8. A General Model for Single-Sludge Wastewater Treatment Systems10.1016/0043-1354(87)90058-3 ↗
9. Alex, J., Benedetti, L., Copp, J., Gernaey, K.V., Jeppsson, U., Nopens, I., Pons, M.N., Rieger, L., Rosen, C., and Steyer, J.P. (2008). Benchmark Simulation Model No. 1 (BSM1), Department of Industrial Electrical Engineering and Automation, Lund University. Available online: http://iwa-mia.org/wp-content/uploads/2018/01/BSM_TG_Tech_Report_no_1_BSM1_General_Description.pdf.
10. PID Control System Analysis, Design, and Technology10.1109/TCST.2005.847331 ↗
11. Alex, J. (2024). Model-based construction of wastewater treatment plant influent data for dynamic simulation studies. Water, 16.10.3390/w16040564 ↗
12. Fuzzy Control and Model Predictive Control Configurations for Effluent Violations Removal in Wastewater Treatment Plants10.1021/ie504079q ↗
13. Predictive Control of an Activated Sludge Process for Long-Term Operation10.1016/j.cej.2016.07.018 ↗
14. Goodfellow, I., Bengio, Y., and Courville, A. (2016). Deep Learning, MIT Press. Available online: http://www.deeplearningbook.org.
15. Machine Learning in Wastewater Treatment: A Comprehensive Bibliometric Review10.1021/acsestwater.4c01047 ↗
16. Soft-Sensing Estimation of Plant Effluent Concentrations in a Biological Wastewater Treatment Plant Using an Optimal Neural Network10.1016/j.eswa.2016.06.028 ↗
17. Data-Assisted Reduced-Order Modeling of Extreme Events in Complex Dynamical Systems10.1371/journal.pone.0197704 ↗
18. LSTM-Based Wastewater Treatment Plants Operation Strategies for Effluent Quality Improvement10.1109/ACCESS.2019.2950852 ↗
19. Stable learning laws design for long short-term memory identifier for uncertain discrete systems via control Lyapunov functions10.1016/j.neucom.2022.03.070 ↗
20. LSTM-based adaptive robust nonlinear controller design of a single-axis hydraulic shaking table10.1049/cth2.12410 ↗
21. A novel linear hybrid model predictive control design: Application to a fed-batch crystallization process10.1016/j.dche.2022.100033 ↗
22. A Comprehensive Survey of Deep Transfer Learning for Anomaly Detection in Industrial Time Series: Methods, Applications, and Directions10.1109/ACCESS.2023.3349132 ↗
23. Curreri, F., Patanè, L., and Xibilia, M.G. (2021). RNN- and LSTM-Based Soft Sensors Transferability for an Industrial Process. Sensors, 21.10.3390/s21030823 ↗
24. Pisa, I., Morell, A., Vilanova, R., and Vicario, J.L. (2021). Transfer Learning in Wastewater Treatment Plant Control Design: From Conventional to Long Short-Term Memory-Based Controllers. Sensors, 21.10.3390/s21186315 ↗
25. Transfer Learning in Wastewater Treatment Plants Control: Measuring the Transfer Suitability10.1016/j.jprocont.2023.02.006 ↗
26. A Hybrid Approach of Transfer Learning and Physics-Informed Modelling: Improving Dissolved Oxygen Concentration Prediction in an Industrial Wastewater Treatment Plant10.1016/j.ces.2024.121088 ↗