- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 helpLink Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, 1/(6.28 F) is the delay of a first order filter, 8 ms in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you might try asking on comp.dsp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hmm interesting, i used 20 Hz as the transition band not the fstop (number of taps should be proportional to the transition band over sampling frequency and not dependant on the actual fstop). apparently that doesn't hold as fstop approaches 0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 kHz cut-off is fine, of course. The lowest cut-off, I could achieve with standard design methods was 45 Hz for a rectangular window and 75 Hz with a reasonable window function.
A 50 Hz notch filter, that can be also realized with 81 taps (although it actually uses 2 taps only) achieved about 25 Hz 3 dB cut-off for the first notch, but it's no low-pass.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
constrained least squares FIR looks pretty good, 0.5 dB in band ripple and 14 dB stop band attenuation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My requirements:
cutoff frequency: 20Hz 0.01 dB in band ripple 40 or 80 dB stop band attenuation phase delay: as small as possible, at least not more than 20ms- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried the Constrained Equiribble filter (minimum phase), it is not satisfactory due to too high order, and large delay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
40 to 80 dB is quite a range, it will ~double your filter size. you have an fpass, but how about an fstop? in other words what is the expected transition band of your filter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- 40 to 80 dB is quite a range, it will ~double your filter size. you have an fpass, but how about an fstop? in other words what is the expected transition band of your filter --- Quote End --- Because it is a practical problem, there is not an exact value of fstop. I just hope it is very close to the cutoff frequency, for example, 28Hz.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
real world problems still need specifications/constraints. there's no point in shooting for 80 dB if the specs don't require it
a transition band of 1/1000 the sample rate is non trivial
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page