# How to get control input values in Python Control module

In Python control module, you can get step response of system. I have feedback PID controlled system whose step response is to be determined and to do that I find closed loop transfer function and get the step response. However the control inputs (the output of PID controller) is lost inside, and to get that I can find the transfer function from reference input to control input, however it is not proper (numerator degree is one larger then den) and I cant get input values just by step response. So what do you suggest, or how can we find also control inputs in this case?

Probably the reason is that your PID implementation is not propper. Then you have either to find the derivative of the error signal or to replace your PID with the proper approximation: $$U(s) = \left(K_p+K_i\frac{1}{s} + K_ds\right)E(s) \approx \left(K_p+K_i\frac{1}{s} + K_d\frac{s}{\tau_d s +1 }\right)E(s),$$ where $$e(t)$$ is the error signal and $$\tau_d$$ is sufficiently small.