Main Content

zp2tf

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

Description

example

[b,a] = zp2tf(z,p,k) converts a factored transfer function representation

H(s)=Z(s)P(s)=k(sz1)(sz2)(szm)(sp1)(sp2)(spn)

of a single-input/multi-output (SIMO) system to a polynomial transfer function representation

B(s)A(s)=b1s(n1)++b(n1)s+bna1s(m1)++a(m1)s+am.

Examples

collapse all

Compute the transfer function of a damped mass-spring system that obeys the differential equation

w¨+0.01w˙+w=u(t).

The measurable quantity is the acceleration, y=w¨, and u(t) is the driving force. In Laplace space, the system is represented by

Y(s)=s2U(s)s2+0.01s+1.

The system has unit gain, a double zero at s=0, and two complex-conjugate poles.

k = 1;
z = [0 0]';
p = roots([1 0.01 1])
p = 2×1 complex

  -0.0050 + 1.0000i
  -0.0050 - 1.0000i

Use zp2tf to find the transfer function.

[b,a] = zp2tf(z,p,k)
b = 1×3

     1     0     0

a = 1×3

    1.0000    0.0100    1.0000

Input Arguments

collapse all

Zeros of the system, specified as a column vector or a matrix. z has as many columns as there are outputs. The zeros must be real or come in complex conjugate pairs. Use Inf values as placeholders in z if some columns have fewer zeros than others.

Example: [1 (1+1j)/2 (1-1j)/2]'

Data Types: single | double
Complex Number Support: Yes

Poles of the system, specified as a column vector. The poles must be real or come in complex conjugate pairs.

Example: [1 (1+1j)/2 (1-1j)/2]'

Data Types: single | double
Complex Number Support: Yes

Gains of the system, specified as a column vector.

Example: [1 2 3]'

Data Types: single | double

Output Arguments

collapse all

Transfer function numerator coefficients, returned as a row vector or a matrix. If b is a matrix, then it has a number of rows equal to the number of columns of z.

Transfer function denominator coefficients, returned as a row vector.

Algorithms

The system is converted to transfer function form using poly with p and the columns of z.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

| | | | |

Introduced before R2006a