Z-transform partial-fraction expansion
[r,p,k] = residuez(b,a)
[b,a] = residuez(r,p,k)
residuez converts a discrete time system,
expressed as the ratio of two polynomials, to partial fraction expansion, or residue, form. It also
converts the partial fraction expansion back to the original polynomial
Numerically, the partial fraction expansion of a ratio of polynomials is an ill-posed problem. If the denominator polynomial is near a polynomial with multiple roots, then small changes in the data, including round-off errors, can cause arbitrarily large changes in the resulting poles and residues. You should use state-space or pole-zero representations instead.
[r,p,k] = residuez(b,a) finds
the residues, poles, and direct terms of a partial fraction expansion
of the ratio of two polynomials, b(z)
and a(z). Vectors
the coefficients of the polynomials of the discrete-time system b(z)/a(z)
in descending powers of z.
If there are no multiple roots and
The returned column vector
r contains the
residues, column vector
p contains the pole locations,
and row vector
k contains the direct terms. The
number of poles is
n = length(a)-1 = length(r) = length(p)
The direct term coefficient vector
k is empty
length(b) is less than
length(k) = length(b) - length(a) + 1
p(j) = ... = p(j+s-1) is a pole of multiplicity
then the expansion includes terms of the form
[b,a] = residuez(r,p,k) with three input
arguments and two output arguments, converts the partial fraction
expansion back to polynomials with coefficients in row vectors
in the standard MATLAB® language is very similar to
It computes the partial fraction expansion of continuous-time systems
in the Laplace domain (see reference ),
rather than discrete-time systems in the z-domain
Compute the partial-fraction expansion corresponding to the third-order IIR lowpass filter described by the transfer function
Express the numerator and denominator as polynomial convolutions.
b0 = 0.05634; b1 = [1 1]; b2 = [1 -1.0166 1]; a1 = [1 -0.683]; a2 = [1 -1.4461 0.7957]; b = b0*conv(b1,b2); a = conv(a1,a2);
Compute the residues, poles, and direct terms of the partial-fraction expansion.
[r,p,k] = residuez(b,a)
r = -0.1153 - 0.0182i -0.1153 + 0.0182i 0.3905 + 0.0000i
p = 0.7230 + 0.5224i 0.7230 - 0.5224i 0.6830 + 0.0000i
k = -0.1037
Plot the poles and zeros of the transfer function and overlay the poles you just found.
zplane(b,a) hold on plot(p,'^r') hold off
residuez again to reconstruct the transfer function.
[bn,an] = residuez(r,p,k)
bn = 0.0563 -0.0009 -0.0009 0.0563
an = 1.0000 -2.1291 1.7834 -0.5435
residuez applies standard MATLAB functions
and partial fraction techniques to find
The direct terms
deconv (polynomial long division) when
The poles using
Any repeated poles, reordering the poles according to their multiplicities.
The residue for each nonrepeating pole pj by multiplying b(z)/a(z) by 1/(1 - pjz−1) and evaluating the resulting rational function at z = pj.
The residues for the repeated poles by solving
S2*r2 = h - S1*r1
the impulse response of the reduced b(z)/a(z),
a matrix whose columns are impulse responses of the first-order systems
made up of the nonrepeating roots, and
r1 is a
column containing the residues for the nonrepeating roots. Each column
S2 is an impulse response. For each root pj of
S2 contains sj columns
representing the impulse responses of each of the following systems.
h and matrices
n is the total number of roots and the internal
xtra, set to 1 by default, determines
the degree of over-determination of the system of equations.
 Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck. Discrete-Time Signal Processing. 2nd Ed. Upper Saddle River, NJ: Prentice Hall, 1999.