Splitting Bands with LinkwitzRiley

Z1202
 KVRian
 978 posts since 12 Apr, 2002
Re: Splitting Bands with LinkwitzRiley
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).

Max M.
 KVRist
 275 posts since 20 Apr, 2005 from Moscow, Russian Federation
Re: Splitting Bands with LinkwitzRiley
Z1202
If we apply inverse BLT to this we will obtain an HSHP crossover (highshelving  highpass)
So what? The fact that a naiveLP becomes a sort of highshelve filter when approaching FN is not a secret . It was just an illustration of nonBLT filter being valid for LR crossover as well. A filter designed specifically to match continuous filter response won't be a plain shelve.
If we apply inverse BLT to this we will obtain an HSHP crossover (highshelving  highpass)
So what? The fact that a naiveLP becomes a sort of highshelve filter when approaching FN is not a secret . It was just an illustration of nonBLT 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 LinkwitzRiley
The point is that inverse BLT should translate to the same combination working in continuoustime domain. That is we are having a continuoustime "LR" style crossover consisting of HS and HPMax M. wrote:Z1202
If we apply inverse BLT to this we will obtain an HSHP crossover (highshelving  highpass)
So what? The fact that a naiveLP becomes a sort of highshelve filter when approaching FN is not a secret . It was just an illustration of nonBLT filter being valid for LR crossover as well. A filter designed specifically to match continuous filter response won't be a plain shelve.

Max M.
 KVRist
 275 posts since 20 Apr, 2005 from Moscow, Russian Federation
Re: Splitting Bands with LinkwitzRiley
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.Z1202 wrote:The point is that inverse BLT should translate to the same combination working in continuoustime domain.
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 LinkwitzRiley
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 HSHP continuoustime crossover having the LR property. Whether it can have any use? I don't know.Max M. wrote: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.Z1202 wrote:The point is that inverse BLT should translate to the same combination working in continuoustime domain.
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".
Note: if I'm not mistaken, a naive 1pole LP translates to HS continuoustime 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 HSLS. Don't know. Simply shared my observation.

Max M.
 KVRist
 275 posts since 20 Apr, 2005 from Moscow, Russian Federation
Re: Splitting Bands with LinkwitzRiley
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/elib/browse.cfm?elib=16077.Z1202 wrote:there is an HSHP continuoustime crossover having the LR property. Whether it can have any use? I don't know.
if I'm not mistaken, a naive 1pole LP translates to HS continuoustime 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 highshelve with resonance. And matchingdigitalBP is just an analogHPwithresonance that way :·). Welcome to the magic nonoversampled world!

mystran
 KVRAF
 5032 posts since 12 Feb, 2006 from Helsinki, Finland
Re: Splitting Bands with LinkwitzRiley
Oh I see.. if you have a LP+HP pair in phase with each other, then:Max M. wrote: Here's 2ndorder xover using a naiveLP (made of two 1storder naivelps and the corresponding allpass)  for the sake of simplicity:
[...]
The trick is just in using nonminphase zeros for HP/LP (thus it should be applicable for any N > 1 order filters). And I think the same will work for higherorder 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 nonBLT filters... Thanks!)
LP+HP = (LP+k*HP) + (1k)*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 LinkwitzRiley
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).mystran wrote:LP+HP = (LP+k*HP) + (1k)*HP for any k, where the terms are still in phase
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 LinkwitzRiley
Hmm, I must be missing something, as I can't believe that it can be so simple, but I don't see the mistake: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?
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 wplane rather than splane: "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.

Max M.
 KVRist
 275 posts since 20 Apr, 2005 from Moscow, Russian Federation
Re: Splitting Bands with LinkwitzRiley
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 matchingpseudoLP 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.
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 LinkwitzRiley
It seems you're right, because essentially in terms of splane you're adding pairs of zeros symmetric with respect to the imaginary axis, which doesn't change the phase response.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 matchingpseudoLP 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.

Max M.
 KVRist
 275 posts since 20 Apr, 2005 from Moscow, Russian Federation
Re: Splitting Bands with LinkwitzRiley
Z1202 Thanks, Vadim. And my apologizes if I sounded a bit harsh above  I did not mean to.

andycytomic
 KVRAF
 2195 posts since 3 Dec, 2008
Re: Splitting Bands with LinkwitzRiley
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 opamp 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.
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 opamp 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 LinkwitzRiley
The question would be, is there any benefit of this higherorder SVF (I believe also referred to as canonical controllable form of a statespace system) compared to simply cascading multiple 2ndorder ones. Especially if the 2ndorder 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 higherorder SVFs, not unlikely the direct forms.andycytomic 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 opamp so the feedback signs flip with each stage):
http://www.rane.com/pdf/linriley.pdf
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 LinkwitzRiley
You did a bit. Apology accepted.Max M. wrote:Z1202 Thanks, Vadim. And my apologizes if I sounded a bit harsh above  I did not mean to.