Forums

Interpolated Constant-Q Equalizer

Started by Unknown November 20, 2007
Hello,

We are implementing DSP based 31 band 1/3 octave audio graphic
equalizer on programmabele DSP. The customer specifications demand for
an Interpolated Constant - Q topology. For the implementation we are
basing our design on Rane's Dennis Bohn paper on AES ("Constant-Q
Graphic Equalizers", JAES Volume 34 Number 9 pp. 611-626; September
1986). Although the topologies suggested on the paper are for analog
implementation, we have succesfully achieved the desired performance
for the boost fiters on a digital implementation. However, for the cut
filters we are having problems. Those problems arise from the fact
that in the suggested topologies on Bohn's paper the cut filters are
achieved through negative feedback, which in the case of analog
implementation can be achieved without delay, but in the case of
digital implementaion there are no feedback free of delay, there is
always need for a 1 sample delay in the feedback path.

As a result, we are getting good results for the cut filters only at
low frequencies, say less than 2 kHz with a sampling rate of 96 kHz.
For higher frequencies, where the 1 sample delay in the feedback loop
becomes significant, we get a completerly distorded response curve.

So, the question is: how can one implemenet an Interpolated Constant-Q
graphic equalizer with the right behavior both for cut and boost
settings, on a digital processor? We know there are other approaches,
like Rane's Perfect-Q or the Opposite Filters by Azizi; however our
current target hardware is limited both in computational complexity to
calculate and update all coefficients when one slider moves, and in
program memory available.

Looking forward your promt reply.
Jaime Andr�s Aranguren Cardona wrote:
> Hello, > > We are implementing DSP based 31 band 1/3 octave audio graphic > equalizer on programmabele DSP. The customer specifications demand for > an Interpolated Constant - Q topology. For the implementation we are > basing our design on Rane's Dennis Bohn paper on AES ("Constant-Q > Graphic Equalizers", JAES Volume 34 Number 9 pp. 611-626; September > 1986). Although the topologies suggested on the paper are for analog > implementation, we have succesfully achieved the desired performance > for the boost fiters on a digital implementation. However, for the cut > filters we are having problems. Those problems arise from the fact > that in the suggested topologies on Bohn's paper the cut filters are > achieved through negative feedback, which in the case of analog > implementation can be achieved without delay, but in the case of > digital implementaion there are no feedback free of delay, there is > always need for a 1 sample delay in the feedback path. > > As a result, we are getting good results for the cut filters only at > low frequencies, say less than 2 kHz with a sampling rate of 96 kHz. > For higher frequencies, where the 1 sample delay in the feedback loop > becomes significant, we get a completerly distorded response curve. > > So, the question is: how can one implemenet an Interpolated Constant-Q > graphic equalizer with the right behavior both for cut and boost > settings, on a digital processor? We know there are other approaches, > like Rane's Perfect-Q or the Opposite Filters by Azizi; however our > current target hardware is limited both in computational complexity to > calculate and update all coefficients when one slider moves, and in > program memory available. > > Looking forward your promt reply.
Reverse-engineer the cut filters (and the pass filters, for that matter) and implement the filter that gives the right Bode plot. I'd suggest that you make sure you're implementing the right frequency response from end to end, not just internally in the z domain -- the sampling and reconstruction process preserves a system's pole locations, but the zeros can crawl around a lot, particularly if they start out at fairly high frequencies compared to the sampling rate. Unless your sampling rate is significantly higher (10x, 100x or more) than your highest frequency of interest, trying to replicate an analog circuit's behavior _exactly_ in digital hardware is difficult, at best -- you're much better off starting from it's desired _behavior_ and designing to that. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" gives you just what it says. See details at http://www.wescottdesign.com/actfes/actfes.html
On Nov 20, 9:22 am, "Jaime Andr=E9s Aranguren Cardona"
<jaime.arangu...@gmail.com> wrote:
> Hello, > > We are implementing DSP based 31 band 1/3 octave audio graphic > equalizer on programmabele DSP. The customer specifications demand for > an Interpolated Constant - Q topology. For the implementation we are > basing our design on Rane's Dennis Bohn paper on AES ("Constant-Q > Graphic Equalizers", JAES Volume 34 Number 9 pp. 611-626; September > 1986). Although the topologies suggested on the paper are for analog > implementation, we have succesfully achieved the desired performance > for the boost fiters on a digital implementation. However, for the cut > filters we are having problems. Those problems arise from the fact > that in the suggested topologies on Bohn's paper the cut filters are > achieved through negative feedback, which in the case of analog > implementation can be achieved without delay, but in the case of > digital implementaion there are no feedback free of delay, there is > always need for a 1 sample delay in the feedback path. > > As a result, we are getting good results for the cut filters only at > low frequencies, say less than 2 kHz with a sampling rate of 96 kHz. > For higher frequencies, where the 1 sample delay in the feedback loop > becomes significant, we get a completerly distorded response curve. > > So, the question is: how can one implemenet an Interpolated Constant-Q > graphic equalizer with the right behavior both for cut and boost > settings, on a digital processor? We know there are other approaches, > like Rane's Perfect-Q or the Opposite Filters by Azizi; however our > current target hardware is limited both in computational complexity to > calculate and update all coefficients when one slider moves, and in > program memory available. > > Looking forward your promt reply.
Hello Jaime, When Motorola 1st introduced their 56000 series DSP, they had an appnote for a graphic equalizer. Here is a link to it: http://www.harmony-central.com/Computer/Programming/apr2-d.pdf IHTH, Clay S. Turner

Jaime Andr=E9s Aranguren Cardona wrote:

> Hello, >=20 > We are implementing DSP based 31 band 1/3 octave audio graphic > equalizer on programmabele DSP. The customer specifications demand for > an Interpolated Constant - Q topology.
Building the 31 bands of filtering of 1/3 octave each is a very=20 ineficient approach. The best way would be to approximate the desired=20 response with the parametric EQ sections. You only need 4 to 8 sections=20 in any practical sense. The other good way is a multirate filterbank. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
Hi Tim,

On 20 nov, 12:53, Tim Wescott <t...@seemywebsite.com> wrote:
> > Reverse-engineer the cut filters (and the pass filters, for that matter) > and implement the filter that gives the right Bode plot. I'd suggest > that you make sure you're implementing the right frequency response from > end to end, not just internally in the z domain -- the sampling and > reconstruction process preserves a system's pole locations, but the > zeros can crawl around a lot, particularly if they start out at fairly > high frequencies compared to the sampling rate.
If I understood well, this involves redesigning the cut filters at all time a slider is changed in position, which can be prohibitive at run time (no MATLAB routines running on the hardware). Indeed, the way of implementing the many bands is in a semi-parallel connection of filters (Dennis Bohn's paper in AES)... If I understand well, I can keep the current way of designing the boost filters (maybe with the corrections suggested in Sophocles Orfanidis paper in AES), and when the setting is for a cut filter, implement it "directly", maybe taking advantage of Greg Berchin's algorithm (which was published in IEEE SP Magazine tips & tricks some time ago, and which was also discussed here at comp.dsp). Am I in the right track? Did I understand your suggestions?
> Unless your sampling rate is significantly higher (10x, 100x or more) > than your highest frequency of interest, trying to replicate an analog > circuit's behavior _exactly_ in digital hardware is difficult, at best > -- you're much better off starting from it's desired _behavior_ and > designing to that.
Well, the transfer functions in analog domain (s) are already available, that is actually the starting point (to move to z). The really interesting part of D. Bohn's paper is the connection to get rid of band interaction, which involves several parallel filters, also in parallel with the original input, not cascaded. For boost filters this is not a problem, but for cut filters implementing each by each one generates problems.
Hello Clay,

On 20 nov, 13:27, Clay <phys...@bellsouth.net> wrote:

> Hello Jaime, > > When Motorola 1st introduced their 56000 series DSP, they had an > appnote for a graphic equalizer. Here is a link to it: > > http://www.harmony-central.com/Computer/Programming/apr2-d.pdf
Thanks for pointing out. However, although instructive, this paper seems to basic for what I am looking for. Do you maybe have some more related papers, which could provide more deep understanding of the subject? Regards.
Vladimir,

On 20 nov, 13:42, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:

> Building the 31 bands of filtering of 1/3 octave each is a very > ineficient approach. The best way would be to approximate the desired > response with the parametric EQ sections. You only need 4 to 8 sections > in any practical sense. The other good way is a multirate filterbank.
Could you please elaborate more on the idea, I think I did not understand it. How can you control each band's response with only 4 to 8 sections? I know that when you talk about parametric filters, you say that you are going to shape the spectrum with fewer but more flexible filters (the parametric ones). In this case, we are talking of a Graphic Equalizer. Besides, multirate filterbanks are not an option on our current HW platform (SigmaDSP by Analog Devices). On a "standard" programmable DSP it can be done (SHARC, Blackfin, TMS320Cxxx, etc), but this is not the case. Any more ideas? Regards.

Jaime Andr=E9s Aranguren Cardona wrote:

>>Building the 31 bands of filtering of 1/3 octave each is a very >>ineficient approach. The best way would be to approximate the desired >>response with the parametric EQ sections. You only need 4 to 8 sections=
>>in any practical sense. The other good way is a multirate filterbank. >=20 >=20 > Could you please elaborate more on the idea, I think I did not > understand it. How can you control each band's response with only 4 to > 8 sections?
You approximate the desired response as a whole using several parametric = EQ sections. The 31 band graphic EQ is just the way of representation of = the frequency response; the actual filter structure may be completely=20 different.
> Any more ideas?
It depends. Are you a customer or a cheapskate? Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Tue, 20 Nov 2007 12:40:55 -0800,
Jaime Andr&eacute;s Aranguren Cardona wrote:

> Hi Tim, > > On 20 nov, 12:53, Tim Wescott <t...@seemywebsite.com> wrote: >> >> Reverse-engineer the cut filters (and the pass filters, for that matter) >> and implement the filter that gives the right Bode plot. I'd suggest >> that you make sure you're implementing the right frequency response from >> end to end, not just internally in the z domain -- the sampling and >> reconstruction process preserves a system's pole locations, but the >> zeros can crawl around a lot, particularly if they start out at fairly >> high frequencies compared to the sampling rate. > > If I understood well, this involves redesigning the cut filters at all > time a slider is changed in position, which can be prohibitive at run > time (no MATLAB routines running on the hardware). > > Indeed, the way of implementing the many bands is in a semi-parallel > connection of filters (Dennis Bohn's paper in AES)... If I understand > well, I can keep the current way of designing the boost filters (maybe > with the corrections suggested in Sophocles Orfanidis paper in AES), > and when the setting is for a cut filter, implement it "directly", > maybe taking advantage of Greg Berchin's algorithm (which was > published in IEEE SP Magazine tips & tricks some time ago, and which > was also discussed here at comp.dsp). > > Am I in the right track? Did I understand your suggestions?
I think you did. And while you can't have MATLAB running in your box, you should have plenty of processor ticks lying around to update the filter design -- you don't have to redesign the filter at the sampling rate, only often enough (once every 10ms will probably be more than fine) to satisfy humans.
> >> Unless your sampling rate is significantly higher (10x, 100x or more) >> than your highest frequency of interest, trying to replicate an analog >> circuit's behavior _exactly_ in digital hardware is difficult, at best >> -- you're much better off starting from it's desired _behavior_ and >> designing to that. > > Well, the transfer functions in analog domain (s) are already available, > that is actually the starting point (to move to z). The really > interesting part of D. Bohn's paper is the connection to get rid of band > interaction, which involves several parallel filters, also in parallel > with the original input, not cascaded. For boost filters this is not a > problem, but for cut filters implementing each by each one generates > problems.
I get snarled up in approximations when I try to go straight from the s domain to z, at least when the frequency of interest gets reasonably high. OTOH, I know how to do it from spectra... -- Tim Wescott Control systems and communications consulting http://www.wescottdesign.com Need to learn how to apply control theory in your embedded system? "Applied Control Theory for Embedded Systems" by Tim Wescott Elsevier/Newnes, http://www.wescottdesign.com/actfes/actfes.html
Hello Vladimir,

On 20 nov, 19:45, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:
> Jaime Andr=E9s Aranguren Cardona wrote: > > >>Building the 31 bands of filtering of 1/3 octave each is a very > >>ineficient approach. The best way would be to approximate the desired > >>response with the parametric EQ sections. You only need 4 to 8 sections > >>in any practical sense. The other good way is a multirate filterbank. > > > Could you please elaborate more on the idea, I think I did not > > understand it. How can you control each band's response with only 4 to > > 8 sections? > > You approximate the desired response as a whole using several parametric > EQ sections. The 31 band graphic EQ is just the way of representation of > the frequency response; the actual filter structure may be completely > different.
I think I got the idea: use the 31 sliders to "draw" the desired response, but (internally) implement it with only a few parametrics. Thanks, JaaC