Splitting Bands with Linkwitz-Riley

DSP, Plug-in and Host development discussion.
Z1202
KVRian
978 posts since 12 Apr, 2002

Post Tue Feb 20, 2018 1:05 pm

Regarding the SVF output polarity, I believe the "default" polarity shouldn't be questioned much, because this is what gives the most natural transfer functions having s^2, s and 1 in the numerator, the denominator being s^2+2Rs+1. It would look a bit weird to require bandpass TF to have -s instead. In analog implementations, AFAIK, it's quite common to ignore the polarity, making design decisions based on other factors (component costs and how well the circuit behaves).

User avatar
Max M.
KVRist
275 posts since 20 Apr, 2005 from Moscow, Russian Federation

Re: Splitting Bands with Linkwitz-Riley

Post Tue Feb 20, 2018 1:07 pm

Z1202
If we apply inverse BLT to this we will obtain an HS-HP crossover (high-shelving - highpass) :D

So what? The fact that a naive-LP becomes a sort of high-shelve filter when approaching FN is not a secret :). It was just an illustration of non-BLT filter being valid for LR crossover as well. A filter designed specifically to match continuous filter response won't be a plain shelve.

Z1202
KVRian
978 posts since 12 Apr, 2002

Re: Splitting Bands with Linkwitz-Riley

Post Tue Feb 20, 2018 1:29 pm

Max M. wrote:Z1202
If we apply inverse BLT to this we will obtain an HS-HP crossover (high-shelving - highpass) :D

So what? The fact that a naive-LP becomes a sort of high-shelve filter when approaching FN is not a secret :). It was just an illustration of non-BLT filter being valid for LR crossover as well. A filter designed specifically to match continuous filter response won't be a plain shelve.
The point is that inverse BLT should translate to the same combination working in continuous-time domain. That is we are having a continuous-time "L-R" style crossover consisting of HS and HP :D

User avatar
Max M.
KVRist
275 posts since 20 Apr, 2005 from Moscow, Russian Federation

Re: Splitting Bands with Linkwitz-Riley

Post Tue Feb 20, 2018 1:53 pm

Z1202 wrote:The point is that inverse BLT should translate to the same combination working in continuous-time domain.
I'm sorry but I think you're missing something in this case. The goal is to (approximately) match the continuous filter magnitude in 0...FN range in the discrete domain (while retaining LR requirements). Not in getting the prototype response for the continuous domain back by applying IBLT to the matching filter.
The retrieved continuous filter is broken (obviously) but it does not affect anything in the discrete domain - so I can't really see how you came to "inverse BLT should translate to the same combination working".

P.S. Or let's try in other words: it's like applying an inverse Euler to a BLT filter and saying "this is not going to work in analog" - sure it's not :) - it just not supposed to (it's for digital world only).
Last edited by Max M. on Tue Feb 20, 2018 2:05 pm, edited 1 time in total.

Z1202
KVRian
978 posts since 12 Apr, 2002

Re: Splitting Bands with Linkwitz-Riley

Post Tue Feb 20, 2018 2:00 pm

Max M. wrote:
Z1202 wrote:The point is that inverse BLT should translate to the same combination working in continuous-time domain.
I'm sorry but I think you're missing something in this case. The goal is to (approximately) match the continuous filter magnitude in 0...FN range in the discrete domain (while retaining LR requirements). Not in getting the prototype response for the continuous domain back by applying IBLT to the matching filter.
The retrieved continuous filter is broken (obviously) but it does not affect anything in the discrete domain - so I can't really see how you came to "inverse BLT should translate to the same combination working".
I'm not trying to reach the same goal or any specific goal by this. Simply an observation, that what you said means that there is an HS-HP continuous-time crossover having the L-R property. Whether it can have any use? I don't know.

Note: if I'm not mistaken, a naive 1-pole LP translates to HS continuous-time filter in any case, not just at high cutoffs.

Edit: for example it might turn out to be possible to build "shelving crossovers", that is HS-LS. Don't know. Simply shared my observation.

User avatar
Max M.
KVRist
275 posts since 20 Apr, 2005 from Moscow, Russian Federation

Re: Splitting Bands with Linkwitz-Riley

Post Tue Feb 20, 2018 2:23 pm

Z1202 wrote:there is an HS-HP continuous-time crossover having the L-R property. Whether it can have any use? I don't know.
It has. As soon as we put it into the discrete domain and its ~flat HF line starts near Nyquist. This ("LP->HS translation") is, by the way, one of the methods to get to a matching LP - see for example http://www.aes.org/e-lib/browse.cfm?elib=16077.

if I'm not mistaken, a naive 1-pole LP translates to HS continuous-time filter in any case, not just at high cutoffs.

Most of (if not every) matching LPs will appear as HS when converted back. Even matching peaking filters (when caught in their bell by FN) will actually, from IBLT point of view peaking near FN is also really nothing but a high-shelve with resonance. And matching-digital-BP is just an analog-HP-with-resonance that way :·). Welcome to the magic non-oversampled world!

mystran
KVRAF
5032 posts since 12 Feb, 2006 from Helsinki, Finland

Re: Splitting Bands with Linkwitz-Riley

Post Tue Feb 20, 2018 8:47 pm

Max M. wrote: Here's 2nd-order xover using a naive-LP (made of two 1st-order naive-lps and the corresponding allpass) - for the sake of simplicity:
[...]
The trick is just in using non-minphase zeros for HP/LP (thus it should be applicable for any N > 1 order filters). And I think the same will work for higher-order xover units too (I'm not sure about odd orders though - needs testing).

---
(Hmm, that was interesting question - in fact this made me to really revise some of my old stereotypes about phase properties of non-BLT filters... Thanks!)
Oh I see.. if you have a LP+HP pair in phase with each other, then:

LP+HP = (LP+k*HP) + (1-k)*HP for any k, where the terms are still in phase

Makes sense.

edit: here's a followup question though: for higher order filters, can you place the poles in such a way that they do not match the poles of a BLT Butterworth? For the 1st order case this is always the case, since any first order filter is "Butterworth" in a sense, but what happens with the higher orders?
If you'd like Signaldust to return, please ask Katinka Tuisku to resign.

Z1202
KVRian
978 posts since 12 Apr, 2002

Re: Splitting Bands with Linkwitz-Riley

Post Tue Feb 20, 2018 10:47 pm

mystran wrote:LP+HP = (LP+k*HP) + (1-k)*HP for any k, where the terms are still in phase
Furthermore, as AP is a member of a linear space spanning LP and HP, more or less any two linear combinations of the three form a basis of this space. So, you could take HS+LP (as in Max M.'s case) or HS+LS (as I conjectured earlier) as this basis. (Edit: and express the allpass via these basis elements, which gives you a crossover).

All elements of this space have the same phase response, so you can just work on the amplitude responses and AP intuitively serves as a unity.
Last edited by Z1202 on Wed Feb 21, 2018 2:00 am, edited 2 times in total.

Z1202
KVRian
978 posts since 12 Apr, 2002

Re: Splitting Bands with Linkwitz-Riley

Post Tue Feb 20, 2018 11:15 pm

mystran wrote:edit: here's a followup question though: for higher order filters, can you place the poles in such a way that they do not match the poles of a BLT Butterworth? For the 1st order case this is always the case, since any first order filter is "Butterworth" in a sense, but what happens with the higher orders?
Hmm, I must be missing something, as I can't believe that it can be so simple, but I don't see the mistake:

For a squared Butterworth the denominator is a phase response transformation (flipping all poles to the left semiplane) of "1+(-1)^Ns^(2N)" which can be thought of in terms of w-plane rather than s-plane: "1+w^(2N)", where s=jw. Apparently such transformation doesn't change the amplitude response, therefore the numerator of the form LP+HP = 1 + w^(2N) is an allpass. Since w^(2N) is a purely real number for imaginary s, phase responses of LP, HP and AP are identical.

For the Chebyshev filter we have the same picture, except there is T^2(w) instead. So we need to have numerators 1 and T^2(-js). Since T^2(-js)=T^2(w) is again a purely real number, we should have the same picture.

We could also attempt an elliptic rational function here. I guess the denominator of the function might cancel with the numerators of the transfer functions (needs to be verified) in which case we have the same solution for elliptic filters.

Etc.

Edit: have been questioning whether T^2(-js) is a real function of s. It seems so, since T(w) is an even/odd function, but I'm not sure.

User avatar
Max M.
KVRist
275 posts since 20 Apr, 2005 from Moscow, Russian Federation

Re: Splitting Bands with Linkwitz-Riley

Post Wed Feb 21, 2018 2:18 am

Thinking of it as: if with BLT case we have only one solution for the poles in LP + HP = AP, then it's the same only solution for any X + Y = AP (thus if X is a potentially matching-pseudo-LP it still has to meet that poles criteria and the only freedom is in its zeros). But the solution itself exists for any order.

Honestly I did not go that far in prototyping of such things so I may be wrong.

Z1202
KVRian
978 posts since 12 Apr, 2002

Re: Splitting Bands with Linkwitz-Riley

Post Wed Feb 21, 2018 5:01 am

Max M. wrote:Thinking of it as: if with BLT case we have only one solution for the poles in LP + HP = AP, then it's the same only solution for any X + Y = AP (thus if X is a potentially matching-pseudo-LP it still has to meet that poles criteria and the only freedom is in its zeros). But the solution itself exists for any order.

Honestly I did not go that far in prototyping of such things so I may be wrong.
It seems you're right, because essentially in terms of s-plane you're adding pairs of zeros symmetric with respect to the imaginary axis, which doesn't change the phase response.

User avatar
Max M.
KVRist
275 posts since 20 Apr, 2005 from Moscow, Russian Federation

Re: Splitting Bands with Linkwitz-Riley

Post Wed Feb 21, 2018 12:00 pm

Z1202 Thanks, Vadim. And my apologizes if I sounded a bit harsh above - I did not mean to.

User avatar
andy-cytomic
KVRAF
2195 posts since 3 Dec, 2008

Re: Splitting Bands with Linkwitz-Riley

Post Thu Feb 22, 2018 12:13 am

For LR4 I think the easiest and pretty much most efficient way is how Mystran has already
described, using two Trapezoidal integrated linear SVFs:

---LR4---
SVF2pole1(in,damp -> all2,lp2)
SVF2pole2(lp2,damp -> lp4)
hp4 = all2 - lp4

The all2 allpass output can be used for phase aligned wet/dry mixing. If you need higher multiple of 4 orders of LR crossover then you have to add extra SVF stages to process the allpass phase correctly. For example for LR8 you'll need:

---LR8---
SVF2pole1(in,damp1 -> all2,lp2)
SVF2pole2(all2,damp2 -> all4)
SVF2pole3(lp2,damp2 -> lp4)
SVF2pole4(lp4,damp1 -> lp6)
SVF2pole5(lp6,damp2 -> lp8)
hp8 = all4 - lp8
which makes a total of 5 x SVF2pole which is still pretty easy to implement and efficient if you've got a well coded SVF2pole filter.

Another option is to use 4 pole SVFs to begin with, and use the same trick with them:

---LR4---
SVF4pole1(in,damp,damp) -> all2,lp4,hp4)
which makes 1 x SVF4pole

---LR8---
SVF4pole1(in,damp1,damp2 -> all4,lp4)
SVF4pole2(lp4,damp1,damp2 -> lp8)
hp8 = all4 - lp8
which makes 2 x SVF4pole

The general structure of an SVF of higher orders is the same as the 2 pole, each integrator stage is fed back to the input stage and subtracted from the input with a weight (although in the diagram each integrator is buffered by an inverting op-amp so the feedback signs flip with each stage):
http://www.rane.com/pdf/linriley.pdf

I'm not sure how useful LR12 or LR16 are, but you could even form an SVF6pole and SVF8pole filter, but I would imaging things get less numerically stable and the coefficient calculations get messier, so it would probably be the case that you do the same extra cascaded stage(s) to get the allpass output correct and just stick to SVF4pole sections, but I imagine most people will stick with the tried and true SVF2pole to do everything since there is less to go wrong, and not too much cpu to be saved.
The Glue, The Drop - www.cytomic.com

Z1202
KVRian
978 posts since 12 Apr, 2002

Re: Splitting Bands with Linkwitz-Riley

Post Thu Feb 22, 2018 12:58 am

andy-cytomic wrote:The general structure of an SVF of higher orders is the same as the 2 pole, each integrator stage is fed back to the input stage and subtracted from the input with a weight (although in the diagram each integrator is buffered by an inverting op-amp so the feedback signs flip with each stage):
http://www.rane.com/pdf/linriley.pdf
The question would be, is there any benefit of this higher-order SVF (I believe also referred to as canonical controllable form of a state-space system) compared to simply cascading multiple 2nd-order ones. Especially if the 2nd-order coefficients are already known and there is even no need to factor th polynomials. Particularly, IIRC some people reported precision/noise issues being worse with higher-order SVFs, not unlikely the direct forms.

Edit: ok, if they are modulated, you can save a division, since there is only one feedback path. But besides that?

Edit2: actually instead of dividing twice in the case of representing a 4th order filter as a product of two 2nd order ones, you could reciprocate the product of the denominators and multiply back by each of them in turn ;)
Last edited by Z1202 on Thu Feb 22, 2018 1:06 am, edited 2 times in total.

Z1202
KVRian
978 posts since 12 Apr, 2002

Re: Splitting Bands with Linkwitz-Riley

Post Thu Feb 22, 2018 1:00 am

Max M. wrote:Z1202 Thanks, Vadim. And my apologizes if I sounded a bit harsh above - I did not mean to.
You did a bit. Apology accepted.

Return to “DSP and Plug-in Development”