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.

IWR6843ISK: Pushing FFT Peaks to UART in 68xx High Accu Demo

Part Number: IWR6843ISK
Other Parts Discussed in Thread: IWR6843, IWR1642BOOST,

Hi Team,

Currently high accuracy demo gives 3 distances corresponding to 3 peaks in FFT. I would like to get the signal strengths corresponding to these peaks on UART for diagnostic purposes. To implement this, I can see magArray[3] defined in function RADARDEMO_highAccuRangeProc_rangeEst() in the file RADARDEMO_highAccuRangeProc_priv.c

I am trying to push these three values just like 3 estimated ranges being pushed over UART. My modification are as under. I have placed comments to explain the modification and locations where I have modified. After processing, I will compare it with High Accu Demo GUI. I have below questions:

How do I process the magArray after receiving on UART, how does magArray is storing the values of magnitudes?

// Modified the function as below


void RADARDEMO_highAccuRangeProc_rangeEst(
IN RADARDEMO_highAccuRangeProc_handle *highAccuRangeHandle,
OUT float * estRange,
OUT float * estRange1,
OUT float * estRange2,
OUT float * deltaPhaseEst,
OUT float * estLinearSNR,
OUT float * estmag,
OUT float * estmag1,
OUT float * estmag2)

// value of pointers assigned in the same function, after the three peak finder
*estmag = magArray[0];
*estmag1 = magArray[1];
*estmag2 = magArray[2];


// and changed corresponsing structures like below

typedef struct {
	uint32_t     fft1DSize;  					/**< 1D FFT size*/
    float rangeEst;
    float rangeEst1;
    float rangeEst2;
	float deltaPhaseEst;
	float linearSNRest;
	float fft1Dinput[2 * MAX_FFT1D_SIZE];
	float magEst;
	float magEst1;
	float magEst2;
} radarProcessOutput_NetworkLink_t;

// basically removed any errors due to undefined or mismacthes in both dss and mss projects
// finally below code in MmwDemo_transmitProcessedOutput()

/*send signal strengths*/
    {
        MmwDemo_detectedObj dummySignalStrOut;
        int32_t tempmag, tempmag1, tempmag2;

        tempmag                         =   (int32_t)(outputData->magEst);
        tempmag1                        =   (int32_t)(outputData->magEst1);
        tempmag2                        =   (int32_t)(outputData->magEst2);
        memset((void *)&dummySignalStrOut, 0, sizeof(MmwDemo_detectedObj));
        // signal strength magnitudes;
        dummySignalStrOut.rangeIdx   =   (uint16_t) tempmag & 0xFFFF;
        dummySignalStrOut.x             =   tempmag >> 16;

        dummySignalStrOut.peakVal       =   (uint16_t) tempmag1 & 0xFFFF;
        dummySignalStrOut.y             =   tempmag1 >> 16;

        dummySignalStrOut.dopplerIdx    =   (uint16_t) tempmag2 & 0xFFFF;
        dummySignalStrOut.z             =   tempmag2 >> 16;

  • Hi,

    In general, since these are intermediate values, it is likely that you will not be able to equate them to real-world values since they are often unitless stepping-stones in the processing. I am saying that is always the case, but as general guidance, be aware of this when interpreting these values. To get started with outputting, reading, and interpreting these values, I would recommend that you first utilize CCS debug to compare the values you are reading over UART to the actual values in CCS, to ensure you are transmitting and receiving them properly. I will also dig a bit deeper into how to interpret these values and will provide some info no later than friday.

    Best Regards,
    Alec

  • Hi Alec,

    Thank you for your response. I will try to debug further. 

    Regards,

    Kamlesh

  • So, I checked the 12 bytes in the UART Data for the corresponding code, I get this:

    0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x79 [byte position format is given in the original post: Lower two bytes of three ranges, then upper bytes of three ranges]

    The above data gives very low values. Thinking

    This doesn't make sense, as you said. I checked the signal strength using high acc demo visualiser, while keeping the sensor in same position but need to change the binary (used prebuilt binary for IWR6843) as you know it wont work with my customized binary: The Signal strength graph looks like this:

    Three peaks are around: 2.955M, 762K, 351K. So that's the issue. Could you please also point me to source code of high acc demo visualizer?

    Regards,

    Kamlesh

  • Kamlesh,

    All GUI's made in GUI Composer can be found in the gallery on the following page.

    https://dev.ti.com/gallery/

    Just search for the visualizer you are using, and click the download button at the bottom.

    Best Regards,
    Alec

  • Hi Alec, Any updates on this " I will also dig a bit deeper into how to interpret these values and will provide some info no later than friday.

    Regards,

    Kamlesh

  • Kamlesh,

    My apologies for the delay, got lost in my todo pile after we discussed the GUI composer info. My understanding, is that since the mags used for magarray are intermediate values, they do not strictly have units until later processing occurs. The goal of the mag values here are to compare to each other in order to identify which peaks are largest, and since they are compared only to each other, the exact units or magnitudes are irrelevant. 

    Best Regards,
    Alec

  • Hi Alec,

    I tested the similar variable on the IWR16xx high accuracy demo code. Actually, I have IWR1642BOOST which makes debugging little easier. I was able to extract the FFT max info from the DSS to MSS. This value was very high but it was changing with the target distance as expected. So I assume, this was the correct value (may be with some scaling).

    // this is being printed from DSP core
    
    Debug: maxPower_est: 32447064440832.0010 sigPower_Est: 72669101817855.9899
    Debug: Sigpower: 512
    Debug: Range_est: 2.0861

    The high accuracy visualizer was showing max signal strength around 3M (scaled version of maxPower_est variable). When maxPower_est was around 10x10^13, high accuracy visualizer was showing value around 10M and so on. So definitely, some scaling factor is present.

    In few days, I will test this with the 3 range demo code (the update demo code where it gives three peaks instead of only one), on IWR6843ISK. Will report back.

    Regards,

    Kamlesh  

  • Hi,

    Got little busy with some other tasks. I tested the 3 range demo code with IWR6843: Here are the values for mag array elements:

    t1: 48876761382912.0040, t2: 27427371745279.9976, t3: 1673075490816.0000
    t1: 47363297116159.9934, t2: 31136231194624.0008, t3: 1486734098432.0002
    t1: 49009095868416.0054, t2: 29935016083456.0037, t3: 1677587382272.0001
    t1: 48604848848895.9968, t2: 30091455234047.9970, t3: 1677307674624.0001
    t1: 181963505664.0000, t2: 146818760704.0000, t3: 127011184640.0000
    t1: 55535747072.0000, t2: 12265901056.0000, t3: 3173355264.0000
    t1: 18493464576.0000, t2: 4568092672.0000, t3: 1812226560.0000
    t1: 66377605120.0000, t2: 10885369856.0000, t3: 3286271744.0000
    t1: 115150848000.0000, t2: 11721607168.0000, t3: 1154550400.0000
    t1: 58444529664.0000, t2: 5260211200.0000, t3: 2474296320.0000
    t1: 84726136832.0000, t2: 33209452544.0000, t3: 5705296384.0000
    t1: 109071826944.0000, t2: 30851174400.0000, t3: 16397664256.0000
    t1: 87487266816.0000, t2: 36449787904.0000, t3: 2761467904.0000
    t1: 84823392256.0000, t2: 18205841408.0000, t3: 7583228416.0000
    t1: 62429401088.0000, t2: 21514272768.0000, t3: 6508230144.0000
    t1: 60089393152.0000, t2: 24533897216.0000, t3: 10981157888.0000
    t1: 100608901120.0000, t2: 36279803904.0000, t3: 17410232320.0000
    t1: 84999471104.0000, t2: 21239216128.0000, t3: 9580211200.0000
    t1: 84759953408.0000, t2: 30376876032.0000, t3: 15410282496.0000
    t1: 90286243840.0000, t2: 37146640384.0000, t3: 16375027712.0000
    t1: 62280122368.0000, t2: 26705758208.0000, t3: 1447445760.0000
    t1: 63073484800.0000, t2: 28761202688.0000, t3: 7865857536.0000
    t1: 32573292544.0000, t2: 8750342144.0000, t3: 7068973568.0000
    t1: 1054460084224.0000, t2: 242255183872.0000, t3: 210431410176.0000
    t1: 29426639175679.9996, t2: 14191462187008.0018, t3: 1306570784768.0001
    t1: 46838195421184.0034, t2: 31443126321152.0016, t3: 2211514941439.9999
    t1: 47966232510464.0007, t2: 29206901686272.0013, t3: 1648106274816.0000
    t1: 47191959797759.9919, t2: 29330302304255.9981, t3: 1626388168704.0000

    t1, t2 and t3 are equal to magarray[0], magarray[1], and magarray[2]. The values reduced when I put my hand over the antenna (can be seen in the data obtained).

    Regards,

    Kamlesh