FFT, Inadequate Frequency precision
Ältere Kommentare anzeigen
I must write a code that gives me the harmonic content of voltage and current signals. The fundamental frequency of both the signals is at 10.273MHz and the sampling frequency is Fs=5GHz. I am implementing fft() to get the data I need. The thing is that the time vector is a 1x10 000 array. This translates in a frequency step of 500kHz (or 0.5MHz). So I couldn't ever get the correct frequency component of 10.273MHz (the array has values of 10.250MHz and 10.30MHz). As a result of course, when I reconstruct my original signal, which I need to do to verify my results the signals aren't quite the same. I tried specifying the points of fft example:(fft(X,n,dim) where n the number of points) but the result deviates from the correct value by a little both in frequency and amplitude. Is there any way I could get the exact correct answer or do I need a bigger dataset for this (let's say a signal of 50000 datapoints)? By the way I have of course already made a simple signal to process instead of real data, but still I can't seem to make it work as I want it to.
3 Kommentare
Paul
am 6 Dez. 2021
What is meant by this statement: "As a result of course, when I reconstruct my original signal, which I need to do to verify my results the signals aren't quite the same."
In particular, what does "reconstruct original signal" mean in this context?
This operation
%yhat = ifft(fft(y))
should result in yhat and y being very, very close to each other. I'm not sure of the degree to which the difference yhat - y is influenced by the number of elements in y. But this issue, to my understanding, has nothing to do with whether or not one of the frequency centers falls right on 10.273 MHz, so perhaps I don't fully understand the question.
F0 = 10.273e6;
Fs = 5e9;
Ts = 1/Fs;
N = 10000;
y = sin(2*pi*F0*(0:(N-1)*Ts) + randn(1,N));
yhat = ifft(fft(y));
max(abs(y-yhat))
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Discrete Fourier and Cosine Transforms finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!