2 Example 2.7a OGATA 4edition( Laplace transform, partial-fractions)

We will expand into partial-fractions through the following Scilab transfer function:

\begin{displaymath}\frac{B(s)}{A(s)}=\frac{(s^{2}+2\cdot s+3)}{(s+1)^{3}} \end{displaymath}


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:

\begin{displaymath}a(1)=\frac{1}{2}\cdot \left\vert\frac{d^{2}}{dt}\left(\frac{(s+1)^3\cdot B(s)}{A(s)}\right)\right\vert _{s=-1}\end{displaymath}



\begin{displaymath}a(2)= \left\vert\frac{d}{dt}\left(\frac{(s+1)^3\cdot B(s)}{A(s)}\right)\right\vert _{s=-1}\end{displaymath}



\begin{displaymath}a(3)= \left\vert\frac{(s+1)^3\cdot B(s)}{A(s)}\right\vert _{s=-1}\end{displaymath}


The partial-fraction expansion we would:

\begin{displaymath}\frac{B(s)}{A(s)}=\frac{a(1)}{(s+1)}+\frac{a(2)}{(s+1)^{2}}+\frac{A(3)}{(s+1)^3}\end{displaymath}



\begin{displaymath}\frac{B(s)}{A(s)}=\frac{a(1)}{(s+1)}+\frac{a(2)}{(s+1)^{2}}+\frac{A(3)}{(s+1)^3}\end{displaymath}


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:

\begin{displaymath}\frac{B(s)}{A(s)}=\frac{2}{(s+1)}+\frac{1}{(s+1)^3} \end{displaymath}