0
$\begingroup$

I am studying DFT of sinusoids, and my professor gave me this signal.

  • Sinusoid Frequency: 100Hz
  • Number of Samples: 512
  • Sampling Rate: 8 kHz

Plotting the spectral plot I have the following: Spectral plot

I was expecting a single peak initially since the signal is only composed of a single frequency but from my understanding of the DFT, it mirrors the positive and negative values from the Nyquist rate which is 4kHz hence resulting to the two peaks. My professor then asks to 'correct' the peaks by modifying the parameters of the sinusoid. I am just confused as from what I understand the resulting peaks are correct.

$\endgroup$
1
  • $\begingroup$ Salty, we don't know what your professor meant, either. Are your axis labels correct, by the way? $\endgroup$
    – mmmm
    May 19 at 1:02
0
$\begingroup$

What you understand is right. The second peak is the negative frequency component. I guess what your professor meant is that the Fourier transform of a sine wave is theoretically perfect Dirac $\delta$ function, and the discrete Fourier transform of a sine wave is a Kronecker $\delta$ function, but in your implementation, it's two peaks instead of two $\delta$ impulse.

The problem is the relationship of the frequency of sine wave and FFT size. As we know the frequency resolution of FFT is $$ \Delta f = \frac{f_s}{N} $$ where $f_s$ is sampling rate and $N$ is the length of FFT. The FFT results in perfect $\delta$ only when the sinusoid frequency is exactly integer multiples of $\Delta f$.

In your case $\Delta f=15.625$ Hz, try something like 125 Hz and see what happens.

$\endgroup$
4
  • $\begingroup$ You're intermixing the dirac $\delta$ for continuous time (Fourier transform) with the $\delta$ (impulse) for discrete time, which is technically incorrect. $\endgroup$
    – David
    May 19 at 13:20
  • $\begingroup$ @David yes I understand the difference between Dirac delta and Kronecker impulse. They are respectively the FT and DFT of a sinusoid signal right? $\endgroup$
    – ZR Han
    May 19 at 13:39
  • $\begingroup$ Yes, in you're explanation your refer to the Fourier transform and the $\delta$ function and then go on to use the $\delta$ function in discrete time. It can be confusing for those new to the field. $\endgroup$
    – David
    May 19 at 15:39
  • $\begingroup$ @David Ok I've edited the answer. $\endgroup$
    – ZR Han
    May 20 at 1:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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