2
$\begingroup$

I'm trying to determine the best settings for a discrete Fourier transform on a signal with noise. Now I've stumbled on something that I can't seem to explain, I'm hoping someone can give me some insight.

My signal without noise is made of $5$ wavelengths with a frequency of $5$ MHz. Before and after the signal there is nothing. It looks like this:

signal without noise

When I perform a Fourier transform on it, as expected I get a peak at $5$ MHz.

fourier transform of signal

Now usually my signal has lots of noise, so I want to apply a window function (rectangular) to get rid of as much noise as possible. To investigate the optimum size of my window, I've plotted the height of the peak ($5$ MHz) in the FFT against the width of the window function.

Peak height as a function of window length

In this graph, at $x=0$ the window function has no width, so the entire signal is cut off. At $x=1000$, the window function is exactly as wide as the signal.

Now it turns out, slightly BEFORE $x=1000$ the FFT peak is actually HIGHER than at $x=1000$. Meaning that the FFT gives the highest peak when a tiny part of the signal is cut off.

Why is that?

I've tried thinking of possible reasons, but they're all completely guesswork:

  1. Maybe it has to do with the difference between a discrete Fourier transform and a continuous Fourier transform. I could see this show up as an artifact of the quantization of the signal.

  2. Maybe it cancels out with another property — perhaps the higher peak also becomes wider, making it blend in with noise more. If I'm only looking at my FFT at $5$ MHz however, I will still keep my advantage.

Any thoughts are appreciated!

$\endgroup$
  • $\begingroup$ Most likely if becomes higher because some of the side lobes have the opposite phase to the main lobe, so the main lobe has to "overshoot" to account for all of the signal in the frequency domain. All of this depends on the shape of your window function. Try a Hanning or Hamming window and quite likely (1) this effect will disappear and (2) the FFTs will have significantly smaller side lobes as well. $\endgroup$ – alephzero Jul 12 at 23:40
  • $\begingroup$ You are right, all of the other window functions that i've tried do not show this behaviour. This is very interesting, basically a slight cutoff from using a rectangular window will prevent most of my sidelobe leakage? $\endgroup$ – AdaLovelace Jul 18 at 14:06

Your Answer

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

Browse other questions tagged or ask your own question.