Professional Documents
Culture Documents
Analysis
Andrew Tangborn
Global Modeling and Assimilation Office, Goddard Space Flight Center
Andrew.V.Tangborn@nasa.gov
301-614-6178
Outline
1. Fourier Transforms.
2. What is a Wavelet?
8. Soft Thresholding.
j=1
0.8
0.6
0.4
0.2
−0.2
−0.4
−0.6
−0.8
−1
0 1 2 3 4 5 6 7 8 9 10
Signal
0.5
Real Coefficient
Imaginary Coefficient
0.4
0.3
0.2
0.1
−0.1
−0.2
−0.3
−0.4
−0.5
0 1 2 3 4 5 6 7 8 9 10
Fourier Transform
• Discrete Fourier Transform (DFT) locates the single frequency and re-
flection.
• Complex expansion is not exactly sine series - causes some spread.
Two Frequency Signal
f (t) = sin(2πt) + 2 sin(4πt)
−1
−2
−3
0 1 2 3 4 5 6 7 8 9 10
Signal
1
Real Coefficients
Imaginary Coefficients
0.8
0.6
0.4
0.2
−0.2
−0.4
−0.6
−0.8
−1
0 1 2 3 4 5 6 7 8 9 10
Fourier Transform
−1
−2
−3
0 1 2 3 4 5 6 7 8 9 10
Signal
0.5
Real coefficients
Imaginary Coefficients
0.4
0.3
0.2
0.1
−0.1
−0.2
−0.3
−0.4
−0.5
0 1 2 3 4 5 6 7 8 9 10
Fourier Transform
0.8
0.6
0.4
0.2
−0.2
−0.4
−0.6
−0.8
−1
0 2 4 6 8 10 12 14 16 18 20
Time −>
Fourier Transform
Frequency −>
Time −>
Time −>
• The wavelet transform contains information on both the time location and fre-
quency of a signal.
where
j: dilation index
k: translation index
2k/2 needed for normalization
Dilation Equations
Construction of Wavelets
- Orthogonality means:
Z∞ ′
ψkj (x)ψkj ′ (x)dx = δkk′ δjj ′
−∞
φ(x) = ck φ(2x − k)
X
• General features:
- Fewer non-zero ck ’s mean more compact and less smooth functions
- More non-zero ck ’s mean less compact and more smooth functions
Restrictions on the Filter Coefficients
• Normality:
Z∞
φ(x)dx = 1
−∞
Z∞ X
ck φ(2x − k)dx = 1
−∞ k
Z∞
ck φ(2x − k)dx = 1
X
k −∞
Z∞ 1
ck φ(2x − k)d(2x − k) = 1
X
k −∞ 2
Z∞ 1
ck φ(ξ)d(ξ) = 1
X
k −∞ 2
1
ck ( )(1) = 1
X
k 2
or
ck = 2
X
• Simple Examples
- Smallest number of ck is 1: just get φ(x) = δ, → zero support.
- Haar Scaling Function: c0 = 1, c1 = 1.
Haar Scaling Function
0.5
y
−0.5
−1 −0.5 0 0.5 1 1.5 2
x
φ(2x − 1) = 1 if 1/2 ≤ x ≤ 1
φ(2x − 1) = 0 elsewhere
so the sum of the two functions is then:
1.5
0.5
y
−0.5
−1 −0.5 0 0.5 1 1.5 2
x
Haar Wavelet
• Wavelets are constructed by taking differences of scaling
functions
0.5
−0.5
−1
−1.5
−1 −0.5 0 0.5 1 1.5 2
0.5
−0.5
−1
−1.5
−1 −0.5 0 0.5 1 1.5 2
Orthogonality of Haar wavelets
• Translation ⇒ no overlap
1.5
0.5
−0.5
−1
−1.5
−1 −0.5 0 0.5 1 1.5 2
• Dilation ⇒ cancellation
1.5
0.5
−0.5
−1
−1.5
−1 −0.5 0 0.5 1 1.5 2
Daubechies’ Compactly Supported Wavelets
The following plots are wavelets created using larger numbers of filter coefficients, but having all
the properties of orthogonal wavelets. For example, D4 has coefficients:
1 √ 1 √ 1 √ 1 √
ck = (1 + 3), (3 + 3), (3 − 3), (1 − 3)
4 4 4 4
(Reference: Daubechies, 1988)
0.5
0.4
0.3
0.2
0.1
−0.1
−0.2
−0.3
−0.4
0 20 40 60 80 100 120
D4
0.3
0.2
0.1
−0.1
−0.2
−0.3
−0.4
0 20 40 60 80 100 120
D12
0.3
0.2
0.1
−0.1
−0.2
−0.3
−0.4
0 20 40 60 80 100 120
D20
Continuous and Discrete Wavelet Transforms
Continuous
wav −1/2
Z t−1
(T f )(a, b) = |a| dtf (t)ψ( )
b
where
a: translation parameter
b: dilation parameter
Discrete
wav
a−m/2 dtf (t)ψ(a−m
Z
Tm,n (f ) = o o t − nbo )
m: dilation parameter
n: translation parameter
ao,bo depend on the wavelet used
Fast Wavelet Transform
(Reference: S. Mallat, 1989)
• Uses the discrete data:
h i
f0 f1 f2 f3 f4 f5 f6 f7
a1,0
j=1 b1,0 a b
1,1 1,1
j=2 a2,0 b a b a b
2,0 2,1 2,1 2,2 b a2,3 2,3
2,2
f f f f f f f f
1 2 3 4 5 6 7 8
and averages
- Use Averages at next coarser scale to get new set of differences (bj,k ) and averages
(aj,k )
And the coefficients are simply the differences (bj,k ) and the average for the coarsest
scale (a0,0 ): h i
a0,0 b0,0 b1,0 b1,1 b2,0 b2,1 b2,2 b2,3
- The differences are the coefficients at each scale. Averages used for next scale.
• How do we store all this? (eg, Numerical Recipes algorithm).
Intermittent Signal - Wavelet Transform
−1
−2
−3
0 1 2 3 4 5 6 7 8 9 10
Signal
4
−1 j=3
j=4
−2
−3
j=5
−4
j=2
−5
0 20 40 60 80 100 120
• Higher Frequency intermittent signal shows up in the j = 5, 6 scales, and only in the
middle portion of the domain. Localized frequency data is found.
Data Compression - Efficient Representation
1.5
0.5
−0.5
−1
−1.5
−2
0 1 2 3 4 5 6 7 8 9 10
1.5
0.5
−0.5
−1
−1.5
−2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
0.8
0.6
0.4
0.2
−0.2
−0.4
−0.6
−0.8
−1
0 1 2 3 4 5 6 7 8 9 10
Basic Idea:
• White noise contains energy at all time scales and time locations.
Representation is spread to many (if not all) wavelet coefficients.
Noise coefficients are relatively small in amplitude.
• How q
much do we shrink each coefficient?
√
t = 2log(n)σ/ n
where n= number of data points and σ=noise standard deviation.
Example
2.5
1.5
0.5
−0.5
−1
−1.5
0 50 100 150 200 250 300
1.5
0.5
−0.5
−1
−1.5
0 50 100 150 200 250 300
• Soft Thresholding takes advantage of the fact that white noise is rep-
resented equally by all coefficients.
• Data compression means that coherent signal is represented by just a
few coefficients with relatively large values. White noise (or non-white
as well) is spread over many coefficients, adding just a small amount to
the magnitude of each.
The Continuous Morlet Wavelet Transform
ψ(t) = exp(iω0t)exp(−t2/2σ 2)
Note that while the footprint is infinite, the exponential decay creates
an effective footprint which is relatively compact.
0.8
0.6
0.4
0.2
Ψ
−0.2
−0.4
−0.6
−0.8
−1
−8 −6 −4 −2 0 2 4 6 8
x
The Morlet transform with Matlab
coef=cwt(y,[1 2 4 8 16 32 64 128],’morl’,’plot’)
• the top level of the coefficient plot shows bright (or large) values for
scale 128 (largest scale).
• The next two layers are not zero, indicating leakage between different
time scales.
128
1.5
64
1
32
0.5
16
scales a
f(x)
0 8
−0.5 4
2
−1
1
−1.5
0 0.2 0.4 0.6 0.8 1 20 40 60 80 100 120
x time (or space) b
Example: Southern Oscillation Index Time Series 1951-2005
The SOI is the monthly pressure fluctuations in air pressure between Tahiti and
Darwin. It is generally a noisy time series and benefits from some smoothing. Soft
thresholding is a way to remove the noise in the signal without removing important in-
formation. The multivariate ENSO signal comes from sea level pressure, surface wind,
sea surface tempemperature, surface air temperature and total amount of cloudiness.
2
SOI signal
−2
−4
−6
−8
0 100 200 300 400 500 600 700
Time in months
2
SOI signal
−2
−4
−6
−8
0 100 200 300 400 500 600 700
Time in Months
0
SOI
−2
−4
−6
−8
0 100 200 300 400 500 600 700
Month
628
200
529
430
Time Scale in Months
150
364
298
100
232
166
50
100
1
100 200 300 400 500 600
Time in months
Morlet Coefficients for SOI
163
145 200
127
Time scale in months
109 150
91
73 100
55
37 50
19
1
100 200 300 400 500 600
time in months
Application to Approximation of Error Correlations
• Error correlations are essential for carrying out atmospheric data assimilation.
• They tell us how errors in model outputs are spatially related, and how to spread information
from observational data into the model.
• Error correlations are generally the most computationally and memory intensive parts of a data
assimilation system.
• Below is the error correlation of a chemical constituent assimilation system (a), and wavelet
approximations created by retaining 10 % (b), 10% (c) and 2% (d) of the wavelet coeffients.
Extracting time scales from climate signals:
Reference: Seasonal-to-Interannual variability of Ethiopia/Horn
of Africa Monsoon. Part 1: Associations of Wavelet Filtered
large-Scale Atmospheric Circulation and Global Sea Surface
Temperature, Segelet et al. J. of Climate, 2009.
How can we use information separated out by time-scale
to make predictions?
Reference: Webster and Hoyos, BAMS, Vol 85, 2004.
(4) Convection or east equitorial Indian Ocean out of phase with con-
vecton over India.
(5) North Indian Ocean convection coincides with development of mon-
soons over south asia.