Skip to main content

Package for digitial communications functions

Project description

# DigCommPy Python3 package for digital communications simulations.

It includes channel coding and different channel models. Simulations can be run to calculate bit/block error rates for different configurations.

# Installation The package can be installed using pip with the command pip install digcommpy.

Alternatively, you can clone the Gitlab repository and install the local copy using the following commands:

git clone https://gitlab.com/klb2/digcommpy.git

cd digcommpy pip install .

# Usage There are multiple example files in the examples folder.

## Basic Encoding/Decoding Example A simple encoding example using a polar code:

from digcommpy import messages, encoders

n, k = 16, 4

encoder = encoders.PolarEncoder(n, k, “BAWGN”, 0.)

mess = messages.generate_data(k, number=1000, binary=True) codewords = encoder.encode_messages(mess)

A full transmission chain can be simulated as follows:

from digcommpy import messages, encoders, decoders, channels, modulators, metrics

# Parameters n, k = 16, 4 snr = 5. # dB # Blocks encoder = encoders.PolarEncoder(n, k, “BAWGN”, snr) modulator = modulator.BpskModulator() channel = channels.BawgnChannel(snr, rate=k/n) decoder = decoders.PolarDecoder(n, k, “BAWGN”, snr) # Simulation mess = messages.generate_data(k, number=1000, binary=True) codewords = encoder.encode_messages(mess) channel_input = modulator.modulate_symbols(codewords) channel_output = channel.transmit_data(channel_input) est_mess = decoder.decode_messages(channel_output) ber = metrics.ber(mess, est_mess) print(“The BER is {}”.format(ber))

This can be simplified by using the simulations module from the package (in progress).

# Used Software Some parts of this library are based on different open source implementations. The polar code encoding and decoding code is based on the Matlab implementation from Harish Vangala et al. (http://polarcodes.com/). The implementation of some functions, e.g., the QAM-modulation are based on the Octave communications package (https://octave.sourceforge.io/).

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

digcommpy-0.8.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

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

digcommpy-0.8-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file digcommpy-0.8.tar.gz.

File metadata

  • Download URL: digcommpy-0.8.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for digcommpy-0.8.tar.gz
Algorithm Hash digest
SHA256 4380d9b7521f2d41810bc229326ee2c25491cb73dc4a44707507e04ce532513d
MD5 bc1d92d82066be1a562962381f7e31a2
BLAKE2b-256 b32318f605f95317f8dadb2b79ed7b4af136ee0a873fa9a6cde50bec384e4783

See more details on using hashes here.

File details

Details for the file digcommpy-0.8-py3-none-any.whl.

File metadata

  • Download URL: digcommpy-0.8-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.11.1 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for digcommpy-0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 8b8b37cd025b1f58a1df5c5f0c960b31fdb458caaf1725394592a13c5a1ed703
MD5 1bd434202207b7da12854808c5f4bc60
BLAKE2b-256 60bea25ee54916b783bcc68b84e057cfd28ddf05e101cbe1cfc85f803233e882

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