Imported Upstream version 3.2.2
[debian/gnuradio] / gr-sounder / README
1 This is a work-in-progress implementation of a m-sequence based channel 
2 sounder for GNU Radio and the USRP.
3
4 In typical use, the user would run the sounder as a transmitter on one
5 USRP, and a receiver on another at a different location.  The receiver
6 will determine the impulse response of the RF channel in between.
7
8 The sounder uses a custom FPGA bitstream that is able to generate and
9 receive a sounder waveform across a full 32 MHz wide swath of RF spectrum;
10 the waveform generation and impulse response processing occur in logic in
11 the USRP FPGA and not in the host PC.  This avoids the USB throughput 
12 bottleneck entirely.  Unfortunately, there is still roll-off in the AD9862
13 digital up-converter interpolation filter that impacts the outer 20% of
14 bandwidth, but this can be compensated for by measuring and subtracting
15 out this response during calibration.
16
17 The sounder is based on sending a maximal-length PN code modulated as BPSK
18 with the supplied center frequency, with a chip-rate of 32 MHz. The
19 receiver correlates the received signal across all phases of the PN code 
20 and outputs an impulse response vector.  As auto-correlation of an m-sequence
21 is near zero for any relative phase shift, the actual measured energy at a 
22 particular phase shift is related to the impulse response for that time delay.
23 This is the same principle used in spread-spectrum RAKE receivers such as are
24 used with GPS and CDMA.
25
26 The transmitter is designed to work only with the board in side A.  The 
27 receiver may be in side A or side B.  The boards may be standalone LFTX/LFRXs
28 or RFX daughterboards.
29
30 To use, the following script is installed into $prefix/bin:
31
32 Usage: usrp_sounder.py [options]
33
34 Options:
35   -h, --help            show this help message and exit
36   -R RX_SUBDEV_SPEC, --rx-subdev-spec=RX_SUBDEV_SPEC
37                         select USRP Rx side A or B
38   -f FREQ, --frequency=FREQ
39                         set frequency to FREQ in Hz, default is 0.0
40   -d DEGREE, --degree=DEGREE
41                         set sounding sequence degree (2-12), default is 12,
42   -t, --transmit        enable sounding transmitter
43   -r, --receive         enable sounding receiver
44   -l, --loopback        enable digital loopback, default is disabled
45   -v, --verbose         enable verbose output, default is disabled
46   -D, --debug           enable debugging output, default is disabled
47   -F FILENAME, --filename=FILENAME
48                         log received impulse responses to file
49
50 To use with an LFTX board, set the center frequency to 16M:
51
52 $ usrp_sounder.py -f 16M -t
53
54 The sounder receiver command line is:
55
56 $ usrp_sounder.py -f 16M -r -F output.dat
57
58 You can vary the m-sequence degree between 2 and 12, which will create
59 sequence lengths between 3 and 4095 (128 us).  This will affect
60 how frequently the receiver can calculate impulse response vectors.
61
62 The correlator uses an O(N^2) algorithm, by using an entire PN period
63 of the received signal to correlate at each lag value.  Thus, using a
64 degree 12 PN code of length 4095, it takes 4095*4095/32e6 seconds to
65 calculate a single impulse response vector, about a half a second.  One
66 can reduce this time by a factor of 4 for each decrement in PN code
67 degree, but this also reduces the inherent processing gain by 6 dB as
68 well.
69
70 The impulse response vectors are written to a file in complex float
71 format, and consist of the actual impulse response with a noise floor
72 dependent on the PN code degree in use.
73
74 There is a loopback test mode that causes the sounding waveform to be
75 routed back to the receiver inside the USRP:
76
77 $ usrp_sounder.py -r -t -l -F output.dat
78
79 The resulting impulse response will be a spike followed by a near zero
80 value for the rest of the period.
81
82 Synchronization at the receiver is not yet implemented, so the actual
83 impulse response may be time shifted an arbitrary value within the the
84 impulse response vector.  If one assumes the first to arrive signal is
85 the strongest, then one can circularly rotate the vector until the peak
86 is at time zero.
87
88 Johnathan Corgan
89 Corgan Enterprises LLC
90 jcorgan@corganenterprises.com
91 5/28/07