SignalScopePage » History » Version 11
max, 04/22/2017 04:04 PM
1 | 1 | max | = Signal Scope = |
---|---|---|---|
2 | |||
3 | == Installation == |
||
4 | |||
5 | 6 | max | Before running the scope app, check that the following standard pre-requisite packages are also installed: |
6 | 1 | max | * GNU Radio |
7 | * The op25 blocks |
||
8 | * Frank's gr-fsk4 block |
||
9 | * The op25 repeater block |
||
10 | |||
11 | 6 | max | The Python Numeric package is now also required. If you're running Debian or Ubuntu: |
12 | {{{ |
||
13 | apt-get install python-numeric |
||
14 | }}} |
||
15 | 1 | max | |
16 | 6 | max | Other than these pre-reqs, no special setup or installation is needed. |
17 | |||
18 | 11 | max | == Targets == |
19 | * Choice of USRP, discriminator-tap, or "audio-IF" hardware modes |
||
20 | * Supports either GL or non-GL display mode |
||
21 | * Both FSK4 and CQPSK demodulation modes supported |
||
22 | * Lower and middle range PC hardware, not just the latest |
||
23 | |||
24 | == Running the Program == |
||
25 | |||
26 | 5 | max | There are three overall options or modes depending on your hardware; these are |
27 | * USRP |
||
28 | * External receiver with discriminator tap connected to sound card |
||
29 | 1 | max | * External receiver with IF in the audio sound card range (e.g., 24 KHz), referred to as "audio IF" |
30 | |||
31 | 11 | max | === Running with the disc-tap option === |
32 | 1 | max | |
33 | 3 | max | The signal scope does not require the USRP. If you have a discriminator-tapped receiver, use the "-a" option: |
34 | 9 | max | {{{ |
35 | 3 | max | ./scope.py -a -v 10 -g 50 |
36 | 1 | max | }}} |
37 | 3 | max | |
38 | 11 | max | === Running with the USRP === |
39 | 3 | max | |
40 | It's helpful to find out the current calibration error beforehand (I use kalibrate), for example, +1234 hertz: |
||
41 | 9 | max | {{{ |
42 | 1 | max | ./scope.py -f 412.34e6 -RA -g 65 -c 1234 -v 10 |
43 | 3 | max | }}} |
44 | 1 | max | |
45 | 11 | max | === Running in the Audio IF mode === |
46 | 1 | max | |
47 | 5 | max | Receivers equipped with an IF output in the sound card range can be used. This is known as "audio IF" mode. |
48 | A soundcard sampling rate of 96K is used and the IF frequency (typically 24 KHz) is given using the {{{--calibration}}} parameter: |
||
49 | |||
50 | {{{ |
||
51 | 9 | max | ./scope.py -A -c 24e3 -g 50 -v 10 |
52 | 5 | max | }}} |
53 | |||
54 | 4 | max | == Feature overview == |
55 | |||
56 | * Spectrum plot |
||
57 | * Baseband oscilloscope |
||
58 | 1 | max | * Eye Pattern Diagram (Datascope) display supporting several standard symbol rates |
59 | 4 | max | * Constellation Diagrams |
60 | * Demodulated Symbol Output |
||
61 | 6 | max | * Correlation (including Fast Auto-Correlation) |
62 | 1 | max | * Direct-frequency entry, signal gain and fine-tuning controls |
63 | * User-selectable demodulator (FSK4 or QPSK) |
||
64 | 5 | max | |
65 | In the USRP and audio-IF modes, several additional program functions are enabled (spectrum FFT, constellation diagram, PSK demod, and iDEN correlation). |
||
66 | |||
67 | In all modes, the {{{--wireshark}}} option is used to write received P25 packet data to Wireshark. |
||
68 | 4 | max | |
69 | 10 | max | == Program Options == |
70 | |||
71 | Here is a full list of program options: |
||
72 | {{{ |
||
73 | Usage: scope.py [options] |
||
74 | |||
75 | Options: |
||
76 | -h, --help show this help message and exit |
||
77 | -a, --audio use direct audio input |
||
78 | -A, --audio-if soundcard IF mode (use --calibration to set IF freq) |
||
79 | -I AUDIO_INPUT, --audio-input=AUDIO_INPUT |
||
80 | pcm input device name. E.g., hw:0,0 or /dev/dsp |
||
81 | -i INPUT, --input=INPUT |
||
82 | input file name |
||
83 | -b Hz, --excess-bw=Hz |
||
84 | for RRC filter |
||
85 | -c Hz, --calibration=Hz |
||
86 | USRP offset or audio IF frequency |
||
87 | -C Hz, --costas-alpha=Hz |
||
88 | value of alpha for Costas loop |
||
89 | -f Hz, --frequency=Hz |
||
90 | USRP center frequency |
||
91 | -d DECIM, --decim=DECIM |
||
92 | source decimation factor |
||
93 | -v VERBOSITY, --verbosity=VERBOSITY |
||
94 | message debug level |
||
95 | -p, --pause block on startup |
||
96 | -w, --wireshark output data to Wireshark |
||
97 | -W WIRESHARK_HOST, --wireshark-host=WIRESHARK_HOST |
||
98 | Wireshark host |
||
99 | -R RX_SUBDEV_SPEC, --rx-subdev-spec=RX_SUBDEV_SPEC |
||
100 | select USRP Rx side A or B (default=A) |
||
101 | -g GAIN, --gain=GAIN set USRP gain in dB (default is midpoint) or set audio |
||
102 | gain |
||
103 | -G GAIN_MU, --gain-mu=GAIN_MU |
||
104 | gardner gain |
||
105 | }}} |
||
106 | |||
107 | 4 | max | == Spectrum Display == |
108 | |||
109 | [[Image(a.png)]] |
||
110 | |||
111 | The controls arranged along the bottom of the page are: |
||
112 | * Frequency: to retune, type the new frequency here and press ENTER |
||
113 | * Signal Gain: adjusts the baseband (demodulated) signal level |
||
114 | * Fine Tune: adjusts tuning frequency over +/- 3000 Hz range |
||
115 | * Demod: Selects demodulator (currently used in Demodulated Symbols only) |
||
116 | Except for the signal gain control, these controls are only available in USRP RX mode. |
||
117 | |||
118 | == Eye Pattern Diagrams == |
||
119 | |||
120 | The scope input source can be connected either before or after the symbol filter using the Viewpoint toggle. |
||
121 | |||
122 | Also the proper speed must be selected from the available options. |
||
123 | |||
124 | [[Image(b.png)]] |
||
125 | |||
126 | == Constellation Diagram == |
||
127 | |||
128 | 7 | max | [[Image(f.png)]] |
129 | |||
130 | The signal scope also features an angular population graph (shown above) in addition to the traditional constellation display. |
||
131 | In this mode the symbol magnitude (distance from center) is discarded. Instead the circle is sliced into segments and a count |
||
132 | of symbols found in each segment is plotted. This is similar to a histogram except that a straight line is drawn between each |
||
133 | result, and that the results are arranged in polar form instead of rectangular form. |
||
134 | |||
135 | 8 | max | With this display, the zone at the exact center of the plot can be used precisely to measure the degree of separation or margin |
136 | between the symbol decision points. The plots below illustrate the difference, with poorer convergence showing on the left image: |
||
137 | 1 | max | |
138 | 8 | max | [[Image(mhp7a.png)]][[Image(c.png)]] |
139 | |||
140 | The two-color mode is used in these images, providing natural relief to highlight the distinctive feature of π/4 DQPSK in which |
||
141 | successive symbols are chosen from two distinct constellations (each containing four possible symbol values) separated by 45° |
||
142 | |||
143 | 4 | max | == Demodulated Symbols == |
144 | |||
145 | [[Image(d.png)]] |
||
146 | |||
147 | 1 | max | == Correlation == |
148 | |||
149 | [[Image(e.png)]] |
||
150 | |||
151 | 9 | max | Cross correlation allows rapid identification of signals with known characteristics. Frame Sync (FS) signatures of several commonly |
152 | used radio systems are included. |
||
153 | |||
154 | By convention correlation results are usually displayed using positive correlation peaks only. In this system |
||
155 | however it is possible (and legal) for negative correlation products to be produced. This can occur for two wholly separate reasons: |
||
156 | * If the hardware polarity is inverted |
||
157 | * When the FS symbols are purposely inverted as an integral part of protocol processing (commonly used in certain protocols but not used in P25) |
||
158 | |||
159 | The first case commonly happens when using the disc-tap method of hardware connection, because the actual polarity of the signal seems to vary |
||
160 | randomly among different sound cards and receivers. In one actual case, two PC's of the same PC brand bought from the same store had opposite polarity. |
||
161 | |||
162 | The P25 software framer automatically detects the proper polarity and issues a message if negative polarity data is received: |
||
163 | {{{ |
||
164 | Reversed FS polarity detected - autocorrecting |
||
165 | }}} |
||
166 | |||
167 | The automatic correction applies only to software framing and doesn't help with correlation. For correct results for both software framing and |
||
168 | correlation, you should correct the polarity reversal problem at its source; this is done using negative values for the {{{--gain}}} parameter at |
||
169 | program start time: |
||
170 | |||
171 | {{{ |
||
172 | ./scope.py -a -v 10 -g -50 |
||
173 | }}} |
||
174 | |||
175 | The second cause of negative correlation peaks is that some protocols (although not P25) make use of both normal- and inverted-polarity FS |
||
176 | sequences as a standard part of their processing. Instead of clogging the GUI menu with several choices that are merely inverses of others, |
||
177 | just for the sake of always having positive-peaked correlations, we allow the correlation graph to reflect the natural polarity of the data. |
||
178 | Thus both + and - peaks are shown, allowing quick diagnosis of incorrect hardware polarity (see above), and allowing identification of the |
||
179 | particular sub-protocol in use. |
||
180 | |||
181 | == Auto Correlation == |
||
182 | |||
183 | 1 | max | Also included is Frank's Fast Auto Correlation (fac): |
184 | |||
185 | 8 | max | [[Image(g.png)]] |
186 | 9 | max | |
187 | For further details about Fast Auto Correlation refer to Frank's page at http://sites.google.com/site/radiorausch/ |
||
188 | 8 | max | |
189 | == BUGS == |
||
190 | |||
191 | Possibly bugs exist, here are a few of the known ones as of this writing |
||
192 | 1 | max | * Symbol filters totally brain damaged (need separate filters for each speed) |
193 | * When switching modes using the notebook tabs, leftover data from before may appear momentarily |
||
194 | * Highest and lowest speeds are not well tuned resulting either in sluggish updates or CPU exhaustion |
||
195 | 11 | max | |
196 | == CREDITS == |
||
197 | |||
198 | I ripped off the "tabbed notebook" theme (and code) from Stevie; it already had the spectrum, baseband, and decoded symbol displays. I added the data scope, constellation scope, and cross correlation features. |
||
199 | |||
200 | The Fast Auto Correlation (fac) code came from Radiorausch. |
||
201 | |||
202 | Special thanks to Mossmann for leaving one commented-out "print" statement in c4fm-decode.py. Of course it was tempting to wonder "what would happen" if that statement were un-commented. The final result? The cross-correlation feature. |
||
203 | |||
204 | Special thanks also to GPL(v3), for encouraging these mashups. |