Sie sind auf Seite 1von 4

clear;

disp(' ')
disp(' ANDA MEMILIH METODE GAUSS-SIEDEL')
base = 100;
e1 = 1;
epsilon = 0.0000001;
x = 1;
alpha = 1.3;
% Data impedansi dan admitansi saluran :
z12 = 0.02 + j*0.06;
y12 = 1/z12;
z13 = 0.08 + j*0.24;
y13 = 1/z13;
z23 = 0.06 + j*0.18;
y23 = 1/z23;
z24 = 0.06 + j*0.18;
y24 = 1/z24;
z25 = 0.04 + j*0.12;
y25 = 1/z25;
z34 = 0.01 + j*0.03;
y34 = 1/z34;
z45 = 0.08 + j*0.24;
y45 = 1/z45;
% Suseptansi kapasitif (1/2 B) pada saluran (pu)
ysk12 = j*0.030;
ysk13 = j*0.025;
ysk23 = j*0.020;
ysk24 = j*0.020;
ysk25 = j*0.015;
ysk34 = j*0.010;
ysk45 = j*0.025;
% Admitansi YBus :
Y11 = y12 + y13 + ysk12 + ysk13;
Y12 = -y12; Y13 = -y13; Y14 = 0;
Y15 = 0;
Y21 = Y12;
Y22 = y12 + y23 + y24 + y25 + ysk12 + ysk23 + ysk24 + ysk25;
Y23 = -y23; Y24 = -y24; Y25 = -y25;
Y33 = y13 + y23 + y34 + ysk13 + ysk23 + ysk34;
Y31 = -y13; Y32 = -y23; Y34 = -y34; Y35 = 0;
Y44 = y24 + y34 + y45 + ysk24 + ysk34 + ysk45;
Y41 = Y14; Y42 = Y24; Y43 = Y34; Y45 = -y45;
Y55 = y25 + y45 + ysk25 + ysk45;
Y51 = Y15; Y52 = -y25; Y53 = Y35; Y54 = Y45;
% Beban semu pada bus 2, 3, 4 & 5 (pu):
Sb2 = -(20 + j*10)/base;
Sb3 = -(20 + j*15)/base;
Sb4 = -(50 + j*30)/base;
Sb5 = -(60 + j*40)/base;
% Daya aktif dr pembangkit pd Bus 2 & 3 (pu) :
Pp2 = 40/base;
Pp3 = 30/base;
% Tegangan pd Slack Bus (pu) :
V1 = 1.06 + j*0.0;
% Tegangan pada Bus Pengaturan (pu) :
V2 = 1.045;
V3 = 1.030;
% Estimasi tegangan awal pd Bus beban (pu) :
V4 = 1.0;
V5 = 1.0;
iter = 0;
disp('__________________________________________________________________________
________________')
disp('
TEGANGAN PADA SETIAP BUS')
disp(' Itr
V2
V3
V4
V5
|')
disp(' ke:
(Volt)
(Volt)
(Volt)
(Volt)')
disp('__________________________________________________________________________

________________')
disp(' ')
format short g
while x>=epsilon
iter = iter+1;
% Harga mutlak dari tegangan pd Bus pengaturan tegangan :
V2m = abs(V2);
V3m = abs(V3);
% Perhitungan tegangan pd Bus 4 & 5 (pu) :
E4 = 1/(Y44)*((Sb4'/V4')-Y42*V2-Y43*V3-Y45*V5);
E5 = 1/(Y55)*((Sb5'/V5')-Y52*V2-Y54*V4);
% Perhitungan daya reaktif pd Bus 2 & 3 (pu) :
q2 = V2'*(V2*(Y22)+Y21*V1+Y23*V3+Y24*E4+Y25*E5);
q3 = V3'*(V3*(Y33)+Y31*V1+Y32*V2+Y34*E4);
Q2 = -imag(q2);
Q3 = -imag(q3);
% Daya komplek pd Bus 2 & 3 (pu) :
S2 = (Pp2+real(Sb2))-j*Q2;
S3 = (Pp3+real(Sb3))-j*Q3;
% Perhitungan tegangan komplek pd Bus 2 & 3 (pu) :
Vc2 = 1/(Y22)*((S2/V2')-Y21*V1-Y23*V3-Y24*E4-Y25*E5);
Vc3 = 1/(Y33)*((S3/V3')-Y31*V1-Y32*V2-Y34*E4);
e2 = sqrt((V2m)^2-(imag(Vc2))^2);
e3 = sqrt((V3m)^2-(imag(Vc3))^2);
E2 = e2 + j*imag(Vc2);
E3 = e3 + j*imag(Vc3);
% Perhitungan tegangan komplek pd Bus 2, 3, 4 & 5 (pu) :
V2kom = V2 + alpha*(E2-V2);
V3kom = V3 + alpha*(E3-V3);
V4kom = V4 + alpha*(E4-V4);
V5kom = V5 + alpha*(E5-V5);
% Daya komplek dr Pembangkit pd Slack Bus (MW) & (Mvar) :
Sp1 = V1*(Y11*V1+Y12*V2+Y13*V3)*base;
c2 = imag(Sb2);
c3 = imag(Sb3);
% Daya reaktif dr pembangkit pd Bus 2 & 3 (pu) :
Qp2 = Q2-imag(Sb2);
Qp3 = Q3-imag(Sb3);
% Daya Komplek dr pembangkit pd Bus 2 & 3 (MW) & (Mvar) :
Sp2 = (Pp2-j*Qp2)*base;
Sp3 = (Pp3-j*Qp3)*base;
% Harga untuk menghentikan iterasi ;
x = abs(e2-e1);
e1 = e2;
% Tegangan pd Bus 2, 3, 4 & 5 (pu) :
V2 = V2kom;
V3 = V3kom;
V4 = V4kom;
V5 = V5kom;
% Aliran daya komplek (MW) & (Mvar) pd Saluran :
S12 = (V1*(V1-V2')*y12'+((V1)^2)*ysk12')*base;
S21 = (V2*(V2'-V1)*y12'+((V2*V2')*ysk12'))*base;
S13 = (V1*(V1-V3')*y13'+((V1)^2)*ysk13')*base;
S31 = (V3*(V3'-V1)*y13'+((V3*V3')*ysk13'))*base;
S23 = (V2*(V2'-V3')*y23'+((V2*V2')*ysk23'))*base;
S32 = (V3*(V3'-V2')*y23'+((V3*V3')*ysk23'))*base;
S24 = (V2*(V2'-V4')*y24'+((V2*V2')*ysk24'))*base;
S42 = (V4*(V4'-V2')*y24'+((V4*V4')*ysk24'))*base;
S25 = (V2*(V2'-V5')*y25'+((V2*V2')*ysk25'))*base;
S52 = (V5*(V5'-V2')*y25'+((V5*V5')*ysk25'))*base;

S34 = (V3*(V3'-V4')*y34'+((V3*V3')*ysk34'))*base;
S43 = (V4*(V4'-V3')*y34'+((V4*V4')*ysk34'))*base;
S45 = (V4*(V4'-V5')*y45'+((V4*V4')*ysk45'))*base;
S54 = (V5*(V5'-V4')*y45'+((V5*V5')*ysk45'))*base;
% Rugi-rugi daya komplek (MW) & (Mvar) pd Saluran :
SL12 = S12+S21;
SL13 = S13+S31;
SL23 = S23+S32;
SL24 = S24+S42;
SL25 = S25+S52;
SL34 = S34+S43;
SL45 = S45+S54;
disp([,' ' num2str(iter),'
' num2str(V2),'
' num2str(V3),'
' nu
m2str(V4),'
' num2str(V5)])
end
disp('__________________________________________________________________________
________________')
disp(' ')
disp('DAYA KOMPLEK PADA BUS 1, 2 & 3 ADALAH :')
disp([,' Bus 1 = ' num2str(real(Sp1)),' MW dan ' num2str(imag(Sp1)),' Mvar'])
disp([,' Bus 2 = ' num2str(real(Sp2)),' MW dan ' num2str(imag(Sp2)),' Mvar'])
%disp([,' Bus 3 = ' num2str(real(Sp3)),' MW dan ' num2str(imag(Sp3)),' Mvar'])
disp(' ')
disp('ALIRAN DAYA PADA SALURAN ADALAH :')
disp([,' Saluran 1-2 = ' num2str(real(S12)),' MW dan ' num2str(imag(S12)),' Mv
ar'])
disp([,' Saluran 2-1 = ' num2str(real(S21)),' MW dan ' num2str(imag(S21)),' Mv
ar'])
disp([,' Saluran 1-3 = ' num2str(real(S13)),' MW dan ' num2str(imag(S13)),' Mv
ar'])
disp([,' Saluran 3-1 = ' num2str(real(S31)),' MW dan ' num2str(imag(S31)),' Mv
ar'])
disp([,' Saluran 2-3 = ' num2str(real(S23)),' MW dan ' num2str(imag(S23)),' Mv
ar'])
disp([,' Saluran 3-2 = ' num2str(real(S32)),' MW dan ' num2str(imag(S32)),' Mv
ar'])
disp([,' Saluran 2-4 = ' num2str(real(S24)),' MW dan ' num2str(imag(S24)),' Mv
ar'])
disp([,' Saluran 4-2 = ' num2str(real(S42)),' MW dan ' num2str(imag(S42)),' Mv
ar'])
disp([,' Saluran 2-5 = ' num2str(real(S25)),' MW dan ' num2str(imag(S25)),' Mv
ar'])
disp([,' Saluran 5-2 = ' num2str(real(S52)),' MW dan ' num2str(imag(S52)),' Mv
ar'])
disp([,' Saluran 3-4 = ' num2str(real(S34)),' MW dan ' num2str(imag(S34)),' Mv
ar'])
disp([,' Saluran 4-3 = ' num2str(real(S43)),' MW dan ' num2str(imag(S43)),' Mv
ar'])
disp([,' Saluran 4-5 = ' num2str(real(S45)),' MW dan ' num2str(imag(S45)),' Mv
ar'])
disp([,' Saluran 5-4 = ' num2str(real(S54)),' MW dan ' num2str(imag(S54)),' Mv
ar'])
disp(' ')
disp('RUGI-RUGI DAYA PADA SALURAN ADALAH :')
disp([,' Saluran 1-2 = ' num2str(real(SL12)),' MW dan ' num2str(imag(SL12)),'
Mvar'])
disp([,' Saluran 1-3 = ' num2str(real(SL13)),' MW dan ' num2str(imag(SL13)),'
Mvar'])
disp([,' Saluran 2-3 = ' num2str(real(SL23)),' MW dan ' num2str(imag(SL23)),'
Mvar'])

disp([,' Saluran 2-4 = ' num2str(real(SL24)),'


Mvar'])
disp([,' Saluran 2-5 = ' num2str(real(SL25)),'
Mvar'])
disp([,' Saluran 3-4 = ' num2str(real(SL34)),'
Mvar'])
disp([,' Saluran 4-5 = ' num2str(real(SL45)),'
Mvar'])
disp(' ')
disp('===================================')

MW dan ' num2str(imag(SL24)),'


MW dan ' num2str(imag(SL25)),'
MW dan ' num2str(imag(SL34)),'
MW dan ' num2str(imag(SL45)),'