Enhancing Leak Detection in Oil and Gas Pipelines with Multi-Task LSTM Model
Abstract
Oil 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.
Fields of Study & Subjects
Water Systems and Optimization
Fault Detection and Control Systems
Non-Destructive Testing Techniques
Publication details
- Publication date
- 21 January 2026
- Language
- EN
- Document type
- Thesis