Problems with calculating RX Power level

I am currently using the DWM3000 and an STM32 NUCLEO-F429 board for some UWB SS-TWR measurements. I am using the ss_twr_initiator.c and ss_twr_responder.c examples for the tag and anchor, respectively.
I’m trying to calculate and compensate the RX power error that occurs in UWB communication. I see in APS011 page 11 that i can be calculated by friis path loss formula:
image

I believe I have applied that formula correctly using the following code:

  double log_term = log10(4.0*PI*6.4896e9*effectiveDistance);
  
  potencia = -14.3 + 1.0 + 20.0*log_c - 20.0*log_term;
  acumpot += effPot;

During my research, I found that the RX power can be calculated by reading specific registers and applying the values to the following function:

image

static dwt_rxdiag_t diagnostics;
static float F1;
static float F2;
static float F3;
uint8_t DGC_DECISION_BUFF[4];
uint8_t DGC_DECISION;
uint16_t N;


F1 = (float)diagnostics.ipatovF1/4.0f;
F2 = (float)diagnostics.ipatovF2/4.0f;
F3 = (float)diagnostics.ipatovF3/4.0f;

N = diagnostics.ipatovAccumCount;


dwt_readfromdevice(0x03, 0x60, 4, DGC_DECISION_BUFF);
DGC_DECISION = (DGC_DECISION_BUFF[3]>>4) & 0b0111;

pwr_diag = 10*log10((F1*F1 + F2*F2 + F3*F3)/(N*N)) + 6*DGC_DECISION - 121.7;

However, the results do not match the theory. In my case, at 5 meters, the expected value was -77 dBm, but I obtained the following values (each of these values is the mean of 16 mesurements):

5.2210	0.0397	-76.35	-65.12
5.2092	0.0381	-76.33	-60.45
5.2104	0.0306	-76.33	-63.97
5.2081	0.0387	-76.32	-64.22
5.2174	0.0251	-76.35	-58.74

The meaning off this values is, respectively:

  • Measure distance
  • Standard deviation
  • Friis fromula RX power
  • Diagnostics RX Power.

The actual distance is 5 meters, that error of about 20 cm i assume is due to antenna delay and RX power-related delay.

Could someone explain if I am making any mistakes in the calculations, or suggest why I might be getting such a large error?

The Rx power calculation is only ever going to be an estimate rather than a direct power measurement so you shouldn’t expect things to line up perfectly. The fact that you get a 6dB variation even after taking the mean of multiple measurements shows how variable this number is.

As to why you have a mismatch - Maybe your transmit power is different from the value you as assuming. Or maybe you aren’t correctly factoring in antenna gains in that specific orientation.

Hi @LuanP ,

The Transmitted channel power, -14.3 dBm, isn’t accurate for the theoretical calculation.

I see you’re using a 27 dB conversion factor, which comes from 10 log ( 500 MHz / 1 MHz ) + -41.3 dBm, but this calculation is not correct for several reasons.

  1. UWB PSD is not uniform over the 500 MHz bandwidth. So 27 dB conversion factor only applies to uniform PSD over 500 MHz. The practical conversion factor is ~25 dB.
  2. You don’t take into account the gating gain in the calculation. -41.3 dBm is measured for one frame per ms. However, if you want to measure the power over the duration of the frame, you need to either transmit back-to-back frames or calculate the gating gain by using 10 Log ( 1000 / duration of your frame (us)).

For example, if you have 200 us long frame, the gating gain would be 7 dB.

Pt (dBm) = -41.3 + 25 + 7 = -9.3 dBm

  1. And lastly, as @AndyA indicated, your antenna gain might be different depending on the orientation. And there are some other factors like multipath reflection and polarization mismatch, which can cause a difference between theoretical calculation and measurement results.

Kind regards,
Emre