Transmission Rate, Transmission Power, and Bandwidth Control for USRP2

written by Junseok KIM, last updated Dec 21, 2011

Sometimes, for networking researchers (like me), it is somehow difficult to understand how to set physical layer parameters such as transmission rate, transmission power, bandwidth, and etc.
It was easy to set transmission power or transmission rate of WiFi or ZigBee devices. You can just use some functions to do that.
Because everything is controllable, it becomes a little bit tricky when you play with a software defined radio such as USRP2.
Here, I will briefly explain how to set bandwidth and transmission rate for single-carrier and multi-carrier (a.k.a. OFDM) transmission.

Let's start with the single-carrier example. I assume you have installed the gnuradio on two PCs and have two USRP2s connected to each PC.
Go to the directory (using the terminal), gnuradio-version/gnuradio-examples/python/digital, and type the following.
  sudo ./benchmark_tx.py -f 2.5G -i 8 -m dbpsk -S 4
Many dots will be printed on the screen if there is no error. Each dot implies that a packet was transmitted.
So, one USRP2 is transmitting packets at 2.5GHz frequency. You can have the spectrum view with the other USRP2 using gnuradio-version/gr-utils/src/python/usrp2_fft.py with -d 8 option. 


You will probably see the above figure. USRP2 has 100 MS/s ADC and 400 MS/s DAC, but DAC rate is set as 100 MS/s in the gnuradio.
On the transmitter side, we use -i 8 and -S 4 options so that the interpolation rate is 8 and the samples per symbol is 4.
The bandwidth is 100 / 8 = 12.5 MHz, but the gnuradio reshapes the bandwidth as 100 / 8 / 4 = 3.125 MHz.
So, you can see on the figure the bandwidth is about 3.125 MHz (of course it seems a bit wider due to the transition band).

The transmission rate is 100 / 8 / 4 = 3.125 Ms/s (symbols per second). Because the differential BPSK is used, the transmission rate in bits is 3.125 Mbps.
Hence, with given bandwidth, you can control the transmission rate with -m option.

Now, let me talk about the OFDM. Go to the gnuradio-version/gnuradio-examples/python/ofdm/ and type the followings.
  sudo ./benchmark_ofdm_tx_new.py -f 2.5G -i 16 --fft-length=512 --occupied-tones=400
I'm currently using the version 3.3.0 and its OFDM example is not compatible with USRP2.
You can use this for USRP2 (Thanks to Veljko Pejovic).


The bandwidth is 100 / 16 = 6.25 MHz. Because some of subcarriers are inactive, the bandwidth on the above picture is a bit smaller than that.
The FFT size is 512, so the subcarrier spacing is 6.25 MHz / 512 = 12.2 KHz.
Including both the OFDM symbol and cyclic prefix, there are 512 + 256 = 768 samples per OFDM symbol time, so the symbol time per subcarrier is 727 / 6.25 M =  122.9 us.
The default cyclic prefix (CP) length is 256, so the CP rate is 256 / 512 = 1/2.
The symbol time can also be derived as 1 / 12.2K x (3/2) = 122.9 us.
We do not use FEC and the default modulation is BPSK.
Taking account that only 400 subcarriers actually carry usable data, the transmission rate is 400 / 122.9 us = 3.5 Mbps.


The above picture shows a non-contiguous OFDM (NC-OFDM) plus transmission power control example.
Some of subcarriers are inactive and middle subcarriers have lower amplitude than other subcarriers.
This example shows, you can control almost everything with USRP2.
I made this example based on the Papyrus, so I cannot share it due to copyright issues.