Mobile and Vehicular Network Lab
2016 WNFA LAB2
Yu-Lin Wei 2016.3.25
USRP
Mobile and Vehicular Network Lab
Outline
• Intro
– USRP
– Environment
• TODO
– Transmitter – Receiver
– Decoding
• Grading Criteria
Mobile and Vehicular Network Lab
Intro
What is USRP
Mobile and Vehicular Network Lab
• Universal Software Defined Radio
– Expensive !
– Use C++/ python/ GUI to define the radio !!
• Official document
– https://www.ettus.com/content/files/07495_Ettus
_N200-210_DS_Flyer_HR.pdf
Mobile and Vehicular Network Lab
Ethernet to PC
Mobile and Vehicular Network Lab
• UHD
– USRP Hardware Driver – C++ API
– http://files.ettus.com/manual/
– https://github.com/EttusResearch/uhd
• UHD tool
– uhd_find_devices
• This program scans the network for supported devices
and prints out a list of discovered devices and their IP
addresses.
Mobile and Vehicular Network Lab
Mobile and Vehicular Network Lab
– uhd_usrp_probe
• This program constructs an instance of the device and prints out its properties, such as detected
daughterboards, frequency range, gain ranges,
Mobile and Vehicular Network Lab
• How to compile
– File Directory
• Use built in Make file
• uhd/host/examples
• Put your files here
• Add your files in the Cmakelist.txt
– Compile Directory
• uhd/host/build/examples
• make
Mobile and Vehicular Network Lab
Intro
Environment
Mobile and Vehicular Network Lab
• Last year…..
Mobile and Vehicular Network Lab
• System in LAB
• Access through ssh ( test your single_tx/
single_rx)
Mobile and Vehicular Network Lab
• ssh wnfa_16_[#]@10.5.6.202
– E.g. wnfa_16_01@10.5.6.202
• HW code put in ~/uhd/host/example
– single_tx.cpp – single_rx.cpp
• cd ~/uhd/host/build
• cmake .. (only the first time
• make
• cd example ( now in ~/uhd/host/build/example
Mobile and Vehicular Network Lab
• mkdir wn_trace
• put your src_data_1.bin here! ( transmitted by Tx
• Transimitter :
– ./single_tx --f=2.49 --i=128
• Receiver:
– ./single_rx --f=2.49 --i=128
• Received data in ./wn_trace/recv_signal.bin
Mobile and Vehicular Network Lab
Working Flow : (wn_lab2
• Run program/matlab/singal_generator.m
• Get src_data_1.bin / src_data_1.mat in program/trace
• Upload src_data_1.bin to wnfa_16_[#]account
• ~/uhd/host/build/example/wn_trace
• run ./single_tx ./single_rx under
~/uhd/host/build/example
• Download …example/wn_trace/recv_signal.bi
n
Mobile and Vehicular Network Lab
• Put recv_signal.bin in program/trace
• Run program/decode.m to get the plot
Mobile and Vehicular Network Lab
TODO
Tx / Rx
Mobile and Vehicular Network Lab
• Tx ( single_tx.cpp)
– Given data array, transmit it
• Rx ( single_rx.cpp)
– Implement receiving function
Mobile and Vehicular Network Lab
TODO
Decoding -
MATLAB
Mobile and Vehicular Network Lab
• Decode.m
– CFO correction – Packet detection – Phase Track
– Calculate SNR
Mobile and Vehicular Network Lab
• Figure 1 : Raw
Mobile and Vehicular Network Lab
• Figure 2: Preamble Channel
Mobile and Vehicular Network Lab
• Figure 3 : subcarrier estimation
Mobile and Vehicular Network Lab
• Figure 4 : phase shift animation
Mobile and Vehicular Network Lab
• Figure 5 : subcarrier SNR ( may be different )
Mobile and Vehicular Network Lab
• Figure 6 : symbol SNR ( may be different )
•
Mobile and Vehicular Network Lab
• Figure 7 : constellation
Mobile and Vehicular Network Lab
Grading Criteria
Mobile and Vehicular Network Lab
• Tx : 15%
• Rx : 15%
– If only either of them work, judge by if can work w/ TA version Tx/ Rx
• MATLAB
– Figure 2-3 : 5%
– Figure 4-7: 10%
• Report
– 10%
Mobile and Vehicular Network Lab
• Deadline:4/26(Tue.) 23:59 email to wn@csie.ntu.edu.tw – Email subject:[WN]lab2_teamXX
– [WN]lab2_teamXX.zip
• source code(single_tx.cpp/ single_rx.cpp/ decode.m phaseTrack.m pkt_detection.m)
• Report(.pdf)
• Demo-4/26(Tue.)
– Please register the demo slot. And come to CSIE R424 at that time. (TBA)
– All you should do are :
• Run the working flow in p15
Grading Criteria
Mobile and Vehicular Network Lab
特別評分機制
• 90% Lab 團體成績 (由各個作業負責的助教決定)
• 10% 小組互評成績
– 匿名
– 給分範圍為 -2.5 ~ 2.5
– 給分總和需等於 0 (ex 0.25/0.25/-0.25/-0.25)
• 目的
– Report 上的工作分配有時無法準確的表達各個組員 各自的想法,因此添加此機制作參考
Mobile and Vehicular Network Lab
• Contact to TAs :
https://www.facebook.com/groups/wn15spring/
– Email : wn@csie.ntu.edu.tw
– Office hour : Tue. 13:20~14:10/TBA
@ CSIE R424
Mobile and Vehicular Network Lab