Sie sind auf Seite 1von 15

Chapter 10 - Fourier Analysis

J.R. Wilson

January 7, 2018

References for this chapter:


Riley, Hobson & Bence Chapter 12 and 13

1 Introduction
Fourier Analysis allows us to express functions as a sum of sine and cosine terms. This
is useful because it allows us to describe functions that are not everywhere continuous /
differentiable. In this course we will address two situations:

• The Fourier series is used to represent a periodic function by a discrete sum of


components

• A Fourier transform is used to represent a general, non-periodic function by a


continuous superposition of components and is generally used to analyze a signal
in another domain (e.g. from time to frequency, or vice versa).

The advantage of using sine and cosine terms is that trigonometric functions are easy
to differentiate and integrate. Each term contains only 1 characteristic frequency, hence
fourier analysis is a way to break a complex function down into its components.
For example a musical note or chord consists of a number of pure tones.
Recall that a vector v̄ has components v̄ = (vx , vy , vz ). We can find the components
by ‘projecting them out’ using the projection operators î, ĵ, k̂ such that

vx = î.v̄ (1)
vy = ĵ.v̄ (2)
vz = k̂.v̄ (3)

Fourier analysis can be considered similarly.

2 Fourier Series
A Fourier series is built from a sum of periodic components. A benefit of using Fourier
series over power series, is that for power series expansions we require our initial function

1
2

f (x) to be continuous and differentiable over the range in x that we want to be able to
use. We can relax these constraints when using Fourier series. Generally when Fourier
series converge, they converge fast. For example, when expressing a sound as a fourier
series, the first few terms are usually good enough to reproduce the original sound as we
here it.
There are many applications of Fourier series and you will meet a number during
your physics degree. Some tangible applications include

• Modulation and demodulation of voice signals in telecommunications.

• Cleaning up ‘hiss’ and ‘pop’ in sound recordings. These effects are usually high
frequency noise that can be removed.

• Song recognition apps.

• Cleaning up digital images - again mottled effect in photos etc. is a higher fre-
quency that can be removed.

• The outlines of a picture can be found as boundaries are associated with high
frequencies. This leads to image recognition software etc.

Consider a function y(t), which is periodic, such that

y(t + T ) = y(t), ∀ t,

where T is the period of the function (see Fig. 1). If we need to, we can re-express this
condition in terms of the frequency f , or angular frequency ω, by noting the following

ω= = 2πf.
T

0.35 T

0.3

0.25
y(t)

0.2

0.15

0.1

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2

Figure 1: A periodic function y(t). The period of the function T is indicated.


3

We can express y(t) in terms of an infinite series of sinusoidal functions; a Fourier


series. The general form of a Fourier series is given by Eq. (4).

1 X
y(t) = A0 + [An cos(nωt) + Bn sin(nωt)]
2
n=1
∞     
1 X 2πn 2πn
= A0 + An cos t + Bn sin t (4)
2 T T
n=1
This is built up of a constant term, plus a sum of even and odd periodic terms. The
even periodic terms (symmetric about the origin) are given by the cosines, and the odd
periodic terms (asymmetric about the origin) are given by the sines. In order to use a
Fourier series to approximate a function, we need to determine the coefficients A0 , An
and Bn . These are given by
2 t2
Z  
2πn
An = y(t) cos t dt,
T t1 T
2 t2
Z  
2πn
Bn = y(t) sin t dt,
T t1 T
1 2 t2
Z
A0
= y(t)dt,
2 2 T t1
Z t2
1
= y(t)dt,
t2 − t1 t1
= < y(t) >, (5)
where T = t2 − t1 , and < y(t) > is the average value of the function over one whole
period.
So, for a function y(t) with period T (where ω = 2π/T ) we can write
A0
y(t) = + [A1 cos(ωt) + B1 sin(ωt)] + [A2 cos(2ωt) + B2 sin(2ωt)]
2
+ [A3 cos(3ωt) + B3 sin(3ωt)] + . . .
    
A0 2π 2π
= + A1 cos t + B1 sin t
2 T T
    
4π 4π
+ A2 cos t + B2 sin t
T T
    
6π 6π
+ A3 cos t + B3 sin t + ...
T T
where each term in square brackets is called a harmonic. The nth harmonic corresponds
to a frequency fn = nω n
2π = T .

2.1 Example: Square wave pulses


Consider the example that we have a square wave pulse train as a function of time.
This type of situation arises in digital electronic circuits, where the voltage alternates
4

between ’1’ and ’0’ (or ’ON’ and ’OFF’) states. We can express the square wave pulse
train as
1 1
y(t) = h, − ≤ t − nT ≤
4 4
= 0, elsewhere (6)
where n is any integer. Figure 2 shows the function y(t) over two consecutive periods
where the pulse height h = 1 and T = 1.

1 T

0.8

0.6
y(t)

0.4

0.2

0
-1 -0.5 0 0.5 1

Figure 2: The square wave pulse defined by Eq. (6) shown over two periods from t = −1
to t = 1, where the periodicity of this function T = 1, and the pulse height h = 1.

The origin is mid-way through a pulse, so y(t) is an even function. With this config-
uration, we can use the symmetry of the problem to simplify1 the Fourier series solution
for y(t). For this particular example, we only need to integrate from t = −T /4 to
t = +T /4, as the integral outside this range is zero by inspection. Recall from Eq. (4)
that
∞     
1 X 2πn 2πn
y(t) = A0 + An cos t + Bn sin t
2 T T
n=1

so we can now calculate the coefficients for Eq. (6) as follows

2 T /2
Z
A0 = y(t)dt,
T −T /2
2 T /4
Z
= hdt,
T −T /4
1
With a little practice, you will develop an intuition on sensible choices of the start and end positions
of a period of oscillation. This is loosely analogous to choosing the point a about which one expands a
Taylor series for a function f (x).
5

2 T /4
= [ht]−T /4 ,
T
= h.

So the average value of y(t) over period is A0 /2 = h/2, which is the first coefficient for
our Fourier series. Next, we calculate An via

2 T /4
Z  
2πn
An = y(t) cos t dt,
T −T /4 T
2 T /4
Z  
2πn
= h cos t dt,
T −T /4 T
  T /4
2h T 2πn
= sin t
T 2πn T −T /4
    
h 2πn T 2πn −T
= sin . − sin .
nπ T 4 T 4
    
h nπ −nπ
= sin − sin
nπ 2 2
2h  nπ 
= sin
nπ 2
If n is odd, then we have sin(nπ/2) = ±1, and An is non-zero. If n is even, then An = 0.
Finally we can calculate Bn .

2 T /4
Z  
2πn
Bn = y(t) sin t dt,
T −T /4 T
2 T /4
Z  
2πn
= h sin t dt,
T −T /4 T
  T /4
2h T 2πn
= − cos t ,
T 2πn T −T /4
    
h 2πn T 2πn T
= − cos . + cos . ,
nπ T 4 T 4
= 0, ∀ n

Now we have calculated all coefficients for our Fourier series solution. We can write y(t)
as
∞   
h X 2h  nπ  2πn
y(t) = + sin cos t
2 nπ 2 T
n=1

where we only need to sum over odd values of n. The harmonics can be written down as
     
h 2h 2π 2h 6π 2h 10π
y(t) = + cos t − cos t + cos t + ...
2 π T 3π T 5π T
6

Figure 3 shows the Fourier series obtained for terms up to n = 1, 3, 5, 7, 9, and 51.
As more terms are added, the Fourier series approximation of the square wave function
improves.

1.4 1.4

1.2 1.2

1 T 1 T
0.8 0.8
y(t)

y(t)
0.6 0.6

0.4 0.4

0.2 0.2

0 0

-0.2 -0.2

-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1

t t

1.4 1.4

1.2 1.2

1 T 1 T
0.8 0.8
y(t)

y(t)

0.6 0.6

0.4 0.4

0.2 0.2

0 0

-0.2 -0.2

-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1

t t

1.4 1.4

1.2 1.2

1 T 1 T
0.8 0.8
y(t)

y(t)

0.6 0.6

0.4 0.4

0.2 0.2

0 0

-0.2 -0.2

-1 -0.5 0 0.5 1 -1 -0.5 0 0.5 1

t t

Figure 3: The square wave pulse defined by Eq. (6) shown over two periods from t = −1
to t = 1. The corresponding Fourier Series expansion for the square wave potential is
shown (left to right, top to bottom) including terms up to n = 1, 3, 5, 7, 9, and 51. The
parameters h and T are set to 1 for this Figure.

We can re-write our fourier series solution in terms of ω0 , the angular frequency of
the first non-zero harmonic, to look at the frequency content of our function. If we look
at the magnitude of our coefficients (in this case, we need only look at An for odd n),
we see which frequencies are present in our function (See Figure 4).
h 2h 2h 2h
y(t) = + cos (ω0 t) − cos (3ω0 t) + cos (5ω0 t) + . . . (7)
2 π 3π 5π
NOTES:
7

0.7

0.6

0.5

0.4
|An|

0.3

0.2

0.1

0
0 1 2 3 4 5 6

ω/ ω0

Figure 4: The modulus of the amplitudes with different frequencies contributing to the
square wave pulse defined by Eq. (6). The corresponding Fourier series for this function
is shown in Eq. (7)

• We have performed a Fourier Analysis of y(t). This means we have taken our
original function, y(t), and expressed this as a function of sine and cosine terms
using Eq. (4).

• Because we originally chose to have t = 0 centered on a pulse with height h, we


defined our square wave potential as an even function. The result of this is that
our Fourier series does not contain any odd terms. All of the Bn are zero2 . We
could have chosen our origin such that t = 0 coincided with the transition between
y(t) = 0 and y(t) = h. If we had done this, then we would have found that our
Fourier series would only have contained odd terms (so all An would have been
zero).

• Constructing a series approximation to our function y(t) by adding successive sine


and cosine terms is called synthesis of the Fourier series.

• The solution obtained for y(t) has a parameter for the pulse height, h, and for the
period of the function T . We can use our solution for any h and T value we choose.
For example, if we set h = 1, and T = 2 our Fourier series solution for the square
2
Recall that sin(x) is an odd function, so we could have guessed that Bn = 0 for all n, without having
to calculate anything.
8

wave function is
1 2 2 2
y(t) = + cos (πt) − cos (3πt) + cos (5πt) + . . .
2 π 3π 5π

• We integrated over one full period, but as the solution is periodic, it is valid for
all values of t.

2.2 Link to Summing Series


The Fourier Series for the square wave (eg. equation 7) looks very similar to the series
sums we met in chapter 5. We could re-write it as
 
h 2h 1 1
y(t) = + 1 cos (ω0 t) − cos (3ω0 t) + cos (5ω0 t) + . . .
2 π 3 5

Now we could choose a value for ωt such that each cosine term would take a value ±1.
 
π h 2h 1 1
y(t = ) = + 1 cos (π) − cos (3π) + cos (5π) + . . .
ω 2 π 3 5
 
h 2h −1 −1
= + −1 − + ....
2 π 3 5
 
h 2h 1 1
= − 1 − + ....
2 π 3 5

Now at t = ωπ = πT T T

2π = 2 and from figure 2 we see that y 2 = 0 so we can write
 
h 2h 1 1
0 = − 1 − + ....
2 π 3 5

which can be rearranged to give


π 1 1
= 1− + ....
4 3 5
ie. The fourier series helps us to evaluate the series sum. However, if presented with
a series to sum, it is not usually possible to decide which Fourier series is needed to
evaluate it. This is a serendipitous approach!

2.3 Expressing a Fourier series in terms of exponentials


If we consider the nth harmonic,
   
2πn 2πn
An cos t + Bn sin t ,
T T
9

we can use the following relations3


eiθ + e−iθ
cos θ = ,
2
eiθ − e−iθ
sin θ = ,
2i
to rewrite this harmonic as follows (where we let θ = 2πn
T t):
   
2πn 2πn
An cos t + Bn sin t = An cos θ + Bn sin θ
T T
eiθ + e−iθ eiθ − e−iθ
= An + Bn
2 2i
An iθ −iθ Bn iθ
= (e + e ) + (e − e−iθ )
2  2i
 
An Bn An Bn
= + iθ
e + − e−iθ
2 2i 2 2i
= Cn+ eiθ + Cn− e−iθ ,
where
 
An B n
Cn± = ±
2 2i
 
An iBn
= ∓
2 2
So, we can re-write Eq. (4) as

1 X
Cn+ eiωnt + Cn− e−iωnt

y(t) = A0 +
2
n=1
2nπ
as θ = nω = T . We can further simplify4 the Fourier series by writing

X 2πn
y(t) = Yn ei T
t
, (8)
n=−∞
X∞
= Yn eiωnt , (9)
n=−∞

where
Z t2
1 2πn
Yn = y(t)e−i T
t
dt, (10)
T t1
Z t2
1
= y(t)e−iωnt dt. (11)
T t1
3
Recall that eiθ = cosθ + i sin θ - Euler’s formula.
4
Our aim is to obtain integrals for the coefficients that are easier to calculate than the original form.
10

This is completely equivalent to the previous expressions but using complex numbers
has halved the length of the equations. For real y(t), Y−n = (Yn )∗ so the Yn values for
±n are complex conjugates of each other. The real parts give cosine (even) terms and
the imaginary parts give sine (odd) terms.

2.4 Example: Sawtooth


Find the complex fourier series of the sawtooth function given by
At
f (t) = 0<t<T
T
f (t + T ) = f (t)
Which is shown in figure 5.

Figure 5: A saw tooth function.

Looking at the graph, if we shifted the curve down by A2 , as shown by the dashed
axis in the figure, we would have an odd function. Therefore, we would expect a series
with only imaginary terms (or sine functions) and a constant term of A2 .
Using equation 11 we can write
1 T At −iωnt
Z
Yn = e dt.
T 0 T
A T −iωnt
Z
Yn = te dt.
T2 0
(12)
which we can integrate by parts
Z T  −inωt T Z T
−iωnt te 1
te dt. = + e−inωt dt
0 −inω 0 inω 0
11

T e−inωT 1  −inωt T
= −0− e 0
(13)
−inω (inω)2

since we know ω = T , we can say

e−inωT = e−in2π = cos(2πn) − i sin(2πn)


= 1 − i0 = 1

so the integral becomes


Z T
T 1
te−iωnt dt = e−inωT − 1

− 2
0 −inω (inω)
T 1
= − (1 − 1)
−inω (inω)2
T
=
−inω
hence
 
A T
Yn =
T 2 −inω
iA
= n = ±1, ±2, ...
2πn
We can check here that
−iA
Y−n = = Yn∗
2πn
as expected, and
Z T
1 At A
Y0 = dt =
T 0 T 2

Hence the required fourier series, using eq 9 is


A iA X einωt
y(t) = +
2 2π n
n=−∞,n6=0

3 Fourier Integrals
Consider a function which is not necessarily periodic, for example see Figure 6, where
we require that y(t) → 0 as t → ±∞.
12

Graph

1.4

1.2

0.8

0.6

0.4

0.2

0
0 0.2 0.4 0.6 0.8 1

Figure 6: An arbitrary function y(t).

What is the frequency content of y(t)? Can we re-write y(t) in terms of the frequency
ν = 1t ? To do this, we need to transform from the time domain t to the frequency domain
ν. In general, we can transform from x to its reciprocal u = 1/x using:
Z ∞
Y (u) = y(x)e−i2πux dx,
Z−∞∞
y(x) = Y (u)ei2πux du, (14)
−∞

Note that the exponent in the transformation from x to u has the opposite sign to the
exponent in the inverse transformation (from u to x). Here Y (u)is called the Fourier
Transform of y(x) and the pair of equations is called the Fouerier Inversion Theorem.
y(x) and Y (u) is called a Fourier Transform pair.

Note that there are several conventions for where the 2π factor appears so you may
also see

• a factor of √12π in both equations (ie define Ynew = 2πY
Z ∞
1
Y (u) = √ y(x)e−iux dx,
2π −∞
Z ∞
1
y(x) = √ Y (u)eiux du,
2π −∞
1
• a factor of 2π in one equation (ie substitute u with v where v = 2πu)
Z ∞
1
Y (u) = y(x)e−iux dx,
2π −∞
Z ∞
y(x) = Y (u)eiux du,
−∞
13

If y(x) is real, Y (u) is complex with Y (−u) = (Y (u))∗ . In general both y(x) and
Y (u) can be complex (but x, u are real).

Usually the ‘ordinary’ variable is t (time) or x (space) and the ‘other’ variable u
represent (angular) frequency, so Y (u) lives in the so-called Frequency domain and u has
the dimensions or inverse time or inverse length.


If y(t) contains an oscillation at period P , Y (u) has a ‘hump’ at u = p .

3.1 Example: Top Hat


Find the Fourier transform of the “top hat” function defined by
T T
y(t) = 1 for − ≤t≤
2 2
y(t) = 0 elsewhere (15)

This is a single box, not a repeated series as in previous examples.

Z ∞
1
Y (u) = y(t)e−iut dt
2π −∞
Z T
1 2
Y (u) = 1e−iut dt
2π − T2
 T
1 1 −iut 2
Y (u) = e
2π −iu − T2
−1  −iuT /2 
Y (u) = e − eiuT /2
2πiu  
−1 uT
Y (u) = −2i sin
2πiu 2
 
1 uT
Y (u) = sin
πu 2

which is the Fourier transform of a top hat as illustrated in figure7

3.2 The Dirac δ function


Note that in general, the wider a function is in space, the narrower it is in the reciprocal
space. If we take this general rule to the extreme for f (x) = constant, which is equivalent
14

Figure 7: (a) A top hat function and (b) its fourier transform.

to a ‘top hat’ function where L → ∞, then we obtain (see Figure 8)


 
1
lim Y (u) = lim sin(πLu) ,
L→∞ L→∞ πu
= δ(u).

Here δ(u) is called the Dirac delta function, and is defined as

δ(u) = 0, for u 6= 0
Z ∞
δ(u)du = 1.
−∞

So the integral over all u of the δ function is unity, and the delta function is non-zero
only at the position u. We can create delta functions at different locations, by providing
an offset e.g.

• δ(u − u0 ) is a δ function at u = +u0

• δ(u + u0 ) is a δ function at u = −u0

A useful property of the δ function is

Z ∞
δ(u − u0 )f (u)du = f (u = u0 ) = f (u0 ).
−∞
15

1 1

0.9 0.9

0.8 0.8

0.7 0.7

0.6 f(x) = constant 0.6

Y(u)
f(x)

0.5 0.5

0.4 0.4

0.3 0.3 f(u) = delta(u-3)


0.2 0.2

0.1 0.1

0 0
0 1 2 3 4 5 6 0 1 2 3 4 5 6

x u

Figure 8: (left) The function f (x) = constant (right) the frequency domain representa-
tion f (x) = δ(u).

Table 1: Standard fourier transforms Y (u) of functions y(t).

y(t) Y (u)
1 1 1
  
cos (2πt/T ) 2 δ u + T  + δ u − T 
1 1 1
sin (2πt/T ) 2 δ u+ T −δ u− T
2 /L2 √ −u2 L2
e−x 2 πe
top hat sin(Lπu)/(πu)

3.3 Some useful transforms and essential integrals


Table 1 lists a few standard fourier transforms.

Z 2π
cos mx cos nxdx = πδmn (16)
0
Z 2π
sin mx sin nxdx = πδmn (17)
0
Z 2π
cos mx sin nxdx = 0 (18)
0

Das könnte Ihnen auch gefallen