Wavelet Transform

Short-time Fourier transform limitation, wavelets.

Darshan N
Updated: 19 March 2026
5 min read

The wavelet transform addresses a fundamental limitation of the Short-Time Fourier Transform (STFT): the inability to simultaneously achieve good time resolution and good frequency resolution. Wavelets provide a multi-resolution analysis framework where the time-frequency trade-off adapts to the frequency of interest, making them powerful for analyzing non-stationary signals such as transient events, speech, biomedical signals, and image features.

STFT vs Wavelet Transform: Time-Frequency Resolution ComparisonSTFT: Fixed Resolution (Heisenberg Tiles)TimeFrequencyAll tiles same shape: fixed delta_t and delta_fWavelet: Multi-Resolution (Adaptive Tiles)TimeFrequencyHigh freq: narrow time, wide freq. Low freq: wide time, narrow freq.Heisenberg Uncertainty Principle: delta_t x delta_f is greater than or equal to 1/(4*pi)STFT: fixed window width fixes delta_t and delta_f for all frequenciesWavelet: delta_t scales with 1/frequency (shorter time window at high freq, longer at low freq)Constant relative bandwidth: delta_f / f = constant (unlike STFT where delta_f = constant)
Figure 1: Time-frequency tiling comparison between STFT (fixed resolution) and wavelet transform (adaptive multi-resolution).

Core Concept: STFT Limitation and Why Wavelets Exist

The Short-Time Fourier Transform (STFT) analyzes a non-stationary signal by computing the Fourier transform of short, windowed segments. While this provides time-frequency information, it uses a fixed window length throughout the entire analysis. A wide window gives good frequency resolution but poor time resolution. A narrow window gives good time resolution but poor frequency resolution. This is a direct consequence of the Heisenberg uncertainty principle: delta_t * delta_f is greater than or equal to 1/(4*pi).

The critical problem is that different types of events require different resolutions. A low-frequency component evolves slowly and is best analyzed with a wide window (good frequency resolution). A high-frequency transient is brief and needs a narrow window (good time resolution). The STFT cannot adapt the window width to the frequency of interest because the window length is fixed before analysis begins.

The wavelet transform solves this by using scaled versions of a prototype function called the mother wavelet. At high frequencies, the wavelet is compressed (short duration), providing good time resolution. At low frequencies, the wavelet is stretched (long duration), providing good frequency resolution. This natural scaling matches the physical characteristics of most real signals.

Mathematical Expression

The Continuous Wavelet Transform (CWT) of a signal x(t) is defined as: CWT(a, b) = (1/sqrt(|a|)) * integral of x(t) * psi*((t-b)/a) dt, where psi(t) is the mother wavelet, a is the scale parameter (inversely related to frequency), and b is the translation (time shift) parameter. The factor 1/sqrt(|a|) normalizes energy across scales. Larger scale a corresponds to a stretched wavelet (lower frequency), and smaller scale a corresponds to a compressed wavelet (higher frequency).

The relationship between scale and frequency is approximately: f = f_psi / (a * T_s), where f_psi is the center frequency of the mother wavelet and T_s is the sampling period. The bandwidth scales proportionally with center frequency: delta_f / f = constant. This property, called constant-Q or constant relative bandwidth, is why wavelets are well-suited for audio analysis (where musical notes have constant relative frequency spacing) and for geometric feature analysis in images.

Discrete Wavelet Transform and Filter Banks

The Discrete Wavelet Transform (DWT) is the practically implemented version using discrete scales and translations. It is computed efficiently using a pair of complementary filters: a low-pass filter (scaling filter) h[n] and a high-pass filter (wavelet filter) g[n], followed by downsampling by 2. This two-channel filter bank decomposes the signal into an approximation (low-frequency) subband and a detail (high-frequency) subband.

Multi-level DWT is obtained by recursively applying the same filter pair to the approximation subband. After J levels of decomposition, the signal is split into J detail subbands d1, d2, ..., dJ and one final approximation subband cJ. This is called a dyadic filter bank because each level halves the frequency range and time resolution by factor 2. The total number of samples is preserved (N/2 + N/4 + ... = N), satisfying the no-redundancy requirement of the DWT.

The DWT is reversible through the Inverse DWT (IDWT), which upsamples and applies reconstruction filters h_r[n] and g_r[n]. Perfect reconstruction requires that the analysis and synthesis filter pairs satisfy the quadrature mirror filter (QMF) conditions or the biorthogonality conditions. Common wavelet families include Haar, Daubechies (db4, db8), Symlets, and Coiflets, each with different properties of regularity, compact support, and symmetry.

Practical Understanding

The Haar wavelet is the simplest wavelet and is equivalent to a 2-point averaging and differencing filter. The approximation coefficient is the local average and the detail coefficient is the local difference. Despite its simplicity, the Haar wavelet is piecewise constant and introduces blocking artifacts in image compression, which is why more regular wavelets such as Daubechies db4 are preferred in practice.

In image compression, the JPEG 2000 standard uses the CDF 9/7 biorthogonal wavelet for lossy compression and the CDF 5/3 wavelet for lossless compression. The 2D DWT is applied by performing 1D DWT along rows and then along columns, decomposing the image into four subbands: LL (approximation), LH (horizontal edges), HL (vertical edges), and HH (diagonal edges). Recursive decomposition of the LL subband gives the multi-resolution pyramid.

Example
Given:
Signal sampled at fs = 1024 Hz, length N = 1024 samples
DWT with Haar wavelet applied for J = 3 levels

Why this formula applies:
Each DWT level splits signal into two bands and downsamples by 2.
After J levels: approximation length = N / 2^J
Detail lengths: N/2, N/4, N/8 for levels 1, 2, 3

Formula:
Approx subband length at level J = N / 2^J
Frequency range at level j: [0, fs/2^(j+1)] for approx; [fs/2^(j+1), fs/2^j] for detail

Substitution:
N = 1024, J = 3, fs = 1024 Hz
Approx at level 3 = 1024 / 2^3 = 1024 / 8
Detail level 1 freq range: [512, 1024] / 2 = [256, 512] Hz
Detail level 2 freq range: [128, 256] Hz
Detail level 3 freq range: [64, 128] Hz
Approx level 3 freq range: [0, 64] Hz

Calculation:
Approx subband: 128 samples covering 0 to 64 Hz
Total samples: 512 + 256 + 128 + 128 = 1024 (preserved)

Final Answer:
Level 3 approximation: 128 samples, 0-64 Hz
Level 1 detail: 512 samples, 256-512 Hz (finest time resolution)
Level 3 detail: 128 samples, 64-128 Hz (coarsest time resolution)
Total sample count preserved: 1024 (no redundancy)
Exam Tip: DWT decomposes N-sample signal into J levels. Approximation at level J has N/2^J samples. Total samples across all subbands equals N (no redundancy). Haar wavelet: approximation = average, detail = difference. Wavelet center frequency scales as 1/a (scale and frequency are inversely related).

Mechanism: DWT Multi-Level Filter Bank

DWT Multi-Level Dyadic Filter Bank Decompositionx[n]N samplesh[n] LPg[n] HPds2ds2d1[n]N/2 detailh[n] LPg[n] HPds2ds2d2[n]N/4 detailh[n] LPc3[n]N/8 approxcJd2d1DWT Subband Frequency Ranges (N=1024, fs=1024 Hz, J=3 levels)Approx c3: N/8 = 128 samplesFrequency: 0 to 64 HzDetail d3: N/8 = 128 samplesFrequency: 64 to 128 HzDetail d2: N/4 = 256 samplesFrequency: 128 to 256 HzDetail d1: N/2 = 512 samplesFrequency: 256 to 512 Hz
Figure 2: Three-level DWT dyadic filter bank showing how each stage splits the signal into approximation and detail subbands.

Mechanism Summary

  • STFT uses a fixed window: good frequency resolution requires a wide window, good time resolution requires a narrow window. Cannot do both simultaneously for all frequencies.
  • Wavelet transform uses scaled mother wavelets. Scale a and frequency are inversely related: smaller a means higher frequency, shorter duration wavelet, better time resolution.
  • DWT is computed using a two-channel filter bank: LP filter h[n] followed by downsampling by 2 gives approximation coefficients; HP filter g[n] followed by downsampling gives detail coefficients.
  • Multi-level DWT recursively decomposes the approximation subband. After J levels, subbands are cJ (approximation, N/2^J samples) and d1 through dJ (details). Total samples = N (no redundancy).
  • Haar wavelet: h[n] = [1/sqrt(2), 1/sqrt(2)], g[n] = [1/sqrt(2), -1/sqrt(2)]. Approximation = local average, detail = local difference. Simplest but introduces blocking artifacts.

Quick Revision

  • STFT limitation: fixed window means fixed delta_t and delta_f for all frequencies. Cannot adapt to signal structure.
  • CWT: CWT(a,b) = (1/sqrt(|a|)) * integral x(t) * psi*((t-b)/a) dt. Scale a inversely related to frequency.
  • DWT: LP filter + downsample by 2 = approximation. HP filter + downsample by 2 = detail. J levels gives N/2^J approximation samples.
  • Constant-Q property: delta_f / f = constant. Wavelet bandwidth scales proportionally with center frequency (unlike STFT).
  • Perfect reconstruction requires QMF conditions: g[n] = (-1)^n * h[L-1-n], where L is filter length.
  • Exam trap: DWT has NO redundancy (N input = N total subband samples). CWT is highly redundant (continuous a and b). Wavelets are better than STFT for transient detection, NOT for sinusoidal steady-state analysis.
  • Applications: JPEG 2000 (CDF 9/7 wavelet), ECG denoising, seismic analysis, speech denoising, fingerprint compression (FBI WSQ standard uses Daubechies wavelets).

Wavelet Transform Quiz

Test your understanding of wavelet theory and its advantages over the short-time Fourier transform.

Question 1 of 3

Q1.The fundamental limitation of the Short-Time Fourier Transform (STFT) that wavelets address is: