FFT gives different amplitudes for different freqeuncies
Mostra commenti meno recenti
I have been working with FFTs for some time now and I just noticed this while I was trying to reproduce some results from simulations. The amplitude of the peak recovered with FFT changes with the the freqeuncy itself. Also, I noticed that different sampling frequencies on the same signal frequency produce a similar effect (with sampling freqeucny always higher than Nyquist). Lastly, I noticed that with sampling points around powers of two the effect is exxagerrated, with the delta function receovered by FFT being significantly broadened. WHy is this happenining?
Here is the code that I am using. Any help is appreciated!
sampling_points=2000;
f_s=3000; % Hz sampling frequency
time=(1:sampling_points)/f_s;
A=2;
for ii=1:100 %loop to produce spectra with different frequencies
freq(ii)=ii*1+10;
spectrum=A*cos(2*pi*freq(ii)*time); %make the spectrum
FFT_of_spectrum=fft(spectrum,[],2);
FFT_abs=2*abs(FFT_of_spectrum)/sampling_points; % rescale the fft
FFT_abs=FFT_abs(1:sampling_points/2);
FFT_abs(2:end-1)=FFT_abs(2:end-1);
peak(ii)=max(FFT_abs); % find the height of the peak
end
figure('name','FFT of time domain spectrum')
plot(FFT_abs);
xlabel('Frequency (Hz)');
ylabel('Amplitude');
figure('name','FFT of spectrum in depth domain')
plot(freq,peak)
xlabel('Frequency (Hz)');
ylabel('Amplitude of peak');
1 Commento
Bruno Luong
il 12 Ott 2018
The only thing FFT conserves rigorously is the discrete l^2 energy (Parseval's theorem).
The max amplitudes does not conserves, especially even if you have a mono frequency signal, but falling n between 2 bins and/or not periodic. Though there are a strong correlation of max-amplitudes due to Parseval but no equality.
There exists also some mathematics bounds inequality between max-amplitude and L1 norm between f and FFT(f) and vice versa. But that's all.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Programming in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!