Professional Documents
Culture Documents
Solving Power Flow Problems With A Matlab Implementation of The Power System Applications Data Dictionary
Solving Power Flow Problems With A Matlab Implementation of The Power System Applications Data Dictionary
Solving Power Flow Problems With A Matlab Implementation of The Power System Applications Data Dictionary
Fernando L. Alvarado alvarado@engr.wisc.edu ECE Department, The University of Wisconsin, Madison, Wisconsin 5 !"5
Abstract
This paper implements a power flow application and variations using the IEEE Power System Application Data Dictionary within a Matlab environment. It describes a number of useful data and implementation techni ues for a variety of applications. The techni ues include the use of very compact and efficient code for the computation of Power Transfer Distribution !actors. Power Transfer Distribution !actors are an important element of present and proposed congestion management strategies for power systems" particularly when these systems must operate in a deregulated environment. #eywords$ databases" IEEE %ommon !ormat" data e&change.
1. Introduction
This paper provides a #rief overvie$ of the ma%or elements of the &EEE 'o$er (ystem Application Data Dictionary )'(ADD*. &t +tili,es '(ADD elements to$ard the creation of fle-i#le .eneral/p+rpose po$er flo$ environments that have .reat e-panda#ility and fle-i#ility. The '(ADD is intended primarily as a means for e-chan.in. application data amon. po$er system analytical applications of vario+s types. The paper then +ses an environment closely #ased on '(ADD concepts to$ard the creation of sample applications in Matla#. The t$o main applications considered are0 a simple 1vanilla2 po$er flo$ and a rapid and efficient comp+tation of 'o$er Transfer Distri#+tion Factors )'TDF*. The paper is intended as a means of doc+mentin. efforts cond+cted #y '(erc3 to$ard the creation of a +nified environment for po$er flo$ analysis, as a means for ill+stratin. and pop+lari,in. the Data Dictionary itself, and as a means for ill+stratin. Matla# vectori,ed comp+tation techni4+es and methods. The paper contains m+ch act+al code #eca+se it is intended for +se in its electronic form, $here +sers are e-pected to #e a#le to 1c+t and paste2 e-amples to a Matla# environment directly from the te-t of the paper.
3
The 'o$er (ystems En.ineerin. 5esearch Center, an 6(F and ind+stry sponsored +niversity consorti+m.
Analo..Assi.nDev ice
Each field of each o#%ect type has a type0 inte.er, te-t, real or date. We only consider te-t or real types. &n some cases, t$o alternative types are permitted in the '(ADD for certain fields. We do not allo$ this. <nly a small s+#set of all availa#le '(ADD fields is +sed in this paper. Fields or data types mentioned #+t not +sed are indicated $ith an asteris=>. T denotes Te-t )strin.* data, 5 denotes real data, & denotes inte.er data. The Transformer and Load data types have s+#types not descri#ed here. The '(ADD inte.rates t$o vie$points0 a #+s/oriented vie$point common to analytical st+dies, and an e4+ipment/oriented vie$point common to meas+red val+es and system operation. The Miscellaneo+s Application Data descri#es this information. ?ere is a subset of the Miscellaneo+s Application Data ta#le0
6ame Misc.Title Misc.9aseM@A Misc.ModelConnect ivityType Misc.Contin.ency; enMW5esponse Misc.Device5efMet hod Description User defined case title M@A #ase 9M or 9+s.Model 9( or 9+s(ection> 9< or 9oth> 5F A Use response factors 'C A 'roportional to capacity '< A 'roportional to o+tp+t Method )i.e., 6+m#er or 6ame* +sed as for referencin. a device. T 5 T T T
Analo..Device5ef Analo..@al+e
Device type associated $ith val+e )complete spellin. or a##reviation of one of the root entities*. (ome possi#ilities are0 9(A9+s L6ALine T5ACformer (WA($itch MAAMachine LDALoad (?A(h+nt Device assi.nment )9+s.6+m#er, Line.6+m#er* of val+e on device for device type. 6+meric val+e
& 5
Fo+r other ta#les of .eneric interest are those for Analo. Data, (tat+s Data, 5atin.s Data and (et Data. The (et Data is +sef+l for .ro+pin. information into Bones, Areas, Companies, Locations and almost any other +ser/desired .ro+pin.. &t is not +sed here. The 5atin.s Data specifies ratin. types. This paper ass+mes all flo$ ratin.s are in M@A, th+s no s+ch data is re4+ired. (tat+s Data is +sed to denote the stat+s of a device or component. We +se 3 to denote in service, active or closed, " other$ise. Th+s, $e do not need (tat+s Data as a separate data type. Analo. Data is +sed to specify 1metered2 information )as opposed to 1parameters2 of components*. 5ather than enterin. this information as part of each device type, it is entered as 1analo. data2 $ith a pointer to the device type $here it is +sed. ?ere is a s+#set of the definition of Analo. Data0
6ame Analo..6+m#er Analo..Type Description Uni4+e n+m#er @<LTAvolta.e ma.nit+de FL<WA'o$er or c+rrent MW A Active 'o$er M@A5 A 5eactive 'o$er TA' A Transformer Tap A6;L A @olta.e An.le & T
5 5 5 T
The nodal in%ections types +sed in this paper incl+de Machine, Load and (h+nt Element, defined ne-t0
6ame Machine.6+m#er Machine.9+s5ef Machine.&d Machine.(tat+s Machine.MW Machine.Mvar Machine.ControlMode Description Uni4+e 6+m#er 9+s.6+m#er to $hich machine is connected &dentifier MW o+tp+t, solved val+e M@A5 o+tp+t, solved val+e 'D A hold ' and D constant '@ A ad%+st D to hold @ 6L A ad%+st D, no limits (W A case s$in. Machine 9+s )9+s.6+m#er* $hose volta.e is controlled &dentification of ratin.s A vector of possi#le .enerator ma-im+m MW val+es A vector of possi#le .enerator & & T & 5 5 &
& T 5 5
minim+m MW val+es Lo$er limit for reactive po$er Upper limit for reactive po$er Machine minim+m operatin. volta.e Machine ma-im+m operatin. volta.e 'ercent of Machine MW response to system MW im#alance. @al+es are normali,ed for each island
5 5 5 5 5
@al+e at $hich sh+nt $ill chan.e o+t to lo$er volta.e @al+e at $hich sh+nt $ill chan.e o+t to raise volta.e 6+m#er of discrete val+es availa#le. Bero for contin+o+s ad%+stment (+sceptance of each #loc= A vector. Ma.nit+de of (h+nt o+tp+t MW. A solved val+e Ma.nit+de of (h+nt o+tp+t Mvar. A solved val+e
5 5 & 5 5 5
Load.ModelMin@o lta.e> Load.ModelMa-@ olta.e> Load.MinMW> Load.Ma-MW> Load.5eferenceM W> Load.MinMvar> Load.Ma-Mvar> Load.5eferenceMv ar> Load.Mvar Load.M$
C<6(T A constant MW and M@A5 @FU6C A volta.e depend &6DM<TAind+ction motor Minim+m model volta.e for this models Ma-im+m volta.e for this load model Minim+m real po$er Ma-im+m real po$er 5eference real po$er at one per +nit )for scalin.* Minim+m reactive po$er cons+med Ma-im+m reactive po$er 5eference reactive po$er at one per +nit )for scalin.* Ma.nit+de of Load Mvar. (olved val+e Ma.nit+de of Load MW. (olved val+e Description Uni4+e 6+m#er 9+s.6+m#er to $hich sh+nt is connected &dentifier M@A of this device 9ase volta.e of this device &dentifier of this device )Capacitor, 5eactor* 6<6E A fi-ed sh+nt val+e @<LT A hold volta.e #et$een limits M@A5Ahold M@A5 flo$> 9+s.6+m#er at $hich volta.e is to #e controlled
5 5 5 5 5 5 5 5 5 5
(h+nt.Control9+s5e f
&
Cformer.Circ+it Cformer.Type
Cformer.Tap5atio Cformer.TapAn.le Cformer.Tap5atioM in Cformer.Tap5atioM aCformer.Tap5atio(t ep Cformer.TapAn.le Min Cformer.TapAn.le MaCformer.TapAn.le( tep Cformer.(tat+s Cformer.9aseM@A Cformer.FromM$ Cformer.FromMvar Cformer.ToM$ Cformer.ToMvar Cformer.LossAssi.n 9+s5ef Cformer.'ri/(ec5 Cformer.'ri/(ecC Cformer.'ri/ (ecBero5> Cformer.'ri/ (ecBeroC>
&dentifier F&CED Fi- ratio and an.le @<LT Fi- an.le var ratio M@A5 Fi- an.le var ratio MW G Fi- ratio var an.le Tap ratio val+e Tap an.le val+e Minim+m Tap ratio val+e of the transformer Ma-im+m Tap ratio val+e of the transformer Tap ratio step si,e val+e of the transformer Minim+m Tap an.le val+e of the transformer Ma-im+m Tap an.le val+e of the transformer Tap an.le step si,e val+e of the transformer > M$ flo$ From #+s. (olved val+e Mvar flo$ From #+s. (olved val+e M$ flo$ To #+s. (olved val+e Mvar flo$ To #+s. (olved val+e 9+s.6+m#er to $hich losses sho+ld #e assi.ned s.c. resistance $indin. A to 9 s.c. reactance $indin. A to 9 s.c. ,ero se4+ence resistance $indin. A to 9 s.c. ,ero se4+ence reactance $indin. A to 9
T T
Misc.ContingencyGenMWResponse= C; Misc.!eviceRe"Metho#=$%m&e';
5 5 5 5 5 5 5 5 & 5 5 5 5 5 & 5 5 5 5
Most other data types incl+de vector or even sets of vectors as their data elements. The 4+estion arises immediately in Matla# $hether it is #etter to represent these types as a sin.le str+ct+re $ith vector str+ct+re entries, or to represent each data type entry as a str+ct+re and to represent the entire data type as a vector of str+ct+res. Either ans$er is correct and $ill $or=, #+t #eca+se of the vectori,ed nat+re of Matla# comp+tations, o+r e-periments indicate that it is 4+ite efficient to represent data types as str+ct+res of vectors. F+rthermore, for the sa=e all consistence almost all vectors $ill #e col+mn vectors. When it is necessary to represent sets )act+ally vectors* of varia#le/len.th vectors, this is done #y +sin. the notion of cells, $hich are vectors of ar#itrary entry types. This is the convention adopted in the data dictionary. (tart $ith a definition of all #+ses alon. $ith, loads, machines and sh+nts connected to them.
( )nitiali*ation o" B%s !ata Type B%s.$%m&e'=+,; B%s.$ame=; B%s.Base-V=+,; B%s..tat%s=+,; B%s.Vmag=+,; B%s.Vangle=+,; B%s.M/Mismatch=+,; B%s.Mva'Mismatch=+,; B%s.TypeCo#e=; B%s.VoltTa'get=+,; B%s.0o/Volt0im=+,; B%s.1pVolt0im=+,; ( )nitiali*ation o" Machine !ata Type Machine.$%m&e'=+,; Machine.B%sRe"=+,; Machine.)#=; Machine..tat%s=+,; Machine.M/=+,; Machine.Mva'=+,; Machine.Cont'olMo#e=; Machine.Cont'olle#B%sRe"=+,; Machine.Min23%tp%t=+,; Machine.Ma423%tp%t=+,; Machine.Min3pe'atingVolt=+,; Machine.Ma43pe'atingVolt=+,; Machine. ostContResp5act=+,; ( )nitiali*ation o" 0oa# !ata Type 0oa#.$%m&e'=+,; 0oa#.)#=; 0oa#.B%sRe"=+,; 0oa#..tat%s=+,; 0oa#.Mva'=+,; 0oa#.M/=+,; ( )nitiali*ation o" .h%nt !ata Type .h%nt.$%m&e'=+,; .h%nt.B%sRe"=+,; .h%nt.)#=; .h%nt..tat%s=+,; .h%nt.Type=; .h%nt.Cont'olMo#e=+,; .h%nt.Cont'olB%sRe"=; .h%nt.Ma4RegVoltage=+,; .h%nt.MinRegVoltage=+,; .h%nt.Bloc-.%sceptVal%e$o=+,; .h%nt.Bloc-.%sceptance=+,; .h%nt.M/=+,; .h%nt.Mva'=+,;
0ine..h%nt.%sceptance=+,; 0ine.5'omM/=+,; 0ine.5'omMva'=+,; 0ine.ToM/=+,; 0ine.ToMva'=+,; 0ine.Type)#=; 0ine.0ossAssignB%sRe"=+,; 0ine.5'om0%mpe#Con#=+,; 0ine.5'om0%mpe#.%scept=+,; 0ine.To0%mpe#Con#=+,;0ine.To0%mpe#.%scept=+,; 0ine.Rate)#=; 0ine.RateVal%e=+,;
Machine.Min3pe'atingVolt=0.@?Aones8ng;1:; Machine.Ma43pe'atingVolt=1.<Aones8ng;1:; Machine. ostContResp5act=+1;1;1,; ( 0oa# #ata speci"ication nl==; 0oa#.$%m&e'=819=:; 0oa#.B%sRe"=+>;?;7,; 0oa#.)#=st'vcat81;1;1:; 0oa#..tat%s=+1;1;1,; ( .h%nt #ata speci"ication nsh=1; .h%nt.$%m&e'=+1,; .h%nt.B%sRe"=?; .h%nt.)#=1; .h%nt..tat%s=1; .h%nt.Type=Capacito'; .h%nt.Cont'olMo#e=$3$D; .h%nt.Cont'olB%sRe"=?; .h%nt.Ma4RegVoltage=1.<?Aones8nsh;1:; .h%nt.MinRegVoltage=0.@?Aones8nsh;1:; .h%nt.Bloc-.%sceptVal%e$o=E<F; ( CD00 ARRAG .h%nt.Bloc-.%sceptVal%e=E+0.1;0.1,F; ( H ( 0ine #ata speci"ication n0=11; 0ine.$%m&e'=819n0:; 0ine.5'omB%sRe"=+1;1;1;<;<;<;<;=;=;>;?,; 0ine.ToB%sRe"=+<;>;?;=;>;?;7;?;7;?;<,; 0ine.Ci'c%it=st'vcat81;1;1;1;... 1;1;1;1;1;1;1:; 0ine..ectionR=+.1;.0?;.00@;.0?;.0?; ... .1;.0B;.1<;.0<;.0<;.1,; 0ine..ection6=+.<;.<;.=;.<?;.1;.=; ... .<;.<7;.1;.>;.=,; 0ine..h%ntCon#%ctance=*e'os8n0;1:; 0ine..h%nt.%sceptance=+.0<;.0<;.0=; ... .0<;.01;.0<;.0<?;.0<?;.01;.0>;.0=,; 0ine.Type)#=cha'8ones8n0;1:A#o%&le80ine::; 0ine.0ossAssignB%sRe"=0ine.5'omB%sRe"; 0ine.5'om0%mpe#Con#=*e'os8n0;1:; 0ine.5'om0%mpe#.%scept=*e'os8n0;1:; 0ine.To0%mpe#Con#=*e'os8n0;1:; 0ine.To0%mpe#.%scept=*e'os8n0;1:; 'ati#=st'vcat8$3RMA0;DMDRG:; 'atval=+1.?;<,; "o' -=19n0; 0ine.Rate)#E-;1F='ati#; 0ine.RateVal%eE-;1F='atval; en#
(ince no transformers are +sed in the e-ample, details of transformers are not ill+strated. At this point, the ta#le val+es can #e loaded for the e-ample at hand more or less directly from the Data Dictionary. (ome ass+mptions are made0 All machine minim+m po$ers are 3"I of the machine ma-im+m po$ers. All machine ma-im+m po$ers are J"" MW )or Jp+*. We prefer to $or= in per/+nit every$here, even $hen the Data Dictionary calls for M$ or Mvar. Minim+m volta.es any$here are specified at ".K5 p+, ma-im+m volta.es at 3.J p+. All sh+nt s+sceptances are ass+med to #e ad%+sta#le in e-actly t$o e4+al/si,ed steps. (ince there are no s+sceptances in this e-ample, a capacitive s+sceptance $ith a val+e of "."J p+ is ass+med at #+s 5. 6ormally, data types $o+ld #e constr+cted +sin. a f+nction that reads ra$ data from a data#ase, from a common format data file, or some other availa#le so+rce. ?ere, data is constr+cted directly for the e-ample at hand, $itho+t resortin. to a readin. and translation f+nction.
( B%s #ata speci"ication n=7; B%s.$%m&e'=819n:; B%s.$ame=st'vcat8B1.1;B1.<;... B1.=;B1.>;B1.?;B1.7:; B%s.Base-V=1=@Aones8n;1:; B%s..tat%s=ones8n;1:; B%s.Vmag=+1.0?;1.0?;1.0B;1;1;1,; B%s.Vangle=*e'os8n;1:; B%s.TypeCo#e=... st'vcat8.;CT;CT;0;0;0:; B%s.VoltTa'get=B%s.Vmag; B%s.0o/Volt0im=0.@?Aones8n;1:; B%s.1pVolt0im=1.<Aones8n;1:; ( Machine #ata speci"ication ng==; Machine.$%m&e'=819ng:; Machine.)#=st'vcat8Machine.)#;1;1;1:; Machine..tat%s=ones8ng;1:; Machine.Cont'olMo#e=st'vcat8.W; V; V:; Machine.B%sRe"=+1;<;=,; Machine.Cont'olle#B%sRe"=+1;<;=,; Machine.Rating)#=... st'vcat8$3RMA0;$3RMA0;$3RMA0:; Machine.RatingVal%e=+1.?;1.?;1.?,; Machine.RatingMinim%m=+0.1?;0.1?;0.1?,; Machine.Min23%tp%t=+C0.<?;C0.<?;C0.<?,; Machine.Ma423%tp%t=+0.B?;0.B?;0.B?,;
The specification of metered parameters for all data types is done #y means of the Analog data type. We consider first the specification of data val+es for all loads, follo$ed #y the specification of all machines, all sh+nts, all lines and all transformers )this e-ample has no transformers*. <rdinarily this $o+ld also #e accomplished #y an inp+t ro+tine that $o+ld translate appropriate data#ase entries, common format file information and:or other s+ch availa#le data into the Data Dictionary str+ct+res. ?ere, the data is specified directly for the e-ample of interest, startin. $ith an initiali,ation of all Analo. data types0
()nitiali*ation o" all Analog #ata Analog.$%m&e'=+,; Analog.Type=; Analog.Assign!evice=; Analog.!eviceRe"=+,; Analog.Val%e=+,; ( .peci"ication o" all 0oa# ope'ating Analog #ata "o' -=19nl;
na=length8Analog.$%m&e':; Analog.$%m&e'=+Analog.$%m&e';naI1;naI<,; Analog.Type=st'vcat8Analog.Type;MW;MVAR:; Analog.Assign!evice=... st'vcat8Analog.Assign!evice;0oa#;0oa#:; Analog.!eviceRe"=+Analog.!eviceRe";-;-,; en# Analog.Val%e=+Analog.Val%e;0.B;0.B;... 0.B;0.B;0.B;0.B,; ( .peci"ication o" all Machine ope'ating Analog #ata "o' -=19ng; na=length8Analog.$%m&e':; Analog.$%m&e'=+Analog.$%m&e';naI1,; Analog.Type=st'vcat8Analog.Type;MW:; Analog.Assign!evice = ... st'vcat8Analog.Assign!evice;Machine:; en# Analog.!eviceRe"=+Analog.!eviceRe";1;<;=,; Analog.Val%e=+Analog.Val%e;0;0.?;0.7,;
0ine.L=0ine..ectionRIJA0ine..ection6; 0ine..h%ntG<=80ine..h%ntCon#%ctanceIJA0ine..h %nt.%sceptance:M<; 0ine.G)=0ine.5'om0%mpe#Con#IJA0ine.5'om0%mpe# .%scept; 0ine.GN=0ine.To0%mpe#Con#IJA0ine.To0%mpe#.%sc ept; ( .h%nt #evices at &%s not consi#e'e# he'e 2list=st'match80;B%s.TypeCo#e:; Vlist=st'match8CT;B%s.TypeCo#e:; .lac-0ist=st'match8.;B%s.TypeCo#e:; Gen0ist=%nion8.lac-0ist; Vlist:; $on.lac-=%nion8 2list; Vlist:;
We then ill+strate the code to constr+ct the complete po$er flo$ Maco#ian for any system )6ote0 this hi.hly vectori,ed version of the code is d+e to Christopher DeMarco of the University of Wisconsin*0
"%nction +#.##;#.#v,=p"lo/Jac8G&;V&: )&=G&AV&; #.##=JA#iag8conJ8)&:.AV&:C JA#iag8V&:AconJ8G&:A#iag8conJ8V&::; #.#v=#iag8conJ8)&:.A8V&.Ma&s8V&::: I#iag8V&:AconJ8G&:A#iag8conJ8V&:.Ma&s8V&::;
To r+n the e-ample in this paper, 1c+t and paste2 every Matla# code se.ment to a Matla# environment. (tore f+nction code se.ments in m/files.
E-trapolation of these techni4+es to considera#ly more comple- cases and pro#lems is immediate. We ill+strate only one s+ch e-tension.
At this point, the Matla# environment contains already a $ealth of +sef+l information for ans$erin. a lar.e n+m#er of 4+estions a#o+t the system.
.. /onclusions
'o$er (ystem Application Data Dictionary data types have #een +sed as the #asis for a direct implementation of a simple po$er flo$ in Matla#. The implementation is remar=a#ly efficient and easy to e-tend to any desired additional p+rpose0 ne$ methods can #e tested $ith ease, ne$ f+nctions and o#%ectives implemented, all $hile maintainin. the a#ility to comm+nicate #et$een and amon. diverse applications in a standardi,ed manner.
Ac0nowledgements
'rofessor Christopher DeMarco made availa#le the =ey Maco#ian ro+tine to this a+thor. Moann (taron has #een for years instr+mental in developin. the '(ADD. Than=s are also d+e to (cott ;reene and Taiyo+ Lon..
(eferences
738 &EEE Committee 5eport, 1Common format for e-chan.e of solved load flo$ data,2 &EEE Transactions on 'o$er Apparat+s and (ystems, @ol+me 'A(/NJ, 6+m#er H, pa.es 3N3H/3NJ5, 6ovem#er:Decem#er, 3N! .
This code can #e +sed to determine the sensitivity of flo$s on any line to any in%ections at a .iven operatin. point. (ample code to do this calc+lation for o+r e-ample for an in%ection at #+s 5 $o+ld #e0
+G"lo/);G"lo/N,=&l#y"lo/8B%s;0ine:; +#5##;#5#v,="lo/Jac8G"lo/);0ine;V;V80ine.5'om B%sRe"::; +#.##;#.#v,=p"lo/Jac8G&%s;V:; 'N=+'eal8#.##8$on.lac-;$on.lac-::;'eal8#.#v8$ on.lac-; 2list::;imag8#.##8 2list;$on.lac-::; imag8#.#v8 2list; 2list::,; 'N"=+'eal8#5##89;$on.lac-::;'eal8#5#v89; 2lis t::;imag8#5##89;$on.lac-::;imag8#5#v89; 2list