You are on page 1of 5

Spectrum Sensing, Access and Coexistence Testbed

for Cognitive Radio Using USRP


Zhi Yan, Zhangchao Ma, Hanwen Cao, Gang Li, and Wenbo Wang
Key Lab of Universal Wireless Communications Ministry of Education
School of Telecommunications Engineering
Beijing University of Posts and Telecommunications
P. O. Box 93#, Xitucheng Road No.10, Beijing, 100876, P. R. China
Email: {yanzhibupt, mzcroy, hanwen.cao, ligangcool}@gmail.com, wbwang@bupt.edu.cn

AbstractThe idea of cognitive radio has created a great


interest in academic and industrial research recently. As a
result, there are a large number of proposals for physical and
network layer functionalities. In this paper, we demonstrate an
experimental platform with the USRP board developed by Ettus
Research that can facilitate the development of PHY and MAC
layers functionality. Some key results from this experience so far
are presented, including an over-the-air interoperability analysis
of two different SDR (Software Defined Radio) architectures in
the same frequency band, the effect of dynamic spectrum access
on legacy systems and analysis of actual co-existence experiences
involving primary users and secondary opportunistic spectrum
users. In particular, we focus our attention on spectrum sensing
and spectrum coexistence as an example that incorporates both
digital signal processing and networking techniques to show how
this platform could be used to conduct comprehensive research
in cognitive radio.
I. I NTRODUCTION
Nowadays, as the development of the technology in wireless
communication, our spectral resources have become more
and more limited, especially the frequencies below 3 GHz.
However, not all of these frequencies are used efficiently. In Fig. 1. The testbed setup.
fact, a certain number of frequency bands are underutilized in
spectacular times and locations, such as frequency band range
between 54 to 862 MHz which WRAN (Wireless Regional point of observation. Unique to cognitive radio operation is the
Area Networks) is now focused on. requirement that the radio is able to sense the environment over
Considering Wireless systems today are characterized by huge swaths of spectrum and adapt to it since the radio does
wasteful static spectrum allocations, fixed radio functions, not have primary rights to any pre-assigned frequencies[3].
and limited network coordination, cognitive radio has been Also, this new radio functionality will involve the design of
proposed as a possible solution to improve spectrum utilization various analog, digital, and network processing techniques in
via opportunistic spectrum sharing. So this newly technology order to meet challenging radio sensitivity requirements and
is assured to be the most promising choice to relieve the wideband frequency agility.
limitation of spectrum resource especially for the frequency Secondly, coexistence, as referred to in this paper, is the
band below 3 GHz. ability of two or more nodes/entities to share a common
However, cognitive radio is considered lower priority or frequency band. Cognitive radio coexistence can largely help
secondary users of spectrum allocated to primary or licensed to increase the efficiency of spectrum utilization, where two or
users. One of its fundamental requirement is to avoid inter- more services can share a common frequency band. Coexis-
ference to potential primary users in their vicinity. So the tence in cognitive radio is mainly focused on the coexistence
growing interest in spectrum sensing, access and co-existence of interference-free.The term interference-free coexistence is
of cognitive radio research has spurred an increasing number the term denoting ability for two or more entities to share a
of papers in the recent years[1]-[5]. common space without causing interference to each other. In
Firstly, spectrum sensing of cognitive radio focuses on this case, the two or more entities are wireless transmissions
the spectrum hole or the spectrum whitespace. The term occupying a common frequency spectrum segment. Exclusive
whitespace denotes spectrum that is unused at any particular spectrum usage rights for some currently licensed frequency

978-1-4244-1708-7/08/$25.00 2008 IEEE 270


bands can support more services if these secondary (oppor-
tunistic) users can operate on an interference-free basis with USB USB
the primary/legacy user. This is another key area in cognitive
radio and dynamic spectrum access research[4].
Although cognitive radios promise dramatic improvements Secondary Secondary
in spectrum utilization and revolution in the way the spectrum user A user B
is used, their realization still requires technical proofs of USB
feasibility and regulatory approval. In this paper, we present
an experimental platform with the USRP (Universal Soft-
Monitor
ware Radio Peripheral) that can facilitate the development of
physical and network layer functionalities in feasible system
architecture for cognitive radios. The main objective of the USB USB
testbed is to exploit unused spectrum adjacent to a narrowband
primary user frequencies. These systems have the capability to
accomplish the experimental objectives and to investigate the
Primary user A Primary user B
effects of dynamic spectrum access on legacy systems because
each of the systems has been built with reconfigurability and
cognitive functionality in mind. In addition, these abilities can
Fig. 2. System architecture.
also be deactivated allowing either system to assume the role
of a fixed, non-adaptive legacy system.
The paper is organized as follows: Section 2 introduces the toolkit, which allows the construction of radios where the
system architectures of the testbed, and derives the key feature actual waveforms transmitted and received are defined by
of the different architectures used for the experiment. The software. In essence, USRP board is a RF and IF converter
system implementation and testbed scenarios are presented in which sends or receives I/Q baseband signal to/from the host
Section 3. In Section 4, we give the summary of the work and by the USB 2.0 cable. The USRP product family includes the
conclusion. motherboard, which contains an FPGA and several AD/DA
II. S YSTEM A RCHITECTURE converters, and changeable plug-in daughterboards that cover
different frequency ranges. With the various daughterboards,
The system architecture is shown in Fig. 2. The scenario the USRP has an overall range from DC to 2.9 GHz, which
involved two cognitive radio systems with different archi- covers everything from AM radio to Wi-Fi and beyond.
tecture designs and cognitive capabilities and a Monitor. FLEX2400 daughter board with the ability of covering the
Primary user A(PA) and Primary user B(PB) are assumed the frequency range from 2.3 GHz to 2.9 GHz is used in our
role of two primary users, which achieve the communication case[9][10].
through frequency-division-duplex(FDD) scheme with each
other, while the Secondary user A(SA) and Secondary user B. DSP Modules
B(SB) are assumed the role of two opportunistic secondary All the base band signal processing is implemented in
users, which communicate with each other with the trans- software on the general computer by C++ programming.
mission mode of semiduplex scheme (a simplified WLAN Although a FPGA-DSP testbed can provide higher throughput
CSMA protocol). Monitor is considered to be an auxiliary role, and shorter latency, using high level programming language on
which is used to view the state of the spectrum utilization and common Linux system makes people with little or no hardware
analyze the received results. In order to avoid the interfering background implement the platform very easy. The software
the primary users when the PA and PB want to communicate tools used in the development include C++, Python, and IT++
with each other, the architecture and design of SA and SB library[11].
can be reconfigurable whose parameters and structures can
be dynamically reconfigured according to a less complex C. Monitor
cognitive control implementation. This scenario essentially The Monitor is consisting of a general PC and a USRP
explored the ability of these two different CR architectures, board, which receives the signal from the air and analyzes
using different wireless communication schemes, to coexist the state of spectrum utilization. All the result analysis can be
on non-interfering. got in graphic user interfaces of power spectral density of the
received signal.
A. RF/IF Frond-End
The Universal Software Radio Peripheral (USRP) from III. S YSTEM I MPLEMENTATION
Ettus Research, a device connected to computer with USB In this section, the details of different roles of the testbed
connection, which works with GNU Radio to create the and the implementation of PHY and MAC layer are described.
software defined radios, is adopted as the RF front-end for Two different SDR architectures are presented, one is primary
our platform. GNU Radio is an open source and free software user architecture, which is consisting of two common PC and

271
Threshold

436. 3XOVH
6RXUFH )UDPLQJ 86537;
0RGXODWRQ 6KDSLQJ
X(t) 2
A/D N pt. FFT  Average over T Energy detect

436. 7LPLQJ
6LQN 'H)UDPLQJ 3// 86535;
GHPRGXODWRQ 5HFRYHU\ Fig. 6. Implementation of an energy detector using periodogram averaging[2].

Fig. 3. Basic block diagram of the TXRX signal chain of the two primary
users.
. Detection of unused frequency spectrum and avoidance of
active primary user frequencies (spectrum whitespace detec-
tion).
. Reconfiguration to avail of the unused spectrum (exploiting
available spectrum).
. Routine DSP: including scrambling/descrambling, CRC
code/ check, channel coding/decoding, framing/defaming, and
OFDM modulation/demodulation, etc.
a) Spectrum hole detection and exploitation: The spec-
Fig. 4. Constellation diagram of the received QPSK signal.
trum sensing function enables the cognitive radio to adapt
to its environment by detecting spectrum holes. Generally,
the spectrum sensing techniques can be classified as trans-
two USRP boards, and another is secondary user architecture,
mitter detection, cooperative detection, and interference-based
which has the same hardware configuration with the primary
detection. Energy detection as a simple transmitter detection
user architecture. Both of them play a different role in the
is implemented in our testbed. This optimal technique has
cognitive radio system.
been extensively used in radiometry. An energy detector can
A. Primary user be implemented similar to a spectrum analyzer by averaging
The primary user architecture is configured as a single frequency bins of a Fast Fourier Transform (FFT), as outlined
carrier quadrature phase shift keying (QPSK) signals based in Fig. 6. Processing gain is proportional to FFT size N and
modem operating at a center frequency of 2449.2MHz and observation/averaging time T [2].
2450.8MHz. Fig. 3 illustrates the basic block diagram of the In our testbed, the energy detector is implemented using
signal chain of the two primary users. N =128 points FFT with a fully parallel pipelined architecture
The two primary users communicate with each other for the fastest speed. Due to A/D sampling at 4 MHz after
through FDD scheme at either side of the frequency of receiver decimation, this implementation has 31.25 kHz FFT
2450MHz with the distance of about two or three meters. The bin resolution. Each block of FFT outputs is averaged using
transmit power of the QPSK is related to many factors, such an accumulator with run-time controllable number of averages.
as software gain, hardware gain, antenna gain and the distance Longer averaging time reduces the noise power thus improves
between the two users. So we just test the post SNR at the SNR but with longer latency. So we choose 128100 spectral
receiver with some algorithm (M2 M4 algorithm [8] in our average(3.2ms) of 128 points FFT, which is acceptable in our
case) to reconfigure the above related parameters to guarantee real time systems. Before the testbed starts, we should test the
the performance of the two primary users. The transmitter data noise power with the energy detection above described and
symbol rates are 200kbps with software configuration. the threshold of energy detection is configured approximately
Fig. 4 shows the constellation diagram of received In-Phase 3 - 5 dB larger than the noise power as the empirical value.
(I) and Quadrature (Q) signal components on the x and y b) DSP: The DSP modules are mainly designed to make
axes, respectively, following the timing recovery stage of the the system more robust against the wireless communication,
transceiver signal chain illustrated in Fig. 3. This indicates which is also the key requirement of the cognitive radio. The
that the signal was received correctly, and following the entire base band signal processing block is implemented in
demodulation and de-framing stages, the entire end to end software on the general computer by C++ programming.
signal-chain was completed successfully. The subframe totally consists of fifteen OFDM symbols.
The guard interval (GI) is added in front of every OFDM
B. Secondary user symbol to mitigate the effects of inter symbol interference
1) The PHY Layer: In order to demonstrate the spectrum (ISI) caused by channel time spread. Among one subframe,
coexistence between the primary users and the secondary the first OFDM symbol is the reference signal for channel
users, the secondary users use reconfigurable orthogonal fre- estimation and also acts as synchronization symbol for timing
quency division multiplexing (OFDM) to avoid the primary and frequency synchronization. In the current testbed, The
users and avail of the spectrum white spaces at the same time. Zadoff-Chu sequence is chosen for the reference signals and
The basic block diagram of TXRX signal chain is shown in synchronization sequence, which has the immunity to large
Fig. 5. The process involves the following tasks: frequency offset for synchronization and const amplitude for

272
Reconfigure Spectrum
Spectrum Usage Sensing

Channel OFDM Pulse


Source CRC Framing USRP TX
Coding Modulaton Shaping

Channel OFDM
Sink CRC DeFraming Synchronization AGC USRP RX
Decoding Demodulation

Fig. 5. Basic block diagram of the TXRX signal chain used for secondary user.

16 bits 5 bits 5 byte


BOP
Source Data Packet

CRC RB--tag Data bits

Data Unit
Fig. 7. Structure of the Resource Block. Zero Padding

Fig. 8. Packetization from MAC layer to PHY layer.


channel estimation.
In order to dynamically and easily reconfigure the subcarri-
ers of the OFDM to avoiding the interfering the primary users
be simplified because the scenario in our experiment is simple.
when they occupy some frequency band, we divide the entire
available frequency (2448-2452MHz) band into five parts, At the transmitter side, the PHY layer receives the IP packet
marked f1 , f2 ...f5 , corresponding to five Resource Block from upper layer, and then the packet will be divided into
(RB) of the OFDM system, Each Resource Block contains smaller data units which are the payload of one radio frame.
about 20 subcarriers in our case. The data units need to divide again to the proper size that is
All the DSP modules are implemented independently as the the payload by one Resource Block. These divided data units
unit of Resource Block. And each Resource Block is added are then channel coded, modulated and put into radio frames
16 bits CRC (Cyclic Redundancy Check) code and RB-tag which are transmitted into air. At the receiver side, an inverse
before the data bits. CRC is used to check the data bits in process is done to recover the source data. Thus, after the
each Resource Block in one frame, and if the CRC check signal is decoded into data units, they should be combined
demonstrate the data bits of the Resource Block is error, and into IP packets and delivered to the data sink. To facilitate the
discard the whole frame. 5 bits RB-tag is attached to the data data unit combination, the BOP (Begin of Packet) tag for a
bit, which signs the state of the usage of the Resource Blocks. source packet is added at the beginning of IP packet as shown
When the receiver get the frame data, it can extract the data in Fig. 8. The format of BOP tag is a 3-byte string followed by
bits according to the RB-tag. Fig. 7 shows the structure of the 2-byte packet size (unsigned short). When the size of source
Resource Block. packet is not multiple of the size of data unit, the padding bits
The channel coding in this system is convolutional code. will be inserted at the tail[6].
The generator polynomials is selected as g(0) = 0133, As for the communication mode between SA and SB, we
g(1) = 0171 for the constraint length of 7 and the code rate of deploy a novel semiduplex schemethe simplified CSMA
1/2. In order to make the system more robust in severe wireless protocol[12]. In our testbed we assumed that primary users
channel, constraint length of 9 and turbo coding may be want to communication with each other occupying the const
implemented as our alternative in future. Furthermore, due to frequency band of f2 and f4 . The assumption is commonly
the high complexity of the viterbi decoding, we chose a SIMD seen in real wireless communication and is reasonable in our
(Single Instruction Multiple Data) optimized decoder from case. Secondary users can occupy the remaining frequency
Phil Karn to accelerate the processing speed [13]. The Karns band. In this simplified protocol, when SA station wants
viterbi decoder can reach up to 22 Mbps information bit rate to transmit, it senses the channel with the algorithm of
for 1/2 rate and the constraint length of 7 on the 3.0 GHz CPU. energy detection described above. If it is idle, it just starts
When the constraint length is 9, the maximum throughput is transmitting with the usage of five all Resource Blocks. If
4 Mbps. This decoder greatly reduces the program execution only the frequency band of f2 and f4 are occupied, it just
time. starts transmitting with the usage of the remaining three
2) The MAC Layer: Above the physical layer, data packets frequency band. If the channel is busy, the sender defers until
are re-segmented and some additional information is added to it goes idle and then starts transmitting. If a collision occurs,
these packets. For example, at our simplified MAC layer, data the colliding stations wait a random time, using the Ethernet
packets from upper layer (IP packets) are split into smaller binary exponential backoff algorithm, and then try again later.
units then the header is added. The packetizing procedure can

273
users are always interfere with each other, which will be
our future investigation. Furthermore, other spectrum sensing
algorithms such as cyclostationary feature detection algorithm,
are investigated now in our testbed for their robustness against
the noise and interference.
ACKNOWLEDGMENT
This material is based upon work supported by Wireless
Signal Processing and Network Lab, Beijing Universality of
Posts and telecommunications, Beijing, China. The opinions,
Fig. 9. Power spectral density of received QPSK signalPrimary user A
and Primary user B with the transmission mode of frequency-division-duplex findings, and conclusions or recommendations expressed are
scheme ). those of the authors. We would like to thank Lin Huang, Kan
Zheng for helping us the accomplishment of this novel testbed.
R EFERENCES
[1] Haykin S., Cognitive Radio: Brain-Empowered Wireless Communica-
tions, IEEE Journal on Selected Areas in Communications, February,
2005.
[2] D.Cabric.S.M., Mishra.R.W., Brodersen, Implementation Issues in Spec-
trum Sensing, In Asilomar Conference on Signal, Systems and Comput-
ers, November 2004.
[3] Nolan K.E., Rondeau T.W., Sutton P.D., Le B., Bostian C.W., Doyle L.E.,
Demonstration and Analyses of Collaboration, Coexistence, and Inter-
operability of Cognitive Radio Platforms (Invited paper), in Proceedings
of the 1st IEEE Workshop on Cognitive Radio Networks, Jan 11th, 2007,
Fig. 10. Power spectral density of received primary (QPSK) and secondary Las Vegas, NV.
user (OFDM) signals coexisting in the same frequency band between the [4] Nolan, K.E., Rondeau T.W., Sutton, P.D., Le, B., Bostian, C.W., Doyle,
primary and secondary users. L.E., Dynamic Spectrum Access and Coexistence Experiences Involv-
ing Two Independently Developed Cognitive Radio Testbeds, in New
Frontiers in Dynamic Spectrum Access Networks, 2007.
[5] Artem Tkachenko, Danijela Cabric, and Robert W. Brodersen, Cognitive
IV. T EST S CENARIOS AND P ERFORMANCE A NALYSIS Radio Experiments using Reconfigurable BEE2,in Signals, Systems and
Computers, 2006.
In our experimental study, we used the testbed to demon- [6] Lin Huang, Kan Zheng, uillaume Decarreau, Hanwen Cao, Gang Li,
strate the spectral sensing access and coexistence. PA and Zhangchao Ma, Zhi Yan, Huacheng Zeng, From Simulation To Demon-
stration - A SDR-Based Multi-Mode Testbed, in Proc. SDR Forum 07
PB act as the role of priority users, which are configured as Technical Conference, 2008, submmited.
QPSK at different frequency center. Fig. 9 shows the PSD [7] Rieser C.J., Rondeau T.W. Bostian C.W., Gallagher T.M., Cognitive
of the primary user QPSK signal with no other users/services radio testbed: further details and testing of a distributed genetic algorithm
based cognitive engine for programmable radios, Military Communica-
in the same frequency range observed from the Monitor. SA tions Conference, 2004. MILCOM 2004. IEEE , vol.3, pp. 1437- 1443,
and SB reconfigure to take advantage of this estimate of the 31 Oct.-3 Nov. 2004.
unused frequencies, on either side of the primary user QPSK [8] Chen, Y. and Beaulieu N.C, NDA estimation of SINR for QAM signals
, IEEE Trans. LCOMM. Vol 9, pp 688-690, 2005
signal by changing the subcarriers (resource blocks) employed [9] Universal Software Radio Peripheral (USRP) by Ettus Research LLC.
in the orthogonal frequency division multiplexing stage in Further information is available at http://www.ettus.com/
the transmit signal chain. Fig. 10 shows the reconfigurable [10] The GNU Software Radio Project. Further information is available at
http://gnuradio.org/trac.
OFDM signal occupying unused spectrum on either side of [11] Further information about Python and IT++ library is availbale at
the primary user QPSK signal. The QPSK signal in this http://www.python.org/ and http://itpp.sourceforge.net/.
case was received with less than 1% packets error in a test [12] Andrew S. Tanenbaum, Computer Networks, Fourth Edition Prentice
Hall, 2003.
according to the CRC check in the receiver side. Packets error [13] http://www.ka9q.net/code/fec/simd-viterbi-2.0.3.tar.gz.
occurs due to the interference of the secondary users and other
unknown interference source operated in the open frequency
band around 2450MHz, and also due to the latency of the
energy detection, etc.
V. C ONCLUSION
These results concern the abilities of different software-
defined radio (SDR) and cognitive radio (CR) systems to
coexist in common frequency bands. Initial analysis of co-
existence experiences involving primary users and secondary
opportunistic spectrum users in a common frequency band
have also been presented. In our case, interfere-free case
was present, but sometimes the primary users and secondary

274

You might also like