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.

AWR1642: Azimuth static heatmap format

Part Number: AWR1642

Hi

I would like to use the Azimuth static  heatmap to estimate the target reflect radio phase for all of the RX antennas so than I can use the phase delta to calculate more accurate target arrive angle. But I take a look at the demo doc,  it just show below information, but I do not know the sequence of the complex information for each range and virtual antenna. For example, I use the AWR1642 SRR profile, the length of these heatmap that I get from the TLV element is 8192 byte, so if the Range FFT size is 256, it means the number of virtual antenna is 8. My question are:

(1) The data sequence of the heat map is R1[0],R2[0],R3[0],R4[0],R1[1],R2[1].....R1[255],R2[255],R3[255],R4[255], VR1[0],......? or other format?

(2) The heatmap that I get totally are 4096 complex information, 0~2047 complext data has value on there but 2048 ~4095 are all zero, is that correct?

(3) If I want to get the target which the range gate index is for example 100, is that mean the phase of each Antenna I can get from the complex[ 100* 4 ] for R1, Complex[100*4+1] for R2?  

(4) Can I use the phase different of each Antenna to get mode acurate target Target arrive angle by asin(DeltaPhase*Landa/(2*pi&d))?

Azimuth static heatmap

Type: (MMWDEMO_OUTPUT_MSG_AZIMUT_STATIC_HEAT_MAP)

Length: (Range FFT size) x (Number of virtual antennas) (size of cmplx16ImRe_t)

  • Hi Chianan Chang,

    Data from ADC buffer depends on the IQ format option chose in the ADC config parameter. Eventually what is sent out as part of SDK demo might depend on what is done in the Out of Box demo code.
    We will get back to you on that.

    Can you please explain the #4 step a bit further to achieve more accuracy.

    Thank you,
    Vaibhav
  • Hi Chianan,

    (1) The data sequence of the heat map is R1[0],R2[0],R3[0],R4[0],R1[1],R2[1].....R1[255],R2[255],R3[255],R4[255], VR1[0],......? or other format?
    A) Yes, if only 1 Tx and 4 Rx are used. If 2 Tx, and 4 Rx are used, then the above sequence changes to R1[0],R2[0],R3[0],R4[0],R5[0],R6[0], R7[0], R8[0], R1[1], .... You can find the implemenation of the azimuth heat-map in the OOB demo in the file dss_data_path.c at line 1725.


    (2) The heatmap that I get totally are 4096 complex information, 0~2047 complext data has value on there but 2048 ~4095 are all zero, is that correct?
    A) No. That is not expected. You should 'nRx x 256' complex data samples (nRx is the number of 'synthesized antennas'. For e.g. In the 1Tx, 4Rx, case nRx = 4. In the 2Tx, 4Rx, case nRx=8). Each complex data sample consists of two 16 bit numbers (I and Q). Please check if the bitwidth and the 'nRx' is correct.

    (3) If I want to get the target which the range gate index is for example 100, is that mean the phase of each Antenna I can get from the complex[ 100* 4 ] for R1, Complex[100*4+1] for R2?
    A) Yes, if you've configured 1Tx, 4Rx. For other cases, the number of 'synthesized recievers' may be different. Be aware that 'C language' uses '0 based indexing'.

    (4) Can I use the phase different of each Antenna to get mode acurate target Target arrive angle by asin(DeltaPhase*Landa/(2*pi&d))?
    A) Yes, you can estimate angle of arrival in this manner. But if there are more than one object in that range-velocity bin, then the angle estimate is likely to be wrong. Also, your accuracy would be limited by how you estimate delta-phase. if you are interested in very accurate angle estimates, look up algorithms like root-MVDR, or root-MUSIC.


    Regards,
    Anil
  • Hi Anil

    Thanks for your quickly response. Below is the configure file that I used, the channelCfg 15 30 0 use 4 RX and 2 TX antenna , is that right? so the sequency should be R1[0],R2[0],R3[0],R4[0],R5[0],R6[0], R7[0], R8[0], R1[1], .... is that right?

    The information for the (2) that I send you is wrong, I get the TLV length is 8192 byte=4096 Int = 2048 complex. So the total length should be correct if I have 8 RX( 2TX and 4RX), but the strength thing is the complex[1024]~complexp2043] are all zero. It means if I use R1[0],R2[0],R3[0],R4[0],R5[0],R6[0], R7[0], R8[0], R1[1], sequence, the last half of the range bin will have no data.

    sensorStop
    flushCfg
    dfeDataOutputMode 1
    channelCfg 15 3 0
    adcCfg 2 1
    adcbufCfg 0 0 1 1
    profileCfg 0 77 3 3 56 0 0 8 1 256 5000 0 0 10
    chirpCfg 0 0 0 0 0 0 0 1
    chirpCfg 1 1 0 0 0 0 0 2
    frameCfg 0 1 64 0 100 1 0
    lowPower 0 0
    guiMonitor 1 1 1 1 0 1
    cfarCfg 0 0 8 4 4 0 6000
    cfarCfg 1 0 8 4 4 0 6000
    peakGrouping 1 0 0 1 224
    multiObjBeamForming 0 0.5
    calibDcRangeSig 0 -5 8 256
    sensorStart

  • Hi Chianan, 

    1) As per your configuration, you are right - the sequence should be  R1[0],R2[0],R3[0],R4[0],R5[0],R6[0], R7[0], R8[0], R1[1], ...

    2) There is a small error in the config file that you send. 

    profileCfg 0 77 3 3 56 0 0 8 1 256 5000 0 0 10

    The AWR1642 has a minimum Rx Gain of 30 dB (not 10 dB). It is recommended for SRR applications that you use upto 44 dB of rx gain.

    profileCfg 0 77 3 3 56 0 0 8 1 256 5000 0 0 44 

    Other than this the configuration looks fine. 

    3) I checked range-azimuth data with your configuration, and I am seeing the necessary 2048 complex samples per frame. Could you tell us how you collect these samples?

    Regards,

    Anil

  • Hi Anil

    Thanks to correct me for the RX gain, I will modify it.

    Below is the code that I collect the Azimuth data that  parsing the packet of the TLV

    case (int)MessageType.MMWDEMO_OUTPUT_MSG_AZIMUT_STATIC_HEAT_MAP:

    if (TLVLength == (RangeFFTSize * VirtualAntenna *2*2*2))
    {
    NewPacket.AzimuthHeatmapFlag = true;
    short[] tmp=new short[RangeFFTSize * VirtualAntenna * 2*2];
    NewPacket.AzimuthHeatmap = new Complex[RangeFFTSize * VirtualAntenna*2];

    Buffer.BlockCopy(TempBuf, TLV_Start + 8, tmp, 0, RangeFFTSize * VirtualAntenna * 2*2);


    int k;
    for (k=0;k< RangeFFTSize * VirtualAntenna*2;k++)
    {
    NewPacket.AzimuthHeatmap[k]= new Complex(tmp[k * 2],tmp[k*2+1]);

    }

    //Buffer.BlockCopy(TempBuf, PatternIndex + TLV_Start + 8, NewPacket.AzimuthHeatmap, 0, RangeFFTSize * VirtualAntenna* Marshal.SizeOf(typeof(ComplexStruct)));

    }

  • Hi Chianan,

    I've made some changes to your code. If you've set the number of virtual antennas to 8, then there is a factor of 2 error in the calculation of the total number of samples.


    RangeFFTSize = 256;
    VirtualAntenna = 8; // In TDM MIMO case.

    // The total size is given by 8 x 256 x 4 bytes

    if (TLVLength == (RangeFFTSize * VirtualAntenna*2*2))
    {
        NewPacket.AzimuthHeatmapFlag = true;
        // The total number of samples are given by 8 x 256 x 2 int16

        short[] tmp=new short[RangeFFTSize * VirtualAntenna * 2];
        NewPacket.AzimuthHeatmap = new Complex[RangeFFTSize * VirtualAntenna];
        Buffer.BlockCopy(TempBuf, TLV_Start + 8, tmp, 0, RangeFFTSize * VirtualAntenna * 2 * 2);
        int k;// The total number of complex samples is 8 x 256.

        for (k=0;k< RangeFFTSize * VirtualAntenna;k++)
        {
            NewPacket.AzimuthHeatmap[k]= new Complex(tmp[k * 2],tmp[(k * 2) +1]);
        }
    }

     

    Regards,

    Anil

  • Hi Anil

          Thanks to let me know the virtual antenna is 8 and modify the code. But I knew the virtual antenna that I set is wrong (4) so I always add multiply 2 in the code. Anyway, my major question is below wish you can know what the problem it is.

    The information for the (2) that I send you is wrong, I get the TLV length is 8192 byte=4096 Int = 2048 complex. So the total length should be correct if I have 8 RX( 2TX and 4RX), but the strange thing is the complex[1024]~complexp2043] are all zero. It means if I use R1[0],R2[0],R3[0],R4[0],R5[0],R6[0], R7[0], R8[0], R1[1], sequence, the last half of the range bin will have no data.

  • Hi Chianan,

    Could you share two sets of information?

    1. The raw 8192 bytes of the 'Azimuth static heatmap' input. (all 8192 bytes from TempBuf).

    2. NewPacket.AzimuthHeatmap (all 2048 Complex samples).

    Regards,

    Anil

  • Hi Anil

    I find there is a bug in my code so than I can not copy all of the heapmap to the array that I have. Sorry for that mistake. Finally I get all of the heatmap information. I will check if I can use it to calculate more accurate target angle if the target is a single target with same range and vehicle.

    Thanks.

  • Hi Anil

    Sorry to bother you again. After I solve the bug of my code, I try to use phase different to measure more accurate target angle of arrival  by using  asin(DeltaPhase*Landa/(2*pi&d)) , for example r1,r2,r3,r4 is the phase of the detect target that I get from the Azimuth static heatmap of the detect target ( there is ony one point target in the same range ) for the RX antenna 1,2,3,4. I use the phase different and related distance of antenna to calculate the angle of arrival. But I can not get the similar angle when compare with the angle that I calculate by using the atan( y/x ) ( y and x is the x,y position that I get from of MmwDemo_detectedObj). I'm not sure do we really can get the angle of arrival by using the Azimuth static heatmap or not, because the Azimuth static heatmap is the FFT index 0 value of the 2D FFT for the range index. Or I need to use the 1D FFT than I can get the Angle of arrival?

    Another question,  root-MVDR, or root-MUSIC. seems need a lot of computing, do you think the performance of the AWR1642 is enough or not?

  • Hi Chianan,

    You can get the angle of arrival using the Azimuth static heat map. In fact, it is computed in the 'Visualizer plot' using the same data (after an 3D FFT). Could you share the code to find 'deltaphase'?

    If the number of objects are limited, the C674x DSP should be able to do MVDR and MUSIC.

    Regards,
    Anil
  • Hi Anil
    I use the following code to get the Azimuth heatmap from the TLV packet to a complex arrray NewPacket.AzimuthHeatmap
    for (k=0;k< RangeFFTSize * VirtualAntenna;k++)
    {
    NewPacket.AzimuthHeatmap[k]= new Complex(tmp[k * 2+1],tmp[k*2]);
    }

    ******************************************************
    and GatNo is the detected target Range Index, than I compute the signal phase that arrive on the real 4 RX antenna show below
    r1 = NewPacket.AzimuthHeatmap[GatNo * Radar.VirtualAntenna ].Phase;
    r2 = NewPacket.AzimuthHeatmap[GatNo * Radar.VirtualAntenna + 1].Phase;
    r3 = NewPacket.AzimuthHeatmap[GatNo * Radar.VirtualAntenna + 2].Phase;
    r4 = NewPacket.AzimuthHeatmap[GatNo * Radar.VirtualAntenna + 3].Phase;

    Than I compute the phase different and caculate the angle of arrival below:
    TmpR1R2 = r1 - r2; TmpR1R3 = r1 - r3;TmpR1R4 = r1 - r4;
    TmpR1R2 = Math.Asin(TmpR1R2 / (Math.PI)) * 180 / Math.PI;
    TmpR1R3 = Math.Asin(TmpR1R3/ (2*Math.PI)) * 180 / Math.PI;
    TmpR1R4 = Math.Asin(TmpR1R4/ (3*Math.PI)) * 180 / Math.PI;




    Another question, you mention "it is computed in the 'Visualizer plot' using the same data", I do not know what you mean. Can you explain more clear? thanks.
  • Hi Chianan,

    Isn't the number of virtual antennas 8?

    In your experiments, could you do these three things.

    1. Use a 'corner reflector' as the target. Also make sure that the test environment is clean. Clutter can affect the phase measurement significantly.
    2. Plot the magnitude of the complex numbers as a function of both 'virtual antennas' and 'range index'. Ideally at the location of the target there should be a peak in the magnitude.
    3. Place the target directly opposite the radar (azimuth of 0 degrees). Verify that the phase difference is close to zero.

    Ti has a tool called the Visualizer (dev.ti.com/gallery/view/534566/mmWave_Demo_Visualizer/) which can plot the 'Azimuth range matrix'. It uses the same Azimuth heat map data, as what you are using.

    Regards
    Anil