IMPZ

Purpose:

Calculates the impulse response of a Z-transform.

Syntax:

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 z-1.

a

-

A series. The denominator (i.e. pole) coefficients in ascending powers of z-1.

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 rate(b) == rate(a), defaults to rate(b) else defaults 1.0.

Alternate Syntax:

IMPZ(c, N, Fs)

(h, t) = IMPZ(c, N, Fs)

c

-

A series. The system coefficients in cascaded bi-quad form. If c contains 2 columns, c is assumed to be in direct form, where the first column is b and the second column is a.

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 rate(c).

Returns:

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.

Example:

image\impz01.gif

 

W1: impz({1}, {1, -0.5})

 

W1 contains 14 samples of the series:

 

image\impz05.gif

Example:

image\impz02.gif

 

(r, p, k) = residuez({1, -2}, {1, -0.7, 0.1})

 

r == {-5, 6}

p == {.5, .2}

k == {}

 

Representing the partial fraction expansion:

 

image\impz03.gif

 

or

 

image\impz04.gif

 

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)

 

image\impzpic.gif

 

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.

Remarks:

The input series represent the terms of the rational polynomial H(z) = b(z) / a(z) where:

 

image\zplane03.gif

 

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 a[1].

 

For impz(c, N, Fs), the input c is assumed to be a single column of coefficients in cascaded bi-quad form. This is the output format of IIR filters designed by DADiSP/Filters and processed by the CASCADE function.

 

 

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.

See Also:

CASCADE

DADiSP/Filters

FILTEQ

GIMPULSE

GRPDELAY

IMPS

INVFREQZ

RESIDUEZ

STEPZ

ZFREQ