Program in Scilab:
s=%s
num=6.3223*s^2+18*s+12.811;
den=s^4+6*s^3+11.3223*s^2+18*s+12.811;
cr=syslin('c',num/den);
t=0:0.01:20;
c=csim('step',t,cr);
xgrid;
plot2d(t,c);
xtitle(System's response to unit-step'
,'t(seg)','Amplitude')
k=1;
while(c(k)<1),k=k+1;end;
riset=0.01*(k-1);
[cpico,kpico]=max(c);
peakt=0.01*(kpico-1);
movershoot=cpico-1;
kr=20/0.01+1;
while(c(kr)>0.98&c(kr)<1.02),kr=kr-1;end;
settlingt=0.01*(kr-1);
riset
peakt
movershoot
settlingt
Results:
-->riset
riset =
0.85
-->peakt
peakt =
1.67
-->movershoot
movershoot =
0.6182275
-->settlingt
settlingt =
10.03
|
|