1
$\begingroup$

I did an FFT in Excel on a 440 Hz time domain sine wave, $y_1(t) = \sin(2\pi\cdot440\cdot t)$, and got the expected output in the frequency domain: a single-spike distribution with 100% of the signal at 440 Hz and zero at every other frequency.

I did a second FFT in Excel on an 880 Hz time domain sine wave, $y_2(t) = \sin(2\pi\cdot880\cdot t)$, and got the expected output in the frequency domain: a single-spike distribution with 100% of the signal at 880 Hz and zero at every other frequency.

I did an FFT in Excel on the combined signal, $y_{combo}(t) = y_1(t) + y_2(t) = \sin(2\pi\cdot440\cdot t) + \sin(2\pi\cdot880\cdot t)$, expecting a frequency domain output with two equal-height spikes, one at 440 Hz and the other at 880Hz, showing 50% of the signal at 440 Hz and 50% of the signal at 880 Hz. This is not what I got.

Instead, I got one spike at 1,408 Hz and another at 10,560 Hz. I'm not sure what to make of that. Was I wrong to expect half the signal at 440Hz and the other half at 880Hz or am I doing something else wrong?

Also, I'm getting non-zero entries in many of the other bins. They're small--on the order of $10^{-13}$ to $10^{-11}$--so close to zero but not quite zero. The 440 Hz and 880 Hz FFTs gave me exactly zero in all the bins except those at 440 Hz and 880 Hz, respectively.

Here are the parameters I'm using for the combined signal:

  • #Time bins: $N_t = 256$ (signal data in every bin, no padding)
  • Time step: $\Delta t = 4.4389 \times 10^{-5} \,\tt{sec}$,
  • Initial time: $t_0 = 0 \,\tt{sec}$
  • Final time: $t_f = (N_t - 1)\Delta t = 0.0113 \,\tt{sec}$
  • Sampling frequency: $f_s = 1/\Delta t = 22528 \,\tt{Hz}$
  • #Frequency bins: $N_f = 256$
  • Frequency interval: $\Delta f = f_s/N_f = 88 \,\tt{Hz}$
  • Frequency binning: 0, 88, 176 ... 11000, 11088, 11176; -11264, -11176, -11088 ... -264, -176, -88 (Excel's FFT binning goes $f_0, f_1, f_2 ... f_{N/2 - 3}, f_{N/2 - 2}, f_{N/2 - 1}; f_{-N/2}, f_{-N/2 + 1}, f_{-N/2 + 2} ... f_{-3}, f_{-2}, f_{-1}$ per Excel and Fourier).
$\endgroup$
3
  • $\begingroup$ You should indeed see two spikes where you expect them. Don't worry about the non-zero entries for now. Are you sure you did $y_1 + y_2$, and not $y_1 \times y_2$? $\endgroup$
    – Jdip
    Apr 16 at 0:40
  • $\begingroup$ I did add y1 + y2. I did not multiply. When I put the y1 + y2 through Wolfram Alpha's Fourier Transform calculator, the analytic solution for the Fourier Transform is four delta functions at +/-880*pi and +/-1760*pi, which I think is curious. $\endgroup$ Apr 16 at 0:53
  • $\begingroup$ Your expectation is correct, which means that your implementation is probably wrong. Without looking at it, we can't tell what the problem might be. $\endgroup$
    – Hilmar
    Apr 16 at 2:01

2 Answers 2

1
$\begingroup$

Not sure what your signal looks like, I'm guessing it isn't constructed appropriately. In any case, here is a snapshot of the results on my end. You can see the correct spikes at 440 and 880 Hz.

You might want to check that your columns match mine. Hope that helps.

Note the $2/N$ normalization to account for the negative frequencies.

enter image description here

$\endgroup$
1
  • $\begingroup$ You're absolutely right. I had an error in one of my signals as my answer below describes. Thanks for your help! $\endgroup$ Apr 16 at 16:56
0
$\begingroup$

As @Jdip mentioned, I had not constructed my original signal correctly. It turns out that I the time step for the two signals did not match when I computed them, hence what I was trying to take a FFT of was really not a 440 Hz signal + a 880 Hz signal. It was something else. Thanks to those who chimed in, especially @Jdip for running his own computation.

$\endgroup$

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.