optimization basics for electric power markets

47
1 Optimization Basics for Electric Power Markets Presenter: Leigh Tesfatsion Professor of Econ, Math, and ECpE Iowa State University Ames, Iowa 50011-1070 http://www.econ.iastate.edu/tesfatsi/ [email protected] Last Revised: 20 September 2020 Important Acknowledgement: These lecture materials incorporate edited slides and figures originally developed by R. Baldick, S. Bradley et al., A. Hallam, T. Overbye, and M. Wachowiak

Upload: others

Post on 31-Dec-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Optimization Basics for Electric Power Markets

1

Optimization Basics for Electric Power Markets

Presenter:

Leigh Tesfatsion Professor of Econ, Math, and ECpE

Iowa State UniversityAmes, Iowa 50011-1070

http://www.econ.iastate.edu/tesfatsi/[email protected]

Last Revised: 20 September 2020

Important Acknowledgement: These lecture materials incorporate edited slides and figures originally developed by R. Baldick, S. Bradley et al., A. Hallam, T. Overbye, and M. Wachowiak

Page 2: Optimization Basics for Electric Power Markets

2

Topic Outline

⚫ ISO Market Optimization on a Typical Operating Day D

⚫ Alternative modeling formulations

⚫ Optimization illustration: Real-time economic dispatch

⚫ Classic Nonlinear Programming Problem (NPP): Minimization subject to equality constraints

⚫ NPP via the Lagrange multiplier approach

⚫ NPP Lagrange multipliers as shadow prices

⚫ Real-time economic dispatch: Numerical example

⚫ General Nonlinear Programming Problem (GNPP): Minimization subject to equality and inequality constraints

⚫ GNPP via the Lagrange multiplier approach

⚫ GNPP Lagrange multipliers as shadow prices

⚫ Necessary versus sufficient conditions for optimization

⚫ Technical references

Page 3: Optimization Basics for Electric Power Markets

Key Objective of EE/Econ 458

◆ Understand the optimization processes undertaken by participants in restructured wholesale power markets

◆ For ISOs, these processes include:

◼ Security-Constrained Unit Commitment (SCUC) for determining which Generating Companies (GenCos) will be asked to commit to the production of energy the following day

◼ Security-Constrained Economic Dispatch (SCED) for determining energy dispatch and locational marginal price (LMP) levels both for the day ahead and in real time 3

Page 4: Optimization Basics for Electric Power Markets

ISO Market Optimization on a Typical Operating Day D:

Timing from Midwest ISO (MISO)

4

00:00

11:00

16:00

23:00

Real-time

spot market

(balancing

mechanism)

for day D

Day-ahead market

for day D+1

ISO collects demand bids from LSEs

and supply offers from GenCos

ISO evaluates LSE demand bids and GenCo supply offers

ISO solves D+1 Security Constrained Unit Commitment (SCUC) & Security

Constrained Economic Dispatch (SCED) & posts D+1 commitment,

dispatch, and LMP schedule

Day-ahead settlement

Real-time

settlement

Page 5: Optimization Basics for Electric Power Markets

5

Types of Model Representations(from Bradley et al. [2])

Main focus of 458 (LT)

Page 6: Optimization Basics for Electric Power Markets

6

Classification of Modeling Tools(from Bradley et al. [2])

Main focusof 458 (LT)

Game Theory

Page 7: Optimization Basics for Electric Power Markets

7

Optimization in Practice(from Bradley et al. [2])

Main focusof 458 (LT)

Page 8: Optimization Basics for Electric Power Markets

8

Source: M. Wachowiak, Optim Lecture Notes (On-Line)

Main focus of 458 (LT)

Page 9: Optimization Basics for Electric Power Markets

9

Optimization Illustration:Hourly Economic Dispatch

⚫ Initial Problem Simplification:Ignore Generation Company (GenCo) capacity limits, transmission constraints, line limit losses, and all costs except variable costs.

⚫ Problem Formulation for Hour HDetermine the real-power dispatch levels PGi (MW) for

GenCos i = 1, 2, … , I that minimize total variable cost

TVC, subject to the constraint that total dispatch equals total real-power demand (load) PD

Page 10: Optimization Basics for Electric Power Markets

10

Hourly Economic Dispatch: Mathematical Formulation

minimize TVC(PG) = ∑ VCi(PGi)

with respect to PG = (PG1,…,PGI)T

subject to the balance constraint

∑ PGi = PD

i=1

I

i=1

I

($/h)

(MW)

(MW)

Load as a constraint constant for power dispatch

Variable cost of GenCo i

Page 11: Optimization Basics for Electric Power Markets

11

5-Bus Transmission Grid Example

G4

G2G1 G3

G5

Bus 1 Bus 2 Bus 3

LSE 3Bus 4Bus 5

LSE 1 LSE 2

Load=100MW Load=350MW

Load=50MW

5 GenCos (I=5), Load PD = 500MW

VC5

VC1 VC2VC3

VC4

Page 12: Optimization Basics for Electric Power Markets

12

Illustration of TVC Determination

($/MWh)

0

90

10

30

50

70

200 400 600 8

MC(PG)

G2

G1

G1

G3

G3

G5

G4 G4

PG (MW)500

TVC*

P*G1= 200MW

P*G2= 100MW

P*G3= 200MW

P*G4=P*G5=0

PD

Optimal Dispatch

Page 13: Optimization Basics for Electric Power Markets

13

Illustration of TVC Determination

($/MWh)

0

90

10

30

50

70

200 400 600 8

MC(PG)

G2

G1

G1

G3

G3

G5

G4 G4

PG (MW)VC2*

500

P*G1= 200MW

P*G2= 100MW

P*G3= 200MW

P*G4=P*G5=0

VC1*

VC3*

PD

Optimal Dispatch

Page 14: Optimization Basics for Electric Power Markets

14

Day-Ahead Supply Offers in MISO

∆MW10

10101010101010

Minimum acceptable price(sale reservation price)

for each ∆MW

$/MWh

Page 15: Optimization Basics for Electric Power Markets

15

Supply Offers in the MISO…Cont’d

Page 16: Optimization Basics for Electric Power Markets

16

Important Remark on the Form of GenCo Supply Offers

⚫ Linear programming (LP) is used to handle economic dispatch when supply offers have block (step-function) form.

⚫ Nonlinear Programming (NP) techniques are used to handle economic dispatch when supply offers take a slope (piecewise differentiable or differentiable) form. (K/S assumption)

⚫ The remainder of these notes use NP techniques for economic dispatch, assuming supply offers take a differentiable form.

⚫ When we later treat GenCo capacity constraints, we will need to relax this to permit supply offers to take a piecewise differentiable form.

Page 17: Optimization Basics for Electric Power Markets

17

Hourly Economic Dispatch Once Again

minimize TVC(PG) = ∑ VCi(PGi)

with respect to PG = (PG1,…,PGI)T

subject to the balance constraint

∑ PGi = PD

i=1

I

i=1

I

($/h)

(MW)

(MW)

constraint constant

Variable cost of GenCo i

Page 18: Optimization Basics for Electric Power Markets

18

Minimization with Equality Constraints:General Solution Method?

⚫ For a differentiable function f(x) of an n-dimensional vector x = (x1,…,xn)

T, a necessary (but not sufficient) condition for x* to minimize f(x) is that ∇xf(x*) = 0.

⚫ This multi-variable gradient condition generalizes the

first derivative condition for 1-variable min problems:

1 2

( ) ( ) ( )( ) , , ,

nx x x

f x f x f xf xx

n-dimensional row vector !

=

Page 19: Optimization Basics for Electric Power Markets

19

Minimization with Equality Constraints…Cont’d

⚫ When a minimization problem involves equality constraints, we can solve the problem using the method of Lagrange Multipliers

⚫ The key idea is to transform the constrained minimization problem into an unconstrained problem

Page 20: Optimization Basics for Electric Power Markets

20

Minimization with Equality Constraints…Cont’d

⚫ n-dimensional vector x = (x1,…,xn)T ➔ n choice variables

⚫ m-dimensional vector c = (c1,…,cm)T ➔ m constraint constants

⚫ Rn = all real n-dimensional vectors, Rm = all real m-dimensional vectors

⚫ f:Rn→ R ➔ objective function mapping x → f(x) on real line

⚫ h:Rn→ Rm

➔ constraint function mapping x → h(x) = (h1(x),…,hm(x))T

Nonlinear Programming Problem:

(NPP) Minimize f(x) with respect to x

subject to h(x) = c

Page 21: Optimization Basics for Electric Power Markets

21

Minimization with Equality Constraints…Cont’d

• The Lagrangean Function for this problem can be expressed in parameterized form as

L(x, λ,c) = f(x) - λT•[h(x) – c ]

or equivalently,

L(x,λ,C) = f(x) + λT•[c – h(x)]

where λT = (λ1,…., λm)

Making explicit the dependence of L on c

Page 22: Optimization Basics for Electric Power Markets

22

Minimization with Equality Constraints…Cont’d(cf. Fletcher [3])

Regularity Conditions: Suppose f, h are differentiable and either

rank(∇xh(x*))=m or h(x) has form Amxnxnx1 + bmx1.

m by n matrix

Page 23: Optimization Basics for Electric Power Markets

23

Minimization with Equality Constraints…Cont’d(cf. Fletcher [3])

First-Order Necessary Conditions (FONC) for x* to solve Problem (NPP), given regularity conditions:

There exists a value λ* for the multiplier vector λ such

that (x*, λ*) satisfies:

(1) 0 = ∇x L(x*, λ*, c)1xn = ∇xf(x*) - λT•∇xh(x*)

(2) 0 = ∇λ L(x*, λ*, c)1xm = [c – h(x*)] T

Page 24: Optimization Basics for Electric Power Markets

24

Lagrange Multipliers as “Shadow Prices”?

▪ By construction, the solution (x*, λ*) is a function of the given vector c of constraint constants:

(x*, λ*) = (x(c), λ(c) )

▪ From FONC condition (2) on previous page:

f(x(c)) = L(x(c), λ(c), c)

Page 25: Optimization Basics for Electric Power Markets

25

Lagrange Multipliers as “Shadow Prices”…

▪ Then from implicit function theorem, the chain rule, and FONC (1), (2), for each constraint k,

Total Differential

Partial Differentials

h This “+” sign follows from the form of

Lagrangean function

h

Page 26: Optimization Basics for Electric Power Markets

26

Lagrange Multipliers as “Shadow Prices”…

In summary, for each constraint k:

Thus the Lagrange multiplier solution λk(c) for the kth

constraint gives the change in the optimized objective

function f(x*) = f(x(c)) with respect to a change in the

constraint constant ck for the kth constraint.

Page 27: Optimization Basics for Electric Power Markets

27

Example: Economic Dispatch Again

G1 1

G

For the economic dispatch we have a minimization

constrained with a single equality constraint

L( , ) ( ) ( ) (no losses)

The necessary conditions for a minimum are

L( , )

m m

i Gi D Gii i

Gi

C P P P

dC

P

= =

= + −

=

P

P

1

( )0 (for 1 to )

0

i Gi

Gi

m

D Gii

Pi m

dP

P P

=

− = =

− =

I I

I

I

I I

I

I

constraint constanth

cVCi

cdVCi

Page 28: Optimization Basics for Electric Power Markets

28

Hourly Economic Dispatch: Numerical Example (Baldick/Overbye)

D 1 2

21 1 1 1

22 2 2 2

1 1

1

What is economic dispatch for a two generator

system P 500 MW and

( ) 1000 20 0.01 $/h

( ) 400 15 0.03 $/h

Using the Largrange multiplier method we know

( )20 0.0

G G

G G G

G G G

G

G

P P

C P P P

C P P P

dC P

dP

= + =

= + +

= + +

− = + 1

2 22

2

1 2

2 0

( )15 0.06 0

500 0

G

GG

G

G G

P

dC PP

dP

P P

− =

− = + − =

− − =

This requires cost coefficients to have units,

omitted here for simplicity

$/MWhLaLa

V

V

ddV

dV

Page 29: Optimization Basics for Electric Power Markets

29

Economic Dispatch Example…Continued

1

2

1 2

1

2

1

2

We therefore need to solve three linear equations

20 0.02 0

15 0.06 0

500 0

0.02 0 1 20

0 0.06 1 15

1 1 0 500

312.5 MW

187.5 MW

26.2 $/MW

G

G

G G

G

G

G

G

P

P

P P

P

P

P

P

+ − =

+ − =

− − =

− − − = − − − −

= h

***

Solution Values

Page 30: Optimization Basics for Electric Power Markets

30

Economic Dispatch Example…Continued

▪ The solution values for the Economic Dispatch problem are:

PG* = (PG1*,PG2*)T = (312.5MW, 187.5MW)T

λ*= $26.2/MWh

▪ By construction, the solution values PG* and λ* are functions of the constraint constant PD.

▪ That is, a change in PD would result in a change in these solution values.

Page 31: Optimization Basics for Electric Power Markets

31

Economic Dispatch Example…Continued

Applying previous developments for Lagrange multipliers as

shadow prices,

λ* = ∂TVC(PG*)

∂PD

= Change in minimized total variable costTVC (in $/h) with respect to a change in the total demand PD (in MW), where PD is the constraint constant for the balance constraint

[Total Dispatch = Total Demand]

(in $/MWh)

Page 32: Optimization Basics for Electric Power Markets

32

Economic Dispatch Example…Continued

By definition, the locational marginal price (LMP) at any bus k in any hour h is the least cost of servicing one more megawatt (MW) of load (fixed demand) at bus k.

Consequently,

λ* = ∂TVC(PG*)

∂PD

(in $/MWh)

Page 33: Optimization Basics for Electric Power Markets

33

Extension to Inequality Constraints(cf. Fletcher [3])

General Nonlinear Programming Problem (GNPP):▪ x = nx1 choice vector; ▪ c = mx1 vector & d = sx1 vector (constraint constants)

▪ f(x) maps x into R (all real numbers)

▪ h(x) maps x into Rm (all m-dimensional vectors)

▪ z(x) maps x into Rs (all s-dimensional vectors)

GNPP: Minimize f(x) with respect to x subject to

h(x) = c

z(x) ≥ d

Page 34: Optimization Basics for Electric Power Markets

34

Important Remark on theRepresentation of Inequality Constraints

Note: The inequality constraint for (GNPP) can equivalently be expressed in many different ways:

(1) z(x) ≥ d ;

(2) z(x) - d ≥ 0 ;

(3) - z(x) – [-d] ≤ 0 ;

(4) r(x) – e ≤ 0 (r(x) = -[z(x)], e = -[d] )

(5) r(x) ≤ e

Page 35: Optimization Basics for Electric Power Markets

35

Why Our Form of Inequality?

Our GNPP Form:

Minimize f(x) with respect to x subject to

h(x) = c

(*) z(x) ≥ d

Given this form, we know that an INCREASE in d has to result in a new value for the minimized objective function f(x*) that is AT LEAST AS GREAT as before.

Why? When d increases the feasible choice set for xSHRINKS, hence [min f] either or stays same.

➔ 0 ≤ ∂f(x*)/∂d = *T = Shadow price vector for (*)

Given suitable regularity conditions

hh

Page 36: Optimization Basics for Electric Power Markets

36

Extension to Inequality Constraints…Continued

• Define the Lagrangean Function as

L(x, λ,,c,d) = f(x) + λT[c - h(x)] + T[d - z(x)]

• Assume Kuhn-Tucker Constraint Qualification(KTCQ) holds at x*, roughly stated as follows:

The true set of feasible directions at x*

= Set of feasible directions at x* assuming a linearized set of constraints in place of the

original set of constraints.

Page 37: Optimization Basics for Electric Power Markets

37

Extension to Inequality Constraints…Continued

▪ Given KTCQ, the First-Order Necessary Conditions (FONC) for x*

to solve the (GNPP) are as follows: There exist λ* and * such

that (x*, λ*, *) satisfy:

0 = ∇xL(x*, λ*,*,c,d)

= [ ∇xf(x*) - λ*T•∇xh(x*) - *T•∇xz(x*) ] ;

h(x*) = c ;

z(x*) ≥ d; *T•[d - z(x*)] = 0; * ≥ 0

❑ These FONC are often referred to as theKarush-Kuhn-Tucker (KKT) conditions.

Page 38: Optimization Basics for Electric Power Markets

38

Solution as a Function of (c,d)

By construction, the components of the solution vector (x*, λ*, *) are functions of the constraint constant vectors c and d

• x* = x(c,d)

• λ* = λ(c,d)

• * = (c,d)

Page 39: Optimization Basics for Electric Power Markets

39

GNPP Lagrange Multipliers as Shadow Prices

Given certain additional regularity conditions…

• The solution λ* for the m x 1 multiplier vector λis the derivative of the minimized value f(x*) of the objective function f(x) with respect to the constraint vector c, all other problem data remaining the same.

∂f(x*)/∂c = ∂f(x(c,d))/∂c = λ*T

Page 40: Optimization Basics for Electric Power Markets

40

GNPP Lagrange Multipliers as Shadow Prices…

Given certain additional regularity conditions…

• The solution * for the s x 1 multiplier vector is the derivative of the minimized value f(x*) of the objective function f(x) with respect to the constraint vector d, all other problem data remaining the same.

0 ≤ ∂f(x*)/∂d = ∂f(x(c,d))/∂d = *T

Page 41: Optimization Basics for Electric Power Markets

41

GNPP Lagrange Multipliers as Shadow Prices…

Consequently…

• The solution λ* for the multiplier vector λ thus essentially gives the prices (values) associated with unit changes in the components of the constraint vector c, all other problem data remaining the same.

• The solution * for the multiplier vector thus essentially gives the prices (values) associated with unit changes in the components of the constraint vector d, all other problem data remaining the same.

• Each component of λ* can take on any sign

• Each component of * must be nonnegative

Page 42: Optimization Basics for Electric Power Markets

42

Sufficient Conditions for Minimization?

First-order necessary conditions for x* to solve NPP/GNPP are not sufficient in general to ensure x*solves NPP/GNPP, or to ensure x* solves NPP/GNPP uniquely

• What can go wrong:

❖ (1) Local maximum rather than local minimization

❖ (2) Inflection point rather than minimum point

❖ (3) Local minimum rather than global minimum

❖ (4) Multiple minimizing solution points

• Need conditions on second derivatives to rule out

1 & 2, “global” methods/conditions to rule out 3 & 4

Page 43: Optimization Basics for Electric Power Markets

43

Local Max Rather Than Local Min

From A. Hallam, “Simple Multivariate Optimization” (on-line)

Page 44: Optimization Basics for Electric Power Markets

44

Inflection Rather than Min Point

From A. Hallam, “Simple Multivariate Optimization” (on-line)

Page 45: Optimization Basics for Electric Power Markets

45

Local Min Rather than Global Min:Both Satisfy the FONC df(x)/dx = 0

f(x)

xLocal Min Global Min

Page 46: Optimization Basics for Electric Power Markets

46

Multiple Minimization Points

From A. Hallam, “Simple Multivariate Optimization” (on-line)

Page 47: Optimization Basics for Electric Power Markets

47

Technical References

⚫ [1] Ross Baldick, Applied Optimization: Formulation and Algorithms for Engineering Systems, Cambridge University Press, 2006, 768 pp. paperback ed. (2009)

http://books.google.com/books/cambridge?id=zDldOMKgI00C

• [2] Stephen P. Bradley, Arnoldo C. Hax, and Thomas L. Magnanti , Applied Mathematical Programming, Addison-Wesley, 1977.

⚫ [3] Roger Fletcher, Practical Methods of Optimization, Second Edition, John Wiley & Sons, New York, c. 1987

⚫ [4] G. Sheble and J. McCalley, "Economic Dispatch Calculation" PowerLearn Module 3, Electric Power Engineering Education, 2000

http://www2.econ.iastate.edu/classes/econ458/tesfatsion/EconDispatc

hCalculation.GShebleJMcCalley1999.pdf