control.forced_response¶
- control.forced_response(sys, T=None, U=0.0, X0=0.0, transpose=False)¶
Simulate the output of a linear system.
As a convenience for parameters U, X0: Numbers (scalars) are converted to constant arrays with the correct shape. The correct shape is inferred from arguments sys and T.
For information on the shape of parameters U, T, X0 and return values T, yout, xout, see Convention for Time Series.
Parameters: sys: LTI (StateSpace, or TransferFunction)
LTI system to simulate
T: array-like
Time steps at which the input is defined; values must be evenly spaced.
U: array-like or number, optional
Input array giving input at each time T (default = 0).
If U is None or 0, a special algorithm is used. This special algorithm is faster than the general algorithm, which is used otherwise.
X0: array-like or number, optional
Initial condition (default = 0).
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.
xout: array
Time evolution of the state vector.
See also
Examples
>>> T, yout, xout = forced_response(sys, T, u, X0)