Sei sulla pagina 1di 175

Mutlirate systems, Filterbanks

B. Sainath

sainath.bitragunta@pilani.bits-pilani.ac.in

B. Sainath sainath.bitragunta@pilani.bits-pilani.ac.in Department of Electrical and Electronics Engineering Birla

Department of Electrical and Electronics Engineering Birla Institute of Technology and Science, Pilani

B. Sainath (BITS, PILANI)

October 1, 2018

Multirate signal processing

October 1, 2018 1 / 29
October 1, 2018
1 / 29

Outline

1 Introduction & Motivation

2 Fundamentals of Multirate Systems

3 Applications

4 Filter Banks

5 Conclusions

6 Textbooks & References

B. Sainath (BITS, PILANI)

Multirate signal processing

5 Conclusions 6 Textbooks & References B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018
October 1, 2018 2 / 29
October 1, 2018
2 / 29

Introduction & Motivation

Introduction & Motivation Figure: Source: PPV’s textbook. Single rate DSP system multipliers, adders, delay
Introduction & Motivation Figure: Source: PPV’s textbook. Single rate DSP system multipliers, adders, delay

Figure: Source: PPV’s textbook.

Single rate DSP system

multipliers, adders, delay elements e.g., digital filters

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 3 / 29
October 1, 2018
3 / 29

Multirate DSP System

Multirate DSP System Figure: Source: Mathworks-MATLAB. Multirate DSP system multipliers, adders, delay elements plus
Multirate DSP System Figure: Source: Mathworks-MATLAB. Multirate DSP system multipliers, adders, delay elements plus

Figure: Source: Mathworks-MATLAB.

Multirate DSP system

multipliers, adders, delay elements plus downsampler, upsampler

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 4 / 29
October 1, 2018
4 / 29

Multirate DSP System: Building Blocks

Multirate DSP System: Building Blocks Figure: Basic building blocks of multirate system M − fold decimator
Multirate DSP System: Building Blocks Figure: Basic building blocks of multirate system M − fold decimator

Figure: Basic building blocks of multirate system

Mfold decimator or downsampler

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 5 / 29
October 1, 2018
5 / 29

Multirate DSP System: Building Blocks

Multirate DSP System: Building Blocks Figure: Basic building blocks of multirate system M − fold decimator
Multirate DSP System: Building Blocks Figure: Basic building blocks of multirate system M − fold decimator

Figure: Basic building blocks of multirate system

Mfold decimator or downsampler

reduce sampling rate by M before downsampler, use anti-aliasing filter

Lfold expander or upsampler

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 5 / 29
October 1, 2018
5 / 29

Multirate DSP System: Building Blocks

Multirate DSP System: Building Blocks Figure: Basic building blocks of multirate system M − fold decimator
Multirate DSP System: Building Blocks Figure: Basic building blocks of multirate system M − fold decimator

Figure: Basic building blocks of multirate system

Mfold decimator or downsampler

reduce sampling rate by M before downsampler, use anti-aliasing filter

Lfold expander or upsampler

increase sampling rate by L after upsampler, use anti-imaging filter

Depending on application

perform sampling rate alteration at i/p or at o/p or internally

Advantages (depends on application)

lower computational complexity for a given task reduced rate of transmission (and/or) reduced storage requirement, power consumption

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 5 / 29
October 1, 2018
5 / 29

Applications

Applications Figure: Source: Mathworks-MATLAB. B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 6 /
Applications Figure: Source: Mathworks-MATLAB. B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 6 /

Figure: Source: Mathworks-MATLAB.

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 6 / 29
October 1, 2018
6 / 29

Need for Sampling Rate Alteration

B. Sainath (BITS, PILANI)

Multirate signal processing

Need for Sampling Rate Alteration B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 7
October 1, 2018 7 / 29
October 1, 2018
7 / 29

Need for Sampling Rate Alteration

Need for Sampling Rate Alteration Clock rates are different for various subsystems music players audio broadcasting

Clock rates are different for various subsystems

music players audio broadcasting cellular communication

Enhanced flexibility & reduced computational complexity efficient & robust DSPs

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 7 / 29
October 1, 2018
7 / 29

Downsampling Illustration (M = 2)

Downsampling Illustration (M = 2) Figure: Decimation for M = 2 Anti-aliasing requirement: x [ n
Downsampling Illustration (M = 2) Figure: Decimation for M = 2 Anti-aliasing requirement: x [ n
Downsampling Illustration (M = 2) Figure: Decimation for M = 2 Anti-aliasing requirement: x [ n

Figure: Decimation for M = 2

Anti-aliasing requirement: x[n] band-limited

Use antialiasing filter (Decimation filter) before downsampler block

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 8 / 29
October 1, 2018
8 / 29

Transform Domain Analysis

O/p of downsampler in time-domain

Exercise: Prove that

y D [n] = x[Mn]

Y D (e jω ) =

1

M

M1

k=0

X

e j (ω2πk)

M

Y E (e jω ): Lfold compressed version of X (e jω )

) : L − fold compressed version of X ( e j ω ) B. Sainath

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 9 / 29
October 1, 2018
9 / 29

Graphical Interpretation

Y D (e jω ) =

1

M

M1

k=0

X

e j (ω2πk)

M

j ω ) = 1 M M − 1 k = 0 X e j (

Stretch X (e jω ) by M

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 10 / 29
October 1, 2018
10 / 29

Graphical Interpretation

Graphical Interpretation M−1 1 e j (ω−2πk) Y D (e jω ) = X M M
M−1 1 e j (ω−2πk) Y D (e jω ) = X M M k=0
M−1
1
e j (ω−2πk)
Y D (e jω ) =
X
M
M
k=0
Stretch X (e jω ) by M ⇒ X (e j ω M )
Create (M - 1) copies of X (e j ω M ) shifting uniformly k × 2π, k positive
integer
Sum all these shifted ‘stretched versions’ to X (e j ω M ) & divided by M

Q: Verify that Y D (e jω ) has period 2π

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 10 / 29
October 1, 2018
10 / 29

Example

Example x [ n ] ↔ X ( e j ω ) . y [ n
Example x [ n ] ↔ X ( e j ω ) . y [ n

x[n] X(e jω ). y[n] = x[2n]

Q. Sketch Y (e jω )

Y(e jω ) = X e j ω ,

2

where

X e jω =

2 1 X e jω + X e j(ωπ)

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 11 / 29
October 1, 2018
11 / 29

Sketch of X e jω

Sketch of X e j ω B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018
Sketch of X e j ω B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018
B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 12 / 29
B. Sainath (BITS, PILANI)
Multirate signal processing
October 1, 2018
12 / 29

Sketch of Y (e jω )

Sketch of Y ( e j ω ) clearly, we see aliasing problem Solution: use anti-aliasing
Sketch of Y ( e j ω ) clearly, we see aliasing problem Solution: use anti-aliasing

clearly, we see aliasing problem Solution: use anti-aliasing filter (lowpass filter) before downsampling More details in class

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 13 / 29
October 1, 2018
13 / 29

Exercise

Exercise Suppose that x [ n ] is passed through an ideal LPF with ω c

Suppose that x[n] is passed through an ideal LPF with ω c = π and then applied to downsampler with M = 2. Sketch Y (e jω ).

Sketch of X LP (e jω )

2

B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 14 / 29
B. Sainath (BITS, PILANI)
Multirate signal processing
October 1, 2018
14 / 29

Filtering & Downsampling

Filtering & Downsampling Figure: Anti-aliasing filter before downsampler. B. Sainath (BITS, PILANI) Multirate signal
Filtering & Downsampling Figure: Anti-aliasing filter before downsampler. B. Sainath (BITS, PILANI) Multirate signal

Figure: Anti-aliasing filter before downsampler.

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 15 / 29
October 1, 2018
15 / 29

Upsampling Illustration (L = 2)

Upsampling Illustration (L = 2) Figure: Upsampling for L = 2 Upsampler (or expander) does not
Upsampling Illustration (L = 2) Figure: Upsampling for L = 2 Upsampler (or expander) does not
Upsampling Illustration (L = 2) Figure: Upsampling for L = 2 Upsampler (or expander) does not

Figure: Upsampling for L = 2

Upsampler (or expander) does not cause loss of information

Upsampling results in imaging effect Anti-imaging requirement

Use anti-imaging filter (interpolation) after upsampler block zero-valued samples converted into interpolated samples by using a LPF

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 16 / 29
October 1, 2018
16 / 29

Transform Domain Analysis

Transform Domain Analysis Let k & L are integers. O/p of upsampler in time-domain Q: Verify

Let k & L are integers. O/p of upsampler in time-domain

Q: Verify that

y E [n] = 0, x[ n

L

],

n = kL elsewhere.

Y E (e jω ) = X(e jωL )

Y E (e jω ): Lfold compressed version of X (e jω )

Math details in class

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 17 / 29
October 1, 2018
17 / 29

An Illustration (time-domain)

An Illustration (time-domain) Figure: Upsampling & Downsampling ( L = M = 2 ) B. Sainath
An Illustration (time-domain) Figure: Upsampling & Downsampling ( L = M = 2 ) B. Sainath

Figure: Upsampling & Downsampling ( L = M = 2 )

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 18 / 29
October 1, 2018
18 / 29

An Illustration (frequency domain)

An Illustration (frequency domain) Figure: Upsampling contracts frequency axis. x [ n ] = x a
An Illustration (frequency domain) Figure: Upsampling contracts frequency axis. x [ n ] = x a

Figure: Upsampling contracts frequency axis.

x[n] = x a [nT s ], s = 2N

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 19 / 29
October 1, 2018
19 / 29

An Illustration (frequency domain)

An Illustration (frequency domain) Figure: Upsampling contracts frequency axis. x [ n ] = x a
An Illustration (frequency domain) Figure: Upsampling contracts frequency axis. x [ n ] = x a

Figure: Upsampling contracts frequency axis.

x[n] = x a [nT s ], s = 2N y[n] = U 2 (x[n])

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 19 / 29
October 1, 2018
19 / 29

Combined Upsampling & Downsampling

Combined Upsampling & Downsampling Figure: Upsampling & Downsampling B. Sainath (BITS, PILANI) Multirate signal
Combined Upsampling & Downsampling Figure: Upsampling & Downsampling B. Sainath (BITS, PILANI) Multirate signal

Figure: Upsampling & Downsampling

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 20 / 29
October 1, 2018
20 / 29

Combined Upsampling & Downsampling

Combined Upsampling & Downsampling Figure: Upsampling & Downsampling. O/p sampling period F s L M Figure:
Combined Upsampling & Downsampling Figure: Upsampling & Downsampling. O/p sampling period F s L M Figure:

Figure: Upsampling & Downsampling. O/p sampling period F s

L

M

Upsampling & Downsampling. O/p sampling period F s L M Figure: Simplified by combining filters B.

Figure: Simplified by combining filters

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 21 / 29
October 1, 2018
21 / 29

Equivalent Filters: Decimation-based

Equivalent Filters: Decimation-based Figure: Illustrating equivalent filters using decimation B. Sainath (BITS, PILANI)
Equivalent Filters: Decimation-based Figure: Illustrating equivalent filters using decimation B. Sainath (BITS, PILANI)

Figure: Illustrating equivalent filters using decimation

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 22 / 29
October 1, 2018
22 / 29

Equivalent Filters: Decimation-based

Equivalent Filters: Decimation-based Figure: Illustrating equivalent filters using decimation Q. Prove that Y a
Equivalent Filters: Decimation-based Figure: Illustrating equivalent filters using decimation Q. Prove that Y a

Figure: Illustrating equivalent filters using decimation

Q. Prove that Y a e jω = Y b e jω Generalization to Mfold decimation

called noble identity

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 22 / 29
October 1, 2018
22 / 29

Equivalent Filters: upsampling-based

Equivalent Filters: upsampling-based Figure: Illustrating equivalent filters using upsampling B. Sainath (BITS, PILANI)
Equivalent Filters: upsampling-based Figure: Illustrating equivalent filters using upsampling B. Sainath (BITS, PILANI)

Figure: Illustrating equivalent filters using upsampling

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 23 / 29
October 1, 2018
23 / 29

Equivalent Filters: upsampling-based

Equivalent Filters: upsampling-based Figure: Illustrating equivalent filters using upsampling Q. Prove that Y a
Equivalent Filters: upsampling-based Figure: Illustrating equivalent filters using upsampling Q. Prove that Y a

Figure: Illustrating equivalent filters using upsampling

Q. Prove that Y a e jω = Y b e jω Generalization to Lfold interpolation

called noble identity

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 23 / 29
October 1, 2018
23 / 29

Polyphase Representation (PPR)

Polyphase Representation (PPR) B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 24 / 29
Polyphase Representation (PPR) B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 24 / 29
B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 24 / 29
B. Sainath (BITS, PILANI)
Multirate signal processing
October 1, 2018
24 / 29

Polyphase Representation (PPR)

Polyphase Representation (PPR) Q. B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 24 /
Polyphase Representation (PPR) Q. B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 24 /
Q. B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 24 / 29
Q.
B. Sainath (BITS, PILANI)
Multirate signal processing
October 1, 2018
24 / 29

Polyphase Representation (PPR)

Polyphase Representation (PPR) Q. Prove that they are equivalent B. Sainath (BITS, PILANI) Multirate signal processing
Polyphase Representation (PPR) Q. Prove that they are equivalent B. Sainath (BITS, PILANI) Multirate signal processing
Polyphase Representation (PPR) Q. Prove that they are equivalent B. Sainath (BITS, PILANI) Multirate signal processing

Q. Prove that they are equivalent

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 24 / 29
October 1, 2018
24 / 29

M-Component PPR

M-Component PPR Polyphase representation Valid for FIR/IIR; causal/non-causal Applicable to any sequence (not just impulse
M-Component PPR Polyphase representation Valid for FIR/IIR; causal/non-causal Applicable to any sequence (not just impulse

Polyphase representation

Valid for FIR/IIR; causal/non-causal Applicable to any sequence (not just impulse response)

Type-1 & Type-2 PPR (in class) PPR of interpolation filter

B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 25 / 29
B. Sainath (BITS, PILANI)
Multirate signal processing
October 1, 2018
25 / 29

Polyphase Implementations of Digital Filters

Polyphase Implementations of Digital Filters B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 26
B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 26 / 29
B. Sainath (BITS, PILANI)
Multirate signal processing
October 1, 2018
26 / 29

Digital Filter Banks

Digital Filter Banks Collection of digital filters with a common input & a common output x

Collection of digital filters with a common input & a common output

x k [n], k = 0, 1, H k [n], k = 0, 1, F k [n], k = 0, 1,

, M 1 called subband signals , M 1 called analysis filters

, M 1 called synthesis filters

combine M subband signals into xˆ[n]

filters combine M subband signals into x ˆ[ n ] Figure: Analysis (left) & Synthesis (right)

Figure: Analysis (left) & Synthesis (right) filter banks

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 27 / 29
October 1, 2018
27 / 29

Filter Responses

Filter Responses Figure: Illustration of typical filter responses: i). Marginally overlapping, ii). Non-overlapping
Filter Responses Figure: Illustration of typical filter responses: i). Marginally overlapping, ii). Non-overlapping

Figure: Illustration of typical filter responses: i). Marginally overlapping, ii). Non-overlapping & iii). Overlapping

B. Sainath (BITS, PILANI)

Multirate signal processing

October 1, 2018 28 / 29
October 1, 2018
28 / 29

Uniform DFT Filter Bank

Filter bank based on DFT matrix

Uniform DFT Filter Bank Filter bank based on DFT matrix B. Sainath (BITS, PILANI) Multirate signal
B. Sainath (BITS, PILANI) Multirate signal processing October 1, 2018 29 / 29
B. Sainath (BITS, PILANI)
Multirate signal processing
October 1, 2018
29 / 29

Wavelets & Applications

B. Sainath

sainath.bitragunta@pilani.bits-pilani.ac.in

B. Sainath sainath.bitragunta@pilani.bits-pilani.ac.in Department of Electrical and Electronics Engineering Birla

Department of Electrical and Electronics Engineering Birla Institute of Technology and Science, Pilani

B. Sainath (BITS, PILANI)

November 16, 2018

Wavelets

November 16, 2018 1 / 56
November 16, 2018
1 / 56

Outline

1 Introduction & Motivation

2 Short-Time Fourier Transform

3 Continuous Wavelet Transform

4 Discrete Wavelet Transform

5 Applications

6 Conclusions

7 References & Further Reading

B. Sainath (BITS, PILANI)

Wavelets

6 Conclusions 7 References & Further Reading B. Sainath (BITS, PILANI) Wavelets November 16, 2018 2
November 16, 2018 2 / 56
November 16, 2018
2 / 56

Quote By Mallat

Quote By Mallat Quote “Wavelet theory” is the result of a multidisciplinary effort that brought together

Quote

“Wavelet theory” is the result of a multidisciplinary effort that brought

together mathematicians, physicists and engineers

created a flow of ideas that goes well beyond the construction of new bases or transforms

—-Stephane Mallat, Author of Wavelet tour of signal processing

this

connection has

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 3 / 56
November 16, 2018
3 / 56

Introduction & Motivation

Introduction & Motivation Figure: Fourier & wavelet analysis of two signals. Limitation of Fourier spectrum: B.
Introduction & Motivation Figure: Fourier & wavelet analysis of two signals. Limitation of Fourier spectrum: B.

Figure: Fourier & wavelet analysis of two signals.

Limitation of Fourier spectrum:

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 4 / 56
November 16, 2018
4 / 56

Introduction & Motivation

Introduction & Motivation Figure: Fourier & wavelet analysis of two signals. Limitation of Fourier spectrum: B.
Introduction & Motivation Figure: Fourier & wavelet analysis of two signals. Limitation of Fourier spectrum: B.

Figure: Fourier & wavelet analysis of two signals.

Limitation of Fourier spectrum:

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 4 / 56
November 16, 2018
4 / 56

Introduction & Motivation

Introduction & Motivation Figure: Fourier & wavelet analysis of two signals. Limitation of Fourier spectrum:
Introduction & Motivation Figure: Fourier & wavelet analysis of two signals. Limitation of Fourier spectrum:

Figure: Fourier & wavelet analysis of two signals.

Limitation of Fourier spectrum:

could not distinguish the two signals (top left & right)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 4 / 56
November 16, 2018
4 / 56

Introduction & Motivation

Introduction & Motivation Examples of signals having time-varying frequencies B. Sainath (BITS, PILANI) Wavelets

Examples of signals having time-varying frequencies

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 5 / 56
November 16, 2018
5 / 56

Introduction & Motivation

Introduction & Motivation Examples of signals having time-varying frequencies speech, music, biomedical, seismic, so

Examples of signals having time-varying frequencies

speech, music, biomedical, seismic, so on

Fourier analysis is not useful tool to analyze such signals Need for transforms using which frequency content can be obtained locally in time

which frequency content can be obtained locally in time Figure: Application of wavelet to real-world signals

Figure: Application of wavelet to real-world signals having transients.

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 5 / 56
November 16, 2018
5 / 56

Introduction & Motivation

Wavelets

class of functions localized in time & frequency short wave(-like) oscillations exist for finite duration & have zero mean

oscillations exist for finite duration & have zero mean B. Sainath (BITS, PILANI) Figure: Wavelet Illustration.
oscillations exist for finite duration & have zero mean B. Sainath (BITS, PILANI) Figure: Wavelet Illustration.

B. Sainath (BITS, PILANI)

Figure: Wavelet Illustration.

Wavelets

November 16, 2018 6 / 56
November 16, 2018
6 / 56

Examples of Wavelets

Examples of Wavelets B. Sainath (BITS, PILANI) Wavelets November 16, 2018 7 / 56
B. Sainath (BITS, PILANI) Wavelets November 16, 2018 7 / 56
B. Sainath (BITS, PILANI)
Wavelets
November 16, 2018
7 / 56

Short-Time Fourier Transform (STFT)

Short-Time Fourier Transform (STFT) Definition: (continuous-time) Vf ( ω, t ) = ∞ u = −∞

Definition: (continuous-time)

Vf (ω, t) =

u=−∞

=

u=−∞

f(u)v(u t)e jωu du,

f(u)v ω,t (u) du

Also called windowed Fourier transform/short-term FT Consider FT framework

achieve time localization by windowing the data at various times

STFT is an energy preserving transformation (called isometry)

−∞

|f(t)| 2 dt =

2π

1

−∞ −∞

|Vf (ω, t)| 2 dω dt

Gabor transform: Gaussian function is used as a window

More details in class

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 8 / 56
November 16, 2018
8 / 56

Discrete-time STFT

Discrete-time STFT ∞ Vf (ω, n) = m=−∞ f[m]v[m − n]e −jωm Signal f [m], window
∞ Vf (ω, n) = m=−∞ f[m]v[m − n]e −jωm Signal f [m], window v
Vf (ω, n) = m=−∞ f[m]v[m − n]e −jωm
Signal f [m], window v [m]
n is discrete & ω is continuous
However, the STFT is performed on a computer using the FFT ⇒ both
variables are discrete & quantized

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 9 / 56
November 16, 2018
9 / 56

Discrete-time STFT

Discrete-time STFT ∞ Vf (ω, n) = m=−∞ f[m]v[m − n]e −jωm Signal f [m], window
∞ Vf (ω, n) = m=−∞ f[m]v[m − n]e −jωm Signal f [m], window v
Vf (ω, n) = m=−∞ f[m]v[m − n]e −jωm
Signal f [m], window v [m]
n is discrete & ω is continuous
However, the STFT is performed on a computer using the FFT ⇒ both
variables are discrete & quantized

DFT implementation principle & Lowpass filter interpretation of STFT (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 9 / 56
November 16, 2018
9 / 56

STFT Implementation (MATLAB)

STFT

STFT Implementation (MATLAB) STFT can be used for the t − f information in signals of

can be used for the t f information in signals of interest (for e.g., audio signal) consists of the DFTs of portions of the time-domain signal

STEPS Read the input signal to be analyzed For e.g., audioread to read audio signal
STEPS
Read the input signal to be analyzed
For e.g., audioread to read audio signal of known sampling frequency f s
[x,fs] = audioread(’file.wav’); ’x’ contains samples & fs sampling frequency
Plot the discrete-time (DT) signal: Duration of DT-signal with N samples = N sec.
f s
t = (0:length(x)-1)/fs; plot(t,x);
Plot the f − domain signal with FFT or freqz:
[H,W] = freqz(x); plot(W,abs(H)); (f in rad/sample)
f = (fs/2)*W/pi; plot(f/1000,abs(H)); (f in Hz)
B. Sainath (BITS, PILANI)
Wavelets
November 16, 2018
10 / 56

x

STFT Implementation (MATLAB):

Waveforms

x STFT Implementation (MATLAB): Waveforms 0.5 0 -0.5 0 Audio signal in time domain 1 2

0.5

0

-0.5

0

Audio signal in time domain

(MATLAB): Waveforms 0.5 0 -0.5 0 Audio signal in time domain 1 2 3 4 t,

1

2

3

4

t, seconds

5

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 11 / 56
November 16, 2018
11 / 56

STFT Implementation (MATLAB):

Waveforms

STFT Implementation (MATLAB): Waveforms 300 250 200 150 100 50 0 0.5 1 1.5 2 2.5
300 250 200 150 100 50 0 0.5 1 1.5 2 2.5 3 f− response
300
250
200
150
100
50
0
0.5
1
1.5
2
2.5
3
f− response magnitude

B. Sainath (BITS, PILANI)

angular frequency, radians/sample

Wavelets

November 16, 2018 12 / 56
November 16, 2018
12 / 56

STFT Implementation (MATLAB):

Waveforms

STFT Implementation (MATLAB): Waveforms 300 250 200 150 100 50 0 5 10 15 20 f−
300 250 200 150 100 50 0 5 10 15 20 f− response magnitude
300
250
200
150
100
50
0
5
10
15
20
f− response magnitude

frequency, KHz

We observe some peaks, which correspond to notes of the audio signal However, difficult to say the time instants of the peaks STFT can address this problem

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 13 / 56
November 16, 2018
13 / 56

STFT Implementation using FFT

STFT Implementation using FFT B. Sainath (BITS, PILANI) Wavelets November 16, 2018 14 / 56
B. Sainath (BITS, PILANI) Wavelets November 16, 2018 14 / 56
B. Sainath (BITS, PILANI)
Wavelets
November 16, 2018
14 / 56

STFT Implementation (MATLAB):

Steps (Contd.,)

STFT Implementation (MATLAB): Steps (Contd.,) Basic idea & step: Consider small portion of samples using a
STFT Implementation (MATLAB): Steps (Contd.,) Basic idea & step: Consider small portion of samples using a

Basic idea & step:

Consider small portion of samples using a window Compute its FFT & place it as the column of a matrix

N = 40*fs/1000; win = hamming(N); F = fft( x(1:N) .* win ); Z = F;

Obtain the next column by sliding the window by ’hop’ samples (called the ’hop-size’)

hop = round(length(win)/4); F = fft( x( hop + (1:N) ) .* win ); Z(:,2) = F;

Similarly,

F = fft( x( 2*hop + (1:N) ) .* win ); Z(:,3) = F;

Continue until you reach the end of the data sequence

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 15 / 56
November 16, 2018
15 / 56

STFT Spectrogram (Magnitude)

STFT Spectrogram (Magnitude) Magnitude of the STFT yields the magnitude spectrogram Squared magnitude of STFT gives
STFT Spectrogram (Magnitude) Magnitude of the STFT yields the magnitude spectrogram Squared magnitude of STFT gives

Magnitude of the STFT yields the magnitude spectrogram Squared magnitude of STFT gives PSD

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 16 / 56
November 16, 2018
16 / 56

Inverse STFT

Inverse STFT STFT is (in general) invertible Methods: Filter bank summation (FBS), overlap-add (OLA) FBS method
Inverse STFT STFT is (in general) invertible Methods: Filter bank summation (FBS), overlap-add (OLA) FBS method

STFT is (in general) invertible

Methods: Filter bank summation (FBS), overlap-add (OLA) FBS method

uses bank of filters STFT viewed as set of outputs from analysis filters

OLA method

Take IFFT for each fixed time in the discrete STFT

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 17 / 56
November 16, 2018
17 / 56

Analysis & Synthesis in STFT

Analysis & Synthesis in STFT Exercise: Assume that v [ n ] is finite & v
Analysis & Synthesis in STFT Exercise: Assume that v [ n ] is finite & v

Exercise: Assume that v [n] is finite & v [n]

= 0, 0 n N 1. Let

k

ω k = 2π N . Show the following:

v[n m]f[m] =

1

N

N1

k=0

Vf [n, k ]e jω k m , for v [0]

= 0

B. Sainath (BITS, PILANI)

f[n] =

1

Nv[0]

N1

k=0

Wavelets

Vf [n, k]e jω k n , for n = m.

November 16, 2018 18 / 56
November 16, 2018
18 / 56

OLA Method

Synthesis equation:

f[n] =

M

v[0]

p=−∞

1

N

N1

k=0

f [ n ] = M v [ 0 ] ∞ p = −∞ 1 √

Vf [pM, k]e jω k n

where M denotes decimation factor Exact synthesis, i.e., g[n] = f [n] is possible when either

analysis window has finite bandwidth with ω c < 2π , or sum of analysis windows obtained by shifting v [n] with M points increments add to constant

M

Exercise: Show the following condition for exact synthesis:

B. Sainath (BITS, PILANI)

p=−∞

Vf [pM − n] = V[0] M Wavelets November 16, 2018 19 / 56
Vf [pM − n] = V[0]
M
Wavelets
November 16, 2018
19 / 56

Applications of STFT

Applications of STFT In those applications where combining t & f domains in one framework is
In those applications where combining t & f domains in one framework is useful Signal
In those applications where combining t & f domains in one framework is
useful
Signal processing of
speech, music, audio
SONAR signal processing, geographical exploration
Image processing

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 20 / 56
November 16, 2018
20 / 56

Limitations of STFT

Limitations of STFT Figure: Source: Wiki Fixed-resolution (therefore,) suits for analyzing processes where all the
Limitations of STFT Figure: Source: Wiki Fixed-resolution (therefore,) suits for analyzing processes where all the

Figure: Source: Wiki

Fixed-resolution (therefore,)

suits for analyzing processes where all the features appear approximately at the same scale

Wider window gives higher frequency resolution (but poor tresolution) Narrower window gives good time resolution (but poor f resolution)

Time-frequency tradeoff!

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 21 / 56
November 16, 2018
21 / 56

Features & Parameters of Wavelets

Features & Parameters of Wavelets Provide good t − resolution for high-frequency events & good f

Provide good tresolution for high-frequency events & good f resolution for low-frequency events suitable for many real-world signals! Wavelets are two parameter family of functions

dilation parameter (scaling) translation parameter (shifting)

B. Sainath (BITS, PILANI) Wavelets November 16, 2018 22 / 56
B. Sainath (BITS, PILANI)
Wavelets
November 16, 2018
22 / 56

Features & Parameters of Wavelets

Stretched wavelet is useful for capturing

B. Sainath (BITS, PILANI)

Wavelets

of Wavelets Stretched wavelet is useful for capturing B. Sainath (BITS, PILANI) Wavelets November 16, 2018
November 16, 2018 23 / 56
November 16, 2018
23 / 56

Features & Parameters of Wavelets

Features & Parameters of Wavelets Stretched wavelet is useful for capturing slowly varying changes Compressed wavelet

Stretched wavelet is useful for capturing slowly varying changes

Compressed wavelet is useful for capturing abrupt changes Shifting: (e.g., Ψ(t k ))

delaying (or) advancing onset of a wavelet along the length of the signal required to align and extract features of the signal

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 23 / 56
November 16, 2018
23 / 56

Wavelet Transforms

Wavelet Transforms Continuous wavelet transform (CWT) Discrete wavelet transform (DWT) Wavelet packet transform

Continuous wavelet transform (CWT) Discrete wavelet transform (DWT) Wavelet packet transform (generalized DWT)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 24 / 56
November 16, 2018
24 / 56

Practice Questions

Practice Questions Based on the concepts covered in class, read the book chapter (by Nawab &

Based on the concepts covered in class, read the book chapter (by Nawab & Quatieri) on STFT (check Nalanda). Questions:

Let f [n] = exp j 2π f d n . Let v [n] denote the analysis window. Determine the discrete-STFT of f [n]. What is the D-STFT when rectangular window is used? Let f [n] = cos 2π f d n . Let v [n] denote the analysis window. Determine the discrete-STFT of f [n]. What is the D-STFT when rectangular window is used? What is the D-STFT if v [n] = δ[n]?

N

N

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 25 / 56
November 16, 2018
25 / 56

Wavelet Concept: An illustration

Wavelet Concept: An illustration Continuous wavelet transform (CWT) computation of WT in smooth continuous manner Discrete
Wavelet Concept: An illustration Continuous wavelet transform (CWT) computation of WT in smooth continuous manner Discrete

Continuous wavelet transform (CWT)

computation of WT in smooth continuous manner

Discrete wavelet transform (DWT)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 26 / 56
November 16, 2018
26 / 56

Wavelet Concept: An illustration

Wavelet Concept: An illustration Continuous wavelet transform (CWT) computation of WT in smooth continuous manner Discrete
Wavelet Concept: An illustration Continuous wavelet transform (CWT) computation of WT in smooth continuous manner Discrete

Continuous wavelet transform (CWT)

computation of WT in smooth continuous manner

Discrete wavelet transform (DWT)

computation of WT in discrete steps

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 26 / 56
November 16, 2018
26 / 56

Wavelet Concept: Location & Scale

Wavelet Concept: Location & Scale Two parameters: translation, scale Imp. Note: change in scale does not
Wavelet Concept: Location & Scale Two parameters: translation, scale Imp. Note: change in scale does not

Two parameters: translation, scale Imp. Note: change in scale does not correspond to shift in frequency

frequency 1/scale

Change in scale compresses or dilates ψ(t) changing temporal concentration

Definitions, concepts & math (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 27 / 56
November 16, 2018
27 / 56

Examples: Haar Wavelet

Examples: Haar Wavelet Figure: https://en.wikipedia.org/wiki/Haar_wavelet Sequence of rescaled square-shaped functions
Examples: Haar Wavelet Figure: https://en.wikipedia.org/wiki/Haar_wavelet Sequence of rescaled square-shaped functions

Sequence of rescaled square-shaped functions

form a wavelet family or basis

Mother wavelet ψ(t) satisfies two conditions: Integrates to zero, unit norm

Check the two conditions (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 28 / 56
November 16, 2018
28 / 56

Examples: Ricker Wavelet (Mexican Hat wavelet)

Examples: Ricker Wavelet (Mexican Hat wavelet) Negative normalized second derivative of a Gaussian function Application:
Examples: Ricker Wavelet (Mexican Hat wavelet) Negative normalized second derivative of a Gaussian function Application:

Negative normalized second derivative of a Gaussian function Application: used to model seismic data

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 29 / 56
November 16, 2018
29 / 56

Remarks on Energy Spread

Remarks on Energy Spread Let ψ ( t ) is centered at t = 0 =

Let ψ(t) is centered at t = 0 =ψ a,b (t) is centered at ?

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 30 / 56
November 16, 2018
30 / 56

Remarks on Energy Spread

Remarks on Energy Spread Let ψ ( t ) is centered at t = 0 =

Let ψ(t) is centered at t = 0 =ψ a,b (t) is centered at ? (t = b)

Write down the expression for energy spread σ 2 (a, b) (in class)

t

Let f 0 be the center frequency of Ψ(f ). Then

center frequency of ψ a,b (f ) is ?

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 30 / 56
November 16, 2018
30 / 56

Remarks on Energy Spread

Remarks on Energy Spread Let ψ ( t ) is centered at t = 0 =

Let ψ(t) is centered at t = 0 =ψ a,b (t) is centered at ? (t = b)

Write down the expression for energy spread σ 2 (a, b) (in class)

t

Let f 0 be the center frequency of Ψ(f ). Then

center frequency of ψ a,b (f ) is ? ( f 0

a )

What is the energy spread about f a 0 ? (in class)

σ 2 (a, b) =

σ 2

f

a 2

f

Time position depends on b alone i.e. on the translation parameter

Frequency position depends on f 0 and a, spread depends on the scale parameter a

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 30 / 56
November 16, 2018
30 / 56

Heisenberg boxes

Heisenberg boxes Figure: Heisenberg boxes representing the energy spread of two wavelets B. Sainath (BITS, PILANI)
Heisenberg boxes Figure: Heisenberg boxes representing the energy spread of two wavelets B. Sainath (BITS, PILANI)

Figure: Heisenberg boxes representing the energy spread of two wavelets

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 31 / 56
November 16, 2018
31 / 56

Continuous Wavelet Transform & Scalogram

Continuous Wavelet Transform & Scalogram Definitions in class Scalogram is analogous to spectrogram in STFT Energy

Definitions in class Scalogram is analogous to spectrogram in STFT

Energy computation from scalogram (in class)

Matlab command for continuous wavelet transform (CWT): cwt

http://in.mathworks.com/help/wavelet/ref/cwt.html wt = cwt(x,wname) uses the analytic wavelet specified by wname to

compute the CWT

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 32 / 56
November 16, 2018
32 / 56

Wavelets & Expansions

Wavelets & Expansions Orthogonality Wavelets (or wavelet basis functions) are localized waveforms whose scaled and

Orthogonality

Wavelets (or wavelet basis functions) are localized waveforms whose scaled and translated versions are all orthogonal to each other

Let x(t) be a finite energy signal

Expansion of x(t) in terms of basis functions (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 33 / 56
November 16, 2018
33 / 56

Inverse Wavelet Transform

Inverse Wavelet Transform Recovery of original signal x ( t ) from its wavelet transform by

Recovery of original signal x (t ) from its wavelet transform by integrating over all scales & locations a and b C g denotes admissibility constant

depends on chosen wavelet math in class

Exercise For Mexican hat wavelet show that C g = π

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 34 / 56
November 16, 2018
34 / 56

Complex Wavelets

Complex Wavelets Requirement: Fourier transform is zero for negative frequencies E.g., Morlet wavelet or Gabor wavelet

Requirement: Fourier transform is zero for negative frequencies

E.g., Morlet wavelet or Gabor wavelet (details in class) Application

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 35 / 56
November 16, 2018
35 / 56

Complex Wavelets

Complex Wavelets Requirement: Fourier transform is zero for negative frequencies E.g., Morlet wavelet or Gabor wavelet

Requirement: Fourier transform is zero for negative frequencies

E.g., Morlet wavelet or Gabor wavelet (details in class) Application

Using complex wavelets, we can separate magnitude & phase components within a signal

Magnitude & phase of CWT using complex wavelet (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 35 / 56
November 16, 2018
35 / 56

Expansion using Wavelet Basis

Expansion using Wavelet Basis By choosing orthonormal wavelet basis & using wavelet coefficients we can reconstruct

By choosing orthonormal wavelet basis & using wavelet coefficients we can reconstruct the original signal

Express f (t) in terms of basis & coefficients (in class)

Computation of energy & Parseval’s theorem (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 36 / 56
November 16, 2018
36 / 56

Multiresolution Analysis (MRA)

Multiresolution Analysis (MRA) Any finite energy signal can be decomposed in an orthonormal wavelet basis Note

Any finite energy signal can be decomposed in an orthonormal wavelet basis Note that scale 1/resolution & v.v

Finer (smaller) scale =higher (larger) resolution

Need for multiresolution

allows to process important & relevant details for a specific task

Application: Multiresolution image analysis

facilitates advanced tasks such as image restoration, segmentation, object recognition

Math details (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 37 / 56
November 16, 2018
37 / 56

Analysis at Scale 2 m

Analysis at Scale 2 − m Consider scale 2 − m Compute local averages of f
Analysis at Scale 2 − m Consider scale 2 − m Compute local averages of f

Consider scale 2 m

Compute local averages of f (t) at positions {k × 2 m }, k ∈ Z over intervals of width 2 m

Illustration of f (t) (in class)

MRA: Analysis of f (t) over embedded grids of approximation

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 38 / 56
November 16, 2018
38 / 56

Scaling Function & Coefficients

Scaling Function & Coefficients Discrete dyadic grid wavelet lends itself to fast computer algorithm Scaling function

Discrete dyadic grid wavelet lends itself to fast computer algorithm Scaling function

Used in discrete wavelet transform

Notations/definitions in class φ(t) is called father scaling function

Integrates to one

Orthogonality

Scaling function is orthogonal to translations of itself but not dilations of itself

From Wavelet function, get wavelet coefficients

From Scaling function, get scaling coefficients

Together, we get DWT coefficients

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 39 / 56
November 16, 2018
39 / 56

Discretized CWT versus DWT

Discretized approximate CWT

B. Sainath (BITS, PILANI)

Wavelets

Discretized CWT versus DWT Discretized approximate CWT B. Sainath (BITS, PILANI) Wavelets November 16, 2018 40
November 16, 2018 40 / 56
November 16, 2018
40 / 56

Discretized CWT versus DWT

Discretized approximate CWT

Discretized CWT versus DWT Discretized approximate CWT required for practical implementation Involve a discrete

required for practical implementation Involve a discrete approximation of the transform integral (summation) computed on discrete grid of a scales & b locations Accuracy of approximation depends on resolution of discretization

Discrete wavelet transform

Transform integral remains continuous but determined only on a dyadic grid of scales & locations

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 40 / 56
November 16, 2018
40 / 56

f (t) Representation

f ( t ) Representation Represent f ( t ) using combined series approximation coefficients &

Represent f (t) using combined series approximation coefficients & wavelet (detail) coefficients (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 41 / 56
November 16, 2018
41 / 56

Haar Wavelet Scaling Function

Haar Wavelet Scaling Function φ ( t ) = c 0 φ ( 2 t )
Haar Wavelet Scaling Function φ ( t ) = c 0 φ ( 2 t )

φ(t) = c 0 φ(2t) + c 1 φ(2t 1) Scaling coefficients c 0 = c 1 = 1 (proof in class) Consider wavelets of finite support Wavelet function in terms of scaling function (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 42 / 56
November 16, 2018
42 / 56

Wavelet Equation

Wavelet Equation Wavelet equation (in terms of scaling function) ψ ( t ) = ( −

Wavelet equation (in terms of scaling function)

ψ(t) = (1) k c 1k φ(2t k)

k

For finite number of scaling coefficients 0, N k 1, N k N

ψ(t) = (1) k c N k 1k φ(2t k)

k

Recall Haar scaling function: φ(t) = φ(2t) + φ(2t 1) =Haar wavelet function

ψ(t) = φ(2t) φ(2t 1)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 43 / 56
November 16, 2018
43 / 56

Use of φ(t) & ψ(t)

Use of φ ( t ) & ψ ( t ) Using scaling function φ (

Using scaling function φ(t) & wavelet function ψ(t), we have

f(t) =

n=−∞

c(n) φ(t n) +

m0 n=−∞

d m (n) 2 m ψ(2 m t n)

2

φ(t n) denote set of scaling functions (orthonormal basis) 2 m ψ(2 m t n) denote set of wavelet functions (orthonormal basis) c(n) are the scaling coefficients

2

c(n) =< f, φ(t n) >

d m (n) are the wavelet coefficients

d m (n) =< f, 2 m ψ(2 m t n) >

2

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 44 / 56
November 16, 2018
44 / 56

Discrete Wavelet Transform (DWT)

Discrete Wavelet Transform (DWT) Generally, we can start at any scale 2 m 0 = ⇒

Generally, we can start at any scale 2 m 0 =

f(t) =

n=−∞

c m 0 (n) 2 m 0 φ(2

2

m

0

t n) +

n=−∞ m=m 0

d m (n) 2 m ψ(2 m t n)

2

c m 0 (n) low-resolution (coarse scale) approximation coefficients d m (n) high-resolution (detailed) coefficients

{c m 0 (n)} n & {d m (n)} mm 0 ,n form DWT of f (t) Haar scaling function approximation (in class)

c m (n) f(n2 m )

Scaling coefficients are approximately equal to signal samples at with duration

2 m

Q What is the sampling frequency?

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 45 / 56
November 16, 2018
45 / 56

Discrete Wavelet Transform (DWT)

Discrete Wavelet Transform (DWT) Generally, we can start at any scale 2 m 0 = ⇒

Generally, we can start at any scale 2 m 0 =

f(t) =

n=−∞

c m 0 (n) 2 m 0 φ(2

2

m

0

t n) +

n=−∞ m=m 0

d m (n) 2 m ψ(2 m t n)

2

c m 0 (n) low-resolution (coarse scale) approximation coefficients d m (n) high-resolution (detailed) coefficients

{c m 0 (n)} n & {d m (n)} mm 0 ,n form DWT of f (t) Haar scaling function approximation (in class)

c m (n) f(n2 m )

Scaling coefficients are approximately equal to signal samples at with duration

2 m

Q What is the sampling frequency? Ans. f s = 2 m , ω s = 2π2 m

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 45 / 56
November 16, 2018
45 / 56

DWT Computation

DWT Computation Mallat’s fast wavelet transform Assume an initial set of scaling coefficients { c m

Mallat’s fast wavelet transform

Assume an initial set of scaling coefficients {c m (n)} n representing an approximation to a signal

Let {h[n]} n denote impulse responses of lowpass (scaling) filters

Let {h 1 [n] = (1) n h[1 n]} n denote impulse responses of highpass (wavelet) filters

Compute recursively the wavelet coefficients & the scaling coefficients at coarser scale using scaling filter (lowpass) & wavelet filter (highpass)

B. Sainath (BITS, PILANI)

c m (n) =< f, 2 m φ(2 m t n) >

2

= h[n 2k] c m+1 (n)

n

d m (n) =< f, 2 m ψ(2 m t n) >

2

= h 1 [n 2k] c m+1 (n)

n

Wavelets

November 16, 2018

46 / 56

(FWT Contd.,) Decimation in FWT

(FWT Contd.,) Decimation in FWT The filters are shifted by 2k (rather than k) so that

The filters are shifted by 2k (rather than k) so that only even indexed terms (at filter o/ps) are retained

Eliminates redundant information

With these coefficients (computed using simple digital filters), we can recover P V m f (finite sum approximation to finite-time f (t)!) =New world of DSP!

Instead of processing signal samples, we can analyze & process a signal using its DWT

Haar analysis example (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 47 / 56
November 16, 2018
47 / 56

Signal Filtering

Signal Filtering Let Vf m , n denote approximation (scaling) coefficients Let Wf m , n

Let Vf m,n denote approximation (scaling) coefficients

Let Wf m,n denote detailed (wavelet) coefficients

Scheme for filtering of approximation coefficients to produce approximate & detailed coefficients at successive scales (in class)

Scheme for filtering of approximation & detailed coefficients to produce approximate coefficients at successive scales (in class) =subband coding scheme!

LPF & HPF together known as QMF

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 48 / 56
November 16, 2018
48 / 56

Key Theorem

Key Theorem Theorem Let {φ(t − n), n ∈ Z} denote an orthonormal basis and φ(t)
Theorem Let {φ(t − n), n ∈ Z} denote an orthonormal basis and φ(t) denotes
Theorem
Let {φ(t − n), n ∈ Z} denote an orthonormal basis and φ(t) denotes
orthonormal scaling function. Then, to ensure a valid multiresolution
analysis, the sequence
h[n] =< φ(t), √ 2 φ(2t − n) >
must satisfy
|H(ω)| 2 + |H(ω + π)| 2
= 2,
ω ∈ [0, 2π)
H(0) = √ 2
B. Sainath (BITS, PILANI)
Wavelets
November 16, 2018
49 / 56

Daubechies Wavelets

Daubechies Wavelets Based on the work of Ingrid Daubechies Family of orthogonal wavelets defining a discrete

Based on the work of Ingrid Daubechies

Family of orthogonal wavelets defining a discrete wavelet transform

Characterized by a maximal number of vanishing moments for some compact support

Discrete wavelets of which Haar wavelet (D2) is the simplest

Scaling functions associated with these wavelets satisfy the following conditions:

k

k

c k = 2

c k c k+2k =

2,

0,

if k = 0, otherwise.

N k denotes finite number of scaling coefficients =compact support

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 50 / 56
November 16, 2018
50 / 56

Vanishing Moments

Vanishing Moments Smoothness of the wavelet is associated with a moment condition: N k − 1

Smoothness of the wavelet is associated with a moment condition:

N k 1

k=0

(1) k c k k m = 0,

where m = 0, 1,

, N k 1

2

=

N k vanishing moments

2

suppressing parts of the signal which are polynomial up to degree N k

2

1

Examples: DB2, DB4, DB6 so on Determine the 4 scaling coefficients c 0 , c 1 , c 2 , c 3 of DB4 (in class)

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 51 / 56
November 16, 2018
51 / 56

Wavelet Packets (Adaptive Transforms)

Wavelet Packets (Adaptive Transforms) Generalization of DWT Wavelet packets involve particular linear combinations of

Generalization of DWT Wavelet packets involve particular linear combinations of wavelets Wavelet packet signal decomposition

Both approximate & detailed coefficients further decomposed at each level

WPD: Wavelet transform where DT signal is passed through more filters than the DWT

where DT signal is passed through more filters than the DWT Figure: WPD over 3 levels.

Figure: WPD over 3 levels. g[n]: LP approximation coefficients & h[n]: HP detailed coefficients

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 52 / 56
November 16, 2018
52 / 56

References & Further Reading

References & Further Reading Wavelets and subband coding by Vetterli & Kovacevic Wavelet tour of signal

Wavelets and subband coding by Vetterli & Kovacevic

Wavelet tour of signal processing by Mallat

The Illustrated wavelet transform handbook by Paul Addison

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 53 / 56
November 16, 2018
53 / 56

Practice Questions (PQs)/Problems

Practice Questions (PQs)/Problems Refer to class notes for PQs/problems. Find additional PQs below Q.1. Determine

Refer to class notes for PQs/problems. Find additional PQs below

Q.1. Determine scaling coefficients of DB6 wavelet. You may use MATLAB. Check the conditions. Determine the scaling and the wavelet functions.

Q.2. Consider a continuous-time signal f (t), which is sampled at a rate T = 1 M , M > 0 seconds/sample, for 1 second. Assume that M is very large. Prove the following:

2

f(n2 M ) c M (k),

P V M f f(n2 M )φ(2 M t n)

n

Note: Most of the part proved in class.

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 54 / 56
November 16, 2018
54 / 56

Practice Questions (PQs)/Problems

Practice Questions (PQs)/Problems Q.3. Operational complexity of DWT: Assume that we give N k coefficients as

Q.3. Operational complexity of DWT:Assume that we give N k coefficients as input to filter of finite length L. Suppose that single stage filter bank is used to obtain approximate and detail coefficients of successive scale, answer the following:

Number of floating point operations required for the single stage Hint:

Convolution requires approximately LN k

2

operations

How many operations will be performed a multi-stage (or level) filter bank? Derive upper bound for the number of operations Comment on the computational complexity

Q.4. Let x(t) = n x[n]sinc(t n). Let h[n] = sinc(t) φ(t)| t=n . Determine < x(t), φ(t k ) > & its DTFT. Comment on < x(t), φ(t k) >

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 55 / 56
November 16, 2018
55 / 56

Practice Questions (PQs)/Problems

Practice Questions (PQs)/Problems Q.5. Let φ ( t ) denote the father scaling function & ψ

Q.5. Let φ(t) denote the father scaling function & ψ(t) denote the mother wavelet of DB2. Determine

−∞

φ(t)ψ(t) dt

Q.6. Express DB4 scaling coefficients in terms of angle ψ. Does any value of ψ produces useful wavelet? Justify your answer

Q.7. Draw a schematic of input-system-output view point of continuous wavelet transform & compare with STFT (in t & f domains)

Identify the wavelet defined by the following equation & determine its spectrum

ψ(t) = {e (jt) 2

2

e j5t }

Q.8. Determine the magnitude spectrum of Haar Mother wavelet & sketch in MATLAB

B. Sainath (BITS, PILANI)

Wavelets

November 16, 2018 56 / 56
November 16, 2018
56 / 56

Detection & Estimation: Fundamentals & Applications

B. Sainath

sainath.bitragunta@pilani.bits-pilani.ac.in

B. Sainath sainath.bitragunta@pilani.bits-pilani.ac.in Department of Electrical and Electronics Engineering Birla

Department of Electrical and Electronics Engineering Birla Institute of Technology and Science, Pilani

B. Sainath (BITS, PILANI)

December 2, 2018

Detection & Estimation

December 2, 2018 1 / 30
December 2, 2018
1 / 30

Outline

1 Introduction & Motivation

2 Detection Theory

3 Rules, Problems & Solutions

4 Estimation Theory

5 Types of Estimators

6 Textbooks & References

B. Sainath (BITS, PILANI)

Detection & Estimation

of Estimators 6 Textbooks & References B. Sainath (BITS, PILANI) Detection & Estimation December 2, 2018
December 2, 2018 2 / 30
December 2, 2018
2 / 30