Documentation

residuez

Z-transform partial-fraction expansion

Description

example

[ro,po,ko] = residuez(bi,ai)finds the residues, poles, and direct terms of a partial fraction expansion of the ratio of numerator and denominator polynomials,banda

[bo,ao] = residuez(ri,pi,ki)with three input arguments and two output arguments, converts the partial fraction expansion back to polynomials with coefficients in row vectorsbanda

Examples

collapse all

Compute the partial-fraction expansion corresponding to the third-order IIR lowpass filter described by the transfer function

H ( z ) = 0 0 5 6 3 4 ( 1 + z - 1 ) ( 1 - 1 0 1 6 6 z - 1 + z - 2 ) ( 1 - 0 6 8 3 z - 1 ) ( 1 - 1 4 4 6 1 z - 1 + 0 7 9 5 7 z - 2 )

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 =3×1 complex-0.1153 - 0.0182i -0.1153 + 0.0182i 0.3905 + 0.0000i
p =3×1 complex0.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) holdonplot(p,'^r') holdoff

Useresiduezagain to reconstruct the transfer function.

[bn,an] = residuez(r,p,k)
bn =1×40.0563 -0.0009 -0.0009 0.0563
an =1×41.0000 -2.1291 1.7834 -0.5435

Input Arguments

collapse all

Polynomial coefficients, specified as vectors. Vectorsbandaspecify the coefficients of the polynomials of the discrete-time systemb(z)/a(z) in descending powers ofz

B ( z ) = b 0 + b 1 z 1 + b 2 z 2 + + b m z m A ( z ) = a 0 + a 1 z 1 + a 2 z 2 + + a n z n

If there are multiple roots anda>n-1,

B ( z ) A ( z ) = r ( 1 ) 1 p ( 1 ) z 1 + + r ( n ) 1 p ( n ) z 1 + k ( 1 ) + k ( 2 ) z 1 + + k ( m n + 1 ) z ( m n )

Residues of the partial fraction, specified as a vector.

Poles of the partial fraction, specified as a vector.

Direct terms, specified as a row vector.

Output Arguments

collapse all

残留部分分式的作为已经返回ctor.

Pole of the partial fraction, returned as a vector. The number of poles is

n = length(a)-1 = length(r) = length(p)

Ifp(j) = ... = p(j+s-1)is a pole of multiplicitys, then the expansion includes terms of the form

r ( j ) 1 p ( j ) z 1 + r ( j + 1 ) ( 1 p ( j ) z 1 ) 2 + + r ( j + s r 1 ) ( 1 p ( j ) z 1 ) s

Direct terms, returned as a row vector. The direct term coefficient vectorkis empty iflength(b)is less thanlength(a); otherwise:

length(k) = length(b) - length(a) + 1

Polynomial coefficients, returned as vectors.

Algorithms

residuezconverts 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 coefficients.

Note

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.

residuezapplies standard MATLAB®functions and partial fraction techniques to findr,p, andkfrombanda.It finds

  • The direct termsausingdeconv(polynomial long division) whenlength(b)>length(a)-1

  • The poles usingp=roots(a)

  • Any repeated poles, reordering the poles according to their multiplicities.

  • The residue for each nonrepeating polepjby multiplyingb(z)/a(z) by 1/(1 -pjz−1) and evaluating the resulting rational function atz=pj

  • The residues for the repeated poles by solving

    S2*r2 = h - S1*r1

    forr2using\his the impulse response of the reducedb(z)/a(z),S1is a matrix whose columns are impulse responses of the first-order systems made up of the nonrepeating roots, andr1is a column containing the residues for the nonrepeating roots. Each column of matrixS2is an impulse response. For each rootpjof multiplicitysj,S2containssjcolumns representing the impulse responses of each of the following systems.

    1 1 p j z 1 , 1 ( 1 p j z 1 ) 2 , , 1 ( 1 p j z 1 ) s j

    The vectorhand matricesS1andS2haven+xtrarows, wherenis the total number of roots and the internal parameterxtra, set to 1 by default, determines the degree of over-determination of the system of equations.

Note

Theresiduefunction in the standard MATLAB language is very similar toresiduez.它计算的部分分式扩张continuous-time systems in the Laplace domain (see reference[1]), rather than discrete-time systems in thez-domain as doesresiduez

References

[1] Oppenheim, Alan V., Ronald W. Schafer, and John R. Buck.Discrete-Time Signal Processing.2nd Ed. Upper Saddle River, NJ: Prentice Hall, 1999.

Introduced before R2006a