Вы находитесь на странице: 1из 8

Article

Leak detection in gas pipelines using


wavelet-based filtering

Structural Health Monitoring


11(4) 405412
The Author(s) 2011
Reprints and permissions:
sagepub.co.uk/journalsPermissions.nav
DOI: 10.1177/1475921711432002
shm.sagepub.com

J Urbanek1, T Barszcz1, T Uhl1, WJ Staszewski1, SBM Beck2


and B Schmidt3

Abstract
The article presents the application of the wavelet filter for detection of leaks in gas pipelines. The idea behind the
method is based on the detection of echoes reflected from turbulences induced by a leak. Such echoes are often very
hard to detect, mainly due to high noise levels. The common way of enhancing the analysis is to apply a filter. Different
types of filters can be used in practice. The selection of the appropriate filter type and its parameters is the major difficulty. The wavelet-based filter, selected for leakage detection, is optimally tuned using maximum values of kurtosis. The
proposed method is verified using simulated and experimental signals with high noise levels. The results demonstrate
that for the conditions used, the approach is superior over existing signal processing techniques. The method allows not
only for leakage detection but also for leakage location and estimation of its severity.
Keywords
pipeline networks, leak detection, continuous wavelet transform, wavelet filter, kurtosis

Introduction
Pipelines are a very important part of any engineering
infrastructure. Our life requires secure, efficient, and
environmentally friendly operation of various complex
pipeline systems. Media transported in pipelines can be
divided into two major categories, that is, liquid and
gas. Although physical properties of both media are different, problems associated with their transportation
are similar. It appears that leakage is one of the most
important problems associated with pipelines, and it is
inevitable in many systems. Early detection and localization of leakages are important not only because of
efficiency (i.e., loss of medium) but often also because
of safety to prevent various harm effects caused by leaking medium.
Various methods are available in practice for leak
detection. This includes approaches based on visual
inspection, acoustic emission, and dynamic pressure
measurements. One of the most promising approaches
is related to the analysis of reflections resulting from
signals introduced into the medium transported by the
pipeline. The method requires an understanding of
wave propagation in pipes, presented in Ref. 1. Leak
detection based on echoes was investigated in Refs. 2
and 3. The studies demonstrate very accurate results

for water supply networks. Other interesting results in


this area are presented in Ref. 4, where the work is
focused on the analysis of unsteady-state tests. Leak
detection results obtained in a complex water network
are demonstrated in Ref. 5. The important element in
all these investigations is the detection of signal echoes.
Correlation,2 cepstrum,3,57 and wavelet analysis3,4,8
are the most widely used signal processing techniques
used for leakage echo detection in pipeline networks.
The majority of leak detection work performed is
related to liquid pipelines. This is due to the fact that
gas flow is often associated with large noise levels. Poor
signal-to-noise ratios (SNRs) together with echoes produced by pipeline geometrical features, such as junctions or valves, make the entire process of gas leakage
detection very difficult. Various excitation methods
1

Faculty of Mechanical Engineering and Robotics, AGH University of


Science and Technology, Krakow, Poland.
2
Department of Mechanical Engineering, Sheffield University, Sheffield,
UK.
3
EC Systems, Ltd., Poland.
Corresponding author:
W.J. Staszewski, Faculty of Mechanical Engineering and Robotics, AGH
University of Science and Technology, Krakow, Poland.
Email: W.J.Staszewski@agh.edu.pl

Downloaded from shm.sagepub.com by Feblil Huda on January 26, 2016

406

Structural Health Monitoring 11(4)

can be used but extra care must be taken when the analyzed gas medium is explosive, as discussed in Refs. 5,
6, and 9.
While there were recently several articles proposing
novel leak detection methods in liquid pipelines, the
problem of leak detection in gas pipelines is not
widely investigated. The idea behind the method presented in this article is based on the detection of
echoes reflected from local change of fluid density
caused by the leak. Such echoes are often very hard
to detect, mainly due to high noise level. The gas flow
itself is the main source of the noise leading to poor
SNRs in response signals. Detection of leaks from
echoes is also a challenge due to the fact that echoes
are also produced by various geometrical pipeline features such as junctions or valves that are not related
to leakage. A variety of excitation techniques that
depend on medium, pressure, and required power
are used in practice to generate echoes. Special care
must be taken when media are explosive. The problem of excitation is discussed in detail in Refs. 5, 6,
and 9.
This article uses pressure wave signals to extract
echoes related to leakage in gas pipeline networks. The
objective is to use wavelet filtering on noisy signal
responses. In contrast to all previous approaches, the
optimal wavelet filter for leakage detection is developed. The filter is based on the continuous wavelet
transform. The major novelty is related to the process
of tuning filter parameters; this is based on maximum
values of kurtosis in the work presented. Wavelet-based
filtering used for leakage detection is briefly explained
in Wavelet-based filter for impulse detection in signals
with echoes section. The leakage detection algorithm is
implemented in Numerical implementation section.
The method is tested using simulated noisy signals, and
the results are compared with autocorrelation and cepstrum analysis. Experimental results and discussion
section presented experimental work undertaken in a
simple gas pipe with a leak. The results demonstrate
that the method allows for leak detection, localization,
and severity estimation.

Wavelet-based filter for impulse detection


in signals with echoes
Continuous wavelet transform for singularity
detection
Wavelet transform has been widely used for analysis of
nonstationary, time-variant data. It is well known that
wavelets analyze signals locally across various scales
that correspond to frequencies. The continuous wavelet
transform used in this article is defined as

1
Wg a, b = p
j aj

xtg


tb
dt,
a

where x(t) is the original signal, g(t) is the mother


wavelet, b is a translation parameter indicating the
locality, a is a dilation or scale parameter, and * indicates the complex conjugate. Each value of the transform
pis
normalized in Equation (1) by the factor
1= jaj to ensure that the integral energy given by each
translated and dilated wavelet ga, b (t) is independent of
the dilation a. Various wavelet functions can be used in
practice. The current work utilizes the second derivative of a Gaussian, often called the Mexican hat wavelet, defined as
g t =

 2



2
t
t2
p


1
exp

:
1
2s2
p4 3s s2

The continuous wavelet transform is one of the most


suitable signal processing tools for detection of singularities, as discussed in Ref. 10 and Ref. 11. The Mexican
hat wavelet is one of the best wavelet functions used for
that task. It was originally developed for multiscale
edge detection in computer vision. The amplitude of the
continuous wavelet transform exhibits large values at
small scales for signal local features such as discontinuities, sharp frequency changes, and impulses. This can
be illustrated using the following example. Figure 1(a)
shows a sine wave with a barely visible small impulse at
0.6 s. This impulse is clearly exhibited in Figure 1(b) by
the amplitude of the continuous wavelet transform calculated for this signal.

Wavelet-based filter algorithm for echo detection


Cepstrum-based methods are probably the most popular and commonly used signal processing tools for echo
detection.6,7,12 The method has been successfully used
for leakage detection in pipeline networks. There are
two different methods in this group, namely, the complex cepstrum and the real cepstrum. Complex cepstrum can be defined as the inverse Fourier transform
of the logarithm of the forward Fourier transform of a
time signal7:
CA t = F 1 log Af f g,

where A{f} is the complex spectrum of a given signal.


Previous studies in this area show that cepstrum is
very vulnerable to high level of background noise and
often produces results that require careful interpretation of various pipeline geometrical features to distinguish between leak-related and not leak-related echoes.
Figure 2 shows cepstrum calculated for signals with

Downloaded from shm.sagepub.com by Feblil Huda on January 26, 2016

Urbanek et al.

407

Figure 1. Example illustrating wavelet-based singularity detection: (a) sine wave with a barely visible peak at 0.6 s and (b) scalogram of the signal.

Figure 2. Absolute value of the complex cepstrum of the same


signal with two echoes and (a) large value of SNR and (b) small
value of SNR. Echo impulses are not detected in the noisy signal.

two different SNR levels. Two echoes clearly detected


in Figure 2(a) cannot be observed in Figure 2(b) where
the noise is added to the signal.
The situation presented on Figure 2 occurs always
when dealing with increased noise level. Here, the complex cepstrum uses the unwrapped phase angle,10 which
makes it very sensitive to the presence of noise. For
such signals, information carried by the unwrapped
phase can be significantly distorted. In order to avoid
such difficulties, the real cepstrum should be used. The
real cepstrum can be defined as

Effective filtering appears to be a solution to the problem. However, traditional filter parameters can be hard
to select in most applications because of various eigenfrequencies of pipeline structure. Impulse responses will
produce different frequency characteristics for different
measurement points due to unstable dynamic parameters of the flowing medium. That is why static filter
parameters are inadequate for detecting peaks hidden
in different frequency bands of analyzed responses.
Following previous work on correlation, the
approach based on the matched filter for echo signal
reconstruction has been proposed in Ref. 9. The concept of the matched filter is based on cross-correlation
of transmitted h (i.e., excitation) and received x (i.e.,
response) signals. The filtered y signal can be then calculated as

CA t = F 1 logjAf f gj,

where jAff gj notes the magnitude of the spectrum of a


given signal.
This approach is more robust as far as the noise
influence is concerned. The signal may contain significant noise, as long as the sought impulses would protrude above the noise level.
Thus, when the SNR level is relatively high, echo
impulses can be often observed in time-domain measurements, and such techniques as real cepstrum or correlation can be successfully applied for localization of
the impulses. However, most industrial measurements
in gas pipeline networks produce very noisy signals due
to the dynamic flow nature of the systems analyzed.

y n =

hn  k xk :

k = 

This method produces echo detection results that are


superior to all previous investigations. Nevertheless,
some important disadvantages are unavoidable in this
approach. Additional measurement channels are
required for recording transmitted signals. This is often
troublesome in real industrial installations, particularly
when cost is an issue. Moreover, the transmitted signals

Downloaded from shm.sagepub.com by Feblil Huda on January 26, 2016

408

Structural Health Monitoring 11(4)

Input signal

Mother wavelet

Continuous wavelet transform

Computation of kurtosis for all wavelet


scales
Inverse wavelet transform for the scale
exhibiting the largest kurtosis value

Figure 3. Flowchart of the wavelet-based filter algorithm tuned


by the maximum value of kurtosis.

are often modulated and deformed when passing


through the pipeline medium. Also, when the excitation
signal is close to a single impulse or step, for example,
when the fast reacting valve method is used, the
matched filter does not work. This is because frequency
of an echo signal is highly dependable on eigenfrequencies of the pipeline structure, as explained earlier.
For clear and automatic detection of echo impulses
in various measurement conditions, a flexible, selfadjusting filter is needed. The article proposes a new
criterion for selecting filter parameters. The main idea
is to use a well-known wavelet filter with a kurtosis as
a measure of spikiness. The filter is tuned using the
maximum value kurtosis from the output signal.
Figure 3 presents the flowchart of the proposed algorithm. The original response is analyzed using the continuous wavelet transform. Kurtosis is then calculated
for all scale values in the scalogram. The scale that exhibits the largest value of kurtosis is selected as the most
suitable scale to exhibit signal echoes. The inverse continuous wavelet transform is finally performed for the
selected value of scale to obtain the filtered response.
This approach does not require any knowledge of
eigenfrequencies associated with the examined pipeline
or even the transmitted signal. Filtering is designed to
produce signals with high SNR values and can be performed automatically.

Numerical implementation
The algorithm presented in Wavelet-based filter for
impulse detection in signals with echoes section was
implemented in MATLAB and tested using simulated
signals. This section presents the simulated results.
The performance of the wavelet-based filtering
method was first tested using a simulated signal. The
signal analyzed consisted of three major features, that
is, one excitation impulse and two echoes. All three
impulses were sine waves with the exponentially

Figure 4. Simulated signal containing one excitation impulse


and two echoes: (a) time domain representation and (b) power
spectrum.

decaying envelope. The echoes were placed at 0.3 and


0.7 s to avoid periodicity. The whole signal included
10,000 samples and simulated the acquisition of 1 s of
data sampled at 10 kHz. Figure 4 presents the signal
and its power spectrum. The latter shows that major
energy of the signal is concentrated around 600 Hz.
In order to simulate background noise, a nonGaussian noise component was added to the original
signal. Spectral characteristic of the noise was typical
for real measurements in gas pipelines. The SNR of the
resulting signal, defined as the ratio between the power
of the useful signal and the power of the noise component, was equal to 0.19. The skewness was equal to
20.0287, and the kurtosis value was 2.297. Figure 4
presents the simulated noisy signal and its power spectrum. The time-domain signal in Figure 4(a) clearly
shows that analyzed impulses are embedded in the
background noise. The part of the spectrum related to
the noise is much larger than the dark area equivalent
to the energy of the original signal in Figure 4(b). This
clearly illustrates the level of noise involved.
The continuous wavelet transform was applied to
the simulated noisy data (Figure 5). The resulting scalogram, calculated for 256 scales and presented in Figure
6, exhibits mainly high-frequency features related to
the noise. The analyzed echoes are not immediately

Downloaded from shm.sagepub.com by Feblil Huda on January 26, 2016

Urbanek et al.

409

Figure 8. Wavelet-based filtered signal for the scale parameter


a = 90.

Figure 5. Same as Figure 4 but with non-Gaussian noise added


to the simulated data: (a) time domain representation and (b)
power spectrum

visible. The scalogram was obtained for the Mexican


hat mother wavelet. Other wavelets were also investigated but yielded very similar results.
Kurtosis for all scales in the scalogram was calculated in the next step. The results are presented in
Figure 7. The maximum value of kurtosis was achieved
for the value of scale parameter a = 90. The inverse of
the continuous wavelet transform was calculated for
the selected scale component. The result, presented in
Figure 7, clearly displays two echoes.
The value of the kurtosis used for calculation could
be defined as
K=

Figure 6. Scalogram of the signal shown in Figure 5(a).

m4
 3,
s4

where m4 is the fourth moment about the mean, and s


is the standard deviation.
It is worth mentioning that nonperiodic impulses are
usually not present in gas or water pipelines acoustical
background. The flow of water or gas in pipeline networks is associated with high-level non-Gaussian noise
and various features related to operational conditions
(e.g., closing/opening of valves). This is the major reason why kurtosis, which normally indicates spikes in
the data, is appropriate for detecting short echoes
reflected from characteristic points of the pipeline
(Figures 8 and 9).
It is important to note that energy level of the filtered
signal is about 10 times lower than the energy level of
the original signal. Figure 11 explains the reason; the
wavelet-based filter extracts only a fraction of the original signal power; however, this fraction has the best
SNR level.

Experimental results and discussion

Figure 7. Kurtosis calculated for all wavelet scales.

The wavelet-based tuned filter was also tested using


experimental data from pipeline measurements. The
experimental tests were carried using a PVC pipe. The

Downloaded from shm.sagepub.com by Feblil Huda on January 26, 2016

410

Structural Health Monitoring 11(4)

Figure 9. Power spectra of the original (i.e., echoes), noisy (i.e.,


echoes embedded in the noise), and wavelet-filtered signals.

Figure 10. A section of the PVC pipe with a 4-mm hole.

length and internal diameter of the pipe were equal to


28 and 0.025 m, respectively. The rear end of the pipe
was left open. A small hole was drilled in the pipe in
order to simulate leakage. Three different diameters of
the hole, that is, 2, 4, and 6 mm, were investigated. The
holes were drilled 16, 18, and 20 m from the beginning

of the pipe. Figure 10 shows a section of the pipe with


the 4-mm hole.
A 1.5-kW Black & Decker CP5050 compressor was
used to force an air flow in the pipe. The compressor
used was also the main source of the background noise
observed in measured data. A single acoustic pulse was
used as an excitation. The excitation signal was first
amplified using a Sony CMT-CP1 18-W amplifier and
then introduced to the pipe using a Sony 1-529-337-11
loudspeaker with the waveguide lens. The acoustical
response was measured using a G.R.A.S 46AQ microphone installed on the same end of the pipe as the loudspeaker and compressor using tee-piece. The
microphone was sealed up in order to measure only the
acoustic pressure inside the pipe. The hole was drilled
in the opposite end of the pipe. Note that the length of
28 m refers to the distance between the microphone
and the open end of the pipe. The distance between the
speaker and the microphone was assumed to be negligibly small. Figure 11 illustrates the entire experimental
arrangement.
One second of time response signal, sampled at
10 kHz, was acquired in each measurement. The
National Instrument NI-9233 card and the Labview
environment were used for data acquisition. Figure 12
gives an example of the measured acoustical data for
the 2-mm hole. A strong excitation impulse can be
clearly observed in the beginning of the response signal.
No other important features are visible in the analyzed
response.
It is worth mentioning that the air flow velocity was
around 10 m/s when the speed of sound propagation in
the air is around 340 m/s. However, due to the fact that
during measured time period, the pulse is propagating
to the reflection source and back to the microphone,
the differences between sound wave propagation speed
with and against the current of the medium do not
affect the calculated results.
The complex cepstrum was calculated for the
response signal presented in Figure 12. The result,

Compressor

Microphone

Open end
Pipe

28 m
Speaker

Waveguide lens

Figure 11. Experimental arrangements used for leakage detection.

Downloaded from shm.sagepub.com by Feblil Huda on January 26, 2016

Hole

Urbanek et al.

411

Figure 15. Signal filtered by the proposed wavelet-based filter.


Figure 12. Example of the recorded acoustical response for
the 2-mm hole in the pipe located 18 m from the beginning of
the pipe.

Figure 16. Leakage detection results for different diameters of


the hole.
Figure 13. Absolute value of the complex cepstrum calculated
for the measured signal shown in Figure 12.

Figure 14. Result of the matched filter applied to the experimental data from Figure 12.

presented in Figure 13, fails to detect clear echoes


related to the simulated leakage. The background noise
level and modulations of reflected signals are too
strong in the analyzed data. The matched filter method,
introduced in Ref. 9, was also applied to the same data.
The result, presented in Figure 14, is not clear.

Although two peaks at 18 and 28 m can be observed,


several other peaks are also present in the analyzed
data. Thus, the method also fails to detect the leakage,
mainly due to the low SNR level of the analyzed data.
The wavelet-based filter, tuned with the maximum
value of kurtosis, was finally applied to the data shown
in Figure 12. The result, presented in Figure 15, clearly
demonstrates two echoes in the data at 18 and 28 m.
The former detects the leak, whereas the latter corresponds to the echo from the open end of the pipe. Echo
impulse locations were determined as the local maxima
of the envelope of the filtered signal. The distance
between the microphone and the excitation source was
too short to detect the left-hand end of the pipe using
presented method. It is important to note that the horizontal axis in Figures 1315 was scaled in distance,
using the sound speed value.
Further experimental tests were performed for different locations and different diameters of the hole, as
described previously. Figure 16 shows the results for
three different holes located 18 m from the beginning of
the pipe. The detected leakage is indicated by the arrow.
The results show that the amplitude of the detected
echoes increases with the diameter of the hole. Such a
result is expected, as the bigger hole creates larger

Downloaded from shm.sagepub.com by Feblil Huda on January 26, 2016

412

Structural Health Monitoring 11(4)

Table 1. A summary of leakage detection results for various diameters and locations of the hole amplitudes of detected echoes
corresponding to the leakage (hole) and the open end of the pipe
(end)
Distance (m) Diameter of the hole (mm)
2

16
18
20

Hole

End

Hole

End

Hole

End

0.024
0.023
0.021

0.044
0.048
0.055

0.048
0.039
0.026

0.039
0.040
0.041

0.082
0.049
0.045

0.018
0.027
0.034

turbulence, and thus produces larger echo in the


response signal.
A summary of all investigated cases is given in
Table 1. Here, amplitudes of detected echoes are given
for all locations and diameters investigated. The results
show that leaks were identified correctly for all investigated cases. The results demonstrate that the amplitude
of the echo peak depends on the diameter and the location of the hole. For a given distance, the peak amplitude increases significantly with the size of the hole.
The amplitude also decreases with the distance from
the hole due to damping in the analyzed medium.

Conclusion
The Echo detection based method introduced in this
work appears to be reasonable approach for pipeline
network identification. However, recorded time signals
need to be correctly preprocessed in order to perform
further analysis. Wavelet-based filtering was used for
leakage detection. The maximum value of kurtosis was
used to select the scale parameter for the wavelet inverse
filter. The method was demonstrated using the simulated noisy signal and tested using the experimental
data from a simple pipeline with a hole. It was shown
that any turbulence source can be detected by the
described method.
The simulated experimental leakage was correctly
identified for all leakage positions and severities investigated. The relevant results for the cepstrum and
matched filter failed to identify the leak. The proposed
method can easily be automated for real engineering
applications. Moreover, there is no need for

measurement of excitation signal, which requires additional measurement channel and extra equipment.
Further work is required to confirm the above findings and to implement the method for leakage detection
in other media such as water or oil, where the sound
propagation speed is much higher. Filter performance
should also be tested for long (several kilometers)
ranges and more complex pipeline system
configurations.
References
1. Beck SBM, Haider H and Boucher RF. Transmission
line modeling of simulated drill strings undergoing waterhammer. Proc Inst Mech Eng 1995; 209(C6): 419427.
2. Beck SBM, Williamson NJ, Sims ND and Stanway R.
Pipeline system identification through cross-correlation
analysis. Proc Inst Mech Eng 2001; E216: 133142.
3. Beck SBM, Foong J and Staszewski W. Wavelet and cepstrum analyses of leaks in pipe networks. In: 13th European Conference on Mathematics of Industry, ECMI
2004, Eindhoven, the Netherlands, 2125 June 2004, pp.
559563.
4. Ferrante M and Brunone B. Pipe system diagnosis and
leak detection by unsteady-state tests. 2. Wavelet analysis. J Adv Water Resour 2004; 26: 185198.
5. Taghvaei M, Beck SBM and Staszewski W. Leak detection in pipelines using cepstrum analysis. Meas Sci Tech
2006; 17: 367372.
6. Taghvaei M. Leakage detection in pipeline networks.
PhD thesis, Department of Mechanical Engineering,
Sheffield University, 2007.
7. Hanson D, Randall B, Brown G and Emslie R. Locating
leaks in underground water pipes using the complex cepstrum. In: Australasian Journal of mechanical Engineering 2008; 2(6): 107112.
8. Al-Shidhani I, Beck SBM and Staszewski WJ. Leak monitoring in pipeline networks using wavelet analysis. Key
Eng Mater 2003; 245246: 5158.
9. Wang X, Lennox B, Turner J, et al. Blockage detection
in long lengths of pipeline using a new acoustic method.
In: 16th International Congress on Sound and Vibration,
ICSV, Krakow, Poland, July 2009, pp. 59.
10. Mallat S. A wavelet tour of signal processing. San Diego,
CA: Academic Press, 1998.
11. Flandrin P. Time-frequency/time-scale analysis. San
Diego, CA: Academic Press, 1999.
12. Childers DG, Skinner DP and Kemerait RC. The cepstrum: a guide to processing. In: Proceedings of the
IEEE, Vol. 10(65), 1977, pp. 14281443.

Downloaded from shm.sagepub.com by Feblil Huda on January 26, 2016

Вам также может понравиться