Wireless · Signal Processing · Networking
📅 Квітень 2026 ⏱ ≈ 13 хв читання 🎯 Intermediate

How WiFi Works — OFDM, Subcarriers and Wireless Physics

When a laptop streams 4K video over WiFi at 1 Gbps, hundreds of millions of radio waves per second are being choreographed with mathematical precision. Behind the seamless experience lies OFDM — Orthogonal Frequency-Division Multiplexing — a technique that uses the Fourier transform to simultaneously transmit data on dozens of subcarriers, each modulated independently, achieving near-Shannon-limit efficiency.

1. Radio Waves and the ISM Bands

WiFi transmits data as electromagnetic waves at radio frequencies. The speed of the waves is c = 3×10⁸ m/s; their wavelength and frequency are related by λ = c/f.

2.4 GHz band: λ = c/f = 3×10⁸ / 2.4×10⁹ ≈ 12.5 cm 5 GHz band: λ ≈ 6 cm 6 GHz band (WiFi 6E/7): λ ≈ 5 cm

These frequencies are in the ISM (Industrial, Scientific, Medical) bands — unlicensed spectrum available without a radio operator license. The tradeoff:

The free-space path loss (how much signal weakens with distance) follows the Friis equation:

FSPL = (4πd/λ)² → FSPL(dB) = 20 log₁₀(d) + 20 log₁₀(f) + 20 log₁₀(4π/c) At 2.4 GHz, d = 10 m: FSPL ≈ 60 dB At 5 GHz, d = 10 m: FSPL ≈ 66 dB (6 dB more loss ≈ ¼ the power)

2. Modulation — Encoding Bits on Waves

Digital data (bits) must be encoded onto the carrier wave by varying one of its properties over time:

Higher-order QAM achieves more bits per symbol but requires better signal-to-noise ratio (SNR). The Shannon-Hartley theorem sets the absolute limit:

C = B · log₂(1 + S/N) (Shannon capacity, bps) B = bandwidth (Hz), S/N = signal-to-noise power ratio WiFi 6: B = 80 MHz, SNR = 40 dB (S/N = 10 000) C = 80×10⁶ × log₂(10 001) ≈ 80×10⁶ × 13.3 ≈ 1.06 Gbps per stream

3. OFDM — Orthogonal Subcarriers

A single wideband carrier is vulnerable to multipath fading — reflected signals arriving with different delays destructively interfere at some frequencies. OFDM divides the total bandwidth into many narrow subcarriers, each narrow enough that fading is flat across its width.

The key innovation: the subcarrier frequencies are spaced exactly 1/T_symbol apart, making them mathematically orthogonal. The sum of two orthogonal sinusoids over a symbol period is zero — they don't interfere with each other.

Subcarrier spacing: Δf = 1 / T_s (T_s = useful symbol period) 802.11a/g: 52 subcarriers, 312.5 kHz spacing, T_s = 3.2 μs 802.11ax: 256 subcarriers, 78.125 kHz spacing, T_s = 12.8 μs IFFT at transmitter: converts N frequency-domain QAM symbols to a time-domain waveform (N-point IFFT) FFT at receiver: recovers the N QAM symbols from received signal

A cyclic prefix (CP) — a copy of the tail of each OFDM symbol prepended to its start — absorbs the delay spread from multipath, preventing inter-symbol interference as long as the multipath delay is shorter than the CP duration (~0.8 μs for 802.11a).

Why OFDM is powerful: The cyclic prefix trick converts linear convolution (the channel's effect) into circular convolution — which in the frequency domain is just pointwise multiplication. Each subcarrier experiences only a flat amplitude scaling and phase shift, easily corrected by a simple one-tap equalizer per subcarrier.

4. 802.11 Frame Structure

A WiFi frame carries data in a structured format:

Data is additionally protected with channel coding: convolution coding (802.11a/g), LDPC (802.11n+), or Turbo codes. For 802.11ax (WiFi 6), LDPC up to rate 5/6 is standard, approaching the Shannon limit closely.

5. MIMO and Spatial Multiplexing

MIMO (Multiple-Input Multiple-Output) uses multiple transmit and receive antennas to send independent data streams simultaneously on the same frequency — multiplying throughput by the number of streams.

Capacity of M×N MIMO in rich multipath: C = B · Σᵢ log₂(1 + λᵢ · P / (σ² M)) λᵢ = eigenvalues of H·Hᴴ (channel matrix H is N×M) P = total transmit power, σ² = noise power For a 4×4 MIMO system: up to 4× throughput gains 802.11ax (WiFi 6): up to 8 spatial streams = 8× multiplexing

Beamforming focuses transmit energy toward the receiver by weighting each antenna's phase. The access point communicates sounding frames to estimate the channel; the receiver feeds back the optimal precoding matrix. This improves range and reduces interference to neighboring devices.

MU-MIMO (Multi-User MIMO) allows a WiFi 5/6 access point to simultaneously transmit to multiple clients using different spatial beams on the same time-frequency resources — increasing overall network capacity in dense environments.

6. Channel Interference and CSMA/CA

WiFi is a shared medium — all devices in range hear each other's transmissions. Unlike wired Ethernet (CSMA/CD), WiFi cannot simultaneously transmit and listen for collisions, so it uses CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance):

  1. Before transmitting, a device senses whether the channel is idle.
  2. If idle for a DIFS period (34 μs for 802.11g), it starts a random backoff counter.
  3. The backoff counter decrements only when the channel is idle; the device transmits when it reaches zero.
  4. If two devices finish backoff simultaneously and collide, both detect the failure (no ACK received) and restart with a doubled contention window (binary exponential backoff).
Hidden node problem: devices A and C cannot hear each other but both communicate with access point B. If A and C transmit simultaneously, their signals collide at B even though CSMA/CA told both the channel was idle. The RTS/CTS (Request to Send / Clear to Send) mechanism alleviates this by reserving the channel through the AP.

7. WiFi Evolution — From 802.11b to WiFi 7

Practical throughput rule of thumb: Real-world throughput ≈ 50–60% of theoretical maximum (overhead from CP, pilots, headers, retransmissions, MAC overhead) WiFi 6 (160 MHz, 8 streams): 9.6 Gbps theoretical → ~5 Gbps achievable WiFi 7 (320 MHz, 16 streams): 46 Gbps theoretical → ~20–30 Gbps claim
📡 Open Wave Simulation →