USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Synchronizing carrier frequency of two USRPs

Hi,

 

my goal is to realize frequency hopping. Therefore I'm trying to synchronize the carrier frequency of the transmitter USRP and the receiver USRP. I started with a very simple idea by using the property node and a global variable. The carrier frequency is incremented by 1MHz. Because of the time delay which is given when the transmitter set up a new carrier frequency and send the data, while the receiver still read the carrier frequency. Anyway, my modified receiver is able to receive some message packets. The received message packets are only visible after stopping the vi.

 

Right now I'm using two USRP connected by the MIMO Sync and Data Transfer Cable. I used the packet-based digital link example from https://decibel.ni.com/content/servlet/JiveServlet/download/18801-9-38215/USRPPacketTxRx.zip . 

 

I would be very thankful if you could help me. 


0 Kudos
Message 1 of 15
(8,997 Views)

Hi, 

 

Although you can directly synchronize the reference frequencies and the PPS inputs on two USRPs by using the front panel connectors, or through the MIMO connector, the carrier frequency that you are looking to synchronize is derived from the reference frequency and doesn't necessarily have to have the same phase or exact frequency. The issue is that every pll / frequency multiplier / etc. Used to derive the carrier frequency introduces some phase ambiguity. This isn't  a problem with the hardware, it's a fact of life. 

 

One way to compensate for these differences would be to do so offline after a calibration procedure--the phase differences tend to remain the same unless you retune your reviver. Once you know the phase difference in one of your two receivers you can apply some simple DSP to compensate for it. See for instance: https://decibel.ni.com/content/docs/DOC-19209.

 

 

Another more complicated way of handling the phase discontinuities that you are seeing is to build custom hardware in which the carrier frequency is used as the reference frequency. I don't suggest this because I haven't tried it and it seems complicated.

 

I hope that this helps...

 

--Sam

Sam Shearman
0 Kudos
Message 2 of 15
(8,991 Views)

Hi,

 

is there an example vi how to use the ref in and pps in?

0 Kudos
Message 3 of 15
(8,981 Views)

I've used the Ref in and PPS in inputs to synchronize four USRPs for the MIMO example that you'll find here:

 

http://bit.ly/usrpMIMOExample

 

It's a matter of using property nodes from NI USRP to set the Ref and PPS sources in the appropriate order. I hope that this helps...

 

--Sam

Sam Shearman
0 Kudos
Message 4 of 15
(8,977 Views)

Unfortunately your example was not helpful for me. Maybe because I am LabView and USRP beginner. I am new at the syncronizing topic. Before I am trying to work with the Ref In and PPS In I try it first with the mimo solution. So I started with a simple idea. I have used the niUSRP Tx Continuous Lab.vi and the niUSRP Rx Continuous Lab.vi. I have added a property node inside the niUSRP Rx Continuous Lab.vi where I can choose the frequency reference source and saved it as niUSRP Rx Continuous Lab_Ref.vi. The Tx.vi is running on my first USRP and the Rx.vi is running on my second USRP. Both are connected with the mimo cable. My host-pc is connected by the ethernet-cable to the first USRP. 

 

My thought was to change the frequency reference source from internal to Mimo and the receiver should get automatically the same carrier frequency as the transmitter. But this is not working. Where is my mistake?

 

Another solution for my frequency hopping might be to used the trigger time. Can I start the Tx.vi on the first USRP and the Rx.vi on the second USRP at the same time by the mimo-cable? Or is this only possible with the PPS In? I guess syncronizing two separated VIs is more difficult then syncronizing both USRP within just one VI. Am I right?

 

I'm sorry for these maybe beginner questions.

0 Kudos
Message 5 of 15
(8,948 Views)

Hello -

 

You're headed down the right track.

 

The basic harware theory of operation is:

1. The MIMO cable allows one USRP to act as master and the other as slave. (You will need to set the second USRP to use the MIMO cable for two properties: 10 MHz Reference Frequency Source and Timebase Clock Source.)

2. The 10MHz referece clock is then shared direclty over the cable, while timestamps are shared over the cable to sync time between devices.

-----

The basic software theory of operation:

1. Use the Configure Trigger VI to specify at what time you want to acqusition to start

2. Synchronize the times across USRP using the Set Time (specify that this should happen on "Next Timebase Edge")

3. Commit the changes

4. Run a Fetch or Write... it will wait until the time base reaches the 'Trigger' time to start

 

Refer the following shipping example for help:

niUSRP EX Rx Multiple Synchronized Inputs.vi

 

(Note: If you're not using the MIMO cable, but rather the external Ref In and PPS inputs then you need to remove the "0" wired in to the top channel list input of the niUSRP Set Time.vi)

 

Best Regards,

Erik

 

0 Kudos
Message 6 of 15
(8,938 Views)

I have looked at the niUSRP EX Rx Multiple Synchronized Inputs.vi example. The way the trigger was programed is similar to the 2x2 MIMO example in  https://decibel.ni.com/content/docs/DOC-19209. Both devices were triggered within one VI. Is it possible to trigger two USRPs in two separate VIs like the packet based digital link example with one VI for the Tx and one VI for the Rx?

0 Kudos
Message 7 of 15
(8,928 Views)
Yes if you can establish a common time base between devices. This can be done several ways. The easiest is in one VI on one computer. Two VIs on one computer is possible if you can coordinate the time base sync (semaphores or rendezvous may help in LabVIEW). Lastly you can do it across machines and distances with a GPS disciplined oscillator.
0 Kudos
Message 8 of 15
(8,924 Views)

Thank you for your advices. I will try it. But what about my problems from my first solution in message 5? How can I use the frequency reference source so, that the niUSRP Rx Continuous Lab.vi 60 KB use the same frequency as the niUSRP Tx Continuous Lab.vi 59 KB?

0 Kudos
Message 9 of 15
(8,922 Views)

Set Reference Frequency Source to MIMO (since you are using the MIMO cable if I'm not mistaken) on either the RX VI or TX VI (but not both) using a property node. This will share the 10 MHz reference clock between devices. The specified Carrier Frequency will also need to be set to the same value.  Your VI, niUSRP Rx Continuous Lab_Ref.vi, seems to have all of the correct elements in place.

 

 

I did notice that your TX VI has a carrier set to 86.6MHz and the TX VI is set to 915MHz by default.  These should be set to the same number.

 

 

Also, I'm trying to understand the big picture of your application... for many applications this type of syncronization is not necessary.  Typically reciever would run continuously triggering and process data when a packet is detected.

0 Kudos
Message 10 of 15
(8,920 Views)