# In-Line Acoustic Device Inspection of Leakage in Water Distribution Pipes Based on Wavelet and Neural Network

Authors: Dileep Kumar; Dezhan Tu; Naifu Zhu; Dibo Hou; Hongjian Zhang
Journal: Journal of Sensors
 (2017)

---

## Abstract

Traditionally permanent acoustic sensors leak detection techniques have been proven to be very effective in water distribution pipes. However, these methods need long distance deployment and proper position of sensors and cannot be implemented on underground pipelines. An inline-inspection acoustic device is developed which consists of acoustic sensors. The device will travel by the flow of water through the pipes which record all noise events and detect small leaks. However, it records all the noise events regarding background noises, but the time domain noisy acoustic signal cannot manifest complete features such as the leak flow rate which does not distinguish the leak signal and environmental disturbance. This paper presents an algorithm structure with the modularity of wavelet and neural network, which combines the capability of wavelet transform analyzing leakage signals and classification capability of artificial neural networks. This study validates that the time domain is not evident to the complete features regarding noisy leak signals and significance of selection of mother wavelet to extract the noise event features in water distribution pipes. The simulation consequences have shown that an appropriate mother wavelet has been selected and localized to extract the features of the signal with leak noise and background noise, and by neural network implementation, the method improves the classification performance of extracted features.


---

## Body

## 1. Introduction

Not only is leakage from distribution pipes a wastage of water resources, but also it includes environmental resources and social and economic losses and can potentially allow harmful contaminates into the water. Because of leakages and pipe failures, a significant amount of water is lost during supply to customers [1]. All over the world, more than 32 billion m3 of potable water is lost, which is greater than 35% of total water supplied [2]. Water supply is an energy-intensive industry, which utilizes 2-3% of the global energy [3]. Therefore, leakage in water distribution networks is also the waste of a significant amount of energy. There are various types of water pipes materials and leaking effects in water distribution systems; therefore, currently, leak detection and localization are a challenging task for water distribution companies.Acoustic leak detection techniques have been proven to be very effective for finding leaks in water pipelines. However, traditional acoustic techniques are fixed and focused on longitudinal deployment and spacing between sensors on the pipeline. In fixed sensors on metal pipes, sensor-to-sensor spacing can possibly be between 200 m and 500 m, which due to low-frequency vibration signals in plastic pipes may be up to 100 m, as the shorter the sensor spacing, the better the leak detection and localization [4]. Because these techniques utilize permanent monitoring sensors based on acoustics, operational change is not possible [5]. The deployment cost is high, and it is very challenging to find small leaks regardless of their location on the pipeline. Ground surface listening devices work almost directly over the leak site, but these methods are not practically suitable, especially for long transmission pipelines and underground pipelines [6].Hence, these traditional acoustic methods are costly and are unable to identify small leaks in the line, and undetected small leaks may cause a very high maintenance cost and have the possibility of developing severe failures. Nevertheless, to overcome these boundaries, an in-line acoustic inspection device is designed, known as free-swimming device [7], as shown in Figure 1(a). The free-swimming device has a spherical shape and smaller size than the diameter of the water distribution pipeline, and due to the sensitivity of acoustic leak detection, it is capable of 100% coverage of in-line inspection. It consists of acoustic sensors and is pushed by the flow of water in the pipeline; the device records all noise events as it moves with the flow in the pipeline as demonstrated in Figure 1(b). Pig traps can be used to insert and remove the device; its size and shape allow it to go through obstacles, otherwise rendering a pipeline unpiggable [7].Figure 1
(a) In-line acoustic device. (b) Schematic diagram of in-line leakage inspection.
(a)
(b)Li et al. debated the variety of hardware- and software-based leak detection approaches and hypothetically proposed that hardware-based and software-based methods together can be efficient for water leakage detection analysis [8]. In-line acoustic device investigation is demonstrated by combining the hardware and software applications (wavelet transform). The aim of this research is to propose a cost-effective in-line acoustic leakage inspection methodology with the strength of wavelet transform and neural network. This study also demonstrates the time domain unable to interpret the complete information of a noisy signal in water-filled pipes. The appropriate mother wavelet is used to extract features of in-line inspected leakage signals (background noise and the leak characteristics) and the artificial neural network improves the classification performance of extracted features consequently.


## 2. In-Line Acoustic Signal Processing and Significance of Wavelet Transform in Water-Filled Pipes

Acoustic leakage signals in water distribution pipelines are influenced by many factors, such as background noise, pressure [9], and size of leak [10], so it is of significant advantage to extract features from the signal. However, very few studies have inspected the features of acoustic signal emission using wavelet transform. Mostly, these researchers have focused on permanent acoustic sensors techniques outside the water pipeline [11, 12]. Perhaps no study has focused on the in-line acoustic leakage signal features. The time domain was unable to interpret the noisy leakage signal characteristics in water pipes. However, there are various techniques available to distinguish among these features within the signal, such as Shannon transform, Fourier transform, and short-time Fourier transform (STFT). Although Shannon transform provides good time resolution but no frequency information, Fourier transform cannot localize time and STFT, where the trade-off between time and frequency resolution is defined by the length of the integration of the window. The wavelet transform provides excellent time and frequency localization. Nevertheless, the most important issue is the selection of a mother wavelet; there is no universal method available which can demonstrate the selection of the best mother wavelet from this perspective. It depends upon both the motive of the study and the features of the signal to be analyzed [13]. This section introduces the wavelet transform and describes the importance of selection of the mother wavelet in water distribution pipes. The real-time signal processing results methodology is comprised of the following three main steps:(1)
Frequency Analysis. Fast Fourier transform is used to identify the leakage signatures of in-line inspected acoustic signals.(2)
Tuning Wavelet Transform. The appropriate mother wavelet is selected by visual analysis of shape and co-relating coefficients of real-time acoustic signals.(3)
Acoustic Signal Features Extraction. Identification of leakage and background noise is carried out with the selected appropriate mother wavelet.


### 2.1. Wavelet Transform

A wavelet is a small oscillating waveform of a limited interval, which begins at an amplitude of zero and then increases and then decreases back to zero value, and is usually used to overcome the time and frequency localization limitations of Shannon, Fourier, and STFT [14]. The wavelet transform employs an inner product comparable to Fourier transform and evaluates the signal’s correlation to a mother wavelet. The signal is analyzed to a stretched or compressed version of mother wavelet and the level at which this occurs is referred to as scaling; hence, wavelet transform shifts to a function of scale and position. The wavelet transform of a signal ft is defined with regard to cross-correlation ψ(a,b) [11].(1)WTxa,b≜∫ftψa,btdt,where the mother wavelet function, ψ(a,b), is defined as(2)ψa,bt=1aψt-baa>0,-∞,<b<∞.In (2), the different scales at time t correspond to the mother wavelet function ψ(a,b), where a and b are dilation and translation parameters, respectively. It is noticeable that the variations in t produce a significant change in ψ(a,b). Thus, through decreasing and increasing the a value, a change also occurs in ψ(a,b), resulting in the mother wavelet dilation (stretching or compression), whenever more dilated and contracted wavelets are related to higher and lower frequencies (upper and lower wavelet scales), respectively [15]. Equations (1) and (2) describe where the wavelet transform efficiently distinguishes the signal’s frequency bands, and aforementioned methods have no such capability which can trade off within time and frequency resolution like STFT.


### 2.2. The Importance of Selection of Mother Wavelet in Water Distribution Pipes

There are an enormous number of mother wavelets available, all with different properties of localization and scales. The choice of the suitable mother wavelet plays a significant role in generating valuable information as each mother wavelet produces different results [16]. Some studies investigated and proved that wavelet transform is applied efficiently to extract the features of signals. But still, limited studies have examined the notion that leak wavelet transform extracts features of the leak signals in plastic water distribution pipes, but still there is no conventional method which recommends how to choose the appropriate mother wavelet in this perspective. “Daubechies” mother wavelet is presented for denoising leak signals in water distribution pipes [17] but the aim of selecting the mother wavelet is not explored. The selection of an appropriate mother wavelet based on leakage signal and ambient noise could be very effective for real-time leak detection systems [11]. The proper selection of a mother wavelet varies for every signal [18], and a particular mother wavelet can be applicable to a specific problem [15], which is predictable to provide different localization of signals. “Daubechies” mother wavelets are more suitable for systems with a high level of vibration damping. In conditions with average damping, the “Morlet,” “Splin,” and “Jaffard” mother wavelets are appropriate for systems.In in-line water distribution pipelines, acoustic signals are noisy and are encompassed with different frequencies; therefore, the time domain cannot manifest the complete information about the leakage signal and to some extent features completely hidden inside the acoustic signal. This part of study incredibly validates that the time domain is not evident to the complete features regarding the noisy signal and also emphasizes the importance of selection of suitable mother wavelet.Example 1.
Suppose the signalf(t) comprises the sum of two frequencies: F1=15 Hz (normal frequency) and F2=60 Hz (leak frequency), which is corrupted by normally distributed white noise. The signal has 1 kHz sampling rate and a duration of 1000 milliseconds (ms). The comprised signal includes three events: F1=15 Hz lies in the intervals [0 300] ms and [700 1000] ms and the third event F2=50 Hz lies in the interval [300 700] ms as shown in Figure 2; that is,(3)ft=cos⁡2πtF1t<0.3+t>0.7+cos⁡2πtF2t>0.3t<0.7.In this example, two experiments are carried out: one with closely related suitable mother wavelet and the other when the mother wavelet is not suitably chosen. First, the “Gaussian 8” mother wavelet was selected, which coincides with the events in the noisy signal. The visual scalogram [19] exhibited how events vary inside the signal, although the time domain signal f(t) is not apparent about the diversification of events for the interval of [300 700] ms as shown in Figure 2(a). It is observed that the scalogram of “Gaussian 8” wavelet transform has localized all events, F1=15 Hz, for the period of [0 300] ms, and F2=60 Hz, for the time of [300 700] ms, and the wavelet transform also reveals the higher frequency components of the signal that lies at 10<a<40.Figure 2
Scalogram of the wavelet transform off(t) applying (a) “Gaussian 8” and (b) “Shannon 1-2.”
(a)
(b)Furthermore, in the result of the inappropriate selection of mother wavelet, the wavelet transform reveals little or no resemblance to noisy signal events. The scalogram of “Shannon 1-2” demonstrates that the events are not identified and localized due to poor choice of mother wavelet as shown in Figure2(b). This analysis has confirmed that the time domain could not explain the hidden events inside the noisy signal such as in water distribution pipes. The proper selection of mother wavelet can be employed to extract the composed features from the in-line acoustic signal.


## 2.1. Wavelet Transform

A wavelet is a small oscillating waveform of a limited interval, which begins at an amplitude of zero and then increases and then decreases back to zero value, and is usually used to overcome the time and frequency localization limitations of Shannon, Fourier, and STFT [14]. The wavelet transform employs an inner product comparable to Fourier transform and evaluates the signal’s correlation to a mother wavelet. The signal is analyzed to a stretched or compressed version of mother wavelet and the level at which this occurs is referred to as scaling; hence, wavelet transform shifts to a function of scale and position. The wavelet transform of a signal ft is defined with regard to cross-correlation ψ(a,b) [11].(1)WTxa,b≜∫ftψa,btdt,where the mother wavelet function, ψ(a,b), is defined as(2)ψa,bt=1aψt-baa>0,-∞,<b<∞.In (2), the different scales at time t correspond to the mother wavelet function ψ(a,b), where a and b are dilation and translation parameters, respectively. It is noticeable that the variations in t produce a significant change in ψ(a,b). Thus, through decreasing and increasing the a value, a change also occurs in ψ(a,b), resulting in the mother wavelet dilation (stretching or compression), whenever more dilated and contracted wavelets are related to higher and lower frequencies (upper and lower wavelet scales), respectively [15]. Equations (1) and (2) describe where the wavelet transform efficiently distinguishes the signal’s frequency bands, and aforementioned methods have no such capability which can trade off within time and frequency resolution like STFT.


## 2.2. The Importance of Selection of Mother Wavelet in Water Distribution Pipes

There are an enormous number of mother wavelets available, all with different properties of localization and scales. The choice of the suitable mother wavelet plays a significant role in generating valuable information as each mother wavelet produces different results [16]. Some studies investigated and proved that wavelet transform is applied efficiently to extract the features of signals. But still, limited studies have examined the notion that leak wavelet transform extracts features of the leak signals in plastic water distribution pipes, but still there is no conventional method which recommends how to choose the appropriate mother wavelet in this perspective. “Daubechies” mother wavelet is presented for denoising leak signals in water distribution pipes [17] but the aim of selecting the mother wavelet is not explored. The selection of an appropriate mother wavelet based on leakage signal and ambient noise could be very effective for real-time leak detection systems [11]. The proper selection of a mother wavelet varies for every signal [18], and a particular mother wavelet can be applicable to a specific problem [15], which is predictable to provide different localization of signals. “Daubechies” mother wavelets are more suitable for systems with a high level of vibration damping. In conditions with average damping, the “Morlet,” “Splin,” and “Jaffard” mother wavelets are appropriate for systems.In in-line water distribution pipelines, acoustic signals are noisy and are encompassed with different frequencies; therefore, the time domain cannot manifest the complete information about the leakage signal and to some extent features completely hidden inside the acoustic signal. This part of study incredibly validates that the time domain is not evident to the complete features regarding the noisy signal and also emphasizes the importance of selection of suitable mother wavelet.Example 1.
Suppose the signalf(t) comprises the sum of two frequencies: F1=15 Hz (normal frequency) and F2=60 Hz (leak frequency), which is corrupted by normally distributed white noise. The signal has 1 kHz sampling rate and a duration of 1000 milliseconds (ms). The comprised signal includes three events: F1=15 Hz lies in the intervals [0 300] ms and [700 1000] ms and the third event F2=50 Hz lies in the interval [300 700] ms as shown in Figure 2; that is,(3)ft=cos⁡2πtF1t<0.3+t>0.7+cos⁡2πtF2t>0.3t<0.7.In this example, two experiments are carried out: one with closely related suitable mother wavelet and the other when the mother wavelet is not suitably chosen. First, the “Gaussian 8” mother wavelet was selected, which coincides with the events in the noisy signal. The visual scalogram [19] exhibited how events vary inside the signal, although the time domain signal f(t) is not apparent about the diversification of events for the interval of [300 700] ms as shown in Figure 2(a). It is observed that the scalogram of “Gaussian 8” wavelet transform has localized all events, F1=15 Hz, for the period of [0 300] ms, and F2=60 Hz, for the time of [300 700] ms, and the wavelet transform also reveals the higher frequency components of the signal that lies at 10<a<40.Figure 2
Scalogram of the wavelet transform off(t) applying (a) “Gaussian 8” and (b) “Shannon 1-2.”
(a)
(b)Furthermore, in the result of the inappropriate selection of mother wavelet, the wavelet transform reveals little or no resemblance to noisy signal events. The scalogram of “Shannon 1-2” demonstrates that the events are not identified and localized due to poor choice of mother wavelet as shown in Figure2(b). This analysis has confirmed that the time domain could not explain the hidden events inside the noisy signal such as in water distribution pipes. The proper selection of mother wavelet can be employed to extract the composed features from the in-line acoustic signal.


## 3. In-Line Leakage Signal Features Classification Based on Neural Network

Neural network theory and technology advancements have changed the traditional way of thinking and opened new ways to solve complex problems in various applications. The significance of wavelet transform is to identify the leakage features incorporated or hidden inside the noisy time domain acoustic signal. The neural network classification improves the performance of defined features, and it may be used to estimate the size of the leak. In this section, the backpropagation neural network (BPNN) model is introduced for the in-line acoustic leak detection system. However, BPNN model performs adequately for leakage signal classification, but due to the sluggish reduction of mean square error (MSE), it influences the learning time and classification performance of acoustic signal features. Hence, to overcome the issue of stagnation performance and convergence time, the MSE function is replaced by cross-entropy (CE) error function.The results of the optimized BPNN model are given in Section4. The leakage signal classification methodology is comprised of the following two main steps consequently:(1)
BPNN Model Optimization and Tuning. Network model is optimized to minimize the classification error, and convergence time and parameters are tuned to improve the classification performance.(2)
Acoustic Signal Features Classification. The optimized BPNN model is applied to suitable mother wavelet identified features to classify the normal data samples (without leakage) and leakage samples.


### 3.1. Neural Network

Neural network model that is one of the branches of artificial intelligence is also known as artificial neural network [20]. It is a type of computational model that mimics various aspects of the human brain, for instance, distributed parallel processing, intelligent information processing, ability of learning, and highly tolerating incorrect information. It can achieve the goal of information processing by adjusting its input elements. Neurons are the fundamental elements dealing with the information. Figure 3 illustrates the basic neuron model.Figure 3
Basic nonlinear model of a neuron.A neuron consists of three primary elements.(i)
Synapsis. It is also named the link chain between the neurons; each synapse typically holds a weight or strength. Particularly, the input signal xj of the synapse j which connects to the neuronal k multiplies the synaptic weight wkj. In wkj, k is the query neurons and j is the neuron weights of synaptic input end. The neuron synaptic weights can be positive or negative, and the synapses of the brain and its value in a range are not the same.(ii)
Adder. It is used for the summation of synaptic weighted input signals and can be observed as a linear combination.(iii)
Activation Function. It is also defined as suppression φ• function and used to restrict the output amplitude of the neurons. Neuron output in a closed interval should be [0,1] or in other ranges [-1,+1].


### 3.2. Backpropagation Neural Network Based Classification

One of the most dynamic research and application fields of artificial neural networks (ANN) is classification. In supervised learning, training the neural network is a complex task. ANN has a significant drawback with an increasing number of features and classified sets to obtain the most suitable class of training, learning, and transfer function for datasets classification. ANN classification methodology is analyzed in different applications for various groups of datasets and accuracy of different combinations of features and their effects. Medical image analysis [21] multidimensional datasets are an example of practical problems of significantly using this dataset for classification.The dataset can be split into training and testing sets, and the training process does not utilize the testing dataset. These datasets produce results and are used for testing. The dataset is usually considered for training 60% to 80% and for testing 20% to 40%. The evaluation of accuracy is attained through testing contrary to these datasets. Backpropagation learning algorithm [22] is used in multilayer perceptron (MLP) network as shown in Figure 4. However, a variety of backpropagation algorithms are available, which can be employed for network training [23]. The scaled conjugate gradient (SCG) [24] algorithm is adopted to minimize the mean squared error (MSE) among the actual error rate and network output. However, to avoid the time-consuming line search technique per learning iteration as in other conjugate functions, step size scaling method is used in the trainscg function. Therefore, the algorithm performs faster than another second-order algorithm. More iterations are required for convergence in trainscg than other algorithms, but due to no line search, in each iteration, it significantly reduces the number of computations [25]. After several training cycles, the error minimization process is called epoch. The specified level of accuracy is achieved through each cycle of the network. The efficiency of the network is evaluated with the following parameters:(i)
Convergence rate(ii)
Number of epochs used for network convergence(iii)
Mean squared error (MSE)The BPNN model sufficiently performs leakage signal classification, despite the fact that the sluggish reduction of error may affect the performance of ANN through the different stages of the learning process [26]. It is observed that MSE function influences the learning time and classification performance in the result of gradual error reduction. Practically, in the result of big acoustic data, the model can lead to a significant number of errors and poor classification outcomes.Figure 4
Feedforward backpropagation multilayer perceptron neural network architecture.Therefore, to achieve high classification performance and accelerate the learning process, the BPNN model needs to be optimized.


### 3.3. Optimization of BPNN Model for Leakage Signal Classification

The goal of optimization is to overcome the issues of sluggish reduction of mean squared error (MSE), stagnation performance, and slow convergence rate of the network. However, all training patterns with MSE function are presented by the following equation:(4)Em=1n+∑k=1Ntk-yk2.In (4), n represents total training samples and N signifies the sum of all training input samples. Consequently, tk is the target value and yk is the output network value indexed by k of the in-line acoustic signal, respectively.As presented in Figure4, the error minimization is also realized through the updates of weights of all training patterns in BPNN. In practice, this approach improves network performance; however, ultimate results’ convergence became very slow. Therefore, to achieve high performance and fast outcomes of the scaled conjugate gradient backpropagation algorithm, the sluggish minimizing squares of errors method is replaced with the cross-entropy error function.(5)Ec=1n∑k=1Ntkln⁡yk+1-tkln⁡1-yk.It is tested that the cross-entropy error function Ec as demarcated in (5) improves the performance but could not fix the problem of sluggish learning in the network. In order to minimize the error and to accelerate the learning process of backpropagation SCG algorithm, each weight wjk is updated by partial derivative of Ec with respect to weights as given as follows:(6)yk=11+e-sk,where the sigmoid logistic function sk with respect to wjk is defined as(7)sk=∑j=1Nxjwjk.In (6) and (7), the expression represents the sigmoid activation function [27, 28] and sk is employed to the sum of weighted inputs from neurons, where xj describes the activation of the hidden layer of j node. In each layer of neurons, the backpropagation algorithm applies the chain rule. The algorithm is employed to calculate the training error by using the cross-entropy error function; the partial derivative of Ec regarding wjk is given as(8)∂Ec∂wjk=∂Ec∂yk∂yk∂sk∂sk∂wjk,(9)∂Ec∂wjk=yk-tkxj,(10)∂Ec∂wjk=1n∑k=1Nyk-tk.In (9) and (10), the difference between the target value and actual value is directly proportional to the error signal originating back from every output; the network tends to achieve excellent performance and shorter convergence period.Feedforward artificial neural networks with SCG backpropagation algorithm have been adopted in MATLAB, which lies in conjugate gradient algorithm’s class. The BPNN model is optimized [29] to achieve the goal of high classification performance of acoustic signal features through the minimization of error and fast convergence rate. The network model is optimized, and parameters are adjusted.As given in Table1, the parameters have been chosen after extensive testing, the lowest error producing parameters are adopted, and heuristically the target CE error is determined as 0.001.Table 1
Optimized BPNN model parameters.
ANN model, in-line acoustic leakage signal
Learning rate (α)
0.5
Hidden units
10
Error function (Ec)
Derivative of cross-entropy


## 3.1. Neural Network

Neural network model that is one of the branches of artificial intelligence is also known as artificial neural network [20]. It is a type of computational model that mimics various aspects of the human brain, for instance, distributed parallel processing, intelligent information processing, ability of learning, and highly tolerating incorrect information. It can achieve the goal of information processing by adjusting its input elements. Neurons are the fundamental elements dealing with the information. Figure 3 illustrates the basic neuron model.Figure 3
Basic nonlinear model of a neuron.A neuron consists of three primary elements.(i)
Synapsis. It is also named the link chain between the neurons; each synapse typically holds a weight or strength. Particularly, the input signal xj of the synapse j which connects to the neuronal k multiplies the synaptic weight wkj. In wkj, k is the query neurons and j is the neuron weights of synaptic input end. The neuron synaptic weights can be positive or negative, and the synapses of the brain and its value in a range are not the same.(ii)
Adder. It is used for the summation of synaptic weighted input signals and can be observed as a linear combination.(iii)
Activation Function. It is also defined as suppression φ• function and used to restrict the output amplitude of the neurons. Neuron output in a closed interval should be [0,1] or in other ranges [-1,+1].


## 3.2. Backpropagation Neural Network Based Classification

One of the most dynamic research and application fields of artificial neural networks (ANN) is classification. In supervised learning, training the neural network is a complex task. ANN has a significant drawback with an increasing number of features and classified sets to obtain the most suitable class of training, learning, and transfer function for datasets classification. ANN classification methodology is analyzed in different applications for various groups of datasets and accuracy of different combinations of features and their effects. Medical image analysis [21] multidimensional datasets are an example of practical problems of significantly using this dataset for classification.The dataset can be split into training and testing sets, and the training process does not utilize the testing dataset. These datasets produce results and are used for testing. The dataset is usually considered for training 60% to 80% and for testing 20% to 40%. The evaluation of accuracy is attained through testing contrary to these datasets. Backpropagation learning algorithm [22] is used in multilayer perceptron (MLP) network as shown in Figure 4. However, a variety of backpropagation algorithms are available, which can be employed for network training [23]. The scaled conjugate gradient (SCG) [24] algorithm is adopted to minimize the mean squared error (MSE) among the actual error rate and network output. However, to avoid the time-consuming line search technique per learning iteration as in other conjugate functions, step size scaling method is used in the trainscg function. Therefore, the algorithm performs faster than another second-order algorithm. More iterations are required for convergence in trainscg than other algorithms, but due to no line search, in each iteration, it significantly reduces the number of computations [25]. After several training cycles, the error minimization process is called epoch. The specified level of accuracy is achieved through each cycle of the network. The efficiency of the network is evaluated with the following parameters:(i)
Convergence rate(ii)
Number of epochs used for network convergence(iii)
Mean squared error (MSE)The BPNN model sufficiently performs leakage signal classification, despite the fact that the sluggish reduction of error may affect the performance of ANN through the different stages of the learning process [26]. It is observed that MSE function influences the learning time and classification performance in the result of gradual error reduction. Practically, in the result of big acoustic data, the model can lead to a significant number of errors and poor classification outcomes.Figure 4
Feedforward backpropagation multilayer perceptron neural network architecture.Therefore, to achieve high classification performance and accelerate the learning process, the BPNN model needs to be optimized.


## 3.3. Optimization of BPNN Model for Leakage Signal Classification

The goal of optimization is to overcome the issues of sluggish reduction of mean squared error (MSE), stagnation performance, and slow convergence rate of the network. However, all training patterns with MSE function are presented by the following equation:(4)Em=1n+∑k=1Ntk-yk2.In (4), n represents total training samples and N signifies the sum of all training input samples. Consequently, tk is the target value and yk is the output network value indexed by k of the in-line acoustic signal, respectively.As presented in Figure4, the error minimization is also realized through the updates of weights of all training patterns in BPNN. In practice, this approach improves network performance; however, ultimate results’ convergence became very slow. Therefore, to achieve high performance and fast outcomes of the scaled conjugate gradient backpropagation algorithm, the sluggish minimizing squares of errors method is replaced with the cross-entropy error function.(5)Ec=1n∑k=1Ntkln⁡yk+1-tkln⁡1-yk.It is tested that the cross-entropy error function Ec as demarcated in (5) improves the performance but could not fix the problem of sluggish learning in the network. In order to minimize the error and to accelerate the learning process of backpropagation SCG algorithm, each weight wjk is updated by partial derivative of Ec with respect to weights as given as follows:(6)yk=11+e-sk,where the sigmoid logistic function sk with respect to wjk is defined as(7)sk=∑j=1Nxjwjk.In (6) and (7), the expression represents the sigmoid activation function [27, 28] and sk is employed to the sum of weighted inputs from neurons, where xj describes the activation of the hidden layer of j node. In each layer of neurons, the backpropagation algorithm applies the chain rule. The algorithm is employed to calculate the training error by using the cross-entropy error function; the partial derivative of Ec regarding wjk is given as(8)∂Ec∂wjk=∂Ec∂yk∂yk∂sk∂sk∂wjk,(9)∂Ec∂wjk=yk-tkxj,(10)∂Ec∂wjk=1n∑k=1Nyk-tk.In (9) and (10), the difference between the target value and actual value is directly proportional to the error signal originating back from every output; the network tends to achieve excellent performance and shorter convergence period.Feedforward artificial neural networks with SCG backpropagation algorithm have been adopted in MATLAB, which lies in conjugate gradient algorithm’s class. The BPNN model is optimized [29] to achieve the goal of high classification performance of acoustic signal features through the minimization of error and fast convergence rate. The network model is optimized, and parameters are adjusted.As given in Table1, the parameters have been chosen after extensive testing, the lowest error producing parameters are adopted, and heuristically the target CE error is determined as 0.001.Table 1
Optimized BPNN model parameters.
ANN model, in-line acoustic leakage signal
Learning rate (α)
0.5
Hidden units
10
Error function (Ec)
Derivative of cross-entropy


## 4. Experimental Methodology

A state-of-the-art laboratory is developed to perform controlled experiments through launching the in-line acoustic device in the test rig. The test rig consists of 30 m length U-PVC (plasticized polyvinyl chloride) material pipeline of 200 mm internal diameter. The pipe rig contains three similar sized (10 m) sections which are organized in a parallel fashion in a “U” shape. The test pipeline can be extended simply by adding more pipe sections. The device launching can be complex; therefore, the particular vertical three-way structure is designed to propel the device in the water pipeline. Besides, to circulate the water between the tank and the pipeline, the pump is installed with a pipe rig. Initially, 20 mm leak size was simulated manually at a distance of 10 m. In order to adjust the leak size,4×4-inch rectangular flat metal plates are designed with different hole sizes which can be fixed at leak points to manage the leak size. Subsequently, leak size of 8 mm is regulated in the pipeline.After extensive tests of sensors, the acoustic sensor is chosen based on high underwater sensitivity results. The acoustic data is digitized and transmitted to the programmed microcontroller (STM32F103) through a 12-bit analog-to-digital converter (ADC) and eventually stored on an SD card. A high speed (10 MB/sec) “Class 10” 32 GB SD card is installed to store and access the data fast. The comprehensive circuitry has been activated and tested with lithium battery (2000 mAh) which can keep the device alive for about 24 hours. The in-line acoustic device’s spherical shape and relatively smaller size (100 mm) than the pipe bore diameter support it to roll on smoothly in the water distribution system regardless of pipeline material properties.A controlled experiment is conducted by launching the device in the test rig through an appropriate three-way structure. The recorded data is transferred to the computer via an RS-232 cable and evaluated using MATLAB. Underwater testing of the device regarding memory and battery life has led to the conclusion that the device can analyze approximately a 16–18 km long water transmission line.


## 5. Results and Discussions

### 5.1. Frequency Analysis and Selection of Mother Wavelet of In-Line Inspected Acoustic Signal

#### 5.1.1. Frequency Analysis

Fast Fourier transform (FFT) of the recorded in-line inspected signal is shown in Figure5, and the analysis of frequency components of leak signal and background noise, shown in Figures 5(b) and 5(c), exhibited the notion that the signal frequency components lie in the range of 100–370 Hz, which demonstrates the presence of a leak signature as revealed in Figure 5(a). Many studies have investigated the notion that leak signals are found in the lower frequency bands as in [30]. Usually, lower frequency bands carry the largest amplitude of the leakage signal. However, in the longitudinal deployment of fixed sensors, the background noise frequency records due to the resonance of pipe may range up to 20 Hz. But as a result of the in-line inspection, the vibration noise was not reported. Therefore, by differentiating the shape of leak signal with ambient noise (background noise), the background noise is created which lies in the range of 475 Hz to 625 Hz.Figure 5
FFT analysis of a recorded in-line inspected acoustic signal. (a) Acoustic signal frequency band. (b) Leakage signal frequency band. (c) Background noise frequency band.
(a)
(b)
(c)


#### 5.1.2. Identification of Leak Signal and Background Noise in Wavelet Transform

The wavelet transform is utilized to identify the leak among the in-line inspected acoustic signals. Initially, different mother wavelets are used to examine the acoustic signal, till the appropriate mother wavelet reveals the shape of the signal and extracts the features regarding leak signal and background noise. The “Morlet” mother wavelet has led to the recognition of the leak and background noise at proper scales. Figure6 illustrates that, as a result of high localization of Morlet mother wavelet, the strong energy traces appear at scales, which demonstrates the leak presence. Even background noise marks are not evident in the energy scalogram; however, the potential of Morlet mother wavelet localization has manifested that feature. It is also observed that, during the in-line inspection of pipes, the acoustic sensor records changes in the acoustic energy at a particular location while it is passing through the noise event (such as leak) position.Figure 6
Leakage signal and background analysis using “Morlet” transform.


#### 5.1.3. Choice of the Suitable Mother Wavelet

The wavelet transform has identified the leak signal and background noise at the appropriate scales. The proper mother wavelet was chosen through the analysis of various mother wavelet transforms. The number of mother wavelets exhibited comparable wave shapes with the leak signal as shown in Figure7. Different mother wavelets have presented various features and shapes at time and scale during visual inspection of wavelet transform; this diversity incredibly demonstrates the importance of selection of an appropriate mother wavelet. In this part of the research, it is enormously important to extract the features of the in-line inspected signal, and adequate mother wavelet is selected in the context of leak and background noise. As shown in Figure 7, the number of the mother wavelets identified the leak signal precisely which appeared at higher scales of the scalogram such as (a) “Daubechies 10,” (b) “Haar,” (c) “Symlet 10,” and (f) “Biorthogonal 3.9,” but these wavelets could not recognize the background noise.Figure 7
The wavelet transform analysis of an in-line inspected signal with various mother wavelets: (a) Daubechies 10, (b) Haar, (c) Symlet 10, (d) Shannon 1.0–0.5, (e) Biorthogonal 3.1, (f) Biorthogonal 3.9, (g) Morlet, and (h) Gaussian 8.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)However, (d) “Shannon 1.0–0.5” and (e) “Biorthogonal 3.1” mother wavelets exhibited traces of leak signal and background noise, but the shape does not match the original signal and marks are not clear at energy scalograms. It is observed that while the order of “Biorthogonal 3.1” is increased, the leak signal that appears clearly at scales and background noise traces has completely vanished as shown in (e) and (f). Moreover, the (g) “Morlet” and (h) “Gaussian” (8) mother wavelets strongly localized leak signal and background noise features of in-line inspected signal. Even though both mother wavelets provide proper localization, (g) “Morlet” has manifested the higher frequency components of leak signal at up to65<a<449 scales, in contrast to (h) “Gaussian 8” frequency components that are approximately at 65<a<365 scales. Consequently, (g) “Morlet” has presented excellent localization output. It is extremely difficult to choose a mother wavelet through only matching the shape of the leak signal; as mentioned before, the number of mother wavelets visually resembles the contour of the leak signal. Hence, leak signal and background noise coefficients correlated with the various mother wavelets.As a result of analysis of different mother wavelets, the “Morlet” mother wavelet has presented the maximum correlation regarding leak signal and background noise at the energy scalogram. Therefore, the “Morlet” coefficients have been selected for further investigation.


### 5.2. Leak Signal Classification Based on Optimized BPNN

The significance of extraction of features is incredibly meaningful, which demonstrates the components pattern or the number of inputs that interpret the best pattern. It is also observed that selection of an appropriate mother wavelet led to results accuracy. The “Morlet” wavelet coefficients have shown compact results of leak signal and background noise, which represent the acoustic signal energy pattern in time and frequency. The background noise components have been eliminated from wavelet coefficients. In numerical results, in-line acoustic data corresponded to the normal data samples (without a leak) and leak data samples, respectively. Leak data samples and normal data samples were classified sequentially.The dataset comprises 55000 samples; training samples are taken as 70% of the dataset and the remaining 30% are samples left for testing. The training process utilized a total number of 38498 samples and the remaining 16498 samples are devised for testing.Optimal performance is obtained through the error minimization; MSE functionEm is replaced with cross-entropy error Ec function as mentioned earlier in (4) and (5), respectively. The sluggishness of the network model is improved by derivation of the cross-entropy error function ∂Ec/∂wjk regarding weights wjk. So far, the best parameters have been selected for accuracy as mentioned before in Table 1.The BPNN model has attained the best validation performance with CE error of 0.00091 at 34 epochs and sequentially validation performance with MSE 0.12579 at 44 epochs. The results of the best validation performance have confirmed that the derivative of CE error function can accelerate the convergence rate, improve the classification performance, and enhance the generalization of BPNN.Table2 shows the classification results of wavelet identified features of acoustic in-line inspected signal. In the classification analysis, the normal samples (without leakage) and leakage samples are classified. The number of training samples of classes represents the learning samples of the acoustic signal at which the network model is trained. The numbers of testing samples are used to estimate the accuracy of the network. The misclassified samples refer to the number of classified samples of the acoustic signal that mainly do not relate to this signal. The obtained results of BPNN classification model have proven that the normal samples (without leakage) and the leakage samples are entirely separated with high accuracy.Table 2
Classification results with cross-entropy error function.
Data type
Without leak samples
Leak samples
Total samples
55000
Training samples
36034
2464
Testing samples
15395
1103
Correctly classified samples
51431
3567
Misclassified
1
Validation performance
0.00091


## 5.1. Frequency Analysis and Selection of Mother Wavelet of In-Line Inspected Acoustic Signal

### 5.1.1. Frequency Analysis

Fast Fourier transform (FFT) of the recorded in-line inspected signal is shown in Figure5, and the analysis of frequency components of leak signal and background noise, shown in Figures 5(b) and 5(c), exhibited the notion that the signal frequency components lie in the range of 100–370 Hz, which demonstrates the presence of a leak signature as revealed in Figure 5(a). Many studies have investigated the notion that leak signals are found in the lower frequency bands as in [30]. Usually, lower frequency bands carry the largest amplitude of the leakage signal. However, in the longitudinal deployment of fixed sensors, the background noise frequency records due to the resonance of pipe may range up to 20 Hz. But as a result of the in-line inspection, the vibration noise was not reported. Therefore, by differentiating the shape of leak signal with ambient noise (background noise), the background noise is created which lies in the range of 475 Hz to 625 Hz.Figure 5
FFT analysis of a recorded in-line inspected acoustic signal. (a) Acoustic signal frequency band. (b) Leakage signal frequency band. (c) Background noise frequency band.
(a)
(b)
(c)


### 5.1.2. Identification of Leak Signal and Background Noise in Wavelet Transform

The wavelet transform is utilized to identify the leak among the in-line inspected acoustic signals. Initially, different mother wavelets are used to examine the acoustic signal, till the appropriate mother wavelet reveals the shape of the signal and extracts the features regarding leak signal and background noise. The “Morlet” mother wavelet has led to the recognition of the leak and background noise at proper scales. Figure6 illustrates that, as a result of high localization of Morlet mother wavelet, the strong energy traces appear at scales, which demonstrates the leak presence. Even background noise marks are not evident in the energy scalogram; however, the potential of Morlet mother wavelet localization has manifested that feature. It is also observed that, during the in-line inspection of pipes, the acoustic sensor records changes in the acoustic energy at a particular location while it is passing through the noise event (such as leak) position.Figure 6
Leakage signal and background analysis using “Morlet” transform.


### 5.1.3. Choice of the Suitable Mother Wavelet

The wavelet transform has identified the leak signal and background noise at the appropriate scales. The proper mother wavelet was chosen through the analysis of various mother wavelet transforms. The number of mother wavelets exhibited comparable wave shapes with the leak signal as shown in Figure7. Different mother wavelets have presented various features and shapes at time and scale during visual inspection of wavelet transform; this diversity incredibly demonstrates the importance of selection of an appropriate mother wavelet. In this part of the research, it is enormously important to extract the features of the in-line inspected signal, and adequate mother wavelet is selected in the context of leak and background noise. As shown in Figure 7, the number of the mother wavelets identified the leak signal precisely which appeared at higher scales of the scalogram such as (a) “Daubechies 10,” (b) “Haar,” (c) “Symlet 10,” and (f) “Biorthogonal 3.9,” but these wavelets could not recognize the background noise.Figure 7
The wavelet transform analysis of an in-line inspected signal with various mother wavelets: (a) Daubechies 10, (b) Haar, (c) Symlet 10, (d) Shannon 1.0–0.5, (e) Biorthogonal 3.1, (f) Biorthogonal 3.9, (g) Morlet, and (h) Gaussian 8.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)However, (d) “Shannon 1.0–0.5” and (e) “Biorthogonal 3.1” mother wavelets exhibited traces of leak signal and background noise, but the shape does not match the original signal and marks are not clear at energy scalograms. It is observed that while the order of “Biorthogonal 3.1” is increased, the leak signal that appears clearly at scales and background noise traces has completely vanished as shown in (e) and (f). Moreover, the (g) “Morlet” and (h) “Gaussian” (8) mother wavelets strongly localized leak signal and background noise features of in-line inspected signal. Even though both mother wavelets provide proper localization, (g) “Morlet” has manifested the higher frequency components of leak signal at up to65<a<449 scales, in contrast to (h) “Gaussian 8” frequency components that are approximately at 65<a<365 scales. Consequently, (g) “Morlet” has presented excellent localization output. It is extremely difficult to choose a mother wavelet through only matching the shape of the leak signal; as mentioned before, the number of mother wavelets visually resembles the contour of the leak signal. Hence, leak signal and background noise coefficients correlated with the various mother wavelets.As a result of analysis of different mother wavelets, the “Morlet” mother wavelet has presented the maximum correlation regarding leak signal and background noise at the energy scalogram. Therefore, the “Morlet” coefficients have been selected for further investigation.


## 5.1.1. Frequency Analysis

Fast Fourier transform (FFT) of the recorded in-line inspected signal is shown in Figure5, and the analysis of frequency components of leak signal and background noise, shown in Figures 5(b) and 5(c), exhibited the notion that the signal frequency components lie in the range of 100–370 Hz, which demonstrates the presence of a leak signature as revealed in Figure 5(a). Many studies have investigated the notion that leak signals are found in the lower frequency bands as in [30]. Usually, lower frequency bands carry the largest amplitude of the leakage signal. However, in the longitudinal deployment of fixed sensors, the background noise frequency records due to the resonance of pipe may range up to 20 Hz. But as a result of the in-line inspection, the vibration noise was not reported. Therefore, by differentiating the shape of leak signal with ambient noise (background noise), the background noise is created which lies in the range of 475 Hz to 625 Hz.Figure 5
FFT analysis of a recorded in-line inspected acoustic signal. (a) Acoustic signal frequency band. (b) Leakage signal frequency band. (c) Background noise frequency band.
(a)
(b)
(c)


## 5.1.2. Identification of Leak Signal and Background Noise in Wavelet Transform

The wavelet transform is utilized to identify the leak among the in-line inspected acoustic signals. Initially, different mother wavelets are used to examine the acoustic signal, till the appropriate mother wavelet reveals the shape of the signal and extracts the features regarding leak signal and background noise. The “Morlet” mother wavelet has led to the recognition of the leak and background noise at proper scales. Figure6 illustrates that, as a result of high localization of Morlet mother wavelet, the strong energy traces appear at scales, which demonstrates the leak presence. Even background noise marks are not evident in the energy scalogram; however, the potential of Morlet mother wavelet localization has manifested that feature. It is also observed that, during the in-line inspection of pipes, the acoustic sensor records changes in the acoustic energy at a particular location while it is passing through the noise event (such as leak) position.Figure 6
Leakage signal and background analysis using “Morlet” transform.


## 5.1.3. Choice of the Suitable Mother Wavelet

The wavelet transform has identified the leak signal and background noise at the appropriate scales. The proper mother wavelet was chosen through the analysis of various mother wavelet transforms. The number of mother wavelets exhibited comparable wave shapes with the leak signal as shown in Figure7. Different mother wavelets have presented various features and shapes at time and scale during visual inspection of wavelet transform; this diversity incredibly demonstrates the importance of selection of an appropriate mother wavelet. In this part of the research, it is enormously important to extract the features of the in-line inspected signal, and adequate mother wavelet is selected in the context of leak and background noise. As shown in Figure 7, the number of the mother wavelets identified the leak signal precisely which appeared at higher scales of the scalogram such as (a) “Daubechies 10,” (b) “Haar,” (c) “Symlet 10,” and (f) “Biorthogonal 3.9,” but these wavelets could not recognize the background noise.Figure 7
The wavelet transform analysis of an in-line inspected signal with various mother wavelets: (a) Daubechies 10, (b) Haar, (c) Symlet 10, (d) Shannon 1.0–0.5, (e) Biorthogonal 3.1, (f) Biorthogonal 3.9, (g) Morlet, and (h) Gaussian 8.
(a)
(b)
(c)
(d)
(e)
(f)
(g)
(h)However, (d) “Shannon 1.0–0.5” and (e) “Biorthogonal 3.1” mother wavelets exhibited traces of leak signal and background noise, but the shape does not match the original signal and marks are not clear at energy scalograms. It is observed that while the order of “Biorthogonal 3.1” is increased, the leak signal that appears clearly at scales and background noise traces has completely vanished as shown in (e) and (f). Moreover, the (g) “Morlet” and (h) “Gaussian” (8) mother wavelets strongly localized leak signal and background noise features of in-line inspected signal. Even though both mother wavelets provide proper localization, (g) “Morlet” has manifested the higher frequency components of leak signal at up to65<a<449 scales, in contrast to (h) “Gaussian 8” frequency components that are approximately at 65<a<365 scales. Consequently, (g) “Morlet” has presented excellent localization output. It is extremely difficult to choose a mother wavelet through only matching the shape of the leak signal; as mentioned before, the number of mother wavelets visually resembles the contour of the leak signal. Hence, leak signal and background noise coefficients correlated with the various mother wavelets.As a result of analysis of different mother wavelets, the “Morlet” mother wavelet has presented the maximum correlation regarding leak signal and background noise at the energy scalogram. Therefore, the “Morlet” coefficients have been selected for further investigation.


## 5.2. Leak Signal Classification Based on Optimized BPNN

The significance of extraction of features is incredibly meaningful, which demonstrates the components pattern or the number of inputs that interpret the best pattern. It is also observed that selection of an appropriate mother wavelet led to results accuracy. The “Morlet” wavelet coefficients have shown compact results of leak signal and background noise, which represent the acoustic signal energy pattern in time and frequency. The background noise components have been eliminated from wavelet coefficients. In numerical results, in-line acoustic data corresponded to the normal data samples (without a leak) and leak data samples, respectively. Leak data samples and normal data samples were classified sequentially.The dataset comprises 55000 samples; training samples are taken as 70% of the dataset and the remaining 30% are samples left for testing. The training process utilized a total number of 38498 samples and the remaining 16498 samples are devised for testing.Optimal performance is obtained through the error minimization; MSE functionEm is replaced with cross-entropy error Ec function as mentioned earlier in (4) and (5), respectively. The sluggishness of the network model is improved by derivation of the cross-entropy error function ∂Ec/∂wjk regarding weights wjk. So far, the best parameters have been selected for accuracy as mentioned before in Table 1.The BPNN model has attained the best validation performance with CE error of 0.00091 at 34 epochs and sequentially validation performance with MSE 0.12579 at 44 epochs. The results of the best validation performance have confirmed that the derivative of CE error function can accelerate the convergence rate, improve the classification performance, and enhance the generalization of BPNN.Table2 shows the classification results of wavelet identified features of acoustic in-line inspected signal. In the classification analysis, the normal samples (without leakage) and leakage samples are classified. The number of training samples of classes represents the learning samples of the acoustic signal at which the network model is trained. The numbers of testing samples are used to estimate the accuracy of the network. The misclassified samples refer to the number of classified samples of the acoustic signal that mainly do not relate to this signal. The obtained results of BPNN classification model have proven that the normal samples (without leakage) and the leakage samples are entirely separated with high accuracy.Table 2
Classification results with cross-entropy error function.
Data type
Without leak samples
Leak samples
Total samples
55000
Training samples
36034
2464
Testing samples
15395
1103
Correctly classified samples
51431
3567
Misclassified
1
Validation performance
0.00091


## 6. Conclusions and Future Works

The experiment results validate that the in-line acoustic leakage signals in water-filled pipes are noisy and comprised of different frequencies, and time domain cannot manifest the complete features. The appropriate mother wavelet can be used for localization of in-line inspected acoustic signals and features extraction of leakage signal in water distribution pipes. The visually inspected results diversity of various mother wavelets incredibly demonstrates the importance of a suitable mother wavelet. While examining different mother wavelets, the “Morlet” mother wavelet robustly localized the leak signal and background noise features of the comprised acoustic signal. The “Morlet” mother wavelet exhibited the maximum correlation about leakage signal and background noise; hence, the coefficients are selected for classification. BPNN model is used for extracted features classification. However, to overcome the problem of sluggish reduction of error and stagnation period of learning, the BPNN model is optimized by replacing MSE function with a partial derivative of CE error function and network parameters are tuned to improve the classification performance. The BPNN model was trained, validated, and tested with the extracted features from “Morlet” mother wavelet transform. The results showed that using wavelet and neural network can lead to a high accuracy of in-line leakage signal identification and classification.The in-line acoustic device can be cost-efficient technology for early leak detection and condition assessment of underground long transmission water pipelines to reduce the potable water and socioeconomic losses. Future work is proposed to inspect the in-line multileakages (different sizes of leaks) and extract encompassed features of the noisy acoustic signal. As the in-line acoustic device is passing beside the leakage position, consequently it can be used for estimation of leak size in water distribution pipelines.



---

*Source: 5789510-2017-10-02.xml*