Let's say we have an audio signal sampled at 96 kHz, and we want to compare several bandpass filters to find the one with the lowest rectangular-envelope-propagation-delay (see graph below).

The band is interest is $[f_0-30\,\text{Hz}, f_0+30\,\text{Hz}]$, with $f_0 = 1000 \,\text{Hz}$, and we aim for an attenuation of, say $-50\,\text{dB}$ at $1300\,\text{Hz}$.

Is there a rule of thumb or a ready-to-use calculator (either as online website, or in Python) to find the best filter with the lowest propagation delay, for example in the case of a signal modulated by a rectangular envelope?

Of course I can run tests in Python, with many filters, and many variations of these parameters:

  • FIR filters (how many taps?)
  • Butterworth filters (which order, ...)
  • Elliptic, etc.

but it's a bit long, and a bit random.

Example: here with a Butterworth of order 2, we have a delay of about ~ 25ms for the propagation of the envelope (the x-axis is in ms indeed).

enter image description here

PS: is this more or less close to group delay?

  • 2
    $\begingroup$ so your bandwidth is about 60 Hz and the apparent delay appears to be about 25 ms. how do you think those two quantities might be related? $\endgroup$ – robert bristow-johnson Sep 24 '18 at 0:56
  • 1
    $\begingroup$ group delay is a function of frequency (unless the filter is linear phase, then group delay is constant over all frequencies). but group delay evaluated at the resonant frequency (which i presume is also the frequency of the input sinusoid) is a number (in units of time). how might group delay evaluated at that frequency be related to the delay you see. (if you were to somehow double the group delay, what would happen to the envelope delay you measure?) $\endgroup$ – robert bristow-johnson Sep 24 '18 at 1:01
  • $\begingroup$ @robertbristow-johnson your bandwidth is about 60 Hz and the apparent delay appears to be about 25 ms. how do you think those two quantities might be related? I might see what you mean, but in fact there are many possible FIR of bandwidth [1000-30, 1000+30]: a FIR with 500 taps, a FIR with 5000 taps (with better attenuation outside the bandwidth), a FIR with 10k taps, etc. they all have a different signal propagation delay... so how to find the optimal given a required attenuation (-50dB at 1300Hz)? $\endgroup$ – g6kxjv1ozn Sep 24 '18 at 6:56
  • $\begingroup$ @robertbristow-johnson Would you have an idea? Thanks in advance! $\endgroup$ – g6kxjv1ozn Sep 24 '18 at 20:01
  • 1
    $\begingroup$ okay, first of all quantities like bandwidth and rise time (it's the rise time of a step response that you're really looking at) need to have consistent quantitative definition. then given that consistent definition you will find that the rise time and the bandwidth of a channel will multiply to a constant that is in the ballpark of 1. but if you double your bandwidth, you will find that your rise time will be halved. $\endgroup$ – robert bristow-johnson Sep 24 '18 at 21:01

For a linear phase FIR filter, the group delay will be about the same delay as what you have defined to be a rectengular envelope delay.

For a nonlinear phase IIR or FIR filter (like the Butterworth), the envelope delay is associated with the dominant time constant of its impulse respone $h[n]$.

Indeed what's happening in your plot is that the filter reaches its steady-state response, after the transients decay. And that would happen after a few time constants. For the relation between group delay of the filter and the time constant, it can be said roughly that, short transition bandwidths in the frequence response (sharp filter or narrow band filter with large time constants) yield more aggressive phase changes which also yields larger group delays at the passband frequencies.

A minimum-phase filter would yield the minimum delay (among the same frequency response magnitudes). A minimum-phase filter's impulse response has the fastest decay and begins more aggresively than the other filters; i.e., it's energy is concentrated at the very beginning of its impulse response samples.

  • $\begingroup$ Thank you for your answer. How to find this optimal filter (that has minimal phase/group delay) among Butterworth, Elliptic, FIR, which number of taps, etc.? $\endgroup$ – g6kxjv1ozn Sep 24 '18 at 6:34
  • $\begingroup$ Would you have more informations about how to find this minimum phase filter in this context. What kind of filter is it? $\endgroup$ – g6kxjv1ozn Sep 24 '18 at 20:01
  • $\begingroup$ A minimum phase filter has all its zeros and poles inside unit circle in Z-domain. So yu select among the candidates that yield the same frequency response magnitude. $\endgroup$ – Fat32 Sep 24 '18 at 20:15
  • $\begingroup$ I don't know such a tool... $\endgroup$ – Fat32 Sep 24 '18 at 20:26
  • $\begingroup$ I just tried that one but not sure it's a recommended one. $\endgroup$ – g6kxjv1ozn Sep 24 '18 at 20:29

I've just tried Analog Devices' FilterWizard. It helps to create a filter by giving its characteristics (passband, stopband, center frequency, etc.)

There's also a Step Response option which seems to be close to what I called "rectangular-envelope-propagation-delay".

enter image description here

  • $\begingroup$ ah! this answers my earlier question. it is a 4th-order Butterworth. so that is a 2nd-order LPF that is transformed to a BPF, which doubles the order. $\endgroup$ – robert bristow-johnson Sep 24 '18 at 21:11
  • 1
    $\begingroup$ you want step response of the envelope. i believe that ultimately, your BPF question will become a LPF question. $\endgroup$ – robert bristow-johnson Sep 24 '18 at 21:12
  • 1
    $\begingroup$ i believe, to really deal with your question honestly and rigorously, we need to talk about the basics of mapping a low-pass filter design to a band-pass filter. this is in the filter design canon. it's not hard conceptually, but takes time and equations. $\endgroup$ – robert bristow-johnson Sep 24 '18 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.