How to store and manage ADC values in a 2D array for FFT processing in an FMCW radar system
I am using an FMCW radar to determine the distance and speed of a moving object with an STM32L476 microcontroller. To find the range of a stationary object, I store the ADC values into the "fft_in" array using the "HAL_ADC_ConvCpltCallback" function. I have initialized "is_data_ready_for_fft = 1" as follows:
Then, I calculate the range using FFT. Now, I need to store this 1D array of ADC values in a 2D array to calculate the Doppler frequency across the chirp index.
The code that copies ADC values into the fft_in array and performs the range calculation is in the file below ()
Here is the desired matrix structure, where each fft_in array at different times forms rows of the matrix:
Then, I calculate the range using FFT. Now, I need to store this 1D array of ADC values in a 2D array to calculate the Doppler frequency across the chirp index.
The code that copies ADC values into the fft_in array and performs the range calculation is in the file below ()
Here is the desired matrix structure, where each fft_in array at different times forms rows of the matrix:
Solution
Yes, precisely!
@Sterling As you proceed through each chirp, that will store your {fft_in} array into the matrix row by row. After that, you may examine the matrix to calculate the velocity or any other desired parameter.
