iceed2009
TRANSCRIPT
-
7/29/2019 ICEED2009
1/7
nteational Conference on Engineering Education CEED , December-, , Kuala Lumpur, Malaysia
Teaching Power ystem Anaysis ourses usingMATPWER
d F AkdElectrical Engineering Dept.,
University of lorin,lorin, Nigeria.
tct f f f y y y f y f This paper focuseson a new and ecient method to the teaching of powersystem analysis courses to the upper-division
undergraduate students. The intent is to presentMATPOWER to students as a good instructional tool to
complement the teaching of power system analysis coursesin the class. This would certainly facilitate the teaching
and understanding of the subject matter better. Thefeatures and the relative merits which make the packagepreferred to some of the commercially available softwarepackages, in certain applications, are highlighted in the
paper. With self study in mind, the paper is written tosimplify the daunting task of carrying out power ow
analyses especially on large power networks. Oneillustrative example is examined in the paper. The power
ow solution by the Newton-Raphson method is
demonstrated using the conventional approach prior tosolving it using the MATPOWER package. The resultobtained using the package is guaranteed to be accurate
and reasonably fast.
Kw Jc ww, w c, cg
. NTRODUCTIONOne of the major constraints faced in the teaching of
power system aalysis courses especially at undergraduatelevel is the nonavailability of reallife power system fordemonstration in the laborato. This mes certain aspects of
the course uninteresting to the students since it is ll ofcomplex mathematics that may be extremely laborious errorprone, d timeconsuming to solve maually. However, withthe advent of personal computers, the story is dierent today.These computers have become so powerl ad advced thatthey ca easily be employed to cay out some simulations inthe aalysis of lage interconnected power networks. Theability of these mode computers to provide uselinformation and react to responses has been responsible for itsintegration into power engineering curriculum [1].
97----9/9/$5 9 5
H HzElectrical& Electronic Engineering Dept.,
Universiti Putra Malaysia,Serdag, Malaysia.
y and lage, a number of commercial sowe packageshave been developed for solving power system analysisproblems. For example, PSSE, ETAP, PowerWorld, ERACS,MA TLASimulink, P SCAD, etc, ae all graphical userinterface enabled ad useriendly sowe for crying out
timedomain computer simulations of power systems.However, these packages require good modelling andsimulation knowledge, and may also be dicult to use forcomplex ad lage power systems. n addition, none of thesepackages allows the user to add new algorithms to it or evenchge the source code [2]. Other simulation tools that areused for power system analysis include UWPFLOW [3],Power System Toolbox PST [], Power System AnalysisToolbox PSAT [5], MATPOWER [6], oltage StabilityToolbox ST [7], to mention but a few. Even though thesesowae use MA TLA as the platform on which they onegood thing about them is that they ae all ee open sourcepackages and their codes could be modied [2]. This ispaticulaly importat for resechers and students who are
interested in developing and testing new, unconventionalalgorithms []. For a list of these packages and applications ofeach, interested reader could consult [5, ].
Apt om these, Saadat [1] has done a mavellous job infacilitating the understanding of power system analysis courseto the students. He developed a number of Mles nctionsthat could be in MA TLA environment to ease the task ofcomputer simulations for the students without having to dodetailed progrming. the book, several examples areillustrated for a better understading. However, MATPOWERis more exible and capable of computing ad displayingmore detailed results, especially for contingency studies. Otheradvtages of MA TPOWER include simplicity and
robustness. t can also be used to veri analytical methodsdeveloped by students to validate their mathematical modelsquickly.
Since power ow analysis is a basic tool of many powersystem courses [10], the exple examined in the literature islimited to power ow studies. This paper assumes that thetageted audience is already accustomed to MA TLA; else avery good introduction to MA TLA om electricalengineering point of view is available in [11]. The rest pat ofthis literature is structured as follows: Section is dedicatedto the denition as well as the features of MATPOWER
Authorized licensed use limited to: UNIVERSITY PUTRA MALAYSIA. Downloaded on June 26,2010 at 19:29:23 UTC from IEEE Xplore. Restrictions apply.
-
7/29/2019 ICEED2009
2/7
2009 nteational Conference on Engineering Education CEED 2009, December 7, 2009, Kuala Lumpur, Malaysia
package. An illustrative example of a 5bus power system istreated using both the conventional approach adoptingNewtonRaphson method and the MATPOWER package inSection . The power ow results ae presented addiscussed in Section , while Section concludes the paper.
. RNNNG MATPOWER
MA TPOWER is a open source simulation tool forsolving power ow and optimal power ow problems inpower system analysis. The package, whose code is writen inMA TLA Mles, is specically tgeted at researchers deducators in the eld of power engineering [12].MA TPOWER is desied to give the best performance whilekeeping the code simple and easy to modi by the user. tcould be downloaded ee of chge om [13].
To install MATPOWER on a personal computer,MA TLA version 6 or a later version with OptimisationToolbox is needed [12]. The downloaded le requires to beunipped ad placed in a location on MATLA path. Forexample, an installation of 3.2 version of MATPOWER is
demonstrated as follows:C:\ProgramFiles\MATLAB\R2006a\matpower3.2 To run aprogrme in MATPOWER, sta up MATLA ad type thedesired Mle name at the command window prompt, thenpress the enter key. For example, typing:
runpf 'case9'ad thereaer press the enter key at the command windowprompt of MA TLA would run a power ow of 9bus powersystem already prestored in MA TPOWER. This le couldthen be saved in other name and modied to the taste of theuser as appropriate.
To cout a load ow aalysis, MA TPOWER has ve
solvers to do this. These solvers are Newton, X fastdecoupled, X fastdecoupled, GaussSeidel, ad DC powerow; which can be accessed via the rnpf nction. e powerow default solver uses the Newtons method. To use ay ofthe rest solvers, it is necessy that the PFAL G option must beset explicitly. nterested reader could consult [12] for detailexplaation of each of these solvers d their setings.
. POWER FLOW CASE STUD
The Prblem exaple om [1], exaple 7.9 on page 295 solved
using MA TLA is chosen to demonstrate in this study. Figure
1 shows the oneline diagra of a simple 5bus power systemwith generator at buses 12 and 3 us 1with its voltage set at1.06L pu, is taen as the slack bus. oltage magnitude adreal power generation at buses 2 and 3 are 1.05 pu, 0 MW,ad 1.030 pu, 30 MW, respectively. The load MW d Marvalues are shown on the diagra. Onehalf of the linecapacitive susceptace ad line impedaces e presented inper unit on a 1MA base in Table 1. t is required to obtainthe power ow solution for the system.
No
o
V .6L
j.
o
6MW Var
Fig. One-line Diagram of a 5-bus System
TABLE 1 CAPACITIVE SUSCEPTCE OF THE SYSTEM
ine 12 0.03013 0.025
23 0.02024 0.02025 0.01534 0.01045 0.025
B The anual SlutnSolving the problem manually om the rst principles is
necessay to enable the students grasp the ndamentalconcept of power ow studies. The steps involved ae asfollow.
The line impedances ad their equivalent admittces aepresented:
Z 0.02+ j.06 Z 0.0+ j.2 Z 0.06+ j.1 Z 0.06+ j.1 Z 0.0+ j.12 Z 0.01 + j.03 Z 0.0+ j.2
5 j15
1.25 j3.75
1.67 j5.0
1.67 j5.0
2.5 j7.5
10 j30
1.25 j3.75
Therefore the bus admitce matrix is formed as:
7 7
7 7
Ybus 7 7 7
7 7
7 7
7
7
Authorized licensed use limited to: UNIVERSITY PUTRA MALAYSIA. Downloaded on June 26,2010 at 19:29:23 UTC from IEEE Xplore. Restrictions apply.
-
7/29/2019 ICEED2009
3/7
2009 nteational Conference on Engineering Education CEED 2009, December 7, 2009, Kuala Lumpur, Malaysia
nWhere Yii = LY i j d n is number of bus.
j=
Converting the bus admittance matrix to pola form with theagles in radis yields:
976L2 L9 9L9
L9 426L2 27L9 27L9 79L9Y., 9L9 27L9 4L2 62L9 27L9 62L9 4L2 9L9 79L9 9L9 6L2
Generally, the complex power at bus i of ay system is
P j -; i +j 1jtSepaating the real ad imaginary pats of eqn (l) yields
p VjCS(O;+j 2jtad
; Vjsin(O ;+ 3jtased on these two general equations, the expressions for
the known real power at buses 2, 3, ad 5, ad that of thereactive power at buses ad 5 in o power ow problem aerespectively given below:
.+2s2-2 ++2s22+2 cs 2-2++2 cs2
-2 ++22s2 -2 + 4 .+tcst- +t+22
2-+2+2s+s84 -0 +4+8 - + 5
.ycst-+t+22C2-+2+cs-+++Cs + s- +
tcst-+t+2s2-+2+s-++44s4 -+4+2s 7
Q -tst- +t-22s(842 -4 +2)-4 I11s(84-4 +)-IJ
4 s 44 -44 se4-4 + 8
7
tsO t-+t-s2-+2- s-+- vsO -+-2sO (9)
To obtain the elements of the Jacobia matrix, the derivatives
of each of the above equations e ten with respect to eunknown vaiables 2 ' 0 ' 04 ' ' IV41 and Vl aspresented in the following equations.
P2=V2vIIY2tlsi(2t-82+8t)+I21312
s2-2++2s2-2++V21IV IY2Slsi(2-82+8
P2=-IV21V3IY23si(23-82+8J 11
P2=-IV2IV41IY24si(24-82+84) 12
=-1Isi(2S-82+8) 13
=v114Icos(24-82 +84)14
1=IV211lcos(02S-82+8) f
the same vein, the derivatives of P
=-11IVJ2si(03-83+8) 16
=IV31Jtlsi(03t-83+8t)+V3IV21J2Isi(032-
+2)+II414Is(84- +4)+s- + 7
=-JII4Isi(34-83+84) 18
=-IIVIJlsi(03S-83+8)
I
3
1=IV31J41COS(034-83 +4) 20V
=Vlcos(S-8+8 21
For P, the derivatives ae
22
Authorized licensed use limited to: UNIVERSITY PUTRA MALAYSIA. Downloaded on June 26,2010 at 19:29:23 UTC from IEEE Xplore. Restrictions apply.
-
7/29/2019 ICEED2009
4/7
2009 nteational Conference on Engineering Education CEED 2009, December 7, 2009, Kuala Lumpur, Malaysia
8P4=-IV411f113si(B43-04+03) (3)8
84 =V4s(B4 -4 +)+ V4Vz484Si(842-04+02) +11f113Isi(843-
04 +03)+IIIIIls(84S-04 +o) ()8P4=-IV41Vlsi(B4S-04+o) ()8
alP4
=1v11Y4cos(B4-04 +0)+ V2112Icos(B42-048V4
+02)+V31IY43Ics(843 -04 +03)+IV41IY441 B44 + VII4cs(B4 -4 +) (6)al1=1IIlcs(B4S-04+o) (7)8
Similaly for P
8 =-IVIIY2sin(B2-o+02) ()88P =-IVlfY3Is(B3-o+03) ()88P =-IVIV414sin(B4-o+04) 84
8 =Vsin(B- +)+ VVzz8
s(8S2-o+02)+3s(83-o +03)+IiV41Y4s(8S4-o+04)
=V4cs(B4 - +4) (3)8V4
=1vIYlcs(B-oS +o)+ IVzIIYzl
cs(8S2-o +02)+33cs(83 -o + )+ IV4I4Ics(B4 - +4)+ VIIs
The derivatives of ae
8Q4=-V41V212cos(B42-04+O2)8
84 =-V4cos(B4 -4 +)884 =V4cos(B4-4 +)+ IV4V84
(B4 -4 +)+ V4 cs(B4-4 +)
34
()
+ 1IVIIls(4S-04+o) 8Q4=-VIIlcs(B4S-04+o) (3)8
Q
4
=-sin(B4-4 +)- Vzz8V4s4-4+02)-3s(843 -4 + )-2114siB44- IVIIlsi(B4S-04+o) 3
8Q4
1=-IV41lsin(B4S-04+o) (3)8
Finally for 8Q=-IV21Yzlcos(B2-O+O2) 4088=-11fIY3s(S3-O+03) 4188Q=-VV44cs(B4-o+04) 284
8Q =IV
II
cs(B
- +)+
IV
IVzIz8cs(8S2-o +02)+3cs(83-o +)+ V4Y4s(4-o+4) (3)8Q
I=-VIY4Isi(B4- +4) 448V4
8
1Q
=-vIIYlsin(-oS +0)- IV21IY218V
s(- +z)- IIIYsi(B- +)- IV4I4se4 +4) s ()
Staing with a initial estimate of V () I 1 8 () 0 ' 4 ' 1 8 0 d 8 8 0 Mewhle the () () () () 5 ' 5 ' ,
load ad generation expressed in per units ae Psch 0., P 0.3, P sch 0.5, P sch 0., sch 0.3, sch 0..The power residuals ae computed as follows, where P>,P, P>, ,, e calculated om eqns to 9respectively.
Mz(0)
=Pzsc
-Pz(0)
=0.4-0.389=0.011(0) =sc_(0)=0.3_0.312=-0.012
M4(0)
=P/c_(0) =-0.5- (-0.31)=-0.190
A(0)=Psc-
P(0)=-0.6- (-0.094)=-0.506
4(0) / _4(0) -. - -. .As
(0) =Qsc-Qs(0) =-0.4- (-0.344)=-0.056
Authorized licensed use limited to: UNIVERSITY PUTRA MALAYSIA. Downloaded on June 26,2010 at 19:29:23 UTC from IEEE Xplore. Restrictions apply.
-
7/29/2019 ICEED2009
5/7
2009 nteational Conference on Engineering Education CEED 2009, December 7, 2009, Kuala Lumpur, Malaysia
0.0 1
0.012
0.190
0.506
35.09
5.39
5.23
.85
1.3
5.39
40.40
30.92
o
5.23 .85
30.90 0
39.9 3.5
3.5 11.60
13.2 3.5
2 (0)1.3 2.59
)10.22 012.5 1.24 )
1.24 3.65 )3.63 3.5 lv.(O)10.83
0.056 2.59
10.22
o 1.24 3.83 3.5 10.91
IvO)
The solution of the above matrix with the new bus voltages inthe rst iteration give
20 0.03120 0.01340 0.053s0 0.076IV40 0.0173lvO 0.0125
.312 .3121 .13 .134 .53 .53s .7 .7v/ I 1.173 1.173vs1 1 1 .125 .75
The above steps were repeated until the solution converged in3 iterations with a maximum power mismatch of 2.5 x 10
with = 1.021 3.255, = 0.992 .07, 2 =Ll 3 = 2.The slack bus real d reactive powers ad the reactive powerat buses2 ad 3 are:
P =lsB +22s(B25+ 5z) +33s(B35+53)+ s(B5+5)
+1vIIIIlcs(B-5+5) Q 2 2 22+z3(B3 5+53)(B5+5)
IIVlllsiB 5+5) 7
Q2=-IV21v!lsi(B2-52+5)-VJI2siB22-IV211V31Y231si(B23-52 +53)-V21V41Y24IsB24-52
+54)-IVzVsIY2Sli(B2S-52+5)-0.1 (48)
Q3=-IV31v1Jlsi(B3-53+5)-IV21J2Isi(B32
53+52)
2
3sB33s(B353+54)-JsB3-53+5-0. 9
Upon substitutions of the calculated values, we haveP = 0.316 p.u. = 0.007 p.u.2 = 0.01 p.u.3 = 0.2592 p.u.
9
The total system loss P = P + P2 + P3 P+ P + 0. p.u.= 0.316+ 0.+ 0.3 0.5+ 0.6+ 0.= 0.0316 p.u. = 3.16 MW
C The TPER SlutnSolving the power ow problem using MATPOWER
requires the system data to be entered as shown in Fig. 2. nentering the bus data, pe pe , pe 3 andpe 4 ae usedfor the voltagecontrolled buses, the load buses, the slack bus,d the isolated buses respectively. t is assumed in thisexample that the voltage level of the line is 132 k, thoughy voltage level could be entered as the base k.
t should be noted that the total line chaging susceptacee entered in the brach data even though onehalf linechaging suseptace ae supplied. Thetatu in the generatord branch data denotes that both devices ae in service. Statuo means the devices are out of service, whiletatu indicatesthat the devices ae isolated om the rest power system. Thepower ow of system under consideration is by typing at
theTLA commd prompt runpf 'Example?'
d striking the enter key. The result which converged in0.02 seconds is presented in Fig. 3.
Function [baseMVA, bus gen, branch] = Example7% Power ow data for 5 bs 3 geerator case% MATPOWER%% ---- ower Fow Data -%%%% system VA baseaseMVA = 00%% bs ata% bsj tye Q s Bs area Vm Va basekV zone Vmax Vmins = [
];
35
3 0 0 0 0 0 0 0 0 0 5 0 0 50 30 0 0 0 0 0 0
%% generator data
3 3 3 3 3
00000
% s g g max i Vg mase stats max minge
];
I 0 0 50 0 30 503 30 0 0
%% rac data
000
0 0005 0003 00
000000
000
0909090909
% Te MVA mt o the anches ae not give so eac was set to 50% us tbs r x b ateA rateB rateC rato angle staus
rac = 00 00 000 50 0 0 0 0 I; 3 00 0 0050 50 0 0 0 0 I; 3 00 0 000 50 0 0 0 0 I; 00 0 000 50 0 0 0 0 I 5 00 0 0030 50 0 0 0 0 I3 00 003 000 50 0 0 0 0 I 5 00 0 0050 50 0 0 0 0 I
];retn;
Fig. 2 TPOR Power Flow Solution
Authorized licensed use limited to: UNIVERSITY PUTRA MALAYSIA. Downloaded on June 26,2010 at 19:29:23 UTC from IEEE Xplore. Restrictions apply.
-
7/29/2019 ICEED2009
6/7
2009 nteational Conference on Engineering Education CEED 2009, December 7, 2009, Kuala Lumpur, Malaysia
Newtons method power ow converged in 3 iterations.Converged in 0.02 seconds.
Bus Data
Bus Voltage Generion Load# Mag(pu) Ang(deg) P (MW) Q(MVAr) P (MW) Q (MVAr)
1.060 0.000 83.05 .22 1.045 -1.82 40.00 41.81 20.00 10.003 1.030 -2.664 30.00 24.15 20.00 15.004 1.019 -3.243 50.00 30.005 0.990 -4.405 60.00 40.00
Total: 153.05 3.23 150.00 95.00
Brach Da
Bch From To From Bus Injection To Bus Injection Loss (2 * Z)# Bus Bus P (MW) Q (MVAr) P (MW) Q (MVAr) P (MW) Q
(MVAr)----- ----- ----- -------- -------- -------- -------- -------- -------- 2 59.90 4.062 3 23.15 3.223 2 3 10.91 2.964 2 4 18.22 .245 2 5 50.12 30.3
6 3 4 43.58 23.63 4 5 11.33 5.83
Fig. 3 MATPOWER Power Flow Results
-59.25 -8.6-22.4 -.45
-10.83 -.02-1.99 -10.81-48.83 -29.59-43.34 -25.02
-11.1 -10.41
Total:
0.648 1.950.40 1.22
0.080 0.240.231 0.691.295 3.89
0.236 0.10.154 0.46
-------- --------3.053 9.16
The result of the power ow prblem obtained omMA TPOWER package is exactly as that obtained in MA TLAusing Sadaats approach [1]. This fact conrms the accacy ofthe MATPOWER packae. However, compaing the resultobtained om Subsection shows a slight dierence ofabout 1 % eor mgin. is is denitely the result ofaccumulated roundo of gures prior to the al aswer.Another beauty of MA TPOWER is that it has the capability tocompute d display some other details of the systems that enot available in [1]. These details, tagged System Say aepresented in Fig. . n the said gure, all the power ow resultsof the system under consideration could be viewed at a glce.These details, such as, the minimum ad the mximum voltagemagnitude ad their respective buses, the maimum active dreactive power losses ad the braches where they ca befound, etc. All these e interesting features that could be of
signicat value during a contingency alysis of the powersystem.
5
I System Summary
How many?
BusesGeneratorsCommitted Gens
LoadsFixedDispchableShuntsBrchesTransformersInter-tiesAreas
How much? P (MW)
5 Total Gen Caacity 300.03 On-line Caacity 300.03 Generation (actual) 153.1
4 Load 150.04 Fixed 150.0o Dispchable 0.0 of 0 .0o Shunt (inj) 0.0 Losses (2 * Z) 3.05o Brch Charging (inj) -o Total Inter-tie Flow 0.0
Q(MVAr)
30.0 to 140.030.0 to 140.0
3.2
95.095.00.0
0.09.1630.90.0
Minimum Mimum
Voltage Magnitude 0.990 p.u. @bus 5 1.060 p.u. @bus 0.00 deg @bus 1.30 MW @ line 2-5
3.89 M Ar @ line 2-5
Volte Angle -4.41 deg @bus 5P Losses (2*R)QLosses (2*X)
Fig. 4. System Result Summary
. CONCLUSONThis paper has presented a new opensource MATPOWER
as ecient tool to facilitate the teaching of power systemalysis courses at undergraduate level. The MA TLAbasedpackage has some features that mae it suitable for bothreseach ad educational purposes since its source code can bemodied to the taste of the user. Even though the package caonly hadle power ow and optimal power ow at present,
concerted eorts ae on in extending the applications to otheraeas of power engineering. The result of the power owproblem obtained with MATPOWER was compaed with thatof Saadat [1] d the two ae exactly the same. However, theadditional desirable feature of the former is that it is simpled robust. MA TPOWER is also good for caing out lineoutage contingency simulations of power systems quickly.
As a matter of fact, this is not to say that using sowepackages for simulation of power systems does not have somedisadvatages as pointed out in [1]. However, as f as eauthors of this paper e conceed, the advtages outweighthe disadvatages, which mae computer simulationsindispensable in the teaching of power system aalysis courses.
EFERENCES
[ H. Saadat, "Power system analysis. 2002," McGraw-Hill HigherEducation (ISBN 0-0-284-869-3).
[ F. Milo, 1. Vetti, and J. C. Morataya, "An open source powersystem virtual laborory: The PSAT Case d Experience," IEEETransactions on Education,vol. 51, pp. 1-23,2008.
[ C. A. Cizares d F. Alvarado, "UWPFLOW: continuation d directmethods to locate fold bircions in ACDCFACTS power systems,"Universi of Waterloo, 1999.
Authorized licensed use limited to: UNIVERSITY PUTRA MALAYSIA. Downloaded on June 26,2010 at 19:29:23 UTC from IEEE Xplore. Restrictions apply.
-
7/29/2019 ICEED2009
7/7
2009 nteational Conference on Engineering Education CEED 2009, December 7, 2009, Kuala Lumpur, Malaysia
[4] J. H. Chow d K. W. Cheung, "A toolbox for power system dynaicsand control engineeringeducion d research," IEEE Tansactions onPowe Systems, vol. 7,pp. 1559-1564, 1992.
[5] F. Milo, "An open source power system analysis toolbox," IEEETansactions on Powe Systems, vol. 20,pp. 1199-1206,2005.
[6] R. Zimmerm d D. Ga, "Mpower," Ithaca N Powe SystemsEngineeing Rseach Cente School of Electical Engineeing CoelUnivesi, 1997.
[7] A. H. L. Chen, C. O. Nwankpa, H. G. Kwatny, d X. Yu, "Voltagestability toolbox: introduction and implementation," Poc. of 28 thNoth Ameican Powe Siosium, 1996.
[8] A. Abur, F. Maago, and Y. Lu, "Educational toolbox for powersystem analysis," IEEE Compute Applications in Powe, vol. 13, pp.31-35,2000.
[9] G. Cartina,G. Grigoras, d E. C. Bobric, "Power system analysis usingMlab toolboxes," presented at 6th Inteational Conference onElectromechanical and Power Systems,Chisin,Rep. Moldova,2007.
[10] P.M. Anderson,Anasis of faultedpowe stems. New York: Wiley,1995.
[11] D. C. Hselm d B. Littleeld, Masteing AB 6: acompehensie tutoial andefeence: Prentice Hall NJ, 2001.
[12] R. D. Zimmerm d C. E. Murillo-Snchez, "MATPOWER 3.2User's Manual,2007. "
[13] MATPOWER package[14] C. A. Canizares d Z. T. Faur, "Advantes d disadvantages of usingvarious computer tools inelectrical engineering courses," IEEETansactions on cation, vol. 40,pp. 166-171, 1997.
5