It has been about 4 years since I last studied digital filters. I am trying to find a low-pass causal filter with minimal time domain lag. I would also be interested in a high-pass filter with minimal time domain lag. I know there is a trade-off and I am not so concerned about stop-band attenuation, but do want linear phase. I would prefer unity gain in the passband. Can anyone recommend such a filter? Is there a good online guide or book about digital filters -- with more of an application approach vs. theoretical.
Looking for low-pass causal filter with minimal time domain lag?
Started by ●October 7, 2009
Reply by ●October 7, 20092009-10-07
Jessica wrote:> It has been about 4 years since I last studied digital filters. I am > trying to find a low-pass causal filter with minimal time domain lag. > I would also be interested in a high-pass filter with minimal time > domain lag. I know there is a trade-off and I am not so concerned > about stop-band attenuation, but do want linear phase. I would prefer > unity gain in the passband. Can anyone recommend such a filter? Is > there a good online guide or book about digital filters -- with more > of an application approach vs. theoretical.Minimum lag will be associated with a minimum-phase filter that won't be linear phase. The only features of a linear-phase filter that you can trade away for smaller lag are stopband attenuation, transition-band width, and to a small extent, passband ripple. Since you must trade something, perhaps a little phase nonlinearity can improve overall performance. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 7, 20092009-10-07
On Oct 7, 12:24�pm, Jerry Avins <j...@ieee.org> wrote:> Jessica wrote: > > It has been about 4 years since I last studied digital filters. �I am > > trying to find a low-pass causal filter with minimal time domain lag. > > I would also be interested in a high-pass filter with minimal time > > domain lag. �I know there is a trade-off and I am not so concerned > > about stop-band attenuation, but do want linear phase. �I would prefer > > unity gain in the passband. �Can anyone recommend such a filter? �Is > > there a good online guide or book about digital filters -- with more > > of an application approach vs. theoretical. > > Minimum lag will be associated with a minimum-phase filter that won't be > linear phase. The only features of a linear-phase filter that you can > trade away for smaller lag are stopband attenuation, transition-band > width, and to a small extent, passband ripple. Since you must trade > something, perhaps a little phase nonlinearity can improve overall > performance. > > Jerry > -- > Engineering is the art of making what you want from things you can get. > �����������������������������������������������������������������������Thanks Jerry, that makes sense. Is there a guide on designing a minimum-phase filter? Maybe a book or online reference that organizes filters by characteristics? Are there any filters which are adaptive based on signal-to-noise ratio? In other words, the output follows the input more closely when the signal-to-noise ratio is high.
Reply by ●October 8, 20092009-10-08
On Wed, 07 Oct 2009 11:59:42 -0700, Jessica wrote:> It has been about 4 years since I last studied digital filters. I am > trying to find a low-pass causal filter with minimal time domain lag. I > would also be interested in a high-pass filter with minimal time domain > lag. I know there is a trade-off and I am not so concerned about > stop-band attenuation, but do want linear phase. I would prefer unity > gain in the passband. Can anyone recommend such a filter? Is there a > good online guide or book about digital filters -- with more of an > application approach vs. theoretical.It sounds like you want to digitize a Bessel filter -- it's minimum phase, which means the snappiest time-domain response for the frequency response, and it has the most linear phase response of any minimum-phase filter. I don't know how common this is in digital-land -- it's mostly used in analog systems in a spot where you'd use a linear-phase FIR filter if it were a digital system. Tell us what you're planning on _doing_ with the filter and we may be able to help more. While you're at it, think about whether you need absolute dead-on linear phase response or just an approximation, how important unity pass-band gain is, etc. -- www.wescottdesign.com
Reply by ●October 8, 20092009-10-08
On 7 Okt, 20:59, Jessica <pt...@live.com> wrote:> It has been about 4 years since I last studied digital filters. �I am > trying to find a low-pass causal filter with minimal time domain lag. > I would also be interested in a high-pass filter with minimal time > domain lag. �I know there is a trade-off and I am not so concerned > about stop-band attenuation, but do want linear phase.Usually it's the other way around: Stop-band attenuation is the important factor in the design. If one were to take your priorities to the extreme, one might say that stop-band attenuation is irrelevant, in which case one might ask why you would need the filter at all? Rune
Reply by ●October 8, 20092009-10-08
On Oct 8, 2:04�am, Rune Allnor <all...@tele.ntnu.no> wrote:> On 7 Okt, 20:59, Jessica <pt...@live.com> wrote: > > > It has been about 4 years since I last studied digital filters. �I am > > trying to find a low-pass causal filter with minimal time domain lag. > > I would also be interested in a high-pass filter with minimal time > > domain lag. �I know there is a trade-off and I am not so concerned > > about stop-band attenuation, but do want linear phase. > > Usually it's the other way around: Stop-band attenuation > is the important factor in the design. If one were to take > your priorities to the extreme, one might say that stop-band > attenuation is irrelevant, in which case one might ask why > you would need the filter at all? > > RuneI want some stopband attenuation, but I suppose the strongest priority is minimum time domain lag.
Reply by ●October 8, 20092009-10-08
On Oct 7, 10:32�pm, Tim Wescott <t...@seemywebsite.com> wrote:> On Wed, 07 Oct 2009 11:59:42 -0700, Jessica wrote: > > It has been about 4 years since I last studied digital filters. �I am > > trying to find a low-pass causal filter with minimal time domain lag. I > > would also be interested in a high-pass filter with minimal time domain > > lag. �I know there is a trade-off and I am not so concerned about > > stop-band attenuation, but do want linear phase. �I would prefer unity > > gain in the passband. �Can anyone recommend such a filter? �Is there a > > good online guide or book about digital filters -- with more of an > > application approach vs. theoretical. > > It sounds like you want to digitize a Bessel filter -- it's minimum > phase, which means the snappiest time-domain response for the frequency > response, and it has the most linear phase response of any minimum-phase > filter. > > I don't know how common this is in digital-land -- it's mostly used in > analog systems in a spot where you'd use a linear-phase FIR filter if it > were a digital system. > > Tell us what you're planning on _doing_ with the filter and we may be > able to help more. �While you're at it, think about whether you need > absolute dead-on linear phase response or just an approximation, how > important unity pass-band gain is, etc. > > --www.wescottdesign.comI am a trader and I am trying to develop smoother technical indicators than what I currently have (exponential moving average). Maybe the best approach would be a dynamic ema of the form: y[n] = x[n]*alpha + y[n-1](1-alpha) where alpha varies based on some parameter of the signal -- dominant cycle period, signal to noise ratio, etc. So the purpose of the smoother is to remove the noise or choppyness (low-pass filter), but throw in too much lag due to the filtering and whatever indicator is based on the smoothed data will be worthless.
Reply by ●October 8, 20092009-10-08
Tim Wescott wrote:> On Wed, 07 Oct 2009 11:59:42 -0700, Jessica wrote: > > >>It has been about 4 years since I last studied digital filters. I am >>trying to find a low-pass causal filter with minimal time domain lag. I >>would also be interested in a high-pass filter with minimal time domain >>lag. I know there is a trade-off and I am not so concerned about >>stop-band attenuation, but do want linear phase. I would prefer unity >>gain in the passband. Can anyone recommend such a filter? Is there a >>good online guide or book about digital filters -- with more of an >>application approach vs. theoretical.Online is superficial and cud for idiots. Good book: Dietrich Schlichtharle. "Digital Filters: Basics and Design" ISBN 3-540-66841-1> It sounds like you want to digitize a Bessel filter -- it's minimum > phase, which means the snappiest time-domain response for the frequency > response, and it has the most linear phase response of any minimum-phase > filter. > > I don't know how common this is in digital-land -- it's mostly used in > analog systems in a spot where you'd use a linear-phase FIR filter if it > were a digital system.There is no such thing as Bessel filter in the digital land. There are several methods to compensate for warping; Greg Berchin's FDLS can be applied, too. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Reply by ●October 8, 20092009-10-08
On Thu, 08 Oct 2009 09:45:12 -0500 Vladimir Vassilevsky <nospam@nowhere.com> wrote:> > > Tim Wescott wrote: > > On Wed, 07 Oct 2009 11:59:42 -0700, Jessica wrote: > > > > > >>It has been about 4 years since I last studied digital filters. I > >>am trying to find a low-pass causal filter with minimal time domain > >>lag. I would also be interested in a high-pass filter with minimal > >>time domain lag. I know there is a trade-off and I am not so > >>concerned about stop-band attenuation, but do want linear phase. I > >>would prefer unity gain in the passband. Can anyone recommend such > >>a filter? Is there a good online guide or book about digital > >>filters -- with more of an application approach vs. theoretical. > > Online is superficial and cud for idiots. > > Good book: > Dietrich Schlichtharle. "Digital Filters: Basics and Design" > ISBN 3-540-66841-1 > > > > It sounds like you want to digitize a Bessel filter -- it's minimum > > phase, which means the snappiest time-domain response for the > > frequency response, and it has the most linear phase response of > > any minimum-phase filter. > > > > I don't know how common this is in digital-land -- it's mostly used > > in analog systems in a spot where you'd use a linear-phase FIR > > filter if it were a digital system. > > There is no such thing as Bessel filter in the digital land. There > are several methods to compensate for warping; Greg Berchin's FDLS > can be applied, too. > > > Vladimir Vassilevsky > DSP and Mixed Signal Design Consultant > http://www.abvolt.comYou can do a pretty good Bessel approximation digitally, especially if you're looking for an Fc that's a small fraction of the sample rate. The Schlichtharle book you referenced, actually, is where I yoinked the algorithm that I'm using. And let me tell you how much fun it was trying to remember enough Pascal to translate his Bessel program into Octave. Still, the net result is an IIR filter with a fraction of a percent of overshoot. -- Rob Gaddi, Highland Technology Email address is currently out of order
Reply by ●October 8, 20092009-10-08
Rob Gaddi wrote:> On Thu, 08 Oct 2009 09:45:12 -0500 > Vladimir Vassilevsky <nospam@nowhere.com> wrote: > > >>Good book: >>Dietrich Schlichtharle. "Digital Filters: Basics and Design" >>ISBN 3-540-66841-1 >> >>There is no such thing as Bessel filter in the digital land. There >>are several methods to compensate for warping; Greg Berchin's FDLS >>can be applied, too. >> >> > You can do a pretty good Bessel approximation digitally, especially if > you're looking for an Fc that's a small fraction of the sample rate. > The Schlichtharle book you referenced, actually, is where I yoinked the > algorithm that I'm using. And let me tell you how much fun it was > trying to remember enough Pascal to translate his Bessel program into > Octave. Still, the net result is an IIR filter with a fraction of a > percent of overshoot.There are two very common misconceptions, that I try to dissolve. The correct statements are: 1. Overshoot/no overshoot and linear/nonlinear phase are unrelated issues. 2. Bessel filters do overshoot, although not as much as the other filter types. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com






