How UWB makes a wagon follow you

Home/Journal/UWB Tech

How UWB makes a wagon follow you

Why centimeter-accurate ultra-wideband ranging beats Bluetooth and cameras for a follower that actually keeps its distance outdoors. The physics behind the hero animation.

Jason Wood·8 MIN READ·JUL 24, 2026
taganchorUWB / TIME OF FLIGHT

If you have ever tried to make something follow you with Bluetooth, you already know the problem. RSSI swings by 10 dB when you turn your body, and the follower lurches. Cameras struggle in sun, fog, and the flat light of a parking lot. The answer we landed on is ultra-wideband, and the reason comes down to one number: range, measured in centimeters, not bars of signal.

The ranging problem

A follower needs to know two things: where the human is, and how far away. UWB gives you the second one almost for free. Two ultra-wideband radios exchange very short pulses; the time of flight maps directly to distance at the speed of light. At 10 meters you read 10.00 m, give or take a few centimeters. Several vendors make UWB chips today – Qorvo (formerly Decawave), NXP, and others – and the good news is they all speak the same underlying physics. The kit is not wedded to one part.

Bluetooth, by contrast, estimates distance from received signal strength. That works indoors next to a desk. Outdoors it falls apart.

Outdoor ranging: cumulative accuracy 00.30.60.91.21.5 Ranging error (m) 050100 % of samples within error UWBcameraBLE (RSSI)
Fig. 1 Cumulative ranging error across 500 outdoor samples. UWB holds a tight band; BLE drifts with body orientation.

The chart above is not cherry-picked. We logged it walking a 20 m straight line ten times with the tag on a lanyard, then ten with the tag in a back pocket. UWB barely moved. The BLE estimate swung by over a meter whenever the wearer turned.

A follower that does not know its distance cannot decide whether to speed up, hold, or stop. Everything downstream – the pursuit loop, the avoidance layer – is only as good as this number.

How time-of-flight actually works: TWR

Saying “the radio measures distance” sounds like magic until you look inside. The technique is called two-way ranging, or TWR, and it is the backbone of every UWB follower. followwagon uses the double-sided variant (DS-TWR), which exchanges three frames. The tag sends a Poll; the anchor answers with a Response; the tag closes with a Final. From the six timestamps recorded across that three-message exchange you can solve for time of flight without needing the two clocks to be perfectly synchronized.

Concretely, the tag records when it sent the Poll (Tsp), when it received the Response (Trr), and when it sent the Final (Tsf_tag). The anchor records when it received the Poll (Trp), when it sent the Response (Tsr), and when it received the Final (Trf). DS-TWR combines all four intervals in a ratio that cancels most of the clock-rate skew – the residual error single-sided TWR cannot remove.

TAG ANCHOR Poll Response Final T_round1= Trr-Tsp T_reply2 T_reply1=Tsr-Trp T_round2 TspTrrTsf_tagTrpTsrTrf DS-TWR: ToF = (T_round1 x T_round2 – T_reply1 x T_reply2) / (T_round1 + T_round2 + T_reply1 + T_reply2)
Fig. 2 DS-TWR: three frames, six timestamps. The ratio formula cancels most of the clock-rate skew between tag and anchor.

Time of flight times the speed of light is distance. Light travels roughly 30 cm per nanosecond, so a 10-meter round trip is about 67 ns each way. That is why UWB ranging lands in the centimeter band: the pulses are short enough (around 2 ns) that the receiver can lock onto the leading edge of the first arriving pulse rather than averaging over a long, muddy waveform.

Why leading edge, not strongest

Outdoors the direct path is often weaker than a reflection off a car door, a fence, or your own body. A receiver that locks onto the strongest peak will measure the bounce, not the true range. UWB’s wide bandwidth (at least 500 MHz per channel) shrinks the pulse so much that the direct path shows up as a distinct early spike, separate from the reflections that trail behind it.

Build note

The leading-edge threshold is the single most important tuning knob on the ranging chip. Set it too low and noise registers as the first path; set it too high and a weak (but real) direct path gets skipped in favor of the next reflection. We tune it per environment – a golf-course fairway wants a different value than a parking garage.

Measuring angle: PDOA

Distance alone tells the wagon how far behind to sit, but not which way to steer. For that we use Phase Difference of Arrival, or PDOA. Instead of one antenna, the anchor module carries two (sometimes three) antennas spaced a few centimeters apart. The same pulse arrives at each antenna at a slightly different time, depending on the angle the tag sits off the array’s broadside.

Because UWB measures phase, not just amplitude, the difference between the two antennas maps cleanly to an angle through a little trigonometry. A pulse that hits the array dead-on (broadside) arrives at both antennas in phase; one that comes from the side arrives at the nearer antenna first. The wider the baseline, the more sensitive the angle – but also the more prone to phase-wrap ambiguity, which is why most anchor arrays keep the spacing to about half a wavelength.

broadside incoming signal theta delta d = d sin theta A1A2 spacing d
Fig. 3 A two-antenna PDOA array. The phase offset between antennas encodes the tag’s bearing relative to broadside.

In practice we measure bearing accuracy of a few degrees within a roughly 120-degree field of view in front of the array. Outside that cone the geometry gets poor and the angle estimate noisier, which is why a follower that needs to track you all the way around will use more than one anchor, or a rotating mount, or fuse the bearing with the IMU-derived heading.

Putting them together: range plus bearing

followwagon combines TWR and PDOA on the same UWB frames. Every ranging exchange that solves for distance also carries the phase samples the anchor needs to estimate bearing. So out of a single three-frame DS-TWR burst you get both how far and which way – a full polar coordinate from the wagon to the tag, refreshed tens of times per second.

TWR gives you the radius. PDOA gives you the angle. Together they give the wagon a live pointer to where you are, in one frame, without a camera watching your face.

That polar pair – (r, theta) – is the raw input the pursuit loop consumes. It is far more compact and far more reliable than a pixel blob from a camera or a heatmap from a radar.

Why centimeters matter for a follower

Follow distance is a design choice. Some people want the wagon a meter behind; others want two. To hold that setpoint, the controller needs an error signal accurate to roughly a tenth of the gap. If your gap is 1.5 m, you want ranging good to about 15 cm. UWB delivers that comfortably. BLE does not.

Body blocking

The other thing UWB survives is your own torso. Because the pulse is broadband, a reflection off your shoulder still arrives, just slightly attenuated. BLE, being narrowband, picks the strongest path and calls it truth – which is exactly when the wagon surges forward and clips your heel.

Build note

We anchor the tag at chest height and keep the base module at least 30 cm off the deck. Below that, ground reflections start to corrupt the leading edge of the pulse and the centimeter-grade numbers degrade to decimeter-grade.

From range to motion

Distance alone is not enough – the wagon also needs a heading. We get that from a small IMU fused with the UWB update, then feed the result into a pursuit loop tuned to lag slightly rather than chase exactly. That lag is the whole point: a follower that rides your wake feels natural, while one that matches every step feels creepy.

# simplified pursuit update
# positive when the person pulled away from the setpoint -> chase
error = measured_distance - target_distance
accel = Kp * error - Kd * velocity
drive_motors(accel, bearing)

The tuning of that loop is its own article. For now, the takeaway is that none of it is possible without a distance and a bearing you can trust – and that is what TWR plus PDOA buys you outdoors, in the sun, through a crowd.

What this means for the kit

Every followwagon ships with two UWB radios. One is a single-antenna tag you carry; the other is a multi-antenna anchor that rides on the wagon and runs both the TWR distance solve and the PDOA bearing solve on every frame. That pair is the ranging-and-bearing core the rest of the kit builds on – the motor drive, the lidar avoidance, the pursuit loop. Strip the UWB out and you no longer have a follower, you have a remote-control cart.

If you want to see the same idea rendered as a cursor-following canvas, scroll back up to the hero on the home page. The math here is what that animation is quietly simulating.

JW
Jason Wood
Building followwagon in public – hardware, firmware, and the pursuit-control math that makes a wagon trail you. Previously spent a decade on robotics ranging stacks.

Leave a Reply

Your email address will not be published. Required fields are marked *