I am using DWM3000EVB for Two-Way Ranging between a Node and a Tag.
However, I’ve noticed an issue where, after powering down the Node and turning it back on, the measured distance changes, ranging from 90 cm to 110 cm, while the correct distance should be 100 cm.
Additionally, I have observed that the output of dwt_readclockoffset() is varying, indicating a possible change in frequency.
I suspect that the frequency might be drifting every time I power the device on.
Has anyone encountered a similar problem, and if so, could you please share any potential solutions or recommendations to address this issue?
How much drift do you observe each time you power on the device in terms of ppm?
I would expect a certain drift on Xtal but that shouldn’t affect the ranging result like -+10cm.
In Double-Sided Two Way ranging implementation, there is a clock drift compensation algorithm. In that sense, I would advise you to use DS-TWR to mitigate any Center Frequency Offset(CFO) error.
Thank you for your response.
Here are the TWR distance measurements and ClockOffset values for when the two devices were approximately 1 meter apart.
Are these deviations within an acceptable range?
a) Distance: 0.94 [m] (Standard Deviation: 0.063), 12.8 [ppm], ClockOffset 859 (Standard Deviation: 2.06)
b) Distance: 0.99 [m] (Standard Deviation: 0.062), 3.8 [ppm], ClockOffset 257 (Standard Deviation: 2.07)
(ppm = clock_offset / (2^26) * 10^6)
I have implemented DS-TWR with reference to twr_demo and confirmed that distance calculations are possible without ClockOffset correction.
I wouldn’t expect a 9 ppm difference between the two cases.
But as I said before, using DS-TWR can be a solution to mitigate clock drifts.
It is also possible to use another clock source such as TCXO which can provide a more stable reference clock in different environmental cases. But unfortunately, that option is not available on DWM3000.
I would also recommend you wait for a couple of minutes when you power up the device. This would give enough time to settle the temperature of the board at ambient temperature and therefore reduce the clock drift.