Intro to Fourier Series

Intro to
Fourier Series
• Vector decomposition
• Even and Odd functions
• Fourier Series definition and examples
M.H. Perrott © 2007
Copyright © 2007 by M.H. Perrott
All rights reserved.
Intro to Fourier Series, Slide 1
Review of Vector Decomposition
Q
y = [0 1]
r = [1.3 0.75]
I
x = [1 0]
• Any vector can be decomposed into
a set of appropriately weighted
orthonormal basis vectors
• Example:
M.H. Perrott © 2007
Intro to Fourier Series, Slide 2
Calculation of Vector Weights
Q
y = [0 1]
r = [1.3 0.75]
I
x = [1 0]
• Perform inner products with
basis vectors
• Example:
M.H. Perrott © 2007
Intro to Fourier Series, Slide 3
The Basis Vectors are Not Unique
Q
x=[ 1
2
y = [ -1
2
1 ]
2
r = [1.3 0.75]
1 ]
2
I
• Inner product calculations:
M.H. Perrott © 2007
Intro to Fourier Series, Slide 4
Observations on Basis Decomposition
• We can consider any vector as a sum of
weighted orthonormal basis vectors
• The weights are determined by an inner
product calculations (also known as projections)
– Consist of element-by-element multiplications
followed by addition of the resulting products
Q
x=[ 1
2
y = [ -1
2
1 ]
2
r = [1.3 0.75]
• Inner product calculations:
1 ]
2
M.H. Perrott © 2007
I
Intro to Fourier Series, Slide 5
Can We Decompose Functions?
• Consider a periodic function such as a square wave
t
• Could we decompose the above waveform into a
weighted sum of basis functions?
• If so, what would be a good choice for such basis
functions?
• How would we calculate the weights?
M.H. Perrott © 2007
Intro to Fourier Series, Slide 6
Consider Sine Wave Basis Functions
• Suppose we consider sine waves of progressively
increasing frequencies as our basis functions
sin(ωot)
t
sin(2ωot)
t
sin(3ωot)
t
• Check out the following Java applet demo:
– Available at: http://www.falstad.com/fourier/
M.H. Perrott © 2007
Intro to Fourier Series, Slide 7
Issue: Sine Waves Are Limited
• A sine wave corresponds to an odd function
sin(ωot)
t
• Odd function definition:
• Adding odd functions together can only produce an
odd function
t
M.H. Perrott © 2007
Intro to Fourier Series, Slide 8
Consider Cosine Wave Basis Functions
• Even function definition:
• Cosine waves are even functions
cos(ωot)
t
cos(2ωot)
t
cos(3ωot)
M.H. Perrott © 2007
t
Intro to Fourier Series, Slide 9
Combine Cosines and Sines
• If we use both cosine and sine waveforms as basis
functions, we can realize both even and odd
functions (and any combination)
Odd
Even
t
t
sin(ωot)
cos(ωot)
t
t
sin(2ωot)
cos(2ωot)
t
t
cos(3ωot)
M.H. Perrott © 2007
sin(3ωot)
t
t
Intro to Fourier Series, Slide 10
The Fourier Series
• A periodic waveform, x(t), with period T can be
represented as an infinite sum of weighted cosine
and sine waveforms
x(t)
t
T
M.H. Perrott © 2007
Intro to Fourier Series, Slide 11
Intuition for Fourier Series
• Compare Fourier Series to vector decomposition:
Vector Decomp.
Fourier Series
• The Fourier Series weight (i.e., an and bn)
calculations are analogous to vector inner products!
M.H. Perrott © 2007
Intro to Fourier Series, Slide 12
Sine Wave Example
Ksin(ωot)
K
T
t
-K
(DC Average is 0)
M.H. Perrott © 2007
Intro to Fourier Series, Slide 13
Graphical View of Fourier Series (Sine)
Ksin(ωot)
K
T
t
-K
• We can plot Fourier coefficients as a function of
index or frequency
an
af
K
0
K
0
1
2
3
n
0
0
bn
bf
K
0
1/T 2/T 3/T
f (Hz)
K
0
M.H. Perrott © 2007
1
2
3
n
0
0
1/T 2/T 3/T
f (Hz)
Intro to Fourier Series, Slide 14
Fourier Series of Cosine
Kcos(ωot)
K
T
t
-K
an
af
K
0
K
0
1
2
3
n
0
0
bn
bf
K
0
1/T 2/T 3/T
f (Hz)
K
0
M.H. Perrott © 2007
1
2
3
n
0
0
1/T 2/T 3/T
f (Hz)
Intro to Fourier Series, Slide 15
Fourier Series of Cosine with DC component
K(cos(ωot)+1)
2K
T
t
an
af
K
0
K
0
1
2
3
n
0
0
bn
bf
K
0
1/T 2/T 3/T
f (Hz)
K
0
M.H. Perrott © 2007
1
2
3
n
0
0
1/T 2/T 3/T
f (Hz)
Intro to Fourier Series, Slide 16
Fourier Series of Phase-Shifted Cosine
K
T
t
-K
• Using a well known trigonometric identity:
an
af
Kcosθ
0
Kcosθ
0
1
2
3
n
0
0
bn
bf
Ksinθ
0
1/T 2/T 3/T
f (Hz)
Ksinθ
0
M.H. Perrott © 2007
1
2
3
n
0
0
1/T 2/T 3/T
f (Hz)
Intro to Fourier Series, Slide 17
Vector View of Phase-Shifted Cosine
K
T
t
-K
• Using a well known trigonometric identity:
Q = sin(ωot)
Kcos(ωot - θ)
Ksin(θ)
θ
Kcos(θ)
M.H. Perrott © 2007
I = cos(ωot)
Intro to Fourier Series, Slide 18
Square Wave Example
A
x(t)
T/2
t
• By inspection:
-A
– DC average = 0 ⇒ a0 = 0
– x(t) is odd ⇒ an = 0 (n ≥ 1)
M.H. Perrott © 2007
T
Intro to Fourier Series, Slide 19
Summary
• Vector decomposition provides a nice starting point
for understanding Fourier Series
– Vector decomposition into a sum of weighted basis vectors
• Fourier Series decomposes periodic waveforms into
an infinite sum of weighted cosine and sine functions
– We can look at waveforms either in ‘time’ or ‘frequency’
– Useful tool: even and odd functions
• Some issues we will deal with next time
– Fourier Series definition covered today is not very compact
• We will look at a simpler formulation based on complex
exponentials
– Fourier Series only deals with periodic waveforms
• We will introduce the Fourier Transform to deal with nonperiodic waveforms
M.H. Perrott © 2007
Intro to Fourier Series, Slide 20