Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Detection of Pipe Leak in a Water Transmission Line

using Kalman Filter


Anand Gunasekaran and Dr.S.Srinivasan
Department of Instrumentation Engineering,
Madras Institute of Technology, Anna University,
Chennai 600044, India.
E-mail: anandgbe@gmail.com, srini@mitindia.edu.

Abstract—The demands on the water supply system increase as Didia Covas[5]. The SWDM consists of the generation of
the human population grows and expands throughout the steady-oscillatory flow in a pipe system and the analysis of
world. A model based approach for water leak detection in the system pressure response. But the flow of the water in
transmission line is attempted, where two leak detectors are pipeline has to be disturbed in order to find leak position.
modelled as state space model whose input signals are,
Although Baptista and Wagon[6] claimed that the Simone
respectively, intake and outbound pressures along with intake
mass flow. The two leak detectors are made to run
simulator allows for calculating accurately the LP. However
simultaneously allows for leak location. Each leak detector uses these methods cannot be considered completely reliable
two Kalman filters where the fault is viewed as an augmented since a significant number of false alarm rates is registered
state. The first filter estimates the flow using a calculated every day. This is mainly due to an integral term of the
pressure signal, assuming that there is no leakage. Therefore it balance equation, which integrates the massflow difference
works as a reference. The second one uses a measured pressure at the boundaries. These flow measurements are corrupted
signal and the augmented state is compared with the reference by noise which will be also integrated, introducing a random
value. Whenever there is a significant difference, a leakage is walk term in the balance equation. This term is a non-
detected. The leak location is a linear function of the difference
stationary stochastic process with a variance proportional to
between the time instants the leak is perceived at the pipe
endpoints. Based on this fact, an interactive methodology for
the integration time. As a result, the balance equation is
leak location has also been presented. always corrupted by a significant amount of noise that can
easily trigger false alarms. Some model based methods
Keywords—water supply system, leakage detectors, Kalman avoid this problem by using state observers with the fault
filter, leakage location. parameters treated as augmented states as suggested by
Benkherouf A and Liu M[7, 8]. Although this is an
I. INTRODUCTION appealing approach, the models used so far were too
Pipeline networks are the most economic and complex, giving rise to estimators with too high
safest pipeline transport for mineral oil, gases and other computational costs.
fluid products. As a means of long-distance transport,
pipelines have to fulfill high demands of safety, reliability The pipeline is modelled as an LPV system, as proposed
and efficiency. Most pipelines, regardless of what they by Lopes dos Santos[9], with the pressure as the scheduling
transport, are designed with a typical life span of 25 years. signal. The model was identified from operational data
When they do begin to fail, they do so slowly beginning using iterative subspace algorithm and successive
with leaks at poor construction joints, corrosion points and approximation as described by Ramos JA[10, 11]. The
small structural material cracks, and gradually progress to a leakage is detected with a Kalman filter where the fault is
catastrophic ending. But there are also other reasons for leak treated as an additional state. A similar approach was
disasters such as accidents, terror, sabotage, or theft. proposed by Azevedo Perdicoúlis[12]. The pipeline was
Although the causes of pipe bursts and leakage are well also modelled as an LPV system driven by the source node
known (e.g., pipe age, operating pressures, inadequate massflow but with the LP as the scheduling parameter.
design, and external corrosion), current methods of Given that the gas LP can be estimated from the massflow
detecting leaks in pipe systems remain labor intensive and balance equation, a differential method is proposed to
imprecise. improve the leakage detector effectiveness. The proposed
Kalman filter based methods were compared with a standard
To avoid high false alarm rate, Leaks are detected from mass balance method in a 4% leakage detection scenario
the mass-flow balance equations, which consist in balancing based on two methods namely Kalman Filter (KF) and
the flow at the boundaries plus the variation of linepack Differential Kalman Filter (DKF) method. The DKF method
(LP), i.e. the amount of water stored in the pipes. However, proved to be highly efficient.
a considerable drawback is the LP model being strongly
dependent on the noise of the pressure/temperature In an analysis of the water dynamics within the pipeline,
measurements. A novel leak detection technique based on it was observed that a leakage triggers a pressure wave in
the standing wave difference method SWDM is proposed by both directions at sound speed as suggested by Jank
G[13,14]. Therefore, in order to locate the leakage, we need instances of this Kalman filter; the first instance uses the
to detect at what time instants these pressure waves reach calculated pressure as the scheduling signal and the second
the pipeline ends. So, to include leak location in the uses the measured pressure. Since the first filter uses the
approach, two detectors are needed, one at each end of the calculated pressure it can never detect a leakage. Instead, it
pipeline. For each detector, the linepack scheduling signal works as a reference signal. This filter leakage state is
used in [12] is replaced by the pressure: the intake pressure continuously compared with the corresponding state of the
for the intake detector and the offtake pressure for an second filter, the one that uses the measured pressure as the
another. input signal. When there is no leakage, these states remain
close to each other, but when a leakage occurs their
Through this paper, a case study was used to present the
difference takes the leakage value. In what follows, it can be
leak detection and location method. In this case study, a
seen, this method is very fast and accurate and also well
leakage was detected in a pipeline 10 m long, where the leak
suited to detect small leakages.
happens in an intermediate point. Since massflow are set at
both ends of the pipeline, the leakage is detected using only At first, describe the leakage detector whose input
pressure variations. Due to the length of the pipeline, the signal is the intake pressure. The other leakage detector, i.e.
pressure variations were negligible during the leakage the one that uses the downstream pressure as the input
detection time interval. That is, the leakage was detected signal is identical in every detail except for the chosen input
using only the massflow variation. signal. Given that the leakage does not appear in this
equation and the pressure solely depends on the
Section 2 deals with the proposed methodology. Section intake/outbound mass flow rates, the calculated pressure
3 gives the detail about experimental setup and data signal always considers that there is no leakage in the
collection technique. Section 4 presents the results and pipeline. As a result, one should use this Kalman filter
discussions. Section 5 gives the conclusion. leakage estimate as a reference signal denoted as .
II. METHODOLOGY USED In parallel, one must run another instance of this
Kalman filter using a input signal generated from the
A. Implementation of Kalman filter measured intake pressure. This Kalman filter leakage
A method that uses a Kalman filter, built from an estimate is de-noted by (k). In the absence of leakage,
identified first order model, is described next. Thus, both leakage estimates should be equal to zero. But, when a
consider: leakage occurs (k) remains zero and takes the
value of leakage.As such, the signal
xleak(k+1) = xleak(k) + eleak(k) (1)
(KF method) (4)
x(k+1) = Adx(k) + Bdu(k) + Ke(k) (2)
y(k) = xleak(k) + Cdx(k) + e(k) (3) (DKF method) (5)
is leak sensitive and will be used to detect leakages.
This model has an additional state that is supposed to
has an expected value of μ and a standard
remain close to zero when there is no leakage. xleak(k) is the
deviation σ.
leakage detection signal and should be different from zero
only in case of leakage. Calculation of the upper and lower bound of threshold
is based on the values of .
Priori estimate
Tupper = μ+ 3σ (6)
X(k/k-1) = Ad* +Bd *u(k-1)
Tlower = μ- 3σ (7)
where, μ is the mean of the augmented state of Kalman
P(k/k-1) = Ad*P(k-1|k-1)*Ad' +
filter, σ is the standard deviation of the augmented state of
Kalman gain Kalman filter.
K = P(k/k-1) * Cd'/(Cd*P(k/k-1)*Cd' + R) A leakage is detected when this signal leaves the
interval defined by these detection thresholds. This leads to
Update(posteriori estimate)
the arrival of two time values namely and .
X(k/k) = X(k/k-1) + K * ( y(k/k-1) - Cd * x(k/k-1))
P(k/k) = P(k/k-1) - K*Cd*P(k/k-1) B. Leakage positioning
The figure 1 shows the pipeline of length L and leak
When a leakage occurs it should take the leakage position at distance X from upstream end. The leak
value. From this idea, a differential Kalman filter based detection signals are smooth before the leakage is detected
method was derived. This method consists in using two and a sudden change occurs with the signal becoming more
detectors but the input signals are now first the calculated variable once the leakage is perceived. The idea is to use
intake pressure and second the calculated downstream this variation to estimate and . This sudden
pressure. The two different input signals lead to two
different leakage detectors, where each one runs two
change causes a pulse at each differential signal is System realization process is making software based on
determined by using the formula, LabVIEW, acquiring flow at two ends of the pipeline by
data acquisition board, using wavelet transform to filter
i(k)= i(k) - i(k-1) (8) noise, detecting catastrophe point of real-time acquisition
o(k)= o (k) - o(k-1) (9) signals by continuous analysis, thus implementing leak
detection and location.

Fig. 1. Leakage introduced between two transmitters

The threshold level for leak location can be calculated


by the same procedure used for detecting threshold level for
leak detection signal. The wave pressure caused by the
leakage takes the time value of
(10)
Fig. 2. Upstream end of experimental setup
(11)

where, is the speed of pressure wave, L is the length of the


pipe, X is the distance between the first sensor and leakage
point.
By combining the equations (10) and (11), leak
location is obtained.

(12)
where, is the time difference between the leak sensed
between the upstream and downstream sensor.

III. EXPERIMENT FACILITY AND MEASUREMENTS


Fig. 3. Downstream end of experimental setup
A. Experimental setup
The pump is used to supply water to the overhead tank. B. Real-time acquisition of flow and pressure
The leakage is created at a particular location between two The figure 4 shows the flow signal recorded from the
sensors by opening anyone of the tapping to the atmosphere, upstream and downstream transmitter. Flow in the pipeline
which was connected to the DPT. The water flow (input), in is controlled by means of ball valve at the inlet of the
the pipeline, can be modified by opening and closing the experimental setup.
ball valve manually in appropriate ways. The opening
produces a variation of flow and pressure that is recorded by When leakage occurs around time 120s, both the flow
the DPT as an electrical signal that is processed by the and pressure will descend as shown in the figures 4 and 5
computer, in which, the LabVIEW and MATLAB software respectively.
are installed. The figure 1 and 2 shows the upstream and X(k+1) = Ad X(k) + Bd u(k) + Kd w(k)
downstream end of the experimental setup. y(k) = Cd X (k) + v(k)
Operational field measurements are the intake and
Where, X(k)= [x(k) ; xleak(k)]
outbound mass flow as well as the pressures at both the ends
of pipeline. In this experiment, consider a cylindrical Ad = [F 0 ; 0 1]
pipeline with a diameter of d= .0762m and an equivalent Bd = [G ; 0]
length of L= 9.4676m. The upstream orifice and Cd = [ H 1]
downstream orifice are considered as the pipeline intake
node and outbound node, respectively.
2000 To measure state variable ), inputs are
Upstream flow
1900
Downstream flow
upstream flow and measured upstream pressure and
1800 downstream flow as output for the above state space model.
1700

1600

1500

1400

1300

1200

1100
0 50 100 150 200 250

Fig. 4. Upstream and downstream flow

5
x 10
1.4
Upstream pressure
1.35 Downstream pressure
Fig.7. Leak detection signal using upstream pressure
1.3
To measure the refernce signal, inputs are upstream
1.25
flow and calculated downstream pressure and downstream
1.2 flow as output for the following state space model.
1.15 A = [.50515 0 ; 0 1]
1.1 B = [3.032 -0.0010432 ; 0 0]
C = [0.16431 1]
1.05 D = [0 0; 0 0]
1 X(0) = [7.3928; 0]
0 50 100 150 200 250
0.03
Fig. 5. Upstream and downstream pressure
0.02

IV. RESULTS AND DISCUSSIONS 0.01

0
A. Leak detection
-0.01
To measure the refernce signal, inputs are upstream
-0.02
flow and calculated upstream pressure and downstream flow
as output for the following state space model. -0.03

A = [.50585 0 ; 0 1] -0.04
B = [2.403 -.00046166 ; 0 0] -0.05
0 50 100 150 200 250
C = [.20702 1]
Fig. 8. Kalman filter leakage estimate using downstream pressure
D = [0 ; 0]
X(0) = [5.8675; 0] To measure state variable ), inputs are
0.03 upstream flow and measured downstream pressure and
downstream flow as output for the above state space model.
0.02
0.05
0.01
Threshold
0 0.04

-0.01
0.03
-0.02
0.02
-0.03

-0.04 0.01

-0.05
0 50 100 150 200 250
0
Fig. 6. Kalman filter leakage estimate and using
0 50 100 150 200 250
upstream pressure
Fig. 9. Leak detection signal using downstream pressure
-3
6
x 10 Data obtained from figure 11:
Threshold = 5.3863*10-4
4
= 123.6298 s
2 Data obtained from figure 13:
Threshold = 5.44*10-4
0
= 123.644 s
-2

-4
B. Calculation of propagation velocity of pipe
-6
K =
2.15* Pa
-8 ρ =
1000 Kg/
0 50 100 150 200 250
Fig. 10. Leak localisation signal using upstream pressure E =
54* Pa
by KF method D =
0.0762m
2
x 10
-3
e =
0.003 m
µ 0.211(Poisson’s ratio)
=
1.5
Threshold D 2e(1+μ)
C = +(1-μ 2 )+ =2.0133
D+e D
1
K
0.5
ρ
a=
K D
1+ C
0 E e
2.15  109
-0.5 1000
a
2.15 109 0.0762
-1 1   2.0133
0 50 100 150 200 250 54 109 0.003
Fig. 11. Leak localisation signal using upstream pressure
by DKF method a = 441 m/s
-3
x 10
6
Where, K is the Liquid coefficient of volume-elasticity, ρ is
4 the Liquid density, µ is the Poisson’s ratio, e is the Pipe
2
wall thickness, D is the Pipeline diameter, C is the
Correction coefficient related to constraint conditions of the
0 pipeline, E is the Modulus of elasticity of pipeline materials.
-2
C. Leakage position calculation
-4
For KF method
-6
L = 9.4676 m
-8
0 50 100 150 200 250 a = 441 m/s
Fig. 12. Leak localisation signal using downstream pressure by
KF method = 125.7345 s

x 10
-3 = 125.7477 s
2
Δt = -
1.5
Threshold
= 0.0132 s
1
Leak location = [L-(a*Δt)]/2 = 1.8184 m
0.5
For DKF method
0 Δt = - = 0.0142

L  a  Δt
-0.5
X 
-1
0 50 100 150 200 250
2
Fig. 13. Leak localisation signal using downstream pressure by
DKF method
= 9.4676  441 * .0142
[4] Paulo Lopes dos Santos, T-P Azevedo-Perdico´ulis, Jos´e A. Ramos,
J. L. Martins de Carvalho, G. Jank and J. Milhinhos “An LPV
2 modeling and identification approach to leakage detection in high
pressure natural gas transportation networks”, in proceedings of IEEE
X = m Transactions On Control Systems Technology, Vol. 19, No. 1,
January 2011.
[5] Didia Covas, “Standing wave difference method for leak detection”,
Theoretically ∆t should be 0.0139 s. DOI:10.106,ASCE journal,2005.
[6] Baptista H, Wagner G, Bernhard W., “Hydraulic model based gas
Xactual = 1.66 m leak detection and location”, in the Seventh global congress on
information and communication technology in energy, 2005.
[7] Benkherouf A, Allidina AY, “Leak detection and location in gas
D. Result pipelines” ,IEEE Proc 1988;135:142–8.
[8] Liu M, Zang S, Zhou D, ”Fast leak detection and location of gas
The results for the location of leaks for both pipelines based on an adaptive particle filter, “International Journal
Kalman filter and Differential Kalman filter method are as Application in Maths and Computer Science, 2005;15:541–50.
tabulated below: [9] Lopes dos Santos P, Perdicoúlis TPA, Jank G, Ramos JA, Martins de
Carvalho JL, Milhinhos J, “Gas pipelines LPV modelling and
Table 6.1: Leak position obtained using Kalman filter and Differential identification for leakage detection”, in American Control Conference
Kalman filter – ACC2010. Baltimore, Maryland, USA, 2010.
[10] Lopes dos Santos P, Ramos JA, Martins de Carvalho JL,
Actual Leak Leak Position Leak Position using “Identification of linear parameter varying systems using an iterative
Position using KF DKF deterministic-stochastic subspace approach”, in the European Control
(cm) (cm) (cm) Conference ECC-2007, Kos, Greece. p.4867–873.
[11] Lopes dos Santos P, Ramos JA, Martins de Carvalho JL,
166 181.84 160.27 “Identification of LPV systems using successive approximations” ,in
the 47th IEEE conference on decision and control, Cancun, Mexico.
p. 4509–515.
291 308.70 299.36 [12] Lopes dos Santos P, Azevedo Perdicoúlis T-P, Ramos JA, Martins de
Carvalho JM, Jank G, Milhinhos J, “An LPV modelling and
identification approach to leakage detection in high pressure natural
510 539.21 521.12 gas transportation networks”, IEEE Control Systems 2011;19:77–92.
[Special Issue on Applied LPV Modeling and Identification].
[13] Dos Santos PL, Perdicoúlis T-PA, Jank G, Ramos JA, Martins de
Carvalho JL, Milhinhos J, ”Modelling a leakage in a high pressure
gas network using a quadripole approach”, in the 10th Simone
Congress, Constance, Germany, 2010.
V. CONCLUSION [14] Dos Santos PL, Perdicoúlis T-PA, Jank G, Ramos JA, de Carvalho M,
“A quadripole approach to gas networks modelling. In: Nineth
The pipeline leak detection system developed by portuguese conference on automatic control”, Controlo2010,
LabVIEW and MATLAB, processes flow and pressure data Coimbra, Portugal.
[15] Dos Santos PL, Perdicoúlis TPA, Jank G, Ramos JA, Martins de
by Kalman filter, provides leak detection and location
Carvalho JL, “Derivation of a Transfer Function model for a high
results. Two identical detectors are run simultaneously. One pressure pipeline”.
considers the input signal as the upstream pressure and
another as the downstream pressure. When these two
detectors run simultaneously a location procedure becomes
possible, since the leak location is a linear function of the
difference between the time instants the leak is perceived at
the pipe endpoints. Based on this fact, an interactive
methodology for leakage location has also been presented.
The method is capable of locating one leak within a segment
of a transmission line and best suited for long transmission
lines.

REFERENCES
[1] P. Lopes dos Santos, T.P. Azeved Perdicoúlis, G. Jank, J.A. Ramos,
J.L. Martins de Carvalho, “Leakage detection and location in gas
pipelines through an LPV identification approach” in the proceedings
of ELSEVIER, 2011.
[2] Zhao Yang1, Mingliang Liu, Min Shao, Yingjie Ji, “Research on
leakage detection and analysis of leakage point in the gas pipeline
system”, in proceedings of Open Journal of Safety Science and
Technology, 2011, 1, 94-100 .
[3] P. Van Overschee and B. De Moor, “Subspace identification for
linear systems: Theory-Implementation-Applications”, Kluwer
Academic Publishers, 1996.

You might also like