|
Let us draw the response to unit-step of Example' 5.9 solution by Scilab
Program in Scilab:
num=poly([0 0.35 0.1],'s','coeff');
den=poly([2 3 1],'s','coeff');
t=0:0.1:7;
g=syslin('c',num/den);
gs=csim('step',t,g);
clf;
plot(t,gs);
xgrid
xtitle('Response to unit-step
of the system G(s)=(0.1s^2+0.35s)
/(s^2+3s+2)','t(seg)','Amplitude');
|
|
|
The function start in 0 when it would have to start in 0.1 we will repeat the program but instead of using a step input for
, a unit-impulse input for system
, ie the same.
Program in Scilab:
num=poly([0 0.35 0.1 0],'s','coeff');
den=poly([0 2 3 1],'s','coeff');
t=0:0.1:7;
g=syslin('c',num/den);
gs=csim('impulse',t,g);
clf;
plot2d(t,gs,2);
xgrid;
xtitle('Response to unit-impulse
of G(s)=(0.1s^2+0.35s)/(s^3+3s^2+2s)'
,'t(seg)','Amplitude');
|
|
|
|