Wavelet Analysis of Data Series

Tech info | August 15, 2022

In this report, we will talk about some modern methods used in signal processing and data analysis. We will stick to simple and understandable language without unnecessary mathematical complexities, formulas, and strict scientific terminology.

Fourier transform

At the beginning of the 19th century, the French mathematician Jean-Baptiste Joseph Fourier (1768–1830) studied the propagation of heat in bodies and tried to solve the equation for heat transfer in a metal plate [2][3]. Until that, an exact solution to this equation was known only for some special cases where the heat source is represented by a simple harmonic wave - sine or cosine. Fourier discovered that he could represent an arbitrary heat source as a superposition (or sum) of simple harmonic functions. Thus, he obtained a solution to the equation in the general case as a superposition of the corresponding simple solutions. He showed that a continuous periodic function can be represented as an infinite series of harmonic functions (sine and cosine) with multiple frequencies, called the Fourier series. In the general case of a non-periodic process, the idea is generalized to the so-called Fourier transform. Examining a signal as a superposition of harmonic wave functions is called Fourier analysis. The frequency content of the signal is called its spectrum.

Portrait of Jean-Baptiste Joseph Fourier.
Joseph Fourier.

But why exactly sine and cosine, you might ask? There are a number of strictly mathematical answers to this question, and they are all correct. A widespread explanation is that sine and cosine are eigenfunctions of the linear operator and therefore are preserved under linear transformations [4]. Here we want to give a slightly different answer based on the scientific ideas of the epoch in which Fourier lived. Since ancient times, scientists and philosophers have considered two primordial and divine motions to which all others are reduced. These are the rectilinear uniform motion as a basis in Newton's laws and the uniform circular motion considered by Galilei but discarded later in the formulation of the principles of mechanics. Recall the geocentric model of Claudius Ptolemy more than two millennia ago, in which the orbits of the celestial bodies were described by a set of superimposed uniform circular motions of various magnitudes called deferents and epicycles. The sine and cosine functions are simply the projections of uniform circular motion onto the coordinate axes. Therefore, the Fourier transform can be seen as an expression of the relationship of an arbitrary process to this primordial divine motion.

Random signal and its frequency spectrum.
An arbitrary signal and its Fourier spectrum.

Fourier's discovery remained in the background of science for more than a century, and only in the 60s of the XX century did it gets deserved attention after the publication of the computer algorithm for the calculation of the so-called Fast Fourier Transform (FFT) [1]. After that point, Fourier analysis became a fundamental scientific tool with enormous application in all fields of science and engineering.

One of the most fundamental advantages of the Fourier transform is its localization in frequency space, i.e., the basis functions (sine and cosine) have precisely defined frequencies. Therefore, the Fourier spectrum is very convenient when an arbitrary signal has to be studied from a frequency point of view. Paradoxically, this also leads to the biggest drawback of the Fourier transform – its lack of information about the frequency content in time. It is because the harmonic functions are infinite, periodic, and non-damping and are therefore not localized to a particular moment in time. By looking at the spectrum, we can tell what frequencies the signal contains, but we don't know at which moment they appear. The latter is very important when we have to study non-stationary processes, such as the majority of the phenomena in physics and, in general, in the natural sciences. We need to know not just the frequency content of the signal but also how it changes over time. Other methods have been developed in modern science, allowing a more in-depth analysis of such phenomena.

Wavelet transform

The idea of the Wavelet Transform (WT) originated nearly a century ago, and its actual development and precise mathematical formulation continued in the 1980s and 1990s. The name comes from the English word wavelet, which literally means a small wave.

The essence of the method consists of the convolution of the studied signal with a time-translated and scaled version of the selected mother wavelet [5][6]. Its most important property is to be well localized in time (or space) and frequency. Thus, a sufficient resolution is ensured in both time and scale. As a consequence of WT, studying a one-dimensional data series, we obtain a two-dimensional power spectrum. It is like observing the signal through an optical magnifying glass with a frequency response consisting of the mother wavelet and translating the data sequence from beginning to end. In the next step, we change the wavelet scale, continue the procedure, and so on. After repeating the described process for all selected scales, we build the two-dimensional wavelet representation of the signal. The following figure shows some of the most commonly used mother wavelets.

Mother wavelets – Morlet and Mexican hat.
Morlet wavelet and Mexican hat (DOG2).

The following figures demonstrate some typical signals and their Wavelet Power Spectrum.

Sinusoidal signal and its wavelet spectrum.
Wavelet power spectrum of a sinusoidal signal.
Random signal and its spectrum calculated using Morlet wavelet.
Wavelet power spectrum of a random signal. The mother wavelet is Morlet.
Random signal and its spectrum calculated using Mexican (DOG2) wavelet.
Wavelet power spectrum of a random signal. The mother wavelet is Mexican hat (DOG2).
El Niño global phenomenon and its wavelet spectrum.
Wavelet power spectrum of El Niño. The mother wavelet is Mexican hat (DOG2).

WT finds many applications in today's science in studying non-stationary phenomena in geophysics, astrophysics, acoustics, optics, medicine, economics, biology, etc. An application of WT is in data filtration and compression. The algorithms underlying the JPEG2000 standard use the Wavelet transform.

Reference

  1. Cooley J., Tukey J. An algorithm for the machine calculation of complex Fourier series, Mathematics of Computation, Vol. 19, pp. 297-301, 1965.
  2. Fourier J. Mémoire sur la propagation de la chaleur dans les corps solides, 1807.
  3. Fourier J. Théorie analytique de la chaleur, F. Didot père et fils (Paris), No. 24, 1822.
  4. Max J. Methodes et techniques de traitement du signal et applications aux mesures physiques, Masson, 1981.
  5. Torrence C., Compo G. A practical guide to wavelet analysis, Bulletin of the American Meteorological Society, Vol. 79, pp. 61-78, 1998.
  6. Астафьева Н. Вейвлет анализ. Основы теории и примеры применения, Успехи Физических Наук, Vol. 166, No.11, pp. 1145-1170, 1996.