Continuous Wavelet Analysis

Summary

Doc_BoxAlgorithm_ContinuousWaveletAnalysis.png
  • Plugin name : Continuous Wavelet Analysis
  • Version : 1.0
  • Author : Quentin Barthelemy
  • Company : Mensia Technologies SA
  • Short description : Performs a Time-Frequency Analysis using CWT.
  • Documentation template generation date : Apr 11 2018

Description

Performs a Time-Frequency Analysis using Continuous Wavelet Transform.

The Continuous Wavelet Transform (CWT) provides a Time-Frequency representation of an input signal, using Morlet, Paul or derivative of Gaussian wavelets.

Considering an input signal $ X \in \mathbb{R}^{C \times N} $, composed of $ C $ channels and $ N $ temporal samples, this plugin computes the CWT of this signal $ \Phi \in \mathbb{C}^{C \times F \times N} $, composed of $ C $ channels, $ F $ scales and $ N $ temporal samples. For the $ c^{ \text{th} } $ channel, the $ f^{ \text{th} } $ scale $ s_f $ and the $ n^{ \text{th} } $ sample, the Time-Frequency representation is defined as:

\[ \Phi (c,f,n) = \sum_{n'=0}^{N-1} X(c,n') \ \psi^{*} \left( \frac{(n-n') \delta t}{s_f} \right) \ , \]

where $ \psi $ is the normalized wavelet, $ (.)^{*} $ is the complex conjugate and $ \delta t $ is the sampling period.

Using the inverse relation between wavelet scale $ s_f $ and Fourier frequency $ \text{freq}_f $, output is finally defined as:

\[ \Phi(c,f,n) = \Phi_r(c,f,n) + \mathsf{i} \times \Phi_i(c,f,n) = \left| \Phi(c,f,n) \right| \times e^{\mathsf{i} \arg(\Phi(c,f,n))} \ , \]

with $ \mathsf{i} $ being the imaginary unit.

Output can be visualized with a Instant Bitmap (3D Stream).

Inputs

1. Input signal

An input multichannel signal $ X \in \mathbb{R}^{C \times N} $, composed of $ C $ channels and $ N $ temporal samples.

  • Type identifier : Signal (0x5ba36127, 0x195feae1)

Outputs

1. Amplitude

An output spectral amplitude (absolute value) $ \left| \Phi \right| \in \mathbb{R}^{C \times F \times N} $.

  • Type identifier : Time-frequency (0x5a90816b, 0xff2aff72)

2. Phase

An output spectral phase $ \arg(\Phi) \in \mathbb{R}^{C \times F \times N} $, in radians.

  • Type identifier : Time-frequency (0x5a90816b, 0xff2aff72)

3. Real Part

An output real part of the spectrum $ \Phi_r \in \mathbb{R}^{C \times F \times N} $.

  • Type identifier : Time-frequency (0x5a90816b, 0xff2aff72)

4. Imaginary Part

An output imaginary part of the spectrum $ \Phi_i \in \mathbb{R}^{C \times F \times N} $.

  • Type identifier : Time-frequency (0x5a90816b, 0xff2aff72)

Settings

1. Wavelet type

This setting defines the type of the wavelet:

  • Morlet:

    \[ \psi_0 (n) = \pi^{1/4} e^{\mathsf{i} \omega_0 n} e^{-n^2 / 2} \ , \]

  • Paul:

    \[ \psi_0 (n) = \frac{2^m \mathsf{i}^m m!}{\sqrt{\pi(2m)!}} (1-\mathsf{i} n)^{-(m+1)} \ , \]

  • derivative of Gaussian:

    \[ \psi_0 (n) = \frac{(-1)^{m+1}}{\sqrt{\Gamma(m+\frac{1}{2})}} \frac{d^m}{d n^m} (e^{-n^2 / 2}) \ . \]


  • Type identifier : Continuous Wavelet Type (0x09177469, 0x52404583)
  • Default value : [ Morlet wavelet ]

2. Wavelet parameter

This setting defines the wavelet parameter:

  • Morlet wavelet: nondimensional frequency $ \omega_0 $, real positive parameter value. Values between 4.0 and 6.0 are typically used.
  • Paul wavelet: order $ m $, positive integer values inferior to 20. Default value is 4.
  • Derivative of Gaussian wavelet: derivative $ m $, positive even integer values. Value 2 gives the Marr or Mexican hat wavelet.


  • Type identifier : Float (0x512a166f, 0x5c3ef83f)
  • Default value : [ 4 ]

3. Number of frequencies

This setting defines the number of frequencies $ F $ of the CWT.

  • Type identifier : Integer (0x007deef9, 0x2f3e95c6)
  • Default value : [ 60 ]

4. Highest frequency

This setting defines the highest frequency $ \text{freq}_F $ of the CWT.

  • Type identifier : Float (0x512a166f, 0x5c3ef83f)
  • Default value : [ 35 ]

5. Frequency spacing

This setting is related to the frequency non-linear spacing of the CWT.

  • Type identifier : Float (0x512a166f, 0x5c3ef83f)
  • Default value : [ 12.5 ]

Examples

Miscellaneous

Reference:

C Torrence and GP Compo, A Practical Guide to Wavelet Analysis, Bulletin of the American Meteorological Society, vol. 79, pp. 61–78, 1998