Unexpected phase differences for IQ samples in reference period - AoA

We have a locator-beacon setup based on this https://docs.nordicsemi.com/bundle/ncs-2.9.1/page/nrf/samples/bluetooth/direction_finding_connectionless_tx/README.html running AoA mode. We are running nRF Connect SDK v 2.9.1.

We are using the antenna pattern { 0x5, 0x6, 0x4, 0x9, 0xA, 0x8, 0xD, 0xE, 0xC, 0x1, 0x2, 0x0 }

When analyzing the I/Q data from the reference period (8 samples), we expect the phase of the data to be different for each sample. However since they are being sampled from the same antenna, and the time interval is the same between all reference samples, we expect the phase to change by the same amount between each reference sample. To ensure this is working properly, we tested measuring 500 times. For each of these, we had 8 samples from the reference period. This gave us 7 "phase differences" per measurement, the phase difference between reference sample 0 and 1, between reference sample 1 and 2, all the way up to the phase difference between reference sample 6 and 7. When plotting these phase differences, we expect them all to be roughly the same. And here are the results, showing the phase differences between consecutive samples at the different indices:

For the first 7 reference samples, the difference between consecutive samples seem to always be roughly the same. However something weird happens when we compare the phase of the 7th and 8th reference sample. It seems to be essentially random. We don't understand what is going on here. We don't think we can blame it on "noise", because why would this only affect the last reference sample? Any ideas what could be causing this, or is it expected to look like this?

  • We have now tested using nRF Connect SDK 2.2.0, and these are the measured phase differences between consecutive reference samples:

    The phase differences between the 7th and 8th samples still have noticeably more outliers than the others. We also looked at the magnitude differences between consecutive samples:

    Also here we see that the difference between the 7th and 8th sample behave differently than the rest.

  • Tord said:
    The reference samples are measured on ANT_11 (0x2), and the first switching-sample is measured on ANT_12 (0x0). We suspect that the fact that this last reference sample is taken right before an antenna switch is somehow causing problems. We tested having the reference-antenna and the first sample-antenna both be ANT_11 (0x2), and then the problem seems to disappear:

    I seemed to have overlooked this. So you are not just seeing this issue dissapear between the first sample slot and the reference period, but between every 7th and 8th sample? If the switching was happening to fast or something I would assume you would need the first and the last sample in the repeating pattern to use the same antenna.

    regards,

    Elfving

  • I may have been a bit unclear. I am only looking at the measurements in the reference period, and all the charts I've shown only uses the measurements from the reference period. So by "7th and 8th sample", I mean the 7th and 8th measurements in the reference period.

    So yes, the issue disappears between the 7th and 8th reference samples when the first sample-antenna is set to the same one as the reference-antenna (ANT_11 in this case). The thing we're trying to understand is why the choice of the first sample-antenna should affect the last reference sample, as this should be measured before any switching is being done.

    If this last reference sample was the only problem, it wouldn't be too bad. But if this is a symptom that the switching itself somehow influences the measurements, it is likely only amplified when switching is occuring between every single sample. The reason I'm specifically focusing on the difference between the 7th and the 8th reference sample, is that we have the other reference samples to compare them to, so it's easier to detect that something is not working as expected.

  • Hi again Tord, and thanks for your patience. 

    This does look like an issue I've seen before, in which the last sample taken in the reference period switches to the second antenna pattern. There has been a certain change in the way the stack itererates through the antenna patterns; in older SDKs we followed the pattern outlined in this WP, and to fix this the first antennas where added back in or something along those lines. So a bug regarding the second antenna doesn't sound completely out of the blue.

    The team here wasn't able to reproduce that issue back then, but the customer who reported it found that this only happened with 2µs slots, and was happy to switch to just using 1µs slots. 

    Are you seeing the results of the 8th reference sample coinciding with those of the second pattern? And I am not saying you should be happy switching to 1µs slots, but are you seeing this issue disappear in that situation as well?

    Regards,

    Elfving

Related