14
8/16/2019 Ieee 14 Bus System Load Flow Using n http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 1/14 IEEE 14 BUS SYSTEM LOAD FLOW USING N-R METHOD % Program for Newton-Raphson Load Flow Analysis..

Ieee 14 Bus System Load Flow Using n

Embed Size (px)

Citation preview

Page 1: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 1/14

IEEE 14 BUS SYSTEM LOAD FLOW USING N-R METHOD

% Program for Newton-Raphson Load Flow Analysis..

Page 2: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 2/14

 nbus = 1! % "###-1$ = ybusppgnbus&! % 'alling ybusppg.m to get $-(us )atri*..busd = busdatasnbus&! % 'alling busdatas..()+a = 1,,! % (ase )A..bus = busd/1&! % (us Number..type = busd/0&! % ype of (us 1-2la34/ 0-P/ 5-P6.. = busd/5&! % 2pe3ified oltage..del = busd/&! % oltage Angle..Pg = busd/7&8()+a! % P9i..

6g = busd/:&8()+a! % 69i..Pl = busd/;&8()+a! % PLi..6l = busd/<&8()+a! % 6Li..6min = busd/&8()+a! % )inimum Rea3ti+e Power Limit..6ma* = busd/1,&8()+a! % )a*imum Rea3ti+e Power Limit..P = Pg - Pl! % Pi = P9i - PLi..6 = 6g - 6l! % 6i = 69i - 6Li..Psp = P! % P 2pe3ified..6sp = 6! % 6 2pe3ified..9 = real$&! % 'ondu3tan3e matri*..( = imag$&! % 2us3eptan3e matri*..

 p+ = findtype == 0 > type == 1&! % P (uses..

p? = findtype == 5&! % P6 (uses..np+ = lengthp+&! % No. of P buses..np? = lengthp?&! % No. of P6 buses..

 ol = 1!"ter = 1!while ol @ 1e-7& % "teration starting..

 P = erosnbus/1&!

  6 = erosnbus/1&!  % 'al3ulate P and 6  for i = 1nbus  for 4 = 1nbus  Pi& = Pi& B i&C 4&C9i/4&C3osdeli&-del4&& B(i/4&Csindeli&-del4&&&!  6i& = 6i& B i&C 4&C9i/4&Csindeli&-del4&& -(i/4&C3osdeli&-del4&&&!  end  end

 % 'he34ing 6-limit +iolations..

  if "ter D= ; EE "ter @ 0 % nly 3he34ed up to ;th iterations..  for n = 0nbus  if typen& == 0  69 = 6n&B6ln&!  if 69 D 6minn&  n& = n& B ,.,1!

  elseif 69 @ 6ma*n&  n& = n& - ,.,1!  end  end  end  end

 % 'al3ulate 3hange from spe3ified +alue

  dPa = Psp-P!  d6a = 6sp-6!  4 = 1!  d6 = erosnp?/1&!  for i = 1nbus

Page 3: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 3/14

  if typei& == 5  d64/1& = d6ai&!  4 = 4B1!  end  end  dP = dPa0nbus&!  ) = GdP! d6H! % )ismat3h e3tor

 % Ia3obian

  % I1 - Jeri+ati+e of Real Power "nKe3tions with Angles..

  I1 = erosnbus-1/nbus-1&!  for i = 1nbus-1&  m = iB1!  for 4 = 1nbus-1&  n = 4B1!  if n == m  for n = 1nbus  I1i/4& = I1i/4& B m&C n&C-9m/n&Csindelm&-deln&&B (m/n&C3osdelm&-deln&&&!  end  I1i/4& = I1i/4& - m&0C(m/m&!  else  I1i/4& = m&C n&C9m/n&Csindelm&-deln&& -(m/n&C3osdelm&-deln&&&!  end  end  end

 % I0 - Jeri+ati+e of Real Power "nKe3tions with ..

  I0 = erosnbus-1/np?&!  for i = 1nbus-1&  m = iB1!  for 4 = 1np?  n = p?4&!  if n == m  for n = 1nbus  I0i/4& = I0i/4& B n&C9m/n&C3osdelm&-deln&& B

(m/n&Csindelm&-deln&&&!  end  I0i/4& = I0i/4& B m&C9m/m&!  else  I0i/4& = m&C9m/n&C3osdelm&-deln&& B (m/n&Csindelm&-deln&&&!  end  end  end

 % I5 - Jeri+ati+e of Rea3ti+e Power "nKe3tions with Angles..

  I5 = erosnp?/nbus-1&!  for i = 1np?

  m = p?i&!  for 4 = 1nbus-1&  n = 4B1!  if n == m  for n = 1nbus  I5i/4& = I5i/4& B m&C n&C9m/n&C3osdelm&-deln&&B (m/n&Csindelm&-deln&&&!  end  I5i/4& = I5i/4& - m&0C9m/m&!  else  I5i/4& = m&C n&C-9m/n&C3osdelm&-deln&& -(m/n&Csindelm&-deln&&&!  end

Page 4: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 4/14

  end  end

 % I - Jeri+ati+e of Rea3ti+e Power "nKe3tions with ..

  I = erosnp?/np?&!  for i = 1np?  m = p?i&!  for 4 = 1np?  n = p?4&!  if n == m

  for n = 1nbus  Ii/4& = Ii/4& B n&C9m/n&Csindelm&-deln&& -(m/n&C3osdelm&-deln&&&!  end  Ii/4& = Ii/4& - m&C(m/m&!  else  Ii/4& = m&C9m/n&Csindelm&-deln&& - (m/n&C3osdelm&-deln&&&!  end  end  end

 I = GI1 I0! I5 IH! % Ia3obian )atri*..

  M = in+I&C)! % 'orre3tion e3tor  dh = M1nbus-1&! % 'hange in oltage Angle..  d = Mnbusend&! % 'hange in oltage )agnitude..

 % pdating 2tate e3tors..

  del0nbus& = dh B del0nbus&! % oltage Angle..  4 = 1!  for i = 0nbus  if typei& == 5  i& = d4& B i&! % oltage )agnitude..  4 = 4B1!  end  end

 "ter = "ter B 1!

  ol = ma*abs)&&! % oleran3e..

 endloadflownbus//del/()+a&! % 'alling Loadflow.m..

% Returns "nitial (us datas of the system...fun3tion busdt = busdatasnum&% ype.... % 1 - 2la34 (us..% 0 - P (us..% 5 - P6 (us.. % >(us > ype > sp > theta > P9i > 69i > PLi > 6Li > 6min > 6ma* >busdat1 = G1 1 1.,:, , , , , , , ,!  0 0 1.,7 , , 0. 01.; 10.; -, 7,!  5 0 1.,1, , , 05. .0 1., , ,!  5 1., , , , ;.< -5. , ,!  7 5 1., , , , ;.: 1.: , ,!  : 0 1.,;, , , 10.0 11.0 ;.7 -: 0!  ; 5 1., , , , ,., ,., , ,!  < 0 1.,, , , 1;. ,., ,., -: 0!  5 1., , , , 0.7 1:.: , ,!  1, 5 1., , , , ., 7.< , ,!  11 5 1., , , , 5.7 1.< , ,!  10 5 1., , , , :.1 1.: , ,!  15 5 1., , , , 15.7 7.< , ,!

Page 5: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 5/14

  1 5 1., , , , 1. 7., , ,!H!

 

% Returns Line datas of the system...

 fun3tion linedt = linedatasnum&

 % > From > o > R > M > (80 > MOmer >

% > (us > (us > pu > pu > pu > AP a& >linedat1 = G1 0 ,.,15< ,.,71; ,.,0: 1  1 7 ,.,7,5 ,.005, ,.,0: 1  0 5 ,.,: ,.1;; ,.,01 1  0 ,.,7<11 ,.1;:50 ,.,1;, 1  0 7 ,.,7:7 ,.1;5<< ,.,1;5 1  5 ,.,:;,1 ,.1;1,5 ,.,,: 1  7 ,.,1557 ,.,011 ,., 1  ; ,., ,.0,10 ,., ,.;<  ,., ,.77:1< ,., ,.:  7 : ,., ,.070,0 ,., ,.50  : 11 ,.,< ,.1<, ,., 1  : 10 ,.1001 ,.077<1 ,., 1  : 15 ,.,::17 ,.15,0; ,., 1

  ; < ,., ,.1;:17 ,., 1  ; ,., ,.11,,1 ,., 1  1, ,.,51<1 ,.,<7, ,., 1  1 ,.10;11 ,.0;,5< ,., 1  1, 11 ,.,<0,7 ,.10,; ,., 1  10 15 ,.00,0 ,.1<< ,., 1  15 1 ,.1;,5 ,.5<,0 ,., 1 H!

 %%%% Program for (us Power "nKe3tions/ Line E Power flows p.u&...fun3tion GPi 6i Pg 6g Pl 6lH = loadflownb//del/()+a&

 $ = ybusppgnb&! % 'alling $bus program..lined = linedatasnb&! % 9et linedats..

busd = busdatasnb&! % 9et busdatas..m = pol0re3t/del&! % 'on+erting polar to re3tangular..Jel = 1<,8piCdel! % (us oltage Angles in Jegree...fb = lined/1&! % From bus number...tb = lined/0&! % o bus number...nl = lengthfb&! % No. of (ran3hes..Pl = busd/;&! % PLi..6l = busd/<&! % 6Li..

 "iK = erosnb/nb&!2iK = erosnb/nb&!2i = erosnb/1&!

 

% (us 'urrent "nKe3tions.. " = $Cm! "m = abs"&! "a = angle"&!

 %Line 'urrent Flows..for m = 1nl  p = fbm&! ? = tbm&!  "iKp/?& = -mp& - m?&&C$p/?&! % $m/n& = -ym/n&..  "iK?/p& = -"iKp/?&!end"iK = sparse"iK&!"iKm = abs"iK&!

Page 6: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 6/14

"iKa = angle"iK&!

 % Line Power Flows..for m = 1nb  for n = 1nb  if m = n  2iKm/n& = mm&C3onK"iKm/n&&C()+a!  end  endend

2iK = sparse2iK&!PiK = real2iK&!6iK = imag2iK&!

 % Line Losses..LiK = erosnl/1&!for m = 1nl  p = fbm&! ? = tbm&!  LiKm& = 2iKp/?& B 2iK?/p&!endLpiK = realLiK&!L?iK = imagLiK&!

 

% (us Power "nKe3tions..for i = 1nb  for 4 = 1nb  2ii& = 2ii& B 3onKmi&&C m4&C$i/4&C()+a!  endendPi = real2i&!6i = -imag2i&!Pg = PiBPl!6g = 6iB6l!

 dispOQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQO&!dispO-----------------------------------------------------------------------------------------O&!dispO Newton Raphson Loadflow Analysis O&!dispO-----------------------------------------------------------------------------------------O&!dispO> (us > > Angle > "nKe3tion > 9eneration >Load >O&!dispO> No > pu > Jegree > ) > )ar > ) > )+ar >) > )ar > O&!for m = 1nb

 dispO-----------------------------------------------------------------------------------------O&!  fprintfO%5gO/ m&! fprintfO %<.fO/ m&&! fprintfO %<.fO/ Jelm&&!

  fprintfO %<.5fO/ Pim&&! fprintfO %<.5fO/ 6im&&!fprintfO %<.5fO/ Pgm&&! fprintfO %<.5fO/ 6gm&&!fprintfO %<.5fO/ Plm&&! fprintfO %<.5fO/ 6lm&&! fprintfOSnO&!

enddispO-----------------------------------------------------------------------------------------O&!fprintfO otal O&!fprintfO %<.5fO/ sumPi&&! fprintfO%<.5fO/ sum6i&&!fprintfO %<.5fO/ sumPiBPl&&! fprintfO %<.5fO/ sum6iB6l&&!fprintfO %<.5fO/ sumPl&&! fprintfO %<.5fO/ sum6l&&! fprintfOSnO&!dispO-----------------------------------------------------------------------------------------O&!

Page 7: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 7/14

dispOQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQO&!

 dispO-------------------------------------------------------------------------------------O&!dispO Line FLow and Losses O&!dispO-------------------------------------------------------------------------------------O&!dispO>From>o > P > 6 > From> o > P > 6 >Line Loss >O&!

dispO>(us >(us> ) > )ar > (us > (us> ) > )ar > )> )ar >O&!for m = 1nl  p = fbm&! ? = tbm&!

 dispO-------------------------------------------------------------------------------------O&!  fprintfO%gO/ p&! fprintfO%gO/ ?&! fprintfO %<.5fO/ PiKp/?&&!fprintfO %<.5fO/ 6iKp/?&&!

fprintfO %gO/ ?&! fprintfO%gO/ p&! fprintfO %<.5fO/ PiK?/p&&!fprintfO %<.5fO/ 6iK?/p&&!  fprintfO %<.5fO/ LpiKm&&! fprintfO %<.5fO/ L?iKm&&!  fprintfOSnO&!

enddispO-------------------------------------------------------------------------------------O&!fprintfO otal Loss O&!fprintfO %<.5fO/ sumLpiK&&! fprintfO %<.5fO/ sumL?iK&&! fprintfOSnO&!dispO-------------------------------------------------------------------------------------O&!dispOQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQO&!

% Program to for Admittan3e And "mpedan3e (us Formation....

 fun3tion $ = ybusppgnum& % Returns $

 linedata = linedatasnum&! % 'alling Linedatas...fb = linedata/1&! % From bus number...tb = linedata/0&! % o bus number...r = linedata/5&! % Resistan3e/ R...* = linedata/&! % Rea3tan3e/ M...b = linedata/7&! % 9round Admittan3e/ (80...a = linedata/:&! % ap setting +alue.. = r B iC*! % matri*...y = 1.8! % o get in+erse of ea3h element...b = iCb! % )a4e ( imaginary...

 nb = ma*ma*fb&/ma*tb&&! % No. of buses...nl = lengthfb&! % No. of bran3hes...

$ = erosnb/nb&! % "nitialise $(us...

 % Formation of the ff Jiagonal #lements... for 4 = 1nl  $fb4&/tb4&& = $fb4&/tb4&& - y4&8a4&!  $tb4&/fb4&& = $fb4&/tb4&&! end

 % Formation of Jiagonal #lements.... for m = 1nb  for n = 1nl  if fbn& == m

Page 8: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 8/14

  $m/m& = $m/m& B yn&8an&0& B bn&!  elseif tbn& == m  $m/m& = $m/m& B yn& B bn&!  end  end end %$! % (us Admittan3e )atri* %T = in+$&! % (us "mpedan3e )atri*

% Polar to Re3tangular 'on+ersion

% GR#'H = R#'0PLRU/ U#A&% R#' - 'omple* matri* or number/ R#' = A B K(/ A = Real/ ( = "maginary% RU - )agnitude% U#A - Angle in radians

 fun3tion re3t = pol0re3trho/theta&re3t = rho.C3ostheta& B KCrho.Csintheta&!

OUTPUT:-

QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ-----------------------------------------------------------------------------------------  Newton Raphson Loadflow Analysis-----------------------------------------------------------------------------------------> (us > > Angle > "nKe3tion > 9eneration> Load >> No > pu > Jegree > ) > )ar > ) > )+ar

> ) > )ar >-----------------------------------------------------------------------------------------  1 1.,:,, ,.,,,, 050.75 -17.055 050.75-17.055 ,.,,, ,.,,,-----------------------------------------------------------------------------------------  0 1.,7, -.<1 1<.5,, 57.00< ,.,,,;.0< 01.;,, 10.;,,-----------------------------------------------------------------------------------------  5 1.,1,, -10.;0 -.0,, <.;7< ,.,,,0;.;7< .0,, 1.,,,-----------------------------------------------------------------------------------------  1.,150 -1,.00, -;.<,, 5.,, ,.,,,-,.,,, ;.<,, -5.,,-----------------------------------------------------------------------------------------  7 1.,1:: -<.;:,1 -;.:,, -1.:,, -,.,,,-,.,,, ;.:,, 1.:,,

Page 9: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 9/14

-----------------------------------------------------------------------------------------  : 1.,;,, -1.: -11.0,, 17.70: -,.,,,05.,0: 11.0,, ;.7,,-----------------------------------------------------------------------------------------  ; 1.,7; -15.05:< -,.,,, ,.,,, -,.,,,,.,,, ,.,,, ,.,,,

-----------------------------------------------------------------------------------------  < 1.,<,, -15.05:< ,.,,, 01.,5, ,.,,,01.,5, ,.,,, ,.,,,-----------------------------------------------------------------------------------------  1.,5,7 -1.<0,1 -0.7,, -1:.:,, ,.,,,-,.,,, 0.7,, 1:.:,,----------------------------------------------------------------------------------------- 1, 1.,0 -17.,5:, -.,,, -7.<,, -,.,,,,.,,, .,,, 7.<,,----------------------------------------------------------------------------------------- 11 1.,:1 -1.<7<1 -5.7,, -1.<,, ,.,,,,.,,, 5.7,, 1.<,,----------------------------------------------------------------------------------------- 10 1.,755 -17.0;5 -:.1,, -1.:,, ,.,,,,.,,, :.1,, 1.:,,----------------------------------------------------------------------------------------- 15 1.,:: -17.5515 -15.7,, -7.<,, ,.,,,

,.,,, 15.7,, 7.<,,----------------------------------------------------------------------------------------- 1 1.,15 -1:.,;1; -1.,, -7.,,, -,.,,,,.,,, 1.,, 7.,,,----------------------------------------------------------------------------------------- otal 15.75 51.,, 0;0.751,.7, 07.,,, ;5.7,,-----------------------------------------------------------------------------------------

QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ

Page 10: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 10/14

-------------------------------------------------------------------------------------  Line FLow and Losses------------------------------------------------------------------------------------->From>o > P > 6 > From> o > P > 6 >Line Loss >>(us >(us> ) > )ar > (us > (us> ) > )ar >

) > )ar >-------------------------------------------------------------------------------------  1 0 17;.,<, -1;.< 0 1 -170.;;0 5,.:5.5, 15.177-------------------------------------------------------------------------------------  1 7 ;7.715 ;.<1 7 1 -;0.;, 5.:0.;;5 11.7-------------------------------------------------------------------------------------  0 5 ;5.5: 7.5: 5 0 -;1.,:5 5.<0.555 .<5,-------------------------------------------------------------------------------------  0 77.5 0.57 0 -7.0;5 0.1501.:;, 7.,:;-------------------------------------------------------------------------------------  0 7 1.;55 .;5< 7 0 -,.<15 -1.0,.0, 0.<,-------------------------------------------------------------------------------------

  5 -05.15; ;.;70 5 05.70< -:.;75,.51 ,.<-------------------------------------------------------------------------------------  7 -7.7<7 11.7; 7 :,.,: -1,.,:5,.; 1.711-------------------------------------------------------------------------------------  ; 0;.,:: -17.5: ; -0;.,:: 1;.50;,.,,, 1.50-----------------------------------------------------------------

--------------------  17.: -0.:, -17.: 5.50-,.,,, 1.00-------------------------------------------------------------------------------------  7 : 7.<< -0,.<5 : 7 -7.<< 0:.:1;,.,,, 7.;;-------------------------------------------------------------------------------------  : 11 <.0<; <.<< 11 : -<.1:7 -<.:1,.105 ,.07;

Page 11: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 11/14

-------------------------------------------------------------------------------------  : 10 <.,: 5.1;: 10 : -;.< -5.,,<,.,<1 ,.1:<-------------------------------------------------------------------------------------  : 15 1<.55; .<1 15 : -1<.,<7 -.<7,.070 ,.:

-------------------------------------------------------------------------------------  ; < -,.,,, -0,.5:0 < ; ,.,,, 01.,5,,.,,, ,.::<-------------------------------------------------------------------------------------  ; 0;.,:: 1.;< ; -0;.,:: -15.<,-,.,,, ,.7;-------------------------------------------------------------------------------------  1, .55 -,., 1, -.5<; ,.0,,.,,: ,.,1:-------------------------------------------------------------------------------------  1 <.:5; ,.501 1 -<.7; -,.151,.,< ,.1,-------------------------------------------------------------------------------------  1, 11 -.:15 -:.;0, 11 1, .::7 :.<1,.,71 ,.10,-------------------------------------------------------------------------------------  10 15 1.<< 1.,< 15 10 -1.<;5 -1.5<

,.,11 ,.,1,-------------------------------------------------------------------------------------  15 1 :.7< 7.,<5 1 15 -:.575 -.<:,.1,7 ,.017-------------------------------------------------------------------------------------  otal Loss15.75 7:.1,-------------------------------------------------------------------------------------

QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ

DC LOAD FLOW SOLUTION:

Page 12: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 12/14

  For ea3h bus/

 

 MATLAB CODE:

3lear all!3l3!tstart=3putime!dispGO OH&

dispGOCCCCCJ' Power Flow 2olution - 5 (us systemCCCCCOH& Nbus=5!Nele=5!%line data#data=G1 1 0 1,i!  0 0 5 7i!  5 1 5 1,iH!%bus data bus 5 as sla34(data=G1 , 0,,,!  0 , 1,,,!  5 5,,, ,H!  % Formation of $bus matri*$bus = erosNbus/Nbus&!for 4 = 1Nele

  p = #data4/0&!  ? = #data4/5&!  yele = 18#data4/&!  $busp/p& = $busp/p& B yele !  $bus?/?& = $bus?/?& B yele!  $busp/?& = $busp/?& - yele!  $bus?/p& = $bus?/p& - yele!  end

$bus%%basem+a=1,,!refVbus=5!

Page 13: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 13/14

(1=imag$bus&(=(1!(refVbus/&=GH!(/refVbus&=GH!((=-(delPbus=(data/ 5&& - (data/ 0&&&!delPbusrefVbus/&=GH!delPbustheta=in+((&CdelPbusthetarefVbus/1&=,!

thetafor i=1Nbus  for K=1Nbus  Pi/K&=thetai&-thetaK&&C(1i/K&!  endendPdispOLine FlowsO&!for i=1Nbus  for K=1Nbus  if i=K EE iDK&  Pi/K&!  M = sprintfOP%d%d %d.O/i/K/Pi/K&&!  dispM&!  end  endend

 OUTPUT:

 

CCCCCJ' Power Flow 2olution - 5 (us systemCCCCC

$bus =

  , - ,.0,,,i , B ,.1,,,i , B ,.1,,,i  , B ,.1,,,i , - ,.5,,,i , B ,.0,,,i  , B ,.1,,,i , B ,.0,,,i , - ,.5,,,i

(1 =

  -,.0,,, ,.1,,, ,.1,,,  ,.1,,, -,.5,,, ,.0,,,  ,.1,,, ,.0,,, -,.5,,,

(( =

  ,.0,,, -,.1,,,  -,.1,,, ,.5,,,

delPbus =

  0,,,  1,,,

theta =

  1.,eB,, C

Page 14: Ieee 14 Bus System Load Flow Using n

8/16/2019 Ieee 14 Bus System Load Flow Using n

http://slidepdf.com/reader/full/ieee-14-bus-system-load-flow-using-n 14/14

  1.,,,  ,.<,,,

theta =

  1.,eB,, C

  1.,,,  ,.<,,,

  ,

P =

  1.,eB,,5 C

  , ,.:,,, 1.,,,  -,.:,,, , 1.:,,,  -1.,,, -1.:,,, ,

Line FlowsP10 :.,,,,,,eB,,0.P15 1,,.P05 1.:,,,,,eB,,5.