1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
|
\section{Usage Scenarios}
\subsection{Experimentation}
\subsubsection{Creation of Non-Realtime Multiplex}
The creation of a ETI file containing two programmes, one DAB and one
\dabplus{} is covered in section \ref{sec-files}.
\subsubsection{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 \texttt{myfirst.eti} into \texttt{myfirst.iq}, with the
default options, the command is simply
\begin{lstlisting}
odr-dabmod myfirst.eti -f myfirst.iq
\end{lstlisting}
This will create a file containing 16-bit interleaved I/Q at $2048000$ samples
per second. The transmission mode is defined by the ETI file.
The equivalent configuration file would be
\begin{lstlisting}
[input]
transport=file
source=myfirst.eti
[output]
output=file
[fileoutput]
filename=myfirst.iq
\end{lstlisting}
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 \texttt{doc/} folder.
\subsection{Interfacing Hardware Devices}
\subsubsection{Ettus USRP}
ODR-DabMod integrates support for the UHD library that can interface with all
USRP devices from Ettus. The following configuration file \texttt{mod.ini}
illustrates how to send the \texttt{myfirst.eti} over a USRP B200 on channel
13C:
\begin{lstlisting}
[remotecontrol]
telnet=1
telnetport=2121
[input]
transport=file
source=myfirst.eti
loop=1
[modulator]
gainmode=2
digital_gain=0.8
[firfilter]
enabled=0
filtertapsfile=simple_taps.txt
[output]
output=uhd
[uhdoutput]
master_clock_rate=32768000
type=b200
txgain=40
channel=13C
\end{lstlisting}
This example also shows more options that the example for the file output:
\begin{itemize}
\item \texttt{remotecontrol telnet=1} enables the Telnet server that can be
used to set parameters while the modulator is running.
\item \texttt{loop=1} rewinds the input file when the end is reached. The
same ETI file will be transmitted over and over.
\item \texttt{gainmode=2} sets the GainMode to VAR, which reduces
overshoots in the output.
\item \texttt{digital\_gain=0.8} reduces the output sample deviation, to
reduce compression in the USRP.
\item \texttt{firfilter enabled=0} can be set to 1 to enable an additional
FIR filter to improve the spectrum mask. This filter needs a file
containing the filter taps, which can be generated using
\texttt{ODR-DabMux/doc/fir-filter/generate-filter.py}. An example taps
file is also available in this folder.
\item \texttt{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.
\item \texttt{txgain=40} Sets the analog transmit gain of the USRP to 40dB,
which is specific to the B200.
\end{itemize}
Some of these options are not necessary for the system to work, but they
improve the performance.
\paragraph{Remarks concerning the USRP B200}
The USRP B200 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.
However, care has to be taken about the host system, especially about the USB
controller. Using USB~2.0 is not a problem for a DAB transmission, both USB~2.0
and USB~3.0 host controllers can therefore be used. Since USB~2.0 has been
around for longer and is more mature, it is sometimes preferable because it
causes less USB errors. This heavily depends on the exact model of the USB
controller inside the host PC, and has to be tested for each system.
The txgain on the B200 varies between $0$dB and about $90$dB. Experience shows
that compression effects begin to appear at values around $85$dB. This might be
different from device to device and needs to measured.
Similarly, the digital gain has to optimised for a given setting. It is
important that there is no digital clipping in the chain, because that leads to
problematic spurious spectrum components, that can disturb or even damage a
power amplifier.
There are some performance measurements available on the Opendigitalradio
wiki.\footnote{\url{http://wiki.opendigitalradio.org/index.php/USRP\_B200\_Measurements}}
\paragraph{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 $0$dB, and increase
it in steps of $3$dB or smaller while measuring the output signal, until the
correct power is reached.
\subsubsection{Other Hardware}
ODR-DabMod supports other radio interfaces using either standard output, or via
a fifo -- the latter must be created prior to runtime with the \texttt{mkfifo} command.
Due to limitations in the UHD driver library, \texttt{/dev/stdout} will only
function correctly if ODR-DabMod is configured at compilation time with the
following argument:
\begin{lstlisting}
--disable-output-uhd
\end{lstlisting}
ODR-DabMod has been tested to work with HackRF from Great Scott Gadgets on i386
and x86 architectures.\footnote{HackRF has not been tested to any degree of
success with ARM-based computers at this time as they do not (yet) capable
of resampling to the required higher rates as the process is highly CPU
intensive.}
The unit is an entry level yet versatile SDR which
provides for $\approx10$MHz to $6$GHz frequency coverage. To use HackRF one must
configure the output of ODR-DabMod to produce 8-bit signed integers, rather
than the default complex floats.
HackRF has selectable baseband filters, however the lowest filter setting
($1.75$MHz) does not provide adequate image rejection at the native sampling rate of
$2048$k samples per second. An appropriate rate to start with is $4096$k, 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. The digital gain in the ODR-DabMod configuration file should
be set to a maximum of $2.4$ at this rate to avoid digital clipping on modulation
peaks.
Example of the settings in the \texttt{mod.ini} file suitable for use with HackRF:
\begin{lstlisting}
[remotecontrol]
telnet=1
telnetport=2121
[input]
transport=file
source=myfirst.eti
loop=1
[modulator]
gainmode=2
digital_gain=2.4
rate=4096000
[firfilter]
enabled=1
filtertapsfile=filtertaps.txt
[output]
output=file
[fileoutput]
format=s8
filename=/dev/stdout
\end{lstlisting}
The output fifo has to be created beforehand, and the \texttt{hackrf\_transfer}
utility is then used to transmit the signal to the device. The options needed
for the transmission utility are not complete yet. The rough idea would be:
Depending on the capabilities of the host computer, using higher sampling rates
($6144$k, and even $8192$k) 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. It is also important to note that the digital gain value
must also be scaled accordingly as the sampling rate is increased.
HackRF has been measured with shoulder performance at $\approx 35$dB, which is roughly
equivalent to that obtained from first generation commercial modulators. This
can be increased to a relatively respectable $\approx 40$dB by enabling the FIR filter
in ODR-DabMod, and an appropriate coefficient file provided.
Example of using ODR-DabMod with the \texttt{hackrf\_transfer} utility:
\begin{lstlisting}
mkfifo /tmp/ofdm.fifo
odr-dabmod mod.ini &
hackrf_transfer -t /tmp/ofdm.fifo -f 216928000 -x 47 \
-a 1 -s 4096000 -b 1750000
\end{lstlisting}
\subsection{Audio Sources}
Preparing a DAB multiplex with different programmes requires that we are able to
read and encode several audio sources. This audio data can reach the multiplexer
in different ways. We will go over different possibilities in this part.
\subsubsection{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 \dabplus 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 $44100\Hz$ sample-rate, whereas DAB
is most often $48000\Hz$ or sometimes $32000\Hz$. A sample-rate conversion is
necessary in the stream decoder.
There are many different stream decoders, and gstreamer, mpg123 and mplayer have
been tested. We have achieved good results with mplayer, and the dab-scripts
repository\footnote{\url{http://github.com/Opendigitalradio/dab-scripts}}
contain the script \texttt{encode-jack.sh} that uses mplayer, and illustrates
how it is possible to encode a web-stream to \dabplus. JACK\footnote{The JACK
Audio Connection Kit is a virtual audio patch,
\url{http://www.jack-audio.org}} is used to interconnect the stream decoder to
the \dabplus encoder.
This script is designed for production use, and also contains automatic restart
logic in case of a failure.
\subsubsection{Encoders at Programme Originator Studios}
\subsubsection{Multi-capture Audio Card}
\subsection{Single-Frequency Networks}
|