Qt-DAB: a software DAB decoder

dabradio

Introduction

DAB (DAB+) is - in Europe and Australia - the technology of choice for use as "digital radio". In Norway it has replaced FM, here in the Netherlands the original plans to phase out FM in favor of DAB are postponed, but DAB is "the" technology.

Qt-DAB is a software DAB decoder. It requires some form of computer for the program to run and it requires an SDR device to do the conversion from a radio signal in the air to a stream of digital samples to be interpreted. For that purpose, Qt-DAB supports some of the most popular SDR devices, including DABsticks, SDRplay RSP's, AIRspy devices, Adalm Pluto devices, Hackrf and Lime devices. Furthermor, Qt-DAB supports access to devices through the spyserver and - for Linux - using Soapy.

Qt-DAB is developed under Linux, and cross compiled for Windows. For both x_64 PC's with Linux and for recent versions of Windows, precompiled versions exist. For Linux an AppImage exists, for Windows an installer is available.

Processing DAB takes as input a samplestream with a rate od 2048000 IQ samples. The input stream can be viewed as a sequence of DAB frames, each frame starts with app 2600 samples with suppressed data, i.e. a N ULL period, followed by 76 blocks, each consisting of 2552 samples.
The first data blocks contain special data, that data -when decoded - gives all information on the other data blocks, i.e. kind of directory information. For each service that is carrier, a description is given wehre the data can be found, how it is named and how it is to be interpreted.
Processing DAB does require some computational effort to transform the incoming samples to audio, for that some advanced techniques, such as FFT and Reed-Solomon are used, and does not run on an Arduino type of computer. \par

The Qt-DAB main widget

dabradio dabradio

DAB is transmitted in the 175 .. 225 MHz band, the former TV Band III. In that band there are 39 channels defined, each with a width of (just over) 1.5 Mhz, and DAB transmissions take place in (some) of these channels. There are 39 channels, here in the Netherlands I receive data in app 6 channels.

Since there are app 8 to 15 services per channel, I can receive an overwhelming amount of services. Not all services do interest me, that is why the main widget provides two views on the services. The first one (picture left) shows the services in the currently active channel, the second one shows a list of favorits, selected services from different channels. Of course a simple mouseclick is sufficient to add a service from the ensemble view to the list of favorites. (A button on the bottom of the widget lets you choose between the views.)

The scan function allows a scan over all (or a selected subset) channels, the result of the scan is stored in the scanlist, and - obviously - one can easily add elements of the scanlist to the list of favorites.

The spectrum widget

dabradio dabradio

Personally I am interested in various aspects if the incoming signal. The spectrum widget shows different aspects of the signal. The spectrum widget offers different views on (elements of) the signal. Obviously one wants to see the spectrum. The picture above shows to the left the spectrum of a regularly received DAB signal, to the right the almost ideal form of the spectrum.
Another view is the so-called correlation view , i.e. the visualisation of the result of the correlation with which the time synchronization takes place. The picture shows that - in this case - signal from three transmitters is received, the strongest signal is selected.
One more view is the one - also in the time domain - of the transition from the NULL part of the DAB sugnal to the first data block. It clearly shows the (end of the) NULL period and the start of the data.

dabradio

All in all, there are 6 views. The decoded signal consists of complex numbers, a small scope on the widget visualizes these numbers in a 2 dimensional plane.

The widget shows furthermore some quality indicators of the signal, i.e. the frequency offset and resulting error, the SNR and clock errors.

dabradio

Control on the visibility of the spectrum widget is by the button, labeled spectrum on the main widget.

The Technical Widget

The basic idea in most cases is to get some audio from a selected service. The road from an incoming radio signal to an audio signal is quite long, and - during the process - there are quite some transformations on the data. In the end an audio signal - with a baudrate of 48000 - is to be made audible. The various aspects of the audio service are shown in the so-called technical widget.

dabradio

Most of the data displayed is describing the way to convert a segment of bits to audible data, some data has a more dynamic character. The brown colored progress indicators tell about the result of the difefrent stages in transforming the incoming signal into audio samples. The blue "thermometers" tell about the signal strength of the left and right channel, and the spectrum display obviously shows the spectrum of the audio output.

Control of the visibility of the technical widget is by the small icon left of the display of the name of the selected service in the main widget (on the picture let of "NPO radio 5".

The content table and scanning

While the technical data widget shows (a.o) the different attributes of the selected service, a simple mouse click shows - in ".csv" format - the while contents of the ensemble in the currently selected channel.

dabradio

The picture shows the data found for the dutch NPO ensemble, which is apparently received from the transmitter in Alphen a.d. Rijn, with a signal srength 15 dB etc etc.

Control on the visibility of the content table is by clicking on the name of the ensemble, on top of the left part of the main widget.

Qt-DAB provides also the possibility for scanning the band. In fact, Qt-DAB provides three different modes for doing so. The common mode is performing a single scan over the channels. Now, it is usually known beforehand that some channels do not contain DAB data, and to speed up the scanning, it is best to skip them.
Qt-DAB therefore supports skiptables, i.e. a list with the channelnames and an indication whether or not they are to be skipped when scanning. Any user may specify one or more skip tables, i.e. one for each direction. The output of the scan conforms to the above picture.

Control on scanning is in a separate widget, which can be made visible (or invisible again) by the button labeled scan.

dabradio

One scan mode is continuous, i.e. the scan goes on until manually stopped. The output of this scan mode is limited, for each channel containing DAB data, a single line is added to the output

dabradio

Setting parameters

Qt-DAB supports one widget with which some parameters can be set. This configuration and control widget can be made visible with the button labeled control on the main widget.

dabradio

While there is an overwhelinh amount of settings, most of these settings have a decent default value. At the bottom to the right, the selector for an input device (or file) is obviously important. Note that Qt-DAB allows switching from one device to another while running he program. The button - labeled default in the picture is used to select an audio channel, values depend on the system the program is running on.

The button labeled font> can be used to select a font that is used for showing the service list, the spinbox below that button for the font size, and the button labeled font color for the color used for the font in that list. (Of course it is possible to select a color for the buttins used on the widgets, just click with the right hand mouse button on a button and select the color and the text color. The same applies to the different scopes, their color can be set as well by clicking with the right hand mouse button on the widget).

TII detection and a map

Most DAB ensembles are transmitetd by a group of transmitters, all transmititng the same data. In those cases, individial transmitters add an identification to the data they transmit. The data, Transmitter Identification Information or TII, consists on two numbers, a so-called mainId and subId. Qt-DAB extracts that data from the incoming data stream.

Thanks to fmList (see www,FMList.org) there exists a database that relates the different mainIds and subIds to the actual transmitter names and locations. That is why some of nthe above pictures of the main widgets the bottom line on the right half of the widget shows the transmitter name and the mainId, subId combination.

Qt-DAB has built-in an option to show the transmitter location(s) on a map,

dabradio

That map (courtesy Herman Wijnants) shows the location of the receiver, the locations of the transmitters received (on different channels), as well as the distance and the azimuth. In order for this feature to be enabled, the precompiled versions of Qt-DAB contain some code to load the database. Of course, since computing the distance and azimuth only makes sense when the receiver position is known, the configuration widget contains a button, labeled coordinates, that when touched, shows a small menu for entering the coordinates of the receiver.

Sources - as well as an AppImage for x64 Linux PC's and a Windows installer can be found in the repository here .