SciPy

scipy.signal.lsim

scipy.signal.lsim(system, U, T, X0=None, interp=1)[source]

Simulate output of a continuous-time linear system.

Parameters :

system : an instance of the LTI class or a tuple describing the system.

The following gives the number of elements in the tuple and the interpretation:

  • 2: (num, den)
  • 3: (zeros, poles, gain)
  • 4: (A, B, C, D)

U : array_like

An input array describing the input at each time T (interpolation is assumed between given times). If there are multiple inputs, then each column of the rank-2 array represents an input.

T : array_like

The time steps at which the input is defined and at which the output is desired.

X0 : :

The initial conditions on the state vector (zero by default).

interp : {1, 0}

Whether to use linear (1) or zero-order hold (0) interpolation.

Returns :

T : 1D ndarray

Time values for the output.

yout : 1D ndarray

System response.

xout : ndarray

Time-evolution of the state-vector.

Previous topic

scipy.signal.lti.step

Next topic

scipy.signal.lsim2