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

  • Digital signal processing:
    • Filtering: sdr.FIR, sdr.FIRInterpolator, sdr.IIR
    • Resampling: sdr.FarrowResampler
    • Signal manipulation: sdr.mix(), sdr.to_complex_bb(), sdr.to_real_pb()
  • Sequences: sdr.barker(), sdr.zadoff_chu()
  • Modulation:
    • Classes: sdr.PSK
    • Pulse shapes: sdr.raised_cosine(), sdr.root_raised_cosine(), sdr.gaussian()
    • Symbol mapping: sdr.binary_code(), sdr.gray_code()
    • Symbol encoding: sdr.diff_encode(), sdr.diff_decode()
  • Synchronization: sdr.NCO, sdr.DDS, sdr.LoopFilter, sdr.ClosedLoopPLL
  • Measurement:
    • Energy: sdr.energy()
    • Power: sdr.peak_power(), sdr.average_power(), sdr.papr()
    • Voltage: sdr.peak_voltage(), sdr.rms_voltage(), sdr.crest_factor()
    • Modulation: sdr.ErrorRate, sdr.evm()
  • Conversions:
    • From $E_b/N_0$: sdr.ebn0_to_esn0(), sdr.ebn0_to_snr()
    • From $E_s/N_0$: sdr.esn0_to_ebn0(), sdr.esn0_to_snr()
    • From $S/N$: sdr.snr_to_ebn0(), sdr.snr_to_esn0()
  • Simulation:
    • Channel models: sdr.bec(), sdr.bsc(), sdr.dmc()
    • Signal impairments: sdr.awgn(), sdr.frequency_offset(), sdr.sample_rate_offset(), sdr.iq_imbalance()
  • Link budgets:
    • Channel capacity: sdr.awgn_capacity(), sdr.bec_capacity(), sdr.bsc_capacity()
    • Path losses: sdr.fspl()
    • Antennas: sdr.parabolic_antenna()
  • Probability: sdr.Q(), sdr.Qinv()
  • Data manipulation: sdr.pack(), sdr.unpack(), sdr.hexdump()
  • Plotting:
    • Time-domain: sdr.plot.time_domain()
    • Spectral estimation: sdr.plot.periodogram(), sdr.plot.spectrogram()
    • Modulation: sdr.plot.ber(), sdr.plot.ser(), sdr.plot.constellation(), sdr.plot.symbol_map()
    • Filters: sdr.plot.impulse_response(), sdr.plot.step_response(), sdr.plot.frequency_response(), sdr.plot.phase_response(), sdr.plot.phase_delay(), sdr.plot.group_delay(), sdr.plot.zeros_poles(), sdr.plot.filter()

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

Uploaded Source

Built Distribution

sdr-0.0.4-py3-none-any.whl (59.7 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