"Fourier hands me a basis and asks the signal to conform. EMD asks the signal what it is, then listens."
An Adaptive AI Agent
The big picture
Every representation met so far in this chapter fixes its basis before it sees the data: Fourier (Section 7.1) assumes stationary sinusoids, wavelets (Section 7.3) a fixed mother shape dilated across scales, yet real sensor signals rarely oblige. A footstep, an arrhythmic heartbeat, a bearing spalling under load are nonlinear and nonstationary, with instantaneous frequencies that drift within a single cycle. EMD flips that contract, letting the data define its own oscillatory components, called intrinsic mode functions, directly from its local extrema; pairing that with the Hilbert transform gives the Hilbert-Huang transform (HHT), a fully data-driven time-frequency picture. This section explains what an IMF is, why sifting produces one, how to read a Hilbert spectrum, and when its adaptive power is worth its fragility.
This section assumes comfort with the analytic-signal and instantaneous-frequency ideas from Chapter 3, and the leakage and windowing tradeoffs from Section 7.1. If the Hilbert transform is unfamiliar, the analytic-signal construction later in this section, where each IMF becomes \(z_i(t) = a_i(t)e^{j\theta_i(t)}\), is self-contained enough to follow.
Intrinsic mode functions: letting the signal pick its own basis
The Hilbert transform assigns an instantaneous frequency to any signal, but that number is meaningful only when the signal is locally symmetric about zero with exactly one oscillation per zero crossing. Huang and colleagues formalized this as the intrinsic mode function (IMF): extrema and zero crossings differ in count by at most one, and the upper envelope (through the maxima) and lower envelope (through the minima) average to zero at every point. An IMF is a well-behaved oscillation with slowly varying amplitude and frequency, defined without ever naming a carrier frequency in advance.
Why insist on the zero-mean-envelope property? A signal riding on a slow trend gives the Hilbert transform a wildly swinging instantaneous frequency. The IMF condition guarantees the analytic signal traces a clean, mostly-positive-radius spiral in the complex plane, so differentiating its phase gives a trustworthy frequency. This is the crucial difference from Fourier: an IMF can change both amplitude and frequency from one cycle to the next, which a fixed sinusoid never does.
Sifting: the algorithm that manufactures an IMF
EMD extracts IMFs one at a time with an iterative procedure called sifting. Given a signal \(x(t)\), you find all local maxima and interpolate them with a cubic spline to form the upper envelope \(e_{\max}(t)\); do the same for the minima to get \(e_{\min}(t)\). Their mean is a local trend
$$m(t) = \tfrac{1}{2}\bigl(e_{\max}(t) + e_{\min}(t)\bigr),$$and the candidate detail is \(h(t) = x(t) - m(t)\). If \(h\) already satisfies the IMF conditions you stop; otherwise you treat \(h\) as the new signal and repeat.
Cubic splines are the standard envelope interpolant: lowest-order with continuous curvature, so no spurious kink masquerades as an oscillation. The cost is at the edges: a natural spline has no data past the first and last extremum to constrain its curvature, so it can overshoot and drag the whole envelope, and every IMF pulled from it, off the true signal. Implementations mirror the outermost extrema before fitting, then truncate back to the original length, but the effect never fully disappears; an instantaneous frequency read near an edge, including in the code below, deserves less trust.
Sifting is halted by a stoppage criterion, classically a Cauchy-type test on the normalized change between successive siftings,
$$\mathrm{SD} = \sum_{t} \frac{\lvert h_{k-1}(t) - h_{k}(t)\rvert^{2}}{h_{k-1}^{2}(t)} < \varepsilon,$$with \(\varepsilon\) commonly near 0.2 to 0.3. Once an IMF \(c_1(t)\) emerges, you subtract it, \(r_1(t) = x(t) - c_1(t)\), and sift the residual for the next, lower-frequency IMF. The loop ends when the residual becomes monotone or has too few extrema to interpolate. The result is a fully reconstructing decomposition
$$x(t) = \sum_{i=1}^{n} c_i(t) + r_n(t),$$where the IMFs \(c_i\) run from fastest to slowest oscillation and \(r_n\) is the residual trend. Unlike a filter bank, no band edges were chosen; the extrema of your data alone set the partition.
Key insight: adaptivity is a double-edged sword
Because the envelopes are recomputed from the data at every step, EMD adapts to a chirp, transient, or slow drift with no parameter tuning, but that dependence makes it fragile: a little noise moves the extrema, moves the splines, and can shift an oscillation from IMF 3 into IMF 4. This is mode mixing, the reason vanilla EMD is rarely deployed alone. Ensemble EMD (EEMD) and its refinement CEEMDAN (complete ensemble EMD with adaptive noise) fix this by adding many white-noise realizations and averaging across decompositions, so the noise cancels out while true components land in consistent IMFs. Most modern pipelines that say "EMD" mean EEMD or CEEMDAN.
From IMFs to the Hilbert spectrum
Decomposition is only half of the Hilbert-Huang transform. For each IMF \(c_i(t)\) you form the analytic signal \(z_i(t) = c_i(t) + j\,\mathcal{H}\{c_i\}(t) = a_i(t)\,e^{j\theta_i(t)}\), where \(\mathcal{H}\) is the Hilbert transform. The instantaneous amplitude is \(a_i(t) = \lvert z_i(t)\rvert\) and the instantaneous frequency is
$$\omega_i(t) = \frac{d\theta_i(t)}{dt}.$$Plotting amplitude (or its square, energy) against time and this instantaneous frequency produces the Hilbert spectrum \(H(\omega, t)\); integrating it over time gives the marginal spectrum, an energy-versus-frequency curve that earns its axis from local phase rather than global sinusoidal projection. Where a spectrogram (Section 7.2) smears energy across a window's worth of time and a bin's worth of frequency, the Hilbert spectrum can place a sharp ridge where the instantaneous frequency is, trustworthy only when the IMFs are clean (the callout below explains why).
Misconception: a sharper picture is not a more accurate one
It is tempting to read "no uncertainty-principle box" as frequency resolution for free. It has only swapped one assumption for another: the STFT trades time resolution for frequency resolution by fixing a window, quantifiable in advance, while the Hilbert spectrum assumes every IMF is narrowband enough that its instantaneous frequency is well defined at each instant, an assumption invisible on the plot that can silently fail wherever mode mixing has smuggled two oscillations into one IMF. A spectrum that looks impossibly crisp is at least as likely reporting a broken assumption as a genuine transient, so check a surprising ridge against the raw waveform first.
Practical example: catching a bearing fault that hides from the FFT
A wind-turbine gearbox streams a 25.6 kHz accelerometer. The outer-race fault frequency sits near 162 Hz, but rotor speed changes constantly, so a plain FFT smears that tone into an unreadable hump: the defect is nonstationary because the speed is. The condition-monitoring team runs CEEMDAN; the fault energy concentrates into the second and third IMFs, whose Hilbert spectrum shows a bright ridge tracking the 162 Hz line and its harmonics as they slide with rpm, days before the trend alarm in the vibration RMS would have fired. This is the nonstationary, modulated signature the predictive-maintenance workflows of Chapter 36 depend on, pairing naturally with the tools of Section 7.5.
Doing it in practice, and where the shortcut lives
Writing a correct sifting loop, with spline envelopes, boundary mirroring, and a defensible stoppage rule, is a day of careful work and a longer day of debugging edge effects. In practice you reach for a maintained library. The code below decomposes a two-tone chirp-plus-trend signal with CEEMDAN and reads off the first IMF's instantaneous frequency; the same eight lines replace roughly 150 lines of hand-rolled sifting, envelope interpolation, and ensemble bookkeeping.
import numpy as np
from PyEMD import CEEMDAN # pip install EMD-signal
from scipy.signal import hilbert
fs = 1000
t = np.arange(0, 2, 1 / fs)
# a rising chirp, a steady tone, and a slow drift, all superimposed
x = (np.sin(2*np.pi*(5 + 15*t)*t) # 5 -> 35 Hz chirp
+ 0.6*np.sin(2*np.pi*40*t) # steady 40 Hz tone
+ 0.3*t) # low-frequency trend
imfs = CEEMDAN().ceemdan(x, t) # data-driven; no band edges chosen
phase = np.unwrap(np.angle(hilbert(imfs[0])))
inst_freq = np.diff(phase) / (2*np.pi) * fs # instantaneous frequency, Hz
print(f"{imfs.shape[0]} IMFs; IMF-1 mean inst. freq "
f"{inst_freq[fs//4:-fs//4].mean():.1f} Hz")
Library shortcut: EMD-signal (PyEMD)
The EMD-signal package (imported as PyEMD) ships EMD, EEMD, and CEEMDAN with vetted spline envelopes, boundary mirroring, ensemble noise scaling, and tuned stoppage criteria: a correct from-scratch CEEMDAN is roughly 150 lines, here one constructor and one call. It also parallelizes the ensemble, which matters since CEEMDAN reruns EMD hundreds of times. Treat noise strength and trial count as the parameters you tune, and keep them fixed across a dataset, per the leakage-safe habits of Chapter 5.
When to reach for HHT, and when not to
Choose HHT when the signal is genuinely nonlinear or nonstationary and needs instantaneous behavior a fixed basis cannot express: swallowing and gait segments in a wearable inertial stream (Chapter 2 explains why), motor-unit bursts in EMG, speed-varying machine vibration, or the seismic and oceanographic records where HHT was born. Prefer a wavelet transform for a stable, orthogonal, invertible decomposition with an error bound, and the STFT for a fast, well-understood spectrogram of a stationary signal. EMD's weaknesses are real: no complete convergence theory, interpolation- and stoppage-dependent output, mode mixing that can scramble physical meaning, and compute-hungry ensembles. Use it where adaptivity buys something a fixed basis cannot, then validate every IMF against the physics.
Research frontier: replacing sifting without losing adaptivity
Sifting has no proof of convergence and no agreed stopping rule, which keeps EMD a target for replacement rather than refinement. Variational mode decomposition reframes the same goal as a convex optimization over a fixed number of bandlimited modes, trading adaptivity for a provable, non-iterative solution. A separate line trains neural networks to predict IMF-like components directly from raw sensor windows, folding sifting into a differentiable layer trainable end to end with a task such as fault classification, relevant to the architectures of Chapter 13. Multivariate EMD, sifting correlated sensor axes together so their IMFs stay phase-aligned, remains active for fusing accelerometer, gyroscope, and acoustic channels.
Exercise
Build a test signal: a 20 Hz tone for the first second, a 60 Hz tone for the second (a hard switch, not a blend). Decompose it with plain EMD, EEMD, and CEEMDAN, plotting the first two IMFs and marking where the 20 Hz and 60 Hz energy landed. Which method keeps the tones in separate, consistent IMFs, and which lets the switch bleed one tone across two? Add white noise at 10 dB SNR and repeat, explaining in terms of extrema placement why the ensemble methods degrade more gracefully.
Self-check
- State the two conditions for a signal to be an intrinsic mode function, and explain why the zero-mean-envelope condition makes its instantaneous frequency meaningful.
- What is mode mixing, and by what mechanism does adding white noise in EEMD or CEEMDAN reduce it rather than make it worse?
- The Hilbert spectrum can look sharper than a spectrogram of the same signal. Give one reason the sharpness is genuine and one reason it can be an artifact.
What's Next
In Section 7.5, we turn to cepstral and envelope analysis, the workhorse pair for machines with periodic structure. Where HHT chases instantaneous frequency, the cepstrum unwraps periodicities-of-periodicities to expose gear-mesh sidebands and harmonic families, and envelope demodulation isolates the impulsive signature of a spalling bearing. Together they complete the rotating-machinery toolkit that this section only opened.