Here follows a description on how to connect two or more usrps (with a locked clock) and get synchronised samples. In other words, how to get locked LO (Local Oscillators) and PhaseCoherent samples from multiple channels of multiple usrps (MIMO).
Unpack, build and install usrp, gnuradio-core and gr-usrp， Versions need to be more recent then 2.7cvs/svn 11 may 2006
Make sure usrp/fpga/rbf/rev2/multi*.rbf is installed in
Build and install gr-wxgui gr-audio-xxx and so on.
There is a gnuradio-examples/python/multi_usrp directory which contains examples and explanation.
Put at least a basic RX or dbsrx board in RXA of the master and RXA of the slave board. Make sure that the usrps have a serial or unique identifier programmed in their eeprom. (All new rev 4.1 boards have this)， You can do without a serial but then you never know which usrp is the master and which is the slave.
Now connect the 64MHz clocks between the boards with a short sma coax cable. See USRPClockingNotes on how to enable clock-out and clock-in, and which daughterboards are supported.
You need one board with a clock out and one board with a clock in.
You can choose any of the two boards as master or slave, this is not dependant on which board has the clock-out or in. In my experiments I had fewer problems when the board that has the clock-in will be the master board.
You can use a standard 16-pole flatcable to connect tvrx, basic-rx or dbsrx boards. Of this 16pin flatcable only two pins are used (io15 and ground). For all new daughterboards which use up a lot of io pins you have to use a cable with fewer connections. The savest is using a 2pin headercable connected to io15,gnd (a cable like the ones used to connect frontpanel leds to the mainboard of a PC)
Connect a 16-pole flatcable from J25 on basicrx/dbs_rx in rxa of the master usrp to J25 on basicrx/dbsrx in RXA of the slave usrp
You can also connect a flatcable with multiple connectors from master-J25 to
slave1-J25 to slave2-J25 to ...
connect a 2wire cable from masterRXA J25 io15,gnd to slaveRXA J25 io15,gnd
So now the hardware is setup, software is setup. Lets do some tests.
Connect power to both usrps.
./multi_usrp_oscope.py -x 12345678
It should tell you that usrp 12345678 is not found and tell you which serials are available. Now run
./multi_usrp_oscope.py -x actualserialnumYou should now get an oscope with two channels, one is from the master and one is from the slave
It will which show the I-signal from channel 0 of the master usrp and I-signal from channel 0 of the slave usrp.
(For testing connect the same signal source to the inputs of both boards)
The signals should be aligned.
If you click the sync button, it will resync the master and slave (should never be needed) Now run
To see all available options.
Now you are ready to do phase-locked aligned signal processing.You can also capture to file with:
./multi_usrp_rx_cfile.pyTo see all available options:
Detailed desciption of MuliUsrp or Mimo use or the USRP
With this code you can connect two or more usrps (with a locked clock) and
get synchronised samples.
The easiest thing to see how this works is just looking at the code
Use the usrp_multi block which is installed by gr-usrp.
self.multi=usrp_multi.multi_source_align( fg=self, master_serialno=options.master_serialno, decim=options.decim, nchan=options.nchan )
nchan should be 2 or 4.
You determine which is the master by master_serialno (this is a text string a
self.um=self.multi.get_master_usrp()You only need these references for setting freqs/gains or getting info about daughterboards.
Don't use the output directly but use the aligned output from multi.get_master_source_c() and multi.get_slave_source_c() You get references to the aligned output samples in the following way:
These blocks have multiple outputs.
output 1 is the first aligend output channel (if you enable 2 or 4
The two samplecounters are:
self.aligned_master_samplecounter=(self.multi.get_master_source_c(),0)You can set the gain or tune the frequency for all 4 receive daughetrboards at once:
This will only work reliably when you have all the same daughterboards.
Otherwise set all freqs and gains individually.
(This will synchronise the streams of the two usrps)
This work was funded by Toby Oliver at Sensus Analytics / Path
It was written by Martin Dudok van Heel of Olifantasia.com.
注： MultiUsrp or Mimo use of the USRP （原文出处，翻译整理仅供参考!）