Interactive simulator · open source · validated against theory
This lab follows one Wi-Fi link, from an access point on an office ceiling to a laptop at a desk, and asks seven questions about it. The first module traces the radio paths through the building. Each later module picks up the channel those paths produce, so a change to the floor plan carries through to fading, error rates, beams, and capacity.
Question 1 · Where does the power go?
The default scene is an office floor with a 20 dBm Wi-Fi access point (Tx) on the corridor ceiling, transmitting an 80 MHz channel at 5.8 GHz. The laptop (Rx) sits at a desk behind a metal whiteboard, so it has no line of sight. Drag either one, draw or erase walls, and the map, the rays, and every later module update.
Propagation mechanisms
| # | Type | Interactions | Length (m) | Delay (ns) | Power (dBm) | Phase (°) |
|---|
The scene is a plan view of vertical walls standing on a flat ground. For that geometry the 3D problem separates: rays are found in 2D with the image method [24], [25], and the antenna heights only change each ray's unfolded length and add one ground-reflected twin. The transmitter's image tree is pruned by beam tracing [26], [27], which keeps only the images whose beam can actually reach a wall. This cuts the third-order tree of the office scene from 45,080 to 1,340 nodes with no change in the result.
Each wall is a single dielectric slab. Its permittivity and conductivity come from ITU-R P.2040 [21], and its reflection and transmission coefficients include the multiple internal bounces inside the slab:
Wall ends and convex corners diffract. The engine treats each one as a knife edge [22]. Behind the edge it adds a diffracted ray scaled by \(F(\nu)\). In front of the edge, where the obstruction is close to the direct path, it multiplies the direct ray by \(F(\nu)\), so the field stays continuous across the shadow boundary.
The map shows either the coherent sum, with small-scale fading, or the incoherent sum \(\sum_i|a_i|^2\), which approximates the local mean that tools like Wireless InSite [29] and Sionna RT [28] also report. RMS delay spread is \(\sigma_\tau=\sqrt{\overline{\tau^2}-\bar\tau^2}\) over the power-weighted rays [1].
Question 2 · Why does the signal flicker when the laptop moves?
The ray tracer gave the laptop one received power. That number is a local average. The rays arriving at the desk add with different phases, and moving the laptop a few centimeters changes those phases, so the power swings by tens of decibels. This module takes your link's carrier and line-of-sight strength and shows what that looks like in time.
Clarke's model [5] treats the received field as many plane waves arriving from uniformly random directions. The lab builds it as a sum of 32 sinusoids with random arrival angles and phases [7], which gives a complex Gaussian process whose envelope is Rayleigh distributed and whose autocorrelation approaches \(J_0(2\pi f_D\tau)\) [6]. A line-of-sight term turns this into Rician fading [8].
The stat tiles compare the generator against theory over a 10,000-Doppler-period run. For Rayleigh fading the level-crossing rate and average fade duration at normalized level \(\rho\) are [1]:
The coherence time uses the common rule \(T_c\approx 0.423/f_D\) [1].
Question 3 · What do the echoes do to a wide channel?
The rays from question 1 arrive tens of nanoseconds apart. Across an 80 MHz channel that delay spread makes some frequencies add up and others cancel. This module plots the frequency response of your ray-traced channel itself, then shows how OFDM splits the band into narrow subcarriers that each see a nearly flat channel.
In your link mode the taps are the rays from question 1, each with its own delay and complex amplitude, so the response is deterministic for a fixed laptop position. In statistical mode the taps follow an exponential power-delay profile, scaled so that its RMS delay spread equals the slider value exactly. Each tap is an independent complex Gaussian (a wide-sense stationary, uncorrelated scattering channel [18]), and the frequency response is \(H(f)=\sum_\ell h_\ell e^{-j2\pi f\tau_\ell}\).
The coherence bandwidth uses the 50%-correlation rule of thumb [1]. For this truncated exponential profile the exact 50% bandwidth is \(0.20\)–\(0.22/\sigma_\tau\), very close to the rule.
OFDM [19], [20] uses an inverse FFT to place data on orthogonal subcarriers. A cyclic prefix longer than the maximum excess delay keeps the echoes from leaking into the next symbol, so each subcarrier only needs a one-tap equalizer. Subcarriers that land in a deep fade are protected by coding and bit loading.
Question 4 · How many bits can each symbol carry?
Wi-Fi puts bits on the phase and amplitude of each subcarrier. Packing more bits into a symbol pushes the constellation points closer together, so the link needs more SNR before noise stops pushing them across a decision boundary. The SNR starts at your link's average value.
Symbols are drawn uniformly from a unit-energy constellation, complex Gaussian noise of variance \(N_0\) is added, and the receiver picks the nearest point, which is the maximum-likelihood decision for equally likely symbols in AWGN [4]. The measured SER accumulates across frames until a parameter changes.
For square M-QAM the symbol error rate in the key equation is exact [4]; QPSK is the \(M=4\) case and BPSK is \(Q(\sqrt{2E_s/N_0})\). With Gray labelling, one symbol error usually flips a single bit, so \(P_b\approx P_s/\log_2 M\) at useful SNRs.
Question 5 · How do we survive the deep fades?
An average SNR that looks comfortable still fails when the signal drops into one of the fades from question 2. If the laptop listens on several antennas a few centimeters apart, all of them rarely fade at the same time. On a log-log plot the slope of the error curve is the diversity order.
Reading it. Each extra branch tilts the curve steeper, so the same SNR buys orders of magnitude fewer errors. Alamouti coding reaches order 2 with two transmit antennas and one receive antenna, but it splits the transmit power, so it sits 3 dB to the right of two-branch MRC.
With \(L\) independent Rayleigh branches combined by maximal-ratio combining [9], the BPSK bit error rate at average branch SNR \(\bar\gamma\) has the closed form [4], [11]:
The Alamouti scheme [10] sends two symbols over two antennas in two slots. Its decision statistic matches two-branch MRC at half the per-antenna SNR, so its curve is \(P_b^{\mathrm{MRC}}(\bar\gamma/2,2)\). The paper checks every curve here against Monte Carlo simulation; all points fall within 2.6 binomial standard deviations.
Question 6 · Can the access point aim its energy?
An access point with an antenna array can apply a progressive phase shift so the waves add up in one direction. The best direction is not always straight at the laptop. Here the beam is steered toward the strongest ray found in question 1, measured from the direct bearing to the laptop.
A linear array only controls the angle measured from its own axis, so its 3D pattern is a set of cones around that axis (the gray line of elements). Steering tilts the main cone; spacing above half a wavelength adds grating cones. Drag to orbit, scroll to zoom.
Steering has to be built into the feed network. The exact way is to delay each element's signal by the extra distance the wave travels to reach it, \(\tau_n = n\,d\sin\theta_0/c\), using switched delay lines, a Rotman lens, or optical delay. Most arrays use phase shifters instead, which apply \(2\pi f_0\tau_n\) wrapped to 360°. That is exact at the center frequency only. Watch the wavefronts below: with a continuous tone the two look identical, but a short wideband pulse stays on target only with true time delays.
A uniform linear array with weights \(w_n\) and progressive phase \(\beta=2\pi d\sin\theta_0/\lambda\) has the array factor in the key equation [12], [13]. With uniform weights at broadside the half-power beamwidth is about \(0.886\,\lambda/(Nd)\) radians and the first sidelobe sits near \(-13.3\) dB. Grating lobes stay out of visible space only if
Delay versus phase. A true time delay \(\tau_n\) multiplies element \(n\) by \(e^{-j2\pi f\tau_n}\), which scales with frequency, so the beam points at \(\theta_0\) across the whole band [33], [35]. A phase shifter applies a fixed \(\phi_n = 2\pi f_0\tau_n\), so at frequency \(f\) the beam moves to
an effect called beam squint. A \(B\)-bit phase shifter also rounds each phase to a multiple of \(2\pi/2^B\), which costs about \(-20\log_{10}\!\big[\mathrm{sinc}(\pi/2^B)\big]\) dB of gain [36]. The paper checks both against the engine. Rotman's lens [34] is a classic way to build many true-time-delay beams at once.
Hamming and Blackman windows [14] lower the sidelobes at the cost of a wider beam and a small taper loss \(N\sum w_n^2/(\sum w_n)^2\). The Dolph-Chebyshev taper [15] gives the narrowest beam for a chosen sidelobe level, here \(-30\) dB, with all sidelobes equal.
Question 7 · Can the multipath carry extra data?
The same multipath that causes fading also makes the channel between several transmit and several receive antennas a well-conditioned matrix. Its singular values are parallel streams, so capacity grows with the number of antennas. The SNR and the line-of-sight strength start at your link's values.
Cell shade is |hij|, the tick shows its phase. One fading draw from Tx j to Rx i.
Ergodic capacity of the current 2×2 link over every combination of SNR and line-of-sight strength (Rician K). The colored surface is MIMO; the translucent gray sheet below it is a single-antenna link over the same channels. The white marker is your link.
Two things stand out. Along the SNR axis, MIMO climbs about min(M, N) times faster than one antenna. Along the K axis, the MIMO surface drops toward the SISO sheet as the line-of-sight path takes over and the channel matrix approaches rank one, while the single antenna barely changes.
The channel is \(\mathbf H=\sqrt{\tfrac{K}{K+1}}\,\mathbf a_r\mathbf a_t^H+\sqrt{\tfrac{1}{K+1}}\,\mathbf H_w\), where \(\mathbf H_w\) has i.i.d. \(\mathcal{CN}(0,1)\) entries and \(\mathbf a\) are half-wavelength array steering vectors. With no channel knowledge at the transmitter, power is split equally and capacity is the log-det formula of Telatar [16] and Foschini and Gans [17], computed here from the eigenvalues of \(\mathbf H\mathbf H^H\):
In the paper the Monte Carlo ergodic capacity matches Telatar's closed-form integral within 1.6% for 1×1 through 4×4. Turning scattering down shows the other side: at 20 dB a 4×4 link drops from 22.1 to 10.7 b/s/Hz as the K-factor goes from 0 to 100, because the line-of-sight term has rank one [3].
The accompanying paper describes the engine, lists every modeling assumption, and reports the validation results quoted on this page. The validation suite reruns in about a minute with npm run validate.