ODR-mmbTools Open-Source Software-Defined DAB + Tools - PDF

Please download to get full document.

View again

of 26
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information Report
Category:

Business & Finance

Published:

Views: 32 | Pages: 26

Extension: PDF | Download: 2

Share
Related documents
Description
ODR-mmbTools Open-Source Software-Defined DAB + Tools Opendigitalradio Project Documentation This work is licensed under a Creative Commons Attribution-ShareAlike
Transcript
ODR-mmbTools Open-Source Software-Defined DAB + Tools Opendigitalradio Project Documentation This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. See or LICENCE.txt Contents Contents Contents i Acronyms 1 1 Introduction 2 2 Purpose 2 3 Presentation of the Tools Origins Included Tools ODR-DabMux ODR-DabMod ODR-AudioEnc ODR-PadEnc Interfacing the Tools Files Over the Network Between Encoder and Multiplexer Authentication Support Between Multiplexer and Modulator Pipes Usage Scenarios Experimentation Creation of Non-Realtime Multiplex Modulation of ETI for Offline Processing Interfacing Hardware Devices Ettus USRP Other Hardware Audio Sources Local Audio Card Using Existing Web-Streams Encoders at Programme Originator Studios System Environment Launching the tools Logging Timing Monitoring using munin Real-time Scheduling Accessing the USRP as Non-root rev f0a3eef, Tue Oct 25 10:53: , andreas128. i Acronyms 7 Single-Frequency Networks Requirements Multiplexer Configuration Modulator Configuration Using ODR LEA-M8F GPSDO board Using Ettus GPSDO A ODR-DabMux ETI file formats 24 B Bibliography 24 References 24 Acronyms 1PPS One pulse per second CIF Common Interleaved Frame CRC Communications Research Centre Canada DAB Digital Audio Broadcasting DMB Digital Multimedia Broadcasting ETI Ensemble Transport Interface ETSI European Telecommunications Standards Institute FIC Fast Information Channel HE-AAC High Efficiency Advanced Audio Codec mmbtools Mobile Multimedia Broadcasting Tools MNSC Multiplex Network Signalling Channel NTP Network Time Protocol OCXO Oven-Controlled Crystal Oscillator OFDM Orthogonal Frequency-Division Multiplexing PRBS Pseudo-Random Bit Sequence SFN Single-Frequency Network TCXO Temperature-Compensated Crystal Oscillator TIST Timestamp field in the ETI frame TM Transmission Mode UHD USRP Hardware Driver USRP Universal Software-Radio Peripheral rev f0a3eef, Tue Oct 25 10:53: , andreas128. 1 3 Presentation of the Tools 1 Introduction This is the official documentation for the ODR-mmbTools. These tools can be used to experiment with DAB modulation, learn the techniques behind it and setup a DAB or DAB + transmitter. This documentation assumes that you are already familiar with base concepts of the DAB system. To get started with the ODR-mmbTools, understanding how the DAB transmission chain is structured is a prerequisite. The DAB Bible by Hoeg and Lauterbach [2] and the Guide to DAB standards from the ETSI [1] can be used as a starting point. In this document, the terms DAB and DAB + are used somewhat interchangeably, 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 different programs that are part of the ODR-mmbTools each have their own documentation regarding command-line options and configuration settings, and the opendigitalradio.org wiki 1 contains many explanations and pointers, but there is no single source of documentation available for the whole tool-set. This document aims to solve this, by first outlining general concepts, presenting different usage scenarios and detailing a complete transmission setup. With this document in hand, you should be able to understand all elements composing a ODR-mmbTools transmission chain, and how to set one up. 3 Presentation of the Tools 3.1 Origins Before we begin with technical details, first a word about the history of the mmbtools. In 2002, Communications Research Centre Canada 2 started developing a DAB multiplexer. This effort evolved through the years, and was published in September 2009 as CRC-DabMux under the GPL open-source licence. CRC also developed a DAB modulator, called CRC-DABMOD, which could create baseband I/Q samples from an ETI file. This I/Q data could then be set to a hardware device using another tool. For the Ettus USRPs, a wave player script was necessary to interface to GNURadio. Only DAB Transmission Mode 2 was supported. CRC-DABMOD was also released under the GPL in early As encoders, toolame could be used for DAB, and CRC developed a closedsource CRC-DABPLUS DAB + encoder. These three CRC- tools, and some additional services available on the now unreachable website 3 were part of the CRC-mmbTools. These tools made it possible to set up the first DAB transmission experiments There are some snapshots of the website available on rev f0a3eef, Tue Oct 25 10:53: , andreas128. 2 3 Presentation of the Tools 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 thesis 4. 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 finally never included in the CRC-mmbTools, and as time passed by, the de-facto fork on was receiving more and more features. Having two different programs with the same name made things complicated, and the tools were officially forked with the approval of CRC 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 sources. 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 encoder DAB Included Tools The ODR-mmbTools are composed of several software projects: ODR-DabMux, ODR-DabMod, ODR-AudioEnc, ODR-PadEnc, and other scripts, bits and pieces that are useful for the setup of a transmission chain ODR-DabMux ODR-DabMux implements a DAB multiplexer that combines all audio and data inputs into an ETI output. It can be used off-line (i.e. not real-time) to generate ETI data for later processing, or in a real-time streaming scenario (e.g. in a transmitter). It can read input audio or data from files (.mp2 for DAB,.dabp for DAB + ), FIFOs (also called named pipes ) or a network connection. The network connection can use UDP or ZeroMQ. The CURVE authentication mechanism from ZeroMQ can also be used to authenticate the encoder, in order to avoid that a third-party can disrupt or hijack a programme. The ensemble configuration can be specified on the command line using the options described in the manpage, or using a configuration file. The command line options are kept to be compatible with CRC-DABMUX, but using the configuration file is preferred, because it supports more options ODR-DabMod ODR-DabMod is a software-defined DAB modulator that receives or reads ETI, and generates modulated I/Q data usable for transmission. This I/Q data which is encoded as complex floats (32bits per complex sample) can be written to a file or pipe, or sent to a USRP device using the integrated 4 The corresponding report is available at rev f0a3eef, Tue Oct 25 10:53: , andreas128. 3 3 Presentation of the Tools UHD output. Other SDR platforms can be used if they are able to accept the I/Q data. The output of the modulator can also be used in GNURadio if format conversion or graphical analysis (spectrum) is to be done 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 a MPEG-1 Layer II audio encoder that is used to encode audio for the DAB standard. The original project has been unmaintained since 2003, but the twolame fork that pursues the development removed the DAB framing. Because of this, twolame is not suitable for DAB. The necessary framing and error-correction that DAB + mandates, the PAD insertion, the ZeroMQ output and the ALSA input were then added by different parties ODR-PadEnc This encoder is able to generate programme associated data that can be injected into ODR-AudioEnc. It supports DLS, reading from a file, and MOT Slideshow, where the slides are read from a folder. rev f0a3eef, Tue Oct 25 10:53: , andreas128. 4 4 Interfacing the Tools 4 Interfacing the Tools 4.1 Files The first versions of these tools used files and pipes to exchange data. For offline generation of a multiplex or a modulated I/Q, it is possible to generate all files separately, one after the other. Here is an example to generate a two-minute ETI file for a multiplex containing two programmes: one DAB programme at 128kbps one DAB + programme at 88kbps We assume that the audio data for the two programmes is located in uncompressed 48kHz WAV in the files prog1.wav and prog2.wav. 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 prog2.dabp. 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 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 the configuration using a file than using very long command lines. Here is a short file that can be used for the example, which will be saved as 2programmes.mux: 1 general { 2 dabmode 1 3 nbframes } 5 remotecontrol { telnetport 0 } 6 ensemble { 7 id 0 x4fff 8 ecc 0 xec ; Extended Country Code 9 10 local - time - offset auto 11 international - table 1 12 label mmbtools 13 shortlabel mmbtools 14 } 15 services { 16 srv - p1 { label Prog1 } 17 srv - p2 { label Prog2 } 18 } 19 subchannels { 20 sub -p1 { 21 ; MPEG rev f0a3eef, Tue Oct 25 10:53: , andreas128. 5 4 Interfacing the Tools 22 type audio 23 inputfile prog1. mp2 24 bitrate id protection 5 27 } 28 sub -p2 { 29 type dabplus 30 inputfile prog2. dabp 31 bitrate id 1 33 protection 1 34 } 35 } 36 components { 37 comp -p1 { 38 label Prog1 39 service srv - p1 40 subchannel sub - p1 41 } 42 comp -p2 { 43 label Prog2 44 service srv - p2 45 subchannel sub - p2 46 } 47 } 48 outputs { output1 file :// myfirst. eti? type = raw } This file defines two components, that each link one service and one subchannel. The IDs and different protection settings are also defined. The bitrate defined in each subchannel must correspond to the bitrate set at the encoder. The duration of the ETI file is limited by the nbframes 5000 setting. Each frame corresponds to 24 ms, and therefore 120/0.024 = 5000 frames are needed for 120 seconds. The output is written to the file myfirst.eti in the ETI(NI) format. Please see Appendix A for more options. To run the multiplexer with this configuration, run: 1 odr - dabmux 2 programmes. mux This will generate the file myfirst.eti, which will be MB in size. Congratulations! You have just created your first DAB multiplex! With the configuration file, adding more programmes is easy. More information is available in the doc/example.mux 4.2 Over the Network In a real-time scenario, where the audio sources produce data continuously and the tools have to run at the native rate, it is not possible to use files anymore rev f0a3eef, Tue Oct 25 10:53: , andreas128. 6 4 Interfacing the Tools to interconnect the tools. For this usage, a network interconnection is available between the tools. This network connection is based on ZeroMQ, a library that permits the creation of a socket connection with automatic connection management (connection, disconnection, error handling). ZeroMQ uses a TCP/IP connection, and can therefore be used over any kind of IP networks. This connection makes it possible to put the different tools on different computers, but it is not necessary. It is also possible, and even encouraged to use this interconnection locally on the same machine Between Encoder and Multiplexer Between ODR-AudioEnc and ODR-DabMux, the ZeroMQ connection transmits AAC superframes, with additional metadata that contains the audio level indication for monitoring purposes. The multiplexer cannot easily derive the audio level from the AAC bitstream without decoding it, so it makes more sense to calculate this in the encoder. On the multiplexer, the subchannel must be configured for ZeroMQ as follows: 1 sub -fb { 2 type dabplus 3 bitrate 80 4 id 24 5 protection inputfile tcp ://*:9001 8 zmq - buffer 40 9 zmq - prebuffering } The ZeroMQ input supports several options in addition to the ones of a subchannel that uses a file input. The options are: inputfile: This defines the interface and port on which to listen for incoming data. It must be of the form tcp://*: port . Support for the pgm:// protocol is experimental, please see the zmq_bind manpage for more information about the protocols. zmq-buffer: The ZeroMQ input handles an internal buffer for incoming data. The maximum buffer size is given by this option, the units are AAC frames (24 ms). Therefore, with a value of 40, you will have a buffer of = 960 ms. The multiplexer will never buffer more than this value, and will discard data one AAC superframe (5 frames = 100 ms) when the buffer is full. zmq-prebuffering: When the buffer is empty, the multiplexer waits until this amount of AAC frames are available in the buffer before it starts to consume data. The goal of having a buffer in the input of the multiplexer is to be able to absorb network latency jitter: Because IP does not guarantee anything about the rev f0a3eef, Tue Oct 25 10:53: , andreas128. 7 4 Interfacing the Tools latency, some packets will reach the encoder faster than others. The buffer can then be used to avoid disruptions in these cases, and its size should be adapted to the network connection. This has to be done in an empirical way, and is a trade-off between absolute delay and robustness. If the encoder is running remotely on a machine, encoding from a sound card, it will encode at the rate defined by the sound card clock. This clock will, if no special precautions are taken, be slightly off frequency. The multiplexer however runs on a machine where the system time is synchronised over NTP, and will not show any drift or offset. Two situations can occur: Either the sound card clock is a bit slow, in which case the ZeroMQ buffer in the multiplexer will fill up to the amount given by zmq-prebuffering, and then start streaming data. Because the multiplexer will be a bit faster than the encoder, the amount of buffered data will slowly decrease, until the buffer is empty. Then the multiplexer will enter prebuffering, and wait again until the buffer is full enough. This will create an audible interruption, whose length corresponds to the prebuffering. 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 superframe 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 AAC 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 Authentication Support In order to be able to use the Internet as contribution network, some form of protection has to be put in place to make sure the audio data cannot be altered by third parties. Usually, some form of VPN is set up for this case. Alternatively, the encryption mechanism ZeroMQ offers can also be used. To do this, it is necessary to set up keys and to distribute them to the encoder and the multiplexer. 1 encryption 1 2 secret - key keys / mux. sec 3 public - key keys / mux. pub 4 encoder - key keys / encoder1. pub Add configuration example rev f0a3eef, Tue Oct 25 10:53: , andreas128. 8 4 Interfacing the Tools Between Multiplexer and Modulator The ZeroMQ connection can also be used to connect ODR-DabMux to one or more instances of ODR-DabMod. One ZeroMQ frame contains four ETI frames, which guarantees that the modulator always assembles the transmission frame in a correct way, even in Transmission Mode I, where four ETI frames are used together. 4.3 Pipes Pipes are an older real-time method to connect several encoders to one multiplexer on the same machine. It uses the same configuration as the file input but instead of using files, FIFOs, also called named pipes are created first using mkfifo. This setup is deprecated in favour of the ZeroMQ interface. rev f0a3eef, Tue Oct 25 10:53: , andreas128. 9 5 Usage Scenarios 5 Usage Scenarios 5.1 Experimentation Creation of Non-Realtime Multiplex The creation of a ETI file containing two programmes, one DAB and one DAB + is covered in section Modulation of ETI for Offline Processing The ETI file generated before can then be used with ODR-DabMod to generate a file containing I/Q samples. Here, we must chose between using the command line or the configuration file. For a very simple example, using the command line makes sense, but for more advanced features it is preferable to use a configuration file. For illustration, we will present both. To modulate the file myfirst.eti into myfirst.iq, with the default options, the command is simply 1 odr - dabmod myfirst. eti -f myfirst.iq This will create a file containing 16-bit interleaved I/Q at samples per second. The transmission mode is defined by the ETI file. The equivalent configuration file would be 1 [ input ] 2 transport = file 3 source = myfirst. eti 4 5 [ output ] 6 output = file 7 8 [ fileoutput ] 9 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 availble in the doc/ folder. 5.2 Interfacing Hardware Devices Ettus USRP ODR-DabMod integrates support for the UHD library that can interface with all USRP devices from Ettus. The following configuration file mod.ini illustrates how to send the myfirst.eti over a USRP B200 on channel 13C: 1 [ remotecontrol ] 2 telnet =1 3 telnetport =2121 rev f0a3eef, Tue Oct 25 10:53: , andreas 5 Usage Scenarios 4 5 [ input ] 6 transport = file 7 source = myfirst. eti 8 loop = [ modulator ] 11 gainmode =2 12 digital_ gain = [ firfilter ] 15 enabled =0 16 filtertapsfile = simple_ taps. txt [ output ] 19 output = uhd [ uhdoutput ] 22 master_ clock_ rate = type = b txgain =40 25 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. gainmode=2 sets the GainMode to VAR, which reduces overshoots in the output. digital_gain=0.8 reduces the output sample deviation, to reduce compression in the USRP. firfilter enabled=0 can be set to 1 to enable an additional FIR filte
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks
SAVE OUR EARTH

We need your sign to support Project to invent "SMART AND CONTROLLABLE REFLECTIVE BALLOONS" to cover the Sun and Save Our Earth.

More details...

Sign Now!

We are very appreciated for your Prompt Action!

x