Implementation of Cooperative Spectrum Sensing Algorithm using Raspberry Pi Engr

A novel cooperative spectrum sensing algorithm is implemented and analyzed using Raspberry Pi. In the proposed setup, Nokia cell phone is used as a spectrum sensing device while Raspberry Pi functions as a FC device to collect sensing results from local sensing devices. The investigation results of the proposed setup show significant improvement in detection performance as compared to local spectrum sensing techniques. Furthermore, results show a successful communication between sensing nodes and FC. Keywords—Cooperative Spectrum Sensing; Cognitive Radio; Fusion Center; Raspberry Pi


INTRODUCTION
With the success of 4G technologies in the cellular market, more and more broadband services emerge [1].Such fast communication has ushered in a new trend, in innovation of services offered by the service provider that brings bandwidthhungry services in the form of ubiquitous communication resources [2] .The asynchronous nature of these services is present but they cannot be considered as real time if it weren"t for the constant availability of the communication spectrum and bandwidth which is getting more complex and tedious to manage as service providers introduce more and more services that have to be accommodated on the same channel.The constantly increasing demand for bandwidth and its effective utilization is what drove the robust de-centralized 2G network to evolve into a powerful centralized 4G network.The race for more bandwidth and higher data rates continues as different research efforts concentrated towards finding more ways to increase available bandwidth per user are being done all over the world.One technology, which promises to solve these issues through opportunistic spectrum access, is cognitive radio technology [3].Thus, more users can be accommodated on the same RF channels subject to absence of primary users.This idea results in thinking beyond the limits of a designated bandwidth and channel.The implementation of the evolutionary idea (of exploiting the spectrum in secondary manner) requires a significant amount of research and consideration towards devising control protocols (for secondary users) that are solely designed for the purpose of coordination and update of the participating network nodes in an opportunistic network [4].
Detection techniques are employed in an opportunistic network (5G of cellular networks) to monitor a channel`s usage by primary users and classify the usage in three classes; Black area i.e. channel that is exhausted in data rate and bandwidth due to traffic, a Gray area i.e. channel carrying medium traffic and finally, white area indicating a channel carrying little or no traffic at all [5].Experimental and statistical studies show that standard spectrum usage and idle state is enough to justify cognitive radio communications over primary licensed channels [6].
In centralized detection algorithms, a central node, also known as fusion center (FC), supervises and manages the detection.FC instructs the sensing nodes to sense a particular spectrum band and submits the sensing results.The results can be in form of complete sensing energies or one bit decisions showing activity of PU or its absence.The sensing results in form of likelihood ratios can be combined using soft combination strategies i.e. equal gain combining (EGC), maximal ratio combining (MRC), square law combining (SLC) and selection combining (SC) approaches [22].On the other hand, one bit decisions can be fused through hard decision combining strategies.These include OR, AND, n-ary [13].After computing the final outcome of the presence or absence of PU, FC broadcasts the decision regarding to SU.The transmission of sensing data from sensing nodes to FC www.ijacsa.thesai.organd the broadcast information from FC to nodes is accomplished through control channels.
Decentralized detection scheme refers to the set of algorithms where cognitive sensors group themselves based on distribution algorithm and combine their results and communicate among themselves regarding presence or absence of white spaces.This set of algorithms does not use any FC to manage the RF sensing and management task [17].
Due to dynamic wireless channel conditions, the sensing channel (between sensing node and primary user) or control channel (channel between sensing node and FC) may not be an ideal and may produce deteriorated.In such situations, relay assisted sensing can provide improved sensing performance [18,19].
We implement a co-operative spectrum sensing strategy on Raspberry pi board.The board functions as a FC where all the users will submit the sensing results and this center will combine the results to compute the final decisions regarding presence or absence of a PU.The rest of the paper is organized as follows: Section II presents a summary of the Raspberry pi Linux ARM board, Section III presents the setup of proposed test scenario, Section IV presents local spectrum sensing model, section V presents the simulation results and discussion, Section VI concludes the paper.

II. EMBEDDED ARM LINUX BOARD
The Raspberry Pi is an embedded ARM Linux board that accompanies the peripherals on miniaturized model [23].The board is used to simulate multiple logic blocks that are otherwise termed as software processes throughout the rest of the paper.Each software process runs in the main memory of the Linux kernel of the board alongside the other processes, which makes it a preferable choice for prototyping advanced applications with ranging requirements.The interfaces of board makes it easier to expand its functionality towards wireless sensor applications, industry process automation testing, data logging and recording through various device ports, ADC functionality and much more [23,24].In this paper, it"s UART; USB and Ethernet interfaces are used to accompany several wired and wireless communication media.The ability to make changes in the software both remotely and on-site makes the project`s architecture, quite flexible for future enhancements in the form of upgrades and software patches.Since the Raspberry Pi gives provision for expansion of hardware, each section in the implementation also demonstrates how the functionality accompanied by the software processes can be enhanced into an actual physical experiment through hardware rather than being emulated by software to give real-world results.However, the software processes are designed to be as close in proximity to the realworld hardware processes as much as possible [23,24].

III. SETUP OF TEST SCENARIO
This section presents the proposed implementation of cooperative spectrum sensing strategy using Raspberry Pi board.
A centralized cooperative spectrum sensing based algorithm is implemented using Raspberry Pi as FC.The employed framework consists of primary user PU and several Cognitive Radio (CR) users, the primary licensed channel of interest and a control channel for reporting the results.This is to be simulated in a soft environment in either completely software defined processes or semi software defined processes.
The proposed scenario is a semi software defined process where the outcome of cooperative sensors will be simulated by the output of a software process that computes the receiver operating curves.The result will be a flag for wireless channel i.e. idle or busy.The FC will be the central router that will carry out routing functions as it is designated as the gateway.
The CR users will be TCP/IPv4 network nodes connected to a LAN IP network and will carry out communication to simulate a local Base Transceiver Station and surrounding mobile station.The diagram illustrated in Fig. 1 depicts the proposed setup.
Another way to employ this setting is to replace the different devices on the LAN IP network by creating logical users communicating with the FC through local ports on the machine that is running the FC as shown in Fig. 2. One other change that can be made in the proposed setup without compromising the infrastructure and layout of the testing scenario is to do away with the separate TCP/IP nodes and designate the CR users as separate software processes running on the Raspberry Pi.The CR users will be software logic emulated modules that will run simultaneously on the Raspberry Pi Linux board that use TCP/IPv4 to communicate with the FC by using an IP address and port combination called a "socket".In that way, each of the CR users will have same IP as the fusion center or the Linux board but with unique port number.This setup resembles a standard cellular Base Transceiver Station (BTS) [25].To further explain this model, the layout of the testing process components is presented in the Fig. 2. www.ijacsa.thesai.orgThe software processes that emulate the CR users will collect RF signal samples, compute hypothesis testing rule and transmit one bit of information to the FC.The FC will combine the results using hard combination rule "OR" to come up with a final decision for a specific frequency band.The hard decision combining process will help in efficiently utilizing control bandwidth [26].
The communication between all the processes is achieved through sockets.Hence, communication can be carried out between the nodes and the FC in form of IP packets or more specifically, TCP packets as IP packets can"t carry out unique communication streams between the nodes on their own, the port number to be accommodated will be encapsulated in the TCP or UDP packet.In the proposed setup, an application layer protocol such as HTTP can also be used to carry out communication between the nodes but we wish to restrict the packet processing at the transport layer.The TCP packets received by a node will be processed by their respective software modules accordingly.
However, since the RF channel to be sensed also has to be emulated, hence we will list it as a node and assign software process to it so that it can emulate an RF channel behavior.Since the channel is being sensed by all CR users except the fusion center, this broadcast behavior of the channel can be emulated by broadcasting TCP packets of the channel`s state values to every software process or node except the FC.The software process or nodes that receive the TCP packets by the channel will read the channel values, perform digital signal processing on it which is optional and send it to the fusion center as TCP packets.

IV. PROPOSED SPECTRUM SENSING MODEL
In this section, we present the simulation setup for local spectrum sensing devices.Cellular phones and other wireless devices are assumed to work as cognitive sensors while Raspberry Pi is assumed to work as FC.A decision regarding presence or absence of PU is computed by CR.Furthermore, one bit decisions are also transmitted to FC for the computation of global results.The detection performance of local sensors is also compared with cooperative decisions.After computation of global probability values of detection and false alarm, the results are broadcast via common control channel to all the CRs so that unused spectral bands could be utilized and occupied bands could be avoided to prevent PU from harmful interference of secondary activity.The objective of the proposed setup is to implement the sensing logic in software and communicate that to the FC node on real-time basis to the Raspberry Pi which is serving as a FC.
The binary hypothesis for local CR sensor can be formulated as: (1) In above equation, r shows the observation of received signal.Under H 0 , cognitive user detects the absence of primary user.This condition is represented by collection of Laplace distribution.Whereas under H 1 , the cognitive user collects signal samples that are drawn from Gaussian distribution, representing the presence of PU activity in the sensing band.The proposed setup of binary hypothesis is taken from [27].
Thus, CR senses the presence of non-Gaussian noise i.e. impulsive noise that follows the following PDF.
This probability distribution is also known as Laplace.The location parameter for this distribution is assumed as, μ = 0 while scale parameter, b = 1 .This PDF is also called double exponential distribution.Under alternative hypothesis, the CR results in following PDF.(3) Using Neyman-Pearson Lemma, decision statistic can be computed using following equation: Thus, detection probability can be derived using Neyman-Pearson Lemma: 1 2 ( ln( 1)) The above equation relates detection probability with false alarm rate of spectrum sensor.It is used by local sensors to produce probability values for local spectrum sensor.After computing the decision statistics, one bit information will be sent to FC to come up with global values of detection and false alarm.Authors in [14] use OR based combination strategies to compute cumulative decisions.
In above equations, P c represents cumulative probability of detection while Q c shows the cumulative decision of false alarm based on Hard decision combining strategy at the FC.

V. PERFORMANCE EVALUATION AND RESULTS
In this section, we present the detection performance of proposed cooperative spectrum algorithm in the form of receiver operating curves (ROC).In the proposed setup CR enabled devices sense the RF spectrum for searching the unused spectral bands.After computing the decisions locally, all the sensing devices will transmit a hard decision to the FC in the form of "1" for the presence of PU and "0" for the absence of PU.Fig. 3 shows the implementation of the proposed setup.Fig. 4 compares the local detector performance with global on FC.For 0.2 false alarm probability, local detector results in detection probability of less than 0.2 while cooperative detector installed on Raspberry pi computes almost 0.4.Thus, the FC decision maker improves the detection performance more than 100%.Similarly for other values of false alarm, detection performance of FC is better than the local detector.Additionally, FC exploits hard decision combiner that consumes lesser resources in comparison to soft decision combination strategies.After computing the decisions in terms of detection and false alarm probabilities, the results will be broadcast to secondary devices so that they may be able to use specific bands that are unused by PU.Fig. 5 selects the wireless device, that is Nokia 5130c-2 for the transfer of data from FC. Furthermore, many devices can be selected that can be connected with the FC for the transmission of decision.This feature enables the FC to confirm the device before starting transmission for the purpose of gathering RF sensing data or broadcasting the final probability values of detection and false alarm.

Fig. 1 .
Fig. 1.Depicts the implementation setup for proposed sensing algorithm

Fig. 5 .
Fig. 5. Shows the number of devices detected by Raspberry Pi

Fig. 6 .
Fig. 6.Shows the selection of Nokia 5130c-2 device Fig. 6 shows data collected by several cognitive deices to the FC and also the result outcome of FC.Based on the hard decision combining technique, FC decides the RF channel as idle by deciding the presence of noise only while the channel is tagged as Busy on computing the presence of PU activity.

Fig. 7 .
Fig. 7. Shows the report sent by FC to the sensing node regarding the channel report of 2445 MHz VI.CONCLUSION A cooperative spectrum sensing algorithm is implemented on Raspberry Pi board.The proposed cooperative architecture has many benefits in comparison to separate and distributed spectrum sensors.The simulation results also show an improved performance of cooperative detector.Additionally, the emulation results of Raspberry Pi are also presented.