# Temperature dependency of dwm1000

Hi,

I am using decawave dw1000 module with arduino recently. I am using the following method to calculate range.
i) Poll transmission by Tag : time = T1
ii) Poll reception by Anchor : time = T2
iii) PollAck Sent by Anchor with 7ms delay: time = T3
iv) PollAck received by Tag : time = T4

a = T4-T1; b = T3-T2
r = (a-b)*SpeedOfLight/2

I am able to get the range properly, however the problem is the range varies drastically with temperature. If the actual distance between Tag and anchor is 2.5 meters, then at an Antenna Delay of 16100, the range is around 2m at 40 deg and 3m at 45deg centigrade. I am aware from FAQ that “[color=#3c444f][font=Arial, sans-serif]Typically the reported range will vary by 2.15 mm / ⁰C and by 5.35 cm / VBATT.[/font][/color]” but how the antenna delay varies with temperature? Or how the frequency of crystal oscillator varies with temperature? Or is there any other reasons that I am missing?

Thanks,
Subhasis.

After allowing for average effect of 2 cm/degree error I still see a error of up to around 2 cm/degree, some times positive, sometimes negative and certainly not linear. The shape and magnitude of the curve I see is different for each radio but for a given unit it’s repeatable.

But nothing even close to the 20 cm/degree that you’re seeing.

Antenna effects with temperature will be fairly minimal, they will be related to thermal expansion.

It could be a crystal effect, I make it a 0.8ppm change in crystal frequency should be enough to shift your 7 ms delay to be off by the 6 ns needed to give a 1 m range difference. The anchor would have to be running slow relative to the tag to make the delay take more clock cycles on the tag than the anchor and so increasing the measured range.

If you swap the rolls around and have the Tag act as an anchor and the anchor as a tag does the direction of the range error change (1 m at 45 C)? If so that would be a good indicator that it is a clock issue causing the error.
In that situation try using a bi-directional ranging system, this should cancel the crystal differences out.

i) Poll transmission by Tag : time = T1
ii) Poll reception by Anchor : time = T2
iii) PollAck Sent by Anchor with 7ms delay: time = T3
iv) PollAck received by Tag : time = T4
v) PollAckAck Sent by Tag with 7ms delay: time = T5
vi) PollAckAck reception by Anchor : time = T6
vii) (optional depending on system) Anchor sends untimed data packet containing T3-T2 and T6-T3 to Tag

a = T4-T1; b = T3-T2
c = T6 - T3; d = T5 - T4
r = ((a-b) + (c-d))*SpeedOfLight/4

Hi,

Thanks for the replay. It seems you are correct. The issue was not with temperature, rather than with clock drift between anchor and tag. I tried bi-directional ranging. it gave almost stable range with very low variation on changing the room temperature. Now I am using the first method with a new formula considering the error introduced by clock skew and off set, which is described in https://github.com/irit-irt/DecaDuino . It has more variation in the range than bi-directional method but it is faster.

Regards,
Subhasis.

1 Like