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.

Compiler/AWR1642: TIDEP-0092: Is the output SNR of MmwDemo_detectedObjActual always greater than zero?

Part Number: AWR1642

Tool/software: TI C/C++ Compiler

Hi all,

  We now use the SRR demo of awr1642. We would like to use the rangeSNRdB, dopplerSNRdB, and sinAzimSNRLin in the data structure of MmwDemo_detectedObjActual_t. The C code  noted that the rangeSNRdB and dopplerSNRdB are the Log2 function of linear snr value, which I thought they can be negative value. However the data type of them are uint16_t. Is that means the rangeSNRdB and dopplerSNRdB value are always greater than zero? Why is this case?  Below is the data structure definition.

*/
typedef struct MmwDemo_detectedObjActual_t
{
uint16_t rangeIdx; /*!< @brief Range index */
uint16_t dopplerIdx; /*!< @brief Doppler index */

uint16_t range; /*!< @brief Range (meters in oneQformat) */
int16_t speed; /*!< @brief Doppler (m/s in oneQformat) */
int16_t sinAzim; /*!< @brief wx sin(Azim). Q format provides the bitwidth. */

uint16_t peakVal; /*!< @brief Peak value */

uint16_t rangeSNRdB; /*!< @brief Range SNR (dB) */
uint16_t dopplerSNRdB; /*!< @brief Doppler SNR (dB) */
uint16_t sinAzimSNRLin; /*!< @brief omega SNR (linear scale) */

int16_t x; /*!< @brief x - coordinate in meters. Q format provides the bitwidth. */
int16_t y; /*!< @brief y - coordinate in meters. Q format provides the bitwidth. */
int16_t z; /*!< @brief z - coordinate in meters. Q format provides the bitwidth. */

} MmwDemo_detectedObjActual;

  • Hi Katie,

    Detected points have an SNR that greater than the CFAR-Threshold factor. Since the CFAR-Threshold is at least 12 dB, there is no likelihood of negative SNR.

    You can review how we compute the SNR in the function cfarCa_SO_dBwrap_withSNR (in dss_data_path.c). The SNR is only computed if the threshold is met. The relevant lines are shown below.

            if ((uint32_t) (inp[idxCUT]) > ((sum >> (const2 - 1)) + const1))
            {
                out[outIdx] = idxCUT;
                outSNR[outIdx] = inp[idxCUT]  - (sum >> (const2 - 1));
                outIdx++;
            }

    Regards

    Anil