You are on page 1of 7

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
between the time instants the leak is perceived at the pipe
stationary stochastic process with a variance proportional to
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 pressure. The two different input signals lead to two
to detect at what time instants these pressure waves reach different leakage detectors, where each one runs two
the pipeline ends. So, to include leak location in the instances of this Kalman filter; the first instance uses the
approach, two detectors are needed, one at each end of the calculated pressure as the scheduling signal and the second
pipeline. For each detector, the linepack scheduling signal uses the measured pressure. Since the first filter uses the
used in [12] is replaced by the pressure: the intake pressure calculated pressure it can never detect a leakage. Instead, it
for the intake detector and the offtake pressure for an works as a reference signal. This filter leakage state is
another. continuously compared with the corresponding state of the
second filter, the one that uses the measured pressure as the
Through this paper, a case study was used to present the
input signal. When there is no leakage, these states remain
leak detection and location method. In this case study, a
close to each other, but when a leakage occurs their
leakage was detected in a pipeline 10 m long, where the leak
difference takes the leakage value. In what follows, it can be
happens in an intermediate point. Since massflow are set at
seen, this method is very fast and accurate and also well
both ends of the pipeline, the leakage is detected using only
suited to detect small leakages.
pressure variations. Due to the length of the pipeline, the
pressure variations were negligible during the leakage At first, describe the leakage detector whose input
detection time interval. That is, the leakage was detected signal is the intake pressure. The other leakage detector, i.e.
using only the massflow variation. the one that uses the downstream pressure as the input
signal is identical in every detail except for the chosen input
Section 2 deals with the proposed methodology. Section signal. Given that the leakage does not appear in this
3 gives the detail about experimental setup and data equation and the pressure solely depends on the
collection technique. Section 4 presents the results and intake/outbound mass flow rates, the calculated pressure
discussions. Section 5 gives the conclusion. signal always considers that there is no leakage in the
pipeline. As a result, one should use this Kalman filter
II. METHODOLOGY USED ref
leakage estimate as a reference signal denoted as ^x leak ( k ) .
A. Implementation of Kalman filter In parallel, one must run another instance of this
A method that uses a Kalman filter, built from an Kalman filter using a input signal generated from the
identified first order model, is described next. Thus, measured intake pressure. This Kalman filter leakage
consider: estimate is de-noted by ^x leak(k). In the absence of leakage,
xleak(k+1) = xleak(k) + eleak(k) (1) both leakage estimates should be equal to zero. But, when a
ref
x(k+1) = Adx(k) + Bdu(k) + Ke(k) (2) leakage occurs ^x leak (k) remains zero and ^x leak ( k ) takes the
y(k) = xleak(k) + Cdx(k) + e(k) (3) value of leakage.As such, the signal
~
x leak ( k )=^x leak ( k ) (KF method) (4)
This model has an additional state that is supposed to
remain close to zero when there is no leakage. x leak(k) is the ~ ref
x ( k )= ^x ( k ) − ^x (k ) (DKF method) (5)
leak leak leak
leakage detection signal and should be different from zero
only in case of leakage. is leak sensitive and will be used to detect leakages. ~
x leak ( k )
has an expected value of μ and a standard deviation σ.
Priori estimate

[ ]
x (k −1/k −1) Calculation of the upper and lower bound of threshold
X(k/k-1) = Ad*
xleak(k−1 /k−1)
+Bd *u(k-1) is based on the values of~
x leak ( k ).
Tupper = μ+ 3σ (6)
P(k/k-1) = Ad*P(k-1|k-1)*Ad' +
[ ]
Q 0
0 L
Tlower = μ- 3σ
where, μ is the mean of the augmented state of Kalman
(7)

Kalman gain filter, σ is the standard deviation of the augmented state of


K = P(k/k-1) * Cd'/(Cd*P(k/k-1)*Cd' + R) Kalman filter.

Update(posteriori estimate) A leakage is detected when this signal leaves the


interval defined by these detection thresholds. This leads to
X(k/k) = X(k/k-1) + K * ( y(k/k-1) - Cd * x(k/k-1))
the arrival of two time values namely t leaki andt leako .
P(k/k) = P(k/k-1) - K*Cd*P(k/k-1)
B. Leakage positioning
When a leakage occurs it should take the leakage
value. From this idea, a differential Kalman filter based The figure 1 shows the pipeline of length L and leak
method was derived. This method consists in using two position at distance X from upstream end. The leak
detectors but the input signals are now first the calculated detection signals are smooth before the leakage is detected
intake pressure and second the calculated downstream and a sudden change occurs with the signal becoming more
variable once the leakage is perceived. The idea is to use of pipeline. In this experiment, consider a cylindrical
this variation to estimatet leaki andt leako . This sudden change pipeline with a diameter of d= .0762m and an equivalent
causes a pulse at each differential signal is determined by length of L= 9.4676m. The upstream orifice and
using the formula, downstream orifice are considered as the pipeline intake
node and outbound node, respectively.
δ~x i(k)= ~
x i(k) - ~
x i(k-1) (8) System realization process is making software based on
δ x o(k)= x o(k) - ~
~ ~ x o(k-1) (9) LabVIEW, acquiring flow at two ends of the pipeline by
data acquisition board, using wavelet transform to filter
noise, detecting catastrophe point of real-time acquisition
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
X
t leak = (10)
i
a
L−X
t leak = (11) Fig. 2. Upstream end of experimental setup
o
a
where, a 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.
L−( a∗∆ t )
X=
2
(12)
where, ∆ t 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 B. Real-time acquisition of flow and pressure


The pump is used to supply water to the overhead tank. The figure 4 shows the flow signal recorded from the
The leakage is created at a particular location between two upstream and downstream transmitter. Flow in the pipeline
sensors by opening anyone of the tapping to the atmosphere, is controlled by means of ball valve at the inlet of the
which was connected to the DPT. The water flow (input), in experimental setup.
the pipeline, can be modified by opening and closing the When leakage occurs around time 120s, both the flow
ball valve manually in appropriate ways. The opening and pressure will descend as shown in the figures 4 and 5
produces a variation of flow and pressure that is recorded by respectively.
the DPT as an electrical signal that is processed by the
X(k+1) = Ad X(k) + Bd u(k) + Kd w(k)
computer, in which, the LabVIEW and MATLAB software
are installed. The figure 1 and 2 shows the upstream and y(k) = Cd X (k) + v(k)
downstream end of the experimental setup.
Where, X(k)= [x(k) ; xleak(k)]
Operational field measurements are the intake and Ad = [F 0 ; 0 1]
outbound mass flow as well as the pressures at both the ends
Bd = [G ; 0] ^x leak (k) and ^x ref
Fig. 6. Kalman filter leakage estimate
i leak ( k ) using
Cd = [ H 1] upstream pressure
i

2000

To measure state variable ^x leaki ¿), inputs are upstream


Upstream flow
1900
Downstream flow
1800 flow and measured upstream pressure and downstream flow
1700
as output for the above state space model.
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

1.3 Fig.7. Leak detection signal ~


x leak ( k ) using upstream pressure
i

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

IV. RESULTS AND DISCUSSIONS 0.02

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

A = [.50585 0 ; 0 1] -0.03

B = [2.403 -.00046166 ; 0 0] -0.04


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

-0.01

-0.02

-0.03

-0.04

-0.05
0 50 100 150 200 250
ref
0.05
Fig. 12. Leak localisation signal δ x^ leak (k ) using downstream pressure
o
Threshold by KF method
0.04
-3
x 10
2
0.03

1.5
0.02 Threshold

1
0.01
0.5

0
0
0 50 100 150 200 250
-0.5
Fig. 9. Leak detection signal ^x leak (k )using downstream
o
pressure -1
0 50 100 150 200 250
ref
6
x 10
-3
Fig. 13. Leak localisation signal δ x^ leak o (k ) using downstream pressure
by DKF method
4

2
Data obtained from figure 11:
Threshold = 5.3863*10-4
0
t leaki = 123.6298 s
-2 Data obtained from figure 13:
-4
Threshold = 5.44*10-4
t leako = 123.644 s
-6

-8
0 50 100 150 200 250 B. Calculation of propagation velocity of pipe
Fig. 10. Leak localisation signal δ ~
x leak ( k ) using upstream
pressure by KF method
i
K = 2.15*109 Pa
ρ = 1000 Kg/m 3
-3
x 10
2

Threshold
E = 54*109 Pa
1.5
D = 0.0762m
1 e = 0.003 m
µ = 0.211(Poisson’s ratio)
0.5

-0.5

-1
0 50 100 150 200 250

Fig. 11. Leak localisation signal δ ~


x leak (k ) using upstream
i
pressure by DKF method
-3
x 10
6

2 a = 441 m/s

-2
Liquid coefficient of volume-elasticity, ρ is
-4 Where, K is the
the Liquid density, µ is the Poisson’s ratio, e is the Pipe
-6 wall thickness, D is the Pipeline diameter, C is the
-8
Correction coefficient related to constraint conditions of the
0 50 100 150 200 250
pipeline, E is the Modulus of elasticity of pipeline materials.
C. Leakage position calculation considers the input signal as the upstream pressure and
another as the downstream pressure. When these two
For KF method detectors run simultaneously a location procedure becomes
L = 9.4676 m possible, since the leak location is a linear function of the
difference between the time instants the leak is perceived at
a = 441 m/s the pipe endpoints. Based on this fact, an interactive
t leak = 125.7345 s methodology for leakage location has also been presented.
i
The method is capable of locating one leak within a segment
t leak = 125.7477 s of a transmission line and best suited for long transmission
o
lines.
Δt = t leak - t leak
o i

= 0.0132 s REFERENCES
Leak location = [L-(a*Δt)]/2 = 1.8184 m [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
For DKF method pipelines through an LPV identification approach” in the proceedings
of ELSEVIER, 2011.
Δt = t leako -t leaki = 0.0142 [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.
9. 4676−441∗. 0142 [4] Paulo Lopes dos Santos, T-P Azevedo-Perdico´ulis, Jos´e A. Ramos,
= 2 J. L. Martins de Carvalho, G. Jank and J. Milhinhos “An LPV
modeling and identification approach to leakage detection in high
pressure natural gas transportation networks”, in proceedings of IEEE
X = 1.6027 m Transactions On Control Systems Technology, Vol. 19, No. 1,
January 2011.
Theoretically ∆t should be 0.0139 s. [5] Didia Covas, “Standing wave difference method for leak detection”,
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.
D. Result [7] Benkherouf A, Allidina AY, “Leak detection and location in gas
pipelines” ,IEEE Proc 1988;135:142–8.
The results for the location of leaks for both [8] Liu M, Zang S, Zhou D, ”Fast leak detection and location of gas
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
V. CONCLUSION Congress, Constance, Germany, 2010.
[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.
by Kalman filter, provides leak detection and location
results. Two identical detectors are run simultaneously. One
[15] Dos Santos PL, Perdicoúlis TPA, Jank G, Ramos JA, Martins de
Carvalho JL, “Derivation of a Transfer Function model for a high
pressure pipeline”.

You might also like