DSPRelated.com
Forums

Short group-delay FIR filters

Started by Bob Adams December 3, 2004
Lets say we want to design a linear-phase FIR low-pass filter, and we
want the minimum group-delay possible. In the normal case the group
delay is given by 1/2 the filter length, which in turn is given by the
filter passband/stopband specifications.

This standard design approach imposes a linear-phase constraint on the
entire frequency band from 0 to Fs/2, even though much of this
frequency range may be heavily attenuated. What if we only imposed a
linear-phase constraint on frequencies at or below the start of the
stopband, and let the stopband be non-linear-phase? Would this allow
for shorter group-delays and be "effectively" linear-phase? (I vaguely
recall seeing an IEEE paper on this but can't quite place it). How
would one design such a filter?

Bob Adams
On 3 Dec 2004 16:02:17 -0800, robert.adams@analog.com (Bob Adams)
wrote:

>Lets say we want to design a linear-phase FIR low-pass filter, and we >want the minimum group-delay possible. In the normal case the group >delay is given by 1/2 the filter length, which in turn is given by the >filter passband/stopband specifications. > >This standard design approach imposes a linear-phase constraint on the >entire frequency band from 0 to Fs/2, even though much of this >frequency range may be heavily attenuated. What if we only imposed a >linear-phase constraint on frequencies at or below the start of the >stopband, and let the stopband be non-linear-phase? Would this allow >for shorter group-delays and be "effectively" linear-phase? (I vaguely >recall seeing an IEEE paper on this but can't quite place it). How >would one design such a filter? > >Bob Adams
You mean something between minimum-phase and linear-phase? FWIW, I've always wondered about this as well. Since you only really care about phase linearity within the passband, relaxing the constraint in the stopband may provide additional degrees of design freedom to reduce the number of required taps or achieve some other benefit. I would expect that this would provide the most benefit in filters with narrow passbands compared to fs/2. Eric Jacobsen Minister of Algorithms, Intel Corp. My opinions may not be Intel's opinions. http://www.ericjacobsen.org
Eric Jacobsen wrote:

> On 3 Dec 2004 16:02:17 -0800, robert.adams@analog.com (Bob Adams) > wrote: > > >>Lets say we want to design a linear-phase FIR low-pass filter, and we >>want the minimum group-delay possible. In the normal case the group >>delay is given by 1/2 the filter length, which in turn is given by the >>filter passband/stopband specifications. >> >>This standard design approach imposes a linear-phase constraint on the >>entire frequency band from 0 to Fs/2, even though much of this >>frequency range may be heavily attenuated. What if we only imposed a >>linear-phase constraint on frequencies at or below the start of the >>stopband, and let the stopband be non-linear-phase? Would this allow >>for shorter group-delays and be "effectively" linear-phase? (I vaguely >>recall seeing an IEEE paper on this but can't quite place it). How >>would one design such a filter? >> >>Bob Adams > > > You mean something between minimum-phase and linear-phase? > > FWIW, I've always wondered about this as well. Since you only really > care about phase linearity within the passband, relaxing the > constraint in the stopband may provide additional degrees of design > freedom to reduce the number of required taps or achieve some other > benefit. I would expect that this would provide the most benefit in > filters with narrow passbands compared to fs/2. > > > Eric Jacobsen > Minister of Algorithms, Intel Corp. > My opinions may not be Intel's opinions. > http://www.ericjacobsen.org
Yes and no. Talking through my hat -- the resultant muffling lightens whatever responsibility i can be taxed with for talking nonsense -- there's no way to make the trade exactly. For the delay to be perfectly flat in the passband, all of its derivatives must be zero throughout the passband. As they say at The Jolly Onion, "There ain't no free lunch." Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
On Fri, 03 Dec 2004 22:28:27 -0500, Jerry Avins wrote:

> Eric Jacobsen wrote: > >> On 3 Dec 2004 16:02:17 -0800, robert.adams@analog.com (Bob Adams) >> wrote: >> >> >>>Lets say we want to design a linear-phase FIR low-pass filter, and we >>>want the minimum group-delay possible. In the normal case the group >>>delay is given by 1/2 the filter length, which in turn is given by the >>>filter passband/stopband specifications. >>> >>>This standard design approach imposes a linear-phase constraint on the >>>entire frequency band from 0 to Fs/2, even though much of this >>>frequency range may be heavily attenuated. What if we only imposed a >>>linear-phase constraint on frequencies at or below the start of the >>>stopband, and let the stopband be non-linear-phase? Would this allow >>>for shorter group-delays and be "effectively" linear-phase? (I vaguely >>>recall seeing an IEEE paper on this but can't quite place it). How >>>would one design such a filter? >>> >>>Bob Adams >> >> >> You mean something between minimum-phase and linear-phase? >> >> FWIW, I've always wondered about this as well. Since you only really >> care about phase linearity within the passband, relaxing the >> constraint in the stopband may provide additional degrees of design >> freedom to reduce the number of required taps or achieve some other >> benefit. I would expect that this would provide the most benefit in >> filters with narrow passbands compared to fs/2. >> >> >> Eric Jacobsen >> Minister of Algorithms, Intel Corp. >> My opinions may not be Intel's opinions. >> http://www.ericjacobsen.org > > Yes and no. Talking through my hat -- the resultant muffling lightens > whatever responsibility i can be taxed with for talking nonsense -- > there's no way to make the trade exactly. For the delay to be perfectly > flat in the passband, all of its derivatives must be zero throughout the > passband. As they say at The Jolly Onion, "There ain't no free lunch."
I just found the on-line references that I mentioned before, when this subject has been brought up: http://mako.resonance.com.sg/lake/audiofile4/story2.htm http://mako.resonance.com.sg/lake/audiofile5/story3.htm There was also an AES conference paper in about '95/'96 that these web pages were derived from, but I don't have the preprint number handy. Might be useful. Although there's no such thing as a free lunch, there are certainly trade-offs that can be made, between extremes. -- Andrew
Andrew Reilly wrote:

> On Fri, 03 Dec 2004 22:28:27 -0500, Jerry Avins wrote:
...
>>Yes and no. ... As they say at The Jolly Onion, "There ain't no free lunch." > > > I just found the on-line references that I mentioned before, when this > subject has been brought up: > > http://mako.resonance.com.sg/lake/audiofile4/story2.htm > http://mako.resonance.com.sg/lake/audiofile5/story3.htm > > There was also an AES conference paper in about '95/'96 that these web > pages were derived from, but I don't have the preprint number handy. > > Might be useful. Although there's no such thing as a free lunch, there > are certainly trade-offs that can be made, between extremes.
Compromise or trade-off, yes. That's what I meant by "yes and no". Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:

> Andrew Reilly wrote: > > >>On Fri, 03 Dec 2004 22:28:27 -0500, Jerry Avins wrote: > > > ... > > >>>Yes and no. ... As they say at The Jolly Onion, "There ain't no free lunch." >> >> >>I just found the on-line references that I mentioned before, when this >>subject has been brought up: >> >>http://mako.resonance.com.sg/lake/audiofile4/story2.htm >>http://mako.resonance.com.sg/lake/audiofile5/story3.htm >> >>There was also an AES conference paper in about '95/'96 that these web >>pages were derived from, but I don't have the preprint number handy. >> >>Might be useful. Although there's no such thing as a free lunch, there >>are certainly trade-offs that can be made, between extremes. > > > Compromise or trade-off, yes. That's what I meant by "yes and no".
Further thoughts: chances are, the departure from linearity is likely to be worst at the end of the range. The less delay variation that can be tolerated, the more taps -- hence the more delay -- will be needed. The limit, of course, is a symmetric filter. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Bob Adams wrote:
> Lets say we want to design a linear-phase FIR low-pass filter, and we > want the minimum group-delay possible. In the normal case the group > delay is given by 1/2 the filter length, which in turn is given by the > filter passband/stopband specifications. > > This standard design approach imposes a linear-phase constraint on the > entire frequency band from 0 to Fs/2, even though much of this > frequency range may be heavily attenuated. What if we only imposed a > linear-phase constraint on frequencies at or below the start of the > stopband, and let the stopband be non-linear-phase? Would this allow > for shorter group-delays and be "effectively" linear-phase? (I vaguely > recall seeing an IEEE paper on this but can't quite place it). How > would one design such a filter? > > Bob Adams
Have you looked at coupled all-pass filter? With those you can get very near linear phase. They are also computationally pretty nice as well. I believe you can get roughly a second order response with only 1 or 2 multiplies. They also have good noise performance vs a biquad or something along those lines. The all-pass is an IIR section, but with careful design you can get close to linear phase. I'm not sure though about the group delay aspects. I know fred harris has published quite a bit about coupled all-pass filters. Tim
Bob Adams wrote:
> > Lets say we want to design a linear-phase FIR low-pass filter, and we > want the minimum group-delay possible. In the normal case the group > delay is given by 1/2 the filter length, which in turn is given by the > filter passband/stopband specifications. > > This standard design approach imposes a linear-phase constraint on the > entire frequency band from 0 to Fs/2, even though much of this > frequency range may be heavily attenuated. What if we only imposed a > linear-phase constraint on frequencies at or below the start of the > stopband, and let the stopband be non-linear-phase? Would this allow > for shorter group-delays and be "effectively" linear-phase? (I vaguely > recall seeing an IEEE paper on this but can't quite place it). How > would one design such a filter? > > Bob Adams
RBJ answered this question some time ago: http://groups.google.com/groups?q=minimum+phase+Erik+Castro+group:comp.dsp&hl=en&lr=&selm=3338A8C1.77A8%40viconet.com&rnum=5 AES preprint #3994 Robert L. M. Heylen and Malcolm O. Hawksford Interpolation between Minimum-Phase and Linear-Phase Frequency Responses which is even available on line: http://www.essex.ac.uk/ese/research/audio_lab/malcolmspubdocs/C68%20Phase%20interpolation.pdf Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid) +-----------------------------------------------------------+ "The day Microsoft makes something that doesn't suck is probably the day they start making vacuum cleaners." -- Ernst Jan Plugge
Erik de Castro Lopo <nospam@mega-nerd.com> wrote in message news:<41B164FE.AC65A3EC@mega-nerd.com>...
> Bob Adams wrote: > > > > Lets say we want to design a linear-phase FIR low-pass filter, and we > > want the minimum group-delay possible. In the normal case the group > > delay is given by 1/2 the filter length, which in turn is given by the > > filter passband/stopband specifications. > > > > This standard design approach imposes a linear-phase constraint on the > > entire frequency band from 0 to Fs/2, even though much of this > > frequency range may be heavily attenuated. What if we only imposed a > > linear-phase constraint on frequencies at or below the start of the > > stopband, and let the stopband be non-linear-phase? Would this allow > > for shorter group-delays and be "effectively" linear-phase? (I vaguely > > recall seeing an IEEE paper on this but can't quite place it). How > > would one design such a filter? > > > > Bob Adams > > > RBJ answered this question some time ago: > > http://groups.google.com/groups?q=minimum+phase+Erik+Castro+group:comp.dsp&hl=en&lr=&selm=3338A8C1.77A8%40viconet.com&rnum=5 > > > AES preprint #3994 > Robert L. M. Heylen and Malcolm O. Hawksford > Interpolation between Minimum-Phase and Linear-Phase Frequency Responses > > which is even available on line: > > http://www.essex.ac.uk/ese/research/audio_lab/malcolmspubdocs/C68%20Phase%20interpolation.pdf > > Erik
Thanks for the pointer to the paper. I gave it a quick look, and unfortunately it is not an approximation to linear-phase over the passband. It just gives you a continuous set of choices between min-phase and lin-phase. I agree that perfect linear phase is only possible for symetric filters. I guess my thought was that one could get an equiripple approximation to linear phase by giving the filter program the freedom to not hold the linear-phase condition in the stopband. Another possibility is to hold linear-phase up to the edge of the passband, thus allowing the transition band to deviate from linear-phase. This seems more promising since the "area-under-the-curve" in the transition band is large enough that the filter design program might have more flexibility. Of course this is a bit dangerous in the audio business (where I dwell) because then you have to make the argument that the ear can only hear to 20KHz so the phase at 21KHz doesn't matter very much. And this starts a debate that never ends.
Bob,

I would try one of a couple of things:

First, there is a method for designing minimum phase filters out of linear 
phase filters by Schuessler.  Here's how it goes:

Design a linear phase filter ("minimax" or "equiripple") with all positive 
frequency response.  So, if there is one stop band or if all stop bands have 
the same ripple, it's as simple as adding the ripple peak to the entire 
filter (a minor tweak to the middle coefficient).

Now, with the coefficients as a polynomial, find all the roots.
You will find that the zeros are in quads that are polar reciprocals - one 
inside and one outside the unit circle.  It's this symmetry that yields 
linear phase.

The zeros inside the unit circle are the minimum phase part.
The zeros outside the unit circle are the maximum phase part.

Schuessler's method would have you take the "square root" of the filter 
response which means throwing out the reciprocal zeros and making single 
zeros out of any double ones on the unit circle (as in the stop band for 
this all-positive response filter).  If you throw out all of the zeros 
outside the unit circle you get minimum phase.

Now doing this square rooting affects the stop band by increasing the 
ripple. -60 dB ripple becomes -30dB ripple, etc.  So, you should deal with 
this in the initial design.

What might work for you would be to go for linear phase in the passband by 
keeping the reciprocal zeros in that region and to remove the double zeros 
in the stop band.  I haven't tried it so I don't know what will happen.  The 
filter will no longer be symmetrical and it will no longer be linear phase.

Consider this:
The delay of a linear phase / symmetrical filter is 1/2 the length of the 
filter.
The delay of a not-linear phase filter can be less and it can be more.
Removing zeros on the unit circle would perhaps not change the phase to 
either "less delay" or "more delay" - maybe it has no affect on phase.  I've 
not worked this out.

I think it's correct, perhaps only for lowpass filters, that if you have 
flat group delay in a region and if you want to keep flat group delay in 
that region then going from linear phase to not linear phase in general will 
not allow you to improve the group delay where it's flat (the phase is 
linear).

Fred