P. 1
GAUSS

|Views: 0|Likes:

See more
See less

09/14/2011

pdf

text

original

# EX NO:4 LOAD FLOW ANALYSIS BY GAUSS-SIEDEL METHOD

% to form the y-bus matrix
disp(' THE INPUT DATAS AE AS !"##"\$S'%&
'b(i'put('THE NU)*E "! *USES+''%&
',(i'put('THE NU)*E "! #INES+''%&
sb(i'put('THE NU)*E "! STATIN- *USES+''%&
eb(i'put('THE NU)*E "! ENDIN- *USES+''%&
s,i(i'put('ENTE THE DETAI#S "! SEIES #INE I)PEDAN.E+''%&
,/a(i'put('ENTE THE DETAI# "! #INE I)PEDAN.E+''%&
% exe/utio' starts here
y(0eros('b1'b%&
for m(23'b
for '(23'b
if m(('44m5('
if s,i(m1'%((6
'('72&
e,se
y(m1m%(y(m1m%7s,i(m1'%8-27,/a(m1'%&
y(m1'%(-s,i(m1'%8-2&
y('1m%(y(m1'%&
e'd
e'd
e'd
e'd
%output of y-bus
disp(' THE ESU#T "! 9 *US )ATI: is '%&
ybus(y
m(i'put('ENTE THE NU)*E "! P; *USES'%&
for i(23m
<(i72%(i'put('ENTE THE P; *US ;"#TA-E'%&
=max(i%(i'put('ENTE )A:I)U) #I)IT "! > !" P; *US'%&
=mi'(i%(i'put('ENTE )INI)U) #I)IT "! > !" P; *US'%&
e'd
p(i'put('ENTE THE EA# P"\$ES'%&
=(i'put('ENTE THE EA.TI;E P"\$ES'%&
<(2%(i'put('ENTE THE S#A.? *US ;"#TA-E'%&
itr'(i'put('ENTE NU)*E "! ITEATI"N'%&
for i(m7@3'b
<(i%(2&
e'd
for i(@3m72
y<(6&
for A(23'b
y<(y<7y(i1A%B<(A%&
e'd
y<((/o'A(<(i%%By<%&
=(i%(-imaC(y<%&
if =(i%D=mi'(i-2%
=(i%(=mi'(i-2%&
e,se
=(i%E=max(i-2%
=(i%(=max(i-2%
e'd
y<(6&
for A(23'b
if i5(A
y<(y<7y(i1A%B<(A%&
e'd
e'd
<2((/omp,ex(p(i%1-=(i%%F(/o'A(<(i%%%-y<%Fy(i1i%&
de,(i%(a'C,e(<2%&
Gre1imH(po,@/art(de,(i%1<(i%%&
<(i%(/omp,ex(re1im%&
e'd
for i(m7@3'b
y<(6&
for A(23'b
if i5(A
y<(y<7y(i1A%B<(A%&
e'd
e'd
<(i%((/omp,ex(-p(i%1=(i%%F(/o'A(<(i%%%-y<%Fy(i1i%&
e'd
for I(@3itr'
for i(@3'b-2
y<(6&
for A(23'b
if i5(A
y<(y(i1A%B<(A%&
e'd
e'd
<(i%((/omp,ex(-p(i%J=(i%%F(/o'A(<(i%%%-y<%Fy(i1i%&
e'd
e'd
disp(G'the fi'a, <a,ue of <o,taCe after the iteratio''1'um@str(itr'%1'are'H%&
disp(<%&
OUTPUT:
THE INPUT DATAS AE AS !"##"\$S
THE NU)*E "! *USES
K
THE NU)*E "! #INES
L
THE NU)*E "! STATIN- *USES
G2 2 @ @ @ M NH
THE NU)*E "! ENDIN- *USES
G@ M M N K N KH
ENTE THE DETAI#S "! SEIES #INE I)PEDAN.E
G6 6J@76J6KA 6JO76J@NA 6 6
6J@76J6KA 6 6J6P76J2OA 6J6@76J6OA 6J6N76J2@A
6JO76J@NA 6J6P76J2OA 6 6J6276J6MA 6
6 6J6@76J6OA 6J6276J6MA 6 6J6O76J@NA
6 6J6N76J2@A 6 6J6O76J@NA 6H
ENTE THE DETAI# "! #INE I)PEDAN.E
G6 6J6PA 6J6KA 6 6
6J6PA 6 6J6NA 6J6NA 6J6MA
6J6KA 6J6NA 6 6J6@A 6
6 6J6NA 6J6@A 6 6J6LA
6 6J6MA 6 6J6LA 6H
the resu,t of y bus matrix is
y bus (
KJOK@L - 2JN26Ki -NJL6KQ 7 2J2LPKi -2J2NPO 7 6JMNN6i 6 6
-NJL6KQ 7 2J2LPKi 22JO2ML -@KJ@L2@i -2JPPPL 7 KJ6666i -@JQN2@ 722JLPNLi -@JK666 7 LJK666i
-2J2NPO 7 6JMNN6i -2JPPPL 7 KJ6666i 2@JO2MK -MKJ@MN6i -26J6666 7M6J6666i 6
6 -@JQN2@ 722JLPNLi -26J6666 7M6J6666i 2NJ2Q2@ -NKJMONLi -2J@K66 7 MJLK66i
6 -@JK666 7 LJK666i 6 -2J@K66 7 MJLK66i MJLK66 -22J2K66i
ENTE THE NU)*E "! P; *USES 2
ENTE THE P; *US ;"#TA-E 2
ENTE )A:I)U) #I)IT "! > !" P; *US 2JK
ENTE )INI)U) #I)IT "! > !" P; *US -2J6
ENTE THE EA# P"\$ES G6 6JP 6JNK 6JN 6JPH
ENTE THE EA.TI;E P"\$ES G6 6 6J2K 6J6K 6J2H
ENTE THE S#A.? *US ;"#TA-E 2J6P
ENTE NU)*E "! ITEATI"N 2
THE !INA# ;A#UE "! ;"#TA-E A!TE THE ITEATI"N2AE
2J6P66 2J6666 7 6J66@2i 6JQQP6 - 6J66Q2i 6JQQPP - 6J62N2i 6JQO@P - 6J6K2Li

j)*v(j). [re.j)*v(j).j)*v(j).i). v(i)=complex(re. end end disp(['the final value of voltage after the iteration'. for j=1:nb if i~=j yv=y(i.i). end end v1=(complex(p(i).v(i)). if q(i)<qmin(i-1) q(i)=qmin(i-1).q(i))/(conj(v(i)))-yv)/y(i. disp(v). else q(i)>qmax(i-1) q(i)=qmax(i-1) end yv=0. end for k=2:itrn for i=2:nb-1 yv=0.num2str(itrn).-q(i))/(conj(v(i)))-yv)/y(i.q(i))/(conj(v(i)))-yv)/y(i. end end v(i)=(complex(-p(i). for j=1:nb if i~=j yv=yv+y(i. q(i)=-imag(yv). del(i)=angle(v1). OUTPUT: THE INPUT DATAS ARE AS FOLLOWS THE NUMBER OF BUSES 5 . end end v(i)=(complex(-p(i).i).yv=(conj(v(i))*yv).im]=pol2cart(del(i).'are']). for j=1:nb if i~=j yv=yv+y(i.im). end for i=m+2:nb yv=0.

scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->