I can't understand why the scipy.signal.ss2tf()
and scipy.signal.StateSpace().to_tf()
give (the same) unexpected result.
Example:
A=[[0, 1, 0], [0, 0, 1], [-3, -4, -2]]
B=[[0], [0], [1]]
C=[[5, 1, 0]]
D=[[0]]
The result for scipy is
num = array([[0, 0, 0, 4]]),
den = array([1., 2., 4., 3.])
in Matlab the result is
num = [0,0,1,5],
den = [1,2,4,3]
It seems that the denominator is always right, I tried other examples, but the numerator of the transfer function doesn't correspond.
Am I using scipy in an incorrect way?
(another example)
A=[[0, 1, 0], [0, 0, 1], [-8, -14, -7]]
B=[[0], [0], [1]]
C=[[15, 5, 0]]
D=[[0]]