Incorrect ranging values while calculating distance

hello
i am using customised design with two boards one as initator and responder i am trying to achieve maximum distance between the board with 110k data rate my configuration setup 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_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. /
0, /
0 to use standard SFD, 1 to use non-standard SFD. /
DWT_BR_110K, /
Data rate. /
DWT_PHRMODE_STD, /
PHY header mode. /
(1025 + 64 - 64) /
SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */
};
static dwt_txconfig_t config1 = {
0xC0,
0x1F1F1F1F,

};

initiator side

POLL_TX_TO_RESP_RX_DLY_UUS 10000
TX_ANT_DLY 16300
RX_ANT_DLY 16456
RESP_RX_TIMEOUT_UUS 65000 maximum timeout value

responder side
POLL_RX_TO_RESP_TX_DLY_UUS 12000
RESP_TX_TO_FINAL_RX_DLY_UUS 500

my problem is i get only negative values while calculating distance can someone tell me correct timeout values to rectify this issue so that i can values with accuracy

thanks and regards
manikandan v

Hey there!

Ok, so for the delays calculation you might need to read a litle of the this post: How to calculate the transmission time of a packet
There you have an example document to determine de time durantion of each delay, depending on your uwb caracteristics.

Another point is the antenna delay values that you need to load/configure (this is just a reminder). The antenna delay values if they are not well determined they could cause an impact on you range values. So if you have this kind of code, you probably have the examples provided from decawave source code, so probably you know all of this subject.

In last reminder, use the application note to write code, cause there this delays are explained a bit (i think).

Hope i could help.

Cheerz

1 Like

thanks for your reply i have changed the antenna delay values and tx poll and rx poll values for my requirement but still my could not get accuracy with centimeters even through the values are not large as before but i still could not get the perfect accuracy can u suggest me a method to achieve this
thanks and regards
manikandan v

Hey there again!
Well, i dont know what you did in detail but i sugest couple things:

  • place both devices in a distance known for that configuration that you want to implement - there is some documentation about the calibration of the devices.

  • play with the delay’s values that you have so you can determine wich value should use. The recomendation is always try to use the lower values to improve time of replay and round calculation.

  • the antenna delay value that you post before shows that you use different value for tx and rx. Try to use the same for both. To determine the value for that you have to achive the error value you “pretend”. I bet that if you put them equal a better result will start to show. (Just a bet :smiley: )

  • dont forget that a communication ss-twr happens in both ways so both devices must be “calibrated”

Cheerz.