DSPRelated.com
Forums

Peaking equalization - low phase delay

Started by FatScouser March 22, 2011
Hi all,

I'm trying to implement a graphic equalizer tool (in c++) for a non-audio
system with bandwidth 0 - 40 Hz, and hoped someone in the Comp.DSP
community would be kind enough to offer helpful advice?

We have a quasi-realtime system in which minimal phase delay is of critical
importance, but minimal signal distortion is also a requirement
(obviously). We want to keep delays below about 75 ms, and we don't want
excessive 'ringing' under/overshoot, so I _think_ Q factor must be below
about 2.0.

I have implemented an EQ comprising a cascade of band filters with these
properties: bandpass, IIR, Bessel, 3rd order. Each band supports the
following three inputs: f1, f2, and gain. Since I have no direct control
over Q, the unfortunate result is that narrow bands cause too much
resonance. (Presumably this is because Q is too high. Q = fc/(f2-f1) =
0.5*(f2+f1)/(f2-f1). So, a 4 Hz - 6 Hz band equates to Q=2.5, and the
impulse response causes a couple of secondary after-peaks: please correct
me if I'm wrong!. Phase delay is OK for this case, however.)

Looking at other postings (I've downloaded r-bj's Audio-EQ-Cookbook.txt), I
suspect a parametric/peaking equalizer should be investigated because it
will allow me to trade off ringing against phase delay? Finally, the crux
question ;o) :
>> Is a parametric/peaking equalizer likely to offer lower phase delay
and/or ringing for our application, when compared with our existing bandpass filter implementation? A lot of detail there: hopefully someone can help. Best regards, John
On Mar 22, 11:01�am, "FatScouser"
<john.hague@n_o_s_p_a_m.truebit.co.uk> wrote:
> Hi all, > > I'm trying to implement a graphic equalizer tool (in c++) for a non-audio > system with bandwidth 0 - 40 Hz, and hoped someone in the Comp.DSP > community would be kind enough to offer helpful advice? > > We have a quasi-realtime system in which minimal phase delay is of critical > importance, but minimal signal distortion is also a requirement > (obviously). We want to keep delays below about 75 ms, and we don't want > excessive 'ringing' under/overshoot, so I _think_ Q factor must be below > about 2.0. > > I have implemented an EQ comprising a cascade of band filters with these > properties: bandpass, IIR, Bessel, 3rd order. Each band supports the > following three inputs: f1, f2, and gain. Since I have no direct control > over Q, the unfortunate result is that narrow bands cause too much > resonance. (Presumably this is because Q is too high. Q = fc/(f2-f1) = > 0.5*(f2+f1)/(f2-f1). So, a 4 Hz - 6 Hz band equates to Q=2.5, and the > impulse response causes a couple of secondary after-peaks: please correct > me if I'm wrong!. Phase delay is OK for this case, however.) > > Looking at other postings (I've downloaded r-bj's Audio-EQ-Cookbook.txt), I > suspect a parametric/peaking equalizer should be investigated because it > will allow me to trade off ringing against phase delay? Finally, the crux > question ;o) :>> Is a parametric/peaking equalizer likely to offer lower phase delay > > and/or ringing for our application, when compared with our existing > bandpass filter implementation? > > A lot of detail there: hopefully someone can help. > Best regards, John
That's a long list of what you *want*. Why don't you explain what you *need*? What's the application? Where did that long list of whishes come from? Are you *sure* all items on that list are cruical? If 'no' what are the priorities? Why? Answer those questions and you might get help. Rune
>That's a long list of what you *want*. Why don't you >explain what you *need*? What's the application? Where >did that long list of whishes come from? Are you *sure* >all items on that list are cruical? If 'no' what are >the priorities? Why? > >Answer those questions and you might get help. > >Rune >
OK Rune: fair enough! Sorry. We need: 1. phase delay: < 75 ms 2. Q-value: < 2.0 * We would like: 3. graphic equalizer with full range: 0-40 Hz 4. band intervals: hopefully _more_ control than these octaves: 0-1-2-4-8-16-32 Hz My query is whether I should be using bandpass filters OR parametric/peaking filters (OR other) to satisfy the above. * This is me assuming that Q is in line with 'number of significant secondary peaks': vague, I know, but I don't have specific dB/octave stopband figures. But I've been using a filter design tool, and by looking at impulse responses I've arrived at a maximum Q of 2.0. Many thanks, John
On Mar 22, 12:27&#4294967295;pm, "FatScouser"
<john.hague@n_o_s_p_a_m.truebit.co.uk> wrote:
> >That's a long list of what you *want*. Why don't you > >explain what you *need*? What's the application? Where > >did that long list of whishes come from? Are you *sure* > >all items on that list are cruical? If 'no' what are > >the priorities? Why? > > >Answer those questions and you might get help. > > >Rune > > OK Rune: fair enough! Sorry. > > We need: > 1. &#4294967295;phase delay: < 75 ms > 2. &#4294967295;Q-value: < 2.0 * > > We would like: > 3. &#4294967295;graphic equalizer with full range: 0-40 Hz > 4. &#4294967295;band intervals: hopefully _more_ control than these octaves: > &#4294967295; &#4294967295; 0-1-2-4-8-16-32 Hz > > My query is whether I should be using bandpass filters OR > parametric/peaking filters (OR other) to satisfy the above. > > * This is me assuming that Q is in line with 'number of significant > secondary peaks': vague, I know, but I don't have specific dB/octave > stopband figures. But I've been using a filter design tool, and by looking > at impulse responses I've arrived at a maximum Q of 2.0. > > Many thanks, John
Not helpful, you've only reformulated what you already said. Again: What is it you attempt to do? Why do you think phase delay is important? How / why did you end up with the spec you stated? Rune
>Not helpful, you've only reformulated what you already >said. > >Again: What is it you attempt to do? Why do you think >phase delay is important? How / why did you end up >with the spec you stated? > >Rune >
Hi Rune (et al), OK, I can't give details for privacy reasons that are out of my control. Suffice to say phase delay _must_ be <75 ms: you'll just have to just take my word on that (isn't that enough?) But I can tell you that the application is mechanical, and the purpose of the graphic equalizer is to enhance frequency ranges that the system is poor at reproducing. We would like to dial up/down gains at arbitrary bands in the 0-40 Hz range. Unfortunately we don't have a model of our system - nor will we be able to generate one - hence the graphic equalizer will be a manual method for achieving a flat frequency response. That's essenially it. I don't want to sound secretive just for the sake of it: I have my very good reasons. Nor do I want to sound ungrateful for any help ... Ta, John
On Mar 22, 2:44&#4294967295;pm, "FatScouser"
<john.hague@n_o_s_p_a_m.truebit.co.uk> wrote:
> >Not helpful, you've only reformulated what you already > >said. > > >Again: What is it you attempt to do? Why do you think > >phase delay is important? How / why did you end up > >with the spec you stated? > > >Rune > > Hi Rune (et al), > > OK, I can't give details for privacy reasons that are out of my control. > Suffice to say phase delay _must_ be <75 ms: you'll just have to just take > my word on that (isn't that enough?) > > But I can tell you that the application is mechanical, and the purpose of > the graphic equalizer is to enhance frequency ranges that the system is > poor at reproducing. We would like to dial up/down gains at arbitrary bands > in the 0-40 Hz range. Unfortunately we don't have a model of our system - > nor will we be able to generate one - hence the graphic equalizer will be a > manual method for achieving a flat frequency response. > > That's essenially it. I don't want to sound secretive just for the sake of > it: I have my very good reasons. Nor do I want to sound ungrateful for any > help ...
So you want an adaptive feedback loop, either to enhance or reject resonances. If you ask about *that* kind of thing, you might get help. Not from me (I don't know anything about that stuff) but still. Rune

FatScouser wrote:

> Hi all, > > I'm trying to implement a graphic equalizer tool (in c++) for a non-audio > system with bandwidth 0 - 40 Hz, and hoped someone in the Comp.DSP > community would be kind enough to offer helpful advice? > > We have a quasi-realtime system in which minimal phase delay is of critical > importance, but minimal signal distortion is also a requirement > (obviously). We want to keep delays below about 75 ms, and we don't want > excessive 'ringing' under/overshoot, so I _think_ Q factor must be below > about 2.0. > > I have implemented an EQ comprising a cascade of band filters with these > properties: bandpass, IIR, Bessel, 3rd order. Each band supports the > following three inputs: f1, f2, and gain. Since I have no direct control > over Q, the unfortunate result is that narrow bands cause too much > resonance. (Presumably this is because Q is too high. Q = fc/(f2-f1) = > 0.5*(f2+f1)/(f2-f1). So, a 4 Hz - 6 Hz band equates to Q=2.5, and the > impulse response causes a couple of secondary after-peaks: please correct > me if I'm wrong!. Phase delay is OK for this case, however.) > > Looking at other postings (I've downloaded r-bj's Audio-EQ-Cookbook.txt), I > suspect a parametric/peaking equalizer should be investigated because it > will allow me to trade off ringing against phase delay? Finally, the crux > question ;o) : > >>>Is a parametric/peaking equalizer likely to offer lower phase delay > > and/or ringing for our application, when compared with our existing > bandpass filter implementation? > > A lot of detail there: hopefully someone can help.
0. Abandon the cookbooks; cookbooks are for the folks who already know how to cook and what to cook. 1. Formalize your requirements and constraints. 2. Generate the desired filter by brute force optimization. 3. Since you don't seem to be limited in CPU resources, stay with FIR. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
>Not helpful, you've only reformulated what you already >said. > >Again: What is it you attempt to do? Why do you think >phase delay is important? How / why did you end up >with the spec you stated? > >Rune >
Hi Rune (et al) I can't give full details for privacy reasons beyond my control. Suffice to say I know for sure that we need phase delay under 75 ms. We cannot send in an impulse and have it delayed by longer than 75 ms: you'll just have to take my word on that. It's a mechanical device with a frequency response that requires 'tuning', mainly due to it having a poor response over certain frequency bands. Unfortunaly we don't have a complete model of the system: that's why we wanted to use a graphic equalizer to manually compensate. Isn't that enough information to have a stab at answering the query? Or at least pointing me in the direction of someone who can, or some other resource? Ta, John
>0. Abandon the cookbooks; cookbooks are for the folks who already know >how to cook and what to cook. > >1. Formalize your requirements and constraints. > >2. Generate the desired filter by brute force optimization. > >3. Since you don't seem to be limited in CPU resources, stay with FIR. > > >Vladimir Vassilevsky >DSP and Mixed Signal Design Consultant >http://www.abvolt.com >
Hi Vladimir, Thanks for that. I don't claim to be a DSP chef: I can just about boil a filter. As for scrambled filters: I'm good at that. But am keen to learn - if anyone's keen to teach. Do you think it's valid, then, to replace my IIR bandpass filters with FIR ones? My general understanding was that FIR responded slower than IIR; and I already had IIR code to work with, hence the implementation. And are you inferring that peaking filters are IIR, so I should abandon that type? John

FatScouser wrote:

>>0. Abandon the cookbooks; cookbooks are for the folks who already know >>how to cook and what to cook. >> >>1. Formalize your requirements and constraints. >> >>2. Generate the desired filter by brute force optimization. >> >>3. Since you don't seem to be limited in CPU resources, stay with FIR. >> > > Thanks for that. I don't claim to be a DSP chef: I can just about boil a > filter.
Sorry. Things don't work that way.
> As for scrambled filters: I'm good at that. But am keen to learn - > if anyone's keen to teach.
Get a textbook. R. Lyons's "Understanding DSP" would be a good start.
> Do you think it's valid, then, to replace my IIR bandpass filters with FIR > ones? My general understanding was that FIR responded slower than IIR; and > I already had IIR code to work with, hence the implementation.
Any response could be approached either from FIR or from IIR perspective; it is the matter of the application preference. It is simpler in many ways to build an arbitrary response as FIR.
> And are you inferring that peaking filters are IIR, so I should abandon > that type?
Different things are good for different purposes; it is up to you to decide what to use and when. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com