2nd order peaking filter coefficients calculations

Hi,

I'm currently using a 2nd order peaking filter for doing EQ on a project. As part of that I need to calculate the IIR coefficients to send to the DSP and I'm having problems. Currently the calculations I'm using are the ones from the spreadsheet that I have attached however when I compare the values that are calculated using that to the values the SigmaStudio calculates there is some discrepancy. Through some testing I have found that the alpha value that is calculated from the spreadsheet seems to be completely wrong after a frequency of about 4kHz. 

I can't seem to find any other equations for alpha other that the sin(omega)/2Q that the spreadsheet uses and was wondering whether that value is correct. If not, what alpha value am I meant to be using.

I've attached the spreadsheet that I'm using for the calculations along with the one I have been testing with if that is useful.

 Any help on this would be greatly appreciated.

Regards,
James

XLSXXLS

  • +1
    •  Super User 
    on Mar 25, 2021 3:11 PM

         Hello James,

         If the SigmaStudio calculations you're referring to appear like this:

    although it's called a Peaking filter here, the more appropriate term is, Parametric filter.  Most likely this is the type of filter desired for your project -- the kind found in both parametric equalizers and those "graphic" EQs with sliders.  Unfortunately this confusing nomenclature (Peaking vs. Parametric) is found both in SigmaStudio and the literature generally.

         Notice that the Parametric filter has both a Gain -- the amplification of all frequencies -- as well as a Boost -- the peak or dip in the response, analogous to the slider's position in graphic EQs.  By contrast, the Peaking filter is a sort of bandpass filter -- its Gain refers to its highest response in the passband, while frequencies away from the passband are rejected.  Such filters can be found in crossovers and sidechains, but less often for EQ.

         If you use the spreadsheet's Parametric columns to the far left of the spreadsheet, you'll find results much closer to those which SigmaStudio's Fixed Point Filter Generator provides for the same input parameters of Gain, Boost, Frequency, Fs, and Q.  They may differ a bit past the third decimal place or so, yet I haven't found any problem with them.  The Parametric columns of the spreadsheet date back years, to an ADI alumnus whom I always mention as the support engineer who helped me so much some seven years ago.  I have since added columns for a few other types of filters.

         Best regards,

         Bob

  • Hi Bob,

    Thanks for your reply.

    It was the confusing nomenclature that got me! That set of calculations at the left of the spreadsheet are the ones that I should have used all along. I have updated my project and they work exactly as we were wanting them to and give the values that are expected.

    Thanks for your help

    Regards,
    James