USRP Hands-‐on Experiment
Shang-‐Lun Chiu
TA Informa>on
• Name: 邱上倫 (Louis)
• Email: b98901035@ntu.edu.tw
• Office hour: (Wed.) 1700~19:00 @ EE2-‐355
Outline
• USRP introduc>on
• What will we do?
– Cyclic Prefix – Decoding – Analysis
What will we do?
TODO
USRP N200
USRP N200
USRP N200
• Reference clock:
– The external clock is used as an “accurate”
oscillator for USRP
– You can try to do the experiment with/without the reference clock
UHD
• uhd_find_devices:
– This program scans the network for supported devices and prints out a list of discovered devices and their IP addresses.
• uhd_usrp_probe:
– This program constructs an instance of the device and prints out its proper>es, such as detected
daughterboards, frequency range, gain ranges, etc...
UHD
• How to write a UHD (in C++) program?
– Check out the example files
• single_tx_sync.cpp
• single_rx_sync.cpp
UHD
• How to compile a UHD program?
– Directory: uhd/host/examples – CMakeList.txt
• Add in your file in the list
– sudo make
UHD
• How to run your program?
– Commandline:
single_rx_sync
--args=“addr=192.168.10.3”
--clock=true single_tx_sync
--args=“addr=192.168.10.4”
--thres=0.02
--file=“./source_test.dat”
--clock=true
What will we do?
TODO
Synchroniza>on
• Time line
tx 3AC
rx
DATA
no>fy
Time Gap
Time Gap
Ac>on Gap
• What is this?
– Tune the synchroniza>on in very >ny scale – Please understand the purpose of ac>on gap
Modula>on
• We have done this part for you
• The source data “source_test.dat”
– Not a bit stream
– It contains BPSK samples (-‐0.05, +0.05)
Cyclic Prefix
• This part is TODO
• In OFDM, CP (cyclic prefix) is crucial to fight mul>path
• Add in CP before any symbol you send
MATLB decoding
• Symbol design
• Channel learning
• Phase tracking
Symbol Design
• There are blanks in the middle of tx data
Symbol Design
• Re-‐allocate the symbol as following
• Then, data points [1:64] are mapped to the
subcarrier [-‐32 … -‐1, 1, ..., 32].
Channel Learning
• In the >meline, 3AC are sent to learn channel
– Both TX and RX know the paoern of 3 AC symbols – Use these symbols to do coherent detec>on
Channel
• Good
Channel
• Bad
Phase Tracking
• This part is TODO
• Hint:
– In most communica>on system, we add in some
“pilots” in our transmioed symbols – The phase ship is linear
• Do linear regression
Phase Tracking
• Reference: 802.11a
– hop://www.vocal.com/wp-‐content/uploads/2012/05/80211a_wp1pdf.pdf
– Check page 9.
Phase track
• With phase tracking
Phase track
• Without phase tracking
Analysis
• Output the SNR of each Symbol
• Output avrage SNR of each sub-‐carrier
• Note:
– The data:
• 1 preamble symbol
• 3 AC symbols
• 150 data symbols
Summary
• TODO:
– UHD:
• single_tx_sync
– Matlab:
• decoder
• phaseTrack func>on
– Analysis:
• Average SNR on each symbol
• Average SNR on each sub-‐carrier