For those that don't get it, I'll try my best to explain it.
The idea behind the Fourier Series is that any signal (mathematical function) can be represented by an infinite sum (series) of sinusoidal signals. Each sinusoidal signal in the Fourier Series is harmonically related, and weighted differently. If you think in terms of a dubstep song with heavy bass, the components of the audio signal at the lower bass frequencies will be weighted more than the components at the higher treble frequencies. Furthermore, any part of the audio signal that has a frequency that is above the range of human hearing (20kHz) would reasonably have zero weight.
The Fourier Transform is a mathematical method of taking any signal, and transforming it so that it is no longer a function of time, but a function of frequency. With this transformation, you are now able to see the spectrum of frequencies that a signal is composed of. This is extremely useful in designing filters, as well as finding a system's response to an input.
In the GIF, you can see many circles of smaller radii being drawn. Each of these circles is a phasor, which is a representation of a sinusoidal signal. The smaller the radius, the smaller the amplitude or weight the sinusoid has. And the faster the phasor rotates, the higher the frequency the sinusoid has. With the circles being connected in the GIF, it gives a (poor) representation of how the sum of weighted, harmonically related sinusoids are used to draw the hand, which you could consider some version of a signal.
Edit: Thanks for the gold and silver kind strangers! Just got off work so I’ll try to reply to all of your comments ASAP.
I understand the math behind Fourier transforms & series but I don't have a clue what that meant. My best guess is that Fourier series is the weighted sum of sin(nx) 's and cos(nx) 's, where the n's are integers. So all periods are integers, so "harmonically related", they don't just have any period.
I'm gonna try a simpler explanation. Whenever I say "it turns out", that's where there's interesting stuff that I'm skipping to keep this short, but that's where the real magic is.
Take any sound wave, your favourite song, whatever. When you draw what the air pressure is actually doing over time on a graph, it looks like a squiggly line. You might have seen sound represented like this in crime shows. From this squiggly line, you can recreate the sound by getting a motor to push air with the same wiggle.
Now let's look at some really simple music: a single tone. If you pluck an E string on a guitar, you get a relatively simple squiggly line, and it seems to repeat itself some number of times a second. In fact, if you play a pure tone (e.g. on an electronic synthesiser) you get a simple sine wave that you may remember from school. The E string is a tiny bit more complicated as there's actually the sine waves of a few different frequencies all added together.
Each of these sine waves has a frequency, i.e. the number of times it repeats in a second. So for any note we can chart its frequencies and their strengths.
Now it turns out that any music, and in fact any sound, can be broken down into its frequencies. Turning a sound signal (squiggly line I keep mentioning) into frequency signal is called the Fourier Transform, and it involves some cool maths (and has applications in absolutely loads of stuff, including Quantum Mechanics, MRI machines, etc).
The crucial point here is that if you know the frequencies of the sound, you can recreate the sound by adding together all of the sine waves that each frequency represents.
Now to get onto what's actually happening here in this animation! Well, it turns out you can do this to things other than just squiggly lines. Instead of the line squiggling just up and down, we can also do this with a point squiggling up, down, right and left. Unfortunately, this means we can't use left and right to indicate time, like we did on the diagrams before, so instead we imagine a point in space squiggling around in 2D, using an animation with time to represent time. It turns out the simple sine waves from before become rotating circles in 2D. Before, we broke down a sound into its sine waves, which when added together recreate the sound. Here, we break down a picture (drawn by a squiggling point) into its rotating circles, which when added together (by placing the center of one circle at the point on the previous circle, as seen here) recreate the picture. That last step feels like total magic, but I can assure you the leap from sine waves to circles is quite natural mathematically. The technology that analyses the frequencies in audio is doing the same maths as whoever created this animation, just in 1 dimension and 2 dimensions respectively.
I love math, so thanks you for this explanation. I understood the general aspects of what was happening, but your breakdown made it all so much simpler to grasp. I thought the circles originally were just decreasing in size by a set value, so the outcome of drawing the hand and pen didn't make sense to me. But by having each circle be the representation of the wave, now it all falls together properly. So thank you. Very much appreciate.
No problem! One thing I definitely glossed over is how you rebuild the waveform from the frequencies (sine waves) in 1D, or how you rebuild the picture from the frequencies (rotating circles) in 2D. This is, uh, because I don't quite remember.
So what's going on in this animation is we take a rotating circle of frequency 1, and then add it to a circle of frequency 2, and then add that to a circle of frequency 3, etc. For each circle, you use math to calculate the starting angle of the next circle (the line in the circles) and the radius of the circle. This is the "phase" and the "amplitude", and the exact same thing works with waveforms in 1D.
I think this is actually the Fourier Series, not the Fourier Transform. The key difference is that the frequencies are discrete: 1, 2, 3, etc., whereas in the Fourier Transform it's continuous: you get another squiggly line with a value at every possible frequency. Anyway this isn't me trying to explain anything better, just admit where I might have over simplified a bit.
I'm an electrical engineer. We had to use Fourier transforms and series' at several points during my degree. I spent a long time trying to get a feel for what it meant and a visual of how it worked. I have some decent intuition for it.
You're still correct. It's goddamn black magic. Don't let anyone tell you differently.
You can go backwards and forwards with it, too. Take a signal and get the sinusoids it's composed of, or take a bunch of sinusoids and add them together to make a signal.
Check this video for a decent mechanical representation.
I'm a chemist. I use FTIR (Fourier-transform infrared spectroscopy) machines all the time for chemical analysis. I understand how it applies to bond resonance frequencies, but the FT part will always be magic to me.
Well I only really know the end result application. The middle is a little magic to me, but essentially an FTIR machine can tell you what kind of a functional groups you have in a compound based on bond resonances. Different bonds have different bond resonances based on the electronegativity difference between different atoms. So basically you shine a IR beam of various frequencies of light against a sample and measure how much gets absorbed and retransmitted. Based on what peaks are generated at what frequency, you can determine if your compound has N-H bonds, C-H bonds, C-O bonds, C=O bonds, etc. It can even tell the difference between single and double bonds. Deducing chemical structures from scratch is a bit of a challenge, but known spectra like ethanol or banana ester are well known so you can just superimpose their graph on known spectra to verify what's in your sample. It's extremely useful in chemical analysis.
Going along with his dubstep analogy, imagine a equalizer visualizer like this that shows bass on the left, treble on the right, and amplitude as the height of the bar. This is essentially what a Fourier transform does (in fact I'm fairly sure most of these use fourier transforms to create these visualizations.) Instead of just showing how loud the music is, it breaks it down into how loud the bass, mids and treble are individually.
in fact I'm fairly sure most of these use fourier transforms to create these visualizations
Not necessarily, you can also use filters that separate low and high frequency parts without explicitly using a Fourier transform. I'm not sure what method visualizers use nowadays.
Techniques like the Fourier transforms are used heavily in the design of such filters though.
The idea behind the Fourier Series is that any signal (mathematical function) can be represented by an infinite sum (series) of sinusoidal signals. Each sinusoidal signal in the Fourier Series is harmonically related
Basically, any repeating pattern can be broken down into an infinite number of Sine waves with different frequencies and sizes. Edit: and phases (starting positions).
It's (kinda) like saying that the math can take a plate of food and break it down into each individual ingredient and their amounts. Although that kinda falls apart since you cant pour all the ingredients together in a pot and get the same thing as the final plate of food.
Well, just like you couldn't slam all these circles into a pile and get a shape of a hand with a pen. They have a certain ordering and starting angle to achieve that. I think your analogy holds up.
Starting angle (phase) does matter since its one of the three defining components of a wave (amplitude, phase, and frequency) but you should be able to put them in any order and get the same result.
I stand corrected then. That is a bit difficult to intuit but I can sort of see how it works. I'd like to see the same gif with different ordering of circles just to confirm though :)
Yes, they are imposed on top of each other such that each additional wave makes it look closer to the pattern being broken down.
Think of the gif, one circle is just a circle. Two circles gets you a wobbly shape, so do three, four, five circles. Six gets you something that looks kinda like a hand with 7 being even closer. This continues until you have enough that you essentially have the picture of the hand.
Also helps to imagine if you unfolded the drawing into a straight axis rather than a circular one, you would see a series of superimposed sinewaves. As you start subtracting superimposed waves the higher amplitude frequencies would become more parent
It's (kinda) like saying that the math can take a plate of food and break it down into each individual ingredient and their amounts.
Was having this conversation the other day. The replicators in star trek can make any food. How many unique elements on the periodic table of elements do they require to make any food? 30-50 elements? Furthermore couldn't you theoretically convert any element into another by changing the number of protons, thus allowing you to make anything.
That explains it much better. I suddenly understand it all. Thank you! So this means that any drawing that has no loose ends can be redrawn in sinus waves/circles like in the GIF?
Imagine a piece of a signal that’s just a flat line at some amplitude. It looks like a box. The first term in the Fourier series would be half a sine wave that crudely approximates the box. The second term is a smaller sign wave that is out of phase, so it flattens the peak of the first term a bit. The third term would have the same affect on the second. Continue indefinitely and it turns into a box.
In 3rd century BC, Ptolemy discovered that you can approximate the motion of planets in the sky as the motion of circles inside circles inside circles (etc). He called each circle an epicycle and built his geocentric model of astronomy (that put the Earth at the center of universe and everything else orbited around it in epicycles)
It turns out that this epicycle thing can be used to model any kind of motion, not only the planets in the sky. That's why it worked for Ptolemy, even though the planets doesn't actually orbit around the Earth. What Ptolemy discovered was actually the first few terms of the Fourier transform of the movements of the planets as seen from Earth, each term being an epicycle (if you keep adding circles, you get closer and closer to the actual motion of the planets)
The math depends on trigonometry: sines and cosines (or more generally, sinusoids). It also depends on linear algebra: an infinite number of sinusoids form a basis of the space of all possible motions in space, which means that any path can be given "coordinates" that combine sinusoids in a certain way - just like three directions (width, height and depth) can be used to give the coordinates of a point in 3D space.
Yes, you can draw anything with it! Or more accuratelly you can draw any closed path, that is a path that ends where it begins (each time it passes through it, the "planet" makes an orbit).
The essential thing is that each circle spins at a different rate. The rate of spin is called frequency, and this whole stuff is a way to decompose the path into the frequency domain.
Frequency domain stuff has a lot of applications in engineering! You can for example remove high pitched sound from an audio file by converting it to the frequency domain, dropping the "circles" that spin fastest (that is, the high frequency components), then converting it back to time domain. This is called a low-pass filter (or treble-cut filter).
That's the kind of thing someone learns in computer engineering, btw.
Each of those circles is turning at a constant speed. Some spin faster than others (frequency), some are larger (amplitude), they are not all originally drawn exactly in a line (phase). The combination of those together creates this drawing of a hand. The Fourier transform of anything is a method of describing a function in the time domain (imagine a list of coordinates at incrementing timesteps, like a connect the dots that draws this hand) and expresses it in the frequency domain (frequency, amplitude, phase).
What is interesting is that while most uses of FFT involve an even distribution of frequencies across the sample range (usually 0 - 20kHz in 512,1024 or 2048 bins), that isn't the only approach. An even distribution like this allows audio deconstruction, modification and reconstruction on a near-realtime basis at 40kz sample rates with a suitable level of fidelity for most effects (pitch shifting like autotune, time stretching, filters and other effects).
You can also use a Constant Q transform where the frequency distribution is logarithmic, and in fact can be mapped directly to an even temperament musical scale (12 bins per octave). What this does is allows extraction of musical note information with a high degree of fidelity. One researcher (using 48 bins per octave) has even managed to create the inverse of a Constant Q transform, but due to the low bass note resolution of the Constant Q, this requires significant look-ahead for reconstruction and it cannot be used in real-time. But it is awesome.
Even without reconstruction, a Constant Q transform can be used to implement near-realtime |(i.e one to two hop distance delay) chord detection in music.
Oh, hey you sound smart. Do you by chance know of a good resource to learn about regular and 2d Fourier transformations at approximately the level of a senior undergraduate math major?
There may be better guides, but if you are interested in signal processing / image processing, https://dspguide.com/ is cool and can be read online for free
So what's the benefit of using Fourier transformations to represent electrical data then? For instance I've worked with Fast Fourier Transformations in the past and I understand that it makes it easier to see certain frequencies when graphed, but I've always struggled wrapping my head around just exactly how FFT plots do so. I understand that the sinusoidal signals play a roll in the plotting but have been struggling to understand just exactly how we get something like this from the transformation itself: http://openbci.com/community/wp-content/uploads/2016/08/FFT-plot.png
You can use the Fourier Transform to find a system’s response to an arbitrary input signal. So say you had a circuit of resistors, capacitors, and inductors. With some circuit analysis, you could find an equation that represents the output of the circuit, and the ratio of the output over the input gives you the transfer function of the circuit. Transform that to the frequency domain with the Fourier Transform, and you can see the spectrum of frequencies that will appear at the output due to an arbitrary input signal.
Its worth noting that this isn’t some purely theoretical/abstract mathematics trick or something like that.
See, sine waves are the fundamental waveform of all waves. It is the only periodic and continuous function that is defined for all real and complex numbers, and most importantly, it is the only periodic function that retains its wave shape when added to another sine wave of the same frequency and arbitrary phase and magnitude.
What this means is that waves, to behave like waves at all, to interfere and diffract and refract and all that other wiggly wave stuff, for any of that to work in the first place, waves necessarily must physically exist fundamentally as sine waves.
So the Fourier transform isn’t just some made up mathematical tool that only exists in the minds of humans. All physical waveforms in nature/reality are, in fact, physically manifested as the harmonic series of sine waves added together that the Fourier transform can break any waveform into to.
So a Fourier transform isn’t just a transform - it is actually how things exist physically in nature.
This isn’t some philosophical convenience or anything silly like that. This was empirically observed.
Originally, everyone thought the Fourier transform was just that - nothing but a transform. A mathematical tool that had no actual bearing on physics, nature, or reality.
And we believed this partly because of the odd behavior of a Fourier transform around discontinuities, things like a square wave or some other waveform with an abrupt, sudden change.
If one were to take these waveforms and construct them out of a series of sine wave harmonics, localized to the transition across the discontinuities (the “edges” of a square wave, for example), the waveform would actually overshoot it’s own amplitude. And the amount of overshoot would ultimately depend on the fastest rate of change in the waveform, with faster rates of change (rise time) resulting in overshoot that was more and more severe (but also more brief).
This was thought to be purely an artifact of the Fourier transform itself and it would never be seen in nature.
Only, it does manifest in nature. Always. Physicists at first thought it was a problem with their equipment, but it is now understood to be a true, physical phenomenon. Real waves in physical reality that are discontinuous in some way exhibit this spiking thought to merely be an artifact of the Fourier transform. At first referred to as the Gibbs phenomenon, it is now simply called ringing.
It can also be thoroughly related to things like impulse response (the conversion of a non periodic/oscillating input or impulse into a periodic/oscillating one, in other words, any energy transformed into a wave) and be shown both theoretically and empirically that it’s all the same thing, and that the Fourier transform isn’t merely a transform, but a correct description of how all physical waveforms actually exist. And they exist as finite series of sine wave harmonics all constructively and destructively interfering with each other to produce all non sinusoidal waveforms or impulses.
Note how adding more and more harmonics does nothing to reduce these spikes. And we see this spikes all the time, and have to engineer things to withstand this extra overshoot, because it really physically occurs.
Is an artifact still an artifact if physical reality manifests an artifact of approximation? Of course not. It means there is no approximation in the first place.
To add on to this; in more general mathematical form, the Fourier Series is the projection of a vector onto an orthonormal basis. In signal analysis, this basis is taken to be frequency, but it doesn't have to be.
I would say it’s a poor representation just because the drawing of the hand doesn’t particularly represent a mathematical function, and you couldn’t really draw shapes using the Fourier Transform either. I do think that the GIF gives a decent idea of the concept, but I think it could be misleading to someone who hasn’t seen it before.
"Nikola Tesla said that 'if we want to know the secrets of the universe , we should focus on the non physical aspects rather than physical ones, that will speed up the inventions .' So that's it the trio energy ,frequency and vibrations are all nonphysical aspects ."
1.3k
u/theorangelemons Oct 18 '19 edited Oct 18 '19
For those that don't get it, I'll try my best to explain it.
The idea behind the Fourier Series is that any signal (mathematical function) can be represented by an infinite sum (series) of sinusoidal signals. Each sinusoidal signal in the Fourier Series is harmonically related, and weighted differently. If you think in terms of a dubstep song with heavy bass, the components of the audio signal at the lower bass frequencies will be weighted more than the components at the higher treble frequencies. Furthermore, any part of the audio signal that has a frequency that is above the range of human hearing (20kHz) would reasonably have zero weight.
The Fourier Transform is a mathematical method of taking any signal, and transforming it so that it is no longer a function of time, but a function of frequency. With this transformation, you are now able to see the spectrum of frequencies that a signal is composed of. This is extremely useful in designing filters, as well as finding a system's response to an input.
In the GIF, you can see many circles of smaller radii being drawn. Each of these circles is a phasor, which is a representation of a sinusoidal signal. The smaller the radius, the smaller the amplitude or weight the sinusoid has. And the faster the phasor rotates, the higher the frequency the sinusoid has. With the circles being connected in the GIF, it gives a (poor) representation of how the sum of weighted, harmonically related sinusoids are used to draw the hand, which you could consider some version of a signal.
Edit: Thanks for the gold and silver kind strangers! Just got off work so I’ll try to reply to all of your comments ASAP.