FIR Digital Filter Design
The Window Method
Bandpass Filter Design ExampleSearch Spectral Audio Signal Processing
Would you like to be notified by email when Julius Orion Smith III publishes a new entry into his blog?
The Matlab code below designs a bandpass filter which passes
frequencies between 4kHz and 6kHz, allowing transition bands from 3-4
kHz and 6-8 kHz (i.e., the stopbands are 0-3 kHz and 8-10 kHz, when the
sampling rate is 20 kHz). The desired stop-band attenuation is 80 dB,
and the passband ripple is required to be no greater than 0.1 dB. For
these specifications, the function kaiserord returns a beta
value of
and a window length of
. These values
are passed to the function kaiser which computes the window
function itself. The ideal bandpass-filter impulse response is
computed in fir1, and the supplied Kaiser window is applied
to shorten it to length
.
