Collection of Power Flow Models: Mathematical Formulations: 1 Nomenclature

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Collection of Power Flow models:

Mathematical formulations
Lisa Tang, Michael Ferris
University of Wisconsin - Madison
May 20, 2015

In its most general form, the optimal power flow (OPF) problem is a cost minimization
problem with equality constraints enforcing Kirchhoff’s current law, i.e. power balance at
each bus in the network, and inequality constraints enforcing physical and stability lim-
its on power generation and flow. Several different formulations exist for the power flow
equations, the most popular of which are the polar power-voltage formulation (P), the rect-
angular power-voltage formulation (R), the rectangular current-voltage (IV), and the DC
approximation (DC) which is a linearization of the problem.
Cost functions (1) can be given as quadratic coefficients or as a list of points specifying
a piecewise linear function. Piecewise linear functions must be convex at this time.

X
min c̃i (Pi ) (1)
i

The following sections provide detail on the mathematical formulations of the models
provided in the archive.

1 Nomenclature
The following notation will be used in describing the different OPF formulations. Note that
not all parameters and variables will appear in every model, and set T is typically only used
in unit commitment models. Thus, index t ∈ T which is used to describe time periods, is
not used in all the formulations although it is described and indexed with in these tables.
Note that every line ijc ∈ E, occurs at most once in this set, that is to say that if ijc ∈ E,
then jic 6∈ E. The convention used in our models is that a positive flow on a line represents
a withdrawal at its source end and an injection at its terminating end. This usage is further
clarified in the introductory passage of Section 3.

1
Set Description
N Set of buses in the transmission network
G Set of generators in the transmission network
I Set of interfaces in the transmission network
c∈C Set of transmission connections in network
t∈T Set of time periods
E ⊆N ×N ×C Set of lines in the transmission network
Ei ⊆ E Subset of lines E belonging to interface i ∈ I
Gi ∈ G Subset of generators G at bus i ∈ N

Table 1: Description of Sets

Parameters Description
c̃i (·) Cost function for generation at bus i ∈ N
Q
dP
it , dit Real and reactive power demand at bus i in time t ∈ T
rijc , xijc Resistance and reactance on line ijc ∈ E
gis , bsi Shunt conductance and susceptance at bus i ∈ N
E
gijc , bEijc Conductance and susceptance on line ijc ∈ E
C
bijc Branch charging susceptance of line ijc ∈ E
τijc , φijc Transformer tap ratio and angle on line ijc ∈ E
YijP , YijQ Real & imaginary component of Y-bus admittance matrix for line ij ⊆ N × N
uit Generator i’s on/off status at time t ∈ T
P
F ijc Real power limit on line ijc ∈ E
I
Fi Real power limit on interface i ∈ I
I ijc Current magnitude limit on line ijc ∈ E
P i, P i Lower and upper active power injection limits of generator i ∈ G
Qi , Qi Lower and upper reactive power injection limits of generator i ∈ G
run
U run
i , Ui Minimum up and downtime of generator i ∈ G
ramp
U ramp
i , Ui Rampup and rampdown rate of generator i ∈ G
V i, V i Voltage magnitude lower and upper limits at bus i ∈ N

Table 2: Description of Parameters

2
Variables Description
P Q
Fijct , Fijct Real and reactive power flowing on line ijc ∈ E in time t ∈ T
P Q
Iijct , Iijct Real and reactive current flowing on line ijc ∈ E in time t ∈ T
Pit , Qit Real and reactive power generated at bus i ∈ N in time t ∈ T
Vit , θit Voltage magnitude and angle at bus i ∈ N in time t ∈ T
VitP , VitQ Real & imaginary rectangular voltage components at bus i ∈ N in time t ∈ T
Uiton , Uitoff , Uitrun Start, stop and run status of generator i ∈ G at time t ∈ T

Table 3: Description of Variables

2 DC models
2.1 DC Optimal Power Flow
The DCOPF approximation (dcopf.gms) stems from a simplification of the physics of the
transmission network. It linearizes the problem by treating resistance and line losses as
negligible, assuming that the per unit voltage magnitude at each bus is 1, and uses small
angle approximation for sine and cosine. Small angle approximation assumes that the phase
angle difference between the buses, (θi − θj )∀i ∈ N , is small enough and approximates the
cosine and sine functions with cos(i) = 1 and sin(i) = i respectively.
With these assumptions, reactive power in the network becomes zero and can be ignored.
Since losses are also zero in this model, the power for each ijc line, Fijc , is only computed
once (2) as the flow in the opposite direction Fjic is the same. The resulting formulation
is a linear model that solves for variables P, θ, F P subject to node balance constraints (3),
interface flow limits (4), limits on the angle difference between connected buses (5), and
bound constraints on P and F P (6). Note that generator statuses are provided and this is
a single time-period model, therefore the index t ∈ T is not used.

3
X
min c̃i (Pi )
P,F P ,θ
i

P −1
s.t. Fijc = (θj − θi + φijc ) ∀ijc ∈ E (2)
τijc xijc
X X X
P P
Pk − Fijc + Fjic
k∈Gi (jc):ijc∈E (jc):jic∈E

− dP
i − gis = 0 ∀i ∈ N (3)
X
P I
Fijc ≤ Fk ∀k ∈ I (4)
ijc,jic∈Ek
−π π
≤ θi − θj ≤ ∀(ij) : ijc ∈ E (5)
3 3
ui P i ≤ Pi ≤ ui P i ∀i ∈ G
P P P
− F ijc ≤ Fijc ≤ F ijc ∀ijc ∈ E (6)

Additionally, we include the Shift Factor formulation of the DCOPF problem, which
models flows on lines with respect to power injections and withdrawals at each bus. This
requires a dense |E| × |N | coefficient matrix, which can be generated using the scripts in the
data models of the archive.

2.2 DC using Shift Factor Matrices


The DC power flow model can also be used to compute the sensitivities of branch flows to
changes in nodal real power injections, sometimes called injection shift factors [2]. These
matrices are typically large and dense, |E| × |N |, and each element describes the expected
change in real power flow on a line, E, as it reacts to a 1 unit increase in the power injection
at bus N , under the strict assumption that the additional unit of power is based on some
slack distribution. Additional detail about shift matrices can be found in the Matpower
manual.
Through use of the shift matrix, we can eliminate bus voltage angles, θ, as an intermedi-
ate variable, and the shift matrix model (dcopf shift.gms) is reduced to (7-10), where H
is the shift matrix. Due to the matrix density however, this formulation is not recommended
over the standard DCOPF formulation, especially in large models.

4
X
min c̃i (Pi )
P,F P
i
X X
P
Pl − dP s

s.t. Fijc = Hijck k − gi ∀ijc ∈ E (7)
k∈N l∈Gk
X
Pk − dP s
i − gi = 0 ∀i ∈ N (8)
k∈Gi
X
P I
Fijc ≤ Fk ∀k ∈ I (9)
ijc,jic∈Ek

ui P i ≤ Pi ≤ ui P i ∀i ∈ G
P P P
− F ijc ≤ Fijc ≤ F ijc ∀ijc ∈ E (10)

2.3 Unit commitment DC model


uc dc.gms within the model archive is a DC model which incorporates unit commitment,
allowing the modeler to choose the set of dispatched generators for each time period, and
is typically useful when the OPF model needs to be solved over a continuous block of time.
When solved over multiple time periods, t ∈ T , the model includes additional generator
operational constraints such as generator ramping, minimum up-time and minimum down-
time. Equations (11 - 14) are equivalent to (2 - 5) with index t ∈ T , and unit commitment
variables U = {U on , U off , U run } are factored into generator power limits in (15). Binary
variable relationships are modeled in (16), minimum up and down time in (17-18), and
generator ramping conditions in (19-20), while (21) defines the remaining variable bounds.
The constraints in (16-18) for the generator unit commitment problem is based on the work
done by Hedman, O’Neill and Oren in [1].

X
min c̃i (Pit )
P,F P ,θ,U
t

P −1
s.t. Fijct = (θjt − θit + φijc ) ∀ijc ∈ E, t ∈ T (11)
τijc xijc
X X
P
Pkt − Fijct
k∈Gi (jc):ijc∈E
X
P
+ Fjict − dP s
it − git = 0 ∀i ∈ N , t ∈ T (12)
(jc):jic∈E
X
P I
Fijct ≤ Fk ∀k ∈ I, t ∈ T (13)
ijc,jic∈Ek
−π π
≤ θit − θjt ≤ ∀(ij) : ijc ∈ E, t ∈ T (14)
3 3
Uitrun ∗ P i ≤ Pit ≤ Uitrun ∗ P i ∀i ∈ G, t ∈ T (15)

5
Uiton − Uitoff = Uitrun − Ui,t−1
run
∀i ∈ G, t ∈ T (16)
t
X
on
Ui,t0
≤ Uitrun ∀i ∈ G, t ∈ T (17)
run
t0 =t−U i +1
t
X
Uitrun ≤ 1− off
Ui,t 0
∀i ∈ G, t ∈ T (18)
t0 =t−U run
i +1
ramp ramp
Pit ≤ Pi,t−1 + Uitrun U i + Uiton (P i − U i ) ∀i ∈ G, t ∈ T (19)
Pi,t−1 ≤ Pi,t + Uitrun U ramp i + Uitoff (P i − U ramp
i ) ∀i ∈ G, t ∈ T (20)
P P P
− F ijc ≤ Fijct ≤ F ijc ∀ijc ∈ E, t ∈ T
Uiton , Uitoff , Uitrun ∈ {0, 1} ∀i ∈ G, t ∈ T (21)

3 AC models
In the true physics of an AC power flow model, power transmitted through lines ijc ∈ E
may experience loss, and this is reflected in the calculations of active and reactive power.
That is to say that the power leaving bus i ∈ N on line ijc ∈ E may not necessarily equal
the power entering the bus j ∈ N on the other end, i.e. Fijc may not equal −Fjic . Recall
that the convention used in these models is that a positive flow on a line, Fijc represents
a withdrawal at the source i ∈ N and an injection at its terminating end j ∈ N . In this
chapter, we provide three formulations of the AC power flow model, namely polar power-
voltage in Section 3.1, rectangular power-voltage in 3.2 and rectangular current-voltage in
3.3.

3.1 Polar Power-Voltage Formulation (P)


The polar power-voltage formulation (polar acopf.gms) uses the polar form of complex
quantities and explicitly uses sines and cosines in the power flow constraints. Variables Qi
and Vi model the reactive power support provided by generators and the bus voltage at bus
Q
i ∈ N respectively, while reactive power on a line is modeled by Fijc .
Due to possible line losses as mentioned above, real power flow on lines ijc ∈ E which are
approximated in the DCOPF by (2) is modeled here by (22 - 23), while (24 - 25) computes
the line’s reactive power flow. Node balance equations are updated in (26 - 27), limits on
line interface flows and bus angle differences are provided in (28 - 29) respectively, and (30)
defines bounds on the remaining variables.

6
X
min c̃i (Pi )
P,Q,F P ,F Q ,θ,V
i

P 1 E 2
s.t. Fijc = 2 gijc Vi
τijc
1 E
cos(θi − θj − φijc ) + bEijc sin(θi − θj − φijc )

− Vi Vj gijc ∀ijc ∈ E (22)
τijc
P E
Fjic = gijc Vj2
1 E
cos(θj − θi + φijc ) + bEijc sin(θj − θi + φijc )

− Vi Vj gijc ∀ijc ∈ E (23)
τijc
!
Q 1 E
bC
ijc
Fijc = − 2 bijc + Vi2
τijc 2
1 E
cos(θi − θj − φijc ) − bEijc sin(θi − θj − φijc )

− Vi Vj gijc ∀ijc ∈ E (24)
τijc
!
Q bCijc
Fjic = − bijc + Vj2
2
1 E
cos(θj − θi + φijc ) − bEijc sin(θj − θi + φijc )

− Vi Vj gijc ∀ijc ∈ E (25)
τijc
X X X
P P
Pk − Fijc − Fijc − dP 2 s
i − (Vi ) gi = 0 ∀i ∈ N (26)
k∈Gi (jc):ijc∈E (jc):jic∈E
X X Q
X Q
Qk − Fijc − Fijc − dQ 2 s
i + (Vi ) bi = 0 ∀i ∈ N (27)
k∈Gi (jc):ijc∈N (jc):jic∈E
X
P I
Fijc ≤ Fk ∀k ∈ I (28)
ijc,jic∈Ek
−π π
≤ θi − θj ≤ ∀(ij) : ijc ∈ E (29)
3 3
ui P i ≤ Pi ≤ ui P i , ui Qi ≤ Qi ≤ ui Qi ∀i ∈ G
P P P
V i ≤ Vi ≤ V i ∀i ∈ E ; −F ijc ≤ Fijc ≤ F ijc ∀ijc ∈ E (30)

3.2 Rectangular Power-Voltage Formulation (R)


The second AC formulation we provide (rect acopf.gms) uses the rectangular form of com-
plex quantities, resulting in quadratic power flow constraints with respect to these quantities.
Unlike the polar formulation, the sines and cosines are of constant parameters and  the bus
P 2 Q 2
voltage is separated into real and imaginary parts, that is Vi = (Vi ) + (Vi ) ∀i ∈ N .
Therefore, equations (22 - 27) from the polar model which define real and reactive power on
lines and node balance equations are rewritten in the retangular fomulation as (31-36). Ad-
ditionally, the voltage magnitude limit is no longer a simple bound contraint but is enforced
by the quadratic inequality in (37). Similar to (28-30) in the polar formulation, interface

7
limits are imposed in (38) and variable bounds are defined in (39), while bus angle limits
are not explicitly imposed in this formulation.

X
min c̃i (Pi )
P,Q,F P ,F Q ,V
i
1  
P
s.t. Fijc = 2
E
gijc (ViP )2 + (ViQ )2
τijc
1  
− gijc cos(φijc ) − bEijc sin(φijc ) ViP VjP + ViQ VjQ
τijc
1  
− bEijc cos(φijc ) + gijc
E
sin(φijc ) VjP ViQ − ViP VjQ ∀ijc ∈ E (31)
τijc
 
P
Fjic = gijc (VjP )2 + (VjQ )2
1  
− gijc cos(φijc ) + bEijc sin(φijc ) VjP ViP + VjQ ViQ
τijc
1  
− bEijc cos(φijc ) − gijc
E
sin(φijc ) ViP VjQ − VjP ViQ ∀ijc ∈ E (32)
τijc
!
Q 1 bC
ijc
 
Fijc = − 2 E
bijc + (ViP )2 + (ViQ )2
τijc 2
1  
− E
gijc cos(φijc ) − bEijc sin(φijc ) VjP ViQ − ViP VjQ
τijc
1  
− bEijc cos(φijc ) + gijc
E
sin(φijc ) ViP VjP + ViQ VjQ ∀ijc ∈ E (33)
τijc
!
Q bC
ijc
 
E
Fjic = − bijc + (ViP )2 + (ViQ )2
2
1  
− E
gijc cos(φijc ) + bEijc sin(φijc ) ViP VjQ − VjP ViQ
τijc
1  
− bEijc cos(φijc ) − gijc
E
sin(φijc ) VjP ViP + VjQ ViQ ∀ijc ∈ E (34)
τijc
X X X
P P
Pk − Fijc − Fijc − dP
i
k∈Gi (jc):ijc∈E (jc):jic∈E

(ViP )2 (ViQ )2 gis



− + = 0 ∀i ∈ N (35)
X X Q
X Q
Qk − Fijc − Fijc − dQ
i
k∈Gi (jc):ijc∈E (jc):jic∈E

+ (ViP )2 + (ViQ )2 bsi ,



= 0 ∀i ∈ N (36)
2
V 2i ≤ (ViP )2 + (ViQ )2 ≤ V i ∀i ∈ N (37)
X
P I
Fijc ≤ Fk ∀k ∈ I (38)
ijc,jic∈Ek

8
ui P i ≤ Pi ≤ ui P i , ui Qi ≤ Qi ≤ ui Qi ∀i ∈ G
P P P
− F ijc ≤ Fijc ≤ F ijc ∀ijc ∈ E (39)

3.3 Rectangular Current-Voltage Formulation (IV)


The third AC model presented here is the rectangular current-voltage formulation (iv acopf.gms)
which considers the flow of current instead of power on a line. Therefore, the model com-
P Q P Q
putes real and reactive current on a line, {Iijc , Iijc } ∀ijc ∈ E, instead of {Fijc , Fijc } ∀ijc ∈ E
which is the real and reactive power on a line. Similar to the rectangular power-voltage
modelin Section 3.2, the IV formulation uses the rectangular form of complex quantities,
P 2 Q 2
Vi = (Vi ) + (Vi ) ∀i ∈ N . Therefore, line flow constraints are once again quadratic
in nature with constant sine and cosine quantities.
Equations (40-43) define real and reactive current flow on a line, and (44-45) define the
node balance constraints. Equations (46-47) impose bounds on the voltage magnitude and
current magnitude respectively, and (48) defines other variable bound constraints. Note
that the current formulation does not contain interface flow constraints because converting
current to power is counter-intuitive in a current-based formulation. In addition, interface
constraints were historically used to control LMP prices while current based formulations
were used to consider network stability. The IV formualtion also imposes limits on cur-
rent magnitude in (47) instead of using simple variable bounds on the real such as in the
rectangular model ((39) as we find this data is more easily available.

X
min c̃i (Pi )
P Q
P,Q,I ,I ,V
i
! !
1 E
bC
ijc Q
s.t. P
Iijc = 2 gijc ViP
− +bEijc Vi
τijc 2
1  E P 
− gijc Vj − bEijc VjQ cos (φijc )
τijc
1  E Q 
+ gijc Vj + bEijc VjP sin(φijc ) ∀ijc ∈ E (40)
τijc
! !
P E P E
bC
ijc Q
Ijic = gijc Vj − bijc + Vj
2
1  E P 
− gijc Vi − bEijc ViQ cos(−φijc )
τijc
1  E Q 
+ gijc Vi + bEijc ViP sin(−φijc ) ∀ijc ∈ E (41)
τijc

9
! !
Q 1 bC
ijc
Iijc = 2 E
gijc+ViQ + bEijc
ViP
τijc 2
1  E Q 
− gijc Vj + bEijc VjP cos (φijc )
τijc
1  E P 
− gijc Vj − bEijc VjQ sin (φijc ) ∀ijc ∈ E (42)
τijc
! !
C
Q 1 bijc
Ijic = 2 E
gijc ViQ + bEijc + ViP
τijc 2
1  E Q 
− gijc Vi + bEijc ViP cos(−φijc )
τijc
1  E P 
− gijc Vi − bEijc ViQ sin(−φijc ) ∀ijc ∈ E (43)
τijc
 
X X X
Pk − dP i − Vi
P  P
Iijc + P 
Iijc
k∈Gi (jc):ijc∈E (jc):jic∈E
 
X X
− ViQ  Q
Iijc + Q 
Iijc
(jc):ijc∈E (jc):jic∈E
 
− (ViP )2 + (ViQ )2 gis = 0 ∀i ∈ N (44)
 
X X X
Qk − dQ
i + Vi
P  Q
Iijc + Q 
Iijc
k∈Gi (jc):ijc∈E (jc):jic∈E
 
X X
− ViQ  P
Iijc + P 
Iijc
(jc):ijc∈E (jc):jic∈E
 
+ (ViP )2 + (ViQ )2 bsi = 0 ∀i ∈ N (45)
2
V 2i ≤ (ViP )2 + (ViQ )2 ≤ V i ∀i ∈ N (46)
  2 
P 2 Q 2

Iijc + Iijc ≤ I ijc ∀k ∈ I (47)

ui P i ≤ Pi ≤ ui P i , ui Qi ≤ Qi ≤ ui Qi ∀i ∈ G (48)

Note that the current flow equations (40-43) are linear and that (44-46) involve quadratic
and linear terms. This would lead us to hope that since the Hessian of the current-voltage
constraints is constant, we might see some benefit in solution time, though in practice,
this has not been found to be the case in general. Additionally, because this model limits
apparent current rather than apparent power on lines, the solutions tend to be slightly
different than the other ACOPF models.

10
3.4 Y-bus formulations
The Y-bus formulations of the above AC models, ybus polar acopf.gms, ybus rect acopf.gms
and ybus iv acopf.gms use the Y-bus admittance matrix to calculate in the node balance
equations, instead of explicit line flow variables FiP jc, FiQ jc for example. For discussion on
how to compute the Y-bus admittance matrix, please refer to Bergen and Vittal’s text on
Power Systems Analysis [3].
Although the Y-bus matrix formulation benefits by eliminating line flow parameters
in node balance constraints, it loses this benefit in the case where line flow variables still
need to be defined in order to maintain line flow limits. For this reason, we find that
the standard line power (SLP) models (polar acopf.gms, rect acopf.gms, iv acopf.gms)
typically outperform the Y-bus models due to the additional computation required. This
document only provides the mathematical formulation for the Y-bus Polar-Power voltage
model as the other two formulations are very similar in implementation and can be inferenced
from here.

X
min c̃i (Pi )
P Q
P,Q,F ,F ,θ,V
i

P 1 E 2
s.t. Fijc = 2 gijc Vi
τijc
1 E
cos(θi − θj − φijc ) + bEijc sin(θi − θj − φijc )

− Vi Vj gijc ∀ijc ∈ E (49)
τijc
P E
Fjic = gijc Vj2
1 E
cos(θj − θi + φijc ) + bEijc sin(θj − θi + φijc )

− Vi Vj gijc ∀ijc ∈ E (50)
τijc
!
Q 1 E
bC
ijc
Fijc = − 2 bijc + Vi2
τijc 2
1 E
cos(θi − θj − φijc ) − bEijc sin(θi − θj − φijc )

− Vi Vj gijc ∀ijc ∈ E (51)
τijc
!
Q bCijc
Fjic = − bijc + Vj2
2
1 E
cos(θj − θi + φijc ) − bEijc sin(θj − θi + φijc )

− Vi Vj gijc ∀ijc ∈ E (52)
τijc

11
X
Pk − d P 2 s
i − (Vi ) gi
k∈Gi
X 
− Vi Vj YijP cos (θi − θj ) − YijQ sin (θi − θj ) = 0 ∀i ∈ N (53)
j∈N
X
Qk − dQ 2 s
i + (Vi ) bi
k∈Gi
X 
− Vi Vj YijP sin (θi − θj ) − YijQ cos (θi − θj ) = 0 ∀i ∈ N (54)
j∈N
X
P I
Fijc ≤ Fk ∀k ∈ I (55)
ijc,jic∈Ek
−π π
≤ θi − θj ≤ ∀(ij) : ijc ∈ E (56)
3 3
ui P i ≤ Pi ≤ ui P i , ui Qi ≤ Qi ≤ ui Qi ∀i ∈ G
P P P
V i ≤ Vi ≤ V i ∀i ∈ E ; −F ijc ≤ Fijc ≤ F ijc ∀ijc ∈ E (57)

3.5 Initial conditions of AC OPF models


Due to the difficulty of solving AC models, we have provided multiple starting point options
for the SLP models where the variables are initialized using different methods. This is
determined by the GAMS model option ic=#, and takes inputs 1, 2... 9. We explain some
of these options below.

1. ic=0: [Midpoint]
Vi = V +V
2 , θi = 0 ∀i ∈ N
P k +P k Qk +Q
Pk = 2 , Qk = 2
k
∀k ∈ G
2. ic=1: [Random]
Vi = Uniform(V , V ), θi = Uniform(−π, π) ∀i ∈ N
Pk = Uniform(P k , P k ), Qk = Uniform(Qk , Qk ) ∀k ∈ G
3. ic=2: [Flat]
Vi = 1, θi = 0 ∀i ∈ N
Pk = 0, Qk = 0 ∀k ∈ G
4. ic=3: [Random/AC]
Vi = Uniform(V , V ), θi = Uniform(−π, π) ∀i ∈ N
Pk , Qk derived from node balance constraints (model dependent) with Vi , θi defined
∀i ∈ N , k ∈ G.
5. ic=4: [DC/AC]
Vi = 1 ∀i ∈ N
θi , Pk initialized solving DCOPF (2-6) ∀i ∈ N , k ∈ G.
Qk derived from node balance constraints (model dependent) with Vi , θi defined ∀i ∈
N , k ∈ G.

12
6. ic=5: [DC-/AC]
Vi = 1, θi initialized solving DCOPF (2-6) ∀i ∈ N , k ∈ G.
Pk , Qk derived from node balance constraints (model dependent) with Vi , θi defined
∀i ∈ N , k ∈ G.
7. ic=6: [Decoupled]
Vi , θi , Pk , Qk initialized by solving the Decoupled AC model (72-77, 78-82).
8. ic=7: [DCLoss]
Vi = 1 ∀i ∈ N
θi , Pk initialized solving DCOPF (2-6) with option --lineloss=1.055 ∀i ∈ N , k ∈ G.
Qk derived from node balance constraints (model dependent) with Vi , θi defined ∀i ∈
N , k ∈ G.

3.6 Unit commitment AC models


The model archive provides 3 unit commitment AC models, uc polar, uc rect and uc iv
which are unit commitment versions of the above SLP models. When solving for t ∈ T , the
generators can be turned on/off throughout such that the set of dispatched generators may
change for each time period. Much like the UC DC model in 2.3, additional constraints
include generator ramping, minimum up-time and minimum down-time, and unit commit-
ment variables U = {U on , U off , U run } are factored into generator power limits. In the case of
the polar model, the unit commitment model adds dimension t ∈ T to variables in equations
(22 - 29), and adds additional binary handling variables, as shown below.

X
min c̃i (Pit )
P,Q,F P ,F Q ,θ,V
it
X
min c̃i (Pi )
P,Q,F P ,F Q ,θ,V
i

P 1 E 2 1
s.t. Fijct = 2 gijc Vit − Vit Vjt
τijc τijc
E
cos(θit − θjt − φijc ) + bEijc sin(θit − θjt − φijc )

gijc ∀ijc ∈ E, t ∈ T (58)
P E 1
Fjict = gijc Vjt2 − Vit Vjt
τijc
E
cos(θjt − θit + φijc ) + bEijc sin(θjt − θit + φijc )

gijc ∀ijc ∈ E, t ∈ T (59)
!
Q 1 E
bC
ijc 1
Fijct = − 2 bijc + Vit2 − Vit Vjt
τijc 2 τijc
E
cos(θit − θjt − φijc ) − bEijc sin(θit − θjt − φijc )

gijc ∀ijc ∈ E, t ∈ T (60)
!
Q bC
ijc 1
Fjict = − bijc + Vjt2 − Vit Vjt
2 τijc
E
cos(θjt − θit + φijc ) − bEijc sin(θjt − θit + φijc )

gijc ∀ijc ∈ E, t ∈ T (61)

13
X X X
P P
Pkt − Fijct − Fijct − dP 2 s
it − (Vit ) gi = 0 ∀i ∈ N , t ∈ T (62)
k∈Gi (jc):ijc∈E (jc):jic∈E
X X Q
X Q
Qkt − Fijct − Fijct − dQ 2 s
it + (Vit ) bi = 0 ∀i ∈ N , t ∈ T (63)
k∈Gi (jc):ijc∈N (jc):jic∈E
X
P I
Fijct ≤ Fk ∀k ∈ I, t ∈ T (64)
ijc,jic∈Ek
−π π
≤ θit − θjt ≤ ∀(ij) : ijc ∈ E,
3 3
t ∈ T (65)
Uitrun ∗ Qi ≤ Qit ≤ Uitrun ∗ Qi ∀i ∈ G, t ∈ T (66)
and(15 − 20)
0 ≤ Pit ≤ P i , min(0, Qi ) ≤ Qit ≤ Qi ∀i ∈ G, t ∈ T
V i ≤ Vit ≤ V i ∀i ∈ E, t ∈ T
P P P
− F ijc ≤ Fijct ≤ F ijc ∀ijc ∈ E, t ∈ T
Uiton , Uitoff , Uitrun ∈ {0, 1} ∀i ∈ G, t ∈ T (67)

4 Decoupled AC Model
Due to the nature of the non-convexity in the power flow equations, large scale ACOPF
models are challenging to solve, and research continues to seek algorithms that can pro-
vide fast, scalable, and robust solution techniques. Approximations, decompositions and
engineering judgment are commonly used to obtain practical solutions. Given that realistic
sized models depend on “good” initial conditions to satisfy reasonable computational time
and robust convergence, this suggests that if we have a starting point that is fairly close to
a feasible ACOPF solution, it may be possible to improve solution time and convergence.
The decoupled ACOPF model (polar decoupled.gms) may potentially serve this purpose
by providing an initial starting point for the full ACOPF. Note that the model archive also
contains ybus polar decoupled.gms which uses the y-bus admittance matrix as disccused
in 3.4.

4.1 The Power Flow Equations


The power flow equations decribe the power system network operating point in steady state
and hence are based on complex phasor representation of voltage-current relationships at
each bus. Using polar coordinates for complex voltages and rectangular representation for
complex power, the active and reactive power flow node balance equations at bus i ∈ N are
formulated by (68 - 69) respectively.

14
n
X
Pi = Pi − dP
i = (|Vi ||Vk |Gik cos(θi − θk ) + |Vi ||Vk |Bik sin(θi − θk )) ∀i ∈ N (68)
k=1
Xn
Qi = Qi − dQ
i = {|Vi ||Vk |Gik sin(θi − θk ) − |Vi ||Vk |Bik cos(θi − θk )} ∀i ∈ N (69)
k=1

The most commonly used technique to solve the non-linear power flow equations above
is Newton-Raphson. This method requires derivatives of the power flow equations with
respect to voltage magnitudes and angles, and is referred to as the power flow Jacobian
matrix, The power flow formulation using the Jacobian matrix using (70).

    
J11 J12 4θ 4P
=
J21 J22 4V 4Q

Where

∂P bus ∂P bus ∂Qbus ∂Qbus


J11 = , J12 = , J21 = , J22 = (70)
∂θ ∂V ∂θ ∂V
In most real world applications, other assumptions can be made on the range of both
parameters and solution variables. Two inequalities that commonly appear in many power
flows applications are:
x
 1 and also |θi − θk | < 20o
r
Both of these relationships prove to have small values in J12 and J21 submatrix, and these
small values suggest a weak link between active power and voltage magnitude, as well as
reactive power and voltage angle. Therefore, if J12 and J21 in (70) are neglected in the
power flow calculation, one obtains the Fast Decoupled Load Flow, for which the linearized
relations are:

J11 × 4θ = 4P
J22 × 4V = 4Q (71)

We employ this idea to decompose the full AC optimal power flow into two subproblems.

4.2 Model
Since voltage magnitudes have weak impact on active power injections, voltage magnitudes
may be treated as constant values when solving the active power subproblem. Similarly,
voltage angles are assumed to weakly impact reactive power injections. This suggests em-
ploying voltage angles as constant values for reactive power subproblem. The constant
values (voltage magnitudes) for active power subproblem are needed to be specified to start
P-Q decoupling. These starting points are a solution of power flow problem having voltage
phasors and apparent power injections of each bus. The number of rows for bus, branch
and generator vectors are |N |,|E| and |G| respectively.

15
P − θ subproblem
For the P − θ subproblem, the voltage magnitude at each bus is fixed as a constant value,
denoted as Vb , while reactive power balance equations are neglected in the constraint set.
The solution vector for the standard P − θ OPF problem consists of an |N | × 1 vector of
voltage angles θi , ∀i ∈ N , and a |G| × 1 vector of generator active injections Pi , i ∈ G. The
decision variable xP θ has dimension |N | + |G| × 1.
 
θ
xP θ =
P
The objective function is to minimize a summation of each generator quadratic or piecewise-
linear cost function (72) subject to (73 - 77).

X
min c̃i (Pi ) (72)
Q,V
i∈N

s.t. g1 (x) = Pi (θi , Vbi ) + dP 2 s


i + (Vi ) gi − Pi = 0, ∀i ∈ N (73)
hf (x) = | Fijc (θij , Vbij ) | −lijc ≤ 0 ∀ijc ∈ E (74)
ht (x) = | Fjic (θij , Vbij ) | −ljic ≤ 0 ∀ijc ∈ E (75)
−π π
≤ θ(i) − θ(j) ≤ ∀(ij) : ijc ∈ E (76)
3 3
P i ≤ Pi ≤ P i ∀i ∈ G (77)

Q − V subproblem
For the Q − V subproblem, the voltage angles are fixed as a constant value denoted θ.b The
equality power flow equations for the active power are neglected in the constraint set. The
optimization vector xQV for the standard Q − V OPF problem consists of the |N | × 1 vector
of voltage magnitude Vi , i ∈ N and the |G| × 1 vectors of generator reactive injections
Qi , i ∈ G. The dimension of the decision variable xQV is |N | + |G| × 1.
 
V
xQV =
Q
The objective function is to minimize a transmission line loss which is a function of voltage
phasors (78) subject to (79-82).
 
X X
min Vi2 gis + Fijc  (78)
i∈N (jc):ijc,jic∈E

s.t. g2 (x) = Qi (θbi , Vi ) + dQ 2 s


i − (Vi ) bi − Qi = 0 ∀i ∈ N (79)
hf (x) = | Fijc (θbij , Vij ) | −lijc ≤ 0 ∀ijc ∈ E (80)
ht (x) = | Fjic (θbij , Vij ) | −ljic ≤ 0 ∀ijc ∈ E (81)
Qi ≤ Qi ≤ Qi ∀i ∈ G , V i ≤ Vi ≤ V i ∀i ∈ N (82)

16
Note that inequality constraints for line flow limit are included in both problems to
represent the security requirements on the system.

Using the model


Decoupled AC OPF can be solved iteratively until an optimal solution converges to serve
as an initial condition for the full AC OPF, and each subproblem uses the flat initial con-
dition (x.l=1) for first interation, and optimal solutions of previous subproblems after first
iteration. This can be invoked from the command line with the following options:
• --iter=#
Specifies the number of iterations. The default is 1.
For each formulation, three different models are provided: one version where power
flows on lines are handled by explicitly defining them as variables, one condensed version
where these equality constraints are removed and power flows are incorporated into the node
balance equations, and one version which calculates the node admittance matrix which is
used to calculate power or current injections at each bus. We use the convention that a
positive flow on a line represents a withdrawal at its source end and an injection at its
terminating end.

5 Map of formulation to GAMS notation


This section provides a mapping of the nomenclature used in this document to the actual
set, parameter and variables names used in the GAMS code.

Set GAMS notation


N i, j, bus
G gen, gen1
I interface
c∈C circuit, c
t∈T t
E ⊆N ×N ×C line(i,j,c)
Ei ⊆ E interfacemap(interface,i,j,c)
Gi ∈ G atBus(gen,i)

Table 4: Mapping of Sets

17
Parameters GAMS notation
c̃i (·) c obj (equation)
Q
dP
it , dit Pd(i,t), Qd(i,t)
rijc , xijc r(i,j,c), x(i,j,c)
gis , bsi gs(i), bs(i)
E
gijc , bEijc g(i,j,c), b(i,j,c)
C
bijc bc(i,j,c)
τijc , φijc ratio(i,j,c), angle(i,j,c)
YijP , YijQ ybus(i,j,‘real’), ybus(i,j,‘imag’)
uit status(gen,t)
P
F ijc rateA(i,j,c)
I
Fi interfaceLimit(interface)
I ijc currentrate(i,j,c)
P i, P i Pmin(gen), Pmax(gen)
Qi , Qi Qmin(gen), Qmax(gen)
run
U run
i , Ui minuptime(gen), mindowntime(gen)
ramp
U ramp
i , Ui rampup(gen), rampdown(gen)
V i, V i minVm(i), maxVm(i)

Table 5: Mapping of Parameters

Variables Description
P Q
Fijct , Fijct V LineP(i,j,c,t), V LineQ(i,j,c,t)
P Q
Iijct , Iijct V LineIr(i,j,c,t), V LineIq(i,j,c,t)
Pit , Qit V P(gen,t), V Q(gen,t)
Vit , θit V V(i,t), V Theta(i,t)
VitP , VitQ V real(i,t), V imag(i,t)
Uiton , Uitoff , Uitrun V startup(gen,t), V shutdown(gen,t), V genstatus(gen,t)

Table 6: Mapping of Variables

18
References
[1] Hedman, K. W., O’Neill, R. P., Oren, S. S., “Analyzing valid inequalities of the gener-
ation unit commitment problem” In Power Systems Conference and Exposition, 2009.
PSCE’09, IEEE/PES. IEEE (pp. 1-6), March 2009.
[2] Zimmerman, R.D., Murillo-Sanchez, C.E., “MATPOWER 5.1: User’s manual”

[3] Bergen, Arthur R., Vittal, Vijay, “Power Systems Analysis” (2nd ed.) Prentice Hall, NJ,
pp. 325-6.

19

You might also like