Introduction

Tune an old AM radio and you hear a voice riding on a high-frequency carrier wave. The voice is the envelope — the slow shape that squeezes and stretches the fast oscillation. Engineers have known for a century that extracting that envelope is the key to demodulating the signal. But what mathematical operation peels the envelope away from the carrier?

The answer is the Hilbert transform, introduced by David Hilbert in the early twentieth century. It shifts every frequency component of a signal by exactly 90 degrees — turning every cosine into a sine, every sine into a negative cosine — without changing any amplitudes. From that phase-shifted copy, called the quadrature signal, you can reconstruct an envelope that tracks the signal's instantaneous strength, and a phase whose rate of change gives you the instantaneous frequency.

Together, the original signal x(t)x(t) and its Hilbert transform x^(t)\hat{x}(t) form the analytic signal: the complex-valued function z(t)=x(t)+ix^(t)z(t) = x(t) + i\,\hat{x}(t). Its magnitude z(t)|z(t)| is the envelope; its argument argz(t)\arg z(t) is the instantaneous phase. This single construction lies at the heart of AM demodulation, seismic analysis, biomedical signal processing, and much of modern communications.

Track the Envelope

The canvas below shows a tone whose amplitude is modulated by a slow sinusoid. The blue curve is the raw signal x(t)x(t); the orange curve is the envelope z(t)|z(t)| recovered via the Hilbert transform. Use the sliders to change the carrier frequency and the modulation depth — watch the envelope cling to the peaks of the carrier no matter how you tune it.

<!-- {{c_html_intro}} -->
<div class="controls">
  <label>{{lbl_carrier}} <span id="fc-val"></span> Hz
    <input type="range" id="fc" min="4" max="20" value="10" step="1">
  </label>
  <label>{{lbl_mod}} <span id="mod-val"></span>%
    <input type="range" id="mod" min="0" max="100" value="60" step="5">
  </label>
</div>
<canvas id="cv" width="560" height="280"></canvas>
<div class="legend">
  <span class="dot blue"></span> {{leg_signal}}
  <span class="dot orange"></span> {{leg_envelope}}
</div>
<p class="note" id="note"></p>
/* {{c_css_intro}} */
* { box-sizing: border-box; }
body { font-family: system-ui, sans-serif; margin: 0; color: #222; }
.controls { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .6rem; }
label { font-size: .88rem; display: flex; align-items: center; gap: .5rem; }
input[type=range] { flex: 1; accent-color: #1d3557; }
canvas { display: block; width: 100%; max-width: 560px; border: 1px solid #cdd9e3;
         border-radius: 8px; background: #f8fafc; }
.legend { font-size: .82rem; display: flex; gap: 1rem; margin-top: .4rem; align-items: center; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.dot.blue { background: #1d6fa5; }
.dot.orange { background: #e07020; }
.note { font-size: .82rem; color: #555; margin: .4rem 0 0; min-height: 1.2em; }
// Code not found

Notice that the envelope never dips below zero and always touches the absolute peaks of the carrier. When modulation depth is 100 % the signal briefly touches zero — complete suppression. That moment corresponds to a π\pi-radian jump in the instantaneous phase, a signature the Hilbert transform detects cleanly.

The Real Math

What does it mean to shift every frequency by exactly 90 degrees?

  • In the time domain, the Hilbert transform is a convolution with the kernel h(t)=1πth(t) = \dfrac{1}{\pi t}. Because this kernel is not square-integrable, the integral must be taken as a Cauchy principal value — which is why the transform existed in analysis long before it was given an engineering name.
  • In the frequency domain, it is multiplication by isgn(f)-i \cdot \operatorname{sgn}(f): positive frequencies are multiplied by i-i (a 90°-90° rotation), negative frequencies by +i+i. This is a pure phase operation; no amplitude is changed.
  • Building the analytic signal: set the negative-frequency content of the spectrum to zero and double the positive side. The result, inverse-transformed back to the time domain, is z(t)=x(t)+ix^(t)z(t) = x(t) + i\,\hat{x}(t), whose real part recovers x(t)x(t) exactly.
  • Instantaneous amplitude and frequency: the envelope is A(t)=z(t)=x(t)2+x^(t)2A(t) = |z(t)| = \sqrt{x(t)^{2} + \hat{x}(t)^{2}}, and the instantaneous frequency is fi(t)=12πddtargz(t)f_i(t) = \dfrac{1}{2\pi}\dfrac{d}{dt}\arg z(t).

The transform was fully characterized by David Hilbert around 1905 in his work on integral equations, and independently found useful by electrical engineers studying single-sideband modulation in the 1920s. It is not "computationally hard" in the complexity-theory sense — the FFT computes it in O(nlogn)O(n \log n) — but its conceptual depth is substantial: it connects Fourier analysis with complex analysis, turning a real signal into a rotating phasor in the complex plane.

Where It Matters

Anywhere a signal is a fast oscillation whose strength or pitch changes slowly, the analytic signal is the right tool:

  • AM radio demodulation: the classic application. The envelope z(t)|z(t)| is the audio, recoverable without a phase-locked carrier reference.
  • Seismology: body-wave envelopes reveal the energy arrival pattern of earthquakes independent of the carrier frequency of the waves.
  • Biomedical signals: ECG R-peak detection and EEG band-power estimation both use the Hilbert envelope to track signal energy over time.
  • Radar and sonar: pulse envelopes determine range resolution; instantaneous frequency tracks Doppler shifts.
  • Speech and music: empirical mode decomposition (EMD) and the Hilbert-Huang transform decompose complex audio into intrinsic mode functions, each with a meaningful envelope and frequency track.
  • Optical coherence tomography: the coherence envelope of a broadband light source locates tissue boundaries with micron precision.

The transform also underpins single-sideband (SSB) modulation — one of the most bandwidth-efficient radio schemes ever devised — and feeds directly into the Fourier machinery that runs on every digital signal processor made today.

Conclusion

The Hilbert transform answers a deceptively simple question: if a signal is a fast oscillation riding on a slow shape, how do you read the shape? The answer — shift every frequency by 90 degrees, form the analytic signal, and take its magnitude — is elegant, computationally cheap, and mathematically deep. It connects Cauchy's principal-value integrals, Fourier duality, and the geometry of the complex plane in a single formula.

The next time you hear a voice on AM radio, watch a seismogram trace the arrival of P-waves, or see an ECG machine highlight heartbeats, you are looking at the Hilbert transform at work. A century-old piece of pure mathematics, quietly running inside nearly every signal-processing pipeline on the planet.

Share this article

Pick a channel — or use your device's native share sheet.

Comments

Loading comments...

https://www.kipuhub.com/en/article/hilbert-transform-envelope/Content licensed under CC BY-NC 4.0.