how get the range from FFT on FMCW radar data

160 views (last 30 days)
Simeon
Simeon on 11 Feb 2024
Answered: Adi on 21 Nov 2024 at 7:43
The data from an FMCW radar is 256x128, so I got 256 samples of every of the 128 ramps. There is only one target being scanned.
Now I would just use fft(), calculate the magnitude and then find the index peak. But when I know where the peak is, which Im not too sure how to do as well, how do I use that index to then calculate the range and also the velocity of the target with matlab code?
  2 Comments
Pratham
Pratham on 15 Feb 2024
HI @Simeon, were you able to solve the problem. I am trying to perform the same fft analysis on FMCW radar data which is for each radar frame, its raw data (*.mat) has 4 dimension: samples (128), chirps (255), receivers (4), transmitters (2).
Please let me know if you were able to perform fft analysis.
Simeon
Simeon on 15 Feb 2024
Edited: Simeon on 15 Feb 2024
Unfortunately not, I just submitted my best attempt but looking at the resulting data, it wasn't correct at all

Sign in to comment.

Answers (3)

William Rose
William Rose on 11 Feb 2024
You need to specify exactly what the signal that you have consists of. It could be the received signal mixed with a reference signal with a constant frequency. YOu say it is 256 by 128, representing 128 ramps. It this is a time domain signal, then can we think of it as one continuous signal with diraiton 256x128 (a vector instead of an array)? The reaon I am asking is that if you have a time domain signal, you will want to do a time-dependent =Fourier transform, using Matlab's stft(). But if the signal has already been frequency-analyzed, then what you have is frequency versus time, already.
To get range and velocity, your "ramp" signal should be a triangle, not a sawtooth. YOu said you have 128 ramps. Does that mean 64 up-ramps and 64 down-ramps, each of which is 256 points long? Or 128 round-trip ramps, where the up is 128 points long and the down is 128 points long? IT affects the signal processing.
YOu also need the transmitted signal for reference.
It will help if you post the signal you have. Innclude the transmitted signal too if you have it.
  4 Comments
Simeon
Simeon on 12 Feb 2024
Edited: Simeon on 12 Feb 2024
Appreciate you following up, the raw data 'adcData_Aufgabe_3' consists of doubles / real numbers with the dimension 256x128x2, so 256 samples, 128 ramps and 2 antennas in total, which is too extensive to print out entirely. Displaying the first ten time-domain samples of the first ramp gave me: 3.0000 -0.8747 -0.7465 0.6057 -2.3439 1.6792 1.5421 -1.5130 1.1461 -1.6557. After I apply an fft / execute this code part:
N_Samples_per_Ramp = size(adcData, 1);
FFTR = fft(adcData, [], 1);
FFTR = fftshift(FFTR, 1);
disp(FFTR(1:10, 1, 1));
I get, first ten now frequency-domain samples of ramp 1:
-0.8644 + 0.0000i
-0.8652 + 0.0063i
-0.8677 + 0.0127i
-0.8720 + 0.0191i
-0.8780 + 0.0257i
-0.8858 + 0.0323i
-0.8955 + 0.0391i
-0.9073 + 0.0462i
-0.9212 + 0.0534i
-0.9374 + 0.0610i
Increasing as a frequency ramp should, that looks fine to me.
But now my attempt of extracting the range from that does not give me promising results:
% Calculate the magnitude of the FFT result
magnitude = abs(FFTR);
% Find the index of the peak
[maxValue, maxRangeIndex] = max(magnitude);
df = F_Sample / N_Samples_per_Ramp;
Fr = (-N_Samples_per_Ramp/2:N_Samples_per_Ramp/2-1) * df;
f_beat = Fr(maxRangeIndex);
R = (f_beat * c) / (2 * B);
PS: deadline for the assignment is tonight :)
William Rose
William Rose on 14 Feb 2024
@Simeon, sorry I cannot help you in the time available. In the future, you can attach a data file yto your quesiton by clicking on ther the paper clip symbol which is part of the "Insert" set of options.

Sign in to comment.


Honglei Chen
Honglei Chen on 23 May 2024
You may want to look at the following example, especially the "Range and Doppler Estimation" section. It shows how to extract the frequency component and convert it to range.
HTH

Adi
Adi on 21 Nov 2024 at 7:43
hi! did you manage to find the range using FFT, i'm trying to do something similar and I'd really appriciate some help:)

Categories

Find more on Detection, Range and Doppler Estimation in Help Center and File Exchange

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!