understanding the first path amplitude

Hi,

I have plotted out the CIR data from DW1000 (ACC_MEM) and trying to understand how the First Path Amplitude -readings match with the CIR data.

The manual states that ‘…the magnitude of the accumulator tap at the index x beyond the integer portion of the rising edge FP_INDEX reported in this register’, but the amplitude in my CIR data does not match with the values in FP_AMPL1/2/3, see graph below. The CIR data is plotted from accumulator I/Q data: sqrt(II + QQ), blue line in the graph below.

’m reading the FP_AMPLx values from DW1000 with the driver (dwt_readdignostics()) and using the values as such.

I did plot out the data several times after separate distance measurement runs, but the data never matched with the FP_AMPL -readings (in the example above you could claim that the FP_AMPL1 and 3 have swapped, but that does not explain any other plot I have taken …)

Any ideas what I’m doing wrong here?

Hey Kari,

I know that it is a while ago that you asked this question, but I do have the same problem now. Could you already find an answer/solution for that?
This would be very helpful for me.

Because I have the impression that the DW1000 is not using the accumulator data (but earlier?) to calculate the leading edge, that is why there is a difference between the FP_AMPL1/2/3 and the ACC data.

Best regards,
Bernhard
Graz University of Technology, Austria

Hi Kari, Bernhard,

just a note:

Register 0x12: contains FP_AMP2 and FP_AMP3 - the FP_AMP3 is the 1st point after FP,

Register 0x15: contains FP_AMP1 which is the 3rd point after FP

The difference that you see comes from the fact that the DW1000 algorithm that processes the accumulator samples does not use the raw sample values as you see when you read the accumulator. It uses samples after DC offset estimate is removed. Also the magnitude calculated by DW1000 algorithm is an approximation, the sqrt function is not used.

Regards,
Zoran

Can you confirm that FP_AMP2 & FP_AMP3 are the first point and FP_AMP1 is the third point? That register naming is confusing at best if so.

yes,

the FP_AMP3 is the 1st sample and FP_AMP1 is the 3rd.

Z

Hey Zoran,

okay then it is wrong in the DW1000 API guide. There it says the ‘firstPathAmp parameter is the value of the accumulator tap at index given by floor(firstPath)’.

Anyway, I think it is not correct. I read out FP_AMP1/2/3 and PP_AMPL and they are
FP_AMPL1 = 17531, FP_AMPL2 = 18732, FP_AMPL3 = 12247, PP_AMPL = 18731
What I did in MATLAB:
fP = floor(firstPath); %it is 743
acc_data_abs = sqrt(acc_data_imag.^2+acc_data_real.^2);

And the result is:
acc_data_abs(fP+1) = 1993.66, acc_data_abs(fP+2) = 13673.25, acc_data_abs(fP+3) = 18699.83, max(acc_data_abs) = 18699.83

So there is a very big difference between the accumulator and the other registers. Is this really because of the mentioned DC Offset removal and the sqrt approximation?
Is it possible to read this DC offset from a register and how is sqrt approximated?

Probably also the leading edge detection is calculated from the ‘corrected’ accumulator and not the one which is read out with dwt_readaccdata. Is that correct?

Best regards,
Bernhard

Hi Bernhard,

yes the API is wrong, it should say:

FP_AMPL1 = this is the amplitude of 3rd point after CEILING (FP_INDEX)
FP_AMPL2 = this is the amplitude of 2nd point after CEILING (FP_INDEX)
FP_AMPL3 = this is the amplitude of 1st point after CEILING (FP_INDEX)

The DC offset estimation is not available.

The SQRT approx = MAX(Q, I) + 1/4 MIN (Q, I), where Q and I are absolute values of real and imaginary parts of complex sample.

Regards,
Zoran

Hey Zoran,

okay, thank you. Now the values are reasonable.

Thanks.

BR,
Bernhard

Hi Zoran
Hate to bother. It would be very helpful, if you would tell me the detail about how to calculate the CIR. Is there any documents i can read ?

Regards
Zao