This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC26X2R1: AoA inquiry

Part Number: LAUNCHXL-CC26X2R1


Hi Team,

This inquiry from our customer is a continuation of the other thread. According to our customer,

I would like to have 512 of samples for each frequency channel. I do not want all the channels to be reported but at least 5 is enough.
Right now I am getting only 45 samples for each channels (It can be around 170 by setting sample rate to 4). When plotting Phase-sample_Idx graph, it does not provide much information with just 45 samples.
I tried to reduce the number of channels using channel map but yet no success. I am interested in connection-AoA and rtls_cordinator/Responder examples. ( rtls_master/slave examples are bit different)
Regards,
Danilo
  • Hi Danilo,

    As already discussed, the number of samples extracted from each CTE is defined by the Bluetooth LE specifications. If more IQ samples are required, then the data coming from several CTEs should be leveraged.

    In order to reduce the number of Bluetooth LE channels used in a connection, a channel map update is required. The channel map update should be triggered on the central side (rtls_coordinator).

          static chanMap_t chanMap;
    
          chanMap.chanMap[0] = 0x03; // 2 channels
          chanMap.chanMap[1] = 0x00;
          chanMap.chanMap[2] = 0x00;
          chanMap.chanMap[3] = 0x00;
          chanMap.chanMap[4] = 0x00;
          HCI_LE_SetHostChanClassificationCmd(chanMap.chanMap);

    (HCI_LE_SetHostChanClassificationCmd should return HCI_SUCCESS)

    This should lead to receive the event hciEvt_CmdComplete_t with cmdOpcode HCI_LE_SET_HOST_CHANNEL_CLASSIFICATION. If needed, you can also read the channel map with HCI_LE_ReadChannelMapCmd.

    I hope this will help,

    Bets regards,

  • Hi Clement,

    I just received this response from our customer.

    I was not able to limit the number of channels by calling above given code after connection established. However, I have some other questions related to AoA calculations.
    As I understand, 
    reference period, switch slot and first half of the sampling slot ( when using 2us slot duration) should be discarded.
    I use only two antennas of the BOOSTXL antenna board ( A1.1 , A1.2).
    Lets consider the rtls_connected.py python script. If I set antenna pattern length as 2 and pattern as [0,1], does the pattern looks like 0,1,0,1,0,1,0,1...........?
    I am using 2us sampling slot duration, 4MHz sample rate and above antenna pattern. Can you tell me whether following pattern is correct for calculating phase difference for AoA?
    1st sample slot ------> antenna A1.1
    2nd sample slot ------> antenna A1.2
    3rd sample slot ------> antenna A1.1
    4th sample slot ------> antenna A1.2
    5th sample slot ------> antenna A1.1
    .....
    .....
    .....
    .....
    /////////////////// taking the average phase /////
    Average phase A1.1 = Avg(1st sample slot)
    Average phase A1.2 = Avg(2nd sample slot)
    Phase difference_1 = (Average phase A1.1-
                                             Average phase A1.2 )
    Average phase A1.1 = Avg(3rd sample slot)
    Average phase A1.2 = Avg(4th sample slot)
    Phase difference_2 = (Average phase A1.1-
                                             Average phase A1.2 )
    Also, could you please explain me what are the useful information we can take from reference period ? (Is it possible to find signal attenuation constant )
  • Hi,

    The antenna pattern can be modified in the python script or statically set in the embedded code. Depending on the configuration selected, the answer to the first question may then be different.

    The algorithm used seems correct, but I am not sure it will provide good results in real conditions. I mean, this algorithm will not be robust against multipath effects.

    In general, the data collected during the reference period is not used. However, I guess you could leverage it in case your algorithm needs it.

    I hope this will help,

    Best regards,

  • Hi Clement,

    Please see the response of our customer below.

    Thank you for your response. Could you please explain more about what you mean by "Depending on the configuration selected, the answer to the first question may then be different."? In BOOSTXL antenna board, Antenna A2.1 can be turned on by just adding DIO28 using rtls_coordinatro example configuration file. In this way, I just used Antenna 0 with DIO28 and Antenna 1 with DIO29. Then I changed the python script antenna pattern to [0,1]. Each samples slot from antenna 0,1,0,1,0,1,.......
    But I realized that this pattern is wrong. If I select antenna pattern as [0,1], then all the sample slots come from only antenna element 0 (correct me if I am wrong). So, I changed the pattern to [0,0,1].
    All the calculations are done in the Matlab environment. At this stage, I do not worry about the multipath effect, since I first need to see at least some results in AoA values. Unfortunately, I am not getting the expected values for different angles.
    Phase calculated as follows,
    I = tbl.i; % collect the I values from the CSV file
    Q = tbl.q; % collect the Q values from the CSV file
    phase = rad2deg(atan2(I,Q));
    Wavelength and AoA calculated as follows,
    % calculating wavelnegth lambda
    center_freq = 2402e+6 + channel_list*2e+6;
    lambda = (3e+8)./center_freq;
    D = 3.5e-2; % distance between two adjacent antennas

    % calculating AoA
    AoA = acosd( (phase_difference_packet.*lambda)/(2*pi*D) );
    My results as follows (First column - phase difference, Second column - AoA)
    I have attached two CSV files (filtered IQ values, Non-filtered IQ values) for your reference. If you can check (in case if you have your own algorithm) those, please let me know where I am wrong. Wrong with devices, Antenna configuration, my understanding, my Matlab script, or what?
    Highly appreciate your work, you have helped me a lot so far.
    Regards,
    Danilo 
  • Hi,

    I am currently out of the office.

    An answer will be provided by Thursday September 8th.

    If this is urgent, please open a new thread.

    Thank you for your comprehension.

    Best regards,

  • Hi,

    Answers are provided here.

    Best regards,