Radar IQ Data FFT/STFT Spectogram Problem

28 次查看(过去 30 天)
Hello,
I have data which is taken from FMCW radar. Radar specs are as in below:
  • Center Frequency 77GHz
  • Bandwidth 160MHz
  • Range Resolution 1m
  • PRF 17kHz
  • Azimuth Beamwidth 1
  • Scan Rate 10Hz,
  • mechanical Field of View 9
  • Output Power 10mW
I use FFT and STFT functions for spectogram plotting. However, it's seems wrong for me. I want to ask about the usage of those functions. My usage of those functions as in below;
  • STFT:
window_size = 128;
overlap_length = 120;
fft_points= 256;
window = hamming(window_size);
[S, F, T] = stft(IQ, 1280, 'Window', window, 'OverlapLength', overlap_length, 'FFTLength', fft_points);
new_data_Set_STFT{index_onearray,2} = F; %Frequency
% Amplitude of Spectogram
new_data_Set_STFT{index_onearray,3} =mean(abs(S'));
% IQ data phase
new_data_Set_STFT{index_onearray,4} = atan(imag(S)/real(S));
  • FFT:
% IQ DATA FFT
new_data_Set{index_onearray,2} = fft(IQ(:,index_global));
% Frequency length
N = length(IQ(:,index_global)); % FFT length
fs = 256; % sampling frequency
calculation = (0:N-1)*(fs/N);
f1 = reshape(calculation, 1280, ...
1);
new_data_Set{index_onearray,3} = f1; % Frequency vector
% Amplitude of Spectogram
new_data_Set{index_onearray,4} = abs(IQ(:,index_global));
% IQ data phase
new_data_Set{index_onearray,5} = angle(IQ(:,index_global));
After Plotting, STFT spektogram looks like this. In frequency and time(x time, y frequency) scale it looks wrong. What's wrong with my code?
FFT:
Thanks for help.

回答(1 个)

Alan
Alan 2024-5-22
Hi Emre,
It could be possible that you have entered the wrong sampling frequency to the stft and fft functions. You have also provided different sampling frequencies for fft (256Hz) and stft (1280Hz). The bandwidth of the radar itself is 160MHz. So according to the Nyquist limit, the sampling frequency should be at least double of that.
The data that you have supplied also only contains 1280 data points, which could be a limiting factor as it is much less than the possible sampling frequency.
The FFT algorithm only provides the spectrum of a single portion of a wave, and it does not show how the spectrum varies with time, whereas the STFT algorithm helps you view the spectrum across time. You could also try out spectrogram, which is a similar function which uses STFT algorithm under the hood but gives information of Power Spectrum Density,
More information about these functions can be obtained from their documentations:
  1. fft: https://www.mathworks.com/help/matlab/ref/fft.html#f83-998360-n
  2. stft: https://www.mathworks.com/help/signal/ref/stft.html
  3. spectrogram: https://www.mathworks.com/help/signal/ref/spectrogram.html
I hope this helps.

类别

Help CenterFile Exchange 中查找有关 Automotive Radar 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by