Imported Upstream version 3.2.2
[debian/gnuradio] / gnuradio-examples / python / digital-bert / README
1 BERT testing example scripts
2
3
4 benchmark_tx.py
5
6 This sets up a BPSK transmitter that is modulated with a pseudorandom
7 sequence of bits.  The PN code is generated by sending an all 1s
8 sequence through a 7-bit scrambler. The transmitter performs the BPSK
9 modulation, then passes the complex baseband waveform through a
10 root-raised-cosine filter and onto the USRP.
11
12 The --sps parameter controls how many baseband samples per symbol
13 are created and passed through the RRC filter, prior to going to the
14 USRP over the USB for interpolation to the final DAC rate.
15
16 The baseband bit rate is controlled by -r or --rate.  This value, when
17 multiplied by the --sps parameter, must result in valid interpolation
18 rate for the USRP.  For example, if the baseband rate is 250k bits/sec,
19 and the samples per symbol is 4, then the final rate is 1M samples/sec,
20 which results in an interpolation rate of 128.  The valid interpolation
21 rates for the USRP are multiples of 4 between 16 and 512.
22
23 Finally, the RRC excess bandwidth may be specified by --excess-bw.
24 (See ./benchmark_tx.py -h for additional parameters.)
25
26
27 benchmark_rx.py
28
29 This sets up a BPSK receiver to demodulate the received waveform.  It
30 accepts a similar set of parameters as the transmitter, except that one
31 specifies the USRP decimation rate desired.  The resulting sample stream
32 rate must be an integral number of baseband symbols.  For example, the
33 parameters corresponding to the above transmitter would be to use a
34 decimation rate of 8 (32 sps), 16 (16 sps), 32 (8 sps), 64, (4 sps), or
35 128 (2 sps).  The lower the USRP decimation, the more CPU is required to
36 demodulate the signal, so not all valid decimation rates will work.
37
38 The baseband signal from the USRP is first passed through an AGC to
39 establish an average power of 1.0.  It is then passed through a matched
40 filter (another RRC), a Costas phase-locked loop, and a Mueller and
41 Muller bit timing recovery loop.  The resulting constellation has an SNR
42 estimation probe attached, and is then sliced into a bit stream.
43
44 The recovered bits are then passed through a 7-bit descrambler.  If
45 there are no channel errors, the all 1s sequence is recovered. In the 
46 event of a channel error, there will be a 0 in the bit stream for each
47 feedback tap in the descrambler.  In this case, the CCSDS descrambler is
48 using 3 feedback taps.
49
50 Finally, the signal is passed into a bit density measurement probe. The
51 channel BER is measured by dividing the 0s density by three.  This
52 measurement is inaccurate at high BER rates (>10%) as the error 0s
53 begin to overlap.
54
55 The benchmark script will, once per second, output the Costas loop
56 frequency offset, the recovered timing error, the estimated SNR, and the
57 average BER.
58
59 NOTE: The particular SNR estimator used is inaccurate below about 7dB,
60 and will report erroneously high values even for random noise.
61
62 There are a variety of Costas and M&M loop parameters one can adjust.
63 See ./benchmark_rx.py -h for the full set.