Convert transfer function filter parameters to zero-pole-gain form
finds the matrix of zeros
k] = tf2zp(
z, the vector of poles
p, and the associated vector of gains
k from the
transfer function parameters
a. The function
converts a polynomial transfer-function representation
of a single-input/multi-output (SIMO) continuous-time system to a factored transfer function form
tf2zp when working with positive powers (s2 + s +
1), such as in continuous-time transfer functions. A similar function,
tf2zpk, is more useful when working with
transfer functions expressed in inverse powers (1 + z–1 +
Zeros, Poles, and Gain of Continuous-Time System
Generate a system with the following transfer function.
Find the zeros, poles, and gain of the system. Use
eqtflength to ensure the numerator and denominator have the same length.
b = [2 3]; a = [1 1/sqrt(2) 1/4]; [b,a] = eqtflength(b,a); [z,p,k] = tf2zp(b,a)
z = 2×1 0 -1.5000
p = 2×1 complex -0.3536 + 0.3536i -0.3536 - 0.3536i
k = 2
Plot the poles and zeros to verify that they are in the expected locations.
zplane(b,a) text(real(z)+0.1,imag(z),"Zero") text(real(p)+0.1,imag(p),"Pole")
b — Transfer function numerator coefficients
vector | matrix
Transfer function numerator coefficients, specified as a vector or matrix. If
b is a matrix, then each row of
corresponds to an output of the system.
b contains the coefficients
in descending powers of s. The number of columns of
b must be less than or equal to the length of
a — Transfer function denominator coefficients
Transfer function denominator coefficients, specified as a vector.
a contains the coefficients in descending powers of
z — Zeros
Zeros of the system, returned as a matrix.
z contains the
numerator zeros in its columns.
z has as many columns as there are
p — Poles
Poles of the system, returned as a column vector.
the pole locations of the denominator coefficients of the transfer function.
k — Gains
Gains of the system, returned as a column vector.
the gains for each numerator transfer function.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
The complexity of outputs,
k, might be different in MATLAB® and the generated code.
The order of outputs,
p, might be different in MATLAB and the generated code.
Introduced before R2006a