I noticed a comment in the DW blog mentioning a technique I had neither thought, or heard of, and I wonder what the advantage is.  I can’t get the paper because I’m not a member of the ACM, but I think I can guess what it is from the synopsis.  More interestingly, the paper is from Samsung!
A leading factor leading to inaccuracy in the DW ranging system is that the respondents clocks may be running at different rates.

  1. A sends request to B at time T0
  2. B receives request and delays for time Db
  3. B sends response back to A
  4. Distance = the round trip time measured by A (Ta), minus the B’s delay time (Db) divided by 2, divided by c (speed of light) is the distance. 

(Ta – Db)/2c

But A’s clock may be running at a different speed from B’s clock, and so all timing measurements are suspect.  
If clock A is accurate, and clock B runs 10% more slowly than true time, the round trip time measured by A would appear to be Db*10% longer, but A would still subtract the alleged turnaround time

 ((Ta + Db* 0.1) – Db) / 2c = (Ta + Db*0.9) / 2c

If B’s clock is 10% faster the converse would be true.
If on the other hand, clock B is accurate, and clock A is 10% slow, then the total round-trip time would appear shorter when measured by A’s slower clock.

(T* 0.9 – Db) / 2c

Of course, clocks A and B are both inaccurate!  Decawave compensates a bit for this by making two round trips, the so-called double-sided two-way ranging.  The advantage of this is that there are two delays, Da and Db and the clock error of both peers is factored into the time measurement.  The assumption is that, on average, the clock errors cancel out, which is of course a bogus assumption.  DW send the results back to the originator which makes a total of 4 transmissions, instead of the 2 used for single-sided ranging.
I think this new idea tries to estimate the relative clock error.   

  1. A sends request to B at time T0
  2. B receives request and delays for time Db
  3. B sends response back to A
  4. then B waits a fixed time Db2 and sends a replicated response packet back to A.
    or A waits a fixed time Da and sends a packet containing timing data to B
Assume the first.  The difference between the first, and second response packets is agreed by both sides, so A can measure the difference in arrival times of both of B’s packets. A knows how far apart they ought to be, and the difference between the expected, and observed times accounts for the relative clock drift.
The problem I have is that even when A knows how slow or fast Bs clock is relative to it’s own clock, it doesn’t know which is right, and so averaging the two clocks out still seems like the best approach for generating a range.  
The win is that it seems to be as good a double-sided two-way, but only three transmissions are needed for A to average out the clock drift.  On the down-side, B knows nothing unless A tells B.
So this scheme saves 25% power for “selfish” rangers who just want to know a range, and don’t want to share it using DW packets.  I’m thinking TS07 will use a selfish ranging protocol because it will use a low-power radio to distribute the range data, eschewing (I love that word) the relatively expensive DW packets.

Leave a Reply