Search

Search papers and lessons

Intrinsic Mode Function

Level 4 · 11 min read

An intrinsic mode function is a piece of a signal that wiggles around zero with one wave per cycle and no slow trend hidden under it, so its instantaneous frequency has a clear meaning.

On this page

  • Colour = topic mix
  • Calculus
  • Discrete math
  • Signal processing
  • Linear algebra
  • Architectures
  • Abstract algebra
  • ReadReady to readNot yet

TL;DR

An intrinsic mode function (IMF) is one piece of a signal that wiggles around zero, with one wave per cycle and no slow trend hidden under it. Two tests define it: the number of turning points and the number of zero crossings differ by at most one, and the average of the curves through the peaks and the troughs is zero at every moment. A piece that passes both tests has a frequency that means something at each instant.

Builds on: Instantaneous Frequency, Cubic Spline Interpolation · Leads to: Empirical Mode Decomposition

Where it's used

Vibration diagnosis of rotating machines. A gearbox or bearing rings at frequencies that follow its speed, and a crack adds short bursts. Splitting a recording into IMFs puts the speed-driven tone and the bursts into different pieces. Each piece is close to a single tone, so an engineer can read its frequency over time and see which part moves with speed.

Ocean, climate and river records. A sea-level or river-flow series mixes fast waves, a seasonal cycle and a slow multi-year trend. Decomposing it into IMFs gives one piece per time scale, and the slowest piece is the trend. Researchers compare the same piece across years to see whether a cycle has shifted.

Speech and music analysis research. A sung note with vibrato, or a voice whose pitch slides, contains a tone that changes all the time. Taking the IMF that holds that tone lets a researcher follow its pitch moment by moment, instead of getting one average frequency for the whole sound.

How it works

Follow one tiny record from a raw signal to a piece that passes both tests. The record is y(t)=cos⁡(2πt)+2y(t)=\cos(2\pi t)+2 for 0≤t≤20 \le t \le 2: a one-cycle-per-second wave sitting on a constant height of 2.

  1. Start with a tone on an offset. Evaluate the signal at two times. At t=0t=0, y=1+2=3y=1+2=3. At t=0.5t=0.5, y=−1+2=1y=-1+2=1. Check: the wave swings between 1 and 3, centred on 2.
  2. Find the peaks and troughs. Count only what lies inside the record, including its two ends. Peaks are at t=0,1,2t=0, 1, 2 with height 3. Troughs are at t=0.5,1.5t=0.5, 1.5 with height 1. Check: five turning points in total.
  3. Draw the envelopes. Pass a smooth curve through the peaks to get the upper envelope emax⁡(t)e_{\max}(t), and another through the troughs to get the lower envelope emin⁡(t)e_{\min}(t). Every peak is at height 3, so emax⁡(t)=3e_{\max}(t)=3. Every trough is at height 1, so emin⁡(t)=1e_{\min}(t)=1. Check: both envelopes are flat lines.
  4. Take the mean of the two envelopes. The mean is (3+1)/2=2(3+1)/2 = 2. Check: this is exactly the offset we saw in step 1.
  5. Subtract the mean. The candidate is h(t)=y(t)−2=cos⁡(2πt)h(t)=y(t)-2=\cos(2\pi t). Check: hh now swings between +1+1 and −1-1 around zero.
  6. Test the two conditions. On 0≤t≤20 \le t \le 2, hh has five turning points (at 0, 0.5, 1, 1.5, 2). Its zero crossings are at 0.25, 0.75, 1.25 and 1.75, four in all. Five and four differ by one, so the first test passes. The envelopes of hh are the flat lines ±1\pm 1, whose mean is 0, so the second test passes. Check: hh is an IMF.
  7. Read its frequency. The phase of hh is 2πt2\pi t, which gains 2π2\pi per second, so the frequency is 1 cycle per second. Check: this is the tone we started with. The offset did not change it.
00.511.52−10123theight
  • y, the record
  • h, the candidate
  • mean
Subtracting the mean (dashed) lifts the wave back to zero. The points are the peaks and troughs that the envelopes pass through.

The seven steps are one pass of a loop that the Empirical Mode Decomposition lesson repeats until the candidate passes:

flowchart LR
  A[Candidate signal] --> B[Find peaks and troughs]
  B --> C[Upper and lower envelopes]
  C --> D[Mean of the two envelopes]
  D --> E[Subtract the mean]
  E --> F{Both tests pass}
  F -- no --> A
  F -- yes --> G[Intrinsic mode function]

The math

Definition: Intrinsic mode function (IMF)

A function c(t)c(t) on a record is an intrinsic mode function when two conditions hold. First, the number of extrema and the number of zero crossings differ by at most one. Second, the mean of its upper and lower envelopes is zero at every time. Together they say the function oscillates around zero with one wave per cycle, with no slow trend riding underneath.

Step 2 in symbols: counting the turning points

Let NextN_{\text{ext}} be the number of extrema (peaks and troughs) of cc on the record, and NzcN_{\text{zc}} the number of times cc crosses zero. For the walkthrough candidate, Next=5N_{\text{ext}}=5 and Nzc=4N_{\text{zc}}=4.

Step 3 in symbols: the envelopes and the mean

Let emax⁡(t)e_{\max}(t) be the cubic spline through the points (tj,c(tj))(t_j, c(t_j)) at the peaks, and emin⁡(t)e_{\min}(t) the cubic spline through the troughs. The mean of the envelopes is

m(t)=emax⁡(t)+emin⁡(t)2.m(t)=\frac{e_{\max}(t)+e_{\min}(t)}{2}.

The candidate after one subtraction is h(t)=c(t)−m(t)h(t)=c(t)-m(t).

Steps 5 and 6 in symbols: the two tests

∣Next−Nzc∣≤1andemax⁡(t)+emin⁡(t)2=0 for every t.\left|N_{\text{ext}}-N_{\text{zc}}\right| \le 1 \qquad\text{and}\qquad \frac{e_{\max}(t)+e_{\min}(t)}{2}=0 \text{ for every } t.

For h(t)=cos⁡(2πt)h(t)=\cos(2\pi t) on 0≤t≤20 \le t \le 2, the first test gives ∣5−4∣=1≤1|5-4|=1 \le 1. Both envelopes are ±1\pm 1, so m(t)=0m(t)=0 everywhere.

Step 7 in symbols: why the frequency is well defined

For an IMF cc, form its analytic signal c(t)+i H[c](t)c(t)+i\,\mathcal{H}[c](t), where H\mathcal{H} is the Hilbert transform (the Analytic Signal lesson builds this). Write it as a(t)eiθ(t)a(t)e^{i\theta(t)}, with amplitude a(t)a(t) and phase θ(t)\theta(t). The instantaneous frequency is

f(t)=12πdθdt.f(t)=\frac{1}{2\pi}\frac{d\theta}{dt}.

For c(t)=cos⁡(2πt)c(t)=\cos(2\pi t), the Hilbert transform is sin⁡(2πt)\sin(2\pi t), so θ(t)=2πt\theta(t)=2\pi t and f(t)=12π⋅2π=1f(t)=\frac{1}{2\pi}\cdot 2\pi = 1. The first test keeps the wave from hiding extra turns inside one cycle, and the second keeps a slow trend out of the phase. Together they make a single, readable f(t)f(t) possible. Without them the phase can jump around and the frequency reading is not meaningful.

Worked examples

Example
1. Tiny: a cosine with no offset
  1. Take the signal s(t)=3cos⁡(2πt)s(t)=3\cos(2\pi t) on 0≤t≤20 \le t \le 2.
  2. Turning points: peaks at t=0,1,2t=0, 1, 2 with height 3, and troughs at t=0.5,1.5t=0.5, 1.5 with height −3-3. That is 5 extrema.
  3. Envelopes: every peak is at 3, so emax⁡=3e_{\max}=3. Every trough is at −3-3, so emin⁡=−3e_{\min}=-3.
  4. Mean of the envelopes: (3+(−3))/2=0(3+(-3))/2=0 at every time. The second test passes.
  5. Zero crossings: at t=0.25,0.75,1.25,1.75t=0.25, 0.75, 1.25, 1.75, which is 4. Then ∣5−4∣=1|5-4|=1, so the first test passes.
  6. Both tests hold, so ss is an IMF. Its amplitude of 3 does not matter. The test looks only at the shape and at the balance of the envelopes.
Example
2. Standard: a sine over two full waves
  1. Take sin⁡t\sin t on 0≤t≤4π0 \le t \le 4\pi, which is two full cycles.
  2. Interior extrema are at t=π/2, 3π/2, 5π/2, 7π/2t=\pi/2,\ 3\pi/2,\ 5\pi/2,\ 7\pi/2. That is 4 extrema. The two ends are zeros of the sine, not turning points, so they do not count as extrema.
  3. Zero crossings in the record, ends included: t=0, π, 2π, 3π, 4πt=0,\ \pi,\ 2\pi,\ 3\pi,\ 4\pi. That is 5.
  4. Then ∣4−5∣=1|4-5|=1, so the first test passes.
  5. Every peak is at +1+1 and every trough is at −1-1, so the envelopes are the constant lines ±1\pm 1 and their mean is 0. The second test passes.
  6. So sin⁡t\sin t is an IMF. Its phase is θ(t)=t\theta(t)=t, so f=12π⋅1=12π≈0.159f=\frac{1}{2\pi}\cdot 1=\frac{1}{2\pi}\approx 0.159 cycles per unit of tt.
Example
3. Realistic: a vibration record with a sensor offset

A sensor on a motor records y(t)=0.5cos⁡(6πt)+2y(t)=0.5\cos(6\pi t)+2 over one second, 0≤t≤10 \le t \le 1. The 2 is a sensor offset. The 0.5 cosine is a speed-driven tone with 3 cycles per second.

  1. Turning points. Peaks where 6πt=2kπ6\pi t=2k\pi are at t=0, 1/3, 2/3, 1t=0,\ 1/3,\ 2/3,\ 1, four peaks at height 0.5+2=2.50.5+2=2.5. Troughs where 6πt=(2k+1)π6\pi t=(2k+1)\pi are at t=1/6, 1/2, 5/6t=1/6,\ 1/2,\ 5/6, three troughs at height −0.5+2=1.5-0.5+2=1.5.
  2. Envelopes: emax⁡=2.5e_{\max}=2.5 and emin⁡=1.5e_{\min}=1.5, both flat.
  3. Mean of the envelopes: (2.5+1.5)/2=2(2.5+1.5)/2=2. That is the sensor offset.
  4. Subtract it: the candidate is h(t)=0.5cos⁡(6πt)h(t)=0.5\cos(6\pi t).
  5. Turning points of hh on 0≤t≤10 \le t \le 1: 4+3=74+3=7. Zero crossings solve 6πt=π/2+kπ6\pi t=\pi/2+k\pi, so t=1/12+k/6t=1/12+k/6. The values inside the record are k=0,…,5k=0,\dots,5, giving 6 crossings. Then ∣7−6∣=1|7-6|=1, so the first test passes, and the envelopes are ±0.5\pm 0.5 with mean 0, so the second passes.
  6. Try it: what is the instantaneous frequency of hh, in cycles per second? Answer: 3. The phase is θ(t)=6πt\theta(t)=6\pi t, so dθdt=6π\frac{d\theta}{dt}=6\pi and f=6π2π=3f=\frac{6\pi}{2\pi}=3.

Common mistakes and tradeoffs

It is tempting to think that an IMF is a band of frequencies, such as "the part between 2 and 5 cycles per second." In fact an IMF is defined by its shape and its envelopes, not by a frequency window, because the second test looks at the envelope mean at every moment. A wave can be strongly non-sinusoidal, with sharp peaks and flat troughs, and still be an IMF if both tests pass.

It is tempting to think that a record whose overall average is zero must be an IMF. In fact the second test is local. A trend that climbs from −1-1 to +1+1 over the record makes the local mean climb with it, so the record averages to zero overall yet has a local mean far from zero at most times.

It is tempting to think that the instantaneous frequency of any IMF is a real physical frequency. In fact it is trustworthy only when the wave is close to one tone. Messy waves in which two tones merge into one piece, a problem called mode mixing, can give a frequency that jumps.

Use the IMF idea when the signal is non-stationary (its frequency changes over time) and you do not want to fix the sine shapes in advance. Do not use it for steady tones that a Fourier transform handles cleanly, or for very short noisy records where the peaks and troughs are unreliable. In practice the second test is approximate, so the decomposition needs a stopping rule.

ToolBasis functionsGood atWeak at
Fourier transformFixed sines and cosinesSteady tonesFrequency that changes over time
Wavelet transformA fixed shape, scaled and shiftedSudden changesChoosing the shape in advance
IMF decompositionLearned from the dataChanging frequency, no fixed basisNo exact uniqueness, mode mixing

History

Before the late 1990s, most time-frequency tools used bases fixed in advance: sines and cosines in the Fourier transform, or a chosen wavelet shape. Those choices either spread a sudden change across the whole spectrum or assumed a structure the signal might not have. In 1998 Norden E. Huang and co-authors published the empirical mode decomposition in Proceedings of the Royal Society A, defining intrinsic mode functions and pairing them with a frequency measure from the Hilbert transform, which they called the Hilbert spectrum. The idea spread through geophysics, engineering and biomedical research. Later work addressed its weak points, especially mode mixing and the noise sensitivity of the repeated subtraction step.

Recap

  • A candidate piece is an IMF when its turning points and zero crossings differ by at most one, and its envelope mean is zero at every time.
  • The envelopes come from cubic splines through peaks and troughs. Subtracting their mean centres the candidate on zero.
  • For an IMF, the phase of the Analytic Signal gives one instantaneous frequency that can be read at each time.
  • Next, Empirical Mode Decomposition repeats the subtraction until a piece passes both tests, and then peels it off.

Check yourself

QuestionRecall: what are the two tests an intrinsic mode function must pass?Show answer

First, the number of extrema and the number of zero crossings differ by at most one. Second, the mean of the upper and lower envelopes is zero at every time. The first test limits the wiggles per cycle. The second removes any slow trend riding underneath.

QuestionCompute: the record y(t)=cos⁡(2πt)+4y(t)=\cos(2\pi t)+4 on 0≤t≤20 \le t \le 2 is passed through one sifting step. What is the mean of its envelopes?Show answer

The peaks are at height 1+4=51+4=5 and the troughs at height −1+4=3-1+4=3. The envelopes are the flat lines 5 and 3, so their mean is (5+3)/2=4(5+3)/2=4.

QuestionWhy: the record y(t)=cos⁡(2πt)+(t−1)y(t)=\cos(2\pi t)+(t-1) on 0≤t≤20 \le t \le 2 averages to zero over the whole record. Why is that not enough to make it an IMF?Show answer

The second test is local: the envelope mean must be zero at every moment. The added drift t−1t-1 climbs from −1-1 to +1+1, so the local mean follows it and is away from zero at most times. An overall average of zero does not make the local mean zero.

QuestionApplied: a seismometer record shows a steady sinusoid riding on a slow upward ramp, and you want the sinusoid's frequency. Should you read the frequency from the raw record, or first remove the ramp and test the candidate? Why?Show answer

Remove the ramp first, by taking the envelope mean and subtracting it, then run both tests. Only a candidate that passes can be read as one meaningful instantaneous frequency. Reading the raw record would let the ramp distort the phase, so the reading would not describe the sinusoid.

Sources