My guess is an ambiguity in the external reference clock PLL, but i have yet to confirm that.I am so baffled as to why I am observing these 4 phase offsets.
I checked and the 2 devices are indeed successfully time synchronized.
I literally have no clue why this is happening.
You're sure there is no other workaround?
Many thanks.
If this were my problem, I'd stick some cheap 20dB directional couplers on the RX inputs, and feed a small TX signal into both
of them during start-up and determine what the phase offsets are and compensate as appropriate.
This is how it's done in things like phased-array radar. Because precise phasing isn't generally repeatable in large systems with
lots of cable runs, even when they are carefully manufactured to be phase-equal. Heating affects a cables effective length, and
since in larger systems, you cannot guarantee that heating-cooling will be totally uniform across the system, they do phase-cal
at system startup, and periodically during operations. Phased-array radio telescopes do the same thing.
From: Marcus D. Leech <patchvonbraun@gmail.com>
Sent: Tuesday, June 15, 2021 6:34 PM
To: Skyvalakis Konstantinos
Cc: Discuss-gnuradio@gnu.org
Subject: Re: Phase Synchronize 2 USRP N200 w/ SBX cardsOn 06/15/2021 09:34 AM, Skyvalakis Konstantinos wrote:
I just thought, that the time difference I observed might be because of the time difference in the execution of my python commands.
So, is there a way to validate my time synchronization between the 2 devices?
Thanks.
You could do a get_time_last_pps() on your two devices. They would be the same except during a tiny window across the
1PPS boundary.
From: Discuss-gnuradio <discuss-gnuradio-bounces+kskyvalakis=isc.tuc.gr@gnu.org> on behalf of Skyvalakis Konstantinos <kskyvalakis@isc.tuc.gr>
Sent: Tuesday, June 15, 2021 4:19 PM
To: Marcus D Leech
Cc: Discuss-gnuradio@gnu.org
Subject: Re: Phase Synchronize 2 USRP N200 w/ SBX cardsHi again
I would like to ask you the following and I am also attaching the code for clarity:
self.sink = uhd.usrp_sink(",".join(("addr0=192.168.10.2,addr1=192.168.10.3", "")),uhd.stream_args(cpu_format="fc32",channels=range(2),),)
self.source = uhd.usrp_source(",".join(("addr0=192.168.10.2,addr1=192.168.10.3", "")),uhd.stream_args(cpu_format="fc32",channels=range(2),),)
self.source.set_clock_source('external', 0)self.source.set_time_source('external', 0)self.source.set_clock_source('external', 1)self.source.set_time_source('external', 1)self.sink.set_clock_source('external',0)self.sink.set_time_source('external',0)# self.sink.set_clock_source('external',1)# self.sink.set_time_source('external',1)
self.source.set_time_unknown_pps(uhd.time_spec(0.0))self.sink.set_time_unknown_pps(uhd.time_spec(0.0))self.source.set_samp_rate(self.adc_rate)self.source.set_gain(self.rx_gain0,0)self.source.set_gain(self.rx_gain1,1)self.source.set_antenna("RX2")self.sink.set_samp_rate(self.dac_rate)self.sink.set_gain(self.tx_gain0, 0)self.sink.set_gain(self.tx_gain1, 1)self.sink.set_antenna("TX/RX")
t1 = self.sink.get_time_now(0)t2 = self.sink.get_time_now(1)t3 = self.source.get_time_now(0)t4 = self.source.get_time_now(1)
print(uhd.time_spec_t.get_real_secs(t1))print(uhd.time_spec_t.get_real_secs(t2))print(uhd.time_spec_t.get_real_secs(t3))print(uhd.time_spec_t.get_real_secs(t4))
Shouldn't t1 be equal with t2 and t3 equal with t4?
In my application they are never equal.
As an example of a single run of my code the output of the above print commands is the following:
0.004392230.005468090.006210170.00697208
Thank you for your help.
K.
From: Skyvalakis Konstantinos
Sent: Sunday, June 13, 2021 11:02 PM
To: Marcus D Leech
Cc: Discuss-gnuradio@gnu.org
Subject: Re: Phase Synchronize 2 USRP N200 w/ SBX cardsAgreed. The compensation part is not the one I worry about. What worries me the most is the angle-in-radians part.
Let's say that from the time sink plot I observe that I have pi/2 radians phase offset between channel 1 and channel 2. How do I know it's pi/2 radians and not -3pi/2?
To be precise, I am also dumping the 2 channels complex data to 2 file sinks, which I then import on matlab for easier and faster experimentation.
In other words, how can I precisely calculate the 4 discrete phase shifts I am observing in my application?
Should I use cross correlation?
Should I use Hilbert transform?
I don't have a very noisy application, in case that plays a very crucial role.
Thanks.
On Jun 13, 2021 22:06, Marcus D Leech <patchvonbraun@gmail.com> wrote:
Phase *correction* is easy once you know what that correction should be. Just a complex multiply-const by
Complex(math.cos(angle-in-radians),math.sin(angle-in-radians))
Or the equivalent in complex exponential notation.
Sent from my iPhone
On Jun 13, 2021, at 1:52 PM, Skyvalakis Konstantinos <kskyvalakis@isc.tuc.gr> wrote:
Understandable. However, if you eventually hear anything about it please let me know.
Can I contact you again tomorrow for some questions I have about the phase correction block I need to make? (I mean through discuss-gnuradio)
Thank you very much.
On Jun 13, 2021 19:37, Marcus D Leech <patchvonbraun@gmail.com> wrote:
I haven't heard fro R&D on it. Part of the problem is the N200 was designed over a decade ago, and the original engineering team have long since departed…
Sent from my iPhone
On Jun 13, 2021, at 6:25 AM, Skyvalakis Konstantinos <kskyvalakis@isc.tuc.gr> wrote:
Hi Marcus and sorry for bothering you again, but I'd like to ask if you have any news regarding my problem.
Thank you.
On Jun 11, 2021 16:15, Skyvalakis Konstantinos <kskyvalakis@isc.tuc.gr> wrote:
Yes it kind of helps, because if I manage to apply a phase shifting/correction technique, then all 4 scenarios could produce sensible data.
I am trying to build a phase correction block now, that will compare the 2 received signals, to see which phase shift out of the possible 4, minimizes the absolute phase difference between the 2 channels.
After I figure out which phase offset is the correct one, out of all 4, then I can run the rest of my DoA application. It is a bit of a pain in the a**, but it will have to do in case it never gets fixed.
Let me know if you have any news from Ettus.
Thanks again.
From: Marcus D Leech <patchvonbraun@gmail.com>
Sent: Friday, June 11, 2021 4:05 PM
To: Skyvalakis Konstantinos
Subject: Re: Phase Synchronize 2 USRP N200 w/ SBX cardsAlso does knowing that there are only 4 possible phase relationships help in your application at all? Like only one of the 4 possible phase assumptions can produce "sensible" data? Just a thought.
Sent from my iPhone
On Jun 11, 2021, at 9:03 AM, Marcus D Leech <patchvonbraun@gmail.com> wrote:
I am an Ettus support contractor. I have a direct channel to R&D so I will relay any insights I receive here since any such feedback would be generally useful.
Sent from my iPhone
On Jun 11, 2021, at 8:15 AM, Skyvalakis Konstantinos <kskyvalakis@isc.tuc.gr> wrote:
I also tried contacting Ettus Support but they are not replying to my e-mails.
I will try to implement the phase calibration for now.
Thank you for your effort.
From: Marcus D Leech <patchvonbraun@gmail.com>
Sent: Friday, June 11, 2021 2:23 PM
To: Skyvalakis Konstantinos
Cc: Discuss-gnuradio@gnu.org
Subject: Re: Phase Synchronize 2 USRP N200 w/ SBX cardsI have a query in to Ettus R&D about possible causes.
But you might need, for now to do an initial phase Calibration when you start up.
Sent from my iPhone
On Jun 11, 2021, at 3:39 AM, Skyvalakis Konstantinos <kskyvalakis@isc.tuc.gr> wrote:
I repeated the experiments once again today and I got once again the same results. I still keep on randomly getting these 4 cases I attached on a previous message.
I observed that cases 1.png and 3.png have a phase difference of +/- 180 degrees
and cases 2.png and 4.png also have a phase difference of +/- 180 degrees.
Do you reckon you could help me any further with my problem? I really need to achieve this synchronization for my thesis.
Thank you very much.
From: Discuss-gnuradio <discuss-gnuradio-bounces+kskyvalakis=isc.tuc.gr@gnu.org> on behalf of Skyvalakis Konstantinos <kskyvalakis@isc.tuc.gr>
Sent: Friday, June 11, 2021 12:39 AM
To: Marcus D. Leech
Cc: Discuss-gnuradio@gnu.org
Subject: Re: Phase Synchronize 2 USRP N200 w/ SBX cardsExactly my thoughts as well, I mean regarding the phase ambiguity of the WBX daughterboards, from what I've read on the Ettus website.
I am 100% sure the daughterboards are SBX.
On Jun 11, 2021 00:26, "Marcus D. Leech" <patchvonbraun@gmail.com> wrote:
On 06/10/2021 01:00 PM, Skyvalakis Konstantinos wrote:
You're sure that you have SBX cards and not WBX cards? Sorry for the apparently-stupid question, but the WBX uses almost theIn addition to my last message regarding the INTEGER_N tuning, I repeated the experiment multiple times. I even restarted the USRPs and the signal generator multiple times.
What I observed was, that there were only 4 different recurring phase offsets (Blue = RX2 of SBX1, Red = RX2 of SBX2).
I am attaching the 4 screenshots I captured.
Thank you so much for your help. I feel like we're getting there.
same hardware as the SBX, but uses a 2XLO mixer that has fixed phase ambiguity--which would look like what you have here.
No comments:
Post a Comment