resolution, precision and accuracy in RF
date: Jun 4 2026
distance between two WiFi modules
First let’s frame the problem I encountered. We have 2 WiFi modules, how do we find a distance between them? Well, measure time the signal takes from TX to RX, multiply by speed of light, get distance out. beatiful. How do we measure the time in air?
Thought #1: transmit time of departure and compare with time of arrival. Two problems here. 1. How are we supposed to package time of departure during the modulation of the outgoing signal? We can’t, not really. 2. The time of RX is not in sync with time in TX. Not only the time is not synced exactly to a nanosecond, but their clocks also drift, plan quartz crystals can have a drift of 50ppm. After a month of running that is minutes of desync, in the place where we need nanosecond precision.
Anyways, solution is to do a couple hops. TX sends at t1, RX receives at t2, RX sends at t3, TX receives at t4. Note how t1/t4 are in TX’s time reference, and t2/t3 are in RX’s time reference. Also note how the time of round trip for this is . But that includes time it took for RX to receive the signal, process it, and send another one out. But, that time is . So we simply do , and we get our air round trip time. Divide by 2, to get delay from TX to RX, and multiply by speed of light to get distance.
precision
Now the question is, well, how accurate is this distance? How precise is it? And depending on what question specifically you ask, you get the following answers:
- the resolution of this kind of scheme is limited by bandwidth. At 40MHz, this comes out to 7.5m resolution. Due to the underlying physics of how EM waves work, this is the best we can do.
- the precision of this kind of scheme is on the order of ~10cm.
- the accuracy of this scheme is on the order of ~1m.
this fucked with my mind for a couple hours. because when you do not deompose those into 3 different names, and instead you ask a “simple” question of “if I put two modules 3m apart, can I know that they’re 3m apart?” - those different numbers start to mix and confuse you. How is it possible that the RF system sees the world in 7.5m chunks, and yet wifi module specs say you can be certain for up to a meter/sub-meter resolution. That does not make any sense, either the object is in this 7.5m bucket, or it is in the next. right?
Here is a different question, how come the resolution of anything depends on the bandwidth? why? I send a signal at t1, get it at t2, send at t3, get at t4. Where is there a bandwidth there? Why does it matter if I use a 20MHz channel or a 320MHz channel on newer 5GHz wifi modules?? All I care about is the timing of my signal, that’s it.
how GPS works
at some point claude decided to give me an analogy for better understanding. consumer GPS runs on a 1575.42 MHz. It sends a singal in a bandwidth of 1.023MHz every 1ms. So resoltuin of buckets is 293m. nice. The accuracy can be anywhere from 10m to sub-meter. okay. Precision could go up to milimiters. I cry. how. why.
what is resolution?
Lesson #1: resolution refers to ability to distinguish two arbitrary signals in theory. So, if we have two people standing from 0m to 293m, and one person from 293m to 586m, one could observe that there is something from 0 to 293m, and something in 293 to 586. But we cannot determine that there’re two people in the first bucket, that signal just looks like a smear.
what does that have to do with bandwidth?
Lesson #2: it comes down to Fourier duality. A sharp spike in time and a narrow slice of bandwidth are two ends of the same stick, you can’t have both. A single tone is a sinusoid that runs forever, no spike at all. Spread more tones across a wider band and they cancel everywhere except one instant where they all line up, and that constructive spike is your pulse. The wider the band, the narrower the spike: its width is ~1/B, full stop. It’s the time-bandwidth uncertainty principle, Δt·Δf ≳ 1, and it’s baked into the hardware, not just the math. The antenna is a resonant, band-limited device; the air, the amplifier, the ADC each pass only a finite band. Feed a perfect current impulse into the antenna and it still radiates a smeared pulse, because an impulse is infinite bandwidth and the antenna has none to give. Every link in the chain is band-limited, so every link smears, and the tightest the smear can ever be is set by the narrowest band in the chain.
now going back to resolution. if we get two objects within 293m and we read the echo signal, say 100m apart, the two echos will be super imposed on each other. But because the impulse is not perfect and is so wide, we will not be able to distinguish that we got two echoes back.
GPS accuracy
first, what is the receiver even doing to read the signal. GPS does not transmit a clean pulse, it transmits a long pseudorandom sequence of +1/-1 chips, the PRN code, and the receiver already knows that exact code. so to find the signal it takes its own copy of the code, slides it in time against what came in off the antenna, and at each time offset multiplies the two sample by sample and adds it all up. that running sum is the correlation. when the two are misaligned the random +1s and -1s cancel and the sum is near zero. when they line up perfectly every chip multiplies to +1 and the sum spikes. plot that sum versus time offset and you get one sharp peak sitting on a flat noisy floor. that peak is how the receiver says “the code arrived at this delay,” and that delay times the speed of light is your range. (it is called autocorrelation because you are correlating the code against a copy of itself.)
so here is the trick that untangled it for me. resolution asks “can I tell two signals apart?” accuracy asks a completely different question: “given one signal, where exactly is it?” and those have nothing to do with each other. the 293m is the width of that correlation peak. accuracy is about finding the center of the peak, and you can find the center of a fat blob far more precisely than the blob is wide.
look closer at the shape of that peak. as you slide the replica past the incoming code, the overlap ramps up linearly, hits maximum at perfect alignment, then ramps back down: a triangle, two chips wide at the base, so ~293m. that width is fixed by the chip rate, nothing to be done about it. but the triangle is smooth and symmetric, and that symmetry is information. I do not need to land a sample exactly on the apex, I just need to find where the two sides balance.
that is exactly what GPS does, and it is beautiful. instead of one correlator on the peak, it runs three: one early, one prompt, one late, spaced a fraction of a chip apart. it measures early minus late and feeds that into a loop that steers the replica code until early and late are equal. when they match, by symmetry the prompt correlator is sitting dead on the apex. you are not measuring the top of the triangle, you are balancing two points on its slopes, and the balance point pins the center way tighter than the width suggests. tighten the early-late spacing and you tighten the lock.
the other half is just SNR. the only thing stopping you from finding the exact center is noise wobbling the peak around. and the wobble shrinks like 1/sqrt(SNR). GPS correlates a 1ms code over and over against a clean replica, so the effective SNR after integration is huge, and “find the center of a 293m peak to ~1% of its width” lands you at a few meters. it is the same reason a telescope finds the center of a blurry star to a fraction of a pixel: width is set by the optics, centroid is set by photon count.
so the chain is: chip rate sets the 293m width (resolution), and SNR plus the early-late balance sets where the center lands (accuracy). two different physical knobs, which is why one number can be 293m and the other 1m without contradiction. and if you want millimeters, you stop tracking the code entirely and track the carrier phase, where one cycle is ~19cm and you interpolate inside it. same idea, finer ruler.
resolution limit
so the bandwidth limit is not a law of nature, it is the limit of knowing nothing. if all i can say is “some arbitrary signal arrived, tell me its delay profile,” then yes, two echoes closer than ~1/B blur into one and there is nothing to be done. that is the nonparametric case: an infinite-dimensional question, the answer is a whole continuous function, answered by a finite-bandwidth measurement. but the moment i can say “there are exactly two point reflectors, each a delayed copy of the pulse i already know,” the question changes shape. now i am not reconstructing a function, i am fitting four numbers, two delays and two amplitudes. that is a finite problem, and 1/B stops binding it.
what binds it instead is SNR. once it is a parameter fit, the floor on how precisely i can place those delays is the cramér-rao bound, which scales roughly like 1/(SNR·B²): louder signal, tighter estimate, and no raw width term in sight. it is the same move as the GPS section one level up. there, locating one peak beat its width because of SNR; here, separating two peaks beats the width for the same reason. resolution quietly turns into an accuracy question, and accuracy is bought with SNR, not bandwidth.
the catch is that this is not free. as the two targets slide closer than 1/B their echo shapes become nearly identical, and telling them apart means resolving a smaller and smaller difference between two almost-parallel signals. the problem goes ill-conditioned, and the SNR you need climbs roughly exponentially with how far below 1/B you push. so “you can resolve arbitrarily close targets” is true the way a lever can lift anything: in the limit of infinite SNR and a perfectly correct model. in practice you buy a factor of a few past 1/B, which is exactly enough to turn a 7.5m wifi channel into sub-meter positioning, and not much more.