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: Best practice for modifying the demo source code.

Part Number: AWR2944EVM
Other Parts Discussed in Thread: AWR1843BOOST, AWR2944

Tool/software:

Hi,

I'm working on the AWR2944EVM Out-of-Box demo and would like to integrate on chip STFT (and later Matching Pursuit) into the DPC. I plan to start with STFT, as it's conceptually simpler.

From my understanding, the AWR2944EVM does not internally capture complex IQ data, but rather only real ADC samples. The radar data cube reflects the classical layout, but over fast time the range FFT has already been computed. Please correct me if this is inaccurate!

In prior work with the AWR1843BOOST (which does offer IQ data), my post-processing STFT computation looked like this:

#—————— Creating slow-time sequence over which the STFT will be computed ——————
#Go over each rx to build later on the non-coherent sum
for rx_idx in range(N_rx):
slow_time_data_rx = []

#If the stft mode is fixed then go over set number of frames at a constant range bin
if stft_mode == 'fixed':
for frame_idx in range(start_frame, stop_frame):

if adc_sampling_mode == 'complex':
frame_data = iq_data[frame_idx, rx_idx, :, :]
elif adc_sampling_mode == 'real':
frame_data = i_data[frame_idx, rx_idx, :, :]

#Let's test the behaviour of STFTs taken on windowed data, this code isn't DRY but it for demo purpose only!
range_window = np.hanning(N_samples)
frame_dat_win = frame_data * range_window[np.newaxis, :]

range_fft = np.fft.fft(frame_dat_win, axis=1)
bin_data = range_fft[:, range_bin]

While ideally unwindowed data would be used, I understand the HWA applies a window during range FFT computation, thus the radar Cube consists of already windowed data - which is alright. Now I want to implement the same functionality on chip for the AWR2944EVM. My implementation idea is as follows:

  • Within the main DPC call DPC_objectDetection_execute, add - directly after formatting the radarcube with DPU_RangeProcHWA_process - a custom function called fixedSTFT_execute placed in a new classificationdpu.c file together with functions for allocating buffer spaces etc. fixedSTFT_init()
  • This also requires modifying several other files than just the objectdetection.c housing the DPC_objectDetection_execute, in particular one would need to add new classification handles which in turn means modifying objectdetection.h and objectdetectioninternal.h to change the definition of the ObjDetObj struct. Apart from this it will be necessary to add new accessors ot the STFT_handle within init and deint of the objectdetection.c file.
  • Then there also is the issue of shipping the results via UART etc.

I assume this approach can work, but it requires touching multiple files deep inside the DPC/DPU framework. Therefore, is there a recommended, less‑invasive way to add such functionality—perhaps via a standalone module invoked from dss_main.c or a higher‑level callback—so that I don’t have to modify the core DPU so heavily?

Best 

Mark 

  • Hi Mark,

    In AWR2944, only real ADC mode is supported.

    If you are using DDM demo, radarcube is the compressed 1D FFT. As per my understanding, you want to acquire 1D FFT of a particular range bin, for a given number of frames, on top of what is done in the current processing chain. Since, this is a custom implementation, we might not be aware of what all changes that you might require. If you don't want to update the existing files a lot, you can prefer to add a separate DPU or a separate file for the custom algorithm.

    Regards,

    Samhitha

  • Hello Samhitha,

    Yes, I am using the DDM demo. That's correct: " you want to acquire 1D FFT of a particular range bin, for a given number of frames, on top of what is done in the current processing chain". To be precise in the case of a real time system a single frame/cpi is enough.

    My question is really about whether you have a recommended way of implementing such low-level computations into the demo? If yes, at what stage do you recommend to hook up my functionality into the existing code?

    Also I am not sure what do you mean with a separate DPU, do you mean spawning new separate DPU on the RTOS? 

    Best,

    Mark 

  • Mark,

    My question is really about whether you have a recommended way of implementing such low-level computations into the demo? If yes, at what stage do you recommend to hook up my functionality into the existing code?

    We do not recommend on how to implement or where to include this algorithm in the current demo. Do remember that detObjList generated after doppler CFAR is overwritten on Radarcube in the latest SDK (4.7.1.3). So, this piece of code should be added before doppler processing. Else you can refer to older SDK (maybe 4.6.0.1) where detObjList has separate memory allocated on DSS_L3. 

    Also I am not sure what do you mean with a separate DPU, do you mean spawning new separate DPU on the RTOS? 

    By separate DPU, I meant to add a separate module like Rangeproc, dopplerproc without making much changes in the existing files.

    Regards,

    Samhitha