REFRENCE ANTENNA - DIRECTION FINDING CONNECTIONLESS RX CODE

Hi, I am trying to implement the AOA using the MUSIC algorithm. I am using direction_finding_connectionless_rx code in zephyr (nordic sdk v2.3.0). 

I am using nRF52833dk (tag) and nRF52833dk with 4x4 coreHW rectangular antenna array (locator) connected with gpio pins 3,4,28,29. I am getting 8 samples from the reference period, 1 to 37 samples with 2 µs antenna switching slots (45 samples totally).

I am trying to toggle only 3 antennas in linear form with reference antenna (7), so I have set the ant_patterns[ ] as { 0x7, 0x6, 0x7, 0x8, 0x7, 0x9, 0x7 } in main.c. I have printed the antenna ID, it's correct as per the pattern I have set in main.c. But according to the BLE's direction finding specification the 1st 8 samples are from the reference antenna (reference period). I am not sure where I should set the reference antenna in the code.  According to the readme.rst file provided in the code, Reference period where single antenna is used for sampling. The samples are spaced 1 µs from each other. The period duration is 8 µs. I am not sure whether it takes reference antenna as a 1st antenna in my antenna switching pattern mentioned above (main.c) 0x7 or It will takes antenna that have been set as dfe-pdu-antenna = <0x7> in (nrf52833dk_nrf52833.overlay) file.

Where should I set the reference antenna?

Parents
  • Hi

    The reference period is one of the three periods in the Constant Tone Extension, and will be 8 IQ samples after the guard period and before the switch-sample period. I believe the reference antenna will be the one defined as dfe-pdu-antenna in your .overlay file.

    Best regards,

    Simon

  • Ok Simon, thanks for the reply I got.

    So in my case, I am using 720 sets of raw IQ samples from the locator. And I am calculating the phase difference of (0-7 reference period samples). I am getting a 90 degree phase difference in the reference period, but the phase difference is decreasing linearly around 20-30 degrees for 6th (45 set) of IQ samples. It is giving phase difference 90 degree for the first 5 sets of (45) IQ samples properly in the reference phase. What is the reason for this linear decreasing of phase difference and whether the phase difference should be in 90 degree for all the reference period?

    And I am trying to calculate the AOA angle using the MUSIC algorithm, but I am getting the same angles while I am placing the tag in different positions. I have set the ant_patterns[ ] as {0x7, 0x6, 0x7, 0x8, 0x7, 0x9, 0x7} with a reference antenna as 0x7 (Return to first method). What would be the reason for this? 

    If I change the ant_patterns[ ] as {0x6, 0x6, 0x9, 0x7} with a reference antenna as 0x7 (Round robin method). It is giving different angles. What would be the reason for this? 

Reply
  • Ok Simon, thanks for the reply I got.

    So in my case, I am using 720 sets of raw IQ samples from the locator. And I am calculating the phase difference of (0-7 reference period samples). I am getting a 90 degree phase difference in the reference period, but the phase difference is decreasing linearly around 20-30 degrees for 6th (45 set) of IQ samples. It is giving phase difference 90 degree for the first 5 sets of (45) IQ samples properly in the reference phase. What is the reason for this linear decreasing of phase difference and whether the phase difference should be in 90 degree for all the reference period?

    And I am trying to calculate the AOA angle using the MUSIC algorithm, but I am getting the same angles while I am placing the tag in different positions. I have set the ant_patterns[ ] as {0x7, 0x6, 0x7, 0x8, 0x7, 0x9, 0x7} with a reference antenna as 0x7 (Return to first method). What would be the reason for this? 

    If I change the ant_patterns[ ] as {0x6, 0x6, 0x9, 0x7} with a reference antenna as 0x7 (Round robin method). It is giving different angles. What would be the reason for this? 

Children
  • Hi

    SRINATH said:
    the phase difference is decreasing linearly around 20-30 degrees for 6th (45 set) of IQ samples

    Sorry, but what do you mean about this, is a one sixth (1/6) of your IQ samples 20-30 degrees lower than the rest, or are they decreasing by 20-30 degrees ~every 45 sets of IQ samples?

    I think most likely the testing environment being noisy would cause behavior like this (from how I understand your description at least). There could be some clock drift causing this for example, but if you're using the LF XTAL (mounted on the DKs and used by default in our samples) that won't be it. I have asked the developers internally if they know what else could cause this and will get back to you when I hear from them. Thank you for your patience!

    Best regards,

    Simon

  • Thanks for the reply Simon, 
    Antenna switching pattern I have used is 8,7,9,7,10,7 with a reference antenna as 0x7 (Round robin method). I understood that phase difference of samples in reference period is ~90 degree (i.e first 8 IQ samples), what should be the phase difference between all other consecutive samples after the reference period.
    I have attached the sample csv file below:
  • Are these just raw IQ samples in this .csv files? The data from our samples is only raw IQ data and it must be converted into vector form to be reviewed properly. We don't have have any specific sample code showing this, but you can check out this page for information on the various formulas used to translate IQ data between polar and rectangular form. Nordic will not provide a Direction Finding algorithm for you I'm afraid.

    Measuring the phase difference of the signal as received by the different antennas, is how the AoA receiver can determine the direction from which the signal is received, so this phase difference won't be the same for every application. Please see our Direction Finding whitepaper here for more information.

    Best regards,

    Simon

Related