control.impulse_response¶
- control.impulse_response(sys, T=None, X0=0.0, input=0, output=None, transpose=False)¶
Impulse response of a linear system
If the system has multiple inputs or outputs (MIMO), one input has to be selected for the simulation. Optionally, one output may be selected. The parameters input and output do this. All other inputs are set to 0, all other outputs are ignored.
For information on the shape of parameters T, X0 and return values T, yout, see Convention for Time Series.
Parameters: sys: StateSpace, TransferFunction
LTI system to simulate
T: array-like object, optional
Time vector (argument is autocomputed if not given)
X0: array-like object or number, optional
Initial condition (default = 0)
Numbers are converted to constant arrays with the correct shape.
input: int
Index of the input that will be used in this simulation.
output: int
Index of the output that will be used in this simulation. Set to None to not trim outputs
transpose: bool
If True, transpose all input and output arrays (for backward compatibility with MATLAB and scipy.signal.lsim)
Returns: T: array
Time values of the output
yout: array
Response of the system
See also
ForcedReponse, initial_response, step_response
Examples
>>> T, yout = impulse_response(sys, T, X0)