<?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>Direction Finding Phase Shift Between Reference Period And First Slot</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67333/direction-finding-phase-shift-between-reference-period-and-first-slot</link><description>Hi, 
 When I tried to use BLE5.1 phase data to achieve direction finding, I found a phase shift between reference period and the first slot, as the below graph shown: 
 
 The range of y-axis is 2 Pi. The antenna used for the reference period and the first</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Oct 2020 03:00:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67333/direction-finding-phase-shift-between-reference-period-and-first-slot" /><item><title>RE: Direction Finding Phase Shift Between Reference Period And First Slot</title><link>https://devzone.nordicsemi.com/thread/276057?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2020 03:00:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4e44d7b1-7ac6-4d7d-aeea-19b5c5c92855</guid><dc:creator>wvfan</dc:creator><description>&lt;p&gt;Thank you Dmitry.&lt;/p&gt;
&lt;p&gt;For the 16us slot, I set it because I found the phase graph is not very stable near the switch slot. I will try your suggestion, the way is much easier than what I&amp;#39;m using now.&lt;/p&gt;
&lt;p&gt;On the PCB board, I set all trace lengths to be almost the same. For the phase-to-angle mapping, that&amp;#39;s a good idea and I will have a try.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Put more antennas into array is&amp;nbsp;also in the next step&amp;#39;s plan. Thank you for providing the algorithm, now I can do some research on it :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direction Finding Phase Shift Between Reference Period And First Slot</title><link>https://devzone.nordicsemi.com/thread/276056?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2020 02:48:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:318bdaf9-129c-4474-9c9b-fabf79071315</guid><dc:creator>wvfan</dc:creator><description>&lt;p&gt;Thank you&amp;nbsp;&lt;span&gt;&amp;Oslash;yvind. I designed 3 antennas placed on 3 corners of a square. But now I only use 2 of them to test. I think I have taken the frequency into count, I calculated the average slope of all period and use it as the real frequency, as the black line in the figure shown.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direction Finding Phase Shift Between Reference Period And First Slot</title><link>https://devzone.nordicsemi.com/thread/275869?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 11:16:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:06ee259e-9d9a-4cf3-bf36-6daf88d121a6</guid><dc:creator>Dmitry</dc:creator><description>[quote userid="92250" url="~/f/nordic-q-a/67333/direction-finding-phase-shift-between-reference-period-and-first-slot/275743#275743"]The unstable means the phase shifting and angle will change from time to time.&amp;nbsp;I just did a test and get these phase differences: 93, 93, 90, 94, 79, 95, 103, 103, 103, 99, 95, 110, 104, 98, 106, 87, 100, 94.[/quote]
&lt;p&gt;If you&amp;#39;re testing in a noisy enwironment, it&amp;#39;s quite expected. You need to filter results, dropping the ones with large difference from the mean value. I would suggest to take an experiment outdoors, away from wifi networks and other sources of noise, to ensure that hardware is working properly.&lt;br /&gt;To get better results, try to shorten the slots as much as response time of RF switch allows (16 us is too much - crystal jitter may influent the results), and take a single sample from each slot close to its end.&lt;/p&gt;
[quote userid="92250" url="~/f/nordic-q-a/67333/direction-finding-phase-shift-between-reference-period-and-first-slot/275743#275743"]for two antennas with 6.25cm distance, it&amp;#39;s 33 degree and 23 degree ( but actually my angle is set to 75 degree )[/quote]
&lt;p&gt;Did you take into account trace lengths from RF switch to antennas? For evaluation stage, I would not look at absolute values at all - all you need is to figure out the range when results are stable, then create a phase-to-angle mapping.&lt;/p&gt;
[quote userid="92250" url="~/f/nordic-q-a/67333/direction-finding-phase-shift-between-reference-period-and-first-slot/275743#275743"]Thank you for the information about the multipath reflection, can it be detected by the magnitude data?[/quote]
&lt;p&gt;Multipath reflections can be mitigated by a multi-element array and spatial spectrum estimation algorithm, such as MUSIC or MVDR. With two antennas, there is not enough information to detect multiple paths.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direction Finding Phase Shift Between Reference Period And First Slot</title><link>https://devzone.nordicsemi.com/thread/275864?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 10:56:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:402184c0-c5ce-47c1-81b3-20111e104d69</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;What antenna are you using? The figure you have attached does not give much information I&amp;#39;m afraid.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You need to measure the phase on all antennas against the reference slot. The reference phase should not be static, as&amp;nbsp;the frequency on transmitter and receiver are not the same. The phase will drift in a linear fashion.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direction Finding Phase Shift Between Reference Period And First Slot</title><link>https://devzone.nordicsemi.com/thread/275743?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 03:15:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:137e444b-8eac-4962-b5ba-2068391d99b3</guid><dc:creator>wvfan</dc:creator><description>&lt;p&gt;Thank you Dmitry. From your answer and the document, the reference period is correct and not a issue.&lt;/p&gt;
&lt;p&gt;The unstable means the phase shifting and angle will change from time to time.&amp;nbsp;I just did a test and get these phase differences: 93, 93, 90, 94, 79, 95, 103, 103, 103, 99, 95, 110, 104, 98, 106, 87, 100, 94. The maximum is 110 and the minimum is 79, for two antennas with 6.25cm distance, it&amp;#39;s 33 degree and 23 degree ( but actually my angle is set to 75 degree ). I don&amp;#39;t know how to calibrate with the data, if I just add a fixed delta to make the average angle to 75 degree ( phase diff 194 ), the 110 and 79 will become around 210 and 179, and now the angle is around 90 degree and 63 degree, which cannot be used.&lt;/p&gt;
&lt;p&gt;Thank you for the information about the multipath reflection, can it be detected by the magnitude data? I will have a try. And also for the antenna array, I will reconsider it to avoid degree near 90.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direction Finding Phase Shift Between Reference Period And First Slot</title><link>https://devzone.nordicsemi.com/thread/275721?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 21:12:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ed23ce2-00e9-4f3d-942e-09b4c2f53798</guid><dc:creator>Dmitry</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;take a look at &lt;a href="https://infocenter.nordicsemi.com/topic/nwp_036/WP/nwp_036/first_sample_slot.html"&gt;this&lt;/a&gt;&amp;nbsp;section of document provided by&amp;nbsp;&lt;span&gt;&amp;Oslash;yvind, the key phrase is &amp;quot;The hardware always aligns the first IQ sample in the first sample slot&amp;quot;. After a reference period, there is a gap about 1/2 of&amp;nbsp;TSWITCHSPACING (first switching slot) - 2 usec in your case. It has no impact on accuracy and need not be accounted in calculations.&lt;/span&gt;&lt;/p&gt;
[quote userid="92250" url="~/f/nordic-q-a/67333/direction-finding-phase-shift-between-reference-period-and-first-slot"] I saw a paper that uses different antennas in reference period and the first slot to calculate the angle[/quote]
&lt;p&gt;&lt;span&gt;Even if it works, it&amp;#39;s not the way the hardware is intended to use - Bluetooth Core specification puts a requirement to take samples at same points of all sample windows but nothing is said about reference period.&lt;/span&gt;&lt;/p&gt;
[quote userid="92250" url="~/f/nordic-q-a/67333/direction-finding-phase-shift-between-reference-period-and-first-slot/275688#275688"]Currently I can get the IQ sample data, but it&amp;#39;s not stable.[/quote]
&lt;p&gt;&lt;span&gt;What do you mean exactly? Are IQ data differ from sample to sample in a static environment, or you can&amp;#39;t get a&amp;nbsp; stable relation between angle and phase shift? When testing indoors, multipath reflections are the main issue. Also i&lt;/span&gt;&lt;span&gt;t&amp;#39;s crucial to have a well-designed&amp;nbsp;array to get at least useful results, but your graph&amp;nbsp;looks quite accurate.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direction Finding Phase Shift Between Reference Period And First Slot</title><link>https://devzone.nordicsemi.com/thread/275688?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 14:59:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2158a839-b0dd-4005-becf-8a43e2525cdb</guid><dc:creator>wvfan</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&amp;Oslash;yvind,&lt;/p&gt;
&lt;p&gt;Thank you for replying. Here is my setup of radio:&lt;/p&gt;
&lt;p&gt;NRF_RADIO-&amp;gt;MODE = RADIO_MODE_MODE_Ble_1Mbit;&lt;br /&gt; NRF_RADIO-&amp;gt;CTEINLINECONF = RADIO_CTEINLINECONF_CTEINLINECTRLEN_Disabled;&lt;br /&gt; NRF_RADIO-&amp;gt;DFEPACKET.MAXCNT = 1250;&lt;br /&gt; NRF_RADIO-&amp;gt;PSEL.DFEGPIO[0] = ANT1;&lt;br /&gt; NRF_RADIO-&amp;gt;PSEL.DFEGPIO[1] = ANT0;&lt;br /&gt; NRF_RADIO-&amp;gt;CLEARPATTERN = 3;&lt;br /&gt; NRF_RADIO-&amp;gt;SWITCHPATTERN = 3;&lt;br /&gt; NRF_RADIO-&amp;gt;SWITCHPATTERN = 3;&lt;br /&gt; NRF_RADIO-&amp;gt;SWITCHPATTERN = 3;&lt;br /&gt; NRF_RADIO-&amp;gt;SWITCHPATTERN = 3;&lt;br /&gt; NRF_RADIO-&amp;gt;SWITCHPATTERN = 3;&lt;br /&gt; NRF_RADIO-&amp;gt;SWITCHPATTERN = 3;&lt;br /&gt; NRF_RADIO-&amp;gt;SWITCHPATTERN = 1;&lt;br /&gt; NRF_RADIO-&amp;gt;SWITCHPATTERN = 1;&lt;br /&gt; NRF_RADIO-&amp;gt;SWITCHPATTERN = 1;&lt;br /&gt; NRF_RADIO-&amp;gt;SWITCHPATTERN = 1;&lt;br /&gt; NRF_RADIO-&amp;gt;PACKETPTR = (uint32_t)&amp;amp;packet;&lt;br /&gt; NRF_RADIO-&amp;gt;DFEMODE = RADIO_DFEMODE_DFEOPMODE_AoA;&lt;br /&gt; NRF_RADIO-&amp;gt;DFECTRL1 = 20 &amp;lt;&amp;lt; RADIO_DFECTRL1_NUMBEROF8US_Pos&lt;br /&gt; | 1 &amp;lt;&amp;lt; RADIO_DFECTRL1_DFEINEXTENSION_Pos&lt;br /&gt; | RADIO_DFECTRL1_SAMPLETYPE_MagPhase &amp;lt;&amp;lt; RADIO_DFECTRL1_SAMPLETYPE_Pos&lt;br /&gt; | RADIO_DFECTRL1_TSWITCHSPACING_4us &amp;lt;&amp;lt; RADIO_DFECTRL1_TSWITCHSPACING_Pos&lt;br /&gt; | RADIO_DFECTRL1_TSAMPLESPACINGREF_125ns &amp;lt;&amp;lt; RADIO_DFECTRL1_TSAMPLESPACINGREF_Pos&lt;br /&gt; | RADIO_DFECTRL1_TSAMPLESPACING_125ns &amp;lt;&amp;lt; RADIO_DFECTRL1_TSAMPLESPACING_Pos;&lt;br /&gt; NRF_RADIO-&amp;gt;DFEPACKET.PTR = (uint32_t)&amp;amp;rfRaws;&lt;/p&gt;
&lt;p&gt;The phase graph is after processed.&amp;nbsp;&lt;span&gt;I made the gap between all adjacent phases less than half the period so the curve will be continuous. And I used the linear regression line as the reference, and got the final curve as the above image shows.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you please provide a typical phase and magnitude graph as a reference? Currently I can get the IQ sample data, but it&amp;#39;s not stable. There are too many possible issues that can cause this, like RF switch, antenna or programming, so I need some way to debug with it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Fan&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Direction Finding Phase Shift Between Reference Period And First Slot</title><link>https://devzone.nordicsemi.com/thread/275610?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 12:15:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4af7055d-d1d6-4ba7-826c-fef9ea64086f</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello Fan,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Can you please elaborate on your setup? What is the reference point? Have a look at our &lt;a href="https://infocenter.nordicsemi.com/topic/nwp_036/WP/nwp_036/intro.html"&gt;white paper of direction finding&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unfortunately, this is all we have.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>