Programme PDF
Programme PDF
PROGRAM:
clc;
clear all;
close all;
Pa=Pm2-Pm1;
A=(Pa*180*f)/(wk);
t=k/50;
deltaA=0.5*A*t^2;
Ns=(120*f)/p;
Na=A*60/(p*180)*t;
Nr=Ns+Na;
fprintf('\n\n Energy stored in rotor at synch. Speed=%1.3fMJ',wk); fprintf('\n\n
Accelerating Power=%1.3fMW ',Pa);
OUTPUT 1 :
cycle=1497.500rpm
OUTPUT 2 :
synch.
30.000MW
Change in Acceleration=337.500elect.deg/sec^2
RESULT:
CONCLUSION: Thus stored energy, rotor acceleration, change in rotor angle and rotor speed in
rpm is determined by using swing equation.
EXPERIMENT NO :- 02
PROGRAM
clc; clear all;
close all;
v1=input('enter bus voltage at bus 1 in pu');
v2=input('enter bus voltage at infinite bus in pu');
xg=input('gen reactance');
xl=input('line reactance');
x1=xg+xl;
x=1;
for a=0:pi/12:pi
I=(v1*(cos(a)+1i*sin(a))-v2)/(1i*xl);
E=v1*(cos(a)+1i*sin(a))+1i*I*xg;
fprintf('\n for iteration=%d',x);
delta=angle(E);
Eg=abs(E);
SSSL=(Eg*v2)/x1;
fprintf('\n steady state stability limit is %f at delta=%f',SSSL,delta);
b=0:pi/12:pi
pe=SSSL*sin(delta);
pe1=SSSL*sin(b);
plot(delta,pe); plot(b,pe1)
x=x+1; end
title('curve for SSSL');
xlabel('power angle');
ylabel('electric power');
legend('pe vs delta');
OUTPUT
for iteration=2
steady state stability limit is 0.744135 at delta=0.392602 for
iteration=3
steady state stability limit is 0.797593 at delta=0.760902 for
iteration=4
steady state stability limit is 0.875935 at delta=1.092946 for
iteration=5
steady state stability limit is 0.968569 at delta=1.389120 for
iteration=6
steady state stability limit is 1.066349 at delta=1.655578 for
iteration=7
steady state stability limit is 1.162164 at delta=1.899349 for
iteration=8
steady state stability limit is 1.250660 at delta=2.126431 for
iteration=9
steady state stability limit is 1.327827 at delta=2.341481 for
iteration=10
steady state stability limit is 1.390679 at delta=2.548042
for iteration=11
steady state stability limit is 1.437044 at delta=2.748843 for
iteration=12
steady state stability limit is 1.465440 at delta=2.946073
Conclusion: Thus, the calculation of steady state stability limit can be done by varying the angle
δ.
EXPERIMENT NO :- 03
PROGRAM:
clc;
clear all;
close all;
Eg=input('Enter Generator voltage in pu');
V=input('Enter Motor voltage in pu');
xg=input('Enter Generator voltage in pu');
xt1=input('Enter reactance of transformer 1 in pu');
xt2=input('Enter reactance of transformer 2 in pu');
xl=input('Enter reactance of transmission line in pu');
xm=input('Enter reactance of motor in pu');
xc=input('Enter reactance of capacitor to be connected in pu');
xin=input('Enter reactance of inductor to be connected in pu');
xt=xt1+xt2+xl+xm+xg;
Pm=(Eg*V)/xt;
x12=(xt1+xg+xl)+(xm+xt2)+((xt1+xg+xl)*(xm+xt2))/xc;
x13=(xt1+xg+xl)+(xm+xt2)+((xt1+xg+xl)*(xm+xt2))/xin;
Pm1=(Eg*V)/x12;
Pm2=(Eg*V)/x13;
fprintf('\n The steady state power limit=%1.1f pu',Pm);
fprintf('\n The steady state power limit with capacitor=%1.1f pu',Pm1);
fprintf('\n The steady state power limit with inductor=%1.1f pu',Pm2);
delta=0:0.1:pi
Pe=Pm*sin(delta);
Pe1=Pm1*sin(delta);
Pe2=Pm2*sin(delta);
plot(delta,Pe,'b',delta,Pe1,'r',delta,Pe2,'g');
gtext('Power angle curve with capacitor');
gtext('Power angle curve without inductor');
gtext('Power angle curve with inductor');
xlabel('Delta');
ylabel('Power');
OUTPUT:
Columns 1 through 5
Columns 6 through 10
Columns 11 through 15
Columns 16 through 20
Columns 21 through 25
Columns 26 through 30
Columns 31 through 32
3.0000 3.1000
.
CONCLUSION: Hence, it is concluded that capacitive reactance increases SSSL and inductive
reactance decreases SSSL.
EXPERIMENT NO :- 04
PROGRAM:
clc;
clear all;
close all;
Eg=input('Enter generator bus voltage in pu ');
V=input('Enter infinite bus voltage in pu ');
xg=input('Enter generator reactance in pu ');
xl=input('Enter transmission line reactance in pu ');
r=input('Enter transmission line resistance in pu ');
xt=xg+xl;
Z=r+xt*i;
Y=1/Z;
theta=angle(Y)
y=abs(Y)
delta=0:0.001:pi;
P1=Eg*V*y*cos(delta+theta+pi);
P2=Eg*V*y*cos(delta-theta);
Losses=P1+P2;
plot(delta,P1,'b',delta,P2,'g',delta,Losses,'r');
hold on;
grid on;
title('Curve for Power vs. delta for positive resistance');
xlabel('delta--->');
ylabel('Power--->');
legend('Power vs Delta p1','Power vs Delta p2','Power vs Delta losses');
gtext({'P1';'P2';'Losses'});
OUTPUT:
Enter generator bus voltage in pu 1.1
Enter infinite bus voltage in pu 1
Enter generator reactance in pu 0.6
Enter transmission line reactance in pu 1
Enter transmission line resistance in pu 0.3
theta =
-1.3854
y=
0.6143
Program:
clc;
close all;
clf;
Eg=input('Enter generator voltage in pu ');
V=input('Enter infinite bus voltage in pu ');
xg=input('Enter generator reactance in pu ');
xl=input('Enter transmission line reactance in pu ');
r=input('Enter shunt resistance in pu ');
xt=xg+xl;
Z=-((xl*xt)/2)+(xt+xl)*1i;
Y=1/Z;
theta=angle(Y);
y=abs(Y);
delta=0:0.001:pi;
P1=Eg*V*y*cos(delta+theta+pi);
P2=-Eg*V*y*cos(delta-theta);
losses=P1+P2;
plot(delta,P1,'b',delta,P2,'g',delta,losses,'r');
hold on;
grid on;
title('Curve for Power vs delta for positive resistance');
xlabel('delta--->');
ylabel('Power--->');
legend('Power vs delta');
gtext({'P1';'P2';'Losses'});
Output:
Conclusion:
Power angle curve with intermediate shunt resistance of two machine system is plotted.
EXPERIMENT NO :- 06
Example: A generator operating at 50Hz delivered 1.0pu power to an infinite bus through a
transmission line where resistance is ignored. A fault takes place reducing the maximum
power transferable to 0.5pu whereas before the fault this power was 2.0pu and after
clearance power is 1.5pu. By using equal area criteria find critical clearing angle.
Program:
clc;
clear all;
clos all;
Pmax=input(‘enter the value max power that can be transfer in pu’);
Pm=input(‘enter the value of steady power before fault in pu’);
P2=input(‘enter the value of power transfer during fault in pu’);
P3=input(‘enter the value of power transfer after fault in pu’);
Wo=asin(Pm/Pmax)
Wm=pi-asin(P3/Pmax
A=((Wm-Wo)+(P3*cos(Wm))-(P2*cos(Wo)))/(P3-P2);
Wc=acos(A)*180/pi
Result:
enter the value max power that can be transfer in pu 2
enter the value of steady power before fault in pu 1
enter the value of power transfer during fault in pu 0.5
enter the value of power transfer after fault in pu 1.5 ,Wo=0.5235 ,Wm=2.2933 Wc=70.35
Conclusion:
By knowing values of power transfer before, during and after the fault the value of critical
clearing angle can be determined.
EXPERIMENT NO :- 07
Program:
clc;
clear all;
close all;
clf;
Eg=input('Enter Generator voltage');
V=input('Enter infinite bus voltage');
xd=input('Enter Generator transient reactance');
P=input('Enter power delivered in pu');
x1=input('Enter line 1 reactance');
x2=input('Enter line 2 reactance');
xt=input('Enter transmission line reactance');
X1=xd+((x1*x2)/(x1+x2))+xt;
Pmax1=(Eg*V)/X1;
delta0=asin(P/Pmax1)
x3=xd+x1+xt;
Pmax3=(Eg*V)/x3;
deltam=pi-asin(P/Pmax3)
deltacr=acos(((Pmax3*cos(deltam))-(P*delta0)+(P*deltam))/Pmax3)
for i= delta0:0.01:deltacr
Pe2=0;
plot(i,Pe2);
hold on;
end
delta =0:0.01:pi;
Pe1=((Eg*V)/X1)*sin(delta);
Pe3=((Eg*V)/x3)*sin(delta);
plot(delta,Pe1,'b',delta,P,'r',delta,Pe3,'g');
hold on;
grid on;
title('curve for Power vs delta for equal area citerion');
xlabel('delta ---->');
ylabel('Power ---- >');
legend('Power vs Delta');
gtext({'Pe1';'Pe3';'Pm'});
Output:
0.4502
deltam =
2.4119
deltacr =
0.9735
Fig. Graphical output
Conclusion:
The critical clearing time angle for the given example is calculated by equal area
criterion.
EXPERIMENT NO :- 08
Program:
clc;
clear all;
close all;
f=50
G=input('Enter MVA rating');
H=input('Enter inertia constant');
E=input('Enter Generator voltage');
V=input('Enter infinite bus voltage');
Xd=input('Enter Generator transient reactance');
P=input('Enter power delivered in MW')
x1=input('Enter line 1 reactance')
x2=input('Enter line 2 reactance')
Mpu=H/(180*f)
disp('Prefault condition')
X1=Xd+((x1*x2)/(x1+x2));
Pmax1=(E*V)/X1;
Pm=P/G;
del0=asind(Pm/Pmax1)
disp('During fault condition')
x=x2/2;
X2=(Xd*x+X1*x+Xd*X1)/(x);
Pmax2=(E*V)/X2;
disp('After fault condition')
X3=Xd+x1;
Pmax3=(E*V)/X3;
dT=input('Enter delta T for step by step method');
c=input('Enter no. of cycle upto which fault is sustained');
t=c/f;
disp('Sr. t Pmax sind(del) Pe=Pmax*sind(del) Pa=Pm-Pe ((dT)*(dT)*Pa)/M Ddel del');
del=del0;
Ddel=0;
for m=1:10
Pe=Pmax2*sin(del);
Pa=Pm-Pe
in=((dT)*(dT)*Pa)/Mpu;
Ddel=Ddel+in;
del=del+Ddel;
s=sind(del);
fprintf('%d %2.3f %2.3f %2.3f %2.3f %2.3f %2.3f %2.3f %2.3f
n',m,t,Pmax2,s,Pe,Pa,in,Ddel,del);
t=t+dT;
end
Output:
f= 50
P = 18
x1 = 0.2000
x2 = 0.2000
Mpu = 2.8000e-04
Prefault condition
del0 = 21.6035
Pa = 0.7249
Pa = 0.8088
Pa = 1.2712
Pa = 1.2450
Pa = 0.6021
Pa = 0.9016
Pa = 1.1923
Pa = 0.8346
Pa = 0.4368
Pa = 1.2615
Conclusion:
Program:
clc;
clear all;
close all;
E=input('enter generator voltage');
V=input('infinite bus voltage');
H=input('enter per unit inertia constant');
X=input('enter transient reactance');
Pm=input('enter input power');
D=input('enter damping power coefficient');
f0=input('enter frequency');
Pmax=(E*V)/X
d0=asin(Pm/Pmax)
Ps=Pmax*cos(d0)
wn=sqrt((pi*60)/(H*Ps))
z=(D/2)*wn
wd=wn*sqrt(1-z^2)
fd=wd/(2*pi)
tau=1/(z*wn)
th=acos(z)
Dd0=10*pi/180
t=0:0.01:3;
Dd=Dd0/sqrt(1-z^2).*exp(-z*wn*t).*sin((wd*t)+th);
d=(d0+Dd)*180/pi;
Dw=-wn*Dd0/sqrt(1-z^2).*exp(-z*wn*t).*sin(wd*t);
f=f0+Dw/(2*pi);
subplot(2,1,1)
plot(t,d)
grid
xlabel('t sec');
ylabel('delta degree');
subplot(2,1,2)
plot(t,f)
grid
xlabel('t sec');
ylabel('frequency Hz');
subplot(1,1,1)
Output:
Pmax =
2.0769
d0 =
0.5023
Ps =
1.8203
wn =
3.2276
z=
0.2227
wd =
3.1466
fd =
0.5008
tau =
1.3912
th =
1.3462
Dd0 =
0.1745
Conclusion: