

To simulate this response, the system is discretized using zero-order hold on the inputs. Is equivalent to the following unforced response with initial state. The impulse response of a single-input state-space model The impulse response of the first input channel is then accessed byĬontinuous-time models are first converted to state space. (the first dimension is the length of t). You can store the impulse response data in MATLAB arrays byīecause this system has two inputs, y is a 3-D array with dimensions The left plot shows the impulse response of the first input channel, and the right plot shows the impulse response of the second input channel. To plot the impulse response of the second-order state-space model The dimensions of y are thenĪnd y(:,:,j) gives the response to an impulse disturbance entering the jth input channel. In the multi-input case, the impulse responses of each input channel are stacked up along the third dimension of y. For single-input systems, y has as many rows as time samples (length of t), and as many columns as outputs.

Return the output response y, the time vector t used for simulation, and the state trajectories x (for state-space models only). = impulse(sys) % for state-space models only See "Plotting and Comparing Multiple Systems" and the bode entry in this section for more details. impulse(sys1,sys2.,sysN) impulse(sys1,sys2.,sysN,t)Īs with bode or plot, you can specify a particular color, linestyle, and/or marker for each system, for example,.To plot the impulse responses of several LTI models sys1. For continuous systems, dt becomes the sample time of the discretized simulation model (see "Algorithm"), so make sure to choose dt small enough to capture transient phenomena. You can specify either a final time t = Tfinal (in seconds), or a vector of evenly spaced time samples of the formįor discrete systems, the spacing dt should match the sample period. The duration of simulation is determined automatically to display the transient behavior of the response. The impulse response of multi-input systems is the collection of impulse responses for each input channel. This model can be continuous or discrete, and SISO or MIMO. Plots the impulse response of an arbitrary LTI model sys. When invoked without left-hand arguments, this function plots the impulse response on the screen. Zero initial state is assumed in the state-space case. The impulse response is the response to a Dirac input for continuous-time systems and to a unit pulse at for discrete-time systems. Impulse(sys1,'PlotStyle1'.,sysN,'PlotStyleN')Ĭalculates the unit impulse response of a linear system. Impulse (Function Reference) Function ReferenceĬompute the impulse response of LTI models
