I was wondering if anyone had any thoughts about long lowpass FIR filter design methods that minimize ringing or possibly give explicit control over it? The problem is that I need to design a long low pass filter with the criteria of controlling ringing in the step response. For reasons of confidentiality I can't give too many details, but I'm after a 640 tap 1/32 bw low pass filter, with minimum ringing (whether that's minimizing the magnitude of the first ring or minimizing the length of the ringing has yet to be figured out). The sharpness of the cuttoff doesn't really matter, but some sort of sharpness/ringing tradeoff would be nice. Must be FIR, linear phase or close to it. My line of thinking on this is something like this: - ringing is caused by sharp cutoffs - a butterworth filter has a very smooth cutoff - the closest thing to a butterworth filter in the linear phase, FIR world is a maximally flat filter (at least that's what Matlab calls them) The Matlab function (maxflat(order,'sym',Wc)) is limited to 140 taps, but otherwise the filters it produces look good. I'm sure that the 140 limit is there for a good reason, so I'm hesitant to start hacking the Matlab function. So, does anyone have any ideas? Plan B is to try doing this through optimization, I've done filter design through this method before, but that's a bit more tedious and time consuming and may not give me the results I want. So before I embark on that, any contribution of this groups wealth of experience would be greatly appreciated. Many thanks, Chris
LP Filter - Minimize Ringing
Started by ●October 22, 2008
Reply by ●October 22, 20082008-10-22
On 22 Okt, 15:54, Chris Maryan <kmar...@gmail.com> wrote:> I was wondering if anyone had any thoughts about long lowpass FIR > filter design methods that minimize ringing or possibly give explicit > control over it?The two factors that govern the ringing are - The narrowest bandwidth in the response (passband, stopband, transition band) - Response steepness in transition band> The problem is that I need to design a long low pass filter with the > criteria of controlling ringing in the step response.What does 'long' mean?> For reasons of > confidentiality I can't give too many details, but I'm after a 640 tap > 1/32 bw low pass filter, with minimum ringing (whether that's > minimizing the magnitude of the first ring or minimizing the length of > the ringing has yet to be figured out). The sharpness of the cuttoff > doesn't really matter, but some sort of sharpness/ringing tradeoff > would be nice. Must be FIR, linear phase or close to it.Use as much bandwidth as possible for the transition band. Use the lowest possible stop-band attenuation. Both such factors will reduce ringing.> My line of thinking on this is something like this: > - ringing is caused by sharp cutoffsYep. ...> The Matlab function (maxflat(order,'sym',Wc)) is limited to 140 taps, > but otherwise the filters it produces look good. I'm sure that the 140 > limit is there for a good reason,Matlab doesn't have a very brilliant record in the DSP department, so you may be wrong...> so I'm hesitant to start hacking the > Matlab function. > > So, does anyone have any ideas?Did you see any references to max flat FIRs in the matlab docs? If so, could you post them here? Rune
Reply by ●October 22, 20082008-10-22
On Oct 22, 9:54�am, Chris Maryan <kmar...@gmail.com> wrote:> I was wondering if anyone had any thoughts about long lowpass FIR > filter design methods that minimize ringing or possibly give explicit > control over it? > > The problem is that I need to design a long low pass filter with the > criteria of controlling ringing in the step response. For reasons of > confidentiality I can't give too many details, but I'm after a 640 tap > 1/32 bw low pass filter, with minimum ringing (whether that's > minimizing the magnitude of the first ring or minimizing the length of > the ringing has yet to be figured out). The sharpness of the cuttoff > doesn't really matter, but some sort of sharpness/ringing tradeoff > would be nice. Must be FIR, linear phase or close to it. > > My line of thinking on this is something like this: > - ringing is caused by sharp cutoffs > - a butterworth filter has a very smooth cutoff > - the closest thing to a butterworth filter in the linear phase, FIR > world is a maximally flat filter (at least that's what Matlab calls > them) > > The Matlab function (maxflat(order,'sym',Wc)) is limited to 140 taps, > but otherwise the filters it produces look good. I'm sure that the 140 > limit is there for a good reason, so I'm hesitant to start hacking the > Matlab function. > > So, does anyone have any ideas? > > Plan B is to try doing this through optimization, I've done filter > design through this method before, but that's a bit more tedious and > time consuming and may not give me the results I want. So before I > embark on that, any contribution of this groups wealth of experience > would be greatly appreciated. > > Many thanks, > > ChrisYou have to make a compromise between frequency response, rise time and duration and overshoot... See Chapter 7 of: http://www.amazon.com/Handbook-Filter-Synthesis-Anatol-Zverev/dp/0471986801 See also "Gibbs phenomena" Mark
Reply by ●October 22, 20082008-10-22
Chris Maryan wrote:> I was wondering if anyone had any thoughts about long lowpass FIR > filter design methods that minimize ringing or possibly give explicit > control over it?If my understanding is correct, you would like to have a filter with the monotonic step response. You can trade the incurred delay for the monotonicity of the step response for any given frequency response for either FIR or IIR structure. The phase can be either linear or non-linear as you like. However I don't know of a systematic filter design method that would allow to do that; so you will have to use some sort of optimization.> > The problem is that I need to design a long low pass filter with the > criteria of controlling ringing in the step response. For reasons of > confidentiality I can't give too many details,I possess some dark secrets, too. That increases my feeling of the self importance.> but I'm after a 640 tap > 1/32 bw low pass filter,640 taps === wrong design. Filters like that should be made in the several stages.> with minimum ringing (whether that's > minimizing the magnitude of the first ring or minimizing the length of > the ringing has yet to be figured out).Then you should figure this out first, and ask the questions later.> The sharpness of the cuttoff > doesn't really matter,If the cutoff does not matter, then you don't need a filter at all.> but some sort of sharpness/ringing tradeoff > would be nice.What sort of tradeoff and how nice it should be?> Must be FIR, linear phase or close to it.How close?> My line of thinking on this is something like this: > - ringing is caused by sharp cutoffsEh?> - a butterworth filter has a very smooth cutoffEh?> - the closest thing to a butterworth filter in the linear phase, FIR > world is a maximally flat filter (at least that's what Matlab calls > them)"Matlab does all thinking for us" (tm)> > The Matlab function (maxflat(order,'sym',Wc)) is limited to 140 taps, > but otherwise the filters it produces look good. I'm sure that the 140 > limit is there for a good reason, so I'm hesitant to start hacking the > Matlab function.Of course. Using a FIR filter with more then ~100 taps is usually the indication of the wrong design approach.> So, does anyone have any ideas?First, you should decide what kind of filter exactly you are after.> Plan B is to try doing this through optimization, I've done filter > design through this method before, but that's a bit more tedious and > time consuming and may not give me the results I want. So before I > embark on that, any contribution of this groups wealth of experience > would be greatly appreciated.It depends. How much exactly is the great appreciation? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●October 22, 20082008-10-22
Chris Maryan wrote:> I was wondering if anyone had any thoughts about long lowpass FIR > filter design methods that minimize ringing or possibly give explicit > control over it? > > The problem is that I need to design a long low pass filter with the > criteria of controlling ringing in the step response. For reasons of > confidentiality I can't give too many details, but I'm after a 640 tap > 1/32 bw low pass filter, with minimum ringing (whether that's > minimizing the magnitude of the first ring or minimizing the length of > the ringing has yet to be figured out). The sharpness of the cuttoff > doesn't really matter, but some sort of sharpness/ringing tradeoff > would be nice. Must be FIR, linear phase or close to it. > > My line of thinking on this is something like this: > - ringing is caused by sharp cutoffs > - a butterworth filter has a very smooth cutoff > - the closest thing to a butterworth filter in the linear phase, FIR > world is a maximally flat filter (at least that's what Matlab calls > them) > > The Matlab function (maxflat(order,'sym',Wc)) is limited to 140 taps, > but otherwise the filters it produces look good. I'm sure that the 140 > limit is there for a good reason, so I'm hesitant to start hacking the > Matlab function. > > So, does anyone have any ideas? > > Plan B is to try doing this through optimization, I've done filter > design through this method before, but that's a bit more tedious and > time consuming and may not give me the results I want. So before I > embark on that, any contribution of this groups wealth of experience > would be greatly appreciated. > > Many thanks, > > ChrisIs the cart before the horse here? The filter isn't designed yet, but you know it has 640 taps. Longer filters allow (but don't force) sharper transitions and transitions at lower frequencies. Sharp transitions accentuate ringing. Most filter-design programs yield the sharpest transition that the number of taps will allow, so other things being equal, increasing the number of taps tends to increase ringing. Other things don't have to be equal. I vaguely remember that ScopeFIR (from http://www.iowegian.com) allows the transition region to be shaped. Windowed-sinc designs aren't as efficient as iteratively designed FIRs, but choosing the window provides another way to tweak them. A window like Blackman or Nuttall might satisfy your needs. (Applied to a filter, a window broadens the transition, reduces amplitude ripples in the passband and improves the stopband attenuation.) I wonder what happens if a window is applied twice (i.e. squared)? Butterworth filters ring. The closest analog thing to a linear phase filter is Bessel, not Butterworth. Its broad transition is the price paid. (Graphs at http://www.adas.fr/pdf/an03.pdf) Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 22, 20082008-10-22
Jerry Avins wrote:> Most filter-design programs yield the sharpest > transition that the number of taps will allow, so other things being > equal, increasing the number of taps tends to increase ringing. Other > things don't have to be equal. I vaguely remember that ScopeFIR (from > http://www.iowegian.com) allows the transition region to be shapedA filter could be designed as the Parks-McClellan multiband rather then the lowpass. Then, leaving the convergence problems aside, the increase in the number of taps tends to reduce the ringing.> Windowed-sinc designs aren't as efficient as iteratively designed FIRs, > but choosing the window provides another way to tweak them. A window > like Blackman or Nuttall might satisfy your needs.Yes, yes, yes. (Applied to a filter,> a window broadens the transition, reduces amplitude ripples in the > passband and improves the stopband attenuation.) I wonder what happens > if a window is applied twice (i.e. squared)?A product of non-negative windows is always non-negative :-)> Butterworth filters ring.The critically dumped poles don't ring for sure.> The closest analog thing to a linear phase > filter is Bessel, not Butterworth.The linear phase has no direct relation to ringing in the time domain. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●October 22, 20082008-10-22
Vladimir Vassilevsky wrote: ...> The linear phase has no direct relation to ringing in the time domain.... Empirically, Bessel filters have pretty flat group delay over the passband, and they don't generally ring. See page 2 at http://www.adas.fr/pdf/an03.pdf Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 22, 20082008-10-22
Jerry Avins wrote:> Vladimir Vassilevsky wrote: > > ... > >> The linear phase has no direct relation to ringing in the time domain.Despite of the popular belief, ringing/not ringing is not related to linear/non-linear phase.> > Empirically, Bessel filters have pretty flat group delay over the > passband, and they don't generally ring.Despite of the popular belief, Bessel filters do exhibit some overshoot and ringing, although not nearly as much as the other IIR filter types. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●October 22, 20082008-10-22
Vladimir Vassilevsky wrote:> > > Jerry Avins wrote: >> Vladimir Vassilevsky wrote: >> >> ... >> >>> The linear phase has no direct relation to ringing in the time domain. > > Despite of the popular belief, ringing/not ringing is not related to > linear/non-linear phase. > >> >> Empirically, Bessel filters have pretty flat group delay over the >> passband, and they don't generally ring. > > Despite of the popular belief, Bessel filters do exhibit some overshoot > and ringing, although not nearly as much as the other IIR filter types.Well, sure, they aren't ring proof, but a 5th-order Bessel is probably better than a second-order Butterworth. (I'm referencing analog filters. Whether impulse-invariant or bilinear, IIR filters approximate their analog prototypes only the lower ends of their ranges.) Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 22, 20082008-10-22
See replies intermixed below: On Oct 22, 10:07�am, Rune Allnor <all...@tele.ntnu.no> wrote:> On 22 Okt, 15:54, Chris Maryan <kmar...@gmail.com> wrote: > > > I was wondering if anyone had any thoughts about long lowpass FIR > > filter design methods that minimize ringing or possibly give explicit > > control over it? > > The two factors that govern the ringing are > > - The narrowest bandwidth in the response (passband, stopband, > � transition band) > - Response steepness in transition bandYes, agreed, this is more specific than what I had said about the steepness.> > > The problem is that I need to design a long low pass filter with the > > criteria of controlling ringing in the step response. > > What does 'long' mean?640 taps.><snip>> > The Matlab function (maxflat(order,'sym',Wc)) is limited to 140 taps, > > but otherwise the filters it produces look good. I'm sure that the 140 > > limit is there for a good reason, > > Matlab doesn't have a very brilliant record in the DSP department, > so you may be wrong...Agreed, but it's how I learned this stuff, so I use this group to fill in the blanks.> > > �so I'm hesitant to start hacking the > > Matlab function. > > > So, does anyone have any ideas? > > Did you see any references to max flat FIRs in the matlab docs? > If so, could you post them here?Selesnick, I.W., and C.S. Burrus, "Generalized Digital Butterworth Filter Design," Proceedings of the IEEE Int. Conf. Acoust., Speech, Signal Processing, Vol. 3 (May 1996) I looked it up and it has some design formulas, but because this came out of the matlab docs and because of the previous point, I figured I'd discuss with this group first. Chris






