# Pipeline Leakage Detection Using Acoustic Emission and Machine Learning Algorithms

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

- (i)
- In order to exploit the statistical changes in the AE signal due to the defects in the pipeline, a sliding window is used, and from each sliding window, temporal statistical indicators are calculated. Furthermore, the changes in the frequency spectrum due to the defect in the pipeline are utilized by calculating the spectral features from each sliding window. To the best of our knowledge, utilizing a sliding window to extract statistical and spectral indicators from the AE signal is reported for the first time in this work;
- (ii)
- A pipeline health-sensitive classification model is reported in this study based on evaluating different classification models for pipeline leak detection and size identification by considering two different transportation mediums, such as fluid and gas;
- (iii)
- Real-world industrial fluid pipeline data were utilized in this study for leak detection and size identification using machine learning algorithms.

## 2. The Proposed Architecture and Methodology

#### 2.1. Acoustic Emission

#### 2.2. Acoustic Emission Sensor

#### 2.3. Data Acquisition

#### 2.4. Features Extraction in the Time and Frequency Domains

#### 2.5. Machine Learning Algorithms for Leakage Detection and Identification

- -
- The root node is the node with no input link and can have no or some output links;
- -
- Internal nodes have one input link and two or more output links;
- -
- Leaf nodes are the end nodes that have exactly one input link and no output link.

#### 2.6. Performance Metrics

_{a}, FP

_{a}, and FN

_{a}refer to the true-positive, false-positive, and false-negative results, respectively, obtained from the features that are representative of class a; n

_{a}represents the total number of samples from class a; A represents the overall number of classes in the dataset. The variable N denotes how many samples there are in all of the testing sets.

## 3. Results and Discussion

#### 3.1. Experimental Setup

#### Dataset Collection and Description

#### 3.2. Performance Comparison of Machine Learning Algorithms for Pipeline Leakage Detection

#### 3.2.1. Neural Network

^{−7}at epochs 24 and 1.44345 × 10

^{−7}at epochs 28 for 10 and 50 neurons, respectively. The convergence clearly depicts improved accuracy when increasing the number of neurons but also costs an increase in training time. Figure 7 shows the confusion matrices obtained using the 10 and 50 neurons, respectively. The neural networks achieved the highest accuracy for both the 10- and 50-neuron setups for training, testing, and validation. Confusion matrix “1” represents “No Leakage/Normal”, and “2” represents “Leakage”.

^{−7}at epochs 24 and 1.5926 × 10

^{−7}at epochs 30 for 10 and 50 neurons, respectively. The convergence clearly depicts improved accuracy when increasing the number of neurons but also costs an increase in training time. Figure 9 shows the confusion matrices obtained by using 10 and 50 neurons. The neural networks achieved the highest accuracy for both the 10- and 50-neuron setups for training, testing, and validation.

^{−7}at epochs 26 and 1.2969 × 10

^{−7}at epochs 31 for 10 and 50 neurons, respectively. The convergence clearly depicts improved accuracy when increasing the number of neurons but also costs an increase in training time. Figure 11 shows the confusion matrices obtained by using the 10- and 50-neuron setups. The neural networks achieved the highest accuracy for both the 10- and 50-neuron setups for training, testing, and validation.

^{−7}at epochs 29 for 10 and 50 neurons, respectively. The convergence clearly depicts improved accuracy when increasing the number of neurons but also costs an increase in training time. Figure 13 shows the confusion matrices obtained by using 10 and 50 neurons. The neural networks achieved the highest accuracy for both the 10- and 50-neuron setups for training, testing, and validation.

#### 3.2.2. K-Nearest Neighbor

#### 3.2.3. Random Forest

#### 3.2.4. Decision Tree

#### 3.2.5. The Overall Performance Comparison of the Applied ML Algorithms

## 4. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- BenSaleh, M.S.; Qasim, S.M.; Obeid, A.M.; Garcia-Ortiz, A. A review on wireless sensor network for water pipeline monitoring applications. In Proceedings of the 2013 International Conference on Collaboration Technologies and Systems (CTS), San Diego, CA, USA, 20–24 May 2013; IEEE: Piscataway, NJ, USA, 2013; pp. 128–131. [Google Scholar]
- Karray, F.; Garcia-Ortiz, A.; Jmal, M.W.; Obeid, A.M.; Abid, M. Earnpipe: A testbed for smart water pipeline monitoring using wireless sensor network. Procedia Comput. Sci.
**2016**, 96, 285–294. [Google Scholar] [CrossRef] - Sadeghioon, A.M.; Metje, N.; Chapman, D.N.; Anthony, C.J. SmartPipes: Smart wireless sensor networks for leak detection in water pipelines. J. Sens. Actuator Netw.
**2014**, 3, 64–78. [Google Scholar] [CrossRef] - Wang, W.; Zhang, Y.; Li, Y.; Hu, Q.; Liu, C.; Liu, C. Vulnerability analysis method based on risk assessment for gas transmission capabilities of natural gas pipeline networks. Reliab. Eng. Syst. Saf.
**2022**, 218, 108150. [Google Scholar] [CrossRef] - Korlapati, N.V.S.; Khan, F.; Noor, Q.; Mirza, S.; Vaddiraju, S. Review and analysis of pipeline leak detection methods. J. Pipeline Sci. Eng.
**2022**, 2, 100074. [Google Scholar] [CrossRef] - Kim, H.; Lee, J.; Kim, T.; Park, S.J.; Kim, H.; Jung, I.D. Advanced thermal fluid leakage detection system with machine learning algorithm for pipe-in-pipe structure. Case Stud. Therm. Eng.
**2023**, 42, 102747. [Google Scholar] [CrossRef] - Avinash, C.; Rao, E.H.; Malarvizhi, B.; Das, S.K.; Lydia, G.; Ponraju, D.; Athmalingam, S.; Venkatraman, B. Experimental investigation on sodium leak behaviour through a pinhole. Ann. Nucl. Energy
**2022**, 169, 108920. [Google Scholar] [CrossRef] - Sylvia, J.I.; Rao, P.V.; Babu, B.; Madhusoodanan, K.; Rajan, K.K. Development of sodium leak detectors for PFBR. Nucl. Eng. Des.
**2012**, 249, 419–431. [Google Scholar] [CrossRef] - Christos, S.C.; Fotis, G.; Nektarios, G.; Dimitris, R.; Areti, P.; Dimitrios, S. Autonomous low-cost Wireless Sensor platform for Leakage Detection in Oil and Gas Pipes. In Proceedings of the 2021 10th International Conference on Modern Circuits and Systems Technologies (MOCAST), Thessaloniki, Greece, 5–7 July 2021; pp. 1–4. [Google Scholar]
- Spandonidis, C.; Theodoropoulos, P.; Giannopoulos, F. A Combined Semi-Supervised Deep Learning Method for Oil Leak Detection in Pipelines Using IIoT at the Edge. Sensors
**2022**, 22, 4105. [Google Scholar] [CrossRef] - Idachaba, F.; Tomomewo, O. Surface Pipeline Leak Detection Using Realtime Sensor Data Analysis. J. Pipeline Sci. Eng.
**2022**, 29, 100108. [Google Scholar] - Li, J.; Zheng, Q.; Qian, Z.; Yang, X. A novel location algorithm for pipeline leakage based on the attenuation of negative pressure wave. Process. Saf. Environ. Prot.
**2019**, 123, 309–316. [Google Scholar] [CrossRef] - Sun, J.; Xiao, Q.; Wen, J.; Wang, F. Natural gas pipeline small leakage feature extraction and recognition based on LMD envelope spectrum entropy and SVM. Measurement
**2014**, 55, 434–443. [Google Scholar] [CrossRef] - Jin, H.; Zhang, L.; Liang, W.; Ding, Q. Integrated leakage detection and localization model for gas pipelines based on the acoustic wave method. J. Loss Prev. Process. Ind.
**2014**, 27, 74–88. [Google Scholar] [CrossRef] - Wang, L.; Narasimman, S.C.; Ravula, S.R.; Ukil, A. Water ingress detection in low-pressure gas pipelines using distributed temperature sensing system. IEEE Sens. J.
**2017**, 17, 3165–3173. [Google Scholar] [CrossRef] - Avelino, A.M.; de Paiva, J.A.; da Silva, R.E.; de Araujo, G.J.; de Azevedo, F.M.; Quintaes, F.D.O.; Salazar, A.O. Real time leak detection system applied to oil pipelines using sonic technology and neural networks. In Proceedings of the 2009 35th Annual Conference of IEEE Industrial Electronics, Porto, Portugal, 3–5 November 2009; pp. 2109–2114. [Google Scholar]
- Cataldo, A.; Cannazza, G.; De Benedetto, E.; Giaquinto, N. A new method for detecting leaks in underground water pipelines. IEEE Sens. J.
**2011**, 12, 1660–1667. [Google Scholar] [CrossRef] - Feng, J.; Li, F.; Lu, S.; Liu, J.; Ma, D. Injurious or noninjurious defect identification from MFL images in pipeline inspection using convolutional neural network. IEEE Trans. Instrum. Meas.
**2017**, 66, 1883–1892. [Google Scholar] [CrossRef] - Ahmad, Z.; Nguyen, T.-K.; Ahmad, S.; Nguyen, C.D.; Kim, J.-M. Multistage Centrifugal Pump Fault Diagnosis Using Informative Ratio Principal Component Analysis. Sensors
**2022**, 22, 179. [Google Scholar] [CrossRef] [PubMed] - Yan, Y.; Shen, Y.; Cui, X.; Hu, Y. Localization of Multiple Leak Sources Using Acoustic Emission Sensors Based on MUSIC Algorithm and Wavelet Packet Analysis. IEEE Sens. J.
**2018**, 18, 9812–9820. [Google Scholar] [CrossRef] - Xiao, R.; Hu, Q.; Li, J. Leak detection of gas pipelines using acoustic signals based on wavelet transform and Support Vector Machine. Measurement
**2019**, 146, 479–489. [Google Scholar] [CrossRef] - Wang, F.; Lin, W.; Liu, Z.; Wu, S.; Qiu, X. Pipeline leak detection by using time-domain statistical features. IEEE Sens. J.
**2017**, 17, 6431–6442. [Google Scholar] [CrossRef] - Mitchell, T. Machine Learning; McGraw Hill: New York, NY, USA, 1997. [Google Scholar]
- Barile, C.; Casavola, C.; Pappalettera, G.; Kannan, V.P. Application of different acoustic emission descriptors in damage assessment of fiber reinforced plastics: A comprehensive review. Eng. Fract. Mech.
**2020**, 235, 107083. [Google Scholar] [CrossRef] - Ian, G.; Yoshua, B.; Aaron, C. Deep Learning; MIT Press: Cambridge, MA, USA, 2016. [Google Scholar]
- Koza, J.R.; Bennett, F.H.; Andre, D.; Keane, M.A. Automated Design of Both the Topology and Sizing of Analog Electrical Circuits Using Genetic Programming Artificial Intelligence in Design’96; Springer: Dordrecht, The Netherlands, 1996; pp. 151–170. [Google Scholar]
- Kim, J.; Chae, M.; Han, J.; Park, S.; Lee, Y. The development of leak detection model in subsea gas pipeline using machine learning. J. Nat. Gas Sci. Eng.
**2021**, 94, 104134. [Google Scholar] [CrossRef] - El-Zahab, S.; Abdelkader, E.M.; Zayed, T. An accelerometer-based leak detection system. Mech. Syst. Signal Process.
**2018**, 108, 58–72. [Google Scholar] [CrossRef] - Rai, A.; Ahmad, Z.; Hasan, J.; Kim, J.-M. A Novel Pipeline Leak Detection Technique Based on Acoustic Emission Features and Two-Sample Kolmogorov–Smirnov Test. Sensors
**2021**, 21, 8247. [Google Scholar] [CrossRef] - Miller, R.K.; Hill, E.V.K.; Moore, P.O. American Society for Nondestructive Testing. In Acoustic Emission Testing; American Society for Nondestructive Testing: Columbus, OH, USA, 2005. [Google Scholar]
- Gostautas, R.S. Bureau of Materials & Research. In Identification of Failure Prediction Criteria Using Acoustic Emission Monitoring and Analysis of GFRP Bridge Deck Panels; No. K-TRAN: KU-02-1; University of Kansas, Department of Civil, Environmental and Architectural Engineering: Lawrence, KS, USA, 2007. [Google Scholar]
- Chai, M.; Hou, X.; Zhang, Z.; Duan, Q. Identification and prediction of fatigue crack growth under different stress ratios using acoustic emission data. Int. J. Fatigue
**2022**, 160, 106860. [Google Scholar] [CrossRef] - Muir, C.; Swaminathan, B.; Almansour, A.S.; Sevener, K.; Smith, C.; Presby, M.; Kiser, J.D.; Pollock, T.M.; Daly, S. Damage mechanism identification in composites via machine learning and acoustic emission. NPJ Comput. Mater.
**2021**, 7, 95. [Google Scholar] [CrossRef]

**Figure 3.**Amplitude and spectral power of the AE signals obtained from the pipeline under normal and leak operating conditions. (

**a**–

**c**) AE signal under normal operating conditions. (

**d**–

**f**) Power spectrum under normal operating conditions. (

**g**–

**i**) AE signal under pipeline leak operating conditions. (

**j**–

**l**) Power spectrum under pipeline leak operating conditions. (

**a**) Channel-1 Time Response No-leakage. (

**b**) Channel-2 Time Response No-leakage. (

**c**) Channel-3 Time Response No-leakage. (

**d**) Channel-1 Frequency Response No-leakage. (

**e**) Channel-2 Frequency Response No-leakage. (

**f**) Channel-3 Frequency Response No-leakage. (

**g**) Channel-1 Time Response Leakage. (

**h**) Channel-2 Time Response Leakage. (

**i**) Channel-3 Time Response Leakage. (

**j**) Channel-1 Frequency Response Leakage. (

**k**) Channel-2 Frequency Response Leakage. (

**l**) Channel-3 Frequency Response Leakage.

**Figure 6.**The convergence of the neural network for Dataset-1. (

**a**) 10 Neurons and (

**b**) 50 Neurons in the hidden layers.

**Figure 7.**Confusion matrices of Dataset-1, where class label 1 shows Normal operating conditions and class label 2 shows the Leak operating conditions of the pipeline using (

**a**) 10 Neurons and (

**b**) 50 Neurons.

**Figure 8.**The convergence of the neural network for Dataset-2. (

**a**) 10 Neurons and (

**b**) 50 Neurons in the hidden layers.

**Figure 9.**Confusion matrices of Dataset-2, where class label 1 shows the Normal operating conditions and class label 2 shows the Leak operating conditions of the pipeline using (

**a**) 10 Neurons and (

**b**) 50 Neurons.

**Figure 10.**The convergence of the neural network for Dataset-3. (

**a**) 10 Neurons and (

**b**) 50 Neurons in the hidden layers.

**Figure 11.**Confusion matrices of Dataset-3, where class label 1 shows the Normal operating conditions and class label 2 shows the Leak operating conditions of the pipeline using (

**a**) 10 Neurons and (

**b**) 50 Neurons.

**Figure 12.**The convergence of the neural network for Dataset-4. (

**a**) 10 Neurons and (

**b**) 50 Neurons in the hidden layers.

**Figure 13.**Confusion matrices of the Dataset-4, where class label 1 shows the Normal operating conditions and class label 2 shows the Leak operating conditions of the pipeline using (

**a**) 10 Neurons and (

**b**) 50 Neurons.

**Figure 14.**Performance comparison of KNN algorithm accuracy for the four datasets for different data splits.

**Figure 15.**Performance comparison of random forest algorithm accuracy for the four datasets and for the different data splits (No. of Trees = 100; Gini index split).

**Figure 16.**Performance comparison of decision tree algorithm accuracy for the four datasets for different data splits (Gini index split).

S. No | Parameter | Value |
---|---|---|

1 | AE sensor 1 location | 2500 mm |

2 | AE sensor 2 location | 1600 mm |

3 | AE sensor 3 location | 0 mm |

4 | Peak Sensitivity | 109 dB |

5 | Operational frequency range | 80–200 kHz |

6 | Resonant frequency | 75 kHz |

7 | Pipeline thickness | 6.02 mm |

8 | Pipeline material | 304 stainless steels |

9 | Pipeline outer diameter | 114.3 mm |

**Table 2.**Time domain features of AE channels [19].

Feature Name | Equation | Feature Name | Equation |
---|---|---|---|

Mean | ${X}_{m}=\frac{{\displaystyle \sum _{n=1}^{N}x(n)}}{N}$ | Standard deviation | ${X}_{sd}=\sqrt{\frac{{\displaystyle \sum _{n=1}^{N}{(x(n)-{X}_{m})}^{2}}}{N-1}}$ |

Root amplitude | ${X}_{root}={\left[\frac{{\displaystyle \sum _{n=1}^{N}\sqrt{\left|x(n)\right|}}}{N}\right]}^{2}$ | Skewness | ${X}_{sk.}=\frac{{\displaystyle \sum _{n=1}^{N}{(x(n)-{X}_{m})}^{2}}}{(N-1){X}_{sd}^{3}}$ |

RMS | ${X}_{rms}=\sqrt{\frac{{\displaystyle \sum _{n=1}^{N}{(x(n))}^{2}}}{N}}$ | Kurtosis | ${X}_{ku}=\frac{{{\displaystyle \sum}}_{n=1}^{N}{\left(x\left(n\right)-{X}_{m}\right)}^{4}}{\left(N-1\right){X}_{sd}^{4}}$ |

Impulse factor | ${X}_{impulse}=\frac{{X}_{peak}}{\frac{1}{N}{\displaystyle \sum _{n=1}^{N}\left|x(n)\right|}}$ | Root value | ${X}_{root}={\left(\frac{{{\displaystyle \sum}}_{n=1}^{N}\sqrt{\left|x\left(n\right)\right|}}{N}\right)}^{2}$ |

Shape factor | ${X}_{shape}=\frac{{X}_{rms}}{\frac{1}{N}{\displaystyle \sum _{n=1}^{N}\left|x(n)\right|}}$ | Crest factor | ${X}_{crest}=\frac{{X}_{peak}}{{X}_{rms}}$ |

Clearance factor | ${X}_{clearnace}=\frac{{X}_{peak}}{{X}_{root}}$ |

Feature Name | Equation | Feature Name | Equation |
---|---|---|---|

Mean Frequency | ${P}_{1}=\frac{{{\displaystyle \sum}}_{k=1}^{K}s\left(k\right)}{K}$ | Fourth Moment of Frequency | $P8=\sqrt{\frac{{{\displaystyle \sum}}_{k=1}^{K}{f}_{k}^{4}s\left(k\right)}{{{\displaystyle \sum}}_{k=1}^{K}{f}_{k}^{2}s\left(k\right)}}$ |

Variance | $p2=\frac{{{\displaystyle \sum}}_{k=1}^{K}{\left(s\left(k\right)-P1\right)}^{2}}{K-1}$ | Flattening Factor | $P9=\frac{{{\displaystyle \sum}}_{k=1}^{K}{f}_{k}^{2}s\left(k\right)}{\sqrt{{{\displaystyle \sum}}_{k}^{K}s\left(k\right)}{{\displaystyle \sum}}_{k=1}^{K}{f}_{k}^{4}s\left(k\right)}$ |

Skewness | $P3=\frac{{{\displaystyle \sum}}_{k=1}^{K}{\left(s\left(k\right)-p1\right)}^{3}}{k{(\sqrt{p2})}^{2}}$ | Coefficient of Variation of Centroid Frequency | $P10=\frac{{P}_{6}}{{P}_{5}}$ |

Spectral kurtosis | $P4=\frac{{{\displaystyle \sum}}_{k=1}^{K}{(\left(s\left(k\right)-p1\right))}^{4}}{K{p}_{2}^{2}}$ | Skewness of Centroid Frequency | $P11=\frac{{{\displaystyle \sum}}_{k=1}^{K}{({f}_{k}-{P}_{5})}^{3}s\left(k\right)}{K{P}_{6}^{3}}$ |

Centroid frequency | $P5={X}_{fc}=\frac{{{\displaystyle \sum}}_{k=1}^{K}{f}_{k}s\left(k\right)}{{{\displaystyle \sum}}_{k=1}^{K}s\left(k\right)}$ | Kurtosis of Centroid Frequency | $P12=\frac{{{\displaystyle \sum}}_{k=1}^{K}{({f}_{k}-{P}_{5})}^{4}s\left(k\right)}{K{P}_{6}^{4}}$ |

Standard Deviation of Centroid Frequency | $P6=\sqrt{\frac{{{\displaystyle \sum}}_{k=1}^{K}{({f}_{k}-{P}_{5})}^{2}s\left(k\right)}{K}}$ | Square Root of Centroid Frequency | $P13=\frac{{{\displaystyle \sum}}_{k=1}^{K}{({f}_{k}-{P}_{5})}^{1/2}s\left(k\right)}{K\sqrt{{P}_{6}}}$ |

Root means square frequency | $P7={X}_{rmsf}=\sqrt{\frac{{{\displaystyle \sum}}_{k=1}^{K}{f}_{k}^{2}s\left(k\right)}{{{\displaystyle \sum}}_{k=1}^{K}s\left(k\right)}}$ | Root Mean Square of Centroid Frequency Deviation | $P14=\sqrt{\frac{{{\displaystyle \sum}}_{k=1}^{K}f{(k-{P}_{5})}^{2}s\left(k\right)}{{{\displaystyle \sum}}_{k=1}^{K}s\left(k\right)}}$ |

Datasets | Pressure-Substance | Leak Pinhole Size | Acquisition Duration | Number of Feature Vector Samples (Normal/Leak) |
---|---|---|---|---|

Dataset-1 | 13 bar-Water | 1 mm | 6 min | 120/240 |

Dataset-2 | 13 bar-Gas | 0.5 mm | 6 min | 120/240 |

Dataset-3 | 18 bar-Water | 0.7 mm | 6 min | 120/240 |

Dataset-4 | 18 bar-Gas | 0.5 mm | 6 min | 120/240 |

Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Ullah, N.; Ahmed, Z.; Kim, J.-M. Pipeline Leakage Detection Using Acoustic Emission and Machine Learning Algorithms. *Sensors* **2023**, *23*, 3226.
https://doi.org/10.3390/s23063226

**AMA Style**

Ullah N, Ahmed Z, Kim J-M. Pipeline Leakage Detection Using Acoustic Emission and Machine Learning Algorithms. *Sensors*. 2023; 23(6):3226.
https://doi.org/10.3390/s23063226

**Chicago/Turabian Style**

Ullah, Niamat, Zahoor Ahmed, and Jong-Myon Kim. 2023. "Pipeline Leakage Detection Using Acoustic Emission and Machine Learning Algorithms" *Sensors* 23, no. 6: 3226.
https://doi.org/10.3390/s23063226