Designs an FIR linear phase bandpass filter.

BANDPASS(order, rate, pb1, pb2, ripple, attn, sb1, sb2)

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

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

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

ripple |
- |
Optional. A real, the passband ripple in dB. Defaults to 3 dB. |

attn |
- |
Optional. A real, the stopband attenuation in dB. Defaults to 40 dB. |

sb1 |
- |
Optional. A real, the first stopband edge frequency in Hertz. Defaults to |

sb2 |
- |
Optional. A real, the second stopband edge frequency in Hertz. Defaults to |

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

W1: bandpass(1000.0, 200.0, 300.0)

W1 creates a bandpass filter with a sample rate of 1000 Hz and a passband that extends from 200 Hz to 300 Hz. The first stopband defaults to 150 Hz and the last stopband defaults to 350 Hz. The resulting filter is 24 samples long with a passband ripple of 3 dB and a stopband attenuation of 48 dB.

W1: bandpass(1000.0, 200.0, 300.0, 3.0, 40.0, 190.0, 310.0)

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

Creates an FIR bandpass filter with a passband that extends from 200 Hz to 300 Hz. The desired passband ripple is set to 3.0 dB and the desired stopband attenuation is 40 dB. The first stopband edge is 190 Hz and the last stopband edge is set to 310 Hz. W2 displays the frequency response of the filter.

W1: bandstop(1000.0, 200.0, 300.0, 3.0, 40.0, 190.0, 310.0)

W2: gsin(1000, 1/1000, 3) + gsin(1000, 1/1000, 250)

W3: firfilterF(W2, 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.

The BANDPASS filter specifications are depicted as follows:

The BANDPASS function uses the Remez Exchange algorithm to compute the FIR filter coefficients. The Remez Exchange algorithm will attempt to meet or exceed the filter specifications with a linear phase FIR filter.

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

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

See KWBPASS to design a linear phase FIR bandpass filter with a flat passband using the Kaiser Window method.

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

BANDPASS requires the DADiSP/Filters Module.

Oppenheim and Schafer

Digital Signal Processing

Prentice Hall, 1975

Digital Signal Processing Committee

Programs for Digital Signal Processing

I.E.E.E. Press, 1979