We offer training classes and eBooks on DSP, and in Media Processing (TriMedia) Company logo

Introduction to DSP - filtering: FIR Filter design by window III

FIR filter coefficientscan be calculated using the window method:

  • pretend we don't mind lots of filter coefficients
  • specify the desired frequency response using lots of samples
  • calculate the inverse Fourier transform
  • this gives us a lot of filter coefficients
  • so truncate the filter coefficients to give us less
  • apply a window function to sharpen up the filter's frequency response
  • then calculate the Fourier transform of the truncated set of coefficients to see if it still matches our requirement


Most window functions have a fixed attenuation to the top of their first sidelobe:

Fixed attenuation of a window function

No matter how many filter coefficients you throw at it, you cannot improve on a fixed window's attenuation.

This means that the art of FIR filter design by the window method lies in an appropriate choice of window function:

window functions

For example, if you need an attenuation of 20 dB or less, then a rectangle window is acceptable. If you need 43 dB you are forced to choose the Hanning window, and so on.

Sadly, the better window functions need more filter coefficients before their shape can be adequately defined. So if you need only 25 dB of attenuation you should choose a triangle window functions which will give you this attenuation: the Hamming window, for example, would give you more attenuation but require more filter coefficients to be adequately defined - and so would be wasteful of computer power.

The art of FIR filter design by the window method lies in choosing the window function which meets your requirement with the minimum number of filter coefficients.

You may notice that if you want an attenuation of 30 dB you are in trouble: the triangle window is not good enough but the Hanning window is too good (and so uses more coefficients than you need). The Kaiser window function is unique in that its shape is variable. A variable parameter defines the shape, so the Kaiser window is unique in being able to match precisely the attenuation you require without overperforming.

backward/forward go back to start of module go back to previous page go to next page go to next module