QIRX

Software Defined Radio

Ala

Introductory Remark

We would be delighted if you considered to use the QIRX SDR. In case the unprobable happens and you find an error, please send us an email about it. Here you can find the history of the software. In case you think something might be wrong, please drop us an email! All comments are welcome!

Installation

QIRX should work immediately after unpacking. Our Quick-Startup Guide provides you with a step-by-step instruction how to proceed. However, there might be situations where you must change the configuration, e.g. in case the default TCP/IP port is already occupied. In that case you might wish to consult the extended version of this guide contained in the documentation package.

Features

QIRX is an Open Source Software Defined Radio, written in C#, downloadable on this site as a Visual Studio 2013 Solution, offering the following features:

  • TCP/IP Based: QIRX accepts 8-bit I/Q-Data either from TCP/IP sources or from pre-recorded files containing the I/Q-data. It is designed to cooperate with RTL-SDR dongles and the widely available rtl_tcp.exe as I/Q-data server. Both QIRX and rtl-tcp may run on the same machine or on separate ones. The rtl-tcp.exe can be started automatically without additional user actions, also when used remote via a LAN.
  • Dual Receiver: Within the selected bandwidth, e.g. 2.56MHz QIRX is able to operate two independent receivers simultaneously.
  • Squelch: For each receiver, QIRX provides a digital squelch, enabling to monitor the selected stations – when not transmitting - without annoying background noise.
  • Simplest Operating Principle: QIRX – using its AM, NFM or WFM demodulators – is purely FFT-based, with a NF lowpass filter only. This might change in a future version.
  • Scanner: QIRX provides for Receiver 1 a simple scanner, being able to scan large frequency areas. This is still in an experimental state.
  • HF and NF Spectrum: For each receiver, QIRX provides a spectrum viewer being able to show the HF and the NF spectrum. For DAB+, it shows the constellation. For non-DAB reception, in version 0.9.1 and greater a waterfall spectrum viewer is included.
  • DAB and DAB+ Receiver: QIRX provides a comfortable DAB+ receiver ( Transmission Mode I ). It is -to the best of our knowledge- the first C# based SDR providing this facility. Some standard libraries like the Viterbi decoder are used as C/C++ packages, accessed via P/Invoke. For users e.g. in Spain or the UK, it is now also possible to listen to services broadcasting standard DAB, in contrast to DAB+. As in Germany no possibility exists any more to test the DAB mode, we would be particularly interested in some feedback for "legacy-DAB" transmissions.
  • File Recorder: For all demodulators, the audio output can be saved to .wav files, independently for each of the both receivers. For DAB+ this allows for high-quality audio recordings.
  • Raw Data File Recorder: Additionally, the I/Q raw data can be saved to a file. It is possible to replay recorded I/Q-data files. You can now position ("seek") to any arbitrary timed position in large or very large (many GB) raw data files. The replay is now able to synchronize DAB files having been recorded with a center frequency offset.
  • Transmitter Identification: QIRX is the first DAB SDR being able to detect and display the Transmitter Ids (TII values). This works also in complex mobile receiving environments. As this is a special feature it is not included in the current distribution. In case you are interested, please send us an email.


Operating Environments

Please note that the complete installation and startup procedure is documented in the Operating Manual, available in the Download section.

QIRX is able to work in the following environments:

  • Stand-Alone: Although QIRX works with a TCP/IP frontend, it can be operated - together with rtl-tcp or any other I/Q-data server - on the local machine. In that case, the tcp/ip address is the one of the localhost, i.e. 127.0.0.1. The QIRX software is able to start and stop the local rtl-tcp.exe automatically, without any further user action. The USB driver of the RTL-dongle must have been installed.
  • Single Remote: In this configuration, the rtl-tcp server runs on a remote machine, for instance at an antenna location with better reception possibilities. Also in this case the QIRX software is able to start and stop the remote rtl-tcp.exe automatically, without any further user action.

    This environment might also be useful in case the installation of the USB driver (e.g. the Zadig driver) is not desired on the machine running QIRX. No particular speed requirements exist for a PC with rtl-tcp as I/Q data server.

  • Dual Local and Remote: QIRX does not need any Registry entry. As a result, independent QIRX instances can run on the local machine, receiving their I/Q-data from different rtl-tcp servers. In such a situation it might be possible to watch up to four stations simultaneously (one station in each receiver, each QIRX instance providing two receivers) across twice the bandwidth of a single QIRX instance. The usual cheap RTL-SDR dongles are able to cover up to about 2.5MHz. Of course, the two receivers operate independently, their data are not phase synchronized (i.e. no coherent operation).
  • DAB+: QIRX works in DAB+ Mode I. It provides either fully automatic or manually controlled frequency synchronization. Additionally - to save processing power - it is possible to tune the fine frequency deviation in the dongle instead of the software. In this case, the phase shift caused by the non-perfect frequency synchronization (due to the limited tuning possibilities of the rx dongle) is compensated by additional control loops in the software.

    The sampling rate error is always corrected.


Basic Operating Principle

A more detailed explanation of the applied principles can be found in the Technical Report, available in the Download area.

As mentioned, the operating principle of QIRX is based on very simple Fast Fourier Transform (FFT)-based down conversion (Decimation) of the incoming I/Q data.

  • Down-Conversion In QIRX, down-conversion takes place in the frequency domain. The user selects - as usual - a center frequency from the spectrum showing a signal of interest. Interesting signals have different bandwidths with respect to their modulation. For instance, a FM radio station has a much larger bandwidth than an AM station in the airband or a NFM station in the amateur radio band.

    For down conversion, a suitable part of the available spectrum of about 2MHz is cut out such that this spectrum piece satisfies the necessary bandwidth. To proceed with the following inverse Fourier Transform it needs to have a length of a power of two.

    An Inverse Fast Fourier Transform (IFFT) switches from the frequency domain back to the time domain, providing samples directly suitable to be fed into the demodulator. The demodulator provides the audio samples to be presented at the headphones output of the PC.

  • Example1: Airband. Assuming a total available bandwidth of 2.048MHz, with a down-conversion factor of 128, a part of 2048kHz / 128 = 16kHz symmetrical to the desired center frequency is cut out of the spectrum. After IFFT time domain I/Q samples with a sample rate of 16kHz are obtained. After demodulation audio samples with a bandwidth of 8kHz are the final result.
  • Example2: FM Radio Stations. Assuming a total available bandwidth of 2.048MHz, with a down-conversion factor of 16, a part of 2048kHz / 16 = 128kHz symmetrical to the desired center frequency is cut out of the spectrum. After IFFT time domain I/Q samples with a sample rate of 128kHz are obtained. After demodulation audio samples with a bandwidth of 64kHz are the final result.
  • Advantages, Disadvantages: The advantage of this method is its simplicity. For the necessary FFT and IFFT operations the fastest available library fftw is used, with a wrapper for C#. It is straightforward applicable for the use of two receivers operating simultaneously. Of course using two receivers is of little interest for WFM radio stations, but highly welcome when listening to other services like airband where stations always transmit only for a very short time. In QIRX, the primary intention for using the describe method has been the demonstration of its simplicity.

    The disadvantage of the method of course is its lack of flexibility. In order to preserve its simplicity, one has to stick with very few available bandwidths. Bandwidth and Demodulators cannot independently be selected.

  • Artifacts: The missing filtering in the frequency domain might cause artifacts after decimation (The term "decimation" usually implies Low-Pass filtering before down-conversion). Filtering in the frequency domain would have complicated the software considerably, as methods like Overlap-Add or Overlap-Save must be applied. However there are other causes for artifacts when dealing with I/Q data like I/Q imbalance. As a result the possible disadvantages caused by a missing FFT filter have been accepted.


Digital Audio Broadcast (DAB+) Demodulator

In DAB, radio stations grouped together are called an "Ensemble". Each Ensemble covers a bandwidth of 2.048MHz, thus making DAB an ideal candidate for reception with a RTL-SDR dongle. No down-conversion is necessary, the whole spectrum is used. The various radio stations within an ensemble are called "Services". To receive a DAB radio station, a user has to select the Ensemble and the Service. Ensembles are transmitted on published frequencies. DAB+ (in contrast to DAB) uses an enhanced Reed-Solomon error correction within a so-called superframe.

For a more detailed description, please consult the Technical Report available in the download section.

The picture shows a nearly ideal spectrum of a DAB+ ensemble, 20-fold averaged (the degree of average is GUI-controllable).

  • Comparison with the Standard: The shown spectrum has been scaled and overlaid in Photoshop for a comparison with a theoretical spectrum published in the Standard. The coincidence is excellent. However, very often the DAB spectra look not so ideal due to disturbances like multipath reception.
  • Finding the Center Frequency: DAB imposes stringent synchronization requirements in time and frequency on the receiver. As a first step, the center frequency must be identified down to 1kHz. The frequency of the dongle might deviate considerably from its nominal frequency.

    DAB signals are transmitted with a suppressed carrier. This shows up as a "dip" in the center of the spectrum. The software searches for this dip to identify the transmitter's frequency. Additionally, the edges of the spectrum are inspected for additional robustness of the algorithm. The method usually works reliably also in more adverse receiving conditions.

  • Coarse timing: DAB signals are organized in frames, composed of symbols. The frame start is indicated by a transmission of a number of zero-intensitiy I/Q samples, the "Null Symbol". This fact is used to roughly find the start of a frame.
  • Fine timing: To find the start of a frame within the accuracy of a sample, the Phase Reference Symbol is used. It is always sent with identical, constant values of its samples, overlaid by noise due to the HF transmission. The undisturbed values are stored in the software, already in the frequency domain. The two blocks are compared by using a fft-based cross correlation ("Phase Correlation"). In this way the exact start of a frame can be identified.
  • Fine Frequency: While the “Coarse Frequency Synchronization” is responsible for finding the frequency of the transmitter down to 1kHz, the “Fine Frequency Synchronization” should find it down to 1Hz. This corresponds to an accuracy of 5*10e-9. This high accuracy becomes possible because additional information is sent within the symbols of a frame, the "Cyclic Prefix" (CP). Each symbol is prepended by a CP, being a copy of the last (504 in mode I) samples of the symbol. Frequency shifts in the Hz region are obtained by measuring the phase shift between the CP and the end of the frame.
  • Permanent Correction: The fine timing adjustment is checked after every frame and corrected if necessary. The fine frequency deviation also is frequently checked, at a much lower rate. Its permanent correction imposes a high processing load on the PC. Therefore an alternate solution is offered in QIRX as an option, letting the hardware make this correction. Details can be found in the Technical Report.

    Coarse timing and frequency checks are only performed after a complete synchronization loss.


DAB Bit Constellation

In DAB the information like audio is transmitted digitally. The receiver obtains the bits by a calculation of an angle of a subcarrier with its predecessor. Ideally, this angle has one of the four values 45°, 135°, -135°, -45°. These four possible values correspond to two possible bits with the values 0, 1, 2, 3. The arrangement of the bits with respect to their angles is called “constellation”.

Usually the constellation is displayed showing the bits as dot heaps in a polar diagram, like in the following picture, from a report by Andreas Müller, ETH Zurich. The dot heaps show the single bits, the heaps being separated by 90 Degrees.
QIRX uses a different, linear display for an improved visual control of the synchronization accuracy.

The picture shows an example: The spectrum (upper part) shows regions of strong multipath reception reducing the signal strength around 178 MHz. The constellation (lower part) shows – for each subcarrier – how well the bits are arranged on their correct position. Each dot corresponds to a single bit value. The reduced signal strengths around 178MHz clearly shows a much larger scattering of the bits off from their correct values. In a polar display it would not be possible to assign regions of large scattering to the frequency regions (subcarriers) with reduced signal strength.

This kind of constellation display can be used to obtain additional information.

  • Sampling Rate Error: A sampling rate error shows up in the constellation by displaying the bits - depending on their subcarrier - with a misalignment from their ideal positions. In a polar plot, this would show up as a slight distortion, not easily being recognized. The sampling rate error is in the same order of magnitude as the frequency error of the dongle, assuming both are derived from the same clock.

    In QIRX, the sampling rate error is permanently corrected.

  • Constant Angle Error: Slightly changing the frequency (e.g. in manual mode) results in a shift of the whole constellation by a constant angle. QIRX permanently monitors the constellation and corrects this type of error. In a polar plot, this error would show up in a rotation of the whole constellation.
  • Constellation Worst Case: The worst case for a bit decoder is the one where all of the bits are arranged between two quadrants. In such a situation clearly no unambiguous decoding is possible. QIRX' control loop will shift the constellation into an unambiguous state, seemingly showing a properly aligned constellation. However, this loop cannot have any knowledge whether it shifted the bits into the correct quadrant. The solution to this problem consists in rotating the whole constellation by values of 90 degrees until a reception becomes possible. As soon as this happens, the rotation is stopped. The Fast Information Channel (FIC) is used as an indicator whether a proper decoding took place. The FIC bits are CRC-protected, making a reliable decision about the correct quadrant possible.