Line Line Impedance (R + jX)
No.
1-2 0.02 + j 0.12
1-3 0.20 + j 0.30
2-4 0.10 + j 0.25
2-3 0.15 + j 0.35
4-3 0.10 + j 0.20
Manual Calculation
I1 = I11 + I12 + I13 + I14
I2 = I21 + I22 + I23 + I24
I3 = I31 + I32 + I33 + I34
I4 = I41 + I42 + I43 + I44
Here, I11, I22, I33, I44, I41, I14 = 0 (clear from the figure above).
Now we know that, I = V/Z
So it can be written that, I = VY
Where, Y (admittance) = 1/Z.
I1 = (V1 V2) Y12 + (V1 V3) Y13
= V1 (Y11 + Y12 + Y13) V2Y12 V3 Y13 . (i)
I2 = (V2 V1) Y21 + (V2 V3) Y23 + (V2- V4) Y24
= V1 (-Y21) + V2 (Y21 + Y23 + Y24) + V3 (-Y23) + V4 (-Y24) (ii)
I3 = (V3 V1) Y31 + (V3 V2) Y32 + (V3 V4) Y34
= V1 (-Y31) + V2 (-Y32) + V3 (Y31 + Y32 + Y34) + V4 (-Y34)....(iii)
I4 = (V4 V2) Y42 + (V4 V3) Y43
= V2 (-Y42) + V3 (-Y43) + V4 (Y42 + Y43) .(iv)
So now the admittance matrix would be
Y12 + Y13 - Y12 -Y13 0
-Y21 Y21 + Y23 + Y24 -Y23 -Y24
-Y31 -Y32 Y31 + Y32 + Y34 -Y34
0 -Y42 -Y43 Y42 + Y43
Now, the values for Y are calculated below:
1
Y 12=
0.02+ j0.12
Rationalising it we get,
1 0.02 j0.12 0.02 j0.12
Y 12= = =1.35 j 8.108 .
0.02+ j 0.12 0.02 j0.12 0.0148
1
Y 13=
0.2+ j0.3
Rationalising it we get,
1 0.2 j 0.3 0.2 j 0.3
Y 13= = =1.538 j 2.307 .
0.2+ j 0.3 0.2 j 0.3 0.13
1
Y 23=
0.15+ j 0.35
Rationalising it we get,
1 0.15 j 0.35 0.15 j 0.35
Y 23= = =1.0344 j 2.413.
0.15+ j 0.35 0.15 j 0.33 0.145
1
Y 24 =
0.1+ j 0.25
Rationalising it we get,
1 0.1 j 0.25 0.1 j 0.25
Y 24= = =1.379 j 3.448 .
0.1+ j 0.25 0.1 j 0.25 0.0725
1
Y 34 =
0.1+ j 0.2
Rationalising it we get,
1 0.1 j 0.2 0.1 j 0.2
Y 34= = =2 j 4.
0.1+ j 0.2 0.1 j 0.2 0.05
So, the Y matrix would be,
2.888 j 10.4157 1.35+ j8.108 1.538+ j 2.307 0
1.538+ j8.108 3.7637 j 15.0042 1.0344 + j 2.4138 1.3793+ j 3.4482
1.538+ j2.3077 1.0344+ j 2.4138 4.5724 j 8.7215 2+ j 4
0 1.3793+ j 3.4482 2+ j 4 3.3793 j 7.4483
MATLAB CODE :
clc;
clear all;
close all;
fprintf('FORMATION OF BUS ADMITTANCE AND IMPEDANCE
MATRIX\n\n')
fprintf('Enter Line Data in order of from bus, to bus,
r,x,\n\n')
linedata = input('Enter the line data : ')
fb = linedata(:,1);%From bus number...
tb = linedata(:,2);%To bus number...
r = linedata(:,3); %Resistance, R...
x = linedata(:,4); %Reactance, X...
z = r + i*x; %Z matrix
y = 1./z %To get inverse of each element
nbus = max(max(fb),max(tb)); %No. of buses...
nbranch = length(fb); %No. of branches...
ybus = zeros(nbus,nbus); %Initialize Y Bus...
%Formation of the Off Diagonal Elements...
for k=1:nbranch
ybus(fb(k),tb(k)) = -y(k);
ybus(tb(k),fb(k)) = ybus(fb(k),tb(k));
end
%Formation of the Diagonal Elements...
for m=1:nbus
for n=1:nbranch
if fb(n) == m | tb(n) == m
ybus(m,m) = ybus(m,m) + y(n);
end
end
end
ybus = ybus %Bus Admittance Matrix
zbus = inv(ybus); %Bus Impedance Matrix
zbus
Figure. Command window output results