MATLAB program to investigate the stability of one-machine – infinite bus system by solving the swing equation- Step Increase in Mechanical Power Input

All QuestionsCategory: Power System AnalysisMATLAB program to investigate the stability of one-machine – infinite bus system by solving the swing equation- Step Increase in Mechanical Power Input
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;xdd=0.3;xl=0.4;pe0=1.0;h=5.0;tmax=4.0;dt=0.001;
f=60.0;dpmech=0.8;
ws=2*pi*f;
pmax=e*v/(xdd+0.5*xl);
pmech=pe0;
del=asin(pe0/pmax);
w=ws;
delta=[];time=[];n=1;
pmech=pmech+dpmech;
for t=0:dt:tmax
s_del=w-ws;
s_w=(pi*f/h)*(pmech-pmax*sin(del));
del=del+s_del*dt;
w=w+s_w*dt;
delta(n)=del*180/pi;
time(n)=t;
n=n+1;
end
plot(time,delta)