You are on page 1of 51

M

.K

.B
hu

ya

Fundamentals of
Wavelet Transform
(Harr Transform)

ya

.B
hu

.K

ya

.B
hu

.K

ya

.B
hu

.K

Fourier Transform

F ( )

f (t )e jt dt

.K

.B
hu

ya

Fourier analysis -- breaks down a signal into constituent


sinusoids of different frequencies.
a serious drawback In transforming to the frequency
domain, time information is lost.
When looking at a Fourier transform of a signal, it is
impossible to tell when a particular event took place.

FT Sine wave two frequencies


stationary

.B
hu

ya

f1 (t ) 0.25sin100 t sin 200 t

.K

Peaks corresponding to 50 Hz and


100 Hz

FT Sine wave two frequenciesnonstationary

.K

.B
hu

ya

sin 200 t t 50
f 2 (t )
0.25sin100 t sin 200 t otherwise

Peaks corresponding to 50
Hz and 100 Hz

STATIONARITY OF SIGNAL
600

500

Magnitud
e

400

300

ya

.B
hu

Stationary

Magnitud
e

2 Hz + 10 Hz + 20Hz

200

.K

-1

-2

-3

100

0.2

0.4

0.6

0.8

Time

20

25

250

0.6

200

Magnitud
e

NonStationary

15

0.8

Magnitud
e

0.0-0.4: 2 Hz +
0.4-0.7: 10 Hz +
0.7-1.0: 20Hz

10

Frequency (Hz)

0.4
0.2

150

0
-0.2

100

-0.4
-0.6

50

-0.8
-1

0.5

Time

10

15

Frequency (Hz)

20

25

CHIRP SIGNALS
Frequency: 2 Hz to 20 Hz
1

Different in Time Domain

150

0.8

-0.2

.K
M

0.2

0.4
100

Magnitud
e

n
ya
100

0.6

Magnitud
e

.B
hu

0.4

Magnitud
e

Magnitud
e

150

0.8

0.6

0.2
0

-0.2

50

-0.4

50

-0.4

-0.6

-0.6

-0.8

-0.8

-1

Frequency: 20 Hz to 2 Hz

0.5

Time

10

15

20

Frequency (Hz)

25

-1

0.5

Time

10

15

20

Frequency (Hz)

Same in Frequency Domain


At what time the frequency components occur? FT can not tell!

25

.K

.B
hu

ya

Short Time Fourier Transform (STFT)

Take FT of segmented consecutive pieces of a signal.


Each FT then provides the spectral content of that time segment only

The Short Time Fourier Transform


Gabor
Time parameter Frequency parameter

FSTFT ( , ) f (t ) w(t )e jt dt
.B
hu

ya

.K

Window function
centered at

.K

.B
hu

ya

FT Sine wave two frequenciesnonstationary

Short Time Fourier Transform (STFT)

.K

.B
hu

ya

Take FT of segmented consecutive pieces of a signal.


Each FT then provides the spectral content of that time segment
only
Difficulty is in selecting time window.
NOTE
Low frequency signal better resolved in
frequency domain
High frequency signal better resolved in time
domain

.K

.B
hu

ya

Time-Frequency Resolution

NOTE

Low frequency signal better resolved


in frequency domain
High frequency signal better resolved
in time domain

.K

.B
hu

ya

STFT Example

Uncertainty Theorem

.K

.B
hu

ya

Uncertainty Theorem - We cannot calculate frequency and


time of a signal with absolute certainty (Similar to
Heisenbergs uncertainty principle involving momentum and
velocity of a particle).
In FT we use the basis which has infinite support and infinite
energy.
In wavelet transform we have to localize both in time domain
(through translation of basis function) and in frequency
domain (through scaling).

ya

.B
hu

.K

DRAWBACKS OF STFT

Narrow window -> poor frequency resolution


Wide window -> poor time resolution

Cannot know what frequency exists at what time intervals

Heisenberg Uncertainty Principle

.K
M

Via Narrow Window

.B
hu

ya

Unchanged Window
Dilemma of Resolution

Via Wide Window

.B
hu

Better time
resolution;
Poor
frequency
resolution

.K

Frequency

ya

RESOLUTION OF TIME &


FREQUENCY

Better
frequency
resolution;
Poor time
resolution

Time
Each box represents a equal portion
Resolution in STFT is selected once for entire
analysis

ya

.B
hu

.K

Example

The Wavelet Transform

.K

.B
hu

ya

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
The function used to window the signal is called the
wavelet

.K

.B
hu

ya

The Wavelet Transform (contd)

Wide windows do not provide good localization


at high frequencies.

.K

.B
hu

ya

The Wavelet Transform (contd)

Use narrower windows at high frequencies.

.K

.B
hu

ya

The Wavelet Transform (contd)

Narrow windows do not provide good localization


at low frequencies.

.K

.B
hu

ya

The Wavelet Transform (contd)

Use wider windows at low frequencies.

What are Wavelets?

.K

.B
hu

ya

Wavelets are functions that wave above


and below the x-axis, have (1) varying
frequency, (2) limited duration, and (3) an
average value of zero.

This is in contrast to sinusoids, used by FT, which have infinite energy.

Sinusoid

Wavelet

What is Mother Wavelet?

.K

.B
hu

ya

In wavelet we have a mother wavelet such as this is


the basic unit.

a ,b

(t )

t b

translated to b and
a a

and it is used to generate wavelet.

scaled by a

ya

.B
hu

.K

ya

.B
hu

.K

Scaling

a=1

.K

.B
hu

ya

Scaling

a=2

a=4

.K

.B
hu

ya

Translation

ya

.B
hu

.K

Continuous Wavelet Transform (CWT)


Scale parameter
Normalization
(measure of frequency)
constant

Continuous wavelet transform


of the signal f(t) using the
analysis wavelet (.)

.K

t
f t
s

1
C ( , s)
s

.B
hu

ya

Translation parameter,
measure of time

dt

Forward
CWT:

Mother wavelet (window), all


kernels are obtained by translating
(shifting) and /or scaling the
mother wavelet

Scale = 1/Frequency

Continuous Wavelet Transform

ds.d
C( ,s) ,s (t ) s 2

.B
hu

ya

1
f t
C

f (t ) , s (t ) dt f (t ), , s (t )

.K

C ( , s )

Where energy is
C

and

F ( )

F ( ) FT of mother wavelet (t )

CWT: Main Steps


1. Take a wavelet and compare it to a section at the
start of the original signal.

.K

.B
hu

ya

2. Calculate a number, C, that represents how closely


correlated the wavelet is with this section of the
signal. The higher C is, the more the similarity.

CWT: Main Steps (contd)

.K

.B
hu

ya

3. Shift the wavelet to the right and repeat steps 1 and 2


until you've covered the whole signal.

CWT: Main Steps (contd)

.K

.B
hu

ya

4. Scale the wavelet and repeat steps 1 through 3.

5. Repeat steps 1 through 4 for all scales.

Coefficients of CTW Transform

.K

.B
hu

ya

Wavelet analysis produces a time-scale view of the input


signal or image.
1
t
C ( , s)
f t
dt

s t
s

.K

.B
hu

ya

CWT of Stationary signal

.K

.B
hu

ya

CWT of Stationary signal

.K

.B
hu

ya

CWT of Non-stationary signal

.K

.B
hu

ya

CWT of Non-stationary signal

FT vs WT

.K

.B
hu

ya

weighted by F(u)

weighted by C(,s)

Wavelet series expansion


s, (t )

1 t

s s

where scale s so m and translation n o so m


.B
hu

ya

Discrete wavelet transform


M

.K

If scale and translation take place in discrete steps

m,n (t ) som / 2 ( somt n o )


Dyadic wavelet

If so 2 & o 1
m,n (t ) 2m / 2 (2m t n)

f (t )

can be represented as a series combination of wavelets

f (t ) wm,n m,n (t )
mn

ya

Wm,n f (t ), m,n (t )
.K

.B
hu

where

s0m / 2 f (t ) ( somt n o )dt


t

and

m,n (t ) 2m / 2 (2m t n)

We have now an infinite series representation. To approximate a function, we have to


truncate this series. At what translation and at what scale do we truncate?

ya

.K

.B
hu

The original signal, S, passes


through two complementary
wavelet based filters and
emerges as two signals.

Discrete Wavelet Transform (DWT)

Main Signal S is decomposed


Detailed (D) and Approximate (A) components
Detailed = High Freq components
Approx = Low Freq components
Filters are based on wavelets

.K

.B
hu

ya

Discrete Wavelet Transform (DWT)

Multiple-Level DWT

.K

.B
hu

ya

The decomposition process is


iterated,
Successive approximations (cA)
decomposed further
The approximate components
(cA1, cA2)at subsequent levels
contain progressively lower freq
components

ya

.B
hu

.K

Example

ya

.B
hu

.K

Example 1

ya

.B
hu

.K

Example 2

You might also like