Time Frequency Analysis

Time-frequency analysis identifies the time at which various signal frequencies are present, usually by calculating a spectrum at regular intervals of time.

Sonogram

Also called the "Short-time Fourier Transform", a sonogram is a two-dimensional image created by computing the Fourier spectra using a sliding temporal window:

image plotted frequency vs time, intensity is amplitude of fourier spectrum

By adjusting the width of the window you can determine the time resolution of the resulting spectra:

Igor's Sonogram panel

Wigner Transform

The Wigner transform (also known as the Wigner Distribution Function or WDF) maps a 1D time signal U(t) into a 2D time-frequency representation. Conceptually, the WDF is analogous to a musical score where the time axis is horizontal and the frequencies (notes) are plotted on a vertical axis. The WDF is defined by the equation:

Wigner equation W(t,v)=...

Note that the WDF W(t, ν) is real (this can be seen from the fact that it is a Fourier transform of an Hermitian quantity). The WDF is also a 2D Fourier transform of the Ambiguity function. The localized spectrum can be derived from the WDF by integrating it over a finite area ∂t∂ν. Using Gaussian weight functions in both t and ν, and choosing the minimum uncertainty condition ∂t∂ν=1, we obtain an estimate for the local spectrum:

Wigner equation W(t,v;dt) ~=...

To illustrate an application of the WignerTransform operation, consider a two-frequency signal, its Wigner Transform, and its periodogram:

image of input signal, wigner transform, and periodogram

Continuous Wavelet Transform

The Continuous Wavelet Transform (CWT) is a time-frequency representation of signals that graphically has a superficial similarity to the Wigner transform.

A wavelet transform is a convolution of a signal s(t) with a set of functions which are generated by translations and dilations of a main function. The main function is known as the mother wavelet and the translated or dilated functions are called wavelets. Mathematically, the CWT is given by:

W(a,b)=1/sqrt(a)Integral of s(t)phi((t-b)/a) dt

Here b is the time translation and a is the dilation of the wavelet.

From a computational point of view it is natural to use the FFT to compute the convolution which suggests that the results are dependent on proper sampling of s(t).

When the mother wavelet is complex, the CWT is also a complex valued function. Otherwise the CWT is real. The squared magnitude of the CWT |W(a,b)|² is equivalent to the power spectrum so that a typical display (image) of the CWT is a representation of the power spectrum as a function of time offset b. One should note however that the precise form of the CWT depends on the choice of mother wavelet y and therefore the extent of the equivalency between the squared magnitude of the CWT and the power spectrum is application dependent.

The CWT operation is implemented using both the FFT and the discrete sum approach. You can use either one to get a representation of the effective wavelet using a delta function as an input.

CWT Example

The two-dimensional M_CWT result displayed as an image:

image of CWT using direct sum shows end effects are absent

Discrete Wavelet Transform

The Discrete Wavelet Transform (DWT) is similar to the Fourier transform in that it is a decomposition of a signal in terms of a basis set of functions. In Fourier transforms the basis set consists of sines and cosines and the expansion has a single parameter. In wavelet transform the expansion has two parameters and the functions (wavelets) are generated from a single "mother" wavelet using dilation and offsets corresponding to the two parameters.

f(t)=sum over a sum over b C sub ab Phi sub ab(t)

where the two-parameter expansion coefficients are given by

C sub ab = integral f(t) Phi sub ab(t) dt

and the wavelets obey the condition

Phi sub ab(t) = 2 ^(a/2) Phi(2^at-b)

Here Ψ is the mother wavelet, a is the dilation parameter and b is the offset parameter.

The two parameter representation can complicate things quickly as one goes from 1D signal to higher dimensions. In addition, because the number of coefficients in each scale varies as a power of 2, the DWT of a 1D signal is not conveniently represented as a 2D image (as is the case with the CWT). It is therefore customary to "pack" the results of the transform so that they have the same dimensionality of the input. For example, if the input is a 1D wave of 128 (=27) points, there are 7-1=6 significant scales arranged as follows:

An interesting consequence of the definition of the DWT is that you can find out the shape of the wavelet by inverse transforming a suitable form of a delta function. For example:

graph of Daubechies 4 coeff wavelet

The important thing about the DWT basis function is that it is exactly zero outside of a certain duration. This is different from the Fourier transform whose basis function is the un-ending sine wave.

This difference is the foundation for one of the more popular applications of the DWT: "de-noising".

Removing Noise with the DWT

"De-noising" a signal with the DWT involves three steps:

  1. Transform the input signal with the DWT.
  2. Zero all transform coefficients whose magnitude falls below some percentage of the maximum magnitude of the transform.
  3. Inverse DWT.

The Wavelet Demo Example experiment demonstrates this technique:

Igor´s DWT operation performs de-noising when the /D flag is specified.

References

The Torrence and Compo journal article is also online at: http://paos.colorado.edu/research/wavelets/.