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 details)

Uploaded Source

Built Distribution

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

sdr-0.0.4-py3-none-any.whl (59.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sdr-0.0.4.tar.gz
  • Upload date:
  • Size: 3.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for sdr-0.0.4.tar.gz
Algorithm Hash digest
SHA256 b52eec272665c2b4ec81668c7c997b7c5427ff9260f9a02bb5668f6990d2ff09
MD5 7cb6d2534db1b64a569ceea10373bfe5
BLAKE2b-256 c25e839948c4ee3deeb6d24785b3dbbff7825bee77e72a9010bc77c7931c42ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sdr-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 59.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for sdr-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 86b31fd7a9ee4ba742625d05d0fbeec4f70c271e3d68dbdaef0cad37af3ea35a
MD5 bacbe1ea7c23e85fa30870daaabefb39
BLAKE2b-256 e3c4233192fe0b610d58b3bbb37ba7c7463ccb6c174190e96e7084dad1c95561

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