Calculates the impulse response of a
IMPZ(b, a, N, Fs)
(h, t) = IMPZ(b, a, N, Fs)
b |
- |
A series. The numerator (i.e. zero) coefficients in ascending powers of |
a |
- |
A series. The denominator (i.e. pole) coefficients in ascending powers of |
N |
- |
Optional. An integer specifying the length of the output series. If not specified or empty, the length is determined by allowing the output to decay to –120 dB or to display 5 periods if the output is not significantly damped. |
Fs |
- |
Optional. A real, the sample rate of the output. If |
IMPZ(c, N, Fs)
(h, t) = IMPZ(c, N, Fs)
c |
- |
A series. The system coefficients in cascaded |
N |
- |
Optional. An integer specifying the length of the output series. If not specified or empty, the length is determined by allowing the output to decay to –120 dB or to display 5 periods if the output is not significantly damped. |
Fs |
- |
Optional. A real, the sample rate of the output. Defaults to |
A series, the impulse response of the system.
(h, t) = IMPZ(b, a) returns the impulse response h and the time values t as two separate series.
W1: impz({1}, {1, -0.5})
W1 contains 14 samples of the series:
(r, p, k) = residuez({1, -2}, {1, -0.7, 0.1})
r == {-5, 6}
p == {.5, .2}
k == {}
Representing the partial fraction expansion:
or
n = 0..20;
W1: -5 * (0.5)^n + 6 * (0.2)^n;stem;
W2: impz({1, -2}, {1, -0.7, 0.1}, 21);
W3: w1 - w2;sety(-1.5, 1.5)
W1 contains 21 samples of the analytical impulse response as determined by the partial fraction expansion method.
W2 displays 21 samples of the calculated response and W3 confirms that the difference is negligible.
The input series represent the terms of the rational polynomial
z |
= |
e jω complex frequency |
N |
= |
number of numerator terms |
M |
= |
number of denominator terms |
If a[1] ≠ 1, the numerator and denominator terms are normalized by dividing each coefficient by
For impz(c, N, Fs), the input c is assumed to be a single column of coefficients in cascaded
or equivalently:
where G is the system gain, bk and ak are the filter coefficients for the kth stage.
If c contains 2 columns, the coefficients are assumed to be in direct form, where the first column is b and the second column is a.
If there are no output arguments, the result is displayed in the current window as a stem plot.