Skip to main content

A Python package for software-defined radio

Project description

sdr

The sdr library is a Python 3 package for software-defined radio (SDR).

The goal of sdr is to provide tools to design, analyze, build, and test digital communication systems in Python. The library relies on and is designed to be interoperable with NumPy, SciPy, and Matplotlib. Performance is also very important. So, where possible, Numba is used to accelerate computationally intensive functions.

Additionally, the library aims to replicate relevant functionality from MATLAB's Communications and DSP Toolboxes.

We are progressively adding functionality to the library. If there is something you'd like to see included in sdr, please open an issue on GitHub.

Enjoying the library? Give us a :star: on GitHub!

Documentation

The documentation for sdr is located at https://mhostetter.github.io/sdr/latest/.

Installation

The latest version of sdr can be installed from PyPI using pip.

python3 -m pip install sdr

Features

View all available classes and functions in the API Reference.

  • Digital signal processing: Finite impulse response (FIR) filters, FIR filter design, infinite impulse response (IIR) filters, polyphase interpolators, polyphase decimators, polyphase resamplers, polyphase channelizers, Farrow arbitrary resamplers, fractional delay FIR filters, FIR moving averagers, FIR differentiators, IIR integrators, IIR leaky integrators, complex mixing, real/complex conversion.
  • Sequences: Binary, Gray, Barker, Hadamard, Walsh, Gold, Kasami, Zadoff-Chu, $m$-sequences, preferred pairs, Fibonacci LFSRs, Galois LFSRs, LFSR synthesis.
  • Coding: Block interleavers, additive scramblers.
  • Modulation: Phase-shift keying (PSK), $\pi/M$ PSK, offset QPSK, continuous-phase modulation (CPM), minimum-shift keying (MSK), rectangular pulse shapes, half-sine pulse shapes, Gaussian pulse shapes, raised cosine pulse shapes, root raised cosine pulse shapes, differential encoding.
  • Estimation: TOA, TDOA, FOA, FDOA Cramér-Rao lower bounds.
  • Detection: Detector probability density functions (PDFs). Theoretical probability of detection, probability of false alarm, and thresholds. Detection performance approximations. Coherent gain, coherent gain loss (CGL), and non-coherent gain. Maximum-allowable integration time and frequency offset.
  • Synchronization: Numerically controlled oscillators (NCO), loop filters, closed-loop phase-locked loop (PLL) analysis, phase error detectors (PEDs), automatic gain control (AGC).
  • Measurement: Energy, power, voltage, Euclidean distance, Hamming distance, bit/symbol error rate, error vector magnitude (EVM), RMS integration time, and RMS bandwidth.
  • Conversions: Between linear units and decibels. Between $E_b/N_0$, $E_s/N_0$, and $S/N$.
  • Simulation: Binary symmetric channels (BSC), binary erasure channels (BEC), discrete memoryless channels (DMC). Apply additive white Gaussian noise (AWGN), frequency offset, sample rate offset, IQ imbalance.
  • Link budgets: BSC, BEC, AWGN, and BI-AWGN channel capacity, Shannon's limit on $E_b/N_0$ and $S/N$, free-space path loss, antenna gain.
  • Miscellaneous: Numerical calculation of PDF of sum and product of random variables. Packing and unpacking binary data, hexdump of binary data.
  • Plotting: Time-domain, raster, correlation, stem, discrete Fourier transform (DFT), discrete-time Fourier transform (DTFT), periodogram, spectrogram, constellation, symbol map, eye diagram, phase tree, bit error rate (BER), symbol error rate (SER), probability of detection, receiver operating characteristic (ROC), detection PDFs, impulse response, step response, zeros/poles, magnitude response, phase response, phase delay, and group delay.

Examples

There are detailed examples published at https://mhostetter.github.io/sdr/latest/examples/fir-filters/. The Jupyter notebooks behind the examples are available for experimentation in docs/examples/.

Citation

If this library was useful to you in your research, please cite us. Following the GitHub citation standards, here is the recommended citation.

BibTeX

@software{Hostetter_SDR_2023,
    title = {{sdr: A software-defined radio package for Python}},
    author = {Hostetter, Matt},
    month = {7},
    year = {2023},
    url = {https://github.com/mhostetter/sdr},
}

APA

Hostetter, M. (2023). sdr: A software-defined radio package for Python [Computer software]. https://github.com/mhostetter/sdr

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdr-0.0.29.tar.gz (6.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sdr-0.0.29-py3-none-any.whl (178.4 kB view details)

Uploaded Python 3

File details

Details for the file sdr-0.0.29.tar.gz.

File metadata

  • Download URL: sdr-0.0.29.tar.gz
  • Upload date:
  • Size: 6.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for sdr-0.0.29.tar.gz
Algorithm Hash digest
SHA256 c8dec765ec6c53002d5d76ed4745be317246cb637be92b49570570d1d3ede433
MD5 bc7b34d894a160066d65648c960ec8c4
BLAKE2b-256 131a248fc015072c7dd1f0bf63d9647d5ba8f6ef449db3f725915a04ecaabe66

See more details on using hashes here.

File details

Details for the file sdr-0.0.29-py3-none-any.whl.

File metadata

  • Download URL: sdr-0.0.29-py3-none-any.whl
  • Upload date:
  • Size: 178.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.22

File hashes

Hashes for sdr-0.0.29-py3-none-any.whl
Algorithm Hash digest
SHA256 61b58a3318d307e23adf9d934405bef7c057e276c5a5bb2371a0f6db2bfa5289
MD5 ab4128f098855997aed66bd7c9586d81
BLAKE2b-256 79ace682634005a07c071c544145266639448d68ae273d30ab4b63527fc917ef

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page