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.
I generally agree with the point of the article ("Fourier transform is not magical").
However saying it is "just" curve fitting with sinusoids fails to mention that, among an infinite number of basis functions, there are some with useful properties, and sinusoids are one such: they are eigenvectors of shift-invariant linear systems (and hence are also eigenvectors of derivative operators).
This gets brought up quite often here but something people don't talk about is why Fourier needed to do this. Historical context is really fun! In the late 1800s, Fourier wanted to mathematically describe how heat diffuses through solids, aiming to predict how temperature changes over time, such as in a heated metal rod. Observing that temperature variations evolve smoothly, he drew inspiration from the vibrating string problem studied by Euler and D’Alembert, where any complex motion could be expressed as a sum of simple sine waves. Fourier hypothesized that heat distribution might follow a similar principle; that any initial temperature pattern could be decomposed into basic sinusoidal modes, each evolving independently as heat diffused.
seems to be missing some stuff. first, the notion that most real-valued functions can be decomposed to an infinite sum of orthogonal basis functions of which fourier bases are one. this is the key intuition that builds up the notion of linear decomposition and then from which the practical realities of computing finite dfts on sampled data arise. second, the talk of transients absent the use of stfts and spectrograms seems really weird to me. if you want to look at transients in nonstationary data, the stft and spectrogram visualization are critical. computing one big dft and looking at energy at dc to detect drift seems weird to me.
maybe this is the way mechanical engineers look at it, but leaving out stfts and spectrograms seems super weird to me.
It's not just curve fitting because basis functions have characteristics which make them desirable for the kind of decomposition one is trying to find. We typically assume in factor analysis that factors are gaussian random variables without clear and repeating patterns. Fourrier transforms force us to think in similar terms but accounting for specific dynamics factor (I. E. Basis functions) should capture.
Also how do we construct those orthogonal basis functions for any downstream task is an interesting research question!
All quite good examples but I would say that these are quite well known. It’s also missing that there are mitigation strategies for some - for e.g. in vibration analysis it’s typical to look at the Hann windowed data to remove the effect of partial cycles, and it’s common to overlap samples too. Similarly there are other tools like the Cepstrum which help you identify periodic peaks in the spectral data.
Fourier tutorials are a dime a dozen, so it would likely have been a better idea to link to his excellent wavelet tutorial at https://www.continuummechanics.org/wavelets.html . Good explanations of that concept are a lot harder to come by.
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.
I generally agree with the point of the article ("Fourier transform is not magical").
However saying it is "just" curve fitting with sinusoids fails to mention that, among an infinite number of basis functions, there are some with useful properties, and sinusoids are one such: they are eigenvectors of shift-invariant linear systems (and hence are also eigenvectors of derivative operators).
This gets brought up quite often here but something people don't talk about is why Fourier needed to do this. Historical context is really fun! In the late 1800s, Fourier wanted to mathematically describe how heat diffuses through solids, aiming to predict how temperature changes over time, such as in a heated metal rod. Observing that temperature variations evolve smoothly, he drew inspiration from the vibrating string problem studied by Euler and D’Alembert, where any complex motion could be expressed as a sum of simple sine waves. Fourier hypothesized that heat distribution might follow a similar principle; that any initial temperature pattern could be decomposed into basic sinusoidal modes, each evolving independently as heat diffused.
Minor correction, Fourier made his breakthroughs in the early 1800's. He worked under the reign of Napoleon and continued in the decade thereafter.
seems to be missing some stuff. first, the notion that most real-valued functions can be decomposed to an infinite sum of orthogonal basis functions of which fourier bases are one. this is the key intuition that builds up the notion of linear decomposition and then from which the practical realities of computing finite dfts on sampled data arise. second, the talk of transients absent the use of stfts and spectrograms seems really weird to me. if you want to look at transients in nonstationary data, the stft and spectrogram visualization are critical. computing one big dft and looking at energy at dc to detect drift seems weird to me.
maybe this is the way mechanical engineers look at it, but leaving out stfts and spectrograms seems super weird to me.
It's not just curve fitting because basis functions have characteristics which make them desirable for the kind of decomposition one is trying to find. We typically assume in factor analysis that factors are gaussian random variables without clear and repeating patterns. Fourrier transforms force us to think in similar terms but accounting for specific dynamics factor (I. E. Basis functions) should capture.
Also how do we construct those orthogonal basis functions for any downstream task is an interesting research question!
All quite good examples but I would say that these are quite well known. It’s also missing that there are mitigation strategies for some - for e.g. in vibration analysis it’s typical to look at the Hann windowed data to remove the effect of partial cycles, and it’s common to overlap samples too. Similarly there are other tools like the Cepstrum which help you identify periodic peaks in the spectral data.
Fourier tutorials are a dime a dozen, so it would likely have been a better idea to link to his excellent wavelet tutorial at https://www.continuummechanics.org/wavelets.html . Good explanations of that concept are a lot harder to come by.
I made a video about a cool application of the Discrete Fourier Transform regarding color eink Kaleido 3 and manga:
https://youtu.be/Dw2HTJCGMhw?si=Qhgtz5i75v8LwTyi
Learning about Fourier is really interesting in image processing, I'm glad I found a good textbook explaining it.
"Few people appreciate statistics. But at least they seem OK with this and don't go off starting religious wars over the subject."
Frequentist vs Bayesian get debated constantly. I liked this video about the difference:
https://youtu.be/9TDjifpGj-k?si=BpjlTCWIFMu506VL