Skip to content

dwillmore/bpsk-modem

 
 

Repository files navigation

Intro

This repo contains a software simulation of the BPSK link. It was used to originally develop and refine the parameters of the BPSK modem prior to porting to the playground repo. Subsequent to link confirmation in the playground, the constituent repositories were organized into the nus-link repo. Thus, there is significant "drift" between what is in this repo and what went to production, but this repo is still quite handy for retrenching fundamental parameters about the link.

Creating the FIR Filter

The FIR filter was created in Python using the scipy.signal module:

import numpy
from scipy.signal import firwin

def create_filter(rate=62500, oversample=3, taps=24, bandwidth=500, window='hamming'):
    fs = rate//oversample
    nyquist = 0.5 * rate
    return firwin(taps, [fs-(bandwidth/2),fs+(bandwidth/2)], nyq=nyquist, pass_zero=False, window='hamming', scale=False)

# Disable scientific notation, so we can copy the values to C
numpy.set_printoptions(suppress=True, precision=15)

print(create_filter())

This results in a filter output such as:

array([ 0.000552267628092, -0.000000136206718, -0.001015894260281,
       -0.0015628464157  ,  0.000000329625115,  0.003089577068582,
        0.00395535506267 , -0.000000418414772, -0.005577484899362,
       -0.006212228801914,  0.000000193393475,  0.006898507563183,
        0.006898507563183,  0.000000193393475, -0.006212228801914,
       -0.005577484899362, -0.000000418414772,  0.00395535506267 ,
        0.003089577068582,  0.000000329625115, -0.0015628464157  ,
       -0.001015894260281, -0.000000136206718,  0.000552267628092])

About

Modem software for ding BPSK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 99.1%
  • Other 0.9%