production optimization; system identification and ...folk.ntnu.no/torarnj/ie08.pdf · production...

10
Production Optimization; System Identification and Uncertainty Estimation Steinar M. Elgsaeter Olav Slupphaug Tor Arne Johansen 1 Abstract Real-time optimization of oil and gas production requires a production model, which must be fitted to data for accuracy. A certain amount of uncertainty must typically be expected in production models fitted to data due to the limited informa- tion content in data. It is usually not acceptable to introduce additional excitation at will to reduce this uncertainty due to the costs and risks involved. The contribution of this paper is twofold. Firstly, this paper discusses estimation of uncertainty in production optimiza- tion resulting from fitting models to production data with low information content, a concept that has previously mainly been applied in reservoir management. Secondly, this paper illustrates how system identification can be used to find pro- duction models which can be solved with little computational effort and which are designed to be easily fitted to production data. The method is demonstrated on a synthetic example before being applied to a case study of a North Sea oil and gas field. In offshore oil and gas production, the suggested method is ex- pected to have applications in the development of structured approaches to uncertainty handling, for instance excitation planning and real-time optimization under uncertainty. 2 Introduction Production in the context of offshore oil and gas fields, can be considered the total output of production wells, a mass flow of components including hydrocarbons, in addition to water, CO 2 , H 2 S, sand and possibly other components. Hy- drocarbon production is for simplicity often lumped into oil and gas. Production travels as multiphase flow from wells through flow lines to a processing facility for separation, il- lustrated in Figure 1. Water and gas injection is used for optimizing hydrocarbon recovery of reservoirs. Gas lift can increase production to a certain extent by increasing the pres- sure difference between reservoir and well inlet. Multiphase flow rates are hard to measure. Measurements of total produced single phase oil and gas rates are usually available, and estimates of total water rates can often be found by adding different measured water rates after sepa- ration. To determine the rates of oil, gas and water produced from individual wells, the production of a single well is usually routed to a dedicated test separator where the rate of each separated component is measured. In single-rate well tests rates are only measured for the current setpoint, while rates are measured for several setpoints in multi-rate well tests. The authors would like to thank the Research Council of Norway, StatoilHydro and ABB for funding this work. The total amount of oil, gas and water which can be sepa- rated and processed is constrained by the capacity of facilities, these capacities are themselves uncertain. Normally produc- tion is at setpoints where some of these capacities are at their perceived constraints, therefore a multi-rate well test cannot be performed without simultaneously reducing production at some other well, which may cause lost production and a cost. There is also a risk that changes in setpoints during testing may cause some part of the facilities to exceed the limits of safe operation, which may force an expensive shutdown and re-start of production. Well tests are only performed when a need for tests has been identified due to the costs and risks involved. Well tests are a form of planned excitation, some planned variation in one or more decision variables designed to reveal information on production through measurements. Production is constrained by several factors including, on the field level, the capacity of the facilities to separate compo- nents of production and the capacity of facilities to compress lift gas. The production of groups of wells may travel through shared flow lines or inlet separators which have a limited liq- uid handling capacity. The production of individual wells may be constrained due to slugging, other flow assurance issues or due to reservoir management constraints. In the context of oil and gas producing systems, real- time optimization has been defined as a process of measure- calculate-control cycles at a frequency which maintains the system’s optimal operating conditions within the time- constant constraints of the system [1]. It has been suggested that real-time optimization could be divided into subproblems on different time scales to limit complexity, and to consider separately reservoir management, optimization of injection and reservoir drainage on the time scales of months and years, and production optimization, maximization of value from the daily production of reservoir fluids [1]. Reservoir management typically specifies constraints on production optimization to link these problems. The aim of production optimization is to determine set- points for a set of chosen decision variables which are optimal by some criterion. These setpoints are implemented by alter- ing the settings of production equipment. Decision variables may be any measured or computed variables associated with production which are influenced by changes in settings, but the number of decision variables is limited by the number of settings. We may for instance determine the settings of a gas lift choke by deciding a target lift gas rate, a target an- nulus pressure or a target gas lift choke opening. On short timescales the flow from individual wells can be manipulated by production choke settings, by gas lift choke settings and possibly by routing settings. There are many reasons why a production model may not 1

Upload: others

Post on 20-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Production Optimization; System Identification and ...folk.ntnu.no/torarnj/ie08.pdf · production of oil and gas earlier, notably for well monitoring in [17], and for production

Production Optimization; System Identification and UncertaintyEstimation

Steinar M. Elgsaeter∗ Olav Slupphaug Tor Arne Johansen

1 Abstract

Real-time optimization of oil and gas production requires aproduction model, which must be fitted to data for accuracy.A certain amount of uncertainty must typically be expected inproduction models fitted to data due to the limited informa-tion content in data. It is usually not acceptable to introduceadditional excitation at will to reduce this uncertainty due tothe costs and risks involved.

The contribution of this paper is twofold. Firstly, this paperdiscusses estimation of uncertainty in production optimiza-tion resulting from fitting models to production data withlow information content, a concept that has previously mainlybeen applied in reservoir management. Secondly, this paperillustrates how system identification can be used to find pro-duction models which can be solved with little computationaleffort and which are designed to be easily fitted to productiondata.

The method is demonstrated on a synthetic example beforebeing applied to a case study of a North Sea oil and gas field.In offshore oil and gas production, the suggested method is ex-pected to have applications in the development of structuredapproaches to uncertainty handling, for instance excitationplanning and real-time optimization under uncertainty.

2 Introduction

Production in the context of offshore oil and gas fields, canbe considered the total output of production wells, a massflow of components including hydrocarbons, in addition towater, CO2, H2S, sand and possibly other components. Hy-drocarbon production is for simplicity often lumped into oiland gas. Production travels as multiphase flow from wellsthrough flow lines to a processing facility for separation, il-lustrated in Figure 1. Water and gas injection is used foroptimizing hydrocarbon recovery of reservoirs. Gas lift canincrease production to a certain extent by increasing the pres-sure difference between reservoir and well inlet.

Multiphase flow rates are hard to measure. Measurementsof total produced single phase oil and gas rates are usuallyavailable, and estimates of total water rates can often befound by adding different measured water rates after sepa-ration. To determine the rates of oil, gas and water producedfrom individual wells, the production of a single well is usuallyrouted to a dedicated test separator where the rate of eachseparated component is measured. In single-rate well testsrates are only measured for the current setpoint, while ratesare measured for several setpoints in multi-rate well tests.

∗The authors would like to thank the Research Council of Norway,StatoilHydro and ABB for funding this work.

The total amount of oil, gas and water which can be sepa-rated and processed is constrained by the capacity of facilities,these capacities are themselves uncertain. Normally produc-tion is at setpoints where some of these capacities are at theirperceived constraints, therefore a multi-rate well test cannotbe performed without simultaneously reducing production atsome other well, which may cause lost production and a cost.There is also a risk that changes in setpoints during testingmay cause some part of the facilities to exceed the limits ofsafe operation, which may force an expensive shutdown andre-start of production. Well tests are only performed when aneed for tests has been identified due to the costs and risksinvolved. Well tests are a form of planned excitation, someplanned variation in one or more decision variables designedto reveal information on production through measurements.

Production is constrained by several factors including, onthe field level, the capacity of the facilities to separate compo-nents of production and the capacity of facilities to compresslift gas. The production of groups of wells may travel throughshared flow lines or inlet separators which have a limited liq-uid handling capacity. The production of individual wells maybe constrained due to slugging, other flow assurance issues ordue to reservoir management constraints.

In the context of oil and gas producing systems, real-time optimization has been defined as a process of measure-calculate-control cycles at a frequency which maintainsthe system’s optimal operating conditions within the time-constant constraints of the system [1]. It has been suggestedthat real-time optimization could be divided into subproblemson different time scales to limit complexity, and to considerseparately reservoir management, optimization of injectionand reservoir drainage on the time scales of months and years,and production optimization, maximization of value from thedaily production of reservoir fluids [1]. Reservoir managementtypically specifies constraints on production optimization tolink these problems.

The aim of production optimization is to determine set-points for a set of chosen decision variables which are optimalby some criterion. These setpoints are implemented by alter-ing the settings of production equipment. Decision variablesmay be any measured or computed variables associated withproduction which are influenced by changes in settings, butthe number of decision variables is limited by the number ofsettings. We may for instance determine the settings of agas lift choke by deciding a target lift gas rate, a target an-nulus pressure or a target gas lift choke opening. On shorttimescales the flow from individual wells can be manipulatedby production choke settings, by gas lift choke settings andpossibly by routing settings.

There are many reasons why a production model may not1

Page 2: Production Optimization; System Identification and ...folk.ntnu.no/torarnj/ie08.pdf · production of oil and gas earlier, notably for well monitoring in [17], and for production

describe production accurately. One reason may be structuraluncertainty, the model may have a structure which makesit impossible to describe production truly regardless of thechoice of parameters. An important cause of structural un-certainty may be un-modeled disturbances, influences whichare not accounted for in the model but which cause produc-tion to change with time. A second reason may be measure-ment uncertainty, measured production may differ from theactual production for some reason, for instance due to incor-rect calibration of measurement equipment. A third reasonmay be lack of informative data, the data may have insuffi-cient excitation to uniquely determine the parameters of themodel. In practice all of these factors are usually present tosome extent. Modeling uncertainty in the context of reser-voir management has received some attention in recent years[2] [3], while uncertainty in production optimization has re-ceived less attention. One recent discussion of the topic is[4], which considered uncertainty in well tests for wells withrate-independent gas-oil ratio and water cut. In prior workwe showed that the information content in production datamay be low, and suggested investigating uncertainty in pro-duction optimization to be a topic for further research [5]. Arecent technology survey has noted that few implementationsof real-time optimization exist on offshore oil and gas produc-tion systems, which the authors attribute to the difficulty offitting models to production data [6].

Production optimization requires a production modelwhich is able to predict how changes in setpoints affect pro-duction. Models used in the production optimization of gas-lifted wells are normally based on commercial multiphase flowsimulators, either by querying the simulator directly [7] orby building tables of simulator predictions, so called proxy-models [8]. Deriving production models using physics alonecan be difficult, as physical equations describing multiphaseflow may depend on a large number of parameters or variableswhich are not fully known. For instance, the relationship be-tween flow rate and pressure drop in porous media such asreservoirs is very complex and depends on parameters suchas rock properties, fluid properties, flow regime, fluid satura-tions in rock, compressibility of the flowing fluids, formationdamage or stimulation, turbulence and drive mechanism [9].Some physical phenomena in production are only modeled us-ing empirical relationships, due to limited understanding ofthe physics involved. Multiphase flow in the reservoir andthrough flow lines, including gas-lift performance curves, flowthrough restrictions, and inflow from reservoir into well, re-quire empirical closure relations (for recent discussion of suchempirical relations for flow lines, see for instance [10], [11],for flow through restrictions see [12], for inflow relations see[9], and references therein). Empirical relationships can befitted against laboratory experiments, but experiments canbe costly and small deviations between laboratory model andfield can produce large differences in observed flow [13]. Eventhe most carefully constructed production model will requiresome fitting against production data to reflect the influenceof un-modeled disturbances and structural uncertainty, for in-stance skin effects near the well, erosion of chokes or the buildup of wax or hydrates in flow lines.

Inferring relationships between past input-output data andpresent/future outputs of a system when very little a prioriknowledge is available is known as black-box modeling, and

the study of such methods is the topic of system identifica-tion [14]. System identification takes a pragmatic view of thechoice of model structure, seeking model structures in a trial-and-error fashion which can be relatively easily fitted to datayet describe observations with sufficient accuracy. Emphasisis usually on keeping the number of parameters to be fittedlow while introducing some physical knowledge to achieverequired performance [15]. Experience has shown that forsome applications black-box modeling may meet the require-ments of industry as well as models derived using physical in-sight. For instance the majority model-predictive controllersare based on black-box models and these controllers are usedextensively in refineries and petrochemical plants [16].

System identification has been applied to model offshoreproduction of oil and gas earlier, notably for well monitoringin [17], and for production optimization of gas-coned wells[18]. Some authors have suggested that the main bottleneckin production optimization is the computational effort re-quired to solve rigorous physical production models [8]. Mod-els found through system identification tend to be solvablewith little computational effort due to their simplicity, andto be easily maintainable, as they are designed to be updatedagainst data with little human intervention.

2.1 Problem formulationCost-effective methods for the design and maintenance of pro-duction models is a significant hurdle for the proliferation ofproduction optimization in oil and gas production. This pa-per makes two contributions toward reducing the cost of de-signing and implementing production optimization. Firstly,we investigate modeling production with the general meth-ods of system identification, motivated by a desire for mod-els which can be easily fitted to production data. Secondly,we study fitting production models to recent historical pro-duction data describing normal operations, as such data isavailable at little or no cost, and suggest how to quantify un-certainty that may result when such data has low informationcontent.

3 Modeling for production optimiza-tion under uncertainty

In this section a system identification approach to modelingfor production optimization is outlined, and we outline howto quantify parameter uncertainty when models are fitted todata with low information content.

3.1 Production optimization and parameterestimation

Throughout this paper, variables with a hat (ˆ) denote esti-mates and variables with bars (¯) denote measurements. Theintended application of the model suggested in this section isthe production optimization problem on the form[

u(θ) x(θ)]

= arg maxu,x

M(x, u, d) (1)

s.t. 0 = f(x, u, d, θ) (2)0 ≤ c(x, u, d). (3)

2

Page 3: Production Optimization; System Identification and ...folk.ntnu.no/torarnj/ie08.pdf · production of oil and gas earlier, notably for well monitoring in [17], and for production

u are decision variables, for instance the opening of produc-tion valves or gas-lift rates. θ is a vector of model parameterswhich are fitted to a tuning set. d is a vector of measuredand modeled disturbances which are independent of u. xis a vector which expresses the production of each modeledfluid for each modeled well. Which fluids to model in x is adesign question which depends on the choice of c(x, u, d) andM(x, u, d). Production optimization determines decision vari-ables u(θ) and the associated optimal production x(θ) whichmaximizes an objective function M(x, u, d), while obeying theproduction model (2) and production constraints (3). (3) mayexpress constraints in the capacity of downstream processingequipment to separate oil, gas and water, as well as reservoirconstraints and other constraints. M(x, u, d) is most oftenthe total rate of produced oil.

Let y(t) be a vector of measurements, and lety(x(t), u(t), d(t), θ) be an estimate of those measurements.The parameter estimation problem attempts to determine θso that y(t) and y(x(t), u(t), d(t), θ) match as closely as pos-sible. Parameter estimation considers a set of historical pro-duction data called the tuning set

ZN =

[y(1) d(1) u(1) y(2) d(2) u(2) . . .

y(N) d(N) u(N)].

(4)

Let the residuals for a given model structure and estimate θbe given by

ε(t, θ) = y(t) − y(x(t), u(t), d(t), θ), ∀t ∈ {1, 2, . . . , N} .(5)

A parameter estimate θ is found by minimizing the sum ofsquared residuals:

θ = arg minθ

N∑t=1

w(t)‖Dyε(t, θ)‖22 + Vs(θ), (6)

s.t. cθ(θ) ≤ 0, (7)

where w(t) is a user-specified weight. The components of ymay have different ranges, yet parameter estimation shouldgive similar weight to minimizing residuals of all measure-ments, which motivates normalizing residuals with a diagonalmatrix Dy. To improve parameter estimates, physical knowl-edge can be included in (6)–(7) in terms of soft constraintsVs(θ) or hard constraints cθ(θ). From (1)–(3) it should beclear that θ will influence u(θ), while (4)–(6) illustrate that θis influenced by the information content in ZN . These rela-tionships are illustrated in Figure 2.

The tuning set should only consist of historical productiondata which is consistent with current production, which im-plies that the effects of un-modeled disturbances should benegligible over the time interval spanned by the tuning set.If the information content in the tuning set is low it may notbe possible to determine a unique θ from (6)–(7).

3.2 Local production models for optimiza-tion

Assume that the oil, gas and water rates measured at themost recent well test are ql, measured at time tl and at set-point (ul, dl). Consider a model which is locally valid in the

sense that it attempts to predict the rates qi for values of(u, d) close to (ul, dl). The choice to consider locally validproduction models is motivated by two observations. Firstly,a locally valid model may be sufficient as long as productionoptimization only attempts to suggest new setpoints close toul, and as long as dl has not changed significantly since thelast well test. Secondly, decision variables often vary within anarrow range in production data from normal operations [5].

To simplify modeling we assume that the effects of changesin (u, d, t) from (ul, dl, tl) on qi, the vector of modeled rates forwell i, can be described by separate kernel functions fu, fd, ft:

qi = ql,if id(d

i, dl,i, θ) · f iu(ui, ul,i, θ) · f i

t (t, tl, θ) (8)

Each kernel function may be further separated as necessary,ft may for instance be divided into kernel functions describ-ing depletion and transients, and fu and fd may be dividedinto kernel functions describing different components of u andd as necessary. In addition, terms describing measurementuncertainty may be added as appropriate for joint data rec-onciliation and parameter estimation [19]. Kernel functionscan be found by different means, either simulators, physicalknowledge, well tests or fitted to a tuning set in a black-boxmanner. The model structure (8) may need to be tailored todescribe the characteristics of each particular field.

A balance is required between models which are too rigidto describe the observed tuning set and models which aretoo flexible. Models which are too flexible can suffer froma phenomenon known as over-fitting, where the fitted modeldescribes the tuning data set well while the model describesother data poorly. Fitted models which are almost equallycapable of describing a set of independent data, a “validationdata set” and the tuning set should be preferred, as suchmodels do not suffer from over-fitting [14].

3.3 Estimating parameter uncertainty

We wish to exploit production data from normal operationsas much as possible as such data can be obtained at low costs,yet low information content can result in significant param-eter uncertainty if models are fitted to such data. If θ iserroneously assumed to describe production while parameteruncertainty is significant, production optimization may sug-gest setpoint changes u(θ) that are infeasible, sub-optimal ormay even reduce profit. Rather than abandon the use of pro-duction data from normal operations, we propose quantifyingparameter uncertainty. Further work may focus on exploit-ing this quantification of uncertainty to devise strategies forproduction optimization under uncertainty.

A standard result of system identification is that the matrix

Pθ = limN→∞

1N

N∑t=1

λ0

⎡⎣E

⎧⎨⎩(

∂y(t, θ)∂θ

)(∂y(t, θ)

∂θ

)T⎫⎬⎭⎤⎦−1

(9)

is the covariance matrix of the asymptotic distribution ofprediction-error estimates [14]. Estimates Pθ are an expres-sion of parameter uncertainty which can be found from thetuning set and model, the diagonal elements of Pθ are thevariance of each component of θ.

3

Page 4: Production Optimization; System Identification and ...folk.ntnu.no/torarnj/ie08.pdf · production of oil and gas earlier, notably for well monitoring in [17], and for production

The derivation of (9) requires ε(t, θ) to be a sequence ofzero mean independent variables with variance λ0, as wellas some technical conditions and invokes the central limittheorem. Approximations of Pθ can be obtained from a finiteset of data of length N , but this approximation can introduceerrors, especially when N is small. In nonlinear identification,numerical solvers may return estimates θ which are one ofseveral local optima rather than the global optima of (6)–(7).In such cases it is not clear that (9) will be a valid descriptionof parameter uncertainty. The matrix product in (9) maybe an ill-conditioned matrix when ZN has low informationcontent, in which case matrix inversion can be numericallyinaccurate.

Parameter uncertainty can also be estimated numericallyusing bootstrapping [20]. Bootstrapping decomposes y(t) intoa systematic, modeled component y(u, d, θ) and a stochas-tic process e: y(t) = y(u, d, t) + e(t), and assumes thatthe observed residuals ε are a representative distribution ofe(t). Bootstrapping uses this assumption to construct a largenumber of synthetic measurements with a set of re-sampledstochastic component, and re-estimates θ for each of thesynthetic measurements. Residuals for time-instances wheremeasurement errors or large un-modeled disturbances causegross errors should be detected in pre-analysis and excluded.

The advantage of bootstrapping over asymptotic analysisis that it makes assumptions about the model and data setwhich are possibly less stringent, but finding estimates of un-certainty requires significant computational effort as the pa-rameter estimation problem is solved a large number of timesnumerically.

3.4 SummaryThe suggested approach to modeling and parameter uncer-tainty estimation is summarized in Algorithm 1.

Algorithm 1 Given a dataset ZN (4) of historical data de-scribing production, and let Ns be the desired number of re-samples.

• Choose a model structure (2) on the form (8) as applica-ble to the particular field, and

• estimate a nominal θ from (6)–(7). Apply constraints toassist parameter estimation as applicable.

• For the number of re-samples Ns

– generate a data set ZNr , by sampling observed resid-

uals ε N times and adding them to the output es-timated using the process model and the nominal θ,and

– determine a re-sampled parameter estimate θr forZN

r from (6)–(7).

• The distribution of θr,i ∀i = 1, . . . , Ns is an estimate ofthe parameter uncertainty.

4 Synthetic examples and a casestudy

In this section the suggested approach is validated on a syn-thetic example and a case study of actual field data is per-

formed. All simulations in this paper are implemented andsolved in MATLAB1 using the TOMLAB2 toolbox.

4.1 Production modelWe consider a well decoupled from other wells when changes inits production do not influence the production of other wells.In this paper we will consider the case of a field with nw

decoupled, gas-lifted wells producing predominantly oil, gasand water. We will consider change in gaslift rates Δqi

gldef=

qigl

ql,igl

− 1, i ∈ 1, 2, . . . nw as the decision variable u = Δqgl.

We consider the relative production valve opening z ∈ [0, 1]as a modeled disturbance. Let the most recently measuredrate of a given component of production be ql,i, measuredfor gas lift rate ql,i

gl and relative valve opening zl,i at timetl. As profit depends on total oil production and constraintsare linked to total production of gas and water, we chooseto model the production of oil, gas and water for each well,(qi

o, qig, q

iw) ∀i = 1, 2, . . . , nw. To simplify estimation of θ we

will assume that kernel functions f iz(zi, zl,i) based solely on

physical knowledge will describe production sufficiently well.The error introduced by this assumption should be small, asthe production chokes for most wells are either fully opened orfully closed most of the time. As gas lift rates are the decisionvariable, we choose to fit the parameters of gas-lift kernelsf i

gl(qigl, q

l,igl , θ) to production data. It is feasible to model time-

variant effects by interpolating between single-rate well tests,but we choose not to include such effects in our model astest-separator measurements of gas are unreliable and oftenexhibit large non-physical variations. We choose to not modeltransients as few transients are visible on the time-scales andsampling rate considered. We will assume that discrepanciesbetween test separator and total rate measurements can bedescribed sufficiently by identifying bias terms βy for eachtotal rate measurement, and will not attempt to compensatefurther for measurement uncertainty. We assume that wellsare decoupled and elect to not model coupling between wells.The form of (8) we choose to consider in this paper is

qio = max{0, ql,i

o · fz(zi, zl,i)(1 + αioΔqi

gl + κio(Δqi

gl)2)} (10)

qig = max{0, ql,i

g · fz(zi, zl,i)(1 + αigΔqi

gl + κig(Δqi

gl)2)} (11)

qiw = max{0, ql,i

w · fz(zi, zl,i)(1 + αiwΔqi

gl + κiw(Δqi

gl)2)}

(12)

Kernel functions fgl(qigl, q

l,igl , θ) are chosen as second order

polynomials, where αio, α

ig, α

iw expresses gradient information

and κio, κ

ig, κ

iw expresses curvature in oil, gas and water gas-lift

curves for well i, respectively. fz(zi, zl,i) is a nonlinear ker-nel which should express the nonlinear relationship betweenvalve opening and production, which obeys fz(0, zl,i) = 0 andfz(zi, zl,i) = 1. In this paper we choose

fz(zi, zl,i) =1 − (1 − zi)k

1 − (1 − zl,i)k. (13)

We will consider the total rates of oil, gas and water qtoto

def=∑nw

i=1 qio, q

totg

def=∑nw

i=1 qig, q

totw

def=∑nw

i=1 qiw as elements in the

1The Mathworks,Inc., version 7.0.4.3652TOMLAB Optimization Inc., version 5.5

4

Page 5: Production Optimization; System Identification and ...folk.ntnu.no/torarnj/ie08.pdf · production of oil and gas earlier, notably for well monitoring in [17], and for production

measurement vector ydef=[qtoto qtot

g qtotw

]T . Let R be a

routing matrix of ones and zeros defined such that ydef= Rx

when measurement uncertainties can be neglected. Let anestimate of production for a given parameter estimate θ be

y(u(t), d(t), θ, t) def= Rx + βy (14)

where βy is a time-invariant measurement bias to be esti-mated. The components of θ in this paper are αi

o, αig, α

iw

and κio, κ

ig, κ

iw for all wells i = 1, 2, . . . , nw and βy. (10)-(12)

does not assume rate-independent ratios, and may thereforebe able to describe wells with oil-, gas- or water coning insteady state.

4.1.1 Numerical solution of the parameter estima-tion problem

Estimating the parameters of (8) is a nonlinear programmingproblem in general, while (10)–(12) has a linear-in-variablesstructure, and we estimate θ with the linear-least squaressolver lssol in TOMLAB.

The parameter estimation problem can be divided intothree separate sub-problems, one for oil, one for gas and onefor water, but we choose to solve these problems as a sin-gle parameter estimation problem and use constraints to linkthese problems, as we will discuss in the section below.

4.1.2 Physical knowledge in parameter estimation

It is impossible to give an exhaustive list of all conceivablephysical constraints on θ, but a short review is given.

The ratios between phases, such as gas-oil ratio or water-oilratio, are rate-independent for some wells, and this qualitativeknowledge can be used to simplify the parameter estimationproblem. The ratio r between phases m and n for well i isrim,n

def= qim

qin

. A rate-independent ratio rim,n obeys

rim,n =

ql,im (1 + αi

mΔqigl + κi

mΔ(qigl)

2)

ql,in (1 + αi

nΔqigl + κi

n(Δqigl)2)

∀Δqigl. (15)

(15) could be enforced by hard constraints αim = αi

n andκi

m = κin, or alternatively by a soft constraint

Vs(θ) = wr

(αi

m − αin

)2+ wr

(κi

m − κin

)2. (16)

On wells where the gas-oil or water-oil ratios are known tobe rate-dependent we may still know that these ratios do notvary by more than a given percentage and this may be in-cluded as difference constraints. If we expect

ql,im

ql,in

RL <qim(qi

gl)qin(qi

gl)<

ql,im

ql,in

RU , ∀qigl, (17)

where 0 < RL < 1 < RU , we could enforce constraintsαi

oRL ≤ αig,κi

oRL ≤ κig, αi

oRU ≤ αig and κi

o ≤ RUκig.

For gas-lifted wells it is reasonable to expect the increas-ing friction at increased gas-lift rates to result in performancecurves with negative curvature ∂2mi

tot

∂q2gl

< 0, and this qualita-

tive knowledge can be expressed in terms of θ. Let mi(Δqigl)

be the mass rate of production from well i for a given gas

lift rate Δqigl, and let Δmi def= mi(Δqi

gl) − mi(0). If the rateof produced mass from well i can be assumed to consist pre-dominantly of oil, gas and water with densities ρo, ρg and ρw,respectively:

Δmitot = ρoq

l,io

(αi

oΔqigl + κi

o(Δqigl)

2)+

ρgql,ig

(αi

gΔqigl + κi

g(Δqigl)

2)+

ρwql,iw

(αi

wΔqigl + κi

w(Δqigl)

2)+

ρg(qigl − ql,i

gl ).

(18)

with second derivative

∂2Δmitot

∂(Δqigl)2

= ρoql,io κi

o + ρgql,ig κi

g + ρwql,iw κi

w < 0. (19)

(19) could be added as a soft-constraint. One technique thatcan help reduce over-fitting is regularization [21]. Let α be avector of αi

o, αig, α

iw, i = 1, . . . , nw and let κ be a vector of

κio, κ

ig, κ

iw, i = 1, . . . , nw. Regularization terms

Vs(θ) = wαreg(α − αreg)T (α − αreg)+

wκreg(κ − κreg)T (κ − κreg)

(20)

can be added as soft constrains, penalizing deviation fromα = αreg and κ = κreg. wα

reg and wκreg are weighting parame-

ters. αreg and κreg could be estimates of gradients and curva-ture determined from multi-rate well tests. Upper and lowerbounds on θ, based on knowledge of the expected shape ofthe gas lift performance curve, may improve the performanceof some solvers. Such bounds should be loose, i.e. so widethat the solver is expected to find solutions within rather thanon these bounds when there is any excitation of the decisionvariables associated with a given parameter. Loose boundsalso ensure that unrealistic parameter values are not chosenin those cases when there is very little excitation of certainmodes.

4.2 A synthetic exampleIn this subsection the properties and capabilities of the pro-posed modeling approach is illustrated on a synthetic exam-ple. Consider a field with 8 gas-lifted wells, each with pro-duction of oil qi

o, gas qig, and water qi

w, at rates which varywith the gas lift rate qi

gl. Wells are grouped into pairs withperformance given by similar equations. Wells 1 and 2 haverate-independent gas-oil ratio and water-oil ratio:

qio = 10 + 0.025qgl +

√qigl − 0.000013(qi

gl)2 (21)

qig = 30qi

o (22)

qiw = 0.5qi

o (23)

Wells 3 and 4 have gas coning, and a rate-dependent gas-oilratio is chosen, while the water-oil ratio is rate-independent:

qio = 10 + 0.033qgl +

√qigl − 0.000017(qi

gl)2 (24)

qig = 30(

qigl

1000− 1)qi

o (25)

qiw =

0.51 − 0.5

qio (26)

5

Page 6: Production Optimization; System Identification and ...folk.ntnu.no/torarnj/ie08.pdf · production of oil and gas earlier, notably for well monitoring in [17], and for production

Wells 5 and 6 have water coning, and have a rate-dependentwater-oil ratio, while the gas-oil ratio is rate-independent:

qio = 15 + 0.028qgl +

√qigl − 0.000022(qi

gl)2 (27)

qig = 40qi

o (28)

qiw =

0.4(1 + 0.3(qgl/1000− 1))1 − 0.4(1 + 0.3(qgl/1000− 1))

qio (29)

Wells 7 and 8 have oil coning, and have a rate-dependentwater-oil ratio while the gas-oil rate is rate-independent:

qio = 14 + 0.15qi

gl − 0.00003(qigl)

2 (30)

qig = 35qi

o (31)

qiw =

0.6(1 − 0.20(qigl/1000− 1))

1 − 0.6(1 − 0.20(qigl/1000− 1))

qio (32)

Suppose that we have a set of historical measured total pro-duction rates and accompanying gas lift rates of each well,against which to fit our model, shown in Figure 5. The modelis fitted with Algorithm 1, firstly with only loose bounds on θ,secondly knowledge of rate-independent gas-oil and water-oilratios were applied as soft constraints where appropriate. Theresulting models and model uncertainties are shown in Figure5. This example illustrates that the parameter estimation isable to gain information from measurements of total rates fora synthetic field with a small to medium number of wells withvarying characteristics. As the synthetic example has pairsof similar wells, the effect of the level of excitation on theestimates of uncertainty is visible in Figure 5. The matrixPθ was close to singular, with cond(Pθ) ≈ 1019, which wouldmake it difficult to obtain meaningful estimates of parameteruncertainty using asymptotic analysis in this case.

Although the suggested methodology is able to produce un-certainty estimates which describe the true gaslift-curves wellfor most wells, the method can break down if the informationon the gas lift performance of some wells is virtually non-existent, as is the case for well 2 as shown in Figure 5. Suchcases should be detected in post-analysis, and either furtherexcitation of such wells should be performed, or these wellsshould be left out of production optimization.

4.3 Case study: Production data from aNorth Sea oil field

In this section, the proposed method is applied to the pro-duction data from an offshore North Sea oil field producingmainly oil, water, and gas from 20 gas-lifted wells. The op-erator of the field requested that data be kept anonymousand all results are therefore presented in terms of normalizedvariables. A tuning set spanning five months with samplingtime of one hour was considered. To compare the significanceon estimated uncertainty of including physical assumptionsas soft constraints, we will fit the model to production datain two runs. In the first run, only loose bounds 0 < α < 1and −1 < κ < 0 are implemented. In the second run soft con-straints were on rate-independent ratios were enforced, differ-ence constraints were applied to limit the rate-dependency ofgas-oil ratios, chosen as RL = 0.7,RU = 1.3 for all wells, andthe curvature constraint was enforced. Past well tests indicatethat the watercut is rate-independent, and soft-constraints

are included in the second simulation run to enforce this rate-independence. We choose k = 5, so that changes in zi havea large influence on production when zi is small and a smallinfluence on production when zi is large. To reduce the im-pact of reservoir depletion, and un-modeled disturbances, onestimates, measured oil rates were de-trended as is shown inFigure 5 and in addition residuals in (6) were weighted witha forgetting factor [14]

w(t) = λN−t, (33)

chosen as λ = 0.51

N−1 . As the production model is intendedto be a local description around (ql, ul, dl), we omitted shut-downs from the tuning set.

4.3.1 Results

The fit between the nominal production model and the tun-ing data set is shown in Figure 6. A set of Ns = 100 boot-strap replications were designed and the parameters were re-estimated, as outlined in Algorithm 1. The tuning sets usedwhen bootstrapping are shown in Figure 7. Estimates of thebootstrap models are compared with the validation set inFigure 8. The resulting models are compared in Figure 9.Nominal parameter estimates result in models and estimatessimilar to the those shown in and Figure 9 and Figure 8.

4.3.2 Discussion

An advantage of the chosen modeling approach is that es-timated models can be interpreted by the shape of perfor-mance curves, as in Figure 5, with which industry practition-ers may already be familiar. In Figures 6 and 8 we observeseveral large changes in measured rates which cannot be ex-plained with changes in z or qgl. These deviations could bethe result of measurement error or disturbances stemmingfrom the reservoir or topside process facilities. As the modelis intended for determining day-to-day operating setpointsrather than prediction for long time intervals, the bias be-tween model estimates and measurements observed in Figure8 is less significant than the ability of the model to predictthe change in production resulting from changes in setpointsshown in Figure 8. From Figure 5 we see that the uncer-tainty varies greatly between different phases and for differentwells. Comparing the relative degree of uncertainty for dif-ferent wells may be useful for excitation planning. In this pa-per we have assumed that the only measurement uncertaintyis a steady bias in total rate measurements βy. Measure-ment uncertainty in rate measurements at the test separatormay cause errors in the operating point, and we have notstudied the significance of such errors on estimates or howto mitigate or estimate these uncertainties. The assumptionof time-invariant production in the tuning set is clearly anapproximation, as a falling trend in oil production due to de-pletion is visible and some wells have varying phase ratiosduring the course of the tuning set. By choosing a relativelylong tuning set, we err on the side of caution with regards toestimated uncertainties, but risk introducing biases in param-eter estimates. Reservoir dynamics and changed processingconditions are treated as un-modeled disturbances in this pa-per and only the most recent well test was used. A visibledecline in measured oil production was treated by de-trending

6

Page 7: Production Optimization; System Identification and ...folk.ntnu.no/torarnj/ie08.pdf · production of oil and gas earlier, notably for well monitoring in [17], and for production

and introducing a forgetting factor. It may be possible to im-prove on this approach either through modeling disturbancesand by exploiting older well tests. Although we have focusedon gas-lifted wells in this paper, the system identification ap-proach to modeling is general and has extensions to othertypes of field and wells, for instance wells where coupling issignificant or wells where production choke settings are de-cision variables. The approach to estimating uncertainty re-sulting from a low information content is general and hasextensions to estimating the uncertainty in proxy-models de-rived from commercial simulators as well. The model anduncertainty estimates described may be applied to estimatethe significance of uncertainty on production profits, for for-mulating structured business cases for uncertainty mitigationor for designing structured approaches to decision making un-der uncertainty, as suggested in [5].

5 Conclusion

The contribution of this paper is twofold. Firstly, it is dis-cussed how parameter uncertainty can be quantified whenmodels are fitted to data with little information content, aconcept that has been little explored in the context of mod-eling for production optimization. Secondly, it is suggestedhow system identification can be used to find models for pro-duction optimization with the aim of reducing costs of designand maintenance of production optimization. The methodwas demonstrated on a synthetic example before being ap-plied to a case study of real field data from a North Sea oiland gas field. The method suggested in this paper has ap-plications in real-time optimization of day-to-day productionand in the development of structured approaches to handlinguncertainty, such as excitation planning/well test planning orrobust production optimization.

References

[1] L. Saputelli, S. Mochizuki, L. Hutchkins, R. Cramer,M. Anderson, J. Mueller, A. Escoricia, A. Harms,C. Sisk, S. Pennebaker, J. Han, C. Brown, A. Kabir,R. Reese, G. Nuñez, K. Landgren, C. McKie, and C. Air-lie, “Promoting real-time optimization of hydrocarbonproducing systems”, in 2003 SPE Offshore Europe Ab-erdeen, 2003. SPE 839781.

[2] A. Diab, B. Griess, and R. Schulze-Riegert, “Applica-tion of global optimization techniques for model valida-tion and prediction scenarios of a north african oil field”,in SPE Europec/EAGE Annual Conference and Exhibi-tion, 2006. SPE 100193.

[3] A. Little, H. Jutila, and A. Fincham, “History matchingwith production uncertainty eases transition into predic-tion”, in SPE Europec/EAGE Annual Conference andExhibition, 2006. SPE 100206.

[4] H. Bieker, O. Slupphaug, and T. Johansen, “Opti-mal well-testing strategy for production optimization: Amonte carlo simulation approach”, in SPE Eastern Re-gional Meeting, 2006. SPE 104535.

[5] S. Elgsaeter, O. Slupphaug, and T. Johansen, “Chal-lenges in paramter estimation of models for offshore oiland gas production”, in International Petroleum Technol-ogy Conference, 2007.

[6] H. Bieker, O. Slupphaug, and T. Johansen, “Real-timeproduction optimization of offshore oil and gas produc-tion systems: Technology survey”, in SPE Intelligent En-ergy Conference and Exhibition, 2006. SPE 99446.

[7] P. Wang, “Development and application of production op-timization for petroleum fields”. PhD thesis, 2003.

[8] G. Zangl, T. Graf, and A. Al-Kinani, “Proxy modelingin production optimization”, in SPE Europec/EAGE An-nual Conference and Exhibition, 2006. SPE 100131.

[9] H. Beggs, “Production Optimization: using NODALanalysis”, Oil & Gas Consultants Intl., Tulsa, Oklahoma,2nd ed., 2003.

[10] A. Ullmann and N. Brauer, “Closure relations for two-fluid models of two-phase stratified smooth and stratifiedwavy flows”, International Journal of Multiphase Flow,32 (2006), pp. 82–105.

[11] C. Tribbe and H. Müller-Steinhagen, “An evaluation ofthe performance of phenomenological models for predict-ing pressure gradient during gas-liquid flow in horizontalpipelines”, Int. J. Multiphase Flow, 26 (2000), pp. 1019–1036.

[12] S. Rastoin, Z. Schmidt, and D. Doty, “A review of multi-phase flow through chokes”, Journal of Energy ResourcesTechnology, 119 (1997).

[13] O. Utvik, T. Rinde, and A. Valle, “An experimental com-parison between a recombined hydrocarbon-water fluidand a model fluid system in three-phase pipe flow”, Jour-nal of Energy Resources Technology, 123 (2001), pp. 253–259.

[14] L. Ljung, “System identification: Theory for the user”,Prentice Hall, Cambridge, 2nd ed., 1999.

[15] J. Sjöberg, Q. Zhang, L. Ljung, A. Benveniste, B. De-lyon, P.-Y. Glorennec, H. Hjalmarsson, and A. Juditsky,“Nonlinear black-box modelling in system identification:a unified overview”, Automatica, 31 (1995), pp. 1691–1724.

[16] S. Qin and T. Badgwell, “A survey of industrial modelpredictive control technology”, Control Engineering Prac-tice, 11 (2003), pp. 733–764.

[17] H. Poulisse, P. van Overschee, J. Briers, C. Moncur, andK.-C. Goh, “Continous well production flow monitoringand surveillance”, in SPE Intelligent Energy Conferenceand Exhibition, 2006. SPE 99963.

[18] A. Mjaavatten, R. Aasheim, S. Saelid, and O. Gronning,“A model for gas coning and rate-dependent gas/oil ratioin an oil-rim reservoir”, in SPE Russian Oil and GasTechnical Conference and Exhibition, 2006. SPE 102390.

7

Page 8: Production Optimization; System Identification and ...folk.ntnu.no/torarnj/ie08.pdf · production of oil and gas earlier, notably for well monitoring in [17], and for production

[19] C. M. Crowe, “Data reconciliation — progress and chal-lenges”, Journal of process control, 6 (1996), p. 89–98.

[20] B. Efron and R. Tibshirani, “An Introduction to theBootstrap”, Chapman & Hall, 1993.

[21] T. Johansen, “On tikhonov regularization, bias and vari-ance in nonlinear system identification”, Automatica, 33(1997), pp. 441–446.

Reservoir(s)

........

Routing

....

Waterinjection

....

Gasinjection

....

....

Separation

....

Separation

g

....

Gaslift

ExportOil

Gas

Water

Wells

Reinjection/To sea

Lift gas/gas injection

Figure 1: A schematic model of offshore oil and gas produc-tion.

Productionoptimization Production

Plannedexcitation

Productionconstraints

State and modelparameters Measurements

Decisionvariables

Disturbances

Parameter andstate estimation

Figure 2: A model of the relationship between subproblemsin production optimization.

q1o q1

g q1w

q2o q2

g q2w

q3o q3

g q3w

q4o q4

g q4w

q5o q5

g q5w

q6o q6

g q6w

q7o q7

g q7w

q8o

qigl

q8g

qigl

q8w

qigl

Figure 3: Synthetic example: True performance curve(solid), bootstrap performance curves without physical con-straints (dashed), bootstrap performance curves with phys-ical constraints (dotted), local operating point (circle) andthe span of gas lift rates observed in tuning set (verticalsolid).

8

Page 9: Production Optimization; System Identification and ...folk.ntnu.no/torarnj/ie08.pdf · production of oil and gas earlier, notably for well monitoring in [17], and for production

qtoto

qtotg

qtotw

t

qgl

0 100 200 300

87654321

660

680

700

720

1.8

2

550

600

Figure 4: Synthetic example: Top three graphs: Measuredtotal rates of oil, gas and water (dotted) compared with esti-mates of the fitted model without soft constraints (dashed)and with soft constraints (solid). Bottom graph: normal-ized gas lift rates of wells 1 through 8 plotted in ascendingorder.

qtoto

t[hours]

0 500 10000.6

0.8

1

1.2

Figure 5: Case-study: Measured oil rates (dotted) and de-trended oil rates used in tuning set (solid).

qtoto

qtotg

qtotw

t[hours]

2000 2200 2400 2600 28000.8

0.9

1

0.6

0.8

1

0.8

1

Figure 6: Case-study: Case study: Last portion of tuningset (solid) compared with estimates of the model includingphysical constraints (dashed). Sampling time reduced tofive hours for clarity.

qtoto

qtotg

qtotw

t[hours]

2000 2200 2400 2600 28000.8

0.9

1

0.6

0.8

1

0.8

1

Figure 7: Case-study: Tuning set (solid) and one boot-strap replications (dashed), for model including physicalconstraints.

9

Page 10: Production Optimization; System Identification and ...folk.ntnu.no/torarnj/ie08.pdf · production of oil and gas earlier, notably for well monitoring in [17], and for production

qtoto

qtotg

qtotw

t[hours]

3000 3200 3400 3600 3800

0.8

0.9

1

0.9

1

1.1

0.8

0.9

1

Figure 8: Case-study: Estimates of with bootstrap replica-tions (dotted) compared with the validation data set (solid),for model including physical constraints.

qio

1

qig qi

w

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

qigl

20

qigl qi

gl

Figure 9: Case-study: Bootstrap performance curves with-out physical constraints (dashed), bootstrap performancecurves with physical constraints (dotted), local operatingpoint (circle) and the span of gas lift rates observed in tun-ing set (vertical solid). Lower left bound of all plots is (0,0).Well indices are along left margin.

10