Digital Allpass Filters for Crossover Phase Equalization

When two loudspeaker drivers are crossed over we typically want their on-axis acoustic outputs to sum in-phase.  For example the 4th-order Linkwitz-Riley (LR4) crossover is designed for this.  In practice, however, things rarely work out so well because there are potentially many sources of (often nonlinear) phase distortion, e.g. equalization filters, physical offset of the drivers, band-pass characteristic of the drivers, and acoustical interaction with the baffle.

Crossover phase alignment is often corrected by delaying the signal to one of the drivers. This typically aligns the drivers’ acoustic phases only up to zeroth-order, which is a bit rough.  It’s possible to do much better: one can design an allpass phase-equalization filter that gives accurate alignment throughout the crossover region.  My aim here is to briefly demonstrate the technique.

Example: Pluto 2.1 DSP

I measured the on-axis acoustic phase between woofer and tweeter on my dsp implementation of the Linkwitz Labs Pluto 2.1.  With the xover/eq in place but absent any phase/delay correction the measurement looks like this:

The black curve is the raw response; the blue curve is smoothed: this gives the target phase response of an ideal allpass filter which applied to the tweeter would put the drivers’ acoustical outputs in-phase throughout the crossover region.

For comparison I’ve shown the phase response of a 0.29ms delay, which puts the drivers exactly in-phase at the 1kHz crossover frequency (this is essentially what the Pluto ASP does).  The delay approximates the target response fairly well, but it still leaves a phase mis-alignment of 45° an octave to either side of 1kHz.  The main problem is that the uncorrected group delay between drivers is far from constant:The average group delay is -Δφ/Δω ≈ 0.25ms or about 9cm of acoustic offset, which is consistent with the physical offset between drivers.  However, the group delay varies a lot, so a simple (constant) delay can’t give accurate phase alignment.  [I still don’t know why the group delay varies so much: there’s nothing in the eq to cause this, so it must be the drivers.  Nor do I know for sure if the Pluto2.1+ASP would exhibit exactly the same acoustic phase responses.]

Designing a High-Order Allpass Filter

It is not difficult to design an IIR digital allpass filter that gives quite accurate phase alignment throughout the crossover region.  For example, for my Pluto implementation I’ve designed an 8th-order allpass that matches the target response above to within 3° across 3 octaves.  The difference between the target and actual responses is barely visible in the following graph:

With this 8th-order allpass in place I made another set of acoustical measurements just to be sure it works:

The acoustic outputs are now aligned within 5° across 3 octaves; the group delay between drivers is less than 0.05ms throughout this band.  On paper this looks pretty good!

The design procedure I used is mathematically technical and beyond the scope of this article; see references [1] and [2] for details.  One counter-intuitive but essential trick is to put an extra delay on the woofer: the additional group delay makes it possible to more accurately design the compensating filter that gets applied to the tweeter.  Both the woofer delay and allpass filter coefficients are optimized using a nonlinear Remez exchange algorithm, which runs in a few seconds on a computer.

The resulting optimized 8th-order filter can be factored as a cascade of four 2nd-order allpass sections with the following parameters:

f0 [Hz] Q
3218 3.433
2512 2.373
1300 1.429
1405 0.1268

This factoring makes it easy to implement the phase alignment as a cascade of digital biquads (or even as analog filters).  These filters get applied to the tweeter; the additional delay on the woofer is 0.567ms (25 samples at 44.1kHz).

Is the Difference Audible?

The answer depends on source material.  I did a careful, computer-administered ABX test on my Pluto 2.1 dsp, comparing phase alignment by a pure digital delay and by the 8th-order allpass shown above.  On pink noise I can identify X correctly 9 times out of 10.  The probability that I could do this well just by guessing is p≈0.01, so yes, I can audibly discriminate between the two phase alignment methods.  What I perceive is a subtle difference in timbre (whether due to the on- or off-axis response I can’t say).

However, I have yet to find any musical program material on which I can discriminate between the pure delay and the 8th-order allpass.  I sometimes think I hear a difference, but on an ABX test I haven’t done any better than random guessing.  In fact on program material I so far can’t even discriminate reliably between my 8th-order allpass and no phase correction at all (i.e. not even a delay on the tweeter).

Nevertheless, I’ll probably continue to use this method for crossover alignment, even though the difference is just marginally audible.  Because the computer does all the hard design work, it is no more difficult to measure/design an accurate high-order allpass than it is to do a coarse alignment with a pure delay.  Besides, digital allpass sections are computationally inexpensive: a 2nd-order allpass can be implemented with only 2 multiplications, as compared to 5 for a general biquad.

References

[1] M. Lang, “Optimal weighted phase equalization according to the L∞-norm”, Signal Processing 27, 1992, p.87-98.

[2] M. Lang and T. I. Laakso, “Simple and robust method for the design of allpass filters using least-squares phase error criterion”, IEEE Transactions on Circuits and Systems II, 1994, p.40-48.

Notes on Measurement Technique

All the acoustical measurements here were done outdoors and un-gated, with the drivers elevated 2m off the ground: as close as I can come to anechoic conditions.  (Although an in-room measurement with impulse response gating at 5ms gives nearly identical results and is less prone to noise.)  Thanks to some wind the signal gets swamped by noise beyond about 1.5 octaves to either side of the crossover frequency.  The Pluto crossover is LR4, so this means I’m tracking each driver down to about -36dB … which gives a pragmatic definition of the crossover region.

I measured a separate phase response for each driver, using a 2-channel MLS technique in which a click track is recorded on the secondary channel.  The click track is used to time-align (within 1 sample) the recorded MLS responses before processing.  Without this alignment the variability in computer latency (on the order of 20ms) makes it impossible to accurately measure relative phase.

I measured at a variety of microphone positions, from 20cm to 50cm on-axis, none of which changed the relative phase measurements by more than 5°.

One thought on “Digital Allpass Filters for Crossover Phase Equalization

  1. I am planning to implement your techniques on a CBT speaker. You might find the following link of interest –
    http://www.parts-express.com/audio-artistry-cbt36k-line-array-speaker-pair-kit–301-980
    The above link has links to a detailed manual and presentation of the theory of the cbt speaker.
    I intend to do all processing on my HTPC computer with a Xonar D2 sound card (the motherboad and cpu are way overkill for a HTPC computer so DSP should be no problem).
    Also for my video purposes the overall filter delay is not a problem since Kodi (my multimedia sever) can delay the video stream so it is synced to the audio.

Leave a Reply to Alan Bromborsky Cancel reply

Your email address will not be published. Required fields are marked *