2.2 DS-TWR

The Double-Sided Two-Way-Ranging application exchanges a sequence of data telegrams between the nodes and captures the timestamps of these data telegrams at the transmitter and the receiver nodes to measure the distance between them. This data telegram sequence is necessary to compare the timestamps at each node and compensate for timestamp clock differences between the nodes.

As the following figure shows, one node is called Tag node, which initiates the message sequence, and the other node is called Anchor node, which responds to the message sequence. In the end, all timestamp information must be captured at least at the Anchor node to perform the distance calculation.

Figure 2-4. DS-TWR Example Setup

The following figure shows the message sequence with data telegrams and captured timestamp information.

Figure 2-5. DS-TWR Message Sequence and Timestamp Capture

The first data telegram is transmitted from the Tag to initiate the measurement. The timestamp TXT1 is captured at the Tag when the first UWB pulse of the data telegram is transmitted. At the Anchor node, this data telegram is received and the timestamp RXA1 is captured with the reception of the first pulse after the synchronization word of the data telegram (refer to the ATA8352 Impulse-Radio Ultra-Wideband (IR-UWB) Transceiver User's Guide (DS50003129) for a description of the data telegram format). With the reception of the data telegram, the Anchor node also receives the timestamp information TXT1 from the Tag in the payload of the data telegram. After a reply time (Treply1), the Anchor node responds with a data telegram and captures the timestamps TXA2 at the Anchor node and RXT2 at the Tag node. This is followed by a third telegram from the Tag node to the Anchor node and timestamp information TXT3, RXT2 and RXA3. With the third telegram, all timestamps were received by the Anchor node to perform the calculation of the time differences Tround1, Treply1, Tround2 and Treply2.

The timestamp differences at the Tag node and the Anchor node are, then, calculated as:

Equation 2-1. Tround1
T r o u n d 1 = R X T 2 T X T 1
Equation 2-2. Tround2
T r o u n d 2 = R X A 3 T X A 2
Equation 2-3. Treply1
T r e p l y 1 = T X A 2 R X A 1
Equation 2-4. Treply2
T r e p l y 2 = T X T 3 R X T 2

With these timestamp differences, the Time-of-Flight (ToF) and the distance between the two nodes can be calculated as described in Equation 2-6 by:

Equation 2-5. Time-of-Flight (ToF)
T o F = ( T r o u n d 1 * T r o u n d 2 ) ( T r e p l y 1 * T r e p l y 2 ) ( T r o u n d 1 + T r o u n d 2 + T r e p l y 1 + T r e p l y 2 )
Equation 2-6. Distance
Distance = T o F * c

Where, c is the propagation speed of light in free air with 299766 km/s.

This measurement is implemented in the DS-TWR demo application software for the UWB demo kit.