I have the following transfer function:

$$H(z) =\frac{\alpha z}{(z-(1-\alpha))}$$

I'd like to find zeros and poles of it by scipy.signal.tf2zpk:

from scipy.signal import tf2zpk

(zeros, poles, gain) = tf2zpk([0, alpha], [1, alpha-1])

it is clear that transfer function has zero at z=0, but why tf2zpk doesn't output it?


2 Answers 2


A quick look at the documentation yields

The b and a arrays are interpreted as coefficients for positive, descending powers of the transfer function variable.

You did this correctly for the denominator, but your numerator is turned around in the code. Try

(zeros, poles, gain) = tf2zpk([alpha, 0], [1, alpha-1])

and it will yield the correct result.

  • $\begingroup$ thank you! I don't have such a keen eye in reading documentations)) $\endgroup$
    – Curious
    Mar 18, 2022 at 10:19

If your numerator array is [0, alpha] then the numerator polynomial of the corresponding transfer function is $0\cdot z^1+\alpha z^0$, which is not what you intended.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.