usrp-users@lists.ettus.com

Discussion and technical support related to USRP, UHD, RFNoC

View all threads

x300: Unable to get Tight Syncrhonization between 2 Tx channels

SM
Serge Malo
Wed, Feb 18, 2015 7:50 PM

Hi all,

I'm developing an application where I need to transmit 2 signals on the 2
channels of a x300.
The beginning of the Tx streaming of the 2 signals need to be tightly
synchronized (less than 5ns time offset between them).

Now, I'm only trying to verify that the time offset between the 2 channels
can be less than 5ns,  with a modified UHD example (tx_samples_from_file).
I'm simply streaming the same file to both channels, and verifying the time
offset between the 2 channels with an external instrument.
So far, I'm not getting good results:
I'm getting time offsets in the order of 6000-22000 ns. The value is quite
stable from one run to another (~50ns), but it varies by more than 1us when
I change the central frequency.

I attach my modified example source code.
I'm using UHD 3.8.2, but I had the same results with UHD 3.8.1.
I'm running under Windows 7, but I also had the same results under Linux.
My x300 has 2 WBX-120 D/B.
Its using a 10MHz external Reference Clock (Wenzel) and an external PPS
signal coming out of UBlox GPS receiver.

Below, I show how I "prepare" the file streaming to synchronize the 2
channels.
Please, let me know if you see something wrong in this sequence.

Best Regards,
Serge

std::vector<const void *> buffs;
buffs.push_back(&buff.front());
buffs.push_back(&buff.front());

uhd::tx_metadata_t md;
md.start_of_burst = false;
md.end_of_burst = false;
md.has_time_spec = true;

usrp->set_time_unknown_pps(uhd::time_spec_t(0.0));
boost::this_thread::sleep(boost::posix_time::seconds(2)); //allow for some
setup time

uhd::time_spec_t futureTime(2.0);
futureTime += usrp->get_time_now();
md.time_spec = futureTime;

//loop until the entire file has been read

std::cout << "--> loop until the entire file has been read" << std::endl;
while(not md.end_of_burst and not stop_signal_called){

    infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type));
    size_t num_tx_samps = infile.gcount()/sizeof(samp_type);

    md.end_of_burst = infile.eof();

md.has_time_spec = false;

//tx_stream->send(&buff.front(), num_tx_samps, md);
tx_stream->send(buffs, num_tx_samps, md);
}

Hi all, I'm developing an application where I need to transmit 2 signals on the 2 channels of a x300. The beginning of the Tx streaming of the 2 signals need to be tightly synchronized (less than 5ns time offset between them). Now, I'm only trying to verify that the time offset between the 2 channels can be less than 5ns, with a modified UHD example (tx_samples_from_file). I'm simply streaming the same file to both channels, and verifying the time offset between the 2 channels with an external instrument. So far, I'm not getting good results: I'm getting time offsets in the order of 6000-22000 ns. The value is quite stable from one run to another (~50ns), but it varies by more than 1us when I change the central frequency. I attach my modified example source code. I'm using UHD 3.8.2, but I had the same results with UHD 3.8.1. I'm running under Windows 7, but I also had the same results under Linux. My x300 has 2 WBX-120 D/B. Its using a 10MHz external Reference Clock (Wenzel) and an external PPS signal coming out of UBlox GPS receiver. Below, I show how I "prepare" the file streaming to synchronize the 2 channels. Please, let me know if you see something wrong in this sequence. Best Regards, Serge std::vector<const void *> buffs; buffs.push_back(&buff.front()); buffs.push_back(&buff.front()); uhd::tx_metadata_t md; md.start_of_burst = false; md.end_of_burst = false; md.has_time_spec = true; usrp->set_time_unknown_pps(uhd::time_spec_t(0.0)); boost::this_thread::sleep(boost::posix_time::seconds(2)); //allow for some setup time uhd::time_spec_t futureTime(2.0); futureTime += usrp->get_time_now(); md.time_spec = futureTime; //loop until the entire file has been read std::cout << "--> loop until the entire file has been read" << std::endl; while(not md.end_of_burst and not stop_signal_called){ infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type)); size_t num_tx_samps = infile.gcount()/sizeof(samp_type); md.end_of_burst = infile.eof(); md.has_time_spec = false; //tx_stream->send(&buff.front(), num_tx_samps, md); tx_stream->send(buffs, num_tx_samps, md); }
RK
Robert Kossler
Thu, Feb 19, 2015 3:33 PM

Hi Serge,
What is your command line?  I assume it includes "--ref=external"?
Rob

On Wed, Feb 18, 2015 at 2:50 PM, Serge Malo via USRP-users <
usrp-users@lists.ettus.com> wrote:

Hi all,

I'm developing an application where I need to transmit 2 signals on the 2
channels of a x300.
The beginning of the Tx streaming of the 2 signals need to be tightly
synchronized (less than 5ns time offset between them).

Now, I'm only trying to verify that the time offset between the 2 channels
can be less than 5ns,  with a modified UHD example (tx_samples_from_file).
I'm simply streaming the same file to both channels, and verifying the
time offset between the 2 channels with an external instrument.
So far, I'm not getting good results:
I'm getting time offsets in the order of 6000-22000 ns. The value is quite
stable from one run to another (~50ns), but it varies by more than 1us when
I change the central frequency.

I attach my modified example source code.
I'm using UHD 3.8.2, but I had the same results with UHD 3.8.1.
I'm running under Windows 7, but I also had the same results under Linux.
My x300 has 2 WBX-120 D/B.
Its using a 10MHz external Reference Clock (Wenzel) and an external PPS
signal coming out of UBlox GPS receiver.

Below, I show how I "prepare" the file streaming to synchronize the 2
channels.
Please, let me know if you see something wrong in this sequence.

Best Regards,
Serge

std::vector<const void *> buffs;
buffs.push_back(&buff.front());
buffs.push_back(&buff.front());

uhd::tx_metadata_t md;
md.start_of_burst = false;
md.end_of_burst = false;
md.has_time_spec = true;

usrp->set_time_unknown_pps(uhd::time_spec_t(0.0));
boost::this_thread::sleep(boost::posix_time::seconds(2)); //allow for some
setup time

uhd::time_spec_t futureTime(2.0);
futureTime += usrp->get_time_now();
md.time_spec = futureTime;

 //loop until the entire file has been read

std::cout << "--> loop until the entire file has been read" << std::endl;
while(not md.end_of_burst and not stop_signal_called){

     infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type));
     size_t num_tx_samps = infile.gcount()/sizeof(samp_type);

     md.end_of_burst = infile.eof();

md.has_time_spec = false;

//tx_stream->send(&buff.front(), num_tx_samps, md);
tx_stream->send(buffs, num_tx_samps, md);
}


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Hi Serge, What is your command line? I assume it includes "--ref=external"? Rob On Wed, Feb 18, 2015 at 2:50 PM, Serge Malo via USRP-users < usrp-users@lists.ettus.com> wrote: > Hi all, > > I'm developing an application where I need to transmit 2 signals on the 2 > channels of a x300. > The beginning of the Tx streaming of the 2 signals need to be tightly > synchronized (less than 5ns time offset between them). > > Now, I'm only trying to verify that the time offset between the 2 channels > can be less than 5ns, with a modified UHD example (tx_samples_from_file). > I'm simply streaming the same file to both channels, and verifying the > time offset between the 2 channels with an external instrument. > So far, I'm not getting good results: > I'm getting time offsets in the order of 6000-22000 ns. The value is quite > stable from one run to another (~50ns), but it varies by more than 1us when > I change the central frequency. > > I attach my modified example source code. > I'm using UHD 3.8.2, but I had the same results with UHD 3.8.1. > I'm running under Windows 7, but I also had the same results under Linux. > My x300 has 2 WBX-120 D/B. > Its using a 10MHz external Reference Clock (Wenzel) and an external PPS > signal coming out of UBlox GPS receiver. > > Below, I show how I "prepare" the file streaming to synchronize the 2 > channels. > Please, let me know if you see something wrong in this sequence. > > Best Regards, > Serge > > > > std::vector<const void *> buffs; > buffs.push_back(&buff.front()); > buffs.push_back(&buff.front()); > > uhd::tx_metadata_t md; > md.start_of_burst = false; > md.end_of_burst = false; > md.has_time_spec = true; > > usrp->set_time_unknown_pps(uhd::time_spec_t(0.0)); > boost::this_thread::sleep(boost::posix_time::seconds(2)); //allow for some > setup time > > uhd::time_spec_t futureTime(2.0); > futureTime += usrp->get_time_now(); > md.time_spec = futureTime; > > //loop until the entire file has been read > std::cout << "--> loop until the entire file has been read" << std::endl; > while(not md.end_of_burst and not stop_signal_called){ > > infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type)); > size_t num_tx_samps = infile.gcount()/sizeof(samp_type); > > md.end_of_burst = infile.eof(); > md.has_time_spec = false; > > //tx_stream->send(&buff.front(), num_tx_samps, md); > tx_stream->send(buffs, num_tx_samps, md); > } > > > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > >
SM
Serge Malo
Thu, Feb 19, 2015 4:06 PM

Hi Rob,

Yes, it includes "--ref external". Here's the complete line:
tx_samples_from_file.exe --args addr=192.168.140.2 --file noise_10msps.bin
--rate 10000000 --freq 1000000000 --gain 0 --ref external --repeat

Here's the complete output of the execution. We really see that the
external reference is used.

Creating the usrp device with: addr=192.168.140.2...
-- X300 initialization sequence...
-- Determining maximum frame size... 8000 bytes.
-- Setup basic communication...
-- Loading values from EEPROM...
-- Setup RF frontend clocking...
-- Radio 1x clock:200
-- Initialize Radio control...
-- Creating WSA UDP transport for 192.168.140.2:49153
-- Performing register loopback test... pass
-- Creating WSA UDP transport for 192.168.140.2:49153
-- Performing register loopback test... pass
-- Initializing clock and time using internal sources... done
Setting Clock Source to: external
Setting Time Source to: external
Using Device: Single USRP:
Device: X-Series Device
Mboard 0: X300
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: WBX-120 RX+GDB
RX Channel: 1
RX DSP: 1
RX Dboard: B
RX Subdev: WBX-120 RX+GDB
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: WBX-120 TX+GDB
TX Channel: 1
TX DSP: 1
TX Dboard: B
TX Subdev: WBX-120 TX+GDB

Setting TX Rate: 10.000000 Msps...
Actual TX Rate: 10.000000 Msps...

Setting TX Freq: 1000.000000 MHz...
-- Successfully tuned to 1000.000000 MHz

-- Successfully tuned to 1000.000000 MHz

Actual TX Freq: 1000.000000 MHz...

Setting TX Gain: 0.000000 dB...
Actual TX Gain: 0.000000 dB...

Checking TX: LO: locked ...
Checking TX: Ref: locked ...
Press Ctrl + C to stop streaming...
--> create a transmit streamer
-- Creating WSA UDP transport for 192.168.140.2:49153
-- Creating WSA UDP transport for 192.168.140.2:49153
--    1) catch time transition at pps edge
--    2) set times next pps (synchronously)
--> loop until the entire file has been read

2015-02-19 10:33 GMT-05:00 Robert Kossler Robert.D.Kossler.3@nd.edu:

Hi Serge,
What is your command line?  I assume it includes "--ref=external"?
Rob

On Wed, Feb 18, 2015 at 2:50 PM, Serge Malo via USRP-users <
usrp-users@lists.ettus.com> wrote:

Hi all,

I'm developing an application where I need to transmit 2 signals on the 2
channels of a x300.
The beginning of the Tx streaming of the 2 signals need to be tightly
synchronized (less than 5ns time offset between them).

Now, I'm only trying to verify that the time offset between the 2
channels can be less than 5ns,  with a modified UHD example
(tx_samples_from_file).
I'm simply streaming the same file to both channels, and verifying the
time offset between the 2 channels with an external instrument.
So far, I'm not getting good results:
I'm getting time offsets in the order of 6000-22000 ns. The value is
quite stable from one run to another (~50ns), but it varies by more than
1us when I change the central frequency.

I attach my modified example source code.
I'm using UHD 3.8.2, but I had the same results with UHD 3.8.1.
I'm running under Windows 7, but I also had the same results under Linux.
My x300 has 2 WBX-120 D/B.
Its using a 10MHz external Reference Clock (Wenzel) and an external PPS
signal coming out of UBlox GPS receiver.

Below, I show how I "prepare" the file streaming to synchronize the 2
channels.
Please, let me know if you see something wrong in this sequence.

Best Regards,
Serge

std::vector<const void *> buffs;
buffs.push_back(&buff.front());
buffs.push_back(&buff.front());

uhd::tx_metadata_t md;
md.start_of_burst = false;
md.end_of_burst = false;
md.has_time_spec = true;

usrp->set_time_unknown_pps(uhd::time_spec_t(0.0));
boost::this_thread::sleep(boost::posix_time::seconds(2)); //allow for
some setup time

uhd::time_spec_t futureTime(2.0);
futureTime += usrp->get_time_now();
md.time_spec = futureTime;

 //loop until the entire file has been read

std::cout << "--> loop until the entire file has been read" << std::endl;
while(not md.end_of_burst and not stop_signal_called){

     infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type));
     size_t num_tx_samps = infile.gcount()/sizeof(samp_type);

     md.end_of_burst = infile.eof();

md.has_time_spec = false;

//tx_stream->send(&buff.front(), num_tx_samps, md);
tx_stream->send(buffs, num_tx_samps, md);
}


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

--
*Serge Malo *
CDO & Co-founder, Skydel Solutions
Cell: 1-514-294-4017
Skype: sergemalo2000
Serge.Malo@SkydelSolutions.com

Hi Rob, Yes, it includes "--ref external". Here's the complete line: tx_samples_from_file.exe --args addr=192.168.140.2 --file noise_10msps.bin --rate 10000000 --freq 1000000000 --gain 0 --ref external --repeat Here's the complete output of the execution. We really see that the external reference is used. Creating the usrp device with: addr=192.168.140.2... -- X300 initialization sequence... -- Determining maximum frame size... 8000 bytes. -- Setup basic communication... -- Loading values from EEPROM... -- Setup RF frontend clocking... -- Radio 1x clock:200 -- Initialize Radio control... -- Creating WSA UDP transport for 192.168.140.2:49153 -- Performing register loopback test... pass -- Creating WSA UDP transport for 192.168.140.2:49153 -- Performing register loopback test... pass -- Initializing clock and time using internal sources... done Setting Clock Source to: external Setting Time Source to: external Using Device: Single USRP: Device: X-Series Device Mboard 0: X300 RX Channel: 0 RX DSP: 0 RX Dboard: A RX Subdev: WBX-120 RX+GDB RX Channel: 1 RX DSP: 1 RX Dboard: B RX Subdev: WBX-120 RX+GDB TX Channel: 0 TX DSP: 0 TX Dboard: A TX Subdev: WBX-120 TX+GDB TX Channel: 1 TX DSP: 1 TX Dboard: B TX Subdev: WBX-120 TX+GDB Setting TX Rate: 10.000000 Msps... Actual TX Rate: 10.000000 Msps... Setting TX Freq: 1000.000000 MHz... -- Successfully tuned to 1000.000000 MHz -- -- Successfully tuned to 1000.000000 MHz -- Actual TX Freq: 1000.000000 MHz... Setting TX Gain: 0.000000 dB... Actual TX Gain: 0.000000 dB... Checking TX: LO: locked ... Checking TX: Ref: locked ... Press Ctrl + C to stop streaming... --> create a transmit streamer -- Creating WSA UDP transport for 192.168.140.2:49153 -- Creating WSA UDP transport for 192.168.140.2:49153 -- 1) catch time transition at pps edge -- 2) set times next pps (synchronously) --> loop until the entire file has been read 2015-02-19 10:33 GMT-05:00 Robert Kossler <Robert.D.Kossler.3@nd.edu>: > Hi Serge, > What is your command line? I assume it includes "--ref=external"? > Rob > > On Wed, Feb 18, 2015 at 2:50 PM, Serge Malo via USRP-users < > usrp-users@lists.ettus.com> wrote: > >> Hi all, >> >> I'm developing an application where I need to transmit 2 signals on the 2 >> channels of a x300. >> The beginning of the Tx streaming of the 2 signals need to be tightly >> synchronized (less than 5ns time offset between them). >> >> Now, I'm only trying to verify that the time offset between the 2 >> channels can be less than 5ns, with a modified UHD example >> (tx_samples_from_file). >> I'm simply streaming the same file to both channels, and verifying the >> time offset between the 2 channels with an external instrument. >> So far, I'm not getting good results: >> I'm getting time offsets in the order of 6000-22000 ns. The value is >> quite stable from one run to another (~50ns), but it varies by more than >> 1us when I change the central frequency. >> >> I attach my modified example source code. >> I'm using UHD 3.8.2, but I had the same results with UHD 3.8.1. >> I'm running under Windows 7, but I also had the same results under Linux. >> My x300 has 2 WBX-120 D/B. >> Its using a 10MHz external Reference Clock (Wenzel) and an external PPS >> signal coming out of UBlox GPS receiver. >> >> Below, I show how I "prepare" the file streaming to synchronize the 2 >> channels. >> Please, let me know if you see something wrong in this sequence. >> >> Best Regards, >> Serge >> >> >> >> std::vector<const void *> buffs; >> buffs.push_back(&buff.front()); >> buffs.push_back(&buff.front()); >> >> uhd::tx_metadata_t md; >> md.start_of_burst = false; >> md.end_of_burst = false; >> md.has_time_spec = true; >> >> usrp->set_time_unknown_pps(uhd::time_spec_t(0.0)); >> boost::this_thread::sleep(boost::posix_time::seconds(2)); //allow for >> some setup time >> >> uhd::time_spec_t futureTime(2.0); >> futureTime += usrp->get_time_now(); >> md.time_spec = futureTime; >> >> //loop until the entire file has been read >> std::cout << "--> loop until the entire file has been read" << std::endl; >> while(not md.end_of_burst and not stop_signal_called){ >> >> infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type)); >> size_t num_tx_samps = infile.gcount()/sizeof(samp_type); >> >> md.end_of_burst = infile.eof(); >> md.has_time_spec = false; >> >> //tx_stream->send(&buff.front(), num_tx_samps, md); >> tx_stream->send(buffs, num_tx_samps, md); >> } >> >> >> >> >> _______________________________________________ >> USRP-users mailing list >> USRP-users@lists.ettus.com >> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >> >> > -- *Serge Malo * CDO & Co-founder, Skydel Solutions Cell: 1-514-294-4017 Skype: sergemalo2000 Serge.Malo@SkydelSolutions.com
MT
Manu T S
Fri, Feb 20, 2015 7:57 AM

Hi Serge,

I too am facing synchronization issues[1] with X300. Please let me know if
you happen to find any solution.

[1].
http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/2015-January/012290.html

On Thu, Feb 19, 2015 at 5:06 PM, Serge Malo via USRP-users <
usrp-users@lists.ettus.com> wrote:

Hi Rob,

Yes, it includes "--ref external". Here's the complete line:
tx_samples_from_file.exe --args addr=192.168.140.2 --file noise_10msps.bin
--rate 10000000 --freq 1000000000 --gain 0 --ref external --repeat

Here's the complete output of the execution. We really see that the
external reference is used.

Creating the usrp device with: addr=192.168.140.2...
-- X300 initialization sequence...
-- Determining maximum frame size... 8000 bytes.
-- Setup basic communication...
-- Loading values from EEPROM...
-- Setup RF frontend clocking...
-- Radio 1x clock:200
-- Initialize Radio control...
-- Creating WSA UDP transport for 192.168.140.2:49153
-- Performing register loopback test... pass
-- Creating WSA UDP transport for 192.168.140.2:49153
-- Performing register loopback test... pass
-- Initializing clock and time using internal sources... done
Setting Clock Source to: external
Setting Time Source to: external
Using Device: Single USRP:
Device: X-Series Device
Mboard 0: X300
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: WBX-120 RX+GDB
RX Channel: 1
RX DSP: 1
RX Dboard: B
RX Subdev: WBX-120 RX+GDB
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: WBX-120 TX+GDB
TX Channel: 1
TX DSP: 1
TX Dboard: B
TX Subdev: WBX-120 TX+GDB

Setting TX Rate: 10.000000 Msps...
Actual TX Rate: 10.000000 Msps...

Setting TX Freq: 1000.000000 MHz...
-- Successfully tuned to 1000.000000 MHz

-- Successfully tuned to 1000.000000 MHz

Actual TX Freq: 1000.000000 MHz...

Setting TX Gain: 0.000000 dB...
Actual TX Gain: 0.000000 dB...

Checking TX: LO: locked ...
Checking TX: Ref: locked ...
Press Ctrl + C to stop streaming...
--> create a transmit streamer
-- Creating WSA UDP transport for 192.168.140.2:49153
-- Creating WSA UDP transport for 192.168.140.2:49153
--    1) catch time transition at pps edge
--    2) set times next pps (synchronously)
--> loop until the entire file has been read

2015-02-19 10:33 GMT-05:00 Robert Kossler Robert.D.Kossler.3@nd.edu:

Hi Serge,

What is your command line?  I assume it includes "--ref=external"?
Rob

On Wed, Feb 18, 2015 at 2:50 PM, Serge Malo via USRP-users <
usrp-users@lists.ettus.com> wrote:

Hi all,

I'm developing an application where I need to transmit 2 signals on the
2 channels of a x300.
The beginning of the Tx streaming of the 2 signals need to be tightly
synchronized (less than 5ns time offset between them).

Now, I'm only trying to verify that the time offset between the 2
channels can be less than 5ns,  with a modified UHD example
(tx_samples_from_file).
I'm simply streaming the same file to both channels, and verifying the
time offset between the 2 channels with an external instrument.
So far, I'm not getting good results:
I'm getting time offsets in the order of 6000-22000 ns. The value is
quite stable from one run to another (~50ns), but it varies by more than
1us when I change the central frequency.

I attach my modified example source code.
I'm using UHD 3.8.2, but I had the same results with UHD 3.8.1.
I'm running under Windows 7, but I also had the same results under Linux.
My x300 has 2 WBX-120 D/B.
Its using a 10MHz external Reference Clock (Wenzel) and an external PPS
signal coming out of UBlox GPS receiver.

Below, I show how I "prepare" the file streaming to synchronize the 2
channels.
Please, let me know if you see something wrong in this sequence.

Best Regards,
Serge

std::vector<const void *> buffs;
buffs.push_back(&buff.front());
buffs.push_back(&buff.front());

uhd::tx_metadata_t md;
md.start_of_burst = false;
md.end_of_burst = false;
md.has_time_spec = true;

usrp->set_time_unknown_pps(uhd::time_spec_t(0.0));
boost::this_thread::sleep(boost::posix_time::seconds(2)); //allow for
some setup time

uhd::time_spec_t futureTime(2.0);
futureTime += usrp->get_time_now();
md.time_spec = futureTime;

 //loop until the entire file has been read

std::cout << "--> loop until the entire file has been read" << std::endl;
while(not md.end_of_burst and not stop_signal_called){

     infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type));
     size_t num_tx_samps = infile.gcount()/sizeof(samp_type);

     md.end_of_burst = infile.eof();

md.has_time_spec = false;

//tx_stream->send(&buff.front(), num_tx_samps, md);
tx_stream->send(buffs, num_tx_samps, md);
}


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

--
*Serge Malo *
CDO & Co-founder, Skydel Solutions
Cell: 1-514-294-4017
Skype: sergemalo2000
Serge.Malo@SkydelSolutions.com


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

--
Manu T S

Hi Serge, I too am facing synchronization issues[1] with X300. Please let me know if you happen to find any solution. [1]. http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/2015-January/012290.html On Thu, Feb 19, 2015 at 5:06 PM, Serge Malo via USRP-users < usrp-users@lists.ettus.com> wrote: > Hi Rob, > > Yes, it includes "--ref external". Here's the complete line: > tx_samples_from_file.exe --args addr=192.168.140.2 --file noise_10msps.bin > --rate 10000000 --freq 1000000000 --gain 0 --ref external --repeat > > Here's the complete output of the execution. We really see that the > external reference is used. > > Creating the usrp device with: addr=192.168.140.2... > -- X300 initialization sequence... > -- Determining maximum frame size... 8000 bytes. > -- Setup basic communication... > -- Loading values from EEPROM... > -- Setup RF frontend clocking... > -- Radio 1x clock:200 > -- Initialize Radio control... > -- Creating WSA UDP transport for 192.168.140.2:49153 > -- Performing register loopback test... pass > -- Creating WSA UDP transport for 192.168.140.2:49153 > -- Performing register loopback test... pass > -- Initializing clock and time using internal sources... done > Setting Clock Source to: external > Setting Time Source to: external > Using Device: Single USRP: > Device: X-Series Device > Mboard 0: X300 > RX Channel: 0 > RX DSP: 0 > RX Dboard: A > RX Subdev: WBX-120 RX+GDB > RX Channel: 1 > RX DSP: 1 > RX Dboard: B > RX Subdev: WBX-120 RX+GDB > TX Channel: 0 > TX DSP: 0 > TX Dboard: A > TX Subdev: WBX-120 TX+GDB > TX Channel: 1 > TX DSP: 1 > TX Dboard: B > TX Subdev: WBX-120 TX+GDB > > Setting TX Rate: 10.000000 Msps... > Actual TX Rate: 10.000000 Msps... > > Setting TX Freq: 1000.000000 MHz... > -- Successfully tuned to 1000.000000 MHz > -- > -- Successfully tuned to 1000.000000 MHz > -- > Actual TX Freq: 1000.000000 MHz... > > Setting TX Gain: 0.000000 dB... > Actual TX Gain: 0.000000 dB... > > Checking TX: LO: locked ... > Checking TX: Ref: locked ... > Press Ctrl + C to stop streaming... > --> create a transmit streamer > -- Creating WSA UDP transport for 192.168.140.2:49153 > -- Creating WSA UDP transport for 192.168.140.2:49153 > -- 1) catch time transition at pps edge > -- 2) set times next pps (synchronously) > --> loop until the entire file has been read > > > 2015-02-19 10:33 GMT-05:00 Robert Kossler <Robert.D.Kossler.3@nd.edu>: > > Hi Serge, >> What is your command line? I assume it includes "--ref=external"? >> Rob >> >> On Wed, Feb 18, 2015 at 2:50 PM, Serge Malo via USRP-users < >> usrp-users@lists.ettus.com> wrote: >> >>> Hi all, >>> >>> I'm developing an application where I need to transmit 2 signals on the >>> 2 channels of a x300. >>> The beginning of the Tx streaming of the 2 signals need to be tightly >>> synchronized (less than 5ns time offset between them). >>> >>> Now, I'm only trying to verify that the time offset between the 2 >>> channels can be less than 5ns, with a modified UHD example >>> (tx_samples_from_file). >>> I'm simply streaming the same file to both channels, and verifying the >>> time offset between the 2 channels with an external instrument. >>> So far, I'm not getting good results: >>> I'm getting time offsets in the order of 6000-22000 ns. The value is >>> quite stable from one run to another (~50ns), but it varies by more than >>> 1us when I change the central frequency. >>> >>> I attach my modified example source code. >>> I'm using UHD 3.8.2, but I had the same results with UHD 3.8.1. >>> I'm running under Windows 7, but I also had the same results under Linux. >>> My x300 has 2 WBX-120 D/B. >>> Its using a 10MHz external Reference Clock (Wenzel) and an external PPS >>> signal coming out of UBlox GPS receiver. >>> >>> Below, I show how I "prepare" the file streaming to synchronize the 2 >>> channels. >>> Please, let me know if you see something wrong in this sequence. >>> >>> Best Regards, >>> Serge >>> >>> >>> >>> std::vector<const void *> buffs; >>> buffs.push_back(&buff.front()); >>> buffs.push_back(&buff.front()); >>> >>> uhd::tx_metadata_t md; >>> md.start_of_burst = false; >>> md.end_of_burst = false; >>> md.has_time_spec = true; >>> >>> usrp->set_time_unknown_pps(uhd::time_spec_t(0.0)); >>> boost::this_thread::sleep(boost::posix_time::seconds(2)); //allow for >>> some setup time >>> >>> uhd::time_spec_t futureTime(2.0); >>> futureTime += usrp->get_time_now(); >>> md.time_spec = futureTime; >>> >>> //loop until the entire file has been read >>> std::cout << "--> loop until the entire file has been read" << std::endl; >>> while(not md.end_of_burst and not stop_signal_called){ >>> >>> infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type)); >>> size_t num_tx_samps = infile.gcount()/sizeof(samp_type); >>> >>> md.end_of_burst = infile.eof(); >>> md.has_time_spec = false; >>> >>> //tx_stream->send(&buff.front(), num_tx_samps, md); >>> tx_stream->send(buffs, num_tx_samps, md); >>> } >>> >>> >>> >>> >>> _______________________________________________ >>> USRP-users mailing list >>> USRP-users@lists.ettus.com >>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >>> >>> >> > > > -- > *Serge Malo * > CDO & Co-founder, Skydel Solutions > Cell: 1-514-294-4017 > Skype: sergemalo2000 > Serge.Malo@SkydelSolutions.com > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > > -- Manu T S
MM
Marcus Müller
Fri, Feb 20, 2015 10:06 AM

Hi Manu,

oh! I thought your synchro issue was solved, because you did not follow
up on the autocorrelation and crosscorrelation aspects of your signal;
so I take it that these were "proper" and your estimator actually works?
I'm still pretty sure that two chains configured identically will
exhibit exactly the same sample delay.

Greetings,
Marcus

On 02/20/2015 08:57 AM, Manu T S via USRP-users wrote:

Hi Serge,

I too am facing synchronization issues[1] with X300. Please let me
know if you happen to find any solution.

[1].
http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/2015-January/012290.html

On Thu, Feb 19, 2015 at 5:06 PM, Serge Malo via USRP-users
<usrp-users@lists.ettus.com mailto:usrp-users@lists.ettus.com> wrote:

 Hi Rob,

 Yes, it includes "--ref external". Here's the complete line:
 tx_samples_from_file.exe --args addr=192.168.140.2 --file
 noise_10msps.bin --rate 10000000 --freq 1000000000 --gain 0 --ref
 external --repeat

 Here's the complete output of the execution. We really see that
 the external reference is used.

 Creating the usrp device with: addr=192.168.140.2...
 -- X300 initialization sequence...
 -- Determining maximum frame size... 8000 bytes.
 -- Setup basic communication...
 -- Loading values from EEPROM...
 -- Setup RF frontend clocking...
 -- Radio 1x clock:200
 -- Initialize Radio control...
 -- Creating WSA UDP transport for 192.168.140.2:49153
 <http://192.168.140.2:49153>
 -- Performing register loopback test... pass
 -- Creating WSA UDP transport for 192.168.140.2:49153
 <http://192.168.140.2:49153>
 -- Performing register loopback test... pass
 -- Initializing clock and time using internal sources... done
 Setting Clock Source to: external
 Setting Time Source to: external
 Using Device: Single USRP:
   Device: X-Series Device
   Mboard 0: X300
   RX Channel: 0
     RX DSP: 0
     RX Dboard: A
     RX Subdev: WBX-120 RX+GDB
   RX Channel: 1
     RX DSP: 1
     RX Dboard: B
     RX Subdev: WBX-120 RX+GDB
   TX Channel: 0
     TX DSP: 0
     TX Dboard: A
     TX Subdev: WBX-120 TX+GDB
   TX Channel: 1
     TX DSP: 1
     TX Dboard: B
     TX Subdev: WBX-120 TX+GDB

 Setting TX Rate: 10.000000 Msps...
 Actual TX Rate: 10.000000 Msps...

 Setting TX Freq: 1000.000000 MHz...
 -- Successfully tuned to 1000.000000 MHz
 --
 -- Successfully tuned to 1000.000000 MHz
 --
 Actual TX Freq: 1000.000000 MHz...

 Setting TX Gain: 0.000000 dB...
 Actual TX Gain: 0.000000 dB...

 Checking TX: LO: locked ...
 Checking TX: Ref: locked ...
 Press Ctrl + C to stop streaming...
 --> create a transmit streamer
 -- Creating WSA UDP transport for 192.168.140.2:49153
 <http://192.168.140.2:49153>
 -- Creating WSA UDP transport for 192.168.140.2:49153
 <http://192.168.140.2:49153>
 --     1) catch time transition at pps edge
 --     2) set times next pps (synchronously)
 --> loop until the entire file has been read


 2015-02-19 10:33 GMT-05:00 Robert Kossler
 <Robert.D.Kossler.3@nd.edu <mailto:Robert.D.Kossler.3@nd.edu>>:

     Hi Serge,
     What is your command line?  I assume it includes "--ref=external"?
     Rob

     On Wed, Feb 18, 2015 at 2:50 PM, Serge Malo via USRP-users
     <usrp-users@lists.ettus.com
     <mailto:usrp-users@lists.ettus.com>> wrote:

         Hi all,

         I'm developing an application where I need to transmit 2
         signals on the 2 channels of a x300.
         The beginning of the Tx streaming of the 2 signals need to
         be tightly synchronized (less than 5ns time offset between
         them).

         Now, I'm only trying to verify that the time offset
         between the 2 channels can be less than 5ns,  with a
         modified UHD example (tx_samples_from_file).
         I'm simply streaming the same file to both channels, and
         verifying the time offset between the 2 channels with an
         external instrument.
         So far, I'm not getting good results: 
         I'm getting time offsets in the order of 6000-22000 ns.
         The value is quite stable from one run to another (~50ns),
         but it varies by more than 1us when I change the central
         frequency.

         I attach my modified example source code.
         I'm using UHD 3.8.2, but I had the same results with UHD
         3.8.1.
         I'm running under Windows 7, but I also had the same
         results under Linux.
         My x300 has 2 WBX-120 D/B.
         Its using a 10MHz external Reference Clock (Wenzel) and an
         external PPS signal coming out of UBlox GPS receiver.

         Below, I show how I "prepare" the file streaming to
         synchronize the 2 channels.
         Please, let me know if you see something wrong in this
         sequence.

         Best Regards,
         Serge



         std::vector<const void *> buffs;
         buffs.push_back(&buff.front());
         buffs.push_back(&buff.front());

         uhd::tx_metadata_t md;
         md.start_of_burst = false;
         md.end_of_burst = false;
         md.has_time_spec = true;

         usrp->set_time_unknown_pps(uhd::time_spec_t(0.0));
         boost::this_thread::sleep(boost::posix_time::seconds(2));
         //allow for some setup time

         uhd::time_spec_t futureTime(2.0);
         futureTime += usrp->get_time_now();
         md.time_spec = futureTime;

             //loop until the entire file has been read
         std::cout << "--> loop until the entire file has been
         read" << std::endl;
             while(not md.end_of_burst and not stop_signal_called){

                 infile.read((char*)&buff.front(),
         buff.size()*sizeof(samp_type));
                 size_t num_tx_samps =
         infile.gcount()/sizeof(samp_type);

                 md.end_of_burst = infile.eof();
         md.has_time_spec = false;

         //tx_stream->send(&buff.front(), num_tx_samps, md);
         tx_stream->send(buffs, num_tx_samps, md);
         }




         _______________________________________________
         USRP-users mailing list
         USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com>
         http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com





 -- 
 *Serge Malo *
 CDO & Co-founder, Skydel Solutions
 Cell: 1-514-294-4017 <tel:1-514-294-4017>
 Skype: sergemalo2000
 Serge.Malo@SkydelSolutions.com <mailto:Serge.Malo@SkydelSolutions.com>

 _______________________________________________
 USRP-users mailing list
 USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com>
 http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

--
Manu T S


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

Hi Manu, oh! I thought your synchro issue was solved, because you did not follow up on the autocorrelation and crosscorrelation aspects of your signal; so I take it that these were "proper" and your estimator actually works? I'm still pretty sure that two chains configured identically will exhibit exactly the same sample delay. Greetings, Marcus On 02/20/2015 08:57 AM, Manu T S via USRP-users wrote: > Hi Serge, > > I too am facing synchronization issues[1] with X300. Please let me > know if you happen to find any solution. > > [1]. > http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/2015-January/012290.html > > On Thu, Feb 19, 2015 at 5:06 PM, Serge Malo via USRP-users > <usrp-users@lists.ettus.com <mailto:usrp-users@lists.ettus.com>> wrote: > > Hi Rob, > > Yes, it includes "--ref external". Here's the complete line: > tx_samples_from_file.exe --args addr=192.168.140.2 --file > noise_10msps.bin --rate 10000000 --freq 1000000000 --gain 0 --ref > external --repeat > > Here's the complete output of the execution. We really see that > the external reference is used. > > Creating the usrp device with: addr=192.168.140.2... > -- X300 initialization sequence... > -- Determining maximum frame size... 8000 bytes. > -- Setup basic communication... > -- Loading values from EEPROM... > -- Setup RF frontend clocking... > -- Radio 1x clock:200 > -- Initialize Radio control... > -- Creating WSA UDP transport for 192.168.140.2:49153 > <http://192.168.140.2:49153> > -- Performing register loopback test... pass > -- Creating WSA UDP transport for 192.168.140.2:49153 > <http://192.168.140.2:49153> > -- Performing register loopback test... pass > -- Initializing clock and time using internal sources... done > Setting Clock Source to: external > Setting Time Source to: external > Using Device: Single USRP: > Device: X-Series Device > Mboard 0: X300 > RX Channel: 0 > RX DSP: 0 > RX Dboard: A > RX Subdev: WBX-120 RX+GDB > RX Channel: 1 > RX DSP: 1 > RX Dboard: B > RX Subdev: WBX-120 RX+GDB > TX Channel: 0 > TX DSP: 0 > TX Dboard: A > TX Subdev: WBX-120 TX+GDB > TX Channel: 1 > TX DSP: 1 > TX Dboard: B > TX Subdev: WBX-120 TX+GDB > > Setting TX Rate: 10.000000 Msps... > Actual TX Rate: 10.000000 Msps... > > Setting TX Freq: 1000.000000 MHz... > -- Successfully tuned to 1000.000000 MHz > -- > -- Successfully tuned to 1000.000000 MHz > -- > Actual TX Freq: 1000.000000 MHz... > > Setting TX Gain: 0.000000 dB... > Actual TX Gain: 0.000000 dB... > > Checking TX: LO: locked ... > Checking TX: Ref: locked ... > Press Ctrl + C to stop streaming... > --> create a transmit streamer > -- Creating WSA UDP transport for 192.168.140.2:49153 > <http://192.168.140.2:49153> > -- Creating WSA UDP transport for 192.168.140.2:49153 > <http://192.168.140.2:49153> > -- 1) catch time transition at pps edge > -- 2) set times next pps (synchronously) > --> loop until the entire file has been read > > > 2015-02-19 10:33 GMT-05:00 Robert Kossler > <Robert.D.Kossler.3@nd.edu <mailto:Robert.D.Kossler.3@nd.edu>>: > > Hi Serge, > What is your command line? I assume it includes "--ref=external"? > Rob > > On Wed, Feb 18, 2015 at 2:50 PM, Serge Malo via USRP-users > <usrp-users@lists.ettus.com > <mailto:usrp-users@lists.ettus.com>> wrote: > > Hi all, > > I'm developing an application where I need to transmit 2 > signals on the 2 channels of a x300. > The beginning of the Tx streaming of the 2 signals need to > be tightly synchronized (less than 5ns time offset between > them). > > Now, I'm only trying to verify that the time offset > between the 2 channels can be less than 5ns, with a > modified UHD example (tx_samples_from_file). > I'm simply streaming the same file to both channels, and > verifying the time offset between the 2 channels with an > external instrument. > So far, I'm not getting good results: > I'm getting time offsets in the order of 6000-22000 ns. > The value is quite stable from one run to another (~50ns), > but it varies by more than 1us when I change the central > frequency. > > I attach my modified example source code. > I'm using UHD 3.8.2, but I had the same results with UHD > 3.8.1. > I'm running under Windows 7, but I also had the same > results under Linux. > My x300 has 2 WBX-120 D/B. > Its using a 10MHz external Reference Clock (Wenzel) and an > external PPS signal coming out of UBlox GPS receiver. > > Below, I show how I "prepare" the file streaming to > synchronize the 2 channels. > Please, let me know if you see something wrong in this > sequence. > > Best Regards, > Serge > > > > std::vector<const void *> buffs; > buffs.push_back(&buff.front()); > buffs.push_back(&buff.front()); > > uhd::tx_metadata_t md; > md.start_of_burst = false; > md.end_of_burst = false; > md.has_time_spec = true; > > usrp->set_time_unknown_pps(uhd::time_spec_t(0.0)); > boost::this_thread::sleep(boost::posix_time::seconds(2)); > //allow for some setup time > > uhd::time_spec_t futureTime(2.0); > futureTime += usrp->get_time_now(); > md.time_spec = futureTime; > > //loop until the entire file has been read > std::cout << "--> loop until the entire file has been > read" << std::endl; > while(not md.end_of_burst and not stop_signal_called){ > > infile.read((char*)&buff.front(), > buff.size()*sizeof(samp_type)); > size_t num_tx_samps = > infile.gcount()/sizeof(samp_type); > > md.end_of_burst = infile.eof(); > md.has_time_spec = false; > > //tx_stream->send(&buff.front(), num_tx_samps, md); > tx_stream->send(buffs, num_tx_samps, md); > } > > > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com> > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > > > > > > -- > *Serge Malo * > CDO & Co-founder, Skydel Solutions > Cell: 1-514-294-4017 <tel:1-514-294-4017> > Skype: sergemalo2000 > Serge.Malo@SkydelSolutions.com <mailto:Serge.Malo@SkydelSolutions.com> > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com <mailto:USRP-users@lists.ettus.com> > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > > > > > -- > Manu T S > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com
SM
Serge Malo
Fri, Feb 20, 2015 2:28 PM

Hi Manu,

With the help of Neel, I have been able to fix my synchronization issue.
I now measure a time offset of about 5ns between the 2 Tx channels of my
x300.
I attach the fixed example.

Basically, in the original code, the while loop should have been like this
(setting "has_time_spec" to false need to be done after the first send,
obviously!)

while(not md.end_of_burst and not stop_signal_called){
infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type));
size_t num_tx_samps = infile.gcount()/sizeof(samp_type);
md.end_of_burst = infile.eof();

tx_stream->send(buffs, num_tx_samps, md);
md.has_time_spec = false;
}

Thanks to all for the support!

Serge

Hi Manu, With the help of Neel, I have been able to fix my synchronization issue. I now measure a time offset of about 5ns between the 2 Tx channels of my x300. I attach the fixed example. Basically, in the original code, the while loop should have been like this (setting "has_time_spec" to false need to be done after the first send, obviously!) while(not md.end_of_burst and not stop_signal_called){ infile.read((char*)&buff.front(), buff.size()*sizeof(samp_type)); size_t num_tx_samps = infile.gcount()/sizeof(samp_type); md.end_of_burst = infile.eof(); tx_stream->send(buffs, num_tx_samps, md); md.has_time_spec = false; } Thanks to all for the support! Serge
MT
Manu T S
Fri, Feb 20, 2015 2:46 PM

Dear Marcus,

I was not able to come up with a proper solution to the problem. I had to
fall back to N210's. There things are looking better. But still I am
experiencing sample delays on the transmitter side but not on the receiver
side. Currently I neutralize this impairment using a delay in software.

I had sent you the cross-correlation of the 2 rx streams. The correlation
is maximum when one of the stream is delayed by 11~13 samples with respect
to the other.

I am not sure if this is some problem with my initialization of the
hardware.

On Fri, Feb 20, 2015 at 11:06 AM, Marcus Müller usrp-users@lists.ettus.com
wrote:

Hi Manu,

oh! I thought your synchro issue was solved, because you did not follow up
on the autocorrelation and crosscorrelation aspects of your signal; so I
take it that these were "proper" and your estimator actually works? I'm
still pretty sure that two chains configured identically will exhibit
exactly the same sample delay.

Greetings,
Marcus

On 02/20/2015 08:57 AM, Manu T S via USRP-users wrote:

Hi Serge,

I too am facing synchronization issues[1] with X300. Please let me know
if you happen to find any solution.

[1].
http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/2015-January/012290.html

On Thu, Feb 19, 2015 at 5:06 PM, Serge Malo via USRP-users <
usrp-users@lists.ettus.com> wrote:

Hi Rob,

Yes, it includes "--ref external". Here's the complete line:
tx_samples_from_file.exe --args addr=192.168.140.2 --file
noise_10msps.bin --rate 10000000 --freq 1000000000 --gain 0 --ref external
--repeat

Here's the complete output of the execution. We really see that the
external reference is used.

Creating the usrp device with: addr=192.168.140.2...
-- X300 initialization sequence...
-- Determining maximum frame size... 8000 bytes.
-- Setup basic communication...
-- Loading values from EEPROM...
-- Setup RF frontend clocking...
-- Radio 1x clock:200
-- Initialize Radio control...
-- Creating WSA UDP transport for 192.168.140.2:49153
-- Performing register loopback test... pass
-- Creating WSA UDP transport for 192.168.140.2:49153
-- Performing register loopback test... pass
-- Initializing clock and time using internal sources... done
Setting Clock Source to: external
Setting Time Source to: external
Using Device: Single USRP:
Device: X-Series Device
Mboard 0: X300
RX Channel: 0
RX DSP: 0
RX Dboard: A
RX Subdev: WBX-120 RX+GDB
RX Channel: 1
RX DSP: 1
RX Dboard: B
RX Subdev: WBX-120 RX+GDB
TX Channel: 0
TX DSP: 0
TX Dboard: A
TX Subdev: WBX-120 TX+GDB
TX Channel: 1
TX DSP: 1
TX Dboard: B
TX Subdev: WBX-120 TX+GDB

Setting TX Rate: 10.000000 Msps...
Actual TX Rate: 10.000000 Msps...

Setting TX Freq: 1000.000000 MHz...
-- Successfully tuned to 1000.000000 MHz

-- Successfully tuned to 1000.000000 MHz

Actual TX Freq: 1000.000000 MHz...

Setting TX Gain: 0.000000 dB...
Actual TX Gain: 0.000000 dB...

Checking TX: LO: locked ...
Checking TX: Ref: locked ...
Press Ctrl + C to stop streaming...
--> create a transmit streamer
-- Creating WSA UDP transport for 192.168.140.2:49153
-- Creating WSA UDP transport for 192.168.140.2:49153
--    1) catch time transition at pps edge
--    2) set times next pps (synchronously)
--> loop until the entire file has been read

2015-02-19 10:33 GMT-05:00 Robert Kossler Robert.D.Kossler.3@nd.edu:

Hi Serge,

What is your command line?  I assume it includes "--ref=external"?
Rob

On Wed, Feb 18, 2015 at 2:50 PM, Serge Malo via USRP-users <
usrp-users@lists.ettus.com> wrote:

Hi all,

I'm developing an application where I need to transmit 2 signals on
the 2 channels of a x300.
The beginning of the Tx streaming of the 2 signals need to be tightly
synchronized (less than 5ns time offset between them).

Now, I'm only trying to verify that the time offset between the 2
channels can be less than 5ns,  with a modified UHD example
(tx_samples_from_file).
I'm simply streaming the same file to both channels, and verifying the
time offset between the 2 channels with an external instrument.
So far, I'm not getting good results:
I'm getting time offsets in the order of 6000-22000 ns. The value is
quite stable from one run to another (~50ns), but it varies by more than
1us when I change the central frequency.

I attach my modified example source code.
I'm using UHD 3.8.2, but I had the same results with UHD 3.8.1.
I'm running under Windows 7, but I also had the same results under
Linux.
My x300 has 2 WBX-120 D/B.
Its using a 10MHz external Reference Clock (Wenzel) and an external PPS
signal coming out of UBlox GPS receiver.

Below, I show how I "prepare" the file streaming to synchronize the 2
channels.
Please, let me know if you see something wrong in this sequence.

Best Regards,
Serge

std::vector<const void *> buffs;
buffs.push_back(&buff.front());
buffs.push_back(&buff.front());

uhd::tx_metadata_t md;
md.start_of_burst = false;
md.end_of_burst = false;
md.has_time_spec = true;

usrp->set_time_unknown_pps(uhd::time_spec_t(0.0));
boost::this_thread::sleep(boost::posix_time::seconds(2)); //allow for
some setup time

uhd::time_spec_t futureTime(2.0);
futureTime += usrp->get_time_now();
md.time_spec = futureTime;

  //loop until the entire file has been read

std::cout << "--> loop until the entire file has been read" <<
std::endl;
while(not md.end_of_burst and not stop_signal_called){

      infile.read((char*)&buff.front(),

buff.size()*sizeof(samp_type));
size_t num_tx_samps = infile.gcount()/sizeof(samp_type);

      md.end_of_burst = infile.eof();

md.has_time_spec = false;

//tx_stream->send(&buff.front(), num_tx_samps, md);
tx_stream->send(buffs, num_tx_samps, md);
}


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

--
*Serge Malo *
CDO & Co-founder, Skydel Solutions
Cell: 1-514-294-4017
Skype: sergemalo2000
Serge.Malo@SkydelSolutions.com


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

--
Manu T S


USRP-users mailing listUSRP-users@lists.ettus.comhttp://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com


USRP-users mailing list
USRP-users@lists.ettus.com
http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com

--
Manu T S

Dear Marcus, I was not able to come up with a proper solution to the problem. I had to fall back to N210's. There things are looking better. But still I am experiencing sample delays on the transmitter side but not on the receiver side. Currently I neutralize this impairment using a delay in software. I had sent you the cross-correlation of the 2 rx streams. The correlation is maximum when one of the stream is delayed by 11~13 samples with respect to the other. I am not sure if this is some problem with my initialization of the hardware. On Fri, Feb 20, 2015 at 11:06 AM, Marcus Müller <usrp-users@lists.ettus.com> wrote: > Hi Manu, > > oh! I thought your synchro issue was solved, because you did not follow up > on the autocorrelation and crosscorrelation aspects of your signal; so I > take it that these were "proper" and your estimator actually works? I'm > still pretty sure that two chains configured identically will exhibit > exactly the same sample delay. > > Greetings, > Marcus > > > On 02/20/2015 08:57 AM, Manu T S via USRP-users wrote: > > Hi Serge, > > I too am facing synchronization issues[1] with X300. Please let me know > if you happen to find any solution. > > [1]. > http://lists.ettus.com/pipermail/usrp-users_lists.ettus.com/2015-January/012290.html > > On Thu, Feb 19, 2015 at 5:06 PM, Serge Malo via USRP-users < > usrp-users@lists.ettus.com> wrote: > >> Hi Rob, >> >> Yes, it includes "--ref external". Here's the complete line: >> tx_samples_from_file.exe --args addr=192.168.140.2 --file >> noise_10msps.bin --rate 10000000 --freq 1000000000 --gain 0 --ref external >> --repeat >> >> Here's the complete output of the execution. We really see that the >> external reference is used. >> >> Creating the usrp device with: addr=192.168.140.2... >> -- X300 initialization sequence... >> -- Determining maximum frame size... 8000 bytes. >> -- Setup basic communication... >> -- Loading values from EEPROM... >> -- Setup RF frontend clocking... >> -- Radio 1x clock:200 >> -- Initialize Radio control... >> -- Creating WSA UDP transport for 192.168.140.2:49153 >> -- Performing register loopback test... pass >> -- Creating WSA UDP transport for 192.168.140.2:49153 >> -- Performing register loopback test... pass >> -- Initializing clock and time using internal sources... done >> Setting Clock Source to: external >> Setting Time Source to: external >> Using Device: Single USRP: >> Device: X-Series Device >> Mboard 0: X300 >> RX Channel: 0 >> RX DSP: 0 >> RX Dboard: A >> RX Subdev: WBX-120 RX+GDB >> RX Channel: 1 >> RX DSP: 1 >> RX Dboard: B >> RX Subdev: WBX-120 RX+GDB >> TX Channel: 0 >> TX DSP: 0 >> TX Dboard: A >> TX Subdev: WBX-120 TX+GDB >> TX Channel: 1 >> TX DSP: 1 >> TX Dboard: B >> TX Subdev: WBX-120 TX+GDB >> >> Setting TX Rate: 10.000000 Msps... >> Actual TX Rate: 10.000000 Msps... >> >> Setting TX Freq: 1000.000000 MHz... >> -- Successfully tuned to 1000.000000 MHz >> -- >> -- Successfully tuned to 1000.000000 MHz >> -- >> Actual TX Freq: 1000.000000 MHz... >> >> Setting TX Gain: 0.000000 dB... >> Actual TX Gain: 0.000000 dB... >> >> Checking TX: LO: locked ... >> Checking TX: Ref: locked ... >> Press Ctrl + C to stop streaming... >> --> create a transmit streamer >> -- Creating WSA UDP transport for 192.168.140.2:49153 >> -- Creating WSA UDP transport for 192.168.140.2:49153 >> -- 1) catch time transition at pps edge >> -- 2) set times next pps (synchronously) >> --> loop until the entire file has been read >> >> >> 2015-02-19 10:33 GMT-05:00 Robert Kossler <Robert.D.Kossler.3@nd.edu>: >> >> Hi Serge, >>> What is your command line? I assume it includes "--ref=external"? >>> Rob >>> >>> On Wed, Feb 18, 2015 at 2:50 PM, Serge Malo via USRP-users < >>> usrp-users@lists.ettus.com> wrote: >>> >>>> Hi all, >>>> >>>> I'm developing an application where I need to transmit 2 signals on >>>> the 2 channels of a x300. >>>> The beginning of the Tx streaming of the 2 signals need to be tightly >>>> synchronized (less than 5ns time offset between them). >>>> >>>> Now, I'm only trying to verify that the time offset between the 2 >>>> channels can be less than 5ns, with a modified UHD example >>>> (tx_samples_from_file). >>>> I'm simply streaming the same file to both channels, and verifying the >>>> time offset between the 2 channels with an external instrument. >>>> So far, I'm not getting good results: >>>> I'm getting time offsets in the order of 6000-22000 ns. The value is >>>> quite stable from one run to another (~50ns), but it varies by more than >>>> 1us when I change the central frequency. >>>> >>>> I attach my modified example source code. >>>> I'm using UHD 3.8.2, but I had the same results with UHD 3.8.1. >>>> I'm running under Windows 7, but I also had the same results under >>>> Linux. >>>> My x300 has 2 WBX-120 D/B. >>>> Its using a 10MHz external Reference Clock (Wenzel) and an external PPS >>>> signal coming out of UBlox GPS receiver. >>>> >>>> Below, I show how I "prepare" the file streaming to synchronize the 2 >>>> channels. >>>> Please, let me know if you see something wrong in this sequence. >>>> >>>> Best Regards, >>>> Serge >>>> >>>> >>>> >>>> std::vector<const void *> buffs; >>>> buffs.push_back(&buff.front()); >>>> buffs.push_back(&buff.front()); >>>> >>>> uhd::tx_metadata_t md; >>>> md.start_of_burst = false; >>>> md.end_of_burst = false; >>>> md.has_time_spec = true; >>>> >>>> usrp->set_time_unknown_pps(uhd::time_spec_t(0.0)); >>>> boost::this_thread::sleep(boost::posix_time::seconds(2)); //allow for >>>> some setup time >>>> >>>> uhd::time_spec_t futureTime(2.0); >>>> futureTime += usrp->get_time_now(); >>>> md.time_spec = futureTime; >>>> >>>> //loop until the entire file has been read >>>> std::cout << "--> loop until the entire file has been read" << >>>> std::endl; >>>> while(not md.end_of_burst and not stop_signal_called){ >>>> >>>> infile.read((char*)&buff.front(), >>>> buff.size()*sizeof(samp_type)); >>>> size_t num_tx_samps = infile.gcount()/sizeof(samp_type); >>>> >>>> md.end_of_burst = infile.eof(); >>>> md.has_time_spec = false; >>>> >>>> //tx_stream->send(&buff.front(), num_tx_samps, md); >>>> tx_stream->send(buffs, num_tx_samps, md); >>>> } >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> USRP-users mailing list >>>> USRP-users@lists.ettus.com >>>> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >>>> >>>> >>> >> >> >> -- >> *Serge Malo * >> CDO & Co-founder, Skydel Solutions >> Cell: 1-514-294-4017 >> Skype: sergemalo2000 >> Serge.Malo@SkydelSolutions.com >> >> _______________________________________________ >> USRP-users mailing list >> USRP-users@lists.ettus.com >> http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com >> >> > > > -- > Manu T S > > > _______________________________________________ > USRP-users mailing listUSRP-users@lists.ettus.comhttp://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > > > > _______________________________________________ > USRP-users mailing list > USRP-users@lists.ettus.com > http://lists.ettus.com/mailman/listinfo/usrp-users_lists.ettus.com > > -- Manu T S