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.

AWR2243BOOST: 定义多个chirp时,如何解析所采数据

Part Number: AWR2243BOOST
Other Parts Discussed in Thread: DCA1000EVM

工程师你好,

我利用2243配合DCA1000EVM,在只配置1个chirp时,顺利完成采集,并借助Mmwave Radar Device ADC Raw Data Capture.pdf中给出的例程,完成了数据解析,

使用的是1x complex,

在matlab中,其中一个通道的数据长度为 data = 32000000 = 250 samples *1chirp * 128 chirploops * 1000 frames,

之后我利用reshape函数完成了data数据的拆分,

EchoCh1 = reshape(AdcData(1,:),[250,128,1000]);

再进行FFT后结果如下

之后,我设置了16个相同的chirp,进行同样预设参数下的采集(1x complex)

收到的一个通道的数据大小为 33554432 = 256 samples*16chirps*128chirploops*64frames,我同样用reshape函数完成了data数据的拆分,

EchoCh1 = reshape(AdcData(1,:),[256,16*128,64]);

但结果如下,

这似乎不对,值得注意的是,我在mmwavestudio中,用PostProc按钮给出的处理结果是完全正常的。

请问能否提供一下多个chirp定义使用时,接收数据的解析程序呢?

谢谢!

  • 请问能否提供一下多个chirp定义使用时,接收数据的解析程序呢?

    为了更精确地帮助您解决问题,我需要更多关于您的配置和具体处理步骤的信息。

  • 你好,以下是具体信息:

    配置方面请参考下图:

    值得一提的是,这个配置图是在设备离线情况下得到的,仅供说明用;实际采集时与该参数设置完全一致。

    采用16位 1x complex 采样。

    在chirp方面,我通过 start chirp 0 和 end chirp 15,完成16个相同的chirp的设置,

    在frame方面,启用0-15chirp,完成128次loop,共采集64frame数据。

    对数据的PostProc结果如下图所示:

    可以发现,左下角的1D FFT perchirp 结果是符合预期的。

    随后为了对所采集数据进行matlab处理,我进行了以下操作。

    ①利用Mmwave Radar Device ADC Raw Data Capture.pdf给出的例程,得到4通道的复数数据,例程代码如下:

    %%% This script is used to read the binary file produced by the DCA1000
    %%% and Mmwave Studio
    %%% Command to run in Matlab GUI - readDCA1000('<ADC capture bin file>')
    function [retVal] = readDCA1000(fileName)
    %% global variables
    % change based on sensor config
    numADCBits = 16; % number of ADC bits per sample
    numLanes = 4; % do not change. number of lanes is always 4 even if only 1 lane is used.
    % unused lanes
    isReal = 0; % set to 1 if real only data, 0 if complex dataare populated with 0
    %% read file and convert to signed number
    % read .bin file
    fid = fopen(fileName,'r');
    % DCA1000 should read in two's complement data
    adcData = fread(fid, 'int16');
    % if 12 or 14 bits ADC per sample compensate for sign extension
    if numADCBits ~= 16
    l_max = 2^(numADCBits-1)-1;
    adcData(adcData > l_max) = adcData(adcData > l_max) - 2^numADCBits;
    end
    fclose(fid);
    %% organize data by LVDS lane
    % for real only data
    if isReal
    % reshape data based on one samples per LVDS lane
    adcData = reshape(adcData, numLanes, []);

    % for complex data
    else
    % reshape and combine real and imaginary parts of complex number
    adcData = reshape(adcData, numLanes*2, []);
    adcData = adcData([1,2,3,4],:) + sqrt(-1)*adcData([5,6,7,8],:);
    end
    %% return receiver data
    retVal = adcData;

    %% 代码部分完毕

    ② 对得到的4通道复数数据处理,取通道1,第1帧的数据进行距离维的FFT,得到距离信息

    % 读入 .bin 文件
    FilePath = 'D:\试验\TI_DCA1000EVM_captured_Data\PostProc0314\';
    FileName = 'data17.bin'; % 33554432 = 256samples*16chirps*128chirploops*64frameloops
    FullFileName = [FilePath FileName];
    AdcData = readDCA1000(FullFileName);

    EchoCh1 = reshape(AdcData(1,:),[256,16*128,64]);

    ProfileCh1 = fft(EchoCh1(:,:,1),256);
    figure(1)
    imagesc(abs(ProfileCh1))
    figure(2)
    plot((1:length(ProfileCh1(:,1))),10*log10(abs(ProfileCh1(:,1))))
    xlabel 'range cell'
    ylabel 'amplitude in dB'
    title 'one chirp'

    %%代码部分完毕

    通过上述代码,我得到了最初问题描述中的结果,与PostProc的结果不一致,

    请问有什么好的解决办法吗?

    非常感谢!

  • 建议您检查一下FFT处理和数据重组

  • 请问可否提供给我2243采集回的*.bin文件的数据结构?否则我无法检查数据重组是否正确。

    另外,上述程序在处理仅定义单个chirp时,结果是正确的。这一点我在最初的问题描述中已经提及了。

  • 你好,我已找到问题所在,感谢Thumbsup