cognitive radio networks

60
B.TECH MAJOR PROJECT REPORT ON CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS SUBMITTED IN PARTIAL FULFILMENT OF REQUIREMENT OF BACHELOR OF TECHNOLOGY IN INFORMATION TECHNOLOGY MALAVIYA NATIONAL INSTITUTE OF TECHNOLOGY JAIPUR PROJECT GUIDE Mr. B RAMESH BABU SUBMITTED BY KORNEPATI SESHAGIRI RAO

Upload: seshagiri-rao-kornepati

Post on 17-Jan-2017

298 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Cognitive Radio Networks

B.TECH MAJOR PROJECT REPORTON

CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO

NETWORKS

SUBMITTED IN PARTIAL FULFILMENT OF REQUIREMENT OF BACHELOR OF TECHNOLOGY IN INFORMATION TECHNOLOGY

MALAVIYA NATIONAL INSTITUTE OF TECHNOLOGY JAIPUR

PROJECT GUIDE

Mr. B RAMESH BABU

SUBMITTED BY

KORNEPATI SESHAGIRI RAO

DIVYAPAL SINGH YADUVANSHI

ANKIT SONI

Page 2: Cognitive Radio Networks

DECLARATION

I, hereby declare that the project report entitled “CLUSTERING ALGORITHM FOR

COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS”

submitted by our team( K Seshagiri Rao, Divyapal Singh Yaduvanshi, Ankit Soni) to

Computer Engineering Department of Malaviya National Institute Of Technology, Jaipur

for the partial fulfilment requirement for the award of degree of Bachelor Of Technology

is a record of bonafide project work carried out by me under the supervision of

Mr B Ramesh Babu, Assistant Professor, Computer Engg., Dept., MNIT. I further

declare that the work reported in this project has not been submitted or will not be

submitted, either in full or partial, for the award of any other degree or diploma in any

other Institute or University.

KORNEPATI SESHAGIRI RAO:

DIVYAPAL SINGH YADUVANSHI:

ANKIT SONI:

DATE: 01-05-2014

2 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 3: Cognitive Radio Networks

ACKNOWLEDGEMENT

We are very highly grateful to our guide and mentor Mr B Bamesh Babu for

allowing us to do this project work. It is truly a matter of great pleasure us to

express our sincere thanks and gratitude to Mr Ramesh Babu Sir for his

supervision and encouragement throughout this project. It has been a mind

boggling experience to work in the field of Cognitive Radio Networks, which is

going to be revolution in the coming decades due to the unavailability of

spectrum. It would have been impossible to complete what we have done during

the compilation of this project.

K Seshagiri Rao (2010UIT190)

Divyapal Singh Yaduvanshi (2010UIT191)

Ankit Soni (2010UIT166)

Date: 01-05-2014

3 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 4: Cognitive Radio Networks

ABSTRACT

Cognitive radio networks have been recognized as a promising paradigm to address the spectrum under-utilization problem. For the improvement of efficiency of the network, to share the network information, spectrum holes and primary user activity, there is a necessity for a Common Control Channel for the network. This report gives a mechanism of sensing and creating a channel for the CCC implementation in OFDM using Bandit Algorithm. This report also addresses the problems of Dynamic Clustering and Primary User Robustness with possible solutions that ensure reliability of the Control Channel. The algorithm is implemented with a network hierarchy that has 3 level nodes. This report has a very detailed description of dynamic clustering at various instances of the network. All the cases described do cover the clustering cases when there are clusters already existing in the network. The Bandit algorithm described solves the case of clustering when there are no clusters previously existing.

4 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 5: Cognitive Radio Networks

TABLE OF CONTENTS

Chapter 1 INTRODUCTION…………………………………………………………………. 7

1.1 Cognitive Radio Network 1.2 History Of Cognitive Radio Network 1.3 Characteristics 1.3.1 Spectrum Sensing 1.3.2 Re-configurability 1.3.3 Spectrum Sharing

1.3.4 Network Discovery

Chapter 2 COMMON CONTROL CHANNEL (CCC)……………………………….. 9

2.1 Definition 2.2 Provisions by CCC 2.3 Classification

Chapter 3 CCC DESIGN……………………………………………………………………… 12

3.1 Sensing 3.2 Sub Carrier Construction 3.3 Guard Band Selection 3.4 Problem-Dynamic Clustering

Chapter 4 PROBLEM DESCRIPTION…………………………………………………… 22

4.1 Clustering 4.2 Primary User Robustness

Chapter 5 CONVENTIONS…………………………………………………………………. 23

5.1 Cognitve Radio Network Herarchy 5.2 Data Conventions 5.3 Messages

5 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 6: Cognitive Radio Networks

5.4 PriorityChapter 6 ALGORITHMS……………………………………………………………………. 27

6.1 Clusters Exist and 1 New Node Enters 6.2 Clusters Exist and a New Cluster Enters 6.3 Clusters Exist and N-New Nodes Enter 6.4 Head Node of a Cluster Leaves 6.5 Head and Backup Head Leave Simultaneously 6.6 A Leader Leaves 6.7 A Node Leaves a Cluster 6.8 Primary User Returns at a Frequency

Chapter 7 SIMULATION……………………………………………………………………. 38

Chapter 8 CONLUSION……………………………………………………………………… 42

Chapter 9 REFERENCES…………………………………………………………………….. 43

6 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 7: Cognitive Radio Networks

CHAPTER 1

INTRODUCTION

In the later part of 20th century and during the early part 21st, the development of adaptive and intelligent wireless devices called cognitive radios, along with the invent of secondary spectrum licensing, has led to a completely new paradigm called COGNITIVE NETWORKS.

1.1 Cognitive Radio NetworksCognitive radio is an intelligent wireless communication system that is aware of its surrounding environment (i.e., outside world), and uses the methodology of understanding by buildiSng to learn from the environment and adapt its internal states to statistical variations in the incoming RF stimuli by making corresponding changes in certain operating parameters (e.g., transmit-power, carrier-frequency, and modulation strategy) in real-time, with two primary objectives in mind: highly reliable communication whenever and wherever needed; efficient utilization of the radio spectrum

Cognitive networks are wireless networks that consist of several types of users: often a primary user (the primary license-holder of a spectrum band) and secondary users (cognitive radios). These cognitive users employ their cognitive abilities to communicate without harming the primary users.

1.2 History Of Cognitive Radio NetworksThe earliest definition of the CRN was provided by Theo Kantor in his doctoral research at KTH, The Royal Institute of Technology, Stockholm, including a presentation in June 1998 of the cognitive network as the network with memory.

Cognitive radio, Kantor's cognitive networks, and IBM's autonomic networks provided the foundation for the parallel evolution of cognitive wireless networks and other cognitive networks. One of the attempts to define the concept of cognitive network was made in 2005 by Thomas and is based on an older idea of the Knowledge Plane described by Clark.

The Knowledge Plane is "a pervasive system within the network that builds and maintains high level models of what the network is supposed to do, in order to provide services and advice to other elements of the network".

7 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 8: Cognitive Radio Networks

The concept of large scale cognitive network was further made in 2008 by Song, where such Knowledge Plan is clearly defined for large scale wireless networks as the knowledge about the availability of radio spectrum and wireless stations.

1.3 Characteristics

1.3.1 Spectrum Sensing

A cognitive radio can sense spectrum and detect “spectrum holes” which are those frequency bands not used by the licensed users or having limited interference with them.

1.3.2 Re-Configurability

a. Frequency Agility- It is the ability of a radio to change its operating frequency. This ability usually combines with a method to dynamically select the appropriate operating frequency based on the sensing of signals from other transmitters or on some other method.

b. Dynamic Frequency Selection- It is defined in the rules as a mechanism that dynamically detects signals from other radio frequency systems. The methods that a device could use to decide when to change frequency or polarization could include spectrum sensing, geographic location monitoring, or an instruction from a network or another device.

c. Transmit Power Control- Transmit power control is a feature that enables a device to dynamically switch between several transmission power levels in the data transmission process. It allows transmission at the allowable limits when necessary, but reduces the transmitter power to a lower level to allow greater sharing of spectrum when higher power operation is not necessary.

d. Dynamic System/Network Access- For a cognitive radio terminal to access multiple communication systems/networks which run different protocols, the ability to reconfigure itself to be compatible with these systems is necessary.

1.3.3 Spectrum Sharing

A cognitive radio could incorporate a mechanism that would enable sharing of spectrum under the terms of an agreement between a licensee and a third party. Parties may eventually be able to negotiate for spectrum use on an ad hoc or real-time basis, without the need for prior agreements between all parties.

1.3.4 Network Discovery

For a cognitive radio terminal to determine the best way to communicate, it shall first discover available networks around it. These networks are reachable either via directed one hop communication or via multi-hop relay nodes. For example, when a cognitive radio terminal has to make a phone call, it shall discover if there is GSM BTSs or WiFi APs nearby. If there is no

8 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 9: Cognitive Radio Networks

directed communication link between the terminal and the BTSs/APs but through other cognitive radio terminals some access networks are reachable, it can still make a call in this circumstance. The ability to discovery one hop or multi-hop away access networks is important.

CHAPTER 2

COMMON CONTROL CHANNEL

CR users improve spectrum efficiency by opportunistic spectrum access when the licensed spectrum is not occupied by the primary users (PUs). CR users also need to sense the spectrum and vacate the channel upon the detection of the PU’s presence to protect PUs from harmful interference. To achieve these fundamental CR functions, CR users usually coordinate with each other by using a common medium for control message exchange. This common medium is known as a common control channel.

2.1 DefinitionA CCC in CR networks facilitates a variety of operations from transmitter–receiver handshake, neighbor discovery, channel access negotiation, topology change and routing information updates, to the cooperation among CR users.

Specifically, CR users show their existence by broadcasting control messages on the CCC for neighboring users in the proximity to maintain the contact and the network’s connectivity. Moreover, CR users can cooperate and share their spectrum sensing data with each other by using the CCC to improve the detection of PUs. More importantly, CR users need to inform each other on the changes of PU activity, spectrum availability, and network topology so as to improve the CR throughput and spectrum efficiency. Therefore, it is essential to devise CCC schemes that can reliably establish and efficiently maintain CCCs in CR networks.

2.2 CCC Provisions The Common Control Channel facilitates the following operations/functionalities for the CRN-

Receiver Handshake Neighbour Discovery Channel Access Negotiation Routing Info Exchange Topology Change Spectrum Sensing Info

9 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 10: Cognitive Radio Networks

2.3 CCC ClassificationThe CCC design classification is first divided into overlay and underlay CCC schemes. This first-level categorization reflects two primary spectrum sharing approaches in the CR paradigm. Contrary to the overlay approaches where the majority of CCC designs are centered, the underlay CCC schemes mainly utilize the ultra-wideband (UWB) transmission technology. Overlay approaches are then divided into in-band and out band schemes as in. In terms of CCC coverage, in-band approaches are local while the out-of-band schemes are mainly global.

The in-band schemes are further classified as two categories: link-based and group-based CCC designs. The out-of-band schemes are primarily composed of dedicated CCC designs. Finally, the link-based, group based, and dedicated CCC designs are classified into subcategories based on the establishment methods. In the following, each level of classification is discussed.

Overlay – Underlay Comparison

The CCC schemes are first classified as overlay and underlay approaches. For overlay CCC approaches, the CCC is permanently or temporarily allocated to the spectrum not used by the PUs. When the allocated CCCs are affected by PU activity, CR users must vacate the CCCs and reestablish the new CCCs in other available spectrum. For underlay CCC approaches, the CCC can be allocated to the same band used by PUs. By utilizing the spread spectrum techniques, control messages are transmitted in low power by using short pulses, which are spread over a large bandwidth such that the control transmission appears to PUs as noise. Although CR control messages and PU data are transmitted simultaneously in a licensed spectrum, the

10 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 11: Cognitive Radio Networks

underlay CCC approach can be regarded as a dedicated CCC virtually not affected by PU activity. However, there are several issues such as the range of UWB transmission and extra UWB radio that limit its usage as effective CCC design options.

Inband – Outband Comparison

For in-band and out-of-band CCC schemes, the CCCs allocated to data channels are called in-band CCCs while the CCCs allocated in dedicated spectrum such as unlicensed bands or the spectrum licensed to CR network operators are called out-of-band CCCs. How the CCCs are allocated in the spectrum is strongly related to the coverage of CCCs. CCC coverage refers to the area where CR users can exchange control messages by one or more hops on the allocated CCC without changing the channel. Since the in-band CCCs are susceptible to PU activity varying from region to region, their coverage is local. On the other hand, the out-of-band CCCs are dedicated ones whose coverage is generally considered global to facilitate network-wide coordination without the switching latency and overhead. However, the coverage can also be local since the dedicated CCCs can be allocated to different bands in different geographical regions.

The in-band CCCs are allocated in licensed data channels, which are affected by PU activity. As a result, the main challenge of this approach is to re-establish the CCCs whenever PUs return to these channels. In addition to CCC establishment overhead, the control message overhead must also be minimized to achieve satisfying the CR data throughput. However, in some applications such as military or emergency networks where the allocation of dedicated CCCs may not be feasible, in-band CCC solutions provide an alternative way for control message exchange. Unlike in-band CCCs, out-of-band CCCs are generally not affected by PU activity, as all CR users know that the CCCs are always available in the dedicated spectrum. However, if out-of-band CCCs are allocated in unlicensed bands, they may not always be reliable because of the interference from other wireless services. If the out-of-band CCCs are allocated in the bands licensed to CR network operators, this seems to defy the principles of dynamic spectrum access where flexible spectrum assignment is necessary for improving spectrum utilization efficiency, not to mention the extra license cost to the operators. Nevertheless, compared to in-band ones, out-of-band CCCs provide a relatively more reliable CCC establishment for control purposes.

Considering all the above cases, the coming chapters cover the implementation challenges that are faced in the CCC Design and during its actual run. This project implements the CCC in the Inband mode of CCC using the Group-Based technique of classification. The nodes will be divided into clusters, which then use various frequencies of spectrum holes to be able to communicate in the licensed spectrum.

11 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 12: Cognitive Radio Networks

CHAPTER 3

COMMON CONTROL CHANNEL DESIGN3.1 Sensing Spectrum Sensing is characterized by the join of a quantitative and qualitative analysis of a reference band through the collection of information in terms of,

• Frequency usage;

• Air interface classification at a used frequency.

Cognitive Terminal:

A terminal able to sense the external world, analyze the gathered data, compute them in order to take a decision about which actions have to be carried out to modify its internal and external statuses.

Fig. 1. The general scenario.

CTi = Cognitive terminal.

RSk = Radio Source.

12 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 13: Cognitive Radio Networks

Consider (Fig. 1) that a set of CTs, {CT} = {CTi : i = 1, ...,N}, is present within the horizon of a number of radio sources RSk, k = 1, ...,K, where the horizon is the surface, which contains all areas of coverage of RSs. Let’s associate with each RSk a position xRSk in a space X, and a mode m in a space of possible radio modes corresponding to different air interfaces.

Fig 2. Logical Architecture of sensing and analysis modules of two Cooperative Terminals.

Observation Procedures

The observation modules are composed by two different channels (Fig. 2): the first one aiming at spectrum sensing and mode identification, and the second one aiming at position estimation.

Time Frequency Analysis: The observation Oi, k, s after Radio Frequency (RF) stage and A/D conversion is processed by a Time Frequency (TF) block. The bilinear nature of the TF transforms provides a methodology to process time-varying and superimposed signals as the ones considered in this work. As TF distribution, the Wigner-Ville transform has been chosen. This transform is the most used in the state of the art, and it has low computational complexity, a good feature for real-time usage.

The Wigner-Ville distribution is given by:

13 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 14: Cognitive Radio Networks

Where the superscript * denotes the complex conjugate and integral ranges from −1 to +1, and y(t) is the sampled version of the received signal. It is band-limited and contains one of the two superimposed modes (WLAN or Bluetooth) or both.

Analysis Procedure

Executes high level data processing functions: it can extract features from signals, reduce and transform the data space, represent them in meta-data format. The steps carried out by this module are called: Features Level Processing (FLP) and Context Level Classification (CLC). At FLP, the CT doesn’t provide yet information about external world, but it analyses, reduces and converts its particular characteristics without knowing which status of external context they can represent. Through CLC, instead, the device relates previous information with experience-based labels representing semantic situations known to the terminal.

Features Extraction and Reduction: The first part of this modules (Feature Extraction) deals with the features which are of two, namely standard deviation of the instantaneous frequency and maximum time duration of signal. They are directly computed by Time Frequency transform, W(t, !).

It is worth mentioning a significant characteristic of features: when one terminal CTi is at rest in a given position xi, the features plane assumes a given distribution, but when xi changes, i.e. the considered device moves in the environment, also the feature distribution changes. This aspect brings to consider the vector v not only a function of time t, v(t), but also of position xi, then v(t, xi), where the observation gathered by positioning sensor is computed by Localization Processing module in order to estimate xi, input to Features Extraction and Classification blocks. Once these two values are computed, it is used the new part of system, consisting in Parameters Reduction and Classification blocks.

Distributed Classification: Each CT shares the analysis model with all the other devices in an a priori way. Let’s assume that each device knows context analysis maps, i.e. the mapping function Di(t); this a-priori knowledge is shared in an off-line phase when no detector is immersed in the environment and no one is observing the radio scene. No exchange of information is required and no signal interferes with the present radio scene.

To implement the distributed classification behavior,

The following steps have been carried out:

1) Define the classification problem;2) Decompose each M-ary sub-test into a set of binary tests;

14 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 15: Cognitive Radio Networks

3) Identify space-variant sub-tests;4) Define the distributed version of each binary test.

Step 1 - Define the classification problem:

Lets have two possible modes, M1 and M2, and two radio sources, RS1 and RS2, the situations to be classified are four, and in particular;

• Absence of signal, when all sources (RS1 and RS2) are switched off and only environmental Noise ({Noise,Noise} class) can be present.

• Presence of WLAN signal ({Noise,WLAN} class), RS1 is switched on, and RS is switched off.

• Presence of Bluetooth (BT) signal ({BT,Noise} class), RS1 is switched off, and RS2 is switched on.

• Presence of WLAN and Bluetooth signals({BT,WLAN} class), RS1 and RS2 are switched on.

Thus, each terminal CTi, by using the function Di(t), has to perform a M-ary classification problem by extracting one of the four classes from D space, composed as follows:

D = {{Noise,Noise}, {Noise,WLAN}, {BT,Noise},{BT,WLAN}}

Step 2 - Decompose each M-ary sub-test into a set of binary tests:

To make the classification process easier, each M-ary problem has been reduced to a set of binary tests, represented in a decision tree as the one reported in Fig. 3.

15 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 16: Cognitive Radio Networks

Fig. 3. The binary decision tree DTA used by each terminal in region XA.

Step 3 - Identify space-variant sub-tests:

According to terminal’s position xi, it is possible to identify sub-spaces of X where stable decision models can be found in presence of the same set of radio sources configurations.

Step 4 - Define the distributed version of each binary test:

The aim of this step is to define a distributed approach to the classification problem used for air interface identification.

Consider one of the previous binary tests; let’s say the one at level l of decision tree U (with U 2 {DTA,DTB}), identified by terminal’s position xi (with xi 2 {XA,XB}).

Two possible hypothesis are present, HU,l0 and HU,l1 , for the sake of simplicity here reported as H0 and H1, in association with the own a-priori probabilities P0 and P1. Being y1 and y2 the observations relative to the two terminals, taken at position x1 and x2, the local classification Di, (where i denotes which terminal makes the classification), is given by:

Di = 0 if H0 is declared present.

D= 1 if H1 is declared present.

The cost assigned to each classification is given by C ijk, i, j, k = {0, 1}, and it represents the cost of terminal 1 classifying Hi, terminal 2 classifying H j when Hk is present. The target is to obtain a classification rule, which minimizes the average cost of the classification.

3.2 Sub-Carrier Construction In this stage, the OFDM subcarrier parameters are designed based on the channel structure of the licensed spectrum. This design process is composed of the following two steps:

16 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 17: Cognitive Radio Networks

1. The entire licensed spectrum is considered as a contiguous set of OFDM subcarriers. First, all the subcarriers overlapping with the primary channels are rendered inactive, as they cannot be used in our always-on CCC. As an example, the subcarriers that overlap with channels C1, C2, and C3 in Fig. 1, are made inactive.

2. For the remaining subcarriers in the different guard bands (G1, G2, and G3 in Fig. 1), we formulate a feasibility problem that aims to find the subcarrier bandwidth (hence, their number), OFDM preamble time, and transmit power, so that

a. the PU network is protected,

b. the CR CCC data rate is maximized,

c. the network connectivity is maintained, and

d. hardware or OFDM-specific constraints are

During this construction,

Known:

Bg, Bc, Ng, tg, Dmin, Rmin, PAPRmax, Pmax

To Be Decided:

m - no. of sub-carriers per GB

τ – Time per OFDM Symbol

Ptx – Transmission Power of Sub-carrier

1. From principle of orthogonality, sub-carriers differ by freq 1/τ

We have m+1 such freq differences in a Guard Band. So,

17 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 18: Cognitive Radio Networks

(m+1 ) . 1τ ≤ Bg

2. Ptx must

a. Satisfy PAPR i.e., PAPRmax≥ m.Ng (total no. of sub-carriers)

b. be ≥ PtR after travelling a distance Rmin (minimum range)

Rmin = p+ 0.521405

vp

.√ ln nπn

, where n, p > 0 and v > 0 are

the no. of users, pause time, node velocity

c. be sufficient to maintain n/w connected i.e., Rmin≤[ P tx .αp tR

]1/β

A high OFDM peak to average power ratio (PAPR) may affect the signal quality, as the nonlinear components of the transceiver circuits may distort the modulation and the signal constellation. Unlike the classical OFDM that assumes the symbols to be identically and independently distributed, a large number of subcarriers (overlapping with the PU channels) are always inactive in our proposed CCC design.

While the transmit power Ptx of the CR users must satisfy the PAPR limit, it must also be sufficient to maintain connectivity in the network. The minimum transmission range for a mobile network exhibiting random waypoint mobility is given by Rmin. The transmit power is chosen such that for a simple path loss propagation model, and a given receiver sensitivity threshold PT R , the range is at least Rmin.

3.3 Guard Band SelectionThe multi-arm bandit algorithm, in which, each arm is analogous to a slot machine that returns a specific reward on being played. There are several possible arms and the user has no prior knowledge of the arms that yield higher rewards. The user may continue to exploit the current choice of the arm, and get the known level of reward, or choose to explore a new arm. For a new arm, the users run the risk of lowering the reward, thus incurring an adverse cost for the exploration. At the same time, it may be possible that the reward associated with the new arm is significantly higher, making it worthwhile to conduct the exploration.

The main advantage of using the bandit algorithm is that it tries to balance the cost of exploitation and exploration, so that the cumulative reward of the user (Rc) is within a bound of the maximum possible reward (Rmax). The difference between the observed and optimal values

18 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 19: Cognitive Radio Networks

of the reward is called as the regret (RR). Hence, RR = Rmax _ Rc, which is mathematically bounded in the limiting case of infinite trials by suitably altering the probability of choosing the arms after the current trial round.

Broadcast Message

1. τ is typically around 2-10 ns

2. Feasibility test:

DB = ∑i=1

Ng

d (i)

= N g .φ

t g+ τ , where φ is bits per OFDM Symbol = 1

So, DB ≥ Dmin

Otherwise, change the parameters accordingly until this condition is satisfied

3. The central Sub-carrier frequencies are given by

F(i) = 2.Bc+BgB s

,i=1

= 2. F(i-1) + B gB s , 1< i≤Ng

Unicast Message:

• Each feasible selection of the guard bands is called an ARM

• The user may continue to exploit the current choice of arm or choose to explore a new arm.

BANDIT ALGORITHM:

• Balances Exploration and Exploitation Costs

• Reward is a value in [0 1] that is cost of using a channel

• Reward may be –’ve or +’ve

• GB is active if all sub-carriers are active

Arms in the given fig.,

19 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 20: Cognitive Radio Networks

{Arm1 : G1 = 0;G2 = 0;G3 = 0};

{Arm2 : G1 = 0;G2 = 1;G3 = 1};

{Arm3 : G1 = 0;G2 = 0;G3 = 1};

Total # Arms = 2Ng

Reward:

-’ve if P is too high or too low

+’ve if P is appx. equal to threshold

ARM SELECTION

The receiver r receives the packet PKTs;rq, and identifies the set of subcarriers I that are either

lost due to noise, or experience a signal power greater than the interference threshold P TI in all

the guard bands used in the transmission. The receiver infers that these subcarriers experience a cumulative power gain caused by the spectrum leakage power from the PU transmissions. The reward Rc

q = [0,1] assigned by the receiver for the choice of this arm is given by Rcq=¿. Here,

represents the number of guard bands used for the q th arm, m is the number of carriers in a guard band, and Ng is the number of guard bands. The first term of the product term signifies the fractional number of interference-free subcarriers. The second term gives the ratio of the current data rate to the maximum possible data rate. There are also Ng - ᵧ central subcarriers that are active in the other unused guard bands that do not compose the arm.

Algorithm:

1. Initial: Wi(t) = 1 for i = 1, . . .,K, where K = 2Ng

2. Chose an arm with probability given by

Pi(t) = (1-r). W i(t )

∑j=1

K

W j(t)+ rK

where, T = no. of rounds, S = upper lmt of hardness

r = min(1, √K ¿¿¿¿)

3. Send PKT qs , r

4. Assigning a reward for choice of arm

Rcq=¿, 𝑣 is no. of GB in qth arm, I is set

of sub-carriers

20 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 21: Cognitive Radio Networks

UPDATE ARM SELECTION PROBABILITY

Based on the reward earned on the choice of the arm, the weights w j (t) influencing the probabilities of choosing the various arms are changed. For the active arm j=q, the earned reward Rj

c (t) is scaled by the probability of selection pj (t), and there is no update otherwise.

For the next packet sent by the CR user s, the new weights are used in order to calculate the probabilities of choosing the various arms pi(t). Thus, for a given CR user, the choice of guard bands (hence, subcarriers) is refined to ensure that the specific interference environment is considered, and this occurs in a distributed manner during the normal operation of the network.

Algorithm:

for j ϵ [1 K]

if j=q

Rcj (t )=

R cj(t )

P j(t)

else

Rcj ( t )=¿0

w j (t+1 )=w j (t ) er . Rc

j(t )K + e .α

K.∑ρ=1

K

w ρ(t )

Finally, new arm selection probabilities are calculated from new weights

3.3 Challenges

Range vs. rate tradeoff:

The primary challenge in CCC design involves in the tradeoff between extending the transmission range and increasing the control throughput. Although control traffic is generally transmitted at a low bit rate, the required control data rate may be compromised by the spreading sequences for enlarging the transmission range. The tradeoff must be carefully considered in CCC design.

Dynamic Clustering:

21 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 22: Cognitive Radio Networks

The most sounding issue that is found in the above design of a CCC is that the arm selection when there are no clusters corresponds to a scenario which is similar to a set of random nodes entering the CRN range when there are no clusters existing. But when there are clusters already present in a CRN, the sensing and arm selection process decreases the throughput when compared to a case where a cluster add that node to it directly. This issue has been discussed at length in the coming chapters of this thesis.

CHAPTER 4

PROBLEM DESCRIPTION4.1 Clustering In the present process, clustering of nodes, be it a new node in the network or a node that is affected by PU Activity, is done by the method that is not very random.

Problems posed by this random clustering are:

1. If a Guard Band or say an Arm is unoccupied, the node gets no response over that frequency and hence it won’t join that new band or new cluster. Instead, it will go for a cluster and may be already crowded in the network

2. In the present process, all the nodes respond to the request sent by the new node and this results in wastage of Bandwidth and also may cause congestion in the network.

22 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 23: Cognitive Radio Networks

4.2 Primary User RobustnessPU activity affects the nodes in the CNR to its largest affect. When a PU returns at a frequency, the nodes have no other option but to leave that band and find some other cluster in the network. If the cluster has a lot of nodes, it has to find a cluster for each and every node in the network.

Problems posed by this PU Robustness:

1. All the nodes in the affected cluster have to find new clusters.

2. Even if the PU returns to only a portion of the bandwidth, the nodes have to leave the network even in that case.

3. If there is an empty bandwidth of frequencies available, the cluster could be totally shifted to that band but the current process individually clusters each and every node.

4. If a PU returns, cluster has to breakup and join the clusters again by the whole process of request-reply-confirm, which is very costly.

CHAPTER 5

CONVENTIONS5.1 CRN HIERARCHYThe proposed clustering algorithm follows a 3 level hierarchy across the network among the nodes in order to reduce the overall load on the control channel.

Hierarchy in increasing order of importance/load-

1. Node – a basic node in the network2. Head – the representative of a particular cluster3. Leader – the node responsible for maintenance of the heads and clusters on a whole, it

is of course the head of its own cluster

Head’s role is to maintain the cluster by periodic talks with the nodes and also the maintenance of a CIT (Cluster Information Table). It updates the CIT regularly and intimates the same to its cluster’s nodes. Also, as a representative of the cluster, it is responsible for the decisions on

23 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 24: Cognitive Radio Networks

adding new nodes to its cluster (Process explained in the algorithm). A cluster also has a backup head

Leader’s role in the CRN is to maintain the CRN with the help of cluster heads. It maintains a database called the NIT (Network Information Table) and keep the heads of various clusters updated with the NIT. It also has a role to play in clustering a deserted node, if such a node enters the CRN. The head nodes are the leaders with priority. Say there are n cluster heads, then there are n-leaders in the network ranging from leader#1 to leader#n.

5.2 DATA CONVENTIONSCIT – Cluster Information Table

Head Info ( MAC Address and IP Address + Bandwidth Information)Node # Node Info ( MAC) IP Address Joining Time

NIT – Network Information Table

Head Node Freq Range Backup Node No. of nodes Leader #

Head Node Data:

24 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

LeaderHead

Node

Page 25: Cognitive Radio Networks

1. New_Queue: It is a queue in which all the Single() msg requests are added and processed in the order

2. Joined_List: It is the linked list of the nodes that have sent the message Single_Confirm() message. It is processed to avoid processing the node in the queue that has already joined a cluster

5.3 MESSAGES

S.No Name + -Cast Description

1 SingleBroadcast

A new node entering the network broadcasts. Content is its identity info. Only heads read the content.

2 GroupBroadcast

A new cluster entering the n/w broadcasts. Content is CIT of the cluster. Only heads read the content

3 Single_AckUnicast

Head sends its freq and cluster identity to corr. node asking it to join

4 Group_AckUnicast

Head sends to the entering cluster head giving cluster identity info

5 Group_BreakMulticast

Arriving cluster’s head sends to its members. If a new arriving cluster couldn’t find a place in any of the existing clusters, the cluster must break and enter as single nodes

6 Group_JoinBroadcast

New cluster’s head broadcasts that its joining a cluster C. This message is read by all the cluster heads

7 Single_ConfirmBroadcast

New node broadcasts the cluster info in which it is joining. Content is read by all the heads

8 Send_NITUnicast Cluster head sends to Leade#1 requesting NIT

9 Update_NITUnicast

Cluster head sends to Leader#1 to change the NIT as per the changes that the cluster head has made to its cluster

10 New_NITMulticast

Leader#1 sends to all cluster heads. Msg contains the updated NIT

11 Send_CITUnicast A node in a cluster asks its head for the CIT

12 Update_CITUnicast

A node sends to its cluster head giving the changes it sensed in that cluster

13 New_CITMulticast Cluster head sends to its cluster’s nodes the updated CIT

14 Leave_ClusterUnicast A node leaving the cluster informs the cluster head

15 Ping Ping is a periodic message intended to check the presence

25 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 26: Cognitive Radio Networks

Unicast of a node in its cluster. Leader#1 sends to cluster heads, cluster head checks nodes

16 Ping_BackUnicast

Reply is given to the pinging node stating its presence in the cluster/network

17 Leave_HeadUnicast

A leaving cluster head sends the message to next leader in the priority

18 Head_ChangeUnicast

The leader in charge informs the backup head that it’s the new head of the cluster and asks it to find its new backup. It is inherent that the new head is made the last Leader and NIT is updated

19 No_ReplyBroadcast

An entering new node sends this message if it doesn’t get an ack for its single message. Content is read by only leader#1

20 New_ClusterUnicast

Leader#1 informs new node that it is in a new cluster and it is the head of that cluster

21 Join_ClusterMulticast

Leader#1 sends msg to new node and a cluster head asking the node to join that cluster and asking the cluster to accept the node respectively

22 Cluster_ShiftMulticast

Cluster head sends to the member nodes asking if they remain in the cluster during the cluster shift to another freq range

23 Cluster_Shift_AckUnicast Nodes reply to the cluster head saying yes or no to the shift

24 Sense(Function)

Starts sensing the network for available spectrum holes. Function handled by any node

25 New_CNBroadcast

This is broadcasted by nodes in a case where there is no ack to the No_Reply message by the new node. Content is the node’s identity information

26 New_LeaderBroadcast

All the new nodes broadcast this message. Content is avg. strength that it received from all the nodes of New_CN and No. of msgs it received

27 Contest(Request)Broadcast

If there is no backup head in a cluster, the leader sends this message across the whole freq of that cluster and all the nodes reply to this message

28 Contest(Reply)Unicast Node replies to the contest(request) message by the leader

5.4 FUNCTION PRIORITYThe basic control channel messages received by a node/head/leader are categorized into 2 types, namely -

26 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 27: Cognitive Radio Networks

Control Functions – Messages sent by a Leader to a Head and a Head to a node in its cluster are control functions. These messages are important for the decisions of various nodes in the functioning of the CRN. So, these functions must be processed first before going ahead with the other functions in the CRN.

Network Functions – Messages that are not control functions are network functioning like a new node entry or a node leaving messages are termed under this.

* Control Messages always have higher priority than Network Functions

CHAPTER 6

ALGORITHMS

The algorithms for various scenarios of the network clustering are given here. Each scenario has an algorithm with respect to a node, a head and a leader resp.

Ni – Any node

Hi – Head of cluster Ci

Li – Leader #i

6.1 Cluster(s) exist and 1 new node enters

WRT New Node

// Node Np just enters

27 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 28: Cognitive Radio Networks

1. Single(); // Send(Broadcast)2. Wait(1.0s);3. If (Receive(Single_Ack) == True)4. Read from Single_Ack() Hk and Freq info5. Single_Confirm(); // Send(Broadcast) 6. New_CIT(); // Receive from Hk

7. Else8. No_reply(); // Send(Broadcast)9. Wait(1.0s);10. If (Receive(New_Cluster) == True) // L#1 -> Np

11. Read from New_Cluster() Freq Band Info12. Single_Confirm(); // Send(Broadcast) 13. Head_Change();// L#1 -> Np

14. Send_NIT(); //Send(Np -> L#1) 15. Else16. If (Receive(Join_Cluster) == True) // L#1 -> Np

17. Read from Join_Cluster() Freq Band Info18. Single_Confirm(); // Send(Broadcast) 19. Else20. Goto line 1.21. End if in line 16; End if in line 10; End if in line 3;

WRT A HEAD(Hk)

New_Queue : Head Contains Single() messages in this queue and processes in order

Join_List: List of all the joined nodes in diff clusters. It is emptied every time Queue becomes empty

1. Single(); // Received(Through Broadcast from Node Np)2. Add Single() to New_Queue at New_Queue_Last->Next3. New_Queue_Last = New_Queue_Last->Next4. If( Control message buffer is Empty)5. Let New_Node = New_Queue_Top;6. Let Temp = Join_List_Top;7. While(Temp->Next!=NULL)8. If(Temp->Data != New_Node->Data)9. Temp = Temp->Next;10. Else11. New_Queue_Top = New_Queue->Next; 12. Goto 5

28 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 29: Cognitive Radio Networks

13. End if in line 814. End while15. Check BW_Threshold in CIT16. If(Nodes per BW < BW_Threshold)17. Single_Ack(); // Send(Hk -> Np)18. Wait(0.50s);19. If(Receive(Single_Confirm) = False)20. Goto 1721. Else22. Read from Single_Confirm() Node Np info and Cluster info that it is joining23. If(Node Np is joining Cluster Ck with head Hk)24. New_CIT(); // Hk -> Nodes in Cluster Ck (Multicast Msg)25. Update_NIT(); // Hk -> Leader#1 26. Wait(1.0);27. If(Receive(New_NIT) = True)28. Continue;29. Else Goto line 2530. End if line 2731. End Algo;32. Else // if in line 2333. Add node Np to Join_List.34. Goto line 1;35. End if in line 2336. End if in line 1937. Else // If in line 1638. Continue;39. Goto line 1;

Description:

Every head node maintains a queue named New_Queue and a list called Join_List. When a Single() request is received from a node, it is added to New_Queue and processed in the order in the queue. When the top Single() request is being read, it will be checked in Join_List and if any node matches in it, then that node has already joined some cluster. Join_list is flushed every time the New_Queue becomes empty.

If Join_List doesnot have the node under processing, then cluster head checks if nodes per BW is under the threshold. If it is not, no reply is given and processing is stopped and goes to line 1. If it is under threshold, Single_Ack() is sent and head waits for reply for a small time. If Single_Confirm is not received, it waits again. If received, it starts processing. If the confirm is to some other cluster, it is added to Join_List else if it is to join this cluster itself, then updated CIT is sent to all cluster members and unpdate NIT is sent to the leader node.

29 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 30: Cognitive Radio Networks

WRT A LEADER(L#1)

As long as the leader L#1 receives Single() request, it behaves as a node. So the above algo works for this part. The algo described below is the part which has only specific work as a leader and not as a head.

Algorithm:

1. No_Reply(); // Received from Joining node Np

2. Check all NIT Thresholds3. If any cluster Ck below threshold, 4. Join_Cluster(Ck , Np) // cluster which has lowest nodes per BW5. Else 6. Check for free BW7. If (free BW is available)8. New_Cluster(); // Send to Np 9. Update_NIT(); // Broadcast10. Head_Change();// send to Np

11. Else // if in line 712. Sense for free BW13. If (Free bw is availbale)14. Goto 815. Else16. Join_Cluster(Ck,Np) // cluster Ck which is closest to threshold.17. End if in line 1318. End if in line 3

Description:

The leader reacts to a node specifically after it receives a No_Reply() message from the node. The leader checks all the thresholds and if any cluster is under it, leader asks the node to join_Cluster(). Same message is sent to the cluster head to accept that node.

If all clusters are above threshold, leader checks for free BW and allots the node to that new frequency and updates the NIT. Also, the node is made the cluster head. If free BW is not available, leader senses for free BW and if any found, it goes back to line 7. Else, node is allotted to a cluster that has nodes per BW closest to the threshold.

6.2 Clusters exist and a new cluster enters

30 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 31: Cognitive Radio Networks

In the whole case, a new cluster means the cluster that is entering the network then and a cluster means an already existing one. This convention is followed in the whole case.

WRT New Cluster Head(Hp)

This case may occur when a whole cluster has to change the BW for e.g., when a PU returns at a particular freq or when the whole cluster moves together in its position. It is assumed that the cluster structure and properties are intact and all the nodes are still working under the leader.

Algorithm:

1. Group(); // New cluster head broadcasts2. Wait(1.0s);3. If(Receive(Group_Ack)= = False)4. Goto1; // for 2 times and goto 11 for the third time5. Else6. If( BW is Free or Group_ack==Yes)7. Group_Join(); Head broadcasts with freq info8. Update_NIT();9. New_NIT();10. Else // Group_Ack = No11. Group_Break();12. End if in line 613. End if in line 3

Description:

Group() is sent by the cluster head and then waits for ack. If there is no ack(). It goes on waiting and again sends the message. In the ack, if free BW is available, it joins that BW and updates the NIT. Else Group_Break() message is sent by the cluster to all its members. Group_Break() results in all nodes entering as single nodes into the network and then process is done via case 1.

WRT HEAD(Hk)

Algorithm:

1. Group(); // Received by a cluster head Hk

2. Add Group() to New_Queue at New_Queue_Last->Next3. New_Queue_Last = New_Queue_Last->Next4. If( Control message buffer is Empty)

31 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 32: Cognitive Radio Networks

5. Let New_Node = New_Queue_Top;6. Let Temp = Join_List_Top;7. While(Temp->Next!=NULL)8. If(Temp->Data != New_Node->Data)9. Temp = Temp->Next;10. Else11. New_Queue_Top = New_Queue->Next; 12. Goto 513. End if in line 814. End while15. Read the message for number of nodes in the new cluster16. If(Number is under the threshold after Joining)17. Group_Ack(); // sent to joining cluster head with yes18. Wait(1.0s);19. If(Receive(Group_Join) = True)20. Read Group_Join();21. If (New cluster is Joining cluster with head Hk)22. Update_CIT();23. Update_NIT();// Send to leader24. Wait(1.0s);25. If(Receive(New_NIT()) = True)26. New_Queue_Top = New_Queue->Next;27. Goto 5;28. Else // if in line 2529. Goto 22;30. Else // if in line 2131. Add the cluster head to Join_List.32. New_Queue_Top = New_Queue->Next;33. Goto 5;34. Else // if in line 1935. Add the cluster head to Join_List.36. New_Queue_Top = New_Queue->Next;37. Goto 5;38. Else // if in 1639. New_Queue_Top = New_Queue->Next;40. Goto 5;41. End if line 16

Description:

32 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 33: Cognitive Radio Networks

Similar to every head, the Group() message is added to the queue with the head called New_Queue. Once it has come to processing, cluster head checks if it can accommodate the whole cluster, if not, it goes to next in the queue and drops this group() message. If it can accommodate, it sends Group_Ack() to the new cluster head and asks it to join. Then the cluster head waits for reply from the new cluster. If it does not get a reply before wait time, it drops Group() message and goes ahead for next processing. If it gets a reply, the head sends the Update_NIT message to leader and Update_CIT to the cluster members. Waits for the updated NIT before processing the next messages(line 25).

WRT LEADER(L#1)

Algorithm:

1. Group(); // Receives2. Checks NIT to see if any cluster can accommodate the new cluster3. If (Yes)4. Continue;5. Else6. Sense and Check for free BW7. If (BW is available)8. Group_Ack();// send to new cluster asking it to join the new cluster 9. Wait(1.0s);10. If(Receive(Group_Join) = True)11. Read Group_Join();12. New_NIT(); // send to all heads13. Else // if in 1014. Continue;15. End if in line 1016. Else // if in 717. Send Group_Ack() stating no free BW is available.18. End if in 10,7,3

Description:

Leader checks NIT to see if any cluster can accommodate the new entering cluster. If it is possible, leader does nothing. Else, leader searches for free BW. If it is available, cluster joins the NW in that freq. If the BW is also not available, ack Group_ack is sent to the new cluster head with info that cluster cant join the NW as a whole, which makes the cluster to break, as explained in this case in the earlier scenario w.r.t the new cluster head.

33 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 34: Cognitive Radio Networks

6.3 Clusters exist and n nodes enter simultaneously

This case may be broken down to two cases i.e. n nodes are random or may come together. If they are random, it is simple that they are treated as n single() messages and processing order is taken care by the New_Queue used at every head. If they are not random and enter together, the it is the case of a cluster entering together and that is taken care of by the case 2.

The above described case 1,2 and 3 are typically the most common ones in the situation when the clusters already exist in a CRN. Now, have a look at some of the situations that occur during the clustering and re-clustering that is going on in the CRN.

6.4 A head node (Hk) of cluster (Ck) leaves

WRT LEADER

Algorithm:

1. Leave_Head(); // Received by all leaders and sent by Head(Hk)2. If(Leave_Head is sent by leader#1)3. Leader#2 becomes leader#1 by convention4. NIT is updated by new Leader#1 such that all leaders move up by one spot5. Head_Change(); // Leader#1 sends to bkp head of Cluster Ck and it is last leader in the

list 6. If(Receive(Update_NIT) = True)7. New_NIT(); // sent8. Else9. Goto 5;// for 2 times and later on case is in case 610. Else // if in line 211. All leaders numbers are updated to 1 level above, after head Hk

12. Head_Change(); // leader#1 sends to the bkp node of cluster Ck

13. Wait(1.0s);14. If(Receive(Update_NIT) = True)15. New_NIT(); // sent

Description:

When a leader receives Leave_Head message, it may be 2 cases. One is that leaving head is L#1 and other it is some Leader#m , m>1. In the first case, Leader#2 knows that it has to become L#1 and then makes the backup head in that cluster the new Head and sends that New NIT to all the heads. In the process, the new head is the last leader in the list.

34 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 35: Cognitive Radio Networks

If the leaving node is not L#1, then the L#1 makes the backup head as the new head and all the Leader numbers below the leaving node are updated to one level up and the leaving head’s new head is given the last leader number.

WRT HEAD

By convention, it is considered that every cluster has a head and a backup head, mentioned in both CIT of that cluster and NIT of that CRN.

Algorithm:

1. Leave_Head(); // Leaving head broadcasts

WRT BKP HEAD

Algorithm:

1. Head_Change(); // Received by Bkp head from L#12. Make next node in the CIT the new bkp node.3. Update_NIT();4. Update_CIT();

6.5 The head and backup of cluster leave at a time

This may be a typical case considering its complexity. It may be the case where the backup leaves prior to the head and in that case head makes the next node in CIT the next backup or leaves before forming the new backup.

It may be the case also that both leave simultaneously and before the head change message from L#1 reaches the backup, it has left. So, there is no reply in that case. Now, what has to be done!

Here the scenario w.r.t the head is same as the one described in above case, w.r.t the backup head is out of scope as there is no backup head. Only the scenario wrt the Leader is considered.

WRT LEADER

Algorithm:

1. Leave_Head(); // Received by all leaders and sent by Head(Hk)

35 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 36: Cognitive Radio Networks

2. If(Leave_Head is sent by leader#1)3. Leader#2 becomes leader#1 by convention4. NIT is updated by new Leader#1 such that all leaders move up by one spot5. Head_Change(); // Leader#1 sends to bkp head of Cluster Ck and it is last leader in the

list 6. Wait(1.0s);7. If(Receive(Update_NIT) = False)8. Goto 5;// for 2 times and later on Goto 109. End if // line 710. Contest(Request); // Sent by L#1 on the BW of cluster under consideration to all nodes11. If(Receive(Contest(Reply))==True); 12. Head_Change(); // L#1 sends to the node replying first to the msg in line 1013. New_NIT(); // sent to the new head14. Else // if in line 215. Goto 5; // for 2 times and then send group_break() message to that cluster nodes

At the new head node, it forms the first node in the CIT they have as its backup node and updates the CIT.

6.6 A leader(L#k) leaves

When a Leader leaves, only the changes are concerned with the Head nodes of all clusters as they have the NIT. There are two cases when the leader leaves.

LEAVING LEADER IS L#1

In this case, rest all the leader numbers have to go up by one level and the leaving leader’s backup is made the last leader.

Algorithm:

1. Leave_Head(); // Received by leader#2 from leader#12. Leader#2 updates the NIT making the following change- Increases the leader levels of all

heads by one level3. New_NIT(); // sent to all the heads

The cluster that doesnot have a head at present doesnot receive the updated NIT. Makin the head for that cluster has been described in the above two cases. Here L#2 becomes L#1, L#3 becomes L#2 and so on. The Head_Change message takes care of the new head node that will be formed after this processing is done, as described in cases 5 and 6.

36 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 37: Cognitive Radio Networks

LEAVING LEADER IS L#k, k>1

Algorithm:

1. Leave_Head(); // Received by leader#1 from leader#k2. Leader#1 updates the NIT making the following change- Increases the leader levels of all

heads after level k by level 13. New_NIT(); // sent to all the heads

Here if the leaving leader is L#5, then L#6 is made L#5, L#7 is made L#6 and so on. The cluster with leaving node is given the last leader position after the head is made.

6.7 A node leaves a cluster

Here the processing is limited to the level of node and the concerned cluster. CIT is updated after the node has left and the leaving node is not the head of that cluster. It may be the backup head. W.r.t. a node, it sends the Leave_Cluster() message and leaves not waiting for the reply. Algorithm is given w.r.t the head of that cluster.

Algorithm:

1. Leave_Cluster(); // Received by the head2. If(Leave_Cluster is sent by backup node)3. Make next node in CIT as the backup node.4. New_CIT(); // send to all the cluster nodes the updated CIT5. Else6. New_CIT(); // update the CIT and send to all the nodes7. End if in line 28. Update_NIT(); // sent to the leader with updated cluster details9. Wait(1.0s);10. If(Receive(New_NIT)=True)11. Exit12. Else 13. Goto 8

6.8 Primary User returns at a Freq

Here the whole cluster may have to shift to a new freq range or it may have to break into nodes or it may continue if the available bandwidth is sufficient to sustain the CRN. The after effect of all the cases- shift, break into nodes has been discussed in one of the above cases.

37 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 38: Cognitive Radio Networks

In this case, the processing that happens within the cluster will be discussed and the algorithm has been given wrt a node in the cluster and the cluster head.

Here, all the nodes in the cluster hear in all the cluster freq. Hence, the PU sensed by any one user is assumed to be sensed by all the other users as the sensing is mainly done using variation in signal power.

WRT NODE

Algorithm:

1. Cluster_Shift(Request);// Received by the node from cluster head2. If(signal strength > 40%)3. Cluster_shift_Ack(yes); // Node sends to head accepting the shift4. Else5. Cluster_Shift_Ack(No); // Node enters the NW as a single node, leaves cluster6. Cluster_Shift(confirm);// Received by node with all the shifting cluster’s info7. New_CIT(); // with the shifting cluster info and the Freq info left blank in CIT

WRT HEAD

Algorithm:

1. Cluster_Shift(Request); // sent to all nodes2. Wait(1.0s);3. Read all Cluster_Shift_Ack() received from nodes – The nodes that acknowledged yes

are saved and all that replied no or those that didn’t reply are removed from the cluster.4. Cluster_Shift(Confrim); // sent to all nodes that replied yes5. New_CIT(); // sent to all nodes that replied yes

CHAPTER 7

SIMULATION

38 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 39: Cognitive Radio Networks

Fig 7.1 : Various header file include to define mobile node class.

Fig 7.2 : This is the function describe in class MobileNode. This function check whether ramdom motion is enable or not, if not then log the position of node else call random_position () and random_destination() to assign random position and random destination position respectively.

39 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 40: Cognitive Radio Networks

Fig 7.3 : This is a method of class Repository. This function assign random channel to node. This could be conveniently used when there are no clusters already existing in the CRN that the node has entered. Calling this method simply assigns a random channel of all the sensed channels that the node has in its repository.

Fig 7.4 This is constructor of class Repository. In this constructor receiver channel for node are set randomly and initialize each sending channel for each node as not active.

40 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 41: Cognitive Radio Networks

Fig 7.5: This is function of class Repository. This function check whether a given channel is active for a specific node at given time or not.

Fig 7.6: This is the function of class PU model. This function check whether primary user is active or not in a given time interval [timeNow to timeNow + ts].

41 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 42: Cognitive Radio Networks

Fig 7.7: This is the function of class PU model. This function checks whether transmission of node causes interference to primary user or not, if causes then release the interference power and increment the interference events else do nothing.

42 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 43: Cognitive Radio Networks

Fig 8.8: These are the function define in SpectrumTimer class. Among them are start (double time) function of SenceTimer class to start sensing at a given time, start(double time) function of TransmitTimer class to define at what time transmission start.

CHAPTER 8

CONCLUSION

The above report focuses primarily on solving the issues of dynamic clustering of nodes in a Cognitive Radio Network and also the robustness of primary users of the licensed spectrum. Chapter 4 describes these problems in brief and chapter 5 has all the assumptions that are taken during this thesis.

Chapter 5 describes the CRN hierarchy that has been implemented and also the node data that is important for the functioning of the Control Channel. It also describes, in detail, the messages, with their casting types and their functionality, that have been created for implementing the Control Channel. It also describes the priority that has been assigned to various messages that are crucial in both sustaining the network and in the basic functioning of it.

Moving on to Algorithms in chapter 6, they clearly cover all the situations that may arise when there are clusters existing in the CRN and a new node/cluster enters/leaves. All the algorithms have been keenly tested with various network sizes, on theoretical basis, in order not to leave any unique situation out. The algorithm also cover the case when a node/head/leader/backup node leave, with or without messaging to its corresponding superior in the hierarchy. The case where there are no clusters already existing has clearly been solved by the bandit algorithm and its arm weight updation algorithms described in chapter 3. The nodes select the arm that they have with the highest weight only when they do not get a reply form the leader/head nodes in the network. So, this algorithm, on a whole improves the functioning of the CRN and the implementation of CCC using an Inband mechanism.

The simulation has clearly been described in chapter 7 where various class diagram screenshots have been shown. It is done in ns2 (version 2.31) using a CRCN patch in order to implement the Cognitive Radio Functionalities. The overall efficiency of the Spectrum is obviously increasing as the secondary users are able to exploit the spectrum holes that are in the licensed spectrum. As a further development to this proposed algorithm of clustering in a common control channel, the PU activity can be analyzed for future prediction so that the overall throughput could be further improved.

43 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 44: Cognitive Radio Networks

CHAPTER 9

REFERENCES[1] I.F. Akyildiz, W.Y. Lee, and K.R. Chowdhury, “CRAHNs: Cognitive Radio Ad Hoc Networks,” Ad Hoc Networks, vol. 7, no. 5, pp. 810-836, 2009.

[2] P. Auer, N. Cesa-Bianchi, Y. Freund, and R.E. Schapire, “The Nonstochastic Multiarmed Bandit Problem,” SIAM J. Computing, vol. 32, no. 1, pp. 48-77, 2003.

[3] T. Chen, H. Zhang, G.M. Maggio, and I. Chlamtac, “CogMesh: A Cluster-Based Cognitive Radio Network,” Proc. IEEE Int’l Symp. Dynamic Spectrum Access Networks (DySPAN), pp. 168-178, Apr. 2007.

[4] C. Cormio and K.R. Chowdhury, “A Survey on MAC Protocols for Cognitive Radio Networks,” Ad Hoc Networks, vol. 7, no. 7, pp. 1315-1329, 2009.

[5] L.A. DaSilva and I. Guerreiro, “Sequence-Based Rendezvous for Dynamic Spectrum Access,” Proc. IEEE Int’l Symp. Dynamic Spectrum Access Networks (DySPAN), pp. 1-7, Oct. 2008.

[6] I.F. Akyildiz, W.-Y. Lee, M.C. Vuran, S. Mohanty, Next generation/ dynamic spectrum access/cognitive radio wireless networks: a survey, Computer Networks 50 (13) (2006) 2127–2159.

[7] I.F. Akyildiz, W.-Y. Lee, K.R. Chowdhury, CRAHNs: cognitive radio ad hoc networks, Ad Hoc Networks 7 (5) (2009) 810–836.

[8] I.F. Akyildiz, B.F. Lo, R. Balakrishnan, Cooperative spectrum sensing in cognitive radio networks: a survey, Physical Communication (Elsevier) Journal 4 (1) (2011) 40–62.

[9] Y. Kondareddy, P. Agrawal, K. Sivalingam, Cognitive radio network setup without a common control channel, in: IEEE Military Communications Conference, MILCOM 2008, 2008, pp. 1–6.

[10] P. Pawelczak, S. Pollin, H.-S.W. So, A. Motamedi, A. Bahai, R.V. Prasad, R. Hekmat, State of the art in opportunistic spectrum access medium access control design, in: Proc. of IEEE CrownCom 2008, 2008, pp. 1–6.

[11] T. Chen, H. Zhang, G.M. Maggio, I. Chlamtac, CogMesh: a clusterbased cognitive radio network, in: Proc. of IEEE DySPAN, 2007, pp. 168–178.

44 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 45: Cognitive Radio Networks

[12] L. Lazos, S. Liu, M. Krunz, Spectrum opportunity-based control channel assignment in cognitive radio networks, in: Proc. of IEEE SECON 2009, 2009, pp. 1-9.

[13] D. Cabric, S.M. Mishra, D. Willkomm, R. Brodersen, A. Wolisz, A cognitive radio approach for usage of virtual unlicensded spectrum, in: Proc. of 14th IST Mobile Wireless Communications Summit 2005, 2005.

[14] M.E. Sahin, H. Arslan, System design for cognitive radio conmunications, in: 1st International Conference on Cognitive Radio Oriented Wireless Networks and Communications, CrownCom 2006, 2006, pp. 1–5.

[15] Q. Zhao, L. Tong, A. Swami, Decentralized cognitive MAC for dynamic spectrum access, in: First IEEE International Symposium on New Frontiers in Dynamic Spectrum Access Networks, DySPAN 2005, 2005, pp. 224–232.

[16] D. Raychaudhuri, X. Jing, A spectrum etiquette protocol for efficient coordination of radio devices in unlicensed bands, in: 14th IEEE Proceedings on Personal, Indoor and Mobile Radio Communications, PIMRC, 2003, 2003, pp. 172–176.

[17] D. Cabric, S.M. Mishra, R.W. Brodersen, Implementation issues in spectrum sensing for cognitive radios, in: Proc. of 38th Asilomar Conference on Signals, Systems, and Computers 2004, 2004, pp. 772–776.

[18] S. Mishra, A. Sahai, R. Brodersen, Cooperative sensing among cognitive radios, in: Proc. of IEEE ICC 2006, vol. 4, 2006, pp. 1658–1663.

[19] D. Cabric and S. M. Mishraand R. W. Brodersen, “Implementation issues in spectrum sensing for cognitive radios,” Proc. of the 38th Asilomar Conference on Signals, Systems, and Computers, ,Pacific Grove, CA, USA, 2004.

[20] G. Vardoulias and J. Faroughi-Esfahani, Mode Identification and Monitoring of Available Air Interfaces, chapter in Software Defined Radio; Architectures, System and Functions, pp. 329–352, John Wiley and Sons Ltd, April 2003.

[21] M. Gandetto, M. Guainazzo, F. Pantisano, and C. S. Regazzoni, “A mode identification system for a reconfigurable terminal using Wigner distribution and non-parametric classifiers,” in IEEE Globecom, Dallas, 2004.

[22] N. Mandayam et Al., “Cognitive radios for open access to spectrum,” Project Summary, available at http://www.winlab.rutgers.edu/pub/docs/focus/Cognitive-Algos.html.

[23] I. F. Akyildiz, W. Y. Lee, M. C. Vuran, and S. Mohanty. NeXt Generation/ Dynamic Spectrum Access/Cognitive Radio Wireless Networks: A Survey. Elsevier Computer Networks Journal, 50:2127–2159, September 2006.

[24] I. F. Akyildiz, X. Wang, and W. Wang. Wireless mesh networks: a survey. Elsevier Computer Networks Journal, 47(4):445–487, November 2005.

45 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS

Page 46: Cognitive Radio Networks

[25] G. Ganesan and Y. G. Li. Cooperative Spectrum Sensing in Cognitive Radio Networks. In Proc. of IEEE International Symposium on Dynamic Spectrum Access Networks, pages 137–143, November 2005.

[26] N. Nie and C. Comaniciu. Adaptive Channel Allocation Spectrum Etiquette for Cognitive Radio Networks. In Proc. of IEEE International Symposium on Dynamic Spectrum Access Networks, pages 269–278, November 2005.

46 | CLUSTERING ALGORITHM FOR COMMON CONTROL CHANNEL IN COGNITIVE RADIO NETWORKS