Asking the fleet what it is doing…
monad-knowledge Wi-Fi sensing lab · FIIT STU

RF ranging fundamentals: RSSI, ToF, and AoA — what each radio measurement costs and what it buys

Where We Are

This is the opening week of LOC502, and it assumes nothing. Before we can talk about tracking people through a building, filtering noisy estimates, or scheduling calibration, we have to answer a much simpler question: if a radio frame arrives at a point whose location you already know, what can you say about how far away the sender is — and how confident can you be?

That is all "ranging" means: guessing how far away a radio beacon is from how weak its signal has become. A beacon is just a tiny radio that keeps announcing "I'm here"; the farther you are, the fainter it sounds, and that faintness is our ruler. This week we make that intuition precise, show exactly how unreliable the ruler is, compare it with two other ways of measuring distance, and adopt a habit — reporting error as a full distribution rather than a single number — that the course keeps from the first workbook cell to the last.

A few plain words first, because everything below leans on them:

  • Radio signal — an invisible ripple of energy travelling through the air, like a sound you cannot hear.
  • Received power (RSSI) — how strong that signal is when it arrives. Strong usually means close; faint usually means far.
  • dBm — the unit we measure strength in. It is a logarithmic scale: every +10 dBm is a factor of ten in power, like the jump from a whisper to a normal voice to a shout.
  • Anchor — a radio whose position you already know; your fixed reference point.
  • Path loss — how much weaker the signal gets as it travels. It grows with distance.
  • Shadowing — random extra weakening caused by walls, furniture, and bodies, different at every spot.

Why bother at all? Because indoors, where satellite GPS does not reach, radio beacons can tell you where you are; because every phone and coin-cell tag already speaks Bluetooth, so you need no new hardware to start; and because counting anonymous radio chirps is far more privacy-friendly than pointing cameras at people. Indoor navigation, occupancy sensing, and crowd-safety monitoring all rest on the question this week answers.

The lab's own measurements form the empirical backbone. An indoor radio campaign swept 36 configurations of carrier frequency and body-loss settings, taking 32 placement realisations in each. Its central finding — that the random spread from spot to spot dwarfs the average trend by a ratio of roughly six to one — recurs throughout the week as the sharpest available demonstration that variance, not the mean, governs strength-based ranging accuracy.


How Signal Strength Fades: Free Space and Its Indoor Departure

Start with a torch

Before any formula, picture light. Shine a torch at a wall, then step twice as far back. The same light now spreads over four times the area, so each patch of wall receives only a quarter of the brightness. Radio behaves the same way: a beacon spreads its energy over an ever-larger sphere, so doubling the distance leaves about a quarter of the power reaching you. Strength falls quickly with distance, and it falls in a very specific way — with the square of distance.

In open air with nothing in the way, that rule has a name: the Friis transmission equation.

P_r = P_t G_t G_r \left(\frac{\lambda}{4\pi d}\right)^2

Here P_r is the power you receive, P_t the power sent, G_t and G_r the antenna gains, \lambda the wavelength, and d the distance. The piece that matters is the d^2 in the denominator — that is the torch rule, twice as far meaning a quarter as strong. Because \lambda sits in the numerator, shorter wavelengths (higher carrier frequencies) arrive weaker still.

Indoors, the fade is steeper and partly random

Open air is the easy case. Walls, furniture, and human bodies change two things, and we need a plain word for each before writing the model.

The path-loss exponent, written n, is how fast strength fades. In free space n = 2; a cluttered indoor space pushes it to 3 or 4, so the fade is steeper. The course's canonical indoor value is n = 3.

Shadowing, written X_\sigma, is a random extra amount of weakening caused by the exact reflections at your particular spot. Two people the same distance from a beacon can read very different strengths — one stands behind a metal door, the other in an open corridor — and that gap is shadowing. On the decibel scale its distribution is bell-curve-shaped: small nudges are common, large ones rare but real. We call this log-normal shadowing, and the course uses a standard deviation of \sigma = 6 dB.

Putting the steeper fade and the random offset together gives the Log-distance Path-Loss (LDPL) model — the indoor rule for received power as a function of distance:

P(d) = P(d_0) - 10n \log_{10}\!\left(\frac{d}{d_0}\right) + X_\sigma

In words: the power at distance d is a measured reference level P(d_0) taken at a close known distance d_0, minus a steady fade of 10n dB for every ten-fold increase in distance, plus the random shadowing nudge X_\sigma. The course pins canonical values of P(d_0) = -59 dBm at d_0 = 1 m, n = 3, and \sigma = 6 dB.

A warning about signs, because mixing two conventions is the single most common Week-1 error. The same physics is often written in terms of path loss, which is a positive quantity that grows with distance:

\mathrm{PL}(d) = \mathrm{PL}(d_0) + 10n \log_{10}\!\left(\frac{d}{d_0}\right) + X_\sigma

Received power is simply a transmit-side reference minus that loss, so as a function of distance it falls. The two forms are the same model — one tracks loss, the other tracks received power — and this course always reports received power P(d).

Log-distance path-loss: the mean received-power trend with its constant-width shadowing band. The band does not narrow as distance shrinks — a fixed dB spread becomes an ever-wider spread in metres once the model is inverted ().

Three parameters must be fitted before the model is usable: P(d_0), n, and \sigma. The reference P(d_0) needs a single physical placement at a known distance (commonly 1 m). The exponent and the shadowing standard deviation are estimated from a sweep of strength samples at several known separations, in practice by ordinary least squares on a log-distance axis. Calibration across small low-interference, small high-interference, and large open-lab rooms shows both n and the offset shifting meaningfully with the environment — which is why no single global fit will do.


Turning Strength Back into Distance: The Ranging Jacobian

The rubber-band intuition

We can compute power from distance; for ranging we need the reverse. The key question is why the same reading wobble costs more metres when you are far away. Picture stretching a rubber band: when it is barely pulled, a small extra tug barely moves the end, but when it is already stretched far, the same tug moves the end a long way. Distance from a beacon works the same — the farther you are, the more each decibel of reading noise becomes metres of error.

The conversion factor from decibels to metres has a name: the Jacobian. Here it means the metres-per-dB conversion factor — how much distance error one decibel of power noise creates. Crucially it is not a constant; it grows with distance, exactly like the stretched rubber band.

To recover distance, invert the mean model (setting X_\sigma = 0 to isolate the systematic part):

\hat{d} = d_0 \cdot 10^{\,(P_\text{obs} - P(d_0)) \,/\, (10n)}

In words: measure how many dB below the 1 m reference you landed, divide by the per-decade slope 10n, and raise ten to that power. Differentiating with respect to the observed power gives the sensitivity — the Jacobian:

\frac{\partial \hat{d}}{\partial P_\text{obs}} = \frac{d_0 \ln 10}{10n} \cdot 10^{\,(P_\text{obs}-P(d_0))/(10n)} = \frac{\ln 10}{10n}\,\hat{d}

The conversion factor is proportional to the distance you are already at — the rubber band, in symbols. Replacing the perturbation with the shadowing standard deviation \sigma gives the spread of the distance estimate:

\sigma_d \approx \frac{\ln 10}{10n}\,\sigma\,\hat{d}

The ranging uncertainty in metres is a fixed fraction of the distance, with the fraction set by n and \sigma alone.

Two consequences follow immediately.

Error is multiplicative. The absolute uncertainty \sigma_d grows linearly with distance. For the canonical n = 3 and \sigma = 6 dB the slope is \tfrac{\ln 10}{30}\cdot 6 \approx 0.46, so \sigma_d \approx 0.46\,\hat{d}: at 5 m the one-standard-deviation error is already 2.3 m, and at 10 m it is 4.6 m. Strength-based ranging is not merely inaccurate in a fixed additive sense — the error compounds with distance, and it does so because of the logarithm in the model, not because of any BLE quirk.

Left: the strength-to-distance Jacobian rises linearly with distance. Right: the same 6 dB of shadowing produces a one-sigma ranging error that grows as 0.46·d — 2.3 m at 5 m ().

The spread dominates the mean trend. A shift in n moves the expected curve; a large \sigma smears the distance estimate so broadly that the curve becomes uninformative for any single measurement. The lab's data makes this visible in numbers. Across its 36-configuration sweep (32 placements per cell, three carrier bands), the grid-mean attenuation moved only about 2.3 dB across the entire parameter space (2.25, 2.39, and 2.27 dB at the three frequencies), while the per-placement spread reached 12.7–14.9 dB — a spread-to-mean ratio of roughly 6:1. The mean was effectively flat; the variance was not. A dataset of mean curves would be blind to the underlying configuration. (Separately, the mean blockage did shift 10.13 dB across the 2.4→6 GHz band change, which is why per-band calibration is mandatory — flat across body geometry, not across carrier frequency.) This is not a peculiarity of one model; it is the indoor multipath environment at work, and it is the central obstacle to strength-based ranging.

The lab's central finding reproduced from its measured scalars: the grid-mean attenuation surface (left) is nearly flat at ~2 dB span, while the per-placement spread (centre) is ~12.7 dB everywhere — a roughly 6:1 dominance (right). The mean is blind to the configuration; the information lives in the spread ().


Why the Spread, Not the Mean, Governs Accuracy

The Jacobian identifies \sigma as the dominant uncertainty. One natural hope is that averaging a stream of BLE advertisements would suppress it. It will not, and the reason is worth dwelling on.

Shadowing is a spatial random variable, not a temporal one. Its value depends on where the transmitter and receiver sit relative to the room's geometry, not on when you happen to measure. Move your phone by as little as half a wavelength — about 6 cm at 2.4 GHz — and you do not get a noisier version of the same reading; you land on a completely different channel of reflections, like re-tuning a radio to a new station. It is a spatial dice roll, re-rolled by moving, not by waiting.

The lab's measurements make this concrete. Across 32 placement realisations per configuration, the per-placement standard deviation of attenuation was 12.7–14.9 dB — equivalent, through the Jacobian, to a distance spread larger than a typical office room once you are operating beyond a few metres. Averaging N repeated readings at a fixed position reduces temporal fluctuation by \sqrt{N}, but the spatial variance cannot be averaged away without physically moving the antenna.

This is why calibration cannot be a one-time fit. The path-loss parameters that describe one room layout or one occupancy state may not describe another, which is exactly the problem Week 2 takes up: calibration as an ongoing campaign rather than a single event. For ranging design today, the practical lesson is that you must carry \sigma through your link budget and your error reporting. A system tuned for a mean error of 1 m can easily show 90th-percentile errors of 4–6 m once the placement distribution is accounted for.


Three Ways to Range: Hardware, Anchors, and Accuracy

Strength is only one of three things you can measure to infer position, and each trades hardware and infrastructure for geometric information.

Strength (received signal strength). This needs no special hardware beyond the radio chipset that any commercial BLE beacon or WiFi card already contains — the measurement is a single number per received frame. Three or more anchors with known positions allow 2D trilateration: picture three circles, each saying "you are this far from a known anchor," and you stand where all three overlap. The accuracy is bounded by shadowing; for typical indoor \sigma of 4–8 dB and n of 2–4, sub-metre positioning is hard to sustain without fingerprint databases or heavy averaging. Trilateration experiments across three room configurations report mean errors of 2.7–4.3 m — the empirical ceiling that the Jacobian analysis predicts from first principles.

Travel time (time-of-arrival and time-difference-of-arrival). Distance comes from travel time via d = c\cdot t, with c \approx 3\times10^8 m/s, so 1 ns of timing error is 0.3 m of ranging error. BLE's narrow 2 MHz channels give roughly 500 ns timing resolution — about 150 m of ranging blur, orders of magnitude too coarse for indoor use, which is the hardware reason BLE simply cannot do travel-time ranging. Ultra-wideband radios reach about 1 ns resolution and make sub-30 cm ranging practical, at the cost of bespoke hardware at every node and, for absolute time-of-arrival, strict clock synchronisation between transmitter and receivers. Time-difference-of-arrival relaxes this to receiver-only synchronisation by using the difference of arrival times between anchor pairs, placing the user on a hyperbola; three anchors give a 2D fix.

Angle (angle-of-arrival). An antenna array measures the phase difference of the incoming wavefront across its elements to recover the bearing from receiver to transmitter. The appeal is anchor economy: two array-equipped anchors suffice for a 2D fix, because two bearing lines cross at a point. The cost is array hardware and sensitivity to multipath, which throws up spurious angle peaks in dense indoor spaces; advanced systems reach decimetre accuracy but require physical-layer channel access, not the single strength number commodity hardware exposes.

Measurement Hardware cost Min. anchors (2D) Typical indoor accuracy Requires clock sync?
Strength (RSS) Single antenna, commodity 3 1–5 m No
Travel time (ToA) Wideband radio, tight clocks 3 0.1–0.3 m (UWB) Yes, absolute
Time-difference (TDoA) Wideband radio 3 0.1–0.3 m (UWB) Receiver-only
Angle (AoA) Antenna array per anchor 2 0.1–0.5 m No

For a deployment where every mobile device is an ordinary smartphone or a coin-cell beacon, only strength is available without hardware modification. That is the architectural reason BLE strength is this course's working signal.

The same trade-off as a figure: strength wins on hardware simplicity and needs no clock synchronisation but pays with the worst accuracy; travel-time buys centimetre accuracy with bandwidth and tight sync; angle needs the fewest anchors but an array at each ().


BLE Advertisements as the Course's Working Signal

Among strength-based systems, BLE beacons sit at a convenient operating point. Coin-cell batteries sustain multi-year operation at 100 ms advertisement intervals, all modern smartphones receive BLE advertisements without driver changes, and each advertisement carries a per-beacon identifier so multiple beacons can be told apart from a single receiver.

The lab's BLE experiment exploits an extra property: a phone moving through a space accumulates advertisement counts per beacon per time window, and when the phone is stationary or slow-moving those counts are a low-variance proxy for distance — closer beacons generate more received advertisements per unit time, because chirps that would otherwise be lost to deep fades are more likely to be recovered. Advertisement counting is not ranging in the LDPL sense — it does not invert a path-loss model — but it gives reliable automated occupancy ground truth without a person holding a clicker, which was the experiment's objective. Its counting model is developed quantitatively in a later week; Week 1 stays on the strength → distance → honest-error chain that explains why BLE strength behaves as it does.

The choice of BLE over WiFi channel-state information or ultra-wideband is deliberate. WiFi CSI gives centimetre-level spatial resolution but needs modified drivers and is unavailable on commodity phones; UWB reaches sub-30 cm travel-time ranging but demands dedicated hardware at every anchor. BLE strength is available on every participant's phone, deployable with battery-powered beacons, and operationally fragile in exactly the ways this course needs to expose: placement sensitivity, fade-rate variation, and temporal drift are all present and measurable at lecture scale. Courses that begin with UWB tend to hide the hard problems; starting with BLE strength forces them into the open from Week 1.


Reporting Ranging Error Honestly: CDFs Over a Single Average

A single root-mean-square error conflates the shape of an error distribution with its scale. Think of commute times in a neighbourhood: if most commutes are 20 minutes but a few are 90, the average looks fine right up until the day you hit a 90. A single number hides the bad days. Strength-based ranging error is exactly this kind of heavy-tailed distribution — the median may be moderate while rare, severe outliers from deep multipath nulls or body occlusion inflate any average disproportionately. Reporting one number conceals whether a system is occasionally terrible or consistently mediocre, which is precisely what you need to know to decide whether it is fit for purpose.

The cumulative distribution function (CDF) of the ranging error \varepsilon = |\hat{d} - d| shows the whole picture. Read it at 90% to find the worst-case error most users actually hit:

F(\varepsilon) = \Pr(|\hat{d} - d| \le \varepsilon)

In words: F(\varepsilon) is the fraction of measurements whose error is no larger than \varepsilon. Read the curve at \varepsilon = 1 m to see how often you land within 1 m of the truth; read it at F = 0.90 for the error nine in ten users stay under. Both numbers together communicate accuracy in a way a single average cannot.

This course reports CDFs from this week onward, summarised as the 50th and 90th percentiles (P50 and P90), never as a lone average. At the canonical n = 3, \sigma = 6 dB, the median tracks the first-order \sigma_d \approx 0.46\,d prediction (P50 of 0.9 m at 3 m, 1.5 m at 5 m), but the 90th percentile sits well above it (2.4 m at 3 m, 4.1 m at 5 m). That gap is the log-normal tail — the rare large errors a single average would smear away — and comparing median against high percentile reveals how much of the observed error is predictable mean trend and how much is heavy tail, a question that becomes central when calibration campaigns are evaluated in Week 2.

Ranging-error CDF at n = 3, σ = 6 dB for four true distances. Read each curve at F = 0.5 for the median and F = 0.9 for the high-percentile error a user actually feels; the rightward skew is the log-normal tail from exponentiating dB-Gaussian shadowing ().


Key Results and Where to Reproduce Them

Result 1 — Ranging Jacobian. The spread of the strength-inverted distance estimate is \sigma_d = (\ln 10 / 10n)\,\sigma\,d. For n = 3, \sigma = 6 dB this gives \sigma_d \approx 0.46\,d: 2.3 m at 5 m, 4.6 m at 10 m. Reproduce in workbook Cell 6 (prints sigma_d ~ 0.461 * d and the per-distance table).

Result 2 — Lab attenuation spread. In the lab's measured sweep (36 configurations, 32 placements each), the grid-mean attenuation varied by only ~2.3 dB while the per-placement spread reached 12.7–14.9 dB — a ~6:1 dominance. Reproduce in workbook Cell 11 (prints the 6:1 ratio).

Result 3 — Honest error as a CDF. At n = 3, \sigma = 6 dB the ranging-error CDF gives P50 of 0.9 m and P90 of 2.4 m at a 3 m true distance — median and tail are different numbers a single average would conflate. Reproduce in workbook Cell 17 (prints the P50/P90 table).

Result 4 — BLE advertisement counting (experiment-grounded). The lab's BLE experiment (EXP-001 BLE-Assisted CSI Ground Truth Collection) demonstrates that advertisement counts from a mobile app give reliable automated occupancy ground truth without manual supervision; the literature reports BLE strength trilateration mean errors of 2.7–4.3 m across three rooms. These motivate the BLE-strength choice but are not reproduced in this week's workbook (which stays on the strength → distance → CDF chain); the counting model is developed in a later week.


What You Can Now Do

By the end of this week you can:

  1. State the LDPL model in plain words, say what each parameter means physically, and explain which source of error you can reduce by averaging and which you cannot.
  2. Explain why ranging error grows with distance and predict, roughly, how much larger the error at 10 m is than at 1 m for a given shadowing spread.
  3. Place strength, travel-time, and angle ranging on the hardware / anchors / accuracy trade-off and explain why BLE strength suits a resource-constrained deployment.
  4. Read a ranging-error CDF and report a result as a median and a 90th percentile rather than a single average.

Week 2 picks up the calibration question this week raises: because the shadowing spread is large and depends on the environment, the path-loss parameters fitted today will drift over days and weeks. The next week treats calibration not as a one-time activity but as a campaign-design problem — reference-point density, the temporal decay of a fingerprint database, and the minimum-effort recalibration schedule needed to hold accuracy. The bridge in one line: because the spread is large and environment-dependent, calibration is not a one-time fit.


Further Reading

  • guo2020_267f — unified measurement taxonomy (strength, travel-time, angle, fusion); the primary reference for this week's trade-off table.
  • sadowski2020_f2ba — empirical path-loss fitting across BLE, WiFi, and ZigBee in three rooms; source of the CDF-reporting convention and the 2.7–4.3 m trilateration ceiling.
  • jiang2018_5aae — the path-loss model in the WiFi-sensing context and RSSI fluctuation at a fixed location; the ArrayTrack and SpotFi angle-of-arrival systems.
  • fallani2026_04be — derives the multipath-shadowing fundamental limit on strength-based ranging; the theoretical framing for the spread-dominates-the-mean section.
  • demrozi2021_bf55 — an end-to-end BLE strength pipeline for distance estimation and occupancy counting.
  • bocus2022_ce7f — an ultra-wideband dataset; the hardware spec (~1 ns timing resolution) grounds the travel-time accuracy figures.