Scilab program:
s=%s;
g=4/(s*(s+2));
gc=41.7*(s+4.41)/(s+18.4)
w=0.01:0.01:1000;
gs=syslin('c',g);
gs1=syslin('c',10*g);
gs2=syslin('c',gc*g);
gr=horner(gs,%i*w);
gr1=horner(gs1,%i*w);
gr2=horner(gs2,%i*w);
theta=atan(imag(gr),real(gr));
theta1=atan(imag(gr1),real(gr1));
theta2=atan(imag(gr2),real(gr2));
ro=abs(gr);
ro1=abs(gr1);
ro2=abs(gr2);
clf;
k=0:0.01:2*%pi;
nr=10*cos(k)+10*%i*sin(k);
theta3=atan(sin(k),cos(k));
ro3=abs(nr);
polarplot(theta3,ro3);
plot(real(gr),imag(gr),'k');
plot(real(gr1),imag(gr1),'b');
plot(real(gr2),imag(gr2),'g');
mtlb_axis([-10 10 -10 10]);
legends(['G(jw)';'G1(jw)'
;'Gc(jw)*G(jw)'],[1;2;3],opt=1);
|
|