FFT for Sinusoidal Signal: 100 kHz, Peaks @ k=100, 412

  • Thread starter Thread starter rjunior
  • Start date Start date
  • Tags Tags
    Exercise Fft
AI Thread Summary
The discussion revolves around determining the FFT size and signal frequency of a sinusoidal signal sampled at 100 kHz, with energy peaks at k = 100 and k = 412. The key point is whether "k" is zero-based or one-based, affecting the interpretation of the FFT output. The frequency spacing is defined as df = fs/N, where fs is the sampling frequency and N is the number of FFT points. The equations derived indicate that N can be calculated as 512, leading to the signal frequency being determined from f1 = 100 df. The analysis highlights the conjugate symmetry in the FFT of real-valued signals, which results in mirrored magnitude values for certain frequency components.
rjunior
Messages
4
Reaction score
0
Suppose you have the FFT of a sinusoidal signal sampled at 100 kHz and it has energy peaks at k = 100 and k = 412. How many points is the FFT? What is the frequency of the signal?
 
Physics news on Phys.org
Ok it's a straight forward question, but the answer depends upon whether "k" is a zero based index or a unity based index.

So what is the first element of your FFT. Is it X(0) or is it X(1)?
 
uart,

Thanks for your attention. Let suppose it is X(0).
 
rjunior said:
uart,

Thanks for your attention. Let suppose it is X(0).

Ok that's the easiest case. So "k" runs from 0 through to "N-1".

The frequency spacing is: df = fs/N

And the frequency represented by the kth component is k df, provided it is less than the Nyquist frequency (one half fs).

The sample at k=100 will represent the sine wave frequency, and that at k=412 it's image (above the Nyquist frequency).

So you can pretty easily solve what you require (your signal frequency f1 and number of samples N) from the following equations.

df = fs/N
f1 = 100 df
fs - f1 = 412 df
 
Last edited:
Dear uart,

Thank you for your attention. I have developed the equation but how i do to get signal frequency. Thanks in advance

df = fs/N
f1 = 100 df
fs - f1 = 412 df

fs - 100 df = 412 df
fs/N (N - 100 ) = 412 fs/N
N - 100 = 412
N = 512
 
Okay, so you know the maximum frequency in the FFT output is one half the sampling frequency (fs), right? The FFT will typically have output like this

X(0) is the 0-frequency (a.k.a DC) component

X(1) through X(N/2) are for positive frequencies up to fs/2. The distance between adjacent frequencies is fs/N.

X(N/2 + 1) to X(N - 1) are for negative frequencies. X(N/2+ 1) is for the most negative frequency. The frequency also increases by fs/N for each next sample in this region.

There are two peaks in the magnitude of the spectrum. This has to do with the conjugate symmetry of the FFT of all real-valued signals.

so
|X(1)| = |X(N - 1)|
|X(2)| = |X(N - 2)|
and so on
 
rjunior said:
Dear uart,

Thank you for your attention. I have developed the equation but how i do to get signal frequency. Thanks in advance

Try solving for N first, then use f1 = 100 fs / N

Rearrange the above equations to eliminate f1 and you get :

100 df = fs - 412 df

If you subst in df = fs/N you can factorize out fs and solve directly for N.
 

Similar threads

Replies
1
Views
2K
Replies
1
Views
2K
Replies
6
Views
2K
Replies
12
Views
2K
Replies
29
Views
6K
Replies
1
Views
3K
Back
Top