NI USRP and LabVIEW - National Instruments: Test,...

38

Transcript of NI USRP and LabVIEW - National Instruments: Test,...

Page 1: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration
Page 2: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration
Page 3: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

NI USRP and LabVIEW: A Platform for Software Defined Radio

Prototyping and Exploration

Fanie Coetzer

Application Engineer

Page 4: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

NI-USRP: a Platform for Software

Defined Radio Prototyping and

Exploration

A computer-hosted RF transceiver

for development of software-

defined radio

Hardware and software are easy

to install, connect, and learn

1 Gigabit Ethernet link streams live data for

processing on a host PC running

LabVIEW

Page 5: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

NI RF and Communications Market

Communications Design

Low Cost

Flexible

Portable

Radio

RF Test &

Measurement

• Calibration

• Low Phase Noise

• Precise measurement

• Real-time

• High Bandwidth

Page 6: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Communications Design Topics

Education

Introductory Communications

Digital Communications

Antenna Theory

Research

Physical layer research (SISO & MIMO)

Cognitive Radio & Dynamic Spectrum Access

RF transmit or receive applications

Defense

Spectral Monitoring

Prototyping Communications Systems

Complete

RF

Prototyping

Solution

Page 7: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

NI USRP

1 Gigabit

Ethernet

Connectivity Plug-and-play

capability

Up to 25 MS/s baseband

IQ streaming

Tunable RF

Transceiver

Front Ends Frequency Range

50 MHz – 2.2 GHz (NI-2920)

2.4 GHz & 5.5 GHz (NI-2921)

Signal Processing

and Synthesis NI LabVIEW to

develop and explore

algorithms

NI Modulation Toolkit

and LabVIEW add-ons

to simulate or process

live signals

Applications FM Radio

TV

GPS

GSM

ZigBee

Safety Radio

OFDM

Passive Radar

Dynamic Spectrum Access

Page 8: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Digital Communications Bundle

Key Benefits

• Affordable

• Accessible

• NI Supported

• TX & RX Real RF

Signals

• Scales to Research

Target Courses

• Communication Systems

• Digital Communications

Bundle Contents

• Two NI USRP-2920 +

Toolkits

• MIMO Cable

• Digital Comm Lab Manual

Page 9: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Lab Ready| Packet Radio & OFDM

Communications Systems Labs

by Dr. Sachin Katti, Stanford

1 Source Coding

2 Packet Communication, Sync,

and Channel Correction

3 Modulation

4 Demodulation

5 Design Challenge:

Packet based Transceiver

Digital Communications Labs

by Dr. Robert Heath, UT Austin

1 AWGN Simulator

2.1 Modulation /Demodulation

2.2 Pulse Shaping

3 Energy Detection

4 Equalization

5 Frame Detection

6 Intro to OFDM

7 Frequency Correction &

Sync

8 OFDM Channel Coding

(FREE: ni.com/courseware) (Ships in Bundle)

Page 10: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Awesome class! I really enjoyed the lectures, where

I learned a lot, and the labs were really cool because

we got to use the hardware.

… I am glad that I took this class!

Source: Stanford EE 49: Teaching Evaluations (Spring Quarter 2011)

NI USRP at Stanford University

“ Student Course Feedback:

Page 11: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Stanford University - Networked Systems

Group Needs:

Exposure to real-world signals

Recruit students to

RF/Communications early

Prepare students for research

Solution:

SDR Platform

Lower learning curve

Maintainable

Affordable

Stanford, CA

“The course evaluations for our class was

fantastic. Students rated the class 4.94/5.0, likely

one of the highest ratings among all classes in the

School of

Engineering at Stanford.” Dr. Sachin Katti, ECE

Page 12: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

NI USRP Under the Hood

RF Transceiver

Software Processing

Baseband IQ

Page 13: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

NI USRP-2920 Hardware Diagram

Analog RF Transceiver Fixed Function

FPGA

PC

Page 14: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Quadrature Modulation

)2cos( tfA cc

Amplitude Frequency Phase

Angle

(Frequency = Rate of change

of Angle)

Note: I and Q capture magnitude and phase

information

)2sin()()2cos()( tftQtftI cc

I Q

Page 15: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Quadrature Modulation Example –

AM Radio

Audio Signal

20Hz – 20kHz

AM Radio Signal

Message (Baseband) Frequen

cy

Audio

IQ Mixing

Radi

o

Carrier

Baseband IQ

LabVIEW Software NI USRP Hardware

Page 16: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

NI-USRP Driver Software

Initialize Configur

e Start Read IQ Stop Close

Page 17: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

NI-USRP Driver Software

Initialize Configur

e Start Read IQ Stop Close

Page 18: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Digital Communication System

Sou

rce

Cod

ing

Ch

an

nel

Cod

ing

Mod

ula

tion

Up

con

ver

sion

Dow

nco

nver

sion

Dem

od

ula

tion

Ch

an

nel

Dec

od

ing

Sou

rce

Dec

od

ing

Communications Channel

Page 19: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Digital Communication System

NI Modulation Toolkit

NI Modulation Toolkit

Page 20: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

NI Modulation Toolkit

NI Modulation Toolkit

NI USRP

NI USRP

Digital Communication System

Page 21: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Communications Design in LabVIEW LabVIEW Modulation Toolkit

Analog and Digital modulation formats AM, FM, PM

ASK, FSK, MSK, GMSK, PAM, PSK, QAM

Custom

Visualization 2D and 3D Eye, Trellis, Constellation

Modulation Analysis BER, MER, EVM, burst timing,

frequency deviation, ρ (rho)

Impairments Additive White Gaussian Noise (AWGN)

DC offset, Quadrature skew, IQ gain imbalance, phase noise

Equalization, Channel Coding, Channel Models

Page 22: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Decode & Hear Live FM Radio

30 Hz

15 kHz

23 kHz

38 kHz

53 kHz

58.35 kHz

67.65 kHz

76.65 kHz

92 kHz

99 kHz

57 kHz

0

19kHz Stereo Pilot

(10%)

Stereo Audio Left - Right

Direct Band (10%)

RBDS (5%)

Mono Audio

Left + Right

Audos Subcarrier (10%)

Page 23: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Advanced Digital Communications

Topics

Page 24: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Packet-based Communication Link System

Setup

RF Signal Center Frequency: 915MHz

Modulation Format: PSK packets

Bit Rate: 400kbps

NI USRP-

2190 Receiver

NI USRP-

2190 Transmitter

Page 25: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Packet-based Communication Link System

Setup

Gigabit Ethernet Connections to Host Computer

NI USRP-

2190 Receiver

NI USRP-

2190 Transmitter

Page 26: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Packet-based Communication Link System

Setup

• USRP control (Tx & Rx)

• Modulate Tx signal

• Demodulate Rx signal

• Reconstruct message

NI USRP-

2190 Receiver

NI USRP-

2190 Transmitter

Page 27: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Packet Based Transceiver

Page 28: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Transmitter Block Diagram

Page 29: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Packet Structure

GUAR

D

BAND

SYNC

SEQ

PCKT

NUM PAD DATA

Field Length

[bits]

Description

Guard Band 30 Allow initialization of Rx PLL, filters,

etc

Sync Sequence 20 Frame and Symbol Synchronization

Packet Number 8 Range: 0-255 Used for reordering of

packets and detection of missing packets

Data 64 - 256 Variable length data field. Length

detected dynamically at Rx end

Pad 20 Allows for filter edge effects.

Page 30: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

The Received Signal

Page 31: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Receiver Block Diagram

Page 32: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Channel Activity Detection

Problem: Inefficient

to keep demodulator

active for the entire

acquisition frame—it

needs to be applied

only to packets

Solution: Apply a

channel activity

detector to locate

packet boundaries

for a packet slicer

Page 33: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Error Tolerance

Problem: Errors at SNR >> 1

Partial packets captured at frame

edges

Improper synchronization

Solution: Repetition Coding

Repeat each packet n times

Repeat entire message m times

Page 34: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Ideas for Extension

Improved Error Tolerance

CRC check, convolutional coding, interleaving, etc…

Bi-directional link with ACK messages

OFDM

Channel Equalization to improve range

SW-based Rx gain control to ensure full use of available dynamic range

Monitor / replicate common links

Bluetooth mouse

Key fob

Additional message choices

Images, video, etc.

Page 35: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Transmitter: To Queue or not to

Queue? Enqueue

Dequeue

Create

Queue

Transmitter

Page 36: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

To Queue or not to Queue?

Pros

Buffering

Multi-rate

Cons

More Complex to implement

Not easy to read code

Page 37: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

Receiver: Pipelined Shift Register

Architecture

Page 38: NI USRP and LabVIEW - National Instruments: Test, Measurement…southafrica.ni.com/sites/default/files/USRP.pdf ·  · 2012-03-16NI USRP and LabVIEW: ... Measurement •Calibration

MathScript RT or Graphical

Implementations

or