# how get the range from FFT on FMCW radar data

조회 수: 152 (최근 30일)
Simeon 2024년 2월 11일
답변: Honglei Chen 2024년 5월 23일
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없음 표시없음 숨기기
Pratham 2024년 2월 15일
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 2024년 2월 15일
편집: Simeon 2024년 2월 15일
Unfortunately not, I just submitted my best attempt but looking at the resulting data, it wasn't correct at all

댓글을 달려면 로그인하십시오.

### 답변 (2개)

William Rose 2024년 2월 11일
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이전 댓글 2개 표시이전 댓글 2개 숨기기
Simeon 2024년 2월 12일
편집: Simeon 2024년 2월 12일
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:
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 2024년 2월 14일
@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.

댓글을 달려면 로그인하십시오.

Honglei Chen 2024년 5월 23일
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

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Pulsed Waveforms에 대해 자세히 알아보기

R2023a

### Community Treasure Hunt

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

Start Hunting!

Translated by