scieee AI-readable full text Open interactive document viewer

Digital Twins of Urban Drainage Systems: ML-assisted algorithm for processing sensor data

Vinokić, Luka; Milašinović, Miloš; Vasilic, Zeljko; Ivetić, Damjan; Stojkovic, Milan; Prodanovic, Veljko

Abstract

Deploying sensors network and collecting and using sensor data is a backbone of Digital Twins (DTs) for engineering systems, such as Urban Drainage Systems (UDS). Such data often exhibit missing values and anomalous readings due to many factors (e.g. sensors malfunction, hardware limitations, weather and site conditions). System analytics in DTs rely on these data and requires postprocessing algorithms capable to detect and reduce problems in collected data. This research aims to develop an advanced ML-powered algorithm for automated data anomaly detection (data validation) and estimation of missing data. This algorithm utilizes an ensemble of ML models to address data quality issues. The algorithm is tested on a synthetic dataset for a part of Belgrade stormwater system.

Full text

13th Urban Drainage Modelling Conference, Innsbruck (Austria), September 2025 Digital Twins of Urban Drainage Systems: ML-assisted algorithm for processing sensor data Luka Vinokić 1* , Miloš Milašinović 2, Željko Vasilić2, Damjan Ivetić2, Milan Stojković1, Veljko Prodanović1 1 The Institute for Artificial Intelligence Research and Development of Serbia 2University of Belgrade, Department of Hydraulic and Environmental Engineering, Digital Water Engineering Lab, Belgrade, Serbia *Corresponding author email: [email protected] Abstract Deploying sensors network and collecting and using sensor data is a backbone of Digital Twins (DTs) for engineering systems, such as Urban Drainage Systems (UDS). Such data often exhibit missing values and anomalous readings due to many factors (e.g. sensors malfunction, hardware limitations, weather and site conditions). System analytics in DTs rely on these data and requires postprocessing algorithms capable to detect and reduce problems in collected data. This research aims to develop an advanced ML-powered algorithm for automated data anomaly detection (data validation) and estimation of missing data. This algorithm utilizes an ensemble of ML models to address data quality issues. The algorithm is tested on a synthetic dataset for a part of Belgrade stormwater system. Highlights • UDS sensor data is often corrupted and data postprocessing algorithms are required • Machine Learning based algorithms can be utilized as effective tool for data postprocessing • Improved forecast reliability through multi-model ensemble approach. Introduction Urban drainage infrastructure faces major challenges to keep desired performance due to aging systems, worsened by both natural and anthropogenic factors. To address these challenges and enhance the sustainability, safety, and resilience of urban drainage systems (UDSs), innovative decision support tools are required. Digital transformation can help water utilities to solve some of the urgent issues they are facing. Digital Twins (up-to-date virtual replicas) could be a viable decision support tool for water utilities. Creating dynamically updated digital replica of the real-world system can help water utilities to enable energy efficiency and efficiency in resources allocation through real-time monitoring and modelling of the UDS and by creating safe virtual environment to assess various “what-if” scenarios and inform contingency planning and operation decisions. Backbone of Digital Twins of an UDS is integration of sensor data from the system into the simulation models for better insights and system analytics. Hence, network of sensors across the system is necessary (Pedersen, 2022). However, real-world data quality is often affected by various factors, such as sensor uncertainty, presence of data anomalies, and missing data due to hardware limitations (Kim, Oh and Bartos, 2025). Providing reliable sensor data and integrating it into the simulation model represents the basis for any digital twin. Therefore, algorithms for automatic data quality assessment and infilling the missing data are necessary (Tzachor et al., 2022). Machine learning models have proven to be effective tools for modelling hydrological responses in UDSs, offering a reliable and efficient method for addressing these challenges (Yang and Chui, 2021). By integrating multi-model ML predictions with robust time-series analyses, outlier detection, and 13th Urban Drainage Modelling Conference, Innsbruck (Austria), September 2025 missing-data completion, the work serves as a first step to enhance the efficiency of UDS simulations and foster more resilient, cost-effective drainage infrastructure planning and operation. Methodology General methodology This research focuses on developing a data-driven algorithm for processing sensor data (head and flow hydrographs) based on ensemble of sequence forecasting ML models (Figure 1). This algorithm enables: 1) data outliers detection by comparing the sensor data with the expected range obtained by trained ML-models, and 2) reconstruction of the missing data in collected sensor data sequences. To develop and apply this algorithm database of ML models must be created. This approach relies on set of pre-trained ML models for sequence forecasting/estimation. In this research Long-Short-TermMemory (LSTM), Convolutional Neural Networks (CNN) and Temporal Convolutional Networks (TCN) are utilized to create ML models database, based on their proven efficiency in handling hydrological timeseries (Sharafkhani et al. 2024, Vinokić et al. 2025.). Figure 1. Data-driven approach for postprocessing UDS sensor data. In the first step, the algorithm detects and removes the outliers from the existing data. After that, gaps in timeseries (either the existing gaps or those generated by removing outliers) are filled by the values obtained from the ensemble of ML models estimations (e.g. ensemble mean or median). Machine learning techniques This methodology utilizes several machine learning techniques, such as LSTM, CNN, and TCN used to create sequence forecasting models for each sensor location using various feature selection and hyperparameters. Models are created to produce a sequence of head values (N-steps ahead), based on M previous values of heads at adjacent monitoring nodes and rainfall intensity from a rain gage. These models can be represented using the following equation: {𝑍𝑖𝑡0+1,𝑍𝑖𝑡0+2,…, 𝑍𝑖𝑡0+𝑁 }= 𝑓(𝑍𝑖𝑡0−𝑀,…, 𝑍𝑖𝑡0, 𝑍𝑖−1 𝑡0−𝑀,…, 𝑍𝑖−1, 𝑡0 𝑃 𝑗𝑡0−𝑀,…,𝑃 𝑗𝑡0) (1) Where Zi represents hydraulic head at i-th monitoring node, Zi-1 represents hydraulic heads at upstream monitoring nodes and P represents rainfall intensity from the rain gage. M represents lag in 13th Urban Drainage Modelling Conference, Innsbruck (Austria), September 2025 time series (length of input sequences), N represents forecasting horizon while t0 represents the current time step. Case study Described methodology is tested on a synthetic dataset created for the part of New Belgrade UDS, covering the highly urban area of 0.5 km2, characterized by dense infrastructure (Figure 2). The synthetic case study has 12 nodes to mimic sensor network for head monitoring. Ensemble of ML models was created using synthetic dataset. Real-world rainfall data for 2 years is used to run EPA-SWMM model and generate head timeseries at the location used to mimic sensors. Additional rainfall timeseries, for the period of 8 months, are used to create test data. Results The proposed algorithm was tested on a synthetic five-day scenario. In this setup, 5 out of 12 sensors were designated as faulty, meaning no data was collected at those locations, simulating real-world conditions. Additionally, outliers and short data gaps (up to 1 hour) were introduced at other sensor nodes. The ensemble of machine learning models, along with the proposed data recovery methodology, was applied at the locations of the faulty sensors (Figure 3). The reconstructed head time series showed promising agreement with the true data, with RMSE values ranging from 1.2 to 3.3 cm and NSE scores between 0.71 and 0.86. Figure 3. Data recovery at faulty sensors locations - preliminary results (red dashed line – true data, blue line – reconstructed timeseries). Figure 2. Case study: part of New Belgrade stormwater system. 13th Urban Drainage Modelling Conference, Innsbruck (Austria), September 2025 Table 1. Data recovery at the locations of faulty sensors – metrics Metric\Node J32 J157 J155 J246 J298 RMSE [m] 0.012 0.013 0.033 0.026 0.024 NSE [-] 0.73 0.77 0.71 0.85 0.86 An analysis of the results reveals that the machine learning models used for data reconstruction tend to underestimate the peak values. This limitation could be mitigated by expanding the training dataset and incorporating more extreme rainfall events. In practice, machine learning models should be periodically retrained with newly collected data to continuously improve their performance. Conclusions and future work By validating existing measurements and compensating for missing or suspicious data, this approach aims to produce reliable time-series datasets, thereby enabling advanced system analytics within a digital twin framework. The proposed methodology demonstrates strong potential for inspecting timeseries data and reconstructing missing values, regardless of gap length. By combining multiple machine learning sequence forecasting models with a consensus-based outlier detection approach, it offers a versatile and dependable solution. The framework also supports the integration of additional models - such as Graph Neural Networks - which may further enhance algorithm performance. Future work will focus on refining the ensemble strategy (e.g., weighting individual model contributions) and conducting large-scale evaluations on real-world datasets to ensure broader applicability in urban drainage monitoring. Acknowledgement The research presented herein is part of the DIGIDRAIN project (funding from the Science Fund of the Republic of Serbia, research program DIASPORA 2023: joint research, under grant agreement number: 17823 – City-scale digital twins for urban drainage systems: bringing “smart” to water infrastructure). This work also received technical support from the European Union’s Horizon Europe project ARTIFACT, under Grant Agreement 101159480. References Tzachor, A., Sabri, S., Richards, C.E. et al. (2022). Potential and limitations of digital twins to achieve the Sustainable Development Goals. Nature Sustainability, 5, 822–829. https://doi.org/10.1038/s41893-022-00923-7 Yang, Y., & Chui, T. F. M. (2021). Modeling and interpreting hydrological responses of sustainable urban drainage systems with explainable machine learning methods. Hydrology and Earth System Sciences, 25(11), 5839-5858. Kim, Y., Oh, J. and Bartos, M. (2025) “Stormwater digital twin with online quality control detects urban flood hazards under uncertainty,” Sustainable Cities and Society. Elsevier Ltd, 118. doi: 10.1016/j.scs.2024.105982. Pedersen, A. N. (2022) The digital twin of urban drainage systems-dynamic models and measurements for error diagnosis. DTU. Vinokić, L., Dotlić, M., Prodanović, V., Kolaković, S., Simonovic, S. P., & Stojković, M. (2025). Effectiveness of three machine learning models for prediction of daily streamflow and uncertainty assessment. Water Research X, 27, 100297. Sharafkhani, F., Corns, S., & Holmes, R. (2024). Multi-Step Ahead Water Level Forecasting Using Deep Neural Networks. Water, 16(21), 3153. https://doi.org/10.3390/w16213153