Removing Loudspeaker Group Delay using reverse-IIR filtering

newvirus, if you can show a hybrid/mixed processing strategy that significantly reduces latency vs a straight linear-phase crossover, I'm all ears and ready to learn.....
1727539424280.png


The delay of the summed output (black) is similar to that of the IIR filter. The HPF is 512 points long.The blue phase is not visible as the black (sum) lies on top of it. The LPF is LR4 (IIR) followed by 2 x APF (fo=1.9kHz, Q=1.9) for phase linearisation.
 
The delay of the summed output (black) is similar to that of the IIR filter. The HPF is 512 points long.The blue phase is not visible as the black (sum) lies on top of it. The LPF is LR4 (IIR) followed by 2 x APF (fo=1.9kHz, Q=1.9) for phase linearisation.
Please provide the exact constant delay of the summed filter.
And I'll ask again, using a frequency like 100Hz or below, where meaningful differences in constant delay could be more readily assessed..
 
No sense for me in exploring this....

You're not looking to explore anything, you have just refused to learn after having promised it. Learning requires some work from your side to 'earn' your knowledge instead of having it gifted to you.

... if you have it.
Now that's judgemental, why would I not have it when I've already showed it ? Is it because you couldn't follow the graphs above ?

Please provide the exact constant delay of the summed filter.
Like I said above, the delay of the summed filter is the same as that of the IIR LP filter which is a 500Hz fourth order Linkwitz Riley. Now, why not find out the passband group delay of this kind of filter yourselves, is it so hard ?

I'm all ears and ready to learn.
 
Last edited:
Group delay is defined as the slope of the phase plot, or d(phi) / dw., which reduces to simply phi / w for a linear phase filter.

Now, from the phase plot in #141, the phase at 14kHz or 87.96 k radians/sec is 5000 degrees or 87.266 radians, that gives a delay of:

87.266 radians / 87.96k radians/sec = 992 microseconds or just under a millisecond for convenience.

Using WinISD (or similar), one can easily find out the IIR delay as being comparable at 0.9ms (below).

1727586971092.png


BONUS: Since the 500Hz filter's delay is 0.9ms, the delay of the 100Hz filter is easily estimated as 0.9ms * 500/100 = 4.5ms.

1727587267482.png


All the best !! @mark100
 
... please don't direct the conversation towards me. Pls make a case that Greg, KSTR, Charlie...all of whom have stronger math and processing skills than I do...can confirm you made superior latency mouse trap. Oh, and how about using a 100Hz or lower xover point.
If you can (which I don't believe is possible)...I thank you. And will learn how to implement it.

I am attaching the impulse response (8192 points) for the summed output for anyone who is interested. Please change the extension to *.wav after downloading. The group delay for this filter is 47-48 samples at 48kHz, which is around 1ms only. The magnitude error is +/- 1dB.

As mentioned by @mark100, I invite the 'mathematically enabled' to give their opinions @gberchin, @KSTR, @CharlieLaub and anyone else who understands signal processing to give their opinions.

@Moderation Team , kindly allow *.wav files as attachments.Thanks.

1727691396612.png
 

Attachments

Removing Loudspeaker Group Delay using reverse-IIR filtering

You cannot remove the group delay of loudspeakers (or filters / anything else) and this is a fact. And, 'flat phase' is just poor terminology that nobody from the formally educated world recognises. Please do not start threads that ask for impossible things to be accomplished.

Reverse IIR filtering is a beautiful concept where everything except magnitude response is wound back to 'literally nothing'. Apart from offline situations where the entire input signal is known beforehand, the practical implementations, in spite of the special (and often complicated) convolution algorithms used, do not give perfect output due to causality.

However, it is possible to 'compensate' an entire system to match the DC group delay using a carefully designed FIR filter. It maybe possible to use numerous (not inumerable) IIR filters the same way, but the design is more tedious unless an automated method is developed (which I think doesn't exist yet).
 
Last edited:
You cannot remove the group delay of loudspeakers (or filters / anything else) and this is a fact. And, 'flat phase' is just poor terminology that nobody from the formally educated world recognises. Please do not start threads that ask for impossible things to be accomplished.
I think it's pretty clear that the frequency-dependent excess group delay is what we are talking about here (mostly**), and in order to remove it we trade it for a constant group delay, a simple time delay. This time delay must obviously be larger than the largest peak of the group delay, otherwise we're leaving the causal world.
And flat phase is equally clear, it's immediately obvious that this refers to zero excess phase (mostly**).
In general, when we talk about phase and group delay any constant group delay (== constant negative slope of phase vs. frequency) is usually factored out as it is just a time delay.
I cannot imagine anyone having any issues with that nomenclature, except for some egg-headed sticklers for principles ;-)

**) only when we talk about unrolling the phase of the system highpass we basically do the opposite. We introduce excess phase to compensate the natural phase as given by the minimum-phase behavior.
 
  • Like
Reactions: mdsimon2 and Juhazi

Attachments

  • Like
Reactions: newvirus2008
In general, when we talk about phase and group delay any constant group delay (== constant negative slope of phase vs. frequency) is usually factored out as it is just a time delay.
I cannot imagine anyone having any issues with that nomenclature, except for some egg-headed sticklers for principles ;-)
Yes.

Imagine the near meaningless at looking at acoustical or electrical phase traces, without constant delay removed.
And for audio, I'd say 'group delay' is overwhelmingly presumed to be frequency dependent, with constant delay removed.
 
I am attaching the impulse response (8192 points) for the summed output for anyone who is interested. Please change the extension to *.wav after downloading. The group delay for this filter is 47-48 samples at 48kHz, which is around 1ms only. The magnitude error is +/- 1dB.

I made a comparison, your 500Hz LR24 hybrid crossover,
vs one I put together with FIR (with the same 1ms constant delay)


Your summed trace, first.
1727827354369.png



My Linear phase FIR summed:
1727827471321.png



FIR sections:
1727827608007.png
 
This issue (removing constant delay from group delay computation) comes up every so often. Every signal processing text that I have, that mentions group delay at all, defines it strictly as -d(phi)/d(omega), with no mention of removing the constant delay part. On the other hand, that constant delay is really just a nuisance quantity in the analysis. I'm in favor of either definition, as long as all assumptions are clearly stated.
 
Last edited:
  • Like
Reactions: newvirus2008
And flat phase is equally clear, it's immediately obvious that this refers to zero excess phase (mostly**).

The complex plane is a two-dimensional vector space and therefore it should be possible to define any complex number on that plane using only two quantities : real / imaginary (rectangular form) and gain / phase (alternative polar form). A third quantity (delay) is just mathematically unnecessary !!!

I made a comparison ...1ms..
The small variations in phase around the cutoff frequency are easily corrected by precise adjustments to the time alignment (delay of HPF).

Since I'm simulating an IIR filter, I'm having to do it as an FIR filter (which I shared) and you got yourselves an FIR filter with the impulse peak(s) around more or less the same place and therefore similar group delay. However, latency is a different thing as I already mentioned before.

Besides, there is also a frequency granularity advantage for a (properly implemented) IIR filter when compared to a 'limited-point' FIR filter at lower frequencies. The reciprocal relation between time and frequency makes the FIR length (no. of coefficients required to operate acceptably) rise steeply as frequency reduces. In plain language, one might simply say how the impulse tail becomes more and more important and how a well implemented IIR filter has a very good tail etc..
 
Last edited:
See attached. (I'd be happy to credit the author, if I knew who it was.)
This appears to be very different from my methods that simply extended the constancy of the GD to few times the cutoff frequency (typically 5x-6x). However, from Pg 3 of the attached file, the uncompensated curve (chebyshev 13) is only 5 samples late with the others (allpass 10s) being around 7 times as much !!

That's a large delay that some might find unacceptable !!
 
This issue (removing constant delay from group delay computation) comes up every so often. Every signal processing text that I have, that mentions group delay at all, defines it strictly as -d(phi)/d(omega), with no mention of removing the constant delay part. On the other hand, that constant delay is really just a nuisance quantity in the analysis. I'm in favor of either definition, as long as all assumptions are clearly stated.

Yes for sure, either definition works as long as all assumptions are clearly stated.

What I've noticed over the years, is that about the only times i see constant delay considered part of group delay, is when signal processing folks are discussing it. When it's audio folks, group delay is nearly universally equated with frequency dependent delay only. I guess this is probably true because the most common measurement in audio is a microphone's acoustic transfer function...where phase is essentially unreadable without constant delay removed.

This makes me feel that the default presumption in audio about group delay, is constant delay is excluded from group delay.
My guess if we were to survey the last 1000 transfer function measurements posted in multi-way, for either acoustic or electric measurements, 99% of them would be with constant delay attempted removal as accurately as possible.
I think the signal processing folks need to recognize that, and proffer their inclusive constant delay definition when using it in discussions concerning processing techniques.

Also find it a bit ironic that these two textbook components of group delay, frequency dependent, and non-frequency dependent, reside in two different domains.
With frequency dependent found in the frequency domain (along with phase), and constant delay found in the time domain (time to impulse rise or peak).

Seems to me constant delay is the only true form of time domain delay.
And that the commonly accepted idea that "time" differences in flat group delay regions can be used as a constant time substitute, is fully bogus.
(regions like the low-pass and high high-pass side of a crossover, where GD has flatten out)
 
The small variations in phase around the cutoff frequency are easily corrected by precise adjustments to the time alignment (delay of HPF).
If the hpf and lpf are fully complementary, I would expect a 96kHz sampling rate to rather easily provide sufficient time alignment precision to eliminate the mag and phase ripple around 500Hz xover.

Since I'm simulating an IIR filter, I'm having to do it as an FIR filter (which I shared) and you got yourselves an FIR filter with the impulse peak(s) around more or less the same place and therefore similar group delay. However, latency is a different thing as I already mentioned before.
Do you have a processor you can load your sims into? The acid test for usable designs?

And yes, latency or rather constant time, is totally different from group delay imo. (my rational given in immediately previous post to gberchin)

The 1ms delay in impulse peaks in both our techniques, is constant time latency, not group delay.
Group delay is similar in our two techniques, simply because both have flattened 🙂! phase to zero degrees (after removing constant delay.)

Besides, there is also a frequency granularity advantage for a (properly implemented) IIR filter when compared to a 'limited-point' FIR filter at lower frequencies. The reciprocal relation between time and frequency makes the FIR length (no. of coefficients required to operate acceptably) rise steeply as frequency reduces. In plain language, one might simply say how the impulse tail becomes more and more important and how a well implemented IIR filter has a very good tail etc..
Sure, FIR filters have a well known inherent frequency resolution based on tap count and sampling rate. For the purpose of a simple complementary xover where the FIR filter is handing a relatively low Q task, not much resolution is needed and is why on 48 taps at 4kHz worked for a relatively shallow LR24 @ 500Hz.
And is also why I keep asking everyone to choose a lower xover point, say 100Hz or below, and better a higher order too, to demonstrate their proposed technique. 500Hz and up, shallow slope is just too easy to achieve without significant latency.


IIR tail precision?? Cut the dang post-ringing tail off ! Go FIR !!
 
  • Like
Reactions: Speedysteve7