WaveletTransform

Review of Fourier Analysis

Visualizing Fourier Transform

But what is the Fourier Transform? A visual introduction. - YouTube

Fourier Analysis Lectures

Lecture series by Steve Brunton

Fourier Analysis - YouTube

Background

Inner Product in Hilbert Space

Orthogonal basis functions

Fourier Series

From Fourier Series to Wavelet Functions

Fourier Transformation


Wavelet Decomposition

Wavelet Introduction

Basics of Wavelet

Watch this video for understanding Wavelet transform concept

Wavelets and Multiresolution Analysis - YouTube

Mathematics of Wavelet Transform for Beginners

The Wavelet Transform for Beginners - YouTube

You need to Review Fourier Transform and Short-Time Fourier Transform.

Click here for Review Fourier Transform

Limitation of STFT

  • Window Function is Finite, so Frequency Resolution decreases.

  • Fixed length of the window: time and frequency resolution are fixed for entire signals

  • Narrow Window: Good Time Resolution, Poor Frequency Resolution

  • Wide Window: Poor Time Resolution, Good Frequency Resolution

Wavelet Transform

Can analyze different Frequency at different Resolution

  • High frequency signals: apply narrow window

  • Low frequency signals: apply wide window

Wavelet acts as a scalable and movable window function

  • Scaling s

  • Translation tau

Different types of wavelets

  • Haar, Daubiche, Gaussian, Inverse Mexican Hat etc

Discrete Wavelet Transform

Wavelet transform calculates wavelet coefficients at every possible scale.

  • This gives a large data

  • So, use finite numbers of s and \tau

  • Choose s and \tau based on powers of two for efficient calculation

Multilevel Decomposition

1D Wavelet Decomposition

  • Algorithms

MATLAB example

wavedec()

  • **[c,l] = wavedec(x,n,wname) **returns the wavelet decomposition of the 1-D signal x at level n using the wavelet wname.

  • MATLAB documentation

    Dowload Example Code

Download MATLAB example code

[c,l] = wavedec(x,n,wname) returns the wavelet decomposition of the 1-D signal x at level n using the wavelet wname. The output decomposition structure consists of the wavelet decomposition vector c and the bookkeeping vector l, which contains the number of coefficients by level.

load sumsin 
plot(sumsin)
title('Signal')

Perform a 3-level wavelet decomposition of the signal using the order 2 Daubechies wavelet. Extract the coarse scale approximation coefficients and the detail coefficients from the decomposition.

  • A = appcoef(C,L,wname) returns the approximation coefficients at the coarsest scale using the wavelet decomposition structure [C,L] of a 1-D signal

  • D = detcoef(C,L,N) extracts the detail coefficients at the level or levels specified by N.

[c,l] = wavedec(sumsin,3,'db2');
approx = appcoef(c,l,'db2');
[cd1,cd2,cd3] = detcoef(c,l,[1 2 3]);
Plot the coefficients.
figure
subplot(4,1,1)
plot(approx)
title('Approximation Coefficients')
subplot(4,1,2)
plot(cd3)
title('Level 3 Detail Coefficients')
subplot(4,1,3)
plot(cd2)
title('Level 2 Detail Coefficients')
subplot(4,1,4)
plot(cd1)
title('Level 1 Detail Coefficients')

2D Wavelet Decomposition

../_images/plot_mallat_2d.png

It can be seen that many of the coefficients are near zero (gray). This ability of the wavelet transform to sparsely represent natural images is a key property that makes it desirable in applications such as image compression and restoration.

  • For subsequent levels of decomposition, only the approximation coefficients (the lowpass subband) are further decomposed.

  • The top row indicates the coefficient names as used by wavedec2() after each level of decomposition. The bottom row shows wavelet coefficients for the camerman image (with each subband independently normalized for easier visualization).

Application

  1. Image Compression using Wavelet

Exercise


Analytical Signal and Hilbert Transform

Analytical Signal and Hilbert Transformation

https://www.gaussianwaves.com/2017/04/analytic-signal-hilbert-transform-and-fft/

Analytical Signal

Continuous Analytical Signal

The analytic signal is complex-valued but its spectrum will be one-sided (only positive frequencies) that preserved the spectral content of the original real-valued signal.

Figure 1: (a) Spectrum of continuous signal x(t) and (b) spectrum of analytic signal z(t)

How to get one-sided Magnitude spectrum?

  • Frequency domain approach

    • The one-sided spectrum of $z(t)$ is formed from the two-sided spectrum of the real-valued signal $x(t)$ by applying

      Z(f)={  X(0)for  f=02X(f)for  f>0      0for  f<0Z(f) = \begin{cases} \;X(0) & for \; f=0 \\ 2X(f) & for \; f>0 \\ \;\;\;0 & for \; f<0 \end{cases}
  • Time domain approach

    • Using Hilbert transform approach

z(t)=zr(t)+jzi(t)=x(t)+jHTx(t)z(t)=zr(t)+jzi(t)=x(t)+jHTx(t)

One of the important property of an analytic signal is that its real and imaginary components are orthogonal

zi(t)zr(t)=0\displaystyle{\int_{-\infty}^{\infty} z_i(t) z_r(t) = 0}

Discrete Analytical Signal

Discrete-Time Fourier Transform (DTFT).

X(f)=Tn=0N1x[n]ej2πfnTX(f) = \displaystyle{ T \sum_{n=0}^{N-1} x[n] e^{-j 2 \pi f n T} }

The analytic signal is complex valued

z[n]=zr[n]+jzi[n]z[n] = z_r[n] + j z_i[n]

and should satisfy the following two desired properties

  • The real part of the analytic signal should be same as the original real-valued signal.

    zr[n]=x[n]z_r[n] = x[n]
  • The real and imaginary part of the analytic signal should satisfy the following property of orthogonality

n=0N1zr[n]zi[n]=0\displaystyle{ \sum_{n=0}^{N-1} z_r[n] z_i[n] = 0 }

Given a record of samples x[n] of even length N, the procedure to construct the analytic signal z[n] is as follows.

This method satisfies both the desired properties listed above.

  • Compute the N-point DTFT of x[n] using FFT

  • N-point periodic one-sided analytic signal is computed by the following transform

Compute the N-point DTFT of x[n] using FFT ● N-point periodic one-sided analytic signal is computed by the following transform

equation for constructing analytic signal in frequency domain

  • Finally, the analytic signal (z[n]) is obtained by taking the inverse DTFT of

z[n]=1NTm=0N1z[m]  exp(j2πmn/N)z[n] = \displaystyle{ \frac{1}{NT} \sum_{m=0}^{N-1} z[m] \; exp \left( j 2 \pi mn/N\right)}
Function z = analytic_signal(x)



%x is a real-valued record of length N, where N is even %returns the analytic signal



z[n]x = x(:); %serialize



N = length(x);



X = fft(x,N);


z = ifft([X(1); 2*X(2:N/2); X(N/2+1); zeros(N/2-1,1)],N);


Envelope (Instantaneous Amplitude) Extraction using Hilbert Transformation

The amplitude modulated signal is

x(t)=m(t)cos(ωct)x(t) = m(t) cos\left(\omega_c t\right)
  • Information bearing signal m(t). Also called instantaneous amplitude.

  • Carrier signal cos(wc*t)

Similarly, phase or frequency modulations:

x(t)=acos(ϕ(t))x(t) = a cos \left(\phi(t) \right)
  • The concept of instantaneous phase or instantaneous frequency is required for describing the modulated signal.

General form

x(t)=a(t)cos[ϕ(t)]x(t) = a(t) cos \left[ \phi (t) \right]

Problem statement

Given the modulated signal, extract the instantaneous amplitude (envelope), instantaneous phase and the instantaneous frequency.

  • The modulated signal is a real-valued signal.

  • But, amplitude/phase and frequency can be easily computed if the signal is expressed in complex form.

How can we convert a real signal to the complex plane without altering the required properties ?

z(t)=zr(t)+jzi(t)=x(t)+jHTx(t)z(t) = z_r(t) + j z_i(t) = x(t) + j HT{x(t)}

The instantaneous amplitude (envelope extraction) is computed in the complex plane as

a(t)=z(t)=zr2(t)+zi2(t)a(t) = |z(t)| = \sqrt{z_r^2(t) + z_i^2(t)}

[

Figure 2: Amplitude modulation using a chirp signal and extraction of envelope and TFS*


MATLAB Tutorial on Envelope Extraction

MATLAB example code

Last updated

Was this helpful?