Sunteți pe pagina 1din 10

Int. J. Appl. Math. Comput. Sci., 2005, Vol. 15, No.

4, 541–550

FAST LEAK DETECTION AND LOCATION OF GAS PIPELINES BASED


ON AN ADAPTIVE PARTICLE FILTER

M ING LIU∗ , S HU ZANG∗, ∗∗ , D ONGHUA ZHOU∗



Department of Automation, Tsinghua University
Beijing 100084, China
e-mail: liuming99@mails.tsinghua.edu.cn; zdh@mail.tsinghua.edu.cn
∗∗
Zhen Jiang Watercraft College
Zhenjiang 212003, China
e-mail: zangshu@tsinghua.org.cn

Leak detection and location play an important role in the management of a pipeline system. Some model-based methods,
such as those based on the extended Kalman filter (EKF) or based on the strong tracking filter (STF), have been presented
to solve this problem. But these methods need the nonlinear pipeline model to be linearized. Unfortunately, linearized
transformations are only reliable if error propagation can be well approximated by a linear function, and this condition does
not hold for a gas pipeline model. This will deteriorate the speed and accuracy of the detection and location. Particle filters
are sequential Monte Carlo methods based on point mass (or “particle”) representations of probability densities, which can
be applied to estimate states in nonlinear and non-Gaussian systems without linearization. Parameter estimation methods are
widely used in fault detection and diagnosis (FDD), and have been applied to pipeline leak detection and location. However,
the standard particle filter algorithm is not applicable to time-varying parameter estimation. To solve this problem, artificial
noise has to be added to the parameters, but its variance is difficult to determine. In this paper, we propose an adaptive
particle filter algorithm, in which the variance of the artificial noise can be adjusted adaptively. This method is applied to
leak detection and location of gas pipelines. Simulation results show that fast and accurate leak detection and location can
be achieved using this improved particle filter.

Keywords: gas pipeline, leak detection and location, particle filter

1. Introduction at levels substantially higher than the background noise,


this technology will be useless (Sivathau, 2003).
Pipelines are principal devices for natural gas transporta- Optical monitoring methods can be classified as ei-
tion, and lots of large scale pipeline networks have been ther passive or active (Reichardt et al., 1999). Active
constructed in many countries in the past 40 years. How- methods involve the illumination of the area above the
ever, leaks, which are the main faults of gas pipelines, pipeline with a radiation source, usually a laser or a broad
can cause serious problems related not only to the envi- band source. Then the absorption or scattering caused by
ronment but also to economy. Therefore, many methods gas molecules above the surface is monitored using an ar-
and techniques for leak detection with various applicabil- ray of sensors at specific wavelengths (Ikuta et al., 1999;
ity and restrictions have been proposed to prevent further Iseki et al., 2000; Spaeth and O’Brien, 2003). In con-
loss and danger (Muhlbauer, 2004). The primary meth- trast to active methods, passive methods do not require a
ods include acoustic monitoring, optical monitoring, gas source. They detect the radiation emitted by the natural
sampling, soil monitoring, flow monitoring, magnetic flux gas, or the background radiation serves directly. Optical
leakage, and dynamic model-based methods. monitoring techniques can be used for moving vehicles,
Acoustic monitoring techniques utilize acoustic de- aircraft, portable systems, or on site, and are able to mon-
tectors to detect the wave of noise which will be gener- itor the pipeline over an extended range. Moreover, they
ated as the gas escapes from the pipeline (Brodetsky and have high spatial resolution and sensitivity under specific
Savic, 1993; Hough, 1988; Klein, 1993). This kind of conditions. But for most of these optical methods, the im-
methods is simple and accurate, and can detect relatively plementation cost is high. A high false alarm rate is an-
small leaks. However, a large number of acoustic sensors other disadvantage.
along the pipeline are required, which will increase the Sampling methods are mostly used to detect hydro-
cost. If the leaks are too small to produce acoustic signals carbon gas leaks (Sperl, 1991). The sampling can be done
542 M. Liu et al.

by carrying a flame ionization detector along a pipeline or Dynamic model-based methods attempt to mathe-
using a sensor tube buried in parallel to the pipeline. Very matically model the gas flow within a pipeline. Using this
tiny leaks can be detected using these methods. But the model, flow parameters are calculated at different sections
response time is usually from several hours to days, and of the pipeline, and these parameters are measured as well.
the cost of monitoring long pipelines is very high. Then leaks can be detected by comparing the calculated
and measured parameters. Billmann and Isermann (1987)
A small amount of a tracer chemical is injected into
used a nonlinear state observer and a special correlation
the pipeline using soil monitoring methods. If a leak
technique for leak detection and location. Shields et al.
occurs, this tracer chemical will seep out of the pipe,
(2001) further considered the disturbance (noise and mod-
which can be detected by dragging an instrument along
eling errors) in a pipeline model. Based on this model, a
the surface above the pipeline (Tracer Research Corpora-
disturbance decoupled nonlinear fault detection observer
tion, 2003). The sensitivity of this method is high, while
was proposed. By discretizing the pipeline model with
the false alarm rate is very low. However, the method does
nonuniform regions along the line, Verde (2005) proposed
not function for exposed pipelines, and it is very expen-
an accommodation scheme to tackle the multi-leak detec-
sive because the trace chemical needs to be added to the
tion and location problem. But this method cannot esti-
gas continuously.
mate the leak size. Benkherouf and Allidina (1988) pre-
Flow monitoring methods rely on pressure and/or sented a pipeline model with a leak, and used the EKF to
flow signals at different sections of a pipeline, mostly estimate the leak parameters as augmented state variables.
only the extremes. When the pipeline operates normally, Based on the same model, Zhao and Zhou (2001) used an
there are some steady relationships among these signals. STF (Zhou and Frank, 1996) to detect and locate leaks,
Changes in these relationships will indicate the occur- and the detection speed was faster. By considering a ther-
rence of leaks. Volume balance is the most straightfor- mal model, Tiang (1997) presented a more accurate leak
ward flow monitoring method. A leak alarm will be gen- location method.
erated when the difference between upstream and down- The particle filter (PF), based on a Monte-Carlo tech-
stream flow measurements changes by more than an es- nique, was first proposed by Gordon (Gordon et al., 1993).
tablished tolerance (Ellul, 1989; Furness, 1985). But be- Thereafter, a number of alternative PF algorithms have
cause of the inherent flow dynamics and the superimposed been proposed. The PF uses sequential Monte-Carlo
noise, only relatively large leaks, which exceed about 10% methods to approximate the optimal filtering by represent-
for gas pipelines, can be detected. Fukuda and Mitsuoka ing the probability density function (PDF) with a swarm
(1983), and Wang et al. (1993), respectively, formulated of particles. Because the PF is able to handle any func-
the pressure gradients by using the autoregressive (AR) tional nonlinearity and system or measurement noise of
model, and then they used the AIC and Kullback informa- any probability distribution, it has attracted much atten-
tion to detect leaks. Chernick and Wincelberg (1985) ap- tion in the nonlinear non-Gaussian state estimation field
plied the autoregressive moving-average (ARMA) model (Bolviken et al., 2001; Doucet et al., 2000; Kitagawa,
with the “variate difference method” to the pressure. Us- 1996).
ing this model, some improvement in the leak detection Leak detection and location are a significant indus-
capability could be achieved. Considering the fact that the trial application of FDD (Kowalczuk and Gunawickrama,
inlet flow rate measurements are unavailable and the con- 2004), and have been an active research area over the last
ventional mass balance techniques cannot be used, Dinis two decades (Gertler, 1998; Korbicz et al., 2004; Patton et
et al. (1999) presented a statistical method to detect leaks al., 2000). Analytical model based FDD is a class of the
in subsea liquid pipelines. But this method has not been most important approaches. In these approaches, filters
tested in gas pipelines. are widely used, such as the Kalman Filter (KF), the EKF,
The magnetic flux leakage method periodically in- and the STF. Based on the state estimation ability of the
spects the pipeline for damages using the device called PF, Kadirkamanathan et al. (2000) first used it in FDD.
‘pig’, which is launched at the inlet and retrieved at the In order to estimate a fault, they introduced random walk
outlet. The pig is a magnetizer-sensor assembly. It em- noise to the fault parameters treated as augmented states.
ploys the magnetic flux leakage (MFL) technique for as- But because the noise signals are not adaptive, the estima-
sessing the condition of the pipe (Afzal and Udpa, 2002). tion is not very accurate. Then Li and Kadirkamanathan
This method can detect pits as shallow as 5–10% of the (2001) proposed a PF based likelihood ratio approach to
pipe wall thickness. The leak location is also very ac- fault diagnosis. This approach can detect faults in time,
curate using this method. But it is functional only for a and identify them correctly. However, it cannot estimate
seamless gas pipeline, and the pipeline cannot be detected their sizes.
continuously. Moreover, because a pig is needed to put In this paper, a new model based approach to leak
into the pipeline, jams may occur. detection and location of gas pipelines with the use of an
Fast leak detection and location of gas pipelines based on an adaptive particle filter 543

adaptive particle filter (APF) is proposed. For the nonlin- for x = xK . Hence, Eqn. (1) for x = xk , and Eqns. (2)–
earity of a gas pipeline system, the PF is more efficient (5) represent an approximate model for the leaking gas
than the EKF. In order to estimate the leakage, the state pipeline (Benkherouf and Allidina, 1988).
augmentation technique is used, and artificial dynamics
of the leak parameters are introduced to track the leak dy-
namics. Then if the augmented system is observable, the 3. Adaptive Particle Filter Based Leak
parameter estimation problem has a solution. However, Detection and Location Scheme
the variances of the artificial dynamic disturbances will
closely relate to the detection speed and accuracy, and 3.1. Adaptive Particle Filter
a satisfying estimation result cannot be obtained by us-
Consider a class of discrete-time nonlinear systems of the
ing invariant variances. Thus, a variance-adaptive method
form
based PF is proposed to achieve fast and accurate leak de-
tection and location. Computer simulation results illus- xk+1 = f (xk , uk , θk ) + wk , (6)
trate the effectiveness of the proposed approach.
yk+1 = h (xk+1 ) + vk+1 , (7)

2. Mathematical Model of a Gas Pipeline where xk ∈ Rn is the state, uk ∈ Rp stands for the in-
put, yk ∈ Rm means the output, θk ∈ Rl signifies the
Neglecting viscous and turbulent effects of the flow, and fault parameter vector, f : Rp × Rn → Rn is the state
assuming that the temperature changes within the gas transition function, and h : Rn → Rm is the measure-
and heat exchanges with the surroundings of the pipeline ment function. The process noise wk ∈ Rn is zero mean,
are negligible, a one-dimensional isothermal gas pipeline and independent of past and current states. The measure-
model can be derived as follows (Billmann, 1982): ment noise vk ∈ Rm is zero mean and independent of the
∂p c2 ∂q past and current states and the process noise. Here θk is
+ = 0, (1) the unknown fault parameter vector to be estimated. Us-
∂t A ∂x
ing the state augmentation technique, a new state vector
∂q ∂p λc2 q |q| can be defined:  
+A + = 0, (2)
∂t ∂x 2DA p xk
zk := .
where p [Pascal] is the pressure, q [Kg/s] is the mass flow θk
rate, p and q are functions of time t [s] and distance Because {θk } is not ergodic, θk cannot be tracked in the
x [m], c [m/s] is the isothermal speed of sound in gases, PF algorithm. Therefore, in order to track the dynamics
A [m2 ] is the pipeline cross-section, D [m] is the pipeline of θk , an artificial dynamic noise vector is added to the
diameter, λ [–] is the friction coefficient. model of the unknown parameter θk :
This model is composed of two differential equa-
tions, and they form a nonlinear distributed parameter sys- θk+1 = θk + wkθ , (8)
tem of the hyperbolic type. Suitable boundary and initial
conditions of this system can be chosen as follows: where wkθ is the parameter noise. Then the augmented
⎧ system and measurement functions are respectively de-
⎨ p (0, t) = fp (t), fined as
(3)
⎩ q (L, t) = f (t), zk+1 = fe (zk , uk ) + w̃k ,
q

and ⎧ yk+1 = he (zk+1 ) + vk+1 ,


⎨ p (x, 0) = p0 (x),
(4) where w̃k = [wkT (wkθ )T ]T . Because wkθ is artificial, its
⎩ q (x, 0) = q (x), statistical properties need to be determined. In this pa-
0
per, we assume that wkθ is a zero-mean Gaussian white
where L [m] is the pipe length. If a leak K [kg/s] occurs
noise process, so only its variance needs to be determined.
at x = xK , Eqns. (1) and (2) are still valid for all x ∈
Obviously, if the variance of wkθ is too large, the estima-
[0, xK ) ∪ (xK , L]. Owing to mass conservation, we can
tion of θk will be inaccurate; if the variance is too small,
get the following equation at x = xK :
abrupt parameter changes cannot be tracked (this is illus-
   + 
q x− trated by a simulation in Section 4). So we have to have
K , t − q xK , t = K. (5)
the variance determined adaptively. Zhou et al. (1991)
We assume that the leak introduces a negligible mo- presented a strong tracking filter (STF) by adaptively ad-
mentum in the x direction, so that Eqn. (2) is unaffected justing the predicted state error covariance according to
544 M. Liu et al.

the covariance of residuals. Similarly, we propose an where ȳj+1|j is the mean value of the predicted output
adaptive approach to determine the variance of wkθ ac- vector. If the augmented measurement function is linear,
cording to the covariance of residuals, ensuring that both i.e., yk+1 = He zk+1 + vk+1 , He ∈ Rm×n , and the mea-
the estimation accuracy and the parameter tracking speed surement noise is Gaussian with the covariance R, Mk+1
are improved. can be calculated using the following formulae:
First, a vector of artificial zero-mean Gaussian white
noise signals wkθ is selected, whose variances are small Mk+1 = He Pk+1|k HeT + R, (15)
and invariant. If we replace wkθ in (8) by λk wkθ , then only Ns   T
λk has to be determined. In the STF, a suboptimal fading 1  i i
Pk+1|k = zk+1|k − z̄k+1|k zk+1|k − z̄k+1|k , (16)
factor is introduced to track the time-varying states or pa- Ns i=1
rameters. This factor is adjusted according to the covari-
Ns
ance of residuals. When the accuracy of state prediction 1 
is reduced, the factor will become larger. This property is z̄k+1|k = zi , (17)
Ns i=1 k+1|k
just what we want for λk . So, similarly, we adjust λk as
follows: where Pk+1|k is the covariance of the state prediction er-
tr [Vk+1 ] ror, zk+1|k is the predicted state vector, z̄k+1|k is the
λ0 = , (9) mean value of the predicted state vector.
tr [Mk+1 ]
Let Dk denote the available measurement informa-
λ0 if λ0 > 1, tion at the time k:
λk = (10)
1 if λ0 ≤ 1,
Dk = {yi |i = 1, . . . , k} .
where Vk+1 is the covariance of the actual residual, and
Mk+1 is the covariance of the theoretical residual. Vk+1 The APF algorithm is detailed as follows:
is unknown. However, it can be roughly approximated by

i i
Step 1: Initialization
Vk+1 = E γk+1 (γk+1 )T
⎧ Augment the state vector with the unknown fault parame-

⎪ 1 Ns
ters:

⎪ γ j (γ j )T if k = 0,  
⎨Ns j=1 1 1 xk
=   zk := .
⎪ 1 Ns j j T θk

⎪ ρV k + γ (γ
j=1 k+1 k+1 )


Ns
if k ≥ 1,
1+ρ The system and measurement functions of the augmented
(11) system
 i are fe and he , respectively. Sample Ns particles
z0 , i = 1, . . . , Ns from the supposed PDF p (z0 ).
i i
γk+1 = yk+1 − yk+1|k , (12)
Step 2: Prediction
where Ns is the number of particles, the superscripts i or  i 
j denote respectively the i-th or j-th particles, γk+1 is Sample
 θi Ns values
 wk , i = 1, . . . , Ns and
the residual vector, yk+1|k is the predicted output vector, wk , i = 1, . . . , Ns from the PDFs of wk and
yk+1 is the real output vector, and 0 ≤ ρ ≤ 1 is a forget- wkθ , respectively. Here wkθ is an artificial zero-mean
ting factor. Here ρ = 0 implies that Vk+1 has nothing to Gaussian white noise process, the variance of which is set
do with Vk . One often selects ρ = 0.95. We can use the to be invariant and small. Then compute
residual data in faultless conditions to get the experiental  
residual covariance as Mk+1 . If we have S steps of the xik+1|k = f xik , uk + wki ,
faultless regime, Mk+1 can be determined via i
θk+1|k = θki + wkθi ,
Mk+1 = M0  
i i
yk+1|k = he zk+1|k .
S−1 Ns   T
1  i i
= ȳj+1|j −yj+1|j ȳj+1|j −yj+1|j ,
SNs j=0 i=1 Step 3: Update
(13)
If the measurement function is nonlinear, Mk+1 can be
Ns calculated via (13) and (14). If the measurement function
1 
ȳj+1|j = i
yj+1|j , (14) is linear and the measurement noise is Gaussian with the
Ns j=1 covariance R, we can get Mk+1 by (15)–(17).
Fast leak detection and location of gas pipelines based on an adaptive particle filter 545

K ( xi , t ) K ( xi +1 , t )

q ( 0, t ) ( ) (
q xi− , t q xi+ , t ) ( ) (
q xi−+1 , t q xi++1 , t ) q ( N,t )

p ( 0, t ) p ( xi , t ) p ( xi +1 , t ) p( N,t )
Δx

Fig. 1. Nodal representation of a pipeline.

Obtain λk by (9)–(12), and determine sections with N + 1 nodes as shown in Fig. 1. Then the
i DTDS model can be obtained using the method of charac-
θ̃k+1|k = θki + λk wkθi ,
teristics (Wylie and Streeter, 1993):
⎡ ⎤
xik+1|k c − +
(pi,j − pi−1,j−1 ) + (qi,j − qi−1,j−1 )
i
z̃k+1|k =⎣ ⎦, A
i
θ̃k+1|k  − − + +

λc3 Δt qi,j |qi,j | qi−1,j−1 |qi−1,j−1 |
i
+ + = 0,
p(yk+1 |z̃k+1|k ) 4DA2 pi,j pi−1,j−1
i
ω = Ns j
p(yk+1 |z̃k+1|k ) (18)
j=1

i
pv (yk+1 − he (z̃k+1|k )) c + −
(pi,j − pi+1,j−1 ) − (qi,j − qi+1,j−1 )
= Ns j
. A
j=1 pv (yk+1 − he (z̃k+1|k ))  + + − −

λc3 Δt qi,j |qi,j | qi+1,j−1 |qi+1,j−1 |
We have − + = 0,
4DA2 pi,j pi+1,j−1
Ns
  
(19)
p̃ (zk+1 |Dk+1 ) = ω i δ zk+1 − z̃k+1|k
i
,
i=1
− +
where δ is the Dirac-delta function. qi,j − qi,j = Ki,j , (20)

Step 4: Resampling where pi,j = p(xi , tj ), qi,j = q(x− +
i , tj ), qi,j =
Resample independently Ns times from the q(x+i , tj ), Ki,j = K (xi , tj ), xi = (i − 1)Δx, tj = jΔt.
above discrete distribution. The resulting particles Here Δx is the length of one section and Δt is the sam-
i i j
{zk+1 , i = 1, . . . , Ns } satisfy Pr{zk+1 = z̃k+1|k } = pling interval, satisfying Δx/Δt = c. The upstream
ω j , j = 1, . . . , Ns . Then the PDF becomes boundary condition is p1,j = fp (tj ), and the downstream
Ns
boundary condition has the form qN, j = fq (tj ). More-
1   i
 over, Ki,j are modelled leaks, which are assumed to be
p (zk+1 |Dk+1 ) = δ zk+1 − zk+1 .
Ns i=1 constant, so that the model is augmented by
Then compute Ki,j = Ki,j−1 . (21)
Ns
i 1 
ẑk+1 = E[zk+1 ]= zi . The relationship between the actual leak
Ns i=1 k+1
(K(j), xK (j)) at the time step j and the modelled
Step 5: The prediction, update and resample steps form a leaks (Ki,j , xi ) are as follows (Benkherouf and Allidina,
single iteration and are recursively applied at each time k. 1988):
N
 −1
3.2. Leak Detection and Location Scheme K (j) = Ki,j , (22)
i=2
The pipeline model described in Section 2 is a Distributed
Parameter System (DPS). In order to use the APF to es- N
 −1
Ki,j xi
timate the leakage K and its location xK , a discrete- xK (j) = . (23)
K (j)
time/discrete-space (DTDS) model of the pipeline is re- i=2
quired. Consequently, the pipeline is first divided into N
546 M. Liu et al.

To apply the APF, we select the state variables as follows: where fq is the outlet mass flow rate. The leak is usually
small compared with fq , and therefore the second-order
 2 2 2 2
terms (K/fq ) , (K1 /fq ) , (K2 /fq ) , (K1 K2 /fq ) are
+ +
xj = p2,j , p3,j , · · · , pN,j , q1,j , q2,j ,
small compared with K/fq and (K1 xK1 + K2 xK2 )/fq .
T From (27) it follows that
+
· · · , qN −1,j , K2,j , K3,j , · · · , KN −1,j .
KxK ≈ K1 xK1 + K2 xK2 . (28)
This state vector has been augmented by Ki,j . Adding
process and measurement noise vectors to Eqns. (18)– Equation (23) can be derived from (28) (Benkherouf and
(21), we get Allidina, 1988). Consequently, we can evaluate the loca-
tion capability of this method by discussing the location
g (xj+1 , xj , uj , wj ) = 0, (24) accuracy of (28). If x̂K is the located leak position us-
yj+1 = He xj+1 + vj+1 , (25) ing (28), then we have the following result:

where Theorem 1. If there are two modelled leaks (K1 , xK1 )


T
uj = [fp (j) fq (j)] = [fp (tj ) fq (tj )] ,
T and (K2 , xK2 ), the upper bound of the location error is
 
and He is a matrix with elements being 0 or 1, to pro- 1 K
|xK2 − xK1 | .
vide the available measurements (in the simulation study 8 fq
in Section 4 we assume that pressure measurements at m
discrete points along the pipeline are available). Note that
Proof. From (27) we see that
the dimension of the state vector is n = 3N −4, and g (·)
consists of 3N − 4 equations. Furthermore, 2K1 fq xK1 + 2K2 fq xK2 + K12 xK1
xK =
wj = [w1,j , w2,j , · · · ,w3N −4,j ]
T 2Kfq + K 2

is the process noise vector, and K22 xK2 + 2K1 K2 xK1


+ . (29)
T
2Kfq + K 2
vj+1 = [v1,j+1 , v2,j+1 , · · · , vm,j+1 ]
From (28) it follows that
is the measurement noise vector. Then, based on (24)
and (25), we can use the APF to estimate xj , and ac- K1 xK1 + K2 xK2
x̂K = . (30)
cording to (22) the leak size can be estimated. Select a K
threshold ε for fault detection. When the leak estimate Then, from (29) and (30) we have
K̂ (j) > ε, calculate the leak location via (23).
K12 xK1 + K22 xK2 + 2K1 K2 xK1
|xK − x̂K | =
3.3. Evaluation of Leak Location Capability 2Kfq + K 2

A space discretization is introduced in the leak detection K1 KxK1 − K2 KxK2


− .
and location schemes mentioned above. Since all methods 2Kfq + K 2
with a space discretization have a leak position error, the
Applying (26) in the numerator, we obtain
sensitivity of our method has to be evaluated.
Since there are only two modelled leaks (K1 , xK1 ) K1 K2
|xK − x̂K | = |xK1 − xK2 | .
and (K2 , xK2 ), the following equations can be derived in 2Kfq + K 2
a steady state (Benkherouf and Allidina, 1988):
2
Because K1 K2 ≤ (K1 + K2 ) /4 = K 2 /4, we get
K = K1 + K2 , (26)
K2
|xK − x̂K | ≤ |xK1 − xK2 |
 2 8Kfq + 4K 2
KxK K  
2 + xK 1 K
fq fq < |xK1 − xK2 | , (31)
 2 8 fq
K1 xK1 + K2 xK2 K1
=2 + xK1
fq fq which is the desired claim.
 2
K2 K1 K2
+ xK2 + 2 2 xK1 , (27) Remark 1. Theorem 1 shows that the upper bound of
fq fq the location error is affected by two factors, K/fq and
Fast leak detection and location of gas pipelines based on an adaptive particle filter 547

|xK1 − xK2 |. As they become smaller, so does the upper The initial conditions are
bound, and the location becomes more accurate. The con-  T
clusion is reasonable. First, the smallness of K/fq con- x̂0 = p̂2,0 , p̂3,0 , p̂4,0 , q̂1,0 , q̂2,0 , q̂3,0 , k̂2,0 , k̂3,0 ,
stitutes the basis for deriving (28), and for a leak which is
not too large, this assumption is reasonable. Secondly, p̂2,0 = 94 bar, p̂3,0 = 87 bar, p̂4,0 = 80 bar,
|xK1 − xK2 | is the distance between two neighboring
sensors. Obviously, the closer the sensors, the smaller the q̂1,0 = q̂2,0 = q̂3,0 = 200 kg/s, k̂1,0 = k̂2,0 = 0 kg/s.
leak location error. Moreover, this conclusion can be eas-
The initial artificial noise is wjθ = [wj1 θ θ T
, wj2 ] ,
ily extended to n modelled leaks, that is, the leak loca- θ 2 θ 2
tion will be more accurate as K/fq is smaller or there are wj1 ∼ N (0, 0.05 ), wj2 ∼ N (0, 0.05 ). The forgetting
more sensors. factor is ρ = 0.95. The threshold for leak detection is
ε = 0.5 kg/s.

4. Simulation Results Case 1. The measurement and process noise signals are
both set to be Gaussian with covariance matrices
A pipeline simulator is used to model a noise-corrupted  
gas flow in a pipeline whose specification is (Benkherouf 2 σp2 I3 0
and Allidina, 1988) R = σm I3 , Q̃ = ,
0 σq2 I3
L = 90 km, D = 0.875 m, c = 300 m/s, λ = 0.02. 2
2
where σm = 106 Pa2 , σp2 = 104 Pa2 , σq2 = 1 (kg/s) .
Because the leak size estimate (22) and the leak location At the time t = 100 min a leakage of 3% (6 kg/s)
equation (23) are for the fluid in a steady state, we do not at 50 km from the upstream end of the pipeline is sud-
change the operation conditions. However, when the fluid denly introduced. The leak size and location are calcu-
is in a transient state, the method can also detect the leak, lated using (22) and (23), respectively. Simulation results
while its size and location cannot be estimated. with the APF are presented in Fig. 2. For comparison, we
The data used in the measurement simulator are as also present simulation results with the EKF in Fig. 3, and
follows: with a general PF in Fig. 4.
Δx = 10 km,
10
i.e., the pipe is divided into nine sections, boundary con- (a) estimated
8 real
ditions being constant,
leak size [kg/s]

6
7
P (0, t) = 100 bar = 10 Pa, Q (L, t) = 200 kg/s. 4

The data used in the APF are as follows: 0


0 100 200 300 400 500 600
Δx = 30 km, time [min]
80
(b) estimated
i.e., the pipe is divided into three sections, real
leak location [km]

60

40
Δt = x/c = 100 s,
20

+ + +
T
xj = p2,j , p3,j , p4,j , q1,j , q2,j , q3,j , K2,j , K3,j , 0

0 100 200 300 400 500 600


i.e., there are two modelled leaks, k2,j and k3,j , at 30 time [min]
and 60 km, respectively.
Fig. 2. Simulation results with the APF in Case 1:
Three pressure measurements at 30, 60, 90 km are (a) real leak size and its estimate, (b) real
generated for the filter (i.e., m = 3). Then the measure- leak location and its estimate.
ment function is linear,
⎡ ⎤ From Figs. 2 and 3, it is obvious that the tracking
1 0 0 0 0 0 0 0 of the APF is much faster than that of the EKF. The leak
⎢ ⎥
He = ⎣ 0 1 0 0 0 0 0 0 ⎦ . is detected by the APF at 110 min, only 10 minutes after
0 0 1 0 0 0 0 0 the leak occurs. The average estimated leak location us-
ing the APF is x = 49.7936 km with a relative error of
The boundary conditions are assumed to be known exactly 0.41%. Obviously, using the EKF, the detection time is
(100 bar and 200 kg/s). much longer, and the location error is much larger.
548 M. Liu et al.

10 10
(a) estimated (a) estimated
8 real 8 real
leak size [kg/s]

leak size [kg/s]


6 6
4 4

2 2

0 0
0 100 200 300 400 500 600 0 100 200 300 400 500 600
time [min] time [min]
80 80
(b) estimated (b) estimated
real real
leak location [km]

leak location [km]


60 60

40 40

20 20

0 0

0 100 200 300 400 500 600 0 100 200 300 400 500 600
time [min] time [min]

Fig. 3. Simulation results with the EKF in Case 1: Fig. 5. Simulation results in Case 2: (a) real leak size and its
(a) real leak size and its estimate, (b) real estimate, (b) real leak location and its estimate.
leak location and its estimate.
4
(a) estimated
3 real

leak size [kg/s]


(a) estimated
10
real 2
leak size [kg/s]

5 1

0
0 0 100 200 300 400 500 600
time [min]
0 100 200 300 400 500 600
80
time [min] (b) estimated
real
leak location [km]

60
(b) estimated
10
real 40
leak size [kg/s]

5 20

0
0 0 100 200 300 400 500 600
time [min]
0 100 200 300 400 500 600
time [min] Fig. 6. Simulation results in Case 3: (a) real leak size and its
estimate, (b) real leak location and its estimate.
Fig. 4. Real leak size and its estimates with the PF in
Case 1: (a) the variance of the artificial zero-mean
Gaussian white noise is 0.22 , (b) the variance of the measurement noise vj , which have the following PDFs:
artificial zero-mean Gaussian white noise is 0.42 . 
fwj (x) = 0.5 e−|x/80| e−|x/80| e−|x/80|
Figure 4 shows leak size estimates with a general PF, T
in which the artificial noise signals are not adaptive. The e−|x/0.8| e−|x/0.8| e−|x/0.8| ,
variances of the artificial zero-mean Gaussian white noise  T
processes are set to be 0.22 and 0.42 , respectively. We fvj = 0.5 e−|x/800| e−|x/800| e−|x/800| .
can see that when the variance is relatively small, the PF
cannot track the abrupt change quickly. When the vari- The other parameters are the same as in Case 1. The sim-
ance is relatively large, the estimation accuracy deterio- ulation results with the APF are shown in Fig. 5. They
rates. Because the variance can be adjusted adaptively, illustrate that the APF method is still valid in the presence
the APF has good performance in both estimation speed of non-Gaussian noise.
and accuracy.
Case 3. A leakage of size 1% (2 kg/s) is generated in
this case. Other simulation parameters are the same as in
Case 2. In this case, the simulation is performed with Case 1. The simulation results are illustrated in Fig. 6,
the non-Gaussian system noise wj and the non-Gaussian from which we see that for a small leak it will take more
Fast leak detection and location of gas pipelines based on an adaptive particle filter 549

time to detect it, and the estimates of the leak size and Chernick M.R. and Wincelberg D.M. (1985): Time series anal-
location are not accurate. Anyhow, the results are still ysis of the strategic petroleum reserve’s brine pipeline test
satisfactory. data. — Comput. Math. Applic., Vol. 11, No. 9, pp. 967–
982.
Dinis J.M., Wojtanowicz A.K. and Scott S.L. (1999): Leak de-
5. Conclusions tection in liquid subsea flowlines with no recorded feed
rate. — J. Energy Res. Tech., Vol. 121, No. 3, pp. 161–
The speed and accuracy are very important performance 166.
factors of an FDD method. For a gas pipeline, fast leak Doucet A., Godsill S. and Ardrieu C. (2000): On sequential
detection and accurate location can reduce the loss of leak- Monte-Carlo sampling methods for Bayesian filtering. —
age. This work presents an adaptive particle filter to tackle Statist. Comput., Vol. 10, No. 3, pp. 197–208.
the leak detection and location problem in gas pipelines. Ellul I.R. (1989): Advances in pipeline leak detection tech-
Because there is no need to linearize the nonlinear pipeline niques. — Pipes and Pipelines Internat., Vol. 34, No. 3,
model in the APF algorithm, its performance for param- pp. 7–12.
eter estimation is good. Additionally, the location capa-
Fukuda T. and Mitsuoka T. (1983): Leak detection and local-
bility of this method is evaluated, and the upper bound of ization in a pipeline system based on time series analysis
the location error is derived. The main advantages of our techniques. — J. Fluid Contr., Vol. 15, No. 4, pp. 5–17.
algorithm are as follows: (i) the leak size and location can
Furness R.A. (1985): Modern pipeline monitoring techniques.
be estimated accurately and quickly, (ii) it is applicable to
— Pipes and Pipelines Internat., Vol. 30, No. 3, pp. 7–11.
both Gaussian or non-Gaussian noise processes, and (iii) it
can detect and locate relatively small leaks. Future work Gertler J. (1998): Fault Detection and Diagnosis in Engineering
is to extend the proposed approach to leak detection and Systems. — New York: Marcel Dekker.
location in transient states. Gordon N.J., Salmond D.J. and Smith A.F.M. (1993): Novel ap-
proach to nonlinear/non-Gaussian Bayesian state estima-
tion. — IEE Proc.-F, Vol. 140, No. 2, pp. 107–113.
Acknowledgment Hough J.E. (1988): Leak testing of pipelines uses pressure and
acoustic velocity. — Oil and Gas J., Vol. 86, No. 47,
This work was mainly supported by the NSFC (Grant No. pp. 35–41.
60025307, 60234010), partially supported by the RFDP Ikuta K., Yoshikane N., Vasa N., Oki Y., Maeda M., Uchiumi
(Grant No. 20020003063) and the national 973 program M., Tsumur Y., Nakagawa J. and Kawada N. (1999): Dif-
(No. 2002CB312200) of China. ferential absorption lidar at 1.67 µm for remote sensing
of methane leakage. — Jpn. J. Phys., Vol. 38, No. 1A,
pp. 110–114.
Iseki T., Tai H. and Kimura K. (2000): A portable remote
References methane sensor using a tunable diode laser. — Meas. Sci.
Technol., Vol. 11, No. 6, pp. 594–602.
Afzal M. and Udpa S. (2002): Advanced signal processing of
Kadirkamanathan V., Li P., Jaward M.H. and Fabri S.G. (2000):
magnetic flux leakage data obtained from seamless gas
A sequential Monte Carlo filtering approach to fault de-
pipeline. — NDT&E International, Vol. 35, No. 7, pp. 449–
tection and isolation in nonlinear systems. — Proc. IEEE
457.
Conf. Decision Contr., Sydney, Australia, pp. 4341–4346.
Benkherouf A. and Allidina A.Y. (1988): Leak detection and
Kitagawa G. (1996): Monte-Carlo filter and smoother for non-
location in gas pipelines. — IEE Proc., Vol. 135, Pt. D,
Gaussian nonlinear state space models. — J. Comput.
No. 2, pp. 142–148.
Graph. Statist., Vol. 5, No. 1, pp. 1–25.
Billmann L. (1982): Studies on improved leak detection methods
Klein W.R. (1993): Acoustic leak detection. — Amer. Soc.
for gas pipelines. — Internal Report, Institut für Regelung-
Mech. Eng., Petroleum Division (Publication) PD, Vol. 55,
stechnik, TH-Darmstadt (in German).
pp. 57–61.
Billmann L. and Isermann R. (1987): Leak detection methods
Korbicz J., Kościelny J.M., Kowalczuk Z. and Cholewa W.
for pipelines. — Automatica, Vol. 23, No. 3, pp. 381–385.
(Eds.) (2004): Fault Diagnosis. Models, Artificial Intelli-
Bolviken E., Acklam P.J., Christiphersen N. and Stordal J.-M. gence, Applications. — Berlin: Springer.
(2001): Monte-Carlo filters for non-linear state estimation.
Kowalczuk Z. and Gunawickrama K. (2004): Detecting and lo-
— Automatica, Vol. 37, No. 2, pp. 177–183.
cating leaks in transmission pipelines, In: Fault Diagnosis.
Brodetsky E. and Savic M. (1993): Leak monitoring system for Models, Artificial, Intelligence, Applications (J. Korbicz,
gas pipelines. — IEEE Int. Conf. Acoustics, Speech, and J.M. Kościelny, Z. Kowalczuk and W. Cholewa, Eds.). —
Signal Processing, Minneapolis, USA, Vol. 3, pp. 17–20. Berlin: Springer.
550 M. Liu et al.

Li P. and Kadirkamanathan V. (2001): Particle filtering based Tracer Research Corporation (2003): Patent product. — Avail-
likelihood ratio approach to fault diagnosis in nonlinear able at www.tracerresearch.com
stochastic systems. — IEEE Trans. Syst., Man Cybern. – Verde C. (2005): Accommodation of multi-leak location in a
Part C: Applic. Rev., Vol. 31, No. 3, pp. 337–343. pipeline. — Contr. Eng. Pract., Vol. 13, No. 8, pp. 1071–
Muhlbauer W.K. (2004): Pipeline Risk Management Manual. — 1078.
Burlington: Gulf Professional Publishing. Wang G., Dong D. and Fang C. (1993): Leak detection for trans-
Patton R.J., Frank P.M. and Clark R.N. (Eds.) (2000): Issues of port pipelines based on autoregressive modeling. — IEEE
Fault Diagnosis for Dynamic Systems. — Berlin: Springer. Trans. Instrum. Meas., Vol. 42, No. 1, pp. 68–71.
Reichardt T.A., Einfield W. and Kulp T.J. (1999): Review of re- Wylie E.B. and Streeter V.L. (1993): Fluid Transients in Sys-
mote detection for natural gas transmission pipeline leaks. tems. — Englewood Cliffs: Prentice-Hall.
— Technical Report, NETL, Sandia National Laboratories, Zhou D.H., Xi Y.G. and Zhang Z.J. (1991): Nonlinear adaptive
Albuquerque, NM. fault detection filter. — Int. J. Syst. Sci., Vol. 22, No. 12,
Shields D.N., Ashton S.A. and Daley S. (2001): Design of non- pp. 2563–2571.
linear observers for detecting faults in hydraulic sub-sea Zhou D.H. and Frank P.M. (1996): Strong tracking filtering
pipelines. — Contr. Eng. Pract., Vol. 9, No. 3, pp. 297– of nonlinear time-varying stochastic systems with colored
311. noise with application to parameter estimation and empir-
Sivathanu Y. (2003): Natural gas leak detection in pipelines. — ical robustness analysis. — Int. J. Contr., Vol. 65, No. 2,
Technology Status Report, En’Urga Inc., West Lafayette, pp. 295–307.
IN. Zhao Q. and Zhou D.H. (2001): Leak detection and location of
Spaeth L. and O’Brien M. (2003): An additional tool for in- gas pipelines based on a strong tracking filter. — Trans.
tegrity monitoring. — Pipeline and Gas J., Vol. 230, No. 3, Contr. Automat. Syst. Eng., Vol. 3, No. 2, pp. 89–94.
pp. 41–43.
Sperl J.L. (1991): System pinpoints leaks on Point Arguello off-
shore line. — Oil and Gas J., Vol. 89, No. 36, pp. 47–52. Received: 1 November 2004
Tiang X. (1997): Non-isothermal long pipeline leak detection Revised: 21 July 2005
and location. — Atca Scientiarum Naturalium Universitis Re-revised: 10 September 2005
Pekinensis, Vol. 33, No. 5, pp. 574–580.

S-ar putea să vă placă și