AnsweredAssumed Answered

AD9361 filters configuration in NO-OS

Question asked by Quang_Hieu on Sep 24, 2016
Latest reply on Sep 27, 2016 by Quang_Hieu

Hi all,

    I'm studying about ZEDBOARD and ADFMCOMMS2-EBZ module. I want to BPSK modulation to modulate data and I design LTE20 filters using Matlab app ( I used phase Equalization options),and I save the result in filter.tfr, the filter.ftr has some information, It includes TX RX GAIN INT DEC RTX RRX BWTX(RX) coefficients  and 2 column but I don't know what column is Tx coefficients or Rx coefficients because I want to use it to modify in NO-OS, so I decide the first column is tx coefficients and the second is rx coefficients. Then I copy it to NO-OS, modify  "Rate & BW Control" part in default_init_param using the  RTX and RRX part in filter.ftr , this is what I modified:

 /* Rate & BW Control */
{983040000, 491520000, 245760000, 122880000, 61440000, 30720000},//uint32_t rx_path_clock_frequencies[6] *** adi,rx-path-clock-frequencies
{983040000, 245760000, 245760000 , 122880000 , 61440000 , 30720000},//uint32_t tx_path_clock_frequencies[6] *** adi,tx-path-clock-frequencies

 

     Additionally, I modify rx_fir_config table and tx_fir_config tables using parameters in filter.ftr, this is what I modified: 

AD9361_RXFIRConfig rx_fir_config = { // BPF PASSBAND 3/20 fs to 1/4 fs
3, // rx
-6, // rx_gain
2, // rx_dec
{-8,-23,-20,-24,10,19,30,-3,
-29,-45,-10,37,65,28,-42,-91,
-55,42,121,93,-35,-155,-142,16,
191,205,16,-226,-284,-67,256,378,
142,-278,-489,-245,286,617,385,-272,
-764,-570,228,930,815,-139,-1118,-1143,
-17,1336,1596,284,-1597,-2263,-757,1929,
3367,1709,-2378,-5618,-4286,2826,12962,20813,
21945,15800,6035,-2015,-4860,-2799,946,2970,
2076,-362,-2026,-1684,21,1422,1386,174,
-1002,-1143,-281,698,936,334,-472,-758,
-350,303,604,342,-178,-471,-317,87,
358,282,-24,-263,-242,-17,186,200,
41,-125,-159,-53,78,122,55,-44,
-89,-50,19,62,42,-3,-42,-32,
-7,28,21,13,-20,-19,-22,-9
}, // rx_coef[128]
128, // rx_coef_size
{983040000 , 491520000 , 245760000 , 122880000 , 61440000 , 30720000}, //rx_path_clks[6]
19365514 // rx_bandwidth
};

 

AD9361_TXFIRConfig tx_fir_config = { // BPF PASSBAND 3/20 fs to 1/4 fs
3, // tx
0, // tx_gain
2, // tx_int
{-5,-2,3,21,35,40,20,-11,
-36,-28,8,47,48,2,-58,-74,
-21,65,106,50,-68,-143,-91,62,
183,146,-44,-225,-216,9,264,303,
47,-299,-407,-130,322,529,245,-329,
-671,-403,309,833,615,-252,-1019,-903,
139,1237,1303,65,-1505,-1897,-436,1866,
2891,1193,-2428,-4991,-3303,3502,12812,19866,
20770,15079,6075,-1468,-4363,-2754,575,2556,
1974,-111,-1686,-1557,-147,1146,1259,288,
-777,-1021,-360,512,822,387,-318,-652,
-383,175,506,359,-73,-382,-322,2,
278,278,43,-193,-231,-69,125,184,
80,-74,-141,-80,36,102,73,-10,
-69,-62,-6,44,49,14,-24,-36,
-15,17,39,37,25,6,1,-5
}, // tx_coef[128]
128, // tx_coef_size
{983040000 , 245760000 , 245760000 , 122880000 , 61440000 , 30720000}, // tx_path_clks[6]
19365438 // tx_bandwidth
};

 

To verify these filters:

- First I use loop back to verify my design is ok, the result shows BPSK very clearly ( I use ad9361_bist_loopback(ad9361_phy,1) command and script to capture and draw using Excel, I also attach images), every bit is on max amplitude (2047 or 0x07ff) or min amplitude (-2048 or 0x0800) and all bits are correct with original data.

- Second I don't use loop back and don't use filter, the result is not clearly.

- Last, I don't use loop back and use filters, I  use ad9361_trx_load_enable_fir(ad9361_phy,rx_fir_config,tx_fir_config) to enable these filters and draw, but It is not clearly, some bit is not correct and the BPSK also not clearly.

    I attached my main.c and excel, figure about my result, I followed all instructions on MATLAB design wizard but I don't know whether I make some mistakes or not. If the filters are correct, so what I need to do in oder to get the right results. I think the problem may be gain because I read the reference manual, but I don't know how to configure it. If you have any Idea please hint me or show me how to deal with it. Thanks you for reading.

 

Regards, 

Hieu Tang

Outcomes