0% found this document useful (0 votes)
33 views

Lecture8 Fouriertransforms

The document provides an overview of Fourier transforms and how they can be used to analyze the spectrum of sounds produced by musical instruments like violins. It defines the Fourier transform and inverse Fourier transform mathematically. As an example, it computes the Fourier transform of the position of an underdamped oscillator. In summary, the document introduces Fourier transforms, provides their mathematical definitions, and gives an illustrative example of computing one.

Uploaded by

ssomdutt860
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views

Lecture8 Fouriertransforms

The document provides an overview of Fourier transforms and how they can be used to analyze the spectrum of sounds produced by musical instruments like violins. It defines the Fourier transform and inverse Fourier transform mathematically. As an example, it computes the Fourier transform of the position of an underdamped oscillator. In summary, the document introduces Fourier transforms, provides their mathematical definitions, and gives an illustrative example of computing one.

Uploaded by

ssomdutt860
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Matthew Schwartz

Lecture 8:
Fourier transforms

1 Strings

To understand sound, we need to know more than just which notes are played – we need the
shape of the notes. If a string were a pure infinitely thin oscillator, with no damping, it would
produce pure notes. In the real world, strings have finite width and radius, we pluck or bow
them in funny ways, the vibrations are transmitted to sound waves in the air through the body
of the instrument etc. All this combines to a much more interesting picture than pure frequen-
cies. For example, the spectrum of a violin looks like this:

Figure 1. Spectrum of a violin

This figure shows the intensity of each frequency produced by the violin (the vertical axis is
in decibels, which is a logarithmic measure of sound intensity; we’ll discuss this scale in Lecture
10). We know the basics of this spectrum: the fundamental and the harmonics are related to the
Fourier series of the note played. Now we want to understand where the shape of the peaks
comes from. The tool for studying these things is the Fourier transform.

2 Fourier transforms

In the violin spectrum above, you can see that the violin produces sound waves with frequencies
which are arbitrarily close. The way to describe these frequencies is with Fourier transforms.

1
2 Section 2

Recall the Fourier exponential series


∞ 2π n x
i
X
f (x) = cne L (1)
n=−∞
where
Z L
1 2 −i
2πn x
cn = dxf (x)e L (2)
L −2
L

To check this, we plug Eq. (1) into Eq. (2) giving

Z L
" ∞
# ∞ Z L
1 2 X i
2π m x
−i
2πn x
1 X 2 i
2π m x
−i
2πn x
cn = dx cme L e L = cm dxe L e L (3)
L L
−2 L L
−2
m=−∞ m=−∞

Then using the mathematical identity

Z L
2 2π
i (m−n) x L
dxe = Lδm n (4)
L
−2

we get

1 X
cn = cmLδn m = cn (5)
L
m=−∞

as desired. That is, we have checked Eq. (2).


To derive the Fourier transform, we write

2πn
kn = (6)
L

where n is still an integer going from −∞ to +∞. For arbitrary L, kn can get arbitrarily big in
the positive or negative direction. However, at fixed L, the lowest non-zero kn cannot be arbi-

trarily small: |kn | > L . Then, we define
Z L
Lc 1 2
f˜(kn) = n = dxf (x)e−ikn x (7)
2π 2π −2
L

The factor of 2π in this equation is just a convention. Now we can take L → ∞ so that kn can
get arbitrarily close to zero. This gives
Z ∞
1
f˜(k) = dxf (x)e−ikx (8)
2π −∞

where now k can be any real number. This is the Fourier transform. It is a continuum general-
ization of the cn’s of the Fourier series.
The inverse of this comes from writing Eq. (1) as a integral. From Eq. (6), we find d kn =

L
∆n. This leads to
∞ ∞ Z ∞
L
dk f˜(k)eikx
X X
f (x) = cneikx∆n = cneikx dkn = (9)
2π −∞
n=−∞ n=−∞

where we have used Eq. (7) and taken L → ∞ in the last step.
Example 3

So we have
Z ∞ Z ∞
1
f˜(k) = dxf (x)e−ikx ⇐⇒ f (x) = dk f˜(k)ei kx (10)
2π −∞ −∞

We say that f˜(k) is the Fourier transform of f (x). The factor of 2π is just a convention. We
could also have defined f (x) with the 2π in it. The sign on the phase is also a convention (that
1 R ∞
is, we could have defined f˜(k) = 2π −∞ d xf (x)ei kx instead). Keep in mind that different con-
ventions are used in different places and by different people. There is no universal convention for
the 2π factors. All conventions lead to the same physics.
The Fourier transform of a function of x gives a function of k, where k is the wavenumber.
The Fourier transform of a function of t gives a function of ω where ω is the angular frequency:
Z ∞
1
f˜(ω) = dtf (t)e−iωt (11)
2π −∞

3 Example

As an example, let us compute the Fourier transform of the position of an underdamped oscil-
lator:

f (t) = e−γtcos(ω0t)θ(t) (12)

where the unit-step function is defined by



1, t>0
θ(t) = (13)
0, t60

This function insures that our oscillator starts at time t = 0. If didn’t include, the amplitude
would blow up as t → −∞.
We first write

1 1
f (t) = e−γtcos(ω0t)θ(t) = e−γteiω0tθ(t) + e−γte−iω0tθ(t) (14)
2 2

So we can Fourier transform the simpler exponential function. Starting with the first term, we
find
1 ∞
Z
f˜+ω0(ω) = dte−γte−i (ω −ω0) tθ(t)
4π −∞
1 ∞
Z
= dte(−γ −i ω+iω0)t
4π 0

1 1
= e(−γ −iω+iω0)t
4π −γ − i(ω − ω0) 0
1 1
=
4π γ + i(ω − ω0)

In the last step we have used that the t = ∞ endpoint vanishes due to the e−γt factor and that
at the t = 0 endpoint the exponential is 1. The second term in Eq. (14) is the first term with
ω0 → −ω0. Thus the full Fourier transform is
 
1 1 1 1 ω − iγ
f˜(ω) = + = (15)
4π γ + i(ω − ω0) γ + i(ω + ω0) 2πi (ω − iγ)2 − ω02
4 Section 4

As mentioned before, the spectrum plotted for an audio signal is usually f˜(ω) 2. Let’s see what
this looks like. We’ll take ω0 = 10 and γ = 2. The function and the modulus squared f˜(ω) 2 of
its Fourier transform are then:

Figure 2. An underdamped oscillator and its power spectrum (modulus of its Fourier transform
squared) for γ = 2 and ω0 = 10.

We now can also understand what the shapes of the peaks are in the violin spectrum in Fig.
1. The widths of the peaks give how much each harmonic damps with time. The width at half
maximum gives the damping factor γ.

4 Fourier transform is complex

For a real function f (t), the Fourier transform will usually not be real. Indeed, the imaginary
part of the Fourier transform of a real function is

 f˜(k) − f˜(k)⋆ 1 1
Z ∞ Z ∞ 
˜ −i kx ikx

Im f (k) = = dxf (x)e − dxf (x)e (16)
2i 2i 2π −∞ −∞
Z ∞
1
= dxf (x)sin(kx) ≡ f˜s(k) (17)
2π −∞

This is a Fourier sine transform. Thus the imaginary part vanishes only if the function has no
sine components which happens if and only if the function is even. For an odd function, the
Fourier transform is purely imaginary. For a general real function, the Fourier transform will
have both real and imaginary parts. We can write

f˜(k) = f˜c(k) + if˜s(k) (18)

where f˜s(k) is the Fourier sine transform and f˜c(k) the Fourier cosine transform. One hardly
ever uses Fourier sine and cosine transforms. We practically always talk about the complex
Fourier transform.
Rather than separating f˜(k) into real and imaginary parts, which amounts to Cartesian
coordinates, it is often helpful to write it as a magnitude and phase, as in polar coordinates. So
we write

f˜(k) = A(k)ei φ(k) (19)

with A(k) = f˜(k) the magnitude and φ(k) the phase.


Fourier transform is complex 5

The energy in a frequency mode only depends on the amplitude: I = A(ω)2. When one plots
the spectrum as in audacity, what is being shown is A(ω)2. This corresponds to the intensity or
power in a particular mode, as we will see in Lecture 10. Power is useful in doing a frequency
analysis of sound since it tells us how loud that frequency is. But looking at the amplitude is
not the only thing one can do with a Fourier transform. Often one is also interested in the
phase.
For a visual example, we can take the Fourier transform of an image. Suppose we have a
grayscale image that is 640 × 480 pixels. Each pixel is a number from 0 to 255, going from black
(0) to white (255). Thus the image is a function f (x, y) with 0 6 x < 640, 0 6 y < 480 which
takes values from 0 to 255. We can then Fourier transform this function to a function f˜(kx , k y):
1 ∞
Z Z ∞
f˜(kx , k y) = dx dy f (x, y)e−ikx xe−k yy (20)
2π −∞ −∞

The 2D Fourier transform is really no more complicated than the 1D transform – we just do two
integrals instead of one. So what we do we get? Here’s an example

Image fpanda (x, y) Magnitude, Apanda (kx , k y) Phase φpanda (kx , k y)


Figure 3. Fourier transform of a panda. The magnitude is concentrated near kx ∼ k y ∼ 0, corresponding to
large-wavelength variations, while the phase looks random.

We can do the same thing for a picture of a cat:

Image fcat (x, y) Magnitude, Acat (kx , k y) Phase φcat (kx , k y)


Figure 4. Fourier transform of a cat. The magnitude is concentrated near kx ∼ k y ∼ 0, but maybe not as
much as the panda, since that cat has smaller wavelength features. Phase still looks random.

Now let’s Fourier transform back. Of course for the cat and panda we get back the orignal
image. But what happens if we combine the magnitude for the panda with the phase for the
cat, and vice versa?
6 Section 5

Acat (kx , k y) and φpanda (kx , k y) Apanda (kx , k y) and φcat (kx , k y)
Figure 5. We take the inverse Fourier transform of function Aca t (kx , k y )eiφpanda(kx ,k y) on the left, and
Ap a n d a (kx , k y)eiφcat(kx,k y) on the right.

It looks like the phase is more important than the magnitude for reconstructing the original
image. The importance of phase is critical for many engineering applications, such as signal
analysis. It is also relevant for image compression technologies.

5 Filtering
One thing we can do with the Fourier transform of an image is remove some components. If we
remove low frequencies, less than some ωf say, we call it a high-pass filter. A lot of back-
ground noise is at low frequencies, so a high-pass filter can clean up a signal. If we throw out
the high frequencies, it is called a low-pass filter. A low pass filter can be used to smooth data
(such as a digital photo) since it throws out high frequency noise. A filter that cuts out both
high and low frequencies is called a band-pass filter.
Here are some examples

photo of Einstein Photo after high-pass filter


Figure 6. What a high-pass filter does to Albert Einstein.
Filtering 7

photo of Einstein Photo after low-pass filter


Figure 7. What a low-pass filter does to Marylyn Monroe.

Now let’s combine the two

high-pass Einstein low-pass Einstein


+low pass Marylyn +high-pass Marylyn
Figure 8. Combining filtered images

Take a look at these last two images from up close and from far away. What do you see?
Why?
8 Section 6

6 Dirac δ function

Another extremely important example is the Fourier transform of a constant:

1 ∞
Z
δ(ω) ≡ dte−iωt (21)
2π −∞
Its Fourier inverse is then
Z ∞
1= dωδ(ω)eiωt (22)
−∞

This object δ(ω) is called the Dirac δ function. It is enormously useful in a great variety of
physics problems, especially in quantum mechanics, but also in waves.
To figure out what δ(ω) looks likes, we use the fact that the Fourier transform of the inverse
Fourier transform gives a function back. That is, for any smooth function f (x)
Z ∞ Z ∞ Z ∞
1
f (x) = dkeikxf˜(k) = dkeikx dyf (y)e−ik y (23)
−∞ 2π −∞ −∞

Z ∞ Z ∞
1
= dy dke−ik(y −x) f (y) (24)
−∞ 2π −∞

Z ∞
= dyδ(y − x)f (y) (25)
−∞

where we used Eq. (21) in the last step. Setting x = 0, we see that the δ-function satisfies
Z ∞
dxδ(x)f (x) = f (0) (26)
−∞

for any smooth function f (x). δ(x) also has the property that δ(x) = 0 for x =
/ 0 (see Section 6.1
below), so that
Z x0
dxδ(x)f (x) = f (0) (27)
−x0
for any x0.
Eq. (26) and (27) uniquely define the δ-function. Indeed, the δ-function is no ordinary func-
tion. It is instead a member of a class of mathematical objects called distributions. While
functions take numbers and give numbers (like f (x) = x2), distributions only give numbers after
being integrated.
You should think of δ(x) as zero everywhere except at x = 0 where it is infinite. However,
R x
the infinity is integrable: −x0 δ(x) = 1 for any x0 > 0.
0

From the physics point of view, we showed that if we have an amplitude which is constant in
time f (t) = 1 then the only frequency mode supported has 0 frequency. This makes sense – a
constant has an infinite wavelength and never repeats. Conversely, if f˜(ω) = 1 it says that all
frequencies are excited. This corresponds to white noise. The Fourier transform of f˜(ω) = 1
gives a function f (t) = δ(t) which corresponds to an infinitely sharp pulse. For a pulse has no
characteristic time associated with it, no frequency can be picked out. That’s why white noise
has all frequencies equally.

6.1 Some mathematics of δ(ω) (optional)


For ω =/ 0 the quickest way to evaluate δ(ω) integral is by contour integration. If you’ve never
seen any complex analysis, just ignore this section. If you have, consider the integral in the com-
Dirac δ function 9

plex ω plane along the red contour:

(28)
The integral along the contour is equal to 2πi times the residues of poles within the contour.
Z ∞ Z X
−i ωt
dte f (t) + dte−iωtf (t) = 2πi Res[f , ωj ] (29)
−∞ curve poles ω j

For the curved part of the contour, t has a negative imaginary part. Thus e−iωt → 0 as |t| →
infinity and the integral along the curved part vanishes. There are no poles in e−iωt, thus the
right hand side of Eq. (29) vanishes. Therefore
δ(ω) = 0, ω=
/0 (30)
On the other hand, for ω = 0,
1 ∞
Z
δ(0) = dt=∞ (31)
2π −∞
So 
0, ω =
/0
δ(ω) = (32)
∞, ω = 0

Clearly δ(ω) is no ordinary function. It is a distribution.


A practical way to define δ(x) is as a limit. There are lots of ways to do this. Here are three:
 1−ε
x2
1 ε 1 1 − 4ε
δ(x) = lim , δ(x) = lim ε , δ(x) = lim √ e , ··· (33)
ε→0 π x2 + ε2 ε→0 x ε→0 2 πε

To check these definitions, try integrating any of them against any test function g(x) to see that
Eq. (27) is reproduced.

You might also like