Python Control library step_info returning nan for all parameters

Hi, I am running the following code for a unit step response in a closed loop transfer function on Python using the control library in python:

import control as c
kc = 0.9*3/23
d = c.pade(0.3)
Gp = c.tf([1],[1,1])*c.tf(d[0],d[1])
ti = 1
Gc = kc*c.tf([ti, 1], [ti, 0])
sys1 = Gc*Gp/(1+Gc*Gp)
data1 = c.step_info(sys1)
print(data1)


And the output I get:

{'RiseTime': nan, 'SettlingTime': nan, 'SettlingMin': nan, 'SettlingMax': nan, 'Overshoot': nan, 'Undershoot': nan, 'Peak': inf, 'PeakTime': inf, 'SteadyStateValue': nan}

Which isn't correct, as from plotting the step response the output profile is stable, and it parameters such as RiseTime and SettlingTime should be defined. I tried doing it in Matlab and I got specific answers for it. So why is this nan in Python?
Thanks for your time!
 
Hi, I am running the following code for a unit step response in a closed loop transfer function on Python using the control library in python:

import control as c
kc = 0.9*3/23
d = c.pade(0.3)
Gp = c.tf([1],[1,1])*c.tf(d[0],d[1])
ti = 1
Gc = kc*c.tf([ti, 1], [ti, 0])
sys1 = Gc*Gp/(1+Gc*Gp)
data1 = c.step_info(sys1)
print(data1)


And the output I get:

{'RiseTime': nan, 'SettlingTime': nan, 'SettlingMin': nan, 'SettlingMax': nan, 'Overshoot': nan, 'Undershoot': nan, 'Peak': inf, 'PeakTime': inf, 'SteadyStateValue': nan}

Which isn't correct, as from plotting the step response the output profile is stable, and it parameters such as RiseTime and SettlingTime should be defined. I tried doing it in Matlab and I got specific answers for it. So why is this nan in Python?
Thanks for your time!
Hi,
Try this:
calculate minimal realization or zero-pole cancellation of LTI models
after
sys1 = Gc*Gp/(1+Gc*Gp)
add
sys2 = c.minreal(sys1)
data2 = c.step_info(sys2)
print(data2)

and the result will be:

{'RiseTime': 17.7648668451079, 'SettlingTime': 32.664432586166136, 'SettlingMin': 0.9032026993657325, 'SettlingMax': 1.0000000000000004, 'Overshoot': 0, 'Undershoot': 0, 'Peak': 0.9989620742735067, 'PeakTime': 56.73296186018329, 'SteadyStateValue': 1.0000000000000004}
 
Top