You are on page 1of 1

Guass_Siedel Method:

%bus_no Active_powr_gen Reactive_powr_gen


%_power_load Sch_voltage%%

Active_powr_load

Reactive

function gauss_siedel(Y)
data=[
1
0
0
1
.75
1
2
0
0
1
.75
1
3
0
0
.5
.37
1
4
0
0
0
0
1
5
0
0
0
0
1
6
0
0
0
0
1
7
0
0
0
0
1
8
0
0
0
0
1
9
0
0
0
0
1
10
0
0
0
0
1
11
0
0
0
0
1
12
1
0
.75
.56
1
];
p_gen= data(:,2); %to access 2 column(Active_power_gen)%
q_gen = data(:,3);
p_load = data(:,4);
q_load = data(:,5);
v = data(:,6);
for iteration=1:2
for m=2:12
for iterations=1:2
temp=0;
for n=1:12
if n~=m
temp=temp+Y(m,n).*v(n);
end
end
v(m)= (1./Y(m,m)).*(((p_gen(m)-p_load(m)-i*q_gen(m)+i*q_load(m)) ./
conj(v(m)))-temp);
end
m
mag= abs(v(m))
Angle=angle(v(m)) .*(180./pi)
end
end

You might also like