14.12 Partial Fraction Expansion Using MATLAB

MATLAB provides a function called *residue* that performs the partial fraction expansion of a transfer function. Consider a transfer function

(14.12-1)

In Eq. 14.12-1, the transfer function is represented as a ratio of two polynomials in *s*. In MATLAB the transfer function given in Eq. 14.12-1 can be represented by two lists. One list specifies the coefficients of the numerator polynomial, and the other list specifies the coefficients of the denominator polynomial. For example,

num = [ *b*_{3} *b*_{2} *b*_{1} *b*_{0} ]

and

den = [ *a*_{3} *a*_{2} *a*_{1} *a*_{0} ]

(In this case both polynomials are third-order polynomials, but the orders of these polynomials could be changed.)

Partial fraction expansion can be used to represent *H*(s) as

(14.12-2)

*R*_{1}, *R*_{2} and *R*_{3} are called residues, and *p*_{1}, *p*_{2} and *p*_{3} are the poles. In general, both the residues and poles can be complex numbers. The term *k*(s) will, in general, be a polynomial in *s*. MATLAB represents this form of the transfer function by three lists:

*R* = [ *R*_{1} *R*_{2} *R*_{3} ]

is a list of the residues,

*p* = [ *p*_{1} *p*_{2} *p*_{3} ]

is a list of the poles, and

*k* = [*c*_{2} *c*_{1} *c*_{0} ]

is a list of the coefficients of the polynomial *k*(*s*).

The MATLAB command

[R, p, k] = residue(num, den)

performs the partial fraction expansion, calculating the poles and residues from the coefficients of the numerator and denominator polynomials. The MATLAB command

[n, d] = residue(R, p, k)

performs the reverse operation, calculating the coefficients of the numerator and denominator polynomials from the poles and residues.

Figure 14.12-1 shows a MATLAB screen illustrating this procedure. In this example

is represented as

by performing the partial fraction expansion.