DSPRelated.com
Forums

Crossover with biquad frequency response is not flat

Started by jungledmnc April 3, 2009
Hi there,
I created a cross-over using RBJs lowpass/highpass based on the fact, that
when you use each LP/HP twice, they become phase aligned with each other.
It works ok, but only if the cut-off frequency between bands is high
enough.

E.g. 3 bands:
0-1000Hz
1000-4000Hz
4000-..Hz

Then the second band is lower in magnitude and creates a peak in the
resulting frequency response. I assume it is simply caused by the fact,
that frequency responses of each of those biquads is not really ideal for
this case, but I'm still asking. Is it normal? 

Thanks!
dmnd

PS. I tried to compensate using gain for each band in the middle based on
frequency response "in the middle" (about 2kHz for the second band for
example). It helped, but not solved the problem.

Google "Linkwitz Riley"

VLV



jungledmnc wrote:
> Hi there, > I created a cross-over using RBJs lowpass/highpass based on the fact, that > when you use each LP/HP twice, they become phase aligned with each other. > It works ok, but only if the cut-off frequency between bands is high > enough. > > E.g. 3 bands: > 0-1000Hz > 1000-4000Hz > 4000-..Hz > > Then the second band is lower in magnitude and creates a peak in the > resulting frequency response. I assume it is simply caused by the fact, > that frequency responses of each of those biquads is not really ideal for > this case, but I'm still asking. Is it normal? > > Thanks! > dmnd > > PS. I tried to compensate using gain for each band in the middle based on > frequency response "in the middle" (about 2kHz for the second band for > example). It helped, but not solved the problem.
> > >Google "Linkwitz Riley" > >VLV > >
Thanks but I'm not sure if this is it. Butterworth response should have +3dB at the cross-over frequency when summed. But this is not the case. The response is flat if I have 2 bands and just one crossover. Problem is when I put a band in the middle. For example 3 bands : 1) 0-1hHz 2) 1kHz-2kHz 3) 2kHz-20kHz 1st and 3rd bands are ok, but the 2nd band limits are so close, that the frequency response never reaches 0dB and is always below, which I think is the problem.
jungledmnc wrote:
>> >> Google "Linkwitz Riley" >> >> VLV >> >> > > Thanks but I'm not sure if this is it. Butterworth response should have > +3dB at the cross-over frequency when summed. But this is not the case. The > response is flat if I have 2 bands and just one crossover. > Problem is when I put a band in the middle. > For example 3 bands : > 1) 0-1hHz > 2) 1kHz-2kHz > 3) 2kHz-20kHz > > 1st and 3rd bands are ok, but the 2nd band limits are so close, that the > frequency response never reaches 0dB and is always below, which I think is > the problem.
What in the workd inspired those crossover points? What kind of audio transducer needs to be limited to one octave? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
jungledmnc wrote:

>> For example 3 bands : >> 1) 0-1hHz >> 2) 1kHz-2kHz >> 3) 2kHz-20kHz
If you really need such a narrow middle band, consider the technique described here: http://www.patentgenius.com/subpage.php?page=patent&patent=4031321.
jungledmnc wrote:

> Problem is when I put a band in the middle. > For example 3 bands : > 1) 0-1hHz > 2) 1kHz-2kHz > 3) 2kHz-20kHz > > 1st and 3rd bands are ok, but the 2nd band limits are so close, > that the frequency response never reaches 0dB and is always > below, which I think is the problem.
The lowered peak gain may be a problem for calibrating whatever process consumes the bands, but not for the resummed spectrum's flatness as the other bands have what's missing, by construction. For that, what you need to compensate is phase. Given two 4th-order stages, the second splitting one output of the first, put a 2nd-order allpass on the first stage's unsplit output. Make this allpass of the same Q and critical frequency as each 2nd- order section in the second crossover stage. RBJ's Cookbook has the coefficients -- but note that they're the same as the crossover's denominator coefficients, so no need to recompute them. That way the allpass phase function is identical to that of the second crossover, so the top of each band's overall response will add coherently with the others' skirts. When the midband is broad you may get by without phase compensation because the second stage's phase response varies most strongly around the corner frequency and is comparatively flat further away. Martin -- Quidquid latine scriptum est, altum videtur.
>jungledmnc wrote: > >> Problem is when I put a band in the middle. >> For example 3 bands : >> 1) 0-1hHz >> 2) 1kHz-2kHz >> 3) 2kHz-20kHz >> >> 1st and 3rd bands are ok, but the 2nd band limits are so close, >> that the frequency response never reaches 0dB and is always >> below, which I think is the problem. > >The lowered peak gain may be a problem for calibrating whatever >process consumes the bands, but not for the resummed spectrum's >flatness as the other bands have what's missing, by construction. For >that, what you need to compensate is phase. > >Given two 4th-order stages, the second splitting one output of the >first, put a 2nd-order allpass on the first stage's unsplit output. >Make this allpass of the same Q and critical frequency as each 2nd- >order section in the second crossover stage. RBJ's Cookbook has the >coefficients -- but note that they're the same as the crossover's >denominator coefficients, so no need to recompute them. > >That way the allpass phase function is identical to that of the >second crossover, so the top of each band's overall response will add >coherently with the others' skirts. When the midband is broad you may >get by without phase compensation because the second stage's phase >response varies most strongly around the corner frequency and is >comparatively flat further away. > > >Martin >
Hey Martin thanks a lot! Really! Anyway since you're the pro and I've proven myself as a looser :), I have some further questions: 1) So the problem is, that when the 2 bands are to close, there is e.g. some content of 1kHz in the third band too, but it is not phase aligned with the rest of the filters. Therefore it is not adding correctly. Is this right? 2) I've checked the phase response of LP and HP and they are indeed the same. So the allpass filter from RBJ's cookbook has the opposite phase response, therefore when applied it will make all filters linear-phase, therefore adding correctly. Again - is this right? :) 3) It's a little surprising that if allpass means what it seems (because every other reference to allpass I have found so far is implemented using a delay), how is it possible? I mean IIR's are always phase-nonlinear, so they vary amplitude response with similar phase response. It is not possible change amplitude without changing phase, but it is possible to change phase without affecting amplitude? 4) If 2) and 3) is correct :), it would be possible to create a linear-phase EQ even from the RBJ's filters just by using each filter and following it with appropriate allpass that would cancel the phase change. I don't know how hard it is, but if it is true, why nobody did this instead of forward-reverse processing and similar pretty complicated algorithms? Well, if all of this was a total nonsense, than I'm sorry :). And if not, I'll be happy ;). Thanks! dmnc
On Apr 4, 8:51&#4294967295;am, "jungledmnc" <jungled...@gmail.com> wrote:
> >jungledmnc wrote: > > >> Problem is when I put a band in the middle. > >> For example 3 bands : > >> 1) 0-1hHz > >> 2) 1kHz-2kHz > >> 3) 2kHz-20kHz > > >> 1st and 3rd bands are ok, but the 2nd band limits are so close, > >> that the frequency response never reaches 0dB and is always > >> below, which I think is the problem. > > >The lowered peak gain may be a problem for calibrating whatever > >process consumes the bands, but not for the resummed spectrum's > >flatness as the other bands have what's missing, by construction. For > >that, what you need to compensate is phase. > > >Given two 4th-order stages, the second splitting one output of the > >first, put a 2nd-order allpass on the first stage's unsplit output. > >Make this allpass of the same Q and critical frequency as each 2nd- > >order section in the second crossover stage. RBJ's Cookbook has the > >coefficients -- but note that they're the same as the crossover's > >denominator coefficients, so no need to recompute them. > > >That way the allpass phase function is identical to that of the > >second crossover, so the top of each band's overall response will add > >coherently with the others' skirts. When the midband is broad you may > >get by without phase compensation because the second stage's phase > >response varies most strongly around the corner frequency and is > >comparatively flat further away. > > >Martin > > Hey Martin thanks a lot! Really! > > Anyway since you're the pro and I've proven myself as a looser :), I have > some further questions: > > 1) So the problem is, that when the 2 bands are to close, there is e.g. > some content of 1kHz in the third band too, but it is not phase aligned > with the rest of the filters. Therefore it is not adding correctly. Is this > right? > > 2) I've checked the phase response of LP and HP and they are indeed the > same. So the allpass filter from RBJ's cookbook has the opposite phase > response, therefore when applied it will make all filters linear-phase, > therefore adding correctly. Again - is this right? :) > > 3) It's a little surprising that if allpass means what it seems (because > every other reference to allpass I have found so far is implemented using a > delay), how is it possible? I mean IIR's are always phase-nonlinear, so > they vary amplitude response with similar phase response. It is not > possible change amplitude without changing phase, but it is possible to > change phase without affecting amplitude? > > 4) If 2) and 3) is correct :), it would be possible to create a > linear-phase EQ even from the RBJ's filters just by using each filter and > following it with appropriate allpass that would cancel the phase change. I > don't know how hard it is, but if it is true, why nobody did this instead > of forward-reverse processing and similar pretty complicated algorithms? > > Well, if all of this was a total nonsense, than I'm sorry :). And if not, > I'll be happy ;). > > Thanks! > dmnc- Hide quoted text - > > - Show quoted text -
I'm not an expert on this but one thing that comes to mind is that if the lowpass section is 4th-order (2 cascaded 2nd-order Butterworths) then the bandpass middle section needs to be 8th-order (to get -24dB/ octave rolloff on both the low and high side of the bandpass, which matches its neighbors). The highpass section is also 4th-order. Bob
Ok, so what I found is this (you pros probably consider it elementary,
please excuse my lack of knowledge :)):

The biquad allpass filter has 1 amplitude response and the same phase
response as the cascade of 2 LP (or HP) stages. And that's the problem -
the response is the same, I probably don't understand it right, because I
thought I need the inverted phase response (because that would cancel the
response of the 2 stages of LP/HP). Is there way to invert it? Or am I
missing something?

Thanks in advance!
dmnc
jungledmnc wrote:
> Ok, so what I found is this (you pros probably consider it elementary, > please excuse my lack of knowledge :)): > > The biquad allpass filter has 1 amplitude response and the same phase > response as the cascade of 2 LP (or HP) stages. And that's the problem - > the response is the same, I probably don't understand it right, because I > thought I need the inverted phase response (because that would cancel the > response of the 2 stages of LP/HP). Is there way to invert it? Or am I > missing something?
If you really want to invert the response (I'm not sure you do) switch the speakers wires. 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;