We will expand into partial-fractions through the following Scilab transfer function:
Program in Scilab
s=%s
num=s^2+2*s+3;
den=(s+1)^3;
g=syslin('c',num/den);
gf=tf2ss(g);
se=pfss(gf)
Solution:
se =
se(1)
2
3 + 2s + s
--------------
2 3
1 + 3s + 3s + s
|
|
|
As we see we did not solve anything because of the multiple pole, so we will solve it as we do normally but using Scilab. I solve the following equation for the coefficients:
The partial-fraction expansion we would:
This equation with the program in Scilab as follows:
Program in Scilab
s=%s
num=s^2+2*s+3;
den=(s+1)^3;
g=syslin('c',num/den);
rd=roots(den);
[n d k]=factors(g);
a(3)=horner(g*d(1)^3,rd(1))/2;
a(2)=horner(derivat(g*d(1)^3),rd(1));
a(1)=horner(derivat(derivat(g*d(1)^3)),rd(1))
Solution of the coefficients:
a =
2.
0
1.
|
|
|
The partion-fractions expansions: