You are on page 1of 6

Proceedings of the

2005 IEEE Conference on Control Applications


Toronto, Canada, August 28-31, 2005

TA4.2

Modelling Two-Phase Flow for Control Design in Oil Well Drilling


Gerhard Nygaard and Geir Nvdal

Abstract Today, marginal oil wells are being drilled and the
operating margins for the bottom-hole well pressures during
drilling are becoming narrower. This requires an improved
control of the pressure balance between the reservoir pore
pressure and the well bottom-hole pressure. In oil well drilling
applications, the pressure is typically controlled manually by
adjusting the choke valve. This paper proposes a simple feedback PI-control scheme with feed-forward compensation of the
known disturbances. A low-dimensional dynamic state model
for two-phase flow has been developed to be able to tune the
control parameters. The proposed method is presented and
evaluated using a detailed oil well drilling simulator. The results
show that the proposed control design keeps the bottom-hole
pressure within the operating margins.

I. I NTRODUCTION
Controlling the bottom-hole pressure in an oil well during
drilling can be a challenging task, especially when using a
gas-liquid mixture as circulation fluid. The pressure balance
between the pressure in the reservoir and the pressure in
the well during the drilling phase has great impact on the
fluid rates from the reservoir when the oil well is set into
production at a later stage.
During oil well drilling, a drill fluid is pumped into
the drill string. This drill fluid is flowing down the drill
pipe, through the drill bit, and upwards through the annulus
between the drill string and the sidewall of the well. One
of the purposes of the drill fluid is to transport the cuttings
from the drilling process up to the surface. Another important
scope of the drill fluid is to maintain a certain pressure
gradient along the length of the well.
Drilling the oil well when the pressure in the well is
below the reservoir pore pressure have several benefits. The
most important benefit is that the porous formation is less
damaged, since the particles from the drilling process do
not penetrate into the formation. This leads to a higher
production rate when the oil well is set into production.
The well pressure is managed during the drilling process
by adjusting the density and the flow rate of the drilling
fluids. In case the reservoir pore pressure is lower than
the hydrostatic pressure caused by the drill string liquids,
gas has to be injected to reduce the well pressure. The
complex behaviour of the resulting two-phase flow results
in challenges regarding the effort of maintaining a correct
well pressure gradient along the well. In addition, migration
of reservoir fluids (gas and/or liquids) from the reservoir
formation makes the task even more difficult. A schematic
of an oil well drilling system is shown in Fig. 1.
G. Nygaard is with RF-Petroleum, RF-Rogaland Research, Bergen,
Norway Gerhard.Nygaard@rf.no
G. Nvdal is with RF-Petroleum, RF-Rogaland Research, Bergen, Norway Geir.Naevdal@rf.no

0-7803-9354-6/05/$20.00 2005 IEEE

Fig. 1.

Schematic layout of an oil well drilling system

During drilling, disturbances that cause fluctuations in the


well pressure might occur. The operator has to make proper
actions to avoid variations in the well pressure. Disturbances
arise from several sources. One source is the hydrostatic
pressure of the well. The well length is increasing, and
hence the well pressure is increased. Another source is that
more of the reservoir is exposed to the well pressures,
as drilling progresses. The reservoir conditions, such as
reservoir pressure and permeability results in influx from the
reservoir into the well. Due to this, the well flow rate and
density of the well fluid mixture is changed. A third source
of disturbance is caused by the pipe connection procedure
which is performed at equal time intervals during drilling.
The drill string consists of several pipe segments which
are jointed together. As the well is becoming longer, new
pipe segments are added to the drill string using the pipe
connection procedure. The pipe connection procedure mainly
consists of five operations. First the rotation of the drill
string is stopped. Secondly the pumping of the drill fluid
into the drill string is stopped. Then a new pipe segment is
mounted to the drill string. Action number four is to restart
the drill fluid pumps, and finally the drill string rotation is restarted. This procedure, and especially stopping and starting
of the drill fluid cause severe fluctuations in the well fluids
flow rates, and influence the well pressure. This paper is
focusing on how to avoid such fluctuations a simple PIcontrol scheme.
To compensate for variations in the well pressure, the
operator might modify the fluid composition and flow rates

675

into the drill string. This will change the density of the fluid
mixture in the well, affecting the well pressure. However,
well pressure is not modified instantly, since the new fluid
composition need some time to be filled into the whole well.
Another way the operator might modify the well pressure, is
to adjust the choke valve on top of the annulus part of the
well. Changing the valve opening causes a rapid response in
the bottom-hole pressure.
Both methods are used to compensate the bottom-hole
pressure, but during pipe connections the well pressure is
normally maintained using the choke valve. One of the
main problems for controlling the well pressure during pipe
connections is that the transmission of the signal is usually
based on a mud pulse telemetry system. This system is
sending various data from the bit system, but the system is
only operating while the drill fluid is circulating. This means
that the well pressure at the bit is not available. The control
system must then rely on a model of the well system.
II. C ONTROL SCHEME
Today, in normal drilling operations the choke valve is
adjusted manually by a trained drilling engineer. The fluid
composition and pressures are evaluated based on steadystate values, and the choke is adjusted accordingly. Recently, new procedures for manually adjusting the flow rates
and choke opening prior and during pipe connections are
suggested [1]. These procedures are based on a detailed
mechanistic dynamic two-phase flow model. The model is
used to evaluate the well conditions and to plan the pipe
connection prior to the actual action. The choke valve is
then adjusted manually according to the calculated set-points.
Difficulties might arise if the pipe connection procedure is
not performing as planned.
A different approach for avoiding the pipe connection
pressure fluctuations is described in [2]. A prototype mechanical system which is using various seals and valves has
been developed to be able to continue to pump the drill fluids
even during the pipe connections. The mechanical system
increases the complexity of the drilling system.
Under-balanced drilling has some similarities with gaslifted wells, and a control system utilizing a low-order
model is described in [3]. A fourth approach is suggested
by [4], where an automatic control system is operating the
choke on-line during the pipe connection. The control system
is utilizing a non-linear model predictive control scheme
combined with first-principles model. The model is used for
on-line evaluation of the well pressures and fluid flows, and
predictions are made to find the most optimal choke opening
during pipe connections.
This paper presents and evaluates a simple PI-control
scheme for controlling the bottom-hole pressure in the well
during drilling and pipe connections procedures.
Since it is not possible to tune the parameters in the PI
control using experiments and the Ziegler-Nichols closedloop method [5] in our case, the control setting can be found
by developing a simple model of the process. In [6], a loworder dynamic model is developed for controlling slugging

flow in a gas-lifted production well. An equivalent model for


the under-balanced drilling case will be developed and the
control parameters is found based on experiments performed
on the low-order model.
III. M ODELLING TWO - PHASE FLOW
Several methods for modelling the dynamic two-phase
flow in the well can be used. One method is to focus on the
major effects in the well, and look at certain phenomena. This
type of model has only a few states, such as flow rates of the
fluid components. Another approach is to model the various
effects more detailed, and use spatial discretization of the
well system. This type of detailed mechanistic modelling is
very time-consuming to perform. The main purpose for both
methods is to be able to calculate the bottom-hole pressure
sufficiently accurate to be able to control the actual pressure.
In control engineering, modelling is used to improve the
control system ability to follow the given reference values.
This type of models is often linear, or is being linearized
around stable conditions. In 2-phase fluid flow systems, the
interaction between the gas and the liquid are causing nonlinear behaviour. In addition, the actuators and disturbances
might easily bring the fluid flow outside the validity envelope
of a linearized model.
The low order model is set up in a similar way as in [6],
modeling the well as a two-tank system. A mass balance and
a pressure balance is set up for the drill string and annulus,
respectively. The model is based on the assumption the gas
is evenly distributed within the liquid in the whole well.
The density of the mixture of gas and liquid mix is given
m +m
by mix = gV l where mg is the gas mass, ml is the
liquid mass, and V is the volume. The additional density
due to particles from the drilling process is not taken into
account. This simplified oil well system is modelled using
a combination of the mass balance of the fluids and the
pressure balance [7].
From now on subscript l denotes liquid and subscript g
denotes gas.
A. Mass balance
Fig. 2 is a schematic of the well, showing where the
mass balances of the drill string and the mass balance of
the annulus. The mass balance is divided into two systems,
the drill string and the annulus between the well and the drill
string.
The mass balances for the fluids in the drill string are
dm
given by dtg,d = wg,pump wg,bit , mg,d (0) = m0,g,d ,
dm
and dtl,d = wl,pump wl,bit , ml,d (0) = m0,l,d where
m,d is the mass in the drill string, w,pump is the mass flow
at the pump, and w,bit is the mass flow at the drill bit.
The mass balance equations for the annulus are given by
dmg,a
= wg,bit + wg,res wg,choke , mg,a (0) = m0,g,a
dt
dml,a
=
wl,bit +wl,res wl,choke , ml,a (0) = m0,l,a where
dt
m,a is the mass in the annulus and w,choke is the mass flow
at the exiting choke valve.

676

before the drill bit flow restriction and before the choke valve
and patm is the atmospheric pressure.
C. Well length
When drilling the oil well, the length of the well is
increasing according to the drilling rate. The length of the
well has substantial influence of the well pressure. The well
length L is chosen as a state in the dynamic systems and
L(0) = L0 where vd is the drilling
given by dL
dt = vd ,
rate, and L0 is the initial well length.
To solve these balance equations, the relations between
the pressures and flows are given below.
D. Gas entrainment
Fig. 2.

If the void fraction of liquid in the mixture, m , is given


then this void fraction should be used to
as m = mix
l
calculate the gas mass rate and liquid mass rate. However,
when the velocity is reduced, the friction pressure is reduced
and the gas is expanding. This effect causes the liquid to
flow out of the well and the gas to be contained in the
well. The gas mass rate at low mixture velocities
should


1
then be modified to e = m + (1 m ) 1+en(v
t vm )
where is a factor for entrainment at low velocities, n
corresponds to the slope of the entrainment, vt is a constant
referring to the mixture velocity at the transition between
full gas entrainment and minimum gas entrainment and vm
is the current velocity of the mixture. To calculate the mass
flow rates of gas and liquid, the liquid void fraction e
is used. This gives the relations wl = e wmix and wg =
(1 e ) wmix .

Mass balance of simplified oil well geometry

E. Pump mass rates


Fig. 3.

Pressure balance of simplified oil well geometry

B. Pressure balance
In addition to the mass balance, the pressure balance in
the system is important due to the frictional pressure induced
by the velocity of the liquid. When gas in injected into the
well, the gas volume is changed due to gas compression.
The hydrostatic pressure also varies due to variation in the
mixture density. The fluid flows through the restriction at
the drill bit at the bottom of the well and at the choke valve
at the top of the well. In Fig. 3 the various pressures are
indicated.
The pressure balance is evaluated at two points and
given as mass acceleration at the bottom of the drill
string and as mass acceleration at the top of the annulus.
dwmix,bit
=
The pressure balance equations are given by
dt
pd,c +pd,g pd,f pbit pa,c pa,g pa,f
, wmix,bit (0) = 0 and
Ad
dwmix,choke
pa,c pchoke patm
=
,
wmix,choke (0) = 0
dt
Aa
where A is the cross sectional area of the drill string
and annulus, the subscript c is the compression pressure,
subscript h is the hydrostatic pressure and subscript f is the
frictional pressure, wmix, is the mixture flow acceleration

The pump mass rates are stable during drilling, but are
stopped when pipe connection are performed. The set-point
of the pumps are the total flow rate, wp , and to deliver these
rates, the pump pressure is adjusted accordingly. The void
fraction between the gas mass rate and the liquid mass rate
are fixed using p . The resulting pump rates are found using
wl,p = p wp and wg,p = (1 p ) wp .
F. Reservoir mass rates
To model the flow from the reservoir into the well, a
simple relation called the productivity index P I can be used.
This is a linear relation of the pressure difference between the
reservoir and the well. The mass rate from the reservoir, wr
can be calculated using the relation wr = P I (pa,bot pres )
where the mass flow from the reservoir is wl,r = r wmix
and wg,r = (1 r ) wmix .
G. Valve equations
The mass rate, w, through a restriction is given by the
simple valve equation from [8], w = Cd z p, where Cd
is the discharge coefficient of the restriction, z is the area of
the restriction, and p is the differential pressure across the
restriction. This relation is used both at the drill bit and the
choke valve.

677

TABLE I
W ELL AND RESERVOIR DATA

H. Gas compression pressure


The gas is compressible and the gas volume is dependent
on the pressure conditions. The relation between the gas
mass and the compression pressure is based to the perfect
gas law in a pressurized tank pc,tank = g Mg T, where
is the gas constant, Mg is the molecular weight of the
gas, and T is the average temperature. In the model, the
mixture of the gas and liquid in the well cause an average
compression pressure along the depth of the well. Hence,
we model the compression pressure as pc,well = patm +
K1 (pc,tank patm ) , where and K1 is a compression factor.

Parameter
Initial well length, hw,i
Liquid circulation rate, wl
Gas circulation rate, wg
Reservoir height, hr
Drilling rate, vd
Reservoir pore pressure, pr
Well set-point pressure, pw
Reservoir collapse pressure, pc

Value
2000 m
24 kg/s
2 kg/s
100 meter
0.01 m/s
215 bar
205 bar
185 bar

Mixture Flow Rate In


Mass Flow [kg/s]

I. Hydrostatic pressure
The hydrostatic pressure ph in the well is calculated based
upon the relation between the mixture density mix , gravity
g and well depth h and is given as ph = mix gh.

Choke Index [01]

1
0.5
0

Pressure [bar]

100

Pressure [bar]

220

50

Bottomhole Pressure

200
Well pressure
Reservoir pressure
Collapse Pressure

180
160
140

the relative roughness of the pipe. The Reynolds number Re


is calculated using [9] Re = vD
where is the viscosity
of the fluid.

IV. C ASE D ESCRIPTION

A test case is defined to evaluate the PI-control scheme.


Initially, the well is 2000 m deep, and the well is drilled 100
m into a reservoir. Well data and reservoir data is given in
Table I. Fig. 4 shows the simulation of the case using the detailed model. Initially the fluid flow in the well is in a steadystate condition, and the drilling is initiated. After 10 minutes,
the first pipe connection procedure is started. The rotation of
the drill string and the circulation of fluids are stopped for
10 minutes. Then the circulation pumps are re-started, and
the drill string starts to rotate. The second pipe connection
procedure is initiated after 52 minutes, and is completed
after 64 minutes. In this simulation, no adjustments of the

10

Choke Differential Pressure

The frictional pressure loss is caused by the friction


between the fluid and the walls of the well and the drill string.
Lv 2
The friction pressure loss is calculated by [9] pf = f2D
where v is the fluid velocity and D is the hydraulic diameter.
To calculate the friction
factor f , the
Haaland equation [9]

1.11 

/D
1
6.9
1.8 log10 Re + 3.7
is used. Here /D is

When setting up the model, a total of 7 states have


been used to describe the system. The state vector is x =
[mg,d , ml,d , mg,a , ml,d , wmix,d , wmix,d , L]. The choke area
is defined to be u = [zchoke ]. The inflow from the pumps and
the drilling rate are treated as a disturbances of the system
v = [wg,pump , wg,pump , vd ] .
An explicit scheme for calculating the parameters is given
x
x, u, v ) , x0 = 0, and y = g (x) where y is the
by d
dt = f (
sensors values.
Several of the parameters in this model is not easily found,
and the model has to be tuned to describe the well system
more accurate. The need for experimental tuning is therefore
required for a specific case.

20

Choke Opening Index

J. Frictional pressure

K. Calculation scheme

30

Fig. 4.

20

40

60
Minutes

80

100

120

Simulated drilling case with no control actions

choke opening are performed. During each pipe connection,


the bottom hole pressure is falling from about 205 bar and
down towards 145 bar. As the reservoir collapse pressure is
at 185 bar, actions must be taken to avoid that the pressure is
falling below this limit. After the pipe connection procedure
is completed, the pressure slowly increases towards the 205
bar set-point. However, the pressure raises above the setpoint, due to a slugging flow regime in the well. The slugging
flow is caused by a segregation of the gas-liquid mixture
during the pipe connection.
The data from the simulation of the detailed model is used
to tune the low-dimensional state model. The fluid mass rates
into the drill string are the same in the low-order model as
the detailed model. During pumping the liquid rate is 24 kg/s
and gas rate is 2 kg/s, and during pipe connections both rates
are set to 0 kg/s.
Fig. 5 shows the flow from the annulus section for both
models. The inaccuracies in this case are due to the limited
modelling of the gas entrainment, and the deviation between
the detailed model and the low-order model has increased.
Comparison of the models with respect to fluid flow rate
from the reservoir are given in Fig. 6. The detailed model
shows increased fluid flow from the reservoir as more of
the reservoir has contact with the well. The low-order model
could be improved if a different method of modelling than
the Production Index method was used.
When comparing the pressures between the low-order
model and detailed mechanistic model, the low-order model

678

Drillstring Top Pressure


300

30

250

25

Pressure [bar]

Mass Flow [kg/s]

Annulus Liquid Flow Out


35

20
15
10

150
100
50

Loworder model
Detailed model

5
0

200

20

40

60
Minutes

80

100

120

Loworder model
Detailed model
0

20

40

60
Minutes

80

100

120

Drillstring Bottom Pressure

Annulus Gas Flow Out


300

Pressure [bar]

Mass Flow [kg/s]

2.5
2
1.5
1

250

200

150

0.5
0

Loworder model
Detailed model

Loworder model
Detailed model
100

20

Fig. 5.

40

60
Minutes

80

100

120

20

40

Fig. 7.

Mass flow rates out of annulus

100

120

Annulus Top Pressure


30

25
Pressure [bar]

Mass Flow [kg/s]

80

Drill string pressures

Reservoir Liquid Flow Out


10

6
4
2
0

60
Minutes

Loworder model
Detailed model
0

20

40

60
Minutes

80

100

20
15
10
5

120

Loworder model
Detailed model
0

20

40

60
Minutes

80

100

120

Reservoir Gas Flow Out

Annulus Bottom Pressure


220
200

0.2

Pressure [bar]

Mass Flow [kg/s]

0.25

0.15
0.1
0.05
0

Loworder model
Detailed model
0

20

Fig. 6.

40

60
Minutes

80

100

180
160
140
Loworder model
Detailed model

120
120

100

Mass flow rates out of reservoir

20

40

Fig. 8.

has to be adjusted with respect to the friction pressure


losses in the drill-string and the annulus, in addition to the
compression factor of the gas and liquid mixture. In Fig. 7
the pressures at the top of the drillstring and the bottom of
the drill-string are compared.
In Fig. 8 the pressures in the annulus section are shown.
The low-order model is less accurate. This is due to the
inaccuracies in the low-order model with regards to the
mixture flow rates.
However, the low-order model gives relatively accurate
values for the flow rates and pressures in the well during
drilling. This low-order model can now be used for designing
the control scheme for the drilling process.
V. C ONTROL S CHEME T UNING AND E VALUATION
The low-order model is used to define the control parameters for the PI-control scheme with feed-forward compensation of the pump flow rate. The method used for designing
the parameters is the Ziegler-Nichols method for closed loops
systems [5]. The feed-forward compensation are selected
to be Kf = 0.6. The closed loop-system are brought to
a critical conditions, marginally stable, by setting the PIcontrol parameters to Kp,critical = 285 and Ti = . The
resulting fluctuations are shown in Fig. 9. From these sim-

60
Minutes

80

100

120

Annulus pressures

ulations, the critical time period is found, Tcritical = 76.2.


Based on the Ziegler-Nichols rules, the control parameters
can be calculated. According to these rules, the proportional
gain Kp = 0.45Kp,critical = 128.25 and the integral time
constant should be Ti = Tcritical
= 63.5. The controller
1.2
is then updated using these parameters and the results are
shown in Fig. 10.
To evaluate the control scheme, the PI-controller is compared with manual adjustment of the choke valve. When
evaluating the controller, the detailed mechanistic model are
used. In Fig. 11 the manual control method are used, where
the choke is set to a value defined by the operator. As can
be seen, this manual method is working quite good, but it
can be observed that the bottom-hole pressure is increasing
above reservoir pore pressure after the pipe connection is
finished.
In Fig. 12 the PI-control scheme is evaluated using the
detailed mechanistic model is used. As can be seen, the fluctuations in the bottom-hole pressure are a bit higher relative
to the fluctuations in Fig. 10. However, when comparing with
the case where the choke valve is manually controlled, there
is a significant improvement. The bottom-hole pressure are
kept within the margins during the whole operation.

679

Mass Flow [kg/s]

Mixture Flow Rate In

20
10
0

Choke Index [01]

Choke Opening Index


1

0
1
0.5
0
Choke Differential Pressure

Pressure [bar]

0
100

100

Pressure [bar]

Pressure [bar]

10

0.5

Choke Differential Pressure

220

50
0
Bottomhole Pressure

50
0
Bottomhole Pressure

Pressure [bar]

20

Choke Opening Index


Choke Index [01]

Mass Flow [kg/s]

Mixture Flow Rate In


30

30

220
Well pressure
Reservoir pressure
Collapse Pressure

180
160
0

Fig. 9.

20

40

60
Minutes

80

100

120

Well pressure
Reservoir pressure
Collapse Pressure

180
160
140

200

140

200

Fig. 12.

20

40

60
Minutes

80

100

120

Simulating PI-control with detailed model

Well data using PI-control with critical parameters

VI. C ONCLUSION
Using a PI-control scheme for adjusting the choke valve
during oil well drilling, improves the stability of the bottomhole pressure during the whole drilling operations, including during pipe connections procedures. By using a lowdimensional state model a set of efficient control parameters
can be found.
However, if the circulation flow rates are being modified,
or the inflow from the reservoir is changing, then the simple
low-order model is not describing the real process sufficiently
accurately. The low-order model must then be corrected, and
new control parameters must be found.

Mass Flow [kg/s]

Mixture Flow Rate In


30
20
10
0

Choke Index [01]

Choke Opening Index


1
0.5
0

Pressure [bar]
Pressure [bar]

Choke Differential Pressure


100

220

50

ACKNOWLEDGMENT

0
Bottomhole Pressure

200
Well pressure
Reservoir pressure
Collapse Pressure

180
160
140

Fig. 10.

20

40

60
Minutes

80

100

120

Well data using PI-control with adjusted parameters

Mass Flow [kg/s]

Mixture Flow Rate In


30
20
10
0

Choke Index [01]

Choke Opening Index


1
0.5
0

Pressure [bar]
Pressure [bar]

Choke Differential Pressure


100

220

50
0
Bottomhole Pressure

200
Well pressure
Reservoir pressure
Collapse Pressure

180
160
140

Fig. 11.

20

40

60
Minutes

80

100

120

Simulating manual control with detailed model

The authors would like to thank RF-Rogaland Research


for the permission to publish this work. The project is cosponsored by the Research Council of Norway.
R EFERENCES
[1] C. Perez-Tellez, J. R. Smith, and J. K. Edwards, Improved bottomhole
pressure control for underbalanced drilling operations, in Proceedings
for the IADC/SPE Drilling Conference, Dallas, Texas, USA, Mar.24,
2004, paper SPE 87225.
[2] J. W. Jenner, H. L. Elkins, F. Springett, P. G. Lurie, and J. S. Wellings,
The continuous circulations system: An advance in constant pressure
drilling, in SPE Annual Technical Conference and Exhibition, Houston,
Texas, USA, Sept.2629, 2004, paper SPE 90702.
[3] G. O. Eikrem, L. Imsland, and B. A. Foss, Stabilization of gas-lifted
wells based on state estimation, in IFAC International Symposium on
Advanced Control of Chemical Processes, Hong Kong, China, Jan.11
14, 2004.
[4] G. H. Nygaard, E. H. Vefring, K. K. Fjelde, G. Nvdal, R. J.
Lorentzen, and S. Mylvaganam, Bottomhole pressure control during
pipe connection in gas dominant wells, in SPE/IADC Underbalanced
Technology Conference and Exhibition, The Woodlands, Texas, USA,
Oct.1112, 2004, paper SPE 91578.
[5] G. Stephanopoulos, Chemical Process Control. Englewood Cliffs, New
Jersey: Prentice-Hall Inc., 1984.
[6] E. Storkaas, S. Skogestad, and J. M. Godhavn, A low-dimensional
dynamic model of severe slugging for control design and analysis, in
Multiphase03, San Remo, Italy, June1113, 2003.
[7] J. G. Balchen and K. I. Mumme, Process Control. Structures and
applications. New York, USA: VanNostrand Reinhold, 1988.
[8] O. Egeland and J. T. Gravdahl, Modelling and Simulation for Automatic
Control. Trondheim, Norway: MarineCybernetics, 2002.
[9] F. M. White, Fluid Mechanics, 4th ed. Boston, USA: McGraw-Hill
Int., 1999.

680

You might also like