I'm trying to design a digital low pass filter with a narrow transition band. My sampling rate is 25 kHz, the cut off frequency is 60 Hz & the transition band width is 4 Hz. I'm looking for about 40 dB attenuation in the stop band & 0.1 dB in the pass band.
I looked at the traditional FIR methodology using the Windowed Sinc filter but the number of taps required to get such a transition band is too high. Going by the reference here, we get a value of 25000 which is 1 second in terms of time.
As an alternative, I looked into IFIR filters. While the model filter results in a decrease in the filter length by a value that's equal to the interpolation factor, the interpolated filter formed by inserting zeros into the model filter's kernel increases the length to almost the same as what you'd get with a conventional FIR filter.
So, my question is, does the IFIR methodology make the filter more efficient from a group delay point of view? Is the only benefit here the fact that more zeros implies fewer multiplications & additions? I'm trying to achieve around 1 to 2 cycles of delay (in terms of time for a 50 Hz signal). Considering that the sampling rate is so high, shouldn't it be easier to achieve this? If not, what other methods could be used to obtain such a filter?
I have written lots and lots of papers on how to design very narrow bandwidth filters.. Have two options IIR and FIR... in IIR you design filter bandwidth at 1/4 sample rate... heterodyne input signal to 1/4 sample rate, filter it and heterodyne back to baseband then a short filter to house cleaning filter to eliminate image at 1/2 sample
In FIR you lower sample rate with M-path polyphase M-to-1 down sample filter, design and implement desired filter at lower sample rate and then return sample rate back to original with M-path 1-to-M up sampling filter.
If delay is important (small) use the IIR filter
see attached papers... I can supply matlab simulations of any of the options contact me at email@example.com
also see material in my book... multirate signal processing
Have fun... these designs make you smile!
I am not sure about IFIR but in your case I would try decimation to a low sampling rate then apply final shaping.
Try the Matlab toolbox called MSDTOOLBOX. It is available as an open source on MathWorks
With a 25 KHz sampling rate, if you were to try do filter in one stage you are asking for a passband that is 1/2 of 1% of the Nyquist frequency!! Failure is guaranteed.
With a symmetric-tap FIR, you get constant group delay, but if attempted in one stage, your group delay will be measured in years.
Instead, use 3 IIR LPF filters in sequence:
1) Fs = 25 KHz Fpass = 1000 Fstop = 2000 ripple = 0.01 atten = 80
...then decimate by 5
2) Fs = 5 KHz Fpass = 200 Fstop = 400 ripple = 0.01 atten = 80
...then decimate by 5
3) Fs = 1 KHz Fpass = 60-2 Fstop = 60+2 ripple = 0.1 atten = 40
...which is your real goal
With an IIR filter, group delay is nearly 0 for most of the frequency band, but will spike in your transition band. Even so, it should be within your limits.
This is interesting. I've never used IIR filters before & am wondering how there's no group delay at all? Does this mean, the output signal will have zero lag with respect to the input signal?
Also, I need linear phase until at least the cutoff frequency. What happens beyond that isn't of much concern. Is this possible with the idea you mentioned?
As regards the IFIR, it will perform no better than a conventional FIR in terms of group delay, but it could consume less DSP cycles - that is really its only advantage. Bear in mind that IFIR can only be performed with fixed-point maths, otherwise you will get wild oscilaltions.