MATLAB program to investigate the stability of one-machine – infinite bus system by solving the swing equation – – When Sudden loss of Line and Reclosing

All QuestionsCategory: Power System AnalysisMATLAB program to investigate the stability of one-machine – infinite bus system by solving the swing equation – – When Sudden loss of Line and Reclosing
Chetan Shidling Staff asked 4 years ago

I need code.

1 Answers
Chetan Shidling Staff answered 4 years ago

Here is the code:
 
e=1.05; v=1.0; h=5.0; f=60.0; pe0=1.0; xdd=0.3; xl=0.4;
tm=50; dt=0.001; d=0.65;
tr=input(‘Enter Reclosing time, tr ‘);
clc;
pmax=(e*v)/(xdd+(xl*0.5));
del0=asin(pe0/pmax);
pmech=pe0;
w=2*pi*f; wref=w;
del=zeros();
time=zeros();
t1=0;
for t=0:dt:tm
if(t<=tr)
pmax=(e*v)/(xdd+xl);
else
pmax=(e*v)/(xdd+(xl*0.5));
end
delslope=(w-(2*pi*f));
dw=((pmech-(pmax*sin(del0)))*(pi*f/h));
w=w+(dw*dt);
del0=del0+(delslope*dt);
t1=t1+1;
del(t1)=del0;
time(t1)=t;
end
plot(time,del);
grid on;