DWM1000 clock accuracy

I’ve been doing some testing with the DWM1000 module and simple ranging. I’m using a modified version of the example source code ex_05a_ds_twr_init.c and ex_05b_ds_twr_resp.c, running on my own platform.

I see the example code does two round-trips (3 messages, A->B, B->A and A->B again) then calculates Ra, Da, Rb and Db, and uses these figures to calculate the ticks-of-flight and ultimately the distance.

I was interested to see whether the system would work reliably with only one round-trip (A->B and B->A). However, the distances calculated are much less accurate this way.

e.g. Typical values for my setup (the actual distance apart is approx 2.5m)
Ra 340805323 Da 609500981 Rb 609501172 Db 340803504

Two way trip calculations using Decawave software formula: Ticks of flight 614 Distance 2.88m
One way trip (Ra – Db) / 2: Ticks of flight 909 Distance 4.26m
One way trip (Rb – Da) / 2: Ticks of flight 95 Distance 0.45m

My guess would be that the initiator clock is running faster than the responder, hence the difference. In fact if I swap the hardware round so the chip previously used for the initiator is now the responder, and vice-versa, the difference changes too.

Is this expected?

Hi Andy,

please have a look at 6a/6b - here single sided TWR is used (i.e. one RTD). initiator uses clock offset estimate of the far transmitter to correct for the difference in two clock freq.

And yes, for double sided to work, you need to average the two RTDs.