SDRPlay2RSS

This program acquires time-domain data from the SDRPlay receiver, computes spectra, and pipes the spectra to Radio Sky Spectrograph (RSS). The former is a software-defined radio (receive only) covering frequencies from zero to about 1.7 GHz and having up to 8 MHz of useful bandwidth. The latter is a spectra acquisition and display tool (Windows based) used by the Spectrograph Users Group (SUG), a group affiliated with the Radio Jove. Besides piping integrated spectra to RSS for live display, the program can also save integrated and full-rate spectra to RSS's native SPS files, and also save time-domain data to binary files.

Please refer to the screen shot of the program window. In that figure the antenna, amplifier, and first bandpass blocks depict the installation's antenna and rf signal conditioning. 'Mixer 1' in the SDRPlay receiver sets the rf center frequency, which is followed by a band-pass filter, which sets the analog bandwidth to be processed. IF1 is a roughly 200-MHz IF frequency. Mixer 2 translates IF1 to I and Q base-band signals, which are then quantized by the dual ADC and transported to the host computer via USB2.

FFT and further processing are done by the computer. The frame size under the FFT block sets the sample count that are Fourier transformed as a block. The running sum depicts the channel-by-channel absolute squaring of the Fourier transforms and their accumulation. There is a great deal of data reduction in this accumulation. The offset and gain are applied to each integrated frame (each spectral channel), and the result is passed on to RSS. This is the baseline functionality of SDRPlay2RSS.

Basic usage

This baseline functionality is initialized by the 'Integrate' button. When armed in this way, the button's color is yellow and RSS acquisition may be started and stopped using RSS's start button repeatedly without rearming. Hit the 'Integrate' button again to disarm (and stop RSS acquisition if acquiring).

Most receiver settings must be set prior to arming. To change these settings, one must disarm SDRPlay2RSS if armed, change the setting(s), and then rearm. Exceptions to this rule are the gain reduction, offset, and gain settings, which may be changed on the fly.

There are four SDRPlay settings (see the next figure).

I suggest that the installation's antenna gain be adjusted so that the receiver's gain-reduction setting is typically below 20 decibels.

Computer processing starts at the FFT block, where the time-domain data are Fourier transformed. The first setting is the Fourier frame size N, in the figure shown at 29. The drop-down box allows selection of a power of two. A fundamental relation is that the spectral resolution Δf is

    Δf = fs/N

The absolute squares of those transforms are then computed (not shown), and integrated by the 'running sum' block for the interval entered in the 'integration time' box.

Although the SUG typically uses 0.15-s integration times for Jupiter and solar observations, much longer and shorter times can be used. The low end is limited by the computer and RSS being able to keep up with the data rate. Five-millisecond (0.005 s) integrations result in useful spectrograms on my computer.

The offset setting may be adjusted on the fly using the 'U' and 'D' buttons. They increment and decrement, respectively the offset by the adjustable increment in the box just above the buttons. The current value of the offset is displayed above the offset block. The gain may also be adjusted on the fly by entering a value in its box. You must hit carriage return to register a new gain value.

The 'Span' setting sets the frequency span of the spectral channels that are actually sent to RSS or otherwise recorded. When the RF bandwidth is changed the span is set to its default, which is the rf bandwidth. But it can subsequently be changed to other values that are not more than the sample rate. The actual number of channels nRSS sent to RSS is

nRSS = Span/fs × N

Streaming spectra to disk

Spectra may also be streamed to disk both with and without integration. One might use the former for higher temporal resolutions than can be easily handled by RSS. It is used by selecting 'FD->SPS' prior to arming with the 'Integrate button' (see the next figure). The destination file is an SPS file, RSS's native format.

Streaming without integration is used for the highest temporal resolution. It is started using the 'Stream' button, and using its default 'FD->SPS' selection. Like with integrated streaming, the data file is of the SPS format. SDRPlay2RSS streams to a file for the duration specified by the 'Streaming record time' menu item under the 'Stream' menu. Once activated, spectra are written to new files until the 'Stream' button is pressed again.

Note that in this latter streaming mode the temporal resolution and time resolutions are reciprocals of each other.

    Δt = 1/Δf

where Δf is given above.

Background subtraction

There is a simple facility for setting a background spectrum and subtracting it from the spectrogram as it is being acquired. When the 'background subtraction' menu item under the integrate menu is clicked, it averages the next several spectra to determine the background to be subtracted. The program subsequently subtracts that background from spectra before they are sent to RSS or to a file. The number that are averaged is set by the 'background count' menu item. This capability is necessarily a bit clumsy and an otherwise imperfect technique. One must start the averaging not knowing that the roughly empty background at the start of the averaging will persist. And it abandons an antenna-temperature calibration, if implicitly present. But it is nevertheless useful at times for bringing out faint features.

Logarithmic scaling of spectra

In integrate mode, spectrograms may be delivered with either linear or logarithmic scaling of intensities. The log setting is useful for displaying a larger range of intensity scales, including down to the noise level of the spectra. Select one or the other using the 'Log scale' menu item under either the 'Integrate' or 'Stream' menu. Changes to this setting may be made on the fly (no restart needed). When in the logarithmic mode, the offset (offset block) is measured in decibels. To display many decibels in RSS, a small value of the gain is generally required reduce the scale. The log-scale setting is saved and restored in configuration files.

Applying a windowing function

A block-by-block Fourier transform has a sinc-function response with it long 1/f tails. Around strong lines, these tails spread into nearby fourier channels, often obscuring them. A window function has the effect of suppressing the long tails at the expense of widening the central peak of the response function, widening lines. These effects are illustrated in the spectrogram to the right, where to the left of the gap no windowing is applied, and on the right it is applied. The lower line shows the suppression of the sidebands, and the upper line shows the widening of the line. Windowing can be applied in both streaming and integrating modes.

In SDRPlay2RSS, a Blackman window function is applied to the Fourier frames prior to the Fourier transform when the 'Window function' menu item under the integrate menu is checked. The setting is saved and restored in configuration files.

Poly-phase filter bank

As was mentioned elsewhere, the baseline Fourier processing divides the time-domain data stream into blocks that are individually Fourier transformed, absolute squared, and accumulated (integrated). A windowing function may optionally be applied to the blocks as a means to suppress sidebands of intense lines while degrading slightly the spectral resolution.

SDRPlay2RSS can alternatively insert a filter ahead of the Fourier transform that has the effect of simultaneously suppressing those side bands and preserving the spectral resolution. This configuration is called a poly-phase filter bank (PFB). While a PFB is a win-win in terms of performance, it is unfortunately computationally demanding. It may not be practical at higher data rates on some computers.

Engage the PFB through the 'Integrate' menu. A few other facts about this function. First, it cannot be run on the fly; the currently running acquisition must instead be stopped and restarted. Second, the PFB setting is saved and restored in configuration files. Third, the PFB and windowing function cannot be applied simultaneously. Fourth, the frame size can be at most 1024 due to the difficulty computing taps for frames larger than this number. And finally, PFB use in the streaming mode is not supported.

The graphs to the right show a 20-MHz test signal without and with the PFB engaged. The vertical scale is logarithmic and the span is something like 50 dB.

Other capabilities

There is the ability to stream time-domain data (ADC samples) to disk ...

In the integrating mode there is a circular buffer of time-domain I and Q samples that is continually being filled. Its size is fixed at 105 × the raw packet size set by the receiver. When the 'T' button is clicked, this buffer is written to an SPS file. The idea is to allow manually triggered capture of transient events for off-line processing. A work in progress ...

Loading and saving program configurations

All the settings of the program's user interface can be saved and restored, and the program's state when the program is closed is also saved, and restored when the program starts again. Use the file menu's 'Load', 'Save', and 'Save as' to load a configuration, save the configuration to the currently loaded file, and save to a new file, respectively. These files are saved and loaded from the program's current directory. They are human-readable ascii files made up of XML-tagged data. The program's current directory at run time should be explicitly set in the desktop icons and/or links that are used to start the program.

The idea of these configuration files is to customize settings for different kinds of measurements, including the directories to which data are written. For example, Jupiter measurements settings, incuding data directories, are saved to one configuration file, while meteor forward scatter measurements have settings and data directories saved to another configuration file, streaming settings for S bursts can go to a third, very high resolution settings for resolving lightning to a another, etc.

Menus

File paths

Paths to which spectrograms are written may be configured. There are paths for both integrating and streaming files, the former set through the 'Integrate' menu, the later through the 'Stream' menu. There is also a path for the observatory data accessed through the file menu, but its utility is questionable (not the data itself). These paths are saved and restored in the configuration files.

Installation

The rf input does not require much signal intensity. It is easy to over power the input to the degree that it looks like there is no signal at all. Insert sufficient attenuation at the input so that the working range of the gain-reduction setting is below 20 dB.

Other info

Acknowledgements

FFTW is a capable Fourier-transform package used by SDRPlay2RSS.


Nathan Towne
6/2016