aboutsummaryrefslogtreecommitdiffstats
path: root/README-SFN
blob: de4ef7c3e28ce24dc3ffc42e2b4dc4665461e3ad (plain)
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
README for the SFN patch 
========================

Concept
-------

Each modulator receives ETI frames with absolute timestamps. These timestamps
are composed of two parts:
- The TIST field as defined in the ETI standard, giving an offset after the
  pulse per second signal;
- A time information transmitted using the MNSC, representing the precise time
  when the frame must be transmitted, with one-second resolution.

When CRC-DABMUX is called with -s, the TIST is defined in each frame. The
Time is always encoded in the MNSC.

In a SFN setup, it is not possible to rely on a modulator to slow down the
Ensemble multiplexer. CRC-DABMUX takes an additional parameter -r to output one
ETI frame every 24ms. This output parameter only adds a simul:// output.

The ETI stream must then be made available to several transmission sites. For
this, the eti_tcp server can be used.
The eti_tcp server listens on the port specified on the command line.
An example invocation is:
./mux-throttled.sh -s -m 1 | ./eti_tcp/eti_tcp.py 54001

Each modulator then receives the ETI stream through a TCP connection. Each frame
contains the complete timestamp, to which an per-modulator offset is added.
The sum is then given to the USRP. The offset can be specified in two ways:

using -o delay:
Adds a constant delay specified on the command line (see 1st example).

using -O delayfile
Adds the delay specified in the given file. The file must contains a single
line containing a floating point number. This file is read each 50 frames, and
the modulator delay is updated.

In both cases, the units are seconds.

Example modulator invocation (for a B100 USRP supporting 2048Msps and with a
fixed delay of 2.3 seconds)
nc localhost 54001 | ./moduhd-2048.sh -o 2.3

Example modulator invocation (for an USRP requiring resampling and with a delay
specified in a separate file "moddelay")
nc localhost 54001 | ./moduhd-resample.sh -O moddelay -G 5

It is also possible to set daugherboard gain using -G. Furthermore, the transmission
frequency is set on the command line, as seen in the examples in moduhd-XXX.sh.

CRC-DABMOD uses the UHD library to output modulated samples to the USRP device.
When started, it defines the USRP time using the local time and the PPS signal.
It is therefore important to synchronise computer time using NTPd.

When a frame arrives with a timestamp that is in the past, the frame is dropped.
If the timestamp is too far in the future, the output module waits a short
delay.

Synchonisation can be verified by using an oscilloscope and a receiver. It is
very easy to see if the null symbols align.


Hardware requirements
---------------------

The following hardware is required to test the SFN patch to the CRC mmbTools:
- Two USRPs ;
- One or two computers with the mmbTools installed ;
- A network connection between the two computers ;
- A 10MHz refclk source ;
- A 1PPS source synchronised to the 10MHz ;
- An oscilloscope to check synchronisation.

The lab setup used in the experiments :
http://pic.mpb.li/IMAG0411.jpg

In this example, one USRP B100 and one USRP2 are used. Modulation is done on two
different computers, but it also works with a single computer. In that case, the
device string for the -u option for CRC-DABMOD must specify the device. (e.g.
-u "type=b100", -u "type=usrp2" or -u "serial=ABC123")

The HP33120A generator at the bottom is used to generate the 10MHz REFCLK (sine,
2Vpp). It's sync output is used as 10MHz IN for the Agilent 33250A generator.
The Agilent is set to a square wave, 1Hz. Its sync output is then wired to the
PPS input of the USRPs.

List of changes made
--------------------
To CRC-DABMUX:
- Throttled output option instanciates a simul output
- Set TIST and use MNSC to transmit time
- Command line arguments handling

Files:
Modified Eti.h and DabMux.cpp

To CRC-DABMOD:
- Added multithreaded UHD Output module
- Added normalisation for UHD (we must divide output samples by
  32768.0)
- Command line arguments handling
- Changed the flowgraph to be able to chose between outputs
- Added decoding of time in MNSC
- Added delay control for the modulator using -o and -O
- Initially set the timezone to UTC, because the MNSC is in UTC

Files:
Added OutputUHDThreaded.{cpp,h}, TimestampDecoder.{cpp,h}; Modified DabMod.cpp,
DabModulator.h, Eti.h, EtiReader.{cpp,h}; Changed some .h files to include
<stdio.h> because of compilation issues; Corrected OutputMemory char* name().


Future elements to be changed
-----------------------------
- Communicate delay and buffer information between multiplexer and modulators, 
  to have a better control about delays.
- Handle UHD asynchronous messages in another thread, and use this information
  for monitoring

Repository:
http://hg.mpb.li/mmbtools-sfn/

2012-07-11
Matthias P. Braendli
matthias@mpb.li