You are on page 1of 1

%matrice impdance srie des lignes

Zs(1,2)=0.02+0.1j;
Zs(2,1)=Zs(1,2);
Zs(1,5)=0.05+0.25j;
Zs(5,1)=Zs(1,5);
Zs(2,3)=0.04+0.2j;
Zs(3,2)=Zs(2,3);
Zs(2,5)=0.05+0.25j;
Zs(5,2)=Zs(2,5);
Zs(3,4)=0.05+0.25j;
Zs(4,3)=Zs(3,4);
Zs(3,5)=0.08+0.4j;
Zs(5,3)=Zs(3,5);
Zs(4,5)=0.1+0.5j;
Zs(5,4)=Zs(4,5);
%matrice admitance shunt des branches
Ysh(1,2)=0.03j;
Ysh(2,1)=Ysh(1,2);
Ysh(1,5)=0.02j;
Yshh(5,1)=Ysh(1,5);
Ys(2,3)=0.025j;
Ysh(3,2)=Ysh(2,3);
Ysh(2,5)=0.02j;
Ysh(5,2)=Ysh(2,5);
Ysh(3,4)=0.02j;
Ysh(4,3)=Ysh(3,4);
Ysh(3,5)=0.01j;
Ysh(5,3)=Ysh(3,5);
Ysh(4,5)=0.075j;
Ysh(5,4)=Ysh(4,5);
% calcul de la matrice srie des lignes
for m=1:5
for n=1:5
if Zs(m,n)==0
ys(m,n)=0;
else ys(m,n)=1/Zs(m,n);
end
end
end
%calcul de la matrice admittance Ybus
% calcul des lments non diagonaux de Ybus
Ybus=zeros(5,5);
for m=1:5
for n=1:5
if m ~=n
Ybus(m,n)=-ys(m,n);
end
end
end
%calcul des lments diagonaux de Ybus
for m=1:5
for n=1:5
Ybus(m,m)=Ybus(m,m)+ys(m,n)+Ysh(m,n);
end
end
disp(Ybus)

You might also like