ECE 8863: Cognitive Radio Networks

Lab 0: Introduction to Cognitive Radio Lab

This lab is focused on familiarizing yourself with the Cognitive Radio Lab environment including hardware (USRPs, antennas, transceivers, etc) and software (GNU radio). After this lab, you will know how to (1) check the hardware conditions for debugging and (2) create a simple application by using GNU radio companion.

 

0. Environment Setup

Once you log in to your account on the lab machine for the first time, change the password.

First you need to open a terminal. Click the icon at the lefttop corner, search for "Terminal", and press "Enter". A terminal window should pop up.

To change your password, type the following command at the prompt ($) in the terminal and follow the instructions:

$ passwd

Also remember your username on this machine.

 

1. Lab information Slides

Before you get started, quickly read through the Lab Information Slides. It's okay if you don't understand everything on the slides, but it's important to know what information is available because this document will be your reference guide throughout all your lab sessions.


2. GNU Radio Companion

Now let's test the GNU radio installation with an example. GNU Radio comes with many examples, which are located in

/usr/local/share/gnuradio/examples

Use the 'dial_tone' example as the first test. Copy the files you will need to your desktop. The python version should be run directly at the terminal:

$ cp /usr/local/share/gnuradio/examples/audio/dial_tone.py dial_tone1.py
$ ./dial_tone1.py

You should be able to hear the dial tone from the sound card if GNU Radio is installed correctly.

Alternatively, we can use GNU Radio Companion (GRC) to create and run this application. GRC is the graphical user interference (GUI) of GNU Radio. It is a good place to learn basic GNU Radio without programming in Python.

Now try the GNU Radio Companion (.grc) version

$ cp /usr/local/share/gnuradio/examples/audio/dial_tone.grc .
$ gnuradio-companion dial_tone.grc &

Generate and execute the flow graph (see slides). You should be able to hear the dial tone from the sound card same as before (the frequency of the tone may sound different).

 

3. Create and Test a GRC Application

For this section, we will create a BPSK radio transmitter and view the transmission on the spectrum analyzer. To find blocks to add to the flowgraph, look in the block categories on the right. To edit a block in GRC, simply double-click it.

Now let's create a GRC application for BPSK Transmission:

  1. Turn on the Agilent spectrum analyzer and set it to view 900-920 MHz.
  2. Turn on a USRP and note the IP address on top.
  3. Create a new GRC application.
  4. Set the sample rate variable to 200 kSPS.
  5. Add a random binary source (random source with min 0 and max 2), and change the output type to Byte.
  6. Add a PSK digital modulator and set it for BPSK.
  7. Add a UHD:USRP Sink and set the Device Addr to "addr=192.168.40.x", where the actual address is the one you noted previously. Set the center frequency to 910 MHz, and the Antenna to TX/RX.
  8. Connect the blocks in the same order by clicking the output of the first block then the input of the second block.
  9. Execute the application and find the bandwidth of the transmitted signal from the spectrum analyzer.

Parameter

Value

Comment

Transmission Frequency

910 MHz

Make sure that antenna supports the correct frequency

Sample Rate

200 kSPS

The sample rate to UHD source block. The ADC sampling rate is 100MSPS. Interpolation is performed in FPGA.

Modulation

BPSK

Use the default 2 samples/symbol and 0.35 BW

IP Address

addr=192.168.40.x

The "addr=" part is key

Antenna

TX/RX

To transmit on a USRP N210

 

4. Checkpoint: Show the BPSK signal displayed on the spectrum analyzer to your TA.

 

References

1. GNU Radio Installation

It is highly recommended to have the GNU Radio installed on your personal computer to run simulations and go through the tutorials for basic understanding of GNU Radio environment before working on the first lab assignment. Note these steps are already done for you on the lab computers.

A. Platform Choices

In the lab, GNU Radio is installed on Ubuntu linux machines. You may choose to use any platform that you prefer, however the TAs can only guarantee support for the installations on the lab machines. Follow the specific instructions for your operating system at Installing GNU Radio. Fortunately, most problems you might encounter have been resolved and posted on the Internet if you chose other platforms. Installing from source is recommended so you have access to all of the source code for reference, but not necessary.

You might find VMWare useful for putting linux on your personal machine for free if you don't already have it.

B. Environment

As noted on the GNU Radio page, to run Python, the environment variables PYTHONPATH and LD_LIBRARY_PATH must be set as follows:

$ export PYTHONPATH=/usr/local/lib/python2.7/site-packages
$ export LD_LIBRARY_PATH=/usr/local/lib/

It is a good idea to add these commands to your .bashrc file so you do not need to do this each time the OS is restarted.

C. UHD

You do not need the Universal Hardware Driver in order to run GNU Radio, but it is required if you want to connect to the USRP hardware (and may be a dependency for installing GNU Radio not from source). See Installing UHD.

If you haven't already, review the Lab Information Slides for info about the hardware.

 

2. GNU Radio Companion Tutorials

We recommend the following GRC tutorials from California State University, Northridge. The tutorials refer to an older version of GNU Radio, so some commands need to be changed when used in our GNU Radio environment. For example, you need use the command "gnuradio-companion" instead of "grc".

  1. Using GNU Radio Companion: Tutorial 1
  2. Using GNU Radio Companion: Tutorial 2
  3. Using GNU Radio Companion: Tutorial 3: Receiving AM Signals
  4. Using GNU Radio Companion: Tutorial 4: Using Complex Signals and Receiving SSB 

 

Questions? E-mail: infocom@ece.gatech.edu

You are visitor:

since 04/22/1997.