Giter Site home page Giter Site logo

hb9fxq / cygnusrfi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 0xcoto/cygnusrfi

1.0 0.0 0.0 116 KB

๐Ÿ“ก CygnusRFI: An open-source RFI analysis tool for Ground Stations & Radio Telescopes

License: GNU General Public License v3.0

Python 100.00%

cygnusrfi's Introduction

CygnusRFI: An open-source RFI analysis tool for Ground Stations & Radio Telescopes

CygnusRFI

About CygnusRFI

CygnusRFI is an easy-to-use open-source Radio Frequency Interference (RFI) analysis tool, based on Python and GNU Radio Companion (GRC) that is conveniently applicable to any ground station/radio telescope working with a GRC-supported software-defined radio (SDR). In addition to data acquisition, CygnusRFI also carries out automated analysis of the recorded data, producing a series of averaged spectra covering a wide range of frequencies of interest. CygnusRFI is built for ground station operators, radio astronomers, amateur radio operators and anyone who wishes to get an idea of how "radio-quiet" their environment is, using inexpensive instruments like SDRs.

A list of GRC-supported SDRs can be found here.

alt text

Example RFI Measurement

alt text

GRC Data Acquisition Flowgraph

CygnusRFI is a polyphase filterbank spectrometer. The raw I/Q samples are processed in real time using GNU Radio, with the amount of data stored to file being drastically reduced for further analysis. The following flowgraph handles the acquisition and early-stage processing of the data:

alt text

Spectral leakage: a comparison between ACS, FTF and PFB spectrometers

The noteworthy advantage of polyphase filterbanks is reduced spectral leakage, with a slight increase in computational requirements. The following figure compares the spectral leakage produced by an autocorrelation spectrometer (ACS), a Fourier transform filterbank spectrometer (FTF) and a polyphase filterbank spectrometer (PFB) with a Hann FFT window: alt text Source: Danny C. Price (2018)

Although not strictly necessary, in this application, minimal spectral leakage allows us to more effectively suppress sidelobes that are unintentionally produced next to the actual signal by the traditional FFT algorithm. If for any reason PFB is not used by the user (e.g. due to potential computational expense), it is suggested to at least use a window function when computing the FFT spectra, in order to suppress the generated sidelobes to a somewhat acceptable level.

A graphical representation of a polyphase filterbank

alt text Source: Danny C. Price (2018)

Data Analysis

Once a single spectrum observation is finished and the data has been acquired and stored to X.dat, the FFT samples (interpreted as a numpy array in rfi_plotter.py) constitute the dynamic spectrum (waterfall), from which the averaged spectrum of the observation can be derived.

We can mathematically interpret the dynamic spectrum as a two-dimensional matrix with m rows and 2n columns, where m โˆˆ โ„•* is the total number of FFT samples (integrations) and 2n, n โˆˆ โ„• is the number of frequency channels (FFT size).

Using the frequency-hopping technique, we can synthesize a number of spectra, covering a wide frequency range, resulting in the final RFI plot.

alt text

In rfi_plotter.py, these matrices are defined as 2D numpy arrays from line 40 to 48.

Averaged Spectrum Derivation

If we average with respect to the frequency channels (zmean = np.mean(a=z, axis=0)), we get a new 1 ร— 2n row matrix (or row vector), which is the averaged spectrum of the observation. This is defined at line 54 of rfi_plotter.py.

Installation

To use CygnusRFI, make sure Python (Version 2.7) and GNU Radio (with gr-osmosdr) are installed on your machine.

Once Python and GNU Radio are installed on your system, navigate to a directory of your choice (e.g. cd Desktop) and run:

git clone https://github.com/0xCoto/CygnusRFI

If you do not use an RTL-SDR

Once the repository has been cloned, open pfb.grc using GNU Radio Companion and replace the RTL-SDR Source block with the source block of your SDR (e.g. UHD: USRP Source). After modifying the properties of the new SDR Source block (optional), click the little button next to the Play button to generate the new and updated version of top_block.py that is compatible with your SDR:

alt text

(You only need to do this once.)

Usage

Once CygnusRFI is downloaded on your system and the SDR Source block has been replaced (unless you use an RTL-SDR where you shouldn't need to change anything), you can begin monitoring RFI with CygnusRFI by running:

python CygnusRFI.py -b BANDWIDTH -c NUMBER_OF_CHANNELS -t INTEGRATION_TIME_PER_FFT_SAMPLE -d DURATION_PER_SPECTRUM_SAMPLE -f LOWER_FREQUENCY -F HIGHER_FREQUENCY

(All units in SI (Hz, sec))

Example:

python CygnusRFI.py -b 2400000 -c 2048 -t 0.5 -d 5 -f 400000000 -F 430000000

You will then be asked to confirm your measurement parameters, and from there, you can let CygnusRFI do its magic! Once the observation is finished, your data will be processed, analyzed and saved as rfi_plot.png (in the same directory as observe.py).

To do

  • argparse argument support
  • Apply DSP (using numpy) and adjust step size to eliminate spectrum roll-off (lost information at the edges of the spectra)
  • Support spectrum (passband) calibration to flatten out the bandpass shape of the SDR

Credits

CygnusRFI was created by Apostolos Spanakis-Misirlis.

Contact: [email protected]

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.