Beruflich Dokumente
Kultur Dokumente
I. I NTRODUCTION
language ideal for matrix and vector computations, a crossplatform runtime with robust math libraries, an integrated development environment and GUI with excellent visualization
capabilities, and an active community of users and developers.
As a high-level scientific computing language, it is well suited
for the numerical computation typical of steady-state power
system simulations.
The initial motivation for the development of the Matlabbased power flow and OPF code that would eventually become
M ATPOWER arose from the computational requirements of
the PowerWeb platform [3], [4]. As a web-based market
simulation platform used to test electricity markets, PowerWeb
requires a smart market auction clearing software that uses
an OPF to compute the allocations and pricing. Having the
clear potential to be useful to other researchers and educators,
the software was released in 1997 via the Internet as an opensource power system simulation package, now distributed
under the GNU GPL [2]. Even beyond its initial release, much
of the ongoing development of M ATPOWER continued to be
driven in large part by the needs of the PowerWeb project.
This at least partially explains the lack of a graphical user
interface used by some related tools such as PSAT [5].
While it is often employed as an end-user tool for simply
running one-shot simulations defined via an input case file, the
package can also be quite valuable as a library of functions
for use in custom code developed for ones own research. At
this lower level, M ATPOWER provides easy-to-use functions
for forming standard network Ybus and B matrices, calculating
power transfer and line outage distribution factors (PTDFs and
LODFs), and efficiently computing first and second derivatives
of the power flow equations, among other things. At a higher
level, the structure of the OPF implementation is explicitly
designed to be extensible [6], allowing for the addition of
user-defined variables, costs, and linear constraints.
The default OPF solver is a high-performance primal-dual
interior point solver implemented in pure-Matlab. This solver
has application to general nonlinear optimization problems
outside of M ATPOWER and comes with a convenience wrapper
function to make it trivial to set up and solve linear programming (LP) and quadratic programming (QP) problems.
To help ensure the quality of the code, M ATPOWER includes
an extensive suite of automated tests. Some may find the
testing framework useful for creating automated tests for their
own Matlab programs.
A number of Matlab-based software packages related to
(4)
(5)
D. Loads
Constant power loads are modeled as a specified quantity
of real and reactive power consumed at a bus. For bus i, the
load is
sid = pid + jqdi
(6)
and Sd = Pd + jQd denotes the nb 1 vector of complex
loads at all buses. Constant impedance and constant current
loads are not implemented directly, but the constant impedance
portions can be modeled as a shunt element described below.
Dispatchable loads are modeled as negative generators and
appear as negative values in Sg .
E. Shunt Elements
(7)
(8)
(9)
It = Yt V.
(10)
(11)
Yt = [Ytf ] Cf + [Ytt ] Ct
(12)
Ybus =
CfT Yf
CtT Yt
+ [Ysh ] .
(13)
Sbus (V ) = [V ] Ibus
= [V ] Ybus
V
(14)
Sf (V ) = [Cf V ] If = [Cf V ] Yf V
(15)
St (V ) = [Ct V ] It = [Ct V ] Yt V .
(16)
(17)
ys =
Pf () = Bf + Pf,shift
bc 0.
(18)
(25)
1
1
,
rs + jxs
jxs
(24)
(20)
By combining (1) and (2) with (18) and (19), the complex
current flow in a branch can be approximated as
1 1 jf
( e ej(t +shift ) ).
(21)
if
jxs
Furthermore, using (19) and this approximate current to compute the complex power flow, then extracting the real part and
applying the last of the DC modeling assumptions from (20)
yields
1
(f t shift ).
(22)
pf
xs
As expected, given the lossless assumption, a similar derivation for pt leads to pt = pf .
The relationship between the real power flows and voltage
angles for an individual branch i can then be summarized as
"
#
"
#
pf
f
i
i
= Bbr
+ Pshift
(23)
pt
t
"
#
"
#
bi bi
bi
i
i
i
where Bbr =
, Pshift = shift
, and bi
bi
bi
bi
is defined in terms of the series reactance and tap ratio for
that branch as bi = 1/xis i .
With a DC model, the linear network equations relate
real power to bus voltage angles, versus complex currents to
complex bus voltages in the AC case. Let the nl 1 vector
Bff be constructed similar to Yff , where the ith element is
bi and let Pf,shift be the nl 1 vector whose ith element is
i
equal to shift
bi . Then the nodal real power injections can
be expressed as a linear function of , the nb 1 vector of
bus voltage angles
Bf = [Bff ] (Cf Ct )
G. DC Modeling
(19)
(26)
(27)
gP (, Vm , Pg ) = Pbus (, Vm ) + Pd Cg Pg = 0
(30)
B. DC Power Flow
gQ (, Vm , Qg ) = Qbus (, Vm ) + Qd Cg Qg = 0.
(31)
For the AC power flow problem, the function g(x) from (29)
is formed by taking the left-hand side of the real power balance
equations (30) for all non-slack buses and the reactive power
balance equations (31) for all PQ buses and plugging in the
reference angle, the loads and the known generator injections
and voltage magnitudes:
" {i}
#
gP (, Vm , Pg )
i IPV IPQ
g(x) =
(32)
{j}
j IPQ .
gQ (, Vm , Qg )
The vector x consists of the remaining unknown voltage
quantities, namely the voltage angles at all non-reference buses
and the voltage magnitudes at PQ buses:
"
#
{i}
i
/ Iref
x=
(33)
{j}
j IPQ .
vm
This yields a system of nonlinear equations with npv +2npq
equations and unknowns, where npv and npq are the number
(35)
Pf = HPbus .
V
m
x=
(45)
Pg
(36)
min
x
subject to
f (x)
(41)
g(x) = 0
(42)
h(x) 0
(43)
xmin x xmax .
(44)
A. Standard AC OPF
Qg
ek = B
ef B 1
H
dc
(37)
ef and Bdc
then inserting a column of zeros at column k. Here B
are obtained from Bf and Bbus , respectively, by eliminating
their reference bus columns and, in the case of Bdc , removing
row k corresponding to the slack bus.
The PTDF matrix Hw , corresponding to a general slack
distribution w, can be obtained from any other PTDF, such
as Hk , by subtracting w from each column, equivalent to the
following simple matrix multiplication:
Hw = Hk (I w 1T ).
(38)
H = Hw (Cf Ct ) .
(39)
hij
i 6= j
(40)
lij =
1 hjj
1
i = j.
M ATPOWER includes functions for computing both the DC
PTDF matrix and the corresponding LODF matrix for either
a single slack bus k or a general slack distribution vector w.
ng
X
i
fPi (pig ) + fQ
(qgi ).
(46)
i=1
(47)
ht (, Vm ) = |Ft (, Vm )| Fmax 0.
(48)
Sf (, Vm ), apparent power
(49)
Ff (, Vm ) = Pf (, Vm ), real power
If (, Vm ), current
where If is defined in (9), Sf in (15), Pf = <{Sf }, and the
vector of flow limits Fmax has the appropriate units for the
type of constraint. It is likewise for Ft (, Vm ).
The variable limits (44) include an equality constraint on
any reference bus angle and upper and lower limits on all bus
voltage magnitudes and real and reactive generator injections:
iref i iref ,
i,min
i
i,max
vm
vm
vm
,
i,min
i
i,max
pg
pg pg
,
qgi,min qgi qgi,max ,
i Iref
(50)
i = 1 . . . nb
(51)
i = 1 . . . ng
(52)
i = 1 . . . ng .
(53)
B. Standard DC OPF
D. Standard Extensions
x=
(60)
Pg
m1 (x x1 ) + c1 ,
x x1
m2 (x x2 ) + c2 , x1 < x x2
c(x) =
(67)
..
..
.
.
mn (x xn ) + cn ,
xn1 < x
subject to
f (x) + fu (x, z)
(61)
g(x) = 0
(62)
h(x) 0
(63)
xmin x xmax
"
#
x
lA
u
z
zmin z zmax .
(64)
(65)
(66)
min
,Pg
subject to
ng
X
cj cj1
,
xj xj1
j = 1...n
(68)
j = 1 . . . n.
(69)
fPi (pig )
(54)
i=1
(55)
hf () = Bf + Pf,shift Fmax 0
(56)
ht () = Bf Pf,shift Fmax 0
(57)
iref i
pi,min
pig
g
(58)
iref , i
pi,max
,
g
Iref
i = 1 . . . ng
(59)
TABLE I
OPF T EST C ASES
Case Name
Cost
case9
case30
case npcc36
case118
case300
case2383wp
case2736sp
case3120sp
case2935
case21k
case42k
Q
Q
L
Q
Q
L
L
L
Q
L
L
nb
9
30
36
118
300
2,383
2,736
3,120
2,935
21,084
42,168
Sizes
ng
3
6
43
54
69
327
270
298
1,024
2,692
5,384
nl
9
41
121
186
411
2,896
3,269
3,693
7,028
25,001
50,001
AC OPF
nx
ngh
24
36
72
142
158
314
344
608
738
1,422
5,420
10,558
6,012
12,010
6,836
13,626
7,918
6,314
54,091
111,784
107,027
222,796
DC OPF
nx
ngh
12
27
36
112
79
278
172
490
369
1,122
2,710
8,175
3,006
9,274
3,418
10,506
3,959
3,379
30,315
90,700
59,475
180,628
Binding Constraints
min
Vm
|Sfmax
|
|Pfmax
|
/t
/t
0
0
0
0
2
0
0
0
0
0
0
0
0
0
0
2
6
5
0
1
1
0
8
10
19
7
9
3
64
40
3
137
66
TABLE II
OPF RUN T IMES
Case Name
case9
case30
case npcc36
case118
case300
case2383wp
case2736sp
case3120sp
case2935
case21k
case42k
Opt Tbx
0.147
0.935
13.5
4.07
0.713
8.24
10.2
94.8
7.80
8.36
10.4
86.8
7.69
14.1
17.7
384.9
12.8
15.2
18.1
1,262
15.3
822.1
1,027
578.8
5,232
5,933
3,700
SC-PDIPM
0.027
0.062
0.216
0.322
4.04
8.94
8.84
15.0
17.5
610.4
3,701
1.74
1.84
9.96
6.98
7.32
7.95
5.28
5.68
256.9
263.8
1,241
1,224
Opt Tbx
Ray Daniel Zimmerman (M89) is a Senior Research Associate in electrical engineering and applied economics and management at Cornell University, Ithaca, NY. He is the lead developer of
the PowerWeb electricity market simulation platform
and the M ATPOWER power system simulation software. His current research interests center on the
interactions between the economic and engineering
aspects of electric power system operations and
planning. Other interests include software tools for
education and research.
Carlos Edmundo Murillo-Sanchez (M99) received the electronics engineering degree from
ITESM, Monterrey, Mexico, in 1987, the M.Sc.
degree in electrical engineering from the University
of Wisconsin-Madison in 1991, and the Ph.D. degree
in electrical engineering from Cornell University,
Ithaca, NY, in 1999. He is a Professor of engineering
at the Universidad Autonoma de Manizales, Manizales, Colombia, and a Professor at the Universidad
Nacional de Colombia, also in Manizales. He is
a founding member of the Colombian Automation
Society (Asociacion Colombiana de Automatica). His interests include power
systems operation and control, control systems applications, optimization,
simulation, and mechatronics.
Robert John Thomas (LF08) is Professor Emeritus of Electrical Engineering at Cornell University,
Ithaca, NY. He has held sabbatical positions with
the U.S. Department of Energy Office of Electric
Energy Systems (EES) in Washington, DC, and at
the National Science Foundation as the first Program
Director for the Power Systems Program in the Engineering Directorates Division of Electrical Systems
Engineering. His current technical research interests
are broadly in the areas of analysis and control of
nonlinear continuous and discrete time systems with
applications to large-scale electric power systems. Prof. Thomas is a member
of Tau Beta Pi, Eta Kappa Nu, Sigma Xi, and ASEE.