Approach to uncertainty analysis

Report
Using Energy Economy Models to
Deliver Policy-Relevant Insight
SAMSI Workshop
20 September 2011
Joe DeCarolis
Assistant Professor
Dept of Civil, Construction, and Environmental Engineering
NC State University
1
Talk Outline
1.
2.
3.
4.
5.
Motivation and description of EEO models
Problems with model development and application
Introduce the TEMOA project
Describe our approach to uncertainty analysis
Conclude
2
1. Motivation and description
of EEO models
3
Energy Implications of Climate Change
50
Total Primary Power Required by 2100
Primary Power (1012 Watts)
45
40
Gas
Oil
Coal
Carbon-Free
35
30
25
20
2005 Total
Primary
Power
15
2005 CarbonFree Primary
Power
10
5
0
750 ppm (~3.6°C)
550 ppm (~3.1°C)
450 ppm (~2.6°C)
Stabilization Target for Year 2100
Based on WRE carbon-cycle model. For details see:
Hoffert et al (1998). “Energy implications of future stabilization of atmospheric CO2 content.”
Nature, 395: 881-884.
4
Energy Economy Optimization (EEO) Models
Energy economy optimization models refer to partial or general
equilibrium models that minimize cost or maximize utility by, at least
in part, optimizing the energy system over multiple decades
Examine the competition among energy technologies, including
renewables
Expansive system boundaries and multi-decadal timescales
Encoded with a set of structured, self-consistent assumptions and
decision rules
Such models have emerged as a key tool for the analysis
5
Model Types
Computable General Equilibrium: Adjusts all prices until
all supplies and demands in all markets are balanced
simultaneously. Technologies often represented
stylistically by production functions (output as a function
of capital, labor, land, resources)
Technology Explicit, Partial Equilibrium: Detailed
technology representation using engineering-economics;
demand fixed or elastic
6
Modeling Objectives
Three broadly defined objectives for such models:
1. Prediction of future quantities
“The price of oil in 2030 will be …”
“Under a federal climate policy, the installed capacity of Technology x in 2050 will be …”
2. Prescriptive analysis for planning purposes
“The following mechanisms should be included in federal climate policy …”
“The following technologies should be deployed to minimize system-wide costs …”
3. Generation of insight
“Increased use of natural gas for vehicle H2 could lead to poor air quality”
“The widescale deployment of plug-in hybrid vehicles could lead to high coal consumption”
7
2. Problems with model
development and application
8
Problems with energy modeling
Inability to
validate model
results
+
Increasing
availability of
data
+
Increasing
model
complexity
Inability to
verify model
results
+
Lack of
openness
Uncertainty
analysis is
difficult
Moore’s Law
9
Lack of model validation
Inability to
validate model
results
+
Increasing
availability of
data
+
Increasing
model
complexity
Inability to
verify model
results
+
Lack of
openness
Uncertainty
analysis is
difficult
Moore’s Law
No practical way to validate energy-economy models →
cannot be validated in the same way as models of physical
processes
Three validation options:
1. Wait
2. Backcast
3. Compare results with other models
Little to guide the modeler and reign in efforts that do not improve
model performance
10
Lack of openness
Inability to
validate model
results
+
Increasing
availability of
data
+
Increasing
model
complexity
Inability to
verify model
results
+
Lack of
openness
Uncertainty
analysis is
difficult
Moore’s Law
Most EEO models and datasets remain closed source. Why?
• protection of intellectual property
• fear of misuse by uninformed end users
• inability to control or limit model analyses
• implicit commitment to provide support to users
• overhead associated with maintenance
• unease about subjecting code and data to public scrutiny
11
Inability to verify model
results
Inability to
validate model
results
+
Increasing
availability of
data
+
Increasing
model
complexity
Inability to
verify model
results
+
Lack of
openness
Uncertainty
analysis is
difficult
Moore’s Law
With a couple exceptions,
energy-economy models are not open source
Descriptive detail provided in model documentation
and peer-reviewed journals is insufficient to reproduce
a specific set of published results
Reproducibility of results is fundamental to science
Replication and verification of large scientific models
can’t be achieved without source code and input data
12
Critique of scenario analysis
Inability to
validate model
results
+
Increasing
availability of
data
+
Increasing
model
complexity
Inability to
verify model
results
+
Lack of
openness
Uncertainty
analysis is
difficult
Moore’s Law
Source: IPCC Fourth Assessment Report,
Synthesis Report, Chapter 3.
Stretch one’s thinking about how the future may unfold
Shell Group (2005):
They are not forecasts, projections or predictions of what is to come. Nor are they
preferred views of the future. Rather, they are plausible alternative futures: they
provide reasonable and consistent answers to the ‘what if?’ questions relevant to
business.
Without subjective probabilities p(X|e), scenarios of little value
13
Critique of scenario analysis (continued)
Cognitive heuristics play a role and can lead to misinterpretation of
results.
Availability heuristic:
Probabilities of a future event or outcome assessed on the basis of
how easily an individual can remember or imagine examples
Anchoring and adjustment:
People start with an initial value or “anchor” and then modify their
judgment as they consider factors relevant to the specifics  often
insufficient adjustment
 A few highly detailed scenarios can create cognitively compelling
storylines.
Drawn from: Morgan G, Keith D. Improving the way we think about projecting future
14
energy use and emissions of carbon dioxide. Climatic Change 2008; 90; 189-215.
3. The TEMOA Project
(Tools for Energy Model Optimization and Analysis)
15
The TEMOA Project
Tools for Energy Model
Optimization and Analysis
Goal: Create a set of community-driven energy economy
optimization models
Our Approach:
• Open source code (GNU Public License)
• Open source data (GNU Public License)
• No commercial software dependencies
• Input and output data managed directly with a relational DB
• Data and code stored in a web accessible electronic repository
• A version control system
• Programming environment with links to linear, mixed integer,
and non-linear solvers
• Built-in capability for sensitivity and uncertainty analysis
16
Version control with Subversion
We are using a version control system called Subversion (SVN)
http://subversion.apache.org/
http://svnbook.red-bean.com/
Why? Ensure the integrity, sustainability and traceability of changes
during the entire software lifecycle.
SVN enables:
• Multiple developers to work simultaneously on software
components; automatic integration of non-conflicting changes
• Display the modifications to model source code
• Create software snapshots (releases) that represent well-tested and
clearly defined milestones
• Utilize the release mechanism to take snapshots of the model code
and data used to produce research publications.
• Public access to snapshots of the code and data
Works on all major (Unix, Windows, MacOS) platforms
17
Python Optimization Modeling Objects
We're developing the model against the Pyomo API
Why Pyomo?
• Uses a full-featured modern programming language
• Rich set of Python libraries that cover nearly every task
• Active development; linkages between Pyomo and
custom solvers are being developed within the COmmon
Optimization Python Repository (COOPR)
Pyomo developed at Sandia National Laboratories:
https://software.sandia.gov/trac/coopr/wiki/Pyomo
18
COmmon Optimization Python Repository
Pyomo is part of the COOPR package, which is in turn part of A
Common Repository for Optimizers (ACRO)
Two-language approach: high-level language for model
formulation and efficient low-level languages for numerical
computations (e.g., C, C++, Fortran)
ACRO includes both libraries developed at Sandia and publicly
available third-party libraries (e.g., GLPK and COIN-OR)
Gives us the capability to formulate linear, mixed integer, and
non-linear model formulations without commercial solvers
Active collaboration with Discrete Math and Complex Systems
Department at Sandia National Laboratories
19
Model Structure
Resource Commodities
Oil
Coal
P
P
Q
Nat Gas
Electricity
P
P
Q
Intermediate Commodities
H2
P
Q
Q
Coal-fired
power
Coal
gasification
End-Use Demands
Gasoline
Hot Water Vehicle Miles
Q
P
P
P
Q
Q
Q
Electric
water heater
H2 fuel
cell vehicle
Refinery
Gas
turbine
CH4-H2O
reforming
Energy Technologies
Gasoline
vehicle
Gas water
heater
Demand Technologies
20
Basic TEMOA Model Formulation
Minimize present cost of energy
Such that
Supply ≥ Demand
Commodity_Into_Process ≥ Commodity_Outof_Process
Commodity_Produced ≥ Commodity_Consumed
Capacity × Capacity_Factor ≥ Activity
MARKAL ‘Utopia’ System Diagram
Diagram generated using Graphviz: http://www.graphviz.org/
22
MARKAL Objective value: 36,821
TEMOA Objective value: 38,502
Calibration to Utopia
Installed Capacity of Process Technologies:
0.9
Capacity (GW)
0.8
MARKAL: Dark Colors; TEMOA: Light Colors
E01
0.7
E01
0.6
E31
E31
0.5
E51
0.4
E51
0.3
E70
0.2
E70
0.1
SRE
0
SRE
1990
2000
Year
2010
23
Calibration to Utopia (continued)
Installed Capacity of Demand Technologies:
100
Capacity (PJ/yr)
90
MARKAL: Dark Colors; TEMOA: Light Colors
80
RHO
70
RHO
60
RL1
50
RL1
40
TXD
30
TXD
20
TXG
10
TXG
0
1990
2000
Year
2010
24
Questions to address with TEMOA
• How does uncertainty in technology-specific
characteristics (e.g., capital cost of solar PV) affect
outcomes of interest (e.g., fuel prices, fossil fuel
consumption, air emissions)?
• Which technologies and fuels appear to be robust
options given uncertainty in future climate policy and
rates of technology learning?
• How much flexibility exists in energy system design
and at what cost?
25
4. Approach to uncertainty analysis
26
Approach to uncertainty analysis
Use the following techniques in series:
Sensitivity analysis and Monte Carlo simulation
→ Determine key sensitivities
Multi-stage stochastic optimization
→ Develop a hedging strategy
Explore near-optimal, feasible region (MGA)
→ Test robustness of hedging strategy
Uncertainties associated with renewables
Easy
• Capital costs
• Marginal and fixed operational costs
• Performance characteristics
Hard
• Dispatch (of intermittent renewables)
• Representation of forecasting error
28
Residual load duration curve
Taken from:
Ueckerdt F, Brecha R, Luderer G,
Sullivan P, Schmid E, Bauer N,
Böttger D. (2011) “Variable
Renewable Energy in Modeling
Climate Change Mitigation
Scenarios .” International Energy
Workshop, Stanford, CA
Implemented in REMIND‐D,
a hybrid energy‐economy
model of Germany
29
Stochastic Optimization
Decision-makers need to make choices before uncertainty is
resolved → requires an “act then learn” approach
Need to make short-term choices that hedge against future risk
→ Sequential decision-making process that allows recourse
Stochastic optimization
• Build a scenario tree
• Assign subjective probabilities to future outcomes
• Optimize over all possibilities
30
Stochastic optimization of energy models
Desirable features for energy models:
• Multi-stage (greater than 2)
• Multi-objective (e.g., cost, risk, emissions)
• Mixed integer (esp. endogenous tech learning)
Potential stochastic parameters:
• Fuel prices (esp. crude oil, natural gas, coal)
• Policy targets (e.g., CO2 constraints, subsidies)
• Technology performance (e.g., capital cost, thermal eff)
• End-use demand projections (e.g., heating, cooling)
31
Simple example of stochastic optimization
Suppose we have two technologies, A and B. Let x and y represent
the installed capacity in Stages 1 and 2, respectively.
Stage 1 Decision Variables:
x A , xB
p1
s1
Stage 2 Decision Variables:
y A , s1 , y B , s1
Scenario 1: s1
y A , s 2 , y B , s 2 Scenario 2: s2
p2
s2
N
M inim ize: c x 
T

ps  d s  ys
T
s 1
S ubject T o:
t1
t2
Ax  b
Ts x  W s y s  hs
for s  1, ..., N
x0
ys  0
for s  1, ..., N
32
Stochastic optimization with PySP
Python-based Stochastic Programming (PySP) is part of the
COOPR package.
To perform stochastic optimization, specify a Pyomo reference model
and a scenario tree
PySP offers two options:
1. runef: builds and solves the extensive form of the model.
“Curse of dimensionality” → memory problems
2. runph: builds and solves using a scenario-based decomposition
solver (i.e., “Progressive Hedging) based on Rockafellar and Wets
(1991).
Can be implemented in a compute cluster environment; more
complex scenario trees possible.
R.T. Rockafellar and R. J-B. Wets. Scenarios and policy aggregation in optimization under
uncertainty. Mathematics of Operations Research, pages 119–147, 1991.
33
A Test Case of the US Electric Sector
Time periods: 2010-2040, 5-year increments
2030 and after, 2 possible CO2 emissions levels, 3 possible natural gas prices
Electric sector CO2 emissions in 2010: 2340 MmtCO2
BAU CO2: 0.6% annual increase, CO2 Constrained: 4.7% annual decrease
[-50% to +20% change in CO2 emissions in 2040 relative to 2010]
Natural gas prices in 2010: 4.45 $/GJ
Low: 1.1% annual decrease, Constant, High: 8.4% annual increase
[Price ranges from 3.8 to 15 $GJ in 2040]
BAU CO2, Low Gas Price
Uniform Probabilities
BAU CO2, natural gas price constant
Constrained CO2, Low Gas Price
BAU CO2, Constant Gas Price
2010
2015
2020
Constrained CO2, Constant Gas Price
2025
BAU CO2, Low Gas Price
63 = 216 scenarios
60+61+62+63 = 259 nodes
2030
Constrained CO2, Low Gas Price
34
Technology Cost and Performance Characteristics
Annual growth in electricity demand of 0.6% based on the reference case in the Annual
Energy Outlook 2009.
Technology
a
Pulverized
Coal
IGCC
IGCC-CCS
GTCC-CCS
Nuclear
Geothermal
GTCC
GT
Hydro
Wind-Onshore
Wind-Offshore
Solar Thermal
Solar PV
Efficiency
(%)
Capacity
Factor
(%)
Average
Cost
($/kWh)
Baseload /
Shoulder /
Peak
(B/S/P)
0.0459
39
95
0.043
B
0.0292
0.0444
0.0294
0.0049
0.00
0.0200
0.0317
0.0243
0.00
0.00
0.00
0.00
46
41
46
33
11
54
40
34
34
34
34
34
90
90
90
95
90
95
95
65
35
40
40
30
0.045
0.066
0.086
0.054
0.044
0.062
0.076
0.047
0.076
0.14
0.17
0.25
B
B
B
B
B
Any
Any
Any
S
S
S
S
Capital
Cost
($/kW)
Fixed
O&M
($/kW∙yr)
Variable
O&M
($/kWh)
2058
27.5
2378
3496
1890
3318
1711
948
634
2242
1923
3851
5021
6038
38.7
46.1
19.9
90.0
165
11.7
10.5
13.6
30.3
89.5
56.8
11.7
Capacity
Constraintb
(GW)
23
2
8000
800
100
Source: EIA (US Energy Information Administration), Office of Integrated Analysis and Forecasting, US
Department of Energy. Assumptions to the Annual Energy Outlook 2009. DOE/EIA-0554(2009);
35
Washington DC; US Government Printing Office; 2009b.
Natural Gas Price in 2040 vs. Total Cost
1.04E+07
1.03E+07
System Cost ($)
1.03E+07
1.02E+07
1.02E+07
1.01E+07
1.01E+07
1.00E+07
9.95E+06
9.90E+06
9.85E+06
0
2
4
6
8
10
12
14
16
Natural Gas Price in 2040 ($/GJ)
36
Constant Nat Gas Prices, Increasing CO2
600
Electricity Generation (GWyr)
500
geothermal
400
nuclear
hydro
300
cc gas turbine
sc gas turbine
coal
200
100
0
2010
2015
2020
2025
2030
2035
2040
Year
CO2 emissions allowed to grow 0.6% annually
Natural gas prices remain constant at 4.5 $/GJ
37
High Nat Gas Prices, Decreasing CO2
600
Electricity Generation (GWyr)
500
onshore wind
geothermal
400
nuclear
hydro
300
cc gas turbine
sc gas turbine
200
coal
100
0
2010
2015
2020
2025
2030
2035
2040
Year
CO2 emissions decrease 4.6% annually from 2030-2040
Natural gas prices increase 8.3% annually from 2030-2040
38
Modeling to Generate Alternatives
Need a method to test the robustness of a hedging strategy →
“Modeling to Generate Alternatives”†
MGA generates alternative solutions that are maximally different
in decision space but perform well with respect to modeled
objectives
The resultant MGA solutions provide modelers and decisionmakers with a set of alternatives for further evaluation
†Brill
(1979), Brill et al. (1982), Brill et al. (1990)
39
Hop-Skip-Jump (HSJ) MGA
Brill et al. (1982)
Steps:
1. Obtain an initial optimal solution by any method
2. Add a user-specified amount of slack to the value of the
objective function
3. Encode the adjusted objection function value as an
additional upper bound constraint
4. Formulate a new objective function that minimizes the
decision variables that appeared in the previous solutions
5. Iterate the re-formulated optimization
6. Terminate the MGA procedure when no significant changes
to decision variables are observed in the solutions
40
HSJ MGA
Mathematical formulation
where:
min
p
x
k
kK
s.t.
f j (x)  T j
x X
j
K represents the set of indices of decision
variables with nonzero values in the
previous solutions

fj x
is the jth objective function
Tj is the target specified for the jth modeled
objective
X is the set of feasible solution vectors
41
Conclusions
Most EEO models and model-based analyses are opaque to
external parties
The TEMOA project represents a new, transparent modeling
framework designed for rigorous uncertainty analysis
Combine sensitivity analysis, stochastic optimization, and
modeling-to-generate-alternatives to identify robust hedging
strategies
Critical to analyze the deployment of renewables in a systems
context
42
Acknowledgments
• Kevin Hunter, MS student, Civil Engineering, NCSU
• Sarat Sreepathi, PhD student, Computer Science, NCSU
• Jean-Paul Watson and Bill Hart, Sandia National
Laboratory
This work would made possible through the generous
support of the National Science Foundation. CAREER:
Modeling for Insights with an Open Source Energy
Economy Optimization Model. Award #1055622

similar documents