You are on page 1of 13

Journal of Process Control 68 (2018) 73–85

Contents lists available at ScienceDirect

Journal of Process Control


journal homepage: www.elsevier.com/locate/jprocont

Flow and pressure control of underbalanced drilling operations using


NMPC
Torbjørn Pedersen a,∗ , Ulf Jakob F. Aarsnes b,c , John-Morten Godhavn d
a
Norwegian University of Science and Technology (NTNU), Trondheim, Norway
b
International Research Institute of Stavanger (IRIS), Oslo, Norway
c
DrillWell – Drilling and Well Centre for Improved Recovery, Stavanger, Norway
d
Statoil Research Centre, Trondheim, Norway

a r t i c l e i n f o a b s t r a c t

Article history: This work evaluates the use of non-linear model predictive control (NMPC) for multivariate control of
Received 1 April 2016 pressure and flow during underbalanced drilling (UBD) using a fit-for-purpose mechanistic model. Flow
Received in revised form 31 October 2016 and pressure control are instrumental to the stability, safety, and successful drilling of a well. Failure
Accepted 1 May 2018
to keep within the pressure envelope may have severe economic and environmental consequences. A
relevant drilling scenario with different control objectives is evaluated to show the impact of the tuning
Keywords:
and configuration of the control system. It is shown that with a sufficiently good model match, it is
Non-linear model predictive control
possible to achieve good performance with small deviations from the selected operational criteria, even
Underbalanced drilling
Multiphase-flow
when there are large changes in operational area. The multivariate control system manipulates choke
Drilling automation pressure, pump flow, and separator set-points to simultaneously achieve both downhole and topside
Drift-flux model objectives. The optimization problem is solved within the relevant time dynamics of the system.
Simulation © 2018 Published by Elsevier Ltd.

1. Introduction This means that the reservoir might be producing during drilling,
and that if the reservoir contains gas there will be complex mul-
1.1. Underbalanced drilling tiphase dynamics affecting the pressures and flows of the system
[3].
The process of drilling for hydrocarbons consists of creating a Fig. 1 illustrates the pressure windows during drilling, in con-
wellbore, sometimes extending several thousand meters into the ventional (overbalanced) drilling the pressure window is between
ground, until it reaches an oil or gas reservoir. Drilling fluid is the pore pressure and the fracture pressure, while in UBD the win-
pumped into the top of a drill string, and is circulated out at the dow is between the collapse pressure and the pore pressure.
bottom through the drill bit. It then flows up through the annular UBD is more complex and costly than conventional drilling as it
section around the string, transporting the drilled formation parti- requires additional equipment and procedures, there are few cus-
cles, called cuttings, out of the well. The cuttings and any produced tomized rigs, and additional crew and more training are needed;
fluids are separated from the drilling fluid before it is injected into and sometimes it is simply not technically feasible to drill under-
the string again. balanced. In other cases the economic gains are high enough that
Monitoring and managing the pressure of the drilling fluid in UBD is the preferred method, and in some cases it may be the only
the well is a primary concern during any drilling operation. The viable choice [7,12].
pressure in the drilling fluid stabilizes the wellbore preventing col- Rehm et al. [28] gives the steady-state, fundamental equation
lapse, and balances against the fluids contained in the surrounding for the bottomhole pressure as
formation.
Underbalanced drilling (UBD) is a variant of managed pressure pbh = phydr + paf + pc , (1)
drilling (MPD), where the pressure in the open part of the wellbore, where phydr is the hydrostatic pressure exerted by the drilling fluid
intentionally is kept lower than the formation pore pressure [16]. and the cuttings load, paf is the annulus friction pressure loss, and
pc is the applied choke back-pressure. Since the well is sealed, the
choke back-pressure can be adjusted by changing the choke open-
∗ Corresponding author. ing or by adjusting the separator pressure ps downstream of the
E-mail address: torbjorn.pedersen@idletechs.com (T. Pedersen). choke.

https://doi.org/10.1016/j.jprocont.2018.05.001
0959-1524/© 2018 Published by Elsevier Ltd.
74 T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85

Fig. 1. Comparison of well pressure limits.

To get an impression of the dominating variables for the pres- especially true when there are large changes in the process and it
sure in the well, Eq. (1) is expanded to get the (simplified) moves between different states, or when not operating in a friction
expression dominated region.
 Tvd  L
2f  (x)(x)vm (x)2 1.2. Non-linear model predictive control
pbh = g (x) dx + dx + pc , (2)
0 0
da (x)

where  is the annulus mixture density, g is gravity, Tvd is the true Underbalanced drilling systems have historically not been auto-
vertical depth, f is the friction factor, da is the hydraulic diame- mated. However, increased interest in drilling automation due to
ter, vm is the fluid mixture velocity, and L is the well length. These costs and safety aspects have sparked a new discussion about
parameters vary with the position along the annulus, the current automation solutions and control levels [14,8,20,31].
flow regime, and other factors. There are many different control challenges within the field
The influx from the reservoir can be modelled by a wide class of of drilling, including: vibration management, directional drilling
models with different complexity and time dynamics. A very simple (geo-steering), automatic fluid mixing, rate of penetration (ROP)
linear influx relationship is given by [9]: optimization, and automatic pipe handling. This work is limited to
   the area of flow and pressure control. Flow and pressure control are
oh instrumental to the stability, safety, and successful drilling of a well.
qres = max 0, kpi · (ppore (x) − pbh (x)) dx (3) The work addresses UBD systems with injection of a (lightened)
cs
fluid, and disregards foam, air and mist systems.
where qres is the reservoir influx, kpi is the reservoir production There are multiple reasons why good flow and pressure control
index (simplified lumped parameter for a range of physical vari- are needed during underbalanced drilling [21,29,12]:
ables), cs is the casing shoe (or the start of the producing part of the
reservoir), oh is the length of the producing part of the open hole, (1) It is necessary to stay above the lower well stability limit
and ppore is the reservoir pore pressure. It should be noted that the (collapse pressure); if the pressure gets too low parts of the
equation is derived for steady-state flow. wellbore may collapse and the drillstring may get stuck.
Eq. (2) shows that the hydrostatic pressure phydr depends on the (2) If the pore pressure is exceeded, drilling fluids (including solids)
mixture of the produced reservoir fluid and the injected fluid in the will be pushed into the near wellbore region and might impair
annulus. The pressure loss paf also depends on the reservoir influx, future production.
as the influx will change the friction parameters and the magnitude (3) Keeping a low pressure will likely increase the ROP, i.e. the
of the flow in the annulus. The reservoir influx again depends on the drilling speed. There are different ways to increase the ROP and
bottomhole pressure. There is thus a natural feedback loop which it might be limited by other factors such as hole cleaning.
may have multiple equilibria; see Aarsnes et al. [3] for a treatment (4) Keeping a low pressure, or a large pressure differential between
of the problem. the well and pore pressure (draw-down), will increase pro-
To maintain accurate control of pressures and flows at all times, duction while drilling. High production may, or may not, be
better models are needed than employed in our previous work beneficial depending on if produced fluids can be sold, or if they
on linear model predictive control (MPC) for UBD [26,27]. This is must be treated and disposed.
T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85 75

Fig. 2. Simple schematic of the well and the topside equipment. The NMPC runs on top of a set of local control loops.

(5) It is necessary to lift sufficient amounts of cuttings out of the tomhole pressure (and thus influx), and short-term adjustments
well to ensure proper hole cleaning. by adjusting the choke opening to handle flow transients.
(6) It is necessary to separate liquids, gas, and solids leaving the Published research and solutions for drilling automation, with
well. a few notable exceptions, has mostly been focused on automating
(7) The pumped drilling fluid is used to power the downhole motor single pieces of equipment or procedures. The goal of this work
and to cool the bit. is to take a more holistic approach and look at both the topside
(8) The return flow is used to characterize the reservoir, identify and bottomhole processes as one, to produce a multivariable con-
production zones, and to gain knowledge on how to most effi- trol solution capable of producing good overall solutions for the
ciently perform well completion and production. entire plant. The control solution should naturally handle the many
objectives and constraints of underbalanced drilling, and should be
The main control objective for the separation system is to prop- simple enough to be employed in the industry.
erly separate the returned fluids and to buffer large variations in Fig. 2 shows a simplified schematic of the system. Drilling fluid
flow rate out of the well. This is indirectly achieved by controlling (with flowrate qp ) is pumped into the sealed well, and exits at the
the separator pressure (ps ), the level of the heavy fluid (drilling fluid bottom of the pipe. It flows back, together with the reservoir flu-
and water, (hdf )) and the light fluid (produced light oil, (ho )). Poor ids and cuttings, up through the annulus before it exits the well
level control may lead to unnecessary shut-downs, or undesired through the choke manifold and is processed in the separation sys-
carry over from phase to another, e.g. oil in the gas outlet. The two tem. There is a non-return valve (NRV) in the drillstring, which
systems are coupled, as the separation pressure will be a bound- means that gas will not flow into the drillstring, when the pumps
ary condition for the well, and the combination of well pressure, are stopped. The bit and bottomhole assembly are not shown in
reservoir conditions, choke position, and pumped drilling fluid will Fig. 2, but they are included as a pressure drops in the simulations.
determine the flow out of the system. If the systems are controlled It should be noted that in this work we only simulate drilling in
individually the result might be sub-optimal (or even very poor) the vertical part of the well. The control hierarchy has a super-
for the total system. Considering the total system as one allows visory MPC top level control system which receives inputs from
for both long-term adjustments, such as setting the correct bot- the operator (or a real-time optimizer), for example the wanted
76 T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85

bottomhole pressure and separator levels and pressures, and cal- tionships, empirical relations, choke models, as well as temperature
culates references for the lower level control loops. The lower-level calculations with energy balances.
controllers stabilize and reject disturbances. The control system is
further described in Section 3. 2. Modelling
Automated control solutions for UBD should handle multiple
input and state constraints and provide precise pressure control. 2.1. Reduced drift flux model
Linear feedback controllers (PID, linear MPC) are powerful, and can
be extended with gain scheduling to handle non-linearities. How- One of the most used models for two-phase flow is the classical
ever, NMPC is the industry standard solution for multi-variable drift-flux model (DFM) which can be formulated as [13]:
systems with constraints and severe non-linearities. In UBD, the
process gain between the choke pressure and bottomhole pressure ∂˛l l ∂˛l l vl
+ = 0, (4)
can change, and even switch sign, depending on the amount of gas ∂t ∂x
in the well [3]. Because of the slow propagation of gas through the
∂˛g g ∂˛g g vg
long annular wellbore there are high time constants, making it hard + = 0, (5)
for the driller to predict what will happen in the future. Further- ∂t ∂x
more, the consequences of human errors are considerable, where ∂˛l l vl + ˛g g vg ∂P + ˛g g v2g + ˛l l v2l 2f  m vm |vm |
+ = −m g sin (x) − , (6)
small mistakes may lead to costly periods with no drilling, and the ∂t ∂x da
consequences of large failures may be severe accidents. Good auto- where ˛g and ˛l are the gas and liquid volumetric fractions, l
matic control has the potential for reducing costs (by avoiding non and g the density of gas and liquid, m is the fluid mixture den-
productive time (NPT) and increasing drilling speed), minimizing sity (ignoring cuttings load), vl and vg in-site velocities, P the well
the risk of severe accidents, and enabling the drilling of otherwise pressure, x the position along the wellbore, and (x) the well angles.
undrillable wells. The closure relations are given by:
NMPC for bottomhole pressure control has been evaluated for
UBD systems, for example in Nygaard et al. [24,25]. NMPC has ˛l + ˛g = 1, (7)
also been used for multivariate control of MPD, as for example in
Asgharzadeh et al. [5]. This work looks at the larger, more holistic m = ˛g g + ˛l l , (8)
case, where the topside separation system and gas transport limita- vm = ˛g vg + ˛l vl , (9)
tions are included. A simplified mechanistic well model, presented
in Section 2, is used. To configure and solve the mathematical prob- P = g RG T (x) ≡ cG2 g , (10)
lem, we use the (N)MPC software package SEPTIC. SEPTIC is an
in-house control software developed by Statoil ASA, and has been where we note the ideal gas assumption of (10), which will over-
successfully used in many process control applications [30]. predict the gas density in high pressure conditions. To amend this,
SEPTIC solves the non-linear optimization problem through re- it is possible to introduce a gas deviation factor to obtain the equa-
linearization as the models moves between operation points. The tion of state as P = g zRG T (x) ≡ cG2 (x)g , where z is estimated from
software use a single shooting multi-step quasi-Newton method to correlations [10]. As an example, it is assumed constant z = 0.8 in
solve a sequence of quadratic programming (QP) problems at each Hauge et al. [15].
time step [23]. Meum et al. [23] describes the steps in the algorithm: Finally, the slip law is defined as:
An input-output linearization of the prediction model is performed vg = C0 vm + v∞ , (11)
around the nominal input sequence (computing sensitivities). A
search direction is then found solving a quadratic sub-problem for with the slip distribution parameter C0 = 1/(1 − ˛∗l ).
The critical
the linearized model using a dual method. For algorithmic conver- hold-up ˛∗l ∈ (0, 1) and v∞ ≥ 0 are constant parameters.
gence, a backtracking line search is performed along the search The DFM describes the distributed dynamics of the fast pressure
direction ensuring a smaller objective function value. If conver- waves and the slow propagation of the gas distribution through the
gence is not attained, the procedure is repeated. The method is well [19]. Due to the time-separation between these two phenom-
similar to Li et al. [17]. This adds a certain amount of tuning param- ena, and the assumption that in UBD the important effects are on
eters, such as the maximum number of iterations and the wanted time-scales slower than that of the fast pressure waves, it conse-
convergence criteria. quently have been suggested to lump the pressure dynamics to
It is possible to explicitly cancel unwanted interactions, or to obtain a simpler model [1].
define a minimum sensitivity level. The changes to the sensitivity In the present work we employ such a simplified model based
matrix can also be filtered. The software uses blocking of manip- on the derivation from Aarsnes et al. [2]. A desirable property of
ulated variables, as well as a limited number of evaluation points, this approach is that it enables expressing the pressure dynamics
to limit the size of the problem. This adds more tuning parameters, as an ordinary differential equation (ODE) on the form:
but can greatly reduce the calculation time.
∂pc ¯ 
ˇ 
Though state estimation is one of the challenges in NMPC it will = ql + qg + TXE (˛g , pc ) − qc , (12)
not be the focus of this paper. However, the standard methods ∂t V
apply. It is possible to for example embed an Unscented Kalman with the variables ql , qg representing respectively the liquid and
Filter (UKF) in the solution. gas volumetric flowrate entering at the bottom of the well, qc is the
Two different process models are used for the case studies: one volumetric flow-rate out through the choke, ˇ ¯ the effective bulk
is the reduced drift flux model presented later, i.e. the same predic- modulus of the total compression of the gas–liquid mixture in the
tion and process model; while the other simulations are performed well, and V is the volume of the well. TXE denotes the effect of the
with the Oil and Gas Simulator (OLGA) as the process model. OLGA is expansion of gas as it propagates up the wellbore into regions of
a commercial multi-phase simulator developed to simulate oil and lower pressure. The propagation of the distributed gas void fraction
gas flow in pipelines [6]. Since its beginning as a pipeline simula- ˛g (x, t) is given by a partial differential equation (PDE) on the form
tor, OLGA has seen substantial revisions and also supports transient
simulation of wellbore dynamics. It is built on many of the same ∂ ∂
˛g (x, t) + vg (x, t) ˛g (x, t) = EG (˛g , P) (13)
principals as a drift-flux model, but uses more complex closure rela- ∂t ∂x
T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85 77

where the term EG (˛g , P) denotes the local gas expansion. Finally the 3. Control structure
distributed, quasi-steady, pressure P(x, t) is obtained by integrat-
ing the frictional and hydrostatic pressure components and adding The problem is formulated as a set-point stabilization problem
them to the choke back-pressure: with time-variant (or position) based constraints which fulfils the
 x
objectives of UBD. The main objective is to track a given bottomhole
pressure which may change with the position along the planned
P(x, t) = pc (t) + (˛l (x, t)l + ˛g (x, t)g )
L
well trajectory: e.g. with depth, length, and the expected pore pres-
 2f  vm (x, t)|vm (x, t)|
 sure; since the production is a function of both pressure and the
g sin (x) + dx. (14) amount of exposed reservoir. The goal is to maintain a bottomhole
da pressure within plus/minus 5 bar from the given set-point. Param-
eters such as pore and collapse pressures are uncertain, so large
The model is fully described in Appendix A. fluctuations close to the constraints are unwanted. Changes in input
It should be noted that the model is not valid with a closed choke variables are penalized to avoid too aggressive control actions.
(no choke flow), and that it cannot model liquid/gas separation or The controlled variables (y) are the bottomhole pressure (pbh ),
backflow. choke pressure (pc ), separator pressure (ps ), level of the oil (ho )
and drilling fluid (hdf ) in the separator, actual choke opening (zc ),
2.2. Separator model and the gas flow out of the separator (qg,out ). The state constraints
consist of:
The separator is modelled by a simple mass-balance in accor- pcollapse ≤ pbh ≤ ppore , (20)
dance with Mendes et al. [22]. The model is a simplified
phenomenological model of a three-phase horizontal cylindrical pc,min ≤ pc ≤ pc,max , (21)
gravity separator with an overflow weir. The tank is separated into qg,out,min ≤ qg,out ≤ qg,out,max . (22)
a first (1) and second chamber (2) at the weir. The drilling fluid is
let out through a valve in chamber (1), while the lighter oil exits at zc,min ≤ zc ≤ zc,max , (23)
chamber (2). The cuttings are assumed to follow the drilling fluid. ps,min ≤ ps ≤ ps,max < pc , (24)
The model is described by Eqs. (15)–(18):
ho,min ≤ ho ≤ ho,max , (25)
∂hl qdf,in + qo,in − qdf,out,1 − qo,2
= , (15) hdf,min ≤ hdf ≤ hdf,max . (26)
∂t 2 · L1 · hl · (D − hl )
Hole-cleaning, cooling and downhole mud motor constraints
∂hdf qdf,in − qdf,out,1 are formulated as a minimum requirement on pump flow. The
= , (16) maximum gas flow constraint is due to limitations in topside gas
∂t 2 · L1 · hdf · (D − hdf ) processing. The choke opening is included because we want to limit
the time the choke spends in a poor region of its operational area,
∂ho qo,2 − qo,out,2
= , (17) e.g. almost closed where the choke is subject to higher wear.
∂t 2 · L2 · ho · (D − ho ) We manipulate the reference opening for the main UBD choke
(zcref ), the pump flow (qp ), and separator valves (zo , zdf , and zg ).
∂ps (qg,in + qdf,in + qo,in − qg,out − qdf,out,1 − qo,out,2 ) Below the NMPC layer there is local stabilization of separator lev-
= ps , (18)
∂t Vt − Vdf − Vo els and pressure, meaning that the NMPC gives references for new
levels (href ref ref
o and hdf ), and pressure (ps ) for these inner loops. This
where df denotes drilling fluid, o denotes oil, l is the liquid (mix
gives constraints on the manipulated variables (u):
of oil and drilling fluid), and g is the gas. L1 denotes the length of
ref
chamber (1), while Vt , Vdf , Vo is the volume of the tank, drilling fluid zc,min ≤ zcref ≤ zc,max
ref
, (27)
in tank, and oil in tank. D is the diameter of the separator, h is height,
qp,min ≤ qp ≤ qp,max , (28)
and q is volumetric flow. Standard valve equations are used for the
separator valves (Eq. (19) with constant cv ). pref
s,min
≤ pref
s ≤ pref
s,max , (29)

href
o,min
≤ href ref
o ≤ ho,max , (30)
2.3. Other relevant equations
href
df,min
≤ href
df
≤ href
df,max
. (31)
The equation for choke flow is selected as [18]:

The difference between zcref and zc is because of simulated choke
(pc − ps )l dynamics. A time constant and a maximum rate of change is imple-
qc = zc cv , (19) mented. No pump dynamics is used.
m
In addition we impose constraints on the rate of change (u)
The choke model used is a single phase flow equation, and is for some of the manipulated variables. In total there are 7 con-
not ideal for multiphase flow. However, the main concern is for the trolled variables, and 5 manipulated variables. The local control
model to capture the qualitative effect of changes in the manip- loops consists of simple proportional-integral controllers (PICs).
ulated variables. The ideal gas law is used to calculate the gas The constraints are not equally important, and we will use dif-
expansion into the separator. ferent penalty weighting to prioritize the most important ones.
When OLGA is used as the process model, the valve constant cv Note that this is not necessarily optimal as the cost will be shared
is estimated from the choke flow and pressure measurements, and between the constraints. All constraints are soft, but there will be
a choke pressure bias is added based on the difference between the high penalties on important constraints. We use three different
estimated and measured pressure. tuning matrices Qy penalizing deviations from desired set-points,
The reservoir influx is calculated from Eq. (3). Simple time Qu penalizing deviations from ideal input values, and P penaliz-
dynamics are modelled to limit the rate of change in the actual ing changes in input variables. The weights are assigned in the
inflow. Note that we do not allow negative flow (into the reservoir). following order:
78 T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85

(1) Lower well stability limit (collapse pressure). The basic control problem can then be formulated as Eqs.
(2) Choke pressure constraints. (32)–(36) [30]:
(3) Upper well pressure limit (pore pressure). T
minu ydev Qy ydev + uTdev Qu udev + uT Pu, (32)
(4) Gas transport limit.
(5) Separator pressure. umin < u < umax , (33)
(6) Wanted bottomhole pressure.
(7) Separator levels. umin < u < umax , (34)
(8) Pump nominal flow value.
ymin < y < ymax , (35)
(9) Choke opening.
ỹ = M(y, u, d, v), (36)

The use of soft constraints may lead to constraint violations. where the transformation M indicates that measurements, inputs,
Though most of the constraints during UBD are considered hard, disturbances and constraints may be filtered.
they have some uncertainty and most of the constraints can be
broken for a short period of time. The MPC software can be con- 3.1. Implementation details
figured with hard constraints, but this requires evaluation of end
conditions at long time horizons. Something that is harder with all SEPTIC uses a (non-linear) prediction model, which in this case
the uncertainty and unmodelled parts of the system, and because is interfaced through a functional mock-up interface (FMI). The
there might not even be a stable end state. The tuning will decide model is implemented in Modelica, and exported as a functional
which constraints violations which will induce the largest control mock-up unit (FMU) using a co-simulation set-up with an inte-
actions. The tuning is usually strict and the penalties increases fast. grated solver. FMI is a tool independent standard to support model
The constraint employed may also be stricter than the real con- exchange and co-simulation, while Modelica is an object-oriented,
straint to ensure that the MPC will react fast enough. Even though multi-domain modelling language for object-oriented modelling of
configuring the total set of penalties is a considerable amount of complex systems.
work, it has been solved for many running process control applica- In this case study we chose to disregard the string dynamics and
tions. inject fluid at the bottom as we are mainly interested in the annulus

Fig. 3. Configuration of the annulus for simulations.


T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85 79

and separator dynamics. We discretize the annulus in 20 sections mates. It should be noted that even though the standpipe pressure
(for both models), and get the simplified sketch of the annulus as is not available during connections, since there is no shut-in of the
illustrated in Fig. 3. The well is 2000 m long and vertical, meaning well, we still are connected to the reservoir through the annulus,
each section is 100 m. We use a single point influx reservoir at the even without WDP. Multi-phase choke flow could be estimated
bottom of the well at a pressure of 230 bar (23 MPa). from measurements and from separator levels and outputs.
For the reduced model we run simulations with a perfect model, The models are interfaced through a combination of FMI and
but also with parameter mismatch. For OLGA we assume that we OPC. OPC is OLE (object linking and embedding) for process control,
have measurements of bottomhole pressure and the choke multi- a standard for transferral of real-time process data.
phase flow, as well as all other surface measurements. This would The control system is configured with input blocking, using 7
require wired drill pipe (WDP) functionality, or very good esti- input blocks of increasing length. Each block has an evaluation

Fig. 4. Objective 1: Scenario with low pressure target. The MPC initially increases the bottomhole pressure to keep above the minimum choke pressure and to not drift too
far from the nominal pump value. At the end of the drilling window both the lower choke pressure constraint and the pump constraint are active, and it is no longer possible
to keep the target bottomhole pressure. The blue dashed lines indicate the plus/minus 5 bar band. (For interpretation of the references to colour in this figure legend, the
reader is referred to the web version of this article.)

Fig. 5. Objective 1: The reservoir influx increases as time goes, until the system has to reduce the drawdown to keep within other constraints. The gas outflow constraints
are handled by increasing the separator pressure.
80 T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85

Fig. 6. Objective 2: Constant bottomhole pressure. The ideal pump rate is kept for a much longer period of the operation.

point, where the input vector is optimized to minimize an object The volume of the well and the friction (as known by the model)
function. There are many evaluation points in the near future, and are not updated when the length of the well increases, but this could
the distance between the evaluations increases gradually towards easily be included.
the end of the horizon. The evaluations are aligned to match the
dominant time dynamics of the system, i.e. the fast pressure waves
in the near future and the slower gas dynamics near the end. 4. Case study
The prediction horizon is set at 1800 s. We explicitly eliminate
all interactions we do not want to use, e.g. the effect of liquid level 4.1. Scenario
on separator pressure, or the effects of choke opening on liquid
level. This means that we do not for example use the choke to con- We will evaluate three different objectives:
trol the separator level. It is, of course, possible to include these
interactions if so desired. To ensure rapid response to disturbances
(1) Drilling with minimum bottomhole pressure.
and model errors the system inputs should be updated at least every
(2) Drilling with constant bottomhole pressure (increasing gas
5 s. All variables are scaled according to their acceptable deviations.
influx).
To avoid problems with linearization at non-smooth non-
(3) Drilling with increasing bottomhole pressure (constant gas
linearities or discontinuities, the implemented model is somewhat
influx).
regularized, e.g. to use regularized versions of the square root
function and to approach saturation limits such that continuous
first-order derivatives are calculated. This will give insight into the behaviour of the control system
A simple bias adjustment is used to update the output of the with different objectives and trade-offs. During the low pressure
prediction model based on the measured choke flow and pressure. case, the ideal value is selected at 5 bar above the lower constraint,
Tuning parameters such as block lengths, prediction horizon, as this is how much variation we accept. In the constant bottom-
and evaluation points are selected to get a good trade-off between hole pressure scenario, the pressure set-point is set in the middle
calculation time and performance. The control system is tested with of the window at 205 bar. During the increasing bottomhole pres-
re-linearization between each input change, but also with lineariza- sure scenario the pressure will increase from 190 to 220 bar. The
tion only at the first input change in each iteration. Priority tuning is production index is assumed to increase linearly with length.
assigned according with the order described earlier and the objec- During the scenario four triple stands (pipe lengths) are drilled
tive of the scenarios. The bias updates are configured with time and there are three connections. During the second connection
constants which are higher than the fast dynamics of the system. there is a pump failure, and it is selected to go to a near balanced
Even though there is a significant amount of tuning parameters, state for 25 min to limit gas influx as the problem is fixed. The
most of the tuning is relatively easy. Some, like the block lengths pressure set-point is set 3 bar from the estimated pore pressure,
and time horizons are given by the system time constants. Other, as some overshoot can occur, and the pore estimate is uncertain.
like the priority tuning can be calculated after the wanted priority During each connection, the pump is ramped down to zero flow,
hierarchy and the individual parameter scaling has been deter- a new stand of drillpipe is attached, pumping is restarted and
mined (requires significant domain knowledge). The penalties will drilling resumed. The ramp-down time is 4 min from full pump
be shared among different variables, and it should be noted that rate (2400 l/min). There is a short period (3 min) where drilling
finding an optimal set of tuning parameters is a much harder prob- fluid is circulated (without drilling) before every connection to
lem. To ensure small enough time-steps and convergence criteria avoid problems with cuttings settling. The total connection time
it may be necessary to make conservative choices and accept the is 10 min before the pumps are re-started. Swab/surge effects are
higher run-time (or use faster computers). not simulated for the connection.
T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85 81

The production index is initially 10 000 standard cubic meter pressure constraint are active and it is no longer possible to keep
per day/per bar drawdown, and increases gradually until it is four the desired pressure. We note that during a connection the lower
times as high at the end. choke limit is breached, as it is necessary to compensate for the lost
friction pressure with no pump available. From Fig. 5 it can be seen
4.2. Simulation results that the gas transport limit (maximum gas volumetric rate from
separator) is active as the gas reaches surface after a connection.
4.2.1. Perfect model This is handled by the MPC by increasing the separator pressure,
Fig. 4 shows the result when the goal is to maintain a low pres- thus buffering more gas.
sure in the well. Initially the deviation from the pressure goal is When attempting to keep a constant bottomhole pressure (in
small, however, as the well gets deeper (and has higher production the middle of the window), the behaviour in Fig. 6 is the result. Gen-
for the same drawdown) the MPC gradually gives up the bottom- erally the choke pressure is higher, and it is possible to keep closer
hole target as the penalty of deviating from the desired pump rate to the desired pump rate for a longer section of the drilling window.
increases. The deviation is shared between the ideal values for pres- At the end of the drilling operation only the lower choke pressure
sure and flow. In the end both the pump constraint and the choke constraint is active. We can see from Fig. 7 that the reservoir influx

Fig. 7. Objective 2: The drawdown is constant, and the reservoir influx increases with uncovered reservoir. The gas constraint is handled by increasing the separator pressure.

Fig. 8. Objective 3: The bottomhole pressure set-point is increased together with the well length. There are no active pressure or pump constraints at the end of the operation.
82 T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85

increases for the entire drilling window. The gas volume at surface For all the simulated operations there are no issues keep-
is higher than for the low pressure case, however, this is caused ing within the desired operational envelope. In some cases, it
by the use of the ideal gas law to calculate the gas rate into the was not possible to keep all objectives, and it is shown that
separator, giving a higher expansion than realistic for high choke the deviations arise in the specified order. The control perfor-
pressures. The MPC still only needs to use the separator pressure mance will degrade with noise and measurement biases. Good
to control the gas outflow. estimation, and frequent model re-tuning should still ensure suf-
For the last objective, where the bottomhole pressure is gradu- ficient performance. If we lose important measurements for a
ally increased to maintain constant reservoir influx, the result are longer period of time, and no estimate is available, the only
shown in Fig. 8. There are no active pressure or pump constraints at option might be to shut down the drilling operation. It will
the end of the operation. Looking at Fig. 9 we see that the gas trans- thus be important to detect missing, or erroneous measure-
port constraint is active. This happens even though the drawdown ments.
is small. This is also because of gas expansion from a high choke Level control in the separator is not an issue for the selected
pressure to the lower separator pressure. scenarios, and the results are not shown here.

Fig. 9. Objective 3: The gas outflow constraint has become active at the end of the operation. This would probably not happen if we did not use the ideal gas law to calculate
separator gas flow.

Fig. 10. Objective 3: With OLGA as process model. With OLGA slightly worse disturbance rejection may be noted. It is still possible to keep all constraints.
T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85 83

Fig. 11. Objective 3: The system is only linearized for the first input value in each iteration. We note that system breaks the upper well pressure constraint and have larger
deviations from the desired set-points.

4.2.2. Model errors 5. Conclusions


When OLGA is used as the process model and objective 3 is
selected, the simulation produces the results shown in Fig. 10. The An NMPC solution for multivariate control of flow and pressure
process is still kept well within the constraints, and more or less in underbalanced drilling operations is presented. The system is
within the accepted deviations. The disturbance rejection is slightly incomplete, in the manner that we have no full mechanism for
worse than specified when there are large changes in the opera- state updates. It is shown that there is good control performance
tional area. It may be that the bias update is too slow to account for for the evaluated drilling scenario given a good model fit, and
these fast changes and that better state estimation would solve the that a simple linear model will not necessarily suffice. The NMPC
problem. maintains sufficient performance even with large changes in the
Similar results are observed when the reduced drift flux model process and when we approach an overbalanced state. The cal-
is simulated with parametric errors. As expected, the behaviour culation time is within the acceptable range, and could easily be
deteriorates when the errors increase in size. Significant deviations improved using faster hardware, or with a simple parallelization
(for example 20 percent error in the production index) are handled scheme.
without problems.
Acknowledgements
4.2.3. Non-linear behaviour
We would like to thank Pål Kittilsen and Stig Terje Strand from
Fig. 11 illustrates the results when objective 3 is simulated with-
the Statoil Research Centre in Trondheim for help with Dymola,
out re-linearization between each change of manipulated inputs.
Modelica, and SEPTIC.
There are now larger deviations from the desired set-points, and
This work was supported by Statoil ASA, and the Research Coun-
at the largest (and fastest) change of operation point the control
cil of Norway (NFR project 210432/E30 Intelligent Drilling). The
system severely breaks the upper well pressure limit. This indi-
work of the second author was also supported by the Research
cates that a linear model tuned for the initial state would not have
Council of Norway, ConocoPhillips, Det norske oljeselskap, Lundin,
sufficient performance. However, it might be possible to use the
Statoil ASA and Wintershall through the research centre DrillWell
average of an ensemble of models, or to use some kind of gain
(Drilling and Well Centre for Improved Recovery) at IRIS.
scheduling scheme to improve the performance of linear models.
Such a robust ensemble MPC for MPD is presented in Eaton et al.
[11]. Appendix A. Reduced DFM derivation

A simplification of the drift flux model was derived by Aarsnes


4.2.4. Calculation time et al. [2] and employed by Ambrus et al. [4], where a lumped expres-
The average calculation time for solving the NMPC optimization sion for the pressure dynamics is obtained by assuming that the
problem on a simple multi-core system, using only a single-core pressure dynamics is uniform in x, effectively relaxing the fast pres-
and no parallelization, is 3 s. The maximum run time is 9 s, and sure characteristics of Eqs. (4)–(6). However, the slow propagation
is recorded at the large change of pressure set-point during the of the distributed gas profile is still retained.
simulated failure. Using dedicated hardware or by implementing For the derivation of the simplified model we start with the
a simple parallelization scheme for each input block combination, classical Drift Flux formulation from Eqs. (4)–(11). First note the
will bring the calculation time well within the acceptable range. relation from the slip law in Eq. (11):
This would also allow for slightly longer prediction horizons, or
allow the parameters to change more frequently. ˛l vl = (˛l − ˛∗l )vg − (1 − ˛∗l )v∞ . (A.1)
84 T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85

Following Gavrilyuk and Fabre [13], divide Eq. (4) by l , which is Eq. (A.12) allows us to recast Eq. (A.6) in terms of the pressure
assumed constant, and insert (A.1) to get profile, P(x):

∂˛l ∂(˛l − ˛∗l )vg ˛g (1 − C0 ˛g ) ∂P ∂P
+ =0 (A.2) EG = − + vg , (A.13)
∂t ∂x P ∂t ∂x
∂˛g ∂˛g ∂vg For deriving the velocity, we neglect the ∂P/∂t term from Eq. (A.13)
⇒ + vg = (˛l − ˛∗l ) (A.3)
∂t ∂x ∂x and obtain the distributed velocity as
where the first term on the RHS of Eq. (A.3) is due to gas expansion x C0 ˛g () ∂P
− d
which necessarily translates to acceleration of the gas. vg (x) = vg0 e 0 P() ∂ (A.14)
Employing the chain rule on Eq. (5) we have
A.3 Lumped pressure dynamics
∂vg 1 ∂˛g g ∂˛g g
= − + vg
∂x ˛g g ∂t ∂x We use a lumped expression for the pressure dynamics. Con-
(A.4)
sidering the pipe as a single control volume, and applying the mass
1 ∂g ∂g 1 ∂˛g ∂˛g
= − + vg − + vg . conservation law:
g ∂t ∂x ˛g ∂t ∂x
∂pc ˇ  
Inserting Eq. (A.4) into (A.3) = l ql + qg + TEG − qc , (A.15)
∂t V
 ˛l − ˛∗l
  ˛l − ˛∗l
 (˛l − ˛∗l )
  with qc the volumetric flow rate through the choke, and TEG the
∂˛g ∂˛g ∂g ∂g
1+ + vg 1+ =− + vg .
∂t ˛g ∂x ˛g g ∂t ∂x effect of in-domain gas expansion on the lumped pressure dynam-
(A.5) ics. The term TEG can be found by integrating the gradient of the gas
velocity along the well. Including the ∂g /∂t term in Eq. (A.6), TEG
Thus, defining the convenience variable EG : can be written as:
 L
˛g (˛l − ˛∗l ) ∂g ∂g ˛g ∂P ∂P
EG ≡ − + vg TEG = A − + vg dx, (A.16)
(1 − ˛∗l )g
, (A.6) (1 − ˛∗l )P ∂t ∂x
∂t ∂x 0

we have from (A.5) and consequently, using the approximation of lumped pressure,
the TEG term can be split into a term which includes ∂pc /∂t and a
∂˛g ∂˛g remainder:
+ vg = EG . (A.7)
∂t ∂x  L
C0 ˛g ∂pc
TEG = TXE − A dx , (A.17)
A.1 Pressure profile 0
P ∂t
TXE = A(vg (L) − vg0 ), (A.18)
The distributed, quasi-steady pressure is obtained from Eq. (6),
discarding the transient and acceleration terms, and using the pres- hence we can write
sure boundary condition P(x = L) = pc : ¯
 ∂pc ˇ
x = (ql + qg − qc + TXE ), (A.19)
∂t V
P(x, t) = pc (t) + (˛l (x, t)l + ˛g (x, t)g (P))
L ¯ ≡ ˇL
  ˇ
ˇL
L C0 ˛g
, (A.20)
2f  vm (x, t)|vm (x, t)| 1+ dx
g sin (x) + dx. (A.8) L 0 P
da
¯
where we have defined the effective bulk modulus ˇ.
This expression is implicit in that it is dependent on vm which is
in turn dependent on EG (P), and g (P). To avoid this complication a
References
simplification should be used, e.g. by assuming vm uniform in space
when calculating the pressure profile. [1] U.J.F. Aarsnes, Modeling of Two-Phase Flow for Estimation and Control of
Drilling Operations, Norwegian University of Science and Technology, May
A.2 Boundary condition and velocity profile 2016, PhD thesis.
[2] U.J.F. Aarsnes, A. Ambrus, F. Di Meglio, A. Karimi Vajargah, O.M. Aamo, E. van
Oort, A simplified two-phase flow model using a quasi-equilibrium
Defining vg0 ≡ vg (x = 0, t) at the inlet (at the left boundary), momentum balance, Int. J. Multiph. Flow 83 (2016), http://dx.doi.org/10.
using the fact that vm (x = 0) = qg + ql , we have from Eq. (11): 1016/j.ijmultiphaseflow.2016.03.017.
[3] U.J.F. Aarsnes, F. Di Meglio, R. Graham, O.M. Aamo, A methodology for
C0 classifying operating regimes in underbalanced-drilling operations, SPE J. 21
vg0 = (qg + ql ) + v∞ . (A.9) (2) (2016), http://dx.doi.org/10.2118/178920-PA.
A [4] A. Ambrus, U.J.F. Aarsnes, A. Karimi Vajargah, B. Akbari, E. Van Oort, O.M.
The left boundary condition of Eq. (A.7) is given as Aamo, Real-time estimation of reservoir influx rate and pore pressure using a
simplified transient two-phase flow model, J. Nat. Gas Sci. Eng. 32 (2016),
qg http://dx.doi.org/10.1016/j.jngse.2016.04.036.
˛g (x = 0, t) = , (A.10)
Avg0 [5] R.S. Asgharzadeh, C. Hubbell, H.D. Perez, J.D. Hedengren, D.S. Pixton, A.P. Pink,
Multivariate control for managed-pressure-drilling systems by use of
The velocity gradient is obtained by combining Eq. (A.4) and (A.7): high-speed telemetry, SPE J. 21 (2) (April 2016), http://dx.doi.org/10.2118/
170962-PA.
∂vg EG [6] K.H. Bendiksen, D. Maines, R. Moe, S. Nuland, The dynamic two-fluid model
= . (A.11) OLGA: theory and application, SPE Prod. Eng. 6 (2) (1991) 171–180, http://dx.
∂x ˛l − ˛∗l
doi.org/10.2118/19451-PA.
[7] D.B. Bennion, F.B. Thomas, R.F. Bietz, D.W. Bennion, Underbalanced drilling:
Assuming adiabatic gas expansion, with the specific heat ratio , praises and perils, SPE Drill. Completion 13 (4) (December 1998), http://dx.
we have the relation doi.org/10.2118/52889-PA.
[8] Ø. Breyholtz, M. Nikolaou, Drilling automation: presenting a framework for
dg dP
= . (A.12) automated operations, SPE Drill. Completion 27 (March 2012) 118–126,
g P http://dx.doi.org/10.2118/158109-PA.
T. Pedersen et al. / Journal of Process Control 68 (2018) 73–85 85

[9] L.P. Dake (Ed.), Fundamentals of Reservoir Engineering, vol. 8, 18th ed., [22] P.R.C. Mendes, J.E. Normey-Rico, A. Plucenio, R.L. Carvalho, Disturbance
Elsevier Science B.V., 1998, ISBN 0-444-41830-X. estimator based nonlinear MPC of a three phase separator, 8th IFAC
[10] P.M. Dranchuk, H. Abou-Kassem, Calculation of Z factors for natural gases Symposium on Advanced Control of Chemical Processes, volume 45 (July
using equations of state, J. Can. Petrol. Technol. 14 (3) (July 1975), http://dx. 2012) 101–106, http://dx.doi.org/10.3182/20120710-4-SG-2026.00060, IFAC
doi.org/10.2118/75-03-03. Proceedings Volumes.
[11] A.N. Eaton, L.D.R. Beal, S.D. Thorpe, E.H. Janis, C. Hubbell, J.D. Hedengren, R. [23] P. Meum, P. Tøndel, J.-M. Godhavn, O.M. Aamo, Optimization of smart well
Nybø, M. Aghito, K. Bjørkevoll, R.E. Boubsi, J. Braaksma, G. van Og, Ensemble production through nonlinear model predictive control, SPE Intelligent
model predictive control for robust automated managed pressure drilling, Energy Conference and Exhibition (February 2008), http://dx.doi.org/10.2118/
SPE Annual Technical Conference and Exhibition (September 2015), http://dx. 112100-MS.
doi.org/10.2118/174969-MS. [24] G. Nygaard, E.H. Vefring, S. Mylvaganam, K.-K. Fjelde, Underbalanced drilling:
[12] D. Finley, S. Shayegi, J. Ansah, I. Gil, Reservoir knowledge and drilling – improving pipe connection procedures using automatic control, in: SPE
benefits comparison for underbalanced and managed pressure drilling Annual Technical Conference and Exhibition, Society of Petroleum Engineers,
operations, SPE/IADC Indian Drilling Technology Conference and Exhibition September 2004, http://dx.doi.org/10.2118/90962-MS.
(October 2006), http://dx.doi.org/10.2118/104465-MS. [25] G. Nygaard, E.H. Vefring, K.-K. Fjelde, G. Nævdal, R.J. Lorentzen, S.
[13] S.L. Gavrilyuk, J. Fabre, Lagrangian coordinates for a drift-flux model of a Mylvaganam, Bottomhole pressure control during drilling operations in
gas-liquid mixture, Int. J. Multiph. Flow 22 (3) (1996) 453–460, http://dx.doi. gas-dominant wells, SPE J. 12 (1) (2007) 49–61, http://dx.doi.org/10.2118/
org/10.1016/0301-9322(95)00085-2. 91578-PA.
[14] J.-M. Godhavn, Control requirements for automatic managed pressure drilling [26] T. Pedersen, J.-M. Godhavn, Model predictive control of flow and pressure in
system, SPE Drill. Completion 25 (3) (September 2010), http://dx.doi.org/10. underbalanced drilling, IFAC Proc. Vol. 46 (32) (December 2013) 307–312,
2118/119442-PA. http://dx.doi.org/10.3182/20131218-3-IN-2045.00085.
[15] E. Hauge, Ø.N. Stamnes, O.M. Aamo, J.-M. Godhavn, A dynamic model of [27] T. Pedersen, J.-M. Godhavn, J. Schubert, Supervisory control for underbalanced
percolating gas in a wellbore, SPE Drill. Completion 27 (2) (April 2013) drilling operations, 2nd IFAC Workshop on Automatic Control in Offshore Oil
204–215, http://dx.doi.org/10.2118/160481-PA. and Gas Production 48 (6) (May 2015) 120–127, http://dx.doi.org/10.1016/j.
[16] IADC, UBD and MPD Glossary, International Association of Drilling ifacol.2015.08.019.
Contractors (IADC), December 2011. [28] B. Rehm, J. Schubert, A. Haghshenas, A.S. Paknejad, J. Hughes (Eds.), Managed
[17] W.C. Li, L.T. Biegler, C.G. Economou, M. Morari, A constrained pseudo-Newton Pressure Drilling, 6th ed., Gulf Publishing Company, 2008, http://dx.doi.org/
control strategy for nonlinear systems, Comput. Chem. Eng. 14 (4) (1990) 10.1016/B978-1-933762-24-1.50001-2.
451–468, http://dx.doi.org/10.1016/0098-1354(90)87020-P. [29] B. Rehm, A. Haghshenas, A. Paknejad, A. Al-Yami, J. Hughes, J. Schubert (Eds.),
[18] B. Lipták (Ed.), Instrument Engineers’ Handbook – Process Control and Underbalanced Drilling: Limits and Extremes, Gulf Publishing Company,
Optimization, vol. 2, 4th ed., CRC Press, 2006, ISBN 9780849310812. 2012, http://dx.doi.org/10.1016/B978-1-933762-05-0.50002-4.
[19] R.J. Lorentzen, K.K. Fjelde, Use of slopelimiter techniques in traditional [30] S. Strand, J.R. Sagli, MPC in Statoil – advantages with in-house technology,
numerical methods for multi-phase flow in pipelines and wells, Int. J. Numer. International Symposium on Advanced Control of Chemical Processes
Methods Fluids 48 (7) (July 2005) 723–745, http://dx.doi.org/10.1002/fld.952. (ADCHEM) (June 2004) 97–103.
[20] J.D. Macpherson, J.P. de Wardt, F. Florence, C.D. Chapman, M. Zamora, M.L. [31] J. Sugiura, R. Samuel, J. Oppelt, G.P. Ostermeyer, J. Hedengren, P. Pastusek,
Laing, F.P. Iversen, Drilling-systems automation: current state, initiatives and Drilling modeling and simulation: current state and future goals, SPE/IADC
potential impact, SPE Drill. Completion 28 (December 2013) 296–308, http:// Drilling Conference and Exhibition (March 2015), http://dx.doi.org/10.2118/
dx.doi.org/10.2118/166263-PA. 173045-MS.
[21] J. McLennan, R.S. Carden, D. Curry, C.R. Stone, R.E. Wyman, Underbalanced
Drilling Manual, Gas Research Institute, 1997.

You might also like