Graduate Studies
Enhancing Leak Detection in Oil and Gas Pipelines with Multi-Task LSTM Model
Abstract
dc:description.abstractOil and gas pipelines form a critical component of Canada’s industrial infrastructure, providing an efficient means of transporting natural resources across vast geographic regions. However, leak events pose severe environmental and economic risks, reinforcing the need for robust, accurate, and explainable monitoring systems. This thesis proposes a compact, multi-task Long Short Term Memory (LSTM) model for joint leak detection and localization in multivariate time-series data, leveraging the model’s ability to capture long range temporal dependencies. All datasets used for training and evaluation are generated using a Real Time Transient Model (RTTM), which simulates the fluid dynamic response of eight pipeline zones under leak and no-leak scenarios. The simulations incorporate conservation equations and the GERG-2008 equation of state to model pressure, flow, and temperature dynamics during leak propagation. Each sample encodes a sequence of sensor readings along the pipeline, with labels identifying leak presence and leak position. The LSTM model is evaluated under consistent 50/25/25 train–validation–test splits and benchmarked against a conventional one dimensional CNN baseline to ensure fair architectural comparison. Performance is assessed using classification metrics (accuracy, precision, recall, F1-score, and ROC–AUC) as well as localization metrics (MAE and Hit@5). Across all eight pipeline zones, the LSTM achieves near perfect classification performance and produces more accurate leak localization than the CNN, particularly in zones with longer sequences or widely spaced sensors. Latency and throughput measurements further demonstrate that the LSTM remains computationally feasible for real-time deployment. An ablation study evaluates the impact of architectural variations such as hidden size, number of layers, and activation functions revealing that the final LSTM configuration offers the best balance between generalization, localization accuracy, and inference speed. The localization output also contributes to model explainability by narrowing the region of interest for operators, aligning with the needs of real-world decision support environments. The proposed approach integrates with the PRIME and SHAPE research platforms, supporting operator facing visualization and training workflows. Limitations regarding reliance on simulated data, lack of cross validation, and assumptions about sensor accuracy are discussed, alongside recommendations for future work involving interpretability tools, distance aware loss functions, and testing with live or replayed SCADA datasets. Overall, this research demonstrates that sequence-based modeling of pressure flow dynamics can substantially enhance the reliability, interpretability, and operational readiness of pipeline leak detection and localization systems, contributing to safer and more sustainable energy infrastructure.
Degree
thesis:*- Name thesis:degree_name
- Master of Science (MSc)
- Discipline thesis:degree_discipline
- Engineering – Electrical & Computer
- Grantor dc:publisher.institution
- Graduate Studies
- Year dc:date.issued
- 2026
Author and committee
dc:creator, dc:contributor.*- Author dc:creator
-
- Marzban, Mehdi
- Advisor dc:contributor.advisor
-
- Kim, Kangsoo
- Committee members dc:contributor.committeemember
-
- Ginde, Gouri
- Far, Behrouz
Subjects
dc:subject × 5Rights
dc:rights- Statement dc:rights
-
- University of Calgary graduate students retain copyright ownership and moral rights for their thesis. You may use this material in any way that is permitted by the Copyright Act or through licensing that has been assigned to the document. For uses that are not allowable under copyright legislation or licensing, you are required to seek permission.
- Language dc:language.iso
- en
Identifiers
dc:identifier.*- Dc Identifier Citation
- Marzban, M. (2026). Enhancing leak detection in oil and gas pipelines with multi-task LSTM model (Master's thesis, University of Calgary, Calgary, Canada). Retrieved from https://prism.ucalgary.ca.