CRC-DabMod is the DAB OFDM modulator command developed by Communication Research Center (CRC) from Canada. It is now published in open source with a gnu GPLv3 license. CRC have stopped releasing new versions, and the development now continues on GitHub with releases available on http://mpb.li
Original version: CRC-DabMod description and source code on MMBTools website
CRC-DabMod takes an Ensemble Transport Interface ETI stream as input and outputs a complex baseband stream of interlaced 16 bits I/Q samples with a default sampling frequency of 2.048MHz. It can also directly communicate to the Ettus USRPs using the UHD driver.
The USRP1 will require resampling to 3.2Msps, which will requires high CPU usage but cannot be avoided. Newer USRPs have a more flexible clocking system.
You will need boost at least version 1.42. The one from your distribution is probably fine, and if you have installed GNURadio or UHD, you will already have it.
You need uhd, don't forget to also install the -dev package from your distribution.
If you want to use the zeromq inputs or outputs, you need a recent (4.0.3 is best) version of ZeroMQ. It is probably preferred to install it from source:
wget http://download.zeromq.org/zeromq-4.0.3.tar.gz cd zeromq-4.0.3 ./configure make sudo make install
This will install it into /usr/local
When building from the source code, be careful to disable debugging, otherwise there will be lot of wasted CPU usage:
./configure --with-debug-malloc=no --disable-debug --enable-fft-simd --enable-input-zeromq
If you don't have zeromq, remove the --enable-input-zeromq flag.
make sudo make install
There are two ways of using CRC-DabMod: through command line arguments or with a configuration file:
Command line arguments
Example with command-line interface:
crc-dabmod ./racor.eti -l -g1 -r3200000
This modulates the racor.eti file, performs OFDM modulation on baseband at a sampling frequency of 3.2Msamples/sec. Output is sent to the standard output. It can be redirected into a file, or piped into a baseband player (CRC-Dwap.py).
When using a USRP, the integrated UHD output can be used. This requires the definition and usage of a configuration file.
Take the example configuration from GitHub: example.ini
The input section defines if you want to read a file or ETI over ZeroMQ. The ZeroMQ must point to a crc-dabmux ZeroMQ output. The modulator section sets parameters for the modulator which are described below.
firfilter enables the filter that was previously done in the baseband player. It reduces out of band energy, and will increase signal quality, and reduce energy waste in the mask filter. The filter taps can be generated with the helper script in doc/fir-filter
For each possible output, there is a section: outputuhd and outputfile. outputfile only defines the filename. outputuhd is more interesting: it defines the device flags, the TX frequency, the PGA gain, and what clocking source you want to use. In case of refclk loss, it is possible to make the modulator crash so as to avoid transmitting a corrupt signal, maybe even on the wrong frequency.
is valid for USRP B100, and the master_clock_rate allows us to avoid resampling the 2048000sps signal. It is used as UHD device parameter without modification.
The txgain can be modified while the modulator runs by enabling the remotecontrol
Once you have defined a configuration file (let's call it modulator.ini), you can call:
crc-dabmod -C modulator.ini
Additional information concerning the options
-c, or dac_clk_rate: Pre-correction for the CIC filter in the USRP:
This filter is used on the FPGA for up-sampling to 128MHz. This pre-correction filter is only enabled when the -c option is used. You should use -c128000000 for regular USRP1 only.
-g, or gainmode: Gain computation mode
The gainmode option controls how CRC-Dabmod computes the OFDM symbol gain.
mode 0 uses a fixed factor and is really not recommended. It is more useful on an academic perspective for people trying to understand the DAB modulation.
mode 1 is the normalization of every OFDM symbol. No overshoot, no truncating, but varying output power (around 3dB) which might not be the best for some power amplifier.
mode 2 uses the method specified in ETSI 300 798. This method normalizes to 4 times the standard deviation for an approximation of the RMS power. So around 6/100000 samples will be truncated and will introduce some really minor distortion. But this mode also maximizes the output power. This is the gain mode recommended for real world operation as it is based on a DAB standard; the only difference is that CRC-Dabmod uses a better resolution with 16 bits in place of 8 bits.
(Additional info taken from google groups discussion, originally written by Pascal Charest, CRC)