www.elsevier.com/locate/advwatres
Advances in Water Resources 30 (2007) 1711–1721
Two leaks isolation in a pipeline by transient response
Cristina Verde a,*, Nancy Visairo b, Sylviane Gentil c
a Instituto de Ingenierıa, UNAM, 04510 DF, Mexico, Mexicob Facultad de Ingenierıa Electrica, UASLP, 78290 San Luis Potsı, Mexico
c Laboratoire d’Automatique de Grenoble (UMR 5528 CNRS-INPG-UJF), BP 46, 38402 St Martin d’Heres, France
Received 19 November 2005; received in revised form 3 January 2007; accepted 3 January 2007Available online 16 January 2007
Abstract
This paper presents a method for the identification of two leaks in a pressurized single pipeline where both transient and static behav-ior of the fluid in leaks conditions are used to identify the parameters associated to the leaks without requirements of valve perturbation.The procedure is based on a family F of lumped parameters nonlinear models with same steady state behavior in leaks condition andparameterized in terms of a known parameter zeq assuming only pressure and flow rate measurements at the extremes of the line. Thismodel is derived discretizing only the space variable. The key of the method is the automatic selection of the specific family F of modelsto be identified using the steady state conditions produced by the leaks. This fact reduces the research interval and the number ofunknown parameters simplifying the minimization issue of the error between model and measured data. Considering this family an algo-rithm combining transient and steady state measurements is presented. The potential of the technique and its robustness with respect tooperation point changes after the leaks occurrence are illustrated by simulation using the parameters of a water pilot pipeline of 135 mlong installed at the UNAM in which the L2 norm of the upstream and downstream flow error is minimized.� 2007 Elsevier Ltd. All rights reserved.
Keywords: Pipeline monitoring; Multiple leaks detection; Transient response; Nonlinear model
1. Introduction
The automatic supervision of pipeline networks is achallenge for the community of engineering, since the eco-nomic loss and environmental issues produced by a deteri-orated network are significant in all the world. Thus,different point of views, tools and backgrounds have beenconsidered in the last 10 years to cope with the monitoringsystems for aqueducts, oil lines, pumping systems, net-works of pipelines, chemical plants, etc. As Wang et al.[29] pointed out no single method can always meet all the
requirements and each technique has its advantages and dis-
advantages in different circumstances. The introductionsgiven in [29,14,19] are overviews of diverse diagnosis toolsfor pipelines considering hardware and software tools. In
0309-1708/$ - see front matter � 2007 Elsevier Ltd. All rights reserved.
doi:10.1016/j.advwatres.2007.01.001
* Corresponding author. Tel.: +52 55 56233684; fax: +52 55 56233681.E-mail address: [email protected] (C. Verde).
the case of distribution networks, genetic algorithms [23]and wavelet analysis [1] have been used to detect leaksposition.
The community of Automatic Control has developed ageneral theory for the fault diagnosis of dynamic systemswhich allows the generation of fault symptoms called resid-uals by software [21,15]. Diverse mathematical model-based procedures have been developed in this frameworkof control for the leak detection. Billman and Isermann[2], Shields et al. [22] and Korbicz et al. [14] designed resid-ual generators using a finite dimension model and assum-ing fix space discretization in the set of partial differentialequations (PDEs) which describes the fluid behavior. How-ever, these methods can be only applied to detect leaks inlimited cases. A novel formulation for the location of mul-tiple leaks is given in [25] assuming sequential leaks andscanning the pipeline with an adaptive law to estimatethe leak position. This procedure is successful if a new leakappears after the previous one has been located. However if
1712 C. Verde et al. / Advances in Water Resources 30 (2007) 1711–1721
a new leak occurs before the previous one is located theadaptive algorithm fails.
It is important to note that the location methods basedon steady state conditions for the residual without test sig-nals (as examples [2,22,12,9]) have a common property. Ifthey are applied for the case of multiple leaks with similarconditions, all of them delivered the same wrong positionzeq. The reasons of this fact are [27]:
• The impossibility of isolating two or more leaks withany residual algorithm in steady state because of a notunique solution for the mass equation since the wavespeed has no influence on steady state condition.
• The parametrization of a virtual leak at position zeq
which generates the same steady state flows at the endsof the line, as an infinite set of multiple leaks cases.
Despite of fact that the existence of more than one leakoccurring in a close time interval is a rather effect, it can occurwhen natural catastrophes like earthquake damage aline;human actions could generate more than one leak, like unau-thorized outlet in petrol line or an increment in an aqueductpressure with bad conjunctions. This issue has beenaddressed in the past by the Civil Engineering community.In particular [16] proposed to capture the patterns with leaksof the frequency response diagram considering a valve per-turbation in the line. Ferrante and Brunone [10] presenteda method based on transient response using the FourierTransform of pressure signals. However, all these methodshave practical limitations if dominant nonlinear effects arepresented in the fluid and a test signal is required. Brunone[4] reported a method based on unsteady state tests withthe capacity to detect two leaks one after the other.
Recently, da Silva et al. [7] published a method based ona fuzzy classification of the transient response with multipleleaks; however the amount of historical data with leaks forthe training could be a limitation. In the other hand, thetransient fluid analysis in time domain with respect to theleaks parameters for a given zeq given in [28] concluded thatthe transient responses allow the leaks identification in mostof the study cases. Thus, the transient response features arethe key to locate positions of a set of successive leaks.
Then, from technical point of view an innovative super-vision systems for a pipeline must improve both hardwareand software aspects. Thus, more accuracy and rapid sen-sors together with new algorithms assuming rather faultconditions must be developed.
A proposition to isolate multiple leaks is presented herewhich uses a nonlinear dynamic model of the fluid to calcu-late the parameters associated with leaks from the transientresponse of pressure and flow rate at the end of the line. Inparticular, the parameter zeq together with physical con-straints of the pipeline are used to determine a familyFðzeqÞ of nonlinear dynamic models with finite cardinalityand unknown parameters. This family describes suitabletransients for the parameters retrieval and characterizesthe indistinguishable leaks with steady state data. Thus, sta-
tic and dynamic complementary behaviors are used to sim-plify the identification task reducing search intervals of theunknown parameters. Strictly speaking, diverse availablemethods can be used to estimate the unknown parametersof the familyFðzeqÞ assuming known pressure and flow data.Here, the nonlinear least square method implemented in theMATLAB software [20] is used for simplicity. The main con-tribution is the reduction of the search intervals of theunknown parameters in a dynamic lumped parametersmodel with minimal order before the identification processstarts, this idea could be applied to any model improvingin general the convergence of the identification process.
The presentation is organized as follows. In Section 2 start-ing from the PDEs and assuming multiple leaks in the pipe-line, the compromise between complexity of the lumpedparameter model and the accuracy of the transient responsewith leaks is discussed and the general isolation issue withtwo leaks is established. In Section 3 the static relations whichmust satisfy the physical variables of the system in leaks con-ditions are described and complemented with the dynamicmodel given in Section 2 to reduce the search intervals ofthe unknown parameters. In Section 4 a reformulation ofthe identification issue with four unknown parameters isgiven introducing the family of models FðzeqÞ in leaks condi-tions. Section 5 summarizes the derivated conditions in theframework of an isolation algorithm and in Section 6 a studycase using simulated data of a water pilot pipeline is discussedand shows the advantage of the systematic procedure.Finally, conclusions are given in Section 7.
2. Pipeline model with leaks
Consider the one-dimensional nonlinear model of a fluidin a pipeline with distributed parameters given by
oQðz; tÞot
þ gAoHðz; tÞ
ozþ lQðz; tÞjQðz; tÞj ¼ 0 ð1Þ
c2 oQðz; tÞoz
þ gAoHðz; tÞ
ot¼ 0 ð2Þ
which is obtained using momentum and mass conservationequations and assuming incompressible fluid [5], withHðz; tÞ the pressure head (m), Qðz; tÞ the flow rate (m3/s),z the length coordinate (m), t the time coordinate (s), gthe gravity (m/s2), A the section cross-area (m2), D thepipeline diameter (m), c the pressure wave speed (m/s)and l ¼ f
2DA where f is the Darcy–Weisbach (dimensionless)friction coefficient.
A leak at point pi of the pipeline which discharges intothe atmosphere produces a discontinuity in (1) and (2)and as consequence a boundary condition at pi appearsin the system associated with the discharge outflow
Qpi ¼ ki
ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiHðpi; tÞ
pð3Þ
where the parameter ki > 0 is function of the orifice area, thedischarge coefficient and the gravity g. In the case of a clog,some authors [13] introduced an unknown friction coeffi-cient function of space lðxÞ in momentum Eq. (1) which is
C. Verde et al. / Advances in Water Resources 30 (2007) 1711–1721 1713
different from the discharge flow boundary condition givenby (3). Therefore clogs and leaks have different effects inthe analytical model and a global monitoring of a pipelinemust include a parallel detection for dents and leaks.
Then, if n� 1 leaks are assumed, the fluid behavior isdescribed by n pairs of PDEs with a boundary conditionbetween each section without leaks of the form
Qbi ¼ Qai þ Qpi ð4Þ
where Qbi and Qai denote the flows before and after the leakposition pi respectively for i ¼ 1; 2; . . . ; n� 1.
Assuming that upstream and downstream flows andpressures at the extremes of the line can be measured,diverse combination of boundary conditions complete thedescription of the fluid. In this study, the pressure headat the beginning and the end of the pipeline are selectedas boundary conditions
½Hðt; 0Þ Hðt; LÞ� ð5Þconsidering that they can be regulated with a controller andupstream and downstream flows are defined as systemoutput
½Qðt; 0Þ Qðt; LÞ� ð6Þ
2.1. Pilot pipeline description
The study and tests presented here are based on data of apilot water pressurized pipe of the National University inMexico which layout is shown in Fig. 1. The iron galvanizedpipeline (a) is 132.56 m long with a diameter of 0.105 m,thickness of 4.7 mm, friction coefficient f ¼ 0:04, pressurewave speed c ¼ 1284 m=s and gravity accelerationg ¼ 9:81 m=s2. The pipeline is integrated with a store tankof 7.4 m3 (b), a hydraulic pump of 5 HP of variable speed(c) and a valve at the end of the line (d). Experiments withoperation point variations are carried out by the pump con-trolled by pressure (c) and valve (d). Four valves are installedto emulate the leaks (f). The line is instrumented with two
Fig. 1. Pilot pipeline scheme.
types of flow sensors; (1) Panametrics two-channel transportsensor based on ultrasonic pulses with an accuracy of±0.05 m/s, and poor bandwidth, 5 s of actualization rate,and (2) Signet 2540 paddle wheel flow sensors with an actu-alization rate of 0.1 s. The ultrasonic sensors are used in theexperiments only to measure steady state flows. The pressuremeasurements are taken with a WIKA piezo-resistive andthin film pressure transmitter. The measured signals are sam-pled at points (e) using a data acquisition system of NationalInstruments with a sampling frequency below 100 Hz. Fig. 2shows the sample data for a change in the operation point ofthe pump at 383.5 s. One can see that the pressure signals arenoisy and the sensitivity of the downstream signal is very low.These disadvantages have been taken into account for thevariables selection in the optimization criterium. However,under other pipeline conditions and instrumentation thepressure signals could be suggested to identify the transientresponse.
2.2. Space discretization
In general, the approximation of a set of PDEs by afinite dimensional model means a compromise betweentransient accuracy and computational complexity [8]. Forthe leaks detection issue, the boundary condition (4) gener-ates a new component which must be considered in the dis-cretization process to get an adequate model, since leakspositions have to coincide with the discrete space. Thenthe accuracy of the detector is a function of the discretiza-tion. To determine the minimal finite dimension of themodel which follows the transient response of the fluid withleaks and satisfies constraint (4), a sensitivity study of thetransient response with respect to the increment space Dis carried on. As result a compromise between an accuracydynamic model and a small set of unknown parameters tobe identified is established. The sensitivity analysis is car-ried on using the following discrete space model. Howevera suitable model obtained from the characteristic methodscan be used instead of approximations (7) and (8).
370 375 380 385 390 395 4000.014
0.016
0.018
Flo
w r
ate
(m3 /s
)
370 375 380 385 390 395 4002
4
6
8
Pre
ssur
e (m
)
370 375 380 385 390 395 400
1
1.5
2
Pre
ssur
e (m
)
Qn
Q1
time (s)
H1
Hn+1
Fig. 2. Data of the pipeline for an operation point change. H1 upstreampressure and Hnþ1 downstream pressure.
Fig. 3. Variables definition with uniform sections in the pipeline for twoleaks.
599 599.5 600 600.5 601 601.5 602 602.5 6032
4
6
8
10
Pre
ssur
e (m
)
3 sections 12 sections
599 599.5 600 600.5 601 601.5 602 602.5 6032
4
6
8
10
time (s)
Pre
ssur
e (m
)
3 sections 15 sections
Fig. 4. Pressure transients at point 43.9 m simulated with n ¼ 3; 12 and 15sections.
1714 C. Verde et al. / Advances in Water Resources 30 (2007) 1711–1721
Assume a pipeline of length L where
• the space z is divided into n uniform cells of unknownsize D ¼ L
n,• the leaks are located at points pj ¼ D
Pji¼1ni with ni inte-
gers for j ¼ 1; . . . ; n� 1,• each leak outflow is characterized by its parameter kj
and• the partial derivatives with respect to z in (1) and (2) are
approximated by [6]
oHðz; tÞoz
’ Hiþ1ðtÞ � H iðtÞD
8i ¼ 1; . . . ; n� 1 ð7Þ
oQðz; tÞoz
’ QiðtÞ � Qi�1ðtÞD
8i ¼ 2; . . . ; n ð8Þ
where the subscript i is associated to the variable of section i.
Then the lumped parameters model can be written as npairs of coupled nonlinear dynamic equations given by
_Qi ¼a1
DðH i � H iþ1Þ � lQijQij 8i ¼ 1; 2; . . . ; n ð9Þ
_Hi ¼a2
DðQi�1 � Qi � utiðki
ffiffiffiffiffiffiH i
pÞ 8i ¼ 2; . . . ; n ð10Þ
with constants a1 ¼ gA, a2 ¼ c2
gA and uti :¼ uðt � tiÞ the unitstep function associated with the occurrence time ti of theleak i. In this set, H 1 ¼ Hðt; 0Þ and Hnþ1 ¼ Hðt; LÞ are thesystem inputs and the independent variable t has been re-moved to simplify the notation.
Note that the system dimension with leaks ((9) and (10))has not been fixed. It means the identification issue has toinclude as unknown parameter the model minimal dimen-sion m ¼ 2n� 1.
If two arbitrary leaks characterized by
ðp1; k1; t1Þ : p1 ¼ Dn1 with k1 > 0; t1 P 0 ð11Þðp2; k2; t2Þ : p2 ¼ Dðn1 þ n2Þ with k2 > 0; t2 P 0 ð12Þ
appear the nonlinear model ((9) and (10)) of dimension m
can be written in vector form as
_Q1
_H 2
_Q2
..
.
_H n1
..
.
_H n1;2
..
.
_Qn�1
_Hn
_Qn
266666666666666666666666664
377777777777777777777777775
¼
�lQ1jQ1j � a1
D ðH 2 � H 1Þa2
D ðQ1 � Q2Þ�lQ2jQ2j þ a1
D ðH 2 � H 3Þ
..
.
a2
D Qn1�1 � Qn1� ut1k1
ffiffiffiffiffiffiffiffiH n1
p� �...
a2
D Qn1;2�1 � Qn1;2� ut2k2
ffiffiffiffiffiffiffiffiffiffiH n1;2
p� �...
�lQn�1jQn�1j þ a1D ðHn�1 � H nÞ
a2
D ðQn�1 � QnÞ�lQnjQnj þ a1
D ðH n � Hnþ1Þ
266666666666666666666666664
377777777777777777777777775
ð13Þ
with n1;2 ¼ n1 þ n2, and flows Qi and pressures H i given inFig. 3. Note that if the two leaks exist, the section size D ofthe space discretization must satisfyX3
i¼1
niD ¼ nD ¼ L ð14Þ
The generalization of (13) for more than two leaks could bemade introducing a term utiki
ffiffiffiffiffiffiffiffiffiffiffiffiffiH n1;2;...;i
pin the associated
state equation and increasing the terms in the sum of (14)for each additional leak.
Fig. 4 shows the simulated pressure transient at 43.9 massuming the parameters of the pilot plant described in Sec-tion 2.1 and the model (13), with n ¼ 3; 12 and 15 sections,when an operation point change is produced at 600 s. It isseen that a segmentation of n > 12 in the model (13) do notchanges strongly the high frequency components of thecomputed transient pressure. On the contrary, the discret-ization with three sections filters high frequency compo-nents which could be useful for the identification issue.Then, a lower limit of n ¼ 12, can be selected for the spacediscretization, resulting a model of order m ¼ 23; this isequivalent to propose an upper limit for the section sizein the set H given by
D 6 DU ¼ L=12 ¼ 11:04 m ð15Þ
0 0.5 1 1.50.0127
0.0128
0.0129
0.013
0.0131
0.0132
0.0133
0.0134
0.0135
0.0136
time (s)
Flo
w r
ate
(m3 /s
)
Case 1Case 2Case 3Case 4
Fig. 5. Flow transient responses with a leak located at 71.27 m and withthree pairs of two leaks for zeq ¼ 71:27 m.
C. Verde et al. / Advances in Water Resources 30 (2007) 1711–1721 1715
Since the values ni’s in (14) must be integers, the upper limitDU could be not enough small for some leaks positions.These cases happen if the separation between leaks is verysmall or one of them is close to the ends of the line. Thismeans that the resolution of the leak detection with model(13) is given by the D and the data sampling period. Thisfact imposes a constraint for the section size D and is inde-pendent on the method used for the discretization of (1)and (2). As example, the characteristics method imposesa cell size in the space ðx; tÞ for a given discrete time; theline dz
dt ¼ �c, with a sampling period of 0.01 s meansD ¼ 12:8 m which is close to the limit given by (15). To re-duce the sampling time, the real data could be interpolatedto satisfy Courant condition for the simulation.
On the other hand, since most of the parameters identi-fication methods assume known the model dimension ofthe dynamic system [18], a poor estimation of the integerm ¼ 2L=DU � 1 affects the identification performance.Then, a compromise between confidence of the parametersand complexity to solve the nonlinear high dimension sys-tem must be made. Using the approximated model (13) thetwo leaks location issue can be formulated as follows.
Problem 1. Assuming known the time evolution of the setof variables K ¼ fH 1;H nþ1;Q1;Qng starting from thealarm generation, the isolation issue of two leaks in apipeline consists in the identification of the set of unknownparameters
H ¼ fD; n1; n2; k1; k2; t1; t2g ð16Þwhich satisfies simultaneously Eqs. (13) and (14) with un-known dimension m ¼ 2n� 1 and the inequalities
ki > 0; D > 0; n ¼ LD> n1 þ n2 with fn1; n2g
2 I ; 0 6 t1; 0 6 t2 ð17Þ
with I the positive integers set.
To select an adequate dimension m of model (13), com-plementary information to the constraints given in Problem1 is considered.
Simulating the dynamic of the fluid with the followingpairs ðpi; ki; 0Þ of leaks:
• case 1 with leaks (44.18 m, 6:228� 10�5, 0) and(88.36 m, 1:053� 10�4, 0),
• case 2 with leaks (20.00 m, 4:09� 10�5, 0) and (92.35 m,1:27� 10�4, 0),
• case 3 with leaks (60.00 m, 2:79� 10�5, 0) and (74.14 m,1:38� 10�4, 0),
• case 4 with leak (71.27 m, 1:6628� 10�4, 0).
The transient flows shown in Fig. 5 are obtained andprovide important conclusions. One can see that the leakseffect in the flows is registered without a considerable delay,since the theoretic arrival time of the wave assuming oneleaks is ta � 71=1284 ¼ 0:055 s in one direction andta � 61=1284 ¼ 0:047 s in the other, but the time window
to classify the response on-line is lower than T ffi 1:5 s. Thislimitation justifies the existence of test signals in the pipe-line, called persistence excitation condition in the estima-tion theory [18], to identify on-line the parameters evenassuming an adequate dimension m of the model. An alter-native to detect the parameters without test signals is toextract leaks information from the total transient responseoff-line instead of only from the arrival time of the pressurewave, as it has been suggested in [17]. The transientresponse is a signal with leaks conditions information.
Then, the leak conditions reported in [27] together withthose given in Problem 1 are integrated to reformulate theidentification issue without external perturbation reducingthe number of unknown parameters and their search inter-vals. Since the steady state conditions can be evaluatedafter the leak transient response disappears, this methodis called a posteriori diagnosis system.
3. Search interval by steady state conditions
Consider the fluid in steady state with the measurementsset
K1 ¼ fH11 ;H1nþ1;Q11 ;Q
1n g ð18Þ
where the super index means steady state value and thattwo leaks defined by (11) and (12) exist with positions p1
and p2, respectively. Under these conditions
Q11 � Q1n ¼ k1
ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiH11 �
lp1
a1
ðQ11 Þ2
rþ k2
�
ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiH1nþ1 þ
lðL� p1 � p2Þa1
ðQ1n Þ2
sð19Þ
can be straightforward obtained from the DPEs (1) and (2)in steady state with leaks boundary conditions. Moreover,it is shown in [27] that the parameter
zeq :¼ a1ðH11 � H1nþ1ÞlððQ11 Þ
2 � ðQ1n Þ2Þ� LðQ1n Þ
2
ððQ11 Þ2 � ðQ1n Þ
2Þ8Q11 6¼ Q1n
ð20Þ
1716 C. Verde et al. / Advances in Water Resources 30 (2007) 1711–1721
for all Q1, . . . ,Qn characterizes the one and two leaks caseswith same data set K1, and its value has been validatedwith experimental data [28]. Then zeq is considered as a vir-tual leak position. Eq. (20) has been tested with real data ofa petrol line of 250 km with an average flow of 1445 barrel/h obtaining a satisfactory error in the position of ±0.5 km[26]. In this case the leak was produced by illegal actionsand the discharge flow was considerable.
Considering a controller that regulates the boundarycondition H11 and H1nþ1 at the ends of the pipe, the profilein steady state of Fig. 6 can be obtained with leaks atp1 ¼ z1 and p2 ¼ z1 þ z2 and where the slopes are
m1 ¼lðQ11 Þ
2
a1
; m2 ¼lðQ1eqÞ
2
a1
; m3 ¼lðQ1n Þ
2
a1
From the profile of Fig. 6 it is seen that the followinginequalities are satisfied in general
z1 < zeq; z2 > zeq � z1 ð21ÞMoreover considering the slopes and (20), the relation
ððQ11 Þ2 � ðQ1n Þ
2Þðzeq � z1Þ ¼ z2ððQ1eqÞ2 � ðQ1n Þ
2Þ ð22Þ
is obtained with Q1eq the steady state flow at position zeq. Inpractice, the signal Q1eq has to be filtered with a movingaverage filter and the flow measurement at zeq must be car-ried on in the pipeline after the leak condition is detectedand it allows the isolation of the one leak case from thetwo for the same data set K1.
The applicability of (22) is justified since a ultrasonic flowsensor works outside of the pipeline (no invader) and doesnot require a boring to get the data. This does not happenwith the pressure sensors and therefore one cannot get thepressure at zeq. If the pressure could be measured at thispoint the two leaks location issue is completely solved.
Fig. 6. Pressure drops with two leaks at points z1 and ðz1 þ z2Þ.
Note that Eq. (19) for a given zeq is only valid for one ortwo leaks identification task and then they cannot be usedfor the general multiple leaks case. Using the sensitivitytheory [11] the sensitivity function of the virtual positionzeq with respect to errors DQ1 and DQn can be obtainedand written by
Dzeq ¼�2
ðQ11 Þ2 � ðQ1n Þ
2fzeqðQ11 DQ1 � Q1n DQnÞ þ LQ1n DQng
ð23ÞThus, inaccuracy data in the flows produce a deviation ofthe virtual position zeq; the smaller the leaks (difference be-tween Q11 and Q1n ) the more sensitive it is the virtual posi-tion. However, (20) is used mainly here to reduce the searchintervals in the identification process improving the param-eters convergency.
If the flow Q1eq at zeq is equal to Q1n then zeq ¼ z1, there isonly one leak, z2 could take any value satisfying (21) andthe dynamic model (13) is not required to identify the leakposition. Moreover, if the time interval between leaks occur-rence is larger than the dynamic of the system ðt2 > T Þ, afterthe first leak is identified, the estimation of the second leakparameters is achieved using the value of zeq together withthe substitution of the known parameters ðk1; z1Þ in (19)and (22). Then, taking into account this particular behaviorof the steady state model, one can solve the sequential leaksproblem ðt2 � T Þ using only static relations. The dynamicconsiderations are used to filter and robustify the estimationswith respect to uncertainty and noise [24].
On the contrary a deviation of Q1eq from Q1n implies atleast two leaks with infinite set of models that satisfies
limt!1
Qðt; 0ÞjHj� Qðt; 0ÞjHk
Qðt; LÞjHj� Qðt; LÞjHk
" #¼
0
0
� �ð24Þ
with same zeq and set Hj 6¼ Hk. This means, an infinitenumber of sets H exists if only the set K1 of data, the flowQ1eq and the constraints (19), (20) and (22) are considered.
Since four of the unknown parameters of Problem 1 areinvolved in the steady state equations (19), (20) and (22), acomposition of these with (13)–(15) and (17) allows areduction of the search intervals of H.
Taking into account that the leak positions are relatedwith the boundary of the section by
z1 ¼ n1D and z2 ¼ n2D
where the section size D is a free parameter that satisfies(15), inequalities (21) are equivalent to
Dn1 < zeq; Dn2 > zeq � Dn1 ð25Þwhen zeq 6¼ 0.
From the value of zeq, one can estimate if leaks are nearthe ends of the pipe; it means zeq � 0 _ L. Under this con-dition, inequalities (25) allow the generation of a limit forthe section D size smaller than DU since ni’s 2 I . To be surethat at least two sections exist from the extremes of the lineto zeq, the upper limit for D must be selected such thatinequalities (25) with n1 ¼ 1 and n2 ¼ 1 be satisfied.
C. Verde et al. / Advances in Water Resources 30 (2007) 1711–1721 1717
Then, if DU < zeq < ðL� DUÞ, any value of D satisfying(15) can be used in (13), since this value yields a good tran-sient response and the static constraints are satisfied. Onthe contrary, if L� DU < zeq or zeq < DU a reduction inthe section size is required. These rules can be summarizedas follows:
• R1. If zeq > DU, hold the maximal value DU for thesection.
• R2. If zeq < DU, reduce the maximal value of the sectionby DU ¼ zeq
2.
• R3. If L� zeq < DU, reduce the maximal value of the sec-tion by DU ¼ L�zeq
2.
Taking into account that the unknown integers n1, n2
and n3 are related by (14), their limits can be determinedsuch that (21) is satisfied. Mixing both constraints andholding D 6 DU, the interval is reduced to
n1D < zeq < ðn1 þ n2ÞD ð26Þand the limits of integer n2 are
n2min >zeq
D� n1; n2max ¼ n� n1 � 1 ð27Þ
On the other hand, substituting z1 ¼ n1D and z2 ¼ n2D in(22), a less conservative reduction in the search intervalscan be achieved. As candidate pairs must be only consid-ered the set Sn1;n2 ¼ ðn1; n2Þ which satisfies conditions(26) and (27) and generates simultaneously an error
En1;n2 :¼ ððQ11 Þ2 � ðQ1n Þ
2Þðzeq � n1DÞ � n2DððQ1eqÞ2 � ðQ1n Þ
2Þð28Þ
such that jEn1;n2j is less than a threshold value Te. Then, gi-ven a D, the error evaluation allows a reduction of the pairsðn1; n2Þ candidate to solve the identification issue. Themean value of Qeq can be calculated using any no invadersensor flow sensor holding the pipeline operation.
Moreover, to enclose the search interval for the param-eter k2, the evaluation of zeq and the selected D < DU can beused together with Eqs. (19)–(22) and inequalities (26) and(27); after some algebraic steps the interval for k2
k2 2 Ik2¼ ½k2min; k2max� ð29Þ
with
k2min ¼Q1eq � Q1nffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
H1nþ1 þlðL�zeqÞ
a1ðQ1n Þ
2q ð30Þ
k2max ¼Q1eq � Q1nffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
H1nþ1 þ lDa1ðQ1n Þ
2q ð31Þ
is obtained.
4. Generation of the family of models F
The selection of the value D according to rules (R1, R2,R3) allows to get from (19) and (22) the relations
n1D ¼ zeq � k1n2D ð32Þ
k1 ¼k2ffiffiffiffiffiffiffiffiffiffiffif ðn1Þ
p ð33Þ
with known constants
k1 ¼ðQ1eqÞ
2 � ðQ1n Þ2
ðQ11 Þ2 � ðQ1n Þ
2; k2 ¼ Q11 � Q1eq
and function f ðn1Þ ¼ H11 �ln1D
a1ðQ1n Þ
2.Assuming that the pipe is in steady state when leaks
appears, Eqs. (32) and (33) can be substituted in thedynamic model (13), getting the family of models FðzeqÞfor a given zeq
_eQ1 ¼ �leQ1jeQ1j þa1
DðH 1 � eH 2Þ
_eH 2 ¼a2
DðeQ1 � eQ2Þ
_eQ2 ¼ �leQ2jeQ2j þa1
Dð eH 2 � eH 3Þ
..
.
_eH n1¼ a2
DeQn1�1 � eQn1
� ut1k2ffiffiffiffiffiffiffiffiffiffiffif ðn1Þ
p ffiffiffiffiffiffiffiffieH n1
qzfflfflfflfflfflfflfflfflfflfflfflfflfflffl}|fflfflfflfflfflfflfflfflfflfflfflfflfflffl{ter10BB@
1CCA...
_eH n1;2¼ a2
DeQn1;2�1 � eQn1;2
� ut2k2
ffiffiffiffiffiffiffiffiffiffieH n1;2
qzfflfflfflfflfflfflfflffl}|fflfflfflfflfflfflfflffl{ter20BB@
1CCA...
_eQn�1 ¼ �leQn�1jeQn�1j þa1
Dð eH n�1 � eH nÞ
_eH n ¼a2
DðeQn�1 � eQnÞ
_eQn ¼ �leQnjeQnj þa1
Dð eH n � H nþ1Þ
ð34Þ
This family has a satisfactory transient behavior, and de-pends only on four unknown parameters of the originalset H; there are Hr ¼ ðn1; n2; k2; tiÞ, where the pair ðn1; n2Þmust be a member of Sn1;n2, the parameter k2 is insidethe interval Ik2
for a given zeq and i is associated to theoccurrence of the second leak. Note that for every candi-date pair ðn1; n2Þ the terms associated to the leaksðter1; ter2Þ must be introduced in the specific pair of statevariables ð eH n1
; eH n1;2Þ of (34). Moreover, if k2 ¼ 0, from
(33) one concludes that k1 ¼ 0 and model (34) is still validfor only one leak.
Note that for any lumped parameters model whichdescribes the pipeline with leaks, the conditions (27)–(29) can be used to simplify the identification issue reduc-ing the search intervals. In particular, for the model (34)the leaks detection problem can be reformulated asfollows:
1718 C. Verde et al. / Advances in Water Resources 30 (2007) 1711–1721
Problem 2. Assuming known the virtual leak position zeq
with its respective average outflow Q1eq and the set ofvariables K ¼ fH 1;H nþ1;Q1;Qng during the leaks transientresponse, the isolation issue of two leaks in a pipelineconsists in identifying the set of unknown parameters
Hr ¼ fn1; n2; k2; tig ð35Þof the family of models FðzeqÞ given by constraint (34) withdimension m ¼ 2n� 1, subjects to
k2 2 Ik2; and pairðn1; n2Þ 2Sn1;n2
Taking into account this reformulation, diverse pattern rec-ognition and optimization procedures in a recursive off-lineframework can be used to determine Hr [3]. To reduce themissing data in the set K, a sensitivity and rapid leak alarmhas to be implemented; this task can be made by the Bill-mann’ approach [2]. Since the parameters can be identifiedonly using data during the transient response, one could re-use the data set if the settling time of the system response isshorter than the convergence time of the estimator. In par-ticular it is suggested to solve Problem 2 minimizing the L2
norm of the error Eðn1; n2; k2; ti Þ equal to
minn1 ;n2 ;k2 ;ti
Z T
t0
Q1� eQ1ðn1;n2;k2; tiÞQn� eQnðn1;n2;k2; tiÞ
" #0W
Q1� eQ1ðn1;n2;k2; tiÞQn� eQnðn1;n2;k2; tiÞ
" #dt ð36Þ
subjects to ðn1;n2Þ 2Sn1;n2 and k2 2 Ik2
where ðQ1;QnÞ are upstream and downstream flow data,eQ1ðn1; n2; k2; tiÞ and eQnðn1; n2; k2; tiÞ are the output of mod-els family FðzeqÞ, W is a free weighting factor of the outputand T is selected according the settling time of the leaks re-sponse taken from data and time t0 is given by the trigger ofthe condition Q1 � Qn 6¼ 0.
5. Isolation algorithm
The set of above introduced equations to solve the Prob-lem 2 can be summarized as an algorithm in which the firststeps allow to reduce the possible members of the familyFðzeqÞ where leaks can be located. The second part ofthe algorithm strictly speaking is the identification of k2
and ti such that (36) is minimized considering the feasiblemembers of FðzeqÞ.
Since the cardinality of the set Sn1;n2 is finite, the func-tional E is practically optimized with respect to the param-eters k2 and ti for a finite set of members of FðzeqÞ. Severaloptimization tools can be used straightforward for this pur-pose. Here, the nonlinear least square algorithm with thesimulink toolbox of MATLAB software has been used [20].
• Step 1. When the leak condition is detected, evaluate thestart time t0 of the flow deviations and estimate theparameter zeq by (20).
• Step 2. If average flow Q1eq at position zeq is equal to theaverage of Q1n , only one leak exists at position zeq andthe algorithm finishes. On the contrary go to the nextstep to locate the two leaks.
• Step 3. Select the parameter D following rules (R1, R2,R3).
• Step 4. Evaluate the error (28) considering the pairsðn1; n2Þ which satisfy (26) and (27).
• Step 5. Determine the search interval Ik2using (30) and
(31).• Step 6. Define the set Sn1;n2, selecting the threshold Te,
order the members according to the error (28) fromthe higher to the lower value and set up j ¼ 1. If error(28) changes of sign when n2 or n1 is increased by 1,means a zero value in the interval nj þ 1 and nj.Under this condition D must be reduced and returnto Step 4.
• Step 7. Minimize (36) with respect to k2 and ti for thepair j of Sn1;n2.
• Step 8. If the minimization with all members of Sn1;n2 isachieved go to the next step. On the contrary increasethe index j and return to Step 7.
• Step 9. Select the parameters k2 and ti and the pair j*
which yield the smallest value of (36) and get k1 substi-tuting n1 in (33).
This algorithm estimates the parameters ki for i ¼ 1; 2which characterize the orifice and are independent on theoperation point of the pipeline and the pressure at the leakspositions.
6. Simulation results
Consider the water pilot pipeline described in the Sec-tion 2.1 with a1 ¼ 0:0849 m3=s2 and l ¼ 21:99 m�3 andassume two leaks appearing at t ¼ 0 which are character-ized by k1 ¼ 6:2283� 10�5 located at 44.18 m andk2 ¼ 1:0534� 10�4 located at 88.37 m. The leaks responsesfor these conditions corresponds to the Case 1 of Fig. 5.
Following the algorithm described above the first step isthe evaluation of the virtual position given by (20) from thesteady state set
K1 ¼ f11 m; 5 m; 0:01343 m3=s; 0:01297 m3=sgobtaining the key value zeq ¼ 71:27 m. To reduce the noiseeffect in the evaluation of zeq, a processing of the data witha moving average filter for set K1 is suggested in practicalcases.
Since the flow at 71.27 m given by Q1eq ¼ 0:01325 m3=sdoes not coincide with the downstream valueQ1n ¼ 0:01297 m3=s, the steps for the two leaks case areapplied. According to the third step, taking into accountthe length of the pipeline and the value of zeq, one selectsD ¼ 11:04 m by rule R1. This value divides the line in 12uniform sections. Note that the knowledge of the keyparameter zeq makes possible to select a dimension of thedynamic model (34).
According to the step 4 the inequality
n1 6zeq
D¼ 6:43
Table 1Set of pairs ðn1; n2Þ of the subset of F
n1 n2
6 1, 2, 3, 4, 55 2, 3, 4, 5, 64 3, 4, 5, 6, 73 4, 5, 6, 7, 82 5, 6, 7, 8, 91 6, 7, 8, 9, 10
C. Verde et al. / Advances in Water Resources 30 (2007) 1711–1721 1719
together with (27) characterize the subset of familyFð71:27Þ or candidate members to minimize the error(36). In this case the pairs ðn1; n2Þ given in Table 1 are ob-tained. It means, the models where the leaks parametersmust be searched are reduced to 30 possible combinationsof ðn1; n2Þ.
As next step the search interval of k2 is defined evaluat-ing its limits (30) and (31), obtaining
k2 2 ½1:0208� 10�4 � 1:2075� 10�4�According to step 6, since n1 and n2 must satisfy (28), areduction in the cardinality of the subset of F selectingT e ¼ 10�6 is done. Table 2 shows the value of the error(28) for the 30 members. One can see that only the lasttwo cases yielded an error of order 10�6 and can be consid-ered as candidate models to locate the leaks. The cases cor-respond to n1 ¼ 4 and n2 ¼ 4 and n1 ¼ 1 and n2 ¼ 9. So,
Table 2Classification of the subset of F
n1 n2 en1,n2
6 5 �3:4811� 10�4
5 6 �2:9433� 10�4
6 4 �2:6622� 10�4
1 6 2:4828� 10�4
4 7 �2:4056� 10�4
5 5 �2:1245� 10�4
2 5 1:9451� 10�4
3 8 �1:8679� 10�4
6 3 �1:8434� 10�4
1 7 1:6640� 10�4
4 6 �1:5868� 10�4
3 4 1:4073� 10�4
2 9 �1:3302� 10�4
5 4 �1:3057� 10�4
2 6 1:1262� 10�4
3 7 �1:0491� 10�4
6 2 �1:0246� 10�4
4 3 8:6962� 10�5
1 8 8:4514� 10�5
1 10 �7:9248� 10�5
4 5 �7:6800� 10�5
3 5 5:8853� 10�5
2 8 �5:1138� 10�5
5 3 �4:8690� 10�5
5 2 3:3191� 10�5
2 7 3:0743� 10�5
3 6 �2:3028� 10�5
6 1 �2:0581� 10�5
4 4 5:0812� 10�6
1 9 2:6333� 10�6
only for these two models the minimization (36) with re-spect to the parameters k2 and ti is carried on.
Following steps 7 and 8 the minimization of the discreteversion of criterion (36) with matrix W ¼ diagð1; 1Þ is car-ried out for the two candidate models and considering asinitial condition the two limits of the search interval ofk2. The minimization is made in a recursive form usingthe nonlinear least square function of MATLAB; threeiterations of the algorithm are necessary. The minimizationresults are shown in Table 3, where the parameter k1 is esti-mated by (33). The third column k2i corresponds to the ini-tial value of k2 used in the optimization; the last twocolumns correspond to the estimated parameters k2 andk1, respectively.
In Fig. 7 the upstream flow errors ei ¼ Q1 � eQ1ðiÞbetween the pipeline and both members of the familyFðzeqÞ are shown. The evolution of e1 corresponds to theerror between the plant and the model with the pair (1,9)and the error e2 corresponds to the case n1 ¼ 4 andn2 ¼ 4. One can see that the magnitude of e2 associatedwith the true leaks positions is closer to zero than the errore1. This result validates the substitution of (32) and (33) inmodel (34) and concludes that pair (4,4) corresponds to thesolution which is equivalent to positions (44.18, 88.37) m.The estimation errors for the leaks outflows with the pair(4,4) given by
Ek1¼ k1 � k1
k1
¼ 0:011; Ek2¼ k2 � k2
k2
¼ 0:008
Table 3Identification results with different initial conditions for the positions
n1 n2 k2i k2 k1
4 4 1:2075� 10�4 1:0627� 10�4 6:1556� 10�5
4 4 1:0208� 10�4 1:0627� 10�4 6:1556� 10�5
1 9 1:2075� 10�4 1:1389� 10�4 5:6828� 10�5
1 9 1:0208� 10�4 1:1389� 10�4 5:6828� 10�5
0 0.2 0.4 0.6 0.8 1–2
–1.5
–1
–0.5
0
0.5
1
1.5
2x 10
–4
time (s)
erro
r (m
3 /s)
Pair(4,4)Pair(1,9)
e1
e2
Fig. 7. Evolution of the output errors between the pipeline and the twocandidate models.
0 2 4 6 8 104
6
8
10
12
14
Pre
ssur
e (m
)
0 2 4 6 8 100.012
0.013
0.014
0.015
0.016
Flo
w r
ate
(m3 /s
)
time (s)
H1
Hn+1
Q1
Qn
Fig. 8. Evolution of the pressures and flows at the extremes of the linewith leaks at 0.02 s and a pressure change at 0.5 s.
Table 4Parameters identification with a variation in the upstream pressure
Variation n1 n2 k2i k2 Error(%)
20% of nominalvalue
4 4 1:2207� 10�4 1:078� 10�4 2.3
10% of nominalvalue
4 4 1:2296� 10�4 1:075� 10�4 2.1
1720 C. Verde et al. / Advances in Water Resources 30 (2007) 1711–1721
are acceptable, since in general, the accuracy in the leak po-sition is more important than the outflows. Note that theprocedure given here cannot be implemented on-line, sincethe parameter zeq and the mean value of flow Q1eq can beonly obtained after the transient effects of the leaks in theresponse are neglected.
The robustness with respect to changes in operationconditions is analyzed considering variations of theupstream pressure after the leaks occurrence. Fig. 8 showsthe variation of 20% of the upstream nominal pressure at0.5 s. These changes modified the steady state of the pipe-line resulting:
K1 ¼ f13 m; 5 m; 0:01549 m3=s; 0:015 m3=sgFrom these values the key position zeq ¼ 71:39 m and flowQ1eq ¼ 0:01529 m3=s are obtained. Minimizing the error(36) the first row of Table 4 have been identified; the lastcolumn corresponds to the error with respect to the true va-lue. A similar experiment is carried on considering a changeof 10% with respect to the nominal value in the upstreampressure. The results are given in the second row of Table 4.
7. Conclusions
This paper presented a procedure to identify off-line theunknown parameters associated to the existence of multipleleaks in a pipeline based on a combination of transient andsteady state conditions. To describe the fluid, a family
FðzeqÞ of finite dimension nonlinear models assuming flowrate and pressured measurements at the extremes of thepipeline is obtained in terms of a key parameter zeq. It isshown that steady state conditions of the fluid with multi-ple leaks can be complemented with a dynamic model toreduce the search interval of the leaks identification issue.The family FðzeqÞ of models and the search interval ofthe unknown parameters have not been presented beforeand they are the main contributions. This procedure canbe extended for more leaks; search intervals for the newset of unknown parameters has to be established usingmeasurements in steady condition to reduce convergencyissue during the identification. The identification of thefamily member which satisfies the transient response canbe achieved with diverse optimization algorithms, herethe nonlinear least square algorithm of the MATLAB soft-ware is used. Simulation results are discussed and showthat the parameters are satisfactory estimated off-line inspite of operation point changes.
Acknowledgments
The authors are grateful to R. Carrera who carried outpart of the experimental work and to the DGAPA-UNAM(IN114303 project) and UASLP C(05-FAI-04-3.5) thatsupported part of this research.
References
[1] Ai-Shidhani I, Beck SBM, Staszewski WJ. Leak monitoring inpipelines networks using wavelet analysis. Key Eng Mater 2003;245–246:51–8.
[2] Billman Lothar, Isermann Rolf. Leak detection methods for pipe-lines. Automatica 1987;23(3):381–5.
[3] Boashash Boualem. Time frequency signal analysis and process-ing. Elsevier; 2003.
[4] Brunone Bruno. Transient test-based technique for leak detection inoutfall pipes. J Water Resour Plan Manage ASCE 1999:302–6.
[5] Chaudry Hanif M. Applied hydraulic transients. New York (USA): -Von Nostrand Reinhold Co; 1979.
[6] McCracken Daniel, Dorn William. Metodos Numericos y Programa-cion Fortran. Mexico: Limusa Wiley Press; 1969.
[7] da Silva HV, Morooka CK, Guilherme IR, da Fonseca TC, MendesJRP. Leak detection in petroleum pipelines using fuzzy system. JPetrol Sci Eng 2005;49:223–38.
[8] Betamio de Almeida A, Koelle E. Fluid transients in pipe net-works. USA: Computational Mechanics Publications, Co-publisherApplied Science; 1992.
[9] Dinis JM, Wojtanowicz AK, Scott SL. Leak detection in liquidsubsea flowlines with no recorded feed rate. J Energy Resour TechnolASME 1999;121:161–6.
[10] Ferrante Marco, Brunone Bruno. Pipe system diagnosis and leakdetection by unsteady-state tests: 1. Harmonic analysis. Adv WaterResour 2003;26:95–105.
[11] Frank Paul. Introduction to system sensitivity. New York: Aca-demic Press; 1978.
[12] Geiger G, Gregoritza W, Matko D. Leak detection and localisation inpipes and pipelines. In: European symposium on computer aidedprocess engineering-10, vol. 2, 2000. p. 781–6.
[13] Ghidaoui MS, Kolyshkin AA, Volodko I. A mathematical model fordetection of a partial blockage in pipelines using fluid transients. In:5th MATHMOD-Wienna, vol. 2, 2006. p. 4-1–8.
C. Verde et al. / Advances in Water Resources 30 (2007) 1711–1721 1721
[14] Korbicz Josef, Koscielny JM, Kowalczuk Z, Cholewa W. Detectingand locating leaks in transmission pipelines. Fault diagnosis. Ger-many: Springer; 2004. p. 821–64.
[15] Korbicz Josef, Koscielny JM, Kowalczuk Z, Cholewa W. Faultdiagnosis. Germany: Springer; 2004.
[16] Lee Pedro, Vitkovsky John, Lambert Martin, Simpson Angus, LiggettJames. Leak location using the pattern of the frequency responsediagram in pipelines: a numerical study. J Sound Vib 2005;284:1051–75.
[17] Liou CP. Pipeline leak detection and location. Proceedings ofinternational conference pipeline design and installation. NewYork: ASCE; 1990. p. 225–69.
[18] Ljung Lennart. System identification: theory for the user. NewJersey: Prentice Hall; 1987.
[19] Makar Jon, Chagnon Nathalie. Inspecting systems. Am Water WorksAssoc J 1999;91:36–46.
[20] MATLAB. Optimization. Math-Works, Inc., Natick, MA, 2005.[21] Patton Ron, Frank P, Clark R. Issues of fault diagnosis for dynamic
systems. London: Springer; 2000. p. 1–6 [Chapter Introduction].[22] Shields D, Ashton S, Daley S. Design of nonlinear observers for
detecting faults in hydraulic sub-sea pipelines. Control Eng Pract2001;9:297–311.
[23] Tanand K, Karney B, Pendlebury M, Zhang F. Inverse transientcalibration of water distribution systems using genetic algorithms. In:Proceedings of the conference on computing and control for the waterindustry, Exeter, UK, 1999.
[24] ?A3B2 twb=.5w?>Verde Cristina. Minimal order nonlinear observerfor leak diagnosis in pipelines. J Dyn Syst Measure Control ASME2004;126:467–72.
[25] Verde Cristina. Accommodation of multi-leaks positions in apipeline. Control Eng Practice 2005;13:1071–8.
[26] Verde Cristina, Vega Rafael, et al. Control avanzado e instrumen-tacion de vanguardia tecnologica. In: Diplomado PEMEX, Mexico,UNAM, 2005 [in Spanish].
[27] Verde Cristina, Visairo Nancy. Identificability of multi-leaks in apipeline. In: Proceedings of the American control conference 2004,July 2004. ISBN-0-7803-8336-2.
[28] Visairo Nancy. Deteccion y Localizacion de Fugas en un Ducto. PhDthesis, SEP-CENIDET, Cuernavaca, Mexico, 2004.
[29] Wang Xiao-Jian, Lambert Martin, Simpson Angus, LiggettJames, Vıtkovsky John. Leak detection in pipelines using thedamping of fluid transients. J Hydraul Eng 2005;128(7):697–711.