Time Frequency Analysis
Time Frequency Analysis
Time Frequency Analysis
Aalborg University
I will use following the book for the material on the discrete
wavelet transform, the wavelet packet transform, and the
introduction to the time-frequency plane.
A. Jensen and A. la Cour-Harbo:
Ripples in Mathematics
The Discrete Wavelet Transform
Springer-Verlag 2001.
You will need to refer to your books on signal procesing or
other subjects for introductory Fourier Analysis.
A general introduction to the theory behind time-frequency
analysis is
Plan
09:00–10:15 Review of Fourier Analysis
Plan
09:00–10:15 Review of Fourier Analysis
10:30–12:00 Introduction to the Discrete Wavelet
Transform
Plan
09:00–10:15 Review of Fourier Analysis
10:30–12:00 Introduction to the Discrete Wavelet
Transform
12:00–13:00 Lunch break
Plan
09:00–10:15 Review of Fourier Analysis
10:30–12:00 Introduction to the Discrete Wavelet
Transform
12:00–13:00 Lunch break
13:00–13:15 Question session
Plan
09:00–10:15 Review of Fourier Analysis
10:30–12:00 Introduction to the Discrete Wavelet
Transform
12:00–13:00 Lunch break
13:00–13:15 Question session
13:15–14:30 The time-frequency plane
Plan
09:00–10:15 Review of Fourier Analysis
10:30–12:00 Introduction to the Discrete Wavelet
Transform
12:00–13:00 Lunch break
13:00–13:15 Question session
13:15–14:30 The time-frequency plane
14:30–15:00 Exercise
Plan
09:00–10:15 Review of Fourier Analysis
10:30–12:00 Introduction to the Discrete Wavelet
Transform
12:00–13:00 Lunch break
13:00–13:15 Question session
13:15–14:30 The time-frequency plane
14:30–15:00 Exercise
15:00–16:00 Uncertainty relations I
x(t) real-valued:
x̂(ω) = x̂(−ω)
Z 2π
X
2 1
|x[n]| = |X(ω)|2 dω
n∈Z
2π 0
x[n] real-valued:
X(ω) = X(−ω)
DTDFFT x ←→ x̂
Orthogonal basis for CN {ek }k=0,...,N −1 given by
ek [n] = ej2πnk/N , k, n = 0, . . . , N − 1
N −1 N −1
X 1 X
x̂[k] = x[n]e −j2πnk/N
x[n] = x̂[k]ej2πnk/N
n=0
N k=0
N −1 N −1
X 1 X
|x[n]|2 = |x̂[k]|2
n=0
N k=0
x ∈ CN realvalued. Then
N
X −1 N
X −1
x̂[k] = x[n]ej2πnk/N = x[n]e−j2πn(N −k)/N = x̂[N − k]
n=0 n=0
x̂[k] = X(2πk/N )
0.5 0.5
0 0
0 5 10 15 0 5 10 15
1 1
0.5 0.5
0 0
0 5 10 15 0 5 10 15
To interpretation
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
56 40 8 24 48 48 40 16
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
56 + 40
56 40 8 24 48 48 40 16 56 − 48
2
48 8
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
56 40 8 24 48 48 40 16
48 16 8 −8
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
56 40 8 24 48 48 40 16
48 16 48 8 −8 0
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
56 40 8 24 48 48 40 16
48 16 48 28 8 −8 0 12
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
56 40 8 24 48 48 40 16
48 16 48 28 8 −8 0 12
8 −8 0 12
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
56 40 8 24 48 48 40 16
48 16 48 28 8 −8 0 12
32 16 8 −8 0 12
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
56 40 8 24 48 48 40 16
48 16 48 28 8 −8 0 12
32 38 16 10 8 −8 0 12
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
56 40 8 24 48 48 40 16
48 16 48 28 8 −8 0 12
32 38 16 10 8 −8 0 12
16 10 8 −8 0 12
First row is the original signal. The second row in the table
is generated by taking the mean of the samples pairwise,
put them in the first four places, and then the difference
between the the first member of the pair and the computed
mean. Computations are repeated on the means.
Differences are kept in each step.
56 40 8 24 48 48 40 16
48 16 48 28 8 −8 0 12
32 38 16 10 8 −8 0 12
35 −3 16 10 8 −8 0 12
35 −3 16 10 8 −8 0 12
32 38
35 −3 16 10 8 −8 0 12
32 38 16 10 8 −8 0 12
35 −3 16 10 8 −8 0 12
48 16 48 28
32 38 16 10 8 −8 0 12
35 −3 16 10 8 −8 0 12
48 16 48 28 8 −8 0 12
32 38 16 10 8 −8 0 12
35 −3 16 10 8 −8 0 12
35 0 16 10 8 −8 0 12
35 35
35 0 16 10 8 −8 0 12
35 35 16 10 8 −8 0 12
35 0 16 10 8 −8 0 12
51 19 45 25
35 35 16 10 8 −8 0 12
35 0 16 10 8 −8 0 12
51 19 45 25 8 −8 0 12
35 35 16 10 8 −8 0 12
35 0 16 10 8 −8 0 12
50 50
40 40
30 30
20 20
10 10
0 0
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
a+b
s= ,
2
d = a − s.
a = s + d; ,
b = s − d.
First step: d, s → d + s, s
Second step: a, s → a, 2s − a.
sj
split P U
−
oddj−1 dj−1
P : Predict
U : Update
a, b → δ, µ
where
δ =b−a
a+b δ
µ= =a+
2 2
In general:
dj−1 = oddj−1 − P (evenj−1 ).
Update: In the difference-mean case:
In general:
sj−1 = evenj−1 + U (dj−1 ).
evenj−1 sj−1
+ split P U
sj
split P U −
oddj−2 dj−2
−
oddj−1 dj−1
dj−1 [n]
sj [2n]
Inverse transform:
sj [2n] = sj−1 [n] − 14 (dj−1 [n − 1] + dj−1 [n]),
sj [2n + 1] = dj−1 [n] + 12 (sj [2n] + sj [2n + 2]).
sj sj
split P U U P merge
− +
oddj−1 dj−1 oddj−1
sj
split P1 U1 P2 U2 P3 U3
− − −
oddj−1 dj−1
An example, Daubechies 4
(1)
√
sj−1 [n] = sj [2n] + 3sj [2n + 1]
(1) 1
√ (1) 1
√ (1)
dj−1 [n] = sj [2n + 1] − 4 3sj−1 [n] − 4 ( 3 − 2)sj−1 [n − 1]
(2) (1) (1)
sj−1 [n] = sj−1 [n] − dj−1 [n + 1]
√
3 − 1 (2)
sj−1 [n] = √ sj−1 [n]
2
√
3 + 1 (1)
dj−1 [n] = √ dj−1 [n]
2
Ta Ts
−0.02
50 100 150 200 250
0.05
−0.05
20 40 60 80 100 120
0.2
−0.2
10 20 30 40 50 60
4
2
0
−2
−4
10 20 30 40 50 60
Time-Frequency Analysis – p.44/96
Examples 3
−1 0
−1
0 50 100 150 200 250 300 350 400 450 500 0 50 100 150 200 250 300 350 400 450 500
0
1.5
−2
1
1
0
0.5
−1
0.5
0
0
−0.5
−0.5
2
−1
0
−1.5
−2
0 50 100 150 200 250 300 350 400 450 500 0 50 100 150 200 250 300 350 400 450 500
2 2
1.5 1.5
1 1
0.5 0.5
0 0
−0.5 −0.5
−1 −1
−1.5 −1.5
0 50 100 150 200 250 300 350 400 450 500 0 50 100 150 200 250 300 350 400 450 500
2 2
1.5 1.5
1 1
0.5 0.5
0 0
−0.5 −0.5
−1 −1
−1.5 −1.5
0 50 100 150 200 250 300 350 400 450 500 0 50 100 150 200 250 300 350 400 450 500
2 2
1.5 1.5
1 1
0.5 0.5
0 0
−0.5 −0.5
−1 −1
−1.5 −1.5
0 50 100 150 200 250 300 350 400 450 500 0 50 100 150 200 250 300 350 400 450 500
2.5
1.5
0.5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
1.5
0.5
−0.5
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
Time-Frequency Analysis – p.54/96
Interpretation 1
1 1 1 1 −1 −1 −1 −1
1 1 −1 −1 0 0 0 0
1 −1 0 0 0 0 0 0
0 1 0 0 0 0 0 0
1 1 −1 −1 0 0 0 0
1 −1 0 0 0 0 0 0
0 0 1 0 0 0 0 0
0 0 1 0 0 0 0 0
1 0 0 0 0 0 0 0
1 1
2 0 0 0 2 0 0 0
1 1 1
4 0 4 0 2 0 0 0
1 1 1 1
8 8 4 0 2 0 0 0
(3)
Here is a graphical representation of the contents of Wa :
1 1
0 0
−1 −1
1 1
0 0
−1 −1
1 1
0 0
−1 −1
1 1
0 0
−1 −1
0 0.25 0.5 0.75 1 0 0.25 0.5 0.75 1
−1
−2
−3
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
−1
−2
−3
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
−1
−2
−3
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
−1
−2
−3
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
−1
−2
−3
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.1 0.1
0.05 0.05
0 0
−0.05 −0.05
−0.1 −0.1
0.35 0.4 0.45 0.5 0.55 0.6 0.65 0.35 0.4 0.45 0.5 0.55 0.6 0.65
Ta Ts
1 2 3 4 1 2 3 4
Ta Ta
Ta Ta
Ta
Ta Ta
Ta
Ta
Ta
(a) (b)
8 + (−8) 56 40 8 24 48 48 40 16
8−0
2 48 16 48 28 8 −8 0 12
32 38 16 10 0 6 8 −6
35 −3 13 3 3 −3 1 7
Decomposition Reconstruction
56 40 8 24 48 48 40 16 3 −3
48 16 48 28 8 −8 0 12 0 6 8 −6
32 38 16 10 0 6 8 −6 48 16 48 28 8 −8 0 12
35 −3 13 3 3 −3 1 7 56 40 8 24 48 48 40 16
56 40 8 24 48 48 40 16 48 16 48 28 8 −8 0 12
32 38 16 10 8 −8 0 12 35 −3 16 10 8 −8 0 12
35 −3 16 10 0 6 1 7 35 −3 13 3 3 −3 1 7
Aj Aj
Aj+1
Cost functions
Threshold Kthres (a) equals number of elements in a with
absolute value greater than the threshold ε . Example:
Cost functions
`p -norm
Notation: a = {a[n]}, 0 < p < ∞ (useful values are
0 < p < 2)
X
K`p (a) = |a[n]|p .
n
Shannon entropy
X
KShannon (a) = |a[n]|2 log(|a[n]|2 )
n
8
4 3
2 2 1 2
1 1 1 1 1 1 0 1
8
4 3
2 2 1 2
1 1 1 1 1 1 0 1
8
4 3
2 2 1 2
2=1+1
1 1 1 1 1 1 0 1
8
4 3
2 2 1 2
1 1 1 1 1 1 0 1
8
4 3
2 2 1 2
2=1+1
1 1 1 1 1 1 0 1
8
4 3
2 2 1 2
1 1 1 1 1 1 0 1
8
4 3
2 2 1 2
1<1+1
1 1 1 1 1 1 0 1
8
4 3
2 2 1 2
1 1 1 1 1 1 0 1
8
4 3
2 2 1 2
2>0+1
1 1 1 1 1 1 0 1
8
4 3
2 2 1 1
1 1 1 1 1 1 0 1
8
4 3
4=2+2
2 2 1 1
1 1 1 1 1 1 0 1
8
4 3
2 2 1 1
1 1 1 1 1 1 0 1
8
4 3
3>1+1
2 2 1 1
1 1 1 1 1 1 0 1
8
4 2
2 2 1 1
1 1 1 1 1 1 0 1
8
8>4+2
4 2
2 2 1 1
1 1 1 1 1 1 0 1
6
4 2
2 2 1 1
1 1 1 1 1 1 0 1
− 3π
T − 2π
T − Tπ 0 π
T
2π
T
3π
T ω
0
0T 1T 2T 3T 4T
π
2T
|x[0]|2 |x[2]|2
0
0T 1T 2T 3T 4T
Product of FT
Original signal and filters
(1) 8 −8 0 12 (2)
56 8 48 40
40 24 48 16
48 16 48 28
(3) 8 −8 0 12 8 −8 0 12 (4)
16 10 16 10
−3
32 38
35
More examples:
4
8
4
16
4
8
4
32
4
8
4
16
4
8
0 2 4 6 8 Hz
0 2 4 6 8 Hz 0 2 4 6 8 Hz
2↓ 2↓
0 (0) 2 (2) 4 (4) 0 (0) 2 (2) 4 (4) 0 (8) 2 (6) 4 (4) 0 (8) 2 (6) 4 (4)
2↓ 2↓ 2↓ 2↓
0 − 64
0 Hz 64 Hz
H G
0 − 32 0 − 32 32 − 64 32 − 0
0 Hz 32 Hz 64 Hz 32 Hz
H G H G
0 − 16 16 − 32 32 − 16 16 − 0
0 − 16 16 − 0 0 − 16 16 − 0
0 Hz 16 Hz 32 Hz 16 Hz 48 Hz 64 Hz 48 Hz 32 Hz
H G H G H G H G
0−8 8 − 16 16 − 8 8−0 0−8 8 − 16 16 − 8 8−0
0−8 8−0 0−8 8−0 0−8 8−0 0−8 8−0
0 8 16 8 24 32 24 16 48 56 64 56 40 48 40 32
0 1 3 2 6 7 5 4
000 001 011 010 110 111 101 100
H G
0 − 32 64 − 32
H G G H
0 − 16 32 − 16 32 − 48 64 − 48
H G G H H G G H
0−8 16 − 8 16 − 24 24 − 32 32 − 40 48 − 40 56 − 48 56 − 64
0 1 2 3 4 5 6 7
Frequency
Time Time
Frequency
Time Time
and
sin(ω0 t) + sin(2ω0 t) + sin(3ω0 t) ,
with ω0 = 405.5419.
The signal
25
20
15
10
−5
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
Frequency
Time Time
Time-Frequency Analysis – p.96/96