You are on page 1of 22

Comput Geosci (2013) 17:167–188

DOI 10.1007/s10596-012-9323-1

ORIGINAL PAPER

A simultaneous perturbation stochastic approximation


algorithm for coupled well placement and control
optimization under geologic uncertainty
Lianlin Li · Behnam Jafarpour ·
M. Reza Mohammad-Khaninezhad

Received: 30 September 2010 / Accepted: 19 September 2012 / Published online: 1 November 2012
© Springer Science+Business Media Dordrecht 2012

Abstract Development of subsurface energy and en- permeability and porosity). We use several numerical
vironmental resources can be improved by tuning im- experiments, including a channel layer of the SPE10
portant decision variables such as well locations and model and the three-dimensional PUNQ-S3 reservoir,
operating rates to optimize a desired performance met- to illustrate the performance improvement that can be
ric. Optimal well locations in a discretized reservoir achieved by solving a combined well placement and
model are typically identified by solving an integer control optimization using the SPSA algorithm under
programming problem while identification of optimal known and uncertain reservoir model assumptions.
well settings (controls) is formulated as a continuous
optimization problem. In general, however, the deci- Keywords Well placement · Production optimization ·
sion variables in field development optimization can Simultaneous perturbation stochastic approximation
include many design parameters such as the number, (SPSA) · Geologic uncertainty · Field development
type, location, short-term and long-term operational
settings (controls), and drilling schedule of the wells. In
addition to the large number of decision variables, field 1 Introduction
optimization problems are further complicated by the
existing technical and physical constraints as well as the A significant capital cost in developing subsurface
uncertainty in describing heterogeneous properties of reservoirs for energy (e.g., hydrocarbon, geothermal),
geologic formations. In this paper, we consider simulta- hydrological (groundwater), and environmental (nu-
neous optimization of well locations and dynamic rate clear and fossil fuel wastes) resource development is
allocations under geologic uncertainty using a variant related to drilling of injection/production wells. Poorly
of the simultaneous perturbation and stochastic ap- selected well locations can lead to inefficient field
proximation (SPSA). In addition, by taking advantage development and inadequate reservoir performance.
of the robustness of SPSA against errors in calculat- Optimal well placement can significantly improve the
ing the cost function, we develop an efficient field performance of subsurface reservoirs and reduce the
development optimization under geologic uncertainty, overall cost of field development. In optimizing the
where an ensemble of models are used to describe overall reservoir life-cycle performance, in addition to
important flow and transport reservoir properties (e.g., identifying optimal well locations, one needs to specify
the best operational setting (working fluid rates or
pressures) for each well. Furthermore, the number of
L. Li · M. R. Mohammad-Khaninezhad wells to be drilled and the drilling schedule (in se-
Texas A&M University, College Station, TX 77843, USA quential drilling) are among the decision variables that
can play important roles in maximizing the net present
B. Jafarpour (B)
University of Southern California, 925 Bloom Walk,
value (NPV) of the project and improving the sweep
HED 313, Los Angeles, CA 90089, USA efficiency and productivity of the system. To date, re-
e-mail: behnam.jafarpour@usc.edu search in this area has mainly focused on addressing
168 Comput Geosci (2013) 17:167–188

only one of the above optimization problems at a time. lems. Gradient-based techniques, on the other hand,
In particular, well placement optimization has been guarantee a monotonic improvement in the objective
carried out by assuming fixed injection/production well function with each iteration; however, they can only
controls [2, 3, 9, 15, 26] and production optimization is find local solutions. Regardless of the method used,
performed to find optimal well controls for fixed well the computational bottleneck in well placement opti-
locations [4, 18]. When solved separately, each of these mization is associated with the complexity of the re-
problems can only provide a suboptimal solution to the peated objective function evaluations under different
overall field performance optimization. A more general well configuration scenarios that require many full
formulation is to solve the coupled well placement and numerical flow simulations. Therefore, automatic ap-
control optimization problem simultaneously. To com- proaches, whether stochastic or deterministic, have
plicate the problem even further, one needs to consider been hampered by the overwhelming computational
the unavoidable uncertainty and the risk implications cost of running hundreds or thousands of full-blown
due to lack of complete and perfect knowledge about simulations before finding a solution. The computa-
heterogeneous reservoir flow properties. A generalized tional cost can become prohibitive when robust opti-
problem formulation, however, can be too complex and mization is considered in which the objective function
have too many degrees of freedom to solve for. In this is selected to optimize the performance of the reser-
paper, as a step toward this generalization, we only voir under a large number of model descriptions that
combine the well placement and production optimiza- account for the uncertainty in the knowledge about the
tion problems. reservoir properties [24].
The current industry practice in finding optimal well Gradient methods provide a computationally more
locations is based primarily on semi-manual meth- efficient alternative to stochastic search methods. A
ods where a team of geoscientists and reservoir en- key component of gradient-based search methods is
gineers combine engineering and geologic expertise the calculation of the objective function gradient with
and judgment with available information and simulated respect to well locations. In recent years, development
response of the reservoir to identify reasonable well of efficient adjoint techniques for calculating the gra-
locations. Numerical simulation is typically employed dients of well production responses to well control
to facilitate the process by quantifying the performance variables has led to a number of creative attempts to
of candidate well configurations. When combined with approximate the gradients with respect to well locations
dependable geologic information and reservoir engi- using pseudo wells and adjoint methods [9, 18, 25]. In
neering expertise, manual techniques may be reliable this approach, pseudo wells are placed in the imme-
for small reservoirs with simple geologic descriptions diate neighboring grid blocks to each major well in
where very few well location candidates may exist; how- the reservoir domain. The pseudo wells are wells of
ever, manual placement of multiple wells in large reser- the same type as the major target wells in the sim-
voirs with complex geologic structures is less likely to ulation (injection or production) with sufficiently low
provide near-optimal well locations. Several optimiza- flow rates to minimize their effect on the simulation
tion algorithms have been developed in the literature results. The standard adjoint method is then used to
to provide a systematic way to explore a broader set of compute the gradient of the objective function with re-
scenarios that aim at finding improved well location and spect to pseudo-well rates. At each iteration, among the
configurations. pseudo wells surrounding each major well, the one with
Automatic well placement techniques are generally maximum gradient is used to approximate an ascent
classified as (heuristic) stochastic methods such as ge- direction for well placement optimization (that is, the
netic algorithm and simulated annealing techniques major well is moved to the location of the neighboring
[2, 3, 15] that are hoped to search for the global so- pseudo well with the largest gradient) [9].
lution, and gradient-based deterministic methods such A correct interpretation of the adjoint-based gra-
as adjoint-based algorithms that can only find local dient information in the pseudo-well approach is in
solutions [9, 18, 25]. Hybrid techniques that exploit fact different from the gradients needed for well place-
the advantages of the two approaches have also been ment. The interpretation of gradients calculated by the
developed. Although stochastic approaches are easy pseudo-well approach is as follows: “assuming a major
to implement and aim at finding the global solution, well with large injection/production quantities is at the
they do not guarantee a monotonic improvement of center of the neighboring pseudo wells, and given the
the objective function with successive iterations and small injection/production rates of the pseudo wells, a
usually do not scale well for application to large prob- small (local) increase in the rate of the pseudo well with
Comput Geosci (2013) 17:167–188 169

the largest gradient leads to a locally steepest improve- algorithm along with several variations of it, includ-
ment in the objective function.” In this approach, the ing discrete SPSA [6, 7, 11], adaptive (second-order)
∂f
derivatives ∂q i
(where f is the objective function and q SPSA [21], and global search SPSA [14], has been
is the rate for the pseudo well i) of the pseudo wells are reported in the literature. In [16], a coordinate descent
∂f
used to approximate the true gradients ∂u i
, where ui is approach was developed for large-scale optimization
the position index. In addition, gradient calculation is with SPSA algorithm. The SPSA algorithm has also
carried out when a well with high rate is present and been compared with other stochastic search methods
surrounded by the pseudo wells (instead of moving the [23]. An important result is that [19, 22, 23] for a p-
major well to neighboring locations and computing the dimensional problem under reasonably general condi-
corresponding gradient using numerical perturbations). tions, the SPSA algorithm reaches the same level of
To improve the gradient definition in [9], Sarma accuracy as the finite-difference stochastic approxima-
and Chen [18] proposed that the Dirac delta function tion method for a given number of iterations; however,
representing the well (sink/source) terms in reservoir SPSA uses p times fewer function evaluations at each
simulation be approximated by a multivariate Gaussian iteration. The efficiency of SPSA becomes particularly
function (describing the spatial distribution and rates significant when the number of decision variables is
of many pseudo wells around the major target wells). large. This implies that, overall, a properly generated
After adopting this modification, the adjoint method random perturbation of all p variables is as effective as
is borrowed to first find the gradient of the objective approximating the p partial derivatives one at a time.
function f (◦) with respect to pseudo-well rates and In [22, 23], SPSA is compared with several state-of-the-
then convert them to the gradients with respect to well art optimization methods such as simulated annealing
locations using the chain rule of differentiation and the and genetic algorithm, where it is shown to be quite
functional relation between pseudo-well locations and competitive (and possibly more efficient) in terms of
rates. Wang et al. [25] also used a gradient-based well computational time for the same solution accuracy.
placement optimization where they started the opti- As an alternative to gradient-based approaches, a
mization by placing one well with constant rate in all variant of SPSA (integer SPSA) has been introduced
grid blocks and iteratively removed the wells based on to solve the well placement problem by Bangerth et al.
the gradient information to improve the objective func- [2]. In [2], the authors use the standard SPSA algo-
tion that accounted for drilling costs. In this approach, rithm in a set of numerical waterflooding experiments
the discrete variables (i.e., well locations) are replaced and reported nearly optimal well locations with a high
with continuous decision variables (i.e., well rates) and probability. As implied by the name, the SPSA was
whether a grid block is a good candidate for drilling introduced as a stochastic method, and its convergence
a well is inferred from the rates. The numerical ex- analysis is carried out within the framework of the
periments presented in [9, 18, 25] suggest that, despite stochastic theory. A randomized coordinate descent
the approximations involved, adjoint-based gradients (RCD) algorithm has also been recently proposed as
provide reasonable ascent directions for well placement an alternative stochastic approximation method [16]. In
optimization. However, the approximations involved this approach, at each iteration, only one component
in computing the gradients in this method can lead to of the gradient vector is approximated and used to
occasional iterations at which the NPV maximization determine a descent direction. Our preliminary evalua-
objective function is decreased. tion of this method for field development applications
Within the reservoir engineering context, gradient- has indicated a comparable performance to the SPSA
based methods can only be efficient if efficient ad- algorithm.
joint models are used to calculate the gradients. How- In this paper, we investigate a variant of the SPSA al-
ever, constructing an adjoint model is a relatively gorithm for solving of the combined well placement and
involved process that requires additional development production optimization. We maximize the objective
in the forward modeling source codes. An alterna- function f (xi , yi )i=1,2,...,N that often denotes the NPV
tive approach is the stochastic optimization method. of the reservoir asset, by placing N wells in a reservoir
In particular, the simultaneous perturbation stochastic and simultaneously optimizing their life-cycle rate al-
approximation (SPSA) has been developed for use with locations. Here, xi , yi are the position of the ith well
large dimensional multivariate optimization problems in x- and y-coordinates, respectively. Although f (◦) is
in several applications where the gradient information a continuous function of xi and yi , the discretization
is not available and when the objective function can of the model and direct-delta form of the source/sink
be noisy. The theoretical convergence of the SPSA functions in the mathematical formulation of the fluid
170 Comput Geosci (2013) 17:167–188

flow equations complicate the gradient calculation [18]. space. The flow equations after ignoring the capillary
We, therefore, use the stochastic perturbation approach pressure (i.e., po = pw = p) can be compactly written
to approximate ascent directions for improving the ob- as [1]
jective function. In addition to solving the combined  
optimization problem, we evaluate the performance of krm
∇ · K (x, y, z) ∇ p (x, y, z, t)
the SPSA algorithm under geologic uncertainty. To μm
reflect the uncertainty in reservoir model description, ∂ Sm (x, y, z, t)
we use an ensemble of 100 model realizations with = φ (x, y, z)
∂t
distinct flow property distributions, where each model
qm (x, y, z, t)
has a different production response under an identical − , m = o, w (1)
ρm (x, y, z, t)
injection/production scenario. In this case, we maximize
the expected value of the NPV function over the entire

ensemble of models. This approach uses the expected So + Sw = 1,  := {(x, y) 0 ≤ x ≤ Lx , 0 ≤ y ≤ L y ,
value of NPV to hedge the risk of field development
under geologic uncertainty so that the resulting well 0 ≤ z ≤ Lz }.
locations and rates provide reasonable NPV values for
where Sm (x, y, z, t) denotes the saturation for phase m
the majority of the models considered. In this case, we
and p(x, y, z, t) refers to the pressure field; the absolute
exploit the stochastic nature of the SPSA algorithm and
permeability and porosity of the rock are represented
its robustness to noisy objective functions to develop an
by K(x, y, z) and φ(x, y, z), respectively. In our exam-
efficient solution algorithm.
ples, we have assumed that porosity φ(x, y, z), is ho-
In the remainder of the paper, we present the pro-
mogeneous with a constant value of 0.2 throughout the
posed methodology and discuss its application to si-
domain. The fluid properties are defined by viscosities
multaneous well placement and control optimization in
μw,o (assumed constant) and saturation-dependent rel-
experiments involving waterflooding of oil reservoirs
ative permeability krw,o (Sw ), which are described with
under geologic uncertainty. In Section 2, we briefly
the following quadratic functions:
present the optimal field development problem formu-
lation followed by the description of the SPSA algo-
rithm for combined well placement and dynamic rate (s∗ )2 (1 − s∗ )2 ∗ sw − swc
λw (sw ) = , λo (sw ) = , s =
allocation optimization in Section 3, where we also dis- μw μo 1 − sor − swc
cuss an efficient and robust field development approach (2)
by exploiting an important property of the SPSA al-
gorithm. In Section 4, we present several numerical where sor is the irreducible oil saturation and swc is
experiments to demonstrate the performance of the the connate water saturation. We have also assumed
proposed method under reservoir model uncertainty. that μo = μw = 1.0 and so = swc = 0. The source and
We conclude the paper by providing a summary of sink terms are denoted by qm with a negative value
our findings and a general discussion of the challenges for production wells and positive value for injection
and opportunities in formulating and solving the gen- wells (and are nonzero only if the grid cell (x, y, z) is
eralized field development optimization problems in intersected by a well). For the simulations in this paper,
Section 5. we have assumed no flow boundary conditions, i.e.,
K(∂, t) ≡ 0, where the boundary of the domain  is
denoted by ∂. The initial conditions for the pressure
2 Problem statement and saturation are given by

In this section, we discuss the proposed simultane- p (x, y, z, t = 0) = p0 (x, y, z) (3)


ous well placement and rate allocation optimization Sw (x, y, z, t = 0) = Sw0 (x, y, z) . (4)
problem formulations, starting with the governing flow
equations. Following [1], the governing flow equations are solved
using the finite elements discretization of the domain
2.1 Governing flow equations into Ngb grid blocks to obtain the spatiotemporal distri-
bution of saturation and pressure (the dynamic states of
We consider a two-phase incompressible and immisci- the system). For compactness, we combine the well grid
ble flow system (oil/water) in a three-dimensional (3D) block indices in a vector u of length Nw = Ninj + Nprod
Comput Geosci (2013) 17:167–188 171

where each component ui represents the location (lin- application to simultaneous well placement and rate
ear index) of the ith well and Ninj and Nprod denote the allocation optimization problem in Eq. 5 and evalu-
number of injection and production wells, respectively. ate its performance under two different assumptions:
In addition, we assume that all wells are fully completed (1) deterministic case in which the reservoir model is
in the vertical direction to eliminate the need to include known and (2) stochastic case, where multiple realiza-
the vertical index in the well locations search space. tions of the reservoir model are considered to repre-
We note that a more challenging problem is finding the sent geologic uncertainty. For field optimization under
entire well trajectory in directional completions, which geologic uncertainty, we take advantage of the SPSA’s
we do not consider in this paper. robustness against noisy objective functions and intro-
duce an efficient implementation that, at each iteration,
2.2 Optimization problem formulation only uses a small subset of randomly selected model
realizations to compute the expected value of the cost
Optimization of well locations and operating controls function (instead of using the full ensemble of prior
(rates in this paper) can be formulated using the fol- models).
lowing problem statement:
 
q̂, û = arg min f q (u, t) , u 2.3 Objective function
q∈R,u∈Z
 
s.t. g q (u, t) , u, m = 0 (5) For a single deterministic reservoir model, we consider
q (u, t) ∈ q and u ∈ u the minimization objective function f (◦) to be the neg-
ative of the reservoir NPV. In general, the objective
Here, f (◦) is a specified objective function (dis- function can be any user-specified performance mea-
cussed next), q(u, t) contains continuous decision vari- sure. In hydrocarbon production problems, the NPV
ables representing the well control setting (injec- function contains the revenues from oil production and
tion/production rates in this paper) with the feasible set the costs of water injection and water disposal/reuse
q , the set of discrete decision variables u has the fea- at production wells, along with other operation costs.
sible set u , and g(q(u, t), u, m) denotes the discretized The objective function in our examples does not include
multiphase flow equations with m as the model input the capital cost associated with drilling wells since we
parameters (e.g., petrophysical and fluid properties). assume a predetermined number of wells with a fixed
We note that in this formulation both the simulation cost of drilling. In addition, since we fix the amount
time and number and type of wells (Ninj and Nprod ) are of injected water, we only consider the cost of water
explicitly specified by choosing a predetermined simu- production. While the objective function can, in gen-
lation time and assuming a fixed number of injection eral, be more complex than what has been considered
and production wells. In general, however, the number in this paper, the choice of the objective function is
and type of wells, the drilling schedule, and the reser- not likely to affect the solution approach. For a known
voir lifetime may be considered as additional decision reservoir model, we write the objective function in the
variables. In this paper, we implement a generalized form
SPSA algorithm to solve the above mixed integer pro-
gramming problem. First, we apply the original SPSA   
K−1 N
prod
−rw qkw,n (u) + ro qko,n (u)
algorithm to solve the integer programming subprob- f u, q = − tk (7)
(1 + b )a
lem in which the rates q(u, t) are known and fixed but n=1
k=0
the well locations are unknown; that is, we seek only the
optimal well locations u for a predetermined number where the superscript k is the time index (with K as
of wells with specified controls by solving the following the total number of time steps in the simulation), n is
optimization problem (in this case, the decision variable the production well index, and ro and rw are the oil
q is dropped): price and cost of water production (per unit volume),
respectively. In this formulation, the NPV objective
ûwp = arg min f (u) function depends on the oil production rate qo and
u∈Z
  (6)
water production rate qw . In Eq. 7, the time step size
s.t. g u, q, m = 0 and u ∈ u
is denoted by tk , the discount rate by b (expressed as
where ûwp denotes the solution of the well placement annual interest rate) and the number of years passed
problem. We then modify the SPSA algorithm for since the start of production by a.
172 Comput Geosci (2013) 17:167–188

In practice, the exact distribution of reservoir prop- The basic idea of the discrete SPSA algorithm for
erties (such as permeability) can be highly uncertain. well placement can be outlined
as (1) choosing a
A practical approach to account for geologic uncer- “proper” random direction k = k1 , k2 , . . . , kp =
tainty in predicting the reservoir flow behavior and {ki }i=1: p from a distribution with bounded inverse ex-
response is to use several models. Under ensemble- pectation [11, 19, 23] (for example, a Bernoulli random
level reservoir modeling and production forecasting, number) in the search space at each iteration and (2)
one can define the corresponding optimization objec- finding an ascent direction (using an approximate gra-
tive function in terms of the point statistics of the NPV dient estimate) by computing a two-sided simultaneous
function [24]. A simple choice is to use the expected perturbation using the selected random direction.
value of the NPV over the existing models, that is Given the random choice of direction k , it is natural
to expect that a step in the selected direction does not
1 
Nens
       necessarily result in an improvement of the objective
fRobust u,q = E f u,q = f j u,q (8)
Nens j=1 function; meaningful computational saving over the
finite-difference perturbation would only be achieved
where E[·] denotes the statistical expectation operator if very few random directions (relative to number
and Nens denotes the number of model realizations of decision variables) are needed to yield marked
(ensemble size) used to calculate the objective function. improvements in the objective function. Interestingly,
The choice of an ensemble-based objective function can under reasonably general conditions, it is shown in
vary depending on the adopted risk attitude. In general, [19, 23] that SPSA achieves a similar objective function
one could include other statistics of the NPV function solution accuracy to finite-difference gradient approx-
such as the variance or percentiles in describing the imation, but with 1/ p times function evaluations.
objective function, which is not considered in here. In In the original algorithm, a few (gain) parameters
the next section, using the robustness of the SPSA al- that control the step lengths and stability of the algo-
gorithm to noise in the objective function computation, rithm have to be carefully chosen [19]. In its basic form,
we propose a computationally efficient implementation outlined above, the SPSA algorithm can only operate
for the case when the objective function is defined over on unbounded continuous sets and is not suited for
an ensemble of reservoir models. In this approach, at optimization on our bounded integer lattice x. The dis-
each iteration, instead of using an ensemble of size Nens , crete SPSA algorithm has been proposed and analyzed
we include only Napprox  Nens “randomly selected” in the literature [6, 7, 11]. In a related context, Bangerth
model realizations in computing the cost function. This et al. [2] applied the SPSA algorithm to the discrete well
results in a significant reduction in the computational placement problem and reported promising results.
cost when robust optimization is considered. We fur-
ther discuss this approach in the methodology section
and show promising results in a number of numerical 3 Methodology
experiments.
In the discussion that follows, for notation clarity, We discuss the generalized SPSA optimization algo-
we express the optimization problem in the following rithm in this section. We first present an overview of the
compact form: original SPSA algorithm and its important properties
prior to discussing the formulation we have used to
x∗ = arg minx∈X f (x) (9)
solve the joint field development optimization problem.
where the decision variable x is defined over
 a set of
T
feasible well locations and rates, i.e., x = u q . We 3.1 The SPSA algorithm
first consider the case where the decision variables are
the locations of the wells, x = u. Since the model is The SPSA algorithm derives its efficiency from its
discretized, the search space x is parameterized by the approximate gradient estimation property, which is
integer lattice of the cell midpoints. The optimization based on two function calls. This property makes the
is performed by finding a descent direction at each algorithm suitable for large-dimensional optimization
iteration to improve the value of the cost function. The problems where gradient information is not available
SPSA algorithm that was first introduced by Spall [19] or easy to compute [23]. Moreover, the approximate
and later extended to several variants [5, 10, 21, 22] nature of gradient estimation provides robustness to
presents a good candidate to solve the above discrete noisy measurement of the cost function, which is an-
optimization problem [11]. other key property of the SPSA algorithm [23]. Hence,
Comput Geosci (2013) 17:167–188 173

the algorithm provides an attractive option for solv- approximation of the gradient. Under reasonably gen-
ing large-scale problems under stochastic cost func- eral conditions, using the asymptotic normality of the
tions and where gradient information is unavailable or iterates for large k values, Spall [19, 23] shows that a
difficult to compute. It has been shown that under fairly proper selection of the perturbation vector can realize
general conditions, the method can be superior to other a p times computational savings relative to the finite-
gradient-free optimization methods [23]. difference approximation.
Denoting noisy measurement of the objective func- Using a differential equation approach, Spall [19]
tion f (x) and its gradients with respect to the vector of presents the sufficient conditions under which the re-
decision variables x ∈ R N as y (x) = f (x) + ε and ∇ f (x), cursion in Eq. 11 leads to the stochastic convergence
(x∗ )
respectively, the SPSA algorithm finds the solution x∗ to the solution ∂ f∂x = 0. The conditions for conver-

such that g (x∗ ) = ∂ f∂x(x)  ∗ = 0. The minimizer is found gence proof require that the gain sequence goes to
x=x 0 at rates neither too slow nor too fast (specifically,
using the following standard recursion algorithm:


ak , ck > 0 ∀k; ak → 0, ck → 0 as k → ∞ and ak =
xk+1 = xk − ak ĝk (xk ) (10) k=0


∞, ak
ck
< ∞), that the objective function f (x) is
where ĝk (xk ) is a stochastic approximation of ∇ f (xk ) k=0
at the kth iteration and ak is the gain sequence (up- sufficiently smooth near the solution x∗ and that, as
date step size). The iterative form in Eq. 10 represents stated earlier, the perturbations ki are independent
the steepest descent algorithm if ĝk (xk ) is replaced by and symmetrically distributed
about 0 with finite in-
∇ f (xk ). A central finite-difference approximation of verse moments E |ki |−1 . Under these conditions, the
the gradients can be written as bias in ĝk (·) as an estimator of gk (·) vanishes as k →
∞ and x converges to x∗ in an “almost sure” sense
y (xk + ck ei ) − y (xk − ck ei ) [19]. In addition, Spall [19] shows that the asymptotic
ĝki (xk ) = (11)
2ck distribution of the iterate is normal, or more specifically
 
where ei denotes a vector with a one in its ith place kβ /2 xk − x∗ → N (μ, ) as k → ∞ (13)
and zeros elsewhere and ck is some “small” positive
number. The finite-difference approximation loses its where β > 0 depends on the form of gain sequences,
applicability as the problem dimension p grows. The μ is a function of the Hessian matrix and the third
SPSA algorithm provides an efficient alternative by derivative of f (x) at x∗ , and is determined by the
adopting a stochastic gradient approximation ĝk (xk ) Hessian of f (x) at x∗ and variance of the noise in the
that is defined as objective function [19, 23]. The latter result has been
y (xk + ck k ) − y (xk − ck k ) used as a theoretical framework in [23] for comparing
ĝk (xk ) = the performance of the SPSA algorithm with other
2ck
T established stochastic search methods. Finally, Spall
× −1 k1 −1
k2 . . . −1
kp (12) [19, 23] provides useful guidelines on the selection of
the gain sequence parameters that can be used for
in which the user-generated p-dimensional random proper implementation of the SPSA algorithm. The
 T
perturbation vector k = k1 , k2 , . . . , kp con- steps for implementing the original SPSA algorithm are
tains independent and symmetrically distributed (about as follows:
0)  entries with finite inverse moment expectation
E |ki |−1 for all k and i values. A common distrib- 1. Generate a vector of random perturbations k =
 T
ution that fulfills these requirements is the symmetric k1 , k2 , . . . , kp that satisfies finite inverse ex-

Bernoulli (±1) distributions (note that the uniform and pectation, i.e., E −1 ki , condition. The Bernoulli
normal distributions do not satisfy these conditions). random values taking ±1 fulfill this requirement
The appeal for the SPSA algorithm originates from the while Gaussian and uniform random vectors do
computational advantage in approximating the gradi- not.
ent (i.e., the SPSA algorithm requires 1/ p times the 2. Use the guidelines provided by Spall [19, 20] for
computation needed in a regular central difference selecting ck and ak to take a real positive step size ck
+
gradient calculation). This computational saving can, and compute the objective functions

 + at xk = xk−+

however, be offset by the work per iteration if the ck k and xk = xk − ck k , i.e., y xk and y xk ,
approximation in Eq. 11 does not provide a reasonable respectively.
174 Comput Geosci (2013) 17:167–188

3. Using Eq. 11, compute the approximate gradient improved field development. Recalling the general op-
T
the ĝk (xk ) = ( k )2ck ( k ) −1
y x+ −y x− −1 −1 timization objective function in Eq. 5, the correspond-
k1 k2 . . . kp .
ing objective function for the combined well placement
4. With an appropriate value of the gain sequence ak
and rate allocation optimization for a single model
(see [19, 20]), find the new vector of variables from
and an ensemble of models is expressed in the same
Eq. 10, i.e., xk+1 = xk − ak ĝk (xk ).
way as in Eqs. 7 and 8, respectively. Note that in this
While the original SPSA and its convergence proofs case, the NPV objective function f (u, q) depends on
are developed for continuous problems, extension of both u and q as decision variables. To facilitate the
the method to discrete optimization problem has been discussion that follows, we introduce a concise form of
considered in [6, 7, 11]. The extension of this approach the optimization problem as
to a second-order SPSA optimization algorithm has  T   T 
also been presented in [21]. SPSA has also been further x̂ = û q̂ = arg minx∈ f x = u q . (14)
extended to a global random search algorithm (the the-
oretical results for convergence to the global solution We reiterate that the resulting optimization is a mixed-
may be found in [14]).We begin by implementing and integer programming problem where the feasible set
evaluating the SPSA algorithm for the well placement for u is discrete and bounded by the number of grid
problem first. We note that application of the SPSA blocks in the model domain while q belongs to a con-
algorithm to well placement problems was first intro- strained (by operating conditions) continuous set. In
duced by Bangerth et al. [2]. Our goal in this paper is the SPSA algorithm used to solve the joint problem,
to extend the application of the SPSA to the mixed- we proceed by first defining the feasible set for up-
integer problem of combined well placement and well date directions. During the course of the optimization
control optimization. iterations, the update directions are randomly picked
from the feasible set. As in the well placement problem,
3.2 Well placement with SPSA the set of vectors used to update the well locations are
specified as
We now consider a special case of the implementation

u =  j ∈ R Nw , j = 1, 2, ..., J . (15)
for generating k ∈ R N in the discrete well placement
problem. Note that the feasible set of each component For optimizing the well rates, we define a feasible set
of  is finite and limited to the indices of the grid cells of update directions by accounting for the constraints
in the domain. For any given on well rates. In our implementation, we impose a

p-dimensional, real unit
vector  p ∈  with u =  j ∈ R Nw , j = 1, 2, ..., J , total injection and production rate constraint (one pore
where J is the total number of feasible values for each volume per year). Mathematically, the constraint is
entry of  p , the SPSA procedure summarized above expressed as
can be applied to solve the well placement optimization    
q j∈PROD  = q j∈INJ  = 1PV. (16)
problem. In an alternative stochastic approximation 1 1
method, RCD [16], at each iteration, one randomly Since the initial solution for well rates satisfies this con-
selects a single element of k and solves a one- straint, we define the perturbation sets for updating

the
dimensional optimization problem in a manner analo-
well control settings as prod := x ∈ R Nprod
, xi = 0
gous to the coordinate-descent approach [16]. The main  i
difference is that in the coordinate-descent method, a 
for producers and inj := x ∈ R , yi = 0 for in-
Ninj
complete deterministic gradient is computed and the i
optimization is performed with respect to the coordi- jectors to ensure balanced source and sink terms. The
nate or component with the largest gradient. For the feasible set for rate controls is defined as q = prod ⊕
well placement problem, our investigation shows that inj . Therefore, the feasible update directions can read-
the two methods, SPSA and RCD, provide comparable ily be defined as the combination of the feasible sets for
results (not shown). In this paper, we only present the the well placement and rate allocation problems
results related to the SPSA algorithm.  = u ⊕ q = u ⊕ prod ⊕ inj . (17)

3.3 Simultaneous well placement and control We note that the general SPSA for combined well
with SPSA placement and control optimization can be imple-
mented by either sequentially updating the two types
Next, we discuss the simultaneous problem of finding of decision variables (well locations and rates) or con-
well locations and dynamic well rate allocations for currently updating them at each iteration. For the
Comput Geosci (2013) 17:167–188 175

placement problem in this paper, we limit the step Nens randomly selected model realizations, that is we
size of the optimization line search to a single grid compute
block. In the next section, we evaluate the performance     
of the proposed algorithm for optimizing a suite of fRobust u, q + ε = E f u, q + E[ε]
waterflooding experiments. 
Napprox
1  
= f j u, q (18)
Napprox j=1
3.4 Efficient implementation under geologic
uncertainty as a noisy version of the objective function. As a re-
sult, the cost of calculating this objective function is
In robust optimization where the expected value of the significantly reduced from Nens to Napprox full reservoir
NPV objective function is maximized, a main practical simulations. We emphasize that at each iteration the
limitation is the computational cost. In general, two Napprox model realizations are selected randomly to
types of robust optimization approaches have been ensure that the entire ensemble of Nens are included
used to address the problem, namely, stochastic ap- in computing the objective function throughout the
proximation (SA) and sample average approximation optimization procedure. When Napprox is too small, the
(SAA) [17]. The idea behind SAA is rather simple: objective function can become too noisy and exhibit os-
generate Nens samples to approximate the expectation cillatory behavior. As Napprox increases, this oscillatory
of the objective function. On the other hand, the work- behavior is reduced and a more stable convergence is
ing principal behind SA is to generate N samples and expected. We illustrate the application of this approach
use only one sample at each iteration to approximate in significantly reducing the computational cost of ro-
the objective function. It has been shown that the SA bust optimization in the Section 3.
approach can be competitive and in some cases may
outperform the SAA method [12].
Since the SPSA algorithm is originally developed for 4 Numerical experiments
application with noisy objective functions, the method
is suitable for problems in which the objective function We present several numerical examples to evaluate
computation is inexact. That is, if the SPSA algorithm the performance of the proposed SPSA algorithm for
computes y (x) = f (x) + ε instead of f (x) as the objec- simultaneous well placement and dynamic rate allo-
tive function, where ε represents the noise in measuring cation optimization. The reservoirs used in our exam-
the objective function, stochastic convergence can be ples include Reservoir A, a two-dimensional (2D) two
established in terms of the noise statistics, among other phase (oil–water) model discretized into 45 × 45 × 1 =
conditions [19]. We exploit this important property 2,025 grid blocks; Reservoir B, a 60 × 220 × 1 = 13,200
to propose a computationally efficient algorithm for two-dimensional model borrowed from the channel-
solving robust field development problems. Namely, ized section of the SPE10 benchmark model; and
instead of computing the exact ensemble-based ob- Reservoir C, a 28 × 19 × 5 = 2,660 three-dimensional
jective function in Eq. 8 by using Nens of realization, PUNQ-S3 model. Reservoir parameters and impor-
we approximate this function by using only Napprox  tant simulation inputs are summarized in Table 1. We

Table 1 General simulation information for the examples used in the paper
Parameter Test case Reservoir A Reservoir B Reservoir C
Phases Two-phase (o/w) Two-phase (o/w) Two-phase(o/w) Two-phase (o/w)
Simulation time 5 × 50 days 5 × 50 days 10 × 30 days 10 × 25 days
Rock porosity 0.20 0.20 0.20 Heterogeneous
Initial water saturation 0.0 0.0 0.0 0.0
Injection volume 1PV 1PV 1PV 1PV
Cell dimensions 45 × 45 45 × 45 60 × 220 28 × 19 × 5
Reservoir dimensions 450 × 450 m 450 × 450 m 600 × 2,200 m 280 × 190 × 50 m
Injection well constraint Water rate Rate Rate Rate
Production well constraints Total fluid rate Total fluid rate Total fluid rate Total fluid rate
Number of injection wells 3 (fixed) 3 5 5
Number of production wells 1 2 10 3
176 Comput Geosci (2013) 17:167–188

assume the price of oil is $80/barrel and the cost of pro- candidates for well locations. Therefore, with growing
ducing water is $20/barrel. The annual rate of interest distance from the injection wells, the NPV function
is assumed zeros (b = 0). is expected to increase. Second, as can be seen from
Fig. 1b, two local solutions (marked with blue crosses)
Testing the original SPSA algorithm We first test the are identified. This behavior is, however, only specific
original SPSA algorithm (as a proof of concept) by to this example setup where a single decision variable
considering a waterflooding experiment in which three is assumed. The generalized mix-integer multivariate
water injection wells with fixed locations and rates are optimization problem that we consider in this paper is
present in the field (Fig. 1), and the goal is to find the expected to have very complex objective functions with
best location for the production well. This is an overly multiple local solutions.
simplified example to examine the performance of the Figure 2a shows the reduction in the objective func-
SPSA algorithm in finding the known correct solution. tion for six different initial solutions as the SPSA iter-
Note that, in this paper, we are interested in the more ations proceeds. In this test case, the proposed SPSA
complex problem in which the locations or rates of algorithm converges to the solution in less than 30
all the wells are unknown. For the general problem, iterations irrespective of the initial well location. In
the response surface cannot be plotted for verification. general, the final solution and convergence rate depend
Hence, here we only consider an overly simplified on the initial location of the well, which necessitates
case to check the performance of the original SPSA initialization of the algorithm from multiple locations.
in finding the solution. Since the SPSA algorithm is a Figure 2a shows that one out of the six trials shown
local search method, we start the optimization problem converges to the local solution with a lower NPV
from several initial guess locations to better explore value. The first four columns in Fig. 2b display example
the solution search space. To this end, we divide the initial well locations (top) and the corresponding oil
solution space into s × s subdomains (with s = 3 in this saturation distributions at the end of the simulation
paper) as shown in Fig. 1a. We use the center gridblock (bottom) while the last column shows the same plots
in each region to initialize the optimization search. for the final solution (identical for all the cases shown).
For this simple problem where there is only a sin- This simplified test case was only used to examine
gle decision variable, we can compute the NPV for the convergence of the SPSA algorithm for the case
all possible well locations and plot the NPV response with one single decision variable for which the exact
map. The resulting NPV response surface for placing solution is known. In the general problems considered
a single producer is shown in Fig. 1b. A number of in this paper, the goal is to simultaneously identify the
remarks are in order at this point. First, the NPV map optimal location and control rates for several wells,
appears to be smooth with high values in the center. for which many local solutions usually exist. We now
This is because the injection well locations are pre- consider scenarios with increasing level of complex-
specified and configured such that the central regions ity where the objective function surface can be very
of the domain, far from the injectors, are more likely complicated.

Fig. 1 Log-permeability
model and corresponding (a) (b)
NPV response map; reference
log-permeability and NPV
response maps. 7 8 9
a Log-permeability
distribution for the reference
model with nine subdomain
specifications used to
initialize the optimization 4 5 6
algorithm. b NPV response
surface for all possible well
locations in Example 1. In
each plot, x- and y- axes show 1 2 3
the cell numbers in the
respective direction
Comput Geosci (2013) 17:167–188 177

(a)

Obj. fun. (-NPV)


Iteration

(b)
Injection well (fixed) Production well (variable)
Well locations
y- index

x-index x-index x-index x-index x-index


Oil saturation
y- index

x-index x-index x-index x-index x-index

Fig. 2 Placement of a single production well for which the op- through fourth columns contain the initial well locations (top)
timal solution is known from the NPV response map in Fig. 1b. and the corresponding final oil saturation profiles (bottom); the
a Objective function (-NPV) value versus optimization iterations optimized well configuration (top) and final oil saturation profile
for different initial solutions assuming a known geologic model are shown on the f ifth column
in Example 1. b Optimization results for Example 1: the f irst

4.1 Optimization for a known reservoir value of −2.2e + 9 or lower, respectively, within the
first 200 function evaluations. Figures 3b, c shows four
Example 1a: placing two producers and three injectors initial and optimized distributions of oil saturation at
As our second example, we consider the simultaneous the end of the simulation time. Well locations for the
placement of three injectors and two producers, i.e., two producers and three injectors have been marked
without fixing the positions of any of the wells. The with crosses and circles, respectively. The final NPV
search space for this problem has, taking into account solutions are also reported which show clear improve-
symmetries due to identical results when exchanging ment over the initial configurations. From Fig. 3, it
2,025!
wells of the same type, 5!2,020! possible configurations, is clear that while the relative distance between in-
which is clearly far too many for an exhaustive search. jectors and producers in the solutions seems reason-
For this example, initialization of the algorithm is car- able, in some cases, two injectors or two producers
ried out as follows: first, the reservoir is divided into s × are clustered close to each other, suggesting that one
s subdomains; then, the centers of randomly selected of them can be eliminated and be compensated for
five subdomains are chosen as injection and production by increasing the rate at the other well (not per-
well locations. formed here). Other investigators have also observed
Figure 3a plots the objective function against the a similar issue in well placement problems [2, 9]. One
iterations for four different initial well configurations. way to address this well clustering issue is to incor-
The results indicate that all runs finally reach a function porate a well distance constraint [13]. Examination
178 Comput Geosci (2013) 17:167–188

(a) Iteration of the objective function (–NPV)

-NPV(×109)
Iteration

(b) Final oil saturation maps with initial well locations


NPV(×109) 1.42 1.38 1.39 1.58
y-index

x-index x-index x-index x-index

(c) Final oil saturation profiles


NPV(×109) 2.21 2.22 2.20 2.19
y-index

x-index x-index x-index x-index

Fig. 3 a Objective function (-NPV) value versus optimization well configurations: the two injectors and three producers are
iterations for four different initial solutions using the known indicated with cross and circle markers, respectively. c Optimized
geologic model in Example 1 to find the best locations for two distributions of oil saturation at the end of simulation time after
producers and three injectors. b The distributions of oil satu- well placement
ration at the end of simulation time for four different initial

of the oil saturation profiles indicates that in some Example 1b: simultaneous well placement and control
cases, however, each production well is producing oil optimization In this section, we study the simultane-
from different sections of the reservoir. The clustering ous optimization of well locations and their rate trajec-
of similar wells in a region may be attributed to the tories in time for three injectors and two producers. The
number of wells and the rate of injection and produc- initial well locations are selected in the same way as
tion a priori. In a more general problem formulation in Example 1a. The dynamic injection and production
where the number of wells and the injection/production rates are constrained to inject and produce a total of
rates are variable, this issue is less likely to be present one pore volume (1PV) during the entire simulation
if the cost of drilling wells is incorporated into the time. The control time intervals are set at 10 days and
objective function. We also note that the final well the simulation time is 250 days, resulting in 25 control
locations tend to be close to the boundaries of the time steps.
reservoir domain. While this may not be an issue if the Figure 4a shows the objective function behavior dur-
reservoir boundaries are known with confidence, it can ing optimization iterations using the proposed algo-
be questionable when the boundaries of the reservoir rithm for four different initial well configurations. As
domain are uncertain. In our problem formulation, we can be verified from Fig. 4a, despite the variability
have not considered such uncertainties. in the solutions, almost all four solutions reach the
Comput Geosci (2013) 17:167–188 179

(a) Iteration of the objective function (–NPV)

-NPV(×109)
Iteration

(b) Final oil saturation profiles with optimized well locations


9
NPV(×10 ) 2.41 2.48 2.50 2.49
y index

x-index x-index x-index x-index

(c) Optimized well rate trajectories

Fig. 4 Joint optimization of the well locations and time- butions of oil saturation at the end of simulation time after well
dependent rate controls for three injectors and two producers. placement; the two injectors and three producers are indicated
a The objective function (-NPV) versus iterations for Example 3 with cross and circle markers, respectively. c Optimized time-
with known geologic model and by initializing the solutions from dependent injection (f irst row) and production rates (second
different regions. Here, the location and time-dependent rates of row) trajectories for four different initial well configurations
two producers and three injectors are sought. b Optimized distri- corresponding to b

function values of −2.5e + 9, which is a significant im- distributions and well locations solution. In addition,
provement over the NPV values obtained from the ini- the optimized injection (top) and production (bottom)
tial well configurations (randomly picked). This value rate trajectories are shown in Fig. 4c. Although the
represents about 10 % improvement over the NPV solution well configurations are different (due to the
obtained from the well placement problem alone, which presence of several local solutions), the final NPV val-
highlights the value of solving the joint optimization. ues and the amount of bypassed oil are quite similar.
In all cases, the solution is obtained in less than 800 In most cases, the well configurations are reasonable in
iterations. Figure 4b shows the final oil saturation terms of the distance between injector/producer pairs.
180 Comput Geosci (2013) 17:167–188

However, in a few cases, wells may be clustered in a in this example, we demonstrate that even if the result
particular region. Next, we apply the method to a layer of optimal control is used as the best case scenario
of the SPE10 model to gain additional insight. for the initial reactive control, a combined well place-
ment and rate allocation optimization would lead to
significant improvement over a reactive control with
Example 2: channel layer of SPE10 model In this sec-
fixed (non-optimized) well locations.
tion, we apply the proposed method to a more realistic
We performed optimization for well placement, rate
reservoir model borrowed from the SPE10 benchmark
controls, and joint optimization of well locations and
model. We optimize the locations and operating rates
rate controls using the proposed SPSA method. The
for a set of five injectors and ten producers in a chan-
corresponding distributions of oil saturation at the end
nel formation that is discretized into 60 × 220 × 1 grid
of the simulation time are shown in Fig. 5c–e, respec-
blocks. The log-permeability distribution for this model
tively. The optimized NPV values for each case are also
is shown in Fig. 5a (left). The significant contrast be-
reported on top of the saturation plots in Fig. 5b–e. In
tween the extreme permeability values in this example
comparison with the initial solution, the NPV shows
leads to well-defined streaks of water saturation in the
67, 82, and 110.42 % improvements, respectively, for
reservoir after waterflooding. Other reservoir parame-
well placement, rate control, and joint optimizations.
ters and simulation inputs are the same as in previous
This suggests that solving the joint optimization results
examples. Initially, each injector performs under a uni-
in approximately 25 % and 15 % NPV improvement
form rate to inject 0.2 PV of water into the reservoir
over optimizing, respectively, the well locations and
(total injection of 1PV) during the entire simulation
rate controls separately.
time. Each production well produces a total of 0.1 PV
The results from these experiments suggest that the
with a constant rate throughout the reservoir life. The
proposed SPSA algorithm is an effective, easy to im-
corresponding oil saturation at the end of the simula-
plement, and flexible approach for joint optimization
tion time, with the initial configurations, is shown in
of well locations and rates and that random selection
Fig. 5a (right). The injectors and producers are marked
of the descent direction may be advantageous in cer-
with circles and crosses, respectively. The NPV corre-
tain type of problems where gradients are not readily
sponding to this initial well configuration and operating
available.
rates is $0.758 × 109 . A more realistic scenario for
specifying the controls in the initial case would be using
the results of a reactive control scenario. This approach Example 3: 3D PUNQ-S3 model As a final exam-
would make the real improvements achieved through ple, we applied the SPSA algorithm to the three-
well control optimization more meaningful. However, dimensional PUNQ model with a complex geologic

Fig. 5 Application to a (a) (b) (c) (d) (e)


channelized layer of the
NPV(×109): 0.758 1.23 1.39 1.59
SPE10 benchmark model.
a True log-permeability map
and oil saturation distribution
after waterflooding with
b uniform injection and
production rates at fixed well
locations, c well placement
optimization with SPSA
algorithm, d well rate
optimization using SPSA
algorithm, and e combined
well placement and rate
optimization using the
generalized SPSA algorithm 1

8 0.8
6
0.6
4
0.4
2

0 0.2

-2 0
Comput Geosci (2013) 17:167–188 181

structure. In this problem, we consider five injection uration profile for each layer. Figures 6d–f display the
wells and three production wells. The first two rows in final saturation plots for the well placement (WP) only,
Fig. 6 show the porosity and permeability distributions well placement followed by well control optimization
of the PUNQ-S3 model. As can be seen, different layers (WP&C), and simultaneous well placement and control
of the model show distinct permeability and poros- (SWPC), respectively. The corresponding NPV values
ity distributions. Application of the proposed SPSA in each case are reported in the caption of Fig. 6 and
method to this example resulted in the final saturation show an increase of 16 % for the SWPC case over the
plots shown in Fig. 6c–f. Figure 6c shows the initial sat- best case obtained without simultaneous optimization

Fig. 6 Optimization results


with the PUNQ model
Layer 1 Layer 2 Layer 3 Layer 4 Layer 5
(a) Log-perm

(known reservoir): a true


log-permeability, b true
porosity, final saturation
profiles corresponding to the
c initial (NPV = 1.864 × 107 ),
d well placement
optimization (WP,
NPV = 2.489 × 107 ), e well
placement followed by well
control optimization (WP&C,
(b) Porosity

NPV = 2.510 × 107 ), and


f simultaneous well
placement and control
optimization (SWPC,
NPV = 2.898 × 107 ). In c–f,
locations of the injection and
production wells are
identified with circles and
crosses, respectively
(c) Initial
(d) WP
(e) WP&C
(f) SWPC
182 Comput Geosci (2013) 17:167–188

(WP&C), that is, optimizing the well locations with fix 100 permeability models to represent the uncertainty
rates followed by optimizing the controls (rates) for in the geologic model. Figure 7a shows five sample
the best well locations obtained. The improvements are log-permeability models that exhibit distinct spatial
also visible by comparing the saturation plots. Next, variability. The results of optimizing well rates and
we consider the optimization problem under geologic locations for three injectors and two producers when
uncertainty. the true model is not known are shown in Fig. 7b, c.
The goal is to evaluate the performance of the SPSA
algorithm when robust optimization is implemented to
4.2 Field development optimization under geologic assess the validity of the proposed approximation in
uncertainty computing the SPSA cost function using a limited num-
ber of random model realizations (at each iteration) for
Example 4: simple 2D problem with uncertainty In computational efficiency.
this section, we consider the well placement optimiza- Figure 7a displays the objective function behavior
tion problem under geologic uncertainty by assuming during the optimization iterations for different initial
multiple plausible permeability models. We use Nens = well configurations and using Napprox = 1 (black), 5

Fig. 7 Optimization results (a)


for the 2D synthetic model Sample 1 Sample 2 Sample 3 Sample 4 Sample 5
with uncertain reservoir
permeability model.
a Five-sample
log-permeability realizations.
b Expected NPV values over
the complete ensemble of
models with iteration for the (b) WP WP&C SWPC
well placement only (left),
E[NPV}(×109)

well placement followed by


control (center), and
simultaneous well placement
and control. The results are
shown for the case where 1
(black curve), 5 (blue line),
and 100 (red curve) models Iteration Iteration Iteration
are randomly selected to
approximate the expected (c) WP WP&C SWPC
value of the objective
function. c Optimized
expected value of saturation
y-index

profiles for well placement


(WP, left), well placement
followed by well control
optimization (WP&C, center),
and simultaneous well
placement and control
optimization (SWPC, right);
the results are shown for the
y-index

case where 1 (top row), 5


(middle row), and 100
(bottom row) models are
randomly selected at each
iteration to approximate the
NPV objective function. In c,
locations of the injection and
y-index

production wells are


identified with circles and
crosses, respectively

x-index x-index x-index


Comput Geosci (2013) 17:167–188 183

Table 2 Mean an variance of the NPV values for Example 4


each iteration, only one realization is randomly selected
Napprox WP WP&C SWPC to compute the objective function (the black curve
(μ, σ ) (μ, σ ) (μ, σ ) in Fig. 7b). This behavior is absent when the objec-
1 (1.8247, 0.0254) (1.8512, 0.0857) (2.2039, 0.1835) tive function is approximated using a modest value
5 (1.8250, 0.0220) (1.8561, 0.0542) (2.2252, 0.0942)
of Napprox = 5 randomly selected realizations at each
100 (1.8331, 0.0105) (1.8673, 0.0432) (2.2373, 0.0878)
iteration. The numerical NPV results for this case are
summarized in Table 2. This table reports the mean
and variance of the NPV values that are obtained by
(blue), and 100 (red). Interestingly, the final NPV val- applying the solutions to all 100 realizations in each
ues are very similar even though the objective functions optimization case. It is important to note that in all op-
and final well configurations are different. Also, notice timization scenarios, the final NPV solutions obtained
the noisy behavior of the objective function when, at for different Napprox are quite similar. Furthermore, the

Fig. 8 a Five-sample (out of (a) Layer 1 Layer 2 Layer 3 Layer 4 Layer 5


100) realizations of
permeability for the
PUNQ-S3 model for
Sample 1

optimization under geologic


uncertainty. b Five-sample
(out of 100) realizations of
porosity for the PUNQ-S3
model for optimization under
geologic uncertainty
Sample 2
Sample 3
Sample 4
Sample 5
184 Comput Geosci (2013) 17:167–188

Fig. 8 (continued) (b) Layer 1 Layer 2 Layer 3 Layer 4 Layer 5

Sample 1
Sample 2
Sample 3
Sample 4
Sample 5

proposed simultaneous optimization approach achieves true model. We consider this case using the PUNQ-S3
a significant increase in the NPV value over the decou- model next.
pled optimization cases (well placement and produc-
tion optimization). The improvement is quite evident Example 5: 3D PUNQ-S3 model with uncertainty Us-
from the saturation plots. ing the reservoir configuration in the PUNQ-S3 model,
These results suggest that the proposed approxi- we conducted a similar experiment to investigate the
mation in calculating the cost function of the robust effect of geologic uncertainty and evaluate the perfor-
optimization can be quite effective and provide sig- mance of the proposed cost function approximation
nificant computational saving with a minimal impact method in a more realistic scenario. We considered
on the solution quality. A more realistic scenario is 100 model realizations each with distinct permeabil-
the case in which the synthetic true model is available ity and porosity maps (five sample permeability and
(but unknown) and the optimization solution from the porosity models are shown in Fig. 8a, b, respectively).
uncertain models is evaluated by applying them to the The true permeability and porosity models (shown in
Comput Geosci (2013) 17:167–188 185

Fig. 9 a Optimization results (a) Convergence of the expected NPV value with iterations
for the PUNQ-S3 model with
uncertain reservoir Well placement Production optimization Combined optimization
permeability models; the
plots show the expected NPV

E[NPV}(×109)
values with iteration for the
well placement only (left),
well placement followed by
control (center), and
simultaneous well placement
and control. The results are
shown for the case where 1 Iteration Iteration Iteration
(black curve), 5 (blue line),
and 100 (red curve) models (b) Realized final saturation profiles with uncertain geology
are randomly selected to
approximate the expected Layer 1 Layer 2 Layer 3 Layer 4 Layer 5
value of the objective
function. b Optimized
expected value of saturation
WP

profiles when all 100 models


are used to approximate the
objective function at each
iteration; the results are
shown for well placement
(WP, top row), well
placement followed by well
control optimization (WP&C,
middle row), and
WP&C

simultaneous well placement


and control optimization
(SWPC, bottom row).
Locations of the injection and
production wells are
identified with circles and
crosses, respectively
SWPC

Fig. 6a, b, respectively) are not included in the 100 and Napprox = 5, respectively. The improvement in the
realizations used in this experiment. Figure 9a shows saturation results is consistent with the obtained NPV
the behavior of the objective function in different values.
optimization cases for this example. The results are The numerical NPV results for this case are sum-
shown for Napprox = 1 (black), 5 (blue), and 100 (red) marized in Table 3, which reports the mean and vari-
and for WP alone (left), WP&C (middle), and SWPC ance of the NPV values that are obtained by applying
(right). The final saturation plots for Napprox = 100 the solutions to all 100 realizations in each case. Also
are shown in Fig. 9b. These results are consistent reported is the NPV value obtained by applying the
with the previous case in that the SWPC shows sig- final solution for each method to the true PUNQ-S3
nificantly higher NPV solutions than the two optimiza- reservoir. These latter NPV values are the real values
tion methods where simultaneous optimization is not that will be realized in the field after applying the so-
used. From Fig. 9a, it is evident that the final NPV lutions as development strategies to the true reservoir.
solutions for different values of Napprox are compara- The results clearly show pronounced improvement in
ble, except that the case with Napprox = 1 exhibits a the field development NPV values despite the fact the
noisy behavior, which is expected. Figure 10a, b shows true model is unknown and only represented through
the final saturation plots for the case with Napprox = 1 plausible but distinct realizations.
186 Comput Geosci (2013) 17:167–188

Fig. 10 Optimized expected


value of saturation profiles
when 1 (a) and 5 (b)
randomly selected models are
used to approximate the
objective function at each
iteration; the results are
shown for well placement
(WP, top row), well
placement followed by well
control optimization (WP&C,
middle row), and
simultaneous well placement
and control optimization
(SWPC, bottom row).
Locations of the injection and
production wells are
identified with circles and
crosses, respectively

Table 3 Mean an variance Napprox WP WP&C SWPC


of the NPV values for
Example 5 (μ, σ ) True (μ, σ ) True (μ, σ ) True
1 (2.4773, 0.0843) 2.4802 (2.5524, 0.0857) 2.5500 (2.8947, 0.1024) 2.8712
5 (2.4857, 0.0831) 2.4813 (2.5532, 0.0842) 2.5612 (2.9064, 0.0938) 2.8846
100 (2.4871, 0.0721) 2.4806 (2.5639, 0.0871) 2.5592 (2.9231, 0.0778) 2.8734
Comput Geosci (2013) 17:167–188 187

5 Conclusion drilling schedule, and total simulation time could also


be considered as unknown decision variables. As is
We presented a generalized SPSA algorithm for si- the case with any realistic subsurface investigation,
multaneously finding optimal well locations and the the problem is further complicated by the presence
dynamic control trajectories in a reservoir. Recog- of uncertainty in physical property descriptions. While
nizing that with fixed well controls (i.e., flow rates) solving the field development optimization problem
the solution to well placement optimization problem in its most general form (with realistic assumptions
is suboptimal and that with fixed well locations only and constraints) can be quite challenging and is likely
suboptimal well controls can be found, we propose a to lead to several alternative solutions with similar
generalized version of the SPSA algorithm for solving performance, it is important to recognize the sub-
the coupled well placement and dynamic rate allocation optimality introduced by fixing some of the decision
optimization. Furthermore, exploiting the robustness variables a priori. Clearly, generalization of the field
of the SPSA to noisy cost functions, we introduced development formulation leads to complex optimiza-
an efficient approximate solution to the robust field tion problems that require more sophisticated solution
development optimization under geologic uncertainty algorithms to tackle. However, given the significance
where instead of calculating the expected value of and complexity of this problem, further research is
NPV from a large number of plausible models, we needed to rigorously formulate and solve more gener-
approximate this cost function value using a limited alized and challenging field development optimization
number of randomly selected models at each iteration. problems.
This step introduces noise (error) in calculating the
objective function, which can be tolerated in SPSA. The
reduction in the sample size may result in an overall
significant computational efficiency, as was the case in References
the examples considered in this paper. We used sev-
eral numerical experiments, including examples with 1. Aziz, K., Settari, A.: Petroleum Reservoir Simulation. Ap-
plied Science, London (1979)
the SPE10 and PUNQ-S3 models, to study the perfor-
2. Bangerth, W., Klie, H., Wheeler, M.F.: On optimization algo-
mance of the proposed methods for well placement as rithms for the reservoir oil well placement problem. Comput.
well as the combined well placement and rate alloca- Geosci. 10, 303–319 (2006)
tion optimization under known and uncertain geologic 3. Becker, B.L., Song, X.: Field development planning using
simulated annealing-optimal economic well scheduling and
scenarios.
placement. In: SPE Annual Technical Conference and Exhi-
These results show that solving the well placement bition, SPE 30650, Dallas, Texas (1995)
and control optimization problem simultaneously can 4. Brouwer, D.R., Jansen, J.D.: Dynamic optimization of water
significantly improve the field development strategies. flooding with smart wells using optimal control theory. SPE
J. 9(4), 391–402 (2004)
We also studied the performance of the method under
5. Chen, H.F., Duncan, T.E., Pasik-Duncan, B.: A Kiefer–
geologic uncertainty, which significantly complicates Wolfowitz algorithm with randomized differences. IEEE
field development activities. Our results suggest that, Trans. Automat. Control 44(3), 442–453 (1999)
even under geologic uncertainty, the joint optimization 6. Gerencsér, L., Hill, S.D., Vágó, Z.: Optimization over dis-
crete sets via SPSA. In: Proceedings of the 38th Confer-
of well locations and rate allocations is likely to
ence on Decision and Control, Phoenix, AZ, pp. 1791–1795
improve the expected NPV values (over the entire (1999)
ensemble of models) obtained from the solutions of 7. Gerencsér, L., Hill, S.D., Vágó, Z.: Discrete optimization via
well placement or well control optimizations alone. SPSA. In: Proceedings of the American Control Conference,
Arlington, VA, pp. 1503–1504 (2001)
Moreover, our initial results suggest that the proposed
8. Guyaguler, B., Horne, R.N.: Uncertainty assessment of
approximation for robust optimization with the SPSA well placement optimization. In: SPE Annual Technical
can result in marked improvement in computational Conference and Exhibition, SPE 71625, New Orleans, LA
efficiency without compromising the quality of the so- (2001)
9. Handels, M., Zandvliet, M.J., Brouwer, D.R., Jansen, J.D.:
lution. This is an important and interesting observation
Adjoint-based well placement optimization under produc-
that requires further investigation and verification. tion constraints. In: SPE Paper 105797 Presented at the
We consider our approach as an initial attempt to SPE Reservoir Simulation Symposium, The Woodlands, TX
formulate and solve a more general field develop- (2007)
10. He, Y., Fu, M.C., Steven, I.M.: Convergence of simultaneous
ment optimization problem by combing well place-
perturbation stochastic approximation for nondifferentiable
ment and control optimizations. In a more general- optimization. IEEE Trans. Automat. Control 48(8), 1459–
ized formulation, the number of wells, their location, 1463 (2003)
188 Comput Geosci (2013) 17:167–188

11. Hill, S.D.: Discrete stochastic approximation with application 19. Spall, J.C.: Multivariate stochastic approximation using a
to resource allocation. Johns Hopkins APL Technical Digest simultaneous perturbation gradient approximation. IEEE
26, 15–21 (2005) Trans. Autom. Control 37, 332–341 (1992)
12. Juditsky, A., Lan, G., Nemirovski, A., Shapiro, A.: Robust 20. Spall, J.C.: Implementation of the simultaneous perturbation
stochastic approximation approach to stochastic program- algorithm for stochastic optimization. IEEE Trans. Aerosp.
ming. SIAM J. Optim. 19, 1574–1609 (2009) Electron. Syst. 34, 817–823 (1998)
13. Li, L., Jafarpour, B.: A variable-control well placement op- 21. Spall, J.C.: Adaptive stochastic approximation by the simul-
timization for improved reservoir development. Comput. taneous perturbation method. IEEE Trans. Autom. Control
Geosci. 16(4), 871–889 (2012) 45, 1839–853 (2000)
14. Maryak, J.L., Chin, D.C.: Global random optimization by 22. Spall, J.C.: Introduction to Stochastic Search and Optimiza-
simultaneous perturbation stochastic approximation. IEEE tion: Estimation, Simulation and Control. Wiley, Hoboken
Trans. Automat. Control 53, 780–783 (2008) (2003)
15. Montes, G., Bartolome, P.: The use of genetic algorithm 23. Spall, J.C., Hill, S.D., Stark, D.R.: Theoretical framework
in well placement optimization. In: SPE Paper 69439 Pre- for comparing several stochastic optimization approaches.
sented in the SPE Latin American and Caribbean Petro- In: Calafiore, G., Dabbene, F. (eds.) Probabilistic and Ran-
leum Engineering Conference, Buenos Aires, Argentina domized Methods for Design Under Uncertainty, chap. 3.
(2001) Springer, Berlin (2006)
16. Nesterov, Y.: Efficiency of coordinate descent methods on 24. van Essen, G.M., Zandvliet, M.J., Van den Hof, P.M.J.,
huge-scale optimization problems. CORE Discussion Papers Bosgra, O.H., Jansen, J.D.: Robust waterflooding optimiza-
2010002, Université catholique de Louvain, Center for Oper- tion of multiple geological scenarios, SPE-102913-PA. SPE J.
ations Research and Econometrics (CORE) (2010) 14(1), 202–210 (2009)
17. Nocedal, J., Wright S.: Numerical Optimization, 2nd edn. 25. Wang, C. Li, G., Reynolds, A.C.: Optimal well placement for
Springer, New York (2006) production optimization. In: SPE Paper 111154 Presented at
18. Sarma, P., Chen, W.H.: Efficient well placement optimization the SPE Eastern Regional Meeting, Lexington, KY (2007)
with gradient-based algorithm and adjoint models. In: Pro- 26. Yeten, B., Durlofsky, L.J., Aziz, K.: Optimization of noncon-
ceedings of the 2008 SPE Intelligent Energy Conference and ventional well type, location, and trajectory, SPE 86880. SPE
Exhibition, SPE–112257 (2008) J. 8(3), 200–210 (2003)

You might also like