[srslte-users] A question for the function ofdm_tx_slot()

谢鑫 xiexin_312 at sjtu.edu.cn
Fri Mar 19 02:24:37 UTC 2021


Hi srs team,
My srsLTE version is 20.10.1. I have a question for the function ofdm_tx_slot(srslte_ofdm_t *q, int slot_in_sf), this function is defined in /lib/src/phy/dft/ofdm.c
I call this function to generate a OFDM waveform. In order to ensure the output of this function is exactly what I want. I compare the result with my own MATLAB code.
In detail, in ofdm_tx_slot(), I assign a complex symbol vector to the q->temp, and print the output before CP is added. i.e., print the output after the fft normaliation.
at MATLAB, I assign the same complex symbol vector to the input of MATLAB fucntion ifft(innput, FFTsize) with FFT size = 768, the output is also normalized. Finally, I compare the two outputs, but it seems the result is not completely matched, the follwing is the first part of result:
matlab:[-0.102062 + 0.051031i;0.104086 + 0.049854i;-0.023902 - 0.113621i;-0.076457 + 0.087851i;0.116406 + 0.00879i;-0.062223 - 0.099306i;-0.043810 + 0.109609i;0.115795 - 0.029349i;]
srsLTE:[-0.102062 + 0.051031i;0.104288 + 0.049427i;-0.024830 - 0.113421i;-0.075372 + 0.088782i;0.116534 + 0.00688i;-0.064240 - 0.098012i;-0.041107 + 0.110651i;0.114907 - 0.032652i;]
It seems a little strange:  at the first point, it exactly matches, but with index increasing, the difference is more and more obviouse. Actually, in the end of this sequence (not shown above), the difference is significant.

To sum up, by using the same input, I compare the output of the function srslte_dft_run_guru_c() in ofdm_tx_slot() with the output of matlab fucntion ifft(), but the result is not matched exactly.
It seems not easy to check the code in srslte_dft_run_guru_c() line by line, I am not sure whether I have missed some key points to call that function, so could you give me some advices? my matlab code is very simple, just using ifft function, I check it many times, it should be not wrong.

Tanks a lot!

Best Regards!

xin xie




More information about the srsran-users mailing list