Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

very short group delay low pass filter: how to choose?

12 views
Skip to first unread message

gst

unread,
Mar 23, 2006, 9:33:31 AM3/23/06
to
hi,

i'm a newcomer to filter things and i'm not an engineer (i'm a software
developer) so... don't be too harsh to me ;-)

the problem is: i have to use a low-pass filter (if it matters:
digital, must run on a 32-bit machine using only integers)

right now i'm using a 4-pole butterworth; experimenting a bit i see,
with a cutoff frequency around 100 hz, a delay of about 0.008 secs,
which i would like to make shorter.

i'm no filter expert and basically i don't know where to go; i was
lurking this group with ggroups and if i understand correctly there's
some relation between group delay and filter response sharpness.

what can i do (change type or form of the filter, ...) to have a filter
with short delays and (lower priority if i have to choose....) have a
sharp response?

i would like to know if i have some grade of freedom besides lowering
the pole count....

thank you a lot

gst (novice)

Ken Smith

unread,
Mar 23, 2006, 10:27:50 AM3/23/06
to
In article <1143124411....@i40g2000cwc.googlegroups.com>,
gst <groups....@gmail.com> wrote:
[....]

>right now i'm using a 4-pole butterworth; experimenting a bit i see,
>with a cutoff frequency around 100 hz, a delay of about 0.008 secs,
>which i would like to make shorter.

Is the 100Hz cut off a requirement? Obviously moving the cut off
frequency up shortens the delay.

Why are you caring about "group delay"? A fairly common reason is that
you intend this to be part of a control loop. In control loops it is
usually best to look at the entire system's responce and not get hung up
on some small part.

Why are you using a 4-pole filter? A single RC is a filter too. More
poles makes for more delay.

You may simply be trying to do the imposible. A low pass filter uses data
from the past. Anything you do that sharpens it or lowers its cut-off,
the further into the past it must look.

--
--
kens...@rahul.net forging knowledge

Jeroen Belleman

unread,
Mar 23, 2006, 11:07:10 AM3/23/06
to
gst wrote:
> [...] i have to use a low-pass filter (if it matters:

> digital, must run on a 32-bit machine using only integers)
>
> right now i'm using a 4-pole butterworth; experimenting a bit i see,
> with a cutoff frequency around 100 hz, a delay of about 0.008 secs,
> which i would like to make shorter. [...]

There is a fundamental trade-off between cut-off frequency, steepness
and delay. The lower the cut-off frequency and the steeper the filter,
the longer the delay. You can't escape that.

That said, in digital filters, it's easy to make things worse than they
need to be. Don't use pipeline delays unless unavoidable. Don't use
linear-phase FIR filters. If you can code a four-pole IIR algorithm
without running into accuracy or overflow problems, fine. Otherwise
code it as two two-pole sections. Don't get hung-up on Butterworth.
Tweak the poles to trade off steepness against delay, for example.

Jeroen Belleman

Ban

unread,
Mar 23, 2006, 12:00:46 PM3/23/06
to

The shortest delay has a filter with "minimum phase" design. You do not need
to lower the pole count, but the Q-factor, which determines how fast the
transition between pass- and stopband is. If you just need a certain
suppression at a much higher nyquist frequency, you can use maybe a 6-pole
Q=0.5 Gauss-filter.
A 4-pole 100Hz(-3dB) butterworth filter has a Q of 0.707, but will need
4.5ms delay
(0-50% of stationary value). A 6-pole Gauss will only need 3.16ms. Also this
filter has no overshoot compared to 10.8% of the BW. The Bessel-filters are
in-between with Q=0.58. A 6-pole Bessel has 4.28ms delay and 0.64%
overshoot.
A minimum phase filter is simply the unmirrored pulse response as a FIR, but
there are ways of using an IIR as well.
--
ciao Ban
Apricale, Italy

Mark

unread,
Mar 23, 2006, 1:19:22 PM3/23/06
to

first question is...

do you really mean minimum group delay as in absolute delay....

or do you mean

min group delay __variation__ across the passband

they are two different things and there are two different answers
depending upon which your question really is...

Mark

John Larkin

unread,
Mar 23, 2006, 9:43:39 PM3/23/06
to
On Thu, 23 Mar 2006 17:07:10 +0100, Jeroen Belleman
<jer...@nospam.please> wrote:

>gst wrote:
>> [...] i have to use a low-pass filter (if it matters:
>> digital, must run on a 32-bit machine using only integers)
>>
>> right now i'm using a 4-pole butterworth; experimenting a bit i see,
>> with a cutoff frequency around 100 hz, a delay of about 0.008 secs,
>> which i would like to make shorter. [...]
>
>There is a fundamental trade-off between cut-off frequency, steepness
>and delay. The lower the cut-off frequency and the steeper the filter,
>the longer the delay. You can't escape that.
>

There is, in theory, such a thing as an ideal lowpass transformer,
absolutely unity transfer function for all frequencies below cutoff,
zero above. It's not physically realizable, bacause it violates
causality... its impulse response output begins before its input. If
you're willing to allow some insertion delay you can fix the causality
crisis, and then you can approximate it as closely as you like within
financial limits.

As a practical matter, you can design a steeper-than-Bessel and follow
it with allpass equalizer things to repair the delay wiggles. And
there are "transitional" filters that are Bessel-like until some way
out into the stopband, then drop harder, a compromise.

OP needs a good filter book or three.


John


Phil Hobbs

unread,
Mar 24, 2006, 12:39:06 AM3/24/06
to
John Larkin wrote:

Zverev is the best I know about--but the used bookstore gold rush has
run him up to about $350 a copy. (And you complain about me. ;-)

He has a nice equiripple group delay filter that's significantly sharper
than a Bessel for the same maximum delta delay. It's also equiripple
way out into the stopband, whereas Bessel and Gauss and all those other
19th century folks tend to lose their nice properties before the
rolloff has a chance to cover their misdeeds.

Cheers,

Phil "not Australian" Hobbs

Fred Bartoli

unread,
Mar 24, 2006, 2:23:12 AM3/24/06
to

"Phil Hobbs" <pcdhSpamM...@electrooptical.net> a écrit dans le
message de news:442385FA...@electrooptical.net...
> John Larkin wrote:
>
<...>

> Phil "not Australian" Hobbs

LOL!

Don't worry Phil, there's no possible confusion there. Not even the begining
of an insult and way too much technical info there :-)


--
Thanks,
Fred.


Jeroen Belleman

unread,
Mar 24, 2006, 2:22:59 AM3/24/06
to
Phil Hobbs wrote:

> Zverev is the best I know about--but the used bookstore gold rush has

> run him up to about $350 a copy.[...]

Oh dear! It's time to lock mine up then. It's getting precious.

Jeroen Belleman

gst

unread,
Mar 24, 2006, 3:48:51 AM3/24/06
to
ahem.... as you may have suspected i'm not sure 8-)

i'll try to explain my needs using plain old... italianish

i have this signal, unfortunately extremely noisy above 100hz (maybe
i'll be forced to cut even at lower frequency, something like 80,
70...)

the signal is (at this point) enormously oversampled (3khz)

the system must react in a *very* short time to some "event" (thus i'm
not doing things like cleaning signal for audio processing, i'm instead
trying to react quickly to an anomaly)

the post-filter part is already quite tuned and very very fast, it's
faster than sampling indeed...

thus i think the latency is The Real Enemy, and it comes basically from
the filter....


thus:

what i need is to "copy" the good part of the signal from input to
output as fast as possible while (lower priority) retaining as much
strong attenuation in the "dirty" band part as possible.

the frequency components of the "good" part is unfortunately quite
homogeneous, in theory i should retain 10hz as much as 70 hz....

....cheers and thanks from italy ;-)

Fred Bloggs

unread,
Mar 24, 2006, 6:24:48 AM3/24/06
to

> what i need is to "copy" the good part of the signal from input to
> output as fast as possible while (lower priority) retaining as much
> strong attenuation in the "dirty" band part as possible.
>

The Gaussian filter is the mathematical optimum for least rise time with
a given rolloff. A titorial can be found here:
http://www.picosecond.com/objects/AN-07a.pdf

Jens Tingleff

unread,
Mar 24, 2006, 6:34:12 AM3/24/06
to
In article <442385FA...@electrooptical.net>, Phil Hobbs says...

Rumour has it that it's also available in paperback ;-)

The equi-ripple constant group delay filters are also tabled in "HF filter
design and computer simulation" by Randall W Rhea, McGraw-Hill.

There's also a slightly more recent optimsation method which can be made to give
equi-ripple group delay, detailed in

B J Bennet "A new filter synthesis technique &#8211; the hourglass." IEEE
Transactions CAS, 35(12):1469 &#8211; 1477, December 1988.

Best Regards

Jens


--
Key ID 0x09723C12, jens...@tingleff.org
Analogue filtering / 5GHz RLAN / Mdk Linux / odds and ends
http://www.tingleff.org/jensting/ +44 1223 211 585
"Never drive a car when you're dead!" Tom Waits

Fred Bloggs

unread,
Mar 24, 2006, 7:07:41 AM3/24/06
to
>
> Rumour has it that it's also available in paperback ;-)
>
> The equi-ripple constant group delay filters are also tabled in "HF filter
> design and computer simulation" by Randall W Rhea, McGraw-Hill.
>
> There's also a slightly more recent optimsation method which can be made to give
> equi-ripple group delay, detailed in
>
> B J Bennet "A new filter synthesis technique &#8211; the hourglass." IEEE
> Transactions CAS, 35(12):1469 &#8211; 1477, December 1988.
>
> Best Regards
>
> Jens
>
>

Noble publishes Filtering in the Time and Frequency Domains, which is
much more relevant than an archaic handbook of tabulations from the
slide rule days.

John Larkin

unread,
Mar 24, 2006, 10:59:01 AM3/24/06
to

I've purchased *three* copies of your damned addictive book so far.
One for work, one for home, and one I was dumb enough to lend to
somebody.

>He has a nice equiripple group delay filter that's significantly sharper
>than a Bessel for the same maximum delta delay. It's also equiripple
>way out into the stopband, whereas Bessel and Gauss and all those other
>19th century folks tend to lose their nice properties before the
>rolloff has a chance to cover their misdeeds.
>
>Cheers,
>
>Phil "not Australian" Hobbs

Williams' book includes equiripple delay filters, and costs below $100
used, from Amazon or Alibris. But if you're digital filtering, can't
you go way beyond the classic forms?

John

Ian Stirling

unread,
Mar 24, 2006, 1:56:34 PM3/24/06
to
gst <groups....@gmail.com> wrote:
> ahem.... as you may have suspected i'm not sure 8-)
>
> i'll try to explain my needs using plain old... italianish
>
> i have this signal, unfortunately extremely noisy above 100hz (maybe
> i'll be forced to cut even at lower frequency, something like 80,
> 70...)
>
> the signal is (at this point) enormously oversampled (3khz)
>
> the system must react in a *very* short time to some "event" (thus i'm
> not doing things like cleaning signal for audio processing, i'm instead
> trying to react quickly to an anomaly)

Ok...
You can sometimes get much, much better results if you ignore the
filter, and deal with the signal.
Are you trying to monitor a changing frequency, amplitude, phase, ...?

John Jardine.

unread,
Mar 24, 2006, 3:39:49 PM3/24/06
to

"gst" <groups....@gmail.com> wrote in message
news:1143190131.8...@i39g2000cwa.googlegroups.com...

[Only seeing part of this thread as ISP has dropped all newsgroups, so
ignore if post has been answered].
Poking around in a filter prog' turns up a IIR, 3rd order (3ksps), 'Data
transmission filter'. It's Raised Cosine with a 100% roll off factor
(alpha), derived using a Matched-Z transform).
Flat 2ms delay. Roll off about 17dB/octave above 80Hz. Very clean step
response.
john


Ken Smith

unread,
Mar 25, 2006, 10:54:20 PM3/25/06
to
In article <1143190131.8...@i39g2000cwa.googlegroups.com>,

gst <groups....@gmail.com> wrote:
>ahem.... as you may have suspected i'm not sure 8-)
[...]

>i have this signal, unfortunately extremely noisy above 100hz (maybe
>i'll be forced to cut even at lower frequency, something like 80,
>70...)
>
>the signal is (at this point) enormously oversampled (3khz)
>
>the system must react in a *very* short time to some "event" (thus i'm
>not doing things like cleaning signal for audio processing, i'm instead
>trying to react quickly to an anomaly)

Just a late in the day thought:

First about your signal:

Lets say that your "signal" is some sort of pulse. By shifting the phase
of the components of this pulse, we can make it look more or less like a
band limited impulse.

**
** **
* *
** **
*** ********

It seems to me, that this shape is the sort of thing you want to have for
a signal. You can compare for above some level to know that an event has
happened.


Now about the noise:

Think about the noise as a whole bunch of pulses (both plus and minus
going) that have been filtered in some funny way to make your noise
spectrum.

I think, if your filter flattens the noise spectrum so that the noise at
all frequencies is nearly equal, your signal's pulse will be the furthest
above the noise and will be detected the most quickly.

This argues not just for a cut off frequency but also for the right slope
in the early part of the cut off.

gst

unread,
Mar 28, 2006, 5:52:46 AM3/28/06
to
first of all, *thank* *you* to everyone for the very interesting
replies, at last i've a bit of time to try your suggestions (and ask
for a filter book to my boss ;-) )

before the book is bought i would like to try at least a part of your
suggestions:
- equiripple (i'm completely lost, i'll probably have to way the
book...)
- (i hope) raised cosine (lost as well, wait(book)...)
- gaussian

the latter seems interesting and easier to try without the book, but i
have to understand and tweak it a bit; i'm using matlab to try it

matlab has this "fspecial" constructor which requires:

H = FSPECIAL('gaussian',N,SIGMA) returns a rotationally
symmetric Gaussian lowpass filter with standard deviation
SIGMA (in pixels). N is a 1-by-2 vector specifying the number
of rows and columns in H. (N can also be a scalar, in which
case H is N-by-N.) If you do not specify the parameters,
FSPECIAL uses the default values of [3 3] for N and 0.5 for
SIGMA.

so it's suited for example for use with (finite) images...

well... i have a continuous monodimensional stream of samples.... how
do i should interpret the "N dimensions" vector? if i fix one dimension
to 1, is the other is related to the filter order?

the sigma.... i'll google about it ;-) (i suppose it relates to how
"shaped" is the bell curve... i don't know about gaussian curves but
iirc they relate to distributions, and sigma could be the... deviation?
i'll see)


moreover i found this

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=5087&objectType=file

"A recursive implementation of the Gaussian filter. This implementation
yields an infinite impulse response filter that has 6 MADDs per
dimension independent of the value of sigma in the Gaussian kernel"

still it requires a finite number of points as input....

i understand that my "finite window vs infinite stream of samples"
doubt is quite trivial but... can you give me a little hint?

thank you again

gst

unread,
Mar 28, 2006, 7:39:08 AM3/28/06
to

gst wrote:
> symmetric Gaussian lowpass filter with standard *deviation*

> SIGMA (in pixels). N is a 1-by-2 vector specifying the number

> iirc they relate to distributions, and sigma could be the... *deviation*?

:blush:.... :buryheadundersand:...

Fred Bloggs

unread,
Mar 28, 2006, 8:00:03 AM3/28/06
to

That Gaussian function is an image filter. You want the "communications"
filter:
http://www.mathworks.com/access/helpdesk/help/toolbox/commblks/ref/gaussianfilter.html

0 new messages