M-File Programming for Transmission Line:
clc
clear
disp('STUDYING THE CHARECTERISTICS OF A TRANSMISSION LINE')
disp('***************************************************')
disp(' ')
V=input('Receiving end line voltage in volt =');
L=input('length of transmission line in km =');
Pr=input('Rated power at receiving end load =');
pf=input('power factor=');
I=Pr/(sqrt(3)*V*pf);
a1=acos(pf);
Vr=V/sqrt(3)
Ir=I*cos(a1)-j*I*sin(a1)
r=input('resistance/km/phase=');
x=input('inductive reactance/km/phase=');
R=r*L;
X=j*x*L;
Z=R+X
if V>20000
y=input('capacitive susceptance/km/phase=');
Y=j*y*L
m=Y*Z;
end
if V<20000
disp('SHORT TRANSMISSON LINE')
disp('**********************')
A=1
B=Z
C=0
D=A
end
if V>20000 & V<100000
disp('MEDIUM TRANSMISSIOM LINE')
disp('************************')
disp(' ')
A=1+m/2;
T=1;
Py=2;
g=input('choose nominal T or Py model=');
if g<2
disp('nominal T model')
disp('***************')
A
B=Z*(1+m/4)
C=Y
D=A
end
if g>1
disp('nominal Py model')
disp('****************')
A
B=Z
C=Y*(1+m/4)
D=A
end
end
if V>100000
disp('LONG TRANSMISSION LINE')
disp('**********************')
n=sqrt(Z/Y);
o=sqrt(m);
A=cosh(o)
B=n*sinh(o)
C=sinh(o)/n
D=A
end
Vs=A*Vr+B*Ir
Is=C*Vr+D*Ir
reg=(abs(Vs)-Vr)*100/Vr
Vs_line=sqrt(3)*Vs
Ps=3*(real(Vs*Is))
eff=Pr*100/Ps
(try it)
Comments
Post a Comment