wavelet transform and dsp applications
TRANSCRIPT
Wavelet Transform and DSP Applications
Overview
• Fourier Transform: its power and limitations.
• Short Time Fourier Transform.
• The Gabor Transform.
• Discrete Time Fourier Transform and filter banks.
• Continuous Wavelet Transform.
• Wavelet Transform Ideal Case.
• The Multi-Resolution Analysis
• Perfect Reconstruction Filter Banks and wavelets.
• Haar Wavelet.
• Daubechies Wavelet.
Fourier Transform
• Fourier Transform is one of several mathematical tools that is
useful in the analysis and design of LTI systems.
• It is a way to convert the signal from time domain into
frequency domain.
Example of the Fourier Transform
Transfer Function
• The Fourier transform of a periodic discrete-time signal x(n) is
defined as:
• 𝑋 𝑤 = 𝑛=−∞∞ 𝑥(𝑛)𝑒−𝑗𝜔𝑛
• Where X(w) is the frequency content of the signal x(n).
• The signal x(n) can be synthesis and reconstructed from its
spectrum as:
• 𝑥 𝑛 =1
2𝜋 −∞∞
𝑋(𝑤)𝑒−𝑗𝜔𝑡𝑑𝑤
• Example: Determine the Fourier transform of the signal shown in figure below.
𝑥 𝑛 = 𝐴. −𝑀 ≤ 𝑛 ≤ 𝑀0. 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
, where M=2, A=1.
• Solution: the Fourier transform of the signal is
𝑋 𝑤 = 𝑛=−∞∞ 𝑥(𝑛)𝑒−𝑗𝜔𝑛
𝑋 𝑤 = 𝑋 −2 𝑒2𝑗𝑤 + 𝑋 −1 𝑒𝑗𝑤 + 𝑥 0 𝑒0 + 𝑋 1 𝑒−𝑗𝑤 + 𝑋 2 𝑒−2𝑗𝑤
= 1 + 2 cos𝑤 + 2 cos 2𝑤
Signal for this example
w X(w)
0 5
𝜋/2 -1
𝜋 1
2𝜋 5
-𝜋/2 -1
-𝜋 1
3𝜋/2 -1
Spectral characteristics of the
rectangular pulse.
• It is a powerful mathematical tool that allows to view signals in a different
domain, making many difficult problems easy to analyze.
• i.e. any periodic function g(x) in the domain D=[−π,π] can be written as:
• 𝑔 𝑥 = 𝑘=−∞∞ 𝜏(𝑘)𝑒𝑗𝑘𝑥
• 𝜏(𝑘) = 𝐷=−𝜋𝜋
𝑔(𝑥)𝑒−𝑗𝑘𝑥𝑑𝑥
• where 𝑒𝜃 = cos 𝜃 + jsin(𝜃). This idea that a function could be broken
down into its constituent frequencies (i.e., into sines and cosines of all
frequencies) was a powerful one and forms the backbone of the Fourier
transform.
The power of the Fourier Transform
Fourier Transform Examples
Fourier Transform Examples Contd.
F1(𝑤)
F2(𝑤)
F3(𝑤)
Fourier Analysis Examples Contd.
F4(𝑤)
Can’t provide simultaneous time and frequency localization.
Limitations of the Fourier transform
Fourier Analysis Examples Contd.
F4(𝑤)
Provides excellent
localization in the
frequency domain
but poor localization
in the time domain.
Limitations of the Fourier transform
Not very useful for analyzing time-variant, non-stationary
signals.
Can’t provide simultaneous time and frequency localization.
Stationary vs. non-stationary Signals
• Stationary signals:
time-invariant spectra
• Non-stationary
signals: time-varying
spectra
)(4 tf
)(5 tf
Not appropriate for representing discontinuities or sharp
corners (i.e., requires a large number of Fourier
components to represent discontinuities).
Limitations of the Fourier transform
Fourier Not very useful for analyzing time-variant, non-
stationary signals.
Can’t provide simultaneous time and frequency localization.
Short-Time Fourier Transform
• Short-term Fourier transform is a Fourier-related transform used
to determine the sinusoidal frequency and phase content of local
sections of a signal as it changes over time.
• Denis Gabor (1946), developed a technique called windowing.
STFT - Steps
(1) Choose a window function of finite length.
(2) Place the window on top of the signal at t=0.
(3) Truncate the signal using this window.
(4) Compute the FT of the truncated signal, save results.
(5) Incrementally slide the window to the right.
(6) Go to step 3, until window reaches the end of the signal.
• Continuous STFT is mathematically represented as:
• Discrete STFT is mathematically represented as:
• Where W(t) is a window function, commonly a Hann window or Gaussian window centered around zero.
Transfer Function
• Fundamental frequency estimation from spectral peaks.
• Cross synthesis.
• Spectral envelope extraction by linear smoothing.
• Sinusoidal modeling of audio signals.
• Time-scale modification.
• Frequency shifting
• Audio FFT filter banks.
STFT Applications
STFT Example
• Used to analyze audio/music and gain
information about an audio sample.
• Horizontal axis represents the frequency.
• The height of each bar is the amplitude of
the frequency.
• Depth dimension represents the time.
• Special case of the STFT used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time.
• Continuous Gabor transformation is represented as:
• 𝐺𝑥 𝑡, 𝑓 = −∞∞
𝑒−𝜋 𝜏−𝑡 2𝑒−𝑗2𝜋𝑓𝜏𝑥 𝜏 𝑑𝜏
• Discrete Gabor transformation is represented as:
• y 𝑡 = 𝑚=−∞∞ 𝑛=−∞
∞ 𝐶𝑛𝑚. 𝑔𝑛𝑚(𝑡)
• With 𝑔𝑛𝑚(𝑡) = 𝑠 𝑡 − 𝑔𝜏0 . 𝑒𝑗𝛺𝑛𝑡
The Gabor Transform
• The main application is in time frequency analysis.
• 𝑓 𝑥 = cos(2𝜋𝑡) , 𝑓𝑜𝑟 𝑡 < 0
cos 4𝜋𝑡 , 𝑓𝑜𝑟 𝑡 ≥ 0
Application and Example
Example contd.
• The input signal has 1 Hz frequency component when t ≤ 0 and has 2 Hz frequency component when t > 0.
• But if the total bandwidth available is 5 Hz, other frequency bands except x(t) are wasted.
• Through time frequency analysis by applying the Gabor transform, the available bandwidth can be known and those frequency bands can be used for other applications and bandwidth is saved.
What are the drawbacks of STFT?
• Unchanged Window.
• Dilemma of Resolution
Narrow window -> poor frequency resolution
Wide window -> poor time resolution
• Can’t know what frequency exists at what time intervals.
Via Narrow Window Via Wide Window
Discrete Time Fourier Transform and filter banks
• DFT converts a finite list of equally spaced samples of a function
into the list of coefficients of a finite combination of complex
sinusoids, ordered by their frequencies.
• 𝑋(𝑘) ≝ 𝑛=0𝑁−1 𝑥𝑛. 𝑒
−𝑗2𝜋𝑘𝑛
𝑁 , 𝑘 ∈ 𝑍 (𝑖𝑛𝑡𝑒𝑔𝑒𝑟𝑠)
• Filter Banks means split up signal into different frequency bands.
Then reassemble bands into original signal.
Wavelet Transform
• A wavelet is a small wave.
• It is a mathematical function that represent scaled and translated
(shifted) copies of a finite-length waveform called mother
wavelet.
Fourier Transform Wavelet Transform
Some of the most popular mother wavelets
Wavelet Transform Ideal Case (computing CWT of a signal)
• The continuous wavelet transform is given by:
• XWT τ, s =1
s −∞
+∞x t ѱ∗ t−τ
sdt
• Where:
• τ Is the translation parameter.
• s Is the scale parameter.
• ψ is the Mother Wavelet.
Transfer Function
• The Discrete Wavelet Transform (DWT) is given by:
𝑔 𝑡 =
𝑚∊ℤ
𝑛∊ℤ
𝑥, ѱ𝑚,𝑛 . ѱ𝑚,𝑛[𝑡]
Where: ѱ𝑚,𝑛 𝑡 = 𝑠0−𝑚/2
ѱ(𝑠0−𝑚𝑡 − 𝑛τ0)
Transfer Function
The Multi-Resolution Analysis
• Analyzing a signal at different frequencies with
different resolutions. By applying bank filters.
Filter Bank
In signal processing, a filter bank is an array of band-pass filters
that separates the input signal into multiple components, each
one carrying a single frequency sub-band of the original signal.
In DSP, this term is applied to a bank of receivers, and these
receivers also down-convert the sub-bands to a low center
frequency that can be re-sampled at a reduced rate.
Filter Bank
The Analysis of Filter Banks
• Low-pass filter h0(n) whose output, sub-band flp(n) is called approximation
sub-band of f(n).
• High-pass filter h1(n) whose output sub-band fhp(n) is called high frequency or
detail part of f(n).
General Perfect Reconstructions Filter Banks
• Two channel orthogonal system can’t have linear phase except in
simple structures (sum and difference of 2 delays). So, in order to
obtain filter banks with linear phase, orthogonality must be
sacrificed, which leads to biorthogonal linear phase filter banks.
Thus, by sacrificing orthogonality, we have greater degree of
freedom. So, we can use arbitrary length linear phase filters.
Haar Wavelet Transform
• The Haar wavelet (HWT) is a discontinuous, and resembles a
step function.
• Where L is the decomposition level, a is the approximation
subband and d is the detail subband.
Pyramid decomposition using Haar wavelet filter
Decomposition Level 1 Decomposition Level 2
Haar Wavelet Transform Example
• The signal image is:1 3 22 2 11 3 2
212
2 2 1 1
• The sub-bands of the first decomposition will be as follows:
L=
4
2
4
24
2
2
2
, 𝐻 =2
20
0 0
4
2
4
24
2
2
2
2
20
0 0
Example contd.
• The sub-bands of the second decomposition will be as follows:
𝐿𝐿 =4 34 3
, 𝐿𝐻 =0 −10 −1
𝐻𝐿 =1 01 0
, 𝐻𝐻 =−1 0−1 0
Decomposition Using Haar Wavelet Example
Daubechies Wavelet
• It is a family of orthogonal wavelets defining a discrete
wavelet transform and characterized by a maximal number of
vanishing moments for some given support.
• Like Haar wavelet, Daubechies wavelets consist of basic building
blocks (scaling functions) and wavelets proper.
• Daubechies wavelets don’t have the jump discontinuities of the
Haar wavelets but at the cost of the expensive computation.
Thanks^_^