USRP Hands-On Presentation
USRP Hands-On Presentation
USRP Hands-On Presentation
ni.com
Hands-on Course Objectives
• Find an FM radio station using the USRP as spectrum analyzer
• Introduction to the LabVIEW environment
Exercise • Configuring the USRP software defined radio
1 • Exploring live radio spectrum
ni.com
What is LabVIEW?
ni.com
The National Instruments Vision
“To do for test and measurement
what the spreadsheet did for financial analysis.”
Virtual Instrumentation
ni.com
NI RF Test Platform
Cellular, Wireless, & GPS
Optimized APIs Test Toolkits
(802.11 a/b/g/n , GSM, EDGE,
WCDMA, RFID, WiMAX, GPS, etc.)
Multicore VSAs & VSGs FPGA I/O & Amplifiers & Switching Power
Processing
ni.com Co-processing Attenuators Meters
The Next 30 Years:
Expanding LabVIEW into System Design
ni.com
Introduction to SDR
Find an FM radio station using the USRP as spectrum analyzer
Introduction to the LabVIEW environment
Configuring the USRP software defined radio
Exploring live radio spectrum
ni.com
From Concept to Prototype … Rapidly!
ni.com
LabVIEW Programs are Called Virtual Instruments (VIs)
LabVIEW VIs contain three main components:
1. Front Panel 2. Block Diagram 3. Icon/Connector Pane
ni.com
Front Panel & Controls Palette
Numeric
Control
ni.com
LabVIEW Help Utilities – Context Help
Hover over function blocks for just-in-time help
ni.com
LabVIEW Help Utilities – Detailed Help
ni.com
What is a Software Defined Radio?
ni.com
NI USRP Software Defined Radio Signal Processing
and Synthesis
Tunable RF Transceiver
NI LabVIEW to develop
Front Ends
and explore algorithms
Frequency Range
50 MHz – 2.2 GHz (NI-2920) NI Modulation Toolkit and
2.4 GHz & 5.5 GHz (NI-2921) LabVIEW add-ons to
400 MHz – 4.4 GHz (NI-2922) simulate or process live
signals
Applications
FM Radio Safety Radio 1 Gigabit Ethernet to PC
TV OFDM Plug-and-play capability
GPS Passive Radar Up to 25 MS/s baseband IQ
GSM Dynamic Spectrum Access streaming
ZigBee
ni.com
NI USRP Software Defined Radio
RF Baseband IQ
Software
Transceiver Processing
ni.com
SDR Components
• Digital to Analog
Tx • RF Upconversion • Modulation
• RF Downconversion • Demodulation
RX
• Analog to Digital • Signal Processing
ni.com
NI USRP-2920 Hardware Diagram 1. Device
Name
5. Gain
6. # Samples/
4. Antenna Buffer
2. IQ Rate
Analog RF Transceiver
3. Carrier Fixed Function FPGA PC
Frequency
ni.com
USRP Configuration in 6 Parameters
ni.com
USRP Configuration in 6 Parameters
ni.com
NI USRP RF Receive Parameters
IQ Rate ~ Bandwidth
1 MHz
Power (dB)
ni.com
NI USRP RF Receive Parameters
Carrier Frequency
1 MHz
Power (dB)
ni.com
NI USRP RF Receive Parameters
Gain
1 MHz
Power (dB)
ni.com
NI USRP RF Receive Parameters
number of samples
Time Domain
1
* number _ samples = fetch _ time
IQ _ rate
Frequency Domain
IQ _ rate
= resolution _ bandwidth
number _ samples
ni.com
NI-USRP Driver Software
ni.com
Exercise 1 Find a Radio Station
ni.com
Demodulating Live FM
Demodulate & listen to live FM radio
LabVIEW programming fundamentals
Integrating digital signal processing functions
Using .m file script inside LabVIEW
ni.com
Dataflow Programming
ni.com
Common Data Types Found in LabVIEW
ni.com
Reviewing the Block Diagram
Wire:
Waveform
Datatype
Wire:
Error Cluster
ni.com
Waveform Data Type
dt – Sample period
ni.com
Arrays
ni.com
34
Clusters
ni.com
Error and Complex Waveform Clusters
• Error Cluster – convention for tracking errors through a program
ni.com
Loops While Loop
• While Loop
• Terminal counts iterations
• Always runs at least once
• Runs until stop condition is
met
• For Loop
For Loop
– Terminal counts iterations
– Runs according to input N of
count terminal
ni.com
FM Radio Spectrum
ni.com
Demodulating Broadcast FM Radio
Demodulated
Baseband IQ
FM
ni.com
Unwrapping Phase
180°
-180°
ni.com
Exercise 2A Demodulate and Listen to FM Radio
ni.com
Demodulated Broadcast FM
0 57 kHz
30 15 23 38 53 58.35 67.65 76.65 92 99
Hz kHz kHz kHz kHz kHz kHz kHz kHz kHz
ni.com
LabVIEW Models of Computation
Dataflow C | HDL Code Textual Math Multi-Rate DSP Simulation Statechart
``
ni.com
Math with the LabVIEW MathScript Node
• Implement equations and algorithms textually
• Input and output variables created at the border
• Generally compatible with popular .m file script language
• Terminate statements with a semicolon to disable
immediate output
(Functions»Programming»
Structures»MathScript)
ni.com
ni.com
Frequency Demodulation Algorithm
ni.com
Exercise 2B Use a MathScript RT node
ni.com
Communications Design in LabVIEW
Modulation Toolkit
ni.com
Exercise 2C Use Use Prebuilt IP
ni.com
Digital Communications
Explore a digital communications system
Open and run a digital communications reference design
Identify the part of a more advanced LabVIEW block diagram
Overview of the modulation & demodulation process
ni.com
ni.com
Source Coding
Downconversion
Channel Coding
Demodulation
Modulation
Channel Decoding
Communications Channel
Digital Communication System
Upconversion
Source Decoding
Digital Communication System
NI Modulation Toolkit
NI Modulation Toolkit
ni.com
Digital Communication System
NI Modulation Toolkit
NI USRP
NI Modulation Toolkit
NI USRP
ni.com
Communications Design in LabVIEW
Modulation Toolkit
ni.com
Advanced Digital Communications Topics
ni.com
Packet-based Communication Link System Setup
RF Signal
Center Frequency: 915MHz
Modulation Format: PSK packets
Bit Rate: 100kbps
NI USRP-
USRP-2920 NI USRP-
USRP-2920
Transmitter Receiver
ni.com
Packet-based Communication with LabVIEW
ni.com
Packet Structure
ni.com
Transmitter Block Diagram
ni.com
The Received Signal
ni.com
Receiver Block Diagram
ni.com
Receiver: Pipelined Shift Register Architecture
Acquire
Energy Detector
& Packet Slicer
Resample and
Demodulate
Reconstruct
Data
Convert Bits
to ASCII
ni.com
Receiver: Pipelined Shift Register Architecture
ni.com
Exercise 3 Packet Based Transceiver
ni.com
NI SDR User Solutions
Wireless Comms Education
Record and Playback
Cognitive Radio
Physical Layer Prototyping
Compensating for RF nonlinearities with DSP
8x8 MIMO
Direction Finding
ni.com
Digital Communications Bundle
Bundle Contents Target Courses
• Two NI USRP-2920 + Toolkits • Communication Systems
• MIMO Cable • Digital & Wireless
• Digital Comm Lab Manual Communications
• Software Defined Radio (SDR)
Key Benefits
• Affordable
• Accessible
• NI Supported
• TX & RX Real RF Signals
• Scales to Research
ni.com
RF Record & Playback
• Record and play back up to 20 MHz of bandwidth
• Repeatable testing of algorithms / devices on realistic dataset
• Supplement a PXI lab with low-cost playback at your desk
Record
Playback
ni.com
NI USRP Research Case Study:
Cognitive Radio & Whitespace
Large Scale Cognitive Radio Testbed
• Prototyping cognitive radio in LabVIEW
• Spectral sensing with blind detection
• Database driven geo-location with GPS
• Deployed in Munich, Germany
ni.com
NI USRP Research Case Study:
Physical Layer Prototyping
Dr. Murat Torlak
ni.com
NI USRP Research Case Study: Dr. Robert Heath
Director WNCG
NI USRP 8x8 MIMO Testbed Ref in
University of Texas at Austin
External
• Adaptable from 2x2 to 8x8 Clock PPS in Transmit
USRP USRP
• Algorithm design in MathScript RT TX 1 MIMO
Cable
TX 2
USRP USRP
Rx 3 MIMO Cable Rx 4
Network
Cable
USRP USRP
Rx 5 MIMO Rx 6
Cable
USRP USRP
Rx 7 MIMO Rx 8
Cable
External
Clock
ni.com
6x6 MIMO Testbed
ni.com
NI USRP Research Case Study: Prof. Athanassios Manikas
Comm & Array Processing Chair
Position Detection & Localization Imperial College, London
Host USRP
Computer
RX 4
Gigabit
Ethernet USRP
Network
Cable
Switch TX Calibration
Signal
ni.com
Research: Downloadable Reference Designs
8x8 MIMO-
MIMO-OFDM GPS Simulation
ni.com/usrp
Tx
ni.com
NI Platforms for RF/Communications
NI RF
USRP for Generator, RF NI RF 6 GHz
LabVIEW Analyzer NI FlexRIO P2P VST
Host FPGA
Embedded, PC RIO
ni.com
SDR S/W Development Challenge
Tools Targets
Math (.m file script) Host Control (C, C++, .NET)
Simulation (Hybrid) DSP (Fxd pt C, Assembly)
User Interface (HTML) H/W Driver (C, Assembly)
Multicore
FPGA (VHDL, Verilog) System Debug FPGAs
Processors
ni.com
Parallel Programming with LabVIEW
Multicore
Processors FPGAs
ni.com
FlexRIO based SDR Prototyping:
End-to-end Realtime LTE-like Wireless HD Video Link
• Completed in 4 weeks (6 man-months)
• MPEG-4, 720p video streaming and playback over UDP at 1.5 Mbps
• 7.68MS/s IQ Rate, modeled after LTE framing
• Tx/Rx physical layer in LabVIEW FPGA with FlexRIO and 5791 RF Transceiver
• DSP prototyping in LabVIEW DSP Design Module with high-performance IP
developed in LabVIEW FPGA IP Builder
ni.com
Next Steps
ni.com