nonlinear moving horizon observer for estimation of states ... · nonlinear moving horizon observer...

9
NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES AND PARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS Amirhossein Nikoofard * Tor Arne Johansen Glenn-Ole Kaasa Center for Autonomous Marine Operations and Systems (AMOS) Department of Engineering Cybernetics Norwegian University of Science and Technology Trondheim, Norway Email: [email protected] ABSTRACT It is not possible to directly measure the total mass of gas and liquid in the annulus and geological properties of the reservoir during petroleum exploration and production drilling. Therefore, these parameters and states must be estimated by on- line estimators with proper measurements. This paper describes a nonlinear Moving Horizon Observer to estimate the annular mass of gas and liquid, and production constants of gas and liquid from the reservoir into the well during Under-Balanced Drilling with measuring the choke pressure and the bottom-hole pressure. This observer algorithm based on a low-order lumped model is evaluated against Joint Unscented Kalman filter for two different simulations with low and high measurement noise co- variance. The results show that both algorithms are capable of identifying the production constants of gas and liquid from the reservoir into the well, while the nonlinear Moving Horizon Ob- server achieves better performance than the Unscented Kalman filter. NOMENCLATURE UBD Under-balanced drilling. UKF Unscented Kalman filter LOL Low-order lumped model. * Address all correspondence to this author. INTRODUCTION In recent years there has been increasing interest in Under- Balanced Drilling (UBD). UBD has the potential to both de- crease drilling problems and improve hydrocarbon recovery. In conventional (over-balanced) drilling, or Managed Pressure Drilling (MPD), the pressure of the well must be kept greater than pressure of reservoir to prevent influx from entering the well. But in an UBD operation, the hydrostatic pressure in the circulating downhole fluid system must be kept greater than pres- sure of collapse and less than pressure of reservoir p coll (t , x) < p well (t , x) < p res (t , x) (1) at all times t and positions x. Since hydrostatic pressure in the circulating downhole fluid system is intentionally lower than the reservoir formation pressure, influx fluids (oil, free gas, water) from the reservoir are mixed with rock cuttings and drilling fluid (“mud”) in the annulus. Therefore, modeling of the UBD oper- ation should be considered as multiphase flow. Different aspects of modeling relevant for UBD have been studied in the litera- ture [1–4]. Estimation and control design in MPD has been investigated by several researchers [5–12]. However, due to the complexity of multi-phase flow dynamics in UBD operations, there are few studies on estimation and control of UBD operations [1, 13–16]. Nygaard et al. [13] compared and evaluated the performance of Proceedings of the ASME 2014 Dynamic Systems and Control Conference DSCC2014 October 22-24, 2014, San Antonio, TX, USA DSCC2014-6074 1 Copyright © 2014 by ASME

Upload: vuongkhue

Post on 17-Mar-2019

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Nonlinear Moving Horizon Observer for Estimation of States ... · NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES AND PARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS Amirhossein

NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES ANDPARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS

Amirhossein Nikoofard∗Tor Arne JohansenGlenn-Ole Kaasa

Center for Autonomous Marine Operations and Systems (AMOS)Department of Engineering Cybernetics

Norwegian University of Science and TechnologyTrondheim, Norway

Email: [email protected]

ABSTRACTIt is not possible to directly measure the total mass of

gas and liquid in the annulus and geological properties of thereservoir during petroleum exploration and production drilling.Therefore, these parameters and states must be estimated by on-line estimators with proper measurements. This paper describesa nonlinear Moving Horizon Observer to estimate the annularmass of gas and liquid, and production constants of gas andliquid from the reservoir into the well during Under-BalancedDrilling with measuring the choke pressure and the bottom-holepressure. This observer algorithm based on a low-order lumpedmodel is evaluated against Joint Unscented Kalman filter for twodifferent simulations with low and high measurement noise co-variance. The results show that both algorithms are capable ofidentifying the production constants of gas and liquid from thereservoir into the well, while the nonlinear Moving Horizon Ob-server achieves better performance than the Unscented Kalmanfilter.

NOMENCLATUREUBD Under-balanced drilling.UKF Unscented Kalman filterLOL Low-order lumped model.

∗Address all correspondence to this author.

INTRODUCTIONIn recent years there has been increasing interest in Under-

Balanced Drilling (UBD). UBD has the potential to both de-crease drilling problems and improve hydrocarbon recovery.In conventional (over-balanced) drilling, or Managed PressureDrilling (MPD), the pressure of the well must be kept greaterthan pressure of reservoir to prevent influx from entering thewell. But in an UBD operation, the hydrostatic pressure in thecirculating downhole fluid system must be kept greater than pres-sure of collapse and less than pressure of reservoir

pcoll(t,x)< pwell(t,x)< pres(t,x) (1)

at all times t and positions x. Since hydrostatic pressure in thecirculating downhole fluid system is intentionally lower than thereservoir formation pressure, influx fluids (oil, free gas, water)from the reservoir are mixed with rock cuttings and drilling fluid(“mud”) in the annulus. Therefore, modeling of the UBD oper-ation should be considered as multiphase flow. Different aspectsof modeling relevant for UBD have been studied in the litera-ture [1–4].

Estimation and control design in MPD has been investigatedby several researchers [5–12]. However, due to the complexityof multi-phase flow dynamics in UBD operations, there are fewstudies on estimation and control of UBD operations [1, 13–16].Nygaard et al. [13] compared and evaluated the performance of

Proceedings of the ASME 2014 Dynamic Systems and Control Conference DSCC2014

October 22-24, 2014, San Antonio, TX, USA

DSCC2014-6074

1 Copyright © 2014 by ASME

Page 2: Nonlinear Moving Horizon Observer for Estimation of States ... · NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES AND PARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS Amirhossein

the extended Kalman filter, the ensemble Kalman filter and theunscented Kalman filter to estimate the states and production in-dex in UBD operation. Lorentzen et al. [14] designed an en-semble Kalman filter to tune the uncertain parameters of a two-phase flow model in the UBD operation. In Nygaard et al [15],a finite horizon nonlinear model predictive control in combina-tion with an unscented Kalman filter was designed for control-ling the bottom-hole pressure based on a low order model devel-oped in [1], and the unscented Kalman filter was used to esti-mate the states, and the friction and choke coefficients. Nikoo-fard et al. [16] designed Lyapunov-based adaptive observer, re-cursive least squares and joint unscented Kalman filter based ona low-order lumped model to estimate states and parameters dur-ing UBD operations by using the calculated total mass of gas andliquid. The performance of adaptive estimators are compared andevaluated for two cases. This paper estimates states and parame-ters only by using real-time measurements of the choke and thebottom-hole pressures.

Due to mathematical complexity presented by nonlinearity,state and parameter estimation of nonlinear dynamical systems isone of the challenging topics in the control theory and has beenthe subject of many studies since its advent. Nonlinear MovingHorizon Observer is one of the powerful method which estimatesstates and parameters simultaneously [17–19]. At each samplingtime, a Moving Horizon Observer estimate the state and parame-ter by minimizing a cost function over the previous finite horizon,subject to the nonlinear model equations. Robustness to lack ofpersistent excitation and measurement noise is due to the use ofan apriori prediction model as well as some modifications to thebasic MHE algorithm [20, 21]. The original Kalman filter basedon linear model was developed to estimate both state and pa-rameter of the system usually known as an augmented Kalmanfilter. Several Kalman filter techniques have been developed towork with non-linear system. The unscented Kalman filter hasbeen shown to have a better performance than other Kalman fil-ter techniques for nonlinear system in same cases [22, 23].

Total mass of gas and liquid in the well could not be mea-sured directly, as well as some geological properties of the reser-voir such as production constants of gas and liquid from thereservoir might vary and could be uncertain during drilling oper-ations. Therefore, they must be estimated by adaptive estimatorsduring UBD operations. It is assumed that the bottom-hole pres-sure (BHP) readings are transmitted continuously to the surfacethrough a wired pipe telemetry with a pressure sensor at the mea-surement while drilling (MWD) tool [24]. This paper presentsthe design of a nonlinear Moving Horizon Observer based on anonlinear two-phase fluid flow model to estimate the total massof gas and liquid in the annulus and geological properties of thereservoir during UBD operation. The performance of this meth-ods is evaluated against Joint Unscented Kalman Filter for thecase of pipe connection operations where the main pump is shutoff and the rotation of the drill string and the circulation of fluids

is stopped. The estimators are compared to each other in termsof speed of convergence, sensitivity of noise measurement, andaccuracy.

This paper consists of the following sections: The Modelingsection presents a low-order lumped model based on mass andmomentum balances for UBD operation. The Observer sectionexplains nonlinear Moving Horizon Observer for simultaneouslyestimating the states and model parameters of a nonlinear systemfrom noisy measurements. In the Simulations section, the simu-lation results are provided for state and parameter estimation. Atthe end the conclusion that has been made through this paper arepresented.

MODELINGModeling of Under-balanced Drilling (UBD) in an oil well

is a challenging mathematical and industrial research area. Dueto existence of multiphase flow (i.e. oil, gas, drilling mud andcuttings) in the system, the modeling of the system is verycomplex. Multiphase flow can be modeled as a distributed (in-finite dimension) model or a lumped (finite dimension) model.A distributed model is capable of describing the gas-liquidbehavior along the annulus in the well. In this paper, a low-orderlumped (LOL) model is used. The lumped model considers onlythe gas-liquid behavior at the drill bit and the choke system. Thismodeling method is very similar to the two-phase flow modelfound in [1,25]. The simplifying assumptions of the LOL modelare listed as below:

• Ideal gas behavior• Simplified choke model for gas, mud and liquid leaving the

annulus• No mass transfer between gas and liquid• Isothermal condition and constant system temperature• Constant mixture density with respect to pressure and temper-

ature.• Liquid phase considers the total mass of mud, oil, water, and

rock cuttings.

The simplified LOL model equations for mass of gas andliquid in an annulus are derived from mass and momentum bal-ances as follows

mg = wg,d +wg,res(mg,ml)−mg

mg +mlwout(mg,ml) (2)

ml = wl,d +wl,res(mg,ml)−ml

mg +mlwout(mg,ml) (3)

where mg and ml are the total mass of gas and liquid, respec-tively. The liquid phase is considered incompressible, and ρlis the liquid mass density. The gas phase is compressible and

2 Copyright © 2014 by ASME

Page 3: Nonlinear Moving Horizon Observer for Estimation of States ... · NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES AND PARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS Amirhossein

occupies the space left free by the liquid phase. wg,d and wl,dare the mass flow rate of gas and liquid from the drill string,wg,res and wl,res are the mass flow rates of gas and liquid fromthe reservoir. The total mass outflow rate is denoted by wout .

The total mass outlet flow rate is calculated by the valveequation

wout = KcZ√

mg +ml

Va

√pc− pc0 (4)

where Kc is the choke constant. Z is the control signal to thechoke opening, taking its values on the interval (0,1]. The to-tal volume of the annulus is denoted by Va. pc0 is the constantdownstream choke pressure (atmospheric). The choke pressureis denoted by pc, and derived from ideal gas equation

pc =RT

Mgas

mg

Va− mlρl

(5)

where R is the gas constant, T is the average temperature of thegas, and Mgas is the molecular weight of the gas. The flow fromthe reservoir into the well for each phase is commonly modeledby the linear relation with the pressure difference between thereservoir and the well. The mass flow rates of gas and liquidfrom the reservoir into the well are given by

wg,res = Kg(pres− pbh) (6)wl,res = Kl(pres− pbh) (7)

where pres is the known pore pressure in the reservoir, and Kg andKl are the production constants of gas and liquid from the reser-voir into the well, respectively. Finally, the bottom-hole pressureis given by the following equation

pbh = pc +(mg +ml)gcos(∆θ)

A+∆p f (8)

where ∆p f is the friction pressure loss in the well, g is the grav-itational constant and ∆θ is the average angle between gravityand the positive flow direction of the well. Reservoir parame-ters could be evaluated by seismic data and other geological datafrom core sample analysis. But, local variations of reservoir pa-rameters such as the production constants of gas and liquid maybe revealed only during drilling. So, it is valuable to estimatethe partial variations of some of the reservoir parameters whiledrilling is performed [13].

TABLE 1. MEASUREMENTS AND INPUTS OF OBSERVER

Variables Type

Choke pressure (pc) Measurement

Bottom-hole pressure (pbh) Measurement

Drill string mass flow rate of gas (wg,d) Input

Drill string mass flow rate of liquid (wl,d) Input

Choke opening (Z) Input

OBSERVERIn this section, first the Nonlinear Moving Horizon Observer

to estimate states and parameters in UBD operation is explained.Then, the joint unscented Kalman filter is presented for sameproblem.The choke and the bottom-hole pressures are outputsand measurements of the system. The measurements and inputsof the observer are summarized in Table 1. The production con-stant of gas (Kg) and liquid (Kl) from the reservoir into the wellare unknown and must be estimated. Below Kg and Kl are de-noted by θ1 and θ2, respectively.

Nonlinear Moving Horizon ObserverThe LOL model based on equations (2)-(3) can be repre-

sented by a discrete explicit scheme given by

xk = f (xk−1,uk−1)+qk (9)yk = h(xk)+ rk (10)

h(xk) = [pc, pbh]T (11)

where qk and rk are the process noise and the measurement noise,and uk is the input. At time t, the information vector of the N +1last measurements and the N last inputs is defined as

It = col(yt−N , ...,yt ,ut−N , ...,ut−1) (12)

N + 1 is the finite horizon or window length . This informationcan be summarized in a single vector for measurement and inputas follow

Yt =

yt−N

yt−N+1...yt

Ut =

ut−N

ut−N+1...

ut−1

(13)

3 Copyright © 2014 by ASME

Page 4: Nonlinear Moving Horizon Observer for Estimation of States ... · NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES AND PARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS Amirhossein

Nonlinear Moving Horizon Observer cost function can be con-sidered as follows

J(xt−N,t , xt−N,t , It) = ‖W (Yt −Ht(xt−N,t))‖2+‖V (xt−N,t − xt−N,t)‖2

(14)

where V,W are the positive definite weight matrices. The costfunction (14) consists of two standard terms: one is a term thatpenalizes the deviation between the measured and predicted out-puts, the other term weights the difference between the estimatedstate at the start of the horizon from its prediction. The Nonlin-ear Moving Horizon Observer minimizes the cost function (14)over the window of the current measurement and the historicalmeasurement, subject to the nonlinear model equations. xo

t−N,tis the optimal solution of this problem.The sequence of the stateestimates xi,t (i = t −N, . . . , t) can be yielded from the noisefree nonlinear model dynamics. So, a sequence of denoted asestimated output vectors Yt can be formulated as follows

Yt = H(xt−N,t ,Ut) = Ht(xt−N,t) =

h(xt−N,t)

h◦ f ut−N (xt−N,t)...

h◦ f ut−1 ◦ . . .◦ f ut−N (xt−N,t)

(15)

A one-step prediction xt−N,t is determined from xot−N−1,t−1 as

follow

xt−N,t = f (xot−N−1,t−1,ut−N−1) t = N +1,N +2, . . . (16)

For parameter estimation, x is augmented with the unknown pa-rameter vector θ with the dynamic model θt+1 = θt .

Joint Unscented Kalman FilterThe Unscented Kalman Filter (UKF) was introduced in

[26–28]. The main idea behind the method is that approxima-tion of a Gaussian distribution is easier than approximation onof an arbitrary nonlinear function. The UKF estimates the meanand covariance matrix of estimation error with a minimal set ofsample points (called sigma points) around the mean by using adeterministic sampling approach known as the unscented trans-form. The nonlinear model is applied to sigma points instead of alinearization of the model. So, this method does not need to cal-culate explicit Jacobian or Hessian. More details can be foundin [22, 23, 27, 28].

Two common approaches for estimation of parameters andstate variables simultaneously are dual and joint UKF techniques.The dual UKF method uses another UKF for parameter estima-tion so that two filters run sequentially in every time step. At each

time step, the state estimator updates with new measurements,and then the current estimate of the state is used in the parameterestimator. The joint UKF augments the original state variableswith parameters and a single UKF is used to estimate augmentedstate vector. The joint UKF is easier to implement [23, 28].

Using the joint UKF, the augmented state vector is definedby xa = [X ,θ ]. The state-space equations for the the augmentedstate vector at time instant k is written as:

x1,kx2,kθ1,kθ2,k

=

f1(Xk−1,θ1,k−1)f2(Xk−1,θ2,k−1)

θ1,k−1θ2,k−1

= f a(Xk−1,θk−1,uk−1)+qk

(17)

mg and ml are denoted by x1 and x2, respectively.

SIMULATION RESULTSThe parameter values for the simulated well, LOL model

and reservoir are summarized in Table 2. These parameters areused from the offshore test of WeMod simulator [29]. WeMod isa high fidelity drilling simulator developed by the InternationalResearch Institute of Stavanger (IRIS). The process noise covari-ance matrix used in this plant model (LOL model) is

Q = diag[10−1,10−1,10−4,10−4]

UKF parameters are determined empirically and used in theseries of equations presented in the Appendix. The parametervalues for nonlinear Moving Horizon Observer and joint UKFare summarized in Table 3.

The time-step used for discretizing the dynamic model andadaptive estimator was 1 seconds. The initial values for the esti-mated and real states and parameters are as follows

x1 = 5446.6, x2 = 54466.5, θ1 = 5 , θ2 = 5

x1 = 4629.6, x2 = 46296.2, θ1 = 4.25, θ2 = 4.25

The scenario in this simulation is as follows, first the drillingin a steady-state condition is initiated, then at t = 10 min the mainpump is shut off to perform a connection procedure. The rotationof the drill string and the circulation of fluids are stopped for 10mins. Next after making the first pipe connection at t = 20 minthe main pump and rotation of the drill string are restarted. Thenat t=52 min the second pipe connection procedure is started, andis completed after 12 mins. Two different simulations with lowand high measurement noise covariances are performed. In the

4 Copyright © 2014 by ASME

Page 5: Nonlinear Moving Horizon Observer for Estimation of States ... · NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES AND PARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS Amirhossein

TABLE 2. PARAMETER VALUES FOR WELL AND RESERVOIR

Name LOL Unit

Reservoir pressure (pres) 270 bar

Collapse pressure (pcoll) 255 bar

Friction pressure loss (∆p f ) 10 bar

Well total length (Ltot ) 2300 m

Well vertical depth (L) 1720 m

Drill string outer diameter (Dd) 0.1397 m

Annulus volume (Va) 252.833 m3

Annulus inner diameter (Da) 0.2445 m

Liquid flow rate (wl,d) 44 Kg/s

Gas flow rate (wg,d) 5 Kg/s

Liquid density (ρl) 1475 Kg/m3

Production constant of gas (Kg) 5×10−6 Kg/Pa

Production constant of liquid (Kl) 5×10−5 Kg/Pa

Gas average temperature (T ) 25 ◦C

Average angle (∆θ ) 0.726 rad

Choke constant (Kc) 0.013 m2

TABLE 3. PARAMETER VALUES FOR ESTIMATORS

Parameter Value Parameter Value

W 100 V diag (0.1,0.1, 0.03, 0.05)

N +1 15 κ 0

β 2 α 0.5

first simulation, the choke and the bottom-hole pressures mea-surements are corrupted by zero mean additive white noise withthe following covariance matrix

R = diag[0.5,0.5]

Figures 1 and 2 show the measured and estimated total mass ofgas and liquid, respectively. The nonlinear Moving Horizon Ob-server is more accurate than UKF to estimate the total mass ofgas and liquid. The estimation of the production constants of gasand liquid from the reservoir into the well are shown in Figures 3and 4, respectively. In estimation of the production constants ofgas and liquid from the reservoir into the well, nonlinear Mov-

ing Horizon Observer has a very fast convergence rate, about 30seconds or less. UKF take much longer and it is in the orderof minutes. After convergence to the value, the correct nonlinearMoving Horizon Observer has more small fluctuations than UKFfor estimation of the production constants of gas and liquid.

0 20 40 60 80 100 1205460

5470

5480

5490

5500

5510

5520

5530

5540

5550

5560

Time (Min)

Ma

ss (

Kg

)

Total mass of gas

NMH adaptive observer

Real system

UKF

FIGURE 1. TOTAL MASS OF GAS WITH THE LOW MEASURE-MENT NOISE COVARIANCE

0 20 40 60 80 100 120

5.2

5.25

5.3

5.35

5.4

5.45

x 104

Time (min)

Ma

ss (

Kg

)

Total mass of liquid

NMH Adaptive observer

Real system

UKF

FIGURE 2. TOTAL MASS OF LIQUID WITH THE LOW MEA-SUREMENT NOISE COVARIANCE

In second simulation, the choke and the bottom-hole pres-sures are corrupted by zero mean additive white noise with thefollowing covariance matrix

R = diag[50,50]

Figures 5 and 6 show the measured and estimated total mass ofgas and liquid, respectively. It is found that the Nonlinear Mov-ing Horizon Observer is more accurate than UKF to estimate thetotal mass of gas and liquid. The estimation of the production

5 Copyright © 2014 by ASME

Page 6: Nonlinear Moving Horizon Observer for Estimation of States ... · NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES AND PARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS Amirhossein

0 2 4 6 8 10 12 14 16 18 204.2

4.4

4.6

4.8

5

5.2

5.4

Time (min)

Kg

(Kg

/s /

10

ba

r)

Estimation of Kg

NMH adaptive observer

Real parameter

UKF

FIGURE 3. PRODUCTION CONSTANT OF GAS WITH THELOW MEASUREMENT NOISE COVARIANCE

0 2 4 6 8 10 12 14 16 18 203.8

4

4.2

4.4

4.6

4.8

5

5.2

5.4

5.6

Estimation of Kl

Time (min)

Kl

(Kg

/s /

ba

r)

Real paramter

NMH adaptive observer

UKF

FIGURE 4. PRODUCTION CONSTANT OF LIQUID WITH THELOW MEASUREMENT NOISE COVARIANCE

constants of gas and liquid from reservoir into the well are il-lustrated in Figures 7 and 8, respectively. In estimation of theproduction constants of gas and liquid from the reservoir intothe well, the nonlinear Moving Horizon Observer has a very fastconvergence rate, about 30 seconds or less, while the UKF takesalmost 7 minutes.

In this paper, performance of these adaptive estimators isevaluated through the root mean square error (RMSE) metric.The RMSE metric for nonlinear Moving Horizon Observer andUKF in two cases are summarized in Table 4.

According to the RMSE metric table, nonlinear MovingHorizon Observe has the better performance than joint UKF forstate and parameter estimation while it has low and high mea-surement noise covariances.

CONCLUSIONSThis paper describes nonlinear Moving Horizon Observer to

estimate states and parameters during pipe connection procedurein UBD operations. The low-order lumped model presented here

0 20 40 60 80 100 1205450

5460

5470

5480

5490

5500

5510

5520

5530

5540

5550

5560

Time (min)

Ma

ss (

Kg

)

Total mass of gas

NMH adaptive observer

Real system

UKF

FIGURE 5. TOTAL MASS OF GAS WITH THE HIGH MEASURE-MENT NOISE COVARIANCE

0 20 40 60 80 100 1205.15

5.2

5.25

5.3

5.35

5.4

5.45

5.5x 10

4

Time (min)

Ma

ss (

Kg

)

Total mass of liquid

NMH adaptive observer

Real system

UKF

FIGURE 6. TOTAL MASS OF LIQUID WITH THE HIGH MEA-SUREMENT NOISE COVARIANCE

0 2 4 6 8 10 12 14 16 18 204

4.5

5

5.5

Time (min)

Kg

(Kg

/s /

10

ba

r)

Estimation of Kg

NMH adaptive observer

Real parameter

UKF

FIGURE 7. PRODUCTION CONSTANT OF GAS WITH THEHIGH MEASUREMENT NOISE COVARIANCE

only captures the major phenomena of the UBD operation. Simu-lation results demonstrate satisfactory performance of nonlinearMoving Horizon Observer and joint UKF for state and param-eter estimation during pipe connection procedure with low andhigh measurement noise covariances. It is found that the nonlin-ear Moving Horizon Observer shows better convergence and per-

6 Copyright © 2014 by ASME

Page 7: Nonlinear Moving Horizon Observer for Estimation of States ... · NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES AND PARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS Amirhossein

0 2 4 6 8 10 12 14 16 18 204.6

4.7

4.8

4.9

5

5.1

5.2

5.3

Time (min)

Kl

(Kg

/s /

ba

r)

Estimation of Kl

NMH adaptive observer

Real Paramter

UKF

FIGURE 8. PRODUCTION CONSTANT OF LIQUID WITH THEHIGH MEASUREMENT NOISE COVARIANCE

TABLE 4. RMSE METRIC

Method R x1 x2 θ1 θ2

Moving Horizon Observer 0.5 0.315 10.3 0.04 0.100

UKF 0.5 0.328 36.4 0.078 0.152

Moving Horizon Observer 50 0.978 34.9 0.115 0.667

UKF 50 1.631 96.3 0.084 0.177

formance than joint UKF with low and high measurement noisecovariances. According to the RMSE metric, nonlinear MovingHorizon Observer can perform better in terms of accuracy androbustness to measurement noise.

ACKNOWLEDGMENTThe authors gratefully acknowledge the financial support

provided to this project through the Norwegian Research Counciland Statoil ASA (NFR project 210432/E30 Intelligent Drilling).We would like to thank Florent Di Meglio, Ulf Jakob Aarsnes,and Agus Hasan for their contribute my to the modeling.

References[1] Nygaard, G., and Nævdal, G., 2006. “Nonlinear model pre-

dictive control scheme for stabilizing annulus pressure dur-ing oil well drilling”. Journal of Process Control, 16(7),August, pp. 719–732.

[2] Evje, S., and Fjelde, K. K., 2002. “Hybrid flux-splittingschemes for a two-phase flow model”. Journal of Compu-tational Physics, 175, pp. 674–70.

[3] Storkaas, E., Skogestad, S., and Godhavn, J.-M., 2003.“A low-dimensional dynamic model of severe slugging for

control design and analysis”. In 11th International Confer-ence on Multiphase flow (Multiphase03), pp. 117–133.

[4] Lage, A. C., Fjelde, K. K., and Time, R. W., 2003. “Under-balanced drilling dynamics: Two-phase flow modeling andexperiments”. SPE Journal, 8(1), March, pp. 61–70.

[5] Kaasa, G.-O., Stamnes, Ø. N., Aamo, O. M., and Ims-land, L. S., 2012. “Simplified hydraulics model used forintelligent estimation of downhole pressure for a managed-pressure-drilling control system”. SPE Drilling and Com-pletion, 27(1), March, pp. 127–138.

[6] Zhou, J., Stamnes, Ø. N., Aamo, O. M., and Kaasa, G.-O., 2011. “Switched control for pressure regulation andkick attenuation in a managed pressure drilling system”.IEEE Transactions on Control Systems Technology, 19(2),pp. 337–350.

[7] Stamnes, Ø. N., Zhou, J., Aamo, O. M., and Kaasa, G.-O.,2009. “Adaptive observer design for nonlinear systems withparameteric uncertainties in unmeasured state dynamics”.In IEEE Conference on Decision and Control.

[8] Nikoofard, A., Johansen, T. A., Mahdianfar, H., and Pavlov,A., 2013. “Constrained mpc design for heave disturbanceattenuation in offshore drilling systems”. In OCEANS-Bergen, 2013 MTS/IEEE, pp. 1–7.

[9] Zhou, J., and Nygaard, G., 2011. “Automatic model-basedcontrol scheme for stabilizing pressure during dual-gradientdrilling”. Journal of Process Control, 21(8), September,pp. 1138–1147.

[10] Nikoofard, A., Johansen, T. A., Mahdianfar, H., and Pavlov,A., 2014. “Design and comparison of constrained mpc withpid controller for heave disturbance attenuation in offshoremanaged pressure drilling systems”. Marine TechnologySociety Journal, 48(2), pp. 90–103.

[11] Mahdianfar, H., Pavlov, A., and Aamo, O. M., 2013. “Jointunscented kalman filter for state and parameter estimationin managed pressure drilling”. In European Control Con-ference, IEEE.

[12] Paasche, M., Johansen, T. A., and Imsland, L., 2011. “Reg-ularized and adaptive nonlinear moving horizon estimationof bottomhole pressure during oil well drilling”. In IFACWorld Congress, Milano.

[13] Nygaard, G., Nævdal, G., and Mylvaganam, S., 2006.“Evaluating nonlinear kalman filters for parameter esti-mation in reservoirs during petroleum well drilling”. InComputer Aided Control System Design, 2006 IEEE Inter-national Conference on Control Applications, 2006 IEEEInternational Symposium on Intelligent Control, IEEE,pp. 1777–1782.

[14] Lorentzen, R., Nævdal, G., and Lage, A., 2003. “Tuning ofparameters in a two-phase flow model using an ensemblekalman filter”. International Journal of Multiphase Flow,29(8), August, pp. 1283–1309.

[15] Nygaard, G. H., Imsland, L. S., and Johannessen, E. A.,

7 Copyright © 2014 by ASME

Page 8: Nonlinear Moving Horizon Observer for Estimation of States ... · NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES AND PARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS Amirhossein

2007. “Using nmpc based on a low-order model for con-trolling pressure during oil well drilling”. In 8th Interna-tional IFAC Symposium on Dynamics and Control of Pro-cess Systems, Vol. 1, pp. 159–164.

[16] Nikoofard, A., Johansen, T. A., and Kaasa, G.-O., 2014.“Design and comparison of adaptive estimators for under-balanced drilling”. In American Control Conference(ACC), IEEE, pp. 5681–5687.

[17] Jang, S. S., Joseph, B., and Mukai, H., 1986. “Comparisonof two approaches to on-line parameter and state estimationof nonlinear systems”. Industrial & Engineering ChemistryProcess Design and Development, 25(3), pp. 809–814.

[18] Rao, C. V., and Rawlings, J. B., 2000. “Nonlinear movinghorizon state estimation”. In Nonlinear model predictivecontrol. Springer, pp. 45–69.

[19] Michalska, H., and Mayne, D. Q., 1995. “Moving horizonobservers and observer-based control”. Automatic Control,IEEE Transactions on, 40(6), pp. 995–1006.

[20] Johansen, T. A., Sui, D., and Nybø, R., 2013. “Regular-ized nonlinear moving horizon observer with robustness todelayed and lost data”. IEEE TRANSACTIONS ON CON-TROL SYSTEMS TECHNOLOGY, 21(6), pp. 2114–2128.

[21] Sui, D., and Johansen, T. A., 2011. “Moving horizon ob-server with regularisation for detectable systems withoutpersistence of excitation”. International Journal of Con-trol, 84(6), pp. 1041–1054.

[22] Simon, D., 2006. Optimal state estimation: Kalman, Hinfinity, and nonlinear approaches. Wiley. com.

[23] Wan, E. A., and van der Merwe, R., 2002. The UnscentedKalman Filter, in Kalman Filtering and Neural Networks(ed S. Haykin). John Wiley & Sons, New York, USA,March, ch. 7.

[24] Hernandez, M., MacNeill, D., Reeves, M., Kirkwood, A.,Lemke, S., Ruszka, J., and Zaeper, R., 2008. “High-speed wired drillstring telemetry network delivers in-creased safety, efficiency, reliability, and productivity tothe drilling industry”. In SPE Indian Oil and Gas Tech-nical Conference and Exhibition, no. 113157-MS, Societyof Petroleum Engineers.

[25] Aamo, O. M., Eikrem, G., Siahaan, H., and Foss, B. A.,2005. “Observer design for multiphase flow in verticalpipes with gas-lift—-theory and experiments”. Journal ofprocess control, 15(3), pp. 247–257.

[26] Julier, S. J., Uhlmann, J. K., and Durrant-Whyte, H. F.,2000. “A new method for the nonlinear transforma-tion of means and covariances in filters and estimators”.IEEE Transactions on Automatic Control, 45(3), March,pp. 477–482.

[27] Julier, S. J., and Uhlmann, J. K., 2004. “Unscented filteringand nonlinear estimation”. Proceedings of the IEEE, 92(3),March, pp. 401 – 422.

[28] van der Merwe, R., 2004. “Sigma-point kalman filters

for probabilistic inference in dynamic state-space models”.PhD thesis, Oregon Health & Science University, April.

[29] Nyggard, G., and Gravdal, J., 2007. Wemod for matlabuser’s guide. Tech. Rep. 2007/234, International ResearchInstitute of Stavanger AS (IRIS), Bergen, Norway.

Appendix A: UKFA set of 2L+1 sigma points is derived from the augmented

state

(χk−1)0 = xk−1

(χk−1)i = xk−1 +(√

(L+λ )PK−1)i , i = 1, ...,L (18)

(χk−1)i = xk−1− (√(L+λ )PK−1)i−L , i = L+1, ...,2L

where L is the dimension of the augmented states.(√(L+λ )PK−1)i is column i of the matrix square root of

(L+λ )PK−1. (χk−1)i is the ith column of the sigma point matrixχk−1. The design parameter λ is defined by

λ = α2(L+κ)−L (19)

The spread of the sigma points around the state estimate isdenoted by the constant α and usually set to 10−4 < α < 1, κ isa secondary scaling parameter usually set to zero [28]. The UKFhas two distinct steps: prediction and correction. In UKF predic-tion step, compute the predicted state mean x−k and the predictederror covariance P−k as

(χk)i = f a((χk−1)i) , i = 0, ...,2L (20)

x−k =2L

∑i=0

W (m)i (χk)i (21)

P−k =2L

∑i=0

W (c)i [(χk)i− x−k ][(χk)i− x−k ]

T +Qk (22)

where Q is the process covariance matrix. W (m)i and W (c)

i aredefined by

W (m)0 =

λ

(L+λ )(23)

W (m)i =

12(L+λ )

, i = 1, ...,2L

W (c)0 =

λ

(L+λ )+(1−α

2 +β ) (24)

W (c)i =

12(L+λ )

, i = 1, ...,2L

8 Copyright © 2014 by ASME

Page 9: Nonlinear Moving Horizon Observer for Estimation of States ... · NONLINEAR MOVING HORIZON OBSERVER FOR ESTIMATION OF STATES AND PARAMETERS IN UNDER-BALANCED DRILLING OPERATIONS Amirhossein

W (m) and W (c) are the weighting matrix for the state mean calcu-lation and the covariance calculation, respectively. The scalingparameter β is used to incorporate part of the prior knowledge ofthe distribution of state vector . For Gaussian distribution, β = 2is optimal [27]. In UKF correction step, the predicted weightedmean measurement can be computed as follows

(Yk)i = h((χk)i) , i = 0, ...,2L (25)

y−k =2L

∑i=0

W (m)i (Yk)i (26)

In the UKF formulation, the Kalman gain is computed asfollows

Kk = Pxk yk P−1yk yk

(27)

where

Pxk yk =2L

∑i=0

W (c)i [(χk)i− x−k ][(Yk)i− y−k ]

T (28)

Pyk yk =2L

∑i=0

W (c)i [(Yk)i− y−k ][(Yk)i− y−k ]

T +Rk (29)

covariance of the measurement and the cross-covariance of thestate and measurement are denoted by Pyk yk and Pxk yk , respec-tively. Rk is the measurement noise covariance matrix. Finally,the last step is to compute the updated state mean xk and the up-dated error covariance Pk given by

xk = x−k +Kk(yk− y−k ) (30)

Pk = P−k −KkPyk yk KTk (31)

9 Copyright © 2014 by ASME