- fft: https://www.mathworks.com/help/matlab/ref/fft.html#f83-998360-n
- stft: https://www.mathworks.com/help/signal/ref/stft.html
- spectrogram: https://www.mathworks.com/help/signal/ref/spectrogram.html
Radar IQ Data FFT/STFT Spectogram Problem
28 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (1)
Alan
el 22 de Mayo de 2024
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:
I hope this helps.
0 comentarios
Ver también
Categorías
Más información sobre Automotive Radar en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!