Fourier transform math

From Psych 221 Image Systems Engineering
Revision as of 02:59, 16 March 2012 by imported>Psych204B (Written using Euler's Formula)
Jump to navigation Jump to search

This page describes some of the math you need for the Fourier transform, as well as deriving some of the formulas you might see thrown around. I'm not a math person, so this is not meant to be as accurate or precise as you will probably see elsewhere. I am including many links to tutorials I found useful in this process.

Fourier Series

Any repeating waveform can be written as an infinite sum of sine and cosine waves at frequencies from 0 to infinity. Each sine and cosine wave at each frequency will have a coefficient, or amplitude, that shows how much that sine and cosine wave contributes to describing the repeating waveform. For example, suppose we have a waveform that has a lot of "sine wave at f = 3" character. The coefficient of the sine wave at f = 3 will thus have a large coefficient.

The whole 0 to infinity number of frequencies looks kind of freaky, but it's basically just saying that the more sine and cosine waves you add to your Fourier series, the better you can describe the repeating waveform. This tutorial has a nifty flash program that lets you make a repeating waveform and then reconstruct it with a bunch of sine and cosine waves. The more waves at different frequencies you add, the more the your Fourier series looks like the repeating waveform. This tutorial is a really good way of "visually" proving the Fourier series to yourself; if I could prove the math to you, I wouldn't be writing this page.

Written as phase shifted cosine

Sometimes the Fourier series is written like this:

This equation is mathematically equivalent to the first one, and can be derived from a trigonometric identity, Rcos(x-ph) = Rcos(ph)cos(x) + Rsin(ph)sin(x). The coefficient c = sqrt(A^2 + B^2) and phi = arctan(b/a). The advantage of this formulation of the Fourier series is that if your waveform is shifted in time (to the left or right), you don't have to re-derive all the coefficients. The only parameters that changes when the wavelength shifts left/right is the phase.

Written using Euler's Formula

A third way of writing the Fourier series is:

This version looks really complicated because of e and the imaginary numbers, but it says the same exact thing as the first two versions above: any repeating waveform can be written as a sum of sine and cosines at different frequencies. In this case, the term "e^iwt" term is just the sine and cosine wave rewritten using Euler's formula, e^ix = cos(x) + isin(x). This might seem like a big jump from the sines and cosines we were using earlier, so below I'm including how we go from one to the other. Feel free to skip this part if you're comfortable with this equation already.

First, using some basic algebra and Euler's formula, e^ix = cos(x) + isin(x), and its conjugate, e^-ix = acosx - isinx, we can rewrite cosine and sine in terms of e's:

Going back to our first formulation of the Fourier series, we can substitute these two equations for sine and cosine and then re-arrange some terms:

100