So the filter coefficients for an FIR filter
can be calculated simply by taking the inverse
Fourier transform of the desired frequency
response.
BUT...
- The inverse Fourier transformhas to take
samples of the continuous desired
frequency response.
- to define a sharp filter needs closely spaced frequency samples -
so a lot of them
- so the inverse Fourier transform will give us a lot of filter
coefficients
- but we don't want a lot of filter coefficients
We can do a better job by noting that:
- the filter coefficients for an FIR
filterare also the impulse response of the
filter
- the impulse response of an FIR filter dies away to zero
- so many of the filter coefficients for an FIR filter are small
- and perhaps we can throw away these small values as being less
important
Here is a better recipe for calculating FIR filter coefficients based
on throwing away the small ones:
- 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
- then calculate the Fourier transform
of the truncated set of coefficients to see if it still matches our
requirement
BUT...