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

Sigma Studio Medium Size EQ calculations

SigmaDSP & SigmaStudio larmac Jun 7, 2021 00:00 7 replies Original on forum ↗
Subscribe
larmac Question
Jun 7, 2021 00:00

Hello

I'm lookig for equations used to calculate coefficients for the Medium Size EQ component of the SigmaStudio:

https://wiki.analog.com/resources/tools-software/sigmastudio/toolbox/Filters/MediumSizeEq

I'd like to control it from external host MCU.

Is there any individual manual available ?

My device: ADAU1787.

Thanks for help!

Best regards

Mariusz

Rocha Reply
Jun 8, 2021 00:00

Hi Mariusz

I worked on the equalizer calculations for use with the microcontroller a few days ago,

I used this t Excel spreadsheet calculator, and also this documentation Calculating filter coeficents

Tips:

a) Each EQ band needs to be calculated separately

b) Each type of filter has different mathematical formulas like Paramatric / Peek, Low Pass, High Pass and so on...

In my case, this does not correspond to Sigma Studio output values, some cases the last byte value is not the same, there is difference "Sigma Studio outputs 00 00 00 FD and my result is 00 00 00 FC" (rounding I think ), but does not cause any problem), in other cases the formula results in totally different values.

So, after calculate, compare vaues it with Sigma Studio outputs

The following attached image shows the html page of the equalizer, which I use in real time, I can use all kinds of filters, however there is still no selection in the html page, because it is static on html code.

Rocha Reply
Jun 8, 2021 00:00

Hi Mariusz

I worked on the equalizer calculations for use with the microcontroller a few days ago,

I used this t Excel spreadsheet calculator, and also this documentation Calculating filter coeficents

Tips:

a) Each EQ band needs to be calculated separately

b) Each type of filter has different mathematical formulas like Paramatric / Peek, Low Pass, High Pass and so on...

c) For easy load presets, i sugest you use function parameters like filter( filterType, filterGain, filterQuality ), on some cases you need more parameters

In my case, this does not correspond to Sigma Studio output values, some cases the last byte value is not the same, there is difference "Sigma Studio outputs 00 00 00 FD and my result is 00 00 00 FC" (rounding I think ), but does not cause any problem), in other cases the formula results in totally different values.

So, after calculate, compare vaues it with Sigma Studio outputs

Attached unfinished spreadsheet calculations pdf

The following attached image shows the html page of the equalizer, which I use in real time, I can use all kinds of filters, however there is still no selection in the html page, because it is static on html code.

PDF

TCPi-Mute-Gain-Equalizer.png
TCPi-Mute-Gain-Equalizer.png
1.72.png-185x240x2.png
1.72.png-185x240x2.png
larmac Reply
Jun 9, 2021 00:00

Hi, Thanks a lot for this valued help!

larmac Reply
Jun 9, 2021 00:00

Hi Rocha

do you know why the SigmaStudio inverts signs of A1 and A2 coeffcients ?

Please see the attached screenshots:

coef.png
coef.png
Rocha Reply
Jun 9, 2021 00:00

Why? i cant tell you, but is realy inverted ( negative and positive number ), i have done all calculations, also checked, if you want any help, send a friend request,

ADIApproved Reply
Jun 9, 2021 00:00

Hi larmac,

Comparing to convention, the a1 and a2 coefficients for all second-order filters in SigmaStudio need to be inverted before being written to DSP memory. It ends up being fewer instructions/cycle this way.

So, what you enter in the "IIR Coefficient" window has the a1 and a2 coefficients will match the output of most filter designers; then these are inverted during compile time. (If you are using a microcontroller, your code should do this inversion too.)

If I might ask, are there any documentation sources you checked before asking here? This question comes up often. We've created various posts and Wiki pages with this info, but if you're finding documentation which didn't make this clear, I'll try to update that.

Regards,

Joshua

larmac Reply
Jun 10, 2021 00:00

Hi Joshua

thanks for explanation. The only documentation I have looked at was the wiki:

https://wiki.analog.com/resources/tools-software/sigmastudio/toolbox/Filters/General2ndorder

but I have omitted the info about inverting of the a1 and a2 probably by short lapse of concentration. I'm working also with limited resources :-)

Make it bold on the page please.

Thanks again!

Regards

Mariusz