https://pysdr.org/content/intro.html
Announcement from Marc
PySDR now has a Patreon! Support the project and have your name added
to the textbook on the bottom left of every page, plus get priority
when emailing questions!
x
| EnglishEnglish DutchDutch FrenchFrench UkrainianUkrainian
ChineseChinese SpanishSpanish JapaneseJapanese
Logo
PySDR: A Guide to SDR and DSP using Python
By Dr. Marc Lichtman - [email protected]
* 1. Introduction
+ Purpose and Target Audience
+ Contributing
+ Acknowledgements
* 2. Frequency Domain
* 3. IQ Sampling
* 4. Digital Modulation
* 5. PlutoSDR in Python
* 6. USRP in Python
* 7. BladeRF in Python
* 8. RTL-SDR in Python
* 9. HackRF One in Python
* 10. Noise and dB
* 11. Filters
* 12. Link Budgets
* 13. Channel Coding
* 14. IQ Files and SigMF
* 15. Multipath Fading
* 16. Pulse Shaping
* 17. Synchronization
* 18. End-to-End Example
* 19. Beamforming & DOA
* 20. 2D Beamforming
* 21. Hands-on with Phaser
* 22. Cyclostationary Processing
* 23. Real-Time GUIs with PyQt
* 24. About the Author
---------------------------------------------------------------------
[ ]
* GitHub Link
* Online Python Console
A big thanks to all PySDR
Patreon supporters:
[?] Karel
[?] Frank Zosso, HB9FXQ
[?] Don Bailey
[?] VJ
[?] Laios Cornelius
[?] Frank O'Donnell
[?] Jon Kraft
[?] Nick H
[?] Andrey Limonchenko
[?] David Lindsey
[?] Miguel A. Hijar
[?] Tony Santos
[?] Dmytro Tokar
[?] Corey Yin
[?] Al Grant #
[?] Manuel Rosel
[?] Benjaminas Visockis
[?] Sage Trudeau
[?] Michelle Salehi
[?] Zafar Iqbal
[?] Jan Hamal Dvorak
[?] Morriel Kasher
[?] Andrew Anderson
[?] Joe S.
[?] Amirreza
[?] MH
[?] Ian Finley
[?] Ivan
[?] Aman
[?] Harris Tidwell
[?] Joao Morais
[?] Thomas Kulpmann
[?] Serhii Pedko
[?] RECESSIM #
[?] Grigory Shipunov
[?] Rafael Sepulveda
[?] Don
[?] Geoffrey Feldman
[?] Abidur Rahman
and organization-level supporters:
# Analog Devices, Inc.
* [?]Suggest an Edit[?] -
* 2. Frequency Domain -
1. IntroductionP
Purpose and Target AudienceP
First and foremost, a couple important terms:
Software-Defined Radio (SDR):
As a concept it refers to using software to perform signal
processing tasks that were traditionally performed by hardware,
specific to radio/RF applications. This software can be run on a
general-purpose computer (CPU), FPGA, or even GPU, and it can be
used for real-time applications or offline processing of recorded
signals. Analogous terms include "software radio" and "RF digital
signal processing".
As a thing (e.g., "an SDR") it typically refers to a device that
you can plug an antenna into and receive RF signals, with the
digitized RF samples being sent to a computer for processing or
recording (e.g., over USB, Ethernet, PCI). Many SDRs also have
transmit capabilities, allowing the computer to send samples to
the SDR which then transmits the signal at a specified RF
frequency. Some embedded-style SDRs include an onboard computer.
Digital Signal Processing (DSP):
The digital processing of signals; in our case, RF signals.
This textbook acts as a hands-on introduction to the areas of DSP,
SDR, and wireless communications. It is designed for someone who is:
1. Interested in using SDRs to do cool stuff
2. Good with Python
3. Relatively new to DSP, wireless communications, and SDR
4. A visual learner, preferring animations over equations
5. Better at understanding equations after learning the concepts
6. Looking for concise explanations, not a 1,000 page textbook
An example is a Computer Science student interested in a job
involving wireless communications after graduation, although it can
be used by anyone itching to learn about SDR who has programming
experience. As such, it covers the necessary theory to understand DSP
techniques without the intense math that is usually included in DSP
courses. Instead of burying ourselves in equations, an abundance of
images and animations are used to help convey the concepts, such as
the Fourier series complex plane animation below. I believe that
equations are best understood after learning the concepts through
visuals and practical exercises. The heavy use of animations is why
PySDR will never have a hard copy version being sold on Amazon.
The PySDR logo created using a Fourier transform
This textbook is meant to introduce concepts quickly and smoothly,
enabling the reader to perform DSP and use SDRs intelligently. It's
not meant to be a reference textbook for all DSP/SDR topics; there
are plenty of great textbooks already out there, such as Analog
Device's SDR textbook and dspguide.com. You can always use Google to
recall trig identities or the Shannon limit. Think of this textbook
like a gateway into the world of DSP and SDR: it's lighter and less
of a time and monetary commitment, when compared to more traditional
courses and textbooks.
To cover foundational DSP theory, an entire semester of "Signals and
Systems", a typical course within electrical engineering, is
condensed into a few chapters. Once the DSP fundamentals are covered,
we launch into SDRs, although DSP and wireless communications
concepts continue to come up throughout the textbook.
Code examples are provided in Python. They utilize NumPy, which is
Python's standard library for arrays and high-level math. The
examples also rely upon Matplotlib, which is a Python plotting
library that provides an easy way to visualize signals, arrays, and
complex numbers. Note that while Python is "slower" than C++ in
general, most math functions within Python/NumPy are implemented in C
/C++ and heavily optimized. Likewise, the SDR API we use is simply a
set of Python bindings for C/C++ functions/classes. Those who have
little Python experience yet a solid foundation in MATLAB, Ruby, or
Perl will likely be fine after familiarizing themselves with Python's
syntax.
ContributingP
If you got value from PySDR, please share it with colleagues,
students, and other lifelong learners who may be interested in the
material. You can also donate through the PySDR Patreon as a way to
say thanks and get your name on the left of every page below the
chapter list.
If you get through any amount of this textbook and email me at marc@
pysdr.org with questions/comments/suggestions, then congratulations,
you will have contributed to this textbook! You can also edit the
source material directly on the textbook's GitHub page (your change
will start a new pull request). Feel free to submit an issue or even
a Pull Request (PR) with fixes or improvements. Those who submit
valuable feedback/fixes will be permanently added to the
acknowledgments section below. Not good at Git but have changes to
suggest? Feel free to email me at marc@pysdr.org.
AcknowledgementsP
Thank you to anyone who has read any portion of this textbook and
provided feedback, and especially to:
* Barry Duggan
* Matthew Hannon
* James Hayek
* Deidre Stuffer
* Tarik Benaddi for translating PySDR to French
* Daniel Versluis for translating PySDR to Dutch
* mrbloom for translating PySDR to Ukrainian
* Yimin Zhao for translating PySDR to Simplified Chinese
* Eduardo Chancay for translating PySDR to Spanish
* John Marcovici
As well as all PySDR Patreon supporters!
* [?]Suggest an Edit[?] -
* 2. Frequency Domain -
(c)2025, Marc Lichtman.
PySDR is licensed under CC BY-NC-SA 4.0 Creative Commons License