SBAA497B May   2021  – April 2022 PCM3120-Q1 , PCM5120-Q1 , PCM6120-Q1 , TLV320ADC3120 , TLV320ADC5120 , TLV320ADC6120

 

  1.   Trademarks
  2. 1Introduction
  3. 2Infinite Impulse Response Filters
    1. 2.1 Digital Biquad Filter
  4. 3TLV320ADCx120 and PCMx120-Q1 Digital Biquad Filters
    1. 3.1 Filter Design Using PurePath Console
      1. 3.1.1 Example Generating Programmable Biquad Coefficients Using PurePath Console
    2. 3.2 How to Generate N0, N1, N2, D1, and D2 Coefficients with a Digital Filter Design Package
    3. 3.3 Avoid Overflow Conditions
    4. 3.4 Digital Biquad Filter Allocation to Output Channel
    5. 3.5 Programmable Coefficient Registers for Digital Biquad Filters 1–6
    6. 3.6 Programmable Coefficient Registers for Digital Biquad Filters 7–12
  5. 4How to Program the Digital Biquad Filters on the TLV320ADCx120 and PCMx120-Q1
  6. 5Typical Audio Applications for Biquad Filtering
    1. 5.1 Parametric Equalizers
  7. 6Crossover Networks
  8. 7Voice Boost
  9. 8Bass Boost
  10. 9Removing 50 Hz–60 Hz Hum With Notch Filters
  11.   A Digital Filter Design Techniques
    1.     A.A Analog Filters
  12.   B Related Documentation
  13.   B Revision History

How to Generate N0, N1, N2, D1, and D2 Coefficients with a Digital Filter Design Package

When using a Digital Filter Design Package, such as MATLAB®, to generate an IIR biquad coefficients follow these steps:

  1. Compute the coefficients [b0, b1, b2, a0, a1, a2] with a filter design function, such as the MATLAB butter function to design a Butterworth filter with cutoff at 1 kHz of a system running at 48 kHz. Note that MATLAB coefficients are normalized with a0 = 1.
    [b, a] = butter( 2, 1000 / (48000/2) )
    
  2. Convert these coefficients to [N0, N1, N2, D1, D2] by dividing:
    • GUID-D5F433CB-51F5-4A33-B52E-079CD8E59713-low.gif
    • GUID-B1B0550D-6577-41CA-9DB2-3D61F52D214B-low.gif
    • GUID-6BD65C2E-5ED1-4A85-A69D-DF606F9BE21F-low.gif
    • GUID-8D32613C-606C-4E54-B74E-1175D9001088-low.gif
    • GUID-97D43008-F489-4014-962F-FF5B93982D62-low.gif
  3. Convert the coefficients to Q31 by multiplying by 231.
  4. Round to nearest integer and convert to a 32-bit two's complement hexadecimal format:
    • For positive integers, convert to hexadecimal format.
    • For negative integers, take the absolute value of the coefficient, convert it to binary, negate it, add one, and convert to hex.