Misunderstanding between Coefficient table gen and independent filter changes
ADAU 1701 and Sigma Studio 3.14 on Win 7.
I would like to generate a table of coefficients for a IIR filter but the numbers I see from the table generator are very different then the numbers I get when simply changing the parameters in the schematic.
Perhaps I do not understand the usage of the table gen.
Here is an example...
I have inserted a general 2nd order, 1 channel Double Precision filter and when I set the parameters as Peaking, 18Hz, Gain -15 and Q of 4, the numbers sent to the 1701 are...
Cell Name: Filt_Ch2_B01
Param Name: EQ1940Single20B1
Param Address: 0x0025
Param Value: 5.2332878112793E-05
Cell Name: Filt_Ch2_B01
Param Name: EQ1940Single21B1
Param Address: 0x0026
Param Value: 0
Cell Name: Filt_Ch2_B01
Param Name: EQ1940Single22B1
Param Address: 0x0027
Param Value: -5.2332878112793E-05
Cell Name: Filt_Ch2_B01
Param Name: EQ1940Single21A1
Param Address: 0x0028
Param Value: 1.9994056224823
Cell Name: Filt_Ch2_B01
Param Name: EQ1940Single22A1
Param Address: 0x0029
Param Value: -0.999411106109619
Yet, when I use the same parameters to generate a table, the numbers I get look like...
Boost=-15
b0=0.177725911140442, 0x00 , 0x16 , 0xBF , 0xB9 ,
b1=-0.355406641960144, 0xFF , 0xD2 , 0x82 , 0x09 ,
b2=0.177681803703308, 0x00 , 0x16 , 0xBE , 0x47 ,
a1=1.99859857559204, 0x00 , 0xFF , 0xD2 , 0x14 ,
a2=-0.99860417842865, 0xFF , 0x80 , 0x2D , 0xBD ,
As you can see, these are very different.
The table generator doesn't seem to offer choices for single vs double precision, Butterworth vs Bessel (etc.)
Please, what am I doing wrong?
Note, Ultimately in production, (and I do have a working prototype) I am using a uP to program the 1701 so I really don't need the table generator as I can write a coefficient calculator in C to do the job, but I was toying with the idea of simply including a table.
Also, I think I may make a second thread asking how to get the freq, gain, and Q from the coefficients. I have written an interactive program so the end user can change these things and it'd be nice to calculate, for him, these parameters from coefficients read from the 1701.
Thanks, Mark.
Edit Notes
Fix Misspelling
[edited by: CoolJavelin at 6:29 PM (GMT 0) on 5 Jul 2019]
Hello Mark,
You're not doing anything wrong. The widely differing coefficients stem from a confusion I've noticed both in SigmaStudio and in audio DSP literature generally. Sometimes a parametric filter is referred to as a "Peaking EQ" filter. Thus the "Peaking" filter in the Table Generator is actually a parametric filter. To demonstrate this, the following graphic compares the coefficients of a General 2nd Order filter set to Parametric, boost of 10 dB (as high as it will go), frequency 18 Hz and Q of 4, with those of Table Generator's "Peaking" filter with the same inputs. You'll notice that the coefficients are identical except for the usual inversions going into the -1701:
The closest thing to an actual peaking filter in the Table Generator is the Bandpass Filter, specified in octave BW instead of Q. A Q of 4 corresponds to a BW of about 0.36 -- unfortunately the Table Generator's BW setting only goes to one decimal place. So for this example I settled for a BW of 0.4, comparing the Table Gen's coefficients to those of a General 2nd Order Filter set for Peaking and a Q of 3.6:
Again, the coefficients compare nicely, so we see that the Table Gen's Peaking Filter is actually a "Peaking EQ" (parametric) Filter, and its Bandpass Filter is much like the General 2nd Order "Peaking" Filter. The important thing is that you have your uC calculating coefficients and safeloading them into the -1701 and thus your prototypes are working!
Best regards,
Bob
Bob, Thanks for assuring me I was not going batty. Your explanation sounds reasonable, and yes, I have noticed inconsistencies in filter descriptions on the web.
My application is going to have 15 peaking filters in series over 4 channels ranging from -12 to +12 db. or 60 total filters. (Actually, including some low pass filters there will be a few more.)
That is 375 'sets' of coefficients or 1875 32bit numbers. (I just did that math today)
Since my uP if a 16 bit machine that is 3750 words of FLASH. I really don't want to set aside that much precious resource for a table.
So, I am going to go with the "Calculate the coefficients on the fly" approach.
I guess the table idea is now moot.
Also, I have been storing the default coefficient parameters from Sigma Studio in the FLASH, and I just realized I don't have to do that either. I can simply store 60 gains, 1 frequency, and 1 Q and calculate everything else.
Thank you for helping me to see this unrelated improvement to my program.
Mark.
Please log in to reply.

