LSTM-Based Neural Network Controllers as Drop-In Replacements for PI Controllers in a Wastewater Treatment Plant

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.

Authors

Institutions

Publication Details

Journal
Applied Sciences
Published
2025-11-12
DOI
https://doi.org/10.3390/app152212046
Primary Topic
Wastewater Treatment and Nitrogen Removal
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

LSTM-Based Neural Network Controllers as Drop-In Replacements for PI Controllers in a Wastewater Treatment Plant

Ramón Vilanova, Muhammad Adil
Applied Sciences
Wastewater Treatment and Nitrogen Removal
article

LSTM-Based Neural Network Controllers as Drop-In Replacements for PI Controllers in a Wastewater Treatment Plant

Ramón Vilanova, Muhammad Adil
article en

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.

Applied SciencesVol. 15(22)
Universitat Autònoma de Barcelona (ES)
Ministerio de Ciencia e Innovación, Agencia Estatal de Investigación
Openalex Percentile: Top 73%
Wastewater Treatment and Nitrogen Removal
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.