interior point methods for optimal power flow: linear

104
Interior Point Methods for Optimal Power Flow: Linear Algebra Goodies and Contingency Generation Andreas Grothey (joint work with Nai Yuan Chiang, Argonne National Lab) School of Mathematics, University of Edinburgh IMA Numerical Analysis 2014, 3-5 September, Birmingham T H E U N IV E R S I T Y O F E D I N B U R G H Andreas Grothey OPF contingency generation

Upload: others

Post on 11-Feb-2022

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods for Optimal Power Flow:Linear Algebra Goodies

and Contingency Generation

Andreas Grothey(joint work with Nai Yuan Chiang, Argonne National Lab)

School of Mathematics, University of Edinburgh

IMA Numerical Analysis 2014, 3-5 September, Birmingham

TH

E

U N I V E R S

I TY

OF

ED I N B U

RG

H

Andreas Grothey OPF contingency generation

Page 2: Interior Point Methods for Optimal Power Flow: Linear

USA August 2003

before 4.05pm

after 4.10pm

50 million peopledisconnected within 5 min

Andreas Grothey OPF contingency generation

Page 3: Interior Point Methods for Optimal Power Flow: Linear

US-Canada Power System Outage Task Force: “Interim Report: Causes of the August 14th Blackout in the

United States and Canada”, November 2003

Andreas Grothey OPF contingency generation

Page 4: Interior Point Methods for Optimal Power Flow: Linear

US-Canada Power System Outage Task Force: “Interim Report: Causes of the August 14th Blackout in the

United States and Canada”, November 2003

Andreas Grothey OPF contingency generation

Page 5: Interior Point Methods for Optimal Power Flow: Linear

Challenges for the Energy Industry

Power Systems operation faces new challenges

Competition/increasingly guided by market principles

Increasing integration of renewables (uncertainty)

Expansion of distributedgeneration/smart grid

Transmission capacity does not keepup, expansion is politicallycontentious.

⇒ Secure operation of networks becomes increasingly important!

Andreas Grothey OPF contingency generation

Page 6: Interior Point Methods for Optimal Power Flow: Linear

Challenges for the Energy Industry

Power Systems operation faces new challenges

Competition/increasingly guided by market principles

Increasing integration of renewables (uncertainty)

Expansion of distributedgeneration/smart grid

Transmission capacity does not keepup, expansion is politicallycontentious.

⇒ Secure operation of networks becomes increasingly important!

Power System operation needs to be designed robustly

Traditionally achieved by use of safety margins

Increasing need to take network contingencies into accountexplicitly

⇒ Security constrained Optimal Power FlowAndreas Grothey OPF contingency generation

Page 7: Interior Point Methods for Optimal Power Flow: Linear

Challenges for the Energy Industry

Power Systems operation faces new challenges

Competition/increasingly guided by market principles

Increasing integration of renewables (uncertainty)

Expansion of distributedgeneration/smart grid

Transmission capacity does not keepup, expansion is politicallycontentious.

⇒ Secure operation of networks becomes increasingly important!

Security Constrained Optimal Power Flow (SCOPF)

Important both in its own right and as a subproblem for

Unit Commitment

Transmission switching

etcAndreas Grothey OPF contingency generation

Page 8: Interior Point Methods for Optimal Power Flow: Linear

Overview

The ProblemPower systems 101Optimal Power Flow & Security constraintsAC OPF vs DC OPF

Linear Algebra GoodiesInterior Point MethodsCompact factorizationIterative methods & preconditioners

Contingency GenerationMotivationIPM, warmstarting & theoryResults

Andreas Grothey OPF contingency generation

Page 9: Interior Point Methods for Optimal Power Flow: Linear

Optimal Power Flow

Andreas Grothey OPF contingency generation

Page 10: Interior Point Methods for Optimal Power Flow: Linear

Security Constrained Optimal Power Flow

Optimal Power Flow (OPF)

Optimal Power Flow is the problem of deciding on (cost)optimal electricity generator outputs to meet demand withoutoverloading the transmission network

Solved at a given time for known demand

Andreas Grothey OPF contingency generation

Page 11: Interior Point Methods for Optimal Power Flow: Linear

Security Constrained Optimal Power Flow

Optimal Power Flow (OPF)

Optimal Power Flow is the problem of deciding on (cost)optimal electricity generator outputs to meet demand withoutoverloading the transmission network

Solved at a given time for known demand

Need to model all lines in the networkPower flows are AC: represented by complex flows (or real andreactive components)

⇒ nonlinear network constraints

Andreas Grothey OPF contingency generation

Page 12: Interior Point Methods for Optimal Power Flow: Linear

Security Constrained Optimal Power Flow

Optimal Power Flow (OPF)

Optimal Power Flow is the problem of deciding on (cost)optimal electricity generator outputs to meet demand withoutoverloading the transmission network

Solved at a given time for known demand

Need to model all lines in the networkPower flows are AC: represented by complex flows (or real andreactive components)

⇒ nonlinear network constraintsUnlike other transportationnetworks, operator has nocontrol over routing. Routingis determined by physics!

⇒ Kirchhoffs Laws.

Andreas Grothey OPF contingency generation

Page 13: Interior Point Methods for Optimal Power Flow: Linear

Power Systems Operation 101

Andreas Grothey OPF contingency generation

Page 14: Interior Point Methods for Optimal Power Flow: Linear

Power System Operation

Network

b ∈ B Buses

l = (bb′) ∈ L Lines

g ∈ G Generators (at bus og )

Power flows are AC. Described by real and reactive flows over lines,voltage and phase angle at buses

Variables

vb Voltage level at bus bδb Phase angle at bus bpbb′ , qbb′ Real and reactive power flow on line l = (bb′)pGg , qG

g Real and reactive power output at generator g

Andreas Grothey OPF contingency generation

Page 15: Interior Point Methods for Optimal Power Flow: Linear

Power System Operation

Network

b ∈ B Buses

l = (bb′) ∈ L Lines

g ∈ G Generators (at bus og )

Parameters of the model are: line/bus characteristics, real/reactivedemands, limits on power flow and voltages

Parameters

Gbb′ ,Bbb′ conductance and susceptance of line l(reciprocals of resistance and reactance)

Cb bus susceptancePD

b ,QDb real and reactive power demand at bus b

Andreas Grothey OPF contingency generation

Page 16: Interior Point Methods for Optimal Power Flow: Linear

Power System Operation

Operator decides on real generation level and voltages atgenerators.Power flows and reactive generation arrange themselves so asto satisfy power flow equations (Kirchhoff Laws)

Constraints

Kirchhoff Voltage Law (KVL)

pLbb′ = vb[Gbb′(vb − vb′ cos(δi − δj)) + Bbb′vb′ sin(δb − δb′)]

qLbb′ = vb[−Gbb′vb′ sin(δi − δj ) + Bbb′(vb′ cos(δb − δb′)− vb)]

Kirchhoff Current Law (KCL)∑

g |og =b

pGg − PD

b =∑

(b,b′)∈L

pbb′ , ∀b ∈ B,

g |og=b

qGg − QD

b =∑

(b,b′)∈L

qbb′ + Cbvb2, ∀b ∈ B

Andreas Grothey OPF contingency generation

Page 17: Interior Point Methods for Optimal Power Flow: Linear

Power System Operation

Operator decides on real generation level and voltages atgenerators.Power flows and reactive generation arrange themselves so asto satisfy power flow equations (Kirchhoff Laws)

Constraints

Kirchhoff Voltage Law (KVL)

pLbb′ = vb[Gbb′(vb − vb′ cos(δi − δj)) + Bbb′vb′ sin(δb − δb′)]

qLbb′ = vb[−Gbb′vb′ sin(δi − δj ) + Bbb′(vb′ cos(δb − δb′)− vb)]

Kirchhoff Current Law (KCL)∑

g |og =b

pGg − PD

b =∑

(b,b′)∈L

pbb′ , ∀b ∈ B,

g |og=b

qGg − QD

b =∑

(b,b′)∈L

qbb′ + Cbvb2, ∀b ∈ B

Note: pLbb′ 6= pL

b′b, qLbb′ 6= qL

b′b due to line losses!

Andreas Grothey OPF contingency generation

Page 18: Interior Point Methods for Optimal Power Flow: Linear

Power System Operation

Line flows and generator reactive output should satisfy

Operational Limits

Line Flow Limits at both ends of each line

(pbb′)2 + (qbb′)2 ≤ fl2, (pb′b)

2 + (qb′b)2 ≤ fl

2

Voltage limits at buses

V min ≤ vb ≤ V max

reactive generation limits at generators

Qming ≤ qG

g ≤ Qmaxg

Andreas Grothey OPF contingency generation

Page 19: Interior Point Methods for Optimal Power Flow: Linear

Power System Operation

The variables of the OPF model can be divided into control andstate variables

Control u (set by the system operator)pGg real power output at generators

vg voltage levels at generation busesState x (determined by Kirchhoff’s laws)vb voltage levels at non-generating busesqGg reactive power output at generators

δb phase anglespbb′ , qbb′ real and reactive power flows over lines

OPF model

minu∈U f (u)s.t. KL(u, x) = 0 (Kirchhoff’s laws)

g(x) ≤ 0 (Operational limits)

Andreas Grothey OPF contingency generation

Page 20: Interior Point Methods for Optimal Power Flow: Linear

Power System Operation

The variables of the OPF model can be divided into control andstate variables

Control u (set by the system operator)pGg real power output at generators

vg voltage levels at generation busesState x (determined by Kirchhoff’s laws)vb voltage levels at non-generating busesqGg reactive power output at generators

δb phase anglespbb′ , qbb′ real and reactive power flows over lines

OPF model

minu∈U f (u)s.t. KL(u, x) = 0 (Kirchhoff’s laws)

g(x) ≤ 0 (Operational limits)

Nonlinear! nonconvex! May have local solutions!

Andreas Grothey OPF contingency generation

Page 21: Interior Point Methods for Optimal Power Flow: Linear

Security Constrained Optimal Power Flow

Robustification of OPF

Things go wrong: Lines do fail

⇒ Security-constrained OPF (SCOPF)

Find a (cost optimal) generation schedule that is feasible withrespect to network limits (line flows, bus voltages) even if anyone line should fail (while meeting given demand)

Andreas Grothey OPF contingency generation

Page 22: Interior Point Methods for Optimal Power Flow: Linear

Security Constrained Optimal Power Flow

Robustification of OPF

Things go wrong: Lines do fail

⇒ Security-constrained OPF (SCOPF)

Find a (cost optimal) generation schedule that is feasible withrespect to network limits (line flows, bus voltages) even if anyone line should fail (while meeting given demand)

Contingency Scenarios

Typically consider all (single) line and bus (node) failures⇒ (n − 1) secure operation

Many operators require (n − 2). Becomes computationallyvery expensive!

Andreas Grothey OPF contingency generation

Page 23: Interior Point Methods for Optimal Power Flow: Linear

Security Constrained Optimal Power Flow

Robustification of OPF

Things go wrong: Lines do fail

⇒ Security-constrained OPF (SCOPF)

Find a (cost optimal) generation schedule that is feasible withrespect to network limits (line flows, bus voltages) even if anyone line should fail (while meeting given demand)

Two-Stage Setup (like Stochastic Programming)

First stage decides on generation levels for all generators

Second stage corresponds to contingency scenarios(evaluate consequences of line/bus failures)

Andreas Grothey OPF contingency generation

Page 24: Interior Point Methods for Optimal Power Flow: Linear

Security Constrained Optimal Power Flow

Robustification of OPF

Things go wrong: Lines do fail

⇒ Security-constrained OPF (SCOPF)

Find a (cost optimal) generation schedule that is feasible withrespect to network limits (line flows, bus voltages) even if anyone line should fail (while meeting given demand)

Two-Stage Setup (like Stochastic Programming)

First stage decides on generation levels for all generators

Second stage corresponds to contingency scenarios(evaluate consequences of line/bus failures)

Scenarios only evaluate feasibility of first stage decisions. Noobjective contribution! No recourse action!

Andreas Grothey OPF contingency generation

Page 25: Interior Point Methods for Optimal Power Flow: Linear

Security Constrained Optimal Power Flow

Robustification of OPF

Things go wrong: Lines do fail

⇒ Security-constrained OPF (SCOPF)

Find a (cost optimal) generation schedule that is feasible withrespect to network limits (line flows, bus voltages) even if anyone line should fail (while meeting given demand)

Two-Stage Setup (like Stochastic Programming)

First stage decides on generation levels for all generators

Second stage corresponds to contingency scenarios(evaluate consequences of line/bus failures)

Scenarios only evaluate feasibility of first stage decisions. Noobjective contribution! No recourse action!

Observation

Only a few contingency scenarios are needed/active to determinethe solution. How to find them?

Andreas Grothey OPF contingency generation

Page 26: Interior Point Methods for Optimal Power Flow: Linear

(n-1) secure OPF

In case of equipment (line/bus) failure, power flows will rearrangethemselves according to the power flow equations

Control variables u = (pGg , vg ) same for all contingencies,

Each contingency has its own set of state variables

xc = (vb,c , qGb,c , δb,c , pbb′,c , qbb′,c)

determined by Kirchhoff’s laws for the reduced network (KLc )

⇒ Seek a setting of control variables that does not lead toviolation of operational limits in any contingency

SCOPF model

minu∈U f (u)s.t. KLc(u, xc ) = 0 ∀c ∈ C

gc(xc ) ≤ 0 ∀c ∈ C

Andreas Grothey OPF contingency generation

Page 27: Interior Point Methods for Optimal Power Flow: Linear

Structure of SCOPF problem

SCOPF model

minu∈U f (u)s.t. KLc(u, xc ) = 0 ∀c ∈ C

gc(xc ) ≤ 0 ∀c ∈ C

Structure of Jacobian

∂KL1∂x1

∂KLc

∂u∂g1∂x1

0. . .

...∂KL|C|

∂x|C|

∂KL|C|

∂u∂g|C|∂x|C|

0

Andreas Grothey OPF contingency generation

Page 28: Interior Point Methods for Optimal Power Flow: Linear

Structure of SCOPF problem

SCOPF model

minu∈U f (u)s.t. KLc(u, xc ) = 0 ∀c ∈ C

gc(xc ) ≤ 0 ∀c ∈ C

Structure of Jacobian

∂KL1∂x1

∂KLc

∂u∂g1∂x1

0. . .

...∂KL|C|

∂x|C|

∂KL|C|

∂u∂g|C|∂x|C|

0

Bordered block-diagonal matrix.

Andreas Grothey OPF contingency generation

W1

W|C|

T1

T|C|

Page 29: Interior Point Methods for Optimal Power Flow: Linear

The DC OPF problem

The OPF model can simplified under the following assumptions:

Voltage level at all buses is the same: vb = 1, ∀b ∈ B.

The resistance of each line is small compared to reactance:⇒ |Bbb′ | ≫ |Gbb′ | ⇒ assume Gbb′ = 0.

Phase angle difference across each line is small⇒ sin(δ1 − δ2) ≈ δ1 − δ2, cos(δ1 − δ2) ≈ 1, ⇒ qL

bb′ = 0.

“DC”-OPF model

Kirchhoff Voltage Law

pLbb′ = −Bbb′(δb − δb′), ∀(bb′) ∈ L

Kirchhoff Current Law∑

g |og=b

pGg =

(b,b′)∈L

pL(b,b′) + PD

b , ∀b ∈ B

Line Flow Limits: −fl ≤ pLl ≤ fl , ∀l ∈ L

Andreas Grothey OPF contingency generation

Page 30: Interior Point Methods for Optimal Power Flow: Linear

The DC OPF problem

The OPF model can simplified under the following assumptions:

Voltage level at all buses is the same: vb = 1, ∀b ∈ B.

The resistance of each line is small compared to reactance:⇒ |Bbb′ | ≫ |Gbb′ | ⇒ assume Gbb′ = 0.

Phase angle difference across each line is small⇒ sin(δ1 − δ2) ≈ δ1 − δ2, cos(δ1 − δ2) ≈ 1, ⇒ qL

bb′ = 0.

“DC”-OPF model

Kirchhoff Voltage Law

pLbb′ = −Bbb′(δb − δb′), ∀(bb′) ∈ L

Kirchhoff Current Law∑

g |og=b

pGg =

(b,b′)∈L

pL(b,b′) + PD

b , ∀b ∈ B

Line Flow Limits: −fl ≤ pLl ≤ fl , ∀l ∈ L

⇒ DC OPF is a linear programming problem

Andreas Grothey OPF contingency generation

Page 31: Interior Point Methods for Optimal Power Flow: Linear

Structure of DC OPF problem

the DC-OPF problem can be written as

DC-OPF

min c⊤pG

s.t. R · pL +A⊤ · δ = 0A · pL −J · pG = −PD

where

bus/generator incidence matrix J ∈ IR |B|×|G|

node/arc incidence matrix A ∈ IR |B|×|L|

R = diag(1/B1, . . . , 1/B|L|)

Andreas Grothey OPF contingency generation

Page 32: Interior Point Methods for Optimal Power Flow: Linear

Structure of DC OPF problem

the DC-OPF problem can be written as

DC-OPF

min c⊤pG

s.t. R · pL +A⊤ · δ = 0A · pL −J · pG = −PD

where

bus/generator incidence matrix J ∈ IR |B|×|G|

node/arc incidence matrix A ∈ IR |B|×|L|

R = diag(1/B1, . . . , 1/B|L|)

Augmented system like structure!

Andreas Grothey OPF contingency generation

Page 33: Interior Point Methods for Optimal Power Flow: Linear

Structure of (n-1) secure DC OPF

SCOPF (DC version)

minpG ,pL,δ

c⊤pG

s.t. RpL1 +A⊤

1 δ1 = 0A1p

L1 −JpG = PD

. . .... =

...RpG

|C| +A⊤|C|δ|C| = 0

A|C|pG|C| −JpG = PD

Andreas Grothey OPF contingency generation

Page 34: Interior Point Methods for Optimal Power Flow: Linear

Structure of (n-1) secure DC OPF

SCOPF (DC version)

minpG ,pL,δ

c⊤pG

s.t. RpL1 +A⊤

1 δ1 = 0A1p

L1 −JpG = PD

. . .... =

...RpG

|C| +A⊤|C|δ|C| = 0

A|C|pG|C| −JpG = PD

Bordered block-diagonal matrix.

Andreas Grothey OPF contingency generation

W1

W|C|

T1

T|C|

Page 35: Interior Point Methods for Optimal Power Flow: Linear

whistle stop tour of

Interior Point Methods

Andreas Grothey OPF contingency generation

Page 36: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods (for LP)

Linear Program

min c⊤x s.t. Ax = bx ≥ 0

(LP)

KKT Conditions

c − A⊤λ− s = 0Ax = b

XSe = 0x , s ≥ 0

(KKT)

X = diag(x), S = diag(s)

Andreas Grothey OPF contingency generation

Page 37: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods (for LP)

Barrier Problem

min c⊤x − µ∑

ln xi s.t. Ax = bx ≥ 0

(LPµ)

KKT Conditions

c − A⊤λ− s = 0Ax = b

XSe = µex , s ≥ 0

(KKTµ)

Introduce logarithmic barriers for x ≥ 0

Andreas Grothey OPF contingency generation

Page 38: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods (for LP)

Barrier Problem

min c⊤x − µ∑

ln xi s.t. Ax = bx ≥ 0

(LPµ)

KKT Conditions

c − A⊤λ− s = 0Ax = b

XSe = µex , s ≥ 0

(KKTµ)

Introduce logarithmic barriers for x ≥ 0

(LPµ) is strictly convex

System (KKTµ) can be solved per Newton-Method

Andreas Grothey OPF contingency generation

Page 39: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods (for LP)

Barrier Problem

min c⊤x − µ∑

ln xi s.t. Ax = bx ≥ 0

(LPµ)

KKT Conditions

c − A⊤λ− s = 0Ax = b

XSe = µex , s ≥ 0

(KKTµ)

Introduce logarithmic barriers for x ≥ 0

(LPµ) is strictly convex

System (KKTµ) can be solved per Newton-Method

For µ→ 0 solution of (LPµ) converges to solution of (LP)

Andreas Grothey OPF contingency generation

Page 40: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods (for LP)

KKT conditions

c − A⊤λ− s = 0Ax = b

XSe = µex , s ≥ 0

(KKTµ)

Andreas Grothey OPF contingency generation

Page 41: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods (for LP)

KKT conditions

c − A⊤λ− s = 0Ax = b

XSe = µex , s ≥ 0

(KKTµ)

Newton-Step

0 A⊤ IA 0 0S 0 X

∆x∆λ∆s

=

ξc

ξb

rxs

:=

c − A⊤λ− sb − Axµ+e − XSe

Andreas Grothey OPF contingency generation

Page 42: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods (for LP)

KKT conditions

c − A⊤λ− s = 0Ax = b

XSe = µex , s ≥ 0

(KKTµ)

Newton-Step

0 A⊤ IA 0 0S 0 X

∆x∆λ∆s

=

ξc

ξb

rxs

:=

c − A⊤λ− sb − Axµ+e − XSe

Newton Step (reduced)[−Θ A⊤

A 0

] [∆x∆y

]=

[ξc − X−1rxsξb

]

where Θ = X−1S , X = diag(x), S = diag(s)

Andreas Grothey OPF contingency generation

Page 43: Interior Point Methods for Optimal Power Flow: Linear

Solving NLP by Interior Point Method

NLP

min f (x) s.t. g(x) ≤ 0 (NLP )

Andreas Grothey OPF contingency generation

Page 44: Interior Point Methods for Optimal Power Flow: Linear

Solving NLP by Interior Point Method

NLP

min f (x)− µ∑

ln zi s.t. g(x) + z = 0z ≥ 0

(NLPµ)

Andreas Grothey OPF contingency generation

Page 45: Interior Point Methods for Optimal Power Flow: Linear

Solving NLP by Interior Point Method

NLP

min f (x)− µ∑

ln zi s.t. g(x) + z = 0z ≥ 0

(NLP )

Optimality conditions

∇f (x)− A(x)⊤y = 0g(x) + z = 0

XZe = µex , z ≥ 0

Newton Step[Q(x , y) A(x)⊤

A(x) −Θ

] [∆x∆y

]=

[∇− f (x)− A(x)⊤y−g(x)− µY−1e

]

whereQ(x , y) = ∇2

xx(f (x) + y⊤g(x)), A(x) = ∇g(x)

Θ = X−1Z , X = diag(x), Z = diag(z)

Andreas Grothey OPF contingency generation

Page 46: Interior Point Methods for Optimal Power Flow: Linear

Linear Algebra of IPMs

Main work: solve[−Q −Θ A⊤

A 0

]

︸ ︷︷ ︸

Φ (QP)

[∆x∆y

]=

[rh

]or

[−Q(x , y) A(x)⊤

A(x) Θ

]

︸ ︷︷ ︸

Φ (NLP)

[∆x∆y

]=

[rh

]

for several right-hand-sides at each iteration

Two stage solution procedure

factorize Φ = LDL⊤

backsolve(s) to compute direction (∆x ,∆y) + corrections

⇒ Φ changes numerically but not structurally at each iteration

Key to efficient implementation is exploiting structure of Φ inthese two steps

Andreas Grothey OPF contingency generation

Page 47: Interior Point Methods for Optimal Power Flow: Linear

Structure of matrices A and Q for SCOPF:

Matrix A Matrix Q

W1

W2

W|C|

T1

T2

T|C|

Q1

Q2

Q|C|

Q0

Andreas Grothey OPF contingency generation

Page 48: Interior Point Methods for Optimal Power Flow: Linear

Structures of A and Q imply structure of Φ:

Q1

Q2

Q|C|

Q0

W⊤1

W⊤2

W⊤|C|

T⊤1 T⊤

2 T⊤|C|

W1

W2

W|C|

T1

T2

T|C|

Q1

Q2

Q|C|

Q0

W1

W2

W|C|

T1

T2

T|C|

W⊤1

W⊤2

W⊤|C|

T⊤1 T⊤

2T⊤|C|

(Q A⊤

A 0

)P

(Q A⊤

A 0

)P−1

Andreas Grothey OPF contingency generation

Page 49: Interior Point Methods for Optimal Power Flow: Linear

Structures of A and Q imply structure of Φ:

Q1

Q2

Q|C|

Q0

W⊤1

W⊤2

W⊤|C|

T⊤1 T⊤

2 T⊤|C|

W1

W2

W|C|

T1

T2

T|C|

Φ0

Φ1

Φ2

. . .

Φ|C|

B⊤1

B⊤2

...

B⊤|C|

B1 B2 · · · B|C|

(Q A⊤

A 0

)P

(Q A⊤

A 0

)P−1

Bordered block-diagonal structure in Augmented System!

Andreas Grothey OPF contingency generation

Page 50: Interior Point Methods for Optimal Power Flow: Linear

OOPS: Object Oriented Parallel Solver

OOPS

OOPS is an IPM implementation, that can exploit (nested)block structures through object oriented linear algebra

Solved (multistage) stochastic programming problems fromportfolio management with over 109 variables(≈ 2h on 1280 processors)

Dua

l Blo

ck A

ngul

ar S

truc

ture

Prim

al B

lock

Ang

ular

Str

uctu

re

Prim

al B

lock

Ang

ular

Str

uctu

re

D30

C31A

D1 D2

D D1211 D10 B B11 12 D D D D B B B21 22 23 20 21 22 23

C32

Andreas Grothey OPF contingency generation

Page 51: Interior Point Methods for Optimal Power Flow: Linear

Exploiting Structure in IPM

Block-Factorization of Augmented System Matrix0

B

B

B

@

Φ1 B⊤1

. . ....

Φn B⊤n

B1 · · · Bn Φ0

1

C

C

C

A

| {z }

Φ

0

B

B

B

@

x1

...xn

x0

1

C

C

C

A

| {z }

x

=

0

B

B

B

@

b1

...bn

b0

1

C

C

C

A

| {z }

b

Solution of Block-system by Schur-complement

The solution to Φx = b is

x0 = C−1b0, b0 = b0 −∑

i BiΦ−1i bi

xi = Φ−1i (bi − B⊤

i x0), i = 1, . . . , n

where C is the Schur-complement

C = Φ0 −n∑

i=1

BiΦ−1i B⊤

i

⇒ only need to factor Φi , not Φ

Andreas Grothey OPF contingency generation

Page 52: Interior Point Methods for Optimal Power Flow: Linear

Exploiting Structure in IPM

Solution of Block-system by Schur-complement

The solution to Φx = b is

x0 = C−1b0, b0 = b0 −∑

i BiΦ−1i bi

xi = Φ−1i (bi − B⊤

i x0), i = 1, . . . , n

where C is the Schur-complement

C = Φ0 −n∑

i=1

BiΦ−1i B⊤

i

Bottlenecks in this process are

Factorization of the Φi

Assembling∑n

i=1 BiΦ−1i B⊤

i

Andreas Grothey OPF contingency generation

Page 53: Interior Point Methods for Optimal Power Flow: Linear

Structure of Augmented System Matrix

Bottlenecks in this process are

Factorization of the Φi , Assembling∑n

i=1 BiΦ−1i B⊤

i

Φ =

Φ1 B⊤1

Φ2 B⊤2

. . ....

Φn B⊤n

B1 B2 · · · Bn Φ0

, Φi =

[X−1

i Si W Ti

Wi 0

]

For DC-OPF

Wi =

[R AT

i

Ai 0

], B⊤

i =

[0J

],

whereJ ∈ IR |Bi |×|Gi |: bus-generator incidence matrixAi ∈ IR |Bi |×|Li |: node-arc incidence matrix for contingency iR = diag(−V 2/B1, . . . ,V

2/B|L|): resistances > 0Andreas Grothey OPF contingency generation

Page 54: Interior Point Methods for Optimal Power Flow: Linear

Block-Factorization for DC-OPF

Structure of Φi for DC-OPF

Φi =

[X−1

i Si W Ti

Wi 0

], Wi =

[R AT

i

Ai 0

], B⊤

i =

[0J

],

Solve Φix = b:

Wi is invertible and constant throughout IPM iterations

To solve Φix = b only need to factorize Wi :[

X−1i Si W⊤

i

Wi 0

] [x(0)

x(1)

]=

[b(0)

b(1)

]

⇒ x(1) = W−1i b(1), x(0) = XiS

−1i (b(0) −W⊤

i x(1))

To build BiΦ−1i B⊤

i

BiΦ−1i B⊤

i = −J⊤W−⊤i XiS

−1i W−1

i J

= −ViX−1i SiV

⊤i , V⊤

i = W−1i J

Andreas Grothey OPF contingency generation

Page 55: Interior Point Methods for Optimal Power Flow: Linear

Exploiting Structure in IPM

Solution of block-system by Schur-complement

The solution to Φx = b is

x0 = C−1b0, b0 = b0 −∑

i BiΦ−1i bi

C = Φ0 +n∑

i=1

ViX−1i SiV

⊤i , V⊤

i = W−1i J

Forming ViX−1i SiV

Ti and factorizing C is (still) expensive

Andreas Grothey OPF contingency generation

Page 56: Interior Point Methods for Optimal Power Flow: Linear

Exploiting Structure in IPM

Solution of block-system by Schur-complement

The solution to Φx = b is

x0 = C−1b0, b0 = b0 −∑

i BiΦ−1i bi

C = Φ0 +n∑

i=1

ViX−1i SiV

⊤i , V⊤

i = W−1i J

Forming ViX−1i SiV

Ti and factorizing C is (still) expensive

⇒ Solve Cx0 = b0 by iterative method

Use (preconditioned) iterative method (e.g. PCG/GMRES)

⇒ Evaluating matrix-vector products C · x is cheap:

C · x = Φ0x +∑

J⊤W−⊤i X−1

i SiW−1i Jx

Multiplication with J is trivial: J is 0-1 matrix.Wi has been factorized

Andreas Grothey OPF contingency generation

Page 57: Interior Point Methods for Optimal Power Flow: Linear

Possible preconditioners

Single (base) contingency (Qiu, Flueck ’05)

M = Φ0 + nV0X−10 S0V

⊤0

Sample Average Approximation (Anitescu, Petra ’12)

M = Φ0 +n

|S|∑

i∈S

ViX−1i SiV

⊤i

where S = random selection of contingency scenarios

Active Contingencies (Chiang, G. ’13)

M = Φ0 +∑

i∈A

ViX−1i SiV

⊤i

where A = set of contingencies considered active

Andreas Grothey OPF contingency generation

Page 58: Interior Point Methods for Optimal Power Flow: Linear

Active Contingency Preconditioner

Active Contingencies (Chiang, G. ’13)

M = Φ0 +∑

i∈A

ViX−1i SiV

⊤i

where A = set of contingencies considered active.

Based on the observation

ViX−1i SiV

⊤i

Vi = J⊤W−⊤i constant

X = diag(x), x = vector of slacks

⇒ Large contribution X−1i Si ≡ small slack xi ≡ active

contingency

⇒ Concentrate on active contingencies.

Andreas Grothey OPF contingency generation

Page 59: Interior Point Methods for Optimal Power Flow: Linear

Active Contingency Preconditioner

Active Contingencies (Chiang, G. ’13)

M = Φ0 +∑

i∈A

ViX−1i SiV

⊤i

where A = set of contingencies considered active.

Based on the observation

ViX−1i SiV

⊤i

Vi = J⊤W−⊤i constant

X = diag(x), x = vector of slacks

⇒ Large contribution X−1i Si ≡ small slack xi ≡ active

contingency

⇒ Concentrate on active contingencies.

Which contingencies should be considered active?

Andreas Grothey OPF contingency generation

Page 60: Interior Point Methods for Optimal Power Flow: Linear

Active Contingency Preconditioner: Theoretical Result

Convergence speed of an iterative scheme withsystem matrix C and preconditioner M,

is determined by the distribution of eigenvalues of

M−1C

Aim: All close to unity

Small numbers of clusters

Theorem

For a given δ > 0 let A consist of all contingencies i for which anyxi ,j < 1/δ. Then all eigenvalues λi of M−1C satisfy

|λi (M−1C )− 1| = O(δ)

Related to Active Set Preconditioners (Forsgren, Gill, Griffin ’07)

Andreas Grothey OPF contingency generation

Page 61: Interior Point Methods for Optimal Power Flow: Linear

Test Problem

Buses Gen Cont Variables Constraints Nonzeros3 4 2 17 14 35

26 5 40 2,630 2,626 7,92956 7 79 10,648 10,642 31,060

118 54 177 53,811 53,758 172,019300 69 322 229,077 229,009 683,542

iceland 35 72 28,725 28,691 77,059100 25 180 50,344 50,320 165,649200 50 370 210,779 210,730 701,249300 75 565 488,534 488,460 1,635,824400 100 760 881,339 881,240 2,960,399500 125 955 1,389,194 1,389,070 4,674,974

Andreas Grothey OPF contingency generation

Page 62: Interior Point Methods for Optimal Power Flow: Linear

Results

Results for Active Contingency preconditioner:

#Bus #Scenarios Time(s) Iters |A|3 3 <0.1 8 2

26 41 0.27 13 256 80 1.26 15 6

118 178 6.68 13 7300 323 24.83 13 12

iceland 73 3.12 13 5100 181 9.09 20 7200 371 50.63 28 9300 566 205.79 39 20400 761 523.65 55 20500 956 823.95 46 25

Base case preconditioner only works for smallest two problems

Andreas Grothey OPF contingency generation

Page 63: Interior Point Methods for Optimal Power Flow: Linear

Results

Default Direct Iterativebuses time(s) memory time(s) memory time(s) memory

3 <0.1 5.2MB <0.1 5.2MB <0.01 5.2MB26 0.21 7.6MB 0.17 7.5MB 0.27 7.4MB56 1.00 14.3MB 0.77 14.1MB 1.26 13.5MB

118 6.88 49MB 6.69 64MB 6.88300 31.79 198MB 30.42 282MB 24.83

iceland 2.28 25MB 2.36 30MB 3.12100 9.02 54.6MB 6.16 53.1MB 9.09 43.6MB200 65.97 220MB 45.23 244MB 50.63 163MB300 251.70 531MB 177.39 667MB 205.79 387MB400 955.32 985MB 655.50 1380MB 523.65 715MB500 1552.80 1593MB 1195.77 2467MB 823.95 1163MB

Andreas Grothey OPF contingency generation

Page 64: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation

Andreas Grothey OPF contingency generation

Page 65: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation

Andreas Grothey OPF contingency generation

Page 66: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation

“n-1”- (or even “n-2”-security) requires the inclusion of manycontingency scenarios.

Pan-European system has 13000 nodes and 20000 lines

⇒ Resulting SCOPF model would have ≈ 1010 variables.

Only a few contingencies are critical for operation of thesystem (but which ones)?

Contingency Generation

Generate contingency scenarios dynamically when needed

Andreas Grothey OPF contingency generation

Page 67: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation

Prototype Algorithm:

Set up the model with a few base contingency scenariosSolve model to obtain optimal controls u∗

k

repeat

Check for violated contingency scenarios.Add violated scenarios to the modelRe-solve model to obtain new controls u∗

k+1.until no more violated contingencies

Andreas Grothey OPF contingency generation

Page 68: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation

Prototype Algorithm:

Set up the model with a few base contingency scenariosSolve model to obtain optimal controls u∗

k

repeat

Check for violated contingency scenarios.Add violated scenarios to the modelRe-solve model to obtain new controls u∗

k+1.until no more violated contingencies

Can we do this with Interior Point Methods?

Interior Point Methods are efficient for large scale (AC)OPF.

IPMs are bad at resolving a modified problem instance(warmstarting)

⇒ attempt to dynamically add contingencies into the partiallysolved OPF.

Andreas Grothey OPF contingency generation

Page 69: Interior Point Methods for Optimal Power Flow: Linear

Warmstarting Interior Point Methods

Aim: Use information from solution process of

min c⊤x s.t. Ax = bx ≥ 0

(LP)

to construct a starting point for (nearby problem)

min c⊤x s.t. Ax = bx ≥ 0

(LP)

where A ≈ A, b ≈ b, c ≈ c

It is not a good idea to use the solution of (LP) to start (LP).

Unlike for the Simplex/Active Set Method!

Andreas Grothey OPF contingency generation

Page 70: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods (for NLP)

Nonlinear Problem

min f (x) s.t. g(x) = 0x ≥ 0

(NLP)

KKT Conditions

∇c(x)−∇g(x)⊤λ− s = 0g(x) = 0XSe = 0x , s ≥ 0

(KKTµ)

Introduce logarithmic barriers for x ≥ 0

System (KKTµ) can be solved per Newton-Method

For µ→ 0 solution of (NLPµ) converges to solution of (NLP)

Andreas Grothey OPF contingency generation

Page 71: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods (for NLP)

Barrier Problem

min f (x)− µ∑

ln xi s.t. g(x) = 0x ≥ 0

(NLPµ)

KKT Conditions

∇c(x)−∇g(x)⊤λ− s = 0g(x) = 0XSe = µex , s ≥ 0

(KKTµ)

Introduce logarithmic barriers for x ≥ 0

System (KKTµ) can be solved per Newton-Method

For µ→ 0 solution of (NLPµ) converges to solution of (NLP)

Andreas Grothey OPF contingency generation

Page 72: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Methods (for NLP)

KKT conditions

∇c(x)−∇g(x)⊤λ− s = 0g(x) = 0XSe = µex , s ≥ 0

(KKTµ)

Central Path

The set of all solutions to (KKTµ) for all µ > 0.Central Path joins the analytical center (for µ=∞)with the NLP solution (for µ = 0).

Neighbourhood of the central path (as used by IPOPT)

N (κ) := {(x , λ, s) : Eµ(x , λ, s) ≤ κµ}where

Eµ(x , λ, s) := max

{‖∇f (x)−∇g(x)λ− s‖sd

, ‖g(x)‖, ‖XS − µe‖sc

}

Andreas Grothey OPF contingency generation

Page 73: Interior Point Methods for Optimal Power Flow: Linear

Path Following Methods (for NLP)

choose x0, λ0, s0 > 0, µ0 = x⊤0 s0/n, k = 0

Outer iteration

update µ:

µ+ = σx⊤+ s+

n, 0 < σ < 1, k ← k + 1

Inner iteration

compute Newton step (∆x , ∆s, ∆λ) for (KKTµ) and given µk .

Do line search with merit function or filter to computestepsizes and take step in Newton direction

until

Eµk(xk , λk , sk) ≤ κµk

Andreas Grothey OPF contingency generation

Page 74: Interior Point Methods for Optimal Power Flow: Linear

Why?

Hippolito (1993): Search direction is parallel to nearby constraints

Original Problem

Modified Problem

Andreas Grothey OPF contingency generation

Page 75: Interior Point Methods for Optimal Power Flow: Linear

Why?

Hippolito (1993): Search direction is parallel to nearby constraints

Modified Problem

Original Problem

⇒ only small step in search direction can be taken

Andreas Grothey OPF contingency generation

Page 76: Interior Point Methods for Optimal Power Flow: Linear

Warmstarting Heuristics

Idea: Start close to the (new) central path, not close to the (old) solution

Modified Problem

Original Problem

⇒ Start from a previous iterate and do additional modification step.

Ok, as long as change to problem is small (compared to µ)

Andreas Grothey OPF contingency generation

Page 77: Interior Point Methods for Optimal Power Flow: Linear

Interior Point Warmstarts: Theoretical Results

A typical warmstart results is (Assume A = A):

Lemma (based on Gondzio/G. ’03)

Let (x , λ, s) ∈ N−∞(γ0) for problem (LP) then a full modification

step (∆x ,∆λ,∆s) in the perturbed problem (LP) is feasible and

(x + ∆x , λ + ∆λ, s + ∆s) ∈ N−∞(γ)

provided that

δbc ≤√

γ0 − γ

2B2∞

γ0µ3/2

⇒“small δbc , large µ”

where δbc := ‖c − AT y − s‖2 + ‖AT (AAT )−1(b − Ax)‖2:= Pc−AT y−s(s) + Pb−Ax(x)

is the orthogonal distance of the warmstart point from primal-dual

feasibility in the perturbed problem

Andreas Grothey OPF contingency generation

Page 78: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation

Prototype Algorithm:

Set up the model with a few base scenariosSolve model to obtain optimal controls u∗

0 .repeat

Check for violated contingency scenarios.Add violated scenarios to the modelRe-solve model to obtain new controls u∗

k+1.until no more violated contingencies

Andreas Grothey OPF contingency generation

Page 79: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation

Prototype Algorithm:

Set up the model with a few base scenarios.Solve model to obtain controls u∗

0 .repeat

Check for violated contingency scenarios.

Add violated scenarios to the model.

Re-solve model to obtain new controls u∗

k+1.until no more violated contingencies

Andreas Grothey OPF contingency generation

Page 80: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation

Prototype Algorithm:

Set up the model with a few base scenarios. µ0 = µ, k = 0.Solve model to obtain µ0-center. ⇒ controls uµ0 .repeat

Check for violated contingency scenarios.

Add violated scenarios to the model.

Choose µk+1 : 0 < µk+1 < µk , k ← k + 1Warmstart and iterate to find µk -center. ⇒ controls uµk

.until no more violated contingencies

Andreas Grothey OPF contingency generation

Page 81: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation

Prototype Algorithm:

Set up the model with a few base scenarios. µ0 = µ, k = 0.Solve model to obtain µ0-center. ⇒ controls uµ0 .repeat

Check for violated contingency scenarios.for all violated scenarios do

Set up single scenario problem with u = uµkand solve for

µk -centerend for

Add violated scenarios to the model.Patch together warmstart point for expanded problem.Choose µk+1 : 0 < µk+1 < µk , k ← k + 1Warmstart and iterate to find µk -center. ⇒ controls uµk

.until no more violated contingencies

Andreas Grothey OPF contingency generation

Page 82: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation

Prototype Algorithm:

Set up the model with a few base scenarios. µ0 = µ, k = 0.Solve model to obtain µ0-center. ⇒ controls uµ0 .repeat

Check for violated contingency scenarios.for all violated scenarios do

Set up single scenario problem with u = uµkand solve for

µk -centerend for

Add violated scenarios to the model.Patch together warmstart point for expanded problem.Choose µk+1 : 0 < µk+1 < µk , k ← k + 1Warmstart and iterate to find µk -center. ⇒ controls uµk

.until no more violated contingencies

Claim

We can ensure that the assembled warmstart point is in theneighbourhood N (κ)⇒ IPM convergence not negatively affected (warmstart successful)

Andreas Grothey OPF contingency generation

Page 83: Interior Point Methods for Optimal Power Flow: Linear

Derivation of Algorithm

IPM applied to SCOPF model

minu,xc ,sc f (u)− µ∑

c∈C

∑i ln sc,i

s.t. KLc(u, xc ) = 0 ∀c ∈ Cgc (xc) + sc = 0 ∀c ∈ C

Partially decompose: C = C0 ∪ C0

minu,xc ,sc

f (u)− µ∑

c∈C0

∑i ln sc,i +

∑c∈C0

Vc,µ(u)

s.t. KLc(u, xc) = 0 ∀c ∈ C0gc(xc) + sc = 0 ∀c ∈ C0

where

Vc,µ(u) = minxc ,sc

−µ∑

i ln sc,i

s.t. KLc(u, xc) = 0gc(xc ) + sc = 0

∀c ∈ C0

Andreas Grothey OPF contingency generation

Page 84: Interior Point Methods for Optimal Power Flow: Linear

Active/Inactive contingencies

KKT conditions for contingency problem (Vc,µ(u))

primal feasibilityKLc(u, xc)=0gc(xc) + sc=0

dual feasibility∇xKLc (u, xc)

⊤λc +∇gc(xc)⊤νc=0

centralitysc,iνc,i =µesc , νc ≥0

Andreas Grothey OPF contingency generation

Page 85: Interior Point Methods for Optimal Power Flow: Linear

Active/Inactive contingencies

KKT conditions for contingency problem (Vc,µ(u))

primal feasibilityKLc(u, xc)=0gc(xc) + sc=0

dual feasibility∇xKLc (u, xc)

⊤λc +∇gc(xc)⊤νc=0

centralitysc,iνc,i =µesc , νc ≥0

sc,iνc,i = µ⇒ νc,i = µ/sc,i

if contingency c is never active then sc,i → s∗c,i > 0 and thus

‖νc‖ = O(µ)→ 0⇒ ‖λc‖ = O(µ)→ 0

Andreas Grothey OPF contingency generation

Page 86: Interior Point Methods for Optimal Power Flow: Linear

Active/Inactive contingencies

KKT conditions for contingency problem (Vc,µ(u))

primal feasibilityKLc(u, xc)=0gc(xc) + sc=0

dual feasibility∇xKLc (u, xc)

⊤λc +∇gc(xc)⊤νc=0

centralitysc,iνc,i =µesc , νc ≥0

sc,iνc,i = µ⇒ νc,i = µ/sc,i

if contingency c is never active then sc,i → s∗c,i > 0 and thus

‖νc‖ = O(µ)→ 0⇒ ‖λc‖ = O(µ)→ 0

if contingency is active at solution then

‖νc‖ → ‖ν∗c ‖ > 0⇒ ‖λc‖ → ‖λ∗

c‖ > 0

Andreas Grothey OPF contingency generation

Page 87: Interior Point Methods for Optimal Power Flow: Linear

Combined point is in neighbourhood N (κ)

Neighbourhood of the Central Path

N (κ) := {(x , λ, s) : Eµ(x , λ, s) ≤ κµ}where

Eµ(x , λ, s) := max

‖∇f (x)−∇g(x)λ− s‖∞︸ ︷︷ ︸

dual feasibility

, ‖g(x)‖∞︸ ︷︷ ︸primal feasibility

, ‖XS − µe‖∞︸ ︷︷ ︸centrality

Andreas Grothey OPF contingency generation

Page 88: Interior Point Methods for Optimal Power Flow: Linear

Combined point is in neighbourhood N (κ)

Neighbourhood of the Central Path

N (κ) := {(x , λ, s) : Eµ(x , λ, s) ≤ κµ}where

Eµ(x , λ, s) := max

‖∇f (x)−∇g(x)λ− s‖∞︸ ︷︷ ︸

dual feasibility

, ‖g(x)‖∞︸ ︷︷ ︸primal feasibility

, ‖XS − µe‖∞︸ ︷︷ ︸centrality

Central Path conditions for SCOPF problem

primal feasibilityKLc(u, xc) =0gc(xc) + sc =0

dual feasibility∇f (u)−∑

c∇uKLc(u, xc )⊤λc =0

∇xKLc (u, xc)⊤λc +∇gc(xc)

⊤νc =0

centralitysc,iνc,i =µesc , νc ≥0

Andreas Grothey OPF contingency generation

Page 89: Interior Point Methods for Optimal Power Flow: Linear

Combined point is in neighbourhood N (κ)

Neighbourhood of the Central Path

N (κ) := {(x , λ, s) : Eµ(x , λ, s) ≤ κµ}where

Eµ(x , λ, s) := max

‖∇f (x)−∇g(x)λ− s‖∞︸ ︷︷ ︸

dual feasibility

, ‖g(x)‖∞︸ ︷︷ ︸primal feasibility

, ‖XS − µe‖∞︸ ︷︷ ︸centrality

Central Path conditions for SCOPF problem

primal feasibilityKLc(u, xc) =0gc(xc) + sc =0

dual feasibility∇f (u)−∑

c∇uKLc(u, xc )⊤λc =0

∇xKLc (u, xc)⊤λc +∇gc(xc)

⊤νc =0

centralitysc,iνc,i =µesc , νc ≥0

Satisfied within κµ by construction

Andreas Grothey OPF contingency generation

Page 90: Interior Point Methods for Optimal Power Flow: Linear

Combined point is in neighbourhood N (κ)

Neighbourhood of the Central Path

N (κ) := {(x , λ, s) : Eµ(x , λ, s) ≤ κµ}where

Eµ(x , λ, s) := max

‖∇f (x)−∇g(x)λ− s‖∞︸ ︷︷ ︸

dual feasibility

, ‖g(x)‖∞︸ ︷︷ ︸primal feasibility

, ‖XS − µe‖∞︸ ︷︷ ︸centrality

Central Path conditions for SCOPF problem

primal feasibilityKLc(u, xc) =0gc(xc) + sc =0

dual feasibility∇f (u)−∑

c∇uKLc(u, xc )⊤λc =0

∇xKLc (u, xc)⊤λc +∇gc(xc)

⊤νc =0

centralitysc,iνc,i =µesc , νc ≥0

Residual is ∇uKLc (u, xc)⊤λc for added contingency

Andreas Grothey OPF contingency generation

Page 91: Interior Point Methods for Optimal Power Flow: Linear

Combined point is in neighbourhood N (κ)

Neighbourhood of the Central Path

N (κ) := {(x , λ, s) : Eµ(x , λ, s) ≤ κµ}where

Eµ(x , λ, s) := max

‖∇f (x)−∇g(x)λ− s‖∞︸ ︷︷ ︸

dual feasibility

, ‖g(x)‖∞︸ ︷︷ ︸primal feasibility

, ‖XS − µe‖∞︸ ︷︷ ︸centrality

Central Path conditions for SCOPF problem

primal feasibilityKLc(u, xc) =0gc(xc) + sc =0

dual feasibility∇f (u)−∑

c∇uKLc(u, xc )⊤λc =0

∇xKLc (u, xc)⊤λc +∇gc(xc)

⊤νc =0

centralitysc,iνc,i =µesc , νc ≥0

Residual is ∇uKLc (u, xc)⊤λc for added contingency

⇒ ok, if added while λc is small (compared to µk)

Andreas Grothey OPF contingency generation

Page 92: Interior Point Methods for Optimal Power Flow: Linear

Statement of Algorithm

Choose initial contingency set C0 ⊂ C. Choose µ0

repeat

Do IPM iteration in the master problem to get approximatesolution uk to (PC0,µk ).

For all c ∈ C0 solve Vc,µk (uk) approximately to get skc , λk

c

if ‖λkc ‖ > 1

2κµk for any c then

set C0 ← C0 ∪ {c}.take combined solution of (PC0,µk ) and (Vc,µk (uk)) asstarting point for next IPM iteration

end if

µk+1 = σµk

until convergence in master problem

Andreas Grothey OPF contingency generation

Page 93: Interior Point Methods for Optimal Power Flow: Linear

Statement of Algorithm

Choose initial contingency set C0 ⊂ C. Choose µ0

repeat

Do IPM iteration in the master problem to get approximatesolution uk to (PC0,µk ).

For all c ∈ C0 solve Vc,µk (uk) approximately to get skc , λk

c

if ‖λkc ‖ > 1

2κµk for any c then

set C0 ← C0 ∪ {c}.take combined solution of (PC0,µk ) and (Vc,µk (uk)) asstarting point for next IPM iteration

end if

µk+1 = σµk

until convergence in master problem

Approximate means a point in the neighbourhood N (κ)

Andreas Grothey OPF contingency generation

Page 94: Interior Point Methods for Optimal Power Flow: Linear

Statement of Algorithm

Choose initial contingency set C0 ⊂ C. Choose µ0

repeat

Do IPM iteration in the master problem to get approximatesolution uk to (PC0,µk ).

For all c ∈ C0 solve Vc,µk (uk) approximately to get skc , λk

c

if ‖λkc ‖ > 1

2κµk for any c then

set C0 ← C0 ∪ {c}.take combined solution of (PC0,µk ) and (Vc,µk (uk)) asstarting point for next IPM iteration

end if

µk+1 = σµk

until convergence in master problem

Again a point in the neighbourhood N (κ). Usually only needs asingle iteration in (Vc,µk (uk)) starting from the previous iterate.

Andreas Grothey OPF contingency generation

Page 95: Interior Point Methods for Optimal Power Flow: Linear

Statement of Algorithm

Choose initial contingency set C0 ⊂ C. Choose µ0

repeat

Do IPM iteration in the master problem to get approximatesolution uk to (PC0,µk ).

For all c ∈ C0 solve Vc,µk (uk) approximately to get skc , λk

c

if ‖λkc ‖ > 1

2κµk for any c then

set C0 ← C0 ∪ {c}.take combined solution of (PC0,µk ) and (Vc,µk (uk)) asstarting point for next IPM iteration

end if

µk+1 = σµk

until convergence in master problem

The combined point is still in the N (κ) neighbourhood.⇒ successful warmstart of enlarged problem.

Andreas Grothey OPF contingency generation

Page 96: Interior Point Methods for Optimal Power Flow: Linear

Regarding Convergence & Efficiency of Algorithm

Issues

warmstart is always successful(i.e. the patched point is in the N (κ) neighbourhood

Andreas Grothey OPF contingency generation

Page 97: Interior Point Methods for Optimal Power Flow: Linear

Regarding Convergence & Efficiency of Algorithm

Issues

warmstart is always successful(i.e. the patched point is in the N (κ) neighbourhood

All active contingencies will be included eventually

since for active contingencies λc → λ∗c >

1

2κµ→ 0

Andreas Grothey OPF contingency generation

Page 98: Interior Point Methods for Optimal Power Flow: Linear

Regarding Convergence & Efficiency of Algorithm

Issues

warmstart is always successful(i.e. the patched point is in the N (κ) neighbourhood

All active contingencies will be included eventually

since for active contingencies λc → λ∗c >

1

2κµ→ 0

Contingency subproblems can be solved efficientlyContingency subproblem is just equation solving ⇒ only asingle (usually) Newton step needed. ⇒ FDLF

Andreas Grothey OPF contingency generation

Page 99: Interior Point Methods for Optimal Power Flow: Linear

Regarding Convergence & Efficiency of Algorithm

Issues

warmstart is always successful(i.e. the patched point is in the N (κ) neighbourhood

All active contingencies will be included eventually

since for active contingencies λc → λ∗c >

1

2κµ→ 0

Contingency subproblems can be solved efficientlyContingency subproblem is just equation solving ⇒ only asingle (usually) Newton step needed. ⇒ FDLFOnly a very small fraction of contingencies needed

only check for contingencies periodically.pre-screen and discard contingencies which are likely to neverbe active:Contingency Screening:Ejebe, Irisarri, Mokhtari (1995), Vaahedi, Fuchs, Xu, Mansour

(1999), Capitanescu, Wehenkel (2007, 2008), Dent, Ochoa,

Harrison, Bialek (2010)

Andreas Grothey OPF contingency generation

Page 100: Interior Point Methods for Optimal Power Flow: Linear

Contingency Generation: Results

Default Contingency Generation

Prob Sce time(s) iters time(s) iters ActS

6bus 2 <0.1 13 <0.1 13 2IEEE 24 38 5.7 41 3.9 30 6IEEE 48 78 52.3 71 32.3 52 15IEEE 73 117 204.1 97 156.7 92 25IEEE 96 158 351.5 106 252.9 76 27IEEE 118 178 - >200 1225 75 46IEEE 192 318 2393 132 1586 92 40

This is for the (nonlinear) (n − 1) AC-SCOPF problem

Work in progress: currently scans all (inactive) scenarios atevery iteration.

Andreas Grothey OPF contingency generation

Page 101: Interior Point Methods for Optimal Power Flow: Linear

Conclusions & Outlook

Conclusions:“Active Contingencies” preconditioner is effective

Only a few contingency scenarios are active at the solution⇒ Contingency generation

Contingencies can be added throughout IPM iterationswithout leaving ’safe’ neighbourhood.

Andreas Grothey OPF contingency generation

Page 102: Interior Point Methods for Optimal Power Flow: Linear

Conclusions & Outlook

Conclusions:“Active Contingencies” preconditioner is effective

Only a few contingency scenarios are active at the solution⇒ Contingency generation

Contingencies can be added throughout IPM iterationswithout leaving ’safe’ neighbourhood.

Extension:Much further scope for efficiency gains (contingencyscreening, efficient load flow solver for subproblems)

Transmission constraints and security planning will becomeincreasingly important in future with decentralised andintermittent generation.

Many operational and planning models in power systems (unitcommitment, transmission switching/islanding) should takecontingency constraints into account but currently do not(due to algorithmic complexity).

Andreas Grothey OPF contingency generation

Page 103: Interior Point Methods for Optimal Power Flow: Linear

Thank You!

Andreas Grothey OPF contingency generation

Page 104: Interior Point Methods for Optimal Power Flow: Linear

Bibliography

M. Colombo, A. Grothey: A decomposition-based warm-startmethod for stochastic programming, ComputationalOptimization and Applications, Volume 55, Issue 2 (2013),Page 311-340.

N.-Y. Chiang, A. Grothey: Solving Security ConstrainedOptimal Power Flow Problems by a Structure ExploitingInterior Point Method. Optimization and Engineering,published online February 2014.

N.-Y. Chiang: Structure-Exploiting Interior Point Methods forSecurity Constrained Optimal Power Flow Problems, PhDThesis, University of Edinburgh (2013).

http://www.maths.ed.ac.uk/ERGO/preprints.html

Andreas Grothey OPF contingency generation