scipy.signal.

zpk2tf#

scipy.signal.zpk2tf(z, p, k)[source]#

Return polynomial transfer function representation from zeros and poles

Parameters:
zarray_like

Zeros of the transfer function.

parray_like

Poles of the transfer function.

kfloat

System gain.

Returns:
bndarray

Numerator polynomial coefficients.

andarray

Denominator polynomial coefficients.

Notes

Array API Standard Support

zpk2tf has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.

Library

CPU

GPU

NumPy

n/a

CuPy

n/a

PyTorch

JAX

⚠️ no JIT

Dask

⚠️ computes graph

n/a

The CuPy and JAX backends both support only 1d input.

See Support for the array API standard for more information.

Examples

Find the polynomial representation of a transfer function H(s) using its ‘zpk’ (Zero-Pole-Gain) representation.

\[H(z) = 5 \frac { (s - 2)(s - 6) } { (s - 1)(s - 8) }\]
>>> from scipy.signal import zpk2tf
>>> z   = [2,   6]
>>> p   = [1,   8]
>>> k   = 5
>>> zpk2tf(z, p, k)
(   array([  5., -40.,  60.]), array([ 1., -9.,  8.]))