I calculated the order of the FIR filter to be 31(N). so, the number of coefficients has to be 32 (N+1). so, I have to increase it to 33 to make it an odd number.
Why the number of filter coefficients is required to be an odd number?
Signal Processing Stack Exchange is a question and answer site for practitioners of the art and science of signal, image and video processing. It only takes a minute to sign up.
Sign up to join this communityI calculated the order of the FIR filter to be 31(N). so, the number of coefficients has to be 32 (N+1). so, I have to increase it to 33 to make it an odd number.
Why the number of filter coefficients is required to be an odd number?
I think it is about having a linear phase. Having a linear phase is often what you want because it means the delay introduced by the filter will be the same across all the frequency. Then, if you want a linear phase filter, you need to have a symmetrical arrangement of coefficient around the centre coefficient. As for why you have to have a symmetrical number of coefficient around the centre to be of linear phase, I need to verify something then I will update the answer. :)
Edit: Jason R got the answer while I was looking for it! +1
There is no such requirement. However, for linear-phase (symmetric) FIR filters, the delay can be expressed as:
$$ D = \frac{order}{2} = \frac{N_{taps} - 1}{2} \text{ samples} $$
If the number of taps is odd, then the delay of the filter is an integer number of samples, which is desirable for some applications. If you have an even number of taps, then you end up with a half-sample delay.