S7 · Lesson 40 · The discrete Hilbert transform
The ideal 90° phase shifter, its impulse response and FIR approximations, analytic signals, envelopes and instantaneous frequency, and single-sideband modulation
A real signal's spectrum always has a mirror image at negative frequencies, which carries no new information but gets in the way: it's why multiplying by a carrier gives two sidebands, and why a signal's envelope can't simply be read off its samples. The Hilbert transform shifts every positive frequency by −90° and every negative one by +90°. Combine a signal with its Hilbert transform as real and imaginary parts and the negative frequencies cancel, leaving the analytic signal, whose magnitude is the envelope and whose phase gives the instantaneous frequency. Radios use it for single-sideband transmission, and every envelope detector in software uses it.
- An amplitude-modulated carrier (solid) and the magnitude of its analytic signal (dashed), which traces the envelope exactly while the modulation is slow compared with the carrier.
- The envelope follows the peaks smoothly, with no ripple at the carrier frequency, which is what a rectifier and lowpass filter can only approximate.
- Push the modulation index past 1 and the "envelope" becomes |1 + m cos Ωn|: the analytic signal reports magnitude, so overmodulation shows as folding.
Predict
A tone cos(ω₀n) passes through an ideal Hilbert transformer. What comes out?
sin(ω₀n). The transformer multiplies positive frequencies by −j and negative ones by +j: , a 90° delay of every component with no change in amplitude. Then cos + j sin = : the analytic signal of a cosine is a single complex exponential at positive frequency.
Name it
The ideal Hilbert transformer
Noncausal and infinitely long, so it's approximated by a delayed, windowed FIR filter: antisymmetric, so Type III (odd length, zeros at 0 and π) or Type IV (even length, zero at 0). No FIR Hilbert transformer works all the way down to DC; a Type III one can't work at π either. Truncation causes Gibbs ripple: keeping only the taps at ±1 and ±3 gives the amplitude , which is 0.849 at π/2 against the ideal 1.
The analytic signal
has for 0 < ω < π and zero for negative frequencies. Then
- envelope: ;
- instantaneous phase: , and instantaneous frequency: its rate of change.
For two tones of amplitudes A and B, the envelope at a moment when they differ in phase by φ is .
Single sideband
With a message x and its Hilbert transform, contains only the upper sideband (the + sign gives the lower), using half the bandwidth of double-sideband AM.
Causal sequences
For a causal sequence, the real and imaginary parts of the DTFT are a Hilbert pair; for a minimum-phase system, so are the log magnitude and the phase (lesson 13). A magnitude response therefore determines the minimum-phase response completely.
Worked example
What are the first taps of the ideal Hilbert transformer, and how far does a 4-tap approximation fall short at π/2?
Show the solution
- The ideal taps. and every even tap is zero.
- Four taps at π/2. Keeping ±1 and ±3 gives instead of 1.
- At π/4. It overshoots to 1.200.
- Longer filters. Longer, windowed filters approach 1 across most of the band.
Answer the first taps are ±0.637 at n = ±1 and ±0.212 at n = ±3, with the even taps zero; the 4-tap version reaches only 0.849 at π/2 instead of 1.
Worked example
Two tones of amplitude 1 and 0.5 beat together. Between what values does the envelope swing?
Show the solution
- Envelope.
- Its range. It ranges from 1.5 (in phase) to 0.5 (in antiphase), swinging at the difference frequency.
- Single sideband. A 1 kHz message on a 100 kHz carrier, sent upper sideband, occupies only 101 kHz; double sideband would use 99 to 101 kHz.
Answer the envelope swings between 0.5 and 1.5.
Worked example
An analytic signal's phase is 0.30 rad at one sample and 0.55 rad at the next, at 8 kHz. What is the instantaneous frequency?
Show the solution
- Phase step. The phase advanced 0.55 − 0.30 = 0.25 rad in one sample.
- Frequency.
- Uses. Tracking this sample by sample demodulates FM and measures chirps; it needs the analytic signal because the real signal alone doesn't define a phase.
Answer 318 Hz.
Check
What's tap h[3] of the ideal Hilbert transformer?
Check
A Hilbert transformer keeps only the taps at ±1 and ±3. What's its amplitude at ω = 0.785?
Check
Two tones of amplitudes 1 and 0.3 are 120° apart in phase at some instant. What's the envelope there?
Check
cos(1.1n) passes through an ideal Hilbert transformer. What's the output at n = 3?
Check
A 1 kHz tone modulates a 455 kHz carrier by . At what frequency is the output?
Write units the way you normally would: 1.5 kHz, 1500 Hz and 0.0015 MHz are the same answer.
Check
An overmodulated AM signal is at a moment where cos Ωn = −1. What envelope does the analytic signal report?
Check
Two tones of amplitudes 1 and 0.3 at 1.05 kHz and 1.2 kHz add.
(a)
What is the envelope's maximum?
(b)
What is its minimum?
(c)
How often does it repeat?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
Check
Two tones of amplitudes A and B differ in phase by p at some instant.
Step 1
What is the envelope?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is its largest possible value?
Step 3
And its smallest?
Explain why
Why does combining a signal with its Hilbert transform remove the negative frequencies?
A real signal's spectrum has matching components at +ω and −ω, which is what keeps the signal real. The Hilbert transformer multiplies the positive-frequency components by −j and the negative ones by +j. Forming multiplies the Hilbert output by another j, so the positive-frequency parts become while the negative-frequency parts become . The negative half of the spectrum cancels exactly, leaving a complex signal whose spectrum is one-sided. Its magnitude no longer contains the carrier's oscillation, because a single rotating phasor has a constant length, which is why it measures the envelope directly.
Practice
Keep practicing
10 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.