<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86399/aoa-antenna-switch-pattern-and-iq-sampling-via-nrf52833</link><description>Hi！ 
 I&amp;#39;m working on direction finding. I&amp;#39;m using a nrf52833dk as a beacon, a nrf52833dk and a Direction Finding Antenna Board (PCA2005) as a locator for a bluetooth direction finding AOA development. as follows: 
 
 The SDK I am using is NCS 1.7.1, the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 06 Mar 2025 16:34:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86399/aoa-antenna-switch-pattern-and-iq-sampling-via-nrf52833" /><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/526238?ContentTypeID=1</link><pubDate>Thu, 06 Mar 2025 16:34:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1f825664-c3e6-429e-bccd-ef5101f50699</guid><dc:creator>mgl</dc:creator><description>&lt;p&gt;Where did you get the&amp;nbsp;&lt;span&gt;Direction Finding Antenna Board (PCA2005) from, and how did you connect the DK to the antenna board?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/482082?ContentTypeID=1</link><pubDate>Mon, 06 May 2024 14:22:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f40ecc40-695c-4032-bef3-7da1927828d4</guid><dc:creator>Zihao</dc:creator><description>&lt;p&gt;But for a set of 45 samples, the phase difference between different antennas should be same. However, I calculated this phase difference directly using atan2(I,Q), and found that it fluctuated quite a bit. Of course, the place I&amp;#39;m currently testing is a noisy, multipath office.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/389046?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2022 15:44:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1328554-c95f-4802-befc-ce485dbb7440</guid><dc:creator>DUMB_GRANT</dc:creator><description>&lt;p&gt;Hi I am trying to run the example here&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/direction_finding_central/README.html#antenna-patterns"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/direction_finding_central/README.html#antenna-patterns&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I am not sure the use of RFU in antenna switch, can someone explain? I am also not sure about how to use the samples to get the location. I know the one IQ sample gives me one phase.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/371030?ContentTypeID=1</link><pubDate>Tue, 07 Jun 2022 06:46:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41e8291b-1f1e-4019-8ab1-3e0ae590320e</guid><dc:creator>Gavin</dc:creator><description>&lt;p&gt;I checked this in version 1.9, what&amp;#39;s the currect antenna table do you think ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/369677?ContentTypeID=1</link><pubDate>Thu, 26 May 2022 15:05:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f4cadf2-fd70-44ca-be62-a34371982b5d</guid><dc:creator>PaKa</dc:creator><description>&lt;p&gt;Did you check this in nRF Connect SDK master? I believe there may have been a mistake in the antenna selection table.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/369649?ContentTypeID=1</link><pubDate>Thu, 26 May 2022 07:01:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3552d2d0-c7ca-4cce-90cb-c9d191525dd0</guid><dc:creator>Gavin</dc:creator><description>&lt;p&gt;Hi PaKa,&lt;/p&gt;
&lt;p&gt;I have read the chapter`&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/direction_finding_connectionless_rx/README.html" rel="noopener noreferrer" target="_blank"&gt;NCS -&amp;gt; Antenna Pattern&lt;/a&gt;&amp;nbsp;and using &lt;a href="https://www.insightsip.com/fichiers_insightsip/pdf/ble/ISP1907/isp_ble_DS1907_AOA.pdf"&gt;ISP1907 Angle of Arrival Demo Kit&lt;/a&gt;&amp;nbsp;but still be confused.&lt;/p&gt;
&lt;table class="docutils align-default"&gt;
&lt;thead&gt;
&lt;tr class="row-odd"&gt;
&lt;th class="head"&gt;
&lt;p&gt;Antenna&lt;/p&gt;
&lt;/th&gt;
&lt;th class="head"&gt;
&lt;p&gt;PATTERN[3:0]&lt;/p&gt;
&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr class="row-even"&gt;
&lt;td&gt;
&lt;p&gt;ANT_12&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;0 (0b0000)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;
&lt;td&gt;
&lt;p&gt;ANT_10&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;1 (0b0001)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;
&lt;td&gt;
&lt;p&gt;ANT_11&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;2 (0b0010)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;
&lt;td&gt;
&lt;p&gt;RFU&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;3 (0b0011)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;
&lt;td&gt;
&lt;p&gt;ANT_3&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;4 (0b0100)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;
&lt;td&gt;
&lt;p&gt;ANT_1&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;5 (0b0101)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;
&lt;td&gt;
&lt;p&gt;ANT_2&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;6 (0b0110)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;
&lt;td&gt;
&lt;p&gt;RFU&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;7 (0b0111)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;
&lt;td&gt;
&lt;p&gt;ANT_6&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;8 (0b1000)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;
&lt;td&gt;
&lt;p&gt;ANT_4&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;9 (0b1001)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;
&lt;td&gt;
&lt;p&gt;ANT_5&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;10 (0b1010)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;
&lt;td&gt;
&lt;p&gt;RFU&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;11 (0b1011)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;
&lt;td&gt;
&lt;p&gt;ANT_9&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;12 (0b1100)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;
&lt;td&gt;
&lt;p&gt;ANT_7&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;13 (0b1101)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-even"&gt;
&lt;td&gt;
&lt;p&gt;ANT_8&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;14 (0b1110)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr class="row-odd"&gt;
&lt;td&gt;
&lt;p&gt;RFU&lt;/p&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;p&gt;15 (0b1111)&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;From the table, every ANT# should map a pattern:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// setting 1
// 11，12，1，2，3，4，5，6，7，8，9，10
static const uint8_t ant_patterns[] = {0x2, 0x0, 0x5, 0x6, 0x1, 0x4,
									   0xC, 0x9, 0xE, 0xD, 0x8, 0xA};
// why not the following: 
// setting 1
// 11，12，1，2，3，4，5，6，7，8，9，10
static const uint8_t ant_patterns[] = {0x2, 0x0, 0x5, 0x6, 0x4, 0x9,
									   0xA, 0x8, 0xD, 0xE, 0xC, 0x1};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// setting 2
// 11，12，1，2，10，3，9，4，8，7，6，5
static const uint8_t ant_patterns[] = {0x2, 0x0, 0x5, 0x6, 0x4, 0x9,
									   0xA, 0x8, 0xD, 0xE, 0xC, 0x1};
// why not the following: 
// setting 2
// 11，12，1，2，10，3，9，4，8，7，6，5
static const uint8_t ant_patterns[] = {0x2, 0x0, 0x5, 0x6, 0x1, 0x4,
									   0xC, 0x9, 0xE, 0xD, 0x8, 0xA};&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/361097?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2022 17:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79ce6b70-2450-4bdd-8d41-4068060bfe55</guid><dc:creator>PaKa</dc:creator><description>&lt;p&gt;For each correctly received package you will get an array of IQ values. The amount of IQ values you get will depend on the length of the CTE event. The standard setting for the example should be 160&amp;micro;s CTE event. This will give you 45 samples (&lt;a href="https://infocenter.nordicsemi.com/topic/nwp_036/WP/nwp_036/sample_buffer_config.html?cp=17_3_2_3"&gt;https://infocenter.nordicsemi.com/topic/nwp_036/WP/nwp_036/sample_buffer_config.html&lt;/a&gt;). This is 8 values for the reference period and then 37 values from the different antennas in the array (you loop more than once through the pattern with the 160&amp;micro;s CTE period).&lt;/p&gt;
&lt;p&gt;The IQ values are stored in a RAM array by the Controller Subsystem, you will need to fetch it to use it in the application space to calculate the angles.Remember these values comes as pairs, one I value and one Q value for each sample. These are signed chars (Bluetooth standard have these as 8 bit values so they are rounded down from the raw radio values).&lt;/p&gt;
&lt;p&gt;The sequence for the antenna switching is as given in the PS, &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52833/radio.html?cp=4_1_0_5_17_11_5#concept_dfe_antenna_switching"&gt;https://infocenter.nordicsemi.com/topic/ps_nrf52833/radio.html?cp=4_1_0_5_17_11_5#concept_dfe_antenna_switching&lt;/a&gt;. In the default code example we have the 12 antennas and then you will cycle through all entries in the table and then restart from entry 3 and loop like this until the entire CTE period is over.&lt;/p&gt;
&lt;p&gt;Note: to be Bluetooth SIG compliant you should always loop through the reference antenna when you loop the pattern. To do this, add the reference antenna also as the last antenna in the pattern.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/361074?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2022 14:38:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:049529d5-bc38-487a-acfc-98df2878d506</guid><dc:creator>Miguel Roque</dc:creator><description>&lt;p&gt;Hello PaKa, thank you for your prompt reply.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry but I still confused. First thing, according to the project configuration I&amp;#39;m using a 2us slot time, which means a switch(2us)+sample(2us)=switching_space(4us). I used a logic analyser and in fact, the mux control IOs are changing with a period of 4us, so I assume the configuration is ok. However here comes my first doubt, from my understanding till the moment about AoA, I should receive a IQ sample for &lt;strong&gt;each &lt;/strong&gt;antenna, but what the example plots is just one IQ sample (sometimes based in 45 samples or 1 sample, check the logs bellow). So, how can I despite from each antenna came that precise IQ sample?&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Screenshot-from-2022_2D00_03_2D00_31-15_2D00_36_2D00_12.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/361037?ContentTypeID=1</link><pubDate>Thu, 31 Mar 2022 12:43:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e053b738-3ed2-4238-9466-0282bc0d86cc</guid><dc:creator>PaKa</dc:creator><description>&lt;p&gt;So for the sequence of the antennas, check the table for the antenna pattern and the description in the white paper. The pattern is deterministic so there should be no need to read back the antenna port, this can be calculated instead.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/360902?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 21:37:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3608dad-5dcd-4cae-b7f3-dab8a799751d</guid><dc:creator>Miguel Roque</dc:creator><description>&lt;p&gt;Hello all, I&amp;#39;m exactly at same point as @John. Currently I&amp;#39;m printing the IQ data, however I tried to find any info about the antenna ID that produces each IQ data but I didn&amp;#39;t get any success until the moment (looking for the &lt;em&gt;bt_df_conn_iq_samples_report&amp;nbsp;&lt;/em&gt;struct, I tried to print the parameter &amp;nbsp;&lt;em&gt;rssi_ant_id&amp;nbsp;&lt;/em&gt;but the value is allways &amp;quot;2&amp;quot;, and in fact I&amp;#39;m using 4 linear antennas from the 12 available on the antenna). Another question that maybe you can help me, based on literature people advise to use external algorithms to decode the sampled data and return an angle, many suggest the MUSIC algorithm, but I didn&amp;#39;t find many samples on the internet, or at least any sample easy to implement with the returned data from the devkit, where can I find it?&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Best regards, and thank you for your help!&lt;/p&gt;
&lt;p&gt;Miguel Soares&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/360857?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 14:17:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6b799f9-5192-4d9d-aadc-84528415190c</guid><dc:creator>PaKa</dc:creator><description>&lt;p&gt;Why do you believe they are not ideal? Have you run them through an algorithm and gotten bad results? Please have in mind the entire purpose with changing the active antenna is to get a change in phase. Since you only get one value from each antenna you can&amp;#39;t look at the resulting graph and see if it bad or not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/360810?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 12:31:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba057a5e-0862-4f51-b344-782302a9a1ad</guid><dc:creator>Sometimes ever</dc:creator><description>&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Thank you！&lt;/span&gt;&lt;/span&gt;&lt;span class="JLqJ4b"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span class="VIiyi" lang="en"&gt;&lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;I have read your whitepaper carefully, but aside from the first 8 samples, I think the remaining data is still not ideal. What is the reason?&lt;/span&gt;&lt;/span&gt; &lt;span class="JLqJ4b ChMk0b"&gt;&lt;span&gt;Is there a way to improve data quality?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AOA: Antenna switch pattern and IQ sampling via nrf52833</title><link>https://devzone.nordicsemi.com/thread/360787?ContentTypeID=1</link><pubDate>Wed, 30 Mar 2022 11:23:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62c07cf7-6d42-477b-ad31-f7f8fc115144</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Do not look at graphs made of the I data and the Q data as that will always give the wrong impression. Look at the calculated phase and amplitude data only. And remember: the first 8 samples are the reference samples with short spacing and the rest are with much longer gaps between them (so printing them with the same distance in a figure will also be incorrect and most likely just confusing). Please check out:&lt;br /&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/nwp_036/WP/nwp_036/intro.html"&gt;https://infocenter.nordicsemi.com/topic/nwp_036/WP/nwp_036/intro.html&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>