Scilab program
s=%s/(%pi*2);
g=1/(s*(0.5*s+1)*(s+1));
gc=g/. 1;
gcs=syslin('c',gc);
clf;
bode(gcs);
w=logspace(-2,3,100);
gsf=tf2ss(gcs);
[frq1,rep] =repfreq(gsf,w);
[db,phi]=dbphi(rep);
[mdb,k]=max(db);
resonantf=w(k)
resonantpeak=mdb
n=1;
while db(n)>-3,
n=n+1;
end;
bandwidth=w(n)
Solutions:
-->resonantf=w(k)
resonantf =
0.8302176
-->resonantpeak=mdb
resonantpeak =
5.2696204
-->bandwidth=w(n)
bandwidth =
1.3219411
|
|