80
Introduction to convex relaxations of AC-OPF Semidefinite Programming and OPF DTU Summer School 2018 Spyros Chatzivasileiadis

Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Introduction to convex relaxations of AC-OPF

Semidefinite Programming and OPF

DTU Summer School 2018

Spyros Chatzivasileiadis

Page 2: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

The Goals for this Lecture!

•Why convex relaxations and SDP?

• Semidefinite Programming (SDP)

• Convex Relaxations for AC-OPF

2 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 3: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

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: IEEETransactions on Power Systems 27.1 (2012), pp. 92–1073 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 4: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Outline of Lecture

• Motivation: Convex vs. Non-Convex Problem and SDP

•What is SDP?

• Numerical Example

•What is a Positive Semidefinite Matrix?

• SDP vs. LP

• Convex Relaxations for AC-OPF

4 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 5: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Semidefinite Programming

Semidefinite programming (SDP) is the most exciting development inthe mathematical programming in the 1990’s 2

• Between 2008-2012 we had the first formulations (and breakthroughs) fora convexified AC-OPF problem.

2Robert M. Freund, Introduction to Mathematical Programming, MIT Lecture Notes, 20095 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 6: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

What is Semidefinite Programming? (SDP)

• SDP is the “generalized” form of an LP (linear program)

Linear Programming Semidefinite Programming

min cT · x

subject to:

ai · x = bi, i = 1, . . . ,m

x ≥0, x ∈ Rn

minC •X :=∑i

∑j

CijXij

subject to:

Ai •X = bi, i = 1, . . . ,m

X �0

• LP: Optimization variables in the form of a vector x.

• SDP: Optim. variables in the form of a positive semidefinite matrix X.

Positive Semidefinite Matrix??Ignore it for now. We will come back to it in a few slides.

6 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 7: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

What is Semidefinite Programming? (SDP)

• SDP is the “generalized” form of an LP (linear program)

Linear Programming Semidefinite Programming

min cT · x

subject to:

ai · x = bi, i = 1, . . . ,m

x ≥0, x ∈ Rn

minC •X :=∑i

∑j

CijXij

subject to:

Ai •X = bi, i = 1, . . . ,m

X �0

• LP: Optimization variables in the form of a vector x.

• SDP: Optim. variables in the form of a positive semidefinite matrix X.

Positive Semidefinite Matrix??Ignore it for now. We will come back to it in a few slides.

6 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 8: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

C •X :=∑

i

∑j CijXij – What’s that?

C •X : “sum of elementwise multiplication”

min[c11 c12

c21 c22

]•[X11 X12

X21 X22

] min

C •X :=∑i

∑j

CijXij

subject to:[A111 A112

A121 A122

]•[X11 X12

X21 X22

]= b1[

A211 A212

A221 A222

]•[X11 X12

X21 X22

]= b2

subject to:

Ai •X = bi, i = 1, . . . ,m

[X11 X12

X21 X22

]�0 X �0

7 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 9: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

C •X :=∑

i

∑j CijXij – What’s that?

C •X : “sum of elementwise multiplication”

min[c11 c12

c21 c22

]•[X11 X12

X21 X22

]subject to:[A111 A112

A121 A122

]•[X11 X12

X21 X22

]= b1[

A211 A212

A221 A222

]•[X11 X12

X21 X22

]= b2[

X11 X12

X21 X22

]�0

min

c11X11 + c12X12 + c21X21 + c22X22

subject to:

A111X11 + A112X12 + A121X21 + A122X22 = b1

A211X11 + A212X12 + A221X21 + A222X22 = b2[X11 X12

X21 X22

]� 0

8 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 10: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

SDP vs LP

Semidefinite Programming Linear ProgramLP → Optim. variables in vector:X = [X11 X12 X21 X22]T

min

c11X11 + c12X12 + c21X21 + c22X22

subject to:

A111X11 + A112X12 + A121X21 + A122X22 = b1

A211X11 + A212X12 + A221X21 + A222X22 = b2[X11 X12

X21 X22

]� 0

min cT ·X

subject to:

A1 ·X = b1

A2 ·X = b2

X11 ≥ 0, X12 ≥ 0,

X21 ≥ 0, X22 ≥ 0

• SDP looks very much like a LP!

• Only difference: instead of each element of X to be positive, X must bea positive semidefinite matrix!

9 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 11: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Numerical Example

• Assume X is a 3× 3 matrix.

A1 =

1 0 11 3 71 7 5

A2 =

0 2 82 6 08 0 4

C =

1 2 32 9 03 0 7

b1 = 11 b2 = 19

Formulate the optimization problems w.r.t. to the elements of matrixX, i.e. linear equations w.r.t. X11, X12, etc.

Answer in p.6 of R. Freund, Introduction to Semidefinite Programming, MIT Lecture Notes, 2009.https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/

6-251j-introduction-to-mathematical-programming-fall-2009/readings/MIT6_251JF09_

SDP.pdf

10 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 12: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Numerical Example

• Assume X is a 3× 3 matrix.

A1 =

1 0 11 3 71 7 5

A2 =

0 2 82 6 08 0 4

C =

1 2 32 9 03 0 7

b1 = 11 b2 = 19

Formulate the optimization problems w.r.t. to the elements of matrixX, i.e. linear equations w.r.t. X11, X12, etc.

Answer in p.6 of R. Freund, Introduction to Semidefinite Programming, MIT Lecture Notes, 2009.https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/

6-251j-introduction-to-mathematical-programming-fall-2009/readings/MIT6_251JF09_

SDP.pdf

10 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 13: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Outline of Lecture

• Motivation: Convex vs. Non-Convex Problem and SDP

•What is SDP?

• Numerical Example

•What is a Positive Semidefinite Matrix?

• SDP vs. LP

• Convex Relaxations for AC-OPF

11 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 14: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

What is a Positive Semidefinite Matrix P?

• P must be symmetric

P is a positive semidefinite matrix iff:

• xTPx ≥ 0, for any non-zero vector x

or

• eig(P ) ≥ 0 for all eigenvalues of P

or

• all leading principal minors are non-negative

12 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 15: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

What are Principal Minors?

Principal minors are the determinants of submatrices of P . To obtain a principal minor of order k,

you delete the same n− k rows and n− k columns. The leading principal minor of order k is the

minor of order k obtained by deleting the last n− k rows and columns3

P =

[p11 p12

p21 p22

]⇒ 1st order: p11, p22 2nd order:

∣∣∣∣p11 p12

p21 p22

∣∣∣∣

P =

p11 p12 p13

p21 p22 p23

p31 p32 p33

⇒1st order: p11, p22, p33

2nd order:∣∣∣∣p22 p23

p32 p33

∣∣∣∣ ∣∣∣∣p11 p13

p31 p33

∣∣∣∣ ∣∣∣∣p11 p12

p21 p22

∣∣∣∣3rd order:

∣∣∣∣∣∣p11 p12 p13

p21 p22 p23

p31 p32 p33

∣∣∣∣∣∣3In bold are the leading principal minors. You can find helpful info here:

http://www.dr-eriksen.no/teaching/GRA6035/2010/lecture5.pdf.13 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 16: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Outline of Lecture

• Motivation: Convex vs. Non-Convex Problem and SDP

•What is SDP?

• Numerical Example

•What is a Positive Semidefinite Matrix?

• SDP vs. LP

• Convex Relaxations for AC-OPF

14 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 17: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

SDP vs LP

Does it make such a difference if we optimize over a positivesemidefinite X instead of having all individual elements of this matrix

positive?

Yes!

15 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 18: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

SDP vs LP variables: Example

X =

[x2 x1

x1 1

]� 0

When is P positive semidefinite?

For X to be positive semidefinite, it must be:

• X symmetric → OK!

• first order princ.minor positive: 1 > 0 → OK!

• second order princ.minor positive: x2 − x21 ≥ 0

16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 19: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

SDP vs LP variables: Example

X =

[x2 x1

x1 1

]� 0

When is P positive semidefinite?

For X to be positive semidefinite, it must be:

• X symmetric → OK!

• first order princ.minor positive: 1 > 0 → OK!

• second order princ.minor positive: x2 − x21 ≥ 0

16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 20: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Example: Feasible space of SDP vs LP variables

SDP LP

X =

[x2 x1

x1 1

]� 0⇒ x2 − x2

1 ≥ 0x1 ≥ 0

x2 ≥ 0x2

x1

x2

x1

• In SDP we can express quadratic constraints, e.g. x21 or x1x2

• In general, in SDP we allow the variables to “move” in a larger space →here, x1 can take negative values

• SDP applies to a larger family of problems → LP special case of SDP

17 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 21: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Example: Feasible space of SDP vs LP variables

SDP LP

X =

[x2 x1

x1 1

]� 0⇒ x2 − x2

1 ≥ 0x1 ≥ 0

x2 ≥ 0x2

x1

x2

x1

• In SDP we can express quadratic constraints, e.g. x21 or x1x2

• In general, in SDP we allow the variables to “move” in a larger space →here, x1 can take negative values

• SDP applies to a larger family of problems → LP special case of SDP

17 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 22: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

LP as a special case of SDP

min[c11 c12

c21 c22

]•[X11 X12

X21 X22

]subject to:[A111 A112

A121 A122

]•[X11 X12

X21 X22

]= b1[

A211 A212

A221 A222

]•[X11 X12

X21 X22

]= b1

[X11 X12

X21 X22

]�0

How should C,A1, A2 look like so that ourSDP problem become an LP?

Assume that the LP will only havetwo variables.

Answer: If C,A1, A2 are diagonal, thenour SDP problem is actually an LP!

18 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 23: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

LP as a special case of SDP

min[c11 c12

c21 c22

]•[X11 X12

X21 X22

]subject to:[A111 A112

A121 A122

]•[X11 X12

X21 X22

]= b1[

A211 A212

A221 A222

]•[X11 X12

X21 X22

]= b1

[X11 X12

X21 X22

]�0

How should C,A1, A2 look like so that ourSDP problem become an LP?

Assume that the LP will only havetwo variables.

Answer: If C,A1, A2 are diagonal, thenour SDP problem is actually an LP!

18 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 24: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Outline of Lecture

• Motivation: Convex vs. Non-Convex Problem and SDP

•What is SDP?

• Numerical Example

•What is a Positive Semidefinite Matrix?

• SDP vs. LP

• Convex Relaxations for AC-OPF

19 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 25: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

SDP Application – Preliminaries:Rank of a Matrix

• Assume matrix A with dimensions M ×N = 5× 3

• 0 ≤ rank(A) ≤ min(M,N)

• If all rows and columns are linearly independent, thenrank(A) = min(M,N)

• If all rows and columns are linearly independent, how much is rank(A),if A has dimensions 5× 3?

• It holds: rank(AB) ≤ min(rank(A), rank(B))

• B is a vector with dimension N × 1

• How much is rank(B)?• How much is rank(AB)?

•W = XXT , where X is a vector. How much is rank(W )?

20 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 26: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

SDP Application – Preliminaries:Rank of a Matrix

• Assume matrix A with dimensions M ×N = 5× 3

• 0 ≤ rank(A) ≤ min(M,N)

• If all rows and columns are linearly independent, thenrank(A) = min(M,N)

• If all rows and columns are linearly independent, how much is rank(A),if A has dimensions 5× 3?

• It holds: rank(AB) ≤ min(rank(A), rank(B))

• B is a vector with dimension N × 1

• How much is rank(B)?• How much is rank(AB)?

•W = XXT , where X is a vector. How much is rank(W )?

20 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 27: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

SDP Application – Preliminaries:Rank of a Matrix

• Assume matrix A with dimensions M ×N = 5× 3

• 0 ≤ rank(A) ≤ min(M,N)

• If all rows and columns are linearly independent, thenrank(A) = min(M,N)

• If all rows and columns are linearly independent, how much is rank(A),if A has dimensions 5× 3?

• It holds: rank(AB) ≤ min(rank(A), rank(B))

• B is a vector with dimension N × 1

• How much is rank(B)?• How much is rank(AB)?

•W = XXT , where X is a vector. How much is rank(W )?

20 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 28: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPFDisclaimer: Illustrative example. Current SDP solvers do not usecomplex numbers yet. But hopefully soon! See Pascal’s lecturetomorrow!

V 1 V 2

S1 = V1Y∗

busV∗

= V1(Y11V1 + Y12V2)∗

= Y ∗11V1V∗

1 + Y ∗12V1V∗

2

S2 = Y ∗22V2V∗

2 + Y ∗21V2V∗

1

• I define: W = V V H =

[V1

V2

] [V ∗1 V ∗2

]=

[V1V

∗1 V1V

∗2

V2V∗

1 V2V∗

2

]It holds:

EXACT: W � 0

rank(W) = 1

RELAX: W � 0

(((((((rank(W) = 1

21 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 29: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPFDisclaimer: Illustrative example. Current SDP solvers do not usecomplex numbers yet. But hopefully soon! See Pascal’s lecturetomorrow!

V 1 V 2

S1 = V1Y∗

busV∗

= V1(Y11V1 + Y12V2)∗

= Y ∗11V1V∗

1 + Y ∗12V1V∗

2

S2 = Y ∗22V2V∗

2 + Y ∗21V2V∗

1

• I define: W = V V H =

[V1

V2

] [V ∗1 V ∗2

]=

[V1V

∗1 V1V

∗2

V2V∗

1 V2V∗

2

]It holds:

EXACT: W � 0

rank(W) = 1

RELAX: W � 0

(((((((rank(W) = 1

21 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 30: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPFDisclaimer: Illustrative example. Current SDP solvers do not usecomplex numbers yet. But hopefully soon! See Pascal’s lecturetomorrow!

V 1 V 2

S1 = V1Y∗

busV∗

= V1(Y11V1 + Y12V2)∗

= Y ∗11V1V∗

1 + Y ∗12V1V∗

2

S2 = Y ∗22V2V∗

2 + Y ∗21V2V∗

1

• I define: W = V V H =

[V1

V2

] [V ∗1 V ∗2

]=

[V1V

∗1 V1V

∗2

V2V∗

1 V2V∗

2

]It holds:

EXACT: W � 0

rank(W) = 1

RELAX: W � 0

(((((((rank(W) = 1

21 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 31: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPFDisclaimer: Illustrative example. Current SDP solvers do not usecomplex numbers yet. But hopefully soon! See Pascal’s lecturetomorrow!

V 1 V 2

S1 = V1Y∗

busV∗

= V1(Y11V1 + Y12V2)∗

= Y ∗11V1V∗

1 + Y ∗12V1V∗

2

S2 = Y ∗22V2V∗

2 + Y ∗21V2V∗

1

• I define: W = V V H =

[V1

V2

] [V ∗1 V ∗2

]=

[V1V

∗1 V1V

∗2

V2V∗

1 V2V∗

2

]It holds:

EXACT: W � 0

rank(W) = 1

RELAX: W � 0

(((((((rank(W) = 1

21 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 32: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations with SDP

x

f(x) f(W ∗) ≤ f(x∗)

x

f(x)

f(x∗) = f(W ∗)

rank(W ∗) = 1

EXACT: W = V V T

⇓RELAX: W � 0

(((((((rank(W ) = 1

• For the objective functions,it holds EXACT ≥ RELAX

• The RELAX problem is anSDP problem!

• If W ∗ happens also to berank-1, then EXACT =RELAX!

22 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 33: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPF

• The power is a quadratic function of the voltages,i.e. a function of V 2

i and ViVj

•We define a positive semidefinite matrix W the includes all the possiblecombinations of ViVj and V 2

i ; that is W = V V T .

• For W it holds: W � 0 and rank(W ) = 1

•We drop the rank-1 constraint → problem is now convex!

•We optimize the relaxed problem for W , and we pray for rank(Wopt) = 1.If yes → global optimum for the AC-OPF

• If rank(Wopt) 6= 1 → infeasible, i.e. Wopt has no physical meaning

• It has been shown that in most power systems the obtained Wopt isrank-1

• Still an open research topic!

23 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 34: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPF

• The power is a quadratic function of the voltages,i.e. a function of V 2

i and ViVj

•We define a positive semidefinite matrix W the includes all the possiblecombinations of ViVj and V 2

i ; that is W = V V T .

• For W it holds: W � 0 and rank(W ) = 1

•We drop the rank-1 constraint → problem is now convex!

•We optimize the relaxed problem for W , and we pray for rank(Wopt) = 1.If yes → global optimum for the AC-OPF

• If rank(Wopt) 6= 1 → infeasible, i.e. Wopt has no physical meaning

• It has been shown that in most power systems the obtained Wopt isrank-1

• Still an open research topic!

23 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 35: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPF

• The power is a quadratic function of the voltages,i.e. a function of V 2

i and ViVj

•We define a positive semidefinite matrix W the includes all the possiblecombinations of ViVj and V 2

i ; that is W = V V T .

• For W it holds: W � 0 and rank(W ) = 1

•We drop the rank-1 constraint → problem is now convex!

•We optimize the relaxed problem for W , and we pray for rank(Wopt) = 1.If yes → global optimum for the AC-OPF

• If rank(Wopt) 6= 1 → infeasible, i.e. Wopt has no physical meaning

• It has been shown that in most power systems the obtained Wopt isrank-1

• Still an open research topic!

23 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 36: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPF

• The power is a quadratic function of the voltages,i.e. a function of V 2

i and ViVj

•We define a positive semidefinite matrix W the includes all the possiblecombinations of ViVj and V 2

i ; that is W = V V T .

• For W it holds: W � 0 and rank(W ) = 1

•We drop the rank-1 constraint → problem is now convex!

•We optimize the relaxed problem for W , and we pray for rank(Wopt) = 1.If yes → global optimum for the AC-OPF

• If rank(Wopt) 6= 1 → infeasible, i.e. Wopt has no physical meaning

• It has been shown that in most power systems the obtained Wopt isrank-1

• Still an open research topic!

23 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 37: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPF

• The power is a quadratic function of the voltages,i.e. a function of V 2

i and ViVj

•We define a positive semidefinite matrix W the includes all the possiblecombinations of ViVj and V 2

i ; that is W = V V T .

• For W it holds: W � 0 and rank(W ) = 1

•We drop the rank-1 constraint → problem is now convex!

•We optimize the relaxed problem for W , and we pray for rank(Wopt) = 1.If yes → global optimum for the AC-OPF

• If rank(Wopt) 6= 1 → infeasible, i.e. Wopt has no physical meaning

• It has been shown that in most power systems the obtained Wopt isrank-1

• Still an open research topic!

23 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 38: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPF

• The power is a quadratic function of the voltages,i.e. a function of V 2

i and ViVj

•We define a positive semidefinite matrix W the includes all the possiblecombinations of ViVj and V 2

i ; that is W = V V T .

• For W it holds: W � 0 and rank(W ) = 1

•We drop the rank-1 constraint → problem is now convex!

•We optimize the relaxed problem for W , and we pray for rank(Wopt) = 1.If yes → global optimum for the AC-OPF

• If rank(Wopt) 6= 1 → infeasible, i.e. Wopt has no physical meaning

• It has been shown that in most power systems the obtained Wopt isrank-1

• Still an open research topic!

23 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 39: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPF

• The power is a quadratic function of the voltages,i.e. a function of V 2

i and ViVj

•We define a positive semidefinite matrix W the includes all the possiblecombinations of ViVj and V 2

i ; that is W = V V T .

• For W it holds: W � 0 and rank(W ) = 1

•We drop the rank-1 constraint → problem is now convex!

•We optimize the relaxed problem for W , and we pray for rank(Wopt) = 1.If yes → global optimum for the AC-OPF

• If rank(Wopt) 6= 1 → infeasible, i.e. Wopt has no physical meaning

• It has been shown that in most power systems the obtained Wopt isrank-1

• Still an open research topic!

23 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 40: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex relaxations for AC-OPF

• The power is a quadratic function of the voltages,i.e. a function of V 2

i and ViVj

•We define a positive semidefinite matrix W the includes all the possiblecombinations of ViVj and V 2

i ; that is W = V V T .

• For W it holds: W � 0 and rank(W ) = 1

•We drop the rank-1 constraint → problem is now convex!

•We optimize the relaxed problem for W , and we pray for rank(Wopt) = 1.If yes → global optimum for the AC-OPF

• If rank(Wopt) 6= 1 → infeasible, i.e. Wopt has no physical meaning

• It has been shown that in most power systems the obtained Wopt isrank-1

• Still an open research topic!

23 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 41: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Practical application of AC-OPF: Some key points

• Complex numbers (e.g. voltage) in rectangular coordinates

•We split in real and imaginary part

• Taking advantage of the multiplicity properties of the trace operator

• eig(W ) to check the rank of W

• Schur’s complement to transform polynomial constraints to semidefiniteconstraints

24 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 42: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Splitting in real and imaginary part

V r1 + jV i

1

V r2 + jV i

2

V r3 + jV i

3

⇒V r

1

V r2

V r3

V i1

V i2

V i3

W = XXT =

V r

1

V r2

V r3

V i1

V i2

V i3

[V r

1 V r2 V r

3 V i1 V i

2 V i3

]

25 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 43: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Matrix W

We introduce the variable transformation of complex bus voltages V :

X := [Re{V } Im{V }]T

The 2nbus - dimensional vector X is transformed to a 2nbus × 2nbus -dimensional matrix W

W = XXT =

V r1 V

r1 V r

1 Vr

2 · · · V r1 V

rn V r

1 Vi

1 V r1 V

i2 · · · V r

1 Vin

V r2 V

r1 V r

2 Vr

2 · · · V r2 V

rn V r

2 Vi

1 V r2 V

i2 · · · V r

2 Vin

.... . .

......

. . ....

V rnV

r1 · · · · · · V r

nVrn V r

nVi

1 · · · · · · V rnV

in

V r1 V

i1 V r

1 Vi

2 · · · V r1 V

in V i

1Vi

1 V i1V

i2 · · · V i

1Vin

V r2 V

i1 V r

2 Vi

2 · · · V r2 V

in V i

2Vi

1 V i2V

i2 · · · V i

2Vin

.... . .

......

. . ....

V rnV

i1 · · · · · · V r

nVin V i

nVi

1 · · · · · · V inV

in

26 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 44: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Matrix W

We introduce the variable transformation of complex bus voltages V :

X := [Re{V } Im{V }]T

The 2nbus - dimensional vector X is transformed to a 2nbus × 2nbus -dimensional matrix W

W = XXT =

V r1 V

r1 V r

1 Vr

2 · · · V r1 V

rn V r

1 Vi

1 V r1 V

i2 · · · V r

1 Vin

V r2 V

r1 V r

2 Vr

2 · · · V r2 V

rn V r

2 Vi

1 V r2 V

i2 · · · V r

2 Vin

.... . .

......

. . ....

V rnV

r1 · · · · · · V r

nVrn V r

nVi

1 · · · · · · V rnV

in

V r1 V

i1 V r

1 Vi

2 · · · V r1 V

in V i

1Vi

1 V i1V

i2 · · · V i

1Vin

V r2 V

i1 V r

2 Vi

2 · · · V r2 V

in V i

2Vi

1 V i2V

i2 · · · V i

2Vin

.... . .

......

. . ....

V rnV

i1 · · · · · · V r

nVin V i

nVi

1 · · · · · · V inV

in

26 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 45: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Properties of the trace operator

• trace(A) = sum of diagonal elements of A

• the trace is invariant under cyclic permutations:trace(ABC)=trace(BCA)=trace(CAB)

• Attention! trace(ABC) 6= trace(BAC)

• Example

tr(VTYV) =

tr

([V1 V2

] [Y11 Y12

Y21 Y22

] [V1

V2

]) vs

tr(YVVT ) =

tr

([Y11 Y12

Y21 Y22

] [V1

V2

] [V1 V2

])How much is the trace in each case?

What do you observe?Note: the expression on the left is not the power flow equation. The actual expression is

diag(V )Y ∗V ∗. But it gives some intuition for the next slide!

27 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 46: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Properties of the trace operator

• trace(A) = sum of diagonal elements of A

• the trace is invariant under cyclic permutations:trace(ABC)=trace(BCA)=trace(CAB)

• Attention! trace(ABC) 6= trace(BAC)

• Example

tr(VTYV) =

tr

([V1 V2

] [Y11 Y12

Y21 Y22

] [V1

V2

]) vs

tr(YVVT ) =

tr

([Y11 Y12

Y21 Y22

] [V1

V2

] [V1 V2

])How much is the trace in each case?

What do you observe?Note: the expression on the left is not the power flow equation. The actual expression is

diag(V )Y ∗V ∗. But it gives some intuition for the next slide!

27 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 47: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Properties of the trace operator

• trace(A) = sum of diagonal elements of A

• the trace is invariant under cyclic permutations:trace(ABC)=trace(BCA)=trace(CAB)

• Attention! trace(ABC) 6= trace(BAC)

• Example

tr(VTYV) =

tr

([V1 V2

] [Y11 Y12

Y21 Y22

] [V1

V2

]) vs

tr(YVVT ) =

tr

([Y11 Y12

Y21 Y22

] [V1

V2

] [V1 V2

])How much is the trace in each case?

What do you observe?Note: the expression on the left is not the power flow equation. The actual expression is

diag(V )Y ∗V ∗. But it gives some intuition for the next slide!

27 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 48: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex Relaxation of AC-OPF. . . for each node k and line lm:

Minimize Generation Cost∑k∈G

{ck2(Tr{YkW}+ PDk)2 +

ck1(Tr{YkW}+ PDk) + ck0}

s. t. Active Power Balance Pmink ≤ Tr{YkW} ≤ Pmax

k

Reactive Power Balance Qmink ≤ Tr{YkW} ≤ Qmax

k

Bus Voltages (V mink )2 ≤ Tr{MkW} ≤ (V max

k )2

Active Branch Flow − Pmaxlm ≤ Tr{YlmW} ≤ Pmax

lm

Apparent Branch Flow Tr{YlmW}2 + Tr{YlmW}2 ≤ Smaxlm

Matrices Yk, Yk and Ylm are auxiliary variables resulting from theadmittance matrix Y of the system.

28 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 49: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex Relaxation of AC-OPF. . . for each node k and line lm:

Minimize Generation Cost∑k∈G

{ck2(Tr{YkW}+ PDk)2 +

ck1(Tr{YkW}+ PDk) + ck0}

s. t. Active Power Balance Pmink ≤ Tr{YkW} ≤ Pmax

k

Reactive Power Balance Qmink ≤ Tr{YkW} ≤ Qmax

k

Bus Voltages (V mink )2 ≤ Tr{MkW} ≤ (V max

k )2

Active Branch Flow − Pmaxlm ≤ Tr{YlmW} ≤ Pmax

lm

Apparent Branch Flow Tr{YlmW}2 + Tr{YlmW}2 ≤ Smaxlm

Matrices Yk, Yk and Ylm are auxiliary variables resulting from theadmittance matrix Y of the system.28 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 50: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex Relaxation of AC-OPF. . . for each node k and line lm:

Minimize Generation Cost∑k∈G

{ck2(Tr{YkW}+ PDk)2 +

ck1(Tr{YkW}+ PDk) + ck0}

s. t. Active Power Balance Pmink ≤ Tr{YkW} ≤ Pmax

k

Reactive Power Balance Qmink ≤ Tr{YkW} ≤ Qmax

k

Bus Voltages (V mink )2 ≤ Tr{MkW} ≤ (V max

k )2

Active Branch Flow − Pmaxlm ≤ Tr{YlmW} ≤ Pmax

lm

Apparent Branch Flow Tr{YlmW}2 + Tr{YlmW}2 ≤ Smaxlm

Matrices Yk, Yk and Ylm are auxiliary variables resulting from theadmittance matrix Y of the system.28 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 51: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex Relaxation of AC-OPF. . . for each node k and line lm:

Minimize Generation Cost∑k∈G

{ck2(Tr{YkW}+ PDk)2 +

ck1(Tr{YkW}+ PDk) + ck0}

s. t. Active Power Balance Pmink ≤ Tr{YkW} ≤ Pmax

k

Reactive Power Balance Qmink ≤ Tr{YkW} ≤ Qmax

k

Bus Voltages (V mink )2 ≤ Tr{MkW} ≤ (V max

k )2

Active Branch Flow − Pmaxlm ≤ Tr{YlmW} ≤ Pmax

lm

Apparent Branch Flow Tr{YlmW}2 + Tr{YlmW}2 ≤ Smaxlm

Decomposition W = [Re{V } Im{V }]T︸ ︷︷ ︸X

[Re{V } Im{V }]︸ ︷︷ ︸XT

Matrices Yk, Yk and Ylm are auxiliary variables resulting from theadmittance matrix Y of the system.28 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 52: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex Relaxation of AC-OPF. . . for each node k and line lm:

Minimize Generation Cost∑k∈G

{ck2(Tr{YkW}+ PDk)2 +

ck1(Tr{YkW}+ PDk) + ck0}

s. t. Active Power Balance Pmink ≤ Tr{YkW} ≤ Pmax

k

Reactive Power Balance Qmink ≤ Tr{YkW} ≤ Qmax

k

Bus Voltages (V mink )2 ≤ Tr{MkW} ≤ (V max

k )2

Active Branch Flow − Pmaxlm ≤ Tr{YlmW} ≤ Pmax

lm

Apparent Branch Flow Tr{YlmW}2 + Tr{YlmW}2 ≤ Smaxlm

Semi-Definiteness of W W � 0

Rank Constraint rank(W ) = 1

Matrices Yk, Yk and Ylm are auxiliary variables resulting from theadmittance matrix Y of the system.28 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 53: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Convex Relaxation of AC-OPF. . . for each node k and line lm:

Minimize Generation Cost∑k∈G

{ck2(Tr{YkW}+ PDk)2 +

ck1(Tr{YkW}+ PDk) + ck0}

s. t. Active Power Balance Pmink ≤ Tr{YkW} ≤ Pmax

k

Reactive Power Balance Qmink ≤ Tr{YkW} ≤ Qmax

k

Bus Voltages (V mink )2 ≤ Tr{MkW} ≤ (V max

k )2

Active Branch Flow − Pmaxlm ≤ Tr{YlmW} ≤ Pmax

lm

Apparent Branch Flow Tr{YlmW}2 + Tr{YlmW}2 ≤ Smaxlm

Semi-Definiteness of W W � 0

Rank Constraint (((((((hhhhhhhrank(W ) = 1 ⇒ Convex Relaxation

Matrices Yk, Yk and Ylm are auxiliary variables resulting from theadmittance matrix Y of the system.28 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 54: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Zero relaxation gap: Recovering a feasible solution

• If rank(W)=1, then we have zero relaxation gap!

For the AC-OPF problem, Lavaei and Low 4show

• rank(W ) = 1 or 2 solution to original OPF problem can be recovered

• rank(W ) ≥ 3 solution to original OPF problem cannot be recovered

1Javad Lavaei and Steven H Low. “Zero duality gap in optimal power flow problem”. In: IEEETransactions on Power Systems 27.1 (2012), pp. 92–10729 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 55: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Zero relaxation gap: Recovering a feasible solution

• If rank(W)=1, then we have zero relaxation gap!

For the AC-OPF problem, Lavaei and Low 4show

• rank(W ) = 1 or 2 solution to original OPF problem can be recovered

• rank(W ) ≥ 3 solution to original OPF problem cannot be recovered

1Javad Lavaei and Steven H Low. “Zero duality gap in optimal power flow problem”. In: IEEETransactions on Power Systems 27.1 (2012), pp. 92–10729 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 56: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

What if rank(W) = 2?

If rank(W ) = 2, then apply eigendecomposition according to Molzahnet al.5:

Wopt = ρ1E1ET1 + ρ2E2E

T2

Xopt =

√ρopt

1 Eopt1 +

√ρopt

2 Eopt2

The terms ρ1, ρ2 denote the first and second largest absoluteeigenvalue of W and E1 and E2 the corresponding eigenvectors.

2Daniel K Molzahn et al. “Implementation of a large-scale optimal power flow solver based onsemidefinite programming”. In: IEEE Transactions on Power Systems 28.4 (2013), pp. 3987–399830 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 57: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

How to practically check the rank of a matrix?

1 Find matrix W

2 Get the eigenvalues of W

3 Check the ratio of the second largest ρ2 to the third largest eigenvalue ρ3

4 Ifρ2

ρ3> 105 then matrix W can be considered rank-2 → We can recover

a feasible solution → We found the global optimum!

Note: This is a heuristic criterion for convex relaxations of AC-OPFproblems specifically

2Daniel K Molzahn et al. “Implementation of a large-scale optimal power flow solver based onsemidefinite programming”. In: IEEE Transactions on Power Systems 28.4 (2013), pp. 3987–399831 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 58: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

How to practically check the rank of a matrix?

1 Find matrix W

2 Get the eigenvalues of W

3 Check the ratio of the second largest ρ2 to the third largest eigenvalue ρ3

4 Ifρ2

ρ3> 105 then matrix W can be considered rank-2 → We can recover

a feasible solution → We found the global optimum!

Note: This is a heuristic criterion for convex relaxations of AC-OPFproblems specifically

2Daniel K Molzahn et al. “Implementation of a large-scale optimal power flow solver based onsemidefinite programming”. In: IEEE Transactions on Power Systems 28.4 (2013), pp. 3987–399831 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 59: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Towards Rank-1 solutions

• Penalty factor on power lossses to achieve zero relaxation gap

• Example

A. Venzke, S. Chatzivasileiadis. Convex Relaxations of Security Constrained AC Optimal PowerFlow under Uncertainty. In 20th Power Systems Computation Conference, Dublin, Ireland, pages1-7, June 2018.32 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 60: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Wrap-up

• The SDP is a generalization of the LP

• The main difference between the formulation of the SDP and the LP, isthat the SDP requires the variables to form a positive semidefinitematrix, while the LP requires all variables to be larger than zero.

• The SDP formulation allows for more “freedom” in the variables.

• SDP can model quadratic constraints.

Convex relaxations for AC-OPF

• Transform quadratic equations to SDP expressions

• Convex relaxations of AC-OPF can recover the global optimun, but underconditions! (e.g. rank(W) = 1)

• Achieving zero relaxation gap: major research topic

• SDP is not the only solution• to be continued... Pascal tomorrow :)

33 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 61: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Wrap-up

• The SDP is a generalization of the LP

• The main difference between the formulation of the SDP and the LP, isthat the SDP requires the variables to form a positive semidefinitematrix, while the LP requires all variables to be larger than zero.

• The SDP formulation allows for more “freedom” in the variables.

• SDP can model quadratic constraints.

Convex relaxations for AC-OPF

• Transform quadratic equations to SDP expressions

• Convex relaxations of AC-OPF can recover the global optimun, but underconditions! (e.g. rank(W) = 1)

• Achieving zero relaxation gap: major research topic

• SDP is not the only solution• to be continued... Pascal tomorrow :)

33 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 62: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Thank you!

[email protected]

Further readingCourse material: http://www.chatziva.com/teaching.html

Publications: http://www.chatziva.com/publications.html

34 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 63: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Appendix

35 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 64: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Auxiliary VariablesA power grid consists of N buses and L lines. The set of generatorbuses is denoted with G. The following auxiliary variables areintroduced for each bus k ∈ N and line (l,m) ∈ L:

Yk := ekeTk Y

Ylm := (ylm + ylm)eleTl − (ylm)ele

Tm

Yk :=1

2

[Re{Yk + Y T

k } Im{Y Tk − Yk}

Im{Yk − Y Tk } Re{Yk + Y T

k }

]Ylm :=

1

2

[Re{Ylm + Y T

lm} Im{Y Tlm − Ylm}

Im{Ylm − Y Tlm} Re{Ylm + Y T

lm}

]Yk :=

−1

2

[Im{Yk + Y T

k } Re{Yk − Y Tk }

Re{Y Tk − Yk} Im{Yk + Y T

k }

]Mk :=

[eke

Tk 0

0 ekeTk

]

The terms Re{·} and Im{·} denote the real and imaginary part.Matrix Y denotes the bus admittance matrix of the power grid, ek thek-th basis vector, ylm the shunt admittance of line (l,m) ∈ L and ylmthe series admittance.36 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 65: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

From non-convex AC-OPF to SDP-OPF

37 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 66: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Complex Power Injections

• Complex power balance for all buses writes:

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

• Formulating the complex power balance for bus k yields:

[SG − SL]k = V T ekeTk Y∗busV

⇒ The vectors ek are unit vectors that have a {1} at the k-th entry.Otherwise, their entries are {0}.

• Introducing the trace operator (sum of the diagonal elements of amatrix) and use its multiplicity property:

[SG − SL]k = Tr{V T ekeTk Y∗busV

∗} = Tr{ekeTk Y ∗busV ∗V T }

⇒ AC-OPF formulation in complex variables where we could substituteV ∗V T with a complex W . We split the complex formulation into realand imaginary part.

38 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 67: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Complex Power Injections

• Complex power balance for all buses writes:

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

• Formulating the complex power balance for bus k yields:

[SG − SL]k = V T ekeTk Y∗busV

⇒ The vectors ek are unit vectors that have a {1} at the k-th entry.Otherwise, their entries are {0}.

• Introducing the trace operator (sum of the diagonal elements of amatrix) and use its multiplicity property:

[SG − SL]k = Tr{V T ekeTk Y∗busV

∗} = Tr{ekeTk Y ∗busV ∗V T }

⇒ AC-OPF formulation in complex variables where we could substituteV ∗V T with a complex W . We split the complex formulation into realand imaginary part.

38 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 68: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Complex Power Injections

• Complex power balance for all buses writes:

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

• Formulating the complex power balance for bus k yields:

[SG − SL]k = V T ekeTk Y∗busV

⇒ The vectors ek are unit vectors that have a {1} at the k-th entry.Otherwise, their entries are {0}.

• Introducing the trace operator (sum of the diagonal elements of amatrix) and use its multiplicity property:

[SG − SL]k = Tr{V T ekeTk Y∗busV

∗} = Tr{ekeTk Y ∗busV ∗V T }

⇒ AC-OPF formulation in complex variables where we could substituteV ∗V T with a complex W . We split the complex formulation into realand imaginary part.

38 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 69: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Complex Power Injections

• Complex power balance for all buses writes:

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

• Formulating the complex power balance for bus k yields:

[SG − SL]k = V T ekeTk Y∗busV

⇒ The vectors ek are unit vectors that have a {1} at the k-th entry.Otherwise, their entries are {0}.

• Introducing the trace operator (sum of the diagonal elements of amatrix) and use its multiplicity property:

[SG − SL]k = Tr{V T ekeTk Y∗busV

∗} = Tr{ekeTk Y ∗busV ∗V T }

⇒ AC-OPF formulation in complex variables where we could substituteV ∗V T with a complex W . We split the complex formulation into realand imaginary part.

38 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 70: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Splitting into Real and Imaginary Part

• If we have two generic complex numbers a+ jb and c+ jd, then we canwrite their product as:

(a+ jb)(c+ jd) = ac− bd+ j(ad+ bc)

• In matrix form this can be formulated as:

[ReIm

]=

[a −bb a

] [cd

]

39 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 71: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Splitting into Real and Imaginary Part

• If we have two generic complex numbers a+ jb and c+ jd, then we canwrite their product as:

(a+ jb)(c+ jd) = ac− bd+ j(ad+ bc)

• In matrix form this can be formulated as:[ReIm

]=

[a −bb a

] [cd

]

39 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 72: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Splitting into Real and Imaginary Part

• Following this logic, we can write the real part of the active powerinjections using Yk := eke

Tk Y as:

Re{[SG − SL]k} = Re{V T ekeTk Y∗busV

∗}

= XT

[Re{Yk} − Im{Yk}Im{Yk} Re{Yk}

]X

= XT 1

2

[Re{Yk + Y T

k } Im{Y Tk − Yk}

Im{Yk − Y Tk } Re{Yk + Y T

k }

]X

= XTYkX = Tr{YkXXT }

⇒ This procedure can be similarly applied to yield the mathematicalformulation of the reactive power injections and the active and apparentbranch flows.

40 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 73: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Splitting into Real and Imaginary Part

• Following this logic, we can write the real part of the active powerinjections using Yk := eke

Tk Y as:

Re{[SG − SL]k} = Re{V T ekeTk Y∗busV

∗}

= XT

[Re{Yk} − Im{Yk}Im{Yk} Re{Yk}

]X

= XT 1

2

[Re{Yk + Y T

k } Im{Y Tk − Yk}

Im{Yk − Y Tk } Re{Yk + Y T

k }

]X

= XTYkX = Tr{YkXXT }

⇒ This procedure can be similarly applied to yield the mathematicalformulation of the reactive power injections and the active and apparentbranch flows.

40 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 74: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Splitting into Real and Imaginary Part

• Following this logic, we can write the real part of the active powerinjections using Yk := eke

Tk Y as:

Re{[SG − SL]k} = Re{V T ekeTk Y∗busV

∗}

= XT

[Re{Yk} − Im{Yk}Im{Yk} Re{Yk}

]X

= XT 1

2

[Re{Yk + Y T

k } Im{Y Tk − Yk}

Im{Yk − Y Tk } Re{Yk + Y T

k }

]X

= XTYkX = Tr{YkXXT }

⇒ This procedure can be similarly applied to yield the mathematicalformulation of the reactive power injections and the active and apparentbranch flows.

40 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 75: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Splitting into Real and Imaginary Part

• Following this logic, we can write the real part of the active powerinjections using Yk := eke

Tk Y as:

Re{[SG − SL]k} = Re{V T ekeTk Y∗busV

∗}

= XT

[Re{Yk} − Im{Yk}Im{Yk} Re{Yk}

]X

= XT 1

2

[Re{Yk + Y T

k } Im{Y Tk − Yk}

Im{Yk − Y Tk } Re{Yk + Y T

k }

]X

= XTYkX = Tr{YkXXT }

⇒ This procedure can be similarly applied to yield the mathematicalformulation of the reactive power injections and the active and apparentbranch flows.

40 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 76: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Schur’s Complement

The objective on generation cost and the constraint on apparent lineflow cannot be directly implemented in the SDP.

We can use the so-called Schur’s complement to reformulatepolynomial equations as semidefinite constraints.

41 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 77: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Schur’s Complement

The Schur complement is defined as follows6. Given a matrix X ∈ Snwhich can be partitioned in the sub-matrices A, B and C:

X =

[A BBT C

](1)

If det A 6= 0, the matrix

S = C −BTA−1B (2)

is called the Schur complement of A in X. The following statementscan be made regarding the positive semi-definiteness of the matrix X:

• X � 0 if and only if A � 0 and S � 0

• If A � 0, then X � 0 if and only if S � 0

3boyd2004convex42 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 78: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Schur’s Complement

To obtain an optimization problem linear in W , the objective functionis reformulated using Schur’s complement:

minW,α

∑k∈G

αk[ck1Tr{YkW}+ ak

√ck2Tr{YkW}+ bk√

ck2Tr{YkW}+ bk −1

]� 0

where ak := −αk + ck0 + ck1PDkand bk :=

√ck2PDk

. The variable αis introduced as an additional optimization variable. In addition, theapparent branch flow constraint is rewritten: −(Slm)2 Tr{YlmW} Tr{YlmW}

Tr{YlmW} −1 0Tr{YlmW} 0 −1

� 0

43 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 79: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Schur’s Complement

This theorem is used to prove that the semi-definite constraint is equalto the quadratic constraint. The matrix X corresponds to

X =

S2

lm Tr{YlmW} Tr{YlmW}Tr{YlmW} 1 0Tr{YlmW} 0 1

� 0

Applying Schur complement a first time, defining

A = S2

lm B =[Tr{YlmW} Tr{YlmW}

]C =

[1 00 1

]yields the following result:

44 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018

Page 80: Introduction to convex relaxations of AC-OPF - DTU CEE ......1 0 16 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018 Example: Feasible space of

Schur’s Complement

S1 = C −BTA−1B

=

1− Tr{YlmW}2

S2

lm

Tr{YlmW}Tr{YlmW}S

2

lmTr{YlmW}Tr{YlmW}

S2

lm

1− Tr{YlmW}2

S2

lm

� 0

If Schur complement is applied a second time, the result is the initialquadratic constraint:

S2 = S2

lm − Tr{YlmW}2 − Tr{YlmW}2 ≥ 0

Hence, the proof is completed. In the context of semi-definiteprogramming, Schur complement is a powerful tool, which can be usedto transform polynomial constraints into semi-definite constraints.45 DTU Electrical Engineering Introduction to convex relaxations of AC-OPF Jun 25, 2018