Introduction to continuous wavelet transforms

Introduction to continuous wavelet transforms#

This page provides documentation, focusing on the Continuous Wavelet Transform (CWT) and its application in signal analysis. See, for example, [Dau92, Mal99, SN96] or [Kai94] for excellent detailed introductions to the topic.

The implementation in ptwt.continuous_transform.cwt() uses PyWavelets/pywt and efficiently utilizes PyTorch for computation and supports various wavelet functions for flexible signal analysis.

Definition of CWT#

The Continuous Wavelet Transform (CWT) is a mathematical tool used for analyzing signals in both time and frequency domains simultaneously. It is based on a wavelet function, which is a small, localized wave-like function, that is stretched or compressed and shifted across the signal. The shifted and stretched version of a mother wavelet function \(\psi \in \mathcal{L}_2(\mathbb{R})\) is defined by \(\psi^{a,b}(t)\), where \(a\in\mathbb{R}\setminus\{0\}\) and \(b\in\mathbb{R}\) and \(\mathcal{L}_2\) is a Hilbert space (complete linear space with scalar product), as:

\[\psi^{a,b}(t) := |a|^{-\frac{1}{2}}\,\psi\left(\frac{t-b}{a}\right)\]

The CWT of a signal \(x\in\mathcal{L}_2(\mathbb{R})\) is defined as:

\[\mathcal{W}_x(a,b) = \langle x,\psi^{a,b} \rangle = |a|^{-\frac{1}{2}}\int_{-\infty}^{\infty} x(t) \, \psi^*\left(\frac{t-b}{a}\right)\,dt\]

where \(\psi^*\) denotes the complex conjugate of \(\psi\) and \(\langle\cdot,\cdot\rangle\) the scalar product of two functions. The CWT essentially provides a time-scale representation of the signal, revealing information about its frequency content at different time points.

According to [Mer20], the Fourier transform \(\Psi_{a,b}\) of the wavelet \(\psi_{a,b}\) shifted in time and frequency can serve as an alternative definition of the CWT. The Fourier transform is directly derived from the properties of the Fourier Transform regarding time shifting and amplitude modulation:

\[\Psi_{a,b}(\omega) = |a|^{\frac{1}{2}}\,\text{e}^{-\text{i}\omega b}\,\Psi(\omega)\,\]

where \(\Psi\) denotes the Fourier transform of the mother wavelet \(\psi\), \(\text{i}\) denotes the imaginary unit and \(\omega\) the frequency of the signal. Consequently, the CWT :math:mathcal{W}_x` of a signal \(x\) can be defined as the inverse Fourier transformation, as described in [Mer20]:

\[\mathcal{W}_x(a,b)=\frac{1}{2\pi}\langle X,\Psi_{a,b}\rangle=\frac{|a|^\frac{1}{2}}{2\pi}\int_{-\infty}^{\infty}X(\omega)\Psi^*(a\omega)\,\text{e}^{\text{i}\omega b}\,\text{d}\omega\]

where \(X\) denotes the Fourier transform of the signal \(x\). This mathematical representation can be used for implementing the CWT.

Time-Scale Analysis with the CWT#

The CWT introduces the concept of scale alongside time, allowing for a scalable analysis of the signal. By varying the scale parameter \(a\), the CWT provides information about frequency characteristics around \(t=b\). This property makes the CWT particularly suitable for analyzing high-frequency components of signals concerning time. Additionally, the resolution in time and frequency is dependent on the scale parameter \(a\), with smaller \(|a|\) yielding finer time resolution and larger \(|a|\) providing better frequency resolution.

In digital signal processing, signals are discrete, necessitating considerations for implementing the CWT. The CWT is inherently continuous, but numerical approximations are employed for computation. Unlike the Discrete Wavelet Transform, which operates on discrete time steps and scales, CWT offers a near-continuous analysis. This is achieved using methods like the FFT for efficient computation in the frequency domain.

To use continuous wavelets effectively for audio signal analysis, certain criteria must be met. Wavelets should be mean-free and satisfy admissibility conditions ensuring signal energy normalization and invertibility. Commonly used wavelets such as the Morlet and Mexican-Hat wavelets are preferred for their properties in time-frequency representation. The choice of wavelet impacts the trade-off between time and frequency resolution, with different wavelets offering advantages in specific applications.

Key Points:

  • The CWT is based on a wavelet function, denoted as \(\psi(t)\).

    This function is scaled and shifted to create a family of wavelets \(\psi^{a,b}\), where \(a\) represents the scale parameter and \(b\) represents the translation parameter.

  • CWT Formula:

    The CWT of a signal \(x(t)\) with respect to a wavelet \(\psi^{a,b}\) is given by the inner product of the signal and the translated/scaled wavelet.

  • Interpretation:

    The CWT represents the coefficients of a series expansion of the signal in terms of wavelets. This allows the signal to be reconstructed from a weighted superposition of the wavelets.

  • Properties:

    The wavelet function \(\psi\) must satisfy certain conditions, such as being admissible, which ensures that the CWT can accurately represent the signal without loss of information.

  • Time-Scale Analysis:

    One significant aspect of CWT is its ability to analyze signals in both time and scale (or frequency) domains simultaneously. By varying the scale parameter, the CWT can provide information about frequency content at different time points in the signal.

  • Implementation Considerations:

    Implementing CWT requires discretizing the scales and performing convolutions. Efficient algorithms, such as Fast Fourier Transform (FFT), are often utilized for numerical computations.

Bibliography#

[Dau92]

Ingrid Daubechies. Ten Lectures on Wavelets. Society for Industrial and Applied Mathematics (SIAM), Philadelphia, Pennsylvania, 9 edition, 1992. doi:10.1063/1.4823127.

[JlCH01]

Arne Jensen and Anders la Cour-Harbo. Ripples in mathematics: the discrete wavelet transform. Springer Science & Business Media, 2001.

[Kai94]

Gerald Kaiser. A friendly guide to wavelets. Birkhäuser, Boston, 1 edition, 1994. doi:10.1007/978-0-8176-8111-1.

[LGW+19]

Gregory Lee, Ralf Gommers, Filip Waselewski, Kai Wohlfahrt, and Aaron O'Leary. Pywavelets: a python package for wavelet analysis. Journal of Open Source Software, 4(36):1237, 2019.

[Mal99]

Stéphane Mallat. A wavelet tour of signal processing. Elsevier, 1999.

[Mer20] (1,2)

Alfred Mertins. Signaltheorie. Springer, 4 edition, 2020. doi:10.1007/978-3-658-29648-3.

[SN96]

Gilbert Strang and Truong Nguyen. Wavelets and filter banks. SIAM, 1996.

[VYP18]

Aparna Vyas, Soohwan Yu, and Joonki Paik. Multiscale transforms with application to image processing. Springer, 2018.

[WBHG22]

Moritz Wolter, Felix Blanke, Raoul Heese, and Jochen Garcke. Wavelet-packets for deepfake image analysis and detection. Machine Learning, 111(11):4295–4327, 2022. doi:10.1007/s10994-022-06225-5.