Advanced signal processing
This presentation is the property of its rightful owner.
Sponsored Links
1 / 62

Advanced signal processing Dr. Mohamad KAHLIL Islamic University of Lebanon PowerPoint PPT Presentation


  • 63 Views
  • Uploaded on
  • Presentation posted in: General

Advanced signal processing Dr. Mohamad KAHLIL Islamic University of Lebanon. Chapter 4: Time frequency and wavelet analysis. Definition Time frequency Shift time fourier transform Winer-ville representations and others Wavelet transform Scalogram Continuous wavelet transform

Download Presentation

Advanced signal processing Dr. Mohamad KAHLIL Islamic University of Lebanon

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Advanced signal processing dr mohamad kahlil islamic university of lebanon

Advanced signal processing

Dr. Mohamad KAHLIL

Islamic University of Lebanon


Chapter 4 time frequency and wavelet analysis

Chapter 4: Time frequency and wavelet analysis

  • Definition

  • Time frequency

    • Shift time fourier transform

    • Winer-ville representations and others

  • Wavelet transform

    • Scalogram

    • Continuous wavelet transform

    • Discrete wavelet transform: details and approximations

    • applications


Advanced signal processing dr mohamad kahlil islamic university of lebanon

The Story of WaveletsTheory and Engineering Applications

  • Time frequency representation

  • Instantaneous frequency and group delay

  • Short time Fourier transform –Analysis

  • Short time Fourier transform – Synthesis

  • Discrete time STFT


Advanced signal processing dr mohamad kahlil islamic university of lebanon

Signal processing

Signal Processing

Freq.-domain techniques

Time-domain techniques

TF domain techniques

Fourier T.

Filters

Stationary Signals

Non/Stationary Signals

STFT

WAVELET TRANSFORMS

Applications

Denoising

Compression

Signal Analysis

Disc. Detection

BME / NDE

Other…

2-D DWT

SWT

CWT

DWT

MRA


Ft at work

FT At Work


Ft at work1

FT At Work

F

F

F


Ft at work2

FT At Work

F


Stationary and non stationary signals

Stationary and Non-stationary Signals

  • FT identifies all spectral components present in the signal, however it does not provide any information regarding the temporal (time) localization of these components. Why?

  • Stationary signals consist of spectral components that do not change in time

    • all spectral components exist at all times

    • no need to know any time information

    • FT works well for stationary signals

  • However, non-stationary signals consists of time varying spectral components

    • How do we find out which spectral component appears when?

    • FT only provides what spectral components exist , not where in time they are located.

    • Need some other ways to determine time localization of spectral components


Stationary and non stationary signals1

Stationary and Non-stationary Signals

  • Stationary signals’ spectral characteristics do not change with time

  • Non-stationary signals have time varying spectra

Concatenation


Non stationary signals

Non-stationary Signals

50 Hz

20 Hz

5 Hz

Perfect knowledge of what

frequencies exist, but no

information about where

these frequencies are

located in time


Ft shortcomings

FT Shortcomings

  • Complex exponentials stretch out to infinity in time

    • They analyze the signal globally, not locally

    • Hence, FT can only tell what frequencies exist in the entire signal, but cannot tell, at what time instances these frequencies occur

    • In order to obtain time localization of the spectral components, the signal need to be analyzed locally

    • HOW ?


Short time fourier transform stft

Short Time Fourier Transform(STFT)

  • Choose a window function of finite length

  • Put the window on top of the signal at t=0

  • Truncate the signal using this window

  • Compute the FT of the truncated signal, save.

  • Slide the window to the right by a small amount

  • Go to step 3, until window reaches the end of the signal

  • For each time location where the window is centered, we obtain a different FT

    • Hence, each FT provides the spectral information of a separate time-slice of the signal, providing simultaneous time and frequency information


Advanced signal processing dr mohamad kahlil islamic university of lebanon

STFT


Advanced signal processing dr mohamad kahlil islamic university of lebanon

STFT

Frequency

parameter

Time

parameter

Signal to

be analyzed

FT Kernel

(basis function)

STFT of signal x(t):

Computed for each

window centered at t=t’

Windowing

function

Windowing function

centered at t=t’


Stft at work

STFT at Work

Windowed

sinusoid allows

FT to be

computed only

through the

support of the

windowing

function

1

1

0.5

0.5

0

0

-0.5

-0.5

-1

-1

-1.5

-1.5

0

100

200

300

0

100

200

300

1

1

0.5

0.5

0

0

-0.5

-0.5

-1

-1

-1.5

-1.5

0

100

200

300

0

100

200

300


Advanced signal processing dr mohamad kahlil islamic university of lebanon

STFT

  • STFT provides the time information by computing a different FTs for consecutive time intervals, and then putting them together

    • Time-Frequency Representation (TFR)

    • Maps 1-D time domain signals to 2-D time-frequency signals

  • Consecutive time intervals of the signal are obtained by truncating the signal using a sliding windowing function

  • How to choose the windowing function?

    • What shape? Rectangular, Gaussian, Elliptic…?

    • How wide?

      • Wider window require less time steps  low time resolution

      • Also, window should be narrow enough to make sure that the portion of the signal falling within the window is stationary

      • Can we choose an arbitrarily narrow window…?


Selection of stft window

Selection of STFT Window

Two extreme cases:

  • W(t) infinitely long:  STFT turns into FT, providing excellent frequency information (good frequency resolution), but no time information

  • W(t) infinitely short:

     STFT then gives the time signal back, with a phase factor. Excellent time information (good time resolution), but no frequency information

    Wide analysis window poor time resolution, good frequency resolution

    Narrow analysis windowgood time resolution, poor frequency resolution

    Once the window is chosen, the resolution is set for both time and frequency.


Heisenberg principle

Heisenberg Principle

Frequency resolution: How well two spectral components can be separated from each other in the transform domain

Time resolution: How well two spikes in time can be separated from each other in the transform domain

Both time and frequency resolutions cannot be arbitrarily high!!! We cannot precisely know at what time instance a frequency component is located. We can only know what interval of frequencies are present in which time intervals

http://engineering.rowan.edu/~polikar/WAVELETS/WTpart2.html


Advanced signal processing dr mohamad kahlil islamic university of lebanon

STFT

Amplitude

…..

…..

time

t0

t1

tk

tk+1

tn

…..

…..

Frequency


The short time fourier transform

The Short Time Fourier Transform

  • Take FT of segmented consecutive pieces of a signal.

  • Each FT then provides the spectral content of that time segment only

    • Spectral content for different time intervals

    • Time-frequency representation

Time

parameter

Signal to

be analyzed

FT Kernel

(basis function)

Frequency

parameter

STFT of signal x(t):

Computed for each

window centered at t=

(localized spectrum)

Windowing

function

(Analysis window)

Windowing function

centered at t=


Properties of stft

Properties of STFT

  • Linear

  • Complex valued

  • Time invariant

  • Time shift

  • Frequency shift

  • Many other properties of the FT also apply.


Alternate representation of stft

Alternate Representation of STFT

STFT : The inverse FT of the windowed spectrum,

with a phase factor


Filter interpretation of stft

Filter Interpretation of STFT

X(t) is passed through a bandpass filter with a center frequency of

Note that (f) itself is a lowpass filter.


Filter interpretation of stft1

x(t)

X

Filter Interpretation of STFT

X

x(t)


Resolution issues

Resolution Issues

All signal attributes located within the local window interval

around “t” will appear at “t” in the STFT

Amplitude

time

n

k

Frequency


Time frequency resolution

Time-Frequency Resolution

  • Closely related to the choice of analysis window

    • Narrow window  good time resolution

    • Wide window (narrow band)  good frequency resolution

  • Two extreme cases:

    • (T)=(t) excellent time resolution, no frequency resolution

    • (T)=1 excellent freq. resolution (FT), no time info!!!

    • How to choose the window length?

  • Window length defines the time and frequency resolutions

  • Heisenberg’s inequality

    • Cannot have arbitrarily good time and frequency resolutions. One must trade one for the other. Their product is bounded from below.


Time frequency resolution1

Time-Frequency Resolution

Frequency

Time


Time frequency signal expansion and stft synthesis

Time Frequency Signal Expansion and STFT Synthesis

Basis functions

Coefficients

(weights)

Synthesis window

Synthesized signal

  • Each (2D) point on the STFT plane shows how strongly a time

  • frequency point (t,f) contributes to the signal.

  • Typically, analysis and synthesis windows are chosen to be identical.


Stft example

STFT Example

300 Hz 200 Hz 100Hz 50Hz


Advanced signal processing dr mohamad kahlil islamic university of lebanon

STFT Example


Advanced signal processing dr mohamad kahlil islamic university of lebanon

STFT Example

a=0.01


Advanced signal processing dr mohamad kahlil islamic university of lebanon

STFT Example

a=0.001


Advanced signal processing dr mohamad kahlil islamic university of lebanon

STFT Example

a=0.0001


Advanced signal processing dr mohamad kahlil islamic university of lebanon

STFT Example

a=0.00001


Discrete time stft

Discrete Time Stft


Advanced signal processing dr mohamad kahlil islamic university of lebanon

The Story of WaveletsTheory and Engineering Applications

  • Time – frequency resolution problem

  • Concepts of scale and translation

  • The mother of all oscillatory little basis functions…

  • The continuous wavelet transform

  • Filter interpretation of wavelet transform

  • Constant Q filters


Time frequency resolution2

Time – Frequency Resolution

  • Time – frequency resolution problem with STFT

    • Analysis window dictates both time and frequency resolutions, once and for all

    • Narrow window  Good time resolution

    • Narrow band (wide window)  Good frequency resolution

  • When do we need good time resolution, when do we need good frequency resolution?


Scale translation

Scale & Translation

  • Translation  time shift

  • f(t) f(a.t) a>0

    • If 0<a<1 dilation, expansion  lower frequency

    • If a>1  contraction  higher frequency

  • f(t)f(t/a) a>0

    • If 0<a<1  contraction  low scale (high frequency)

    • If a>1  dilation, expansion  large scale (lower frequency)

  • Scaling  Similar meaning of scale in maps

    • Large scale: Overall view, long term behavior

    • Small scale: Detail view, local behavior


The mother of all oscillatory little basis functions

The Mother of All Oscillatory Little Basis Functions

  • The kernel functions used in Wavelet transform are all obtained from one prototype function, by scaling and translating the prototype function.

  • This prototype is called the mother wavelet

Translation

parameter

Scale parameter

Normalization factor to ensure that allwavelets have the same energy


Continuous wavelet transform

Continuous Wavelet Transform

translation

Mother wavelet

Normalization factor

Scaling:

Changes the support of the wavelet based on the scale (frequency)

CWT of x(t) at scale

a and translation b

Note: low scale  high frequency


Computation of cwt

Computation of CWT

Amplitude

Amplitude

bN

b0

time

b0

bN

time

Amplitude

Amplitude

bN

b0

b0

bN

time

time


Advanced signal processing dr mohamad kahlil islamic university of lebanon

WT at Work

High frequency (small scale)

Low frequency (large scale)


Why wavelet

Why Wavelet?

  • We require that the wavelet functions, at a minimum, satisfy the following:

Wave…

…let


The cwt as a correlation

The CWT as a Correlation

  • Recall that in the L2 space an inner product is defined as

    then

    Cross correlation:

    then


The cwt as a correlation1

The CWT as a Correlation

  • Meaning of life:

    W(a,b) is the cross correlation of the signal x(t) with the mother wavelet at scale a, at the lag of b. If x(t) is similar to the mother wavelet at this scale and lag, then W(a,b) will be large.

wavelets


Filtering interpretation of wavelet transform

Filtering Interpretation of Wavelet Transform

  • Recall that for a given system h[n], y[n]=x[n]*h[n]

  • Observe that

  • Interpretation:For any given scale a (frequency ~ 1/a), the CWT W(a,b) is the output of the filter with the impulse response to the input x(b), i.e., we have a continuum of filters, parameterized by the scale factor a.


What do wavelets look like

What do Wavelets Look Like???

  • Mexican Hat Wavelet

  • Haar Wavelet

  • Morlet Wavelet


Constant q filtering

Constant Q Filtering

  • A special property of the filters defined by the mother wavelet is that they are –so called – constant Q filters.

  • Q Factor:

  • We observe that the filters defined by the mother wavelet increase their bandwidth, as the scale is reduced (center frequency is increased)

w (rad/s)


Constant q

B

B

B

B

B

B

B

Constant Q

STFT

f0 2f0 3f0 4f0 5f0 6f0

2B

4B

8B

CWT

f0 2f0 4f0 8f0


Inverse cwt

Inverse CWT

provided that


Properties of continuous wavelet transform

Properties of Continuous Wavelet Transform

  • Linearity

  • Translation

  • Scaling

  • Wavelet shifting

  • Wavelet scaling

  • Linear combination of wavelets


Example

Example


Example1

Example


Example2

Example


Spectrogram scalogram

Spectrogram & Scalogram

  • Spectrogram is the square magnitude of the STFT, which provides the distribution of the energy of the signal in the time-frequency plane.

  • Similarly, scalogram is the square magnitude of the CWT, and provides the energy distribution of the signal in the time-scale plane:


Energy

Energy

  • It can be shown that which implies that the energy of the signal is the same whether you are in the original time domain or the scale-translation space. Compare this the Parseval’s theorem regarding the Fourier transform.


Cwt in terms of frequency

CWT in Terms of Frequency

  • Time-frequency version of the CWT can also be defined, though note that this form is not standard,where  is the mother wavelet, which itself is a bandpass function centered at t=0 in time and f=f0in frequency. That is f0is the center frequency of the mother wavelet.

  • The original CWT expression can be obtained simply by using the substitution a=f0 / f and b=

  • In Matlab, you can obtain the “pseudo frequency” corresponding to any given scale by where fsis the sampling rate and Ts is the sampling period.


Discretization of time scale parameters

Discretization of Time & Scale Parameters

  • Recall that, if we use orthonormal basis functions as our mother wavelets, then we can reconstruct the original signal by

  • where W(a,b) is the CWT of x(t)

  • Q: Can we discretize the mother wavelet a,b(t) in such a way that a finite number of such discrete wavelets can still form an orthonormal basis (which in turnallows us to reconstruct the original signal)? If yes, how often do we need to sample the translation and scale parameters to be able to reconstruct the signal?

  • A: Yes, but it depends on the choice of the wavelet!


Dyadic grid

Dyadic Grid

  • Note that, we do not have to use a uniform sampling rate for the translation parameters, since we do not need as high time sampling rate when the scale is high (low frequency).

  • Let’s consider the following sampling grid:

b

where a is sampled on a log scale, and b is sampled at a higher rate when a is small,that is,

where a0 and b0 are constants,and j,k are integers.

log a


Dyadic grid1

Dyadic Grid

  • If we use this discretization, we obtain,

  • A common choice for a0 and b0 are a0 = 2 and b0 = 1, which lend themselves to dyadic sampling grid

  • Then, the discret(ized) wavelet transform (DWT) pair can be given as

Inverse DWT

DWT


Note that

Note that…

  • We have only discretized translation and scale parameters, a and b; time has not been discretized yet.

  • Sampling steps of b depend on a. This makes sense, since we do not need as many samples at high scales (low frequencies)

  • For small a0, say close to 1, and for small b0, say close to zero, we obtain a very fine sampling grid, in which case, the reconstruction formula is very similar to that of CWT

  • For dense sampling, we need not place heavy restriction on (t) to be able reconstruct x(t), whereas sparse sampling puts heavy restrictions on (t).

  • It turns out that a0 = 2 and b0 = 1 (dyadic / octave sampling)provides a nice trade-off. For this selection, many orthonormal basis functions (to be used as mother wavelets) are available.


Discrete wavelet transform

Discrete Wavelet Transform

  • We have computed a discretized version of the CWT, however, we still cannot implement the given DWT as it includes a continuous time signal integrated over all times.

  • We will later see that the dyadic grid selection will allow us to compute a truly discrete wavelet transform of a given discrete time signal.


  • Login