Sunday, March 1, 2015

Fun with Fourier

Here's the moment you've all been waiting for, folks, when I get off my philosophical soapbox and return to regaling you with exciting tales of studying math and physics. Oh yeah!

Because it's been awhile since I've done one of these explain-what-I-just-learned-about posts, I'm gonna cover a lot of (too much) ground here. This explainer of mine is going to run through Fourier analysis (learned in my math methods course), quantum degeneracy pressure (learned in my thermo class from last semester), and the fate of stars (learned in Astro 121). Whew. So let's get started.

If you've ever seen an orchestra in concert, you know that before the orchestra begins playing, the conductor has the musicians tune their instruments. One person will play a note, and the rest will adjust their instruments to match that note. Listening to this process, a thought may have occurred to you: if all those instruments are playing the same note, why do they each sound different?

This is a complicated question, but the relatively simple answer is that a musical note, along with being described by a frequency (pitch) and an amplitude (loudness), can also be described by its quality or timbre. But what timbre represents can get us into some meaty and far-reaching math.

Say an instrument of some sort plays a Concert A. That means it produces a sound wave of 440 Hz. 440 Hz is just some process that repeats 440 times per second. And a sound wave is just a repeated change in air pressure. With no other distracting information, we could graph such a phenomenon like this:

Fun with Excel.
But there are a couple of problems with this graph, some physical and some mathematical. Let's talk about the physical problems first. Sound is a wave that travels through a medium: air. Air is known for being something of a pushover; you walk right through it all day long as if it weren't even there. But if you've ever encountered a stiff breeze, you know that air is, in fact, there.

Even if the wind isn't blowing, however, air molecules are still going to resist your attempts to push them along. You will have to accelerate them, and you will have to keep pushing the air as each molecule bumps into the next one, transfers its momentum, and loses some energy along the way. The end result is that while your musical instrument may produce some momentary impulse exactly 440 times per second (unlikely), the air's density and viscosity are going to smear out those pressure changes into something more wave-like:

Thanks, Wikipedia.
Let's get into sound's wave properties a little more. Waves operate under the principle of superposition, which says that you can find the amplitude of any wave phenomenon (loudness for sound, brightness for light, etc.) at any point in space by adding up the amplitudes of all the relevant waves at that point in space. This is why the acoustics of a concert hall matter. If the crest of one wave meets the trough of another wave, then your waves cancel out and you're left with a dead spot. Alternatively, if two crests meet, they combine to be louder than either wave individually. This will become important in a bit, so keep it in mind.

The mathematical objection to the above graph goes like this. If I look at a limited portion of the graph, how do I know what the frequency of the wave is?

Not so useful.
The answer is that I don't know. In fact, the smaller a segment of time I look at, the less I can know about the definite frequency of the wave, which means the more possible frequencies the wave could have.

That right there is an interesting way of phrasing things: the more possible frequencies the wave could have. Why, that almost makes it sound as if the wave could have multiple frequencies. Does that even make sense, though? It does, for the reason we talked about above: the principle of superposition. When two waves meet in one place, they combine into one wave. This happens even if the waves have different frequencies.

The discontinuous impulse above, then, could just be many waves on top of each other, with many different frequencies combining in such a way as to cancel out almost everywhere except at precise points. Does this rescue our perfect Concert A? Not quite.

The next question that springs to mind is, where are all these different frequencies coming from? And the answer is that a musical instrument does not produce a note at a single frequency of 440 Hz but many tones at frequencies (harmonics) related to the fundamental of 440 Hz. There will be a tone at 440/2 Hz, 440/3 Hz, 440/4 Hz, and so on, all at different amplitudes depending on the properties of the instrument. The combination of these many harmonics into a single sound is the main component of the timbre, or quality, of a note.

All these different sound waves add together, shifting a wave away from a perfect sinusoid and toward something with a sharp peak. But to get that sharp peak, you need a lot of waves at a lot of different frequencies and very high amplitudes. A musical instrument is only going to provide strong amplitudes at specific overtones of the fundamental, so you're very unlikely to get the original graph up above.

Mathematically, the process of decomposing a single wave into its constituent waves is known as Fourier analysis. In fact, you can represent any periodic signal--or even any "well-behaved" function at all (and some not so well-behaved ones)--as a series of sinusoids of varying frequency and amplitude. You can even perform what's known as a Fourier transform which produces a power spectrum, a graph of the strength of each frequency present in a signal.

The perfect sine wave, which has one well-defined frequency, will look like a spike when you take its Fourier transform, the power spectrum. On the other hand, the sharp impulse, which is made up of many different frequencies, will have a Fourier transform that is spread out. It is impossible to have a signal that is a spike both in time and in frequency. There's a minimum level of uncertainty across the two representations.

Uncertainty, you say? Yes, like Heisenberg's principle. Heisenberg's uncertainty principle can be looked at as arising from the wave nature of all matter. A wave cannot have an absolutely precise location in space while also having an absolutely precise wavelength (which is related to frequency). This comes directly out of the observation made up above: the smaller a slice of time you look at, the less information there is about a wave's frequency, which means the more possible frequencies a wave can have.

A century's worth of experiment has revealed that matter is, in fact, composed of waves. Just as sound waves can interfere with each other to produce acoustic dead spots, electrons can interfere with each other, too. While there are very small and precise experiments such as the double slit that bear this out, there is a rather stunning example that exists on a cosmic scale, too.

So, another interesting fact about electrons is that they obey the Pauli exclusion principle, which says that no two electrons can occupy the same state. Why this is true and what exactly it means is complicated and beyond my current knowledge level, but fundamentally it means that as you compress matter to a denser and denser state, each electron present has fewer and fewer allowed states. This means the uncertainty in the position of each electron goes down, which means the uncertainty in its frequency goes way up. An electron's frequency is tied to its momentum, so the more you compress an electron, the faster it will move.

For particularly dense matter, like the kind you might find in a white dwarf star, this momentum creates pressure which prevents the star from collapsing. However, there is a limit to this pressure. An electron cannot travel faster than the speed of light, which means that as a star gets denser and denser, the increase in electron degeneracy pressure slows down.

In normal stars, the denser it gets, the hotter it gets, and the hotter it gets, the more the star pushes back against gravity, which subsequently cools the star. But degeneracy pressure doesn't come from temperature; it comes from the quantum nature of matter. So as the star gets denser, it gets hotter, eventually leading to a runaway fusion process that annihilates the star in a supernova--a spectacular explosion that can outshine a galaxy and leaves behind a neutron star.

The limit imposed by the speed of light leads to a maximum possible mass for a white dwarf, about 1.4 solar masses, known as the Chandrasekhar limit. A white dwarf cannot exist with a mass any greater than that, and sure enough, no white dwarfs with a greater mass have ever been found. But what's more, because (almost) all white dwarf supernovae happen at 1.4 solar masses, they all look pretty much identical. In fact, the characteristic explosion of a white dwarf supernova is so reliable that it gives astronomers a standard candle by which to measure distances across the universe. And this reliability is a direct consequence of the wavelike nature of matter.

So there you go: from music to cosmology, by way of Fourier analysis. By the way, if you want to combine music and cosmology, check out this guy's site. Without getting into hairy mathematics, he talks about the power spectrum (Fourier transform) of the cosmic microwave background, and how in a very real sense this can be thought of as the sound of the early universe. It's fun stuff.

No comments:

Post a Comment