Project

General

Profile

SignalScopePage » History » Version 12

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 12 max
In the baseband AF (disc. tap) mode, several program functions are disabled (spectrum FFT, constellation diagram, PSK demod, FAC and iDEN correlation)
66
because these functions require direct access to the signal with no demodulation.
67 5 max
68
In all modes, the {{{--wireshark}}} option is used to write received P25 packet data to Wireshark.
69 4 max
70 10 max
== Program Options ==
71
72
Here is a full list of program options:
73
{{{
74
Usage: scope.py [options]
75
76
Options:
77
  -h, --help            show this help message and exit
78
  -a, --audio           use direct audio input
79
  -A, --audio-if        soundcard IF mode (use --calibration to set IF freq)
80
  -I AUDIO_INPUT, --audio-input=AUDIO_INPUT
81
                        pcm input device name.  E.g., hw:0,0 or /dev/dsp
82
  -i INPUT, --input=INPUT
83
                        input file name
84
  -b Hz, --excess-bw=Hz
85
                        for RRC filter
86
  -c Hz, --calibration=Hz
87
                        USRP offset or audio IF frequency
88
  -C Hz, --costas-alpha=Hz
89
                        value of alpha for Costas loop
90
  -f Hz, --frequency=Hz
91
                        USRP center frequency
92
  -d DECIM, --decim=DECIM
93
                        source decimation factor
94
  -v VERBOSITY, --verbosity=VERBOSITY
95
                        message debug level
96
  -p, --pause           block on startup
97
  -w, --wireshark       output data to Wireshark
98
  -W WIRESHARK_HOST, --wireshark-host=WIRESHARK_HOST
99
                        Wireshark host
100
  -R RX_SUBDEV_SPEC, --rx-subdev-spec=RX_SUBDEV_SPEC
101
                        select USRP Rx side A or B (default=A)
102
  -g GAIN, --gain=GAIN  set USRP gain in dB (default is midpoint) or set audio
103
                        gain
104
  -G GAIN_MU, --gain-mu=GAIN_MU
105
                        gardner gain
106
}}}
107
108 4 max
== Spectrum Display ==
109
110
[[Image(a.png)]]
111
112
The controls arranged along the bottom of the page are:
113
 * Frequency: to retune, type the new frequency here and press ENTER
114
 * Signal Gain: adjusts the baseband (demodulated) signal level
115
 * Fine Tune: adjusts tuning frequency over +/- 3000 Hz range
116
 * Demod: Selects demodulator (currently used in Demodulated Symbols only)
117
Except for the signal gain control, these controls are only available in USRP RX mode.
118
119
== Eye Pattern Diagrams ==
120
121
The scope input source can be connected either before or after the symbol filter using the Viewpoint toggle.
122
123
Also the proper speed must be selected from the available options.
124
125
[[Image(b.png)]]
126
127
== Constellation Diagram ==
128
129 7 max
[[Image(f.png)]]
130
131
The signal scope also features an angular population graph (shown above) in addition to the traditional constellation display.
132
In this mode the symbol magnitude (distance from center) is discarded.  Instead the circle is sliced into segments and a count
133
of symbols found in each segment is plotted.  This is similar to a histogram except that a straight line is drawn between each
134
result, and that the results are arranged in polar form instead of rectangular form.
135
136 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
137
between the symbol decision points.  The plots below illustrate the difference, with poorer convergence showing on the left image:
138 1 max
139 8 max
[[Image(mhp7a.png)]][[Image(c.png)]]
140
141
The two-color mode is used in these images, providing natural relief to highlight the distinctive feature of π/4 DQPSK in which 
142
successive symbols are chosen from two distinct constellations (each containing four possible symbol values) separated by 45°
143
144 4 max
== Demodulated Symbols ==
145
146
[[Image(d.png)]]
147
148 1 max
== Correlation ==
149
150
[[Image(e.png)]]
151
152 9 max
Cross correlation allows rapid identification of signals with known characteristics.  Frame Sync (FS) signatures of several commonly
153
used radio systems are included.
154
155
By convention correlation results are usually displayed using positive correlation peaks only.  In this system
156
however it is possible (and legal) for negative correlation products to be produced.  This can occur for two wholly separate reasons:
157
 * If the hardware polarity is inverted 
158
 * When the FS symbols are purposely inverted as an integral part of protocol processing (commonly used in certain protocols but not used in P25)
159
160
The first case commonly happens when using the disc-tap method of hardware connection, because the actual polarity of the signal seems to vary 
161
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.
162
163
The P25 software framer automatically detects the proper polarity and issues a message if negative polarity data is received:
164
{{{
165
Reversed FS polarity detected - autocorrecting
166
}}}
167
168
The automatic correction applies only to software framing and doesn't help with correlation.  For correct results for both software framing and
169
correlation, you should correct the polarity reversal problem at its source; this is done using negative values for the {{{--gain}}} parameter at 
170
program start time:
171
172
{{{
173
./scope.py -a -v 10 -g -50
174
}}}
175
176
The second cause of negative correlation peaks is that some protocols (although not P25) make use of both normal- and inverted-polarity FS 
177
sequences as a standard part of their processing.   Instead of clogging the GUI menu with several choices that are merely inverses of others,
178 1 max
just for the sake of always having positive-peaked correlations, we allow the correlation graph to reflect the natural polarity of the data.
179 9 max
Thus both + and - peaks are shown, allowing quick diagnosis of incorrect hardware polarity (see above), and allowing identification of the
180 12 max
particular family and sub-protocol in use.
181 9 max
182
== Auto Correlation ==
183
184 1 max
Also included is Frank's Fast Auto Correlation (fac):
185
186 8 max
[[Image(g.png)]]
187 9 max
188
For further details about Fast Auto Correlation refer to Frank's page at http://sites.google.com/site/radiorausch/
189 8 max
190
== BUGS ==
191
192
Possibly bugs exist, here are a few of the known ones as of this writing
193 1 max
 * Symbol filters totally brain damaged (need separate filters for each speed)
194
 * When switching modes using the notebook tabs, leftover data from before may appear momentarily
195
 * Highest and lowest speeds are not well tuned resulting either in sluggish updates or CPU exhaustion
196 11 max
197
== CREDITS ==
198
199
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.
200
201
The Fast Auto Correlation (fac) code came from Radiorausch.
202
203
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.
204
205
Special thanks also to GPL(v3), for encouraging these mashups.
Add picture from clipboard (Maximum size: 48.8 MB)