Discrete Wavelet Transforms

To pick out features from a time series, it can be useful to apply a discrete wavelet transform. If you're a physicist like me, you're probably more familiar with Fourier analysis and its higher dimensional cousin, spherical harmonic analysis. Fortunately, the principles are very similar.

What Are Wavelet Transforms?

First of all, what is a wavelet? It can be hard to give a clear definition, but it's easy to visually identify:


Basically, when there's a lot of stuff going on in short bursts, you can think of the signal as a chain of finite duration "wavelets" strung together piecewise, as opposed to a single wave repeating infinitely.

In theoretical physics, perfect sine waves describe many important systems. But in everyday life, most signals are wavelets: images have edges, patterns of speech are irregular, the economy is erratic. In these cases, there is a definite advantage to wavelet transforms. While a time signal contains complete information in the time domain and its Fourier transform provides complete information in the frequency domain, neither gives the whole picture. This doesn't matter in cases where the wave is symmetric, smooth, and stationary. But if the signal has transitory features, trends, sharp changes, etc. you'll need information about time and frequency to accurately represent it. Wavelet analysis allows you to do that.

The Basic Formalism

It's easiest to introduce the wavelet transform by analogy with the Fourier transform.

In Fourier analysis, we represent a signal as a linear combination of dilated sines and cosines (or, more compactly, as a sum of dilated complex exponentials with potentially complex coefficients): $$ f(t) = \large\sum_{k=0}^{\infty} c_k e^{ikt} $$Similarly, in wavelet analysis, we represent a signal as a linear combination of dilated and shifted versions of the "mother" wavelet $\psi(t)$ plus a scaling function $\phi(t)$: $$ f(t) = b_0 \phi(t) + \large\sum_{J=0}^{\infty}\large\sum_{k=0}^{J} b_{2^J+k} \psi(2^Jt-k) $$Let's start by noticing the key difference between Fourier and wavelet analysis: the Fourier basis functions all span the entire time interval, whereas the wavelet basis functions span logarithmically decreasing subintervals: 

  • The  $J=0$ term, $\psi(t)$, spans the full interval $0 < t < 1$.
  • The $J=1$ terms, $\psi(2t)$ and $\psi(2t-1)$, span $0 < t < 1/2$ and $1/2 < t < 1$, respectively. 
  • And so on and so forth, with the $J$th terms breaking up the interval into $2^J$ segments.

The first subscript, $J$, specifies the dilation; higher $J$ means a more compressed function i.e. higher frequency. The second subscript, $k$, specifies the translational shift, which has no counterpart in the Fourier analogy, as Fourier transforms are completely devoid of information about time localization. The $\phi(t)$ term is an overall scaling function.


Approximate and Detail Coefficients

The $\phi(t)$ term can be thought of as an averaged value of $f(t)$ while $\psi(t)$ can be thought of as a differencing operator spanning the whole time domain. The next level terms, $\phi(2t),\phi(2t-1)$, are differencing operators spanning half of the range each, and so on. Each level in the series picks out additional detail, doubling the time resolution and halving the scale resolution. 



Phrased differently, the signal is run through a high-pass filter (inner product with a difference operator) and a low-pass filter (inner product with a smoothing / averaging function), with both functions depending on the choice of wavelet basis. The high-pass filter gives the detail coefficients while the low-pass filter gives the approximate coefficients. You can do this repeatedly in a multi-level wavelet transform.

Families of Wavelet Basis Functions

There are many different orthonormal wavelet families, and the choice of which to use depends strongly on the subject domain. For example, in our ECG example, the signals are well described by Daubechies-20 wavelets. Several common families are shown in the figure below.





Comments