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.

AWR1642BOOST: How to calculate azimuth heat map

Part Number: AWR1642BOOST
Other Parts Discussed in Thread: AWR1642

Hello Support Team,

I'm using AWR1642BOOST and the demo in SDK 3.5.

I'd like to compute the same Azimuth-Range Heatmap as in Demo Visualizer.

I receive the TLV of the Azimuth-Range Heatmap but I have somme issues of understanding it and computing the data.

I have read the code below:

function getAzimuthStaticHeatMap(payload, numTxAzimAnt, numRxAnt, numRangeBins, numAngleBins, nearEndCorr)
[r c] = size(payload);
if(r<c)
payload = payload';
end

numVirtualAntenna = numTxAzimAnt * numRxAnt;
q = payload;
q = q(1:2:end)+q(2:2:end)*256;
q(q>32767) = q(q>32767) - 65536;
q = 1j*q(1:2:end)+q(2:2:end); %Imaginary first, real second
q = reshape(q, numVirtualAntenna, numRangeBins);

Q = fft(q, numAngleBins);

%Near field corrected
q1=q;
q2=q;
q1(5:8,:) = 0;
q2(1:4,:) = 0;
Q1 = fft(q1, numAngleBins);
Q2 = fft(q2, numAngleBins);
Qcorr = Q1 + Q2.* nearEndCorr;

return

 


Here is my question:

I understand 'payload' is the data(A-R heat map TLV) i receive from UART,but how can i know the right value of the other parameters?

And what is the meaning of nearEndCorr?

Looking forward to your reply!

  • Hello Chenming,

    For starters, you could look at the vast variety of similar questions answered by our experts on this forum. Just use your search engine to type :

    "site e2e.ti.com How to calculate azimuth heat map"

    Please let us know if this helped or if you need any further information.

    Regards,

    Ishita

  • Hello Ishita,

    Thanks for the advice,now I have understood most of the code snippet.

    But I still have this question:

    'nearEndCorr' is used for near field correction,and I find MmwDemo_nearFieldCorrection(MmwDemo_DSS_DataPathObj *obj,uint32_t detIdx2) defined in dss_data_path.c from the demo in SDK3.5.

    This function is doing near field correction as well,but very different from this code snippet:

    q1=q;
    q2=q;
    q1(5:8,:) = 0;
    q2(1:4,:) = 0;
    Q1 = fft(q1, numAngleBins);
    Q2 = fft(q2, numAngleBins);
    Qcorr = Q1 + Q2.* nearEndCorr;

     

    So I still don't know what nearEndCorr is,and what value I should set to it.

  • Hello Ishita,

    Now i just ignored near filed correction,and tried to run this code snippet:

    numVirtualAntenna = numTxAzimAnt * numRxAnt;
    q = payload;
    %q = q(1:2:end)+q(2:2:end)*256;
    %q(q>32767) = q(q>32767) - 65536;
    q = 1j*q(1:2:end)+q(2:2:end); %Imaginary first, real second
    q = reshape(q, numVirtualAntenna, numRangeBins);

    Q = fft(q, numAngleBins);

    %Near field corrected
    q1=q;
    q2=q;
    q1(5:8,:) = 0;
    q2(1:4,:) = 0;
    Q1 = fft(q1, numAngleBins);
    Q2 = fft(q2, numAngleBins);
    %Qcorr = Q1 + Q2.* nearEndCorr;

    figure('Name','Azimuth Static Heatmap')
    %Q = frame(frameIdx).azHeatmap.Q;
    NUM_ANGLE_BINS = size(Q,1);
    theta = asind([-NUM_ANGLE_BINS/2+1 : NUM_ANGLE_BINS/2-1]'*(2/NUM_ANGLE_BINS));
    range = rangeBin2Meters;
    posX = range' * sind(theta');
    posY = range' * cosd(theta');
    xlin=linspace(-floor(range(end)),ceil(range(end)),200);
    ylin=linspace(0,ceil(range(end)),200);
    [X,Y]=meshgrid(xlin,ylin);

    QQ = fftshift(abs(Q),1);
    QQ=QQ.';
    QQ=QQ(:,2:end);
    Z=griddata(posX,posY,QQ,X,Y,'linear');
    hAzimuthHeatmapPlot = surf(xlin,ylin,Z);
    shading INTERP
    view([0,90])
    axis('equal')
    axis([-ceil(range(end)) ceil(range(end)) 0 ceil(range(end))])
    xlabel('Range X-Axis [m]');
    ylabel('Range Y-Axis [m]');
    titleStr = sprintf('Frame %d, Azimuth Static Heatmap', frame(frameIdx).header.frameNumber);
    title(titleStr)

    Then here comes an error: rangeBin2Meters is not defined.

    This is a pre-defined parameter in Visualizer source code,right?

    But i just can't find where to download the source code in https://dev.ti.com/gallery/ 

    How can i get it?

    Thanks!

  • Hello Source code of visualizer is available in offline mode of the tool, please go to Help->download offline version. There you can find the javascript and other files which contain backend source of this tool.

    ANd further you can visit mmw demo user guide for more detail apart from the available soruce code/doxygen.

    Regards,

    Jitendra

    Regards,

    Jitendra

  • Hello Jitendra,

    Thanks for your advice!

    I've download the source code of visualizer,but I still cannot find the code snippet I mentioned before.

    And I searched in "mmWave_Demo_Visualizer",there is no such function called "getAzimuthStaticHeatMap".

    Actually,there is no .m file in this folder.

    Do I get the wrong files?

  • Hello,

    All the main signal processing is being done within the device at DSP core, and high level object data list are being sent over UARt to the PC (visualizer).

    So for FFT equivalent code, look for mmWave SDK source code.

    Regards,

    Jitendra

  • Hello Jitendra,

    Maybe i didn't describe my question clearly before.

    I know the main signal processing is being done within the device at DSP core,but AWR1642 only send raw signal data of azimuth heat map to the PC.

    So Demo Visualizer has to calculate azimuth heat map using the data it receive on the PC,which is exactly what i want to do by myself.

    The answer in IWR6843ISK: Range Azimuth Heat Map: How to parse TLV and compute data gave the code snippet that i mentioned above.

    Now i want to get the whole source code because i cannot run this code snippet without rangeBin2Meters .

    Chenming

  • Hello,

    That function may be available in older version of Visualizer or in different tool.

    However you can refer the existing version source (*.js) from Chrome DevTool option to find the equivalent source codes.

    Apart from that I can't help you much.

    Regards,

    Jitendra

  • Hello,

    I just cannot understand why this problem would take so long......

    I get the code snnippet from  IWR6843ISK: Range Azimuth Heat Map: How to parse TLV and compute data answered by Amanda,and all I want is to know how to get the whole source code which contents that snippet.

    However that question has been locked.

    So if you cannot help me much,could you please ask Amanda to check my question?

    Thanks

  • Hello,

    OK,I have found the code snippet.

    In visualizer3.5,the function is called processAzimuthHeatMap......

    Thanks for your help.