# LSTM Network for the Oxygen Concentration Modeling of a Wastewater Treatment Plant
## 2 Related Works  
Several works studied the possibility of using Recurrent Neural Network (RNN), and in particular LSTM, models to simulate the dynamical behavior of different processes, obtaining promising results. Recently, RNN has become a very popular research topic in the Machine Learning (ML) field, also because of these successful results. Forecasting time series data is an important subject in different fields, such as economics, business, finance, etc. It has been demonstrated [10] that deep NNs are effective model estimators from input-output data; therefore, the proposed work aims to evaluate the quality of LSTM architecture as a model for a WWTP. Similarly to [11], where several techniques to effectively forecast the next lag of time series were explored, in this work the LSTM is compared with the classic ARX model. [PERSON] et al. in [11] proved how the LSTM outperforms traditionally-based algorithms, such as an ARIMA model, in terms of the average reduction in error rates obtained by an LSTM with respect to ARIMA, indicating the superiority of LSTM. One promising field of application for the LSTM is represented by the modeling and identification of mechanical systems with the aim of designing control algorithms. In the mechanical world, in particular, friction characteristics often deteriorate the performance of control systems, causing overshoot, undershoot, etc. In the literature, some model structures have been proposed to overcome these issues, but the identification of the correct parameters for precise modeling remains a difficult task. In [12], the modeling of rolling friction based on an LSTM is proposed to precisely express the rolling friction characteristics, with satisfactory results when compared with conventional friction models using an actual experimental setup. In [13], the authors considered two ML methods: the Extreme Gradient Boosting (XGBoost) method, which is based on decision trees that highly optimize the processing time and model complexity, and the LSTM model that is also considered in this work. The aim of the work was to provide useful predictions considering rare events, such as natural disasters, and in particular to obtain a data-driven decision-making approach for fire departments to forecast the number of interventions in the next hour. The work proved that predictions with good accuracy are possible and feasible for practical purposes. A data-driven approach for modeling nonlinear dynamical systems using LSTM networks with output recurrence was proposed in [14]. This method can make full use of the data in establishing a dynamical system model. The considered system was a 42-story reinforced concrete frame-core tube building under seismic excitation. This work compared two types of LSTM models with different training strategies: one with output recurrence, which accepts the external excitation and the network outputs of the previous time step as inputs at the current time step and provides initial conditions at the first two time steps; the other one with teacher forcing, which takes the external excitation and true targets as the network inputs during training. The comparison proved that the latter network is not a feasible method for dynamical system modeling because it cannot guarantee long-term robustness. The superiority of the LSTM method has been demonstrated in [15] for a different purpose. This paper compared the accuracy of missing stem water data for plants under different data filling methods to solve the problem of data loss in sensor data collection. Interpolation methods, time series statistical methods, RNN and LSTM neural networks were used to fill in the missing part. The results show that the LSTM network also has more accurate performance than the RNN in this kind of application. However, in the case of very complex systems, the LSTM method may be insufficient to fully describe the dynamics of the process, and a more complicated architecture is required.