I have a tag sending poll requests to neighboring anchors to initiate a DS-TWR communication (poll - resp - final). It works perfectly fine with one anchor and one tag. However I’ve discovered that by having multiple anchors (2+), it will only communicate with the first anchor it sees (which is fine), but will sometimes return a distance of 0cm or a low distance that’s is clearly inaccurate.
The tag sends a first roll call to all the anchors it can find then I take the ID of whichever anchor replies first and insert it in the next exchanges (resp and final) so I’m assuming the issue comes from the poll message (which makes sense because when I try with single sided TWR I get the same issue)
the tx_mode for the tag once the TX message has been sent is DWT_START_TX_IMMEDIATE and DWT_RESPONSE_EXPECTED.
I found solutions to give each anchor a specific delay before answering a poll message but the issue with this is in my use case I’m most interested about the anchor closest to the tag at any given moment, so could it be a possibility that if the closest anchor has the longest delay before replying the communication will always get “stolen” by an anchor further away? If so, is there a different way to fix this problem?
(I also considered sending a first roll call with no distance measurements and the tag will then initiate a TWR communication with whichever anchor sent its ID first as a response to the roll call, but that’s energy consuming)
PS: for now we’re talking about a network of 5 to 10 anchors and 2 to 4 tags, but the idea is to double / triple that size in the near future.
So you want to measure range to the closest anchor only? This is a bit of a chicken and egg problem, you can’t measure to the closest without knowing where you are and you can’t know where you are without measuring to more than one anchor.
The idea that the reply from the closest will arrive first won’t work (at least not without the anchors all being networks and synced but then you have a TDoA system not a TWR one). If you get two signals of roughly equal strength arriving at the same time then you’re not going to see anything usable. The signal travels 1 meter every ns, the minimum message length is around 100 us. So the message from a device 50 km away would overlap the message from a device right next to you. In that situation the signal levels wouldn’t be the same but for usable ranges and devices in the same room you’re simply not going to see the replies. As soon as you need more than one tag and one anchor you need some means of addressing devices so they all know whether or not they are supposed to reply and if multiple devices are supposed to reply they need some way of deciding the order of the replies leaving enough gap between each to ensure no overlap and the receiver has time to re-arm before the next starts.
In order to get it to work you need to either a) measure enough ranges to work out your location and so which is closest or b) measure them all and go with the lowest value.
Something like stage 1) Used a single sided ranging roll call where each anchor replies after a time fixed by their ID. Use this to calculate the closest and estimate how much further away you would need to a different one to be closer. Stage 2) use double sided ranging to measure to the closest until that range increases to the point where another may be closer. Stage 3) either return to stage 1 and re-evaluate the closest or use DS TWR to measure to the two closest until the difference becomes larger than a set threshold, at that point return to stage 2.
Once you have more than one tag you also need to work out how you avoid multiple tags trying to measure ranges at the same time.
Thank you for your reply Andy, I understand that wanting to measure range to the closest anchor only doesn’t really make sense but that was our goal because in our tests with the DW1000 99% of the time the tag would do exchanges with the closest anchor and those odds were good enough for us. But maybe the other anchors were overlapping the messages and we didn’t notice… I think a single sided ranging roll call is the best option for us, thank you!