I am trying to find the best way to implement a ranging scheme where each node (4 in total) wants to find its distance to every other peer node as part of solving its relative position.
Exactly as described in the DW1000 user manual 12.3.4.4.
However, the user manual does not reveal any details about what might be the best way in order to accomplish such a task.
Decawave, can you please provide more details about these different schemes and the derivation of the associated formulas?
Or has another person already implemented such a scheme and is willing to share their code or concept?
I’m not from Decawave, but I can say that they have very good documentation, here are pdf names I assume you know where to find them otherwise you can ask
DWM1001 System Overview and Performance.pdf : 4.6 Operation of a Tag
Decawave offers a ready to use PANS but not the source code. And they offer a simple example for pair ranging.
The only thing Decawave do not provide is a TDMA for positioning a node within many anchors.
I have developed an open source code to do that, I’ve been posting it all around in this forum, you can just google “uwb meshposition” if you don’t find it, or if you have any question let me know.
If I would use the most simple approach which is single sided two way ranging then this would result in 6 ranging exchanges which is equal to 12 UWB frames ( 2 uwb frames for each ranging exchange).
I am only asking because I thought someone here in this forum has done something similar in a smarter way.
But this only gives you a single sided range for each device. To get two way ranges for each device you need more messages.
A TWR requires 3 or 4 messages (1) a->b, 2) b->a, 3) a->b 4) b->a data packet with results) so to combine this we do:
A transmit acts as AB1, AC1, AD1
B transmit acts as BC1, BD1, AB2
C transmit acts as CD1, AC2, BC2
D transmit acta as AD2, BD2, CD2
A transmit acts as AB3, AC3, AD3 and results data from unit A to others.
B transmit acts as BC3, BD3 and results data from unit B to others.
C transmit acts as CD3 and results data from unit C to others.
D transmits results to others.
At this point all units have all of the information to calculate all of the ranges.
Personally I didn’t need this type of functionality very frequently and had optimised the 4 packet point to point two way range system so that it takes 1.25 ms so rather than implement a second completely different measurement method I opted for the simple but slow method of doing lots of point to point ranges. It keeps the radio side of things constant no matter how many devices are involved, all the extra complexity is done outside of the radio logic.
I was simply going by the decawave app note that the number of packets for TWR using point to point is ranges order n^2 but for a highly asymmetric system you can do it in 2n packets.
If you don’t mind it being single sided then it only requires n packets.
It depends on the accuracy you want however given the inaccuracies in single sided ranging, especially with the levels of delay involved in such a system, I would have thought that a double sided system would be worth the extra time. Unless you don’t mind massive errors the performance benefits will normally more than compensate for the longer time and higher power requirements.