The Fourier Transform • Introduction • Orthonormal bases for R

advertisement
The Fourier Transform
• Introduction
• Orthonormal bases for Rn
– Inner product
– Length
– Orthogonality
– Change of basis
– Matrix transpose
• Complex vectors
• Orthonormal bases for Cn
– Inner product
– Hermitian transpose
• Orthonormal bases for 2π periodic functions
– Shah basis
– Harmonic signal basis
– Fourier series
• Fourier transform
Orthonormal bases for Rn
Let u = [u1, u2]T and v = [v1, v2]T be vectors in
R2. We define the inner product of u and v to
be
hu, vi = u1v1 + u2v2.
We can use the inner product to define notions
of length and angle. The length of u is given by
the square root of the inner product of u with
itself:
1
2
|u| = q
hu, ui
= u21 + u22.
The angle between u and v can also be defined
in terms of inner product:
hu, vi = |u||v| cos θ
where
θ = cos
−1
hu, vi
.
|u||v|
Orthogonality
An important special case occurs when
hu, vi = |u||v| cos θ = 0.
When cos θ equals zero, θ = π/2 = 90◦.
Orthonormal bases for Rn
Any n orthogonal vectors which are of unit length
1 if i = j
hui, u j i =
0 otherwise.
form an orthonormal basis for Rn. Any vector
in Rn can be expressed as a weighted sum of u1,
u2, u3, ..., un:
v = w1u1 + w2u2 + w3u3 + ... + wnun.
• Question How do we find w1, w2, w3, ..., wn?
• Answer Using inner product.
Example
Consider two orthonormal bases. The
first basis
1
is defined by the vectors u1 =
and u2 =
0
0
. It is easy to verify that these two vectors
1
form an orthonormal basis:
1
0
,
= 1·0+0·1 = 0
0
1
1
1
,
= 1·1+0·0 = 1
0
0
0
0
,
= 0 · 0 + 1 · 1 = 1.
1
1
Example (contd.)
u01
cos θ
=
sin θ
and
The second, by the vectors
− sin θ
0
u2 =
. It is also easy to verify that
cos θ
these two vectors form an orthonormal basis:
cos θ
− sin θ
,
= − cos θ sin θ + cos θ sin θ = 0
sin θ
cos θ
cos θ
cos θ
,
= cos2 θ + sin2 θ = 1
sin θ
sin θ
− sin θ
− sin θ
,
= cos2 θ + sin2 θ = 1.
cos θ
cos θ
Example (contd.)
Let the coefficients of v in the first basis be w1
and w2:
1
0
v = w1
+ w2
.
0
1
What are the coefficients of v in the second basis? Stated differently, what values of w01 and
w02 satisfy:
0 cos θ
0 − sin θ
v = w1
+ w2
?
sin θ
cos θ
Figure 1: Change of basis.
Example (contd.)
To find w01 and w02, we use inner product:
cos θ
w1
0
w1 =
,
sin θ
w2
− sin θ
w1
0
w2 =
,
.
cos θ
w2
Example (contd.)
The above can be written more economically in
matrix notation:
0 w1
cos θ sin θ
w1
=
w02
− sin θ cos θ
w2
w 0 = Aw.
If the rows of A are orthonormal, then A is
an orthonormal matrix. Multiplying by an orthonormal matrix effects a change of basis. A
change of basis between two orthonormal bases
is a rotation.
Matrix transpose
If A rotates w by θ
cos θ sin θ
A=
− sin θ cos θ
then A−1 = AT rotates w 0 by −θ
cos θ − sin θ
T
A =
.
sin θ cos θ
In other words, AT undoes the action of A, i.e.,
they are inverses:
i
h
2
2
cos
θ
+
sin
θ
cos
θ
sin
θ
−
sinθ
cos
θ
AAT = cos θ sin θ − sin θ cos θ
cos2 θ + sin2 θ
1 0
=
.
0 1
For orthonormal matrices, multiplying by the
transpose undoes the change of basis.
Complex vectors in C2
v = [a1eiθ1 , a2eiθ2 ]T is a vector in C2.
• Question Can we define length and angle in
C2 just like in R2?
• Answer Yes, but we need to redefine inner
product:
hu, vi = u∗1v1 + u∗2v2.
Note that this reduces to the inner product for
R2 when u and v are real. The norm of a complex vector is the square root of the sum of the
squares of the amplitudes. For example, for
v ∈ C2:
1
2
|u| = p
hu, ui
= u∗1u1 + u∗2u2.
Orthonormal bases for Cn
• Question How about orthonormal bases for
Cn, do they exist?
• Answer Yes. If hui, u j i = 0 when i 6= j and
hui, u j i = 1 when i = j, then the ui form an
orthonormal basis for Cn.
• Question Do complex orthonormal matrices
exist?
• Answer Yes, except they are called unitary
matrices and (A∗)T undoes the action of A.
That is
A(A∗)T = I
where (A∗)T = AH is the Hermitian transpose of A.
The space of 2π periodic functions
A function, f , is 2π periodic iff f (t) = f (t +
2π). We can think of two complex 2π periodic
functions, e.g., f and g, as infinite dimensional
complex vectors. Length, angle, orthogonality, and rotation (i.e., change of basis) still have
meaning. All that is required is that we generalize the definition of inner product:
h f , gi =
Z
π
f ∗(t)g(t)dt.
−π
The length (i.e., the norm) of a function is:
rZ
π
1
| f | = h f , f i2 =
f ∗(t) f (t)dt.
−π
Two functions, f and g, are orthogonal when
h f , gi =
Z
π
−π
f ∗(t)g(t)dt = 0.
Scaling Property of the Impulse
The area of an impulse scales just like the area
of a pulse, i.e., contracting an impulse by a fac1
:
tor of a changes its area by a factor of |a|
∞
1
Π(at)dt =
= lim
|a| ε→0
−∞
It follows that:
Z
lim
Z
ε
ε→0 −ε
|a|δ(at)dt = lim
Z
Z
ε
−ε
ε
ε→0 −ε
δ(at)dt.
δ(t)dt = 1.
Since the impulse is defined by the above integral property, we conclude that:
|a|δ(at) = δ(t).
Shah basis
The Shah function is a train of impulses:
∞
III(t) =
∑
n=−∞
δ(t − n).
We can use the scaling property of the impulse
to define a 2π periodic Shah function:
1 t 1 ∞ t
=
δ
III
−n
∑
2π
2π
2π n=−∞ 2π
2π ∞ t
δ 2π
−n
=
∑
2π n=−∞
2π
∞
=
∑
n=−∞
δ (t − 2πn) .
Shah basis (contd.)
Consider the infinite
set of 2π periodic Shah
1
III t−τ
functions, 2π
2π , for −π ≤ τ < π. Because
t−τ
1
III
= δ(t − τ) for −π ≤ t ≤ π it follows
2π
2π
that
1
t − τ1
1
t − τ2
III
, III
2π
2π
2π
2π
=
Z
π
−π
δ (t − τ1) δ (t − τ2) dt
Rπ
equals 0 when τ1 6= τ2 and equals −π δ(t −τ1)dt =
1 when τ1 = τ2. It follows that the infinite
set
1
III t−τ
of 2π periodic Shah functions, 2π
2π , for
−π ≤ τ < π form an orthonormal basis for the
space of 2π periodic functions.
1
...
...
...
...
Figure 2: Making a 2π periodic Shah function.
Shah basis (contd.)
• Question How do we find the coefficients,
w(τ), representing f (t) in the Shah basis?
How do we find w(τ) such that
Z π
1
t −τ
f (t) =
dτ?
w(τ)III
2π −π
2π
• Answer Take inner products of f with the
infinite set of 2π periodic Shah functions:
1
t −τ
w(τ) =
III
, f (t) .
2π
2π
Shah basis (contd.)
t−τ
1
Because 2π III 2π = δ(t − τ) for −π ≤ t ≤ π it
follows that
Z π
1
t −τ
w(τ) =
f (t)III
dt
2π −π
2π
=
Z
π
−π
f (t)δ (t − τ)dt
which by the sifting property of the impulse is
just:
w(τ) = f (τ).
We see that the coefficients of f in the Shah
basis are just f itself!
Harmonic signal basis
• Question How long is a harmonic signal?
• Answer The length of a harmonic signal is
|e
jω t
jω t
jω t 21
| = he , e i
Z π
21
=
e− jω t e jω t dt
−π
=
Z
π
√ −π
= 2π.
dt
12
Harmonic signal basis (contd.)
• Question What is the angle between two harmonic signals with integer frequencies?
• Answer The angle between two harmonic
signals with integer frequencies is
he
jω1t
,e
jω2t
Z
π
e− jω1t e jω2t dt
"−π
# π
e j(ω2−ω1)t =
.
j(ω2 − ω1) i =
−π
Since this function is the same at −π and π (for
all integers ω1 and ω2), we conclude that
he jω1t , e jω2t i = 0
when ω1 and ω2 are integers and ω1 6= ω2.
Fourier Series of 2π Periodic Functions
It follows that the infinite set of harmonic signals, √12π e jω t for integer ω and −∞ ≤ ω ≤ ∞
form an orthonormal basis for the space of 2π
periodic functions.
• Question What are the coefficients of f in
the harmonic signal basis?
• Answer Take inner products of f with the
infinite set of harmonic signals.
This is the analysis formula for Fourier series:
1 jω t
F(ω) = √ e , f
2π
Z π
1
= √
f (t)e− jω t dt
2π −π
for integer frequency, ω.
Fourier Series of 2π Periodic Functions (contd.)
The function can be reconstructed using the synthesis formula for Fourier series:
∞
1
jω t
f (t) = √
F(ω)e
.
∑
2π ω=−∞
Fourier Series Example
The Fourier series for the Shah basis function
1 t f (t) = III
2π
2π
is
1 jω t 1
t
F(ω) = √ e , III
2π
2π
2π
Z π
1
√
=
δ(t)e jω t dt
2π −π
1
= √ .
2π
Consequently
∞
1
jω t
f (t) = √
F(ω)e
∑
2π ω=−∞
1 ∞ jω t
=
e .
∑
2π ω=−∞
Deep Thought
The analysis formula for Fourier series effects a
change of basis. It is a rotation in the space of
2π periodic functions. The synthesis formula
undoes the change of basis. It is the opposite
rotation.
0.5
0.8
line 1
line 2
line 1
line 2
0.7
0.4
0.6
0.3
0.5
0.4
0.2
0.3
0.1
0.2
0.1
0
0
-0.1
-0.1
-0.2
-15
-10
-5
0
5
10
15
-0.2
-15
-10
-5
(a)
0
5
10
15
(b)
1.6
3
line 1
line 2
line 1
line 2
1.4
2.5
1.2
2
1
1.5
0.8
0.6
1
0.4
0.5
0.2
0
0
-0.5
-0.2
-0.4
-15
-10
-5
0
5
10
15
-1
-15
-10
-5
(c)
0
5
15
(d)
6
12
line 1
line 2
line 1
line 2
5
10
4
8
3
6
2
4
1
2
0
0
-1
-2
-2
-15
10
-10
-5
0
(e)
5
10
15
-4
-15
-10
-5
0
5
10
15
(f)
Figure 3: Re(t) (solid) and Im(t) (dashed) of truncated Fourier series for Shah basis function. (a)
−1 ≤ ω ≤ 1 (b) −2 ≤ ω ≤ 2 (c) −4 ≤ ω ≤ 4 (d) −8 ≤ ω ≤ 8 (e) −16 ≤ ω ≤ 16 (f) −32 ≤ ω ≤ 32.
25
45
line 1
line 2
line 1
line 2
40
20
35
30
15
25
10
20
15
5
10
5
0
0
-5
-15
-10
-5
0
5
10
15
-5
-15
-10
-5
(a)
0
5
10
15
(b)
90
180
line 1
line 2
line 1
line 2
80
160
70
140
60
120
50
100
40
80
30
60
20
40
10
20
0
0
-10
-15
-20
-15
-10
-5
0
5
10
15
-10
-5
(c)
0
5
15
(d)
350
700
line 1
line 2
line 1
line 2
300
600
250
500
200
400
150
300
100
200
50
100
0
0
-50
-15
10
-10
-5
0
(e)
5
10
15
-100
-15
-10
-5
0
5
10
15
(f)
Figure 4: Re(t) (solid) and Im(t) (dashed) of truncated Fourier series for Shah basis function. (a)
−64 ≤ ω ≤ 64 (b) −128 ≤ ω ≤ 128 (c) −256 ≤ ω ≤ 256 (d) −512 ≤ ω ≤ 512 (e) −1024 ≤ ω ≤
1024 (f) −2048 ≤ ω ≤ 2048.
Fourier Series of T -Periodic Functions
A function, f , is T -periodic iff f (t) = f (t + T ).
• Analysis formula
*√
+
2π j2πω t/T
F(ω) =
e
,f
T
√ Z
2π T /2
=
f (t)e− j2πω t/T dt
T −T /2
for integer frequency, ω.
• Synthesis formula
√
2π ∞
j2πω t/T
F(ω)e
f (t) =
∑
T ω=−∞
Observe that if we substitute T = 2π in the above
expressions, we get the formulas for 2π periodic functions.
The Fourier Transform
Functions with finite length are termed square
integrable.
rZ ∞
|f| =
| f (t)|2 dt
rZ−∞
∞
=
f ∗(t) f (t)dt
< ∞.
−∞
For square integrable functions, we can take the
limit of the Fourier series for T -periodic functions as T → ∞, in which case, it is possible to
show that...
The Fourier Transform (contd.)
• Analysis formula
j2πst F(s) = e
,f
=
Z
∞
f (t)e− j2πst dt
−∞
• Synthesis formula
f (t) =
Z
∞
−∞
F(s)e j2πst ds
Download