Closed
Description
Hi, I notice that the simulation functions: step_response
, impulse_response
, for discrete time systems is not very intuitive, and is also inconsistent with matlab's behavior (I sort of have the habit of checking matlab documentation for a python-control function if there are suprises).
Consider this snippet
import control as co
import numpy as np
A1 = co.tf([1], [1, 6, 5])
A1 = co.c2d(A1, 0.5)
T, y = co.step_response(A1, np.arange(0, 5, 0.2))
we would expect T
to be the time instances that correspond to values in y
(matlab behavior), but it turns out not the case. I got T.shape = (25,)
while y.shape=(1, 10)
. The same behavior can be observed for other time-domain functions for discrete-time systems (continuous-time systems are alright).