Huge scaling factor on amplitude in NUFFT vs FFT
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I have a couple of questions about FFT and NUFFT.
- I tried to compute a spectral analysis of my data (vectors of more than 30000 samples, due to a sampling frequency of 240 Hz), using both FFT and NUFFT algorithm, on the same vector of sampled data. The results had the same shape and were identical, except for a high scaling factor (10^4). Moreover, using only NUFFT on a non-uniform vector with only data exceeding a certain threshold (0.95, in my case) from the same previous array, the scaling factor is obviously different, but still present. Is there a quick way to find and possibly correct this scaling factor?
- On the NUFFT's spectral analysis, there's a higher number of harmonics at low frequencies. Could this be due to the fact that, with the threshold stripping, I have cleaned the signal, so I can see better the low-frequency components of spectum?
Thanks in advance
2 commentaires
Réponses (1)
Paul
le 15 Mai 2023
In the fft section, the variable dft_trajectory is defined as
% dft_trajectory = abs(fft(raw_trajectory(:,i))/m);
but the nufft section does not include the division by m in its calculation of dft_trajectory. That alone accounts for a big difference.
Also, the raw_trajectory data has some outliers and data drops that should be cleaned up
load raw_trajectory
load clean_frames
load raw_trajectory_ot
[m, n]=size(raw_trajectory);
fs = 240;
figure
tvec = (0:m-1)/fs;
% I was playing aroung here to deal with the outliers, but the data drop at
% around t = 1 second last for quite a long duration.
% raw_trajectory(:,1) = filloutliers(raw_trajectory(:,1),'linear','movmedian',100);
plot(subplot(211),clean_frames(1,:),raw_trajectory_ot(:,1))
plot(subplot(212),tvec,raw_trajectory(:,1))
5 commentaires
Voir également
Catégories
En savoir plus sur Fourier Analysis and Filtering dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!