ATPOWER: A atlab Power System Smulato Packae R. Zmmerma D. Ga rz@corell.edu deqa@ee.corell.edu Power Systems Eeer Research Ceter (PSERC) School of Electrcal Eeer, Corell Uversty INTRODUCTION... THE POWER FLOW SOLVER... THE OPTIAL POWER FLOW FORULATION... THE OPTIIZATION TOOLBOX BASED OPF SOLVER... THE LP-BASED OPF SOLVER... Geeral Itroducto...3 The Sparse Solver...4 The Dese Solver...7 The Formulato of LP Sub-problem...7 Solv the LP Sub-problem...8 Comput KT ultplers (complete)...8 Check KT Codtos (complete)...8 Comput Geerato-load Shft Factors (complete)...9 The acoba atrx of Load Flow...9 Learzed Formulato of Le Flow... TEST RESULTS (INCOPLETE)... THE COBINED UC-OPF SOLVER (INCOPLETE)... FINAL REARKS (INCOPLETE)... REFERENCE... Itroducto The restructur of the electrc power dustry may parts of the world s creat a eed for ew aalytcal as well as smulato tools. To test ew deas ad methodoloes for the operato of compettve power systems, researchers eed to have ready access to smulato tools whch are easy to use ad modfy. The ATPOWER packae, a set of atlab m-fles developed by PSERC at Corell Uversty, s teded as such a tool. At preset, ATPOWER ca be used to solve the follow problems: power flow (based o Newto s method) optmal power flow (us the costr fucto atlab s Optmzato Toolbox) optmal power flow (us a LP-based approach) optmal power flow wth a heurstc for tur off expesve eerators Future versos of ATPOWER may clude the ablty to do: ecoomc dspatch ut commtmet combed ut commtmet ad optmal power flow traset stablty stablty-costraed optmal power flow Ths ote s smply a techcal ote mataed by the authors descrb the detals of the alorthms mplemeted ATPOWER. Its purpose s to provde techcal detals for those terested modfy or exted the curret fuctoalty.
The Power Flow Solver The power flow solver ATPOWER s based o a stadard full-acoba Newto s method, descrbed detal may textbooks. It does ot clude ay trasformer tap cha or feasblty check. The method for buld the acoba came from Chrs Dearco. We foud that t solves the IEEE 3-bus system o our Su Ultra uder secods. The Optmal Power Flow Formulato The OPF problem s formulated as follows: mze P,Q f S. T. P P P( V, θ ) (Actve power equatos) L Q Q Q( V, θ ) (Reactve power equatos) L S S V f t S S V V V m (Costrats o apparet power of le flow, from sde) (Costrats o apparet power of le flow, to sde) (Voltae costrats) (Voltae costrats) P P Q P Q P Q m Q m (Actve power eerato lmts) (Actve power eerato lmts) (Reactve power eerato lmts) (Reactve power eerato lmts) The OPF formulato descrbed above s used for both the Optmzato Toolbox based OPF ad the LP-based OPF. The obectve fucto of the OPF problem s assumed to be summato of costs of dvdual eerators. The cost of each eerator s expressed the form of ether quadratc fucto or pece-wse lear curve. The Optmzato Toolbox based OPF Solver Implemetato of the Optmzato Toolbox based OPF s qute strahtforward. For detals, see the fle OTopf.m. The LP-based OPF Solver I ths chapter, we wll descrbe the alorthms mplemeted our LP-based OPF solver. The obectve fucto of the OPF problem s assumed to be summato of costs of dvdual eerators. The cost of each eerator s expressed the form of ether quadratc fucto or pece-wse lear curve. The quadratc cost fucto of th eerator s defed as follows: f C + C P + C P The pece-wse lear cost fucto of th eerator s defed as follows (see F. ): f α + βp +... + βkpse, ( ).
P P + + P... se, ( ) P P Where α s a costat, β deotes the slope of each lear fucto, P s called semetal power ths ote. Note that the cost curve must be covex, otherwse the solver could et wro soluto. Ths approach of model eerator cost fucto s called oe-semet-oe-varable approach [Stott, 979]. cost P P F. Cost Curve of Geerator Geeral Itroducto LP-based OPF method has bee extesvely examed, ad used qute a few moder power systems. The alorthm we coded s perhaps dfferet from that producto-rade software. The maor dfferece s that our alorthm s much smpler. The reaso of do so s, certaly, to make the OPF solver more re-usable. The flow chart of our solver s demostrated F. 3. Ru AC load flow Learze OPF costrats Formulate ad solve LP sub-problem Update soluto Check f the soluto meets KT Codto yes STOP F. 3 Flow Chart of LP-based OPF Solver 3
The stopp crtera, the selecto of start pot, hadl feasbltes, etc. wll be explaed the com verso of ths ote. The LP-based OPF solver ca ot hadle OPF problems wth quadratc cost fucto drectly. If the cost formato of eerators s ve by quadratc fuctos, the quadratc curves wll be dscretzed to pece-wse lear fuctos -fle opf.m. So ths chapter, we assume that the cost of eerators s pece-wse lear. We have developed two varats of LP-based OPF solver, oe s called dese solver, ad aother s sparse solver. I the alorthm of dese solver, load flow equatos are elmated, so are etwork voltaes. I sparse solver, load flow equatos are preserved. The dese solver s more depedet o the performace of LP solver but s less readable, whle sparse solver s more readable but s more depedet o the performace of LP solver. I subsequet text, we wll ve the detals uderly both solvers. The Sparse Solver The alorthm of sparse solver s pretty strahtforward. I ths secto, we wll ust ve the equatos of learzed OPF oly: 4
mze ( β P +... + β P, se ( )) +... + ( β P +... + β Pse, ( )) θ V,, P G, Q G se( ) S.T. P - P G (,,) P Q V V + + P Q - P (,, b) - Q G (,, b) S S l f l t V + V + S l f S l t S S (l,.., l) S S (l,.., l) V V V l l l V V V m l G P G P P (,, ) P G P m P (,, ) G G Q G Q Q (,, ) Q G Q m Q (,, ) G G G G G P G P P (,,,,, se()) G G P G (,,,,, se()) P G 5
The above formulato ca be expressed matrx form as follows: IN [ β] V θ P Q P S.T. P - pp P PV, ref V + Pθ, ref Eref Pref, PV V + Pθ θ - P QV V + Qθ θ - Q f S V t S V S f + S S + S t S S V V V V V V m P P P P P P Q Q Q m Q Q Q m - P P P P - P (Step sze costrats) - Q (Step sze costrats) Note: Eref, PV, ref, P θ, ref are the rows correspod to referece bus. 6
The Dese Solver The Formulato of LP Sub-problem The voltae varables ad load flow equatos sparse formulato ca be elmated based o: V PV QV Pθ Qθ E P E Q. V G G P G G Q S S V S S G G S V θ G G G ref V [ T T ] The well-kow dese formulato of LP sub-problem s as follows: IN [ β] P Q P P Q S.T. P - pp P ( P, Iref ) P + Q, Q (I ref : the ref row of ut matrx) f f T P + T Q S S t t T P + T Q S S G P + G Q V V -G P - G Q V Vm P P P P P P Q Q Q m Q Q Q m - P P P P - P - Q 7
Solv the LP Sub-problem It s well recozed that oly a few costrats a typcal OPF problem are bd. Based o ths observato, the so-called Iteratve Costrat Search [B. Stott, 979] s employed our code to solve LP sub-problem. We wll expla the alorthm detal com verso of our ote. Comput KT ultplers (complete) Sce load flow equatos do ot appear explctly the dese LP sub-problem, so we ca ot et KT multplers correspod to load flow equatos drectly from LP solver, we have to compute them. Before we expla how to compute KT multplers, let us recall what codtos optmal soluto ad KT multplers meet. Apply the Kuh-Tucker codto drectly to a LP problem, we have: A T λ c Ax b T A λ c A x b where A s composed of the bd terms of coeffcets matrx A of a LP problem. The above formula s the bass we compute KT multplers. Let us rewrte the costrats of sparse LP formulato as: E u + P x Eu + x Du + Bx S Where: u cotas cotrollable varables, x cotas state varables V ad θ. atrx D ad B otly deote a submatrx of sparse learzed LP matrx. The sub-matrx s composed of the bd rows of the equalty costrats. Bd costrats s detfed after LP s solved. Sce A T λ c, t follows: T T T B E E D T T T λ λ β µ We are oly terested the frst equato, that s, T T T λ + λ + B µ Varable λ ad µ are provded by LP solver (the dual vector). Solv the above equato, we et λ. Check KT Codtos (complete) ( ) L f P + λ + µ h L u l P β λ µ µ 8
L P tras lf u l λ λ µ + µ L lf u l λ µ + µ Q λ µ µ µ f µ L hk S S k u l s k + k k s kt k k k L λ P V θ µ S f µ S t (, ) s s Comput Geerato-load Shft Factors (complete) Ths -fle s ot avalable to users. Pθ PV θ P Qθ QV V Q Pθ + PV V P Qθ + QV V ( P PV QV Q ) P θ θ P X H θ / P atrx H s kow as matrx of eerato-load shft factor. The acoba atrx of Load Flow NB ( ) P( V, θ) V V G cosθ + B sθ P P NB ( ) Q( V, θ) V V G sθ B cosθ Q ( sθ cos θ ) ( cosθ sθ) VV G B P ( sθ cosθ) V V G B, Q B V VV G + B ( cosθ sθ) Q V V G + B, P GV Q V G sθ B cosθ ( cosθ s θ ) ( ) V G + B 9
P ( θ θ ) V G cos + B s + V G, Q ( θ θ ) V G s B cos V B, ( ) V P + G V ( B V ) V Q Learzed Formulato of Le Flow S P P P ^ V V V ( )( ) V VV cosθ sθ cosθ + sθ V VV sθ VV cosθ ( cosθ) sθ RVV sθ + X( V VV cosθ) R V VV VV X R( V V cos θ ) V X sθ RV θ V X θ cos s P RVV sθ VV X cosθ P RVV sθ VV X cosθ S P + Q S Q Q Q R + X ( cosθ ) RV sθ + X V V RV sθ XV cosθ Q RVV cosθ + XVV sθ Q RVV cosθ + XVV sθ P P + Q Q ( R X) Test Results (complete) The Combed UC-OPF Solver (complete) Fal Remarks (complete) Referece O. Alsac,. Brht,. Pras, B. Stott, Further Developmets LP-based Optmal Power Flow, IEEE Tras. O Power Systems, vol. 5, o. 3, 99, pp. 697-7 B. Stott,.L. aro, O. Alsac, Revew of Lear Proramm Appled to Power System Reschedul, 979 PICA, pp 4-54