MATPOWER OPF Slides PDF
MATPOWER OPF Slides PDF
Architecture
Ray Zimmerman, Cornell University
Carlos Murillo-Snchez, Universidad Autonoma de Manizales
Robert J. Thomas, Cornell University
PSERC
Outline
MATPOWER Overview
Standard Extensions
Software Architecture
MATPOWER Overview
What does MATPOWER do?
MATPOWER History
MATPOWER Package
Standard Extensions
Software Architecture
MATPOWER 3.2
1st PF and OPF code of my own - version 2 case format
- based on Opt Tbx, constr() - gen capability curves
- branch angle diff lims
- PTDFs
1st public MATPOWER release - TSPOPF
- not widely publicized
- PWL costs
MATPOWER 3.0
- MINOS-based OPF (gen. form.)
MATPOWER 1.0 - fmincon-based OPF
- in-house successive LP-based OPF - DC PF & OPF
- multiple gens/bus
- Gauss-Seidel PF
MATPOWER 2.0 - improved DP de-commitment
- fast decoupled PF - automated tests
- successive LP-based OPF - separate disp. load output section
- options vector - option for active power line lims
- Users Manual - option to enforce Qg lims in PF
1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009
MATPOWER Package
Set of functions you can run from Matlab command line or include in your own
programs
Example:
MATPOWER Overview
Standard Extensions
Software Architecture
min f (x)
x
subject to
g(x) = 0
h(x) 0
xmin x xmax
Standard OPF Formulation
ng
!" #
min fP (pi ) + fQ (qi )
i i
,V,P,Q
i=1
subject to
gP (, V, P ) = 0
gQ (, V, Q) = 0
hf (, V ) 0
ht (, V ) 0
ref i ref , i = iref
vimin vi vimax , i = 1 . . . nb
pmin
i p i p max
i , i = 1 . . . ng
qimin qi qimax , i = 1 . . . ng
Generalized Formulation
wi wi
mi
ri
ri
ri ri
ki ki ki ki
mi fdi (ui + ki ), ui < ki !
, if di = 1
u = r r wi = 0, ki ui ki fdi () =
2 , if di = 2
mi fdi (ui ki ), ui > ki
User-Defined Constraints
! "
x
lA u
z
inequality constraints
MATPOWER Overview
Standard Extensions
piece-wise linear costs
dispatchable (price sensitive) loads
generator reactive capability constraints
branch angle difference limits
Software Architecture
c2 y mj (x xj ) + cj , j = 1...n
p1
1
2
p1
p2 2
MW p2
p (load)
q
q1max
qmax
q2max
p
q2min
qmin
q1min
p1 pmin pmax p2
Generator Reactive Capability Constraints
q
q1max
qmax
q2max
p
q2min
qmin
q1min
p1 pmin pmax p2
Outline
MATPOWER Overview
Standard Extensions
Software Architecture
Overview of Execution - Callbacks
Adding Variables
Adding Constraints
load data
run optimization
load data
run optimization
Qg
name description
y
Va bus voltage angles
Vm bus voltage magnitudes
z
Pg generator real power injections
Qg generator reactive power injections
y CCV helper variables for pwl costs
z other user defined variables
Software Architecture - Constraints
MATPOWER Overview
Standard Extensions
Software Architecture
!
Additional reserve cost: fu (x, z) = ci ri
iU
name description
Ar = [I I];
om = add_vars(om, 'R', ng, [], Rmin, Rmax);
om = add_constraints(om, 'Pg_plus_R', Ar, [], Pmax, {'Pg', 'R'});
om = add_constraints(om, 'Rreq', Az, Rreq, [], {'R'});
om = add_costs(om, 'Rcost', struct('N',I,'Cw',Rcost), {'R'});
Goals & Applications
Example applications:
co-optimize energy and reserves
add environmental costs (e.g. CO2, SOx, NOx) or constraints
contingency constrained OPF