1

I have been working quite a bit with fourier transforms in python the last couple of days.

I have discovered that in order to accurately capture known periods of incoming data, the resolution or spacing of the x-axis (1/n_samples) has to be sufficiently small. Typically this is done by zero-padding the incoming data. (I have also tried windowing, but with no additional effect)

I have an issue related to this: I have specified that i have a period of 128 in a dataseries of 500. I.e. a frequency of 0.0078125. In order to find the correct peak at 0.0078125 in my fft, i need a resolution that is <<0.0078125, which I have made sure of. I am however missing my peak of 0.0078125 by quite a bit. And in the period-axis, the result is even more obvious. Is there anyone who can help me understand why?

enter image description here

  • 1
    Horizontal resolution is determined by the FFT order. If you fill out with zeros's you don't add information. Filling out samples without using a scaling analysis window will distort your result. Tip: see you get **512 samples**, then you will not need to fillout anything, you can use FFT order 9 and you will have 2x the X-axis resolution. Use a window, e.g. scale your samples using a **raised cosine window** over the analysis interval. – Goodies Feb 08 '21 at 08:52

0 Answers0