impulse
Compute the impulse response of a control system.
Syntax
[y,t,x] = impulse(sys)
[y,t,x] = impulse(sys,t)
[y,t,x] = impulse(sys,tfinal)
[y,t,x] = impulse(sys,tfinal,ts)
impulse(...)
Inputs
- sys
- The control system.
- t
- The vector of times at which to compute the response. The vector should be equally spaced.
- tfinal
- The time interval for which to compute the response. Omit or use [] to allow the function to determine an appropriate value.
- ts
- The time interval for sampling a continuous system.
Outputs
- y
- The impulse response.
- t
- The time vector for the response.
- x
- The state trajectory matrix.
Example
Verify the impulse response of a fourth order Butterworth low pass digital filter with a 300 Hz cutoff frequency and a 2000 Hz sampling frequency.
[b,a] = butter(4,300/(2000/2));
ts = 0.0005;
tfb = tf(b,a,ts);
impulse(tfb);
Comments
If the output arguments are omitted, the function plots the results.
If a default occurs, tfinal will be chosen so that the response has settled to within 0.5%.