6

Click here to load reader

72e7e52de8282c64a0

Embed Size (px)

DESCRIPTION

pipe

Citation preview

Page 1: 72e7e52de8282c64a0

MODEL BASED PIPELINE MONITORINGWITH LEAK DETECTION

Espen Hauge∗ Ole Morten Aamo∗,1 John-Morten Godhavn ∗∗

∗Department of Engineering Cybernetics, NorwegianUniversity of Science and Technology, Trondheim, Norway

∗∗R&D, Statoil ASA, Trondheim, Norway

Abstract: We design a leak detection system consisting of an adaptive Luenberger-type observer based on a set of two coupled one dimensional first order nonlinearhyperbolic partial differential equations governing the flow dynamics. It is assumedthat measurements are only available at the inlet and outlet of the pipe, and outputinjection is applied in the form of boundary conditions. Heuristic update laws foradaptation of the friction coefficient and leak parameters are given, and simulationsdemonstrate their ability to detect, quantify and locate leaks. Particular attentionis given to time-varying boundary conditions, such as during pipeline shut-down. Ascenario consisting of leak detection followed by pipeline shut-down during whichthe leak is accurately quantified and located is successfully simulated for bothliquid and gas systems.

Keywords: Partial differential equations; Observers; Adaptive systems; Pipelineleaks

1. INTRODUCTION

Transportation of fluids in pipelines requires mon-itoring to detect malfunctioning such as leaks.In the petroleum industry, leaks from pipelinesmay potentially cause environmental damage, aswell as economic loss. These are motivating fac-tors, along with requirements from environmentalauthorities, for developing efficient leak detectionsystems. While some leak detection methods arehardware-based, relying on physical equipmentbeing installed along the pipeline, the focus ofthis paper is on software-based methods that workfor cases with limited instrumentation. In fact,instrumentation in the petroleum industry is usu-ally limited to the inlet and outlet of pipelines,only. This calls for sophisticated signal process-ing methods to obtain reliable detection of leaks.Some software-based leak detection methods per-

1 Corresponding author: [email protected]

form statistical analysis on measurements (blackbox), while others incorporate models based onphysical principles. Our method falls into the lat-ter category, in that we will use a dynamic modelof the pipe flow based on a set of two coupledhyperbolic partial differential equations.

There have been numerous studies on model basedleak detection. We mention here the most rel-evant ones with regard to our work. Based ona discretized pipe flow model, Billman and Iser-mann (1987) designed an observer with frictionadaptation. In the event of a leak, the outputsfrom the observer differs from the measurements,and this is exploited in a correlation techniquethat detects, quantifies and locates the leak. Verde(2001) used a bank of observers, computed by themethod for fault detection and isolation developedby Hou and Müller (1994). The underlying modelis a linearized, discretized pipe flow model on agrid of N nodes. The observers are designed in

Copyright © 2007 IFAC

Page 2: 72e7e52de8282c64a0

such a way that all but one will react to a leak.Which one of the N observers that does not reactto the leak depends on the position of the leak,and this is the mechanism by which the leak islocated. The outputs of the remaining observersare used for quantifying the leak. The bank ofobservers are computed using the recursive nu-merical procedure suggested by Hou and Müller(1994), however it was shown in Salvesen (2005)that due to the simple structure of the discretizedmodel, the observers may be written explicitly.This is important, because it removes the needfor recomputing the bank of observers when theoperating point of the pipeline is changed. Verde(2004) also proposed a nonlinear version, using anextremely coarse discretization grid.

Several companies offer commercial solutions topipeline monitoring with leak detection. Fantoft(2005) uses a transient model approach in con-junction with the commercial pipeline simulatorOLGA2000, while EFA Technologies (1987, 1990,1991) uses an event detection method that looksfor signatures of no-leak to leak transitions in themeasurements.

The detection method of Verde (2001) using abank of observers, can potentially detect multi-ple leaks. However, multiple simultaneous leaks isan unlikely event, so the complex structure of abank of N observers seems unnecessary. Aamo etal. (2006) instead employed ideas from adaptivecontrol, treating the magnitude and location of asingle point leak as constant unknown parametersin an adaptive Luenberger-type observer based ona set of two coupled one dimensional first ordernonlinear hyperbolic partial differential equations.Heuristic update laws for adaptation of the fric-tion coefficient, magnitude of the leak and positionof the leak were suggested. In the present paper,we continue the development of our leak detectionsystem by greatly improving the leak detectionperformance under time-varying boundary condi-tions. This is achieved by remodelling the leak.A comprehensive simulation study demonstratesthe leak detection system for both liquid and gassystems.

2. MATHEMATICAL MODEL

For liquid flow in a pipe we have the mass conser-vation

∂p

∂t+ u

∂p

∂x+ ρc2

∂u

∂x= 0, (1)

and the momentum conservation (ignoring fric-tion for now)

∂u

∂t+ u

∂u

∂x+1

ρ

∂p

∂x= 0, (2)

for (x, t) ∈ (0, L) × (0,∞), and where u(x, t)is flow velocity, p(x, t) is pressure, and ρ(x, t) is

density. The relation between pressure and densityis modelled as (Nieckele et al. (2001))

ρ(x, t) = ρref +p(x, t)− pref

c2, (3)

where ρref is a reference density at referencepressure pref , and c is the speed of sound in thefluid. Equation (1)—(2) also describes gas flow ina pipe, simply by replacing (3) with the ideal gaslaw. Under the conditions we consider, we assumec is sufficiently large to ensure ρ > 0. Definingk = c2ρref − pref and substituting (3) into (1)—(2) we obtain

∂p

∂t+ u

∂p

∂x+ (k + p)

∂u

∂x= 0, (4)

∂u

∂t+

c2

k + p

∂p

∂x+ u

∂u

∂x= 0. (5)

The boundary conditions are

u (0, t) = u0 (t) , (6)

p (L, t) = pL (t) . (7)

3. OBSERVER DESIGN

In reality, input signals to pipelines are usuallychoke openings at the inlet and outlet. Here,we instead view u0 (t) and pL (t) in (6)—(7) asinputs to the process, and the remaining boundaryquantities p0 (t) = p (0, t) and uL (t) = u (L, t) asprocess measurements. Aamo et al. (2006) showedthat a Luenberger-type observer consisiting of acopy of (4)—(5) and the boundary injections

u (0, t) = u0 (t) + c1− k01 + k0

ln

µk + p0 (t)

k + p (0, t)

¶, (8)

p (L, t) = (k + pL (t))

× expµ

kL − 1c (1 + kL)

(uL (t)− u (L, t))

¶− k. (9)

has favorable convergence properties for |k0| ≤ 1and |kL| < 1 when compared to a plain copy of theplant, that is u (0, t) = u0 (t) and p (L, t) = pL (t).Figure 1 shows the observer error in terms ofevolution in time of the L2(0, L) norm of u (x, t)−u (x, t) and p(x, t)− p(x, t) for the cases with andwithout output injection. Notice that when k0 = 1and kL = 1, (8)—(9) reduces to the plain copy.

4. ADAPTATION OF FRICTIONCOEFFICIENT

Adding friction to the model (4)—(5), we have themass balance

∂p

∂t+ u

∂p

∂x+ (k + p)

∂u

∂x= 0, (10)

and momentum conservation∂u

∂t+ u

∂u

∂x+

c2

k + p

∂p

∂x= − (1 +∆) f

2

|u|uD

, (11)

Page 3: 72e7e52de8282c64a0

0 5 10 15 20 25 300

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2

Time (s)

L 2 nor

m o

f obs

erve

r erro

r in

u

0 5 10 15 20 25 300

0.2

0.4

0.6

0.8

1

1.2

1.4

1.6

1.8

2x 106

Time (s)

L 2 nor

m o

f obs

erve

r err

or in

p

Fig. 1. Observer error with (solid) and without(dashed) output injection.

where D is the pipe diameter, and ∆ is consideredan unknown constant that accounts for uncer-tainty in the friction coefficient f , which is givenby Schetz and Fuhs (1996) as

1√f= −1.8log10

"µ/D

3.7

¶1.11+6.9

Red

#. (12)

/D is the pipe relative roughness, Red is theReynolds number defined as

Red =ρuD

μ, (13)

and μ is the fluid viscosity. The observer is then

∂p

∂t+ u

∂p

∂x+ (k + p)

∂u

∂x= 0, (14)

∂u

∂t+ u

∂u

∂x+

c2

k + p

∂p

∂x= −

³1 + ∆

´ f

2

|u| uD

, (15)

which incorporates an estimate ∆ of ∆, andwith boundary conditions (8)—(9). Consider theheuristic parameter update law

˙∆ = −κ∆ (ϕ1 + ϕ2) , (16)

where κ∆ is a strictly positive constant, and

ϕ1 = u (0)− u (0) + c ln

µk + p (0)

k + p (0)

¶, (17)

ϕ2 = u (L)− u (L) + c ln

µk + p (L)

k + p (L)

¶. (18)

Figure 2 shows the evolution of ∆ − ∆ when theinitial friction in the observer is twice that of theplant.

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-0.2

0

0.2

0.4

0.6

0.8

1

1.2

Time (min)

Erro

r in

estim

ate

of Δ

Fig. 2. Error in estimated friction factor, that is∆− ∆.

5. LEAK DETECTION

Adding a leak to the model (10)—(11), with ∆ = 0,we have the mass balance

∂p

∂t+ u

∂p

∂x+ (k + p)

∂u

∂x= −c

2

Afl (x, t) , (19)

and the momentum conservation

∂u

∂t+u

∂u

∂x+

c2

k + p

∂p

∂x= −f

2

|u|uD+1

A

c2

k + pufl (x, t) ,

(20)where A is the pipe cross sectional area. Assuminga point leak occuring at t = tl, we select fl (x, t)as

fl (x, t) = wlδ (x− xl)H (t− tl) , (21)

where wl and xl are the magnitude of the leak andposition of the leak, respectively, δ denotes theDirac distribution, and H denotes the Heavisidestep function. Aamo et al. (2006) treated wl as aconstant which led to poor leak localization per-formance for time-varying boundary conditions.In practice, the boundary conditions will mostlikely be time-varying since the logical thing to doas soon as a leak is detected, is to start shuttingdown the pipeline. In this case, the leak magni-tude will vary during the shut-down, violating theassumption that wl be constant. To overcome thisproblem, we propose to model the point leakagerate according to the valve equation

wl (t) = Cv

pρ (xl, t) (p (xl, t)− pamb), (22)

where Cv is a discharge coefficient and pamb isthe ambient pressure on the exterior of the pipe.While pamb is assumed known, Cv is an unknownconstant to be estimated by the leak detectionsystem. The observer now becomes

∂p

∂t+ u

∂p

∂x+ (k + p)

∂u

∂x

= −cCv

A

p(k + p (xl)) (p (xl)− pamb)δ (x− xl) ,

(23)

∂u

∂t+ u

∂u

∂x+

c2

k + p

∂p

∂x= − f

2

|u| uD

Page 4: 72e7e52de8282c64a0

+cCv

Au

sp (xl)− pamb

k + p (xl)δ (x− xl) , (24)

which incorporates estimates of the leak dischargecoefficient and position, Cv, xl. We consider theheuristic parameter update laws

˙Cv = κC (ϕ1 − ϕ2) , (25)

˙xl = −κx (ϕ1 + ϕ2) |ϕ1 + ϕ2|1γ−1 , (26)

where ϕ1 and ϕ2 are given in (17)—(18), andκC , κx and γ are strictly positive constants. Theupdate laws (25)—(26) are derived from those in(Aamo et al. 2006) taking the new leakage model(22) into account.

6. SIMULATION RESULTS

A comprehensive simulation study has been car-ried out for a 5 km long pipeline with a diam-eter of 20 inches, varying the many parametersin the process model and observer. Due to pageconstraints, we report here on selected key results.The parameters used are summarized in Tables 1and 3 for the oil and gas cases, respectively. Tun-ing parameters for the leak parameter update lawsare given in Tables 2 and 4. The most probablescenario in practice, is the one where the pipelineis shut down as a consequence of detecting a leak.This leaves a limited time window for quantifyingand locating the leak. A partial shut-down of thepipeline carrying oil is simulated by reducing thevelocity at the inlet to 10 percent of its initialvalue and the pressure at the outlet to 30 percentof its initial value over a period of 3 minutes. An il-lustration of the performance of the leak detectionsystem with these boundary conditions can beseen in Figure 3. The leak is very quickly detected,as shown by the steep increase in the magnitude-of-leak estimate immediately following the timewhen the leak occurs. An accurate estimate of theleak magnitude is obtained within a few seconds,while localization takes several minutes. Figure 4shows the corresponding results for the gas case,where the velocity at the inlet was decreased to 10percent of its initial value and the outlet pressureto 30 percent of its initial value over a period of 11minutes. Due to the compressibility of gas, givinga lower speed of sound, there is a longer time-lagbefore the leak is detected (a few seconds). Accu-rate estimates of the leak magnitude and positionare obtained in about a minute. The position ofthe leak shows some oscillatory behaviour, whichis related to grid-size and tuning, and may beremoved by filtering.

To further demonstrate the leak detection capabil-ities under time-varying boundary conditions, si-nusoid perturbations were applied to both ends ofthe pipeline carrying oil. The sinusoids are meantto represent the varying production rate set at the

0 2 4 6 8 10 121500

1600

1700

1800

1900

2000

2100

2200

2300

2400

2500Actual and estimated leak position

Time [min]

Posi

tion

of le

ak [m

]

observermodel

0 2 4 6 8 10 120

2

4

6

8

10

12

Siz

e of

leak

[kg/

s]Time [min]

Actual and estimated leak size

observermodel

0 2 4 6 8 10 120

0.5

1

1.5

2

2.5

3

3.5

4

4.5 x 10-4 Actual and estimated leak C v

Size

of C

v [-]

Time [min]

observermodel

Fig. 3. Oil, shut-down. Estimates for a leak at1548 m of with Cv = 4.05 · 10−4.

inlet and the choking at the outlet. The velocityperturbation at the inlet has an amplitude of 25percent of the initial value and a period of 3minutes. The pressure perturbation at the outlethas an amplitude of 10 percent of the initial valueand a period of 2 minutes. Figure 5 shows thatleak detection and quantification performs verywell under these boundary conditions, while local-ization suffers some oscillations at the frequencyof the perturbation.

Finally, we present a case showing the impor-tant effect of the chosen boundary injections, thatis, it compares results for k0 = kL = 0 (withboundary injection) with results for k0 = kL = 1(without boundary injection). Here, the bound-ary conditions of the process model, u0 and pL,are assumed to vary randomly (low-pass filtered,however), while a leak occurs at 1548 m withCv = 2.55 · 10−4. The amplitude of the input

Page 5: 72e7e52de8282c64a0

0 2 4 6 8 10 122000

2100

2200

2300

2400

2500

2600

2700Actual and estimated leak position

Time [min]

Posi

tion

of le

ak [m

]

observermodel

0 2 4 6 8 10 120

1

2

3

4

5

6Actual and estimated leak size

Siz

e of

leak

[kg/

s]

Time [min]

observermodel

0 2 4 6 8 10 120

1

2

x 10-4 Actual and estimated leak C v

Size

of C

v [-]

Time [min]

observermodel

Fig. 4. Gas, shut-down. Estimates for a leak at1548 m with Cv = 2.55 · 10−4.

velocity varies within 10 percent of the initialvalue, and the output pressure varies within 0.7percent of the initial value. Figure 6 clearly showsthe crucial effect of output injection, as well as theleak detection capability under randomly varyinginput.

7. CONCLUDING REMARKS

We have designed a leak detection system forpipelines consisting of an adaptive Luenberger-type observer and heuristic update laws for theparameters characterizing a point leak. The onlyavailable process information is flow velocity andpressure at the inlet and outlet of the pipe. Sim-ulations demonstrate accurate quantification andlocalization of the leak under transient operationof the pipeline, such as for instance during shut-down. Current work focuses on replacing the sim-ple model presented in this paper with a state-of-the-art fluid flow simulator and incorporating

0 2 4 6 8 10 122500

2600

2700

2800

2900

3000

3100Actual and estimated leak position

Time [min]

Posi

tion

of le

ak [m

]

observermodel

0 2 4 6 8 10 120

2

4

6

8

10

12Actual and estimated leak size

Siz

e of

leak

[kg/

s]

Time [min]

observermodel

0 2 4 6 8 10 120

0.5

1

1.5

2

2.5

3

3.5

4

4.5 x 10-4 Actual and estimated leak C v

Size

of C

v [-]

Time [min]

observermodel

Fig. 5.Oil, sinusoid. Estimates for a leak at 3009m of with Cv = 4.05 · 10−4.

Parameter ValueL 5000 mD 20 inpref 5 · 105 Papamb 101325 Papin itia l 101325 Pauin itia l 2 m/su = u0 2 m/sp = pL 5 · 105 Paρref 870 kg/m3

win 353 kg/sμref 1.04 · 10−1 Pa·sc 1227 m/sK 1.31 · 109 Pa

Table 1. Pipeline and fluid parametersfor oil.

Page 6: 72e7e52de8282c64a0

0 2 4 6 8 10 12800

1000

1200

1400

1600

1800

2000

2200

2400

2600Actual and estimated leak position

Time [min]

Posi

tion

of le

ak [m

]

observer w/ output injectionmodelobserver w/o output injection

0 2 4 6 8 10 120

2

4

6

8

10

12

14Actual and estimated leak size

Siz

e of

leak

[kg/

s]

Time [min]

observer w/ output injectionmodelobserver w/o output injection

0 2 4 6 8 10 120

1

2

3

4

5

6 x 10-4 Actual and estimated leak C v

Size

of C

v [-]

Time [min]

observer w/ output injectionmodelobserver w/o output injection

Fig. 6. Gas, random. Leak detection with andwithout output injection.

Parameter Valueκc 8.12 · 10−4κx 100γ 4

Table 2. Tuning parameters for oil.

Parameter ValueL 5000 mD 20 inpref 0 Papamb 101325 Papin itia l 5016390 Pauin itia l 4 m/su = u0 4 m/sp = pL 5016390 Paρref 52.67 kg/m3

win 43 kg/sμref 1.20 · 10−5 Pa·sc 308 m/s

Table 3. Pipeline and fluid parametersfor gas.

Parameter Valueκc 8.12 · 10−4κx 35γ 4

Table 4. Tuning parameters for gas.

the presented boundary conditions and parameterupdate laws into it. The increased accuracy of theflow calculations provided by such a simulator isexpected to improve the leak detection capabilitydescribed in this paper even further.

ACKNOWLEDGEMENTS

We gratefully acknowledge the support from theGas Technology Center at NTNU, Statoil, and theNorwegian Research Council.

REFERENCES

O.M. Aamo, J. Salvesen, and B.A. Foss, "Ob-server design using boundary injections forpipeline monitoring and leak detection," Pro-ceedings of the 2006 International Symposiumon Advanced Control of Chemical Processes,Gramado, Brazil, April 2-5, 2006.

L. Billmann and R. Isermann, "Leak detectionmethods for pipelines," Automatica, vol. 23,no. 3, pp. 381—385, 1987.

EFA Technologies, Inc., "Events at a leak," Tech-nical paper available from EFA on request,1987.

EFA Technologies, Inc., "Effect of pressure mea-surement resolution on PPA leak detection,"Technical paper available from EFA on re-quest, 1990.

EFA Technologies, Inc., "PPA event suppressioncapability," Technical paper available fromEFA on request, 1991.

Fantoft, "D-SPICE overview: Production man-agement systems," Fantoft Process Technolo-gies, 2005.

M. Hou and P. Müller, "Fault detection andisolation observers," International Journal ofControl, vol. 60, no. 5, pp. 827—846, 1994.

A.O. Nieckele, A.M.B. Brage, and L.F.A.Azevedo, "Transient pig motion through gasand liquid pipelines," Journal of Energy Re-sources Technology, vol. 123, no. 4, 2001.

J. Salvesen, Leak Detection by Estimation in anOil Pipeline, MSc Thesis, NTNU, 2005.

J.A. Schetz and A.E. Fuhs, Handbook of Fluid Dy-namics and Fluid Machinery, Volume 1, Fun-damentals of Fluid Mechanics, John Wiley &Sons, 1996.

C. Verde, "Multi-leak detection and isolation influid pipelines," Control Engineering Prac-tice, vol. 9, pp. 673—682, 2001.

C. Verde, "Minimal order nonlinear observer forleak detection," Journal of Dynamic Systems,Measurement and Control, vol. 126, pp. 467—472, 2004.