>In addition to the other responses, a practical working measure of the >basic delay of a filter can be determined by putting an impulse in and >seeing when the "impulse" comes out. The nuances come largely from >defining the moment that the "impulse" comes out, since it will be >spread and distorted by the response of the filter. The peak of the >output often serves as a basic delay measurement, but it may be >necessary to interpolate the peak location between output samples to >get a fractional delay value when appropriate.Agree. I've used myself an ad-hoc definition, find the point where 50 % of the impulse response's energy is accounted for => oversample and "cumsum" + "find" in matlab. Now it implies some weighting with the filter's frequency response, and possibly the test impulse (doesn't need to be Dirac). For example, a typical (i.e. "pink") audio signal passes through a high-bandwidth mixer channel: The signal mainly "exercises" the low frequency region, has very little energy at the lowpass corner frequency at 15+ kHz. This could give somewhat different numbers, compared to (simulation?) results using an ideal Dirac impulse that covers the full bandwidth of the channel. Not saying there is a problem, my point is that "the" delay of a filter may need to take the signal into account, to which it applies. One situation where this matters is if I cook up a scheme to cancel the transmitted signal in the receiver of a FDD radio. Which is notoriously difficult due to the ill-defined frequency response of the leakage path through the duplex filter with multiple nearby resonances. _____________________________ Posted through www.DSPRelated.com
Urgent: Need to reduce the delay of digital filer
Started by ●July 30, 2014
Reply by ●August 1, 20142014-08-01
Reply by ●August 1, 20142014-08-01
On 7/31/14 11:53 PM, mnentwig wrote:>> In addition to the other responses, a practical working measure of the >> basic delay of a filter can be determined by putting an impulse in and >> seeing when the "impulse" comes out. The nuances come largely from >> defining the moment that the "impulse" comes out, since it will be >> spread and distorted by the response of the filter. The peak of the >> output often serves as a basic delay measurement, but it may be >> necessary to interpolate the peak location between output samples to >> get a fractional delay value when appropriate. > > Agree. I've used myself an ad-hoc definition, find the point where 50 % of > the impulse response's energy is accounted for => oversample and "cumsum" + > "find" in matlab.dunno how good this will work for non-LPF filters. like put a step in and wait 'til the output "step" gets to 50%. but i dunno if any of these definitions would work too good for a DC block HPF. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●August 1, 20142014-08-01
On Wed, 30 Jul 2014 19:45:11 -0700 (PDT), vishwajeet13243@gmail.com wrote:>Hi, > >I am new to digital and analog filters. I tried to construct digital filter but I don't know how to measure the delay introduced by the filter. I have designed 4th order low pass butterworth filter having sampling frequency of 48kHz and cutoff frequency of 5kHz. I don't know how to measure the delay and how to reduce it. Please give me some solution to reduce the delay of filter as much as possible. > >Thank You.Hello vishwajeet, Although you've received many replies here, I will add "my two cents." The "delay" of a filter, at any given frequency, is a measure of time. Apply a sinewave of frequency Fo Hz to the input of your filter and you will see that the filter's output is another sinewave whose frequency is Fo Hz. Now compare the filter's input and output sinewave's in the time domain. Do you see that the output is delayed-in-time relative to the input? (For IIR filters the amount of out-to-input time delay will change as you change the frequency of your input sinewave signal.) You have some studying to do. Seach the web for "filter phase response" and "filter group delay." Study, study, study! And when you're finished studying, ...study some more. You said you designed a filter and you want to know how to reduce its "delay." That's like saying, "I built a woodedn bucket to carry water. What can do to my bucket so that it carries more water?" The answer is, "Nothing. You have to build a new, and different, bucket." A given IIR filter has given frequency-dependent "delay." And you cannot change that. If you design a filter and are unhappy with its delay, you can't change its delay. What you have to do is design ANOTHER filter whose delay meets with your approval. Good Luck, [-Rick-]
Reply by ●August 1, 20142014-08-01
On Wed, 30 Jul 2014 19:45:11 -0700, vishwajeet13243 wrote:> Hi, > > I am new to digital and analog filters. I tried to construct digital > filter but I don't know how to measure the delay introduced by the > filter. I have designed 4th order low pass butterworth filter having > sampling frequency of 48kHz and cutoff frequency of 5kHz. I don't know > how to measure the delay and how to reduce it. Please give me some > solution to reduce the delay of filter as much as possible. > > Thank You.I think it's another one of these: newbie: Help! Urgent! Omigod! I desperately need a solution to <vaguely stated problem> or the World will End! old hand: Well, that's a bit vague, how about if you give us some details on <specific suggestions for detail> newbie: -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Reply by ●August 1, 20142014-08-01
On Friday, August 1, 2014 9:56:36 AM UTC-4, Rick Lyons wrote:> On Wed, 30 Jul 2014 19:45:11 -0700 (PDT), vishwajeet13243@gmail.com > > wrote: > > > > >Hi, > > > > > >I am new to digital and analog filters. I tried to construct digital filter but I don't know how to measure the delay introduced by the filter. I have designed 4th order low pass butterworth filter having sampling frequency of 48kHz and cutoff frequency of 5kHz. I don't know how to measure the delay and how to reduce it. Please give me some solution to reduce the delay of filter as much as possible. > > > > > >Thank You. > > > > Hello vishwajeet, > > Although you've received many replies here, > > I will add "my two cents." > > > > The "delay" of a filter, at any given frequency, > > is a measure of time. Apply a sinewave of > > frequency Fo Hz to the input of your filter and > > you will see that the filter's output is > > another sinewave whose frequency is Fo Hz. > > Now compare the filter's input and output sinewave's > > in the time domain. Do you see that the output > > is delayed-in-time relative to the input? > > (For IIR filters the amount of out-to-input time > > delay will change as you change the frequency of > > your input sinewave signal.) > > > > You have some studying to do. Seach the web for > > "filter phase response" and "filter group delay." > > Study, study, study! And when you're finished > > studying, ...study some more. > > > > You said you designed a filter and you want to > > know how to reduce its "delay." That's like saying, > > "I built a woodedn bucket to carry water. What can > > do to my bucket so that it carries more water?" > > The answer is, "Nothing. You have to build a new, > > and different, bucket." > > > > A given IIR filter has given frequency-dependent "delay." > > And you cannot change that. If you design a filter > > and are unhappy with its delay, you can't change > > its delay. What you have to do is design ANOTHER > > filter whose delay meets with your approval. > > > > Good Luck, > > [-Rick-]Hi Rick, Most of what you said for IIR filters is also true for non-symmetric FIR filters. One place I have seen these occur is deriving them by windowing IIR impulse responses. I am interested in the OP describing their problem in the chance that the problem he has is really reducing differential delay between two filtering paths and not actual filter delay, which may change the problem. Do you have some e-mailable truth serum to get him to reveal the details? :) Dirk
Reply by ●August 1, 20142014-08-01
On 8/1/14 9:56 AM, Rick Lyons wrote:>...> The "delay" of a filter, at any given frequency, > is a measure of time. Apply a sinewave of > frequency Fo Hz to the input of your filter and > you will see that the filter's output is > another sinewave whose frequency is Fo Hz. > Now compare the filter's input and output sinewave's > in the time domain. Do you see that the output > is delayed-in-time relative to the input?that's *phase* delay, not necessarily group delay. just like to cross my I's and dot my T's. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●August 2, 20142014-08-02
On Fri, 01 Aug 2014 14:19:22 -0400, robert bristow-johnson <rbj@audioimagination.com> wrote:>On 8/1/14 9:56 AM, Rick Lyons wrote: >> >... >> The "delay" of a filter, at any given frequency, >> is a measure of time. Apply a sinewave of >> frequency Fo Hz to the input of your filter and >> you will see that the filter's output is >> another sinewave whose frequency is Fo Hz. >> Now compare the filter's input and output sinewave's >> in the time domain. Do you see that the output >> is delayed-in-time relative to the input? > >that's *phase* delay, not necessarily group delay. > >just like to cross my I's and dot my T's.Hi Robert, Ah ha. OK. [-Rick-]
Reply by ●August 2, 20142014-08-02
On Fri, 1 Aug 2014 10:50:57 -0700 (PDT), bellda2005@gmail.com wrote: [Snipped by Lyons]> >Hi Rick, > >Most of what you said for IIR filters is also true for non-symmetric FIR filters. One place I have seen these occur is deriving them by windowing IIR impulse responses. > >I am interested in the OP describing their problem in the chance that the problem he has is really reducing differential delay between two filtering paths and not actual filter delay, which may change the problem. > >Do you have some e-mailable truth serum to get him to reveal the details? :) > >DirkHi Dirk, Ha ha. Good one. vishwajeet's original post was a bit strange. What he wrote was essentially, "I designed a filter. I am not happy with the filter's performance. Please tell me how to improve the performance of my filter." [-Rick-]






