|
|
||
|
This interactive tutorial visualizes OFDM synchronization failures: Timing Offset, Carrier Frequency Offset (CFO), and Phase Noise. OFDM (Orthogonal Frequency-Division Multiplexing) is used in WiFi, 4G/5G, and DVB. The receiver must align its FFT window with the symbol and correct frequency/phase errors; otherwise, the constellation degrades. The simulation builds a continuous stream of three full OFDM symbols: [Prev tail] + [CP] + [Current data] + [Next head]. Prev and Next are real OFDM (last 64 / first 64 samples of adjacent symbols), not noise—so ISI has the same PAPR and texture as the center symbol. QPSK on data subcarriers, pilots every 4th. Impairments are applied to the whole stream. You see the time-domain waveform, frequency (magnitude and phase), constellation (I/Q after FFT), and phase vs subcarrier for pilots. A movable FFT-window and highlighted CP show why timing errors cause ISI when the window slides into prev or next. Mathematical ModelOFDM: Data symbols X[k] are mapped to subcarriers, then IFFT gives the time-domain block. A Cyclic Prefix (CP) is prepended. The transmitted signal is x[n], n = 0,…,N+CP−1. Timing Offset (τ): The receiver uses an FFT window starting at sample τ. If τ is within the CP, the effective channel is circular and we see a linear phase ramp across subcarriers. If the window crosses the symbol boundary, we get ISI. CFO (ε): A frequency offset multiplies the received signal by ej2πεn/N. In the constellation you see common rotation; but CFO also causes ICI (see below). Phase Noise: Modeled as a Wiener process (random walk). Each sample is multiplied by ejφ[n] with φ[n] = φ[n−1] + noise. This causes jittery spreading of the constellation, distinct from the smooth CFO rotation. Orthogonality, ICI, and Why Time-Domain Correction WorksOFDM’s “magical” property is orthogonality: each subcarrier fits exactly into its own FFT “bucket.” Multiplying by ej2πεn/N (CFO) changes only the angle, not the length, of a phasor—yet the constellation becomes fuzzy (amplitude spreading). Why? Leakage (ICI): The FFT sorts the signal into frequency buckets. With perfect sync, subcarrier k goes 100% into bucket k. With CFO, the signal “spins” in time; to the FFT that looks like a frequency shift. Energy leaks into neighboring buckets—Inter-Carrier Interference (ICI). Your bucket loses energy (leaked out) and gains “trash” (leaked in from neighbors). Those leakage terms add random vectors: sometimes they add, sometimes cancel. The result is the fuzzy cloud—amplitude spreading—even though the ideal signal alone would only rotate. Post-FFT correction: You let leakage happen, then rotate the FFT output. You fix the angle of the main signal, but the ICI is already mixed in. You cannot remove neighbors’ leakage by rotating. The cloud stops spinning but stays fuzzy. Pre-FFT (time-domain) correction: You apply counter-rotation before the FFT. That “stops the spinning” before the signal enters the FFT. Subcarrier k again goes 100% into bucket k. No leakage → no fuzz. The constellation is sharp. This simulation uses time-domain CFO correction when you enable Correction (Auto or Manual). Analogy: Spinning the camera during a long exposure turns stars into streaks. Rotating the photo in Photoshop leaves them streaky. Stabilizing the camera while taking the shot keeps each star on one pixel—sharp dots. Time-domain correction is like stabilizing the camera. Phase Wrapping and the Phase PlotYou may notice a difference between the Constellation and the Phase vs Subcarrier plot when you dial Correction Strength: the constellation improves gradually (geometric shrinkage), but the phase plot often looks “broken” until you get very close to 100%. That comes from phase wrapping—the way we plot phase uses modulo arithmetic (−π to π), not “true” angle. The sawtooth effect: CFO creates a linear phase ramp across subcarriers (φ ∝ ε·k). With ε = 0.2 and N = 128, the phase rotates many full circles (2π) across the band. The graph can only show values in [−π, π], so it wraps the ramp—and the straight ramp becomes a sawtooth (zig‑zag). Why 50% looks like 0%: At 0% correction the phase wraps many times → dense zig‑zag. At 50% it still wraps often → still a dense zig‑zag. At 80%, fewer wraps, but still zig‑zag. In all cases the plot looks like “noise” or “fluctuation”; you barely see improvement until wrapping stops. The “magical” ~95% moment: When the slope gets shallow enough that the total rotation across all subcarriers is less than 2π, the phase no longer wraps. The sawtooth snaps into a single straight line. That’s why it feels like “nothing happens” until you’re almost at 100%. Visual proof: Imagine a clock hand spinning fast (CFO). At 100 mph → blur; at 50 mph → still blur; at 1 mph → you suddenly see the hand move. The phase plot is similar: many wraps look like chaos until the effective “speed” is low enough. Bottom line: The correction is working at 50% or 80%—the constellation and EVM show it. The “sudden” jump in the phase plot is an optical illusion from wrapping. To show improvement earlier, we could unwrap the phase or plot the slope instead of raw phase; for now, the [−π, π] phase plot is a useful reminder of how modulo arithmetic changes what you see. Key Insight: Timing offset → phase ramp (Phase vs Subcarrier). CFO → rotation and ICI/fuzz. Phase noise → jittery smearing. Use Preset and sliders to see each effect; Correction (Auto or Manual) applies time-domain CFO correction and pilot-based phase cleanup to restore orthogonality and sharpen the constellation.
— sample rate
— subcarrier spacing
Time Domain — [Prev tail] + [CP] + [Data] + [Next head]; prev/next = real OFDM. Red = danger (ISI), blue = CP, yellow = FFT window
Frequency — Magnitude (Data=blue, Pilot=red)
Frequency — Phase (Data=blue, Pilot=red)
Constellation (Data=blue, Pilot=red)
Phase vs Subcarrier (Pilots)
Usage ExampleFollow these steps to explore OFDM Time-Frequency Synchronization:
ParametersShort descriptions of each parameter:
Controls and VisualizationsShort descriptions of each control:
Key Concepts
|
||