Skip to content

mfkiwl/sdrPython

 
 

Repository files navigation

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 ⭐ 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) filter, FIR filter design, infinite impulse response (IIR) filter, polyphase interpolator, polyphase decimator, polyphase resampler, polyphase channelizer, Farrow arbitrary resampler, fractional delay FIR filter, FIR moving average, FIR differentiator, IIR integrator, IIR leaky integrator, complex mixing, real/complex conversion.
  • Sequences: Barker, Hadamard, Walsh, Zadoff-Chu.
  • Modulation: Phase-shift keying (PSK), $\pi/M$ PSK, offset QPSK, rectangular pulse shape, half-sine pulse shape, raised cosine pulse shape, root raised cosine pulse shape, Gaussian pulse shape, binary and Gray symbol mapping, differential encoding.
  • Synchronization: Numerically-controlled oscillator (NCO), loop filter, closed-loop phase-locked loop (PLL) analysis, automatic gain control (AGC), phase error detector (PEDs).
  • 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 channel (BSC), binary erasure channel (BEC), discrete memoryless channel (DMC), additive white Gaussian noise (AWGN), frequency offset, sample rate offset, IQ imbalance.
  • Link budgets: Channel capacity, free-space path loss, antenna gain.
  • Data manipulation: Packing and unpacking binary data, hexdump of binary data.
  • Plotting: Time-domain, raster, periodogram, spectrogram, constellation, symbol map, eye diagram, bit error rate (BER), symbol error rate (SER), impulse response, step response, magnitude response, phase response, phase delay, group delay, and zeros/poles.

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/.

About

A Python package for software-defined radio

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%