Professional Documents
Culture Documents
Data memberane in geoquest data
Data memberane in geoquest data
Aojie Hong
Remus Hanea
Agenda
Optimization Problems Sequential Decision Making
• What is a sequential decision making
Gradient-based Methods problem?
• Optimization without uncertainty • Modeling of sequential decision
• Optimization under uncertainty making problems
• Optimization over an ensemble o myopic model
• EnOpt algorithm o naïve model
• Examples o dynamic programming model
o a decline curve example • Closed-loop Optimization
o a CRM example o Workflow
o a reservoir simulation example o a reservoir simulation example
Recap
2
Optimization Problems
3
Definition of Optimization Problems
max 𝐽 (𝑼 )
𝑼 ∈ 𝜴𝑼
4
Solving Optimization Problems
In general, there are two categories of methods for solving optimization problems.
• Gradient-based methods
o Need to calculate (approximately) the gradients of the objective function with respect to the
control variables.
o Can be trapped in a local optimum (sensitive to the starting point).
o Less computationally demanding.
• Non-gradient-based methods
o Do not need to calculate (approximately) the gradients of the objective function with respect to
the control variables.
o Have a higher chance to find the global optimum.
o More computationally demanding.
5
Idea behind Gradient-based Methods
(Cases without Uncertainty)
6
Idea behind Gradient-based Methods
0.15
0.1
J
0.05
0
0 5 10 15
u 7
Gradient-based Methods
0.15
0.1
J
0.05
0
0 5 10 15
u 9
Idea behind Gradient-based Methods
(Cases with Uncertainty)
10
Optimization under Uncertainty
For a risk-neutral decision maker, the objective is to maximize the mean over the objective
functions of individual realizations in an ensemble.
11
Gradient-based Methods
0.3
Realization 1
Realization 2
Ensemble Mean
0.2
J
0.1
0
0 5 10 15
u 12
Gradient-based Methods
• Each green circle presents one
0.3
Realization 1 forward modeling (e.g., reservoir
Realization 2 simulation).
Ensemble Mean
0.2 • Forward modeling can be
computationally demanding.
J
13
Optimization Using Mean Model
If we use the mean model, the optimization problem is reduced to
14
Optimization Using Mean Model
Optimal control maximizing mean model
0.3
Realization 1 result: Is it maximizing ensemble mean?
Realization 2 Jensen’s inequality:
Ensemble Mean
0.2 Mean Model
for non-linear objective function
J
0.1
0
0 5 10 15
u 15
Idea behind Ensemble-based Optimization
16
Ensemble-based Optimization
• Each green circle presents one
0.3
Realization 1 forward modeling (e.g., reservoir
Realization 2 simulation).
Ensemble Mean
0.2 • Forward modeling can be
computationally demanding.
J
17
Ensemble-based Optimization
0.3
Realization 1
Realization 2
Ensemble Mean
0.2
J
0.1
0
0 5 10 15
u 18
Ensemble-based Optimization
0.3
Realization 1
Realization 2
Ensemble Mean
0.2
J
20
EnOpt Algorithm
1. Define a starting point of control values .
2. Evaluate on realization for to get and calculate .
3. Generate random control values () around .
4. Evaluate on realization for to get .
𝑢1
5. Calculate
21
EnOpt Algorithm
8. Use the approximated gradient to update the control values .
9. Evaluate on realization for to get and calculate .
10. Compare and :
o If , the mean objective value is increased! Use as the starting point in Step 1 to start a new iteration.
o If , the current step size is too large. Reduce , recalculate in Step 8, and repeat Steps 9 – 10.
22
EnOpt Implementation
(Simple Production Model Example)
23
A Simple Production Model Example
A production model is used to model the oil and water production from a field with one producer and
one water injector. (The production model is given in the Jupyter Notebook.) Our uncertainty about the
reservoir is modeled using an ensemble of different settings of the production model parameters.
Injector Producer
Python: EnOpt_CRM_nControl.ipynb
25
Sequential Decision Making
26
The essential of sequential decision making is learning over time.
Current Decision
Time 0 1 2 …
Past Current Future
The myopic model ignores future decisions and information.
Current Decision
Time 0 1 2 …
Past Current Future
Initial Uncertainty
𝐷0 𝑈∨ 𝐼 0
The naïve model ignores future information/learning.
Current Decision
Time 0 1 2 …
Past Current Future
Initial Uncertainty
𝐷0 𝐷1 𝐷2 𝐷 𝑒𝑛𝑑 𝑈∨ 𝐼 0
…
The farsighted model preserves the full decision-info structure.
Current Decision
Time 0 1 2 …
Past Current Future
Dynamic programming is based on the farsighted model.
Evolution of Uncertainty (Learning over Time)
𝐷0 𝐼 1∨𝐼 0 𝐷1 𝐼 2∨𝐼 0 : 1 𝐷 𝑒𝑛𝑑 𝑈∨ 𝐼 0 : 𝑒𝑛𝑑
…
The myopic and naïve models can lead to sub-optimal decision policies and lower
the value of sequential decisions, but the farsighted model is computationally
demanding.
Low 𝐷0 𝑈∨ 𝐼 0
Myopic
Computational Burden
Decision Value
𝐷0 𝐷1 𝐷2 𝐷 𝑒𝑛𝑑 𝑈∨ 𝐼 0
Naïve …
𝐷0 𝐼 1∨𝐼 0 𝐷1 𝐼 2∨𝐼 0 : 1 𝐷 𝑒𝑛𝑑 𝑈∨ 𝐼 0 : 𝑒𝑛𝑑
Farsighted …
High
A Sequential Drilling Example
A B
walk
0
33
A Sequential Drilling Example
Alternative 2: to drill only Reservoir B.
NPV (M$)
oil
600
10%
Res. B
EV = -30
dry
90% -100
EV = 0
walk
0
34
A Sequential Drilling Example
Alternative 3: to drill Reservoirs A and B simultaneously.
Res. A is …
joint
oil dry
oil 7% 3%
Res. B is…
dry 3% 87%
35
A Sequential Drilling Example
Alternative 3: to drill Reservoirs A and B simultaneously.
A(oil)&B(oil) NPV (M$)
600 + 600
7%
A(oil)&B(dry)
600 – 100
Res. A&B 3%
EV = -60 A(dry)&B(oil)
3% -100 + 600
A(dry)&B(dry)
EV = 0 87% -100 – 100
walk
0
36
A Sequential Drilling Example
Summary for the case without information.
Alternative EV (M$)
0. walk away 0 EVWOI
1. to drill Reservoir A only -30
2. to drill Reservoir B only -30
3. to drill both simultaneously -60
37
A Sequential Drilling Example
Alternative 4: to drill one first and then decide whether the other
one should be drilled based on the outcome of the first one.
Given Res. A is …
Likelihood
oil dry
oil 70% 3.3%
Res. B is…
dry 30% 96.7%
38
A Sequential Drilling Example
Alternative 4: to drill one first and NPV (M$)
then decide whether the other one
oil
should be drilled based on the 600 + 600
outcome of the first one. drill B 70%
EV = 990 dry
oil 600 – 100
30%
10% EV = 990 walk
600 + 0
To drill oil
EV = 9 -100 + 600
A first drill B 3.3%
EV = -176.7
dry
dry -100 – 100
96.7%
90% EV = -100 walk
-100 + 0
39
A Sequential Drilling Example
Summary for all cases.
Alternative EV (M$)
0. walk away 0 EVWOI
1. to drill Reservoir A only -30
2. to drill Reservoir B only -30
3. to drill both simultaneously -60
4. to drill sequentially 9 EVWI (free)
VOI = 9 – 0 = $9 million
After the first well has been drilled, the cost of knowing
the outcome of the first well is zero. Thus, we should go
for the alternative of sequential drilling. 40
Closed-Loop Optimization
41
Closed Loop
Optimization
Jansen, J. D., Brouwer, R., & Douma, S. G. (2009). Closed loop reservoir management. SPE reservoir simulation symposium.
Closed loop optimization is based on the (?) model.
What What What What
injection injection injection injection
rate should rate should rate should rate should
be used? be used? be used? be used?
Will collect Will collect Will collect end
production data. production data. production data.
Year 0 Year 10 Year 20 Year 30 Year 40
Prior
EnOpt on the prior: the optimal , , , and .
Implement the optimal to the field.
43
Closed loop optimization is based on the (?) model.
What What What
injection injection injection
𝑝𝑟𝑖𝑜𝑟 rate should rate should rate should
𝐼 0 :10 be used? be used? be used?
𝑝𝑟𝑖𝑜𝑟
𝐼 0 :10 𝐼 𝑝𝑜𝑠𝑡
10: 20
1
𝐼 𝑝𝑜𝑠𝑡
20 :30
2
𝐼 𝑝𝑜𝑠𝑡 3
30 : 40
47
Value of Information in
Closed-Loop Optimization
48
VOI Calculation Using Ensemble-Based Methods
(only one decision point)
Step 1: Frame the decision problem.
What production
strategy should
be used?
end
Data () will be collected.
Year 0 Year 20 Year 40
Prior Posterior
50
VOI Calculation Using Ensemble-Based Methods
(only one decision point)
Step 3: Perform robust optimization on the initial ensemble and
calculate Expected Value WithOut Information (EVWOI).
Robust Optimization
Measurement error
52
VOI Calculation Using Ensemble-Based Methods
(only one decision point)
Step 5: Simulate information from all initial realizations.
If iR1 is the truth Simulate data
iR1
iR2
iR3
53
VOI Calculation Using Ensemble-Based Methods
(only one decision point)
Step 6: Update the initial ensemble using the simulated information.
If iR1 is the truth Simulate data Update initial ensemble
iR1 Updated
Ensemble 1
iR2 Updated
Ensemble 2
iR3 Updated
Ensemble 3 54
VOI Calculation Using Ensemble-Based Methods
(only one decision point)
Step 7: Perform robust optimization on each updated ensemble.
If iR1 is the truth Simulate data Update initial ensemble Robust opt
Updated Optimal
iR1 Controls
Ensemble 1
If iR2 is the truth Simulate data Update initial ensemble Robust opt
Updated Optimal
iR2 Controls
Ensemble 2
If iR1 is the truth Simulate data Update initial ensemble Robust opt
Optimal
iR3 Updated
Ensemble 3 Controls
55
VOI Calculation Using Ensemble-Based Methods
(only one decision point)
Step 8: Apply each optimal set of controls on corresponding initial realization
to calculate Value With (free) Information (VWI) of the realization.
If iR1 is the truth Simulate data Update initial ensemble Robust opt
Apply on iR1
Updated Optimal and calculate
iR1 Controls
Ensemble 1 NPV (VWI(iR1))
If iR2 is the truth Simulate data Update initial ensemble Robust opt
Apply on iR2
Updated Optimal and calculate
iR2 Controls
Ensemble 2 NPV (VWI(iR2))
If iR1 is the truth Simulate data Update initial ensemble Robust opt
Apply on iR3
Optimal
iR3 Updated and calculate
Ensemble 3 Controls NPV (VWI(iR3))
56
VOI Calculation Using Ensemble-Based Methods
(only one decision point)
Step 9: Calculate Expected Value With (free) Information (EVWI).
EVWI (free) =
57
VOI Calculation Using Ensemble-Based Methods
(only one decision point)
• When there is only one decision point, the VOI calculated using the ensemble-based methods
is consistent with the definition of VOI.
• However, for sequential decision making, the closed-loop optimization (EnKF + EnOpt) is
based on the naïve model and may lead to sub-optimal sequential decisions.
o VOI generally refers to the value of information that leads to the optimal sequential
decisions (i.e., decisions solved using the farsighted (dynamic programming) model).
o We use “special VOI” to refer to the value of information that leads to sub-optimal
sequential decisions (i.e., decisions solved using the naïve or myopic model).
o Special VOI ≤ VOI
58
Special VOI Calculation for Closed Loop Optimization
(multiple decision points)
Step 1: Frame the decision problem.
What What What
production production production
strategy strategy strategy
should be should be should be
used? used? used?
60
Special VOI Calculation for Closed Loop Optimization
(multiple decision points)
Step 3: Perform robust optimization on the initial ensemble and
calculate Expected Value WithOut Information (EVWOI).
Robust Optimization
Measurement error
62
Special VOI Calculation for Closed Loop Optimization
(multiple decision points)
Step 5 – 8: Repeat CLO for all initial realizations.
Simulate data for
If iR1 is the truth next 10 years Update initial ensemble Robust opt Apply controls
Optimal at immediate
iR1 1st Updated
Controls decision point
Ensemble
on iR1.
64
Summary
65
Summary
• Value can only be created (or destroyed) through our decisions.
• Uncertainty is inseparable from decision making.
• Probability is the language of uncertainty and probabilistic thinking and understanding is required
for high-quality decision making.
o We are all biased and our biases must be avoided/mitigated.
o Bayes’ rule should be used to update our uncertainty when additional information becomes available.
• The Ensemble Kalman Filter (EnKF) is practical and robust for updating reservoir simulation
models, but care must be taken.
• The ensemble-based optimization algorithm, EnOpt, is efficient in tuning many control variables
simultaneously for expected value maximization, but it may be trapped in a local maximum.
• Closed-loop optimization – a combination of ensemble-based history matching and optimization – is
based on the naïve model for sequential decision making and can result in sub-optimal sequential
decisions.
66