Skip to content
This repository was archived by the owner on Mar 25, 2024. It is now read-only.

kirlf/ModulationPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

79 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ModulationPy

Digital linear modems: M-PSK and M-QAM.

Motivation

The main idea is to develop a Python module that allows replacing related to digital linear modulations MatLab/Octave functions and objects. This project is inspired by CommPy open-source project.

Theory basics

See: Basics of linear digital modulations (slides).

Installation

Released version on PyPi:

$ pip install ModulationPy==0.1.4

To build by sources, clone from github and install as follows::

$ git clone https://github.com/kirlf/ModulationPy.git
$ cd ModulationPy
$ python3 setup.py install

What are modems available?

  • M-PSK: Phase Shift Keying
  • M-QAM: Quadratured Amplitude Modulation

where M is the modulation order.

How to use?

  1. To show signal constellation use plot_const() method:
from ModulationPy import PSKModem, QAMModem
import numpy as np

PSKModem(4, np.pi/4,  gray_map=True, bin_input=True, soft_decision = False, bin_output = True).plot_const()
QAMModem(16, gray_map=True, bin_input=False, soft_decision = False, bin_output = False).plot_const()

  1. To modulate and demodulate use modulate() and demodulate() methods.

[EXAMPLE in progress]