This is documentation for an old release of SciPy (version 0.17.1). Read this page in the documentation of the latest stable release (version 1.15.1).
scipy.signal.tf2zpk¶
- scipy.signal.tf2zpk(b, a)[source]¶
Return zero, pole, gain (z, p, k) representation from a numerator, denominator representation of a linear filter.
Parameters: b : array_like
Numerator polynomial coefficients.
a : array_like
Denominator polynomial coefficients.
Returns: z : ndarray
Zeros of the transfer function.
p : ndarray
Poles of the transfer function.
k : float
System gain.
Notes
If some values of b are too close to 0, they are removed. In that case, a BadCoefficients warning is emitted.
The b and a arrays are interpreted as coefficients for positive, descending powers of the transfer function variable. So the inputs b=[b0,b1,...,bM] and a=[a0,a1,...,aN] can represent an analog filter of the form:
H(s)=b0sM+b1s(M−1)+⋯+bMa0sN+a1s(N−1)+⋯+aNor a discrete-time filter of the form:
H(z)=b0zM+b1z(M−1)+⋯+bMa0zN+a1z(N−1)+⋯+aNThis “positive powers” form is found more commonly in controls engineering. If M and N are equal (which is true for all filters generated by the bilinear transform), then this happens to be equivalent to the “negative powers” discrete-time form preferred in DSP:
H(z)=b0+b1z−1+⋯+bMz−Ma0+a1z−1+⋯+aNz−NAlthough this is true for common filters, remember that this is not true in the general case. If M and N are not equal, the discrete-time transfer function coefficients must first be converted to the “positive powers” form before finding the poles and zeros.