You are on page 1of 4

%NAME : Nayan kumar cp

%USN: 4SU17EE017
%Program no :12a
%program for the plot of swing curve for 6.25 cycles of fault clearance
clear all;
t=0;
tf=0;
tfinal=0.5;
tc=0.125;
tstep=0.05;
M=2.52/(180*50);
i=2;
delta=21.64*pi/180;
ddelta=0;
time(1)=0;
ang(1)=21.64;
Pm=0.9;
Pmaxbf=2.44;
Pmaxdf=0.88;
Pmaxaf=2.00;
while(t<tfinal);
if(t==tf)
Paminus= 0.9-Pmaxbf*sin(delta);
Paplus= 0.9-Pmaxdf*sin(delta);
Paav=(Paminus+Paplus)/2;
Pa=Paav;
end
if (t==tc)
Paminus=0.9-Pmaxdf*sin(delta);
Paplus=0.9-Pmaxaf*sin(delta);
Paav=(Paminus+Paplus)/2;
Pa=Paav;
end
if(t>tf&&t<tc);
Pa=Pm-Pmaxdf*sin(delta);
end
if(t>tc)
Pa=Pm-Pmaxaf*sin(delta);
end
ddelta=ddelta+(tstep*tstep*Pa/M);
delta=(delta*180/pi+ddelta)*pi/180;
deltadeg=delta*180/pi;
t=t+tstep;
time(i)=t;
ang(i)=deltadeg;
i=i+1;
end
disp('----------------------------');
disp('---------swing curve by using point to point method-------');
disp(' Time,t(sec) delta(degrees)');
disp('-------------------------------------');
mm=length(ang);
for m=1 :mm
fprintf(' %8.4f %8.4f\n', time(m),ang(m));
end
axis([0 0.6 0 160])
plot(time,ang);
xlabel('-------------> TIME IN SECONDS');
ylable('-------------> POWER ANGLE IN DEGREES');
title('SWING CURVE BY USING POINT BY POINT METHOD');
grid; %show grid lines in graph

OUTPUT
swing curve by using point to point method
Time,t(sec) delta(degrees)

0.0000 21.6400
0.0500 24.2100
0.1000 31.5936
0.1500 42.8966
0.2000 50.0804
0.2500 51.6045
0.3000 47.1688
0.3500 37.6732
0.4000 25.2998
0.4500 13.3307
0.5000 5.2801
0.5500 3.6218
%NAME : :KAVYA T M
%USN: 4SU18EE006
%Program no :12b
%program for the plot of swing curve for 2.5 cycles of fault clearance
clear all;
t=0;
tf=0;
tfinal=0.5;
tc=0.05;
tstep=0.05;
M=2.52/(180*50);
i=2;
delta=21.64*pi/180;
ddelta=0;
time(1)=0;
ang(1)=21.64;
Pm=0.9;
Pmaxbf=2.44;
Pmaxdf=0.88;
Pmaxaf=2.00;
while(t<tfinal);
if(t==tf)
Paminus= 0.9-Pmaxbf*sin(delta);
Paplus= 0.9-Pmaxdf*sin(delta);
Paav=(Paminus+Paplus)/2;
Pa=Paav;
end
if (t==tc)
Paminus=0.9-Pmaxdf*sin(delta);
Paplus=0.9-Pmaxaf*sin(delta);
Paav=(Paminus+Paplus)/2;
Pa=Paav;
end
if(t>tf&&t<tc);
Pa=Pm-Pmaxdf*sin(delta);
end
if(t>tc)
Pa=Pm-Pmaxaf*sin(delta);
end
ddelta=ddelta+(tstep*tstep*Pa/M);
delta=(delta*180/pi+ddelta)*pi/180;
deltadeg=delta*180/pi;
t=t+tstep;
time(i)=t;
ang(i)=deltadeg;
i=i+1;
end
disp('----------------------------');
disp('---------swing curve by using point to point method-------');
disp(' Time,t(sec) delta(degrees)');
disp('-------------------------------------');
mm=length(ang);
for m=1 :mm
fprintf(' %8.4f %8.4f\n', time(m),ang(m));
end
axis([0 0.6 0 160])
plot(time,ang);
xlabel('-------------> TIME IN SECONDS');
ylable('-------------> POWER ANGLE IN DEGREES');
title('SWING CURVE BY USING POINT BY POINT METHOD');
grid; %show grid lines in graph
OUTPUT
swing curve by using point to point method
Time,t(sec) delta(degrees)
0.0000 21.6400
0.0500 24.2100
0.1000 29.5432
0.1500 34.1071
0.2000 36.6935
0.2500 36.6454
0.3000 33.9747
0.3500 29.3607
0.4000 4.0270
0.4500 19.4581
0.5000 16.9764
0.5500 17.3166

You might also like