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.

AWR1843BOOST: In mmWaveStudio data capture, in "Packet 0", i choose CP_ADC_CQ, what should i do to read the binary file in MATLAB?

Part Number: AWR1843BOOST
Other Parts Discussed in Thread: DCA1000EVM

i use mmWaveStudio and DCA1000 to capture the binary file. Waveform format is 100frame * 128chirp * 512samples, "Packet 0" is set to "ADC_ONLY". I use "readDCA1000.m" to analysis the data in MATLAB, the data format is 4 *6553600. It's right.

However,   "Packet 0" is set to "CP_ADC_CQ", i still use "readDCA1000.m" to analysis the data in MATLAB, but the format is 4*7104000(not equal 6553600). 

Now i dont know how to analysis the binary file? Can you give me some suggestions?

%%% 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_1(fileName)
%% global variables
% change based on sensor config
numADCSamples = 256; % number of ADC samples per chirp
numADCBits = 16; % number of ADC bits per sample
numRX = 4; % number of receivers
numLanes = 2; % do not change. number of lanes is always 2
isReal = 0; % set to 1 if real only data, 0 if complex data0
%% read file
% read .bin file
fid = fopen(fileName,'r');
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);
fileSize = size(adcData, 1);
% real data reshape, filesize = numADCSamples*numChirps
if isReal
numChirps = fileSize/numADCSamples/numRX;
LVDS = zeros(1, fileSize);
%create column for each chirp
LVDS = reshape(adcData, numADCSamples*numRX, numChirps);
%each row is data from one chirp
LVDS = LVDS.';
else
% for complex data
% filesize = 2 * numADCSamples*numChirps
numChirps = fileSize/2/numADCSamples/numRX;
LVDS = zeros(1, fileSize/2);
%combine real and imaginary part into complex data
%read in file: 2I is followed by 2Q
counter = 1;
for i=1:4:fileSize-1
LVDS(1,counter) = adcData(i) + sqrt(-1)*adcData(i+2);
LVDS(1,counter+1) = adcData(i+1)+sqrt(-1)*adcData(i+3);
counter = counter + 2;
end
% create column for each chirp
LVDS = reshape(LVDS, numADCSamples*numRX, numChirps);
%each row is data from one chirp
LVDS = LVDS.';
end
%organize data per RX
adcData = zeros(numRX,numChirps*numADCSamples);
for row = 1:numRX
for i = 1: numChirps
adcData(row, (i-1)*numADCSamples+1:i*numADCSamples) = LVDS(i, (row-1)*numADCSamples+1:row*numADCSamples);
end
end
% return receiver data
retVal = adcData;

  • Hello,

    You need to understand first the format in which it gets stored to a binary file when it is captured from DCA1000EVM.

    Could you follow this FAQ (Q6) which lists the relavent document for ADC data format.

    https://e2e.ti.com/support/sensors/f/1023/t/856054

    Matlab script follows the same ADC data format to parse the data.

    Regards,

    Jitendra

  • I have read all the given materials, but i dont get the solution.

    I find some information about chirp quality metrics, as the figure below.

    Now the question is what's the chirp quality metrics format?

  • I have watched the video "A crucial step to effective mitigation". In the transcript, there is such a sentence "The CQ data can either be sent to the outside via the high-speed interface as part of the radar data."

    That's mean the CQ data is a part of radar data. The fact is that the data size that choose CP_ADC_CQ is bigger than those choosing ADC_ONLY. 

    My question is when use mmWave Studio to capture rawdata and "Packet 0" is set to "CP_ADC_CQ" ,the "readDCA1000.m" is no longer applicable, What should i do to interprete the captured binary file? 

  • There is no Matlab script to parse the CP_ADC_CQ data. But you can use mmWave Studio in-built Post-proc Tool to process this type of data.

    This PostProc button is available under SensorConfig Tab of mmwave Studio.

    Regards,

    Jitendra