Introduction to Discrete-Time Wavelet Transform Selin Aviyente Department of Electrical and Computer Engineering Michigan State University February 9, 2010
Definition of a Wavelet A wave is usually defined as an oscillating function of time (such as a sinusoid). A wavelet is a small wave, which has its energy concentrated in time for analysis of transient, non-stationary or time-varying phenomena. We will use wavelet for expanding signals the same way Fourier series used the sinusoids. f (t) = l a l ψ l (t) (1) where a l are the expansion coefficients and ψ l (t) are the expansion set. If ψ l (t) form an orthonormal basis for the function space then a l =< f (t), ψ l (t) >.
Characteristics of a Wavelet System For the wavelet expansion, a two parameter system is constructed f (t) = k j a j,kψ j,k (t). a j,k are called the discrete wavelet transform (DWT), ψ j,k are the wavelet expansion functions. The wavelet expansion set is not unique. A wavelet system is a set of building blocks to represent a signal. The wavelet expansion gives a time-frequency localization of the signal. Most of the energy of the signal is well represented by a few expansion coefficients. The calculation of the coefficients can be done efficiently, O(N).
All wavelet systems are generated from a single scaling function or wavelet (mother wavelet) by scaling and translation, ψ j,k (t) = 2 j/2 ψ(2 j t k),j, k Z. Multiresolution conditions: If a set of signals can be represented by a weighted sum of ψ(t k) then a larger set (including the original) can be represented by a weighted sum ψ(2t k). The lower resolution coefficients can be calculated from the higher resolution coefficients through a filter bank. (efficient computation) The magnitude of the expansion coefficients drop off rapidly, i.e. only a few coefficients are significant, good for applications like compression and denoising.
Haar Scaling Functions and Wavelets The multiresolution formulation requires two basic functions: scaling (φ(t)) and wavelet functions (ψ(t)). The simplest possible orthogonal wavelet system is generated from the Haar scaling function and wavelet. f (t) = k c k φ(t k) + k d j,k ψ(2 j t k) (2) j=0 Haar wavelets form an orthonormal basis for L 2 (R): ψ j,k (t) 2 dt = 1 and < ψ j,k (t), ψ j,k (t) >= δ[j j ]δ[k k ]. Well localized in time, as j, close to delta functions, can detect abrupt changes and transient activity.
A Multiresolution Formulation The scaling function,φ k (t) = φ(t k),k Z. The subspace of L 2 (R) spanned by these functions is defined as V 0 = Span k {φ k (t)}. If f (t) V 0 then f (t) = k a kφ k (t). V j = Span k {φ(2 j t k)}. For j > 0, the span can be larger since φ j,k (t) gets narrower and is translated in smaller steps (finer details). For j < 0, the span is smaller (coarse information).
Properties of multiresolution systems A sequence of {V j } j Z of closed subspaces of L 2 (R) is a multiresolution approxination if the following properties are satisfied: 1 f (t) V j iff f (t 2 j k) V j. 2 Nested Subspaces: V j V j+1. 3 f (t) V j iff f (2t) V j+1. 4 lim j V j = L 2 (R). 5 lim j V j = {0}. 6 There exists φ such that {φ(t k)} k Z is a basis of V 0. By the nesting subspaces property of MRA, if φ(t) V 0 it is also in V 1. This means that φ(t) can be expressed in terms of a weighted sum of shifted φ(2t) as φ(t) = n h(n) 2φ(2t n) (dilation or scaling equation).
Scaling Equation φ(t) = n h(n) 2φ(2t n), the coefficients h(n) are a sequence of real or complex numbers called the scaling function coefficients (or the scaling filter). This recursive equation is fundamental to the theory of the scaling function. Designing a scaling function reduces down to designing a FIR filter. Example (Haar): φ(t) = φ(2t) + φ(2t 1), which means that h(0) = 1, h(1) = 1. 2 2
Wavelet Function Sometimes the important features of a signal can be better described not by using φ j,k (t) but by defining a different set of functions that span the differences between V j and V j+1. These functions are the wavelets ψ j,k (t). W j is defined as the orthogonal complement of V j in V j+1. This means that all members of V j are orthogonal to all members of W j. V j+1 = V j W j. If V j is a Hilbert space and subspace of V j+1, each vector v V j+1 can be written uniquely as v = w + z, w V j,z Vj, that is V j+1 = V j Vj. ψ j,k (t) span W j.
Properties of the Wavelet Function 1 V 1 = V 0 W 0,L 2 = V 0 W 0 W 1.... 2 The scaling function and the wavelet function at the same scale are orthogonal to each other: φ j,k (t), ψ j,l (t) >= 0. 3 V 0 = W... W 1. Similarly, L 2 can be written as the direct sum of only wavelet subspaces. 4 Since ψ(t) V 1,ψ(t) = h 1 (n) 2φ(2t n).h 1 (n) is the wavelet filter. For example, for the Haar wavelet ψ(t) = φ(2t) φ(2t 1), h 1 (0) = 1, h 2 1 (1) = 1. 2
There are infinitely many ways to decompose L 2 (R) and thus different ways to expand any function. For example:l 2 (R) = V 0 W 0 W 1...: f (t) = k c k φ k (t) + d j,k ψ j,k (t) (3) j=0 k= For the case that ψ j,k (t) are orthonormal and φ k (t) is orthogonal to ψ j,k (t), the coefficients can be found: c k = < f (t), φ k (t) >= f (t)φ(t k)dt d j,k = < f (t), ψ j,k (t) >= f (t)2 j/2 ψ(2 j t k)dt (4)
In general, L 2 (R) = V j0 W j0 W j0 +1...: f (t) = c j0 (k)2 j0/2 φ(2 j 0 t k)+ d j (k)2 j/2 ψ(2 j/2 t k) k j=j 0 (5) The choice of j 0 depends on the signal and sets the coarsest scale whose space is spanned by φ j0,k(t). The coefficients are called the discrete wavelet transform of f(t). If certain conditions are satisfied, these coefficients completely describe the original signal. If the scaling functions and the wavelets form an orthonormal basis, then Parseval s theorem can be applied: f (t) 2 dt = c(k) 2 + d j (k) 2 (6) k j=0 k=
Example: Haar Decomposition Let f (t) V j, then f (t) = c k φ(2 j t k). Divide f (t) into even and odd terms. f (t) = c 2k φ(2 j t 2k) + c 2k+1 φ(2 j t 2k 1) (7) We can write: φ(2 j t 2k) = ψ(2j 1 t k) + φ(2 j 1 t k) 2 φ(2 j t 2k 1) = φ(2j 1 t k) ψ(2 j 1 t k) 2 (8)
Coefficients at the lower scale can be found from the coefficients at the higher scale and this can be repeated iteratively. Therefore, f (t) = c 2k ( ψ(2j 1 t k) + φ(2 j 1 t k) ) 2 + c 2k+1 ( φ(2j 1 t k) ψ(2 j 1 t k) ) 2 = k ( c 2k c 2k+1 )ψ(2 j 1 t k) 2 + ( c 2k + c 2k+1 )φ(2 j 1 t k) (9) 2 f j (t) = f j 1 (t) + w j 1 (t), where w j 1 (t) = k f j 1 (t) = k ( c 2k c 2k+1 )ψ(2 j 1 t k) 2 ( c 2k + c 2k+1 )φ(2 j 1 t k) (10) 2
Steps for Haar Decomposition Discretize the signal such that f j V j, f j is an approximation to f. c j k = f (k/2j ), samples of the signal become the scaling coefficients. Decompose f j = w j 1 + w j 2 +... + w 0 + f 0.
Steps for Haar Reconstruction After decomposing a signal f into its components in terms of V 0 and W j, what do we do? The answer depends on the goal. If the goal is to filter out noise, then the wavelet coefficients at scales which correspond to the noise can be thrown out. If the goal is compression, the coefficients that are small can be thrown out. Given f (t) = f 0 (t) + w 0 (t) + w 1 (t) +... + w j 1 (t) where f 0 (t) = k c kφ(t k) and w l = k d l,kψ(2 l t k), the goal is to write f (t) = k cj k φ(2j t k).
We can write: φ(2 j 1 t) = φ(2 j t) + φ(2 j t 1) ψ(2 j 1 t) = φ(2 j t) φ(2 j t 1) Since f 0 = c k φ(t k) k (11) = k c k φ(2t 2k) + k c k φ(2t 2k 1) = l ĉ 1 l φ(2t l) (12) where ĉl 1 = c k. Similarly, w 0 (t) = { l d l 1 φ(2t l) where dl 1 dk l = 2k = d l = 2k + 1.
Combining the terms f 0 (t) + w 0 (t) = { l c1 l φ(2t l), where cl 1 ck + d = k l = 2k c k d k l = 2k + 1 This result can be generalized to obtain the scaling coefficients at scale j as: { c j 1 c j l = k + d j 1 k l = 2k c j 1 k d j 1 k l = 2k + 1 (13)