Lets do the partial-fraction expansion by Scilab of the following system:
Program in Scilab:
s=%s;
num=5*(s+20);
den=s*(s+4.59)*(s^2+3.41*s+16.35);
g=syslin('c',num/den);
cr=g/. 1;
c=cr*(1/s);
cs=tf2ss(c);
fs=pfss(cs)
for k=1:3
clean(8*fs(k))
end;
Result:
ans =
- 13.959394 + 3.0016262s
--------------------------
2
10.011621 + 2.0004717s + s
ans =
- 46.040505 - 11.001626s
--------------------------
2
9.9883925 + 5.9995283s + s
ans =
8
-
s
-->c
c =
100 + 5s
----------------------------------
2 3 4 5
100s + 80.0465s + 32.0019s + 8s + s
|
|
|
With these equations do partial-fraction expansion of close-loop system to unit-step input.
Let's plot the tranference function and obtained equation of partial-fraction expansion.
Program in Scilab:
s=%s;
num=5*(s+20);
den=100+80*s+32*s^2+8*s^3+s^4;
g=syslin('c',num/den);
t=0:0.01:5;
gs=csim('step',t,g);
y=1+(3/8)*exp(-t).*cos(3*t)-(17/24)*exp(-t).*sin(3*t)-(11/8)*exp(-3*t).*cos(t)
-(13/8)*exp(-3*t).*sin(t);
clf;
subplot(2,1,1);
xgrid;
xtitle('Reponse to unit-step of y=1+(3/8)*exp(-t)*cos(3*t)
-(17/24)*exp(-t)*sin(3*t)-(11/8)*exp(-3*t)*cos(t)-(13/8)*exp(-3*t)*sin(t)',
't(seg)','Amplitude');
plot2d(t,y,3);
subplot(2,1,2);
plot2d(t,gs);
xgrid;
xtitle('Reponse to unit-step','t(seg)','Amplitude')