Lets do the partial-fraction expansion by Scilab of the following system:
Program in Scilab:
s=%s;
num=80+72*s+25*s^2+3*s^3;
den=0+80*s+96*s^2+40*s^3+8*s^4+s^5;
sys_tf=syslin('c',num/den)
sys_ss=tf2ss(sys_tf);
tf=pfss(sys_ss);
for k=1:3
clean(tf(k))
end;
Result:
ans =
0.25 - 0.5625s
--------------
2
20 + 4s + s
ans =
1
-
s
ans =
- 1.25 - 0.4375s
--------------
2
4 + 4s + s
|
| |
The partial-fraction expansion:
Let's plot the tranference function and obtained equation of partial-fraction expansion.
Program in Scilab:
s=%s;
num=80+72*s+25*s^2+3*s^3;
den=80+96*s+40*s^2+8*s^3+s^4;
g=syslin('c',num/den);
t=0:0.01:3;
gs=csim('step',t,g);
y=1-(9/16)*exp(-2*t).*cos(4*t)+(11/32)*exp(-2*t).*sin(4*t)-(7/16)
*exp(-2*t)-(6/16)*t.*exp(-2*t);
subplot(2,1,1);
xgrid;
xtitle('Response to unit-step of 1-(9/16)*exp(-2*t)*cos(4*t)+
(11/32)*exp(-2*t)*sin(4*t)-(7/16)*exp(-2*t)-(6/16)*t*exp(-2*t)',
't(seg)','Amplitude');
plot2d(t,y,3);
subplot(2,1,2);
plot2d(t,gs);
xgrid;
xtitle('Response to unit-step of the system','t(seg)'
,'Amplitude')