How to improve the range of DWM1000?

Hello,
I am using DWM1000 module with ESP32 and using GitHub - thotro/arduino-dw1000: A library that offers functionality to use Decawave's DW1000 chips/modules with Arduino. code for setting up the communication between one tag and one anchor.
I am able to establish a communication between the two but the range I am getting is very small, approx. 8m.
Can anyone help me with this? I want to increase the range to as much as possible
I have to make a project on asset tracking system in which I have to use 4 anchors and one tag. Currently I am trying to achieve max. range with one tag and one anchor and once that done, I will move to 4 anchors and one tag.

  1. How is the antenna of the DWM1000 mounted.
  2. What settings are you using? Preamble length and data rate have the biggest impact on range, channel will also have some impact.
  3. What have you got the transmit power set to.

How your antenna is mounted, what is around it and how it is oriented will have a massive impact on range. You want it as high as possible with as much air around it as possible. The module should be mounted so that the antenna is sticking up not laying flat, ideally as the highest part of your system (or lowest for anchors mounted on the roof).

Changing the radio protocol settings can make a big difference, you can trade off between speed of operation and range.

If all else fails turning the power up is the brute force solution but will only get you so far.

Hi AndyA, thank you for your reply.

  1. Since I bought the DWM1000 module, the antenna is already mounted on it. But I am connecting the module with ESP32 via some long cables to make sure that the antenna is in air and there is nothing around the antenna.
  2. My settings are as follows: Channel=5, Data rate= 110 kbps, PRF= 64 MHz and preamble= 2048. ( I used them for the long range accuracy)
  3. I don’t understand your third question very well. can you please explain me how can we set the transmitting power?

I am making sure that my antennas on both tag and anchor are in direct line of sight. And can you explain me you last point “If all else fails turning the power up is the brute force solution but will only get you so far”. what does this mean?

It sounds like your antenna positioning is reasonable. Just make sure there is no metal near it.
Those settings should give you good range. You may get a bit more using channel 4, path loss is lower at lower frequencies, but that won’t make much difference.

The simple way to get more range from a radio is to make the transmission stronger. It’s not elegant or efficient and for commercial products there are limits to how much you can do this. But for one off home projects as long as you don’t start interfering with anything else (which is highly unlikely) then it is a simple solution.

Taking a quick look at the code you linked to transmit power seems to be set around line 600 onwards of DW1000.cpp. I’m not sure where exactly they got those numbers from but for your settings it’s using 0x85 which I work out as being 8.5 dB of gain.
Changing this to 0x1f would crank the transmit power up to the maximum gain of 33.5 dB, that should give you around 8 times the range. You will however be well over the FCC maximum transmit powers at that point. You may want to increase the power a little but not quite that much.
See section 7.2.31 of the DW1000 user manual for how to calculate the values to use for setting the transmit power.

Edit - One other thing to check is antenna heights above the ground. You will get fade zones as you move the antennas apart. The distance these occur at depends on the antenna heights above the ground. The higher you can get them the better. A simple check for this is to see if the signal comes back when you move further way. Unless you are very close to the ground 8 meters seems a little early for this effect to kick in but it is worth checking.

Hi AndyA,
Thanks for you input. I will give this a try and let you know.
A have one more query. It seems like the distance I am getting is almost twice the actual distance between tag and anchor. I don’t understand why that’s happening. Any ideas?

Regards
Heena

Is it always twice or is it the correct range with a constant distance error added?

It depends on how exactly range is calculated, sometimes it’s easy to miss a divide by 2 somewhere. A quick skim through that code looks like they are using

myTOF->setTimestamp((round1*round2-reply1*reply2)/(round1+round2+reply1+reply2));

Which should give the correct range once multiplied by the speed of light so a factor of two error seems odd.

However if you’re getting a constant offset on the range then that could easily be explained by poor antenna delay calibration. Every unit has a slightly different delay between the antenna and the transmitter/receiver logic on the chip. This needs to be measured and corrected for. With only two devices this is as simple as subtracting the offset. With more than two it gets more complicated since you need to work out how much of the delay each device is responsible for.
The chip does have the ability to correct for these errors automatically, you still need to work them out and program them into the chip but then the times from the chip are all corrected to allow for this. Or you can handle it entirely in your own code and correct for it there.

Hi AndyA,
I think it is an offset caused by antenna delays.
When I am measuring short distance, it appears to have doubled the range.

I wanted to ask how the antenna placement affects the range
Currently I have placed the anchor and the tag on a desk, around 75 cm above the ground. and the antenna facing up and away from any metal.
I am thinking that the communication range for my setup is getting obstructed due to antenna placement or orientation but I am sure what it is.

Can you please guide me how should I place the antenna and what’s the reason behind that?
Also, another thing I am noticing is that once my anchor and tag goes out of range, it takes them some time/ distance to connect again. What could be the reason for that?

Regards
Heena

In the datasheet for the module there are a set of charts showing antenna gain in various orientations. For each orientation there are two charts, one for vertical polarisation and one for horizontal.
This is all horribly confusing at first but the short version is you want your antennas to be oriented to ensure you always get the largest possible signal, that is the line on the chart is as far from the centre as possible.
The charts are in dB which is a logarithmic scale with a line every 5dB. In dB increasing something by 3dB is roughly doubling the power, 10dB is 10 times the power. Keep in mind that the gain applies at both the receiving and the transmitting end so 3dB at each ends gives you 6 dB in total, enough to double your range.

For the DW1000 this means the board mounted vertically so the antenna is sticking up out the top. This gives the pattern labelled Azimuth Theta. If all the antennas are in this orientation then the gain only varies by around 10dB worst case depending on the orientation and frequency, most of the time it’s closer to 5dB of variation. That sounds like a lot but it’s fairly good for this sort of antenna.

If you get the orientation wrong it can easily get to 25 dB less gain than the peak. -25 dB works out as about 1/300th of the power. If it was -25 at each end then that’s a 50dB hit or around a factor of 100,000 reduction of power. This is why RF engineering uses dB, it keeps the numbers sensible otherwise you end up miscounting the number of 0’s.

The fading at certain distances is a reflection issue. The signals will travel directly between the two antennas and also bounce off the ground. UWB is normally good at ignoring reflections but at the correct distance the path bouncing off the ground and the direct path will be exactly 1/2 wavelength different. When you hit this point the reflection and signal cancel out at the receiving antenna and the effective signal strength drops significantly. This effect is dependent on the two antenna heights above the ground, the distance between them and the frequency used.

Finally, there is no fundamental reason for a delay in re-acquiring but it depends a lot on the radio protocol used to decide which devices to measure to. In other words this is probably an effect of the DW1000 library you are using.

Hello AndyA,
Thank you so much for your help and the information. All this have been very helpful.

There is one more thing I have been having issues with. According to FCC regulation, the maximum transmit power should be -41.3 dBm/MHz. This power can be varied by changing the values in the register 0x1E. Can you please tell me how to set this register with an example of a number for power?

Regards
Heena

The limit is -41.3 dBm/MHz averaged over 1ms. For 110kb/s the packets are always over 1ms but for the other data rates depending on the preamble length and packet size it’s possible to have packets significantly under 1ms in duration. In that situation as long as you are only sending 1 packet per ms you can potentially turn the power up. A 500us long packet can be sent with 3dB more power than a 1ms long packet and still have the same average power. The smart power option can apply these power boosts automatically in some situations.
There is also a peak power limit of 0 dBm.

Section 7.2.31 of the DW1000 user manual details the power register and how to calculate the values to go there. Normally unless you’re using smart power you’ll want to have the same 1 byte number repeated 4 times.

1 Like

Hello AndyA,

Thank you for all your help so far.

I have been stuck at transmitting power for some days.
I have mentioned a quote below which you explained earlier in your chat.

Can you please help me to understand how the gain is related to the transmitting power?
for example, 0x85 is 8 dB gain. but which transmitting power does that represents?because according to the manual, 0x85 represents -41.3 dBm/MHz. And you suggested me to increase the change the register value to 0x1F which us 30.5 dB gain. Which transmitting power does 30.5 db gain represent? I am sorry for asking this but my RF knowledge is not very strong.

Regards
Heena

As mentioned the limit is on the average transmitted power. This will depend on the protocol settings used and the size and frequency of packet transmissions.
It will also vary a reasonable amount unit to unit due to component and assembly variations.
Finally since the test is on power out of the antenna in the direction that has the strongest signal it will also depend on your antenna and to a lesser extent anything, especially anything metal, that is near (meaning within 10-15cm) of the antenna.

All of this means that there is no such thing as an ideal transmit power setting to reach the limit without exceeding it. The only way to be sure is to measure it and see.

The gain settings in the chip are in dB not dBm. dB is a relative measure, there is no defined reference, all you can say for sure is that changing the value will result in an increase or decrease in the peak transmit power of the specified number of dB.
How this peak transmit power setting relates to the average power limit depends on all of the factors mentioned above.

dBm is dB relative to 1 mW,
0 dBm = 1 mW of power. 3 dBm = ~2mW, 10dBm = 10 mW. -40 dBm = 0.0001 mW

dBm = 10*log10(power/1mW)
power in mW = 10^(dBm/10)

Hi AndyA,
So how can I know how much power is anchor transmitting?

Regards
Heena

You get an RF chamber, a calibrated antenna and a spectrum analyser with a 50 MHz resolution bandwidth. You set your system to transmit your worst case transmission loading and you measure the power while rotating your system to find the peak…

Hi Heena,

I am also curious regarding the range of DWM1000. I plan to implement an entire wireless network using these nodes. Can you please let me know the maximum range you achieved using these modules after making the suggested changes?

Thank you

Hi,

I am getting a range of 7-8 metres up to 77 or more (77m was the maximum I could try) depending on the value on register 0x1E.
I am not able to test the transmitting power at different values of this register as I don’t have spectrum analyser.

Regards
Heena

1 Like

Thanks a lot, Heena. I will be using DWM1000 in one of my experiments soon. If I face any difficulty I will post here.

Hi AndyA,

I have been trying to work on the antenna delay calibration.
Since i am using channel 5, i used a separation distance of 5m and created a EDM.
I have measured the delay but i have few queries.
First, I don’t know how can i include this delay in my code to remove antenna delays.
Second, My antenna delay is not constant. When i am measuring smaller distances, the delay is less and when i measure longer distances, the delay is different.
Can you please help me with this?

Regards
Heena

If you are using the example code then there are the lines
#define TX_ANT_DLY 16300
#define RX_ANT_DLY 16300
in the code. These are then loaded into the DW1000 as the transmit and receive antenna delays. This value is in DW clock cycles which works out as around ~5 mm per count. Increasing these will increase the assumed antenna delay and so reduce the calculated distance by that much.

If you aren’t using the sample code then you need to load your calculated antenna delay values into the transmit and receive delay registers in the DW1000 using the appropriate function calls for whatever driver code you are using.

When you say you see a difference in the error with distance? If it’s in the region of 5-10 cm with the range being too long at longer distances and too short at short distances then this is normal and expected.
There is also a signal strength dependent offset in the measured range that needs to be corrected for to get accurate distances. Section 3 of application note 11 details this.

There will also be a temperature dependent offset that you need to correct for if you want to get reliably accurate results.

Getting a 10-20 cm accurate range is relatively easy, getting those errors down to 2-3cm gets a lot harder.

Thank you for you reply AndyA.

Can you please tell me where are these value from? And how these values equate to 5mm?
I am getting an aggregated antenna delay of ~0.5m for 1 m and less range and beyond that i am getting around ~7m delay.

Regards
Heena