You are on page 1of 5

Proceedings of the 2009 IEEE 9th Malaysia International Conference on Communications 15 -17 December 2009 Kuala Lumpur Malaysia

Energy Detection Sensing based on GNU Radio and USRP: An Analysis Study
Mohd Adib Sarijari, Arief Marwanto, Norsheila Fisal, Sharifah Kamilah Syed Yusof, Rozeha A. Rashid, Muhammad Haikal Satria Telematic Research Group, Fakulti Kejuruteraan Elektrik
Universiti Teknologi Malaysia Skudai, Johor
{adib_sairi|sheila|kamilah|rozeha}@fke.utm.my ariefmarwanto@gmail.com, email@haikalsatria.com

Abstract-Cognitive radio wireless networks are an emerging communication paradigm to effectively address spectrum scarcity challenge. Spectrum sensing plays a paramount role in cognitive radio, which is widely agreed to be the most promising method for alleviating the symptom of RF spectral scarcity. Dynamic access of unused spectrum via a cognitive radio asks for flexible radio circuits that can work at an arbitrary radio frequency. In this paper, we analyze the performance of spectrum sensing on GNU Radio system with USRP. We investigating spectrum scarcity and proposed the algorithm that performed and measuring the energy of Rx signal in a fixed bandwidth, W, over an observation time window, T. The results presented that it can detected of primary user signal over the fixed bandwidth which occupied the spectrum. Keywords Software Defined Radio, GNU Radio, USRP, Spectrum Sensing

II. SOFTWARE RADIO AND SOFTWARE DEFINED RADIO Software Radio (SR) is where all the signal manipulations and processing works in radio communication are done in software instead of hardware. Fig.1 shows the concept of Software Radio. In software radio, analog to digital converter (ADC) process is directly done after the antenna. ADC will digitize the electromagnetic wave captured by the antenna and pass it to the baseband processor for further process; demodulation, channel coding, source coding and etc.

ADC DAC Baseband Processing

I. INTRODUCTION The high speed data and voice communication services are a rapid development in wireless communication technology providing the network services anywhere and anytime. As radio spectrum is the most important resource that need to be efficiently utilized. The cognitive radio technology has been proposed to fulfill this requirement of efficient radio spectrum utilization. Otherwise, the cognitive radio technology intends to fulfill this requirement of efficient radio spectrum utilization. The idea of cognitive radio gives us the radio that senses and reacts to its operating environment. Cognitive radio is very helpful in improving the use of spectrum resources and also to reduce the engineering and planning time. Frequency of operation, transmitter power and modulation are just a few of the operating parameters that can automatically be adjusted in a cognitive radio system. The cognitive radio terminology was invented by Mitola [1] and refers to a smart radio which has the ability to sense the external environment, learn from the history and make intelligent decisions to adjust its transmission parameters according to the current state of the environment. Cognitive radios have recently received much attention for two reasons: flexibility and potential gains in spectral efficiency. They can rapidly upgrade, change their transmission protocols and schemes, listen to the spectrum as well as quickly adapt to different spectrum policies.

Fig.1 Software Radio Block Diagram

In general, Software Defined Radio (SDR) is defined as a software based communication platform which characteristics can be reconfigured and modified to perform different functions at different times. III. UNIVERSAL SOFTWARE RADIO PERIPHERAL Universal Software Radio Peripheral (USRP) is a flexible low-cost platform for software defined radios developed by Matt Ettus [2]. USRP consists of two main boards; the daughter board and the mother board. The mother board consists of four 12-bit Analog to Digital Converter (ADC) with sampling rate up to 64 MS/s, four 14-bit Digital to Analog Converter (DAC) with speed up to 128 MS/s, two Digital up Converter (DUC) to up convert the baseband signal to 128 MS/s before translating them to the selected output frequency, a programmable USB 2.0 controller for communication between USRP and GNU Radio and an FPGA for implementing four Digital Down Converter (DDC) and high rate signal processing. It is capable to simultaneously transmit and receive signal in real time due to fully coherent in all sampling clocks and local oscillator. IV. GNU RADIO GNU Radio is an open source software toolkit which consists of signal processing blocks library and the glue to tie these blocks together for building and deploying software defined radios [1]. The signal processing blocks

978-1-4244-5532-4/09/$26.00 2009 IEEE

338

are written in C++ while python is used as a scripting language to tie the blocks together to form the flow graph. SWIG is use as the interface compiler which allows the integration between C++ and Python language. Fig.3 shows the structure of GNU Radio and USRP SDR. USRP digitized the inflow data from the air and passing to GNU Radio through over the USB interface.

However, locking detection requires more appropriate information about PS, including frame structure, modulation types, and coding schemes, etc. However, above spectrum sensing mechanisms is focusing on physical layer detection. We proposed one of the techniques that applied in our algorithm. We focus on optimization for detecting any unknown zero-mean constellation signals. In the energy detection approach, the radio frequency energy in the channel is measured whether the channel is occupied or not. VI. SPECTRUM SENSING ALGORITHM Spectrum sensing can be modeled as a binary channel that transmit Gnuradio link availability (one bit information in link layer) to Gnuradio-Tx with transition probabilities representing spectrum sensing capability, probability of missing detection and probability of false alarm. Therefore, traditional spectrum sensing mechanisms could be explained by a mathematical structure of defining link availability. In order to optimal for detecting any unknown zero-mean constellation signals, we calculate the radio frequency energy in the channel to determine occupied channels. It refers to the magnitude squared of the FFT output. This incoming data string length is the received signal x (t) which is sampled in a time window are first passed through an FFT device to get spectrum x (f). The peak of the spectrum is then located. After windowing the peak of the spectrum x (t) then we resolved Y (f). In this algorithm, we assumed that the energy signal is center frequency that has a power spectral density (PSD). We represent the center frequency as m.data.

Fig.3 GNU Radio Components

V. SPECTRUM SENSING Spectrum sensing is a key element in cognitive radio communication as it should be firstly performed before allowing unlicensed users to access a vacant licensed channel. To facilitate the spectrum sensing, at time instant tn, we usually use a hypothesis testing as follows. H1: Y = I + N H0: Y = S + I + N (1)

where Y means the observation at CR-Tx; S represents signal from Primary System (PS); I is the interference from co-existing multi-radio wireless networks; N is additive white Gaussian noise (AWGN). They are all random variables at time tn. We can conduct this hypothesis testing in several ways based on different criterions and different assumptions. [3]-[5]. In order to enhance the detection of probability, many signal detection techniques can be used in spectrum sensing, in the following, we give an overview of some well-known spectrum sensing techniques: 1) Energy Detection [7]-[11]: Energy detection is widely considered due to its simple complexity and no need of a priori knowledge of PU. However, due to noise and interference power uncertainty, the performance of energy detection severely degrades [6][18], and the detector fails to differentiate PS from the interference. 2) Cyclostationary Detection [14]-[16]: Stationary PS signal can be exploited to achieve a better and more robust detector. Stationary observation coupled with the periodicity of carriers, pulse trains, repeating spreading code, etc., results in a cyclostationary model for the signal, which can be exploited in frequency domain by the spectral correlation function [12][13], with high computational complexity and long observation duration. 3) Locking Detection [5][17]: In practical communication systems, pilots and preambles are usually periodically transmitted to facilitate synchronization and channel estimation, etc. These known signals can be used for locking detection to distinguish PS from noise and the interference.

Fig.4 Proposed Energy Detection Algorithm on GNU Radio - USRP

339

Energy Detection algorithm flow chart used in this paper is shown in Fig.4. In this paper, the number of FFT bin used is 512. The algorithm is designed to extract the magnitude of the center frequency and the incoming data vector length, convert this data string to a floating format and then, make a decision on either the channel is occupied or free. At the beginning of the program, all the parameters used in the algorithm are being initialized. After the initialization, first thing to do is to read the data from the receiver. The receiver will return the reading of the spectrum to a buffer called m.data and the size of the buffer is depend on the value of the FFT bin that has been set; in our case is 512. The m.data contains the magnitude squared of the FFT output with float type of data. The first byte inside m.data; m.data[0] is the center frequency of the channel. The second byte; m.data[1] until half of the FFT bin number; m.data[254] is the positive side of the channel while m.data[255] until m.data[511] is the negative side of the channel. Every channel will be sampled 100 times and the average value of each channel will be compared with the threshold which the value had been predefined to make the decision either the channel is occupied or is it free. This decision will then be use by the spectrum access algorithm to access the free channel. VII. SPECTRUM SENSING EXPERIMENTAL SETUP In this works, Fig.5 shows the experimental setup for the experimental study of SDR test-bed implementation utilizing GNU Radio and USRP. Three experiments will be conducted and the performance of the developed GNU Radio SDR test bed will be analyzed. Two USRP, one Laptop and one PC were used to run these experiments. PC with one USRP will act as the receiver while Laptop and another USRP will be the transmitter. Daughter boards used for these experiments are RFX2400 which can cover frequencies from 2.3GHz to 2.9GHz. For software part, we have been reconfigurable the example of benchmark_tx.py and usrp_spectrum_sense.py are used. Indoor area is considered for this experiment with the distance of Tx USRP and Rx USRP is 660 mm.

A. Transmitter

Fig.6 SDR Transmitter of Spectrum Sensing

Fig.6 shows the transmitter blocks. It consists of three blocks which are the data packet block, the modulator block, and the USRP block. The daughter board used on the USRP is RFX2400 which can transmit and receive signal in frequency between 2.3GHz to 2.9GHz and the modulator use in this experiment is the GMSK modulator. GNU Radio and the USRP will be communicating via USB 2.0. The file of benchmark_tx.py are generate the data packet then modulated with GMSK modulation inside the modulator block. The bitrate are setup on 500 kb/s incorporate with Gaussian filter is 0.35. The sample of symbols is 2 and transmission of amplitude is 4915.05. Then it will be shaped to the waveform domain by the pulse sharper and send to the DUC and DAC on the USRP via USB 2.0 communication. This process will be executed by calling send_pkt function in GNU Radio. USRP will then transmit the signal in the desired frequency via its daughter board. B. Receiver Fig.7 shows the block diagram of the SDR receiver. The signal received via USRPs daughter board (RFX2400) will be converted to the IF frequency and then sampled by the ADC on the USRP. It then will be decimate by the DDC inside the FPGA and send to the GNU Radio via USB 2.0 communication. The stream of bit from USRP is demodulated by the demodulator block and then past to the Correlator to detect the start and end of packet. Then the data that had being grouped into packet will be sensed in term of magnitude squared of the FFT output. In this terminology, the algorithm on usrp_spectrum_sense.py is designed to extract the center frequency and the incoming data vector length which is recognized as power received (m.data).

Fig. 7 SDR Receiver of Spectrum Sensing

Fig.5 GNU Radio Components

Based on this scenario, where Y means the observation at Tx-USRP is running; its presenting the interference from coexisting multi-radio wireless networks on our indoor setup (I) and utilizing additive white Gaussian noise (N). On the receiver parts, we observed that represents signal from Primary User (S); the interference from co-existing multiradio wireless networks (I) and additive white Gaussian noise (N).

340

VIII. EXPERIMENTAL RESULTS The first experiment aims to investigate the performance of spectrum sense without the transmitting Primary User which is utilizing the frequency range. In order to compare and examined our algorithm, we proposed the frequency range is 2.5GHz 2.508GHz. On this stage, the algorithm is only sensed and scanned on the Rx USRP parts. The result shown in Figure 9 that without any Primary Users or secondary users are utilized this spectrum; its blank or empty magnitude squared of the m.data and only displayed the center frequency. The spike that rises on this graph is detected as noise of the surround indoor setup.

detecting any unknown zero-mean constellation signals, the radio frequency energy in the channel is then measured to determine whether the channel is occupied or not. The results shown that energy detection algorithm is able to sensed and detect the spectrum frequency range. For the future research we refer it to applied on OFDM Dynamic Spectrum Access term in order to maintain the spectral efficient of unused spectrum by investigating in terms of frequency domain, SNR, BER and PER. REFERENCES
[1] [2] [3] [4] [5] [6] [7] J.Mitola. Software radios-survey, critical evaluation and future directions, IEEE National Telesystems Conference, pages 13/1513/23, 19-20 May 1992. Matt Ettus. Universal software radio peripheral. http://www.ettus.com. J. Ma, G. Y. Li, and B. H. Juang, Signal processing in cognitive radio, Proceeding of the IEEE, vol. 97, no. 5, May 2009. T. Yucek and H. Arslan, A survey of spectrum sensing algorithms for cognitive radio applications, IEEE Communications Surveys & Tutorials, vol. 11, no. 1, First Quater 2009. D. Cabric, S. M. Mishra, and R. W. Broderson, Implementation issues in spectrum sensing for cognitive radios, IEEE Proc. Signals, Systems, and Computers, pp. 772-776, Nov. 2004. A. Sahai, N. Hoven, and R. Tandra, Some fundamental limits on cognitive radio, in Proc. Allerton Conf. on Commun., Control, and Computing, Oct. 2004. F. F. Digham, M. S. Alouini, and M. K. Simon, On the energy detection of unknown signals over fading channels, IEEE Proc. ICC, pp. 3575-3579, May 2003. Y. M. Kim, G. Zheng, S. H. Sohn, and J. M. Kim, An alternative energy detection using sliding window for cognitive radio system, IEEE Proc. ICACT, pp. 481-485, Feb. 2008. J. Zhu, Z. Xu, F. Wang, B. Huang, and B. Zhang, Double threshold energy detection of cooperative spectrum sensing in cognitive radio, IEEE Proc. CrownCom, pp. 1-5, May 2008. B. Farhang-Boroujeny, Filter bank spectrum sensing for cognitive radios, IEEE Transactions on Signal Processing, vol. 56, no. 5, pp. 1801-1811, May 2008. F. Penna, C. Pastrone, M. A. Spirito, and R. Garello, Energy detection spectrum sensing with discontinuous primary user signal, IEEE Proc. ICC, Jun. 2009. W. A. Gardner, Signal interception: A unifying theoretical framework for feature detection, IEEE Transactions on Communications,vol. 38, pp. 897-906, Aug. 1988. W. A. Gardner, Exploitation of spectral redundency in cyclostationary signals, IEEE Signal Processing Magazine, vol.8, pp. 14-36, Apr. 1991. S. Y. Tu, K. C. Chen, and R. Prasad, Spectrum sensing of OFDMA systems for cognitive radio networks, to appear in the IEEE Transactions on Vehicular Technology. K. Kim, I. A. Akbar, K. K. Bae, J-S Um, C. M. Spooner, and J. H. Reed, Cyclostationary approaches to signal detection and classification in cognitive radio, IEEE Proc. DySPAN, pp. 212-215, Apr. 2007. H. Guo, H. Hu, and Y. Yang, Cyclostaionary signatures in OFDMbased cognitive radios with cyclic delay diversity, Proc. IEEE ICC, Jun. 2009. D. Cabric, A. Tkachenko, and R. W. Brodersen, Spectrum sensing measurements of pilot, energy, and collaborative detection, IEEE Proc. MILCOM, pp. 1-7, Oct, 2006. Y. Zeng and Y. C. Liang, Covariance based signal detections for cognitive radio, IEEE Proc. DySPAN, pp. 202-207, Apr. 2007. Y. Zeng and Y. C. Liang, Maximum-minimum eigenvalue detection for cognitive radio, IEEE Proc. PIMRC, pp. 1-5, Sep. 2007. Y. Zeng and Y. C. Liang, Spectrum-sensing algorithms for cognitive radio based on statistical covariances, IEEE Transactions on Vehicular Technology, vol. 58, no. 4, May 2009. Minh Nguyen. Software Radio (R) Evolution and Its Application to Aeronautical Mobile Communications, May 19-22, 2003. Peter G. Cook ,Wayne Bonser. Architectural Overview of the SPEAKeasy System. IEEE Journal On Selected Areas In Communications, Vol. 17, No. 4, April 1999.

Fig.9 Spectrum Sensing without Primary User on 2.5 GHz 2.508 GHz

The second experiment is aimed to sensing the spectrum that is performing our algorithm with the same frequency range, 2.5GHz 2.508GH. On this part we assigned the Primary User that are transmitter over the air from the Tx USRP by generate the benchmark_tx.py file. Moreover, the algorithm acts to gain the magnitude squared of the FFT output and extracted it to an m.data. When, the first byte inside m.data; Then the second byte; m.data[1] until half of the FFT bin number; m.data[254] will averaged by adder of m.data along the channel. The results shown in Figure 10 that m.data are utilized the channels over the time domain in milliseconds received with being applied the Primary Users. The utilized of the spectrum shown that our algorithm able to sensed and detected the unused channel is well. This graph shows that m.data is utilizing the channels. The algorithm has able to manage channel detections and resolved it on the graph.

[8] [9] [10] [11] [12] [13] [14] [15]

[16] [17] [18] [19] Fig.10 Spectrum Sense on 2.5 GHz 2.508 GHz [20] [21] [22]

IX. CONCLUSION In this paper, we present the viability of using energy detections algorithm on GNU Radio - USRP to sense and detected the spectrum frequency. Our algorithm is based on magnitude squared of the FFT output which is optimal for
341

[23] Jeffrey Hugh Reed. Software Radio: A Modern Approach to Radio Engineering," Prentice Hall PTR, 2002. ISBN 0130811580, 9780130811585. [24] Raymond J. Lackey and Donald W. Upmal. Speakeasy: The Military Software Radio. IEEE IEEE Communicdtions blagctzine May 1995. [26] Software Communications Architecture Specification (Version 2.2.2), Joint Program Executive Office (JPEO) Joint Tactical Radio System (JTRS), 15 May 2006. [27] GNU Software Radio project. http://www.gnu.org/software/gnuradio/. [28] Zhi Yan, Zhangchao Ma, Hanwen Cao, Gang Li, and Wenbo Wang, Spectrum Sensing, Access and Coexistence Testbed for Cognitive Radio Using USRP, 4th IEEE International Conference on Circuits and Systems for Communications, 2008. ICCSC 2008, 26-28 May 2008.

[29] Ahmad Ali Tabassam, Stefan Heiss, Bluetooth Clock Recovery and Hop Sequence Synchronization Using Software Defined Radios, Region 5 Conference, 2008 IEEE 17-20 April 2008. [30] D.Cabric.S.M., Mishra.R.W., Brodersen, Implementation Issues in Spectrum Sensing, In Asilomar Conference on Signal, Systems and Computers, November 2004. [31] Amalia Roca, Implementation of a WiMAX simulator in Simulink. Thesis for Diploma In Institiut Of Nachrichtentechnik Und Hochfrequenztechnik, Torreblanca Castelln, Spain, February 2007. [32] Dawei Shen, Tutorial 1: GNU Radio Installation Guide Step by Step. May 19, 2005. [33] GNU Radio Trac, http://gnuradio.org/trac/wiki

342

You might also like