1
$\begingroup$

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

alpha=0.4
(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?

$\endgroup$

2 Answers 2

2
$\begingroup$

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.

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

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.

$\endgroup$

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.