WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base...

15
WAVELET TRANSFORM

Transcript of WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base...

Page 1: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

WAVELET TRANSFORM

Page 2: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

1

0

1

00

N

'n'n

N

'n'nn s

tn'n*xxsW

WAVELET TRANSFORM

Convolution of time series xn’ with a scaled and translated version of a base function: a wavelet 0 () – continuous function in time and frequency – “mother wavelet”Convolution needs to be effected N (# of points in time series) times for each scale s; n is a translational value

Much faster to do the calculation in Fourier space

Convolution theorem allows N convolutions to be done simultaneously with the Discrete Fourier Transform:

1

0

2'

1ˆN

n

Nknink ex

Nx

k is the frequency index

Convolution theorem: Fourier transform of convolution is the same as the pointwise product of Fourier transforms

Torrence and Compo (1998)

Page 3: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

1

0

N

'n'nn s

tn'n*xsW

WAVELET TRANSFORM

1

0

2'

1ˆN

n

Nknink ex

Nx sˆ Fourier transform of

s

t

xW kInverse Fourier transform of is Wn (s)

1

0

N

k

tnikkn

kes*ˆxsW

2

22

2

Nk:

tN

k

Nk:

tN

k

k

With this relationship and a FFT routine, can calculate the continuous wavelet transform (for each s) at all n simultaneously

Page 4: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

0

0

0

0

0

0

0

0

1

0

N

k

tnikkn

kes*ˆxsW

To ensure direct comparison from one s to the other, need to normalize wavelet function

kk sˆt

ssˆ

0

212

241 20 ee i

241 20 seH

11

2

2 mmm

i!m

!mi

sm

m

esH!mm

12

2

21

2

21

1

e

d

d

mm

mm 22

21

smm

es

m

i

12

0

'd'ˆ

i.e. each unscaled wavelet function has been normalized to have unit energy (daughter wavelets have same energy as mother)

1

0

2N

kk Nsˆ

and at each scale (N is total # of points):

Wavelet transform is weighted by amplitude of Fourier coefficients and not by

kx

Page 5: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

1

0

N

k

tnikkn

kes*ˆxsW

Wavelet transform Wn(s) is complex because wavelet function is complex

Wn(s) has real and imaginary parts that give the amplitude and phase

and the wavelet power spectrum is |Wn(s)|2

for real the imaginary part is zero and there is no phase

22kn xNsW

for white noise

Nxk

22 22 sWnfor all n and s

Normalized wavelet power spectrum is 22 sWn

Page 6: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

Seasonal SST averaged over Central Pacific

22 sWn

Power relative to white noise

Page 7: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

0

0

0

0

0

0

0

0

Considerations for choice of wavelet function:

1) Orthogonal or non-orthogonal:Non-orthogonal (like those shown here) are useful for time series analysis. Orthogonal wavelets – Haar, Daubechies

2) Complex or real:Complex returns information on amplitude and phase; better adapted for oscillatory behavior. Real returns single component; isolates peaks

3) Width (e-folding time of 0):Narrow function -- good time resolutionBroad function – good frequency resolution

s2

s2

s2

2s

4) Shape:For time series with jumps or steps – use boxcar-like function (Haar)For smoothly varying time series – use a damped cosine (qualitatively similar results of wavelet power spectra).

Page 8: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

Seasonal SST averaged over Central Pacific

22 sWn

Page 9: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

22 sWn

Relationship between Wavelet Scale and Fourier period

Write scales as fractional powers of 2: J,,,j,ss jjj 1020

j

stNlogJ

02

smallest resolvable scale

largest scale

should be chosen so that the equivalent Fourier period is ~2 t

j ≤ 0.5 for Morlet wavelet; ≤ 1 for others

N = 506

t = 0.25 yrs0 = 2 t = 0.5 yr

j = 0.125 J = 56

57 scales ranging from 0.5 to 64 yr

Page 10: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

Relationship between Wavelet Scale and Fourier period

0

0

0

0

0

0

0

0

Can be derived substituting a cosine wave of a known frequency into

1

0

N

k

tnikkn

kes*ˆxsW

and computing s at which Wn is maximum

200 2

4

s

6031 0 :s.

12

4

m

s

43961 m:s.

21

2

m

s

29743 m:s.

64652 m:s.

Page 11: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

Seasonal SST averaged over Central Pacific

22 sWn

6031 0 :s.

29743 m:s.

How to determine the significance level?

Page 12: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

s

2

Cone of Influence

Paul

Morlet & DOG

2s

Page 13: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

Because the square of a normally distributed real variable is 2 distributed with 1 DOF

22

2 is xk

22

2 be should sWn

At each point of the wavelet power spectrum, there is a 2

2 distribution

For a real function (Mexican hat) there is a 1

2 distribution

Distribution for the local wavelet power spectrum:

22

2

2

1

P sW

k2n

Pk is the mean spectrum at Fourier frequency k, corresponding to wavelet scale s

Page 14: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

SUMMARY OF WAVELET POWER SPECTRUM PROCEDURES

1) Find Fourier transform of time series (may need to pad it with zeros)

2) Choose wavelet function and a set of scales

3) For each scale, build the normalized wavelet function kk sˆt

ssˆ

0

212

4) Find wavelet transform at each scale

1

0

N

k

tnikkn

kes*ˆxsW

5) Determine cone of influence and Fourier wavelength at each scale

6) Contour plot wavelet power spectrum

7) Compute and draw 95% significance level contour

Page 15: WAVELET TRANSFORM. Convolution of time series x n’ with a scaled and translated version of a base function: a wavelet  0 (  ) – continuous function.

Seasonal SST averaged over Central Pacific

22 sWn

Power relative to white noise