Scilab program
clf;
s=%s/(%pi*2);
g=20*(s^2+s+0.5)/(s*(s+1)*(s+10));
gs=syslin('c',g);
w=[0.2, 0.3, 0.5, 1, 2, 6, 10, 20];
fr=repfreq(gs,w);
nyquist(gs);
for i=1:8,
x(i)=real(fr(i));
y(i)=imag(fr(i));
t(i)=string(w(i));
plot(x(i),y(i),'o');
xstring(x(i),y(i),t(i));
end;
mtlb_axis([-0.1 2 -5 0]);
[db,phi]=dbphi(fr);
[db;phi]
|
|