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).
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.
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!
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.
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.
The author is first discussing the importance of orthonormal bases for function approximation. This is a crucial first point of understanding from the mathematical point of view. Then comes periodicity as a key criterion, then the spectral theorem... From the mathematical point of view, the FFT and DFT is really one of the last things that should be examined.
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.
This feels like a very indirect way of saying "yes the fourier transform of a signal is a breakdown of its component frequencies, but depending on the kind of signal you are trying to characterize for it might not be what you actually need."
Its not that unintuitive to imagine that if all of your signals are pulses, something like the wavelet transform might do a better job at giving you meaningful insights into a signal than the fourier transform might.
The thinking that sinus are basic building blocks and own frequencies is part of the problem. Fourier is a breakdown into frequencies of "sinus" waves. Sinus are fundamental in physics of some idealistic conditions, but using Sinus is just a choice, mathematically you could just as good use other bases. A triangle has mathematically the same right to own a frequency as a sinus.
Reality is often different from ideal and not that linear. So basic wave-forms often aren't really sinus. But people usually only know sinus, so they'll use this hammer on every nail. Some guys into electrical engineering maybe know about rectangles, but there's, not yet, enough deeper understanding out there for playing with the mathematical tools correctly.
Closest peripheral aspect is transforming integrals according to Fourier, which extricates 1 cycle in f(x)=sin(x). A synchronization may take place in transient sine coefficient, where "Mag" and L2(R) column specify individual polar coordinates.
For example, the Fourier transform of Ly is. F[L(2)y] = L(2)˜y(k), where y(k) is the factor from L(2)y's distribution.
> Because an FFT (short for "Fast Fourier Transform") is nothing more than a curve-fit of sines and cosines to some given data
That is not even wrong. A Fourier transform is a basis expansion. In particular, the full expansion is exact (not just an approximation). Of course, truncated expansions are approximations.
The actually interesting part: Why is this basis expansion so much more useful than, e.g. expanding into some eigenfunctions, Hermite polynomials, etc.? The decomposition into (complex) exponentials converts between addition and multiplication, i. e. sin(x+y), cos(x+y) you get from multiplying sin(x), cos(x), sin(y) and cos(y).
This in turn has important implications such as turning derivatives into multipliers.
More generally you can consider nonlinear Fourier transforms with different groups and generators other than exponentials.
TLDR: It is a transform. What you are transforming between is what makes it so useful.
> This is done by choosing A and B such that the following integral is minimized
Which is an absolutely subjective choice in an of itself and immediately breaks the notion that curve-fitting done that way is going to be telling you some absolute truth about the function.
For example, you might want, at each point of the non-linear curve being fitted, throw a line perpendicular to its tangent, compute the distance to the linear fit, and sum those distances over all points of the non-linear curve.
About as intuitively correct (if not more) as the "fit" proposed, yet yields a very different result.
Statistics are by definition subjective unless you use a specifically demonstrated property of the particular way you decide to project your data to the simple-minded underlying statistical model.
I love the visualizations on that page. There were some other cool interactive visualizatiosn on bl.ocks.org, but sadly, that site has be shattered. This is the closest I could find:
I appreciate that others may not have got much out of this, but let me say that as someone who knows about statistical modeling, but has no physics training, this made Fourier transforms very clear.
There was another comment that referred to why we use this orthonormal basis versus another, and I think to appreciate the full reason of why this was done in the first place is important. But this presentation is a very good introduction for someone with my particular training.
I was surprised to see such a long article on use and miuse of the Discrete Fourier Transform (DFT) with only brief and casual mention of "sidelobes" -- there wasn't formal discussion of the frequency response of the DFT window function and how it relates to transform output. The latter is typically represented evaluating the z-transform of the window function along the unit circle. While steeped in this mathematics the attendant visualizations can be helpful to impart an intuitive understanding of what the DFT is doing with its inputs. While I would recommend a text that covers the topic such as
"A Digital Signal Processing Primer" by Ken Steiglitz, Gemini was able to show the response graph of a DFT window function with the following prompt: "what is the z transform of the hamming window in a discrete fourier transform context"
22 comments
[ 1.9 ms ] story [ 51.6 ms ] threadHowever 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).
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.
Also how do we construct those orthogonal basis functions for any downstream task is an interesting research question!
Frequentist vs Bayesian get debated constantly. I liked this video about the difference:
https://youtu.be/9TDjifpGj-k?si=BpjlTCWIFMu506VL
[1]. The Fourier Transform and Its Applications. (Ronald Bracewell)
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.
maybe this is the way mechanical engineers look at it, but leaving out stfts and spectrograms seems super weird to me.
Its not that unintuitive to imagine that if all of your signals are pulses, something like the wavelet transform might do a better job at giving you meaningful insights into a signal than the fourier transform might.
Reality is often different from ideal and not that linear. So basic wave-forms often aren't really sinus. But people usually only know sinus, so they'll use this hammer on every nail. Some guys into electrical engineering maybe know about rectangles, but there's, not yet, enough deeper understanding out there for playing with the mathematical tools correctly.
For example, the Fourier transform of Ly is. F[L(2)y] = L(2)˜y(k), where y(k) is the factor from L(2)y's distribution.
That is not even wrong. A Fourier transform is a basis expansion. In particular, the full expansion is exact (not just an approximation). Of course, truncated expansions are approximations.
The actually interesting part: Why is this basis expansion so much more useful than, e.g. expanding into some eigenfunctions, Hermite polynomials, etc.? The decomposition into (complex) exponentials converts between addition and multiplication, i. e. sin(x+y), cos(x+y) you get from multiplying sin(x), cos(x), sin(y) and cos(y). This in turn has important implications such as turning derivatives into multipliers. More generally you can consider nonlinear Fourier transforms with different groups and generators other than exponentials.
TLDR: It is a transform. What you are transforming between is what makes it so useful.
Which is an absolutely subjective choice in an of itself and immediately breaks the notion that curve-fitting done that way is going to be telling you some absolute truth about the function.
For example, you might want, at each point of the non-linear curve being fitted, throw a line perpendicular to its tangent, compute the distance to the linear fit, and sum those distances over all points of the non-linear curve.
About as intuitively correct (if not more) as the "fit" proposed, yet yields a very different result.
Statistics are by definition subjective unless you use a specifically demonstrated property of the particular way you decide to project your data to the simple-minded underlying statistical model.
I love the visualizations on that page. There were some other cool interactive visualizatiosn on bl.ocks.org, but sadly, that site has be shattered. This is the closest I could find:
* https://observablehq.com/@drio/visualizing-the-fourier-serie...
* https://blocks.roadtolarissa.com/denisemauldin/b0424b73fae8c...
There was another comment that referred to why we use this orthonormal basis versus another, and I think to appreciate the full reason of why this was done in the first place is important. But this presentation is a very good introduction for someone with my particular training.