Professional Documents
Culture Documents
Date:-
end
if(t>tf&t<tc)
pa=ps-pm2*sin(delta);
end
if(t>tc)
pa=ps-pm3*sin(delta);
end
ddelta=ddelta+tstep*tstep*pa/m;
delta=(delta*180/pi+ddelta)*pi/180;
deltadeg=delta*(180/pi);
t=t+tstep;
pause
time(i)=t
ang(i)=deltadeg
i=i+1
end
axis([0 0.6 0 160])
plot(time,ang,'ko-');
grid
output:ang = 21.6400
time = 0 0.0500
ang = 21.6400 24.2100
i= 3
time = 0 0.0500 0.1000
ang = 21.6400 24.2100 31.5936
i= 4
time = 0 0.0500 0.1000 0.1500
ang = 21.6400 24.2100 31.5936 42.8966
i= 5
time = 0 0.0500 0.1000 0.1500 0.2000
ang = 21.6400 24.2100 31.5936 42.8966 50.0804
i=
0.3500
25.2998
i = 10
time = 0 0.0500 0.1000 0.1500 0.2000 0.2500 0.3000 0.3500 0.4000 0.4500
ang = 21.6400 24.2100 31.5936 42.8966 50.0804 51.6045 47.1688 37.6732 25.2998
13.3307
i = 11
time = 0 0.0500 0.1000 0.1500 0.2000 0.2500 0.3000 0.3500 0.4000 0.4500 0.5000
ang = 21.6400 24.2100 31.5936 42.8966 50.0804 51.6045 47.1688 37.6732 25.2998
13.3307 5.2801
i = 12
time = 0 0.0500 0.1000 0.1500 0.2000 0.2500 0.3000 0.3500 0.4000 0.4500
0.5000 0.5500
ang = 21.6400 24.2100 31.5936 42.8966 50.0804 51.6045 47.1688 37.6732 25.2998
13.3307 5.2801 3.6218
Graph:-
Result:- For the given system swing curves is plot using point by point method.