For crossovers that sum to allpass, you can derive the correct allpass representation of the sum mathematically so there's no need to extract the excess phase in the way you describe. Linkwitz-Riley filters actually follow a simple pattern since LR filters are in phase and consist of two cascaded Butterworth filters. For example:How do you do that?
- LR2 (12dB/oct) is two cascaded 1st-order BW filters. The sum is one 1st-order AP.
- LR4 (24dB/oct) is two cascaded 2nd-order BW filters (Q=sqrt(1/2)). The sum is one 2nd-order AP with the same Q.
- LR6 (36dB/oct) is two cascaded 3rd-order BW filters, each of which can be realized as a cascade of one 2nd-order filter with Q=1.0 and one 1st-order filter. The sum can be realized as a cascade of one 2nd-order AP with Q=1.0 and one 1st-order AP.
- LR8 (48dB/oct) is two cascaded 4th-order BW filters, each of which can be realized as a cascade of two 2nd-order filters where the Q-values are 1/sqrt(2+sqrt(2)) and 1/sqrt(2-sqrt(2)). The sum can be realized as a cascade of two 2nd-order AP filters where the Q-values are (any guesses?) 1/sqrt(2+sqrt(2)) and 1/sqrt(2-sqrt(2)).
You can also do this for odd-order Butterworth crossovers as they sum to allpass as well, although what you end up with is a bit less obvious at first glance. Here are the first three:
- BW3 (18dB/oct): one 2nd-order AP with Q=1.0.
- BW5 (30dB/oct): one 2nd-order AP with Q=2/(1+sqrt(5)).
- BW7 (42dB/oct): two 2nd-order APs where the Q-values are 1/(2×sin(5pi/14)) and 1/(2×sin(pi/14))
Now, once you have the correct cascade of IIR allpass filters, you need an FIR approximation of it. This can be done by simply truncating the impulse response of the IIR cascade. You can then time-reverse the resulting FIR filter (i.e. literally reverse the order of the taps) and you have your phase linearization filter.
Last edited: