Back to search

University of British Columbia

Applications of machine learning for real-time water quality monitoring in water distribution systems

Abstract

dc:description

Chlorine is the most widely used disinfectant globally, essential for maintaining safe drinking water. However, managing chlorine residuals in water distribution systems (WDS) is challenging due to chlorine decay, which is influenced by water quality, flow dynamics, and aging infrastructure. Traditional models and infrequent monitoring often lack the accuracy needed for real-time decision-making. To address these limitations, data-driven techniques and real-time monitoring have emerged as promising solutions for optimizing chlorine levels and ensuring regulatory compliance. This thesis applies machine learning (ML) techniques to improve chlorine residual predictions while enhancing model interpretability. The first study implemented neural networks, including Convolutional Neural Networks (CNN), Long Short-Term Memory (LSTM) networks, and CNN-LSTM architectures, to predict chlorine residuals using historical water quality data. These models outperformed traditional hydraulic models, such as EPANET, achieving mean absolute errors (MAE) below 0.027 mg/L. ML models effectively captured complex non-linear relationships between operational parameters and chlorine decay, demonstrating superior accuracy and robustness. The second study focused on improving model transparency through Explainable AI (XAI) techniques, including SHapley Additive exPlanations (SHAP), Permutation Feature Importance (PFI), and Occlusion Analysis. These methods validated model logic, identified key input features, and assessed the impact of sensor placement on prediction accuracy. Results indicated that accurate predictions could be achieved with sensors placed far from the prediction site, reducing the need for dense sensor networks. Additionally, sample-specific analysis revealed patterns linking flow rates, temperature, and chlorine decay, aligning with expected water quality behaviors. This enables informed decision-making, such as adjusting operational parameters. By integrating ML models with XAI techniques, this research supports real-time, data-driven chlorine management, enhancing water quality monitoring while fostering confidence in AI-driven decision-making.

Degree

thesis:*
Name thesis:degree_name
Master of Applied Science - MASc
Level thesis:degree_level
master's
Discipline thesis:degree_discipline
Civil Engineering
Grantor dc:publisher
University of British Columbia
Year dc:date
2025

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Riyadh, Ammar
Contributors dc:contributor
  • Peleato, Nicolas M.

Rights

dc:rights
Statement dc:rights
  • Attribution-ShareAlike 4.0 International
Language dc:language
eng

Identifiers

dc:identifier.*
Handle dc:identifier
http://hdl.handle.net/2429/90942

Chain of custody

source
Harvested from
University of British Columbia
Base URL
circle.library.ubc.ca/oai/request
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
related terms
citation

Riyadh, Ammar. Applications of machine learning for real-time water quality monitoring in water distribution systems. master's thesis, University of British Columbia, 2025. http://hdl.handle.net/2429/90942