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.
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:
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:
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.
Source: Danny C. Price (2018)
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.
In rfi_plotter.py
, these matrices are defined as 2D numpy arrays from line 40 to 48.
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
.
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
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:
(You only need to do this once.)
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
).
-
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
CygnusRFI was created by Apostolos Spanakis-Misirlis.
Contact: 0xcoto@protonmail.com