Forum Discussion
how to design a low pass digital filter with smallest delay
Hello, All
I want to design a digital filter with the cutoff frequency 20Hz. The sampling frequency of my acquiring system is very high, up to 8192 Hz. The important requirement is the delay introduced by the filter should be as small as possible. The filter will be used online, and therefore I don't want to use the inverse model of the filter to cancel the delay. I tried the elliptic filter, and the delay is about 20 to 30 ms. Too large for me. What type of filters can I use? Thank you for your help26 Replies
- Altera_Forum
Honored Contributor
--- Quote Start --- I don't want to use the inverse model of the filter to cancel the delay. --- Quote End --- I assume, you can't cancel the delay even if you want. Group delay is a characteristic parameter of a filter, it can't be changed at will. You get the lowest with a low order Bessel filter. But it depends on your filter characteristic requirements. - Altera_Forum
Honored Contributor
I'm not an expert in digital filtering but I believe a real filter with cutoff frequency F always introduces an intrinsic delay which can't be lower than 1/(6.28 F).
Maybe I'm wrong; this is only something I (confusely) remember from university times, back in another millenium... Cris - Altera_Forum
Honored Contributor
Yes, 1/(6.28 F) is the delay of a first order filter, 8 ms in this case.
- Altera_Forum
Honored Contributor
Many thanks to both of you
Sure, filters always introduce delay, but sometimes the delay can be cancelled in offline data processing. Here I just hope to design a filter with small delay. As suggested by FvM, I tried Bessel. The results show the delay is a little smaller than that of Elliptic filters. Maybe 20ms is smallest delay of a direct-designed filter in this case. - Altera_Forum
Honored Contributor
you might try asking on comp.dsp
- Altera_Forum
Honored Contributor
I don't quite get the given figures.
For a linear FIR, group delay = order/2 in samples e.g. for 81 taps, delay = (81-1)/2 = 40 samples. Each sample on 8192Hz takes 1000/8192 msec so total delay for 81 taps filter = 5 msec. You may also design minimal delay FIR while keeping phase near linear. - Altera_Forum
Honored Contributor
If you can show, how to implement a filter with 8192 Hz sampling rate, 81 taps and 20 Hz cutoff frequency, I'll agree. I fear, it's not feasible, however. Considering the relation between FIR filter frequency characteristic and FFT clarifies, why.
- Altera_Forum
Honored Contributor
if he's already tried an elliptic filter i'm not sure near-linear phase matters, go all out and try a minimum phase FIR
i took a quick look at minimum phase FIR vs IIR for low latency and the IIR came out the winner - Altera_Forum
Honored Contributor
FvM: sure its possible with 81 taps, the stop band attenuation and in band ripple have not be specified. with 81 taps i can easily achieve 5dB in band ripple and 10 dB stop band attenuation :o
- Altera_Forum
Honored Contributor
--- Quote Start --- sure its possible with 81 taps --- Quote End --- Depends on your definition of "possible". It can't implement a cut-off frequency of 20 Hz even if you accept any band ripple or attenuation. If you don't see why, try with a filter tool, e.g. Quartus FIR compiler.