Main Content

tf2zpk

Convert transfer function filter parameters to zero-pole-gain form

Description

example

[z,p,k] = tf2zpk(b,a) finds the matrix of zeros z, the vector of poles p, and the associated vector of gains k from the transfer function parameters b and a. The function converts a polynomial transfer-function representation

H(z)=B(z)A(z)=b1+b2z1+bnz(n1)+bn+1zna1+a2z1+amz(m1)+am+1zm

of a single-input/multi-output (SIMO) discrete-time system to a factored transfer function form

H(z)=Z(z)P(z)=k(zz1)(zz2)(zzm)(zp1)(zp2)(zpn).

Note

Use tf2zpk when working with transfer functions expressed in inverse powers (1 + z–1 + z–2). A similar function, tf2zp, is more useful for working with positive powers (s2 + s + 1), such as in continuous-time transfer functions.

Examples

collapse all

Design a 3rd-order Butterworth filter with normalized cutoff frequency 0.4π rad/sample. Find the poles, zeros, and gain of the filter.

[b,a] = butter(3,0.4);
[z,p,k] = tf2zpk(b,a)
z = 3×1 complex

  -1.0000 + 0.0000i
  -1.0000 - 0.0000i
  -1.0000 + 0.0000i

p = 3×1 complex

   0.2094 + 0.5582i
   0.2094 - 0.5582i
   0.1584 + 0.0000i

k = 0.0985

Plot the poles and zeros to verify that they are where expected.

zplane(b,a)
text(real(z)-0.1,imag(z)-0.1,"Zeros")
text(real(p)-0.1,imag(p)-0.1,"Poles")

Figure contains an axes object. The axes object with title Pole-Zero Plot, xlabel Real Part, ylabel Imaginary Part contains 10 objects of type line, text. One or more of the lines displays its values using only markers

Input Arguments

collapse all

Transfer function numerator coefficients, specified as a vector or matrix. If b is a matrix, then each row of b corresponds to an output of the system. b contains the coefficients in descending powers of z. The number of columns of b must be equal to the length of a. If the numbers differ, make them equal by padding zeros. You can use the function eqtflength to accomplish this.

Data Types: single | double

Transfer function denominator coefficients, specified as a vector. a contains the coefficients in descending powers of z.

Data Types: single | double

Output Arguments

collapse all

Zeros of the system, returned as a matrix. z contains the numerator zeros in its columns. z has as many columns as there are outputs.

Poles of the system, returned as a column vector. p contains the pole locations of the denominator coefficients of the transfer function

Gains of the system, returned as a column vector. k contains the gains for each numerator transfer function.

Extended Capabilities

Version History

Introduced before R2006a

See Also

| | | | |