1
$\begingroup$

Suppose you have N samples of a sinusoid of frequency $f_0$.

$$ x[n] = A\sin[2\pi (f_0/f_s)n ] $$

Suppose you take an M-point FFT (where M may be greater than N) of your N samples of x. What will the amplitude of the peak of the spectrum be?

Reference: http://www.designnews.com/author.asp?section_id=1419&doc_id=236273&print=yes

$\endgroup$

1 Answer 1

6
$\begingroup$

In general the FFT of a sinusoid function is NOT a delta function. The FFT's maximum will be around the sine frequency but the exact value will be dependent on how well the frequency of the sine lines up with the FFT grid and there will be non-zero values for most other frequencies.

You only get a delta function if the sine frequency is an integer multiple of your FFT bin spacing (= sample rate divided by FFT length). In this case the amplitude will N/2 (for conventional FFT scaling) for both the positive and the negative bin.

If your FFT length is shorter than the sine wave you have to truncate and the above considerations apply. If the FFT length is longer, you will probably zero pad. This will often result in substantial increase of the energy at the "other" frequencies and the effects depend heavily on the details of the zero padding.

In all cases Parseval's Theorem holds: total energy in the time domain equals total energy in the frequency domain. That's how you can derive an amplitude of N/2 for the special case that the sine wave frequency falls on an FFT bin: A sine wave of amplitude 1 has an RMS value of sqrt(.5). A buffer of N samples has a total energy of sqrt(.5)*N. This is the total energy. In the frequency domain this gets split between the bins at +f and at -f. Each bin receives have of the total energy which is sqrt(.5)*sqrt(.5)*N = N/2.

$\endgroup$
1
  • $\begingroup$ Can you clarify your last sentence? $\endgroup$ Nov 5, 2013 at 17:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.