112,99 €
An approachable guide to an invaluable radio frequency communication toolkit
Software-defined radio (SDR), which emerged in the 1990s, has become a core development method in certain high-profile fields, including military and space communications. High cost and problems with hardware availability, however, prevented this technology from being widely disseminated. The advent of low-cost hardware beginning in the 2010s, however, has made GNU Radio—the leading open-source software toolkit for developing SDR systems—an increasingly viable and even critical tool for a new generation of radio frequency communication engineers.
Communication Systems Engineering with GNU Radio provides an accessible overview of this toolkit and its applications. Beginning with the fundamentals of using GNU radio for digital signal processing, the volume then moves to the practicalities of decoding data and the advantages of accessing raw data normally unavailable in hardware-defined radio frequency receivers. The result is a potentially crucial tool for engineers looking to adopt this cost-effective and flexible standard for transmitting and processing radio frequency signals.
Readers will also find:
Communication Systems Engineering with GNU Radio is ideal for graduate and undergraduate students in communications systems courses, as well as professionals working in SDR.
Sie lesen das E-Book in den Legimi-Apps auf:
Seitenzahl: 525
Veröffentlichungsjahr: 2024
Cover
Table of Contents
Title Page
Copyright
Dedication
About the Authors
Foreword
Acknowledgments
Acronyms
About the Companion Website
Introduction
1 Getting Started with GNU Radio: Synthetic Signals
1.1 Evolution of Radio Frequency Electronics Toward SDR
1.2 The Complex Envelope and the Justification of the IQ Structure
1.3 Complex Number Manipulation
1.4 GNU Radio and GNU Radio Companion
1.5 Sample Rates, Decimation and Aliasing
1.6 Low-pass Filtering or Working on Upper Nyquist Zones
1.7 ADC and DAC Resolution
1.8 Power Spectral Density Display with the Frequency Sink
1.9 Conclusion
References
Notes
2 Using GNU Radio with Signals Collected from SDR Hardware
2.1 SDR Hardware Architecture
2.2 Using Readily Available Processing Tools
2.3 Amplitude Modulation and Demodulation
2.4 Frequency Modulation and Demodulation
2.5 Phase Modulation and Demodulation
2.6 Spectral Occupation of the Various Modulation Schemes
2.7 Local Oscillator Leakage Issue
2.8 Conclusion
References
Notes
3 Communicating with External Software (Python, Networking, ZeroMQ, MQTT)
3.1 Connecting to an External Sentence Decoding Tool Using Named Pipes
3.2 TCP/IP Server Running in a Separate Thread
3.3 XML-RPC
3.4 Zero MQ (0MQ) Streaming
3.5 MQTT
3.6 Conclusion
References
Notes
4 Correlating: Passive and Active Software-Defined Radio (SDR)–RADAR
4.1 SDR–RADAR Requirements and Design
4.2 Correlation: GNU Radio Implementation
4.3 Passive RADAR Principle and Implementation
4.4 Active RADAR Principle and Implementation
4.5 Measurement Principle
4.6 From Theory to Experiment: Ranging by Frequency Stacking
4.7 Results
4.8 Conclusion on Range Measurement
4.9 Azimuth Resolution Through Spatial Diversity: Synthetic Aperture RADAR
4.10 Acquisition for Azimuth Measurement
4.11 Suppressing Direct Coupling Interference
4.12 Signal Processing
4.13 Result Analysis
4.14 Interferometric Measurement
4.15 Reproducible Positioning of the Receiving Antenna: Motorized Rail
4.16 The Radio Frequency Corner Reflector
4.17 Fine Displacement Measurement
4.18 Impact of the Atmosphere
4.19 Time of Flight Measurement with Sub-sampling Period Resolution and the Use of a Surface Acoustic Wave Cooperative Target for Reproducible Range Simulation
4.20 Conclusion
References
Notes
5 Digital Communications in Action: Design and Realization of a QPSK Modem
5.1 Digital Communication Concepts
5.2 Building a QPSK Modulator with GNU Radio
5.3 Building a QPSK Demodulator with GNU Radio
5.4 Conclusion
References
6 Messages, Tags, and Packet Communications
6.1 Introduction
6.2 Polymorphic Types
6.3 Messages
6.4 Tags
6.5 Case Studies
6.6 Conclusion
References
Notes
7 A Digital Communication Standard: The DAB+ Radio Broadcasting System
7.1 Introduction
7.2 The DAB+ Standard
7.3 Building a DAB+ Transmitter
7.4 Building a DAB+ Receiver with GNU Radio
7.5 Conclusion
References
8 QPSK and CCSDS Packets: Meteor-M 2N Satellite Signal Reception
8.1 Introduction
8.2 When Will the Satellite Fly Overhead?
8.3 Why Such a Complex Protocol?
8.4 How to Tackle the Challenge?
8.5 From the Radio frequency Signal to Bits
8.6 From Sentences to Paragraphs
8.7 So Much Text … Pictures Now
8.8 JPEG Image Decoding
8.9 Conclusion
Appendix 8. A Reed–Solomon Block Error Correcting Code
References
Note
9 Custom Source and Sink Blocks: Adding Your Own Hardware Interface
9.1 Python Block
9.2 Out-of-Tree Blocks
9.3 Cross-compiling for Running on Headless Embedded Systems
9.4 Conclusion
References
10 Conclusion
References
Index
End User License Agreement
Chapter 5
Table 5.1 QPSK parameters.
Table 5.2 Spectral efficiency (bits/s/Hz) for four digital modulations.
Chapter 7
Table 7.1 Limiting planning parameter values for DAB transmission modes.
Table 7.2 DAB time transmission parameters for Mode I with s.
Chapter 1
Figure 1.1 Block diagram depicting the RTL-SDR receiver, comprising two esse...
Figure 1.2 ADI AD9363 IC receiver section. This radio chip is integrated int...
Figure 1.3 The ultimate software-defined radio.
Figure 1.4 Simplified block diagram of an IQ modulator (a) and IQ demodulato...
Figure 1.5 (a) Each block output must be connected to an input of the same t...
Figure 1.6 (a) First flowgraph with a signal source, a throttle to slow down...
Figure 1.7 Adding a spectrum analyzed called the QT frequency sink for displ...
Figure 1.8 SDR naturally handles complex numbers: replacing the real-valued ...
Figure 1.9 The magnitude of the spectrum of the complex quantity is no longe...
Figure 1.10 Illustration of the discrete-time sampled periodic spectrum, wit...
Figure 1.11 GRAVES continuous wave RADAR flowchart using the second Nyquist ...
Figure 1.12 Measurement result with four antennas connected to two Ettus Res...
Figure 1.13 Illustration of aliasing on the noise floor and the impact of th...
Figure 1.14 (a) Band-pass filter block demonstration, fed by a noise source ...
Figure 1.15 Basic example of
Xlating FIR Filter
usage demonstrating how the ...
Figure 1.16 Demonstration of the quantization limit and the impact on the si...
Figure 1.17 Characterizing a (real) bandpass filter and playing its output o...
Chapter 2
Figure 2.1 Evolution of hardware architectures, from the fully hardware solu...
Figure 2.2 (a) Family picture of the hardware connected to a modified GPS an...
Figure 2.3 Two tones at 480 and 1710 Hz are used to amplitude-modulate a 30 ...
Figure 2.4 ACARS decoding principle for converting the received signals to s...
Figure 2.5 Soft-bit output of the two filters centered on 1200 and 2400 Hz t...
Figure 2.6 (a) Example of simultaneous decoding of multiple channels broadca...
Figure 2.7 Narrowband FM signal emission (a) and reception (b) simulation.
Figure 2.8 FM capture demonstration on synthetic signals.
Figure 2.9 Spectrum of part of the FM broadcast band as monitored by an RTL-...
Figure 2.10 Increasing the bandwidth thanks to the Adalm-Pluto source to mon...
Figure 2.11 Definition of the
samp_rate
variable as a multiple of the final a...
Figure 2.12 (a) Flowchart for selecting a single broadcast FM station using ...
Figure 2.13 Reception of a signal emitted by a Semtech XE1203F radiomodem pr...
Figure 2.14 (a) Schematic of the minicircuits double-balanced mixer, detaili...
Figure 2.15 In all charts, top is the demodulated signal’s real part (cosine...
Figure 2.16 (a) Schematic of the processing chain used to decode the digital...
Figure 2.17 Projection of the tangential velocity toward the receiver .
Figure 2.18 (a) Flowchart for loading the GPS record encoded as 8-bit (
char
)...
Figure 2.19 (a) Improved flowchart from Figure 2.18 with coarse frequency tr...
Figure 2.20 (a) Flowchart for generating various modulation schemes of the s...
Figure 2.21 (a) Flowchart for generating Upper Side Band (USB) or Lower Side...
Figure 2.22 (a) Flowchart for compensating for LO leakage by frequency trans...
Chapter 3
Figure 3.1 A simple GNU Radio Companion processing chain (a) produces a data...
Figure 3.2 Receiving a single POCSAG channel around 466 MHz and processing t...
Figure 3.3 Signal processing of the POCSAG signals using
multimon-ng
. Notice...
Figure 3.4 Decoding 4 POCSAG channels simultaneously.
Figure 3.5 OSI layer hierarchy describing the services needed for a communic...
Figure 3.6 Concept of a server – waiting to provide a service – and a client...
Figure 3.7 (a) Signal processing chain feeding a UDP socket on port 2000 of ...
Figure 3.8 (a, b) GNU Radio signal processing chain for fetching the data st...
Figure 3.9 Reconfiguration of a parameter of a GNU Radio processing chain – ...
Figure 3.10 Activation of the
register_introspection_functions()
method in a...
Figure 3.11 GNU Radio Companion flowgraph illustrating the use of the ZeroMQ...
Figure 3.12 ZeroMQ (or 0MQ) provides an application layer above TCP/IP and U...
Figure 3.13 Exchanges between client and server in which each vector is requ...
Figure 3.14 Generation of a sawtooth signal by GNU Radio (
Signal Source
of s...
Figure 3.15 Generation of a sawtooth signal by GNU Radio (
Signal Source
of s...
Figure 3.16 Observation using
tcpdump -vv -x ’port 5556’ -i lo
(...
Figure 3.17 MQTT relies on a data hub – the
broker
– which centralizes the e...
Chapter 4
Figure 4.1 Architecture of the hardware for implementing the various RADAR s...
Figure 4.2 Implementation of the cross-correlation between a signal and its ...
Figure 4.3 Illustration of the detection of two targets whose time-delayed c...
Figure 4.4 Demonstration of the linearity of the correlation with three targ...
Figure 4.5 Geographical context of the measurement setup. From the balcony o...
Figure 4.6 Frequency stacking the 5.8 GHz 802.11ac WiFi signal emitted by a ...
Figure 4.7 Stacking measurements acquired in successive spectral bands in or...
Figure 4.8 Result of the measurement, top with a bandwidth of 50 MHz (650–70...
Figure 4.9 Result of the measurement, with bandwidths ranging from 50 MHz (3...
Figure 4.10 Analysis of the source of echoes in a geographical context: the ...
Figure 4.11 A Raspberry Pi 4 controls the experiment and acquires data from ...
Figure 4.12 (a) Echoes as a function of time for 30 successive measurements,...
Figure 4.13 Example of integrating a TCP/IP server into GNU Radio Companion....
Figure 4.14 (a) Spectrum of a WiFi channel acquired on a 13 MHz band, highli...
Figure 4.15 Echoes acquired by a WiFi transmitter scanning 11 channels and w...
Figure 4.16 (a) Zoom on the graduation indicating where to place the receivi...
Figure 4.17 Organization of the acquired data: each column represents a new ...
Figure 4.18 (a) Raw measured signals resulting from correlation as a functio...
Figure 4.19 Mapping conversion from {distance, azimuth} to Cartesian coordin...
Figure 4.20 Overlay of aerial photographs from Google Maps with our resolved...
Figure 4.21 (a) Distribution of reflectors on a Google Maps background for a...
Figure 4.22 Experimental setup with the fixed transmission antenna on the ba...
Figure 4.23 (a) Photograph of the corner reflector (square trihedron) with a...
Figure 4.24 Difference in the modules of the {distance, azimuth} maps acquir...
Figure 4.25 Evolution of the phase of the observed signal at the location id...
Figure 4.26 Measurements of the output phase noise of the AD9361 equipped wi...
Figure 4.27 Flowchart for spectrum spreading a carrier wave using a Galois l...
Figure 4.28 The temperature variation during this experiment was 50 K, so th...
Figure 4.29 (a) Final experiment setup assembled using dedicated hardware. T...
Figure 4.30 Signal processing scheme used in Sentinel-1 spaceborne RADAR to ...
Chapter 5
Figure 5.1 The digital communication system.
Figure 5.2 Capacity of an AWGN channel.
Figure 5.3 QPSK modulation constellation.
Figure 5.4 QPSK modulator.
Figure 5.5 Raised-cosine pulse.
Figure 5.6 BPSK–QPSK spectrum efficiency comparison.
Figure 5.7 GRC QPSK modulator with hierarchical (“hier”) block.
Figure 5.8 GRC QPSK modulator.
Figure 5.9 GRC filter design tool.
Figure 5.10 Polyphase interpolator structures. The natural implementation is...
Figure 5.11 QPSK reception.
Figure 5.12 Carrier frequency offset estimation.
Figure 5.13 Phase recovery DPLL.
Figure 5.14 Linear PED S-curve.
Figure 5.15 Numerically controlled oscillator.
Figure 5.16 Loop filter.
Figure 5.17 DPLL exercise simulation results.
Figure 5.18 ML QPSK phase recovery loop.
Figure 5.19 QPSK phase detector -curve.
Figure 5.20 Timing synchronization using the eye diagram. The two selected t...
Figure 5.21 ML TED use cases.
Figure 5.22 Zero crossing TED -curve ().
Figure 5.23 Interpolator-based timing recovery DPLL.
Figure 5.24 Automatic gain control (AGC) loop.
Figure 5.25 Coarse frequency estimation and correction.
Figure 5.26 AGC, timing, and carrier phase recovery loops.
Figure 5.27 QPSK demodulation and data saving.
Figure 5.28 RDS decoding showing the robustness of differential encoding wit...
Chapter 6
Figure 6.1 Changing the frequency of the
Signal Source
block in real time.
Figure 6.2 Packet communication using message and stream blocks.
Figure 6.3 C++ block implementation of message passing demonstration.
Figure 6.4 Flowgraph illustrating the DAB+ start of frame generation.
Figure 6.5 NRF24L01+ transmitter.
Figure 6.6 Enhanced ShockBurst Packet format.
Figure 6.7 NRF24L01+ packet transmission – time sink graphs.
Figure 6.8 GNU Radio NRF24L01+ receiver.
Figure 6.9 NRF24L01+ packet reception – time sink graphs.
Figure 6.10 QPSK modem packet structure.
Figure 6.11 Packet generation using message blocks.
Figure 6.12 QPSK packet reception added blocks.
Chapter 7
Figure 7.1 Perceived human hearing.
Figure 7.2 Hearing critical bands.
Figure 7.3 Simultaneous masking.
Figure 7.4 Masking thresholds and indicators.
Figure 7.5 Generic perceptual coder.
Figure 7.6 DAB audio encoder.With permission of ETSI.
Figure 7.7 Structure of HE-AACv2.
Figure 7.8 Spectral band replication principle.
Figure 7.9 HE-AACv2 DAB frame adaptation.
Figure 7.10 HE-AACv2 block diagram.
Figure 7.11 Multipath propagation mechanisms.
Figure 7.12 Amplitude distribution over a time-selective channel.
Figure 7.13 Rayleigh channel GNU Radio blocks.
Figure 7.14 Single-carrier versus multicarrier transmission.
Figure 7.15 OFDM spectrum for subcarriers.
Figure 7.16 Cyclic prefix and channel influence.
Figure 7.17 Interleaving explained.
Figure 7.18 DAB system block diagram.
Figure 7.19 DAB Mode I transmission frame.
Figure 7.20 DAB Mode 1 transmission frame detailed.
Figure 7.21 Example of a captured DAB+ signal with GNU Radio.
Figure 7.22 ODR-mmbTools DAB+ transmission chain.
Figure 7.23 ODR mmbTools DAB Mode I reception.
Figure 7.24 gr-dab DAB+ receiver.
Figure 7.25
grdab adjust
GUI.
Figure 7.26
grdab info
results.
Figure 7.27 ODR mmbTools DAB Mode I reception.
Chapter 8
Figure 8.1 The Kongsberg Satellite Services (KSAT) headquarters in Tromsø, N...
Figure 8.2 Meteor-M 2N image acquired from Spitsbergen. Northern Scandinavia...
Figure 8.3 (a) Experimental setup. A dipole antenna, a DVB-T receiver, and a...
Figure 8.4 Pass previsions using the website Heavens Above.
Figure 8.5 Protocol layers to be addressed to convert the physical signal (b...
Figure 8.6 Illustration depicting the complexity of space communications to ...
Figure 8.7 Block diagram of the user ground segment representing OSI layers ...
Figure 8.8 Acquisition sequence aimed at minimizing the size of the file sto...
Figure 8.9 Top to bottom: spectrum of the coefficients exhibiting the spec...
Figure 8.10 Autocorrelation of 400k samples of soft bits stored as the outpu...
Figure 8.11 Convolutional coding: bits in the shift register are sampled at ...
Figure 8.12 (a) States, named from “a” to “f,” and transitions as a function...
Figure 8.13 Top: the sequence of received bits, grouped by 2 since the convo...
Figure 8.14 QPSK constellation diagram: each possible phase state encodes 2 ...
Figure 8.15 Rotations and symmetry of the constellation, and corresponding r...
Figure 8.16 Correlation for the four possible cases of QPSK constellation ro...
Figure 8.17 Decoding one MCU (left) made of 14 successive thumbnails each ...
Figure 8.18 (a) Result of decoding JPEG thumbnails and assembling into a com...
Figure 8.19 Result of decoding APID 65 while using the counter to identify m...
Figure 8.20 Result of decoding APID 65 while exploiting the counter to ident...
Figure 8.21 Result of decoding APID 65 with
medet
used as reference picture f...
Figure 8.22 Binary tree representation of the Huffman code.
Figure 8.23 (a) Original table from CCITT 1993 displaying, as difference mag...
Figure 8.24 Assignment of the position of each coefficient in the zigzag cod...
Figure 8.25 Once the sequence of Fourier coefficients is obtained, the end o...
Figure 8.26 Luminance quantization table provided in CCITT [1993, p. 143].
Figure 8.27 Organization of data along a 1020-byte long CVCDU sentence (we h...
Figure 8.28 Result of the error correction along the satellite pass. We clea...
Chapter 9
Figure 9.1 (a) Flowchart with a random sequence recorded on the top referenc...
Figure 9.2 (a) A Pluto+ connected to a Raspberry Pi4 and a B210 connected to...
Chapter 10
Figure 10.1 Demonstration of the inaccuracy of the trigonometric function ca...
Figure 10.2 Tree of the 776 dependencies of Debian GNU/Linux SID as of March...
Cover
Table of Contents
Title Page
Copyright
Dedication
About the Authors
Foreword
Acknowledgments
Acronyms
About the Companion Website
Introduction
Begin Reading
Index
End User License Agreement
iii
iv
v
xi
xii
xiii
xiv
xv
xvii
xix
xx
xxi
xxiii
xxiv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
315
316
317
318
319
320
321
Jean-Michel Friedt
University of Besançon
France
Hervé Boeglen
University of Poitiers
France
Copyright © 2025 by John Wiley & Sons, Inc. All rights reserved, including rights for text and data mining and training of artificial technologies or similar technologies.
Published by John Wiley & Sons, Inc., Hoboken, New Jersey.Published simultaneously in Canada.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 750-4470, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008, or online at http://www.wiley.com/go/permission.
Trademarks: Wiley and the Wiley logo are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates in the United States and other countries and may not be used without written permission. All other trademarks are the property of their respective owners. John Wiley & Sons, Inc. is not associated with any product or vendor mentioned in this book.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate. Further, readers should be aware that websites listed in this work may have changed or disappeared between when this work was written and when it is read. Neither the publisher nor authors shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.
For general information on our other products and services or for technical support, please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic formats. For more information about Wiley products, visit our web site at www.wiley.com.
Library of Congress Cataloging-in-Publication Data applied for:Hardback ISBN: 9781394218882
Cover Design: WileyCover Images: Courtesy of Jean-Michel Friedt, © GNU Radio logo - Wikimedia Commons/public domain
To Jean-Michel for his unfailling enthusiasm and for convincing me to join the world of freedom (Linux).
Jean-Michel Friedt was trained as a physicist at École Normale Supérieure in Lyon (France). He completed his PhD on scanning probe microscopy in 2000 before joining IMEC (Leuven, Belgium) as a postdoctoral researcher working on surface acoustic wave (SAW)-based biosensors. He joined the company SENSeOR in 2006 as a systems engineer, developing short-range RADAR systems for probing SAW resonators acting as wireless passive cooperative targets with sensing capability. Before becoming associate professor at Franche-Comté University in Besançon (France) in 2014 with his research activities hosted by the Time & Frequency department of the FEMTO-ST Institute, he became intrigued by the field at the intersection of computer science, radio frequency, and digital signal processing with access to the physical properties of the electromagnetic waves, namely software-defined radio (SDR), and its opensource implementation GNU Radio. Visiting the radio-silent research station of Ny-Ålesund (Norway, see cover) had the most profound impact on his personal and research and development activities, from satellite communication to remote sensing during field trips since 2007. He has been a regular contributor to the French GNU/Linux Magazine/France and related journals since 2005 whose publications motivated most of this research, with an emphasis to present results toward the general public and curious readers willing to reproduce experiments with affordable and readily available hardware and opensource software. Current investigations focus on the use of SDR for time and frequency distribution including GNSS (with anti-jamming and spoofing strategies), RADAR and spectrum spreading for time dissemination, remote sensing, and spaceborne communications.
Hervé Boeglen graduated from the University of Haute Alsace in Mulhouse, France with an MSc degree in electrical engineering in 1994. He worked as a full-time lecturer in electronics in the telecommunications and networks department at the IUT of Colmar, University of Haute Alsace, France, from 1995 to 2013. Between 2006 and 2008, while working, he pursued a PhD in digital communications. In 2013, he joined the University of Poitiers, France, as an associate professor in electrical engineering. He currently teaches graduate-level courses in embedded systems and digital communications using GNU Radio. He is also a member of the XLIM lab at the Futuroscope site in France. His research focuses on wireless channel modeling and digital communication systems, both radio and optical, using software-defined radio. He is also a radio transmission enthusiast and holds an amateur radio license (callsign F4JET).
Communications Engineering solves one of the central problems of mankind: making sure that what is known in one place becomes known in another. This is a book instructing the reader how to implement that, wirelessly, with naught but a computer, free software, and a radio frontend.
Sufficiently obvious is the need for education in the practicalities of this communication technology, given how transformative they have been: The geopolitical situation of the twenty-first century is hard to imagine without the TV; neither the Arab Spring nor the public perception of Russia’s invasion of Ukraine would have assumed their shape without ubiquitous mass communication. However, this is not a guide on how to make a call using a cell phone, or how to upload a video to social media.
Instead, its purpose lies in enabling the reader to work on a more fundamental, the physical layer, themselves, with nothing between them and the radio waves that need to be modified to communicate information. The power of Software-Defined Radio (SDR) lies in its ability to make the mathematical description of the physical phenomenon that is radio available for analysis and manipulation in a computer, and thus gives its users the ability to control what and how information is transported to the fullest extent.
Conversely, understanding how communication is actually done using SDR allows for a deeper insight into the nature of wireless communications. As the presence of a chapter on passive and active radar shows, the same techniques enabling us to exchange information with a communication partner allow us to retrieve information about things far away. This serves to illustrate one of the strengths of teaching concepts from communications engineering based on working, practical implementations: The theory taught on one page to establish the working of an aspect of communications serves as an explanation for the technology taught a few pages further down.
The authors elected to use GNU Radio to teach these concepts, why? GNU Radio is Free and Open Source Software (FOSS). This means three things for its usage as an educational tool:
Its openness allows for introspection: An interested user could always look inside and discover “how it’s done.”
Its wide availability across platforms, free of cost, makes it a desirable platform to work on, while not sacrificing on its professionality: The very same tools used by researchers, companies, and hobbyists worldwide are at the fingertips of the learner, giving them the opportunity to grow continuously from a beginner to an expert in designing communication systems.
The community built around GNU Radio is largely motivated by the idea that everyone should have access to both the knowledge and the tools needed to build communication systems. This leads to intense sharing of knowledge, both in the shape of software and its source code, as well as of methodology and theory.
Surprisingly to me, as former leader of the software and its development process, openness is not the strongest argument (but still important to many) for using GNU Radio to teach communications engineering.
More valuable is the community arising from the FOSS nature. GNU Radio understands itself not only as a software project, but as the unifying part of a whole ecosystem of SDR applications, libraries, research groups, and users. This has made it the most popular open source environment for SDR development, with an annual conference in the United States and in Europe, a pervasive presence in research articles, the amateur radio community, demonstrators, and common use case for the vendors of SDR frontends. This comes with a network of educators, users, developers, supporters, and learners. But GNU Radio did not start out as a large project. However, its function as tool to understand wireless communications is part of the very foundations of it, which is a short look back as its history shows:
When Eric Blossom, a computer-science-friendly electrical engineer in the United States was designing cryptographically secure telephones around 1993, he found commercial and official understanding of secrecy to be lacking. The freshly evolving digital wireless, cellular communication standards, in the shape of IS-95, had serious cryptographical flaws.
Considering the technological and financial entry hurdles of working with the waveforms on the air, Blossom talked to John Gilmore, of fame for sponsoring the Electronic Frontier Foundation’s (EFF) efforts to build a demonstrator to prove the Data Encryption Standard (DES) encryption standard to be weak, the two enter into a patronage, where Blossom gets to be paid on a Free and Open Source SDR framework – leading to the birth of the GNU Radio idea in 1998; the early code was based on MIT’s Pspectra SDR framework.
The progression from a small project to the most popular SDR framework in existence was fostered by the Moving Picture Association of America throwing in their weight when the United States moved analog TV to the digital Advanced Television Systems Committee (ATSC) – and enforcing a “copy-protection bit,” to be respected by video recorders. That not sitting well with EFF ideals of free access to technology, a reason emerged to write a complex receiver in what would become GNU Radio – something that can receive ATSC TV, get the video, and not care at all about any copyright bits.
The EFF proving the ATSC copy-protection is a publicity success, but a project of that size showed the need to overhaul the code. Clearing this milestone, Blossom convinces Gilmore to let him re-write GNU Radio from scratch to remove its limitations resulting from Pspectra legacy.
At this point, about 2003, Matt Ettus gets involved and starts building his SDR frontend – what he coined the “Universal Software Radio Peripheral” (USRP) – a device that attaches to PCs through USB, allowing anyone to work with electromagnetic spectrum with off-the-shelf, relatively affordable hardware. Ettus becomes a contributor to GNU Radio, and hard- and software co-evolve. Early versions of the driver for the hardware are part of GNU Radio; only later on, a more generally useful driver for the Ettus hardware is written. Academic interest is massively picking up – numerous PhD students work with GNU Radio, contribute code, and most importantly: They (and the students they supervise) form a lively community. At the same time, the project becomes commercially relevant enough to support consultants.
One of these PhD students is Thomas Rondeau – who later becomes the lead to replace Blossom; the consultant, to become the maintainer of GNU Radio, is Jonathan Corgan, both who shape the project into a software project that is good at accepting contributions. At the same time, community events start to emerge. Students – the author of this foreword not being an exception – get highly invested. A very active mailing list forms the glue of an international community of users and developers.
Things go smoothly, and GNU Radio 3.7 becomes the stable release found in nearly all Linux distributions; there’s binary installers for Windows, the annual GNU Radio conferences attract more than 300 people a year. Development moves from a self-hosted git server with trac as project management to github and mediawiki for documentation. However, stability is a double-edged sword; it means contributions begin to dry up in development branches that stand little chance to actually get deployed to users. As Corgan leaves the position of maintainer, GNU Radio has excellent support on all relevant desktop operating systems, but the “next” branch, which was destined to become GNU Radio 3.8, is not in a shape immediately ready for release.
This is when I’m asked to step in and switch from a very unofficial role, where I try to stay atop of what is happening on the mailing list, explain the code, the communications engineering base and the occasional bug to users, to a more official role; from 2018 to 2021, I become architect and maintainer of GNU Radio. What an honor! Getting the 3.8 release out of the door with the help of a lot of friends, we gave GNU Radio a new velocity (and, as you can imagine, we broke some poor people’s applications in the process of making sure GNU Radio still works on machines with Python 3). Releases become more regular, and the number of contributions surges strongly.
Handing my responsibility off to two people – Josh Morman as the new architect, and Jeff Long as release maintainer concerned especially with the stable releases – was excellent for the project, too. It allows the evolution of the developer code base with less worries about things breaking on the machines of users, without sacrificing on the ability to spin reliable new releases.
However, it goes without saying that a software framework having an easy 20 years of development history comes with some baggage. Not all things are as intuitive, or as fast, or as safe, or as consistent as they could be, even in GNU Radio 3.10, the current release series as of writing. The GNU Radio project continues to evolve; what I believe will stay the same is the dedication to one central principle:
Through offering a very accessible FOSS framework for SDR application, with which everybody can get access to this great shared resource, the electromagnetic spectrum, GNU Radio will continue to foster, and live off, an active community of coders, researchers, hackers, users, and operators that drive the project forward.
I hope this book motivates generations of people willing to learn to tackle something as rich in facets as communications engineering – using tools that allow and encourage them to go beyond what is available as what companies are willing to sell them as wireless devices.
June 2024
Marcus Müller
This book would not exist without … the GNU Radio development team. Over the years, numerous contributors have improved the software, sometimes with challenging decision on the software architecture (e.g. SWIG to PyBIND transition), but always to achieve utmost quality and performance. Next to the development, the opensource spirit has driven not only software development but also sharing the complex field of digital signal processing. By tackling practical applications, GNU Radio provides a fun and attractive framework for becoming familiar with such obscure concepts as an imaginary voltage or a negative frequency.
In this vein, the GNU Radio related conferences have been the opportunity for developers not only to share results as is usual in “scientific” conferences, but most importantly the means to achieve and reproduce these results. The American GNU Radio Conference with its proceedings available at https://pubs.gnuradio.org and YouTube channel at https://www.youtube.com/@GNURadioProject, the European Free Open-Source DEveloper Meeting (FOSDEM) software defined radio devroom and the European GNU Radio Days – with its YouTube channel at https://www.youtube.com/@europeangnuradiodays1445/ that both authors have helped co-organize since 2018 – have been the source of inspiration and motivation with technical discussions with speakers and attendees.
Jean-Michel Friedt and Hervé Boeglen
ACARS
a
ircraft
c
ommunication
a
ddressing and
r
eporting
s
ystem
ADC
analog-to-digital converter
AGC
automatic gain control
BPSK
binary phase shift keying
CCSDS
consultative committee for space data systems
CDMA
code division multiple access used in particular for identifying which GPS satellite is broadcasting
CGRAN
comprehensive GNU Radio archive network at
https://cgran.org
COTS
commercial off the shelf
CRC
cyclic redundance check
DAB
digital audio broadcasting
DAC
digital-to-analog converter
FDMA
frequency division multiple access
FFT
fast Fourier transform an complexity implementation of the Fourier transform
FM
frequency modulation
FSK
frequency-shift keying (FM digital modulation)
FSPL
free space propagation loss, the logarithmic expression of Friis energy conservation
GNU
GNU is not Unix
GPS
global positioning system
GRAVES
G
rand
R
éseau
A
dapté à la
VE
ille
S
patiale is the French space surveillance RADAR emitting a continuous wave at 143.05 MHz
IF
intermediate frequency
IQ
in-phase/quadrature
ISI
inter-symbol interference
ISS
International Space Station whose amateur service is broadcasting on 145.8 MHz
LEO
low Earth orbit
LO
local oscillator
LOS
line of sight
MEO
medium Earth orbit
NCO
numerically controlled oscillator
OFDM
orthogonal frequency division multiplexing
PDU
Protocol Data Unit
PMT
polymorphic types
POCSAG
P
ost
O
ffice
C
ode
S
tandardisation
A
dvisory
G
roup pager protocol for emergency services
QPSK
quad phase shift keying
RADAR
radio detection and ranging
RDS
radio data system
RRC
root raised cosine
RF
radio frequency
RTL-SDR
a set of low-cost SDR receivers based on a RF front end and the Realtek RTL2832U analog-to-digital converter to USB
SDR
software-defined radio
SNR
signal-to-noise ratio
TED
timing error detector
WBFM
wideband frequency modulation the modulation scheme used by commercial FM broadcasters
This book is accompanied by a companion website:
www.wiley.com/go/friedtcommunication
The website https://gitlab.xlim.fr/gnuradio_book/flowcharts mirrored at https://gitlab.com/gnuradio_book/flowcharts includes:
the flowcharts, included in the book as static figures, to be executed with GNU Radio 3.10 for assessing the output of the signal processing chains and tuning the parameters to observe the impact on the output signals. All figures are included in the folder with the name of the associated chapter for easy matching. Specific information needed to perform some of the experiments is also provided.
What is GNU Radio? GNU Radio is a toolkit providing the means to address discrete-time digital signal processing chains oriented toward radio frequency (RF) communication, but not limited to it. GNU Radio is not a readily functional decoding software for a given communication protocol: understanding the principles of signal representation, frequency transposition, synchronization, and digital information extraction will be needed before implementing functional communication systems. Thanks to its flexibility, GNU Radio is not restricted to digital communication over radio frequency channels but can be used for instrumentation, RADAR and radio frequency channel characterization, time and frequency transfer, beamforming and null steering for e.g. jamming and spoofing suppression, or any application benefiting from accessing the raw radio frequency wave characteristics.
To make the learning curve less steep, a graphical interface for assembling signal processing blocks is provided: GNU Radio Companion. It should be emphasized, though, that the graphical interface is for development ease only and is not needed for executing the resulting flowgraph; hence, GNU Radio is perfectly suited for running on embedded systems not fitted with graphical interfaces. Indeed, GNU Radio is included in the embedded Linux-built frameworks, Buildroot and OpenEmbedded, allowing to use the Python-generated processing scripts on headless embedded systems running the operating system and the associated C++ libraries.
The reader is encouraged to test all processing sequences and assembling processing chains step by step: even though some of the examples are a lengthy sequence of processing steps, assessing the impact of each block by displaying the frequency domain or time domain characteristics after each processing step is mandatory. In order to help the reader test various processing sequences, records of relevant signals are made available on https://iqengine.org in the GNU Radio repository.
A word of caution before starting to experiment with software-defined radio (SDR) and storing huge files: make sure to remember the experimental setup leading to these records, and most significantly the carrier frequency, the sampling rate, and data format. Many times have these authors run days of records to forget after a few days how data had been collected and hence how to read them for post-processing. To avoid such hassle, the SigMF (signal metadata format) standard has been proposed, specified at https://github.com/sigmf/SigMF. This format associates with each data file (sigmf-data), a format description (sigmf-meta) which provides the receiver characteristics including carrier frequency, bandwidth (sampling rate), or data format (floating point or integer, and integer size of each sample). All records at https://iqengine.org comply with the SigMF format, hence providing the necessary information for processing the collected data.
The GNU Radio Companion processing sequences described throughout the book are available at https://gitlab.xlim.fr/gnuradio_book and also mirrored at https://gitlab.com/gnuradio_book, and each chapter starts by referring to the relevant IQEngine record. For optimal layout of the proposed flowcharts, it will be assumed that GNU Radio Companion is configured (View menu) with the Show parameter value in block. All flowcharts have been tested with the 3.10 version of GNU Radio and GNU Radio Companion.
This discussion on using GNU Radio aims at a balance between processing synthetic signals and live signals collected from hardware. Indeed, the philosophy of SDR is to minimize the specificity of hardware and move most processing steps to software.
The book is organized as follows. The first chapter introduces GNU Radio and GNU Radio Companion as tools for becoming familiar, through simulations, with basic concepts needed when processing radio frequency signals, including the manipulation of complex numbers and baseband versus radio frequency bands. The second chapter extends the processing to real signals collected from hardware, with records available to readers for reproducing the processing steps if such signals are not available at their location or if the relevant hardware is not available. The third chapter tackles the communication between GNU Radio and external tools, either through network sockets or filesystems, introducing concepts needed in the following chapters. The fourth chapter benefits from all these knowledge to demonstrate how to assemble various SDR RADAR architectures, whether passive or active, and how accessing the raw radio frequency samples allows for target range and velocity detection as well as azimuth when combined with a moving antenna for spatial diversity of the sources in the synthetic aperture RADAR implementation. The fifth chapter returns to some basic concepts of GNU Radio for synchronizing processing tasks and propagating tags marking some features detected in the processed signal. The newly acquired knowledge is used in the sixth chapter to develop a complete digital communication system. The seventh chapter extends the custom digital communication system to decoding all layers of a satellite communication system using the same underlying modulation scheme: being a low-earth orbiting (LEO) satellite flying every day over every area in the world, the signal is accessible to all readers irrelevant of their geographical setting. While spaceborne communication benefits from ideal propagation conditions in free space, ground-based communication is plagued with multipath interferences and fading, an issue tackled in the eighth chapter using orthogonal frequency division multiplexing (OFDM) as implemented in the digital audio broadcast standard. Finally, the ninth chapter develops how the open-source GNU Radio framework can be complemented with custom processing blocks written in Python or C++, with an emphasis on custom source blocks for adding new hardware to the processing chain or new sinks for implementing processing or decoding protocols not yet supported by the standard GNU Radio processing blocks.
This first chapter aims at achieving three outcomes; introducing the general concepts of software-defined radio (SDR) and how to reduce to a minimum the hardware dependence of the processing to move all digital signal processing steps after the analog-to-digital conversion; justifying the handling of complex numbers with a real and imaginary by GNU Radio; and becoming familiar with the GNU Radio Companion graphical user interface (GUI). These goals will be reached by using GNU Radio to process synthetic signals so that no hardware is needed to complete this first chapter. All GNU Radio Companion flowgraphs presented in this and the subsequent chapters are available from the GitHub repository at , also mirrored at . When opening these flowcharts, it is assumed that ViewShow parameter expressions in block and Show parameter value in block as well as Show Block comments are active for best layout experience.
The term “software radio” was coined by J. Mitola in the early 1990s [Mitola, 1993]. The main idea of this technology is to reduce the analog electronics of a radio receiver to the part near the antenna, namely the radio frequency (RF) front end (RF amplifier + filters), and use a high-speed analog-to-digital converter (ADC) to get the baseband signal in the digital domain. All the usual operations (demodulation, filtering, etc.) are then performed digitally with the help of a digital signal processor (DSP). This would represent the ultimate SDR solution which is achievable today, though still quite expensive, for example, AMD-Xilinx Zynq Ultrascale+ RFSoC field programmable gate arrays (FPGAs) [AMD-Xilinx, 2024]. In this case, 5.9 GSps ADCs and 10 GSps digital to analog converters (DACs) are available, allowing to directly sample signals with a carrier frequency up to about 3 GHz. It is widely acknowledged that in telecommunications, a carrier frequency is employed to transmit information from one point to another. The carrier itself does not convey information; thus, it is removed at the receiving end. This is achieved by multiplying the signal received from the antenna by a local replica of the carrier. Consequently, this process results in a baseband spectrum containing the transmitted information, centered around 0 Hz. In the not-so-distant past, these operations were carried out using analog electronic components. In the case of the ultimate SDR system, the concept is to execute all demodulation and decoding functions in the digital domain. To gain a comprehensive understanding of the SDR hardware to be utilized in Chapter 2 (i.e. Adalm-Pluto and RTL-SDR), it is essential to grasp the fundamental concepts that have driven modern SDR architectures, particularly those constructed around the zero intermediate frequency structure (zero-IF or ZIF). Let us concentrate on the receiving side. It is widely recognized that the heterodyne structure is the most commonly used in analog receivers. Therefore, to achieve efficient reception of various channels, the demodulation stage operates at a fixed intermediate frequency (IF), typically 10.7 MHz for the frequency modulation (FM) broadcast band. All the electronic parts of this section are optimized for this fixed IF frequency (amplifiers, filters, etc.). The frequency translation of the signal coming from the antenna (e.g. 88–108 MHz for FM broadcast) is performed by a mixer and a tunable local oscillator structure. In the case of SDR, having an IF is not desirable as our aim is to process only the baseband signal. Therefore, the direct-conversion or ZIF architecture is what we seek. Although this structure has been known for quite some time, it was not until the 1990s, with advancements in integrated electronics, that it became a viable option. Let us now illustrate this evolution with two different SDR hardware platforms that we will be utilizing in Chapter 2. The first one, whose structure is illustrated in Figure 1.1, is the RTL-SDR receiver, initially designed for digital TV reception. It adopts a so-called zero second IF structure and uses an analog front end, which down-converts the RF signal to a user-defined IF frequency. This IF signal is then sampled by an 8-bit ADC at 28.8 MHz. Interestingly, the ADC is followed by a two-channel structure called an IQ (in-phase and quadrature) demodulator. The IQ structure is a fundamental constant found in any SDR system, and we will come back to it shortly.
The second hardware example is the Adalm-Pluto from Analog Devices Inc. (ADI) [Analog Devices, 2024] (Figure 1.2). It integrates a radio chip, which is a complete transceiver (AD9363, see Figure 1.3), working on carrier frequencies between 325 MHz and 3.8 GHz and an instantaneous bandwidth of 56 MHz. This is a complete ZIF transceiver and one of the first efficient implementations of this apparently simple structure. For completeness, it is important to specify to the reader that the ZIF structure is not without its issues, which partly explains why its introduction is relatively recent. These issues include local oscillator (LO) leakage, DC offsets, and IQ mismatch, which may require compensation during a relatively complex calibration stage. Interested readers can refer to Razavi’s book [Razavi, 2012], which delves into this subject in great detail.
The fundamentals of signal processing teach us that the Fourier transform of a real-valued signal is complex symmetric. This implies that in the frequency domain, negative frequency components emerge redundantly alongside the positive frequencies. However, negative frequencies do not exist in the physical domain; this phenomenon can be considered as an annoying mathematical artifact that often disrupts most students! It is, however, possible to build a time signal known as an analytic signal, whose Fourier transform exclusively reveals positive frequencies. This analytic signal, being complex valued, encompasses the original real-valued signal. The concept of the analytic signal originates from the contributions of Gabor [1946], Ville [1948, 1958], as stated by Viswanathan [2017]. Interested readers can explore classical signal processing literature for a more comprehensive understanding. The application of the analytic signal holds particular significance in numerous signal processing contexts, especially within the software-defined radio (SDR) domain. The theory concerning the analytic signal is intricately connected to the concept of the complex envelope, a well-established notion within the telecommunication community. For further insight into constructing the complex envelope of a bandpass signal from its analytical representation, readers are encouraged to consult [Guimaraes, 2020]. Let us now consider a modulated bandpass signal having a center frequency of . It can be shown [Guimaraes, 2020] that
Figure 1.1 Block diagram depicting the RTL-SDR receiver, comprising two essential chips: the R820T2 and the RTL2832U.
Figure 1.2 ADI AD9363 IC receiver section. This radio chip is integrated into the Adalm-Pluto device.
Figure 1.3 The ultimate software-defined radio.
where is the baseband signal defined as the “complex envelope” of . Considering that the baseband signal is of complex form (this is the case for digital modulation schemes), it can be written as
where and are usually referred to as the in-phase (or direct) component and the “quadrature” component of , respectively. Using Euler’s formula and substituting 1.2 into 1.1 yields the important relation which allows to build the well-known IQ modulator structure:
The complex envelope of 1.1 can also be written in polar form as
So that can be written in the general form:
with being the envelope of the passband signal . The general form can be used to represent usual modulated signals. As an example, if is constant and defines discrete phases, then yields an -ary phase-shift keying (MPSK) signal.
Understanding the complex envelope representation, which leads to the IQ modulator/demodulator structures, is crucial for comprehending the principles underlying the design of SDRs. This importance stems from the fact that the complex envelope, denoted as , serves as an alternative baseband version of the passband signal , thereby necessitating lower sampling rates. Consequently, this reduction in sampling rate also decreases the computational workload. In the SDR context, the and baseband signals enable efficient processing in the digital domain, utilizing DSPs, FPGAs, or computers. As an illustration, a specific modulated signal can be digitally generated and subsequently converted into the analog domain by utilizing its complex envelope represented as and . These signals are then fed into an IQ modulator, which is the electronic structure responsible for generating from and , via equation 1.3. Figure 1.4a depicts the structure of the IQ modulator used in SDR. The analogy also extends to the passband received signal. The in-phase and quadrature baseband signals obtained from the received signal, which are then processed in the digital domain, are acquired by passing through an IQ demodulator followed by appropriate low-pass filters (LPFs). Figure 1.4b illustrates this typical IQ demodulator structure. The reader can also refer to Figures 1.1 and 1.2 representing two common SDR hardware where these structures are readily identifiable.
Figure 1.4 Simplified block diagram of an IQ modulator (a) and IQ demodulator (b).
In addition to the complex envelope approach, the IQ structure can also be derived intuitively by considering a baseband signal that has been digitized by an ADC. Interestingly, this approach can be linked to the “self-corruption” phenomenon encountered during the down-conversion process to a zero-IF of an “asymmetrically modulated” signal, as explained in section 4.2.2 of [Razavi, 2012]. Unlike AM signals, which produce a symmetric spectrum around the carrier frequency, FM and most digital modulation schemes (e.g. Frequency-Shift Keying [FSK], MPSK) do not, and are therefore subject to self-corruption in the mixing process to baseband. The only way to circumvent this issue is to utilize the IQ structure, which is derived intuitively in what follows.
We remind that the radio frequency carrier is never involved in SDR digital processing since it has been removed during the preliminary analog step, justifying the spectra displayed later by GNU Radio Companion as centered on 0 Hz rather than on the radio frequency carrier.
With a single mixer used to transpose the time dependent radio frequency signal at angular frequency with as the radio frequency carrier frequency and the phase and amplitude , to baseband , then the output of the mixer tuned to a nearby frequency would be expressed as , and a low-pass filter rejects the frequency sum so that only the frequency difference at baseband is sampled. If the radio frequency receiver is properly tuned, then , and we are only left with . This phase component includes two wave propagation terms: the time-dependent part and the space-dependent part, classically expressed as with as the wavevector with magnitude , where is the electromagnetic wavelength, and the movement of the receiver with respect to the emitter. Rather than expressing with m/s and a frequency in hertz, it is most convenient to normalize both numerator and denominator of the wavelength expression by to remember that
when is expressed in MHz and in meters. Thus, a 100 MHz signal is associated with a 3 m wavelength, which induces a phase cancellation every 1.5 m: were a single mixer used, the broadcast commercial frequency-modulated signal commonly used in most of the world would cancel as the receiver is moving every 1.5 m, a very inconvenient listening experience.
Hence, a second signal must be generated that is maximized when vanishes, and most intuitively the trigonometric complement will solve the problem, generated by mixing the incoming signal with a second copy of the local oscillator tuned to but this time shifted by 90 since and with again the frequency sum component filtered out by a low-pass filter. Hence we have created two outputs from the analog processing of the real signal received by the antenna, and when . Both these signals will be sampled by two synchronous ADCs, and the resulting signals will be called and for in-phase and quadrature. These two signals are handled with the complex number algebra by considering as the real part and as the imaginary part so that provides the expected properties of extracting the amplitude as and with being the arc-tangent function considering the sign of and , where .
The two conclusions from these developments are as follows:
SDR will naturally handle complex numbers characterized by a real part and an imaginary part , and the default configuration of most GNU Radio processing blocks is to handle such quantities.
There is no such thing as an imaginary voltage or a negative frequency: these concepts will be addressed experimentally in
Section 1.3
to illustrate the teaching skills of the GUI of GNU Radio Companion. Moreover, the concept of complex envelope we presented in
Section 1.2
should also have helped to clarify these elements.
As we are convinced that complex numbers naturally represent at baseband the radio frequency signal after transposition, let us remind some of the basic properties of complex number algebra.
A complex number is also expressed in its Euler notation with as the amplitude and the phase, which then becomes . This expression is most convenient when considering mixers or, in their digital representation, multiplications since .
From these considerations, the real trigonometric functions are expressed as and , emphasizing how the magnitude of the spectrum of a real signal is even, being represented by two spectral components at and . On the other hand, a non-even spectrum is necessarily represented by complex quantities.
Finally, since the amplitude and the phase – the frequency being the time derivative of the phase as – are the core characteristics of a signal, a representation in the plane where the real part is along the horizontal axis, and the imaginary part along the vertical axis allows for an intuitive representation of the amplitude as the distance to the origin and the phase as the angle to the abscissa. Such a diagram is called a phasor diagram or, in SDR, a “constellation diagram” and will be used whenever digital modulation is considered.
Having reminded the reader of the basic mathematical relations needed to get started, these rather theoretical concepts are used to become familiar with the GNU Radio Companion GUI. Indeed, the core of GNU Radio is a scheduler transferring data from one processing block to another, each block having access to the IQ stream. Most GNU Radio processing functions are written in C++ for efficiency, although GNU Radio can accept processing blocks written in Python. Connecting processing blocks with each other to define the dataflow is achieved by programming either in C++ or in Python. To get started, though, a GUI allows for selecting processing blocks from a list of available functions and connect blocks to route signals: GNU Radio Companion is a Python or C++ code generator so that all arguments in the fields for configuring the blocks should be syntactically correct Python commands. The generation of a Python script not necessarily relying on a GUI to be executed will be most welcome when addressing embedded systems, as will be shown in some of the coming Chapters 4 and 9. Once the reader has become familiar with GNU Radio block connection, programming in Python or C++ becomes straightforward, although GNU Radio Companion always remains an enjoyable prototyping tool. Remember, though, that the IQ samples are only available to each processing block