stochastic optimization in electricity systems

49
SPXI Tutorial, August 26, 2007 Andy Philpott The University of Auckland www.esc.auckland.ac.nz/epoc Stochastic Optimization in Electricity Systems

Upload: alyn

Post on 11-Jan-2016

74 views

Category:

Documents


1 download

DESCRIPTION

Stochastic Optimization in Electricity Systems. Andy Philpott The University of Auckland www.esc.auckland.ac.nz/epoc. Electricity optimization. Optimal power flow [Wood and Wollenberg, 1984,1996, Bonnans, 1997,1998] Economic dispatch [Wood and Wollenberg, 1984,1996] Unit commitment - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Andy PhilpottThe University of Auckland

www.esc.auckland.ac.nz/epoc

Stochastic Optimization in Electricity Systems

Page 2: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Electricity optimization Optimal power flow [Wood and Wollenberg, 1984,1996, Bonnans, 1997,1998]

Economic dispatch [Wood and Wollenberg, 1984,1996]

Unit commitmentLagrangian relaxation [Muckstadt & Koenig, 1977, Sheble & Fahd, 1994]Multi-stage SIP [Carpentier et al 1996, Takriti et al 1996, Caroe et al 1999, Romisch et al 1996-]Market models [Hobbs et al, 2001, Philpott & Schultz, 2006]

Hydro-thermal schedulingDynamic programming [Massé*, 1944, Turgeon, 1980, Read,1981]Multi-stage SP [Jacobs et al, 1995]SDDP [ Pereira & Pinto, 1991]Market models [Scott & Read, 1996, Bushnell, 2000]

Capacity expansion of generation and transmissionLP [Massé & Gibrat, 1957]SLP [Murphy et al, 1982]Multi-stage SP [Dantzig & Infanger,1993]Multi-stage SIP [Ahmed et al, 2006, Singh et al, 2006]Market models [Murphy & Smeers, 2005]

* P. Massé, Applications des probabilités en chaîne à l’hydrologie statistique et au jeu des réservoirsJournal de la Société de Statistique de Paris, 1944

Page 3: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Uncertainty in electricity systems

System uncertainties• Long-term electricity demand (years)• Inflows to hydro-electric reservoirs (weeks/months)• Short-term electricity demand (days)• Intermittent (e.g. wind) supply (minutes/hours)• Plant and line outages (seconds/minutes)

User uncertainties (various time scales)• Electricity prices • Behaviour of market participants• Government regulation

Page 4: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

What to expect in this talk…

• I will try to address three questions:– What stochastic programming models are being used by

modellers in electricity companies?– How are they being used?– What will be the features of the next generation of models?

• I will not talk about financial models in perfectly competitive markets (see previous tutorial speakers).

• I will (probably) not talk about capacity expansion models.• Warning: this is not a “how-to-solve-it” tutorial.

Page 5: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Economic dispatch model

Page 6: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Uncertainty in economic dispatch

• Plant and line outages (seconds/minutes) – Spinning reserve (N-1 security standard)

• Uncertain demand/supply(e.g. wind) – Frequency keeping stations (small variations)

– Re-dispatch (large variations)

– Opportunity for stochastic programming (see Pritchard et al WIND model)

Page 7: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Unit commitment formulation

Page 8: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Stochastic unit commitment model

Page 9: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Lagrangian relaxation decouples by unit

See sequence of papers by Romisch, Growe-Kuska, and others (1996 -)

Page 10: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Hydro-thermal scheduling

Page 11: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Hydro-thermal scheduling literature• Dynamic programming

Massé (1944)*Turgeon (1980)Read (1981)

• Multi-stage SP Jacobs et al (1995)

• SDDP Pereira & Pinto (1991)

• Market models Scott & Read (1996)Bushnell (2000)

* P. Massé, Applications des probabilités en chaîne à l’hydrologie statistique et au jeu des réservoirsJournal de la Société de Statistique de Paris, 1944

Page 12: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

(Over-?) simplifying assumptions

• Small number of reservoirs (<20)• System is centrally dispatched.• Relatively complete recourse.• Stage-wise independence of inflow process.• A convex dispatch problem in each stage.

Page 13: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

p12

p11

p13

p21

p21

p21

Page 14: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Outer approximation

Page 15: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Outer approximation of Ct+1(y)

Θ(t+1)

Reservoir storage, x(t+1)

θt+1 ≥ αt+1(k) + βt+1(k)Ty, k

Page 16: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Cut calculation

Page 17: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Sampling algorithm

Page 18: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

p11

p13

p12

Page 19: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

p11

p13

p12

Page 20: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

p11

p13

p21

p21

p21

Page 21: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

p11

p13

p21

p21

p21

Page 22: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Page 23: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Case study: New Zealand system

HVDC lineMAN

HAW

TPO

Page 24: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

A simplified network model

S

N

demand

demand TPO

HAW

MAN

Page 25: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

2005-2006 policy simulated with historical inflow sequences

0

500

1000

1500

2000

2500

3000

3500

4000

4500

0 10 20 30 40 50

1995

1996

1997

1998

1999

2000

2001

2002

2003

2004

0

0

Page 26: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Computational results: NZ model

• 10 reservoirs• 52 weekly stages• 30 inflow outcomes per stage • Model written in AMPL/CPLEX

• Takes 100 iterations and 2 hours on a standard Windows PC to converge

• Larger models have slow convergence

Page 27: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Computational results: Brazilian system

• 283 hydro plants• AR-6 streamflow model

– about two thousand state variables• 271 thermal plants• 219 stages• 80 sequences in the forward simulation• 30 scenarios (“openings”) for each state in the backward

recursion• 7 iterations• 11 hours CPU (Pentium IV-HT 2.8 GHz 1 Gbyte RAM )

Source: Reproduced with permission of Luiz Barossa, PSR

Page 28: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Electricity pool markets

• Chile (1970s)• England and Wales (1990) (NETA 2001)• Nordpool (1996)• New Zealand (1996)• Australia (1997)• Colombia, Brazil, …• Pennsylvania-New Jersey-Maryland (PJM)• New York (1999)• New England (1999)• Ontario (May 1, 2002)• Texas (ERCOT, full LMP by 2009)

Page 29: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Uniform price auction (single node)

price

quantity

price

quantity

combined offer stack

demand

p

price

quantity

T1(q) T2(q)

p

Page 30: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Nodal dispatch-pricing formulation

p

q

Tm(q)

[i]

Page 31: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Residual demand curve for a generator

S(p) = total supply curve from other generatorsD(p) = demand function

c(q) = cost of generating q R(q,p) = profit = qp – c(q)

Residual demand curve = D(p) – S(p)

p

q

Optimal dispatch point to maximize profit

Page 32: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

A distribution of residual demand curves

(Residual demand shifted by random demand shock )

D(p) – S(p) +

p

q

Optimal dispatch point to maximize profit

Page 33: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

p

q

One supply curve optimizes for all demand realizations

The offer curve is a “wait-and-see”solution. It is independent of the probability distribution of

Page 34: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

This doesn’t always work

p

q

There is no nondecreasing offercurve passing through both points.

Optimization in this case requires a risk measure. We will use the expectation of profit with respect to the probability distribution of .

Page 35: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

p

q

If (S-D)-1 is a log concave function of q

and c(q) is convex then a single monotonic

supply curve exists that maximizes profit

for all realizations of .

Monotonicity Theorem [Anderson & P, 2002]

Page 36: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

The market distribution function[Anderson & P, 2002]

p

q quantity

price

)p,q(

Define: (q,p) = Pr [D(p) + – S(p) < q]= F(q + S(p) – D(p)) = Pr [an offer of (q,p) is not fully dispatched]= Pr [residual demand curve passes below (q,p)]

S(p) = supply curve from other generatorsD(p) = demand function = random demand shockF = cdf of random shock

Page 37: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

q(t)

p(t)

quantity

price

Expected profit from curve (q(t),p(t))

dtdt

))t(p),t(q(d)))t(q(c)t(p)t(q(

1t

0t

ψE[Profit]

dtdt

))t(p),t(q(dψProb

))t(q(c)t(p)t(q Profit

Page 38: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Finding empirical

• Use small dispatch model• Aggregated demand• DC-load flow dispatch• Piecewise linear losses• Solved in ampl/cplex

• Draw a sample from demand• Draw a sample from other generators offers• Solve dispatch model with different offers q• Increment the locations where dispatch occur by 1

Page 39: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Estimation of using simulationDispatch count on segment increases by 1 Sampled residual demand curve

Page 40: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

The real world

• Transmission congestion gives different prices at different nodes.• Generators own plant at different nodes.• Generators in New Zealand are vertically integrated with electricity retailers, with

demand at a different node.• Generators have contracts with purchasers at different nodes.

• Maintenance and outages affect generation and transmission capacity.

Page 41: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Contracts

A contract for differences (or hedge contract) for a quantity Q at an agreed strike price f is an agreement for one party (the contract holder) to pay the other (the contract writer) the amount Q(f-) where is the electricity price at an agreed node.

A generator having written a contract for Q seeks to maximize

E[R(q,p)] = E[qp - c(q) + Q(f-)]

Page 42: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Generator’s real objective

Owner of HLY station might want to

maximize

gross revenue at HLY + TOK–$35/MWh fuel cost at HLY–cost of purchases to cover retail base of

• 25% at OTA• 5% at ISL• 5% at HWB

accounting for hedge contracts at $50/MWh of

• 250MW at OTA• 150MW at HAY• 50 MW at HWB

(Numbers are illustrative only!)

Page 43: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Implementation in the real world • BOOMER code [Pritchard, 2006]• Single period/single station simulation/optimization model.• Construct discrete on a rectangular grid.• For every grid segment record all the relevant dispatch information (e.g. nodal

prices at contract nodes) • Use dynamic programming to construct a step function maximizing expected profit.• A longest path problem through acyclic directed graph, where increment on each

edge is the overall profit function times the probability of being dispatched on this segment

Page 44: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Longest path gives maximum expected profit

Page 45: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

without retail and contracts

with retail and 450MW of contracts

Page 46: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

with retail customers moved to be more remote

Page 47: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

What is wrong with this model?

• Single period• Competitors response not modelled• Extreme solutions: no “comfort

factor”• Can be used as a benchmark for

traders

Page 48: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

Challenges for SP

• Electricity systems have been a happy hunting ground for stochastic optimization.

• What are the SP success stories in electricity?• Tractability is only part of the story – model veracity is

more important.• In markets the dual problem is as important as the primal

(e.g. WIND model).• Are the assumptions of the models valid e.g. perfect

competition?• Are the answers simple enough to verify (e.g. by out-of-

sample simulation)?• Models are used differently from their intended

application.

Page 49: Stochastic Optimization in  Electricity Systems

SPXI Tutorial, August 26, 2007

The End