optimal power flow (dc-opf and ac-opf) · 8 dtu electrical engineering optimal power flow (dc-opf...

55
Optimal Power Flow (DC-OPF and AC-OPF) DTU Summer School 2017 Spyros Chatzivasileiadis

Upload: hoangtram

Post on 19-Jul-2018

233 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Optimal Power Flow (DC-OPF and AC-OPF)

DTU Summer School 2017

Spyros Chatzivasileiadis

Page 2: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

What is optimal power flow?

2 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 3: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Optimal Power Flow (OPF)• In its most realistic form, the OPF is a non-linear, non-convex problem,which includes both binary and continuous variables.

• Goal: minimize an objective function, respecting all physical, operational,and technical constraints, such as:

• Ohm’s law and Kirchhoff laws• Operational limits of generators• Loading limits of transmission lines• Voltage levels• and many, many others

• Disclaimer:

• Realistic OPF implementations include thousands of variables andconstraints

• Here we focus on the most“fundamental” formulations of OPF• These can be extended with several additional constraints toaccurately model the problem and/or system at hand

3 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 4: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Use of OPF in the industry

• RTE, France: they invented the OPF! (Carpentier,1962)

• Their focus is mostly on the optimization of thesystem operation and not so much on markets

• They are working on the application of convexrelaxations of OPF on their system (see DanMolzahn’s talk!)

• CAISO, California, USA

• Electricity markets: An OPF runs every day(Day-Ahead), every hour, every 15 minutes, andevery 5 minutes.

• Depending on the problem they run a DC-OPFwith unit commitment, a standard DC-OPF, orjust Economic Dispatch

4 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 5: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Use of OPF in the industry

• PJM, East Coast, USA

• Security-Constrained Economic Dispatch every 5 minutes• final test phase of optimal voltage control every 5 minutes (they useAC-OPF as well)

• EUPHEMIA

• one common algorithm to calculate electricity prices across Europe, andallocate cross border capacity on a day-ahead basis

• 19 European countries, over 150 million EUR in matched trades daily

• PLEXOS

• June 2000: PLEXOS was first-to-market with electric power marketsimulation based entirely on mathematical programming

• Features: generation capacity expansion planning, transmission expansionplanning, hydro-thermal coordination, ancillary services

5 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 6: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Summarizing• DC-OPF

• market clearing uses DC-OPF (at the moment)• convex• can solve fast; can be applied in very large problems

• AC-OPF

• primarily used for optimization of operation and control actions• non-convex (in its original form)• continuous efforts to decrease computation time and increase systemsize

• Trends

• Incorporating uncertainty• Decomposition (and other) methods to solve very large problems• Guarantees for a global minimum (convex relaxations)• Market design• Coupled energy networks and markets, e.g. gas and electricity

6 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 7: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Outline

• Economic Dispatch

• DC-OPF

• AC-OPF

7 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 8: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Outline• Economic Dispatch

• used in power exchanges, e.g. EPEX, etc.• Supply must meet demand• Generator limits

• DC-OPF

• extends Economic Dispatch• considers the power flows! (in a linearized form)• includes the power flow limits of the lines• only active power; no losses

• AC-OPF

• full AC power flow equations• active and reactive power flow• current, voltage• losses

8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 9: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Outline• Economic Dispatch

• used in power exchanges, e.g. EPEX, etc.• Supply must meet demand• Generator limits

• DC-OPF

• extends Economic Dispatch• considers the power flows! (in a linearized form)• includes the power flow limits of the lines• only active power; no losses

• AC-OPF

• full AC power flow equations• active and reactive power flow• current, voltage• losses

8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 10: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Outline• Economic Dispatch

• used in power exchanges, e.g. EPEX, etc.• Supply must meet demand• Generator limits

• DC-OPF

• extends Economic Dispatch• considers the power flows! (in a linearized form)• includes the power flow limits of the lines• only active power; no losses

• AC-OPF

• full AC power flow equations• active and reactive power flow• current, voltage• losses

8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 11: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Economic Dispatch

min∑i

ciPGi

subject to:

PminGi

≤ PGi≤ Pmax

Gi∑i

PGi= PD

• The Economic Dispatch does not consider any network flows or networkconstraints!

• We assume a copperplate network, i.e. a lossless and unrestricted flow ofelectricity from A to B.

9 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 12: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Economic Dispatch

min∑i

ciPGi

subject to:

PminGi

≤ PGi≤ Pmax

Gi∑i

PGi= PD

• The Economic Dispatch does not consider any network flows or networkconstraints!

• We assume a copperplate network, i.e. a lossless and unrestricted flow ofelectricity from A to B.

9 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 13: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Economic Dispatch

min∑i

ciPGi

subject to:

PminGi

≤ PGi≤ Pmax

Gi∑i

PGi= PD

• The Economic Dispatch does not consider any network flows or networkconstraints!

• We assume a copperplate network, i.e. a lossless and unrestricted flow ofelectricity from A to B.

9 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 14: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Can we solve the economic dispatch problem without using anoptimization solver?

Yes! With the help of the merit order curve.

10 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 15: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Can we solve the economic dispatch problem without using anoptimization solver?

Yes! With the help of the merit order curve.

10 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 16: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

The Merit-Order Curve

0 A B C D

cG1

cG2

cG3

cG4

price

power

PD

A = PmaxG1

B = A+ PmaxG2

C = B + PmaxG3

D = C + PmaxG4

11 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 17: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

The Merit-Order Curve

0 A B C D

cG1

cG2

cG3

cG4

price

powerPD

A = PmaxG1

B = A+ PmaxG2

C = B + PmaxG3

D = C + PmaxG4

11 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 18: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

The Merit-Order Curve

0 A B C D

cG1

cG2

cG3

cG4

price

powerPD

• cG3 is the systemmarginal price

• Gens G1 and G2are fullydispatched

• Gen G4 is notdispatched at all

• Gen G3 is partiallydispatched

• G3 is the“marginalgenerator”

12 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 19: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

The Merit-Order Curve: An Example

Merit-Order of the German conventional generation in 2008. Source:Forschungsstelle fur Energiewirtschaft e. V.

13 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 20: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Merit-Order Curve, Marginal Generators,and Line Congestion

0 A B C D

cG1

cG2

cG3

cG4

price

powerPD

• Although G3 hasenough capacity,it cannot produceenough to coverthe demand dueto line congestion

• Instead G4, amore expensivegen that does notcontribute to theline congestion,must produce themissing power

• In a DC-OPF context, there is no longer a single system marginal price(we will observe different nodal prices in different nodes)

14 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 21: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

DC-OPF

min∑i

ciPGi

subject to:PminGi

≤ PGi≤ Pmax

Gi

B · θ = PG −PD

1

xij

(θi − θj) ≤ Pij,max

• The DC-OPF with the standard power flow equations contains both thepower generation PG and the voltage angles θ in the vector of theoptimization variables.

15 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 22: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

DC-OPF

min∑i

ciPGi

subject to:PminGi

≤ PGi≤ Pmax

Gi

B · θ = PG −PD

1

xij

(θi − θj) ≤ Pij,max

• The DC-OPF with the standard power flow equations contains both thepower generation PG and the voltage angles θ in the vector of theoptimization variables.

15 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 23: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

DC-OPF

min∑i

ciPGi

subject to:PminGi

≤ PGi≤ Pmax

Gi

B · θ = PG −PD

1

xij

(θi − θj) ≤ Pij,max

• The DC-OPF with the standard power flow equations contains both thepower generation PG and the voltage angles θ in the vector of theoptimization variables.

15 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 24: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Exercise

1 2

3

cG1 = 60 $/MWh, cG2 = 120 $/MWh

Pload = 150 MW

PmaxG1 = 100 MW, Pmax

G2 = 200 MW

X12 = 0.1 pu, X13 = 0.3 pu, X23 = 0.1pu, BaseMVA = 100 MVA

Pmax13 = 40 MW (line limit)

1 What are the optimization variables? Formthe optimization vector

2 Formulate the objective function

3 Formulate the constraints

16 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 25: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

DC-OPF in Matlab

How would you transfer yourproblem formulation to Matlab?

17 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 26: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Discussion Points• sin δ ≈ δ

• δ is in rad!

• B · θ = P

• B is in p.u.• θ is in rad, ⇒ dimensionless• P must be in p.u.

• Bus Admittance Matrix B in DC-OPF

• bij =1xij

⇒ positive

• all off-diagonal elements are non-positive (zero or negative)• all diagonal elements are positive• AC-OPF: This differs from the case where zij = rij + jxij . In thatcase, it is yij = gij + jbij with bij is negative.

• If the DC-OPF does not converge, check that the admittance matrix B iscorrect!

18 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 27: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Discussion Points• sin δ ≈ δ

• δ is in rad!

• B · θ = P

• B is in p.u.• θ is in rad, ⇒ dimensionless• P must be in p.u.

• Bus Admittance Matrix B in DC-OPF

• bij =1xij

⇒ positive

• all off-diagonal elements are non-positive (zero or negative)• all diagonal elements are positive• AC-OPF: This differs from the case where zij = rij + jxij . In thatcase, it is yij = gij + jbij with bij is negative.

• If the DC-OPF does not converge, check that the admittance matrix B iscorrect!

18 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 28: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Discussion Points• sin δ ≈ δ

• δ is in rad!

• B · θ = P

• B is in p.u.• θ is in rad, ⇒ dimensionless• P must be in p.u.

• Bus Admittance Matrix B in DC-OPF

• bij =1xij

⇒ positive

• all off-diagonal elements are non-positive (zero or negative)• all diagonal elements are positive• AC-OPF: This differs from the case where zij = rij + jxij . In thatcase, it is yij = gij + jbij with bij is negative.

• If the DC-OPF does not converge, check that the admittance matrix B iscorrect!

18 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 29: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Discussion Points• sin δ ≈ δ

• δ is in rad!

• B · θ = P

• B is in p.u.• θ is in rad, ⇒ dimensionless• P must be in p.u.

• Bus Admittance Matrix B in DC-OPF

• bij =1xij

⇒ positive

• all off-diagonal elements are non-positive (zero or negative)• all diagonal elements are positive• AC-OPF: This differs from the case where zij = rij + jxij . In thatcase, it is yij = gij + jbij with bij is negative.

• If the DC-OPF does not converge, check that the admittance matrix B iscorrect!

18 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 30: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

4-slide “break”

DC-OPF: linear program = convex

AC-OPF: non-linear non-convex problem in its original form⇒ recent efforts to convexify the problem

Why?

19 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 31: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Convex vs. Non-convex Problem

Convex Problem Non-convex problem

x

Cost f(x)

x

Costf(x)

One global minimum Several local minima

20 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 32: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Several local minima: So what?

Example: Optimal Power Flow Problem• Assume that the difference in thecost function of a local minimumversus a global minimum is 5%

• The total electric energy cost inthe US is ≈ 400 Billion$/year

• 5% amounts to 20 billion US$ ineconomic losses per year

• Even 1% difference is huge

• Convex problems guarantee thatwe find a global minimum ⇒convexify the OPF problem

x

Costf(x)

21 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 33: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Convexifying the Optimal Power Flow problem(OPF)

• Convex relaxations transform theOPF to a convex Semi-DefiniteProgram (SDP)

• Under certain conditions, theobtained solution is the globaloptimum to the original OPFproblem1

x

Costf(x)

Convex Relaxation

1Javad Lavaei and Steven H Low. “Zero duality gap in optimal power flow problem”. In:IEEE Transactions on Power Systems 27.1 (2012), pp. 92–10722 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 34: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Convexifying the Optimal Power Flow problem(OPF)

• Convex relaxations transform theOPF to a convex Semi-DefiniteProgram (SDP)

• Under certain conditions, theobtained solution is the globaloptimum to the original OPFproblem1

x

Costf(x)

f(x)

Convex Relaxation

1Javad Lavaei and Steven H Low. “Zero duality gap in optimal power flow problem”. In:IEEE Transactions on Power Systems 27.1 (2012), pp. 92–10722 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 35: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Convexifying the Optimal Power Flow problem(OPF)

• Convex relaxations transform theOPF to a convex Semi-DefiniteProgram (SDP)

• Under certain conditions, theobtained solution is the globaloptimum to the original OPFproblem1 x

Costf(x)

f(x)

Convex Relaxation

1Javad Lavaei and Steven H Low. “Zero duality gap in optimal power flow problem”. In:IEEE Transactions on Power Systems 27.1 (2012), pp. 92–10722 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 36: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Break is over... More in Dan Molzahn’s lecture tomorrow!

23 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 37: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

AC-OPF• Minimize

Costs, Line Losses, other?

• subject to:

AC Power Flow equations

Line Flow Constraints

Generator Active Power Limits

Generator Reactive Power Limits

Voltage Magnitude Limits

(Voltage Angle limits to improve solvability)

(maybe other equipment constraints)

Line Current Limits

Apparent Power Flow limits

Active Power Flow limits

• Optimization vector: [P Q V θ]T

24 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 38: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

AC-OPF• Minimize

Costs, Line Losses, other?

• subject to:

AC Power Flow equations

Line Flow Constraints

Generator Active Power Limits

Generator Reactive Power Limits

Voltage Magnitude Limits

(Voltage Angle limits to improve solvability)

(maybe other equipment constraints)

Line Current Limits

Apparent Power Flow limits

Active Power Flow limits

• Optimization vector: [P Q V θ]T

24 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 39: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

AC-OPF• Minimize

Costs, Line Losses, other?

• subject to:

AC Power Flow equations

Line Flow Constraints

Generator Active Power Limits

Generator Reactive Power Limits

Voltage Magnitude Limits

(Voltage Angle limits to improve solvability)

(maybe other equipment constraints)

Line Current Limits

Apparent Power Flow limits

Active Power Flow limits

• Optimization vector: [P Q V θ]T

24 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 40: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

AC-OPF• Minimize

Costs, Line Losses, other?

• subject to:

AC Power Flow equations

Line Flow Constraints

Generator Active Power Limits

Generator Reactive Power Limits

Voltage Magnitude Limits

(Voltage Angle limits to improve solvability)

(maybe other equipment constraints)

Line Current Limits

Apparent Power Flow limits

Active Power Flow limits

• Optimization vector: [P Q V θ]T

24 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 41: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

AC-OPF2

obj.function min cTPG

AC flow SG − SL = diag(V )Y∗busV

Line Current |Y line,i→jV | ≤ Iline,max

|Y line,j→iV | ≤ Iline,max

or Apparent Flow |V iY∗line,i→j,i-rowV

∗| ≤ Si→j,max

|V jY∗line,j→i,j-rowV

∗| ≤ Sj→i,max

Gen. Active Power 0 ≤ PG ≤ PG,max

Gen. Reactive Power −QG,max ≤ QG ≤ QG,max

Voltage Magnitude Vmin ≤ V ≤ Vmax

Voltage Magnitude Vmin ≤ V ≤ Vmax

Voltage Angle θmin ≤ θ ≤ θmax

2All shown variables are vectors or matrices. The bar above a variable denotes complexnumbers. (·)∗ denotes the complex conjugate. To simplify notation, the bar denoting a complexnumber is dropped in the following slides. Attention! The current flow constraints are defined asvectors, i.e. for all lines. The apparent power line constraints are defined per line.25 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 42: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Current flow along a line

Vi Vj

Rij + jXij

jBij

2

jBij

2

π-model of the line

It is:

yij =1

Rij + jXij

ysh,i = jBij

2+ other shunt

elements connected to that bus

i → j : Ii→j = ysh,iVi + yij(Vi − Vj) ⇒ Ii→j =[ysh,i + yij −yij

] [Vi

Vj

]

j → i : Ij→i = ysh,jVj + yij(Vj − Vi) ⇒ Ij→i =[−yij ysh,j + yij

] [Vi

Vj

]

26 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 43: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Current flow along a line

Vi Vj

Rij + jXij

jBij

2

jBij

2

π-model of the line

It is:

yij =1

Rij + jXij

ysh,i = jBij

2+ other shunt

elements connected to that bus

i → j : Ii→j = ysh,iVi + yij(Vi − Vj) ⇒ Ii→j =[ysh,i + yij −yij

] [Vi

Vj

]

j → i : Ij→i = ysh,jVj + yij(Vj − Vi) ⇒ Ij→i =[−yij ysh,j + yij

] [Vi

Vj

]

26 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 44: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Current flow along a line

Vi Vj

Rij + jXij

jBij

2

jBij

2

π-model of the line

It is:

yij =1

Rij + jXij

ysh,i = jBij

2+ other shunt

elements connected to that bus

i → j : Ii→j = ysh,iVi + yij(Vi − Vj) ⇒ Ii→j =[ysh,i + yij −yij

] [Vi

Vj

]

j → i : Ij→i = ysh,jVj + yij(Vj − Vi) ⇒ Ij→i =[−yij ysh,j + yij

] [Vi

Vj

]26 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 45: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Line Admittance Matrix Yline

• Yline is an L×N matrix, where L is the number of lines and N is thenumber of nodes

• if row k corresponds to line i− j:

• Yline,ki = ysh,i + yij• Yline,kj = −yij

• yij =1

Rij + jXijis the admittance of line ij

• ysh,i is the shunt capacitance jBij/2 of the π-model of the line

• We must create two Yline matrices. One for i → j and one for j → i

27 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 46: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Bus Admittance Matrix Ybus

Si = ViI∗i

Ii =∑k

Iik,where k are all the buses connected to bus i

Example: Assume there is a line between nodes i−m, and i− n. It is:

Ii = Iim + Iin

= (yi→msh,i + yim)Vi − yimVm + (yi→n

sh,i + yin)Vi − yinVn

= (yi→msh,i + yim + yi→n

sh,i + yin)Vi − yimVm − yinVn

Ii = [ysh,im + yim + ysh,in + yin︸ ︷︷ ︸Ybus,ii

−yim︸ ︷︷ ︸Ybus,im

−yin︸︷︷︸Ybus,in

][Vi Vm Vn]T

28 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 47: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Bus Admittance Matrix Ybus

• Ybus is an N ×N matrix, where N is the number of nodes

• diagonal elements: Ybus,ii = ysh,i +∑

k yik, where k are all the busesconnected to bus i

• off-diagonal elements:

• Ybus,ij = −yij if nodes i and j are connected by a line3

• Ybus,ij = 0 if nodes i and j are not connected

• yij =1

Rij + jXijis the admittance of line ij

• ysh,i are all shunt elements connected to bus i, including the shuntcapacitance of the π-model of the line

3If there are more than one lines connecting the same nodes, then they must all be added toYbus,ij , Ybus,ii, Ybus,jj .29 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 48: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

AC Power Flow Equations

Si = ViI∗i

= ViY∗busV

For all buses S = [S1 . . . SN ]T :

Sgen − Sload = diag(V )Y ∗busV

30 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 49: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

From AC to DC Power Flow Equations• The power flow along a line is:

Sij = ViI∗ij = Vi(y

∗sh,iV

∗i + y∗ij(V

∗i − V ∗

j ))

• Assume a negligible shunt conductance: gsh,ij = 0 ⇒ ysh,i = jbsh,i.

• Given that R << X in transmission systems, for the DC power flow we

assume that zij = rij + jxij ≈ jxij . Then yij = −j1

xij.

• Assume: Vi = Vi∠0 and Vj = Vj∠δ, with δ = θj − θi.

I∗ij =− jbsh,iVi + j1

xij

(Vi − (Vj cos δ − jVj sin δ))

=− jbsh,iVi + j1

xij

Vi − j1

xij

Vj cos δ −1

xij

Vj sin δ

31 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 50: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

From AC to DC Power Flow Equations (cont.)

• Since Vi is a real number, it is:

Pij =ℜ{Sij} = Viℜ{I∗ij} = − 1

xij

ViVj sin δ

• With δ = θj − θi, it is:

Pij =1

xij

ViVj sin(θi − θj)

• We further make the assumptions that:

• Vi, Vj are constant and equal to 1 p.u.• sin θ ≈ θ, θ must be in rad

Then

Pij =1

xij

(θi − θj)

32 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 51: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Some additional points...

• Nodal prices

In a market context, the nodal prices are:• the lagrangian multipliers of the equality constraints Bθ = P• of a DC-OPF (at the moment)• with objective function the minimization of costs

• Power Transfer Distribution Factors (PTDFs)

• PTDFs are linear sensitivies that relate the line flows to the powerinjections

• the DC-OPF can be formulated with respect to PTDFs• PTDFs eliminate the need of θ as optimization variable• In the zonal pricing in Europe PTDFs are used to model the flowsbetween the zones

33 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 52: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Some additional points...

• Nodal prices

In a market context, the nodal prices are:• the lagrangian multipliers of the equality constraints Bθ = P• of a DC-OPF (at the moment)• with objective function the minimization of costs

• Power Transfer Distribution Factors (PTDFs)

• PTDFs are linear sensitivies that relate the line flows to the powerinjections

• the DC-OPF can be formulated with respect to PTDFs• PTDFs eliminate the need of θ as optimization variable• In the zonal pricing in Europe PTDFs are used to model the flowsbetween the zones

33 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 53: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

AC-OPF

• Resources about AC-OPF from the US Federal Energy RegulatoryCommission (FERC)

https://www.ferc.gov/industries/electric/indus-act/

market-planning/opf-papers.asp

• Overview paper on Economic Dispatch and DC-OPF:

R.D. Christie, B. F. Wollenberg, I. Wangesteen, TransmissionManagement in the Deregulated Environment, Proceedings of the IEEE,vol. 88, no. 2, February 2000

34 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 54: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Wrap-up

DC-OPF AC-OPF

• market clearing uses DC-OPF (atthe moment)

• convex

• can solve fast; can be applied invery large problems

but

• only active power flow

• no losses and no voltage levels

DC approximations more suitablefor transmission systems

• primarily used for optimization ofoperation and control actions

• full AC power flow equations

but

• non-convex (in its original form) →no guarantee that we find theglobal optimum

• computationally expensive andpossibly intractable for very largesystems

efforts to decrease computationtime and increase system size

35 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017

Page 55: Optimal Power Flow (DC-OPF and AC-OPF) · 8 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017. Outline Economic Dispatch ... DC-OPF in Matlab How would

Thank you!

[email protected]

36 DTU Electrical Engineering Optimal Power Flow (DC-OPF and AC-OPF) Jun 12, 2017