Using DecaWiNo and ranging protocols

This tutorial illustrates the use of ranging protocols between DecaWiNos.

The ranging process consists in measuring the distance between two wireless nodes. Using UWB technology, the DecaWiNos can range without relying on dedicated hardware such as accelerometers or GNSS (GPS) receivers. The DecaDuino library can be used to implement Time-of-Flight (ToF) ranging protocols by timestamping both incoming and outgoing frames.

The DecaDuino library comes with a set of sketches that implement popular ranging protocols that work out-of-the-box on the DecaWiNo hardware.

Two-Way Ranging (TWR) protocol

The Two-Way Ranging (TWR) protocol needs 3 messages:

  • START: sent by the client at t1 and received by the server at t2
  • ACK: sent by the server at t3 and received by the client at t4
  • DATA_REPLY: sent by the server to return the server timestamps (t2 and t3) to the client.

The two example sketchs DecaDuinoTWR_client and DecaDuinoTWR_server introduce a simple implementation of the TWR protocol without addressing fields. The timestamps are generated by the 64GHz (15.625ps) DWM1000 internal timer.

Flash each example sketch on two nodes (client and server) and get the distance between the two nodes. You can use the frame sniffer to dump the received messages.

For a better understanding of the example sketches, the next images represents the client and server state machine diagrams.

DecaDuino TWR server state machine diagram
DecaDuino TWR server state machine diagram
DecaDuino TWR client state machine diagram
DecaDuino TWR client state machine diagram

 

Symmetric Double-Sided Two-Way Ranging (SDS-TWR) protocol

The Two-Way Ranging (TWR) protocol needs 3 messages:

  • START: sent by the client at t1 and received by the server at t2
  • ACK_REQ: sent by the server at t3 and received by the client at t4
  • ACK: sent by the client at t5 and received by the server at t6
  • DATA_REPLY: sent by the server to return the server timestamps (t2, t3 and t6) to the client.

The two example sketchs DecaDuinoSDSTWR_client and DecaDuinoSDSTWR_server propose a simple implementation of the SDS-TWR protocol without addressing fields. The SDS-TWR protocol implies more messages but is theorically better than the TWR protocol since the clock skew effect is compensated by the symetry of the exchanges.

Flash each example sketch on two nodes (client and server) and get the distance between the two nodes.

For more information…

For more information on ranging protocols and DecaDuino/DecaWiNo interaction with ranging protocols, you can read the following academic paper: Adrien van den Bossche, Réjane Dalcé, Ibrahim Fofana, Thierry Val, DecaDuino: An open framework for Wireless Time-of-Flight ranging systems, Wireless Days 2016 (WD2016), 23-25 March 2016, Toulouse, France. Some others papers on ranging/localisation are listed in the Academic Papers and Publications section of this website.





Facebooktwittergoogle_plusredditpinterestlinkedintumblrmail

Leave a Reply