Partial fraction expansion using MATLAB’s residue function
Expand the expression
H(s) =\frac{s²+3s+1}{s^4+5s³+2s²+7s+3 }in partial fractions.
In MATLAB,
»b = [1 3 1] ; a = [1 5 2 7 3] ;
»[r,p,k] = residue(b,a) ;
»r
r =
-0.0856
0.0496 - 0.2369i
0.0496 + 0.2369i
-0.0135
»p
p =
-4.8587
0.1441 + 1.1902i
0.1441 - 1.1902i
-0.4295
»k
k =
[]
»
There are 4 poles at −4.8587, 0.1441 + j1.1902, 0.1441 − j1.1902, and − 0.4295 and the residues at those poles are −0.0856, 0.0496 −j0.2369, 0.0496 + j0.2369 and −0.0135, respectively.
There are no direct terms because H(s) is a proper fraction in s. Now we can write H(s) as
\mathrm{H}(s)=\frac{0.0496-j 0.2369}{s-0.1441-j 1.1902}+\frac{0.0496+j 0.2369}{s-0.1441+j 1.1902}-\frac{0.0856}{s+4.8587}-\frac{0.0135}{s+0.4295}
or, combining the two terms with complex poles and residues into one term with all real coefficients,
\mathrm{H}(s)=\frac{0.0991 s+0.5495}{s^2-0.2883 s+1.437}-\frac{0.0856}{s+0.48587}-\frac{0.0135}{s+0.4295} \text {. }