Web Simulation 

 

 

 

 

Hilbert Transform & Analytic Signal 

The Hilbert Transform is a fundamental tool in signal processing that shifts the phase of every frequency component by −90°. It lets us build the analytic signal from a real-valued wave: a complex signal whose real part is the original and whose imaginary part is the Hilbert transform. In 3D, this appears as a helix: time along one axis, real part (e.g. blue projection) and imaginary part (e.g. red projection) on the other two. The magnitude of this complex signal is the instantaneous envelope; the derivative of its phase is the instantaneous frequency.

What you see

3D view (left): The white helix is the analytic signal. The orange arrow at the "head" shows the current phase angle in the real–imaginary plane. Helix color indicates instantaneous frequency (blue = lower, red = higher).

Sidebar (right): Top plot = instantaneous envelope A(t) = |s(t) + j H[s(t)]|. Bottom plot = instantaneous frequency (phase derivative).

Math

Analytic signal: sa(t) = s(t) + j H[s(t)]. For a sinusoid, H[sin(ωt)] = −cos(ωt), so the analytic signal traces a circle in the real–imaginary plane. This simulation uses a 63-tap FIR Hilbert filter (with Hamming window) so it works on any real input, not only pure tones. Envelope: A(t) = |sa(t)|. Instantaneous frequency: ω(t) = dφ/dt where φ = arg(sa).

Modes: Pure Sine — constant frequency, flat IF. Linear Chirp — frequency sweeps up and down; the helix tightens and loosens and the IF plot ramps. AM — amplitude modulation; the envelope follows the modulation.

REAL s(t): 0.00
IMAG H[s](t): 0.00
ENVELOPE A(t): 0.00
PHASE:
INST. FREQ: 0.00
I/Q
I (Real)
Q (Imag)
Phase
INSTANTANEOUS ENVELOPE
INSTANTANEOUS FREQUENCY

Discrete Hilbert Transformer (63 taps): Ideal response h[n] = 2/(πn) for odd n, 0 for even n; center n=0 is 0. Multiplied by a Hamming window and shifted for causality (array index 0…62, time index n = index − 31).

Source signal s(t) (stem plot)

Convolution s * h (animation)

Summary: Center tap (index 31) is 0. Odd-indexed taps are non-zero (negative left, positive right); even taps are 0. The window tapers the edges smoothly.

IndexTime nFormulah[n]
100% 0.80

Hilbert Envelope Detection: Grey = raw signal s(t); cyan = Hilbert transform H[s](t) (imaginary part); white = envelope (magnitude of analytic signal). The envelope tracks the peaks without time-lag or ripple.

Instantaneous Frequency = dφ/dt: the angular velocity of the analytic vector. Phase φ = atan2(Q, I); unwrap φ over time, then frequency is the derivative.

0 Angular velocity: — rad/sample

Source s(t) & H[s](t) (time domain)

100%

Phasing method (Hartley): SSB = I_base×I_carrier − Q_base×Q_carrier (USB) or + (LSB). Baseband I/Q from Hilbert transform; carrier 90° pair. One sideband is cancelled. In the time domain, USB has higher frequency (carrier+base) and LSB lower (carrier−base); increase base frequency to see the difference clearly. The canvas shows six plots: baseband m(t) & H[m](t), carrier cos(ωt) & sin(ωt), SSB signal, source×carrier (DSB), SSB spectrum, and DSB spectrum. Toggle "Show standard AM spectrum" to overlay the AM spectrum on the SSB spectrum.

Six-panel plot (baseband, carrier, SSB, DSB, spectra)

 

Tab descriptions

Theory tab: Visualize the analytic signal as a 3D helix and 2D sidebar plots. Left = 3D view (time, real, imag); white helix = analytic signal; orange arrow = phase; color = instantaneous frequency (blue low, red high). Right = I, Q, phase, envelope A(t), IF. Controls: Source (Sine/Chirp/AM), Base frequency, Amplitude, Run/Stop, Step, Scrub when paused, 3D zoom/pan/home.

H Coefficient tab: Discrete Hilbert filter: 63-tap FIR, h[n] = 2/(πn) for odd n, 0 for even; Hamming window; causal. Plots: stem of h[n], source s(t), convolution s*h. Table lists index, time n, formula, value. Controls: Source, Run/Stop, Step Fwd/Bwd.

Envelope Detection tab: Hilbert envelope A(t) = |s + j H[s]|. Plot: grey = s(t), cyan = H[s](t), white = envelope. Controls: Source, Time span (20%–100%), Modulation depth (AM only).

Instantaneous Frequency tab: ω(t) = dφ/dt from unwrapped phase. Plots: source & H[s], I/Q trace, unwrapped phase, IF (blue low, red high), angular velocity readout. Controls: Source, Smoothing, Run/Stop, Step.

Single Side Band tab: Phasing method: USB = I·cos − Q·sin, LSB = I·cos + Q·sin. Six panels: baseband, carrier, SSB signal, DSB (source×carrier), SSB spectrum, DSB spectrum. Option to show AM spectrum overlay. Controls: Source, Sideband (USB/LSB), Time span, Run/Stop, Step.

Usage

Signal modes: Pure Sine — constant frequency; the 3D helix has uniform coil spacing and the instantaneous frequency plot is flat. Linear Chirp — frequency sweeps; the helix tightens then loosens and the IF plot ramps up and down. AM — amplitude modulation; the envelope plot follows the modulation.

Controls: Base frequency and amplitude sliders set the input. Run/Stop toggles the animation; when stopped, use Step to advance one sample and Scrub to move through the frozen history. The HUD shows real part, Hilbert (imaginary) part, envelope, phase, and instantaneous frequency.

3D view: X = time (past), Y = real part, Z = imaginary part. The orange arrow at the head shows phase. Helix color: blue = lower IF, red = higher IF.

Parameters

  • 63-tap FIR Hilbert: Implements the 90° phase shift via convolution with a windowed ideal Hilbert kernel. The real output is delayed to align with the filter.
  • Envelope: A(t) = |s(t) + j H[s(t)]|.
  • Instantaneous frequency: ω(t) = dφ/dt from unwrapped phase.

Key concepts

  • Analytic signal: sa(t) = s(t) + j H[s(t)]; single-sided spectrum; envelope and IF are well-defined.
  • Chirp: Phase is integrated from frequency so the helix stays smooth when frequency changes.