pps - Electric Power Optimization Centre

Recent work on DOASA
Andy Philpott
Electric Power Optimization Centre (EPOC)
University of Auckland
(www.epoc.org.nz)
joint work with
Anes Dallagi, Emmanuel Gallet, Ziming Guan, Vitor de Matos
ONS SDDP Workshop, August 17, 2011
Slide 1 of 50
DOASA
Dynamic Outer Approximation Sampling Algorithm
• EPOC version of SDDP with some differences
• Version 1.0 (P. and Guan, 2008)
–
–
–
–
Written in AMPL/Cplex
Very flexible
Used in NZ dairy production/inventory problems
Takes 8 hours for 200 cuts on NZEM problem
• Version 2.0 (P. and de Matos, 2010)
– Written in C++/Cplex with NZEM focus
– Adaptive dynamic risk aversion
– Takes 8 hours for 5000 cuts on NZEM problem
ONS SDDP Workshop, August 17, 2011
Slide 2 of 50
Notation for DOASA
ONS SDDP Workshop, August 17, 2011
Slide 3 of 50
Hydro-thermal scheduling
SDDP (PSR) versus DOASA
SDDP (NZ model)
DOASA
Fixed sample of N openings
in each stage. Solves all.
Fixed sample of N openings in
each stage. Solves all.
Fixed sample of forward pass
scenarios (50 or 200)
Resamples forward pass
scenarios (1 at a time)
High fidelity physical model
Low fidelity physical model
Loose convergence criterion
Stricter convergence criterion
Risk models (None for NZ)
Risk model (Markov chain)
ONS SDDP Workshop, August 17, 2011
Slide 4 of 50
DOASA
Overview of this talk
This talk should be about optimization…
• A Markov Chain inflow model
• Risk modelling example in DOASA
• River chain optimization
My next talk(?) is about benchmarking
electricity markets using SDDP.
ONS SDDP Workshop, August 17, 2011
Slide 5 of 50
Part 1
Markov chains and risk aversion
(joint work with Vitor de Matos, UFSC)
ONS SDDP Workshop, August 17, 2011
Slide 6 of 50
Electricity sector by energy supply in 2009
4%1%
11%
7%
57%
20%
ONS SDDP Workshop, August 17, 2011
HYDRO
GAS
COAL
GEOTHERMAL
WIND
OTHER
http://www.med.govt.nz/
Slide 7 of 50
New Zealand electricity mix
ONS SDDP Workshop, August 17, 2011
Slide 8 of 50
Experiments in NZ system
9 reservoir model
WKO
MAN
HAW
ONS SDDP Workshop, August 17, 2011
Slide 9 of 50
Inflow modelling
Benmore inflows over 1981-1985
Source: [Harte and Thomson, 2007]
ONS SDDP Workshop, August 17, 2011
Slide 10 of 50
Markov-chain model
• DOASA model assumes stagewise
independence
• SDDP models use PAR(p) models.
• NZ reservoir inflows display regime jumps.
• Can model this using “Hidden Markov
models” ( [Baum et al, 1966])
ONS SDDP Workshop, August 17, 2011
Slide 11 of 50
Hidden Markov model with 2 climate states
DRY
WET
p11
w1
p26
w2
w3
w4
w5
w6
INFLOWS
ONS SDDP Workshop, August 17, 2011
Slide 12 of 50
Hidden Markov model with AR1
(Buckle, Haugh, Thomson, 2004)
Yt is log of inflows
St a Markov Chain with 4 states
Zt is an AR1 process
ONS SDDP Workshop, August 17, 2011
Slide 13 of 50
Hidden Markov model with AR1
Benmore inflows in-sample test
Source: [Harte and Thomson, 2007]
ONS SDDP Workshop, August 17, 2011
Slide 14 of 50
Markov Model with 2 climate states
Aim: test if we can optimize with Markov states
DRY
WET
p11
w1
p26
w2
w3
WET INFLOWS
ONS SDDP Workshop, August 17, 2011
w4
w5
w6
DRY INFLOWS
Slide 15 of 50
Transition matrix P
P=
ONS SDDP Workshop, August 17, 2011
q
1-p
1-q
p
Slide 16 of 50
Markov-chain DOASA
This gives a scenario tree
ONS SDDP Workshop, August 17, 2011
Slide 17 of 50
Markov-chain model for experiments
• Climate state for each island in New Zealand
(W or D)
• State space is (WW, DW, WD, DD).
• Assume state is known.
• Sampled inflows are drawn from historical record
corresponding to climate state e.g. WW.
• Record a set of cutting planes for each state.
• Report experiments with a 4-state model:
– (WW, DW, WD, DD).
ONS SDDP Workshop, August 17, 2011
Slide 18 of 50
Markov-chain SDDP
(c.f. Mo et al 2001)
P is a transition matrix for S climate states, each with inflows wti
ONS SDDP Workshop, August 17, 2011
Slide 19 of 50
Ruszczynzki/Shapiro risk measure construction
ONS SDDP Workshop, August 17, 2011
Slide 20 of 50
Coherent risk measure construction
Two-stage version
ONS SDDP Workshop, August 17, 2011
Slide 21 of 50
Coherent risk measure construction
Multi-stage version (single Markov state)
ONS SDDP Workshop, August 17, 2011
Slide 22 of 50
State-dependent risk aversion
We can choose lambda according to Markov state
lt+1(i) =
0.25, i=1,
0.75, i=2.
ONS SDDP Workshop, August 17, 2011
Slide 23 of 50
State-dependent risk aversion
“4 Lambdas” model in experiments
ONS SDDP Workshop, August 17, 2011
Slide 24 of 50
Experiments
Nine reservoir model (+ four Markov states)
Reservoir inflow samples drawn from 1970-2005 inflow data
Each case solved with 4000 cuts
Simulated with 4000 Markov Chain scenarios for 2006 inflows
ONS SDDP Workshop, August 17, 2011
Slide 25 of 50
Experiments
Average storage trajectories
ONS SDDP Workshop, August 17, 2011
Slide 26 of 50
Experiments
Fuel and shortage cost in 200 most expensive scenarios
ONS SDDP Workshop, August 17, 2011
Slide 27 of 50
Experiments
Fuel and shortage cost in 200 least expensive scenarios
ONS SDDP Workshop, August 17, 2011
Slide 28 of 50
Experiments
Number of minzone violations
ONS SDDP Workshop, August 17, 2011
Slide 29 of 50
Experiments
Expected cost compared with least expensive policy
ONS SDDP Workshop, August 17, 2011
Slide 30 of 50
Part 2
Mid-term scheduling of river chains
(joint work with Anes Dallagi and Emmanuel Gallet at EDF)
ONS SDDP Workshop, August 17, 2011
Slide 31 of 50
Mid-term scheduling of river chains
What is the problem?
• EDF mid-term model gives system
marginal price scenarios from
decomposition model.
• Given price scenarios and uncertain
inflows how should we schedule each
river chain over 12 months?
• Test SDDP against a reservoir
aggregation heuristic
ONS SDDP Workshop, August 17, 2011
Slide 32 of 50
Case study 1
A parallel system of three reservoirs
ONS SDDP Workshop, August 17, 2011
Slide 33 of 50
Case study 2
A cascade system of four reservoirs
ONS SDDP Workshop, August 17, 2011
Slide 34 of 50
Case studies
Initial assumptions
• weekly stages t=1,2,…,52
• no head effects
• linear turbine curves
• reservoir bounds are 0 and capacity
• full plant availability
• known price sequence, 21 per stage
• stagewise independent inflows
• 41 inflow outcomes per stage
ONS SDDP Workshop, August 17, 2011
Slide 35 of 50
Mid-term scheduling of river chains
Revenue maximization model
ONS SDDP Workshop, August 17, 2011
Slide 36 of 50
DOASA stage problem SP(x,w(t))
Outer approximation using cutting planes
V(x,w(t)) =
Θt+1
Reservoir storage, x(t+1)
ONS SDDP Workshop, August 17, 2011
Slide 37 of 50
Heuristic uses reduction to single reservoirs
Convert water values into one-dimensional cuts
xi0
xi1
xi2
xi3
i0+i0 xi1
i1
i0
ONS SDDP Workshop, August 17, 2011
Slide 38 of 50
Results for parallel system
Upper bound from DOASA with 100 iterations
460
455
450
445
440
435
430
0
10
20
30
ONS SDDP Workshop, August 17, 2011
40
50
60
70
80
90
100
Slide 39 of 50
Results for parallel system
Difference in value DOASA - Heuristic policy
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
-0.300
-0.200
-0.100
ONS SDDP Workshop, August 17, 2011
0
0.000
0.100
0.200
0.300
Slide 40 of 50
Results cascade system
Upper bound from DOASA with 100 iterations
745
740
735
730
725
720
715
1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96
ONS SDDP Workshop, August 17, 2011
Slide 41 of 50
Results: cascade system
Difference in value DOASA - Heuristic policy
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
-1
0
ONS SDDP Workshop, August 17, 2011
1
2
3
4
Slide 42 of 50
Case studies
New assumptions
• weekly stages t=1,2,…,52
• include head effects
• nonlinear production functions
• reservoir bounds are 0 and capacity
• full plant availability
• known price sequence, 21 per stage
• stagewise independent inflows
• 41 inflow outcomes per stage
ONS SDDP Workshop, August 17, 2011
Slide 43 of 50
Modelling head effects
Piecewise linear production functions vary with volume
ONS SDDP Workshop, August 17, 2011
Slide 44 of 50
Modelling head effects
A major problem for DOASA?
• For cutting plane method we need the future cost
to be a convex function of reservoir volume.
• So the marginal value of more water is
decreasing with volume.
• With head effect water is more efficiently used
the more we have, so marginal value of water
might increase, losing convexity.
• We assume that in the worst case, head effects
make the marginal value of water constant at
high reservoir levels.
• If this is not true then we have essentially
convexified C at high values of x.
ONS SDDP Workshop, August 17, 2011
Slide 45 of 50
Modelling head effects
Convexification
• Assume that the slopes of the production
functions increase linearly with reservoir
volume, so
Denergy = .Dvolume.flow
• In the stage problem, the marginal value of
increasing reservoir volume at the start of
the week is from the future cost savings (as
before) plus the marginal extra revenue we
get in the current stage from more efficient
generation.
• So we add a term p(t)..E[h(w)] to the
marginal water value at volume x.
ONS SDDP Workshop, August 17, 2011
Slide 46 of 50
Modelling head effects: cascade system
Difference in value: DOASA - Heuristic policy
ONS SDDP Workshop, August 17, 2011
Slide 47 of 50
Modelling head effects: casade system
Top reservoir volume - Heuristic policy
ONS SDDP Workshop, August 17, 2011
Slide 48 of 50
Modelling head effects: casade system
Top reservoir volume - DOASA policy
ONS SDDP Workshop, August 17, 2011
Slide 49 of 50
FIM
ONS SDDP Workshop, August 17, 2011
Slide 50 of 50