control.initial_response

control.initial_response(sys, T=None, X0=0.0, input=0, output=None, T_num=None, transpose=False, return_x=False, squeeze=True)

Initial condition response of a linear system

If the system has multiple outputs (MIMO), optionally, one output may be selected. If no selection is made for the output, all outputs are given.

For information on the shape of parameters T, X0 and return values T, yout, see Time series data.

Parameters
  • sys (StateSpace or TransferFunction) – LTI system to simulate

  • T (array_like or float, optional) – Time vector, or simulation time duration if a number (time vector is autocomputed if not given; see step_response() for more detail)

  • X0 (array_like or float, optional) –

    Initial condition (default = 0)

    Numbers are converted to constant arrays with the correct shape.

  • input (int) – Ignored, has no meaning in initial condition calculation. Parameter ensures compatibility with step_response and impulse_response

  • output (int) – Index of the output that will be used in this simulation. Set to None to not trim outputs

  • T_num (int, optional) – Number of time steps to use in simulation if T is not provided as an array (autocomputed if not given); ignored if sys is discrete-time.

  • transpose (bool) – If True, transpose all input and output arrays (for backward compatibility with MATLAB and scipy.signal.lsim())

  • return_x (bool) – If True, return the state vector (default = False).

  • squeeze (bool, optional (default=True)) – If True, remove single-dimensional entries from the shape of the output. For single output systems, this converts the output response to a 1D array.

Returns

  • T (array) – Time values of the output

  • yout (array) – Response of the system

  • xout (array) – Individual response of each x variable

Notes

This function uses the forced_response function with the input set to zero.

Examples

>>> T, yout = initial_response(sys, T, X0)