S740 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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 x=(1+mcos⁡Ωn)cos⁡ωcn (solid) and the magnitude of its analytic signal |x+jx^| (dashed), which traces the envelope 1+mcos⁡Ωn 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?

Name it

The ideal Hilbert transformer

H(ejω)={−j,0<ω<πj,−π<ω<0,h[n]={2πn,n odd0,n even

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 4π(sin⁡ω+13sin⁡3ω), which is 0.849 at π/2 against the ideal 1.

The analytic signal

xa[n]=x[n]+jx^[n] has Xa(ejω)=2X(ejω) for 0 < ω < π and zero for negative frequencies. Then

  • envelope: |xa[n]|;
  • instantaneous phase: arg⁡xa[n], 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 A2+B2+2ABcos⁡ϕ.

Single sideband

With a message x and its Hilbert transform, xcos⁡ωcn−x^sin⁡ωcn=Re{xaejωcn} 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
  1. The ideal taps. h[±1]=±2/π=±0.637h[±3]=±0.212 and every even tap is zero.
  2. Four taps at π/2. Keeping ±1 and ±3 gives A(π/2)=4π(1−13)=0.849 instead of 1.
  3. At π/4. It overshoots to 1.200.
  4. 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
  1. Envelope. E=1+0.25+cos⁡ϕ
  2. Its range. It ranges from 1.5 (in phase) to 0.5 (in antiphase), swinging at the difference frequency.
  3. 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
  1. Phase step. The phase advanced 0.55 − 0.30 = 0.25 rad in one sample.
  2. Frequency. f=0.252π×8000Hz=318Hz
  3. 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 xcos⁡ωcn−x^sin⁡ωcn. 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 (1+1.6cos⁡Ωn)cos⁡ωcn 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°.

Explain why

Why does combining a signal with its Hilbert transform remove the negative frequencies?

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.