Post Go back to editing

How to write AD9361 FIR filter coeffs on no-OS driver?

Category: Choose a category

Hi, I want to setup TX FIR filter using no-OS driver on AD9361 chip.

To do that, I try generating a filter file from the AD9361 filter wizard GUI and loading it into the AD9361_TXFIRConfig tx_fir_config().

However, the FIR filter does not work correctly on the chip.

Please tell me what syntax in the no-OS driver script is required to work the FIR filter correctly!



fixed sentence representation
[edited by: kazucd57 at 4:26 AM (GMT -4) on 9 Sep 2022]
  • Thank you for your comment.

    I set FIRcoeffs below.

    In the FIRcoeffs, Assuming Fpass is 1 MHz, Fstop is 2 MHz and input-data-rate is 20MHz.

    Is there a problem with this coefficient?
    Moreover, is there anything else syntax required on the no-OS driver.?

    【FIR coeffs】

    AD9361_TXFIRConfig tx_fir_config = {
    3, // tx
    -6, // tx_gain
    1, // tx_int
    {-77,-39,-189,-185,-321,-325,-375,-287,
    -172,78,362,709,1001,1210,1219,1001,
    504,-224,-1117,-2016,-2748,-3094,-2873,-1934,
    -232,2194,5171,8444,11674,14508,16611,17732,
    17732,16611,14508,11674,8444,5171,2194,-232,
    -1934,-2873,-3094,-2748,-2016,-1117,-224,504,
    1001,1219,1210,1001,709,362,78,-172,
    -287,-375,-325,-321,-185,-189,-39,-77,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0}, // tx_coef[128]
    64, // tx_coef_size
    {1280000000,160000000,80000000,40000000,20000000,20000000}, // tx_path_clks[6]
    4011543 // tx_bandwidth
    };

  • Are you generating RX filter coefficients and loading them into AD9361? are you keeping receiver FIR coefficients in the Rx A filter structure AD9361_RXFIRConfig rx_fir_config?

    However, the FIR filter does not work correctly on the chip.

    can you please give more details on this?

  • Are you generating RX filter coefficients and loading them into AD9361?

    >>Yes. setting RXFIRcoeffs below.

    ==================================================================

    AD9361_RXFIRConfig rx_fir_config = {
    3, // rx
    -12, // rx_gain
    1, // rx_dec
    {-91,-62,-187,-281,-309,-477,-384,-461,
    -197,-78,348,606,1025,1172,1277,1000,
    553,-251,-1142,-2128,-2881,-3300,-3083,-2167,
    -419,2052,5127,8493,11837,14762,16942,18101,
    18101,16942,14762,11837,8493,5127,2052,-419,
    -2167,-3083,-3300,-2881,-2128,-1142,-251,553,
    1000,1277,1172,1025,606,348,-78,-197,
    -461,-384,-477,-309,-281,-187,-62,-91,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0}, // rx_coef[128]
    64, // rx_coef_size
    {1280000000,160000000,80000000,40000000,20000000,20000000}, // rx_path_clks[6]
    4034482 // rx_bandwidth
    };

    ==================================================================

    can you please give more details on this?

    >>

    Problem is that the bandwidth of the RF signal is not narrowed.

    Please look at the graph below.

    In this graph, red-line(reference) shows the target power spectrum using the MATLAB/Simulink simulation.


    However, the output of the AD9361 in the current configuration is wideband like black-line.

    Please let me know if you need any other information.

     

  • what is the signal bandwidth used in the above image?

    However, the output of the AD9361 in the current configuration is wideband like black-line.

    where did you measure the AD9361 output, is the Tx output plotted against MATLAB FIR response?

  • what is the signal bandwidth used in the above image?

    >> The signal bandwidth means occupied-band-width(OBW) for each line of the image. 

    where did you measure the AD9361 output, is the Tx output plotted against MATLAB FIR response?

    >>The measurement point is the output of an RF circuit, not the AD9361 output. In reality, the RF circuit (including BPF and amplifier etc.) is connected after the AD9361.

  • can you please confirm the sampling rate of the FIR filter and the waveform sampling rate, form the above graph it appears that the sampling rate is mismatched between the FIR filter and the waveform.

    Can you please share the FIR filter coefficients in .ftr format?

  • form the above graph it appears that the sampling rate is mismatched between the FIR filter and the waveform.

    >>OK, I will check it soon.

    Can you please share the FIR filter coefficients in .ftr format?

    >>The description below shows the output of .ftr file.

    ==========================================================

    # Generated with AD9361 Filter Design Wizard 16.1.3
    # MATLAB 9.12.0.1884302 (R2022a), 15-Sep-2022 08:48:16
    # Inputs:
    # Data Sample Frequency = 20000000 Hz
    TX 3 GAIN -6 INT 1
    RX 3 GAIN 6 DEC 1
    RTX 1280000000 160000000 80000000 40000000 20000000 20000000
    RRX 1280000000 160000000 80000000 40000000 20000000 20000000
    BWTX 4011543
    BWRX 20172411
    -77,12
    -39,-138
    -189,318
    -185,-435
    -321,398
    -325,-173
    -375,-250
    -287,830
    -172,-1450
    78,1924
    362,-2034
    709,1577
    1001,-438
    1210,-1341
    1219,3526
    1001,-5646
    504,7062
    -224,-7031
    -1117,4702
    -2016,340
    -2748,-8529
    -3094,19968
    -2873,-26769
    -1934,15636
    -232,15636
    2194,-26769
    5171,19968
    8444,-8529
    11674,340
    14508,4702
    16611,-7031
    17732,7062
    17732,-5646
    16611,3526
    14508,-1341
    11674,-438
    8444,1577
    5171,-2034
    2194,1924
    -232,-1450
    -1934,830
    -2873,-250
    -3094,-173
    -2748,398
    -2016,-435
    -1117,318
    -224,-138
    504,12

    ==========================================================

  • Please check the sampling rate differences between FIR and waveform, meanwhile, I will check the filter file.

  • Thank you for your help.

    I will check it.