Mmbtools
Mmbtools
Open-Source Software-Defined
DAB+ Tools
Project Documentation
Opendigitalradio
[Link]
2014–2022
Contents
Contents i
Acronyms 1
1 Introduction 2
2 Purpose 2
6 Usage Scenarios 13
6.1 Experimentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.1.1 Creation of Non-Realtime Multiplex . . . . . . . . . . . . 13
6.1.2 Modulation of ETI for Offline Processing . . . . . . . . . 13
6.2 Interfacing Hardware Devices . . . . . . . . . . . . . . . . . . . . 13
6.2.1 Ettus USRP . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2.2 SoapySDR . . . . . . . . . . . . . . . . . . . . . . . . . 15
6.2.3 Other hardware . . . . . . . . . . . . . . . . . . . . . . . 17
6.3 Audio Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.3.1 Local Audio Card . . . . . . . . . . . . . . . . . . . . . . 17
6.3.2 Using Existing Web-Streams . . . . . . . . . . . . . . . . 18
6.3.3 Encoders at Programme Originator Studios . . . . . . . . 18
6.4 Advanced Signal Processing . . . . . . . . . . . . . . . . . . . . . 19
6.4.1 Crest Factor Reduction . . . . . . . . . . . . . . . . . . . 19
6.4.2 OFDM Symbol Windowing . . . . . . . . . . . . . . . . . 19
6.4.3 Digital Pre-Distortion . . . . . . . . . . . . . . . . . . . . 20
7 Data Features 21
7.1 Programme-Associated Data . . . . . . . . . . . . . . . . . . . . 21
7.2 FIG 1 Labels and FIG 2 Extended Labels . . . . . . . . . . . . . . 21
7.3 Announcements . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
7.4 Service Linking . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
8 System Environment 23
8.1 Processing requirements . . . . . . . . . . . . . . . . . . . . . . 23
8.2 Launching the tools . . . . . . . . . . . . . . . . . . . . . . . . . 24
8.3 Logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.4 Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
8.5 Monitoring through SNMP . . . . . . . . . . . . . . . . . . . . . 25
8.6 Monitoring using munin . . . . . . . . . . . . . . . . . . . . . . . 25
8.7 Monitoring using Xymon . . . . . . . . . . . . . . . . . . . . . . 26
8.7.1 Installation of the Xymon Client . . . . . . . . . . . . . . 26
8.7.2 Server Configuration . . . . . . . . . . . . . . . . . . . . 27
8.8 Real-time Scheduling . . . . . . . . . . . . . . . . . . . . . . . . 28
8.9 Accessing the USRP as Non-root . . . . . . . . . . . . . . . . . . 28
8.10 Authentication Support . . . . . . . . . . . . . . . . . . . . . . . 28
10 Single-Frequency Networks 33
10.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
10.2 Multiplexer Configuration . . . . . . . . . . . . . . . . . . . . . . 33
10.3 Modulator Configuration . . . . . . . . . . . . . . . . . . . . . . 34
10.4 Using ODR LEA-M8F GPSDO board . . . . . . . . . . . . . . . 35
10.5 Using Ettus GPSDO . . . . . . . . . . . . . . . . . . . . . . . . 36
C Bibliography 40
References 40
Acronyms
1PPS One pulse per second
TM Transmission Mode
1 Introduction
This is the official documentation for the ODR-mmbTools. These tools can be
used to experiment with digital audio broadcasting (DAB) modulation, to learn
the techniques behind it, and to set up a DAB or DAB+ transmitter.
This documentation assumes that you are already familiar with the basic
concepts of the DAB system. Understanding how the DAB transmission chain
is structured is a prerequisite for getting started with the ODR-mmbTools. The
“DAB Bible” by Hoeg and Lauterbach [8], and the “Guide to DAB standards” from
the ETSI [2] can be used as a starting point.
In this document, the terms “DAB” and “DAB+ ” are used somewhat inter-
changeably, since many parts of the transmission chain are identical between the
two variants. In most cases, “DAB” will be used, and “DAB+ ” when talking about
specific details about the newer version of the standard.
2 Purpose
The individual programs that make up the ODR-mmbTools each have their own
documentation for command-line options and configuration settings, and the
[Link] wiki1 contains many explanations and pointers, but there is no
single source of documentation available for the whole toolset.
This document aims to fill this gap, by first outlining general concepts, then
presenting different usage scenarios, and finally, detailing a complete transmission
setup. With this document in hand, you should be able to understand all of the
elements which go into the ODR-mmbTools transmission chain, and how to set
one up.
Please refer to the bibliography for references on any individual topic that may
need clarification, to the README files in the repositories of the tools that are
going to be presented in this guide, and if you have further questions, get in touch
with us through the mailing-list mentioned on our website.
a “wave player” script was necessary to interface with GNURadio. Only DAB
Transmission Mode 2 was supported. CRC-DABMOD was also released under the
GPL in early 2010.
As encoders, toolame could be used for DAB, and CRC developed a closed-
source CRC-DABPLUS DAB+ encoder.
These three CRC-tools, and some additional services available on the now
unreachable website3 [Link] were part of the CRC-mmbTools.
These tools made it possible to set up the first DAB transmission experiments.
In 2012, these tools received experimental support for single-frequency networks,
a functionality that has been developed by Matthias P. Brändli during his Master’s
thesis4 . Because SFNs are mainly used in TM 1, CRC subsequently released a
patch to CRC-DABMOD that enabled all four transmission modes.
At that point, involvement from CRC started to decline. The SFN patch
was ultimately never included in the CRC-mmbTools, and as time passed, the
de-facto fork on [Link] was receiving more and more features. Having
two different programs with the same name made things complicated, and so, with
the approval of CRC, the tools were officially forked in February 2014, and given
the new name ODR-mmbTools. They are now developed by the Opendigitalradio
association.
In April 2014, the official CRC-mmbTools website went offline, and it has
become very difficult, if not impossible, to acquire licences for the CRC-DABPLUS
encoder. Luckily there is an open-source replacement available, which was part
of Google’s Android source. This encoder has been extended with the necessary
DAB+ -specific requirements (960-transform, error correction, framing, etc.), and
now exists under the name fdk-aac. The encoder ODR-AudioEnc can use this
library to encode for DAB+ .
ODR-DabMod
ODR-DabMux
ODR-PadEnc
ODR- ODR-
mmbTools EncoderManager
etisnoop
ODR-
ODR- SourceCompanion
AudioEnc
3.2.1 ODR-DabMux
ODR-DabMux implements a DAB multiplexer that combines all audio and data
inputs and outputs them in the form of a file in ETI format. This can be used
offline (i.e. not in real time) to generate ETI data for processing later, or for use
in a real-time streaming scenario (e.g. in a transmitter).
ODR-DabMux can read input audio or data from files (“.mp2” for DAB, “.dabp”
for DAB+ ), FIFOs (also called “named pipes”), or from a network connection. This
network connection can use UDP (STI-D) or EDI.
The configuration of the multiplexer is given in a configuration file, whose
format is defined in the example files in the doc/ folder inside the ODR-DabMux
repository.
3.2.2 ODR-DabMod
ODR-DabMod is a software-defined DAB modulator that receives or reads ETI
data in streams or from files, and generates modulated I/Q data which can be
used for transmission.
This I/Q data which is encoded as complex floats (32bits per complex sample)
can be written to a file or pipe, sent to a USRP device using the integrated output
for the open-source USRP Hardware Driver (UHD) or to other software-defined
radio (SDR) devices using the SoapySDR5 library.
The output of the modulator can also be sent to a GNURadio flow-graph for
further processing, conversion or analysis using a ZeroMQ network connection.
5 [Link]
3.2.3 ODR-AudioEnc
The ODR-AudioEnc encoder can be used to encode for DAB and DAB+ . It includes
a TooLAME-based MPEG encoder, and uses the fdk-aac library as an external
dependency to encode DAB+ .
The integrated TooLAME library is an MPEG-1 Layer II audio encoder that
is used to encode audio for the DAB standard. Another encoder called twolame
is not compatible with DAB even though it is more recent than TooLAME, and
cannot be used for our application.
The framing and error correction which are needed for DAB+ , as well as
the programme-associated data (PAD) insertion, the output EDI protocol, and
the input from Advanced Linux Sound Architecture (ALSA) were then added by
different parties.
3.2.4 ODR-PadEnc
This encoder is able to generate programme-associated data (PAD) that can be
injected into ODR-AudioEnc. It supports reading and encoding Dynamic Label
Segment (DLS) from a text file, and reads images from a folder for MOT Slideshow.
3.2.5 ODR-EncoderManager
The ODR-EncoderManager presents a web-based interface that allows the user to
create, manage and run audio and PAD encoders, and presents a HTTP API to
update Dynamic Label Segment and Slides. One instance can handle several audio
encoders simultaneously, and offers a simpler way to manage the audio encoding
part of the DAB+ transmission chain.
3.2.6 ODR-SourceCompanion
This tool allows using third party audio encoders with the ODR-mmbTools.
3.2.7 etisnoop
Etisnoop is not used in the broadcasting chain directly, but is an analysis tool for
ETI, described in the ETSI standard [1]. ODR-DabMux can write an ETI file
that can be analysed with etisnoop. The tool can be used to verify the multiplex
signalling, the presence of data in the subchannels, and it can decode audio into
files.
Additionally, it can output statistics in YAML format, which is useful in combi-
nation with an RTLSDR receiver and the dab2eti tool to monitor transmissions.
Remarks The odr-dabmux and odr-dabmod packages do not include the web-
based GUI Mux Manager and the GUI and Digital Predistortion Computation
engine. If you need those, then you should look at the other 2 installation options
below.
Remarks The installation script will compile the tools with all the possible features
in order to give you the greatest configuration flexibility. It will also install the
supervisord package with the configuration files for a live broadcasting of 2 dab+
programs. For more installation details, please refer to the install/[Link]
file in the github repository.
• odr-audioenc [Link]
• odr-padenc [Link]
• odr-dabmux [Link]
• odr-dabmod [Link]
We assume that the audio data for the two programmes is located in uncom-
pressed 48kHz WAV in the files [Link] and [Link]. The first step is to
encode the audio. The DAB programme is encoded to prog1.mp2 using:
1 odr - audioenc -- dab -b 128 -i prog1 . wav -o prog1 . mp2
The DAB+ programme is encoded to [Link]. The extension .dabp is
arbitrary, but since the framing is not the same as for other AAC encoded audio, it
makes sense to use a special extension. The command is:
1 odr - audioenc -i prog2 . wav -b 88 -o prog2 . dabp
These resulting audio files can then be used with ODR-DabMux to create
an ETI file. ODR-DabMux supports many options, which makes it much more
practical to set a configuration file rather than using very long command lines.
Here is a short file that can be used for the example, which will be saved as
[Link]:
1 general {
2 dabmode 1
3 nbframes 5000
4 }
5 ensemble {
6 id 0 x4fff
7 ecc 0 xec ; Extended Country Code
8
• inputuri: This defines the interface and port on which to listen for incoming
data. It must be of the form <proto>://*:<port>, with proto may be
either tcp or udp.
Or the sound card clock is a bit fast, and the buffer will be filled up faster
than data is consumed by the multiplexer. At some point, the buffer will hit the
maximum size, and one frame will be discarded. This also creates an audible glitch.
Consumer grade sound cards have clocks of varying quality. While these glitches
would only occur sporadically for some, bad sound cards can provoke such behaviour
in intervals that are not acceptable, e.g. more than once per hour.
Both situations are suboptimal, because they lead to audio glitches, and also
degrade the ability to compensate for network latency changes. It is preferable to
use the drift compensation feature available in ODR-AudioEnc, which insures that
the encoder outputs the encoded bitstream at the nominal rate, aligned to the
NTP-synchronised system time, and not to the sound card clock. The sound card
clock error is compensated for inside the encoder.
Complete examples of such a setup are given in the scenarios.
6 Usage Scenarios
6.1 Experimentation
6.1.1 Creation of Non-Realtime Multiplex
The creation of a ETI file containing two programmes, one DAB and one DAB+ is
covered in section 5.1.
5 [ output ]
6 output = file
7
8 [ fileoutput ]
9 format = complexf
10 normalize =1
11 filename = myfirst . iq
This is a very minimal file that defines only the necessary settings equivalent to
the above command line options. The configuration file however supports more
options that the command line, and becomes easier to manager once the set
becomes more complex. It is best to use the example configuration available in
the doc/ folder.
1 [ remotecontrol ]
2 telnet =1
3 telnetport =2121
4
5 [ input ]
6 transport = file
7 source = myfirst . eti
8 loop =1
9
10 [ modulator ]
11 digital_gain =0.8
12
13 [ firfilter ]
14 enabled =1
15
16 [ output ]
17 output = uhd
18
19 [ uhdoutput ]
20 mas ter_cl ock_ra te =32768000
21 type = b200
22 txgain =40
23 channel =13 C
This example also shows more options that the example for the file output:
• remotecontrol telnet=1 enables the Telnet server that can be used to
set parameters while the modulator is running.
• loop=1 rewinds the input file when the end is reached. The same ETI file
will be transmitted over and over.
• digital_gain=0.8 reduces the output sample deviation, to reduce com-
pression in the USRP.
• firfilter enabled=1 enables the FIR filter to improve the spectrum mask.
If you want to customise the filter used, you can create your own filter taps
file using ODR-DabMod/doc/fir-filter/[Link].
• master_clock_rate=32768000 sets the USRP internal clock to a multiple
of 2048000, which is required if we want to use the native DAB sample rate.
• txgain=40 Sets the analog transmit gain of the USRP to 40dB, which is
specific to the B200. If you go above 70dB you will start to see nonlinearities.
Some of these options are not necessary for the system to work, but they
improve the performance.
Remarks concerning the USRP B200 The USRP B200 depicted in figure 2
is the device we are using most. It’s performance is proven in a production
environment, it supports the transmit synchronisation necessary for SFN and is
robust enough for 24/7 operation.
Remarks concerning other USRP models We have used the USRP1, the
USRP2 and the USRP B100 with the tools. The WBX is the most appropriate
daughterboard for these models.
The txgain setting has another range, it is best to start at 0dB, and increase
it in steps of 3dB or smaller while measuring the output signal, until the correct
power is reached.
6.2.2 SoapySDR
ODR-DabMod supports other radio interfaces using the SoapySDR8 vendor-neutral
and platform independent library to drive SDR devices. It can be used to drive
the LimeSDR boards, the HackRF from Great Scott Gadgets and the Fairwaves
XTRX devices, among others. Installation dependencies are shown in the INSTALL
file, and an example configuration is in doc/[Link].
We are going to illustrate this with the HackRF. The HackRF is an entry
level yet versatile SDR which provides coverage between ≈ 10MHz to 6GHz, and
DAB signals been successfully generated with it in VHF Band III (174–240MHz),
L-Band (1462–1467.5MHz) and even the worldwide ISM Band (2400–2500MHz).
The latter (subject to local regulations) is a licence exempt band which may be
useful for performing freely radiating tests at low power. Cheap MMDS converters
are currently available which helpfully provide a Band III IF output providing a
direct feed to the aerial input of a receiver. Before choosing a converter it is
important to pay close attention to the specifications. The local oscillator phase
noise performance, and the dynamic range (due to the heavy use of the band) are
both particularly important.
The HackRF has selectable baseband filters, however the lowest filter setting
(1.75MHz) does not provide adequate image rejection at the native sampling rate
7 [Link]
8 [Link]
of 2048k samples per second. An appropriate rate to start with is 4096k, and
for some purposes this may well be adequate as this moves the image signals
generated within the radio far enough into the stop-band of filter to attenuate
them significantly. Since ODR-DabMod v1.0.1, the digital gain setting is not be
influenced by the sample rate anymore, and should be set below 1, with some
margin, to avoid digital clipping on modulation peaks.
Depending on the capabilities of the host computer, using higher sampling rates
(6144k, and even 8192k) may be possible. This oversampling is desirable as it
helps to produce a cleaner spectral output. At higher rates one needs to ensure
that samples are not being dropped on the USB and that CPU resources are not
being contended.
The shoulder performance has been measured with a value at a little better than
35dB, which is roughly equivalent to that obtained from first generation commercial
modulator equipment. This can be increased to a relatively respectable ≈ 40dB by
enabling the FIR baseband filter in ODR-DabMod. The maximum output power
available to meet these performance figures is approximately −10dBm RMS.
The following configuration file [Link] illustrates how to send the [Link]
over a HackRF on channel 13C:
1 [ remotecontrol ]
2 telnet =1
3 telnetport =2121
4
5 [ input ]
6 transport = file
7 source = myfirst . eti
8 loop =1
9
10 [ modulator ]
11 digital_gain =0.8
12 rate =4096000
13
14 [ firfilter ]
15 enabled =1
16
17 [ output ]
18 output = soapysdr
19
20 [ soapyoutput ]
21 device = driver = hackrf
22 mas ter_cl ock_ra te =32768000
23 txgain =23
24 channel =13 C
25 bandwidth =1750000
For other SoapySDR hardware, the available device-driver, sampling rates, the
TX gain range and the antenna selection can be discovered using the SoapySDRUtil
–probe command.
5 [ input ]
6 transport = file
7 source = myfirst . eti
8 loop =1
9
10 [ modulator ]
11 digital_gain =0.8
12 rate =4096000
13
14 [ firfilter ]
15 enabled =1
16
17 [ output ]
18 output = file
19
20 [ fileoutput ]
21 format = complexf
22 filename =/ tmp / ofdm . fifo
The output fifo has to be created beforehand.
Example of using ODR-DabMod with a Pipe-driven device transfer utiliy:
1 mkfifo / tmp / ofdm . fifo
2 odr - dabmod mod . ini &
3 device - utility -- arguments
for dedicated encoding machines that can contribute the encoded audio over an IP
network.
An alternative to using ALSA is JACK9 that can be used with a multi-channel
sound card. JACK will expose every audio input channel, and several encoders
can be launched that also connect to JACK. The input channels can be freely
connected to the encoders thanks to the virtual JACK patch panel. It might be possi-
ble to use the lib-
VLC input too, to
be defined.
6.3.2 Using Existing Web-Streams
One common scenario is to transmit radio stations that already are available as
web-radio streams. For simplicity, it makes sense to get these web streams, which
are most often encoded in mp3 and available through HTTP, decode them, and
use them as audio source for the DAB or DAB+ encoder.
The advantage of this approach is that the radio itself does not need to setup a
new infrastructure if the stream is of good quality. The main disadvantage is that
the audio is encoded twice, and this coding cascading degrades the audio quality.
Often, web-streams are encoded in mp3 at 44100Hz sample-rate, whereas
DAB is most often 48000Hz or sometimes 32000Hz. A sample-rate conversion is
necessary in the stream decoder.
There are many different stream decoders, and gstreamer, mpg123 and mplayer
have been tested. By far the easiest way is to use the libVLC binding that can
be compiled for ODR-AudioEnc. This library has the same features as the VLC
audio player, but the audio data is directly passed to the encoding routines. This
allows the encoder to receive all network sources VLC supports, not only HTTP
web-streams but also less common setups e.g. encoded audio inside multicast UDP
MPEG-TS. This is illustrated in “Studio A” in figure 3.
We have also achieved good results with mplayer, and the dab-scripts reposi-
tory10 contains the script [Link] that uses mplayer, and illustrates how
it is possible to encode a web-stream to DAB+ . JACK is used to interconnect the
stream decoder to the DAB+ encoder. This is illustrated in “Studio B”.
The scripts are designed for production use, and also contain automatic restart
logic in case of a failure. They send an email and write a message into the system
log.
Multiplex operator
dab-script
libVLC stream dec
ODR-AudioEnc ODR-AudioEnc
EDI EDI
EDI
Multiplexer Modulator Analog
device
ODR-DabMux ODR-DabMod stuff
11 As of ODR-DabMod v1.0.1, this feature is still in the next development branch, and not
7 Data Features
7.1 Programme-Associated Data
It is possible to encode Dynamic Label Segment and Slideshow using ODR-PadEnc,
and to inject the PAD data into the audio encoder.
ODR-AudioEnc and ODR-PadEnc need to be launched with the same PAD
socket identifier, and they will be able to communicate. The PAD length specifies
the amount of data that is taken away from audio and used for PAD. Valid values
are 6, and the range 8 to 196. When not transmitting slides, small PAD lengths are
perfectly suitable. When using slides, it is better to use values around 30. Higher
lengths will of course accelerate the transmission of the slide at the expense of
reduced audio quality during the transmission time.
ODR-PadEnc will itself only take DLS and slides from files on the system it
runs on. If your playout system is able to push updates using FTP, you will need
to configure and FTP server to present the right folder.
A more modern approach is offered by ODR-EncoderManager, which will not
only configure and run your encoders, but also present you an HTTP API to update
DLS and upload slides. More information is available in its README.
7.3 Announcements
The ODR-DabMux multiplexer supports the insertion of FIG 0/18 and FIG 0/19
that are used to define and trigger announcements according to ETSI TR 101
496-2 Clause 3.6.8 [3]. An example configuration is available in the ODR-DabMux
repository, in doc/[Link].
The best known application for announcements is traffic information, but other
kinds of announcements can also be signalled. ODR-DabMux allows triggering the
announcements through the telnet and ZMQ remote control interfaces.
8 System Environment
In this section, we describe the system configuration requirements for the continuous
operation of the tools. The production environment differs in some respects to
those used for experimentation and in laboratory testing. Monitoring, automatic
recovery (in case of errors) and resilience are crucial in 24/7 operations. The term
production environment will be used here to refer to such use.
supervisord One possibility is to use supervisord13 which can launch the tools
and monitor their proper execution. It will restart the processes and optionally
inform the operator by email.
Once installed, supervisord reads its configuration file in /etc/[Link]
and launches the processes that are to be monitored. Each process is described by
a file. The following example assumes the tools are run as user odr, and that the
multiplex configuration is in /home/odr/[Link], and that ODR-DabMux is
to be launched. The standard output and standard error streams of ODR-DabMux
are written to the specified log files.
1 [ program : ODR - DabMux ]
2 command = odr - dabmux config . mux
3 directory =/ home / odr
4 user = odr
5 autostart = true
6 autorestart = true
7 stdout_logfile =/ home / odr / logs / mux . out . log
8 stderr_logfile =/ home / odr / logs / mux . err . log
Once this configuration has been added to the supervisord configuration, the
settings have to be re-read using:
1 supervisorctl reread
In order for supervisord to start managing and running this process, it needs to
be added:
1 supervisorctl add ODR - DabMux
Setting up more processes (such as any of the other tools) can be easily
achieved by customising the configuration template above. Examples are provided
in the mmbtools-aux repository, under the supervisor folder - these need to be
changed to reflect the paths that are in use on your system.
supervisord also includes a small web-server that can display the state of the
managed processes. It is enabled with the [inet_http_server] setting in the
configuration file.
systemd Most recent GNU/Linux distributions use systemd as init system, which
also can handle the supervision of processes. To achieve this, systemd unit files have
to be written for the tools. For more information, see the systemd documentation. Give an example
unit file
13 [Link]
8.3 Logging
Collecting information about events is essential within a production environment.
This information is essential forensic analysis, and tracing sources of trouble. This
is achieved through the logging of important messages that can be sent by the
tools.
ODR-DabMux and ODR-DabMod both support logging to standard error, to
a file and to the system logger syslog. Logging to syslog is the most flexible
approach; log information can be forwarded over the network to a centralised
logging server - where logs can then be filtered according to the priority of each
message. Both tools log to the LOCAL0 facility which in turn can be redirected
into an ODR-mmbtools specific log file. Describe rsyslog
In order to avoid the log files from becoming undesirably large, logrotate configuration
8.4 Timing
The ODR-mmbTools require the system time to be accurate in order for them to
function correctly - this is especially important when running a SFN, but is also
important for standalone transmitters when in a production environment. It is also
important to remember that most receivers have a clock that is synchronised to
the clock time which is being transmitted by the multiplex to which it has been
tuned.
The system needs to run a NTP client that synchronises the system time over
the network. Correct synchronisation can be checked using chronyc tracking
or the the lpeers command of the ntpq tool, depending on if you use chrony or
openntp. The magnitude of the offset should be below 10 ms.
The performance of the NTP synchronisation should also be monitored perma-
nently during operation.
ODR-DabMux can run a command at startup to verify if the NTP client
is properly working, using the startupcheck setting. This can be used to call
ntp-wait or chronyc waitsync to wait for proper NTP sync.
In addition to basic system measurements like CPU, RAM and disk usage, NTP
synchronisation, disk and network performance, there are custom data sources
available for ODR-DabMux and ODR-DabMod.
The ODR-DabMux data sources include EDI and ZMQ input buffer monitoring
(buffer level, underruns and overruns) and the peak audio input levels (mono, or
stereo). The plugin for ODR-DabMod can monitor SDR device statistics among
others.
The plugins are written in python and are located in the doc folder in the
repositories. Copy them to /etc/munin/plugins.d and restart munin-node. They
require that the ODR-DabMux management server, and the ZeroMQ remote
control enabled on the ports give in the example configurations.
#
# Test odrmux checks the state and the statistics
# of the ODR-DabMux service.
#
[odrmux]
ENVFILE $XYMONCLIENTHOME/etc/[Link]
CMD $XYMONCLIENTHOME/ext/[Link]
LOGFILE $XYMONCLIENTLOGS/[Link]
INTERVAL 5m
After a restart of the xymon client, the script [Link] will be invoked once
every 5 minutes.
ODR:select(<SubChannelName0>;<SubChannelName1>;...)
The sub-channels not named will still be shown, but no alerts will be generated
for those sub-channels. This is visible as the green/yellow/red icons are missing
for those sub-channels.
Six statistic values are gathered by the script, namely BufferMin, BufferMax,
PeakLeft, PeakRight, UnderRun and OverRun. It is found that only the latter
two seem to contain sensible values all the time, so those values are the only ones
shown in a graph. Note that those values retrieved by the script are ever-increasing
counters, showing the total number of over-runs or under-runs. In the graph, the
average number of over-runs or under-runs per second, averaged over a period of 5
minutes, is shown.
The first step is to have the collected statistics to be moved into a database, a so-
called Round Robin Database. This is accomplished by adding a file named [Link]
in /usr/lib/xymon/server/etc/xymonserver.d containing the following lines:
TEST2RRD+=",odr_mux=devmon"
GRAPHS+=",odr_mux::1"
The next step is to define the layout of the graph. Create a file named
[Link] in /usr/lib/xymon/server/etc/graphs.d containing the fol-
lowing lines:
#
# Graphs to show the statistics collected from an
# Opendigitalradio DabMux server.
#
[odr_mux]
FNPATTERN ^odr_mux\.(.+)\.rrd$
TITLE , Frame loss rate
YAXIS Rate [/s]
-l 0
DEF:ur@RRDIDX@=@RRDFN@:Underrun:AVERAGE
DEF:or@RRDIDX@=@RRDFN@:Overrun:AVERAGE
LINE1:ur@RRDIDX@#FF0000:@RRDPARAM@ underrun
GPRINT:ur@RRDIDX@:MIN:Min \: %5.1lf %s
GPRINT:ur@RRDIDX@:MAX:Max \: %5.1lf %s
GPRINT:ur@RRDIDX@:AVERAGE:Avg \: %5.1lf %s
GPRINT:ur@RRDIDX@:LAST:Cur \: %5.1lf %s\n
LINE1:or@RRDIDX@#00FF00:@RRDPARAM@ overrun
GPRINT:or@RRDIDX@:MIN: Min \: %5.1lf %s
GPRINT:or@RRDIDX@:MAX:Max \: %5.1lf %s
GPRINT:or@RRDIDX@:AVERAGE:Avg \: %5.1lf %s
GPRINT:or@RRDIDX@:LAST:Cur \: %5.1lf %s\n
#USRP1
SUBSYSTEMS=="usb", ATTRS{idVendor}=="fffe", ATTRS{idProduct}=="0002", MODE:="0666"
#B100
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0002", MODE:="0666"
#B200
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2500", ATTRS{idProduct}=="0020", MODE:="0666"
• Some audio sources are web-streams, some are using remote ODR-AudioEnc
encoders;
• All audio encoders will insert PAD with DLS, and optionally slideshow;
• We enable both telnet and zmq remote control interfaces for management
purposes;
• The setup must be resilient to program failure and restart them automatically,
also informing the operator;
This skips over planning considerations like choice of site location, antenna
diagrams, appropriate transmit power or regulation aspects, as we assume these
topics are were already taken care of. With the outline set, we will now go through
a list of steps that will lead to a functional and reliable broadcast setup.
Install the OS The operating system needs to be installed next. All the depen-
dencies for the tools need to be installed, as well as the additional tools needed for
the system: supervisord for process supervision, Munin for monitoring, logging and
logrotate configuration, proper NTP setup, configuring real-time scheduling and
additional topics discussed in section 8. If you need to prepare remote encoders,
this has to be done for all the machines you will use.
Install the tools The tools themselves need to be installed, as discussed previously.
Then you need to prepare the configuration files. If you used the dab-script
installation tool, then you will need to adapt them. Otherwise, for every programme,
create a folder for the slideshow images and gather the slides, and prepare the
interfaces for DLS text. Write the supervisord configuration files that are used
to launch all ODR-AudioEnc and ODR-PadEnc processes. Write the multiplex
configuration, with all the entries for your programmes and an appropriate supervisor
configuration. Setup ODR-DabMux munin monitoring as desired.
Verify the Multiplexer At this point you should already be able to launch the
configured tools and verify that they start, connect properly and stay running. You
can simulate process failures by killing any of the tools; the supervisor should restart
it. You could use etisnoop and other ETI analysis tools to verify that your multiplex
is valid, or listen in on the programmes by using netcat piped into dablin.17 Also
check that logging and munin monitoring works.
TCP on port 9200. Replace MUX by the multiplexer IP address. See [Link]
Opendigitalradio/dablin for information about dablin.
Tune RF Settings Also experiment with settings that have an impact on the
spectrum performance: OFDM Symbol Windowing and the FIR Filter settings. If
you have measurement equipment that can demodulate and measure MER, make
sure it is within bounds, ideally better than 25dB. You can trade-off MER against Justify this value.
peak-to-average power ratio using the normalise_variance and CFR settings.
Insert Mask Filter The final measurements before installation needs to be done
with the mask filter connected after the power amplifier, to ensure that the
spectrum mask is satisfied. The mask filter also needs some warm up time. It is
also advisable to use a vector-network analyser to check the mask filter’s S11 and
S12 parameters.
Final Setup Finally, set up the system at your transmission site, power up to
nominal power, do coverage measurements and compare them to the simulations.
By now, you will also have to deploy all the remote encoders at the programme
originators’ studios.
10 Single-Frequency Networks
10.1 Requirements
The DAB standard has been designed to enable the creation of transmission
networks where several transmitters share the same frequency, and send the same
signal synchronously. Such networks are called “Single-Frequency Networks”. Each
transmitter needs to be fed the same multiplex stream, which must include timing
information required for synchronisation. This timing information implies that a
time reference must be installed at each transmitter.
The requirements for a SFN can therefore be summarised in three points:
• The signal must be identical for each transmitter. This requires a common
multiplexers, and a distribution network that carries the ETI to all modulators.
• The signal must be transmitted at the same time, which requires a time
reference at each site. It also implies that the ETI stream must contain
timestamps.
Modulator USRP
ODR-DabMod
Multiplexer
ODR-DabMux 10MHz & 1PPS
... Includes timestamps Several km
into ETI stream IP Network Time
standard
Transmitter site #1
Multiplex operator
Modulator USRP
ODR-DabMod
Time
standard
Transmitter site #2
6 ...
7
8 outputs {
9 edi {
10 destinations {
11 tcp {
12 protocol tcp
13 listenport 9201
14 }
15 }
16 enable_pft false
17 }
18 ; This throttles muxing down to nominal rate
19 throttle " simul :// "
20 }
These settings alone do not tell the modulator to enable synchronisation of the
transmission, they only select how the USRP is configured. To enable timestamp
decoding and the frame synchronisation logic in ODR-DabMod, the following
settings must also be set:
1 [ delaymanagement ]
2 synchronous =1
3
If this offset is set to a higher value, there will be a bigger delay (measured
in absolute time) between the point in time a frame is multiplexed and the point
in time the frame is transmitted. More frames therefore will be buffered in the
ODR-DabMod input, increasing robustness against network latency fluctuations.
The offset already has two functions: it compensates for network delay and
allows a trade-off between delay and robustness. But it also serves a third purpose:
When doing coverage planning for an SFN, it is necessary to be able to control
the relative delay between transmitters in the order of milliseconds. This tuning
of relative delay is included in the “offset” setting. We can therefore rewrite the
above equation as:
the components. The PCB itself can be manufactured in any PCB fab.
19 It is slightly more complex, because one transmission frame is composed of several ETI frames
in some transmission modes, but the principle stays the same. It suffices for this explanation that
we can derive the transmission time from the TIST information.
The module includes the correct pin header so that it can be mounted directly
onto the USRP B200, but also includes footprints for SMA connectors for other
usages. Communication between the PC and the GPS is possible through USB or
over UART through the B200.
The u-blox LEA-M8F module is a GPS disciplined TCXO module, with a one-
pulse per second and a reference clock output at a frequency of 30.72 MHz. This
is different than what the normal USRP firmware expects.
Because the UART communication protocol and the reference clock frequency
are different than for the GPSDO units Ettus supports, a modified version of UHD
is necessary. This version includes new UHD sensors, used by ODR-DabMod to
verify that the GPSDO is locked properly, and different configuration settings for
the clock management PLL inside the USRP, making the USRP compatible to the
30.72MHz reference clock frequency.
The modified UHD version is available on the ODR GitHub20 and is used in
place of Ettus’ UHD.
ODR-DabMod can be configured as follows:
1 [ uhdoutput ]
2 refclk_source = gpsdo
3 pps_source = gpsdo
4 b e h a v i o u r _ r e f c l k _ l o c k _ l o s t = crash
5 m a x _ g p s _ h o l d o v e r _ t i m e =600
20 [Link]
• /mp3/SID will give you a live mp3 stream of the primary component of the
given service id.
• /fic will send a data stream containing the FIC. This can be saved to
file and analysed offline with other tools, among which etisnoop (using its
-I option). etisnoop is also able to do live analysis of the FIC, e.g. with
curl -s [Link] -I /dev/stdin whose
YAML output can in turn be processed further.
• /channel will return the currently tuned channel on receiving a GET request,
and set the channel and restart the receiver on receiving a POST.
Other HTTP URLs give back information that needs to be processed further.
See the script code inside [Link] to understand how to work with it.
• /spectrum will send a sequence of float values that show the spectrum power
density of the signal.
• /nullspectrum will send a sequence of float values that show the spectrum
power density of the NULL symbol, where the TII carriers are visible.
4/catid,13/#28
C Bibliography
References
[1] ETSI. ETS 300 799, Digital Audio Broadcasting (DAB); Distribution interfaces;
Ensemble Transport Interface (ETI), September 1997.
[2] ETSI. TR 101 495, Digital Audio Broadcasting (DAB); Guide to DAB standards;
Guidelines and Bibliography, November 2000. V1.1.1. All DAB standards are
available at [Link]
[3] ETSI. TR 101 496-2, Guidelines and rules for implementation and operation;
Part 2: System features, November 2000. V1.1.1.
[4] ETSI. TS 102 693, Digital Audio Broadcasting (DAB); Encapsulation of DAB
Interfaces (EDI), November 2009. V1.1.2.
[5] ETSI. TS 103 176, Digital Audio Broadcasting (DAB); Rules of implementation;
Service information features, July 2013. V1.1.2.
[6] ETSI. EN 300 401, Digital Audio Broadcasting (DAB) to mobile, portable and
fixed receivers, October 2016. V2.1.1.
[7] ETSI. TS 101 768, Digital Audio Broadcasting (DAB); Registered Tables,
August 2017. V2.2.1.
[8] Hoeg, W., and Lauterbach, T. Digital Audio Broadcasting; Principles and
Applications of DAB, DAB+ and DMB. John Wiley & Sons Ltd., 2009.