3
$\begingroup$

I was curious about crossover filter design, so I did some reading on Linkwitz-Riley filters. Seems to me that the general idea is that if you add HP and LP filters and they are properly designed, you get an all-pass filter, which made sense on its face. However, I cannot seem to work this out mathematically. Using an LR 2, my understanding is that the filter transfer functions are simple biquads with a Q of 0.5.

$H_{LP}\left ( s \right )=\frac{\omega _{0}^{2}}{\omega _{0}^{2} + \frac{\omega _{0}}{Q}s + s^{2}} $

$H_{HP}\left ( s \right )=\frac{s^{2}}{\omega _{0}^{2} + \frac{\omega _{0}}{Q}s + s^{2}} $

And if they're summed you'd get:

$H_{LP+HP}\left ( s \right )=\frac{\omega _{0}^{2}+s^{2}}{\omega _{0}^{2} + \frac{\omega _{0}}{Q}s + s^{2}} $

Which is not an all pass filter unless Q is infinite. Am I totally missing something here?

$\endgroup$
2
  • $\begingroup$ Where did you get those transfer functions? They are probably not the ones used in L-R. $\endgroup$
    – Fat32
    Feb 24, 2021 at 17:32
  • 1
    $\begingroup$ @Fat32 linkwitzlab.com/filters.htm. Here for one. These are generalized second order low-pass and high-pass transfer functions. An LR2 filter is the product of two first order Butterworth filters, which would be equivalent to this if Q = 0.5. If my definition is wrong, I'd love to know. $\endgroup$
    – Dan Szabo
    Feb 24, 2021 at 17:42

3 Answers 3

4
$\begingroup$

Just adding to the answer. The sign for recombining L/R filter alternates, so it's '-' for second order '+' for 4th order and so forth.

The algebra is isn't all that pleasant so I will only go through the 2nd order. A second order L/R lowpass is simply the cascade of two first order Butterworth lowpass. The first order butterworths are $$L = \frac{1}{1+jx}, H = \frac{jx}{1+jx}$$ where x is the normalized cutoff frequency $x = \omega/\omega_0$

That makes the difference of the L/R filters $$H = L^2-H^2 = \frac{1^2}{(1+jx)^2} - \frac{(jx)^2}{(1+jx)^2} = \frac{1+x^2}{(1+jx)^2}$$

The numerator is real, so we just have to proof that the magnitude of the denominator is the same.

$$|(1+jx)^2| = |(1+jx)|^2 = (1+jx) \cdot (1-jx) = 1 + jx =ix + x^2 = 1+x^2$$

which indeed equals the numerator.

Another interesting class of "recombining to allpass" are odd order Butterworth filters. Here the lowpass and the highpass are 90 degrees out of phase so both the sum AND the difference of the filters will be create an allpass, although one has significantly more group delay than the other and the "optimum" choice of the sign also alternates with order.

Odd order Butterworth also have only -3dB of gain at the crossover whereas L/R have -6dB.

$\endgroup$
2
  • $\begingroup$ Thanks for the short cut; I've expanded it earlier and made a subtle mistake then ;-) $\endgroup$
    – Fat32
    Feb 24, 2021 at 19:21
  • $\begingroup$ Well that’ll save me some time. Thanks! $\endgroup$
    – Dan Szabo
    Feb 24, 2021 at 20:18
3
$\begingroup$

I would like to add to the previous answers that the difference between a second-order highpass and a second-order lowpass filter is generally NOT an allpass filter. The resulting transfer function

$$H(s)=\frac{s^2-\omega_0^2}{s^2+\frac{\omega_0}{Q}s+\omega_0^2}\tag{1}$$

has two zeros at $s_0=\pm\omega_0$ and two poles which are either real-valued (for $Q\le\frac12)$ or a complex-conjugate pair ($Q>\frac12$).

The only case for which the transfer function $(1)$ is an allpass filter is the special case $Q=\frac12$, in which case there is a double pole at $s_{\infty}=-\omega_0$. Consequently, there is a pole-zero cancellation in $(1)$, and the resulting transfer function becomes a first order allpass filter:

$$\begin{align}H(s)&=\frac{s^2-\omega_0^2}{s^2+2\omega_0s+\omega_0^2}\\&=\frac{(s-\omega_0)(s+\omega_0)}{(s+\omega_0)^2}=\frac{s-\omega_0}{s+\omega_0}\tag{2}\end{align}$$

In all other cases ($Q\neq\frac12$), the second-order transfer function $(1)$ is not an allpass filter.

$\endgroup$
1
  • 1
    $\begingroup$ Good point. It was maybe loosely implied but is worth an explicit mention. Thanks! $\endgroup$
    – Dan Szabo
    Feb 25, 2021 at 14:29
2
$\begingroup$

D'oh. This turned out to be pretty obvious, and I should have gotten it from reading more closely. I would have deleted this out of shame, but instead will share the correction in hopes it saves someone else the same headache. The controlling equations for the LR2 high and low pass transfer functions are correct, but one of the signals needs to be inverted for it to be an Allpass filter. As per my research, this can either be done actively using an inverter circuit, or by flipping the polarity on the driver. The correct 'summing' of the two LR2 filters is the difference of the two:

$H_{LP-HP}\left ( s \right )=\frac{\omega _{0}^{2}-s^{2}}{\omega _{0}^{2} + \frac{\omega _{0}}{Q}s + s^{2}} $

Which is in fact an Allpass filter.

$\endgroup$
5
  • 1
    $\begingroup$ Indeed I could not also see how their sum makes unity ? However the equations 33-36 in the link indicates that the magnitude of the sum should be unity... Yet my algebra still does not convince me that even the subtracted transfer function has unity gain? May be you could add a derivation to show that its magnitude is unity ? $\endgroup$
    – Fat32
    Feb 24, 2021 at 18:47
  • 1
    $\begingroup$ @Fat32 Can do this evening. I checked it by plotting it, which caught me off gaurd. That isn't an Allpass I've ever used. I spot checked the values at 0, infinity and the cutoff frequency and sure enough, they're all unity. But it'd be worth while to do it proper. $\endgroup$
    – Dan Szabo
    Feb 24, 2021 at 18:51
  • $\begingroup$ Yes the simulation shows full flat response ;-) $\endgroup$
    – Fat32
    Feb 24, 2021 at 18:52
  • $\begingroup$ w0 = 2*pi*3000; % crossover frequency Q = 0.5; % Quality factor of the 2nd order section w = 2*pi*linspace(100,10000,1000); % frequency s = 1j*w; Hsum = (w0^2 - s.^2)./(w0^2 + (w0/Q)*s + s.^2); figure,plot(w,abs(Hsum)) $\endgroup$
    – Fat32
    Feb 24, 2021 at 18:54
  • $\begingroup$ It's an allpass only for $Q=\frac12$, in all other cases it's not. $\endgroup$
    – Matt L.
    Feb 25, 2021 at 7:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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