This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PGA460: Calculate BPF and LPF coeficients

Part Number: PGA460

I am developing a custom PGA460 gui application to work with my current design.

I have already finished several parts but I am having problems knowing how I should calculate all registers between BPF_A2_MSB and LPF_B1_LSB. How should I get those values in case of changing Band/low pass filter?

  • Hi Pablo,

    If you are using the low-frequency range of 30-80kHz, then the PGA460 automatically calculates and updates the BPF and LPF coefficient values based on the transducer frequency and band-pass filter bandwidth register values, which updates the coefficients anytime these register values change.

    You only need to manually update the A2 BPF coefficient if you are using the high-frequency range of 180-480kHz. The PGA460 EVM GUI includes a CSV file look-up table for the coefficient values, or you can use the following equation: A2_Coeff_at_8kHz = (-0.001*f^3) + (0.658*f^2) + (63.5*f) - 39877

    See the following E2E post for a related discussion on the high-frequency coefficients: https://e2e.ti.com/support/sensors/f/1023/p/819254/3034908

  • Thank you Akeem,

    Sadly the embedded implementation we have writes the whole profile every time we power up the PGA460. MCU writes the registers in order and we write frequency and filters right before coeficients. So it could happens that we write wrong values and erase the right ones calculated by the PGA460 itself.

    That is why I need to understand how to calculate them so I always get the right ones.

    I have checked the post you mentioned, if I am not wrong, there are 2 B1 (BPF and LPF), 2 A2 (BPF and LPF) and 1 A3 (BPF). I should have (at least) 5 equations to get the whole set of values.


    In that post I have found this 2 equations:

    • B1=199.7*bw+12
    • A3=-399.3*bw+65512

    Both for the BPF.

    Also, for A2 BPF:

    • A2= (0.6036*cf^2) +( 2.7401*cf) -32615           ….           For BPF Bandwidth  2kHz.
    • A2= (0.5999*cf^2) + (2.7217*cf) -32415           ….           For BPF Bandwidth  4kHz.
    • A2= (0.5965*cf^2) + (2.6791*cf) -32217           ….           For BPF Bandwidth  6kHz.
    • A2= (0.5928*cf^2) - (2.6726*cf) -32024            ….           For BPF Bandwidth  8kHz.

    Values changes depending on BPF frequency. That is ok, I can keep track of those values in the application. 

    What is about LPF equations?

    In the excel file there is only coeficients for high freq sensors.

  • Hi Pablo,

    Here are the coefficient details on the DSP filters:

    BAND-PASS FILTER BANDWIDTH COEFFICIENT

    The Band-Pass filter works based on digital coefficients B1, A2 and A3. These are calculated based on the burst frequency (FREQ parameter) and Band-Pass bandwidth (BPF_BW parameter). The A2 coefficient is calculated as following (most complicated):

    A2=0.6036*cf^2+ 2.7401*cf-32615 …. For BPF Bandwidth 2kHz.
    A2=0.5999*cf^2+ 2.7217*cf-32415 …. For BPF Bandwidth 4kHz.
    A2=0.5965*cf^2+ 2.6791*cf-32217 …. For BPF Bandwidth 6kHz.
    A2=0.5928*cf^2- 2.6726*cf-32024 …. For BPF Bandwidth 8kHz.

    Where “cf” is the filter center frequency in kHz (Defined by the FREQ parameter).

    The B1 and A3 coefficients are calculated purely based on the filter band-width:

    B1=199.7*bw+12
    A3=-399.3*bw+65512 

    Where “bw” is the filter band-width in kHz (Defined by the BPF_BW parameter). Since there will be only four B1 and four A3 coefficients it might be worth to simply store the values instead of doing the calculation. In this case, below are listed the correct values for the B1 and A3 coefficients:

    B1 = 409 ; A3 = 64718        ….           For BPF Bandwidth 2kHz.

    B1 = 813 ; A3 = 63909        ….           For BPF Bandwidth 4kHz.

    B1 = 1213 ; A3 = 63111     ….           For BPF Bandwidth 6kHz.

    B1 = 1607 ; A3 = 62322     ….           For BPF Bandwidth 8kHz.

    It is important to note that these are scaled-up coefficient values. The true B1, A2 and A3 values are always low number values (typically < +/- 2). The scaling is the following:

                    B1 = B1_real * 2^16

                    A2 = A2_real * 2^14

                    A3 = A3_real * 2^16

    In the digital filter implementation the values are scaled-down right before their use.

    LOW-PASS FILTER CUTOFF COEFFICIENTS

    The Low-Pass filter works based on digital coefficients B1, A2. These are calculated based on the Low Pass Filter Cutoff frequency (LPF_CO parameter). They are calculated as following:

    B1=101.3*co+2
    A2=202.7*co-32765

    Where “co” is the filter cutoff frequency in kHz (Defined by the LPF_CO parameter). Since there will be only four B1 and four A2 coefficients it might be worth to simply store the values instead of doing the calculation. In this case, below are listed the correct values for the B1 and A2 coefficients:

    B1 = 103 ; A2 = -32563      ….           For LPF Cut-Off 1kHz.

    B1 = 205 ; A2 = -32359      ….           For LPF Cut-Off 2kHz.

    B1 = 306 ; A2 = -32156      ….           For LPF Cut-Off 3kHz.

    B1 = 407 ; A2 = -31955      ….           For LPF Cut-Off 4kHz.

    All three coefficients need to be rounded to a 16 bit precision in the process of calculation.

    On Power-Up the PGA460 device calculates the values of A2 and B1 and places them in the LPF_A2_xxx and LPF_B1_xxx registers respectively. The Low-Pass filter then operates based on the values in these registers. It is possible for the user to overwrite the values in the above registers and reconfigure the filter. In this case the PGA460 device does not take any action. However if the LPF_CO parameter is changed the coefficient calculation sequence needs to be re-run and the device re-populates the registers above.

    Just like the BPF, the LPF coefficients are scaled-up values. The true B1 and A2 values are always low number values (typically < +/- 1). The scaling is the following:

    B1 = B1_real * 2^15

    A2 = A2_real * 2^15

    In the digital filter implementation the values are scaled-down right before their use.