|
FIR filter coefficientscan be calculated using the window method:
BUT... Most window functions have a fixed attenuation to the top of their first sidelobe:
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:
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.
|