2.1 Introduction to wavelets and their transforms
2.1.4 Discrete Wavelet Transform (DWT)
In the previous section we introduced some of the most common wavelet families that are used in analysis. These wavelets are the building blocks for a variety of methods including wavelet transforms. In this section we will consider one such transform, specifically the Discrete Wavelet Transform (DWT). The DWT provides a time-scale representation of a signal in which the information contained in the signal is encoded in a set of smooth and detail coefficients.
The dilation equations defined in equations (2.1.4) and (2.1.5) can be used to derive the following relations which allow us to find the father and mother wavelets at progressively coarser scales using the high and low-pass filters
φj−1,k(x) = X n∈Z hn−2kφj,n(x), (2.1.12) ψj−1,k(x) = X n∈Z gn−2kφj,n(x). (2.1.13) The Discrete Wavelet Transform, proposed in Mallat (1989a,b), takes a regularly spaced signal of dyadic length 2J (for some J > 0) and decomposes it into a set of smooth and detail coefficients which encapsulate the information contained in the signal at different scales/resolutions. Equations (2.1.12) and (2.1.13) can be used to derive the equations that calculate the smooth and detail coefficients at each level of
the transform. The number of coefficients produced by the transform changes at each step of the decomposition with more coefficients at finer scales and fewer at coarser scales.
The smooth coefficients, cj,k, are associated with the father wavelet functions, φj,k(x), and the detail coefficients, dj,k, are associated with the mother wavelet func- tions ψj,k(x). The smooth coefficients at scale 2j are given by
cj,k = Z ∞ −∞ f(x)2j2φ(2jx−k)dx= Z ∞ −∞ f(x)φj,k(x)dx=hf(x), φj,k(x)i. (2.1.14)
In a similar way, the detail coefficients at scale 2j can be found using
dj,k = Z ∞ −∞ f(x)2j2ψ(2jx−k)dx= Z ∞ −∞ f(x)ψj,k(x)dx=hf(x), ψj,k(x)i. (2.1.15)
Using ideas motivated by the MRA framework, it is possible to define equations to compute the smooth and detail coefficients at coarser scales in the following way
cj−1,l = X k hk−2lcj,k, (2.1.16) dj−1,l = X k gk−2lcj,k, (2.1.17) where{hk}and {gk}are the low and high-pass filter coefficients. The DWT takes an initial data vector x = {x0, x1, . . . , xT−1} of length T = 2J and splits it into several smooth and detail vectors. Let cJ = {c
J,k}k =x be the initial data vector. Setting j =J in equation (2.1.16) and (2.1.17) allows us to compute the smooth (cJ−1,k) and detail (dJ−1,k) coefficients at the finest scale. The set of smooth coefficients are then filtered again using equations (2.1.16) and (2.1.17) to obtain coefficients at the next coarsest scale. This process is repeated until the coarsest scale is reached, the final
set of coefficients are then given by
(c0,d0,d1, . . . ,dJ−1). (2.1.18) Note that the DWT is a decimated transform, for each level j ∈ {1, . . . , J} the transform calculates coefficients for locationsk ∈ {0, . . . ,2J−j−1}which means that the number of coefficients decreases for coarser levels.
The support of the wavelet filters used to decompose the series can sometimes extend beyond the range of the data. In order to deal with these boundary problems, Nason and Silverman (1994) proposed a number of solutions including
• Symmetry - The sequence is reflected at the endpoints to extend the original length of the sequence, so that it has the form (y0, . . . , yT−1, yT−2, yT−3, . . .).
• Periodic - Assume the sequence is periodic on the range of the data, so that yk+T =yk−T =yk for k = 0, . . . , T −1.
• Zero padding - The sequence is padded with zeroes outside the range of the data, (y0, . . . , yT−1,0,0, . . .).
Other solutions include specifically designed wavelets that always remain on the do- main of the original data, see Cohen et al. (1993) for a description of wavelets on the interval.
Instead of using the MRA framework, we can think of the DWT in an alternative way that involves a filtering and decimation step, as described in Nason and Silverman (1995). First we define the even decimation operatorD0 that takes every even-indexed
element in a sequence. This has the form
(D0x)l =x2l (2.1.19)
for the sequence {xl}. Let H and G represent the low and high-pass convolution operators, defined by (Hx)k= X n hn−kxn, (2.1.20) (Gx)k= X n gn−kxn. (2.1.21)
As above, let cJ = {cJ,k}k ={x0, x1, . . . , x2J−1} be the initial data vector. Applying
the DWT on this vector using equations (2.1.16) and (2.1.17) can be written in the following way using operator notation
cj−1 =D0Hcj, (2.1.22) dj−1 =D0Gcj, (2.1.23) forj =J, . . . ,1. Following Nason and Silverman (1995), the DWT smooth and detail coefficients at level j given the original data cJ can be written as
dj =D0G(D0H)J−j−1cJ, (2.1.24) cj = (D0H)J−jcJ, (2.1.25) forj = 0,1, . . . , J−1.
A useful property of the DWT is that it is an orthogonal transform and can therefore be inverted to obtain the initial data vector. Given the smooth and detail coefficients at the coarsest level, Mallat (1989b) showed that the inversion relation is
given by cj,k = X l hk−2lcj−1,l+ X l gk−2ldj−1,l. (2.1.26) The original series can be recovered exactly using equation (2.1.26) given the smooth coefficient at the coarsest scale c0 and the detail coefficients d0,d1, . . . ,dJ−1.
One of the major weaknesses of the Discrete Wavelet Transform is that it is not translation-invariant, this means that if we take the DWT of an input vector and then shift this input vector by some amount and again perform the transform then we will obtain different results. This is not an attractive quality for a wavelet transform to possess since it means that analysis using this transform will be affected by the choice of origin. An example of this can be seen in Figure 2.1.3; shifting the original data by one to the left results in completely different wavelet coefficients. ThewavethreshR package (Nason, 2016) was used to apply the wavelet transform and generate the plots of the wavelet decomposition coefficients. The Non-decimated Wavelet Transform (NDWT) was developed as a solution to this problem and will be outlined in the next section.