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.

AWR2944EVM: AWR2944 threshold calculation and interpolation

Part Number: AWR2944EVM
Other Parts Discussed in Thread: AWR2944

Hi expert:

  My company are developing some applications using AWR2944,I have some questions when using SDK mmwave_mcuplus_sdk_04_02_00_03,

as below,

Q1: Why does the dB to linear formula is different between local maximum threshold and dopplerCFAR threshold?

local maximum threshold calculation in dopplerprochwaDDMA.c

/* 2D maximum value offset */ 
scratchVal = round(pow(10.0, (double)(obj->cfarAzimFFTCfg.localMaxCfg.azimThreshold)/20) * (1 << 10));
obj->dopplerAzimHwaCommonConfig.advStatConfig.max2DoffsetDim1 = -scratchVal;
scratchVal = round(pow(10.0, (double)(obj->cfarAzimFFTCfg.localMaxCfg.dopplerThreshold)/20) * (1 << 10));
obj->dopplerAzimHwaCommonConfig.advStatConfig.max2DoffsetDim2 = -scratchVal;

doppler CFAR  threshold calculation in mss_main.c

static uint16_t MmwDemo_convertCfarToLinear(uint16_t codedCfarVal) 
{
uint16_t linearVal;
float dbVal, linVal;

/* dbVal is a float value from 0-100dB. It needs to
be converted to linear scale..
First, recover float dbVal that was encoded in CLI. */
dbVal = (float)(codedCfarVal / MMWDEMO_CFAR_THRESHOLD_ENCODING_FACTOR);

/* Now convert it to linear value */
linVal = log2(pow(10, (dbVal / 20.0))) * (1 << 11) + 0.5;

linearVal = (uint16_t) linVal;
return (linearVal);
}

Q2:In Objectdetection.c  function DPC_ObjDet_estimateXYZ,  why is not necessary to change the value from log2 to linear when doing angle interpolation like other reference design (antilog2)

Q3:Is it possible to add interpolation mechanism in range and doppler calculation?

Thanks for reply.

Lin  Henry

  • Hi,

    Due to local holidays there will be delays in responding to this question

    Thank you

    Cesar

  • Hi, 

      Any update?

    Lin Henry

  • Hi Lin,

    Thank you for your patience. Please find my response to your questions:

    Q1) We will get back to you regarding this question by the 17th of November.

    Q2) The performance is similar in both the cases when using log2 or linear.

    Q3) Can you give me more context here regarding what you are trying to achieve? What/How are you trying to interpolate in range or doppler?

    Let me know if you have any further questions.

    Regards,

    Kaushik

  • Hi Kaushik,

      For question 3, we need more precise velocity and range results of detected objects,but the SDK for 2944  only output quantization results(index*resolution).

    Lin Henry 

  • Hi Lin,

    Thanks for the clarification. Interpolation should be possible after doppler FFT. During the range FFT, compression takes place, and it will not be possible to perform interpolation. 

    Regards,

    Kaushik

  • Hi Lin,

    We have an update regarding your question 1. Please find the changed db to linear conversion formula :

    doppler CFAR  threshold calculation in mss_main.c

    #define CONST_LOG2_10  (3.3219)

    linVal = (uint32_t)(dbVal/20.0 * CONST_LOG2_10 * 2048.0);

    Regards,

    Kaushik

  • Hi Kaushik:

      The changed of doppler CFAR formula is equivalent to above one only take the power tern out of (log2), I am asking the different between local maximum threshold calculation and Doppler CFAR threshold calculation . Can you help me clarify it?

    Lin Henry 

  • Hi Lin,

    Let me rephrase my answer to provide better clarity:

    Local maxima threshold:

    Before:

    scratchVal = round(powf(10.0f, (float)(obj->cfarAzimFFTCfg.localMaxCfg.azimThreshold)* (1.0f/20.0f)) * 1024.0f);

    obj->dopplerAzimHwaCommonConfig.advStatConfig.max2DoffsetDim1 = -scratchVal;

    scratchVal = round(powf(10.0f, (float)(obj->cfarAzimFFTCfg.localMaxCfg.dopplerThreshold)* (1.0f/20.0f)) * 1024.0f);

    obj->dopplerAzimHwaCommonConfig.advStatConfig.max2DoffsetDim2 = -scratchVal;

    Updated:

    #define CONST_LOG2_10 (3.3219f)

    scratchVal = round((float)(obj->cfarAzimFFTCfg.localMaxCfg.azimThreshold)* ((1.0f/20.0f) * CONST_LOG2_10 * 2048.0f));

    obj->dopplerAzimHwaCommonConfig.advStatConfig.max2DoffsetDim1 = -scratchVal;

    scratchVal = round((float)(obj->cfarAzimFFTCfg.localMaxCfg.dopplerThreshold)* ((1.0f/20.0f) * CONST_LOG2_10 * 2048.0f));

    obj->dopplerAzimHwaCommonConfig.advStatConfig.max2DoffsetDim2 = -scratchVal;

    Doppler CFAR threshold:

    Before:

    dbVal = (float)(codedCfarVal / MMWDEMO_CFAR_THRESHOLD_ENCODING_FACTOR);

    /* Now convert it to linear value */
    linVal = (uint32_t)(log2f(pow(10, (float)dbVal/20.0)) * additionalScaling * defaultScaling + 0.5);

    Updated:

    #define CONST_LOG2_10 (3.3219f)

    dbVal = (float)(codedCfarVal / MMWDEMO_CFAR_THRESHOLD_ENCODING_FACTOR);

    /* Now convert it to linear value */
    linVal = (uint32_t)(dbVal/20.0 * CONST_LOG2_10 * 2048.0);

    The dB to linear conversion in both the cases are reduced to the same form in the updated version.

    Thanks & regards,

    Kaushik