Most of the time distance varies

hello
i am using our customised design and this git hub example GitHub - Decawave/dwm1001-examples: Simple C examples for Decawave DWM1001 hardware with one board acting as a initiator and other as responder i want to achieve the precise distance with ±10CMS and maximum distance up to 3000cms(30 meters)
my configuration is

static dwt_config_t config = {
2, // Channel number
DWT_PRF_64M, // Pulse repetition frequency
DWT_PLEN_1024, // Preamble length. Used in TX only. */

DWT_PAC32, // Preamble acquisition chunk size. Used in RX only. */
24, // TX preamble code. Used in TX only. */
24, // RX preamble code. Used in RX only. */

1, // 0 to use standard SFD, 1 to use non-standard SFD. */
DWT_BR_110K, // Data rate. */
DWT_PHRMODE_STD, // PHY header mode. */
(1025 + 64 - 32) // SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */
};
static dwt_txconfig_t config1 = {
0xC0,
0x1F1F1F1F,

};
iniator side
#define TX_ANT_DLY 15485
#define RX_ANT_DLY 15641
POLL_TX_TO_RESP_RX_DLY_UUS 1100
RX_RESP_TO_UUS 2700

responder side
#define TX_ANT_DLY 15485
#define RX_ANT_DLY 15641
POLL_RX_TO_RESP_TX_DLY_UUS

my problem is my distance is not precise most of the time i get values a ranging from -2 to 2 with in one meters so basically i distance is off up to ±200 meters can someout tell me suggestions to
1.to rectify the issue
2.documentation for these kind of problems
3.find cause of the problem
4.or exact delay and configuration values for 110k data rate with transmit power

thanks and regards
manikandan v

When you say you have a custom design do you mean a custom PCB with a DW1000 chip on or are you using a DWM1001 module?

If it’s a custom PCB then your issues could be hardware related.

If you only need 30 m then there is no need to drop all the way down to 110k. We run 850k with a preamble length of 64, no external amplifiers and everything within FCC limits. We can reliably get 80m range between two devices. If you can’t get 30 m at 850k then that’s also a sign that you have hardware issues.

thanks for your reply i am using custom pcb with dwm1001 module the reason iam going to 110k is our requirement can change upto 110 meters in future thats why i am trying to achieve with 110k data rate

Does your PCB give plenty of clearance around the DWM1001 antenna?
Have you tried varying the relative orientations of the units?

Your 2 meters of noise relates to around 9 bits in the timing registers. When doing a scheduled transmit from the DW1000 the low 9 bits of the timestamp are ignored and treated as all 0. Is your range calculation taking this into account?

1 Like

Hi mani,

I’m responding to your direct message here so other people can see the response.

Can you clarify what the physical distance is between the 2 devices while testing? I understood from your original post this is 1 meter, is this correct? Is there a line of sight between the devices?

You might be seeing an overflow of the RX or TX message timestamps. Note that the examples were written for a data rate of 6.8Mbps, not 110 kbps. This could change the timing requirements.

The suggested preamble length when using 110 kbps is 2048 or 4096, see table 57 in the DW1000 User Manual. This would also require changing the PAC size to 64 (see table 6 in the DW1000 UM).

Are you sure you are seeing variations in meter, not mm?

DWT_TIME_UNITS is a value in seconds:

SPEED_OF_LIGHT is a value in meters / second:

https://github.com/Decawave/dwm1001-examples/blob/master/examples/ss_twr_init/ss_init_main.c#L60

Making the distance printed a floating point value in m. Are you seeing the value before the decimal point changing?

thanks for your reply
physical distance is within one meter only and also with in light of sight
i am pretty sure am seeing the variations in meters only value before the decimal point is changing gradually
now i have changed my configuration as per your suggestion now my conguration looks like this

static dwt_config_t config = {
5, /* Channel number. /
DWT_PRF_64M, /
Pulse repetition frequency. /
DWT_PLEN_2048, /
Preamble length. Used in TX only. /
DWT_PAC64, /
Preamble acquisition chunk size. Used in RX only. /
10, /
TX preamble code. Used in TX only. /
10, /
RX preamble code. Used in RX only. /
1, /
0 to use standard SFD, 1 to use non-standard SFD. /
DWT_BR_110K, /
Data rate. /
DWT_PHRMODE_STD, /
PHY header mode. /
(2049 + 64- 64) /
SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */
};
static dwt_txconfig_t config1 = {
0xC0,
0x1F1F1F1F,

};

transmitor side

#define POLL_TX_TO_RESP_RX_DLY_UUS 1200

#define TX_ANT_DLY 16505
#define RX_ANT_DLY 16505
RX_RESP_TO_UUS 2700

responder side
#define TX_ANT_DLY 16505
#define RX_ANT_DLY 16505
#define POLL_RX_TO_RESP_TX_DLY_UUS 2200
but that does not even calcualting the distance i think i have again change change the delay and antenna calibrated values is that right??
and i have one more doubt this is my transmission power setting
static dwt_txconfig_t config1 = {
0xC0,
0x1F1F1F1F,

};
but in that configuation guide i did nt see this 0X1f1f1f1f but why in forum most of them suggested this as maximum power setting can you clarify on this??

and can you suggest the transmisson configuration i can use which gives me good response in without light of sight and consumes less battery?
thanks and regards
manikandan v

Using the maximum transmit power will maximize the link budget, and thus the maximal distance. However, as with any radio, there are typically legal limitations regarding TX power set by the government.

In Europe (ETSI), this is typically a PSD of -41.3dB/MHz for most UWB devices. Our examples are typically based on this limit, but depending on the type of product and region your limits and the way they are defined can be different. The TX power setting will also depend on the used antenna and attenuation from things like casing, switches, … By allowing customers to set the TX power, we allow to set the max distance while staying within legal limits.

For lab / experimental settings, it’s typically OK to use the max power. However if you wan to sell a product, you need to validate this.

Please have a look at our application notes. They explain most of this, including your question on how to achieve less energy consumption, in great detail.