Top Banner
The Wavelet Transform
67

Lecture 19 The Wavelet Transform - NCKU

Oct 02, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Lecture 19 The Wavelet Transform - NCKU

The Wavelet Transform

Page 2: Lecture 19 The Wavelet Transform - NCKU

Jean Baptiste Joseph Fourier (1768 – 1830)

1787: Train for priest (Left but Never married!!!).

1793: Involved in the local Revolutionary Committee.

1974: Jailed for the first time.

1797: Succeeded Lagrange as chair of analysis and

mechanics at É cole Polytechnique.

1798: Joined Napoleon's army in its invasion of Egypt.

1804-1807: Political Appointment. Work on Heat.

Expansion of functions as trigonometrical series.

Objections made by Lagrange and Laplace.

1817: Elected to the Académie des Sciences in and

served as secretary to the mathematical section.

Published his prize winning essay Théorie analytique de

la chaleur.

1824: Credited with the discovery that gases in the

atmosphere might increase the surface temperature of

the Earth (sur les températures du globe terrestre et des

espaces planétaires ). He established the concept of

planetary energy balance. Fourier called infrared

radiation "chaleur obscure" or "dark heat“.

MGP: Leibniz - Bernoulli - Bernoulli - Euler - Lagrange - Fourier – Dirichlet - ….

Page 3: Lecture 19 The Wavelet Transform - NCKU

Windowed (Short-Time) Fourier Transform (1946)

James W. Cooley and John W. Tukey, "An algorithm

for the machine calculation of complex Fourier series,"

Math. Comput. 19, 297–301 (1965).

Independently re-invented an algorithm known to Carl

Friedrich Gauss around 1805

Fast Fourier Transform

Dennis Gabor

James W. Cooley and John W. Tukey

Winner of the 1971 Nobel Prize for contributions to the principles

underlying the science of holography, published his now-famous paper

“Theory of Communication.”2

C. F. Gauss

Stephane Mallat, Yves Meyer

Jean Morlet

Presented the concept of wavelets (ondelettes) in its present theoretical form

when he was working at the Marseille Theoretical Physics Center (France).

(Continuous Wavelet Transform)

(Discrete Wavelet Transform) The main algorithm dates

back to the work of Stephane Mallat in 1988. Then joined Y.

Meyer.

Page 4: Lecture 19 The Wavelet Transform - NCKU

Some signals obviously have spectral

characteristics that vary with time

Motivation

Page 5: Lecture 19 The Wavelet Transform - NCKU

STATIONARITY OF SIGNAL

• Stationary Signal

– Signals with frequency content unchanged in time

– All frequency components exist at all times

• Non-stationary Signal

– Frequency changes in time

– One example: the “Chirp Signal”

Page 6: Lecture 19 The Wavelet Transform - NCKU

STATIONARITY OF SIGNAL

0 0.2 0.4 0.6 0.8 1-3

-2

-1

0

1

2

3

0 5 10 15 20 250

100

200

300

400

500

600

Time

Ma

gn

itu

d

e Ma

gn

itu

d

e

Frequency (Hz)

2 Hz + 10 Hz + 20Hz

Stationary

0 0.5 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 250

50

100

150

200

250

Time

Ma

gn

itu

d

e Ma

gn

itu

d

e

Frequency (Hz)

Non-

Stationary

0.0-0.4: 2 Hz +

0.4-0.7: 10 Hz +

0.7-1.0: 20Hz

Page 7: Lecture 19 The Wavelet Transform - NCKU

CHIRP SIGNALS

0 0.5 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 250

50

100

150

Time

Ma

gn

itu

d

e

Ma

gn

itu

d

e

Frequency (Hz)

0 0.5 1-1

-0.8

-0.6

-0.4

-0.2

0

0.2

0.4

0.6

0.8

1

0 5 10 15 20 250

50

100

150

Time

Ma

gn

itu

d

e

Ma

gn

itu

d

e

Frequency (Hz)

Different in Time DomainFrequency: 2 Hz to 20 Hz Frequency: 20 Hz to 2 Hz

Same in Frequency Domain

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

Page 8: Lecture 19 The Wavelet Transform - NCKU
Page 9: Lecture 19 The Wavelet Transform - NCKU

Fourier Analysis

Breaks down a signal into constituent

sinusoids of different frequencies

In other words: Transform the view of the

signal from time-base to frequency-base.

Page 10: Lecture 19 The Wavelet Transform - NCKU

What’s wrong with Fourier?

By using Fourier Transform , we loose

the time information : WHEN did a

particular event take place ?

FT can not locate drift, trends, abrupt

changes, beginning and ends of events,

etc.

Calculating use complex numbers.

Page 11: Lecture 19 The Wavelet Transform - NCKU

Short Time Fourier Analysis

In order to analyze small section of a

signal, Denis Gabor (1946), developed a

technique, based on the FT and using

windowing : STFT

Page 12: Lecture 19 The Wavelet Transform - NCKU

STFT (or: Gabor Transform)

A compromise between time-based and

frequency-based views of a signal.

both time and frequency are

represented in limited precision.

The precision is determined by the size

of the window.

Once you choose a particular size for

the time window - it will be the same for

all frequencies.

Page 13: Lecture 19 The Wavelet Transform - NCKU

What’s wrong with Gabor?

Many signals require a more flexible

approach - so we can vary the window

size to determine more accurately either

time or frequency.

Page 14: Lecture 19 The Wavelet Transform - NCKU

What is Wavelet Analysis ?

And…what is a wavelet…?

A wavelet is a waveform of effectively

limited duration that has an average value

of zero.

Page 15: Lecture 19 The Wavelet Transform - NCKU

Wavelet's properties

• Short time localized waves with zero

integral value.

• Possibility of time shifting.

• Flexibility.

Page 16: Lecture 19 The Wavelet Transform - NCKU

12/9/2020 16

Fourier vs. Wavelet

• FFT, basis functions: sinusoids

• Wavelet transforms: small waves, called wavelet

• FFT can only offer frequency information

• Wavelet: frequency + temporal information

• Fourier analysis doesn’t work well on discontinuous, “bursty” data

– music, video, power, earthquakes,…

Page 17: Lecture 19 The Wavelet Transform - NCKU

The Continuous Wavelet

Transform (CWT) A mathematical representation of the

Fourier transform:

Meaning: the sum over all time of the

signal f(t) multiplied by a complex

exponential, and the result is the Fourier

coefficients F() .

dtetfwF iwt)()(

Page 18: Lecture 19 The Wavelet Transform - NCKU

18

What is wavelet transform?

• Provides time-frequency representation

• Wavelet transform decomposes a signal into a set of basis functions (wavelets)

• Wavelets are obtained from a single prototype wavelet Ψ(t) called mother wavelet by dilationsand shifting:

• where a is the scaling parameter and b is the shifting parameter

)(1

)(,a

bt

atba

Page 19: Lecture 19 The Wavelet Transform - NCKU

Wavelet Transform (Cont’d)

Those coefficients, when multiplied by a

sinusoid of appropriate frequency ,

yield the constituent sinusoidal

component of the original signal:

Page 20: Lecture 19 The Wavelet Transform - NCKU

Wavelet Transform

And the result of the CWT are Wavelet

coefficients .

Multiplying each coefficient by the

appropriately scaled and shifted wavelet

yields the constituent wavelet of the

original signal:

Page 21: Lecture 19 The Wavelet Transform - NCKU

Scaling Wavelet analysis produces a time-scale

view of the signal.

Scaling means stretching or

compressing of the signal.

scale factor (a) for sine waves:

f t a

f t a

f t a

t

t

t

( )

( )

( )

sin( )

sin( )

sin( )

;

;

;

1

2 12

4 14

Page 22: Lecture 19 The Wavelet Transform - NCKU

Scaling (Cont’d)

Scale factor works exactly the same

with wavelets:

f t a

f t a

f t a

t

t

t

( )

( )

( )

( )

( )

( )

;

;

;

1

2 12

4 14

Page 23: Lecture 19 The Wavelet Transform - NCKU

Wavelet function

a

by

abx

abba

yxyxyx

,1, ,,

• b – shift

coefficient

• a – scale

coefficient

• 2D function

a

bxxba

a

1,

Page 24: Lecture 19 The Wavelet Transform - NCKU

12/9/2020 24

Five Easy Steps to a Continuous Wavelet

Transform

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

the original signal.

2. Calculate a correlation coefficient c

Page 25: Lecture 19 The Wavelet Transform - NCKU

12/9/2020 25

Five Easy Steps to a Continuous Wavelet

Transform3. Shift the wavelet to the right and repeat steps 1 and 2 until you've

covered the whole signal.

4. Scale (stretch) the wavelet and repeat steps 1 through 3.

5. Repeat steps 1 through 4 for all scales.

Page 26: Lecture 19 The Wavelet Transform - NCKU

12/9/2020 26

Coefficient Plots

Page 27: Lecture 19 The Wavelet Transform - NCKU

Wavelets examplesDyadic transform

• For easier calculation we can

to discrete continuous signal.

• We have a grid of discrete

values that called dyadic grid .

• Important that wavelet

functions compact (e.g. no

overcalculatings) .

j

j

kb

a

2

2

Page 28: Lecture 19 The Wavelet Transform - NCKU

Haar transform

Page 29: Lecture 19 The Wavelet Transform - NCKU

Wavelet functions examples

• Haar function

• Daubechies function

Page 30: Lecture 19 The Wavelet Transform - NCKU

Mallat* Filter Scheme

Mallat was the first to implement this

scheme, using a well known filter design

called “two channel sub band coder”,

yielding a ‘Fast Wavelet Transform’

Page 31: Lecture 19 The Wavelet Transform - NCKU

12/9/2020 31

Discrete Wavelet transform

signal

filters

Approximation

(a)Details

(d)

lowpass highpass

Page 32: Lecture 19 The Wavelet Transform - NCKU

Approximations and Details:

Approximations: High-scale, low-

frequency components of the signal

Details: low-scale, high-frequency

components

Input Signal

LPF

HPF

Page 33: Lecture 19 The Wavelet Transform - NCKU

Decimation

The former process produces twice the

data it began with: N input samples

produce N approximations coefficients and

N detail coefficients.

To correct this, we Down sample (or:

Decimate) the filter output by two, by simply

throwing away every second coefficient.

Page 34: Lecture 19 The Wavelet Transform - NCKU

Decimation (cont’d)

Input

Signal

LPF

HPF

A*

D*

So, a complete one stage block looks like:

Page 35: Lecture 19 The Wavelet Transform - NCKU

Multi-level Decomposition

Iterating the decomposition process,

breaks the input signal into many lower-

resolution components: Wavelet

decomposition tree:

Page 36: Lecture 19 The Wavelet Transform - NCKU

Orthogonality

• For 2 vectors

• For 2 functions

0*, nnwvwvn

0*, dttgtftgtf

b

a

Page 37: Lecture 19 The Wavelet Transform - NCKU

Wavelet Transform

Inverse Wavelet Transform

All wavelet derived from mother wavelet

Page 38: Lecture 19 The Wavelet Transform - NCKU

Inverse Wavelet Transform

wavelet with

scale, s and time, t

time-series

coefficients

of wavelets

build up a time-series as sum of wavelets of different

scales, s, and positions, t

Page 39: Lecture 19 The Wavelet Transform - NCKU

An example:

Page 40: Lecture 19 The Wavelet Transform - NCKU

40

Subband Coding Revisited

Page 41: Lecture 19 The Wavelet Transform - NCKU

41

Subband Coding

Split the signal spectrum with a bank of filters as:

Page 42: Lecture 19 The Wavelet Transform - NCKU

42

Wavelet Transform

• Continuous Wavelet Transform (CWT)

• Discrete Wavelet Transform (DWT)

Page 43: Lecture 19 The Wavelet Transform - NCKU

43

CWT

• Continuous wavelet transform (CWT) of

1D signal is defined as

• The a,b is computed from the mother

wavelet by translation and dilation

dxxxfbfW baa )()()( ,

a

bx

axba

1)(,

Page 44: Lecture 19 The Wavelet Transform - NCKU

44

Separates the high and low-frequency portions of a

signal through the use of filters

One level of transform:

Signal is passed through G & H filters.

Down sample by a factor of two

Multiple levels (scales) are made by repeating the

filtering and decimation process on lowpass outputs

1D Discrete Wavelet Transform

Page 45: Lecture 19 The Wavelet Transform - NCKU

45

Haar Wavelet Transform

• Find the average of each pair of samples

• Find the difference between the average and sample

• Fill the first half with averages

• Fill the second half with differences

• Repeat the process on the first half

• Step 1:[3 5 4 8 13 7 5 3]

[4 6 10 4 -1 -2 3 1]

Averaging

Differencing

Page 46: Lecture 19 The Wavelet Transform - NCKU

46

Haar Wavelet Transform

• Step 2[4 6 10 4 -1 -2 3 1]

[5 7 -1 3 -1 -2 3 1]

ex. (4 + 6)/2 = 54 - 5 = -1

Averaging Differencing

Page 47: Lecture 19 The Wavelet Transform - NCKU

47

Haar Wavelet Transform

• Step 3[5 7 -1 3 -1 -2 3 1]

[6 -1 -1 3 -1 -2 3 1]

ex. (5 + 7)/2 = 65 - 6 = -1

Averaging Differencing

row average

Page 48: Lecture 19 The Wavelet Transform - NCKU

48

Discrete Wavelet Transform

LL2 HL2

LH2 HH2HL1

LH1 HH1

Page 49: Lecture 19 The Wavelet Transform - NCKU

Mexican hat wavelet

2

2

2

223

11

2

tt

t e

Fig. 7 The Mexican hat wavelet[5]

Also called the second derivative of

the Gaussian function

49

Page 50: Lecture 19 The Wavelet Transform - NCKU

Morlet wavelet

21 4 2imt tt e e

2

21 4ˆ mU e

U(ω): step function

Fig. 8 Morlet wavelet with m equals to 3[4]

50

Page 51: Lecture 19 The Wavelet Transform - NCKU

Shannon wavelet

sinc 2 cos 3 2t t t

1 0.5 1

ˆ0

ff

otherwise

Fig. 9 The Shannon wavelet in time and frequency domains[5]

51

Page 52: Lecture 19 The Wavelet Transform - NCKU

Comparison of resolution

• Fourier Transform

Fig. 17 the result using Fourier

Transform

52

Page 53: Lecture 19 The Wavelet Transform - NCKU

Comparison of resolution

• Windowed Fourier Transform

Fig. 18 the result using Windowed Fourier Transform

53

Page 54: Lecture 19 The Wavelet Transform - NCKU

Comparison of resolution

• Discrete Wavelet Transform

Fig. 19 the result using Discrete Wavelet Transform

54

Page 55: Lecture 19 The Wavelet Transform - NCKU

55

STFT and Wavelets

Page 56: Lecture 19 The Wavelet Transform - NCKU

Motivation….

Earthquake

Page 57: Lecture 19 The Wavelet Transform - NCKU

Fourier Transform

1

0

/21ˆN

k

Nink

in efN

f

2,.....,1

2

NNn

dfdttf22 ˆ

dtetff ti 2ˆ

deftf ti2ˆ

Fourier Transform

Inverse Fourier Transform

Parseval Theorem

Discrete Fourier Transform

Phase!!!

Page 58: Lecture 19 The Wavelet Transform - NCKU

Limitations???

Non-Stationary Signals…

Fourier does not provide information about when different periods(frequencies)

where important: No localization in time

Page 59: Lecture 19 The Wavelet Transform - NCKU

has the same support for every

and , but the number of cycles varies

with frequency.

dttgtfuGf u,,

Windowed (Short-Time) Fourier Transform

ti

u eutgtg

2

,

tg u, u

Estimates locally around , the amplitude of

a sinusoidal wave of frequency

241 2ueug D. Gabor

u ug Function with local support.

Page 60: Lecture 19 The Wavelet Transform - NCKU

Limitations??

Fixed resolution.

Related to the Heisenberg uncertainty principle. The product of the standard deviation

in time and frequency is limited.

The width of the windowing function relates to the how the signal is represented — it

determines whether there is good frequency resolution (frequency components close

together can be separated) or good time resolution (the time at which frequencies change).

Selection of determines and . ug gg

ggt ˆ00 Localization:

Page 61: Lecture 19 The Wavelet Transform - NCKU

Example….

x(t) = cos(2π10t) for

x(t) = cos(2π25t) for

x(t) = cos(2π50t) for

x(t) = cos(2π100t) for

Page 62: Lecture 19 The Wavelet Transform - NCKU

Wavelet Transform

dtttfuW u, , 0

uttu

1,

Gives good time resolution for high frequency events, and good frequency resolution for low

frequency events, which is the type of analysis best suited for many real signals.

0dtt

dtt

12dttMother wavelet

properties

0

2

,

0

2

,

ˆ

ˆ

,

d

d

t

t

t

0,10,1

0,1

ˆ0ˆ

0t

t,

t,ˆ

t,ˆ

0,1ˆ

0

ˆ0

ˆ

0,1

,

t

.

Page 63: Lecture 19 The Wavelet Transform - NCKU

Wavelet Transform

Page 64: Lecture 19 The Wavelet Transform - NCKU

Some Continuous Wavelets

241

2

0

ee

i

Morlet

uttu

1,

ti

u eutgtg

2

,

241 2ueug Gabor

Page 65: Lecture 19 The Wavelet Transform - NCKU

Torrence and Compo (1998)

Continuous Wavelet

Transform

For Discrete Data

Time series

Wavelet

Defined as the convolution with a scaled

and translated version of

DFT (FFT) of the time series

N times for each s: Slow!

Using the convolution theorem,

the wavelet transform is the

inverse Fourier transform

Page 66: Lecture 19 The Wavelet Transform - NCKU

Mallat's multiresolution framework

Design method of most of the

practically relevant discrete

wavelet transforms (DWT)

Page 67: Lecture 19 The Wavelet Transform - NCKU

Doppler Signal