Post Go back to editing

Custom FIR Filter on AD4170-4

Thread Summary

The user is troubleshooting issues with a custom FIR filter on the EVAL-AD4170-4 eval board. The final answer clarifies the different FIR modes (odd/even symmetric/antisymmetric, asymmetric) and their coefficient handling, the 24-bit two's complement format of coefficients, and constraints such as a maximum of 72 coefficients and single-channel operation. The user asks if a similar scaling constraint (coefficients summing to 2^22) from the AD7768-1 applies to the AD4170-4.
AI Generated Content
Category: Hardware
Product Number: AD4170-4

Hallo

I am trying to setup an AD4170-4 ADC on the EVAL-AD4170-4ARDZ Eval Board to use a custom FIR filter.

I did manage to set up a simple voltage input and filtering with the default FIR filter and with the Example_56_SymEven.csv filter file which is shipped with the ACE software. If I try to use a filter file with a custom filter, I do not get the expected results.

For the filter design I tried various online and offline tools, which output the filter coefficients as floats. Parallel to the ACE software I'm using the AD7768_Filter_Model.xlsl which is not designed for the AD4170, but the analysis shows similar behavior as the test with the ACE on the real ADC.

I have 3 questions about the coefficients that need to be loaded into the FIR registers, as I assume an error there isa causing my issues.

  1. The datasheet refers to the five programmable FIR options (odd/even asymmetric/antisymmetric coefficients and asymmetric coefficients). What is the difference between these modes in terms of coefficient handling inside the ADC and is there a difference of how and which coefficients I need to load on the slots in the coefficient register, besides the maximum length difference?
  2. The datasheet states that the coefficient is a 24-bit twos compliment. My assumption is that means a 24 value with one sign bit and 23 fractional bits, encoding range from -1 to +1.
    I would kindly ask you to elaborate on the format of the coefficients in more detail. Also, I was also wondering if I need to scale the values to sum up to a certain values, as this is required for the FIR filter int he AD7768.
  3. Is there something else (some additional constraints) that I need to be careful about when designing or loading the FIR into the AD4170-4. Maybe something that is not immediately clear from the information presented in the datasheet.
  • Hi  ,

    We will look into this and get back to you.

    Thanks,
    Francis

  • Hi  ,

    1. The different FIR modes in the AD4170‑4 define how the ADC internally interprets and reconstructs the coefficient set based on symmetry. In the symmetric modes, the device assumes the coefficients are mirrored about the center, so only half of the taps (plus the center tap for odd length) need to be loaded, with the remaining coefficients generated internally to reduce computation. In the antisymmetric modes, the same approach is used but the mirrored coefficients are applied with opposite sign, so only the independent half must be programmed while the ADC handles the sign inversion internally. In contrast, the asymmetric mode has no symmetry assumption, so all coefficients must be explicitly written.

    Below is the summarized version of the coefficient settings.

    • Odd Symmetric Coefficients
      Order Calculation: 2 * FIR_LENGTH - 2
      Symmetry: Coefficients are mirrored symmetrically (odd symmetry)
      Maximum Coefficients: 72
    • Even Symmetric Coefficients
      Order Calculation: 2 * FIR_LENGTH - 1
      Symmetry: Coefficients are mirrored symmetrically (even symmetry)
      Maximum Coefficients: 72
    • Odd Antisymmetric Coefficients
      Order Calculation: 2 * FIR_LENGTH - 2
      Symmetry: Coefficients are mirrored anti-symmetrically (odd anti-symmetry)
      Maximum Coefficients: 72
    • Even Antisymmetric Coefficients
      Order Calculation: 2 * FIR_LENGTH - 1
      Symmetry: Coefficients are mirrored anti-symmetrically (even anti-symmetry)
      Maximum Coefficients: 72
    • Asymmetric Coefficients
      Order Calculation: FIR_LENGTH - 1
      Symmetry: No symmetry constraints (fully asymmetric coefficients)
      Maximum Coefficients: 36 (approximately half of the other FIR types)

    In the FIR_CONTROL register, you'll have to select which type you are going to use together with the number of coefficients to use and the length. This are discussed in page 59-60 under User-Programmable FIR Filter.

    2. The FIR coefficients for the AD4170-4 are stored in a 24-bit two's complement format, allowing for both positive and negative values. It has one sign bit and 23 integer bits, but the range is from -223 to (223 - 1).

    3. When designing or loading a custom FIR filter, the following constraints and considerations must be addressed:

    • Only one channel can be enabled when using the FIR filter. Multi-channel configurations and the sequencer are not supported.
    • The FIR_LENGTH is capped at 72 coefficients.
    • Any write to the coefficient memory disables the default FIR filter. To restore the default filter, a device reset is necessary.

    Regards,
    Francis

  • Hi  

    Thank you for your detailed answer. This really clarifies a lot.

    I have one follow-up, regarding the scaling of the coefficients:

    Referring to the datasheet for the AD7768-1 (I understand this is a different ADC, but there is some additional material for FIR design on this ADC to be found. I just want to make sure I'm not missing anything for the AD4170-4), on page 61 of the Rev. B version:

    Filter coefficients are scaled such that the 56 coefficients must sum to 2^22. The total (112) coefficients, therefore, sum to 2^23.

    Is there a similar formatting / scaling constraint to be followed also for the AD4170-4? 

    Regards, 
    Gabriel