download

Theory and Engineering Applications
ECE
0909.554.01 /0909.402.02
by
Dr. Robi Polikar
 Instructor: Dr. Robi Polikar,
ª Office: 136 Rowan
ª Office Hours: Open office hours. Anytime I am available in my
office (when the door is open), you are more than welcome to come
in.
ª Phone: 256-5372 (O), 875 1520 (H)
ª E-Mail: [email protected]
 Meeting Times:
ª When: Tuesdays, 3:15 – 5:45 (?)
ª Where: 239 Rowan Hall
Texts
1. Wavelets Transforms: Introduction to Theory and
Applications, Rao
and Bopardikar, Addison Wesley, 1998.
ISBN:0201634635
2. Wavelets and Filter Banks, Gilbert Strang and Truong
Nguyen,
Welleslay-Cambridge Press, 1997. ISBN: 0961408871
3. Introduction to Wavelets and Wavelet Transforms: A Primer,
Burrus, Gopinath and Guo, Prentice Hall, 1998.
ISBN:0134896009
4. A Primer on Wavelets and Their Scientific Applications, J.
Walker
CRC Press, 1999, ISBN: 0849382769
5. The Illustrated Wavelet Transform Handbook, P. Addison,
IoP Publishing, 2002, ISBN: 0750306920
Concept Maps
 Concept maps are tools for organizing and representing knowledge1
 Concept maps include “concepts” which are connected by lines to form “propositions”. The
lines are labeled to specify the relationship between the concepts.
 They are typically represented in a hierarchical fashion, with more general concepts at the
top / center, and more specific, less general ones at the the bottom or extremities.
 The hierarchy depends on some context in which the knowledge is applied, such as with
respect to a specific question.
 Cross links may connect concepts that are at different geographical locations of the map.
Such links represent the multidisciplinary nature of the topic and the creative thinking
ability of the person preparing the map.
 Creating concept maps is not very easy, and requires some amount of familiarity with the
technique as well as the context. No concept map is ever final, as it can be continually
improved. One should be careful however, against frivolously creating concepts and/or
links between them (which result in invalid propositions).
 Concept maps provide a very powerful mechanism for presenting the relationships between
concepts as well as the preparer level of understanding of these concepts.
1. J.D. Novak, http://cmap.coginst.ufw.edu/info
Sample Concept Maps
(Not Complete)
What is a plant?
Concepts
Cross link
Link
labels
Links
Sample
Concept Maps
Sample
Concept Maps
The semester at a Glance
Tentative Course Content
Signal Processing
Freq.-domain techniques
Time-domain techniques
TF domain techniques
Fourier T.
Filters
Non/Stationary Signals
Stationary Signals
STFT
WAVELET
TRANSFORMS
CWT
DWT
MRA
2-D DWT
Homework: Draw a concept map of Signal Processing
with particular emphasis to TFRs and wavelets.
SWT
Applications
Denoising
Compression
Signal Analysis
Disc. Detection
BME / NDE
Other…
An Ambitious Syllabus
Week of
January
Material to be uncovered
17
24
31
February
7
Polikar
Polikar
Polikar
Polikar
21
Multirate signal processing
Student - TBD
7
14
28
4
11
May
Continuous time wavelet transform
Polikar
Discrete wavelet transform
21
April
Time – frequency representation: Short time Fourier transform
Instructor
14
28
March
Introduction and motivation: Why do we study wavelet
transforms? Fourier Transform review
Fourier review cont., DTFT, DFT, properties, filters,
upsampling / downsampling
18
25
2
Filter Banks / Part I
Filter Banks / Part II
Spring Break
Two Dimensional Wavelet Analysis - Image Compression JPEG 2000 - MPEG
Stationary WT, Wavelet packets, Wavelet Shrinkage
Lifting Scheme
Adaptive Signal Processing
Other Techniques for Non-Stationary Analysis
TBA / Project Presentations
Project Presentations
Student - TBD
Student - TBD
Student - TBD
Student - TBD
Student - TBD
Student - TBD
Student - TBD
The Story of Wavelets
Theory and Engineering Applications
Jamboree 1
January 17-19, 2006
In today’s show:
• What are transforms, what kind of transforms are available, who do we
need one?
• The king of all transforms: the Fourier transform
• The crippled king: shortcomings of Fourier transform
• Attempts to rescue the king: the short time Fourier transforms (STFT)
• Shortcomings of the STFT
• Long live the new king: the wavelet transform
Let’s Talk About…
…Transforms
 What is a transform???
 Why do we need one?
 What transforms are available?
ª FS, FT, DFT, FFT, …
 Did Fourier find all the transforms there are?
 Fourier who…?
 Are there any non-Fourier transforms?
 Do we need them? Do we care…?
What is a Transform
and Why Do we Need One ?
 Transform: A mathematical operation that takes a function or
sequence and maps it into another one
 Transforms are good things because…
ª The transform of a function may give additional /hidden
information about the original function, which may not be available
/obvious otherwise
ª The transform of an equation may be easier to solve than the original
equation (recall Laplace transforms for “Defeques”)
ª The transform of a function/sequence may require less storage,
hence provide data compression / reduction
ª An operation may be easier to apply on the transformed function,
rather than the original function (recall convolution)
Properties of Transforms
 Most useful transforms are:
ª Linear: we can pull out constants, and apply superposition
T (αf + βg ) = αT ( f ) + βT ( f )
ª One-to-one: different functions have different transforms
ª Invertible:for each transform T, there is an inverse transform T-1
using which the original function f can be recovered (kind of – sort
of the undo button…)
f
T
F
T-1
f
 Continuous transform: map functions to functions
 Discrete transform: map sequences to sequences
 Semi-discrete transform: relate functions with sequences
What Does a Transform
Look Like…?
 Complex function representation through simple building
blocks
Complex Function = ∑ (weight )i • (BasisFunction )i
f = ∑ Fi K ij
i
Fi = ∑ K ij f j
i
f ( x) = ∫ K ( x, ω ) F (ω )dω
(discrete)
j
(continuous)
F (ω ) = ∫ K ( x, ω ) f ( x)dx
 Compressed representation through using only a few
blocks (called basis functions / kernels)
 Sinusoids as building blocks: Fourier transform
ª Frequency domain representation of the function
What Transforms Are Available?
 Fourier series
F [k ] = ∫ f (t )e
− j 2πkt / N
dt
1 N −1
f (t ) =
F [k ]e j 2πkt / N
∑
2π i = 0
 Continuous Fourier transform
F (ω ) = ∫ f (t )e − jωt dt
f (t ) =
 Discrete Fourier transform
F [k ] =
∑
F ( s ) = ∫ f (t )e
F[ z] =
f [ n ]e
n=0
 Laplace transform
 Z-transform
N −1
N −1
∑
n=0
f [n]e
− st
− zn
dt
− j 2π k / N
1
jω t
F
(
ω
)
e
dω
∫
2π
1 N −1
f[n] =
F [ k ]e j 2πk / N
∑
2π k = 0
1
f (t ) =
2π
st
F
(
s
)
e
ds
∫
1 N −1
f[n] =
F [ z ]e zn
∑
2π z = 0
Fourier Who…?
“An arbitrary function, continuous or with
discontinuities, defined in a finite interval by an
arbitrarily capricious graph can always be
expressed as a sum of sinusoids”
J.B.J. Fourier
December, 21, 1807
Jean B. Joseph Fourier
(1768-1830)
F [k ] = ∫ f (t )e
− j 2πkt / N
dt
1 N −1
j 2πkt / N
f (t ) =
F
[
k
]
e
∑
2π i = 0
Practical Applications of
Fourier Transforms
An image highly corrupted with sinusoidal noise.
50
100
150
200
250
300
50
100
150
200
250
300
Practical Applications of
Fourier Transforms
A row from the image
250
200
150
100
50
0
50
100
5
5
150
200
250
300
200
250
300
FT of this row
x 10
4
3
2
1
0
0
50
100
150
A simple notch filter applied to all rows will clean this image.
Equivalently, you can reset the offending FT coefficients to zero,
and take the inverse FT, row by row…
Practical Applications of
Fourier Transforms
Original Image
Recovered Image
50
50
100
100
150
150
200
200
250
250
300
300
50
100
150
200
250
300
50
100
150
200
250
300
How Does FT Work Anyway?
 Recall that FT uses complex exponentials (sinusoids) as
building blocks.
e j ω t = cos (ω t ) + j sin (ω t )
 For each frequency of complex exponential, the sinusoid at
that frequency is compared to the signal.
 If the signal consists of that frequency, the correlation is
high Æ large FT coefficients.
1
j ωt
F (ω ) = ∫ f (t )e − jωt dt
f (t ) =
F
(
ω
)
e
dω
∫
2π
 If the signal does not have any spectral component at a
frequency, the correlation at that frequency is low / zero,
Æ small / zero FT coefficient.
FT At Work
Complex exponentials
(sinusoids) as basis
functions:
X ( jω ) =
x(t ) =
1
2π
F
An ultrasonic A-scan using 1.5 MHz transducer, sampled at 10 MHz
∞
∫ x(t ) ⋅ e
−∞
∞
− j ωt
∫ X ( jω ) ⋅ e
−∞
dt
j ωt
dt
FT At Work
x1 (t ) = cos(2π ⋅ 5 ⋅ t )
x2 (t ) = cos(2π ⋅ 25 ⋅ t )
x3 (t ) = cos(2π ⋅ 50 ⋅ t )
FT At Work
x1 (t )
F
X 1 (ω )
x2 (t )
F
X 2 (ω )
x3 (t )
F
X 3 (ω )
FT At Work
x4 (t ) = cos(2π ⋅ 5 ⋅ t )
+ cos(2π ⋅ 25 ⋅ t )
+ cos(2π ⋅ 50 ⋅ t )
x4 (t )
F
X 4 (ω )
Stationary and Non-stationary
Signals
 FT identifies all spectral components present in the signal, however it
does not provide any information regarding the temporal (time)
localization of these components. Why?
 Stationary signals consist of spectral components that do not change in
time
ª all spectral components exist at all times
ª no need to know any time information
ª FT works well for stationary signals
 However, non-stationary signals consists of time varying spectral
components
ª How do we find out which spectral component appears when?
ª FT only provides what spectral components exist , not where in
time they are located.
ª Need some other ways to determine time localization of spectral
components
Stationary and Non-stationary
Signals
 Stationary signals’ spectral characteristics do not change with time
x4 (t ) = cos(2π ⋅ 5 ⋅ t )
+ cos(2π ⋅ 25 ⋅ t )
+ cos(2π ⋅ 50 ⋅ t )
 Non-stationary signals have time varying spectra
x5 (t ) = [ x1 ⊕ x2 ⊕ x3 ]
⊕ Concatenation
Non-stationary Signals
5 Hz
Perfect knowledge of what
frequencies exist, but no
information about where
these frequencies are
located in time
20 Hz
50 Hz
FT Shortcomings
 Complex exponentials stretch out to infinity in time
ª They analyze the signal globally, not locally
ª Hence, FT can only tell what frequencies exist in the entire
signal, but cannot tell, at what time instances these frequencies
occur
ª In order to obtain time localization of the spectral components,
the signal need to be analyzed locally
ª HOW ?
Short Time Fourier Transform
(STFT)
1.
2.
3.
4.
5.
6.
Â
Choose a window function of finite length
Put the window on top of the signal at t=0
Truncate the signal using this window
Compute the FT of the truncated signal, save.
Slide the window to the right by a small amount
Go to step 3, until window reaches the end of the signal
For each time location where the window is centered, we
obtain a different FT
ª Hence, each FT provides the spectral information of a
separate time-slice of the signal, providing simultaneous time
and frequency information
STFT
STFT
Time
parameter
Frequency
parameter
ω ′
STFTx (t , ω ) =
Signal to
be analyzed
FT Kernel
(basis function)
∫ [x(t ) ⋅W (t − t ′)]⋅ e
− j ωt
dt
t
STFT of signal x(t):
Computed for each
window centered at t=t’
Windowing
function
Windowing function
centered at t=t’
STFT at Work
1
1
0.5
0.5
0
0
-0.5
-0.5
-1
-1
-1.5
0
100
200
300
-1.5
0
1
1
0.5
0.5
0
0
-0.5
-0.5
-1
-1
-1.5
0
100
200
300
-1.5
0
100
200
300
100
200
300
Windowed
sinusoid allows
FT to be
computed only
through the
support of the
windowing
function
STFT
 STFT provides the time information by computing a different FTs for
consecutive time intervals, and then putting them together
ªTime-Frequency Representation (TFR)
ªMaps 1-D time domain signals to 2-D timefrequency signals
 Consecutive time intervals of the signal are obtained by truncating the
signal using a sliding windowing function
 How to choose the windowing function?
ªWhat shape? Rectangular, Gaussian, Elliptic…?
ªHow wide?
™ Wider window require less time steps Æ low time resolution
™ Also, window should be narrow enough to make sure that the
portion of the signal falling within the window is stationary
™ Can we choose an arbitrarily narrow window…?
Selection of STFT Window
STFTxω (t ′, ω ) = ∫ [x(t ) ⋅ W (t − t ′)]⋅ e − jωt dt
t
Two extreme cases:
 W(t) infinitely long: W (t ) = 1
Î
STFT turns into FT, providing
excellent frequency information (good frequency resolution), but no time
information
 W(t) infinitely short:
W (t ) = δ (t )
ω ′
− jω t
′
′ − j ωt ′
STFTx (t , ω ) = ∫ [x(t ) ⋅ δ (t − t )]⋅ e
t
dt = x(t ) ⋅ e
Î STFT then gives the time signal back, with a phase factor. Excellent
time information (good time resolution), but no frequency information
Wide analysis windowÆ poor time resolution, good frequency resolution
Narrow analysis windowÆgood time resolution, poor frequency resolution
Once the window is chosen, the resolution is set for both time and frequency.
Heisenberg Principle
Δt ⋅ Δf ≥
Time resolution: How well
two spikes in time can be
separated from each other in
the transform domain
1
4π
Frequency resolution: How
well two spectral components
can be separated from each
other in the transform domain
Both time and frequency resolutions cannot be arbitrarily high!!!
Î ÎWe cannot precisely know at what time instance a frequency component is
located. We can only know what interval of frequencies are present in which time
intervals
http://engineering.rowan.edu/~polikar/WAVELETS/WTpart2.html
The Wavelet Transform
 Overcomes the preset resolution problem of the STFT by using a
variable length window
 Analysis windows of different lengths are used for different
frequencies:
ªAnalysis of high frequenciesÎ Use narrower
windows for better time resolution
ªAnalysis of low frequencies Î Use wider windows
for better frequency resolution
 This works well, if the signal to be analyzed mainly consists of slowly
varying characteristics with occasional short high frequency bursts.
 Heisenberg principle still holds!!!
 The function used to window the signal is called the wavelet
The Wavelet Transform
A normalization
Translation parameter, Scale parameter,
Signal to be
measure of time
measure of frequency constant
analyzed
ψ
ψ
CWTx (τ , s ) = Ψx (τ , s ) =
Continuous wavelet transform
of the signal x(t) using the
analysis wavelet ψ(.)
1
∫ x(t )ψ
s t
∗⎛ t −τ ⎞
⎜
⎟dt
⎝ s ⎠
The mother wavelet. All kernels are
obtained by translating (shifting) and/or
scaling the mother wavelet
Scale = 1/frequency
http://engineering.rowan.edu/~polikar/WAVELETS/WTpart3.html
WT at Work
High frequency (small scale)
Low frequency (large scale)
WT at Work
WT at Work
WT at Work