🖍️
gitbook_docs
  • Introduction
  • Machine Learning
    • Recommended Courses
      • For Undergrad Research
      • Math for Machine Learning
    • ML Notes
      • Covariance Correlation
      • Feature Selection
      • Linear Regression
      • Entropy, Cross-Entropy, KL Divergence
      • Bayesian Classifier
        • Terminology Review
        • Bayesian Classifier for Normally Distributed classes
      • Linear Discriminant Analysis
      • Logistic Regression
        • Logistic Regression Math
      • Logistic Regression-MaximumLikelihood
      • SVM
        • SVM concept
        • SVM math
      • Cross Validation
      • Parameter, Density Estimation
        • MAP, MLE
        • Gaussian Mixture Model
      • E-M
      • Density Estimation(non-parametric)
      • Unsupervised Learning
      • Clustering
      • kNN
      • WaveletTransform
      • Decision Tree
    • Probability and Statistics for Machine Learning
      • Introduction
      • Basics of Data Analysis
      • Probability for Discrete Random Variable
      • Poisson Distribution
      • Chi-Square Distribution
      • P-value and Statistical Hypothesis
      • Power and Sample Size
      • Hypothesis Test Old
      • Hypothesis Test
      • Multi Armed Bandit
      • Bayesian Inference
      • Bayesian Updating with Continuous Priors
      • Discrete Distribution
      • Comparison of Bayesian and frequentist inference
      • Confidence Intervals for Normal Data
      • Frequenist Methods
      • Null Hypothesis Significance Testing
      • Confidence Intervals: Three Views
      • Confidence Intervals for the Mean of Non-normal Data
      • Probabilistic Prediction
  • Industrial AI
    • PHM Dataset
    • BearingFault_Journal
      • Support Vector Machine based
      • Autoregressive(AR) model based
      • Envelope Extraction based
      • Wavelet Decomposition based
      • Prediction of RUL with Deep Convolution Nueral Network
      • Prediction of RUL with Information Entropy
      • Feature Model and Feature Selection
    • TempCore Journal
      • Machine learning of mechanical properties of steels
      • Online prediction of mechanical properties of hot rolled steel plate using machine learning
      • Prediction and Analysis of Tensile Properties of Austenitic Stainless Steel Using Artificial Neural
      • Tempcore, new process for the production of high quality reinforcing
      • TEMPCORE, the most convenient process to produce low cost high strength rebars from 8 to 75 mm
      • Experimental investigation and simulation of structure and tensile properties of Tempcore treated re
    • Notes
  • LiDAR
    • Processing of Point Cloud
    • Intro. 3D Object Detection
    • PointNet
    • PointNet++
    • Frustrum-PointNet
    • VoxelNet
    • Point RCNN
    • PointPillars
    • LaserNet
  • Simulator
    • Simulator List
    • CARLA
    • Airsim
      • Setup
      • Tutorial
        • T#1
        • T#2
        • T#3: Opencv CPP
        • T#4: Opencv Py
        • Untitled
        • T#5: End2End Driving
  • Resources
    • Useful Resources
    • Github
    • Jekyll
  • Reinforcement Learning
    • RL Overview
      • RL Bootcamp
      • MIT Deep RL
    • Textbook
    • Basics
    • Continuous Space RL
  • Unsupervised Learning
    • Introduction
  • Unclassified
    • Ethics
    • Conference Guideline
  • FPGA
    • Untitled
  • Numerical Method
    • NM API reference
Powered by GitBook
On this page
  • Review of Fourier Analysis
  • Wavelet Decomposition
  • Wavelet Introduction
  • Multilevel Decomposition
  • Application
  • Analytical Signal and Hilbert Transform
  • Analytical Signal and Hilbert Transformation
  • Analytical Signal
  • Discrete Analytical Signal
  • Envelope (Instantaneous Amplitude) Extraction using Hilbert Transformation

Was this helpful?

  1. Machine Learning
  2. ML Notes

WaveletTransform

PreviouskNNNextDecision Tree

Last updated 3 years ago

Was this helpful?

Review of Fourier Analysis

Visualizing Fourier Transform

Fourier Analysis Lectures

Lecture series by Steve Brunton

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

Mathematics of Wavelet Transform for Beginners

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.

  • Dowload Example Code

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

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.

Application

  1. Image Compression using Wavelet

Exercise


Analytical Signal and Hilbert Transform

Analytical Signal and Hilbert Transformation

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

  • Time domain approach

    • Using Hilbert transform approach

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

Discrete Analytical Signal

Discrete-Time Fourier Transform (DTFT).

The analytic signal is complex valued

and should satisfy the following two desired properties

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

  • The real and imaginary part of the analytic signal should satisfy the following property of orthogonality

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

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

  • Information bearing signal m(t). Also called instantaneous amplitude.

  • Carrier signal cos(wc*t)

Similarly, phase or frequency modulations:

  • The concept of instantaneous phase or instantaneous frequency is required for describing the modulated signal.

General form

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 ?

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

[

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


MATLAB Tutorial on Envelope Extraction

[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.

../_images/plot_mallat_2d.png

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

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}Z(f)=⎩⎨⎧​X(0)2X(f)0​forf=0forf>0forf<0​
z(t)=zr(t)+jzi(t)=x(t)+jHTx(t)z(t)=zr(t)+jzi(t)=x(t)+jHTx(t)z(t)=zr(t)+jzi(t)=x(t)+jHTx(t)
∫−∞∞zi(t)zr(t)=0\displaystyle{\int_{-\infty}^{\infty} z_i(t) z_r(t) = 0}∫−∞∞​zi​(t)zr​(t)=0
X(f)=T∑n=0N−1x[n]e−j2πfnTX(f) = \displaystyle{ T \sum_{n=0}^{N-1} x[n] e^{-j 2 \pi f n T} }X(f)=Tn=0∑N−1​x[n]e−j2πfnT
z[n]=zr[n]+jzi[n]z[n] = z_r[n] + j z_i[n]z[n]=zr​[n]+jzi​[n]
zr[n]=x[n]z_r[n] = x[n]zr​[n]=x[n]
∑n=0N−1zr[n]zi[n]=0\displaystyle{ \sum_{n=0}^{N-1} z_r[n] z_i[n] = 0 }n=0∑N−1​zr​[n]zi​[n]=0
z[n]=1NT∑m=0N−1z[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)}z[n]=NT1​m=0∑N−1​z[m]exp(j2πmn/N)
x(t)=m(t)cos(ωct)x(t) = m(t) cos\left(\omega_c t\right)x(t)=m(t)cos(ωc​t)
x(t)=acos(ϕ(t))x(t) = a cos \left(\phi(t) \right)x(t)=acos(ϕ(t))
x(t)=a(t)cos[ϕ(t)]x(t) = a(t) cos \left[ \phi (t) \right]x(t)=a(t)cos[ϕ(t)]

on the complex plane

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)}z(t)=zr​(t)+jzi​(t)=x(t)+jHTx(t)
a(t)=∣z(t)∣=zr2(t)+zi2(t)a(t) = |z(t)| = \sqrt{z_r^2(t) + z_i^2(t)}a(t)=∣z(t)∣=zr2​(t)+zi2​(t)​

Wavelets and Multiresolution Analysis - YouTube
The Wavelet Transform for Beginners - YouTube
MATLAB documentation
Download MATLAB example code
wavedec2()
Wavelet Decomposition for Bearing fault classification
Detecting Discontinuities and Breakdown Points
https://www.gaussianwaves.com/2017/04/analytic-signal-hilbert-transform-and-fft/
Apply Hilbert transform and form the analytic signal
MATLAB example code
But what is the Fourier Transform? A visual introduction. - YouTube
Fourier Analysis - YouTube