ΣSigmaStudio Ask AI Русский Log in

EVAL-ADAU1452REVBZ

SigmaDSP & SigmaStudio aashok Nov 11, 2019 00:00 4 replies Original on forum ↗
Subscribe
aashok Question
Nov 11, 2019 00:00

Hi,

One of our customers recently got this evaluation board and has some questions.

Are you unable to share the equations that are implemented on the ADAU1452? For example, equations for built-in parametric EQ's, HPF, LPF APF's... Basically all IIR Biquads.

The reason they are asking is because they design some filters in MATLAB and export their biquad coefficients and want to implement them in the ADAU DSP.

Thanks

Audio Signal Processors

adau1452

SigmaDSP Audio Processors

KJBob Reply
Nov 11, 2019 00:00

Hello,

The equations which SigmaStudio uses to calculate biquad coefficients are found here

When calculating your own coefficients using an external program, you can experiment with them by typing them into the IIR Coefficient box as shown below. Here the coefficients shown provide a parametric filter with unity gain, 10 dB of boost at 1 KHz, and a Q of 1.41:

.

Best regards,

Bob

filter.png
filter.png
aashok Reply
Nov 17, 2019 00:00

Hi Bob,

Thanks for sending this through.

I have a follow up question.

Customer has implemented the peaking filter transfer function in Python, and has a question. It appears that the peaking filter maximum is twice that of the gain that they have set. For example, if they set the gain to 2 dB, what is graphed shows a peak at 4 dB. See attached image for example.

They have been through the documentation for the Robert Bristow-Johnson method, and believe that there maybe some discrepancy in the definition of A with the wiki page (here) . For example, it is stated as:

A = 10^(dbGain/40) in the documentation.

But the Analog Devices Wiki page states:

gainlinear = 10^(gain/20)

where one assumes that the variable "gainLinear" refers to the variable A in the subsequent equations (since A isn't defined anywhere else on the wiki page)

When they change the definition of A in their script to match that of the Robert Bristow-Johnson method, the peaking filter has the correct gain (where gain was set equal to 2).

Could you please confirm that this is the case?

Thanks,

Arun

img2.png
img2.png
img1.png
img1.png
aashok Reply
Nov 25, 2019 00:00

Hi Bob, could you please answer my follow up question?

Ken.M Reply
Dec 12, 2019 00:00

Arun,

You are correct. A = 10^(dB_gain/40) for peaking and shelving filters only.

The expression

gain_linear = 10^(gain_dB/20)

just comes from rearranging the definition of a decibel:

gain_dB = 20*log10(gain_linear)

In other words, the linear gain is just the gain in dB expressed as a linear value. While this is generally a true statement, this is not always the definition of A in the biquad equations. Please see (a copy of) RBJ's original notes here. After the heading "Then compute a few intermediate variables," item 1 mentions that there is an extra sqrt() term in peaking and shelving filters only that explains the discrepancy.

The wiki is confusing because it defines gainLinear without ever defining A. I'll get that sorted out.

Ken