You are on page 1of 36

Digital Modulation Primer using GNU Radio

Tom Rondeau
tom@trondeau.com
GNU Radio Maintainer

July 3, 2012

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 1 / 35


Introduction

Download Materials

http://www.trondeau.com/gr-tutorial
Presentation PDF
Case Study materials
GNU Radio apps to run examples.
Links to source code for analysis.
Data file for first case study.
Images of expected output.
Exercises.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 2 / 35


Introduction

“The fundamental problem of communication is that of


reproducing at one point either exactly or approximately
a message selected at another point.”

- Claude Shannon, “A Mathematical Theory of Communication”

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 3 / 35


Introduction

GNU Radio is a Development Platform for


Communications

Building Blocks
1 Rapid prototyping of PHY layer systems.
2 Analysis and development of signals.
3 Educational material to teach the workings of various comms.
4 Expose engineering techniques and tricks.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 4 / 35


GNU Radio Information

Information Sources for GNU Radio

Tools and Manuals


Project website: gnuradio.org
Download source:
gnuradio.org/redmine/projects/gnuradio/wiki/Download
Online C++ Manual: gnuradio.org/doc/doxygen/
Online Python Manual: gnuradio.org/doc/sphinx/
My website for news and analysis: www.trondeau.com

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 5 / 35


GNU Radio Information

Community

Active developer community producing examples.


Large participation on our mailing list.
The Complimentary GNU Radio Archive Network (CGRAN).
Growing list of projects on github.
GNU Radio Conference:
www.trondeau.com/gnu-radio-conference-2012

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 6 / 35


GNU Radio Information

Available Components (as of v3.7)

Fundamentals
gr-analog Graphical Interfaces
gr-block gr-qtgui
gr-digital gr-wxgui
gr-fec
Hardware Interfaces
gr-fft
gr-audio
gr-filter
gr-comedi
gr-runtime
gr-fcd
gr-trellis
gr-shd
gr-vocoder
gr-uhd
gr-wavelet

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 7 / 35


Exploring

Filtering

“The need for filters intrudes on any thought experiment


about the wonders of abundant information.”

- James Gleik, The Information

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 8 / 35


Exploring

GNU Radio’s gr filter design Tool

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 9 / 35


Exploring

Filtering Noise

filtering.grc

Example of using a filter to shape noise.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 10 / 35


Exploring

Filtering Noise

With a simple low-pass filter, we can adjust the bandwidth of the filter to
adjust the shape of the noise.
Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 11 / 35
Exploring

Sources and Sinks

sources and sinks.grc

Demonstration of using multiple sources to create a noisy sine wave and


multiple sinks to view it in different domains.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 12 / 35


Exploring

Sources and Sinks

Showing both the frequency and time domain of the noisy signal.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 13 / 35


Digital Modulation Study

Information Representation
bits representation.grc

We can visualize bits as a series of 1’s and 0’s that are translated into 1’s
and −1′ ’s.
Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 14 / 35
Digital Modulation Study

Information Representation
bits representation.grc

We can do the same for another stream of bits and work actually combine
them into a single signal.
Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 15 / 35
Digital Modulation Study

Information Representation

bits representation.grc

We combine these by using complex numbers as an orthogonal basis.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 16 / 35


Digital Modulation Study

Complex Numbers

z(t) = x(t)cos(2πft + φ(t)) + jy (t)sin(2πft + φ(t))

z(t) = c(t)e −j2πft+φ(t)

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 17 / 35


Digital Modulation Study

Complex Numbers: Polar Plots


90°
Frequency = 100 Hz
Time per Sample = 1.0 ms
Radians per Sample = 36.0 Phase = 109.9112
Phase = 71.1625
135° 45°

Phase = 36.0604
1.0
0.8
0.6
0.4
0.2
180° 0°

Phase = -3.8096

225° 315°

270°
Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 18 / 35
Digital Modulation Study

Information as a Complex Number

bit representations.grc

Putting one signal on the real axis and another signal on the imaginary
axis, we can combine these on two orthogonal planes. The “constellation”
plot on the right is just a polar plot.
Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 19 / 35
M-PSK Example

Modulating & Transmitting a Signal

mpsk stage1.grc

Using a pre-build PSK modulator block from GNU Radio.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 20 / 35


M-PSK Example

Modulating & Transmitting a Signal

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 21 / 35


M-PSK Example

The Received Signal


mpsk stage2.grc

We can simulate a channel model with noise, frequency and timing offsets,
and multipath.
Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 22 / 35
M-PSK Example

The Received Signal

Signal captured using a multipath channel with some AWGN noise and
timing offset. To make the signal recognizable, no frequency offset was
used.
Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 23 / 35
M-PSK Example

After Timing Recovery

mpsk stage3.grc

We use a control loop algorithm to find the right sampling time to fix
clock mismatches between the transmitter and receiver.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 24 / 35


M-PSK Example

After Timing Recovery

Showing a no-noise situation to illustrate ISI (self-interference) issues in


the received signal before timing recovery and matched filtering.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 25 / 35


M-PSK Example

After Timing Recovery - With Noise

Even with noise, we can still recover the proper timing.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 26 / 35


M-PSK Example

Multipath in Brief

Multipath channels result from a signal bouncing off objects and hitting
the receiver at different times and with different phases.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 27 / 35


M-PSK Example

Effects of Multipath
mpsk multipath.grc

This simulation allows us to adjust the multipath channel as though we


are adjusting a stereo’s equalizer. (See also: multipath sim.grc)
Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 28 / 35
M-PSK Example

Equalizing Multipath

Cartoon showing signal corrupted by multipath. Equalizer tries to invert


the multipath so that the combination is a flat frequency response.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 29 / 35


M-PSK Example

Equalizing Multipath

mpsk stage4.grc

Using the constant modulus algorithm (CMA) blind equalizer is used here
to correct multipath distortion.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 30 / 35


M-PSK Example

Equalizing Multipath

Note the similarity between the time-synchronized and filtered output with
multipath and the ISI of the signal before the matched filter with no
multipath.
Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 31 / 35
M-PSK Example

Equalizing Multipath

Equalization working with noise.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 32 / 35


M-PSK Example

Phase Offset Correction


mpsk stage5.grc

The transmitter and receiver work off different clocks, so there will be a
frequency and phase offset. We need to correct for any small frequency
and phase offsets.
Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 33 / 35
M-PSK Example

After Timing Recovery - With Noise

Left figure shows a rotate constellation. The Costas Loop block fixes the
offset.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 34 / 35


fin.

Tom Rondeau tom@trondeau.com GNU Radio July 3, 2012 35 / 35

You might also like