Fourier and wavelet analysis

Fourier and wavelet analysis

How the Fourier transform shows which frequencies a signal contains, and how short-time and wavelet transforms add when those frequencies occur, for analyzing vibration, spectra, images and time series.

What it is

Fourier analysis breaks a signal into a sum of sine and cosine waves of different frequencies, revealing which frequencies are present and how strong each is. Wavelet analysis does something similar with short, localized wave-like shapes (wavelets) that are stretched and shifted, so it shows not only which frequencies are present but when or where they occur. Both transform data from the time (or space) domain to a domain where patterns such as periodicity, noise and transients are easier to see. They are used in vibration and acoustic analysis, spectroscopy (FTIR, NMR), communications, image compression (JPEG, JPEG 2000), geophysics, EEG and ECG analysis, finance and climate science.

It answers questions such as: What is the dominant frequency of this vibration? Is there a periodic component hidden in noisy data? How do the frequencies in a signal change over time? Where in an image or record does a sudden change occur? How can noise be removed or data compressed? Fourier methods suit stationary signals, and wavelets suit signals whose frequency content changes.

Fundamentals

The Fourier transform and its discrete form

A signal x(t) can be written as a combination of complex exponentials. The continuous Fourier transform is X(f) = ∫ x(t) e−i2πft dt, and its inverse recovers x(t). For sampled data x[n], n = 0, …, N − 1, taken at sampling rate fs, the discrete Fourier transform (DFT) is X[k] = Σn=0N−1 x[n] e−i2πkn/N. The fast Fourier transform (FFT) computes the DFT in O(N log N) operations instead of O(N2), which made spectral analysis practical (Cooley–Tukey, 1965). The frequency of bin k is fk = k fs/N, so the frequency resolution is Δf = fs/N = 1/T, the inverse of the record length T: to separate two frequencies 1 Hz apart, record at least 1 s. The magnitude |X[k]| gives the amplitude (the single-sided amplitude is 2|X[k]|/N) and the phase arg X[k] the timing of each component. The power spectral density (PSD) estimates power per hertz, and

Sampling, aliasing and leakage

The Nyquist–Shannon sampling theorem says the sampling rate must exceed twice the highest frequency in the signal, fs > 2 fmax; otherwise higher frequencies fold back as false lower ones (aliasing). An analog anti-aliasing low-pass filter before the converter prevents it; practical systems sample at 2.5 to 5 times the highest frequency of interest. If the record does not contain a whole number of cycles, energy spreads to neighboring bins, called spectral leakage. It is reduced by multiplying the data with a window function (Hann for general use, Hamming, Blackman, flat-top for accurate amplitude), at the cost of a wider main peak. Removing the mean (DC offset) and any trend avoids a large peak at zero frequency. For noisy data, Welch’s method averages the spectra of overlapping windowed segments to reduce variance, and the periodogram alone is noisy.

Time-frequency analysis: STFT and spectrograms

The Fourier transform loses time information: it shows that a frequency occurs, not when. The short-time Fourier transform (STFT) applies the FFT to a sliding window, giving a spectrogram, |STFT(t, f)|2, as an image of frequency versus time. The window length sets a fixed trade-off, a form of the uncertainty principle Δt Δf ≥ 1/(4π): long windows give good frequency resolution but poor time resolution, and short windows the opposite. Fixed resolution is a limitation when a signal has both slow components, needing long windows, and short transients, needing short ones.

Wavelet transforms

Wavelets overcome this by using a window that scales with frequency. The continuous wavelet transform (CWT) is W(a, b) = (1/√a) ∫ x(t) ψ*((t − b)/a) dt, where ψ is the mother wavelet (a short oscillation with zero mean, such as Morlet, Mexican hat or Daubechies), a is the scale (stretching; large a corresponds to low frequency, with f ≈ fc/a for the wavelet’s center frequency fc) and b is the position (shift). The result, a scalogram, has good time resolution at high frequencies and good frequency resolution at low frequencies, suiting transients, bursts and edges. The discrete wavelet transform (DWT) uses dyadic scales (a = 2j) and is implemented by a fast filter bank: each stage splits the signal into approximation (low-pass) and detail (high-pass) coefficients, each downsampled by 2, with the approximation split again, so that the whole transform costs O(N). It is invertible and gives sparse representations, which is the basis of denoising (thresholding small detail coefficients, hard or soft, using the universal threshold σ√(2 ln N)) and compression. Common families are Haar, Daubechies (dbN), symlets and coiflets; wavelet choice should match the signal’s features.

Related tools, software and uses

Related methods include the Hilbert transform and empirical mode decomposition for non-stationary signals, the cosine transform (JPEG), the Gabor transform (a Gaussian-windowed STFT), cepstrum analysis (for echoes and gearbox faults), and two-dimensional Fourier and wavelet transforms for images (filtering, texture, diffraction patterns; see also FTIR and NMR for the spectroscopy use). Typical uses are machine fault diagnosis from vibration spectra, spectrometer processing, audio and radar, EEG rhythms, seismology, and removing noise from sensor data. Limits: Fourier assumes stationarity and periodic extension, results depend on window and wavelet choices, and interpretation of wavelet plots needs care about edge effects and significance.

Basic operation

  1. Acquire the signal properly. Choose sampling rate above twice the highest frequency, use an anti-aliasing filter and record enough duration for the required resolution.
  2. Preprocess. Remove the mean and trends, and handle missing or irregular samples.
  3. Apply a window and FFT. Use a Hann window and compute the spectrum or Welch PSD.
  4. Identify peaks. Read frequencies, amplitudes and phases, and distinguish harmonics from noise.
  5. Check for non-stationarity. Compute a spectrogram to see whether frequencies change with time.
  6. Use wavelets when needed. Apply CWT for localized events, or DWT for denoising and compression.
  7. Verify results. Test with synthetic signals of known frequency and examine edge effects.
  8. Collect the output. You obtain spectra and time-frequency maps; choosing windows and wavelets is covered in the video.

Good practice

  • Respect Nyquist. Filter before sampling.
  • Use windows. Prevent leakage unless the record holds whole cycles.
  • Know your resolution. Δf = 1/T limits what you can separate.
  • Average noisy spectra. Use Welch’s method.
  • Match the wavelet to the signal. Test several families.
  • Do not over-trust denoising. Check that thresholding has not removed real features, and keep the raw data, especially for diagnostic or safety-related signals.

Key terms

  • FFT — an efficient algorithm for computing the discrete Fourier transform.
  • Power spectral density — the distribution of signal power across frequency.
  • Aliasing — false low frequencies caused by sampling too slowly.
  • Spectral leakage — spreading of energy across frequency bins due to finite record length.
  • Spectrogram — a plot of how a signal’s spectrum changes over time.
  • Wavelet — a short oscillating function used to analyze signals at different scales.
  • Scalogram — a plot of wavelet coefficient magnitude over time and scale.

Video coming soon

About five minutes on Fourier and wavelet analysis: how it works in detail, how the data is acquired, and how it is analyzed.

Shopping cart

0
image/svg+xml

No products in the cart.

Continue Shopping