PySDR: A Guide to SDR and DSP using Python
by Dr. Marc Lichtman - pysdr@vt.edu
Welcome to PySDR, a free online textbook (not a Python library!) that provides a gentle introduction to wireless communications and software-defined radio (SDR) using an abundance of diagrams, animations, and Python code examples. From FFTs to filters to digital modulation to receiving and transmitting from SDRs in Python, PySDR has you covered!
The goal of PySDR is to increase accessibility to topics traditionally covered in a math-intensive manner and within a relatively small set of universities. All content used to generate PySDR is open source, and can be found here.
See Chapter 1: Introduction for the textbook's purpose and target audience.
To get a quick taste of RF signal processing, try playing with the simulation below which shows the frequency and time domain of a signal consisting of a tone and white Gaussian noise.
Expand for full table of contents
- 1. Introduction
- 2. Frequency Domain
- 3. IQ Sampling
- Sampling Basics
- Nyquist Sampling
- Quadrature Sampling
- Complex Numbers
- Complex Numbers in FFTs
- Receiver Side
- Carrier and Downconversion
- Receiver Architectures
- Baseband and Bandpass Signals
- DC Spike and Offset Tuning
- Sampling Using our SDR
- Calculating Average Power
- Calculating Power Spectral Density
- Further Reading
- 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
- Introduction to FM Radio and RDS
- The RDS Signal
- Acquiring a Signal
- FM Demodulation
- Frequency Shift
- Filter to Isolate RDS
- Decimate by 10
- Resample to 19 kHz
- Time Synchronization (Symbol-Level)
- Fine Frequency Synchronization
- Demodulate the BPSK
- Differential Decoding
- RDS Decoding
- RDS Parsing
- Wrap-Up and Final Code
- Acknowledgments
- Further Reading
- 19. Beamforming & DOA
- Beamforming Overview
- Direction-of-Arrival Overview
- Types of Arrays
- SDR Requirements
- Intro to Matrix Math in Python/NumPy
- Steering Vector
- Receiving a Signal
- Conventional Beamforming & DOA
- 180-Degree Ambiguity
- Beam Pattern
- Array Beamwidth
- When d is not λ/2
- Number of Elements
- Spatial Tapering
- Manually Changing Weights
- Adaptive Beamforming
- MVDR/Capon Beamformer
- Covariance Matrix
- LCMV Beamformer
- Null Steering
- MUSIC
- ESPRIT
- Circular Arrays
- Training Data
- Conclusion and References
- 20. Phased Arrays with Phaser
- 21. Cyclostationary Processing
- Introduction
- Review of Autocorrelation
- The Cyclic Autocorrelation Function (CAF)
- The Spectral Correlation Function (SCF)
- Frequency Smoothing Method (FSM)
- Time Smoothing Method (TSM)
- Pulse-Shaped BPSK
- SNR and Number of Symbols
- QPSK and Higher-Order Modulation
- Multiple Overlapping Signals
- Alternative CSP Features
- Spectral Coherence Function (COH)
- Conjugates
- FFT Accumulation Method (FAM)
- OFDM
- Signal Detection With Known Cyclic Frequency
- Cyclic Filtering with FRESH Filters
- 22. Real-Time GUIs with PyQt
- Introduction
- Qt Overview
- Basic Application Layout
- Application with Worker Thread
- Signals and Slots
- PyQtGraph
- Layouts
QPushButton
QSlider
QComboBox
- Lambda Functions
- PyQtGraph’s PlotWidget
- PyQtGraph’s ImageItem
- Worker Thread
- PyQt Signals
- Worker Thread Slots
- Worker Thread Run()
- Final Example Full Code
- 23. About the Author