Wavelet Basics PDF
Wavelet Basics PDF
3.1. Introduction
Discrete Wavelet Transform and Multi Resolution Analysis using Wavelet Filters are
now very widely used in the areas of feature extraction [3,4]. But very little work is
found in the literature [14, 15, 32] about making use of these techniques for signal
approximation or interpolation.
Approximating a given signal to double its length for better identification of the
locations of the peaks in the signal is a common procedure in industrial applications
for the local analysis of the signal as explained below:
58
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
Since the first option is not always feasible, the second option is often preferred. In
this paper we discuss a novel approach for interpolating a given digital signal to
double its length by using Multi Resolution Analysis of Discrete Wavelet Transform.
This chapter is divided in to six sections. After giving an introduction in the first
section, we discuss the analysis of Fourier and Wavelet transform in signal processing
terms in the second section. The effect of applying low-pass filters and high-pass
filters to the discretized (finite length) signal is described in the third section. In the
fourth section, we highlight the characteristics of the approach presented earlier by
applying it on various numerical examples. While the properties of this approach are
to be discussed in the fifth section. At the end we conclude the results in the sixth
section.
It is well known from Fourier theory that a signal can be expressed as the sum of a,
possibly infinite, series of sine and cosines. This sum is also referred to as a Fourier
expansion. The big disadvantage of a fourier expansion however is that it has only
frequency resolution and no time resolution. This means that although we might be
able to determine all the frequencies present in a signal, we do not know when they
are present. To overcome this problem in the past 4 to 5 decades several solutions
(Fast Fourier Transform (FFT), Windowed Fourier Transform (WFT) etc.) have been
developed which are more or less able to represent a signal in the time and frequency
domain at the same time.
The idea behind these time-frequency joint representations is to cut the signal of
interest into several parts and then analyze the parts separately. It is clear that
analyzing a signal this way will give more information about the when and where of
different frequency components, but it leads to a fundamental problem as well: how to
cut the signal? Suppose that we want to know exactly all the frequency components
present at a certain moment in time.
59
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
The problem here is that cutting the signal corresponds to a convolution between the
signal and the cutting window. Since convolution in the time domain is identical to
multiplication in the frequency domain and since the Fourier transform of a Dirac
pulse contains all possible frequencies the frequency components of the signal will be
smeared out all over the frequency axis. In fact this situation is the opposite of the
standard Fourier transform since we now have time resolution but no frequency
resolution whatsoever.
The wavelet transform or wavelet analysis is probably the most recent solution to
overcome the shortcomings of the Fourier transform. In wavelet analysis the use of a
fully scalable modulated window solves the signal-cutting problem. The window is
shifted along the signal and for every position the spectrum is calculated. Then this
process is repeated many times with a slightly shorter (or longer) window for every
new cycle. In the end the result will be a collection of time-frequency representations
of the signal, all with different resolutions. Because of this collection of
representations we can speak of a multiresolution analysis.
In this section, we present the basic result of signal transformation and signal
reconstruction using MRA. Consider standard lemma [1.3] regarding the
reconstruction of a signal using MRA (figure-1.5) discussed in the chapter 1. In the
following section, we introduce the use of wavelets for the Approximation of a signal
to double its length.
60
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
In this section we recall; the lemma-1.3 of chapter 1 which demonstrates the analysis
phase (discrete wavelet transform) and synthesis phase (inverse discrete wavelet
transform) for a given function/ e L2 (R). Consider the resolution level of the
function is (/+/), so we denote this function by yJ+1. For each J e z, define sequences
y} = D(yJ+l * u). Where D is the downsampling operator on /2 (z). u - (u} (&))fez and
v = (Vj (k)) kez are scaling and wavelet sequence respectively. And u and v are the dual
The reconstruction of yj+1 using one analysis phase and one synthesis phase can be
given by
We extend this result by adding one more level of synthesis phase for the purpose of getting
approximated double length signal as follows:
The use of wavelets to interpolate a given digital signal is a less studied area. The
pictorial representation of the above equation is shown in figure-1.5 of chapter-1
which is made up of one analysis and one synthesis phase and yields reconstruction of
a signal. In order to approximate the signal to its double length, one more level of
synthesis phase is applied to figure-1.5.
one analysis phase and two synthesis phases on f we get one level higher resolution
61
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
of/(say w/+2^m^) wMch will be of doubled length compared to the original signal
values of length m.
In section 3.4, we will prove that Wj+2 is equal to ^J+2 (the actual higher resolution of
We have carried out some experiments with a few discretized signals and applied
Haar, Daubechies D4, D6 discrete wavelet transforms on them with the objective of
Approximation. The following sections present the results of the numerical
experiments.
62
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
Consider the function sin(x) where xe [0,2k]. The interval was divided in to 127 equal
sub-intervals and the function was sampled at the 128 points (say m = 128) of
discretization.
xg[0,2k]
/(*)
= 0 , otherwise
A graph of the function with the sampled values is as shown in figure-3.2. The graph
of the wj values obtained from equation 3.1 is shown in figure-3.3 (a).
It is observed from these graphs that the process specified in equation (3.1) leads to
two types of distortions to the original signal, namely (i) there is a distortion in the
graph due to the presence of values near horizontal axis and (ii) the amplitude of the
signal increases by a factor of about V2 . It is further observed that these distortions
63
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
occur due to the presence of high frequency components (figure-3.3(b)). Due to these
observations we propose to have only the low frequency components (highlighted
region in figure-3.1) for the purpose of approximating the signal to double its length
(2m).
Therefore we consider the following expression rJ+2 extracted from equation (3.1)
for being the form for the interpolated signal:
r^=yl2iU(U(yj)*u)*u] (3.2)
where ^ is a scaling parameter ( estimated from the above mentioned observations)
Equation (3.2) yields, desired Approximation of sin(x) to its double length (2m = 256
sample points), where xg[0,2tt]. Figure-3.4 , 3.5(a) and 3.5(b) shown below
demonstrate the graphs of 256 sample points vs. sin(x) with the help of equation (3.2)
by using Daubechies D4, Haar and D6 wavelets coefficients respectively.
64
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
Fig. 3.5(a) 256 Sample points vs. sin(x) by Haar Fig. 3.5(b) 256 Sample points vs. sin(x) by D6
- x , xe[Q, 31]
. M
j= 0 , otherwise
Dividing the signal in to 31 equal parts, the 32 discrete values are as shown in figure-
3.6(a). Hence the length of the signal is m=32. Figure-3.6(b) exhibits the interpolated
graph of this signal to double its length (2m = 64 sample points) by applying equation
3.2 by using Daubechies D4 wavelets. Similarly figure-3.6(c) and 3.6(d) shown below
gives interpolated graph of the signal using Haar and Daubechies D6 respectively.
65
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
Fig. 3.6(c). interpolated line graph by Haar Fig. 3.6(d). interpolated line graph by D6
f = x2 , xe[0, 3.1]
m 1L = 0 , otherwise
Dividing the signal in to 31 equal parts, the 32 discrete values are as shown in figure-
3.7(a). Here also the length of this signal is m~32. Up on applying equation 3.2, the
signal is getting interpolated to double its length. Figure-3.7(b) shows the sharp
feature of the curvature using Daubechies D4 wavelets.
66
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
Fig. 3.7(c) and 3.7(d) exhibit the interpolated graphs obtained by equation (3.2) by
using Haar and Daubechies D6 wavelets coefficients respectively.
It is observed from these three illustrations that sinusoidal function gives perfect
Approximation while non periodic functions (linear and parabolic) shows some kind
of distortion at the boundary points which arise due to the lack of information near
boundary points.
67
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
If we apply one more level of analysis phase on Wj+2 ((j+2)th resolution of original
signal), we get original signal at (j + 1 )th resolution (i.e. yj+i) back. Hence we can
rewrite equation (3.2) as below:
Equation (3.2) gives yj+2, which represents the signal at a resolution one level higher
than that of ^J+1 for the original signal f Additionally, we observe that the detail and
eachJGZ, sequences yj+l = (yj4.l(k))k^ and yj+2 = (y;+2(A:))tez form (j+1 )* and
68
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
Proof:
We have
wJ+2 = U(U(yj)*u)*u+ U(U(Xj)*v)*u+ U(U(yj)*u)*v+ U(U(xj)*v)*v
It is clear from lemma (1.3) of chapter 1 that the reconstruction of a signal at (j+2)th
level of resolution can be expressed as follows :
Using one-one property of wavelet transform [11], it is obvious that both, yJJt2 and
wj+2, form a signal at one higher level of resolution than yJ+l.
U(xJ+l)*v = U(yJ+l)*v
Xjn=yM' (3.8)
69
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
Now,
wJ+1(k)=D(wj+2*u)(k)
=^u(2k~m)yj+2(m)
k
k
=< /» X“(m “ 2k')(Pj y'} tm >
k
= <f’<Pj+l,k>
= yJ+i&) (3-9)
It is interesting to note that the high pass and low pass coefficients become identical.
For instance consider the following illustrations in which a finite length signal is
given as an input and yields double length approximated signal as an output using
equation (3.1). Up on allowing this new signal to one more analysis phase as shown in
figure-3.1, we get two signals of the same length as the original one. These two
signals are found to be identical to each other as well as the original signal.
Illustration 1:
Consider a signal of finite length {1,4,-3,0) to beyj+i [13], the 0+l)th level resolution
of size n = 4. From equation (3.1), the 0+2)th level resolution of this signal obtained
70
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
round off errors and the method of storing floating point values in computers). These
identical signals are also the same as the original signal {1,4,-3,0}.
Illustration 2:
Consider f(x) = x2 be a parabolic signal (as discussed in section 3.4.3) in L2(R) such
that,
m 1L = 0 , otherwise ' .
Dividing the signal in to 31 equal parts, the 32 discrete values are as shown in figure-
3.7(a). The double length approximated signal obtained using equation (3.1) is
allowed to pass one more analysis phase. The approximation coefficients and detailed
coefficients are obtained and portrayed as shown in the figure 3.9(a) and 3.9(b)
respectively.
Approximation coefficients
Approximation coefficients
71
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
Detailed coefficients
900
Detailed coefficients
200
0 5 .10 15 20 25 30 35
n —>
It is observed from the figures 9(a) and 9(b) that the graphs are identical to each other
and same as the figure 3.7(a).
3.6. Conclusions
In this chapter we highlight a novel Approximation technique using MRA with DWT.
The method has been verified on finite length signals obtained from standard
functions like sine x, cos x, exp(x), x, x2. Numerical experiments using discrete
wavelet transforms like Haar, Daubechies D4, D6 were carried out and it has been
observed that this method for interpolating a signal works best with the D4 wavelets.
If the given signal is subjected to analysis phase once and synthesis phases twice, then
the signal is decomposed into four components each of size twice that of the original
signal. The algebraic sum of all these four components yields a new double length
signal. In order to interpret this new signal, it is passed through one more stage of
analysis phase. The two branches of this stage produce two signals of length equal to
that of the original signal which have been found to have the following properties : (i)
the detail and approximation coefficients become identical and same (ii) each of
these signals is the same as the original signal. Hence it leads to the conclusion that
72
Chapter 3. A wavelet based MRA technique for approximating a discrete signal
the intermediate signal Wj+2 contains the original signal approximated to double its
size.
73