Pipeline Leak Detection and Location Based on Model-Free Isolation of Abnormal Acoustic Signals

: Pipeline leaks will lead to energy waste, environmental pollution and a threat to human safety. This paper proposes a pipeline leak detection and location method based on the model-free isolation of abnormal (leak and operation) signals. An acoustic signal is ﬁrst decomposed into “sub-signals” according to its zero-crossing points. Then, based on the deﬁnition of signal-to-noise ratio (SNR), the function between the SNR of sub-signal and the number of abnormal sub-signals is established, following which the position of each abnormal sub-signal in the acoustic signal is obtained by tracing its index. Based on this and the cross-correlation analysis, the operation sub-signals can be ﬁltered, which is helpful for the precise leak location. The experimental results demonstrate the computational efﬁciency and lower false/missing alarm rate of the proposed method that provides an innovative solution for pipeline leak detection.


Introduction
Pipelines are critical infrastructure to a country's economy for oil transportation.However, owing pipeline aging, corrosion and destruction of the third parties, pipeline leak accidents often occur [1][2][3][4][5].For the transport of certain hazardous substances (such as natural gas and hydrogen), pipeline leaks frequently result in serious safety accidents [6,7].Therefore, pipeline leak detection is necessary.Accordingly, domestic and foreign scholars have conducted considerable research in this area [8][9][10][11][12].Generally, these pipeline leak detection methods using a classifier are defined as model-based, while others are model-free-based methods.
Many studies have focused on model-based pipeline leak detection methods.In these methods, leak diagnosis models are established by mapping the relationship between feature space and fault space.(1) Feature extraction.From the time-domain perspective, researchers often utilize features of mean, peak, root-mean-square, shape factor, kurtosis, absolute amplitude and relative amplitude [13,14].From the frequency-domain perspective, according to the relationship between the cepstrum peak and the signal energy, the cepstrum peak is employed as a feature to identify leak signals [4].From the time-frequency-domain perspective, time-frequency analysis methods (such as wavelet packet, empirical mode decomposition, local mean decomposition, etc.) are often utilized to process signals, and their coefficients combined with root-mean-square or entropy are as features [6,15,16].(2) Diagnosis model.Some classification methods, such as the support vector domain description (SVDD) [17,18], support vector machine (SVM) [19,20] and Bayesian classifier [21], have been successfully applied to pipeline leak detection [22][23][24][25].
However, since model-based methods take the whole signal as the detection object, they can only judge whether it is abnormal and cannot give the local information (number, amplitude, position) of the abnormality in the signal.In practical applications, it is critical to obtain the local information of anomalies in an acoustic signal to solve false/missing alarms caused by the operation and leak mixing in an acoustic signal.Additionally, many model-based methods rely on leak samples.However, actual leak samples are not available from a real pipeline transportation process.Even if they are usually replaced by artificially simulated leaks, the number of samples is still limited and not able to cover all the leak situations.And for these pipelines of the transportation of certain dangerous substances such as natural gas, hydrogen and liquid chlorine, the artificially simulated leaks are usually generated with water or air as the replacement [16,26,27], which will affect the extracted features.To address this problem, Martini et al. [28] combined the autocorrelation function with the kurtosis to detect water leaks.And experimental results show the validity of this method but more verification of field water pipelines is needed.Wang et al. [14] utilized time domain statistical features of normal samples to establish a diagnosis model based on SVDD.The test results demonstrated that this method offered a certain extent of universality.However, this method was with an estimation of the misclassification rate, which may cause false and missing alarms in the long term continuous operation.
Therefore, this paper proposes a pipeline leak detection and location method based on the model-free isolation of abnormal acoustic signals.For acoustic sensor based leak detection, the operation signals generated by station operations (such as the pressure regulating) will be identified as abnormal signals as well in this paper.According to the bipolar characteristic of the acoustic signal, it can be decomposed into sub-signals.In an acoustic signal, the abnormal sub-signal is as the valid signal and the normal sub-signal as the background noise.Based on this, the functional relationship between the SNR of sub-signal and the number of abnormal sub-signals is established.Then, the direct isolation of abnormal signals can be realized.The proposed method reduces the dependency on samples and does not require feature extraction and diagnosis models, which aids in reducing the occurrence of false and missing alarms.Furthermore, the number of abnormal sub-signals and their positions in an acoustic signal can be obtained simultaneously, which helps to improve the location precision.
The composition of this paper is: Section 2 introduces the leak detection system based on the acoustic sensor; Sections 3 and 4 describe the model-free-based abnormal signal isolation method and the leak precise location method, respectively; Section 5 presents experiments; and Section 6 summarize this paper.

Acoustic Sensor-Based Leak Detection System
The schematic configuration of the pipeline leak detection system is shown in Figure 1.The acoustic transducer consists of a piezoelectric pressure sensor and signal conditioning circuit.The piezoelectric pressure sensor is used to sense acoustic signals and convert them into charge signals.
The circuit mainly includes a charge amplifier, a low-and high-pass filter, two voltage amplifiers and a voltage/current converter, as shown in Figure 2.After charge signals are processed by the circuit, they are remotely transmitted to the remote terminal units in the form of current (4∼20 mA).The synchronous acquisition of upstream and downstream acoustic signals can be achieved by GPS timing.Finally, these digital acoustic signals are sent to the computer center via the Internet for leak detection.Figure 3 shows the field installation of the acoustic transducers on pipelines.

Decomposition of an Acoustic Signal
The bipolarity of the acoustic signal x makes it possible to decompose the signal into positive and negative intervals with the zero-crossing points and each interval is regarded as a sub-signal.An acoustic signal is denoted by: where N is the data length of the acoustic signal x, T is the sampling period.Based on the zero-crossing points of x, the acoustic signal can be decomposed into M sub-signals and each sub-signal x sub (j) is: where j (j = 1, 2, ..., M) is the index of the sub-signal x sub (j), T start (j) and T end (j) are the starting time and the ending time of the sub-signal x sub (j), respectively.The peak of the sub-signal x sub (j) is denoted by A peak (j): Figure 4 shows the decomposition diagram.The abnormal acoustic signal shown in Figure 5a was filtered with the Daubechies wavelet (wavelet basis: db 9, decomposition level: 5).In the absence of a special explanation, all acoustic signals in this study were filtered with the same setting of the wavelet.It is decomposed into 168 sub-signals; the 68nd sub-signal is a positive abnormal sub-signal (Figure 5b) and the corresponding starting time, ending time and peak value are 72.74 s, 75.62 s, 0.505 V, respectively; the 73th sub-signal is a negative abnormal sub-signal (Figure 5c) and its starting time, ending time and peak value are 77.88 s, 80.86 s and −0.503 V, respectively.The proposed decomposition method lays a good foundation for extracting local abnormal information in an acoustic signal.

Principle of the Model-Free Isolation Method
The peak sequence, composed of the peaks of all sub-signals in an acoustic signal, is denoted by A peak = [A peak (1), A peak (2), ..., A peak (j), ..., A peak (M)].All sub-signals are sorted from large to small according to their absolute peak value |A peak (j)|.Then, the ordered peak sequence is denoted by , where a j is the index of the sub-signal x sub (a j ) in the acoustic signal x and a j is an integer within the range of 1 to M.
The most intuitive difference between the abnormal and normal signals is that the former absolute peak is significantly larger than the latter [13,14] and the law is also suitable for abnormal and normal sub-signals.If there are m abnormal sub-signals in an acoustic signal, the sub-signals, corresponding to the first m peaks in the ordered peak sequence A |peak| , are abnormal sub-signals.Based on the expert experience, the following lemmas can be summarized.
Lemma 1. From a microscopic perspective, the absolute peaks in the sequence A |peak| must be arranged from larger to small.That is, |A peak (a Lemma 2. From a macroscopic perspective, the absolute peak of the normal sub-signal is much smaller than that of the abnormal sub-signal and the normal sub-signals in the acoustic signal obeys the Gaussian distribution [14].Therefore, the absolute peaks of normal sub-signals are approximately equal.That is, Since the actual number m of abnormal sub-signals in an acoustic signal x to be detected is unknown, it can be assumed to be k whose value must be less than the number M of sub-signals. In order to make all equations meaningful (introduced in the following), its range is k = 1, 2, ..., M − 2. Based on the SNR definition [29], the abnormal sub-signal is treated as the valid signal and the normal sub-signal as the background noise in an acoustic signal x.Then, the SNR of the sub-signal x sub (a j ) is defined as follows: where σ k is the standard deviation of peaks of all normal sub-signals in an acoustic signal (the number of abnormal sub-signals is k and the remaining (M − k) sub-signals are normal sub-signals) and it is described by: In the case of k = M or k = M − 1, Equation (5) will be meaningless or make Equation (4) meaningless.Hence, the range of k (k = 1, 2, ..., M − 2) is reasonable.As observed in Equations ( 4) and ( 5), the SNR S k (a j ) of the sub-signal x sub (a j ) changes with the number k of abnormal sub-signals, which indicates S k (a j ) is the function of k.Each k corresponds to an SNR sequence The following three theorems can be deduced by analyzing Lemma 1 and Equation ( 4).
Theorem 2. The standard deviation σ k is a monotonically decreasing function of the number k of abnormal sub-signals: Proof of Theorem 2. First of all, the theorem is proved from the mathematical point of view.The average in Equation ( 5) is denoted by: The difference between µ k and µ k+1 is: As the peak sequence A |peak| is ordered from large to small, there is Hence, the |A peak (a k+1 )| − |A peak (a j )| in the Equation ( 8) is larger than 0. Combined with k = 1, 2, ..., M − 2, the µ k − µ k+1 is larger than 0. Therefore, the µ k is larger than µ k+1 .
Then, the difference between σ 2 k and σ 2 k+1 is: (10) Since the µ k is larger than µ k+1 , Equation (10) can be rewritten as: > 0 where ∆ k is a positive number and denoted by an SNR increment.
When the number of abnormal sub-signals is k = 1, 2, ..., M − 2, the SNR increment sequence ∆ is: According to Lemma 2 and Equation ( 5), if the actual number of abnormal sub-signals is m, then: Hence, That indicates the SNR increment of normal sub-signals tends to zero.Therefore, the actual number m of abnormal sub-signals should satisfy: In this paper, Equation ( 17) is realized by Equation (18).If m = 0, the acoustic signal is a normal signal; otherwise, it is abnormal and has m abnormal sub-signals.

Isolation of Abnormal Sub-Signals
While an acoustic signal is decomposed into M sub-signals, the index information, position information (starting time and end time) and peak information corresponding to each sub-signal are stored as follows: Index : where a j is the index of the sub-signal x sub (a j ).Once the actual number m of abnormal sub-signals are known, the peaks of abnormal sub-signals are A peak (a 1 ) ∼ A peak (a m ).Hence, the indexes of abnormal sub-signals are a 1 ∼ a m .According to these stored information (I sub , T start , T end ) of sub-signals and the indexes a 1 ∼ a m , each abnormal sub-signal can be isolated.Figure 9 shows the isolated abnormal sub-signals.summary, in the absence of feature extraction and a diagnosis model, the model-free isolation method can directly determine whether an acoustic signal is abnormal.Furthermore, the position of each abnormal sub-signal in the acoustic signal can be obtained, which provides the basis for the precise location of a leak.Figure 10 illustrates the detailed process of the model-free abnormal acoustic signal isolation method.

Leak Location
The classic location equation is [30]: where x L is the distance from the leak point to the upstream acoustic sensor; a is the velocity of acoustic signals propagating inside the pipeline; L is the length between the upstream and downstream acoustic sensors; and ∆t is the time difference of the upstream and downstream leak signals, which can be calculated by Equations ( 20)-( 22) and should satisfy Equation (23).
where R xy is the cross-correlation coefficient, ∆n is the delay points, ∆n 0 is the delay points corresponding to the maximum of the cross-correlation coefficient R xy , N is the data length of a signal, l is the allowable location error.

Analysis of the Influence of Operation Sub-Signals on Leak Location
Figure 11 shows the abnormal acoustic signals containing both leak and operation sub-signals.When the whole signal is the object of cross-correlation analysis, the delay points are −665 (Figure 12).According to the sampling period T =0.02 s, the time difference ∆t is −13.3 s; combined with the total length of the pipeline L =15.6 km, the acoustic velocity a =1179 m/s and Equation (19), it locates at −0.0404 km from the upstream.However, the leak occurred at 6 km away from the upstream.to the influence of operation sub-signals, the leak is missing.Therefore, it is necessary to filter out operation sub-signals in an acoustic signal.
Taking abnormal sub-signals as the object, the two-two cross-correlation analysis of the same polarity abnormal sub-signals in the upstream and downstream signals is performed.When the upstream abnormal sub-signal x sub (a i ) and the downstream abnormal sub-signal y sub (b j ) are analyzed with cross-correlation calculation, in order to make data length consistent, the participating signals are: where a i , T startx (a i ) and T endx (a i ) are the index, starting time and ending time of the abnormal sub-signal x sub (a i ) in the upstream acoustic signal x; b j , T starty (b j ) and T endy (b j ) are of the abnormal sub-signal y sub (b i ) in the downstream acoustic signal y.
According to Equations ( 20) and ( 21), the delay points of the abnormal sub-signal X i and Y j are ∆n ij .The maximum and minimum time difference of an acoustic signal from upstream to downstream are T max and T min , respectively.
Since the operation sub-signals are generated by upstream or downstream, under the condition of ignoring the medium flow speed, if the time difference ∆t ij satisfies Equation ( 27), the abnormal sub-signal x sub (a i ) and y sub (b j ) are operation sub-signals.
Finally, filtering (x sub (a i ) = 0, y sub (b j ) = 0) these operation sub-signals, their influence on leak location can be eliminated.
The upstream and downstream acoustic signals (Figure 11) are processed with the model-free isolation method described in Section 3 and the isolated abnormal sub-signals are shown in Figure 13.Table 1 shows the time difference of abnormal sub-signals.According to the pipeline length L = 15.6 km, the propagation velocity a = 1179 m/s, the allowable location error l = ±200 m and Equation ( 26), the time difference ∆t of operation sub-signals (Figure 13) should be in the range [13.Symbol "+" represents that the polarity of a abnormal sub-signal is positive.Symbol "−" represents that the polarity of a abnormal sub-signal is negative.Symbol "×" represents that time difference does not satisfy Equation (23).Symbol "--" represents that abnormal sub-signals do not belong to the same polarity and should not be subjected to the cross-correlation analysis.
The comparison of the cross-correlation analysis of the acoustic signals, before and after operation sub-signals are filtered, is further plotted in Figure 15.As shown, after filtering operation sub-signals, the delay points ∆n 0 has changed from −665 to −158, the time difference ∆t becomes 3.16 s, the leak location x L is 5.937 km and the location error is 63 m.Therefore, the accurate alarm for the leak is achieved after filtering operation sub-signals.In summary, the combination of model-free isolation method and the filtering operation sub-signals method realizes accurate detection and location of a pipeline leak.The specific process of leak location is shown in Figure 16.

Experimental Results
The validity of the proposed method was verified with the historical data of a naphtha pipeline and a crude oil pipeline, the specific parameters of which are given in Table 2.All leaks used in this paper were artificially generated by the cooperative unit opening a valve and only the case of a single leak is considered.On the naphtha pipeline, the cooperative unit carried out 15 leak experiments on 20-21 November 2013, respectively.On the crude oil pipeline, there were 6 leaks on 27 March 2011; because of the conveying process, these leak signals contain many operation sub-signals.3 shows the leak location results before and after operation sub-signals are filtered.For the naphtha pipeline, the locations are the same before and after filtering operation sub-signals since the 15 leak signals do not contain operation sub-signals and the maximum location is 41 m.For the crude oil pipeline, after filtering operation sub-signals, the missing alarms change from 83.33% (5/6) to 0 and the maximum location error change from 636 m to 160 m.Therefore, it demonstrates that the leak detection method, based on the model-free isolation of abnormal signals and the filtering operation sub-signals, is valid.

Comparison of Methods
Based on the historical data from the naphtha pipeline (20-21 November 2013) and the crude oil pipeline (26-27 March 2011), the WPE-based leak detection [15] and SVDD-based leak diagnosis [14] methods were compared with the method proposed in this paper.The comparisons were made from three perspectives: The comparison results are given in Table 4.It can be observed that: (1) the proposed method required the shortest running time to complete a diagnosis, had no missing and false alarms and had the smallest location error; (2) for the naphtha pipeline, the SVDD-based method did not report missing and false alarms but it had 1 false alarm and 5 missing alarms for the crude oil pipeline; and (3) the WPE-based method had both false and missing alarms for the two pipelines.Based on the above, it can be concluded that the proposed method could achieve pipeline leak detection without a diagnosis model compared to existing methods, reduced the running time, improved location accuracy and did not produce missing alarms.

Conclusions
A pipeline leak detection and location method based on model-free abnormal acoustic signal isolation is proposed in this paper.By decomposing the acoustic signal into sub-signals, the functional relationship between a sub-signal SNR and the number of abnormal sub-signals was established.The actual number m of abnormal sub-signals can be calculated according to the SNR increment and the position of each abnormal sub-signal in the acoustic signal can be traced by its index.Finally, based on the cross-correlation analysis, the precise location of leaks is achieved by filtering operation sub-signals.The proposed method does not require feature extraction or a diagnosis model and reduce the impact of operation sub-signals on leak location and the experimental results indicated that the method does not produce any missing and false alarms as well as provides higher location precision compared with other methods.

Figure 1 .
Figure 1.System architecture for the acoustic sensor-based leak detection.

Figure 2 .
Figure 2. The configuration of the acoustic transducer.

Figure 3 .
Figure 3. Field installation of the acoustic transducers on pipelines.

Figure 5 .
Figure 5. Decomposition example of an acoustic signal.

( 11 )
Hence σ k > σ k+1 .Then the theorem is proved from the physical point of view.When the number of abnormal sub-signals is k, σ k represents the standard deviation of peaks from |A peak (a k+1 )| to |A peak (a M )| in the ordered peak sequence A |peak| .When the number of abnormal sub-signals is k + 1, σ k+1 indicates the standard deviation from |A peak (a k+2 )| to |A peak (a M )|.Since |A peak (a k+1 )| > |A peak (a k+2 )|, the fluctuation of peaks used to calculate σ k is greater than that of peaks for calculating σ k+1

Figure 6
illustrates a normal and abnormal acoustic signal.According to the decomposition principle of an acoustic signal, the two signals are decomposed into 157 and 168 sub-signals and their actual numbers of abnormal sub-signals are m = 0 and m = 2, respectively.

Figure 6 .
Figure 6.Time domain waveform of normal and abnormal acoustic signals.Their SNR distributions, varying along with the assumed number k of abnormal sub-signals, are illustrated in Figure7a,b, respectively and the corresponding SNR increment sequences are illustrated in Figure8.According to Equation (18), for the normal acoustic signal, its actual number m of abnormal sub-signals is 0 and the signal can be judged as a normal signal.Similarly, for the abnormal acoustic signal, it is judged as an abnormal signal and includes 2 abnormal sub-signals.Therefore, the diagnosis results are consistent with the actual situation.

Figure 7 .
Figure 7.The signal to noise ration (SNR) sequence S k of normal and abnormal acoustic signals varies with the number k of abnormal sub-signals.(a) Normal acoustic signal: the actual number of abnormal sub-signals is m = 0. (b) Abnormal acoustic signal: the actual number of abnormal sub-signals is m = 2.

Figure 9 .
Figure 9.Time domain waveform of abnormal sub-signals isolated from the acoustic signal.

Figure 10 .
Figure 10.Flow chart of the model-free abnormal acoustic signal isolation method.

Figure 11 .
Figure 11.Abnormal signal example with leak and operation sub-signals.

Figure 12 .
Figure 12.Cross-correlation analysis of the abnormal signals.

Figure 15 .
Figure 15.Cross-correlation curves before and after filtering operation sub-signals.

Figure 16 .
Figure 16.Flow chart of the leak location method based on filtering operation sub-signals.

Table 2 .
Parameters of the naphtha and crude oil pipeline.

Table 3 .
Location results before and after filtering operation sub-signals.

Table 4 .
Comparison of test between the model-free-based (proposed), support vector domain description (SVDD)-based and WPE-based methods on the naphtha pipeline.