I have a simple transfer function in Matlab, i.e.:
num = [1,2,3]
den = [300,5000,80000]
sys_tf = tf(num,den)
then, I transform sys_tf into statespace form as;
sys_ss = ss(sys_tf)
The resulting system consists of;
>> sys_ss.A = [-16.67, -16.67;16, 0]
>> sys_ss.B = [0.25;0]
>> sys_ss.C = [-0.1956, -0.2197]
>> sys_ss.D = [0.003333]
On the other hand, when I create the same transfer function in Python and transform it to statespace form using "ss" command that is available in Control Systems Library (Matlab Compatibility module), I obtain a different results than what I get from Matlab as;
from control.matlab import ss
sys_ss = ss(num,den)
>> sys_ss.A = [-16.67, -266.667;1,0]
>> sys_ss.B = [1;0]
>> sys_ss.C = [-0.0488, -0.8788]
>> sys_ss.D = [0.003333]
The result I get from Python is same as Matlab's "tf2ss" command. However, I would like to get the same results in Python as I use Matlab's (ss) function as shown above.
Can someone help me out? What important aspect am I missing here? How do I get the same results?