About FFT of sine wave

51 次查看(过去 30 天)
Roberto Zanaboni
Roberto Zanaboni 2012-11-2
Dear Forum
i just do the FFt of a sine wave :
t=0:0.01:1; A=sin(2*pi*10*t);
The FFt is:
U=fft(A,200); plot(abs(U));
Question is why the amplitude of fft is 50 and not 1 (convolution betwen sine wave spectrum and rect spectrum 1*1*sincf
Many thanks
Roberto

回答(2 个)

Wayne King
Wayne King 2012-11-2
编辑:Wayne King 2012-11-2
It is because you have 101 points in your signal. Therefore the magnitude of the DFT at the frequency is going to be approximately N/2 where N is the number of points. If your sine wave had an amplitude other than 1, you would see NA/2
To make this exact, let's create your sine wave with 100 points so that the frequency of 10-Hz falls directly in a DFT bin
t = 0:0.01:1-0.01;
x = cos(2*pi*10*t);
xdft = fft(x);
plot(abs(xdft))
Now you see the magnitude at -100 and 100 Hz is 100/2=50
Change the amplitude of the sine wave:
x = 3*cos(2*pi*10*t);
xdft = fft(x);
plot(abs(xdft))
Now the magnitude at -100 and 100 Hz is (3N)/2=150
This dependence on N comes from the fact that the DFT sums all the element-by-element products of your signal and complex exponentials with frequencies of (kFs)/N where Fs is the sampling frequency and N is the length of the signal and k=0,1,2,3, N-1
When your signal matches the frequency of one of those complex exponentials exactly, as is the case above, you get the coherent sum that results in N times the amplitude. Since your input is a cosine remember that results in TWO complex exponentials each with amplitude 1/2 the amplitude of the cosine.

Merve Karabakla
Merve Karabakla 2021-6-5
x = sin(2*pi*n*0.01) ( 0 n 200 )
What is its Fourier transform? Obtain and plot its magnitude spectrum

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by