Modelling and Simulation in Engineering
Volume 2018 (2018), Article ID 2424305, 10 pages
https://doi.org/10.1155/2018/2424305

Research Article

SDR Based Energy Detection Spectrum Sensing in Cognitive Radio for Real Time Video Transmission

Rupali B. Patil, K. D. Kulat, and A. S. Gandhi

Department of Electronics and Communication, Visvesvaraya National Institute of Technology, Maharashtra, India

Correspondence should be addressed to Rupali B. Patil; rupali1210@gmail.com

Received 10 December 2017; Revised 10 March 2018; Accepted 20 March 2018; Published 29 April 2018

Academic Editor: Aiguo Song

Copyright © 2018 Rupali B. Patil et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

Cognitive radio is a budding approach which helps to address the imminent spectrum crisis by dynamic spectrum allocation and support the increased data traffic with an intelligent mechanism of Software Defined Radio (SDR). SDR avoid the frequent modifications in the hardware structure with the use of software defined protocols. The main novelty of the paper is an effective implementation of CR using energy based spectrum sensing method which is done on GNU radio for real time transmission of video as a primary user. From evaluation results, one can see that the proposed system can indicate the frequency band occupancy by setting the detection output. Detection output changes to one with start of video transmission. Motivation behind this work is design of a spectrum sensing method which is best suited for detection of white spaces during the transmission of video as a primary user on SDR platform.

1. Introduction

According to spectrum, survey conducted by the Federal Communication Commission (FCC) has indicated that the actual licensed spectrum is not utilized properly for various time, frequency, and geographical locations [1]. Also the demand of allocating and using the radio frequency spectra is rapidly growing due to increasing number of wireless applications [2]. An unlicensed user or secondary user may utilize this band when licensed user is absent. To encourage the proficient use of spectrum, concept of cognitive radio (CR) has been proposed in [3]. CR fundamentals and the challenges involved in dynamic spectrum allocation and sharing in CR are discussed in [4]. CR allows opportunistic usage of frequency bands that are not used by licensed users. Thus, CR relies on efficient spectrum sensing to detect vacant spectrum bands. Also deployment of new wireless devices and applications has increased more expensive hardware structure to be dealt with these types of signal processing. So, this requires reconfigurable hardware platforms. A best solution to these problems is SDR platforms. GNU radio along with SDR provides the cost effective and flexible platform. A major challenge for SDR is to equal the proficiencies of purely hardware solutions while providing intelligence that software can offer. The employment of GNU radio and Universal Software Radio Peripheral (USRP) for developing software based wireless transmission system, that is, SDR, is discussed in [5]. CR is having the capability to optimally adapt their operating parameters according to the trades of the surrounding radio environment. CR can detect the spectrum white space, that is, a portion of frequency band that is not being used by the primary users (licensed users) and utilize the same for secondary user (SU) transmission. But when licensed users start using the spectrum again, CR can detect their activity through spectrum sensing and hold the transmission generated due to secondary user’s transmission. Moreover, the ability of CR to identify and exploit the unused spectrum band allows them to coexist with inheritance radio systems, improving spectrum utilization without impairing the primary users (PU). So mainly CR comprises two types of users. First one is PU who has the license to use the given frequency band and second one is SU who is not a licensed user of the given frequency band but can use band whenever it is vacant. As soon as the PU or licensed user returns to the frequency band, SU has to vacate it and find another vacant frequency band. To detect whether a frequency band is unoccupied or not, SU needs to perform spectrum sensing. So sensing is identified as the key aspects of a CR which means a CR must be able to identify the unused spectrum band. Competencies of CR are combined with SDR. SDR enhances the functionality of CR through smart mechanism using GNU radio that would automatically reconfigure the radio parameters and senses the spectrum. There are various detection techniques available for spectrum sensing. The momentous amount of study is performed on spectrum sensing for CR based system in [6]. Energy detection constitutes a favored approach for spectrum sensing in CR due to its simplicity and applicability. The traditional energy detection technique [7], which is based upon fixed threshold, is sensitive to noise uncertainty which is unavoidable in practical cases. So in this paper, an efficient energy detector is proposed for optimum CR performance. In the proposed scheme, under a practical scenario, some parameters are measured and these parameters are used to calculate the threshold of energy based sensing method. The purpose of thresholds calculation is to maximize the probability of detection and minimize the probability of false alarm . Theoretical analysis and simulation results show the efficiency of the proposed scheme in comparison to the traditional energy detection method with less increase in complexity.

Also data traffic in air has increased beyond limit which develops the growing demand for the transfer of data, images, and video using the same medium which is used for voice transmission. So for testing instead of random data real time video signal is transmitted and at the receiver CR based energy detection of this video signal is done. This video signal is acting as a primary user and energy detector is able to detect the availability of this video signal on given frequency by setting parameter detection output.

Most research currently emphasizes on spectrum sensing in CR, but theoretical detection algorithms are not enough. As discussed in [8], SDR is an important convenient base technology for the future context-sensitive, adaptive, and learning radio units referred to as CRs. SDR requires the blending of software-based signal processing and the enabling hardware components. The overview of the criteria for such platforms and the current state of development and upcoming trends in this area are presented in [9].

A hardware test platform is required to test and check the performances of the CR. This problem can be resolved using emergent technology of SDR which gives easiness in the implementation process by replacing the hardware by software in addition to cost effectiveness. Several benefits like faster execution time and extensibility to meet new requirements are given by SDR.

A large number of experimental SDR platforms are available to support individual research projects [10]. GNU radio [11] is one of the most popular and an interesting software platform for radio network which is introduced by Blossom. It is a free software toolkit for building software radio and is compatible with SDR kits [12]. The whole GNU radio project is available under GNU license which does not limit free use of GNU radio components in research projects. This GNU radio project contains a large library of functions written in C++/python language for the SDR system and the library of several basic components for implementing basic functions of a digital radio receiver. Moreover, GNU radio is designed to work with an inexpensive hardware device.

For testing of the above project SDR-Lab kits having transmit and receive frequency range of 0.4–4 GHz are used. The SDR-LAB is a powerful software programmable hardware transceiver.

To support high date rate and good spectral efficiency are the requirements in the case of transmitting multimedia data. Gaussian Minimum Shift Keying (GMSK) is a modulation scheme which proves to be effective in wireless scenario. GMSK is derived from Minimum Shift Keying (MSK) which replaces the rectangular pulse with a sinusoidal pulse. This method will apply Gaussian filter for pulse-shaping. A Gaussian-shaped impulse response filter has an advantage that it generates a signal with low side lobes and narrower main lobe than the rectangular pulse. As it uses Gaussian filter for pulse-shaping, this modulation is called GMSK modulation. The relationship between the premodulation filter bandwidth, , and the bit period, , defines the bandwidth of the system. Global System for Mobile Communications (GSM) designers used a . This compromises between a bit error rate and an out-of-band interference since the narrow filter increases Intersymbol Interference (ISI) and reduces the signal power [13]. The GMSK modulation has been preferred for video transmission in wireless communication because it compromises between spectrum efficiency, complexity, and low spurious radiations which lessen the possibilities of adjacent channel interference.

The paper is organized as follows. Section 2 contains system outline. Section 3 considers theoretical aspects of energy based spectrum sensing. In Section 4 we investigate energy based spectrum sensing method on SDR for detection of primary user’s presence and its implementation issues. Section 5 is dedicated to theoretical analysis and numerical calculation of threshold. Section 6 presents the results from energy detector sensing method. Finally, conclusions and future scope are presented in Section 7.

2. System Outline

A block diagram of the CR-GMSK system considered in this article is shown in Figure 1. The cognitive engine is responsible for making intellectual decisions and configuring the radio and physical layer (PHY) parameters. The transmission prospects are identified by the decision unit based on the information from the policy engine, as well as local and network spectrum sensing data. As far as the PHY layer is concerned, CR can communicate with various radio-access technologies in the environment, or it can improve the quality of communication depending on the environmental characteristics, by simply changing the configuration parameters of the GMSK system and the SDR interface. Note that spectrum sensing and detection is done on single carrier frequency.

Figure 1: Overall system block diagram.

The overall block diagram of transmitter and receiver for energy based spectrum sensing is shown in Figure 2. The input to the system is a real time video captured by webcam and modulated by GMSK. It is processed through the code written in python language using GNU radio software. After this processing it is transmitted wirelessly on 1.234 GHz frequency using a SDR-LAB device. The receiver is tuned to transmitted frequency. Transmitted signal is received by another SDR-LAB Trans receiver which hands over the incoming information to the GNU radio software which has two parts; one is GMSK demodulation used for detection of video signal and another is energy based spectrum sensing which gives detection output along with signal to noise ratio (SNR) calculations. We are trying to display the received video and simultaneously trying to detect the white spaces at this frequency using energy based spectrum sensing. Testing is done by switching the video transmission on and off.

Figure 2: Overall block diagram transmitter and receiver for energy based spectrum sensing.

Project setup with SDR-Lab with Laptop is shown in Figure 3. One SDR connected to laptop is acting as transmitter and the other is acting as receiver.

Figure 3: Project setup for transmitter and receiver of energy based spectrum sensing.

3. Theoretical Aspects of Energy Based Spectrum

Energy detection is the simple spectrum sensing method because it is easy to implement and requires no prior knowledge about the primary signal. Let us assume the hypothesis model of the received signal given by the following:

Here is the primary user’s signal to be detected at the local receiver of a secondary user, is the additive white Gaussian noise, and is the channel gain from the primary user’s transmitter to the secondary user’s receiver. is a null hypothesis which means there is no primary user present in the band, while means the primary user’s presence. The detection statistics of the energy detector can be defined as the average energy of observed samples and is given by

The decision regarding the occupancy of the spectrum is given by comparing the detection statistics with a predetermined threshold . , the probability of false alarm, and , the probability of detection, are two probabilities which are used to characterize the performance of the detector. denotes the probability that the test decides , while it is actually given by

denotes the probability that the test correctly decides , given by

A good detector should ensure a high detection probability and a low false alarm , or it should optimize the spectrum usage efficiency. The efficiency of energy detector based spectrum sensing can be improved by the development of various approaches.

An efficient energy detector is proposed in which under a practical scenario some parameters are measured and these parameters are used to calculate the threshold for this system. Design of this energy detection uses a squaring device followed by an integrator, the output of which gives the decision variable. This variable is then compared with a threshold and if it is above the predefined threshold, then the result of the detector specifies that a PU is present. An energy detector sets a threshold according to the noise floor and compares it with the energy of the data stream in input. The input signal selects the required bandwidth by a band pass filter; then it is sampled. The digital implementation of this method uses the Fast Fourier Transform (FFT), so the absolute value of the samples is squared and integrated over the observation band. Finally, according to a comparison between the output of the integrator and threshold, the presence or absence of the primary user can be detected. The block diagram of this method is given in Figure 4.

Figure 4: Block diagram of energy based spectrum sensing.

4. Energy Based Spectrum Sensing on SDR

The GNU radio based transmitter flow graph shown in Figure 5 is designed to transmit a real time video signal which is acting as a PU. The modulation used for the transmission for this video signal is GMSK. This wirelessly transmitted signal is received by the GNU radio based receiver shown in Figure 6. The design of the receiver flow graph is done as per the block diagram shown in Figure 4. To measure the signal energy, selected band data is sampled with stream to vector, complex to mag blocks which perform the task of squaring and averaging. Further it is compared with a predefined threshold. The sensing method gives the output of PU signal detection by setting output flag named detection output and calculation of SNR with an assumption that no user other than PU is present on the channel. SU transmission is decided based on the detection output flag status of the PU.

Figure 5: Transmitter flow graph for video transmission designed using GNU radio.

Figure 6: Receiver side flow graph for video reception and detection of signal designed using GNU radio.

4.1. Transmitter Side Implementation

The flow graph of transmitter is shown in Figure 5. The process which is followed for the implementation and execution firstly opens the terminal window using keyboards ctrl + alt + T. Type GNU radio companion (GRC) in opened window. In untitled GRC window, double click on the option block. Set the parameters for the flow graph. And open the other block named variable in flow graph and set the sample rate value. Generate a flow graph as per shown in Figure 5 of Tx_video, by simply putting already generated GNU blocks in GNU radio companion window. To transmit a live video from webcam, input to the GMSK modulator block is fed through File Sink. To specify the rate at which the frames are to be transmitted and their size, create a new shell file Video_tx.sh in home folder. This file when executed will create a queue of First In First Out (FIFO) type to transmit data. Execute this file later on. Open the file operators category and double click on file source.

Set the address and arrange the overall flow-graph to complete video transmitting section of GMSK modulator. Now execute the Shell File Video_tx.sh and then execute this flow graph by pressing F6.

4.2. Receiver Side Implementation

The flow graph of receiver is shown in Figure 6. The process which is followed for the implementation and execution on receiver side is creating a file called Video_rx.sh in the home folder with instructions to generate queue to receive the data in FIFO manner and store the received video with extension filename.ts. Then open a terminal window using Ctrl + alt + T. At the receiver side terminal, type gnuradio-companion. Then double click on options block set the parameters and close the properties window. Open the other block named variable in flow graph and set the sample rate value as . Arrange all the blocks and logically connect them as per the flow graph as shown in Figure 6.

Then open another command prompt and type the following command after the $ sign./Video_rx.sh.

Execute the flow graph by pressing F6. Receiver side flow graphs have added blocks required for demodulation as well as the implementation of energy sensing based spectrum sensing as per the block diagram shown in Figure 4.

5. Theoretical Analysis and Numerical Calculations of Threshold

To decide the threshold value for energy based spectrum sensing for flow graph shown in Figure 6 is another challenging task. So there is a necessity to carry out the theoretical analysis and numerical calculations based on the practical conditions. The essence of energy based spectrum sensing is a binary hypothesis testing problem. Theoretical analysis is done for the same as follows:

where , , and are the received signals at CR nodes, transmitted signals at primary nodes, and white noise samples, respectively. The above two hypotheses are taken to decide the signal is present or not. The noise is assumed to be additive white Gaussian noise (AWGN) with zero mean and is a random process. The signal to noise ratio is

where is signal power and is noise power.

The energy detection algorithm is semiblind detection under the assumption of absolutely no deterministic knowledge about the signal . Let us assume that we know only the average power of the signal. The optimal detector is the correlation detector [14]. The decision model is

where is decision variable and is the threshold. If the noise variance is completely known then from Central Limit Theorem, the following approximation can be made

where is the average signal power, are the number of samples, and is the noise variance. symbol is used for approximation. The energy detector decides if

If is large, then can be approximated by a Gaussian random variable since it is the sum of independent, although not identically distributed, random variables. Thus, we need only to find out first two movements to characterize the detection performance. To do so

where .

This is because under

And hence mean of is . Using the properties of chi-squared random variables we have

, the probability of false alarm, and , the probability of detection, are given by

where is the standard Gaussian complementary Cumulative Distribution Function (CDF) and is the threshold which is .

Rearranging

Rearranging and multiplying and dividing by

Taking of in (13),

Putting (18) in (16), modified equation of is

where is the inverse standard Gaussian complementary CDF. The last approximation is valid for large . Finally we have

This equation will be recognized as the performance of the Neyman-Pearson detector. Thus, threshold formula for the energy detector based on the probability of the false alarm is derived as given in

Under the practical condition some parameters are measured and these parameters are used to calculate the threshold of the project. The gain of the RF signal and energy of the signal are selected as 10 and 0.0364, respectively. Also number of samples are taken as 150000. The variance is calculated as per (22):

Put in

The threshold calculated in (25) is set in flow graph of receiver side energy based spectrum sensing for detection of video signal.

6. Results of Energy Detection Method

The energy detection spectrum sensing in cognitive radio is implemented efficiently with GNU Radio and SDR-LAB kit for the real time video signal acting as a primary user.

The input real time video captured by webcam is modulated by GMSK. This processing is done on transmitter side in GNU radio. The detection algorithm is implemented in GNU radio on receiver side as per the the block diagram shown in Figure 4. Initially transmitted frequency is set at 1.2345 GHz but we can also adaptively change the frequency of transmission. This transmitted video signal is received by another SDR-LAB transreceiver which is tuned to transmitter, processed using GNU radio and GMSK demodulated. It is also played using VLC media player simultaneously. The same received video signal is also given to energy based spectrum sensing blockset designed using GNU radio software. The code is written in python. The threshold calculated in (25) of Section 5 is used in the threshold block of GNU radio receiver side flow graph for the detection of the real time video signal.

Energy based spectrum sensing block gives the output of video signal detection in the form of flag named detection output. The SNR and energy of signal are also measured on receiver side for the transmitted video signal with the help of energy detector spectrum sensing method. If video is present energy of the signal becomes higher than the threshold and detected output becomes one. But if the signal transmission stops then the energy of the signal becomes less than threshold and detected output becomes zero. Here video signal is acting as primary user. This shows successful implementation of energy based detector which detects the primary user’s presence on given frequency by setting the detection output. Fast Fourier Transforms (FFT) and scope plots are used to observe the signals at each point. Initially the working of only energy detector is also tested under noise condition with no signal; results clearly show that noise is detected as no signal present by the detection output flag in Figure 7. Figure 8 shows the results when video transmission stops with status of detection output and energy of the signal. The detection output and the energy of the signal becomes zero as transmission of video stops, while Figure 9 shows the result of energy detector when the video transmission is going on. The detector output is one and energy of received signal is measured at the output when the video transmission is going on. Figure 10 shows the FFT plot specifying amplitude in decibel (dB) versus frequency (KHz) at 1.23 GHz. The received signal is represented with FFT plot in GUI of GNU radio companion. The results of the energy detector are tested and verified by varying the distance between transmitter and receiver from one to ten meters.

Figure 7: Energy based detector output is zero under only noise no signal condition.

Figure 8: Energy based detector output is zero as the transmission stops.

Figure 9: Energy based detector output is one as the transmission starts.

Figure 10: Spectrum of received signal (FFT plot).

7. Conclusion and Future Scope

GNU radio based innovative approach has been designed for detection of transmitted live video using energy based spectrum sensing of CR and implemented on SDR platform. Transmitted signal is modulated with GMSK and energy detector is implemented successfully with averaging blocks. In conclusion, this work has produced a significant amount of theoretical and algorithmic results for energy detector; moreover, the SDR implementation along with GNU radio offers a set of tools that allow the creation of a realistic CR system with real time spectrum sensing capabilities. So we have successfully designed and implemented CR based communication system for real time video transmission.

Future work focuses on experimentation of same spectrum sensing techniques for improving the performance in cognitive radio and also finding out the one which is more suitable to work in wireless environment. Further this can be extended for simultaneous transmission of multiple signals and use of multiple frequency bands. Also this work will be quite helpful for implementation of real time projects such as traffic control which can use this spectrum sensing method for wireless transmission and detection of traffic video signals data from multiple signal posts to one master check post. This can be further transferred to control unit which will use this information for controlling the traffic. So decisive aim of this system is design and implementation of CR based traffic control system for real time video transmission.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

References

Federal Communications Commission, “Spectrum policy task force,” Report ET Docket no 02-135, 2002.

S.-S. Byun, K. Kansanen, I. Balasingham, and J.-M. Gil, “Achieving fair spectrum allocation and reduced spectrum handoff in wireless sensor networks: modeling via biobjective optimization,” Modelling and Simulation in Engineering, vol. 2014, Article ID 406462, 12 pages, 2014.

J. Mitola and G. Q. Maguire, “Cognitive radio: making software radios more personal,” IEEE Personal Communications, vol. 6, no. 4, pp. 13–18, 1999.

B. Wang and K. J. R. Liu, “Advances in cognitive radio networks: a survey,” IEEE Journal of Selected Topics in Signal Processing, vol. 5, no. 1, pp. 5–23, 2011.

Z. Tong, M. S. Arifianto, and C. F. Liau, “Wireless transmission using universal software radio peripheral,” in Proceedings of the International Conference on Space Science and Communication (IconSpace '09), pp. 19–23, Negeri Sembilan, Malaysia, October 2009.

I. F. Akyildiz, W.-Y. Lee, M. C. Vuran, and S. Mohanty, “NeXt generation/dynamic spectrum access/cognitive radio wireless networks: a survey,” Computer Networks, vol. 50, no. 13, pp. 2127–2159, 2006.

H. Urkowitz, “Energy detection of unknown deterministic signals,” Proceedings of the IEEE, vol. 55, no. 4, pp. 523–531, 1967.

T. Ulversoy, “Software defined radio: Challenges and opportunities,” IEEE Communications Surveys & Tutorials, vol. 12, no. 4, pp. 531–550, 2010.

R. Farrell, M. Sanchez, and G. Corley, “Software-defined radio demonstrators: an example and future trends,” International Journal of Digital Multimedia Broadcasting, vol. 2009, Article ID 547650, 12 pages, 2009.

E. Blossom, “GNU radio: tools for exploring the radio frequency spectrum,” Linux Journal, no. 122, 2004.

GNU Radio, 2017, http://gnuradio.org/.

SDR Kit, 2017, http://sdr-lab.com/.

S. Haykin, Communication Systems, John Wiley & Sons, New York, NY, USA, 4th edition, 2001.

R. Tandra and A. Sahai, “SNR walls for signal detection,” IEEE Journal of Selected Topics in Signal Processing, vol. 2, no. 1, pp. 4–17, 2008.