Designs an FIR linear phase bandpass filter.

KWBPASS(order, rate, fs1, fp1, fp2, fs2, attn)

order |
- |
Optional. An integer, the filter length. If not specified, the filter order is automatically estimated. |

rate |
- |
A real, the sample rate of the filter in Hertz. |

fs1 |
- |
A real, the first stopband edge in Hertz. |

fp1 |
- |
A real, the first passband edge in Hertz. |

fp2 |
- |
A real, the second passband edge in Hertz. |

fs2 |
- |
A real, the second stopband edge in Hertz. |

attn |
- |
A real, the passband attenuation in dB. |

A series, the bandpass filter coefficients. The filter coefficients are identical to the impulse response of the FIR filter.

W1: kwbpass(1000.0, 180.0, 200.0, 280.0, 300.0, 40.0)

W2: 20*log10(filtmag(W1, {1}, 1024))

W1 creates a bandpass filter with a sample rate of 1000 Hz and a passband that extends from 200 Hz to 280 Hz. The first stopband is 180 Hz and the last stopband is 300 Hz. The resulting filter is 118 samples long with a stopband attenuation of 40 dB. W2 displays the frequency response of the filter.

W1: kwbpass(1000.0, 180.0, 200.0, 280.0, 300.0, 40.0)

W2: gsin(1000, 1/1000, 10) + gsin(1000, 1/1000, 190)

W3: firfilterF(W2, W1)

W1 creates the same FIR bandpass filter as the previous example. W2 contains a series with two sinusoids and W3 applies the filter to recover the higher frequency sinewave.

W2: kwbpass(140, 1000.0, 180.0, 200.0, 280.0, 300.0, 40.0)

Creates a similar filter except the filter order is set to 140 samples resulting in a narrower transition band.

The KWBPASS filter specifications are depicted as follows:

KWHPASS designs a bandpass filter using a Kaiser window method. The impulse response of the ideal filter is multiplied by a Kaiser window to produce a linear phase FIR filter with a flat passband. The filter is non-causal and time symmetric about t = 0 and the offset is equal to:

- (length-1) / (rate * 2)

The filter order refers to the number of resulting filter coefficients.

The band edges must lie between 0.0 and 0.5 * rate (the Nyquist frequency). Overlapping band edges are not permitted.

Although a filter designed with the Kaiser window method exhibits a flat passband response, the resulting filter generally has more coefficients than the Remez Exchange method. See BANDPASS to design a linear phase FIR bandpass filter using the Remez Exchange algorithm.

See BESSEL, BUTTERWORTH, CHEBY1, CHEBY2 and ELLIPTIC to design IIR filters using the Bilinear Transform method.

KWBPASS requires the DADiSP/Filters Module.

Oppenheim and Schafer

Discrete Time Signal Processing

Prentice Hall, 1989

Digital Signal Processing Committee

Programs for Digital Signal Processing

I.E.E.E. Press, 1979

Bateman & Yates

Digital Signal Processing Design

Computer Science Press, 1989