← Back to context

Comment by cycomanic

8 hours ago

I really don't get the point the article is making. I think the whole point about curve fitting is really a distraction, they could have simply stated that the FFT has periodic boundary conditions, so if you take the FFT of something that only extends a finite time of your sampling window, you will see your delta functions in the frequency domain spaced by the inverse of the length of your sampling window, i.e. the FFT "sees" your finite window as a pulse train. That's well known and a fundamental aspect of Fourier transforms.

But then the statements about the discontinuous "vibrations". E.g. in the case of the 1 Hz cycle over half the window the author states that:

> Yet the FFT of this data is also very complex. Again, there are many harmonics with energy. They indicate that the signal contains vibrations at 0.5Hz, 1.0Hz, 1.5Hz, etc. But the time signal clearly shows that the 'vibration' was only at 1Hz, and only for the first second.

The implication that there is a vibration only at 1Hz is plain wrong. To have a vibration abruptly stop, you need many frequencies (in general the shorter a feature in the time domain the more frequency components you need in the frequency domain). If we compare for example a sine wave with a square wave at the same frequency, the square wave will have many more frequency components in the Fourier domain (it's a sinc envelope of delta functions spaced at the frequency of the wave in fact). That's essentially what is done in the example the sine wave is multiplied by a square wave with half the frequency (similar things apply to the other examples). Saying only the fundamental frequency matters is just wrong.

This is also not just a "feature of the fitting to sines", it's fundamental and has real world implications. The reason why we e.g. see ringing on an oscilloscope trace of a square wave input is because the underlying analog system has a finite bandwidth, so we "cut-off"/attenuate higher frequency components, so the square wave does not have enough of those higher frequencies (which are irrelevant according to the author) to represent the full square wave.

> FFT has periodic boundary conditions

FFT is simply an algorithm to efficiently compute the DFT. The fact that the article makes no mention of DFT vs fourier series vs DTFT is going to end up creating more confusion that it solves. For some reason introductory tutorials always start with the DFT (usually mistakenly using FFT and DFT interchangeably), even though to me the continuous fourier transform is far easier to conceptually understand. Going from continuous fourier transform to the DTFT, is just applying the FT to a dirac-combed (sampled) function. Then from DTFT to DFT you introduce periodic boundary condition. Fourier series is just applying FT to a function that happens to already be periodic, resulting in a finite set of discrete frequencies.

There is a connection between fourier series and DFT in that if the fourier series is computed for the periodic resummation of a signal, and then the DFT is computed for the original signal (which implicitly involves applying a periodic boundary condition), the DFT is just the periodic resummation of the fourier series.

I spent ages meditating on this image https://en.wikipedia.org/wiki/Discrete_Fourier_transform?#/m... before everything finally clicked, it's a shame that introductions never once mention DTFT

  • Had a professor go through this and distinguish DTFT vs DFT, etc.

    Sadly that wasn’t my linear systems class, which omitted this in both the lectures and textbook.

  • Completely agree the transition between continuous and discrete domains is often glossed over and people use DFT, FT, DTFT and FFT almost interchangeably (I certainly have been guilty of that myself, and you are correct the FFT and DFT are equivalent for this discussion).

    An interesting fact (somewhat related to your mentioning of the DTFT) is that one can consider the DFT as a filter with a sinc transfer function. That's essentially how you can understand the spectrum of an OFDM signal. You perform a block based FFT on your input bit/symbol stream, so you have waves at different carriers. However, because the stream is timevarying you essentially get sinc shaped spectra spaced at the symbol rate (excluding cycling prefixes etc.). So your OFDM spectrum is composed of many sincs spaced at fb, which is very squarish which is one of the reasons why OFDM is so advantageous.