How should we handle the 'Final Adelay' values?

Hi everyone,

Recently, I’ve been working on an indoor positioning system using the DW3000 ESP32 board. During the Antenna_Calibration phase, I’ve measured multiple times and obtained numerous ‘final Adelay’ values between the Tag and Anchor. In the subsequent positioning phase, which value should I choose? Should I take the average of these values or the value that appears most frequently?

thanks a lot !

Take the average.

I’m seeing a variation of around 26 in those numbers, that would relate to around 13 cm of variability in the ranges. If you pick the value in the middle your ranges should then be in the +/- 6 cm most of the time.
The fact it looks to be moving around randomly is a good example of why averaging lots of measurements is beneficial if you have the time to do it.

1 Like

Hi Andy

Thank you very much for your answer!

Hi AndyA,

Thank you again for your answer. After using the average number to write into the Anchor’s code, I conducted several distance measurement tests. However, the results still have a significant deviation of -50 cm from the actual distance. Afterwards, I measured the Adelay value several times again, and found that there is a large difference in the average number obtained each time. So I looked back at the code and found that only ‘dwt_setrxantennadelay(RX_ANT_DLY); dwt_settxantennadelay(TX_ANT_DLY);’ is set for the antennadelay. I couldn’t find a step to eliminate antennadelay in the code. May I ask if you have studied this?

Below is my code.
Anchor.txt (29.4 KB)
tag.txt (20.2 KB)

1 Like

I don’t use the decawave drivers and so don’t use dwt_setrxantennadelay or dwt_settxantennadelay. I did however have similar functionality.
After calculating the antenna delay using DS TWR over a known distance to a unit with the correct delay value already set I set both the transmit and receive delay to the same calculated value.
While this value needs to be set on start up each time you don’t then need to allow for it during normal operation. The firmware stores it in the eeprom for each unit and automatically configures the value as part of the startup code.

My system also allows for an on site fine tuning delay calibration. But rather than update all the anchors that is then applied by the tag adjusting the measured ranges before calculating a position.

Due to the board layout and antenna type used my antenna delay is generally in the 55 meter region (I always think of it in terms of distance effect rather than time, 55 meters has more intuitive meaning than 11000 clock ticks) so that number is hard coded into the firmware, I only ever store the difference from that for a given unit. This means that even with the calibration value set to 0 the numbers are roughly correct.

1 Like