Giter Site home page Giter Site logo

plasma-dsp's Introduction

plasma_dsp

plasma_dsp is a radar signal processing library written in C++. It is primarily useful for generating radar waveforms, although it has some algorithm implementations that have not yet been optimized. To support experimentation on software-defined radio platforms, a GNU Radio module using plasma can also be found here.

Modules and Features

Waveforms

Several objects have been implemented to generate common radar waveforms. A list of waveforms that can be generated is given below:

  • Linear FM (LFM)
  • FMCW
    • Linear upsweep and downsweep
  • Frequency modulated continuous wave (FMCW)
    • Linear upsweep
    • Linear downsweep
  • Linear frequency modulated (LFM)
  • Polyphase coded frequency modulated (PCFM)
  • Phase codes
    • Barker
    • Frank
  • Square wave

Windows

  • Rectangular
  • Blackman
  • Hamming
  • Hanning

Signal Processing

  • FFT/IFFT
  • 1D Constant False Alarm Rate (CFAR) detector
    • Cell averaging (CA)
  • 2D CFAR detector
    • Cell averaging (CA)

Dependencies

Most of the heavy signal processing lifting is handled by ArrayFire, which can be installed through apt by running the following

wget https://repo.arrayfire.com/GPG-PUB-KEY-ARRAYFIRE-2020.PUB
gpg --no-default-keyring --keyring ./temp-keyring.gpg --import GPG-PUB-KEY-ARRAYFIRE-2020.PUB
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export --output arrayfire.gpg
rm temp-keyring.gpg
sudo mkdir -p /etc/apt/keyrings/
sudo mv arrayfire.gpg /etc/apt/keyrings/arrayfire.gpg
echo "deb [signed-by=/etc/apt/keyrings/arrayfire.gpg, arch=amd64] https://repo.arrayfire.com/debian all main" | sudo tee -a /etc/apt/sources.list.d/arrayfire.list
sudo apt update
sudo apt install arrayfire

If this process fails, you can choose an installation method from the official repository

GoogleTest is also a dependency, but it is installed through a FetchContent call if it is not found.

Installation

The easiest way to use this tool is to obtain the source code from git

git clone https://github.com/ShaneFlandermeyer/plasma_dsp.git

To install the tool system-wide, run the commands below from the top-level CMake directory:

mkdir -p build
cd build
cmake ..
make
sudo make install
sudo ldconfig

To uninstall, run the following from the build folder

sudo make uninstall
sudo ldconfig

Python Usage

Although no Python bindings have been explicitly written for this project, cppyy has been tested and works for all objects. Below is a minimal working example for generating a waveform, converting the data to a numpy array, and plotting

import cppyy
import cppyy.gbl.std as std
import numpy as np
import matplotlib.pyplot as plt

# Load the library and any headers you want to use in Python
cppyy.load_library('libplasma_dsp')
cppyy.include('plasma_dsp/linear_fm_waveform.h')


# Generate the waveform data
waveform = cppyy.gbl.plasma.LinearFMWaveform(10e6, 10e-6, 10e3, 20e6)
samps = waveform.sample()
x = std.vector[std.complex['double']](samps.elements())
samps.host(x.data())
x = np.array(list(x),dtype=np.complex128)

# Plot for verification
plt.plot(np.real(x))
plt.show()

plasma-dsp's People

Contributors

shaneflandermeyer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.