Challenges in connecting a Wastewater Treatment Plant to a Machine Learning Platform


  • Christian Wallin
  • Eva Nordlander



wastewater treatment, machine learning, cloud environment


Treatment of wastewater is fundamental to protect the environment and to ensure a healthy water supply. Higher demands are put on the treatment of the effluent from wastewater treatment plants (WWTP) to reduce more pollutants as well as remove pharmaceutical residues. To deliver better water quality monitoring and control is important but wastewater treatment is far behind many industrial processes in automation. Digital twins and machine learning could offer many benefits but not much work has been done in this field. How to move from an existing traditional process automation to an integrated machine learning platform? This paper investigates the challenges of implementing an integrated machine learning platform for a wastewater treatment plant. The paper is based on experience from a project where a number of different processes were integrated into a machine learning platform in an online cloud environment. In this paper, we focus on the integration of the WWTP. On the platform a model is run in real-time using process data. Machine learning algorithms are used to treat the process data and for sensor fault detection. The challenges and considerations are many, such as cyber-security when it comes to data access and data transfer and how to convert the process data to a format that can be used by the model. Multiple defining choices must be made along the way that can have a major impact on the final platform functionality. It is important not only to evaluate these choices but to have enough knowledge and jurisdiction to make both the right decisions and to also make them in time. Many projects run out of time and/or money for different reasons and strategies will be discussed for mitigating risk factors.


Jens Alex, Lorenzo Benedetti, Jb Copp, Krist Gernaey, Ulf Jeppsson, Ingmar Nopens, MN Pons, Leiv Rieger, Christian Rosen, and J-P Steyer. Benchmark simulation model no. 1 (bsm1). Report by the IWA Taskgroup on Benchmarking of Control Strategies for WWTPs, 01 2008.

Mogens Henze, Leslie Grady Jr, W Gujer, G. Marais, and T Matsuo. Activated sludge model no 1. Wat Sci Technol, 29, 01 1987.

HUGIN EXPERT A/S. Hugin., 2021. Accessed: 2021-07-12.

Ulf Jeppsson, Marie-Noelle Pons, Ingmar Nopens, Jens Alex, Jb Copp, Krist Gernaey, Christian Rosen, J-P Steyer, and Peter Vanrolleghem. Benchmark simulation model no 2 - general protocol and exploratory case studies. Water science and technology : a journal of the International Association on Water Pollution Research, 56:67-78, 02 2007. doi:10.2166/wst.2007.604.

JS Foundation. Node-red., 2021. Accessed: 2021-07-12.

Modelon AB. Modelon functional mock-up interface. functional-mock-up-interface-fmi/, 2021. Accessed: 2021-07-12.

Darko Vrecko, Krist Gernaey, Christian Rosen, and Ulf Jeppsson. Benchmark simulation model no 2 in matlab-simulink: Towards plant-wide wwtp control strategy evaluation. Water science and technology : a journal of the International Association on Water Pollution Research, 54:65-72, 02 2006. doi:10.2166/wst.2006.773