DSPRelated.com
Forums

How to calculate FIR HPF and LPF coefficients for loudspeaker corssover?

Started by Tony May 8, 2004
Hi,

It seems that progs like Matlab can generate FIRs that are optimized to various
criteria. But what I'd like to be able to do is to hook a small MCU to a DSP, so
the MCU accepts command inputs (eg via Midi) to select the crossover frequency.
From that spec, the MCU would calculate the FIR coefficients and load a suitable
program into the DSP. It's OK if this only works at specific crossover
frequencies (eg Fs/n? with the number of taps proportional to n?).

I expect that after setting the crossover frequency, the MCU will direct a
couple of short acoustic tests using an external microphone to set the relative
levels, and any delay that's needed (eg to a cone midrange driver when working
with a horn compression HF driver).

Is this at all feasible? Is it way too much of a compromise compared to a
"proper" optimized design? If not, where should I look to find suitable formulae
or design approaches?

TIA
Tony (remove the "_" to reply by email)
Hi Tony,
simlest formulas i know for FIR are
http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt
But rezults as i see in SoundForge aren't so good as wanted.

Cheers
Thanks - it's a good page, although it seems to be all on IIR filters, not FIR
as needed for crossovers.

On 10 May 2004 03:23:37 -0700, h3vic@yahoo.com (Vic) wrote:

>Hi Tony, >simlest formulas i know for FIR are >http://www.harmony-central.com/Computer/Programming/Audio-EQ-Cookbook.txt >But rezults as i see in SoundForge aren't so good as wanted. > >Cheers
Tony (remove the "_" to reply by email)
On Tue, 11 May 2004 14:38:36 +1000, Tony <tony_roe@tpg.com.au> wrote:

>Thanks - it's a good page, although it seems to be all on IIR filters, not FIR >as needed for crossovers.
The vast majority of crossovers use IIR filters (I'm including the continuous time ones in this). Why do you say FIR filters are needed for crossovers? Regards, Allan.
It's the old quest for linear phase - many audiophiles tolerate 1st order
crossovers on the basis that all the disadvantages are outweighed by their
linear phase. Others (like me) would tolerate the 360 degree phase rotation of a
4th order Linkwitz Riley crossover in return for all it's other advantages. But
in the digital realm, for the price of a hundred or so DSP cycles, FIR filters
meet both objectives with no obvious down side (I'm talking crossover
frequencies > 2.5kHz here - I expect the IIR methods would be quite adequate at
100Hz).

On Tue, 11 May 2004 15:30:02 +1000, Allan Herriman
<allan.herriman.hates.spam@ctam.com.au.invalid> wrote:

>On Tue, 11 May 2004 14:38:36 +1000, Tony <tony_roe@tpg.com.au> wrote: > >>Thanks - it's a good page, although it seems to be all on IIR filters, not FIR >>as needed for crossovers. > >The vast majority of crossovers use IIR filters (I'm including the >continuous time ones in this). > >Why do you say FIR filters are needed for crossovers? > >Regards, >Allan.
Tony (remove the "_" to reply by email)
Tony wrote:

> It's the old quest for linear phase - many audiophiles tolerate 1st order > crossovers on the basis that all the disadvantages are outweighed by their > linear phase. Others (like me) would tolerate the 360 degree phase rotation of a > 4th order Linkwitz Riley crossover in return for all it's other advantages. But > in the digital realm, for the price of a hundred or so DSP cycles, FIR filters > meet both objectives with no obvious down side (I'm talking crossover > frequencies > 2.5kHz here - I expect the IIR methods would be quite adequate at > 100Hz). > > On Tue, 11 May 2004 15:30:02 +1000, Allan Herriman > <allan.herriman.hates.spam@ctam.com.au.invalid> wrote: > > >>On Tue, 11 May 2004 14:38:36 +1000, Tony <tony_roe@tpg.com.au> wrote: >> >> >>>Thanks - it's a good page, although it seems to be all on IIR filters, not FIR >>>as needed for crossovers. >> >>The vast majority of crossovers use IIR filters (I'm including the >>continuous time ones in this). >> >>Why do you say FIR filters are needed for crossovers? >> >>Regards, >>Allan. > > > Tony (remove the "_" to reply by email)
It's only linear phase on paper. With real loudspeakers, you not only have the phase difference introduced by the speakers being in different places, but their different phase responses. Have you ever seen published loudspeaker phase measurements? I haven't. Jerry P.S. I love my co-axial Tannoys! -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Tue, 11 May 2004 10:32:02 -0400, Jerry Avins <jya@ieee.org> wrote:
>Tony wrote: > >> It's the old quest for linear phase - many audiophiles tolerate 1st order >> crossovers on the basis that all the disadvantages are outweighed by their >> linear phase. Others (like me) would tolerate the 360 degree phase rotation of a >> 4th order Linkwitz Riley crossover in return for all it's other advantages. But >> in the digital realm, for the price of a hundred or so DSP cycles, FIR filters >> meet both objectives with no obvious down side (I'm talking crossover >> frequencies > 2.5kHz here - I expect the IIR methods would be quite adequate at >> 100Hz). >> >> On Tue, 11 May 2004 15:30:02 +1000, Allan Herriman >> <allan.herriman.hates.spam@ctam.com.au.invalid> wrote: >> >>>On Tue, 11 May 2004 14:38:36 +1000, Tony <tony_roe@tpg.com.au> wrote: >>> >>>>Thanks - it's a good page, although it seems to be all on IIR filters, not FIR >>>>as needed for crossovers. >>> >>>The vast majority of crossovers use IIR filters (I'm including the >>>continuous time ones in this). >>> >>>Why do you say FIR filters are needed for crossovers? >>> >>>Regards, >>>Allan. >> >> Tony (remove the "_" to reply by email) > >It's only linear phase on paper. With real loudspeakers, you not only >have the phase difference introduced by the speakers being in different >places, but their different phase responses. Have you ever seen >published loudspeaker phase measurements? I haven't. > >Jerry > >P.S. I love my co-axial Tannoys!
I'd love them too if I had them? Yes, a single point source really is a necessary part of a really good crossover. But we digress - With non-coaxial drivers, the best anyone can do is to mount the drivers as close as possible, possibly in M-T-M configuration. That done, the "sweet spot" is at its widest if the drivers are all in phase with each other, so the crossover itself needs to produce outputs with identical phase (either LR, or, better yet, FIR) and all residual time offsets need to be canceled (an explicit requirement of all phase-aware crossovers incl L-R - trivial in a DSP). The LF driver's top end will no doubt be accompanied by some serious phase lag, but for a good smooth driver this should not be too far from the effect of an additional time delay. The HF driver's phase response shouldn't be a problem as it needs to be crossed over well above its horn's cutoff frequency. But in any case, final relative delay measurement would be conducted on the complete system, so the hope is that driver phase response would be mostly taken up in the delay setting and thus eliminated from the equation. And even if the final phase isn't completely linear, it will still be at least one complete 360 degree rotation better than a L-R crossover, which in turn would seem to be better than any other option. Although there are many reasons why I can't achieve perfection, I believe there are also good reasons to try to come closer. If I had your Tannoys AND an FIR crossover, I believe I'd be yet another step closer. Tony (remove the "_" to reply by email)
Tony wrote:

> On Tue, 11 May 2004 10:32:02 -0400, Jerry Avins <jya@ieee.org> wrote:
...
>>P.S. I love my co-axial Tannoys! > > > I'd love them too if I had them? Yes, a single point source really is a > necessary part of a really good crossover. But we digress - With non-coaxial > drivers, the best anyone can do is to mount the drivers as close as possible, > possibly in M-T-M configuration. That done, the "sweet spot" is at its widest if > the drivers are all in phase with each other, so the crossover itself needs to > produce outputs with identical phase (either LR, or, better yet, FIR) and all > residual time offsets need to be canceled (an explicit requirement of all > phase-aware crossovers incl L-R - trivial in a DSP). The LF driver's top end > will no doubt be accompanied by some serious phase lag, but for a good smooth > driver this should not be too far from the effect of an additional time delay. > The HF driver's phase response shouldn't be a problem as it needs to be crossed > over well above its horn's cutoff frequency. But in any case, final relative > delay measurement would be conducted on the complete system, so the hope is that > driver phase response would be mostly taken up in the delay setting and thus > eliminated from the equation. And even if the final phase isn't completely > linear, it will still be at least one complete 360 degree rotation better than a > L-R crossover, which in turn would seem to be better than any other option. > Although there are many reasons why I can't achieve perfection, I believe there > are also good reasons to try to come closer. If I had your Tannoys AND an FIR > crossover, I believe I'd be yet another step closer.
There's a lot of fuzzy thinking about crossovers. I'm told that the crossover in those 15" tannoys is 90 degrees out of phase at the crossover frequency, just enough to compensate for the distance that the high-frequency horn driver is behind the woofer cone, and the actual crossover frequency is chosen to make that possible. (For those who don't know the design: the woofer cone is an exponential flare that is a continuation of the high- and upper-midrange horn. The pole piece is bored to be the start of that horn, and there two magnetic gaps. The rear is for the horn driver, the front, the woofer. The back of the pole piece supports the phase plug. There's a lot of magnet to push flux across both gaps.) Paul Klipsch mounted his midrange horn on top of the woofer cabinet, and the path length from the midrange horn driver to its mouth is a lot shorter than the path from the woofer to the mouth of bass horn. A zero-phase-shift crossover would make a peak or a hole in the response where there is significant sound from both drivers. The tweeter horn is often in the mouth of the midrange horn, also out of phase at its crossover frequency if the same signal is fed to both. The crossover can't be designed in isolation. It's part of the driver/cabinet/crossover system. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
On Tue, 11 May 2004 22:16:36 -0400, Jerry Avins <jya@ieee.org> wrote:

>Tony wrote: > >> On Tue, 11 May 2004 10:32:02 -0400, Jerry Avins <jya@ieee.org> wrote: > > ... > >>>P.S. I love my co-axial Tannoys! >> >> >> I'd love them too if I had them? Yes, a single point source really is a >> necessary part of a really good crossover. But we digress - With non-coaxial >> drivers, the best anyone can do is to mount the drivers as close as possible, >> possibly in M-T-M configuration. That done, the "sweet spot" is at its widest if >> the drivers are all in phase with each other, so the crossover itself needs to >> produce outputs with identical phase (either LR, or, better yet, FIR) and all >> residual time offsets need to be canceled (an explicit requirement of all >> phase-aware crossovers incl L-R - trivial in a DSP). The LF driver's top end >> will no doubt be accompanied by some serious phase lag, but for a good smooth >> driver this should not be too far from the effect of an additional time delay. >> The HF driver's phase response shouldn't be a problem as it needs to be crossed >> over well above its horn's cutoff frequency. But in any case, final relative >> delay measurement would be conducted on the complete system, so the hope is that >> driver phase response would be mostly taken up in the delay setting and thus >> eliminated from the equation. And even if the final phase isn't completely >> linear, it will still be at least one complete 360 degree rotation better than a >> L-R crossover, which in turn would seem to be better than any other option. >> Although there are many reasons why I can't achieve perfection, I believe there >> are also good reasons to try to come closer. If I had your Tannoys AND an FIR >> crossover, I believe I'd be yet another step closer. > >There's a lot of fuzzy thinking about crossovers. I'm told that the >crossover in those 15" tannoys is 90 degrees out of phase at the >crossover frequency, just enough to compensate for the distance that the >high-frequency horn driver is behind the woofer cone, and the actual >crossover frequency is chosen to make that possible. (For those who >don't know the design: the woofer cone is an exponential flare that is a >continuation of the high- and upper-midrange horn. The pole piece is >bored to be the start of that horn, and there two magnetic gaps. The >rear is for the horn driver, the front, the woofer. The back of the pole >piece supports the phase plug. There's a lot of magnet to push flux >across both gaps.) > >Paul Klipsch mounted his midrange horn on top of the woofer cabinet, and >the path length from the midrange horn driver to its mouth is a lot >shorter than the path from the woofer to the mouth of bass horn. A >zero-phase-shift crossover would make a peak or a hole in the response >where there is significant sound from both drivers. The tweeter horn is >often in the mouth of the midrange horn, also out of phase at its >crossover frequency if the same signal is fed to both. > >The crossover can't be designed in isolation. It's part of the >driver/cabinet/crossover system. > >Jerry
Older crossovers often worked with 90 degree ACTUAL phase difference, (and hence -3dB from each chain). But that method tends to skew the sweet spot and add coloration, so more recent GOOD analog crossovers aim for an actual acoustic phase difference of near zero (as apparently does the Tannoy). This means crossing over at -6dB from each chain (all other things being equal), and a much larger sweet spot for non-co-incident drivers (of course the Tannoys will never have a sweet spot problem). That said, no matter how well it is optimized, even though an analog crossover may aim to compensate exactly for path lengths, it can only do that at one frequency. While an FIR crossover + delay is still not perfect, it should be able to keep the phases much closer over a much wider frequency range than an analog crossover, and at the same time increase the transition slopes to reduce the critical band. So I still believe that your Tannoys COULD sound even better with a good FIR+delay crossover, although I concede that they probably already sound better that what I will be able to get from the FIR+delay with conventional drivers. Further investigation seems to indicate that for a 2kHz crossover with Fs=48k/s, each FIR needs around 200 taps (ie 800 taps total for stereo), but that's still within the system's capability. Also, the complexity of optimizing the performance may well be beyond the capabilities of the MCU I had earmarked to do the calcs, so I may have to abandon my earlier intentions in favor of PC-based calcs. Tony (remove the "_" to reply by email)
Tony wrote:

   ...

> Further investigation seems to indicate that for a 2kHz crossover with Fs=48k/s, > each FIR needs around 200 taps (ie 800 taps total for stereo), but that's still > within the system's capability. Also, the complexity of optimizing the > performance may well be beyond the capabilities of the MCU I had earmarked to do > the calcs, so I may have to abandon my earlier intentions in favor of PC-based > calcs. > > Tony (remove the "_" to reply by email)
I guess we agree that there's more to crossovers than meets the casual eye (that includes mine), and as long as we make no easy but invalid assumptions, we won't gp too far wrong. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;