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.

CCS/LAUNCHXL-CC26X2R1: AoA

Part Number: LAUNCHXL-CC26X2R1

Tool/software: Code Composer Studio

Hi everyone,

I'm working on a system with a LAUNCHXL-CC26X2R1 + BOOSTXL-AOA acting as a master and a LAUNCHXL-CC26X2R1 acting as a slave. I already tried the RLTS browser interface and it worked and now I'm trying to use both arrays in a switching routine.

First of all, I see that in RTLSCtrl_initAoa() this kind of configuration is not included:

  if (gAoaCb.resultMode != AOA_MODE_RAW)
  {
    for (int i = 0; i < numAnt; i++)
    {
      if (IS_AOA_CONFIG_ONLY_ANT_1(sampleCtrl))
      {
        if (pAntPattern[i] != i)
        {
          return RTLS_CONFIG_NOT_SUPPORTED;
        }
      }
      else if IS_AOA_CONFIG_ONLY_ANT_2(sampleCtrl)
      {
        if (pAntPattern[i] != i + 3)
        {
          return RTLS_CONFIG_NOT_SUPPORTED;
        }
      }
      else
      {
        return RTLS_CONFIG_NOT_SUPPORTED;
      }
    }
  }

So the first question is if there is any possible way to have a working system with this configuration. Which part of the code should I modify?

Secondly, I went further in the code to see its behavior: I saw that in RTLSCtrl_postProcessAoa() there is a part of code dedicated to antenna selection and angle estimation. Again there is no space for a switching system:

  if (IS_AOA_CONFIG_ONLY_ANT_1(gAoaCb.sampleCtrl))
  {
    antenna = ANT_ARRAY_A1x;
  }
  else
  {
    antenna = ANT_ARRAY_A2x;
  }

So I modified this part with:

  if (antenna == ANT_ARRAY_A1x)
  {
      // Start with A2 (ANT_ARRAY pin high is A1, low is A2)
      PINCC26XX_setOutputValue(ANT_ARRAY, 0);
      antenna = ANT_ARRAY_A2x;
  }
  else
  {
      // Start with A1 (ANT_ARRAY pin high is A1, low is A2)
      PINCC26XX_setOutputValue(ANT_ARRAY, 1);
      antenna = ANT_ARRAY_A1x;
  }

Then I checked the pins with the oscilloscope and I saw that the pin was correctly switching.. and so I assumed that the array were switching too.

Is this approach correct to achieve what I said? Or should I modify other parts of the code?

Last but not least, does the BOOSTXL-AOA have a particular position for the angle estimation example? Or does it work fine with any orientation?

Best Regards,

Federico

  • Hi,

    I have assigned an expert to comment.

    Regards,
    Michael

  • Hi Evan,

    thank you for your answer. I read all the documentation you're talking about but I find really hard to navigate into the code because of the impossibility to run debug mode due to the presence of python application which manages the entire discover and connection routine.

    From what I'm reading I understand that it is not possibile to use both arrays during one aoa estimation, otherwise it will generate an error. Is my statement incorrect?

    Best Regards,

    Federico

  • Hi again,

    any news about my question?

    Best Regards,

    Federico

  • Hi Frederico,

    My apologies, the team has been at a limited bandwidth the past few weeks due to vacations. I've assigned your post now to someone on my team who has a deeper expertise in AoA to help get you an answer. 

  • Hi Evan,

    thanks a lot! I'll be here waiting.

    Best Regards,

    Federico

  • Hi Federico,

    Thanks for your patience.

    First of all, and as you assumed, the antenna is used is determined by the status of  DIO27, DIO28, DIO29, DIO30 (you can review the truth table in this document [you can basically search for "truth table" to find it]). As long as you are able to successively see the two antennas arrays to be used, you should be fine.

    For a given angle estimation, only one array can be used (because the antennas used to receive one CTE must all be on the same line).

    Regarding the BOOSTXL-AOA position, there are a few constraints.
    First of all, the accuracy is NOT better while using two antenna arrays. By using two antenna arrays you only increase the area covered by the system (BTW, you can review which area is covered by the system in this document [search for "AoA performance"]). Please keep in mind that for boundary angles, the angle measured will not be stable (cf. Release Notes of your SDK).
    Secondly, the environment whereyou evaluate the system will play a big part in the quality of the results. I recommend to elevate the boards at least one meter over the floor and remove all the elements that could create multipath.

    I hope this will help,

    Best regards,

  • Hi Clement!

    Thanky very much for helping.

    Clément said:

    First of all, and as you assumed, the antenna is used is determined by the status of  DIO27, DIO28, DIO29, DIO30 (you can review the truth table in this document [you can basically search for "truth table" to find it]). As long as you are able to successively see the two antennas arrays to be used, you should be fine.

    Yes, that's exactly what I did to see the antenna (and the arrays) switch.
    Clément said:
    For a given angle estimation, only one array can be used (because the antennas used to receive one CTE must all be on the same line).
    Allright.. now everything starts to make sense. I'll be more specific: I'm trying to make an application where I can locate ble tags in an area. I think only one linear array is not enough to do this because the method only calculates an angle (in other words.. a straight line in a bidimensional plane) and so the location of the tag results to be ambiguous. So I thought I could use two arrays to determine in which point the two straight lines would intersect. Of course the initial code does not have a section that compares the values.. and I haven't done it yet, because I wasn't sure about the arrays switching.
    In addition, I found something else regarding antenna switching.
      // Calculate AoA for each antenna array
    //  if (IS_AOA_CONFIG_ONLY_ANT_1(gAoaCb.sampleCtrl))
    //  {
    //    AoA_A1 = ((gAoaCb.connResInfo[connHandle].aoaResults.pairAngle[0] + gAoaCb.connResInfo[connHandle].aoaResults.pairAngle[1]) / 2) + 45 + channelOffset;
    //    selectedAntenna = ANT_ARRAY_A1x;
    //  }
    //  else if (IS_AOA_CONFIG_ONLY_ANT_2(gAoaCb.sampleCtrl))
    //  {
    //    AoA_A2 = ((gAoaCb.connResInfo[connHandle].aoaResults.pairAngle[0] + gAoaCb.connResInfo[connHandle].aoaResults.pairAngle[1]) / 2) - 45 - channelOffset;
    //    selectedAntenna = ANT_ARRAY_A2x;
    //  }
    
      if (antenna == ANT_ARRAY_A1x)
      {
          AoA_A1 = ((gAoaCb.connResInfo[connHandle].aoaResults.pairAngle[0] + gAoaCb.connResInfo[connHandle].aoaResults.pairAngle[1]) / 2) + 45 + channelOffset;
          selectedAntenna = ANT_ARRAY_A1x;
      }
      else if (antenna == ANT_ARRAY_A2x)
      {
          AoA_A2 = ((gAoaCb.connResInfo[connHandle].aoaResults.pairAngle[0] + gAoaCb.connResInfo[connHandle].aoaResults.pairAngle[1]) / 2) - 45 - channelOffset;
          selectedAntenna = ANT_ARRAY_A2x;
      }

    The first part is the original code.. the second part is what I did to try and modify it. What are we doing here exactly? I understand that the system needs an antenna reference to define the parameters to use in the calculation, but does this change the orientation of the plane I'm imagining?

    If it is to difficult to understand, I'll try in other word.. but I hope I have described my problem well.

    Clément said:
    Regarding the BOOSTXL-AOA position, there are a few constraints.
    First of all, the accuracy is NOT better while using two antenna arrays. By using two antenna arrays you only increase the area covered by the system (BTW, you can review which area is covered by the system in this document [search for "AoA performance"]). Please keep in mind that for boundary angles, the angle measured will not be stable (cf. Release Notes of your SDK).
    Secondly, the environment whereyou evaluate the system will play a big part in the quality of the results. I recommend to elevate the boards at least one meter over the floor and remove all the elements that could create multipath.

    Yeah, I did it this way. I was wondering if I have to place the BOOSTXL-AOA in vertical or horizontal position but I assume it's the same.

    Thanks again for all the help you're giving.

    Best Regards,

    Federico

  • Hi Federico,

    Federico Acerbi said:
    Allright.. now everything starts to make sense. I'll be more specific: I'm trying to make an application where I can locate ble tags in an area. I think only one linear array is not enough to do this because the method only calculates an angle (in other words.. a straight line in a bidimensional plane) and so the location of the tag results to be ambiguous. So I thought I could use two arrays to determine in which point the two straight lines would intersect. Of course the initial code does not have a section that compares the values.. and I haven't done it yet, because I wasn't sure about the arrays switching.


    I think the solution you are describing is possible. However, you cannot use the BOOSTXL-AOA directly to do so. This is because the areas covered by the two antenna-arrays are (almost) not overlapping each other. In addition, by measuring the two angles from very close positions, the system will be less reliable. 

    Federico Acerbi said:
    What are we doing here exactly? I understand that the system needs an antenna reference to define the parameters to use in the calculation, but does this change the orientation of the plane I'm imagining?


    Here, we are basically choosing position of the 0 angle. The 45 degrees value is coming from the  90 degrees angle (divided in 2) we have between the two antenna arrays. The channel offset value is here to correct the results based on the channel used (by changing the channel, the frequency of the CTE is slightly different and the results computed are slightly different too...).

    Federico Acerbi said:
    I was wondering if I have to place the BOOSTXL-AOA in vertical or horizontal position but I assume it's the same.


    You are right, both is the same (see the radiated power of he antenna in this document). That being said, I am used to keep the BOOSTXL-AOA in horizontal position :)

    Best regards,

  • Hi again Clement,

    Clément said:
    I think the solution you are describing is possible. However, you cannot use the BOOSTXL-AOA directly to do so. This is because the areas covered by the two antenna-arrays are (almost) not overlapping each other. In addition, by measuring the two angles from very close positions, the system will be less reliable.

    So the purpose of the double array is mainly to extend the covered area?

    Clément said:
    Here, we are basically choosing position of the 0 angle. The 45 degrees value is coming from the  90 degrees angle (divided in 2) we have between the two antenna arrays. The channel offset value is here to correct the results based on the channel used (by changing the channel, the frequency of the CTE is slightly different and the results computed are slightly different too...).

    It makes sense, thank you very much! So I'm hoping my changings are working well... I'm pretty sure about the arrays switching and about the parameters used for the estimation, but I'm not sure if the data used for the estimation are the ones I need them to be.. I'll explain better: we know that before estimation every data is stored in RAM as I/Q data.. so the system takes these data and calculates the angle with them. Not sure if the time I'm selecting array n.2 the system will take data received while using array n.2. (Maybe I'm wrong but I understood that I/Q data sampling and reception is always one step ahead from angle estimation)

    Thank you very much for the support,

    Best Regards,

    Federico

  • Hi Federico,

    Federico Acerbi said:
    So the purpose of the double array is mainly to extend the covered area?


    Yes, exactly. Each antenna array covers an angle of around 120 degrees. Using the two arrays, you can have 120+120 degrees minus the overlapping area.

    Federico Acerbi said:
    we know that before estimation every data is stored in RAM as I/Q data.. so the system takes these data and calculates the angle with them. Not sure if the time I'm selecting array n.2 the system will take data received while using array n.2. (Maybe I'm wrong but I understood that I/Q data sampling and reception is always one step ahead from angle estimation)


    This is a very good question. With the example provided by TI, the time interval between the reception of two CTE is big enough to avoid losing data. This might not be the case anymore if you decide to send the CTE more often or if he algorithm used requires more time to be executed. The best advise I have for you is to do the measurement for your own case. If needed, increase the time between two CTE reception (i.e. don't sample each CTE, or even better, ask the target to send less often the CTE).

    Best regards,

  • Hi Clement,

    Clément said:
    This is a very good question. With the example provided by TI, the time interval between the reception of two CTE is big enough to avoid losing data. This might not be the case anymore if you decide to send the CTE more often or if he algorithm used requires more time to be executed. The best advise I have for you is to do the measurement for your own case. If needed, increase the time between two CTE reception (i.e. don't sample each CTE, or even better, ask the target to send less often the CTE).

    Allright.. so the only way is to make the sampling interval big enough to end the estimation within that period after the reception of CTE.

    Well.. last but not least: now I'm trying to separate the system from the python application.. of course I have to hardcode many python commands and the parameters for the AOA, if you have any suggestion about where to find these parts of code it will be very helpful. Otherwise thank you very much for the answers, now everything seems to be clear :)

    Best Regards,

    Federico

  • Hi Federico,

    Federico Acerbi said:
    ow I'm trying to separate the system from the python application.. of course I have to hardcode many python commands and the parameters for the AOA, if you have any suggestion about where to find these parts of code it will be very helpful.

    We do not provide this code. Sorry for that.

    For the rest, I am happy we managed to help you. Please don't forget to mark the thread as resolved (click the "This resolved my issue" button)!

    Wishing you the best,