A Machine Learning Approach for Anomaly Detection in Environmental IoT-Driven Wastewater Purification Systems
Abstract:The main goal of this paper is to present a solution
for a water purification system based on an Environmental Internet
of Things (EIoT) platform to monitor and control water quality
and machine learning (ML) models to support decision making
and speed up the processes of purification of water. A real case
study has been implemented by deploying an EIoT platform and a
network of devices, called Gramb meters and belonging to the Gramb
project, on wastewater purification systems located in Calabria,
south of Italy. The data thus collected are used to control the
wastewater quality, detect anomalies and predict the behaviour of
the purification system. To this extent, three different statistical and
machine learning models have been adopted and thus compared:
Autoregressive Integrated Moving Average (ARIMA), Long Short
Term Memory (LSTM) autoencoder, and Facebook Prophet (FP).
The results demonstrated that the ML solution (LSTM) out-perform
classical statistical approaches (ARIMA, FP), in terms of both
accuracy, efficiency and effectiveness in monitoring and controlling
the wastewater purification processes.
 T. Zarra, V. Naddeo, V. Belgiorno, M. Reiser, and M. Kranert, “Odour
monitoring of small wastewater treatment plant located in sensitive
environment,” Water Science and Technology, vol. 58, no. 1, pp. 89–94,
 G. Olsson, M. Nielsen, Z. Yuan, A. Lynggaard-Jensen, and J.-P. Steyer,
Instrumentation, control and automation in wastewater systems. IWA
 R. Mart´ınez, N. Vela, A. e. Aatik, E. Murray, P. Roche, and J. M.
Navarro, “On the use of an iot integrated system for water quality
monitoring and management in wastewater treatment plants,” Water,
vol. 12, no. 4, p. 1096, 2020.
 V. Edmondson, M. Cerny, M. Lim, B. Gledson, S. Lockley, and
J. Woodward, “A smart sewer asset information model to enable an
internet of things for operational wastewater management,” Automation
in Construction, vol. 91, pp. 193–205, 2018.
 C. Fu and M. Poch, “System identification and real-time pattern
recognition by neural networks for an activated sludge process,”
Environment International, vol. 21, no. 1, pp. 57–69, 1995.
 M. Ct, B. P. Grandjean, P. Lessard, and J. Thibault,
“Dynamic modelling of the activated sludge process: Improving
prediction using neural networks,” Water Research, vol. 29,
no. 4, pp. 995 – 1004, 1995.
 J. C. Spall and J. A. Cristion, “A neural network controller for
systems with unmodeled dynamics with applications to wastewater
treatment,” IEEE Transactions on Systems, Man, and Cybernetics, Part
B (Cybernetics), vol. 27, no. 3, pp. 369–375, 1997.
 K. Oliveira-Esquerre, M. Mori, and R. Bruns, “Simulation of an
industrial wastewater treatment plant using artificial neural networks
and principal components analysis,” Brazilian Journal of Chemical
Engineering, vol. 19, pp. 365 – 370, 12 2002.
 J. Chen, N. Chang, and W. Shieh, “Assessing wastewater reclamation
potential by neural network model,” Engineering Applications of
Artificial Intelligence, vol. 16, no. 2, pp. 149 – 157, 2003,
applications of Artificial Intelligence for Management and Control of
Pollution Minimization and Mitigation Processes.
 E. Karakoyun and A. Cibikdiken, “Comparison of arima time series
model and lstm deep learning algorithm for bitcoin price forecasting,” in
The 13th Multidisciplinary Academic Conference in Prague, vol. 2018,
2018, pp. 171–180.
 N. Zhao, Y. Liu, J. K. Vanos, and G. Cao, “Day-of-week and seasonal
patterns of pm2. 5 concentrations over the united states: Time-series
analyses using the prophet procedure,” Atmospheric environment, vol.
192, pp. 116–127, 2018.
 V. Jadhav and V. Ligay, “Forecasting energy consumption using machine
learning,” ResearchGate, 2016.
 h. chioma, I. Howard, and E. Etuk, “Evaluation of arima and artificial
neural networks in prediction of effluent quality of waste water treatment
system.” 10 2020.
 S. Hochreiter and J. Schmidhuber, “Long short-term memory,” Neural
computation, vol. 9, no. 8, pp. 1735–1780, 1997.
 B. Mamandipoor, M. Majd, S. Sheikhalishahi, C. Modena, and
V. Osmani, “Monitoring and detecting faults in wastewater treatment
plants using deep learning,” Environmental Monitoring and Assessment,
vol. 192, no. 2, p. 148, 2020.
 K. Thiyagarajan, N. Ulapane et al., “A temporal forecasting driven
approach using facebooks prophet method for anomaly detection in
sewer air temperature sensor system,” 2020.
 B. Vishwas and A. Patel, Prophet, 08 2020, pp. 375–394.
 H. Haimi, M. Mulas, F. Corona, S. Marsili-Libelli, P. Lindell,
M. Heinonen, and R. Vahala, “Adaptive data-derived anomaly detection
in the activated sludge process of a large-scale wastewater treatment
plant,” Engineering Applications of Artificial Intelligence, vol. 52, pp.
 H. Weytjens, E. Lohmann, and M. Kleinsteuber, “Cash flow prediction:
Mlp and lstm compared to arima and prophet,” Electronic Commerce
Research, pp. 1–21, 2019.
 Y. Lai and D. A. Dzombak, “Use of the autoregressive integrated moving
average (arima) model to forecast near-term regional temperature and
precipitation,” Weather and Forecasting, vol. 35, no. 3, pp. 959–976,
 K. Hollingsworth, K. Rouse, J. Cho, A. Harris, M. Sartipi, S. Sozer, and
B. Enevoldson, “Energy anomaly detection with forecasting and deep
learning,” in 2018 IEEE International Conference on Big Data (Big
Data). IEEE, 2018, pp. 4921–4925.
 V. Panasa, R. V. Kumari, G. Ramakrishna, and S. Kaviraju, “Maize price
forecasting using auto regressive integrated moving average (arima)
model,” Int. J. Curr. Microbiol. App. Sci, vol. 6, no. 8, pp. 2887–2895,
 I. Yenidoan, A. ayir, O. Kozan, T. Da, and C. Arslan, “Bitcoin
forecasting using arima and prophet,” in 2018 3rd International
Conference on Computer Science and Engineering (UBMK), 2018, pp.
 K. K. R. Samal, K. S. Babu, S. K. Das, and A. Acharaya, “Time
series based air pollution forecasting using sarima and prophet model,”
in Proceedings of the 2019 International Conference on Information
Technology and Computer Communications, 2019, pp. 80–85.
 S. J. Taylor and B. Letham, “Forecasting at scale,” The American
Statistician, vol. 72, no. 1, pp. 37–45, 2018.
 P. Malhotra, A. Ramakrishnan, G. Anand, L. Vig, P. Agarwal, and
G. Shroff, “Lstm-based encoder-decoder for multi-sensor anomaly
detection,” arXiv preprint arXiv:1607.00148, 2016.
 H. Nguyen, K. P. Tran, S. Thomassey, and M. Hamad, “Forecasting
and anomaly detection approaches using lstm and lstm autoencoder
techniques with the applications in supply chain management,”
International Journal of Information Management, p. 102282, 2020.
 S. Saumya, J. P. Singh et al., “Spam review detection using
lstm autoencoder: an unsupervised approach,” Electronic Commerce
Research, pp. 1–21, 2020.
 J. Perktold, S. Seabold, J. Taylor et al., “Statsmodels:
Statistics in python,” Internet: http://www. statsmodels.
org/devel/generated/statsmodels. tsa. stattools. adfuller. html (August
12, 2019), 2017.