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.
Hi,
I want to extract azimuth angle FFT input in OOB demo.
Here, angle FFT input mean the result finished to process doppler and gain/phase compensation.
I have extracted angle FFT input by below additional code('AoAProcDSP_processMultipleVirtualAntennas' in 'aoaprocdsp.c').
/* RX channel gain/phase offset compensation. */
AoAProcDSP_rxChanPhaseBiasCompensation(&aoaDspObj->dynLocalCfg.compRxChanCfg.rxChPhaseComp[0],
DPParams->numVirtualAntAzim + DPParams->numVirtualAntElev,
&res->angleFftIn[0],
&res->angleFftIn[0]);
/*Original code*/
static void myfunc(const int32_t * v_in){
double _Complex k1,k2,k3,k4,k5,k6,k7,k8;
k1 = v_in[0] + v_in[1]*I;
k2 = v_in[2] + v_in[3]*I;
k3 = v_in[4] + v_in[5]*I;
k4 = v_in[6] + v_in[7]*I;
k5 = v_in[8] + v_in[9]*I;
k6 = v_in[10] + v_in[11]*I;
k7 = v_in[12] + v_in[13]*I;
k8 = v_in[14] + v_in[15]*I;
}
myfunc(&res->angleFftIn[0]);
But it seems that this is not result I want.
I think input of azimuth angle fft has 'cmplx32ImRe_t ' type.
So, all I have to do is extracting every 32bytes (alternately real part and imaginary part).
Please let me know if I have any mistakes.
I show my environment for reference.
[Radar]
[SDK]
mmwave_sdk_03_03_00_03
[Loading image ]
‘…\ti\mmwave_sdk_03_03_00_03\packages\ti\utils\ccsdebug\xwr18xx_ccsdebug.bin’
[Demo]
'...\ti\mmwave_industrial_toolbox_4_2_1\labs\out_of_box_demo\68xx_mmwave_sdk_dsp'
[CCS]
8.3.1.00004
[config]
Hi Kazuki-san,
The input to the angle FFT is an array of type cmplx32ReIm_t as shown below from aoaprocdsp.h.
/*! @brief Pointer for angle (azimuth and elevation) FFT input buffer. \n Size: sizeof(cmplx32ReIm_t) * DPU_AOAPROCDSP_NUM_ANGLE_BINS\n Byte alignment Requirement = @ref DPU_AOAPROCDSP_BUFFERS_BYTE_ALIGNMENT */ cmplx32ReIm_t *angleFftIn;
This datatype is defined in packages\ticommon\sys_types.h as below. So 32 bytes for real data, followed by 32 bytes for complex data.
/*! @brief Complex data type. This type of input, (first real than * imaginary part), is required for DSP lib FFT functions */ typedef struct cmplx32ReIm_t_ { int32_t real; /*!< @brief real part */ int32_t imag; /*!< @brief imaginary part */ } cmplx32ReIm_t;
So you should be able to save this buffer in the following code from CCS memory window for your experiment, but need to use the same data type i.e. cmplx32ReIm_t for interpreting it.
/* RX channel gain/phase offset compensation. */ AoAProcDSP_rxChanPhaseBiasCompensation(&aoaDspObj->dynLocalCfg.compRxChanCfg.rxChPhaseComp[0], DPParams->numVirtualAntAzim + DPParams->numVirtualAntElev, &res->angleFftIn[0], &res->angleFftIn[0]); /* Save elevation symbols before doing Azimuth FFT.*/ if(DPParams->numVirtualAntElev > 0) { memcpy((void*)&elevationSymbols[0], (void*)&res->angleFftIn[DPParams->numVirtualAntAzim], DPParams->numVirtualAntElev * sizeof(cmplx32ReIm_t)); } /* Zero padding */ memset((void *) &res->angleFftIn[DPParams->numVirtualAntAzim], 0, (DPU_AOAPROCDSP_NUM_ANGLE_BINS - DPParams->numVirtualAntAzim) * sizeof(cmplx32ReIm_t)); /* 3D-FFT (Azimuth FFT) */ DSP_fft32x32((int32_t *)res->angleTwiddle32x32, DPU_AOAPROCDSP_NUM_ANGLE_BINS, (int32_t *) &res->angleFftIn[0], (int32_t *) &azimuthFftOut[0]);
Regards
-Nitin
Hi nitin-san,
Thank you as always.
I have already verified by data type you suggested.
But the results were same.
/*sample code*/
static void myfunc(const cmplx32ReIm_t * v_in){
double _Complex k1,k2,k3,k4,k5,k6,k7,k8;
k1 = v_in[0].real + v_in[0].imag*I;
k2 = v_in[1].real + v_in[1].imag*I;
k3 = v_in[2].real + v_in[2].imag*I;
k4 = v_in[3].real + v_in[3].imag*I;
k5 = v_in[4].real + v_in[4].imag*I;
k6 = v_in[5].real + v_in[5].imag*I;
k7 = v_in[6].real + v_in[6].imag*I;
k8 = v_in[7].real+ v_in[7].imag*I;
}
myfunc(&res->angleFftIn[0]);
I'm concerned these are not input data for angle FFT.
I want to extract only azimuth direction inputs and I understand it matches consecutive numbers from '0' to '7'.
Is my understanding correct?
Regards,
Kazuki
Kazuki-san,
This is the input to the angle FFT and each symbol represents the Doppler FFT hypotheses for azimuth virtual antenna n (n = 0 - 7) after gain, phase and Doppler compensation.
You can see that the DSP_fft32x32 function is called on this array to perform the FFT. I'm not sure what result are you expecting (or what verification you are trying to perform), but please note a couple of things:
1. The array is zero padded to length DPU_AOAPROCDSP_NUM_ANGLE_BINS before sending it for FFT.
2. Again, not sure what about the objective of your verification and what values are you expecting in this array so please clarify.
Regards
-Nitin