Can someone help me with performing range fft on FMCW Radar ADC data?
Ältere Kommentare anzeigen
I have a dataset of raw ADC data from an FMCW Radar which is in the form where for each radar frame, its raw data (*.mat) has 4 dimension:
samples (128), chirps (255), receivers (4), transmitters (2). I am unable to perform range FFT analysis on such data. Can someone help me with the same?
15 Kommentare
William Rose
am 15 Feb. 2024
Please post a sample .mat file. Please post the equation that describes how range is related to your signals. Please post the code you have written thus far. If the code gives an error, what is the error message?
You have described a .mat file with 2040 sets of 128 samples. Do you expect to get 2040 range estimates, i.e. one range estimate from each set of 128 samples? If the answer is no, then please explain how different sets of 128 samples combine to give a range estimate.
Pratham
am 20 Feb. 2024
Bearbeitet: Walter Roberson
am 20 Feb. 2024
William Rose
am 20 Feb. 2024
Use
range_axis = c ./ (f_axis);
to fix the first error. Then you get another error:
Unable to perform assignment because the size of the left side is 1-by-1 and the size
of the right side is 256-by-1.
Error in perform_range_fft_wr (line 39)
range_profiles(chirp_index, receiver_index, transmitter_index) = range_profile;
This is an error because you are attempting to assign a 256x1 complex vector to a scalar value. I do not know what your intent is here.
single_data is a 128x1 complex vector. Why do you pad single_data with 128 zeros before computing the FFT?
William Rose
am 20 Feb. 2024
Bearbeitet: William Rose
am 20 Feb. 2024
[Edit: fix spelling errors]
Now I see that you answered my question about zero-padding in your comments: you zero pad to improve the range resolution. I am not convinced that this gives a real improvement in range resolution. You have not added any additional data, so how can it improve real resolution? Some people zero-pad time-domain signals, to improve frequency resolution. It is true that this will give you a finer grid along the frequency axis, which makes it look like you have improved the frequency resolution. What really happens is that the prior spectral data gets interpolated, in a slightly complicated way, to a finer grid. Therefore the apparent improvement in frequency resolution is illusory. I syspect this is true for radar signal procressing also, but I could bre wrong.
I wrote script radarRanging.m, to call your function. I modified your function "perform_range_fft", to avoid an error, and gave it a new name (I added "_wr"), to distinguish it from your original posting. Script radarRanging.m plots the 8 complex traces for chirp 1 (four receivers, two transmitters). The script reads the data from the file you posted earlier, 000003.mat. The script makes the figure below. I am not sure what the results mean, but I was curious to know what the traces look like. The script and your modified function are attached.

William Rose
am 20 Feb. 2024
This paper, sections III.A,B,C, has important information for the signal processing.
Do you know if the frame you slected, 000003.mat, has a target in the field of view? If so, do you know its approximate range, velocity, angle?
Pratham
am 21 Feb. 2024
William Rose
am 21 Feb. 2024
Thanks.
I estimate the distance on the order of 12 m, because a standard parking lot stripe is a bout 20 feet. The radial velocity is about zero, because the bike is traveling perpendicular to the view. The angle to center of target is about 3 degrees left of center, assuming 120 degree horizontal field of view, which is roughly consistent with the stripes. The angular resolution is about 15 degrees, so this target angle is more or less zero.
Now your task is to see if the FFT of the data supports this.
Pratham
am 21 Feb. 2024
You need to convert the 4D file to a 3D file, by combining dimensions 3 and 4 into a isngle dimension 3. This will make the 2 transmitters and 4 recievers look like 8 receivers. See this image, from here.

Therefore you want the rearranged array to have the data as follows, along dimension 3:
[R1T1, R2T1, R3T1, R4T1, R1T2, R2T2, R3T2, R4T2].
You do not want
[R1T1, R1T2, R2T1, R2T2,...].
Original adcData has size (128,255,4,2). Let's make one, and combine dimensions 3 and 4, and check that it worked as desired.
adcData=zeros(128,255,4,2);
for i=1:4
for j=1:2
adcData(1,1,i,j)=10*i+j;
end
end
adcData3=reshape(adcData,[128,255,8]);
disp(squeeze(adcData3(1,1,:))')
This is the ordering we wanted. Therefore you should do
adcData3=reshape(adcData,[128,255,8]);
before starting with the 2D or 3D FFTs.
William Rose
am 21 Feb. 2024
Bearbeitet: William Rose
am 21 Feb. 2024
I would not expect the results from function perform_range_fft_wr.m to be correct. As I said in an earlier comment, a line near the end assigned a vector to a scalar, so I changed it to use only the first element of the vector, so that it would run. But, as I said, I don't know what your intent was. Gao et al., arxiv 2022, say "In this paper, we adopt the 3-DFFT [8] to obtain the 3D radar cube that is named the range-velocity-angle (RVA) heatmap” (top p.2), and they show a 3D FFT in their Figure 5. Therefore I think you need to make changes to the data analysis. Carefully read the references which they cite, including Gao et al., 2019.
Pratham
am 22 Feb. 2024
William Rose
am 23 Feb. 2024
"I have never worked on radar data before hence this is very new to me. " That makes two of us.
"From my understanding, plotting the magnitudes of the range_profile that we obtained in the perform_range_fft_wr.m file should work, right?" I have a different understanding. I think the signal analysis in that function, as it appears above, does not implement the method of Gao et al. Therefore I am not surprised that the function above does not give the desired result.
I think I know what the issue is, but it's complicated. If you wish to discuss this further, please email me by clicking on the envelope icon that appears when you click on the "WR" next to my comments.
A
am 6 Aug. 2025
@William Rose @Pratham Hai, I am happy to connect with you. I am also working on the range fft with 8192 samples of 512 ramps. Here I am able performing the fft I am getting the range as per input but problem is magnitude calculations (y axis). I am getting more than required for example as per my test I am suppose to get the input power of adc pluse processing gain of the range fft instead more power is coming its 2x times coming. Can you help me get out this.
William Rose
am 6 Aug. 2025
@A,
I recommend that you post your question as a new question on Matlab Answers. Attach code and data files. Explain what part of the output from your code indicates that an error has occurred.
Meg Noah
am 6 Aug. 2025
Maybe take a look at the feature extraction script here: https://github.com/shikuzen/FMCW_radar_features_matlab
Antworten (1)
The Radar Toolbox has a few examples that you can look at to help you process this radar data. Your processing will probably consist of a couple of steps, depending on your goals.
First, I am assuming that the radar uses time division multiplexing (switching off between transmit antennas to improve angular resolution) based on the structure of your data. So, you will probably want to re-arrange the data into a 128x255x8 virtual array. You can learn more about this in the examples linked at the end of my post.
If you are only interested in performing a range fft, the phased.RangeResponse object with processing mode set to "FFT" would be helpful:
You can similarly use the phased.RangeDoppler response or phased.RangeAngle response to generate Doppler and angle responses along with the range response:
For more comprehensive examples that demonstrate signal processing that seems very similar to what you are trying to acheive, check these out. One simulates a Texas Instruments radar board and performs signal processing. The other performs signal processing on real data collected with this board:
Kategorien
Mehr zu Automotive Radar finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!