Other Parts Discussed in Thread: AWR2243, MMWCAS-RF-EVM,
Hi, Experts!
cascade_radar_object_detect example of PROCESSOR_SDK_RADAR_03_08_00_00 is being used, AWR2243 MMWCAS-RF-EVM and companion MMWCAS-DSP-EVM are used.
We want to improve the range accuracy in the "cascade_radar_object_detect usecase" by applying zeropadding in the fft algorithm. And I hope to compute the fft over 512 samples (256 valid samples and 256 zeros). The same problem was raised in the following discussion, but no feasible solution was proposed in the end.
The following are my code modifications:
- PROCESSOR_SDK_RADAR_03_08_00_00\vision_sdk\apps\src\rtos\radar\src\alg_plugins\alg_fxns\radarfft2.c
This code specifies the number of EVE horizontal fft points, in which radarWidth=numAdcSamples (set to 256). I added a 2U * at line 8 of the following code.
Before adding 2U, numHorzPoints=248, numPointsZeroPadding=8;
After adding 2U, numHorzPoints=248, numPointsZeroPadding=264;
uint32_t numZeroPoints = AlgorithmFxn_RadarFftFindNextPowerOf2( pRadarParams->radarWidth[i]) - pRadarParams->radarWidth[i]; pObj->numPoints[chId][i] = pRadarParams->radarWidth[i] + (numZeroPoints % 8U) - 8U; ...... nextPowerOf2 = 2U*AlgorithmFxn_RadarFftFindNextPowerOf2( pObj->numPoints[chId][currProfile]); switch(nextPowerOf2) { ...... case FFT_TI_NUM_POINTS_512: coeffAddr = (UInt8*) algLinkParams->algCreatePrm[0]. windowCoeffAddr[RADAR_FFT_NUM_POINTS_512]; break; case FFT_TI_NUM_POINTS_256: coeffAddr = (UInt8*) algLinkParams->algCreatePrm[0]. windowCoeffAddr[RADAR_FFT_NUM_POINTS_256]; break; ...... } pInArgs = &pObj->pProcessInArgs->inAlgArgs[0].inArgs; pInArgs->numPointsZeroPadding = nextPowerOf2 - pObj->numPoints[chId][currProfile]; ...... pInArgs->bufDescription.numHorzPoints[0] = pObj->numPoints[chId][currProfile];
I noticed that the following code for implementing fft in eve also mentioned numPointsFFT=numHorzPoints+numPointsZeroPadding
PROCESSOR_SDK_RADAR_03_08_00_00\ti_components\algorithms\eve_sw_01_20_01_00\apps\fft\algo\src\fft_alg.c
numActualPoints = fftInArgs->bufDescription.numHorzPoints[0]; numPointsFFT = numActualPoints + fftInArgs->numPointsZeroPadding;
- PROCESSOR_SDK_RADAR_03_08_00_00\vision_sdk\apps\src\rtos\radar\src\alg_plugins\alg_fxns\radardspcascademimo\radarDspCascadeMimo.c
I think after adding zeropadding, the number of rangebins should also be changed to 512 accordingly, so I made the modifications in the following code.
pObj->chObj[chId].numRangeBins[profId] = (UInt16) (2U*AlgorithmFxn_RadarDspCascadeMimoFindNxtPower ( (UInt32)pLinkCreateParams->chCreateParams[chId]. numAdcSamples[profId]));
- PROCESSOR_SDK_RADAR_03_08_00_00\vision_sdk\apps\src\rtos\radar\include\alg_fxns\radarDspCascadeMimo_if.h
I also noticed that a macro was defined in the following file, specifying DSP process max rangebins, which seems to be a variable used to calculate the size of the space when allocating output cache. I also changed it to 512.
#define ALGORITHMFXN_RADAR_DSP_PROCESS_MAX_RANGEBINS (512U)
After making the above modifications, the radar seems to be stuck after opening the TFDTP connection, We are unable to perform any operations on the serial communication window, and unable to receive any data from the network.
May I ask if there are any other changes that we should make or if there are any errors in my modifications.
Thanks and Regards!