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, Kasami, Zadoff-Chu, m-sequences, 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.
  • Detection: Theoretical probability of detection, probability of false alarm, and thresholds. Detection approximations. Coherent gain, coherent gain loss (CGL), 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).
  • 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: Channel capacity, free-space path loss, antenna gain.
  • Miscellaneous: Packing and unpacking binary data, hexdump of binary data.
  • Plotting: Time-domain, raster, 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/pulse-shapes/. The Jupyter notebooks behind the examples are available for experimentation in docs/examples/.

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.17.tar.gz (6.0 MB view hashes)

Uploaded Source

Built Distribution

sdr-0.0.17-py3-none-any.whl (141.2 kB view hashes)

Uploaded Python 3

Supported by

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