1 | benchmark_dsa.py - GNU radio Dynamic Spectrum Access example script |
---|
2 | |
---|
3 | Summary: |
---|
4 | This script implements a extremely simple DSA algorithm and |
---|
5 | rendezvous protocol. When two nodes are running this script, they |
---|
6 | will dynamically change frequencies until they rendezvous and begin |
---|
7 | communication. |
---|
8 | |
---|
9 | Operation: |
---|
10 | In order to run this script several GNUradio utilities scripts must be |
---|
11 | located in the same directory as the benchmark_dsa.py script. The |
---|
12 | easiest way to do this is to copy benchmark_dsa.py into the following |
---|
13 | GNUradio source directory: |
---|
14 | |
---|
15 | <gnuradio_top_srcdir>/gnuradio-examples/python/digital/ |
---|
16 | |
---|
17 | |
---|
18 | General Information: |
---|
19 | The purpose of this script is to demonstrate simple dynamic spectrum |
---|
20 | access. In our case we do a simple probe using the gr.probe_avg_mag_sqrd_cf |
---|
21 | component to get a ROUGH estimate of the energy. An energy threshold is |
---|
22 | used to determine if another signal is present in the channel. This |
---|
23 | threshold can be set from the command line using the --threshold arg. |
---|
24 | By default it is set to 1.5e8. We calibrated this using the following: |
---|
25 | |
---|
26 | USRP1 |
---|
27 | RFX400 USRP daughterboard |
---|
28 | Standard 2-way FRS radios |
---|
29 | |
---|
30 | The threshold should be set accord to your specific environment and will |
---|
31 | most likely be different for everyone. |
---|
32 | |
---|
33 | If a primary user is detected, the script will change channels to avoid |
---|
34 | causing interference. The channel selection is the fun part. By default |
---|
35 | the script simply picks a random channel from the STATICLY available |
---|
36 | channel list that we've hardcoded in. Also available is intgration into |
---|
37 | our open source cognitive engine system which uses a case-based reasoning |
---|
38 | system to select a channel based on previous environments. |
---|
39 | |
---|
40 | For example, the CROSS system, when requested, will query it's database |
---|
41 | and observe that channel A has previously seen a primary user, in this |
---|
42 | case the probability that channel A is selected as the next channel to |
---|
43 | hop is will be small compared to other channels that have seen seen primary |
---|
44 | users. To use the CROSS system, CROSS must be built and installed |
---|
45 | (https://cornet.wireless.vt.edu/trac/wiki/Cross/BuildGuide) and you must |
---|
46 | supply the --cross argument. DSA algorithms are ongoing research items |
---|
47 | at many institutions and this is just a VERY SIMPLE implementation to get |
---|
48 | others started. |
---|
49 | |
---|
50 | Also worth noting is the rendezvous method. To get the full functionality |
---|
51 | two of these nodes must be running. Each node decides on it's own which |
---|
52 | channel to move to next if scanning for other nodes or if a primary |
---|
53 | user is detected. At each channel hop, a beacon is transmitted. This |
---|
54 | beacon is used by other nodes in the channel to identify each other. |
---|
55 | If a beacon is seen on a channel, an ACK beacon is sent and both nodes |
---|
56 | settle on the current channel and begin communication. |
---|
57 | |
---|
58 | Again this is still a work in progress but hopefully others can gain |
---|
59 | some insight into spectrum sensing and DSA using GNUradio, the USRP, or |
---|
60 | the Virginia Tech Cognitive Radio Open Source System. |
---|
61 | |
---|
62 | For questions or comments related to CROSS, please get in touch with us! |
---|
63 | http://www.cornet.wireless.vt.edu/trac/wiki/Cross/Contact |
---|
64 | |
---|