Program in Scilab:
clf;
s=%s;
g=1.06/(s*(s+1)*(s+2));
gc=0.9656*(s+0.05)/(s+0.005);
gt=gc*g;
gc=g /. 1;
gct=gt /. 1;
t=0:0.1:50;
gs=syslin('c',gc);
gcs=syslin('c',gct);
y=csim('step',t,gs);
yt=csim('step',t,gcs);
plot(t,y);
plot(t,yt,'g');
xgrid;
xtitle('response to a unit-step input of a lag conpensated system'
,'t','salida');
legend(['no compensated';'compensated'],style=4);
|
|