You are on page 1of 19

Direct Form - II

Fourier To Wavelets

1.Introduction, Fourier to Wavelets,

1.1 Introduction:

What is the Need for Wavelet Transform?

Wavelet analysis is a new development in applied mathematics. They were first


introduced in seismology to provide a time dimension to seismic analysis that Fourier
analysis lacked. Fourier analysis is ideal for studying stationary data (data whose
statistical properties are invariant over time) but is not well suited for studying data
with transient events that cannot - be statistically predicted from the data's past.
Wavelets were designed with such non-stationary data in mind.
To begin with, consider a nonstationary signal, and understand its time and
frequency characteristics. Consider the signal as shown in figure below

This first half of the signal is a sinusoid with a normalized frequency of 0.1 and
the other half has a normalized frequency of 0.3. If we look at the energy spectrum of
this signal there are two peaks at the respective frequencies as shown in below figure
The energy spectrum is perfectly valid, but the Fourier transform is essentially
an integral over time. Thus, we lose all information that varies with time. All we can
tell from the spectrum is that the signal has two distinct frequency components. In
other words, we can comment on what happens in a signal, not when it happens. For
example, in a song if we want to know when the drums kicked in, as well as what
notes were being played on the guitar a frequency analysis is not sufficient. If we
perform only frequency analysis, all time information would be lost and the only
information we would have would be about what frequencies were played in the song,
and what their respective amplitudes were, averaged over the duration of the entire
song.
The solution to this is time-frequency analysis that comprises those
techniques to study a signal in both the time and frequency domains simultaneously,
using various time–frequency representations. A popular choice to represent both time
and frequency characteristics is the Short-Time Fourier transform (STFT), which
transforms the input and aggregates the result in a 2-dimensional form, where one axis
represents frequency and the other represents time.

The STFT Segment the signal into narrow time intervals (i.e., narrow enough
to be considered stationary) and take the Fourier Transform (FT) of each segment.
Each Fourier Transform provides the spectral information of a separate time-
slice of the signal, providing simultaneous time and frequency information. The STFT
is given by

FT fu (t , u )    f (t )   e  j 2 ut dt
t

In STFT choosing of the window size is considered as important task. When


W(t) is infinitely long STFT turns into FT, providing excellent frequency localization,
but no time localization. Similarly, when W(t) is infinitely short results in the time
signal (with a phase factor), providing excellent time localization but no frequency
localization. Here arises the need for wavelets which uses multiple window size to
provide both time and frequency localization.

Haar Wavelet:
The Haar sequence is recognised as the first known wavelet basis and the
simplest possible wavelet. The Haar wavelet is a sequence of rescaled square-shaped
functions which together form a wavelet family or basis. The technical disadvantage
of the Haar wavelet is that it is not continuous, and therefore not differentiable. This
property can however, be an advantage for the analysis of signals with sudden
transitions.

Wavelets always deal with basically two sets of functions namely scaling functions
and wavelet functions. Haar scaling function  (t) defined as
1 0  t  1
 (t)  
0 elsewhere

Figure: Haar scaling function

Haar wavelet function  (t ) defined as


1 0  t  1/ 2

 (t )  1 1/2  t  1
0 elsewhere

Figure: Haar wavelet function

2.6. Translation and Scaling of  (t) :


The functions of the type  (t 1), (t  2), (t  4) or in general  (t  k ) are called
as translates of  (t) . In function  (t) , the function exists practically for values of t in
the range [0, 1].

Figure: Translations of Haar scaling functjon  (t)


The functions of the type  (2t 1), (2t  2), (2t ) or in general  (2t  k ) are
called as scaling of  (t) . Any signal in such space can be written as


f (t )   a  (2t  k )
k 
k

Haar wavelet transform:

Suppose you are given N values x = (x1, x2, … xN) where N is even.

We take pair-wise average of numbers sk = (x2k + x2k+1)/2 for k=0, …, N/2 -1

For example, x = (6, 12, 15, 15, 14, 12, 120, 116) -> s = (9, 15, 13, 118)

We need second list of data d so that the original list x can be recovered from s and d.

For dk (called directed distances), we have:

dk = (x2k - x2k+1)/2 for k=0, …, N/2 -1

The process is invertible since:

sk + dk = (x2k + x2k+1)/2 + (x2k - x2k+1)/2 = x2k

sk - dk = (x2k + x2k+1)/2 - (x2k - x2k+1)/2 = x2k+1

So we map x = (x1, x2, … , xN) to (s | d) = (s1, … , sN/2 | d1, … , dN/2).


Using our example values, we have:

(6, 12, 15, 15, 14, 12, 120, 116) -> (9, 15, 13, 118 | -3, 0, 1, 2)

This process is repeated recursively for s:

(9, 15, 13, 118 | -3, 0, 1, 2) -> (12, 65.5 | -3, -52.5 | -3, 0, 1, 2)

(12, 65.5 | -3, -52.5 | -3, 0, 1, 2) -> (38.75 | -26.75 | -3, -52.5 | -3, 0, 1, 2)

So, final result is:

(38.75, -26.75, -3, -52.5, -3, 0, 1, 2)

Haar Wavelets Example


x3  [2,5,8,9, 7, 4, 1,1]
1
s 2  5,8  9, 7  4, 1  1
2
1
d 2  5,8  9, 7  4, 1  1
2
 7 17 11 0 3 1 3 2 
x2   , , , , , , , 
 2 2 2 2 2 2 2 2
 1  24 11 10 11  3 1 3 2 
x1    , , , , , , , 
 2 2 2 2 2 2 2 2 2
 35 13 10 11 3 1 3 2 
x0   , , , , , , ,
2 2 2 2 2 2 2 2 2 2 

You might also like