# LSTM Network for the Oxygen Concentration Modeling of a Wastewater Treatment Plant
## 5 Conclusions  
This work proposes the use of an LSTM network to identify an input-output model suitable for the design of an oxygen concentration controller in an activated sludge process to treat municipal and industrial wastewater. Several ML methods present in the literature show that it is possible to maximize the knowledge extracted from data and operator experience; the idea of this paper is to identify an LSTM network for a specific WWTP and subsequently apply it to improve the control of the plant without the process knowledge required by white-box models.  
The model is identified using easily accessible measures collected from a real plant located in Mortara, Italy. The LSTM network showed satisfactory performance, being able to capture both the oscillation frequencies and the overall behavior (\(\rho=0.921\) and \(FIT=60.56\%\)). It also exceeds the performance of a classic ARX (\(\rho=0.833\) and \(FIT=41.20\%\)), which is not able to reach the correct amplitude. The main limitation of this work lies in the use of datasets coming from a specific plant, which does not ensure generality. Moreover, other, more complex architectures could be used to obtain better results and are proposed as future development.  
The design of a controller based on the LSTM model presented in this work is proposed as a future development. Moreover, the authors are exploring the possibility of properly classifying the dataset by labeling the data in collaboration with the company, in order to exclude abnormal events and then evaluate the improvements of the two models.  
Conceptualization, C.T. and L.M.; methodology, C.T., F.D.P., F.I. and L.M.; software, F.D.P. and F.I.; validation, C.T., F.D.P. and F.I.; formal analysis, C.T. and F.D.P.; resources, L.M.; data curation, F.D.P. and F.I.; writing--original draft preparation, C.T., F.D.P. and F.I.; writing--review  
Figure 5: Model comparison on the Taylor diagram.  
and editing, C.T., F.D.P. and L.M.; supervision, C.T. and L.M.; project administration, L.M.; funding acquisition, L.M. All authors have read and agreed to the published version of the manuscript.  
This research was funded by Azienda Servizi Mortara S.p.A., and it is part of the project NODES which has received funding from the MUR -- M4C2 1.5 of PNRR with grant agreement no. ECS00000036.  
Not applicable.  
Data Availability Statement: Data and code are available as Supplementary Material.  
The authors declare no conflict of interest.  
The following abbreviations are used in this manuscript:  
\begin{tabular}{l l} ASM1 & Activated Sludge Model No. 1 \\ ASM2 & Activated Sludge Model No. 2 \\ ASM3 & Activated Sludge Model No. 3 \\ ARX & Autoregressive exogenous \\ BI-LSTM & Bidirectional-LSTM \\ CAS & Conventional Activated Sludge \\ COD & Chemical Oxygen Demand \\ DEN & Deniffrification \\ GRU & Gated Recurrent Unit \\ LSTM & Long Short-Term Memory \\ ML & Machine Learning \\ MSE & Mean Squared Error \\ NN & Neural Network \\ OX-NIT & Oxidation and nitrification \\ RMSE & Root Mean Squared Error \\ RNN & Recurrent Neural Network \\ SCADA & Supervisory Control And Data Acquisition \\ TAMR & Thermophilic Aerobic Membrane Reactor \\ WWTP & WasteWater Treatment Plant \\ \end{tabular}