Next Article in Journal
Techno-Economic Feasibility Study of Renewable Power Systems for a Small-Scale Plasma-Assisted Nitric Acid Plant in Africa
Next Article in Special Issue
Modifier Adaptation for Real-Time Optimization—Methods and Applications
Previous Article in Journal / Special Issue
Model Predictive Control of the Exit Part Temperature for an Austenitization Furnace
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Real-Time Optimization under Uncertainty Applied to a Gas Lifted Well Network

by
Dinesh Krishnamoorthy
1,
Bjarne Foss
2 and
Sigurd Skogestad
1,*
1
Department of Chemical Engineering, Norwegian University of Science and Technology (NTNU), 7491 Trondheim, Norway
2
Department of Engineering Cybernetics, Norwegian University of Science and Technology (NTNU), 7491 Trondheim, Norway
*
Author to whom correspondence should be addressed.
Processes 2016, 4(4), 52; https://doi.org/10.3390/pr4040052
Submission received: 21 November 2016 / Revised: 7 December 2016 / Accepted: 8 December 2016 / Published: 15 December 2016
(This article belongs to the Special Issue Real-Time Optimization)

Abstract

:
In this work, we consider the problem of daily production optimization in the upstream oil and gas domain. The objective is to find the optimal decision variables that utilize the production systems efficiently and maximize the revenue. Typically, mathematical models are used to find the optimal operation in such processes. However, such prediction models are subject to uncertainty that has been often overlooked, and the optimal solution based on nominal models can thus render the solution useless and may lead to infeasibility when implemented. To ensure robust feasibility, worst case optimization may be employed; however, the solution may be rather conservative. Alternatively, we propose the use of scenario-based optimization to reduce the conservativeness. The results of the nominal, worst case and scenario-based optimization are compared and discussed.

Graphical Abstract

1. Introduction

The offshore production of oil and gas is a complex process where a lot of decisions have to be taken to meet the goals in the short, medium and long run, ranging from planning and asset management to small corrective actions. Accounting for all the goals and constraints as a whole is a very challenging and unrealistic task. Thus, the operation of an oil and gas is typically decomposed into various decision making processes in a hierarchical fashion that reflects their short-, medium- and long-term impact [1], as shown in Figure 1. The long-term decisions involve selecting an investment strategy, operation model, infrastructure etc, which is typically known as asset management. Then, there are decisions taken on a horizon of one to five years such as selecting drilling schedules and production and injection strategies, known as reservoir management. This is followed by decisions that have to be taken on a decision horizon, ranging from a few hours to days known as Daily Production Optimization. This decision making step would typically constitute selecting the production target from each well, allocation of resources among the wells such as the available gas lift, power, etc. Thus, from a process systems perspective, this step is equivalent to real-time optimization (RTO). This is followed by a control and automation layer that accounts for fast corrective actions. This paper is concerned with the real-time optimization layer in this hierarchical framework.
Daily production optimization generally seeks to maximise the oil and gas production and reduce the cost of production by choosing optimal setpoints for well production rates, gas lift rates, etc. A mathematical model is typically employed when optimizing the performance of the process. To this end, a model is used to predict the outcome of the decision variables on the production, e.g., a model may describe a production network by predicting the oil flow rate for various gas lift rates or choke openings. Due to the complexity of the system and difficulty in modelling the multiphase reservoir inflow and pressure drop in pipelines, models used in production optimization are inherently uncertain and hence the model may fail to accurately predict the outcome. However, uncertainty is simply ignored in most of the works in production optimization. The most common approach is to solve what is known as the deterministic problem with nominal models, where all the uncertain parameters are assumed to take their expected value. The quality of the optimal solution is heavily affected when data and model uncertainty are disregarded, and this approach has serious flaws for constrained optimization problems, which is the case in most real applications. Most uncertainty can be assumed to arise from the following sources [2]:
  • Model uncertainty—in which the underlying structure of the model is uncertain due to lack of knowledge or model simplification.
  • Parametric uncertainty—where the parameters are outdated or have insufficient excitation to be determined accurately.
  • Measurement error—any model to some extent relies on measured data which have a certain degree of uncertainty.
All the above sources of uncertainty are typical to an oil and gas production network. If special precautions are not taken, the solution to the optimization problem might be meaningless and thus has to be disregarded. The uncertainty in the system threatens the relevance of the solution in two facets [3]:
  • The calculated optimal solution, which is thought to be feasible, might actually violate the problem constraints and therefore be infeasible when implemented.
  • When the optimal solution is feasible, the solution may be far from the actual optimal value, and hence is suboptimal.
In a technological survey [4], the authors state that the handling of model uncertainty is a key challenge for the success of production optimization. This challenge is twofold. The first relates the need to identify and characterize the uncertainty and the second is to handle the uncertainties in the production optimization problem. In this paper, we are concerned with the latter where we explicitly account for the uncertainty in the production optimization problem. We employ robust worst case optimization, which provides a robust, feasible, yet conservative solution. In order to reduce the conservativeness without affecting the robust feasibility, we apply scenario tree-based optimization as introduced in [5,6]. The main contribution of this paper is the control oriented modelling of a gas lifted well production network suitable for dynamic optimization and the application and comparison of worst case and scenario-based optimization methods for the production optimization problem under uncertainty.
The paper is organized as follows. A brief summary of previous work is given in Section 2. Section 3 describes the gas lifted well process considered in this paper. The optimization problem is formalized in Section 4. The results are presented and discussed in Section 5 and Section 6, respectively. The methods and software used in this work are described in Section 7 before concluding the paper in Section 8.

2. Previous Work

In many offshore oil and gas production networks, the production is often constrained by processing capacity and other such processing constraints. It was pointed out in [7] that not a lot of work has been done to provide robust procedures to formulate and solve such constrained optimization problems. Interest in the field of optimization of such oil and gas production networks has been steadily increasing, and many mathematical tools that assist in decision making have been proposed. To name a few, see [8,9,10,11,12] and the references therein. Most of the works found in literature only consider the deterministic problem and hence disregard any uncertainty present in the system. There are only a very few published works that consider the problem of daily production optimization under uncertainty. For example, Elgsæter et al. suggested a structured approach for changing the setpoint in the presence of uncertainty [13]. Although the uncertainty was not considered directly in the optimization problem itself, but merely to assess the solution, uncertainty was explicitly handled in the optimization problem in [14] by formulating the optimization solution as a priority list between the wells. A two-stage optimization formulation for production optimization under uncertainty, which defines an operational strategy rather than a single operating point, was suggested in [15] and was demonstrated using static models. Very recently, the production optimization problem was reformulated as a robust optimization problem following the row-wise and column-wise framework with cardinality constraints in [16], where a level of protection against the uncertainty is sought at the cost of conservativeness.
However, not a lot of research has been carried out that aims to reduce the conservativeness of the solution. Most of the works above also consider a static problem, where the system dynamics are ignored and static models are used. Dynamic optimization using a multiple shooting algorithm and generalized reduced gradient method was presented in [12,17]; however, uncertainty was disregarded in both of the works. To this end, this work presents a dynamic optimization problem that explicitly handles uncertainty in the daily production optimization problem.
In terms of modelling, gas lifted well models were developed and studied in [18,19,20] to name a few. The dynamic models used in all these works are based on the mass balance between the different phases in the well tubing and annulus. Similar models have also been used in studies for gas lift instabilities and riser slugging [21]. However, most of these models found in literature have some minor differences in the assumptions used to fit the purpose of the respective applications. For example, the frictional pressure drop in pipes have been assumed to be negligible in [18], whereas some other works explicitly include the frictional pressure drop term. Some works consider simple linear reservoir inflow models such as in [12,20], whereas nonlinear reservoir inflow models have been used in [19]. Some works, such as [22,23], consider partial differential equations for the pressure and flow dynamics in the pipe, which are discretized and solved, whereas ordinary differential equations for mass balance have been used in many other works. Despite the minor differences, the dynamic responses of such simple models based on mass balances have been verified and have been shown to match the results from commercial high fidelity simulators such as OLGA (a dynamic multiphase simulation software from Schlumberger) with sufficient accuracy (see [12,20,24]).

3. Process Description

In many oil wells, when the reservoir pressure is not sufficient to lift the fluids economically to the surface, artificial lift methods are deployed. Gas lift is one such commonly used artificial lift method, where compressed gas is injected at the bottom of the well via the annulus to reduce the fluid mixture density. This reduces the hydrostatic pressure drop in the well and the pressure at the well bottom decreases, thereby increasing the flow from the reservoir. However, injecting too much gas increases the frictional pressure drop, which has a counter effect on the flow rate. At a certain point, the benefit of reduced hydrostatic pressure drop is overcome by the increase in the frictional pressure drop [25]. Hence, each well has a desirable gas lift injection rate. Additionally, there might be constraints on the total gas available for gas lift or total produced gas capacity constraints that must not be violated. The objective is then to find the optimal gas lift injection rates for each well such that the total oil production is maximized.

3.1. Modelling of Gas Lifted Wells

In this section, we give a brief description of the gas lifted well model that is used in the optimization problem. The model to describe production from each gas lifted well can be given in four parts: (i) mass balance of the different phases; (ii) density models; (iii) pressure models and (iv) flow models. The mass balances in each well is given by:
m ˙ g a = w g l w i v ,
m ˙ g t = w i v w p g + w r g ,
m ˙ o t = w r o w p o ,
where m g a is the mass of gas in the annulus, m g t is the mass of gas in the well tubing, m o t is the mass of oil in the well tubing, w g l is the gas lift injection rate, w i v is the gas flow from the annulus into the tubing, w p g and w p o are the produced gas and oil flow rates, respectively, and w r g and w r o are the gas and oil flow rates from the reservoir.
The densities ρ a (density of gas in the annulus) and ρ m (fluid mixture density in the tubing) are given by:
ρ a = M w p a T a R ,
ρ w = m g t + m o t ρ o L r A r L w A w ,
where M w is the molecular weight of the gas, R is the gas constant, T a is the temperature in the annulus, ρ o is the density of oil in the reservoir, L r and L w are the length of the well above and below the injection point, respectively, and A r and A w are the cross-sectional area of the well above and below the injection point, respectively.
The annulus pressure p a , wellhead pressure p w h , well injection point pressure w i v and the bottom hole pressure p b h are given by:
p a = T a R V a M w + g L a L a A a m g a ,
p w h = T w R M w m g t L w A w + L r A r m o t ρ o ,
p w i = p w h + g A w L w ( m o t + m g t ρ o L r A r ) H w ,
p b h = p w i + ρ w g H r ,
where L a and A a are the length and cross sectional area of the annulus, L a is the length of the annulus, T w is the temperature in the well tubing, H r and H w are the vertical height of the well tubing below and above the injection point, respectively, and g is the acceleration of gravity constant. The cross-sectional area of the annulus and the tubing are computed using their respective diameters, D a and D w .
The flow through the downhole gas lift injection valve, w i v , total flow through the production choke, w p c , produced gas and oil flow rate, and the reservoir oil and gas flow rates are given by:
w i v = C i v ρ a m a x ( 0 , p a i p w i ) ,
w p c = C p c ρ w m a x ( 0 , p w h p m ) ,
w p g = m g t m g t + m o t w p c ,
w p o = m o t m g t + m o t w p c ,
w r o = P I ( p r p b h ) ,
w r g = G O R · w r o ,
where C i v and C p c are the valve flow coefficients for the downhole injection valve and the production choke, respectively, P I is the reservoir productivity index, p r is the reservoir pressure, p m is the manifold pressure and G O R is the gas–oil ratio. Note that there is no pressure coupling between the wells in the present formulation.
Among the several parameters that describes the production network, some may not be accurately known. In this work, we assume that the GOR is uncertain, but their expected value E 0 ( G O R ) and the range of values or variance σ are assumed to be known:
G O R { E 0 ( G O R ) ± σ } = U .
As seen from Equations (1a)–(4f), the gas lifted well is modelled as a semi-explicit index-1 DAE (differential algebraic equation) of the form
x ˙ i = f i ( x i , z i , u i , p i ) ,
g i ( x i , z i , u i , p i ) = 0 i N = { 1 , , n w } ,
where f i ( x i , z i , u i , p i ) is the set of differential Equations (1a)–(1c) and g i ( x i , z i , u i , p i ) is the set of algebraic Equations (2a)–(4f), and the subscript i refers to any individual well from a set of N = { 1 , , n w } wells. Note that, for convenience, the subscript i has been removed from the Equations (1a)–(4f), which represents the model for each gas lifted well.
The differential states x i , algebraic states z i , decision variables u i , and the uncertain parameters p i are then given by:
x i = m g a i m g t i m o t i T ,
z i = ρ a i ρ m i p a i p w i i p w h i p b h i w i v i w p c i w p g i w p o i T ,
u i = w g l i T ,
p i = G O R i T U i .
The combined system of n w wells is then denoted by:
x ˙ = f ( x , z , u , p ) ,
g ( x , z , u , p ) = 0 , p U ,
where the combined states x , z and control input u are described by the vectors
x = x 1 T x 2 T x n w T T ,
z = z 1 T z 2 T z n w T T ,
u = u 1 T u 2 T u n w T T .
The combined parameters and the uncertainty set p and U are given by
p = p 1 T p 2 T p n w T T ,
U = U 1 × U 2 × × U n w .
Note that the dynamic models (6) and (8) could be easily written as an explicit ODE (ordinary differential equations) by simply eliminating the algebraic variables.

4. Optimization under Uncertainty

For a production network with a set of N = { 1 , , n w } wells, our objective is to find the optimal gas lift injection rate that maximizes the profit, subject to total gas capacity constraints. The profit is computed based on the earnings from the oil production and reducing the costs associated with compressing the gas for gas lift. The economic objective can then be written as:
J p r o f i t = α o i = 1 n w w p o i α g l i = 1 n w w g l i ,
where α o is the price of oil, and α g l is the cost of compressing the gas for gas lift injection.
Before this can be posed as a standard optimization problem, the infinite dimensional optimal control problem is first discretized into a finite dimensional nonlinear programming problem (NLP) divided into N equally spaced sampling intervals in K = { 1 , , N } . This is done using third order direct collocation, which gives a polynomial approximation of the system (8) as shown in Figure 2. The set of three collocation points and the initial state in each interval [ k , k + 1 ] is denoted by the index c C = { 0 , 1 , 2 , 3 } , and the location of these points are computed using the Radau scheme (see [26]). The discretized states x ˜ = ( x k , c | k K , c C ) and z ˜ = ( z k , c | k K , c C ) are then given by:
x ˜ = x 1 , 1 T x 1 , 2 T x 1 , 3 T x 2 , 1 T x N 1 , 3 T x N , 1 T x N , 2 T x N , 3 T T ,
z ˜ = z 1 , 1 T z 1 , 2 T z 1 , 3 T z 2 , 1 T z N 1 , 3 T z N , 1 T z N , 2 T z N , 3 T T ,
where x k , c represents the combined states for n w wells Equation (9a) at time instant k and the collocation point c in the interval [ k , k + 1 ] . To ensure continuity of the states between two consecutive time intervals, the final state variables x k , 3 and the initial conditions of the next time interval x 0 must be equal, where the vector of initial states at each interval is represented by:
x 0 = x 1 , 0 T x 2 , 0 T x N , 0 T x N + 1 , 0 T T .
The control inputs u ˜ = ( u k | k K ) , which are discretized at each sampling interval, are assumed to be piecewise constant over each interval and hence are not discretized at the collocation points:
u ˜ = u 1 T u 2 T u N T T .
Note that the parameters p are assumed to be time invariant. The discretized system dynamics at any time instant k can then be written as
F ( x ˜ k , x 0 k , z ˜ k , u ˜ k , p ) = 0 .
Once the system has been discretized, the daily production optimization problem can be posed as a standard NLP problem, divided into N equally spaced sampling intervals in K = { 1 , , N } on a prediction horizon from k = 1 to k = N . The vector of decision variables for the NLP problem over this prediction horizon is then given by:
θ = x k , 0 T x 0 k x k , 1 T x k , 3 T x ˜ k z k , 1 T z k , 3 T z ˜ k u k T u ˜ k T k K ,
min θ J = k = 1 N J p r o f i t + γ k = 1 N Δ u 2 , s . t .
F ( x ˜ k , x 0 k , z ˜ k , u ˜ k , p ) = 0    k K . p U ,
i = 1 n w w p g i w g M a x    i N ,
x l x k , c x h    k K , c C ,
z l z k , c z h    k K , c C ,
u l u k u h    k K
Δ u l Δ u k Δ u h ,    k K
x k , 3 = x 0 k + 1    k K ,
x 1 , 0 = x 0 .
The objective function is comprised of the economic cost function Equation (11) and in addition penalizes the control effort using the tuning parameter γ. The total gas capacity constraints are implemented in Equation (17c), where w g M a x is the maximum gas capacity. The discretized dynamic model is implemented as state constraints Equation (17b). Upper and lower bound constraints on the differential and algebraic states are implemented at each collocation point and the upper and lower bound constraints on decision variables are implemented at each sample as shown in Equations (17d)–(17f). Rate of change constraints on the decision variables are implemented in Equation (17g). The shooting gap constraints to ensure state continuity are implemented in Equation (17h). The initial conditions are enforced in Equation (17i). The uncertain parameter G O R can take any value from a bound uncertainty set, U = { E 0 ( G O R ) ± σ } .
In the nominal optimization case, the uncertainty is ignored in the optimization problem. The uncertain parameters are assumed to take their expected values. In this case, the optimization problem Equation (17) is solved with
G O R i = E 0 ( G O R i ) i N .
In the case of constrained optimization, the optimal solution is the one where the gas capacity constraints are active. If the true realization of the uncertain parameters is higher than the expected value, then the optimal solution provided by the deterministic optimization may lead to infeasibility when implemented.
To ensure robust feasibility, the uncertain parameters may be assumed to take their worst case realization in the optimization problem. This was first introduced in 1973 by Soyster where every uncertain parameter in convex programming was taken equal to its worst case value within a set [27]. Since then, optimization for the worst case value of the parameters within a set has become effectively known as Robust Optimization. A static robust optimization approach for gas lift well optimization using the robust counterpart formulation, as described in [3], was recently presented in [16]. However, since the uncertainty is simple in the considered problem, the worst case can be easily determined a priori without explicitly formulating the robust counterpart. Therefore, we do not formulate the optimization problem using the robust counterpart, but simply take the a priori computed worst case values for all the uncertain parameters. For the application considered in the paper, we know that the worst case scenario occurs when the GOR of all the wells takes its maximum realization simultaneously. Therefore, we simply choose the worst case GOR as shown in Equation (19). To avoid further confusion, we call this approach “worst case optimization” instead of "robust optimization".
The worst case optimization problem (17) can then be solved with
G O R i = U i = E 0 ( G O R i ) + σ i i N ,
since the worst case always occurs for the maximum GOR value for each individual well. However, the robust solution will be overly conservative, since the probability that all the uncertain parameters taking its worst case realization will be low. This leads to a suboptimal solution, since the constraints may not be active, and thus there is spare capacity left.

4.1. Scenario Optimization

The robust formulation does not take into account the fact that new information will be available in the future. This makes the solution conservative as illustrated in [5]. Closed loop or feedback min–max MPC (model predictive control) scheme was proposed in [5] to overcome this problem, where the cost function is minimised over a sequence of control policies rather than control inputs. This problem may be rather difficult to solve due to its infinite dimension. A multistage NMPC (nonlinear model predictive control) framework was proposed in [6], where the uncertainty is represented by a tree of discrete scenarios as shown in Figure 3. In other words, we consider M different models, where each model has a different value for the uncertain parameters to represent how the uncertainty influences state propagation over time. At each sample, we assume that the uncertain parameters can take any discrete value from this subset of M different models. We then design different control input profiles for all the scenarios. By doing so, we explicitly take into account the fact that new information will be available in the future and the decision variables can counteract the effect of the uncertainty.
The main drawback of this approach is that the size of the problem grows exponentially over the prediction horizon, with the number of uncertain parameters and the different values of the uncertainties that are considered in the scenario tree design. To overcome this problem, it may be sensible to stop the branching of the scenarios after a certain number of samples, N R N in the prediction horizon (known as Robust Horizon). The uncertain parameters are assumed to remain constant after the robust horizon until the end of the prediction horizon, as depicted in Figure 3. This is reasonable, since the far future does not have to be represented accurately because the corresponding optimal trajectory will be refined later anyway [6].
Each path from the root node to the leaf is called a scenario and the total number of scenarios is given by S = M N R . Therefore, the scenario-based optimization approach optimizes over all the discrete set of scenarios S = { 1 , , S } . In order to model the real-time decision making accurately, the so-called non-anticipativity constraints have to be imposed on the decision variables. This is to reflect the fact that the decision variables cannot anticipate the future, and hence the decision variables that branch at the same node must take the same value.
Once the necessary preliminaries have been introduced, the scenario-based optimization problem can be formalized:
min θ j j = 1 S ω j J j , s . t .
F ( x ˜ k , j , x 0 k , j , z ˜ k , j , u ˜ k , j , p j ) = 0    k K , p j U , j S ,
i = 1 n w w p g i , j w g M a x    j S , i N ,
x l x k , c , j x h    k K , c C , j S ,
z l z k , c , j z h    k K , c C , j S ,
u l u k , j u h    k K , j S ,
Δ u l Δ u k , j Δ u h    k K , j S ,
x k , 3 , j = x 0 k + 1 , j    k K , j S ,
x 1 , 0 = x 0
j = 1 S χ j u j = 0    j S ,
where S is the number of scenarios, and J j is the cost of each scenario with its probability or weight ω j . The cost of each scenario is given by Equation (17a) and G O R j is a subset of U = { E 0 ( G O R ) ± σ } with M discrete values. Note that all the variables have an extra subscript j compared to Equation (17), where j represents each scenario. In addition, nonanticipativity constraints are included in Equation (20j), where χ is the non-anticipativity constraint which enforces that all the decision variables that branch at the same parent node have to be equal. For example, the nonanticipativity constraints for the scenario tree in Figure 3 are written as
u 2 , 1 = u 2 , 2 = u 2 , 3 = u 2 , 4
u 3 , 1 = u 3 , 2
u 3 , 3 = u 3 , 4

5. Simulation Results

In this work, we consider a network of two gas lifted oil wells ( n w = 2 ) producing to a common manifold as shown in Figure 4. The process is assumed to be constrained by a maximum gas capacity of w g M a x = 8 k g / s . Therefore, we have a DAE system with six differential Equations (1a)–(1c) and 24 algebraic Equations (2a)–(4f), two decision variables and two uncertain parameters. The parameter values used in the simulation are summarised in Table 1.
An optimizing control structure with integrated optimization and control [28] was chosen, where the control system uses an online dynamic optimization based on a nonlinear model of the plant and solves for the optimal trajectory over a prediction horizon. The dynamic optimization problem in this work was solved with a prediction horizon N = 60 and a sampling time of T s = 300 s. The first control input is then applied to the plant.
For the deterministic optimization case, the expected value of the GOR was used in the optimization problem, and, for the worst case optimization, the maximum value of the GOR was used in the optimization problem. In the case of scenario-based optimization, four different possible values of the GOR were used in the optimization problem (see Table 2), and a robust horizon of N R = 1 was chosen.
The optimization problem considered here computes the optimal gas lift rate for each well. We assume that we have perfect low level controllers that adjust the gas lift choke z g l to provide the desired gas lift rates. We also assume that perfect state feedback is available for the dynamic optimization. These assumptions are justified, since the main focus in this work is to compare the nominal, worst case and scenario-based optimization approaches. The control structure used in this work is shown in Figure 5.
The simulation starts with the true GOR the same as the nominal GOR. At sampling instant N = 15 , true GOR gradually increases to 0.15 and 0.155 in well 1 and well 2, respectively, and remains constant at these values until N = 45 . At sampling instant N = 45 , the GOR suddenly increases to 0.2 and 0.16 (worst case realization) in wells 1 and 2, respectively. The true GOR profile is shown is Figure 6f.
The system is first simulated for the nominal optimization case, where the optimization assumes the GOR to be at its nominal value. When the true GOR is at its nominal value, there is no plant model mismatch and the total gas capacity constraints are active as expected. However, when the true GOR in the system increases, this leads to constraint violation.
Then, the system is simulated with the worst case optimization, where the optimizer assumes GOR to take its worst case value. When the true GOR is at its nominal value, we see that the optimal solution implemented is rather conservative. The gas capacity constraints are no longer active and there is spare capacity that can be utilised. When the GOR increases, we see that the constraints are not violated, even when the GOR does take its worst case value at N = 45 . The solution is robust feasible at the cost of conservativeness.
Finally, the system is simulated with the scenario-based optimization with four different GOR values as shown in Table 2. All the scenarios are assumed equally probable and are therefore provided with equal weights for all the scenarios. When the GOR is at its nominal value, the optimizer solves for the optimal inputs that are feasible for all the possible scenarios, and we see that the gas capacity constraints are not active. However, the solution is less conservative than the worst case optimization. As the GOR increases, the implemented solution proves to be robust feasible, and the constraints are satisfied even when the GOR takes its worst case value. However, when the true GOR assumes its worst case value, the total oil produced is less than the worst case optimization. This is due to the fact that there is no plant model mismatch in the worst case optimization case, whereas in the scenario tree optimization, the optimal solution is computed that maximises the oil rate for the other scenarios in addition to the worst case scenario.

6. Discussion

The case study consists of two wells with one constraint and one uncertain parameter ( G O R ) with a given nominal value and variance. In the nominal case, since well 1 has a marginally lower expected GOR, one would prioritize well 1 over well 2 to utilise the maximum gas capacity and maximise oil rate. In the worst case, however, since well 2 now has lower expected GOR, one would then prioritize well 2 over well 1. This is seen in the true optimal gas lift rates in Table 3, where well 1 is prioritized over well 2 for the nominal case and vice versa for the worst case realization. This is similar to an observation made by [15] for a static oil production optimization case.
In the nominal optimization, when the true GOR increases, the solution imminently becomes infeasible and violates the total gas capacity constraints. The optimizer then tries to correct and reduces the gas lift rates for both of the wells. Once the total gas is below the constraint, the optimizer then increases the gas lift rates for both of the wells. This is because the optimizer “thinks” the oil rate can be maximized based on the model. The implemented solution then keeps oscillating around the constraint. Such a behaviour is clearly unacceptable.
To ensure robust feasibility, worst case optimization was then employed. The results of the worst case optimization shows that the robust solution is very conservative. Scenario-based optimization was then performed to reduce the conservativeness. When the true GOR is at its nominal value, the loss for worst case optimization is 0.549 kg/s as opposed to 0.389 kg/s for the scenario-based optimization. This shows that when the actual GOR is far away from its worst case values, the scenario optimization performs significantly better and is able to reduce the conservativeness of the robust solution since it considers different possible scenarios. However, in the unlikely event that the true GOR of all the wells approach their worst case values, the loss for the worst case optimization approaches 0 as opposed to 0.199 kg/s for the scenario-based optimization. This is due to the fact that scenario tree also considers other scenarios in its optimization problem, whereas there is no plant model mismatch in the worst case optimization. The steady state loss computed for the different realizations of the GOR using nominal, worst case and scenario-based optimization is given in Table 3.
The scenario-based optimization approach presented here assumes equal weights/ probabilities for all the different scenarios included in the optimization problem. This makes the optimal solution balance all the possible scenarios equally. This is a viable approach if no information about the uncertainty is known. However, as we get more measurements, information about the true uncertainty is revealed. Updating the weights for the different scenarios based on the measurements could perhaps significantly improve the performance of the scenario-based optimization compared to the worst case optimization even more.

7. Materials and Methods

The dynamic optimization problem considered in this work is discretized into an NLP problem using a third order direct collocation scheme in CasADi v3.0.1 (an open-source tool developed at the Optimization in Engineering Center, K.U.Leuven, Leuven, Belgium) [29] using the MATLAB R2016a (Mathworks Inc., Natick, MA, USA) programming environment. The NLP problem is then solved using IPOPT version 3.12.2 (an open-source tool developed at the Department of Chemical Engineering, Carnegie Mellon University, Pittsburgh, PA, USA) [30], running with a mumps linear solver on a 2.6 GHz workstation with 16 GB memory. The plant (simulator) was implemented in Simulink and solved with an ode45 solver. At each iteration, the first sample of the computed optimal solution is implemented in Simulink R2016a (Mathworks Inc., Natick, MA, USA). After the simulation is completed, the states from the Simulink model are fed back to the optimizer, which is used as the initial value for the next iteration. The data transfer between Simulink and the optimizer is carried out by reading and writing data to the common MATLAB workspace.

8. Conclusions

To our knowledge, this paper is the first publication considering a dynamic scenario-based optimization approach for the daily production optimization problem. A detailed modelling framework for the gas lifted well system that is suitable for dynamic optimization problems was presented. The scenario-based optimization approach was shown to reduce the conservativeness of the solution compared to the worst case optimization while being robust feasible. However, to improve the performance of the scenario-based approach, the weights for the different scenarios to reflect the uncertainty realization must be included as shown in [31]. A natural further step is also to explore systems with pressure coupling between wells and more extensive subsea completions.

Acknowledgments

This work was supported by the SUBPRO (Subsea production and processing) consortium, which is a collaboration between the Norwegian University of Science and Technology (NTNU), the Norwegian Research Council and major industry partners under the Project code 237893.

Author Contributions

D.K. developed the models and performed the simulations and wrote the paper. B.F. and S.S supervised the work and analysed the simulation results and contributed to writing and correcting the paper.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
RTOReal-Time Optimization
DAEDifferential Algebraic Equations
ODEOrdinary Differential Equations
NLPNonlinear Programming Problem
NMPCNonlinear Model Predictive Control
GORGas–Oil Ratio
PIProductivity Index
DPODaily Production Optimization

References

  1. Foss, B.A.; Jensen, J.P. Performance analysis for closed-loop reservoir management. SPE J. 2011, 16, 183–190. [Google Scholar] [CrossRef]
  2. Elgsæter, S.M. Modeling and Optimizing the Offshore Production of Oil and Gas under Uncertainty. Ph.D. Thesis, Norwegian University of Science and Technology (NTNU), Trondheim, Norway, 2008. [Google Scholar]
  3. Ben-Tal, A.; Nemirovski, A. Robust solutions of linear programming problems contaminated with uncertain data. Math. Program. 2000, 88, 411–424. [Google Scholar] [CrossRef]
  4. Bieker, H.P.; Slupphaug, O.; Johansen, T.A. Real time production optimization of offshore oil and gas production systems: A technology survey. In Intelligent Energy Conference and Exhibition; Society of Petroleum Engineers: Amsterdam, The Netherlands, 2006. [Google Scholar]
  5. Scokaert, P.; Mayne, D. Min-max feedback model predictive control for constrained linear systems. IEEE Trans. Autom. Control 1998, 43, 1136–1142. [Google Scholar] [CrossRef]
  6. Lucia, S.; Finkler, T.; Engell, S. Multi-stage nonlinear model predictive control applied to a semi-batch polymerization reactor under uncertainty. J. Proc. Control 2013, 23, 1306–1319. [Google Scholar] [CrossRef]
  7. Wang, P.; Litvak, M.; Aziz, K. Optimization of production operations in petroleum fields. In SPE Annual Technical Conference and Exhibition; Society of Petroleum Engineers: San Antonio, TX, USA, 2002. [Google Scholar]
  8. Gunnerud, V.; Foss, B. Oil production optimization—A piecewise linear model, solved with two decomposition strategies. Comput. Chem. Eng. 2010, 34, 1803–1812. [Google Scholar] [CrossRef]
  9. Camponogara, E.; Nakashima, P.H. Solving a gas-lift optimization problem by dynamic programming. Eur. J. Oper. Res. 2006, 174, 1220–1246. [Google Scholar] [CrossRef]
  10. Camponogara, E.; Nakashima, P. Optimizing gas-lift production of oil wells: piecewise linear formulation and computational analysis. IIE Trans. 2006, 38, 173–182. [Google Scholar] [CrossRef]
  11. Codas, A.; Camponogara, E. Mixed-integer linear optimization for optimal lift-gas allocation with well-separator routing. Eur. J. Oper. Res. 2012, 217, 222–231. [Google Scholar] [CrossRef]
  12. Codas, A.; Jahanshahi, E.; Foss, B. A two-layer structure for stabilization and optimization of an oil gathering network. IFAC-PapersOnLine 2016, 49, 931–936. [Google Scholar] [CrossRef]
  13. Elgsæter, S.M.; Slupphaug, O.; Johansen, T.A. A structured approach to optimizing offshore oil and gas production with uncertain models. Comput. Chem. Eng. 2010, 34, 163–176. [Google Scholar] [CrossRef]
  14. Bieker, H.P.; Slupphaug, O.; Johansen, T.A. Well management under uncertain gas or water oil ratios. In Digital Energy Conference and Exhibition; Society of Petroleum Engineers: Houston, TX, USA, 2007. [Google Scholar]
  15. Hanssen, K.G.; Foss, B. Production Optimization under Uncertainty-Applied to Petroleum Production. IFAC-PapersOnLine 2015, 48, 217–222. [Google Scholar] [CrossRef]
  16. Hülse, E.O.; Camponogara, E. Robust formulations for production optimization of satellite oil wells. Eng. Optim. 2016, 1–18. [Google Scholar] [CrossRef]
  17. Sharma, R.; Glemmestad, B. On generalized reduced gradient method with multi-start and self-optimizing control structure for gas lift allocation optimization. J. Proc. Control 2013, 23, 1129–1140. [Google Scholar] [CrossRef]
  18. Eikrem, G.O.; Imsland, L.; Foss, B. Stabilization of gas-lifted wells based on state estimation. 2004. Available online: http://folk.ntnu.no/bjarnean/pubs/conference/conf-75.pdf?id=ansatte/Foss_Bjarne/pubs/conference/conf-75.pdf (accessed on 14 December 2016).
  19. Peixoto, A.J.; Pereira-Dias, D.; Xaud, A.F.; Secchi, A.R. Modelling and Extremum Seeking Control of Gas Lifted Oil Wells. IFAC-PapersOnLine 2015, 48, 21–26. [Google Scholar] [CrossRef]
  20. Jahanshahi, E. Control Solutions for Multiphase Flow: Linear and nonlinear approaches to anti-slug control. Ph.D. Thesis, Norwegian University of Science and Technology (NTNU), Trondheim, Norway, 2013. [Google Scholar]
  21. Jahanshahi, E.; Skogestad, S. Simplified Dynamic Models for Control of Riser Slugging in Offshore Oil Production. Oil Gas Facil. 2014, 3, 80–88. [Google Scholar] [CrossRef]
  22. Alstad, V. Studies on Selection of Controlled Variables. Ph.D. Thesis, Norwegian University of Science and Technology (NTNU), Trondheim, Norway, 2005. [Google Scholar]
  23. Krishnamoorthy, D.; Bergheim, E.M.; Pavlov, A.; Fredriksen, M.; Fjalestad, K. Modelling and Robustness Analysis of Model Predictive Control for Electrical Submersible Pump Lifted Heavy Oil Wells. IFAC-PapersOnLine 2016, 49, 544–549. [Google Scholar] [CrossRef]
  24. Eikrem, G.O.; Aamo, O.M.; Foss, B.A. On instability in gas lift wells and schemes for stabilization by automatic control. SPE Prod. Oper. 2008, 23, 268–279. [Google Scholar] [CrossRef]
  25. Golan, M.; Whitson, C.H. Well Performance, 2nd ed.; Tapir: Trondheim, Norway, 1995. [Google Scholar]
  26. Biegler, L.T. Nonlinear Programming: Concepts, Algorithms, and Applications to Chemical Processes; SIAM: Philadelphia, PA, USA, 2010; Volume 10. [Google Scholar]
  27. Soyster, A.L. Technical note—Convex programming with set-inclusive constraints and applications to inexact linear programming. Oper. Res. 1973, 21, 1154–1157. [Google Scholar] [CrossRef]
  28. Skogestad, S.; Postlethwaite, I. Multivariable Feedback Control: Analysis and Design, 2nd ed.; Wiley: New York, NY, USA, 2007. [Google Scholar]
  29. Andersson, J. A General-Purpose Software Framework for Dynamic Optimization. Ph.D. Thesis, Arenberg Doctoral School, KU Leuven, Department of Electrical Engineering (ESAT/SCD) and Optimization in Engineering Center, Kasteelpark Arenberg, Belgium, 2013. [Google Scholar]
  30. Wächter, A.; Biegler, L.T. On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear programming. Math. Program. 2006, 106, 25–57. [Google Scholar] [CrossRef]
  31. Lucia, S.; Paulen, R. Robust nonlinear model predictive control with reduction of uncertainty via robust optimal experiment design. IFAC Proc. Vol. 2014, 47, 1904–1909. [Google Scholar] [CrossRef]
Figure 1. Typical multilevel control hierarchy in oil and gas operations as described in [1].
Figure 1. Typical multilevel control hierarchy in oil and gas operations as described in [1].
Processes 04 00052 g001
Figure 2. Schematic representation of third order direct collocation using Radau scheme showing the polynomial approximation of dynamic system (8) for a single sampling interval [ k , k + 1 ] . Note that the differential state has one additional collocation point at t k , 0 , which is used to ensure state continuity by enforcing shooting gap constraints. The control input u is piecewise constant over the interval [ k , k + 1 ] .
Figure 2. Schematic representation of third order direct collocation using Radau scheme showing the polynomial approximation of dynamic system (8) for a single sampling interval [ k , k + 1 ] . Note that the differential state has one additional collocation point at t k , 0 , which is used to ensure state continuity by enforcing shooting gap constraints. The control input u is piecewise constant over the interval [ k , k + 1 ] .
Processes 04 00052 g002
Figure 3. Scenario tree representation of the uncertainty evolution with two models ( M = 2 ) and a robust horizon of two samples ( N R = 2 ). The notation x k , j represents the state x at sample k for j t h scenario.
Figure 3. Scenario tree representation of the uncertainty evolution with two models ( M = 2 ) and a robust horizon of two samples ( N R = 2 ). The notation x k , j represents the state x at sample k for j t h scenario.
Processes 04 00052 g003
Figure 4. Production network with two gas lifted wells producing to a common manifold.
Figure 4. Production network with two gas lifted wells producing to a common manifold.
Processes 04 00052 g004
Figure 5. Schematic representation of the optimizing control structure. The Dynamic RTO (Real-time optimization) for nominal, worst case or scenario-based approach computes the optimal gas lift rates for the two wells and sets the process at each iteration.
Figure 5. Schematic representation of the optimizing control structure. The Dynamic RTO (Real-time optimization) for nominal, worst case or scenario-based approach computes the optimal gas lift rates for the two wells and sets the process at each iteration.
Processes 04 00052 g005
Figure 6. Simulation results for the nominal case (dotted), worst case (dashed) and scenario-based optimization (solid). (a) The total gas rates are shown in black and the maximum gas capacity constraint shown in yellow, (b) the total oil rates are shown in black and the true steady-state optimum for the oil rate is shown in yellow, (c) the gas rates from individual wells are shown in blue and red for well 1 and well 2, respectively, (d) The oil rates from individual wells are shown in blue and red for well 1 and well 2, respectively, (e) The gas lift rates from individual wells are shown in blue and red for well 1 and well 2, respectively. (f) The true GOR (gas-oil ratio) realization used in the simulator are shown in blue and red for well 1 and well 2, respectively.
Figure 6. Simulation results for the nominal case (dotted), worst case (dashed) and scenario-based optimization (solid). (a) The total gas rates are shown in black and the maximum gas capacity constraint shown in yellow, (b) the total oil rates are shown in black and the true steady-state optimum for the oil rate is shown in yellow, (c) the gas rates from individual wells are shown in blue and red for well 1 and well 2, respectively, (d) The oil rates from individual wells are shown in blue and red for well 1 and well 2, respectively, (e) The gas lift rates from individual wells are shown in blue and red for well 1 and well 2, respectively. (f) The true GOR (gas-oil ratio) realization used in the simulator are shown in blue and red for well 1 and well 2, respectively.
Processes 04 00052 g006
Table 1. List of parameters and their corresponding values used in the results.
Table 1. List of parameters and their corresponding values used in the results.
ParameterUnitsWell 1Well 2Comment
L w [m]15001500Length of well
H w [m]10001000Height of well
D w [m]0.1210.121Diameter of well
L r [m]500500Length of well below injection
H r [m]100100Height of well below injection
D r [m]0.1210.121Diameter of well below injection
L a [m]15001500Length of annulus
H a [m]10001000Height of annulus
D a [m]0.1890.189Diameter of annulus
ρ o [kg/m 3 ]900800Density of Oil
C i v [m 2 ]1 × 10 4 1 × 10 4 Injection valve characteristic
C p c [m 2 ]1 × 10 3 1 × 10 3 Production valve characteristic
p m [bar]2020Manifold pressure
p r [bar]150155Reservoir pressure
P I [kg·s 1 ·bar 1 ]2.22.2Productivity index
T a [ C]2828Annulus temperature
T w [ C]3232Well tubing temperature
M w [g]2020Molecular weight of gas
G O R [kg/kg]0.1 ± 0.10.15 ± 0.01Gas–Oil ratio
Table 2. GOR (Gas-Oil ratio) values used in the optimizer for nominal, worst case and scenario-based approach.
Table 2. GOR (Gas-Oil ratio) values used in the optimizer for nominal, worst case and scenario-based approach.
WellNominalWorst CaseScenario-Based
GOR well 10.10.20.050.10.150.2
GOR well 20.150.160.1450.150.1550.16
Table 3. Results–loss evaluations for the different scenarios for nominal, worst case and scenario-based optimization.
Table 3. Results–loss evaluations for the different scenarios for nominal, worst case and scenario-based optimization.
OptimizationTrue GORTrue OptimumComputed OptimumPotentialObtainedLoss
Well 1Well 2Well 1Well 2Well 1Well 2Tot OilTot Oil
[kg/kg][kg/kg][kg/s][kg/s][kg/s][kg/s][kg/s][kg/s][kg/s]
Nominal case0.050.1453.3371.51172.6631.51831.87931.70.179
0.10.152.5631.4292.5631.42931.87931.8790
0.150.1551.7881.348infeasibleinfeasible31.879infeasible-
0.20.161.0141.266infeasibleinfeasible31.879infeasible-
Worst case0.050.1453.3371.51171.3241.3231.87930.691.189
0.10.152.5631.4291.3181.32931.87931.330.549
0.150.1551.7881.3481.2351.31731.87931.690.189
0.20.161.0141.2661.0141.26631.87931.8790
Scenario tree0.050.1453.3371.51172.0480.704631.87931.120.759
0.10.152.5631.4292.0360.690431.87931.490.389
0.150.1551.7881.3482.0380.561631.87931.670.209
0.20.161.0141.2662.0070.269731.87931.680.199

Share and Cite

MDPI and ACS Style

Krishnamoorthy, D.; Foss, B.; Skogestad, S. Real-Time Optimization under Uncertainty Applied to a Gas Lifted Well Network. Processes 2016, 4, 52. https://doi.org/10.3390/pr4040052

AMA Style

Krishnamoorthy D, Foss B, Skogestad S. Real-Time Optimization under Uncertainty Applied to a Gas Lifted Well Network. Processes. 2016; 4(4):52. https://doi.org/10.3390/pr4040052

Chicago/Turabian Style

Krishnamoorthy, Dinesh, Bjarne Foss, and Sigurd Skogestad. 2016. "Real-Time Optimization under Uncertainty Applied to a Gas Lifted Well Network" Processes 4, no. 4: 52. https://doi.org/10.3390/pr4040052

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop