------------------------------------------------------------------------
*From:* Discuss-gnuradio
<[email protected]> on behalf
of Skyvalakis Konstantinos <[email protected]>
*Sent:* Tuesday, June 15, 2021 4:19 PM
*To:* Marcus D Leech
*Cc:* [email protected]
*Subject:* Re: Phase Synchronize 2 USRP N200 w/ SBX cards
Hi 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.00439223
0.00546809
0.00621017
0.00697208
Thank you for your help.
K.
------------------------------------------------------------------------
*From:* Skyvalakis Konstantinos
*Sent:* Sunday, June 13, 2021 11:02 PM
*To:* Marcus D Leech
*Cc:* [email protected]
*Subject:* Re: Phase Synchronize 2 USRP N200 w/ SBX cards
Agreed. 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 <[email protected]> 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
<[email protected]> 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
<[email protected]> 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
<[email protected]> 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
<[email protected]> 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 <[email protected]>
*Sent:* Friday, June 11, 2021 4:05 PM
*To:* Skyvalakis Konstantinos
*Subject:* Re: Phase Synchronize 2 USRP N200 w/ SBX cards
Also 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
<[email protected]> 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 <[email protected]> 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 <[email protected]>
*Sent:* Friday, June 11, 2021 2:23 PM
*To:* Skyvalakis Konstantinos
*Cc:* [email protected]
*Subject:* Re: Phase Synchronize 2 USRP N200 w/
SBX cards
I 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 <[email protected]> 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
<[email protected]>
on behalf of Skyvalakis Konstantinos
<[email protected]>
*Sent:* Friday, June 11, 2021 12:39 AM
*To:* Marcus D. Leech
*Cc:* [email protected]
*Subject:* Re: Phase Synchronize 2 USRP N200
w/ SBX cards
Exactly 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"
<[email protected]> wrote:
On 06/10/2021 01:00 PM, Skyvalakis
Konstantinos wrote:
In 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.
------------------------------------------------------------------------
You're sure that you have SBX cards and
not WBX cards? Sorry for the
apparently-stupid question, but the WBX
uses almost the
same hardware as the SBX, but uses a
2XLO mixer that has fixed phase
ambiguity--which would look like what you
have here.