Documente Academic
Documente Profesional
Documente Cultură
1. A single circuit 3 phase, 50Hz, transmission line is300KM long. The conductor has the following
parameters: Z = 20+100i and Y= 1e-6i The load is 50MW at 110 KV with 0.8 power factor. Write a
MATLAB program to obtain the sending end current, power, voltage and power factor. Also find the
regulation and efficiency using nominal T method. Also calculate ABCD parameters.
MATLAB PROGRAM
% nominal T method
clear all;
Pr=input('enter the value of recieving end power=');
Vr=input('enter the value of recieving end voltage=');
pfr=input('enter the value of recieving end power facter=');
z1=input('enter the value of the line impedance/km=');
y=input('enter the value of the shunt admittance/km=');
d=input('enter the value of the transmission line length in km=');
z=z1*d
vrp=Vr/(sqrt(3))
irm=Pr/(sqrt(3)*Vr*pfr)
ira=-acos(pfr)
ir=irm*(exp(ira*j))
a=1+(y*z/2)
d=a
b=z*(1+(y*z/4))
c=y
vs=a*vrp+b*ir
is=c*vrp+d*ir
v1=vrp+(ir*z/2)
ic=y*d*v1
is=ic+ir
vs=v1+(is*z/2)
vsm=abs(vs)
vsang=angle(vs)*180/pi
isang=angle(is)*180/pi
pfs=cosd(vsang-isang)
ps=3*abs(vs)*abs(is)*pfs
eff=(Pr*100)/ps
reg=(abs(vs)-abs(vrp))*100/(abs(vrp))
input data
enter the value of recieving end power=50e6
enter the value of recieving end voltage=110e3
enter the value of recieving end power facter=0.8
enter the value of the line impedance/km=20+100i
enter the value of the shunt admittance/km=1e-6i
enter the value of the transmission line length in km=1
results
z = 2.0000e+001 +1.0000e+002i
vrp = 6.3509e+004
irm = 328.0399
ira = -0.6435
ir = 2.6243e+002 -1.9682e+002i
a = 1.0000 + 0.0000i
d = 1.0000 + 0.0000i
b = 19.9990 +99.9976i
c = 0 +1.0000e-006i
vs = 8.8436e+004 +2.2307e+004i
is = 2.6242e+002 -1.9675e+002i
v1 = 7.5974e+004 +1.1153e+004i
ic = -0.0112 + 0.0760i
is = 2.6242e+002 -1.9675e+002i
vs = 8.8436e+004 +2.2307e+004i
vsm = 9.1206e+004
vsang = 14.1569
isang = -36.8604
pfs = 0.6291
ps = 5.6456e+007
eff = 88.5653
reg = 43.6116
2. A single circuit 3 phase, 50Hz, transmission line is300KM long. The conductor has the following
parameters: Z= 0.16+0.826iohm/km and Y= 0+5e-6imho/km . The load is 125MW at 215
KV with 1 power factor. Write a MATLAB program to obtain the sending end current, power, voltage
and power factor. Also find the regulation and efficiency using nominal T method.
MATLAB PROGRAM
input data
enter the value of recieving end power=125e6
enter the value of recieving end voltage=215e3
enter the value of recieving end power facter=1
enter the value of the line impedance/km=0.16+0.826i
enter the value of the shunt admittance/km=0+5e-6i
enter the value of the transmission line length in km=300
results
z = 4.8000e+001 +2.4780e+002i
vrp = 1.2413e+005
irm = 335.6688
ira = 0
ir = 335.6688
a = 0.9994 + 0.0001i
d = 0.9994 + 0.0001i
b = 4.7980e+001 +2.4775e+002i
c = -1.9998e-010 +4.9990e-006i
vs = 1.4016e+005 +8.3177e+004i
is = 3.3546e+002 +6.6080e-001i
vsang = 30.6870
isang = 0.1129
pfs = 0.8610
ps = 1.4122e+008
eff = 88.5154
reg = 31.2986
3. Write MATLAB program to obtain the Ybus using Inspection method for the power system
shown below. Data is - line Impedance is 0.02+j0.08 PU and total Shunt Admittance of each line
is j0.02 PU.
MATLAB PROGRAM
clc;clear all;close all;
p=input('enter number of buses=');
k=input('enter number of elements=');
for m=1:k
fprintf(['Data for Transmission Line',int2str(m)]);
fprintf('\n');
i=input('enter from bus=');
j=input('enter to bus=');
z=input('enter impedance of line=');
hlc=input('enter half line charging impedance=');
yy(i,j)=1/z;
yy(j,i)=1/z;
c(m,i)=hlc;
c(m,j)=hlc;
end
yd=diag(sum(yy))+diag(sum(c));
ybus=yd-yy
RESULTS
enter number of buses=3
enter number of elements=3
Data for Transmission Line1
enter from bus=1
enter to bus=2
enter impedance of line=0.02+0.08i
enter half line charging impedance=0.01i
Data for Transmission Line2
enter from bus=2
enter to bus=3
enter impedance of line=0.02+0.08i
enter half line charging impedance=0.01i
Data for Transmission Line3
enter from bus=3
enter to bus=1
enter impedance of line=0.02+0.08i
enter half line charging impedance=0.01i
ybus =
4. Power system data is given below. Write MATLAB program to obtain the Ybus by singular
transformation.
p q z hlc(adm)
z=[ 1 2 0.02+0.06i 0.06i
1 3 0.08+0.24i 0.05i
2 3 0.06+0.18i 0.04i
2 4 0.06+0.18i 0.04i
2 5 0.04+0.12i 0.03i
3 4 0.01+0.03i 0.02i
4 5 0.08+0.24i 0.05i]
MATLAB PROGRAM
clear all
% p q z hlc(admittance)
z=[1 2 0.02+0.06i 0.06i;
1 3 0.08+0.24i 0.05i;
2 3 0.06+0.18i 0.04i
2 4 0.06+0.18i 0.04i;
2 5 0.04+0.12i 0.03i;
3 4 0.01+0.03i 0.02i;
4 5 0.08+0.24i 0.05i]
%function yb(z)
fb=z(:,1)
tb=z(:,2)
Z=z(:,3)
hlc=z(:,4)
y=1./Z
nbus=max(max(fb),max(tb))
Y=zeros(nbus)
nline=length(fb)
nlb=nline+nbus
A=zeros(nlb,nbus)
for k=1:nbus
A(k,k)=1
end
for k=1:nline
A(nbus+k,fb(k))=1
A(nbus+k,tb(k))=-1
end
sh=zeros(nbus)
for k=1:nline
sh(fb(k))=sh(fb(k))+hlc(k)
sh(tb(k))=sh(tb(k))+hlc(k)
end
ypr=zeros(nlb,nlb)
for k=1:nbus
ypr(k,k)=sh(k)
end
for k=1:nline
ypr(nbus+k,nbus+k)=y(k)
end
format short;
Ybus=A'*ypr*A
RESULTS
A=
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
1 -1 0 0 0
1 0 -1 0 0
0 1 -1 0 0
0 1 0 -1 0
0 1 0 0 -1
0 0 1 -1 0
0 0 0 1 -1
sh =
0 + 0.1100i 0 0 0 0
0 + 0.1700i 0 0 0 0
0 + 0.1100i 0 0 0 0
0 + 0.1100i 0 0 0 0
0 + 0.0800i 0 0 0 0
Ybus =
6.2500 -18.6400i -5.0000 +15.0000i -1.2500 + 3.7500i 0 0
-5.0000 +15.0000i 10.8333 -32.3300i -1.6667 + 5.0000i -1.6667 + 5.0000i -2.5000 + 7.5000i
-1.2500 + 3.7500i -1.6667 + 5.0000i 12.9167 -38.6400i -10.0000 +30.0000i 0
0 -1.6667 + 5.0000i -10.0000 +30.0000i 12.9167 -38.6400i -1.2500 + 3.7500i
0 -2.5000 + 7.5000i 0 -1.2500 + 3.7500i 3.7500 -11.1700i
5. For a power system shown below obtain Ybus using singular transformation method by
writing MATLAB program
MATLAB program
%formation of Ybus by singular transformation
clc;
p=4;% no of buses
k=5;% no of lines
z1=[0.6 0.1;0.1 0.5]
z2=[0 0.2 0; 0 0 0]
z3=[0 0;0.2 0;0 0]
z4=[0.5 0 0;0 0.4 0;0 0 0.2]
z=[z1 z2;z3 z4]
b1=inv(z1-(z2*inv(z4)*z3))
b2=-b1*z2*inv(z4)
b3=-inv(z4)*z3*b1
b4=inv(z4)-inv(z4)*z3*b2
ypri=[b1 b2;b3 b4]
a=[-1 0 0;0 -1 0;0 1 -1;-1 0 0;1 0 -1]
Ybus=a'*[ypri]*a
RESULTS:
0 0 2.0000 0 0
0 0 0 0 5.0000
a= -1 0 0
0 -1 0
0 1 -1
-1 0 0
1 0 -1
6. A star connected 3 phase Synchronous Generator 165 MVA 95.2 KV, delivering full load at
0.8 PF lag. Armature resistance = 0.2 Ω/phase, Direct axis reactance =2 Ω/phase and Quadrature
axis reactance = 1.2 Ω. Write MATLAB program to obtain the Power – angle curve. Also obtain
excitation E M F, % regulation, power delivered, reluctance power and total power.(case-1)
7. A star connected 3 phase Synchronous Generator 165 MVA 95.2 KV, delivering full load at
0.8 PF lag. Armature resistance = 0.2 Ω/phase, Direct axis reactance =2 Ω/phase and Quadrature
axis reactance = 2 Ω. Write MATLAB program to obtain the Power – angle curve. Also obtain
excitation E M F, % regulation, power delivered, reluctance power and total power.(case-2)
MATLAB program
fprintf('\n');
fprintf(['direct axis component of current= ' int2str(ida) 'amps']);
fprintf('\n');
fprintf(['percentage regulation= ' int2str(reg) '%']);
fprintf('\n');
fprintf(['fundamental component of power= ' int2str(pdf) 'watts']);
fprintf('\n');
fprintf(['second harmonic component of power= ' int2str(pdh) 'watts']);
fprintf('\n');
fprintf(['total power= ' int2str(p) 'watts']);
delta=0:pi/100:pi;
deltad=delta*180/pi;
pdf=e*vt*sin(delta)/xd;
pdh=(vt*vt*(xd-xq)*sin(2*delta))/(2*xd*xq);
p=pdf+pdh;
plot(deltad,pdf,deltad,pdh,deltad,p);
grid;
disp(pdf)
disp(pdh)
disp(p)
fprintf(' %7.4f %5.4f\n',[deltad',pdf',pdh',p']');
im = 1.0007e+003
il = 8.0058e+002 -6.0044e+002i
ed = 5.5841e+004 +8.4061e+002i
edm = 5.5847e+004
delta = 0.0151
deltad = 0.8625
phi = 0.6586
ia = 7.9145e+002 +6.1242e+002i
iqa = 791.4537
ida = 612.4191
e = 5.6337e+004
MATLAB PROGRAM
clc;clear all;close all;
vt=1;
va=0.5;
x=1;
ra=0;
xd=0.25;
xq=0.2;
pf=0.8;
fi=-acos(pf);
im=(x*va)/(vt)
il=im*(exp(j*fi))
ed=vt+(il*(ra+(j*xq)))
edm=abs(ed)
dlt=angle(ed)
dltd=dlt*180/pi
phi=-fi+dlt
ia=abs(il)*exp(j*phi)
iqa=real(ia)
ida=imag(ia)
ema=(abs(ed)+(ida*j*(xd-xq)))*(exp(j*dltd))
e=abs(ema)
reg=(e-vt)*100/vt;
pdf=e*vt*sin(dlt)/xd;
pdh=(vt*vt*(xd-xq)*sin(2*dlt))/(2*xd*xq);
p=pdf+pdh;
fprintf('\n');
fprintf(['internal emf= ' num2str(edm) 'volts']);
fprintf('\n');
fprintf(['power angle= ' num2str(dltd) 'degrees']);
fprintf('\n');
fprintf(['quadrature axis bcomponent of current= ' num2str(iqa) 'amps']);
fprintf('\n');
fprintf(['direct axis component of current= ' num2str(ida) 'amps']);
fprintf('\n');
fprintf(['percentage regulation= ' num2str(reg) '%']);
fprintf('\n');
fprintf(['fundamental component of power= ' num2str(pdf) 'watts']);
fprintf('\n');
fprintf(['second harmonic component of power= ' num2str(pdh) 'watts']);
fprintf('\n');
fprintf(['total power= ' num2str(p) 'watts']);
dlt=0:pi/50:pi;
dltd=dlt*180/pi;
pdf=e*vt*sin(dlt)/xd;
pdh=(vt*vt*(xd-xq)*sin(2*dlt))/(2*xd*xq);
p=pdf+pdh;
plot(dltd,pdf/1000,dltd,pdh/1000,dltd,p/1000);
legend('fundamental component of power','harmonic component of power','total
power')
grid;
xlabel('delta in degrees-------------->')
ylabel('power in mw------------------>')
title('power angle curve')
Results:
9. . A star connected 3 phase Synchronous Generator has voltage = 1pu and delivering 0.5pu
power at 0.8 PF lag. Direct axis reactance =0.25pu and Quadrature axis reactance = 0.25pu.
Write MATLAB program to obtain the Power – angle curve. Also obtain excitation E M F, %
regulation, power delivered, reluctance power and total power
When Xd=Xq=0.25
vt=11000;
va=33333;
x=1;
ra=0.2;
xd=4;
xq=3;
pf=0.8;
fi=-acos(pf);
im=(x*va*1000)/(vt)
il=im*(exp(j*fi))
ed=vt+(il*(ra+(j*xq)))
edm=abs(ed)
dlt=angle(ed)
dltd=dlt*180/pi
phi=-fi+dlt
ia=abs(il)*exp(j*phi)
iqa=real(ia)
ida=imag(ia)
e=abs(ed)+(ida*(xd-xq))
reg=(e-vt)*100/vt;
pdf=e*vt*sin(dlt)/xd;
pdh=(vt*vt*(xd-xq)*sin(2*dlt))/(2*xd*xq);
p=pdf+pdh;
dlt=0:pi/50:pi;
dltd=dlt*180/pi;
pdf=e*vt*sin(dlt)/xd;
pdh=(vt*vt*(xd-xq)*sin(2*dlt))/(2*xd*xq);
p=pdf+pdh;
plot(dltd,pdf/1000,dltd,pdh/1000,dltd,p/1000);grid;
11.A star connected 3 phase Synchronous Generator 100 MVA 11 KV has Ra = 0.2 Ω/phase, Xd
= 4 Ω/phase, and Xq = 4 Ω/phase is operating at 0.8 PF lag. Write a MATLAB Program to
determine Excitation E M F, Regulation, Fundamental component of Power, Harmonic power
and total Power. Also plot Power- angle diagram
When Xd=Xq=4
12. Write a MATLAB program to obtain the bus currents, line flows and line losses
MATLAB program
clc;clear all;close all;
noofbus=3;
noofline=3;
Ybus=[5.882+23.582i -2.94+11.764i -2.94+11.764i;-2.94+11.764i 5.882+23.582i -
2.94+11.764i;-2.94+11.764i -2.94+11.764i 5.882+23.582i];
Vbus=[1.04;1.0;1.0];
Ibus=Ybus*Vbus;
Sbus=diag(Vbus)*Ibus;
pbus=real(Sbus) ; %P+Qi
qbus=imag(Sbus);
Ploss=sum(pbus);
Qloss=sum(qbus);
for k=1:noofbus
fprintf(['bus number',num2str(k)]);
fprintf('\n')
fprintf(['bus voltage=',num2str(Vbus(k)),'volts'])
fprintf('\n')
fprintf(['bus current=',num2str(Ibus(k)),'amps'])
fprintf('\n')
fprintf(['activepower=',num2str(pbus(k)),'watts'])
fprintf('\n')
fprintf(['reactive power=',num2str(qbus(k)),'watts'])
fprintf('\n\n')
end
for k=1:noofline
fprintf(['Line Number:',int2str(k),'\n']);
b=input('enter frpm bus=');
d=input('enter to bus=');
hlc=input('enter the half line charging admittance=');
Ibd=(Vbus(b)-Vbus(d))*Ybus(b,d)+(Vbus(b)*hlc);
Idb=(Vbus(d)-Vbus(b))*Ybus(d,b)+(Vbus(d)*hlc);
Sbd=(Vbus(b))*(conj(Ibd));
Sdb=(Vbus(d))*conj(Idb);
Sloss=Sbd+Sdb;
fprintf(['line current=' num2str(Ibd)]);
fprintf('\n')
fprintf(['real power from bus' num2str(b) 'to' num2str(d),'=',
num2str(real(Sbd))]);
fprintf('\n')
fprintf(['reactive power from' num2str(b) 'to' num2str(d),'=',
num2str(imag(Sbd))]);
fprintf('\n')
OUTPUT
bus number1
bus voltage=1.04volts
bus current=0.23728+48.0533iamps
activepower=0.24677watts
reactive power=49.9754watts
bus number2
bus voltage=1volts
bus current=-0.1156+47.5806iamps
activepower=-0.1156watts
reactive power=47.5806watts
bus number3
bus voltage=1volts
bus current=-0.1156+47.5806iamps
activepower=-0.1156watts
reactive power=47.5806watts
Line Number:1
enter frpm bus=1
enter to bus=2
enter the half line charging admittance=0
line current=-0.1176+0.47056i
real power from bus1to2=-0.1223
reactive power from1to2=-0.48938
real power from2to1=0.1176
reactive power from2to1=0.47056
Line Number:2
enter frpm bus=1
enter to bus=3
enter the half line charging admittance=0
line current=-0.1176+0.47056i
real power from bus1to3=-0.1223
Line Number:3
enter frpm bus=2
enter to bus=3
enter the half line charging admittance=0
line current=0
real power from bus2to3=0
reactive power from2to3=0
real power from3to2=0
reactive power from3to2=0
Data for a single machine connected to infinite bus is given below. Mechanical input given is 1.2pu, pre
fault power Pe0 = 1.2pu. Power during fault is 0.pu. Power after the fault is cleared is 1.9pu. Inertial
constant of machine is 4MJ/MVA. . Write a MATLAB program to obtain the swing curve for a sustained
fault over the period of 0.5sec. take no of iterations as 25. Xpre=0.28pu
MATLAB program
clear all;
pe0=1.2;pe1=0;pe2=1.9;pm=1.2;h=4;k=25;tfn=0.5;e=1.2;xpre=0.28
b=input('enter 0 for sustained fault and 1 for fault is cleared')
if b==1
tc=input('enter fault clearing time=')
else
tc=tfn+0.01
end
d(1,1)=asin(pm*xpre/pe0)
w(1,1)=2*pi*50
d0=d(1,1)
n=1,a=1;
t=0:tfn/k:tfn;
while a==1
if t(1,n)<tc
pem=pe1
else
pem=pe2
end
k1=(w(1,n)-(2*pi*50))*0.02
L1=(pm-pem)*(pi*50/h)*0.02
k2=((w(1,n)+(L1/2))-(2*pi*50))*0.02
L2=(pm-pem)*(pi*50/h)*0.02
k3=((w(1,n)+(L2/2))-(2*pi*50))*0.02
L3=(pm-pem)*(pi*50/h)*0.02
k4=((w(1,n)+(L3))-(2*pi*50))*0.02
L4=(pm-pem)*(pi*50/h)*0.02
d(1,n+1)=d(1,n)+(k1+(2*k2)+(2*k3)+k4)*(1/6)
w(1,n+1)=w(1,n)+(L1+(2*L2)+(2*L3)+L4)*(1/6)
n=n+1
if k>=n
a=1
else
a=2
end
end
fprintf(' %7.4f %5.4f\n',[d*180/pi;t])
plot(t,d*180/pi)
14. Data for a single machine connected to infinite bus is given below. Mechanical input given is 1.2pu,
pre fault power Pe0 = 1.2pu. Power during fault is 0.pu. Power after the fault is cleared is 1.9pu.
Inertial constant of machine is 4MJ/MVA. A 3 phase fault is cleared at 0.1sec. Write a MATLAB program
to obtain the swing curve over the period of 0.5sec. take no of iterations as 25.
Xpre=0.28pu
JACOBIAN MATRIX
end
end
end
for pp=2:nb;
s=zeros(1,nb);
for qq=1:nb;
if qq~=pp;
s(1,qq)=vm(qq)*ym(pp,qq)*cos((ya(pp,qq)+va(pp)-
va(qq)));%diagonal
else
end
end
cpv(pp,pp)=2*(vm(pp)*ym(pp,pp)*cos(ya(pp)))-sum(s);
end
cpv;
cpvf=cpv(2:nb,2:nb)
%calculation of elements of J3
for pp=2:nb;
for qq=1:nb;
if qq~=pp;
cqd(pp,qq)=-vm(pp)*vm(qq)*ym(pp,qq)*cos((ya(pp,qq)+va(pp)-
va(qq)));% diagonal element
else
end
end
end
for pp=2:nb;
s=zeros(1,nb);
for qq=1:nb;
if qq~=pp;
s(1,qq)=vm(pp)*vm(qq)*ym(pp,qq)*cos((ya(pp,qq)+va(pp)-
va(qq)));
else
end
end
cqd(pp,pp)=sum(s);%diagonal element
end
cqd;
cqdf=cqd(2:nb,2:nb)
%calculation of elements of J4
for pp=2;
for qq=1:nb;
if qq~=pp;
cqv(pp,qq)=vm(pp)*ym(pp,qq)*sin((ya(pp,qq)+va(pp)-va(qq)));% off
diagonal element
else
end
end
end
for pp=2;
s=zeros(1,nb);
for qq=1:nb;
if qq~=pp;
s(1,qq)=vm(qq)*ym(pp,qq)*sin((ya(pp,qq)+va(pp)-va(qq)));
else
end
end
cqv(pp,pp)=-2*(vm(pp)*ym(pp,pp)*sin(ya(pp)))+(sum(s));%diagonal
element
end
cqv;
cqvf=cqv(2:nb,2:nb);
jacobian=[cpdf cpvf;cqdf cqvf]