That's a good point. When discussing "pure" signal processing, one is generally looking at an isolated component and studying its particular response. In an audio system, pure delays abound, due simply to the inherent distances between elements. That, in itself, justifies removal of those pure delays. Again, as long as everybody understands the basic assumptions, there is no problem.... 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.
Maybe, but if the original filter had a delay of 10ms, would the delays of the compensated ones scale proportionally ?Assuming sampling somewhere around 44 kHz, that's less than 1 millisecond.
Last edited:
I had casually set the HPF specification roughly by hand instead of setting it to the LPF delay @ 500Hz. It could be better, rather easily.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.
I was tallking about the scientific group delay not the layman kind. Latency is not immediately available from the transfer as it is hardware dependent. Latency is more like the period from when the first sample enters to when the first sample leaves the equipment.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.)
I use 500Hz just so that I do not have to wait for a long time every time I run my script. And to me the concept is more important than the exact numbers and filters are scalable anyway.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 !!
Generally (but not necessarily), the objective is to equalize broadband delay to the peak of the group delay in the original filter. This is independent of the sampling rate.... if the original filter had a delay of 10ms, would the delays of the compensated ones scale proportionally ?
By the way, I don't recall seeing any mention of "phase delay". Phase delay is -phi/omega, units of (radians per radian/second) = seconds. With a pure delay, phase delay is the (negative of the) slope of the phase curve, and in a linear phase system, group delay and phase delay are equal.
Yes, and it is easily verified by equating both:
which describes a linear phase filter. The value of K is negative for causality.
which describes a linear phase filter. The value of K is negative for causality.
The forum doesn't but one could type equations into a picture and copy here using https://latexeditor.lagrida.com/
@mark100 here's a 100Hz version (16384 pts) of the same idea. The GD for the summed output is 6ms (vs 4.5ms for the LPF). It maybe possible to reduce this to ~5ms but I haven't tried to do so because the difference is small.
LPF (blue): LR4 100Hz (IIR) followed by 2 x APF (IIR) at 380Hz Q = 1.9.
HPF (red) : LR4 100Hz linear phase FIR with matched delay of ~ 6ms to match LPF at 100Hz.
Summed output (black), impulse attached for interested parties, pls rename to *.wav after downloading.
LPF (blue): LR4 100Hz (IIR) followed by 2 x APF (IIR) at 380Hz Q = 1.9.
HPF (red) : LR4 100Hz linear phase FIR with matched delay of ~ 6ms to match LPF at 100Hz.
Summed output (black), impulse attached for interested parties, pls rename to *.wav after downloading.
Attachments
Thanks for showing a lower frequency example, at 100Hz.
That looks very good to me, flat mag and phase, with a respectable low constant delay of about 5.9ms. Nice work.
Here's your file loaded as a measurement, into my measurement & sim software.
Here's my FIR linear-phase version of the same 100Hz LR24
Sides summed together, with a constant delay / latency of about 4.25ms
Here's both sides:
FWIW, It takes only 3-4 minutes to generate the FIR complementary lin-phase low-pass and high-pass set, at any frequency at any order.
So far, It's really hard to see why I'd want to do anything else.
For sub EQ work, where FIR might not have the needed frequency resolution, I simply use IIR min-phase EQ's to level magnitude as preconditioning to the FIR xover.
For any driver section above the sub, FIR's frequency resolution has been more than sufficient to embed min-phase flattening EQs, along with linear phase xovers.
Since both xover and leveling EQ's are generated automatically via acoustic target matching, workflow is incredibly quick, and very accurate.
For fun the other day, I timed setting up a 4-way from scratch....including taking raw measurements. Had to set polarities, levels, delays, and build FIR file for all four channels. Measure each channels' processed acoustic output. Measure summed 4-way acoustic output. Entire process took less than 1/2 hour.
That done, I could change xover frequencies and/or orders in about 5-10 minutes, depending on how many xovers were being altered.
I just can't see making xovers any harder than that...
That looks very good to me, flat mag and phase, with a respectable low constant delay of about 5.9ms. Nice work.
Here's your file loaded as a measurement, into my measurement & sim software.
Here's my FIR linear-phase version of the same 100Hz LR24
Sides summed together, with a constant delay / latency of about 4.25ms
Here's both sides:
FWIW, It takes only 3-4 minutes to generate the FIR complementary lin-phase low-pass and high-pass set, at any frequency at any order.
So far, It's really hard to see why I'd want to do anything else.
For sub EQ work, where FIR might not have the needed frequency resolution, I simply use IIR min-phase EQ's to level magnitude as preconditioning to the FIR xover.
For any driver section above the sub, FIR's frequency resolution has been more than sufficient to embed min-phase flattening EQs, along with linear phase xovers.
Since both xover and leveling EQ's are generated automatically via acoustic target matching, workflow is incredibly quick, and very accurate.
For fun the other day, I timed setting up a 4-way from scratch....including taking raw measurements. Had to set polarities, levels, delays, and build FIR file for all four channels. Measure each channels' processed acoustic output. Measure summed 4-way acoustic output. Entire process took less than 1/2 hour.
That done, I could change xover frequencies and/or orders in about 5-10 minutes, depending on how many xovers were being altered.
I just can't see making xovers any harder than that...
Dear mark100, as I said above, you could copy any FIR filter I show with a similar filter with a similar impulse but my examples above use only IIR for the lower pass, avoiding a long FIR filter and related issues. In other words, you're just making an FIR copy of an IIR-based crossover.
There're people on this forum who use inexpensive / old DSPs that restrict the FIR length to a certain no. of taps. In such cases, it is possible to use an IIR+APF for the LPF, and thereby redirect the limited / valuable FIR resources towards where they could be put to proper use (HPF).
There're people on this forum who use inexpensive / old DSPs that restrict the FIR length to a certain no. of taps. In such cases, it is possible to use an IIR+APF for the LPF, and thereby redirect the limited / valuable FIR resources towards where they could be put to proper use (HPF).
For those who don't have DSPs with FIR capability, here's a simple matched delay subtractive (MDS) filter based on the same IIR+APF low pass, as mentioned earlier by phase_accurate. The exact MDS delay value used here is 5.4ms. This value gives a somewhat 4th order transition upto 20Hz, also giving better LF suppression.
Note that this is an IIR only crossover though it is capable of linear phase and the computational delays are negligible.
Note that this is an IIR only crossover though it is capable of linear phase and the computational delays are negligible.
FIR resources need not be limited / valuable. Implementing FIR is not $ expensive at all.There're people on this forum who use inexpensive / old DSPs that restrict the FIR length to a certain no. of taps. In such cases, it is possible to use an IIR+APF for the LPF, and thereby redirect the limited / valuable FIR resources towards where they could be put to proper use (HPF).
Just requires some learning (and for sure, it's a lot less learning than working with IIR + APF, ime).
JRiver for example, running on anything (even a Raspi), easily allows tap counts far exceeding anything we've been discussing, or that anyone could ever use. (like > 100,000 taps per channel).
There are a number of other similar very low cost alternatives.
@newvirus2008 , forgive me, but I've only been following this thread in a cursory fashion. Can you elaborate on how you accomplished this? What was your MDS lowpass filter, and what was the allpass filter that you added? Does the allpass filter just extend the linear-phase portion of the lowpass, or does it do something else that escaped my attention?Note that this is an IIR only crossover though it is capable of linear phase and the computational delays are negligible.
D
Deleted member 375592
Did anyone try going "multi-rate" to shorten the FIR? Suppose... if you do 3-way with 250 & 2500Hz, you may do 2500 QMF first, then resample f<2500Hz as 1/6, filter 250Hz, and resample 6/1.
What do you think: would PR sub-band analysis-synthesis make any sense?
Is it worth trying block-based fast convolution?
What do you think: would PR sub-band analysis-synthesis make any sense?
Is it worth trying block-based fast convolution?
@gberchin Yes, just that, nothing special. the allpass occurs only within the lowpass section to linearise the phase to about 5x the cutoff freq of 100Hz. The HPF is then obtained by MDS operation from a delay of 5.4ms. The following gives an idea....
Code:
[G1,F] = grpdelay(u,1,N,Fs); % LPF DC group delay
G1 = G1/Fs;
GD = G1(1);
target_phase = -1.2*2*pi*GD*F; % 1.2x gives the pseudo 4th order slope
HPF = exp(i*target_phase) - LPF; % MDS HPF
.......
Last edited:
That looks very good to me, flat mag and phase, with a respectable low constant delay of about 5.9ms. Nice work.
Here's my FIR linear-phase version of the same 100Hz LR24
Sides summed together, with a constant delay / latency of about 4.25ms
A latency of 4,25 is not an issue, but if it gets more than 15-20ms it probably will, at least for live performances. If I'd like to compensate the GD of a horn (etc) subwoofer, a steep low cut at 35-40Hz (ie your LR24) would result in which latency?
@newvirus2008 , very interesting. You started with a LR4 IIR filter, linearized its phase in and somewhat above its passband, and got nearly a 4th-order derived highpass slope. Thank you; that is good information. I may have to expand section 2.2.1.6 of my MDS paper.
I've considered it, but haven't tried it. My reservations about it stem from the sheer amount of filtering that must be done. In my experience, at least when it comes to audio, less filtering is better filtering.Did anyone try going "multi-rate" to shorten the FIR?
Subtractive delay crossovers. Nothing new.
2. S. P. Lipshitz and J. Vanderkooy, “A Family of Linear-Phase Crossover Networks of High Slope Derived by Time Delay”, J. Audio Eng. Soc. vol. 31, no.1/2, p 2, Jan. 1983.
http://web.archive.org/web/20040620131405/http://www.pvconsultants.com/audio/targetgen/tpsd.htm
2. S. P. Lipshitz and J. Vanderkooy, “A Family of Linear-Phase Crossover Networks of High Slope Derived by Time Delay”, J. Audio Eng. Soc. vol. 31, no.1/2, p 2, Jan. 1983.
http://web.archive.org/web/20040620131405/http://www.pvconsultants.com/audio/targetgen/tpsd.htm
- Home
- Loudspeakers
- Multi-Way
- Removing Loudspeaker Group Delay using reverse-IIR filtering