HuntsvilleEngineers mark
HE Reference Shelf — huntsvilleengineers.com
The Reference Shelf · Analysis & Transforms

Hilbert transform

A filter that shifts every frequency in a signal by 90 degrees, so you can pair the original with its shifted twin and read off amplitude and phase directly.

Also known as: analytic signal · quadrature filter · envelope detection · 90-degree phase shifter

The formula

The Hilbert transform of a real signal x(t) is a convolution with 1/(πt), taken as a Cauchy principal value because the kernel blows up at τ = t:

H[x](t) = (1/π) · P.V. ∫  x(τ) / (t − τ) dτ      (integral over −∞ to +∞)

Reading: at every instant, mix in a weighted average of the whole signal, weighting nearby samples heavily and with opposite sign on each side. The P.V. means you approach the singularity symmetrically and let the two sides cancel.

The transform is far easier to read in the frequency domain. If X(ω) is the Fourier transform of x(t), then

F{ H[x] }(ω) = −j · sgn(ω) · X(ω)

Reading: leave every amplitude alone (the multiplier has magnitude 1) and rotate the phase by −90° for positive frequencies and +90° for negative ones. That is the whole operation — a pure phase shifter, no gain, no attenuation.

The two identities that make it click, for ω > 0:

H[ cos(ωt) ] = sin(ωt)
H[ sin(ωt) ] = −cos(ωt)

Reading: cosine becomes sine, sine becomes minus cosine. Apply it four times and you are back where you started.

The payoff is the analytic signal — glue the original to its transform as a complex signal:

z(t) = x(t) + j · H[x](t)

Reading: z(t) has only positive-frequency content. Its magnitude |z(t)| is the instantaneous envelope, and the time-derivative of its angle is the instantaneous frequency.

Where you meet it

  • Envelope detection on a vibration or acoustic test stand. You have an amplitude-modulated carrier — a bearing tone whose loudness swells and fades with a defect passing frequency. Take the analytic signal, take |z(t)|, and you have the envelope with no rectifier and no low-pass smearing. This is the backbone of envelope analysis for rolling-element bearing diagnostics.
  • Instantaneous frequency in a chirp or Doppler return. On a radar or sonar bench, a linear chirp sweeps frequency over the pulse. The analytic signal's phase derivative gives you frequency versus time directly, so you can check the sweep rate and spot nonlinearity in the LO.
  • SSB transmitter design at a review board. Single-sideband modulation kills one of the two mirror-image sidebands to save spectrum and power. The phasing method builds it with a Hilbert transformer: shift the audio 90°, shift the carrier 90°, add or subtract, and one sideband cancels. When the board asks "how are we suppressing the unwanted sideband," the Hilbert 90° network is the answer.
  • Kramers–Kronig checks on a measured response. For any causal, stable network — an amplifier, a dielectric, an antenna — the real and imaginary parts of the frequency response are a Hilbert transform pair. If your measured magnitude and phase don't obey that relation, the measurement or the model is wrong.

How it works

The Hilbert transform is best understood as the imaginary partner that turns a real signal into a one-sided spectrum. A real signal always carries redundant negative-frequency content — its spectrum is conjugate-symmetric. The analytic signal z(t) throws away the negative half and doubles the positive half, so its magnitude and phase mean exactly what you want: envelope and instantaneous phase.

The single most common mistake is trusting envelope and instantaneous frequency on a signal that isn't narrowband. The clean interpretation — |z(t)| is the envelope — only holds when the amplitude modulation is slow compared to the carrier and the two occupy separate frequency bands. That separation is exactly the condition in Bedrosian's theorem: H[a(t)·cos(ωt)] = a(t)·H[cos(ωt)] only when the envelope a(t) and the carrier have non-overlapping spectra. Feed a broadband signal into the same machinery and the "instantaneous frequency" can go negative, which is physically meaningless and a sign you've left the region where the tool is valid.

Numerically, nobody integrates the principal value directly. The standard route is an FFT: transform, zero the negative-frequency bins, double the positive bins, keep DC and Nyquist as-is, and inverse transform. The imaginary part of the result is H[x], the whole thing is z(t). This is what MATLAB's hilbert() and SciPy's scipy.signal.hilbert do — note both return the analytic signal, not just the transform, which trips people up. A word on accuracy: for a 200 Hz tone modulated by a 5 Hz envelope at fs = 10 kHz in a 1 s record, the FFT method recovers the true envelope to within about 2×10⁻¹³ — but only because that record holds an integer number of cycles of both components, so the FFT's implicit periodic extension is exact (coherent sampling). Shorten the same signal to a 0.9973 s record and the interior envelope error jumps to about 4×10⁻³ even after trimming 5% off each end, and is still near 1×10⁻³ with 20% trimmed — the spectral leakage from the truncated envelope penetrates deep into the record, not just the edges. A test-stand record is essentially never coherently sampled, so expect the FFT method's real-world envelope error to be leakage-limited, typically 10⁻³ to 10⁻⁴ of the envelope even well inside the record; you reduce it by windowing or by taking records long relative to the envelope period, not by trimming alone.

The gotchas are all at the edges and in real time:

  • Edge transients. The FFT method assumes periodicity, so the first and last samples ring hardest. Trim the ends or window before you trust the envelope — but remember trimming only removes the worst of the ringing; the leakage floor described above remains throughout the record.
  • No causal ideal filter. The exact Hilbert transform is non-causal — it needs the whole signal, past and future. A real-time FIR Hilbert transformer is an odd-length antisymmetric filter that approximates the 90° shift over a passband, with a bulk delay of half the filter length. It can't hold 90° down to DC or up to Nyquist, so the usable band is always a subset.
  • Bandpass first. Envelope analysis works because you band-pass around the resonance of interest before transforming. Skip that and Bedrosian's condition is violated from the start.

The deep reason it shows up everywhere: causality in time forces a relationship between real and imaginary parts in frequency. That is the same math whether you call it the analytic signal, the Kramers–Kronig relations in optics and network theory, or the minimum-phase condition — all three are the Hilbert transform wearing different hats.

History

The transform is named for David Hilbert (1862–1943), who ran into it around 1905 while working on a boundary-value question that Riemann had posed about analytic functions — what is now called the Riemann–Hilbert problem [1][2]. Hilbert's version lived on the circle rather than the real line, and it was the discrete case he lectured on at Göttingen; those lecture results reached print through Hermann Weyl's dissertation [1][2]. Hilbert himself was chasing integral equations, not signals — the engineering uses were decades away.

The name came from across the Channel. The British mathematician G. H. Hardy attached Hilbert's name to the transform in tribute to that early work, and Hardy, along with E. C. Titchmarsh through the 1920s, worked out much of its analytic machinery [2]. The result that made it a serious tool came in 1928, when Marcel Riesz proved the transform is a bounded operator on L^p for every p strictly between 1 and infinity [1][2]. That boundedness is not a footnote — it is the guarantee that the transform of a finite-energy signal is itself a well-behaved finite-energy signal, and it later made the Hilbert transform the founding example for Calderón and Zygmund's theory of singular integrals, which underpins much of modern harmonic analysis [1].

The signal-processing life of the transform arrived later still, when radio engineers needed a 90° phase shifter to build single-sideband transmitters and, later, when the analytic signal gave a rigorous way to talk about the envelope and instantaneous frequency of a modulated waveform.

Related tools

Sources

  1. https://en.wikipedia.org/wiki/Hilbert_transform
  2. F. W. King, *Hilbert Transforms, Vol. 1*, Cambridge University Press, 2009, ch. 1 — https://doi.org/10.1017/CBO9780511721458
  3. https://dlmf.nist.gov/1.14
  4. https://ccrma.stanford.edu/~jos/st/Analytic_Signals_Hilbert_Transform.html
  5. https://www.mathworks.com/help/signal/ug/single-sideband-modulation-via-the-hilbert-transform.html

Written by HE in our own words from the cited sources — engineering judgment included, your stamp still required. All entries →

★ The Reference Shelf

Reading is free. The shelf is for cardholders.

Your library card is an email address: pin it to your shelf, print the card, take the FE/PE quick-reference pack, read the Huntsville history. The shelf remembers what you reach for.

Already on the list? Enter with your subscribed email →