Cross Layer Protocols in Cognitive Networks
Thesis submitted in partial fulfillment of the requirements for the degree of
Doctor of Philosophy in Computer Science and Engineering
by Deepti Singhal 201099007
[email protected]
International Institute of Information Technology, Hyderabad (Deemed to be University) Hyderabad - 500 032, INDIA December 2015
c Deepti Singhal, 2015 Copyright All Rights Reserved
International Institute of Information Technology Hyderabad, India
CERTIFICATE
It is certified that the work contained in this thesis, titled “Cross layer protocols in Cognitive Networks” by Deepti Singal, has been carried out under my supervision and is not submitted elsewhere for a degree.
Date
Adviser: Dr. Garimella Ramamurthy Associate Professor IIIT, Hyderabad
To my parents and my lovely daughter
Acknowledgments
A journey is easier when you travel together. Interdependence is certainly more valuable than independence. This thesis work is the result whereby I have been supported by many people. It is a pleasant aspect that I have now the opportunity to express my gratitude for all of them. I am deeply indebted to my thesis guide Dr. Garimella Rama Murthy for his invaluable guidance and inspiration. In addition to his support and flexibility, I want to thanks him for patience during the period of slow progress. I want to thank the members of my thesis committee comprising of Dr. Naresh Jotwani (Director School of Solar Energy and School of Nuclear Energy, Pandit Deendayal Petroleum University, Gandhinagar, Gujrat), Dr. Dimitrios Koutsonikolas (Assistant Professor, University at Buffalo, SUNY), Dr. Ashok Kumar Das (Assistant Professor, IIIT, Hyderabad) and Dr. Bapi Raju Surampudi (Visiting Professor, IIIT, Hyderabad) for their valuable feedback regarding several aspects of this thesis. I am also thankful to International Institute of Information Technology, Hyderabad and my research lab, that have provided a stimulating environment without which the completion of work could not be imagined. Moreover, thanks to faculty members for their offering of necessary courses which have provided me a good understanding related to work. I gratefully acknowledge the funding sources that made my Ph.D. work possible. I was funded by the Tata Consultancy Services (TCS) Research Fellowship for 4 years. My work was also supported by International Business Machines (IBM) Ph.D. Fellowship Program for one year, this support was without funding. On the personal level, I want to thank my friends Navneet, Tulika, Pratik and Animesh for reviewing my work and keeping me motivated throughout the duration of the work. I am also grateful to my colleagues, especially Sumit, Ravi, Arun, Kunal and Chandan for both valuable discussions, comments as well as good company. Last but not the least, I can never forget to be highly indebted to my family whose love, well wishes and blessings have always inspired me throughout the duration of the work. I also express my happiness and thanks to my husband Pradeep Kothari who has made everything possible in so many ways.
v
Abstract
The ever increasing demand for communication bandwidth and inefficient usage of the existing spectrum has led to spectrum scarcity. In this light, spectrum should be managed as a scare resource. For radio communication systems, efficient utilization of spectrum is the key requirement. The inefficient usage of the existing spectrum can be improved through opportunistic access to the licensed bands without interfering with the primary users. This introduces the concept of dynamic spectrum access and cognitive radio. Applying these techniques provides better throughput even in congested spectrum exploiting better propagation characteristics. Cognitive radio introduces cognition and adaptation at the physical layer. Cognition should also be included in upper layers of the network to effectively utilize the benefits of cognitive radio and dynamic spectrum allocation. Thus, cognitive network is an intelligent network that can adapt the transmission, reception and other network parameters of either a network or a wireless node to achieve efficient communication without interfering with primary users. Routing and spectrum access in cognitive environment is a challenging task as the channel availability is constrained by the presence of primary users. The problem of routing in cognitive networks targets the creation and maintenance of wireless multi-hop paths among cognitive nodes by deciding both the spectrum to be used and the relay nodes of the path. In the recent times various protocols were designed for cognitive networks. Cross layer protocol design is suitable for cognitive networks as dynamic adaptation of parameters is required. This thesis proposes a cognitive cross-layer routing protocol which jointly does power control and spectrum selection for multiple hops in the routing path. In the proposed protocol, routing is defined as a multi-objective optimization problem to derive the cost function which is used as the routing metric. The work shows that the proposed routing metric is convex and gives Pareto optimal solution. The thesis also proposes a medium access protocol for cognitive networks. The proposed protocol provides solutions for the multi-channel hidden node problem, channel synchronization, channel scheduling and other challenges that arise in the design of cognitive networks. For performance evaluation, the proposed protocols are implemented in NS2 and a comparative analysis is also done against existing protocols from the literature. The impact of cognitive user density, cognitive user speed and primary user activity model is analyzed in the thesis. The thesis also develops a Markov model for the performance analysis of the proposed cognitive MAC protocol. The developed model is generalized and can be used for performance analysis of any vi
vii IEEE 802.11 power saving mode based cognitive MAC protocol for ad hoc networks. This analysis is used to decide the design parameters of the MAC protocol. Protocols specific to cognitive wireless sensor networks are also proposed in this thesis. Cognitive wireless sensor networks are a specific type of cognitive networks which are used to monitor some entity. Traditional wireless sensor networks work in ISM band which is shared by some other technologies like WiFi and Bluetooth. Sensor nodes with cognitive capability are still limited with battery constrains, and efforts are required to increase the lifetime and other performance measures of the network. This thesis also proposes an network architecture for cognitive wireless sensor networks which consists of hierarchical distributed minimum spanning trees. The work also shows that this multilevel network provides fault tolerance, admits simple routing, and offers easy extensibility with power efficiency. The hidden primary user problem arises in cognitive users with passive listening primary users. For avoiding interference to hidden primary users, disable region should be calculated considering the communication range of both primary and cognitive users. Disable region is a region in which cognitive user communication should be suspended to avoid interference to primary users. Cognitive users must be aware of primary user’s location within the region of interest for calculating disable region. This thesis applies a leveling and sectoring based approach for primary user localization. This will avoid the interference to hidden primary users. The cognitive users within the disabled region are sent to sleep mode until a free channel is detected in that area by spectrum sensing module. This approach also saves energy of cognitive users.
Contents
Chapter
Page
1 Introduction . . . . . . . . . . . . . . . . . . . . 1.1 Cognitive Network Challenges . . . . . . . . 1.1.1 Spectrum Management Framework . 1.1.2 MAC layer in the Cognitive Networks 1.1.3 Routing in Cognitive Networks . . . 1.1.4 Transport layer in Cognitive Networks 1.1.5 Need for Cross Layer Design . . . . . 1.2 Thesis Statement . . . . . . . . . . . . . . . 1.3 Contributions and Layout of the thesis . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . 1 . 3 . 3 . 4 . 5 . 8 . 8 . 9 . 10
2 Cognitive Cross-layer Multipath Probabilistic Routing . . . . . . . . . . . . . . . . . 2.1 Related Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Proposed Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Routing Metric . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Theoretical Analysis of Selected Routing Metric . . . . . . . . . . . . . 2.2.3 Channel Selection Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.4 Transmit Power Control . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.5 Implementation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.5.1 Route Discovery, Maintenance & Data Forwarding . . . . . . . 2.2.5.2 Forward & Reverse Route Setup . . . . . . . . . . . . . . . . 2.2.5.3 Routing Table Management & Data Forwarding . . . . . . . . 2.3 Performance Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 Analysis by varying Cognitive User Load . . . . . . . . . . . . . . . . . 2.3.2 Analysis by varying Cognitive User Speed . . . . . . . . . . . . . . . . 2.4 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . . . . . . . . . . . . . .
. . 12 . 12 . 14 . 16 . 17 . 19 . 20 . 21 . 21 . 22 . 23 . 24 . 25 . 30 . 33
. . . . . . . . .
. . . . . . . . .
. . 34 . 34 . 36 . 39 . 39 . 39 . 40 . 40 . 41
3 Cognitive Cross-layer Multi-channel MAC Protocol 3.1 Cognitive MAC issues . . . . . . . . . . . . 3.2 Existing Protocols . . . . . . . . . . . . . . . 3.3 Background Details . . . . . . . . . . . . . . 3.3.1 Assumptions . . . . . . . . . . . . . 3.3.2 IEEE 802.11 PSM . . . . . . . . . . 3.3.3 MMAC & MMAC-CR . . . . . . . . 3.4 Proposed MAC Protocol . . . . . . . . . . . 3.4.1 Channel Assignment . . . . . . . . . viii
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
CONTENTS
3.5 3.6
3.4.2 Medium access control . . 3.4.3 Spectrum sensing support 3.4.4 Other details . . . . . . . Performance Evaluation . . . . . . Chapter Summary . . . . . . . . .
ix . . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
41 42 42 43 47
4 Performance analysis of Cognitive MAC Protocols with Markov Modeling . . . . . . . . . . 48 4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.2 Literature Survey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.3 Performance Analysis using Markov Model . . . . . . . . . . . . . . . . . . . . . . . 49 4.3.1 System Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.3.2 Markov Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 4.3.3 Model Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 4.3.4 Throughput Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4.3.5 Delay Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4.3.5.1 Delay Calculations in ATIM Window . . . . . . . . . . . . . . . . . 58 4.3.5.2 Delay Calculations in Data Window . . . . . . . . . . . . . . . . . 59 4.3.5.3 Combined MAC Layer Delays . . . . . . . . . . . . . . . . . . . . 61 4.4 Analysis of throughput, capacity and delay . . . . . . . . . . . . . . . . . . . . . . . 62 4.4.1 Model Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.4.2 Markov Model Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 4.4.2.1 Effect of number of secondary users & number of channels in system 63 4.4.2.2 Effect of ATIM Window Size . . . . . . . . . . . . . . . . . . . . . 66 4.4.2.3 Effect of PU Activity . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 5 Cognitive Wireless Sensor Networks Specific Protocols . . . . . . . . . . . . . . . . 5.1 Network Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 Proposed Network Architecture . . . . . . . . . . . . . . . . . . . . . . 5.1.2 Implementation Details . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.2.1 Sectors, Levels and Clusters Formation . . . . . . . . . . . . . 5.1.2.2 Tree Construction . . . . . . . . . . . . . . . . . . . . . . . . 5.1.2.3 Routing / Data Transmission . . . . . . . . . . . . . . . . . . 5.1.3 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Energy Efficient Localization of Primary Users . . . . . . . . . . . . . . . . . . 5.2.1 Proposed Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.2 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . . . . . . . . . . . . .
. . 70 . 72 . 72 . 74 . 75 . 75 . 77 . 78 . 81 . 81 . 83 . 86 . 89 . 89
6 Conclusions and Future Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 6.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 6.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Appendix A: Cognitive Model Implemented in NS2 . . . . . . . . . . . . . . . . . . . . . . 94
x
CONTENTS Appendix B: Multi-interface Implementation in NS2 . . . . . . . . . . . . . . . . . . . . . . 103 Appendix C: Single Interface Multiple Channel Implementation in NS2 . . . . . . . . . . . . 116
Related Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
List of Figures
Figure
Page
1.1 1.2 1.3 1.4 1.5
Classification of Cognitive Networks . . . . . . . . . . Cognitive Cycle . . . . . . . . . . . . . . . . . . . . . Cognitive MAC Protocol Classification . . . . . . . . The primary band holding time and its effect on routing Routing metric design challenges . . . . . . . . . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
2 3 4 6 6
2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 2.9 2.10 2.11 2.12 2.13 2.14 2.15 2.16
Solution Space of Cost Function . . . . . . . . . . . . . . . . . . . . . . . . . Sequence Diagram for Transmit Power Control . . . . . . . . . . . . . . . . . Node/Edge Disjoint Routes in Opportunistic Networks . . . . . . . . . . . . . Route Entry for any destination . . . . . . . . . . . . . . . . . . . . . . . . . . PDR - varying user load - different bandwidth channels . . . . . . . . . . . . . Average end-to-end delay - varying user load - different bandwidth channels . . Energy consumed per packet - varying user load - different bandwidth channels Routing overhead - varying user load - different bandwidth channels . . . . . . PDR - varying user load - same bandwidth channels . . . . . . . . . . . . . . . Average end-to-end delay - varying user load - same bandwidth channels . . . . Energy consumed per packet - varying user load - same bandwidth channels . . Routing overhead - varying user load - same bandwidth channels . . . . . . . . PDR by varying cognitive user speed . . . . . . . . . . . . . . . . . . . . . . . Average end-to-end delay by varying cognitive user speed . . . . . . . . . . . Energy consumed per packet by varying cognitive user speed . . . . . . . . . . Routing overhead by varying cognitive user speed . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . .
19 20 22 23 26 27 27 28 29 29 30 30 31 31 32 32
3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8
Scenario showing multi-channel hidden node problem . . . . . . . . . . . . . . . ATIM handshake in MMAC and MMAC-CR protocols . . . . . . . . . . . . . . CCM-MAC channel reservation and data transmission process . . . . . . . . . . Throughput by varying traffic load . . . . . . . . . . . . . . . . . . . . . . . . . Average delay by varying traffic load . . . . . . . . . . . . . . . . . . . . . . . Energy consumed per packet by varying traffic load . . . . . . . . . . . . . . . . Distribution of energies and time consumed by receiver, transmitter and idle node Throughput by varying ATIM window size . . . . . . . . . . . . . . . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
36 40 42 44 44 45 46 47
4.1 4.2 4.3
Activity model of primary users on spectrum band . . . . . . . . . . . . . . . . . . . . Markov Model for ATIM Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . Markov Model for DATA Window . . . . . . . . . . . . . . . . . . . . . . . . . . . .
49 51 52
xi
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
LIST OF FIGURES
xii 4.4 4.5 4.6 4.7 4.8 4.9 4.10 4.11 4.12
Markov Model validation with Simulation . . . . . . . . . . . . . . . . . . . Effect of number of users and number of channels on Capacity . . . . . . . . Effect of number of users and number of channels on Throughput . . . . . . Effect of number of users and number of channels on Delay . . . . . . . . . . Effect of ATIM window and number of channels on Capacity of the system . Effect of ATIM window and number of channels on Throughput of the system Effect of PU Activity on Capacity . . . . . . . . . . . . . . . . . . . . . . . Effect of PU Activity on Throughput . . . . . . . . . . . . . . . . . . . . . . Effect of PU Activity on Average MAC Layer Delay . . . . . . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
64 64 65 65 66 67 67 68 68
5.1 5.2 5.3 5.4 5.5 5.6 5.7 5.8 5.9 5.10 5.11 5.12 5.13 5.14 5.15 5.16 5.17 5.18 5.19 5.20
The components of a sensor node (Source: 55) . . . . . . . . . . . . . . . . . . . . . . Frequency occupancy of ZigBee, bluetooth and Wi-Fi . . . . . . . . . . . . . . . . . . Cluster representation with star topology . . . . . . . . . . . . . . . . . . . . . . . . . Sector representation and spanning-tree for a sector . . . . . . . . . . . . . . . . . . . Connection of sector MST to other neighboring sectors . . . . . . . . . . . . . . . . . Prim’s Algorithm for MST Creation . . . . . . . . . . . . . . . . . . . . . . . . . . . TDMA Schedule Order of MST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Rounds of Communication with Node Death Percentage . . . . . . . . . . . . . . . . Rounds of Communication by varying number of sectoring angle . . . . . . . . . . . . Rounds of Communication by varying initial energies of nodes . . . . . . . . . . . . . Time slots required for one round of data communication by varying number of nodes . Hidden Node Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sub-Sector Representation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Region to be disabled . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Scenario when base station is inside the disable region . . . . . . . . . . . . . . . . . Scenario when base station is outside the disable region . . . . . . . . . . . . . . . . . Error percentage by varying number of primary users . . . . . . . . . . . . . . . . . . Error percentage by varying number of cognitive users . . . . . . . . . . . . . . . . . Error percentage by varying network area . . . . . . . . . . . . . . . . . . . . . . . . Error percentage by varying Sectoring Angle . . . . . . . . . . . . . . . . . . . . . .
70 71 72 73 74 76 78 79 80 80 81 82 83 84 85 86 87 88 88 89
6.1
IoT Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
93
List of Tables
Table
Page
2.1 2.2 2.3 2.4
Cognitive Routing Protocols and their drawbacks . . . . Simulation Parameters . . . . . . . . . . . . . . . . . . Simulation Parameters for different bandwidth channels. Simulation Parameters for same bandwidth channels . .
. . . .
15 24 25 28
3.1 3.2
MAC Layer Strategies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simulation Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
38 43
4.1
Parameters Used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
63
5.1 5.2
Edge Information of MST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of data transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
77 78
xiii
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
. . . .
Chapter 1
Introduction
Traditional wireless networks are running with fixed spectrum assignment policies regulated by government agencies. Spectrum is assigned to service providers on a long term basis for large geographical regions. The spectrum is allowed to be used by licensed users. Federal Communications Commission (FCC) measurements have indicated that 15-85% of the time, many licensed frequency bands remain unused while some other bands are highly over-crowded [1]. These overcrowded bands face the issue of spectrum scarcity. In order to better utilize the licensed spectrum, FCC has launched a secondary markets initiative [2], whose goal is to remove regulatory barriers and facilitate the development of secondary markets in spectrum usage rights among the wireless radio services. The inefficient usage of the existing spectrum can be improved through opportunistic access to the licensed bands without interfering with the primary users. This introduces the concept of Dynamic Spectrum Allocation (DSA), which implicitly requires the use of cognitive radios [3] to improve spectral efficiency. Cognitive radio is an intelligent radio that is aware of its surrounding environment and dynamically adapts to the transmission or reception parameters to achieve efficient communication without interfering with primary users. Thus, a Cognitive Radio Network (CRN) [4] consists of primary and secondary users. The primary users are the licensed users and hence have exclusive rights to access the radio spectrum, whereas the cognitive users are the unlicensed users that can opportunistically access the free spectrum bands, without causing harmful interference to primary users. This introduces cognition and adaptation to physical layer of the network. These networks work on multi-channel environment with dynamic availability of channels based on primary user activity. These channels can be of different frequencies and/or different bandwidth. The operation of these networks is very different from simple multi-channel environments as different frequencies have different characteristics, like transmit power levels, transmission distance and multipath effects. This gives new challenges to a variety of stakeholders. For RF equipment vendors, the challenge is to build equipment which can be operated on any spectrum band and capable of doing on the fly changes in the radio transmission parameters. For wireless service providers, the challenge is to use their own resource efficiently and opportunistically use the other bands while maximizing their profit. As other providers can use their band opportunistically, security is also a major concern from 1
user’s perspective. Ensuring the licensing policies which enable the secondary usage of the spectrum is a challenge for regulatory bodies. Licensing policies should provide benefit to licensed users as well as cognitive users. To deal with the cognition in radio (i.e. physical) layer, upper layers should also be modified to adapt to the reconfiguration done at physical layer. Thus, adaptation and cognition should also be included at upper layers to achieve the benefits of cognitive radio technology. This makes a network as cognitive network [5,6]. Definition of cognitive network was first presented at IEEE DySPAN conference in 2005.
A cognitive network is a network with a cognitive process that can perceive current network conditions, and then plan, decide and act on those conditions. The network can learn from these adaptations and use them to make future decisions, all while taking into account endto-end goals.
As cognition should be incorporated in upper layers to effectively utilize the benefits of cognition at physical layer cognitive networks and CRNs are used interchangeably in literature. Cognitive networks can be broadly classified as infrastructure-less cognitive networks and infrastructure-based cognitive networks as shown in figure 1.1. In the infrastructure-based cognitive networks, the cognitive base-station collects the spectrum information acquired locally by the cognitive users and makes the decision. According to this decision, each cognitive user reconfigure its communication parameters. Infrastructure-less cognitive networks or Cognitive Radio Ad Hoc Networks (CRAHNs) [7] require distributed protocols. In CRAHNs, cognitive users need to have the cognitive capabilities and they are responsible for determining the actions based on the local observation. Since cognitive users cannot predict the influence of their actions on the entire network, cooperative schemes are essential. In cooperative schemes, the observed information can be exchanged among cognitive users to broaden the knowledge on the network. Cognitive Wireless Sensor Networks (CWSNs) [8, 9] are special class of CRNs which can be deployed as infrastructure based or infrastructure-less networks.
Cognitive Networks Cognitive Radio Networks
Infrastructure based networks
Infrastructure−less networks
Figure 1.1: Classification of Cognitive Networks
2
1.1 Cognitive Network Challenges 1.1.1 Spectrum Management Framework The functionality of cognitive cycle is the main challenge of the spectrum management framework in cognitive networks. The cognitive cycle builds the spectrum opportunity map identified by the sensing block and schedules the resources dynamically among the cognitive users. Furthermore, the cognitive cycle allows cognitive users to vacate the selected channel when a primary user becomes active on that channel. Following are the main features of spectrum management as shown in figure 1.2. Radio Environment
Primary User Present
Spectrum Sensing
Spectrum Sharing
Spectrum Holes
Spectrum Handoff
Spectrum Decision
Figure 1.2: Cognitive Cycle • Spectrum sensing: The cognitive users are allowed to use the unused portion of spectrum. Therefore, a cognitive user should monitor the available spectrum bands to detect spectrum opportunities. Spectrum sensing can be done by the cognitive users or a trusted third party. In case of third party sensing, third party shares the geo-location database of spectrum with the cognitive users. Some efforts are already taken by companies to provide geo-location database of spectrum. FCC has approved Spectrum Bridge Inc.’s for providing spectrum database services for television white spaces in USA since January 26, 2012. Google is also working with industry and regulators for TV whitespaces database [10]. • Spectrum decision: Once the available spectrum bands are identified, cognitive users select the most appropriate band according to their QoS requirements. • Spectrum handoff: If primary user presence is detected in the specific portion of the spectrum in use, cognitive user should vacate that spectrum and continue their communication in some other vacant band. Spectrum handoff process needs to communicate with spectrum sensing process to find the vacant band. 3
• Spectrum sharing: As multiple cognitive users may be looking for the spectrum at same time, transmission between cognitive users should be coordinated to avoid collisions. This spectrum sharing capability is taken care by spectrum sharing process. Spectrum sharing can be classified as centralized spectrum sharing and distributed spectrum sharing. Spectrum sharing can also be classified as cooperative spectrum sharing and non-cooperative spectrum sharing. In cooperative sharing, communication effect to other cognitive users is considered while selecting the channel. While in non-cooperative sharing, channel is selected based on local policies. For networks where centralized infrastructure is present, spectrum sharing is done through the base-station and hence comes under cooperative sharing. For infrastructure-less networks, where the controlling infrastructure is not present, spectrum sharing is done based on local policies.
1.1.2 MAC layer in the Cognitive Networks Functionality of the cognitive cycle discussed above is the main challenge of MAC layer in cognitive radio networks. Classifications of cognitive MAC protocols based on various factors are listed in the figure 1.3. Based on spectrum access method, MAC protocols can be classified into contention based Network type/ Controlling Style
Spectrum Access Method
Spectrum usage
Spectrum Allocation Behaviors
Strategies
Contention based Centralized MAC
Control Information Sharing
Dedicated CCC Cooperative
Spectrum Sharing Models
Overlay
Single Channel
TDMA based Non−dedicated CCC:
Hybrid of Contention & TDMA
Distributed MAC
Underlay
− Time Slotted
Non− cooperative
Multi−channel
− Frequency Hoping Sequence
OFDMA based
Interweave
Figure 1.3: Cognitive MAC Protocol Classification protocols, TDMA based protocols, hybrid protocols and OFDMA based protocols. To avoid interference to primary user in TDMA based spectrum access method, all secondary users should be synchronized and should follow the same timeslot division as of the primary user. Thus, TDMA based approach cannot be used for more than one kind of primary user. In cooperative spectrum allocation based MAC protocols, the cognitive user also considers requirements from other cognitive users and fairly uses the channels. While in Non-cooperative spectrum allocation based MAC protocols, the cognitive user only considers its own requirement and voraciously access the channel whenever available. The MAC protocols can be classified into underlay spectrum sharing model based MAC protocols, overlay spectrum sharing model based MAC protocols and Interweave spectrum sharing model based MAC protocols 4
according to spectrum sharing models. In the underlay spectrum sharing model based MAC protocols, a cognitive user can operate in the primary user’s band if the interference caused to the primary user is below some threshold. Cognitive user is restrictive to short distance communication because of interference constraint of such protocols. In the overlay spectrum sharing model based MAC protocols, the cognitive user has access to the primary user codebook. Primary user codebook information is used at the cognitive receiver to cancel the interference caused by the primary user. Overlay and underlay spectrum sharing model based MAC protocols allow cognitive user and primary user to transmit simultaneously. Interweave spectrum sharing model based MAC protocols use primary spectrum band in spectrum opportunities. MAC protocols for cognitive networks should support multi-channel operation. In cognitive networks, availability of channels is dynamic and also the channels are heterogeneous, i.e. they could be of different bandwidth and different frequencies with different propagation characteristics. In multichannel networks, MAC layer is responsible for channel assignment and medium access control. Due to the dynamic nature of cognitive networks some other challenges also arise in the design of MAC layer. Below are the main issues related to the MAC layer of cognitive networks, details about these issues are discussed in chapter 3. • Selection of transmission channel • Neighbor discovery • Control information sharing • Channel synchronization • Medium access coordination • Multi-channel hidden node problem • Channel scheduling
1.1.3 Routing in Cognitive Networks Khalife et al [11] argues that no general routing protocol can be proposed for cognitive networks. According to the paper, cognitive networks can be classified into three categories based on primary user activity models; each requiring specific routing solutions as shown in figure 1.4. In the case of a static primary user activity model, traditional routing algorithms can be used as primary user activity and inactivity is for longer periods like in case of TV broadcasts. In the case of a dynamic primary user activity model, specific routing protocols for cognitive networks should be developed. While in case of highly dynamic primary user activity model, the availability of such frequency bands for the whole communication duration becomes an unrealistic assumption. Therefore, complete opportunistic routing protocol, where every packet can be forwarded opportunistically over available channels with no route 5
setup, constitutes a potential solution. This thesis considers dynamic primary user activity model for routing.
Seconds
Static Routing
Opportunistic Routing
Dynamic Routing
Undecided region
Minutes
Hours/days
Primary user idle time
Figure 1.4: The primary band holding time and its effect on routing Figure 1.5 lists the challenges for designing effective routing metrics for cognitive networks. Some of the challenges are inherited from traditional networks. Opportunistic spectrum availability, interruption time due to channel switching if primary user comes back and signaling and deafness problem also known as multi-channel hidden node problem are some of the challenges specific to cognitive networks.
Routing Metrics Design Challenges in Cognitive Networks Inherited from Traditional Networks Basic set of challenges inherited from traditional networks that a routing metric for cognitive networks should address.
Spectrum Availability
Interruption Time
Assign different weights to different channels based on their availability and the interruption probability.
Take into account the channel switching time that needs to be paid when a channel switching decision is taken.
Signaling and Deafness Problem The solution of deafness problem affects the choice of the routing metric and the performance of the routing protocol in general.
Figure 1.5: Routing metric design challenges In literature, various routing algorithms have been proposed. Papers [12, 13] provide a survey of routing metrics used in cognitive networks. The routing metrics are classified as follows: 6
• Delay • Hop Count • Power Consumption • Location based • Spectrum Availability • Route Stability • Probabilistic • Route bandwidth capacity • Route closeness • Dead Zone Penetration • Metrics that capture secondary user interference Delay, hop count, power consumption, location based and probabilistic routing metrics are inherited from traditional networks. Spectrum availability, route stability, route bandwidth capacity, route closeness, dead zone penetration and metrics that capture secondary user interference are specific to cognitive networks. The routes closeness metric [14] favors routes that are far away from each other. Selecting non-close routes makes them less vulnerable to primary user’s activities as it would be difficult for an active mobile primary user to interrupt all the routes at the same time. The Dead Zone Penetration metric (DZP) [15] is a route maintenance metric and can be used in conjunction with any of the existing routing. This metric uses multipath routing to penetrate active primary user’s zones by using the relay to cooperatively send data to the next hop. These different metrics perform differently in different network conditions and/or requirements. Chapter 2 discusses routing protocols from literature. Most of the presented protocols were inherited from traditional routing protocols, i.e. the routing metrics are old metrics like hop-count or delay, and algorithms send data only in spectrum opportunities. The goals for routing in cognitive networks are: • Use spectrum opportunities effectively to benefit secondary users without causing harmful interference to primary users. • Save energy of nodes to increase the network lifetime. • Minimize end-to-end delay. • Increase throughput. • Improve route stability. 7
1.1.4 Transport layer in Cognitive Networks The performance of TCP depends on the packet loss probability and the round trip time (RTT). Link errors, packet loss probability and RTT depend on the access technology, interference level, channel bandwidth and frequency of the channel in wireless communication. Thus, the performance of transport protocol is dependent on the physical layer parameters. Therefore, the transport protocols that are designed for existing networks cannot be used in cognitive networks. The spectrum sensing results, activity of the primary users, large-scale bandwidth variation based on spectrum availability, and the channel switching process should be considered in the transport protocol design. Chowdhury et al [16] propose a window-based transport protocol for cognitive networks, TP-CRAHN, which distinguishes each of these events by a combination of explicit feedback. This protocol closely interacts with the physical layer channel information, link layer spectrum sensing and buffer management, and a predictive mobility framework that is developed at the network layer to achieve desired TCP rate.
1.1.5 Need for Cross Layer Design In the traditional OSI model of communication, strict boundaries between layers are enforced and meta-data for layers are kept unavailable to other layers. While in cross layer design strict boundaries are removed and exchange of meta-data is permitted across the layers. The layered OSI model for communication was build for wired communication and later adapted to the wireless communication. Issues with wireless links and opportunistic behavior of cognitive networks are the main motivations for cross layer design in cognitive networks. In cognitive wireless environment, several problems cannot be handled by layered communication. Below we discuss specific needs for cross layer design with respect to network layer and transport layer. • Need for cross layer design with respect to network layer: In cognitive networks, physical layer parameters should be changed based on the available spectrum. This change in the channel parameters may affect the QoS of the path selected. For example, an optimized MAC protocol may provide the best channel/power/rate assignment for a particular link but such an assignment can be quite inefficient for end-to-end path of the flow. This necessitates that the decisions at network layers should consider and reflect the parameters of lower layer. Hence, lower layer optimization without considering network layer protocols can lead to sub-optimal solution. This necessitates the use of cross layer protocols with hybrid routing metrics. • Need for cross layer design with respect to transport layer: Link unavailability due to the primary user activity could be mistaken as network congestion by transport layer protocol. In case of TCP as a transport layer protocol, this may cause to increase the size of congestion window. As discussed earlier, the performance of TCP depends on bandwidth and frequency of spectrum. In cognitive networks, bandwidth changes with the spectrum switching at MAC layer. The size of contention window should also be updated with the change in transmission spectrum bandwidth. 8
Thus, appropriate changes are needed in the design of transport layer for cognitive networks which takes feedback from lower layers. Srivastava et. al. [17] also shows that the cross layer protocols are more effective than layered protocols where dynamic adaptation of parameters is required. Cognitive networks use spectrum opportunities for communication where dynamic adaptability to the transmission or reception parameters is required. For cross layer design of the network, objectives from different layers should be combined to one optimization problem to ensure QoS at each layer.
1.2 Thesis Statement The objective of the research project is to study, evaluate and propose cross layer protocols for various design challenges in cognitive mobile ad hoc networks and cognitive wireless sensor networks. As discussed earlier, cognitive users need to have the cognitive capabilities and they are responsible for determining the actions based on the local observations in cognitive mobile ad hoc networks. Also, cognitive users act as a router for data forwarding in cognitive mobile ad hoc networks. Thus, energy efficiency is one of the main concern in the design of protocols for cognitive mobile ad hoc networks. Cognitive wireless sensor networks uses cognitive capabilities to solve the spectrum scarcity issue in ISM band. CWSNs can be deployed either as an infrastructure based networks or as an infrastructureless networks. Sensor nodes are small low cost devices with limited power. These nodes act as a data collector and a data router. Sensor networks get very less human interaction once they are deployed and hence energy efficiency is more crucial while designing the protocols for such networks.. The resulting protocols/solutions should ensure better utilization of communication and computation resources as well as increase the lifetime of the network by increasing energy efficiency. The scope of the current research is to study and give cross layer protocols that deal with the following problems: • Routing • MAC layer issues • Spectrum allocation • Power control • Representation of network architecture • Localization of primary users The proposed protocols should conserve energy at all the nodes in the network which in turn will affect the lifetime of the whole network. Detailed study of physical layer issues are out of the scope of this research project. 9
1.3 Contributions and Layout of the thesis This thesis proposes cross layer protocols for routing, spectrum allocation, spectrum access, and power control in cognitive networks. Chapter 2 proposes a new cross layer routing protocol for cognitive networks, called cognitive crosslayer multipath probabilistic routing (CCMPR). It also performs power control, spectrum selection and node selection. This work calculates the transmit power level for each hop in the routing path based on history of the channel. This protocol introduces cognition to network layer. To define the routing metric, multi-objective optimization is used. It is shown that the defined routing metric gives a Pareto optimal solution. Chapter 3 discusses MAC layer issues and existing protocols from literature. The MMAC-CR protocol provides solution to most of the issues but it seems to suffer from spectrum wastage. As discussed above, the selection of spectrum should be done by upper layers to improve the end-to-end performance. This chapter also proposes a cognitive cross-layer multi-channel MAC protocol (CCM-MAC). MMAC-CR protocol is modified to support high throughput and spectrum decisions at upper layer in CCM-MAC. CCM-MAC also provides spectrum sensing support such that cognitive user data is not mistaken as primary user data. It also provides solution for the multi-channel hidden node problem. The MAC and routing protocols are implemented such that the combined cross layer protocol gives solution to routing, MAC layer issues, spectrum allocation and power control. Several proposals about cognitive MAC protocols based on traditional IEEE 802.11 can be found in the literature. None of the previous works talks about performance analysis of cognitive MAC protocols with exponential backoff procedure using Markov Model. Bianchi [18] proposed a Markov model for single channel IEEE 802.11, providing results about the throughput of the protocol. This work can be extended to provide performance analysis of IEEE 802.11 based MAC protocols in cognitive multichannel networks. MMAC-CR and CCM-MAC protocol proposed in chapter 3 are the examples of such protocols. Chapter 4 develops a Markov model for the performance analysis of these MAC protocols under ideal channel and saturation conditions. The developed analytical model is defined as a three state model for Distributed Coordination Function (DCF) mode of operation which can be used for ad hoc networks. The analysis is done for data frame transmission together with the corresponding Ad hoc Traffic Indication Messages (ATIM) frame transmission. Performance analysis is done to analyze the channel capacity, MAC layer throughput and average MAC layer delays. This analysis can be used to select the design parameters of the protocols based on different user and/or network characteristics. Chapter 5 focuses on CWSNs. Wireless sensor networks (WSNs) are used to perform distributed sensing in order to have a better understanding of the behavior of monitored entity for the occurrence of a set of possible events, so that proper action may be taken whenever necessary. Most WSN operate in unlicensed frequency bands which are also used by other wireless applications, such as Wi-Fi and Bluetooth. This makes unlicensed bands overcrowded. The capabilities of cognitive networking can be applied to any of the current wireless systems with adaptability to existing spectrum allocation in the deployment field, and hence improve overall spectrum utilization. These features can also be used to 10
meet many of the unique requirements and challenges of WSNs. Thus, CWSNs work with the cognitive network principles by adaptively changing the system parameters. CWSNs are special kind of cognitive networks, but bit different from cognitive ad hoc networks in the following sense: • The number of sensor nodes in a CWSN can be several orders of magnitude higher than the nodes in a cognitive ad hoc networks. • Sensor nodes are small low cost devices limited in power. And each node in CWSNs plays the dual role of data collector and data router. • CWSNs usually get deployed in field at random unknown locations (like forest) and it is impractical to recharge sensor nodes once they are deployed. This make energy efficiency more important in CWSNs. • One or few nodes acts as data sink(s) in CWSNs and all the sensed data should be forwarded to the predefined sink(s) unlike cognitive ad hoc networks which support any node pairs for routing. This makes a need for specific routing protocol for sensor networks. • CWSNs can also be deployed as infrastructure based networks. CWSN specific protocols for energy efficient network architecture, routing, spectrum access and localization of primary users are proposed. Finally, chapter 6 presents the conclusions of the thesis.
11
Chapter 2
Cognitive Cross-layer Multipath Probabilistic Routing
Routing in cognitive networks targets the creation and maintenance of wireless multi-hop routes among secondary users by deciding both the spectrum to be used and the relay nodes of the route. The majority of research on cognitive networks is centered around single-hop scenarios, proposing solutions for physical and MAC layer issues. In order to explore the potential of these networks, challenges in upper layers, including multi-hop scenarios, must be addressed. In particular, effective routing protocols should be integrated with the work already carried out at the lower layers. This chapter proposes a new cross layer routing protocol for cognitive networks, called Cognitive Cross-layer Multipath Probabilistic Routing. In addition to routing, CCMPR also performs power control and spectrum selection which cause dynamic adaptation of these parameters more effective in opportunistic environment. For performance evaluation, proposed protocol is implemented in Network Simulator 2 (NS2) [19] and comparative analysis is also carried out against an existing protocol from the literature. The comparison validates that the proposed protocol gives better results. The rest of this chapter is organized as follows. In section 2.1, existing protocols from literature are discussed. Section 2.2 presents the proposed algorithm, CCMPR, bringing out its main points. Section 2.3 discusses the simulation results of the proposed algorithm. Finally, Section 2.4 concludes the routing proposal.
2.1 Related Work Various routing algorithms have been proposed for cognitive networks. In this section we discuss some of the existing protocols. Ant-based Spectrum Aware Routing (ASAR) [20] adapts to path and spectrum availability. In this protocol, forward ants are broadcast on the control channel. A forward ant follows the spectrum feasible routes while storing the node addresses in itself. The backward ants update the statistic history and route quality in routing table. A deterministic policy for route selection is used in place of probabilistic forwarding to minimize channel handoff time. Each ant contains a list of all the nodes of the route 12
which results in high overhead on the control channel leading to control channel saturation. Also, the algorithm does not take mobility of secondary users in consideration. SpEctrum Aware Routing protocol for Cognitive ad-Hoc networks (SEARCH) [21,22] uses the shortest path based greedy approach for route selection. The objective of the protocol is to minimize hopcount and switching delay which in turn minimizes end-to-end delay. Every intermediate hop adds its ID, current location, time stamp and flag status in the route request packet. This results in high routing overhead. Also, it requires location awareness which is not a good option as GPS service availability to all nodes in the network might not be feasible. Power consumption of GPS will also reduce the battery life of the nodes, reducing the effective lifetime of entire network. Cognitive Routing Protocol (CRP) [23] proposes a metric for joint spectrum and node selection. This protocol defines two classes of secondary users. The first class tries to minimize the end-to-end secondary user route latency, while the second class gives greater importance to the primary user protection. The second class is of interest in opportunistic networks as secondary users should not interfere with the primary users while using licensed spectrum. In CRP, each user first identifies the best locally available spectrum band. Selection of spectrum band is defined as an optimization problem considering probability of spectrum availability, bit arrival variance, multipath fading and switching latency. After spectrum band selection, next hops are selected based on minimum forwarding delay. The drawback of the protocol is that the spectrum characteristics such as bandwidth are not considered while selecting the spectrum band. Results in the paper also show that the performance of CRP is average for flows with second class. Optimal Primary-awarE Route quAlity (OPERA) [24] proposes the metric which calculates the link delay and end-to-end delay for any pair of source and destination nodes. Link delays are calculated considering the probability of link availability which in turn is measured by primary user characteristics, expected throughput, and characteristics of sensing process. This metric gives the theoretical bounds to end-to-end delays. OPERA combined with Dijkstra [25] and Bellman-Ford [26] algorithms for searching for the shortest path in a weighted graph gives optimal results. The drawbacks of OPERA are (i) it lacks a route recovery process, (ii) for each sensing cycle, OPERA should calculate the weighted metric which requires search for the shortest path using Dijkstra or Bellman-Ford algorithm. This results in high routing overhead, (iii) OPERA can interfere with primary users as it considers probability of primary user activity instead of actual sensing output. Coolest Path protocol [27] proposes a routing metric which favors the path with lowest spectrum utilization. In this protocol, link temperature is defined as the primary channel utilization at each node. Based on the link temperature three different path temperature metrics were introduced. The accumulated spectrum temperature is the sum of the link temperatures over the entire path. The highest spectrum temperature is the maximum link temperature of the links over the path. The mixed spectrum temperature selects a path with low accumulated spectrum temperature and low highest spectrum temperature. If there exists no such path, either the path with the lowest accumulated spectrum temperature or the one with the lowest highest spectrum temperature is selected. In this protocol, the business ratio of channel 13
is used for routing and not the actual sensing output, and hence the cognitive users can interfere with the primary users. This protocol does not consider channel characteristics in routing. Spectrum Aware MEsh Routing (SAMER) [28] routes traffic with highest spectrum availability and quality. SAMER builds a forwarding mesh which is adjusted periodically according to the spectrum dynamics, and routes packets with the highest spectrum availability path across this mesh. This protocol does not support mobility of users. Also, it lacks in route recovery process. The overhead associated with forwarding mesh establishment and maintenance have not been considered in the protocol. This protocol also considers the fraction of time during which cognitive users are allowed to use the spectrum and not the spectrum sensing output, hence can interfere with primary users. SPEctrum-Aware Routing (SPEAR) [29] protocol supports high-throughput packet transmission in the presence of spectrum heterogeneity while selecting both the transmission channel and route. SPEAR does not specify any specific routing policy to be used, it is been mentioned that variety of policies can be used to determine the most desirable route. In this protocol, each cognitive user maintains lists of locally available channels (channelSet A) that are free for cognitive user. Protocol uses AODV-style route discovery procedure, i.e. route request message is forwarded for route discovery. Once a cognitive user i receives a route request message it appends its identifier and its channelSet Ai to the payload of route request message. This results in high overhead on the control channel leading to control channel saturation. Cognitive Ah-hoc On-demand Distance Vector (CAODV) [30, 31] routing modifies the existing AODV protocol [32] such that it avoids primary user activity areas and applies joint path and channel selection. This protocol broadcasts the route request to neighbors on each channel and for each available channel it stores multiple paths for a destination. Drawbacks of the protocol are (i) applying the shortest path solution without considering channel characteristics in cognitive networks does not give optimal results, (ii) flooding the route request packet on all the channels reduces network life time and leads to overhead. A summary of these protocols and their issues are listed in table 2.1. As discussed in chapter 1, cross layer protocols with hybrid metrics are essential in cognitive networks.
2.2 Proposed Protocol This section discusses the proposed cross-layer protocol for routing, spectrum management and power control in cognitive networks. The proposed protocol, CCMPR, has the following characteristics: • Cognitive Routing: The proposed routing protocol jointly exploits route and spectrum diversity and uses spectrum opportunities for data transmission. 14
Protocol ASAR
Drawbacks • Control channel starvation due to high overhead • Mobility of cognitive users is not considered
SEARCH
• Requires location awareness • Overhead is high
CRP
• Spectrum characteristics were not considered • Can interfere to primary users
OPERA
• Lacks in route recovery process • High complexity and overhead • Can interfere to primary users
Coolest Path
• Spectrum characteristics (like bandwidth) were not considered • Can interfere to primary users
SAMER
• Mobility of cognitive users is not considered • Lacks in route recovery process • Overheads associated with forwarding mesh establishment and maintenance have not been considered
SPEAR
• Control channel starvation due to high overhead • It lacks in specifying specific routing metric to be used
CAODV
• Spectrum characteristics were not considered • High Overhead
Table 2.1: Cognitive Routing Protocols and their drawbacks • Cross Layer Protocol: The proposed routing protocol uses spectrum opportunities while jointly selecting node and spectrum. It also selects a transmit power based on the channel history for each hop in the route. CCMPR simultaneously deals with network, MAC and physical layer issues. • Multipath Routing: The proposed routing protocol stores multiple routes/paths for each destination based on the routing metric discussed in next section. Routes having same nodes and different channels are also stored in routing table. Due to spectrum unavailability or mobility of nodes one route may not be available; in such situations others can be used. • Probabilistic Routing: The proposed routing protocol stores multiple paths to the destination. The probability of selecting a path is inversely proportional to the cost of that path. The proposed routing selects a path based on a probabilistic approach for data forwarding which helps in load balancing. • Reactive Routing: The routes are searched only if node has data to send. 15
2.2.1 Routing Metric First, we define the problem of routing as a multi-objective optimization problem to derive the cost function which will be used as the routing metric. Details about multi-objective optimization can be m ) depends on found in [33]. The cost for transmitting packet from node i to node j on channel m (Cij the following parameters with the relation shown as below: 1. Availability of channel m to transmit data from node i to node j, represented by SOPijm . 1 if channel is free SOPijm = 0 if channel is occupied m ∝ Cost function Cij
(2.1)
1 m. SOPij
2. Transmit power to send data from node i to node j on channel m, represented by Pijm , with m ∝ P m. Cij ij m ∝ 3. Remaining energy of node i, represented by Ei , with Cij m ∝ 4. Bandwidth of channel m, represented by Bm , with Cij
1 Ei .
1 Bm .
The above equations show that the cost for occupied channel goes to infinity which will avoid the interference to primary users. To increase the network life time, links with low transmit power and nodes with high energies are preferred. The cost metric supports higher transmission rate by giving preference to high bandwidth channels. As all the parameters listed above are of different scale, normalization is required. Normalization function, fnorm , for range [xmin − xmax ] is shown in equation 2.2. fnorm (x) =
x − xmin xmax − xmin
(2.2)
fnorm (x) will have values between zero and one. Now routing is formulated as a problem to find a path π, such that the cost function for that path is minimized. X m min C(π) = Cij (2.3) π
where m Cij
1 = SOPijm
(
w1 fnorm Pijm + w2 fnorm
1 Ei
+ w3 fnorm
1 Bm
) (2.4)
Here w1 , w2 , w3 are the coefficients which decide the weights for each component in the cost function. These are user defined parameters for the routing and can be modified based on the user or traffic requirements. For deciding weights w1 , w2 , w3 different components are ordered by priorities. The least prior component receives minimum weight, and weights with increments are assigned to components that are of higher priorities. 16
Let us redefine the cost function, considering the individual cost functions of multiple objective optimization as below: X m min C(π) = Cij (2.5) π
where m Cij = w1 f1 + w2 f2 + w3 f3 fnorm Pijm f1 = SOPijm fnorm E1i f2 = SOPijm fnorm B1m f3 = SOPijm w1 + w2 + w3 = 1.0
w1 , w2 , w3 > 0 (2.6)
2.2.2 Theoretical Analysis of Selected Routing Metric The CCMPR cost function is defined using Weighted Sum Method (WSM) [33] of individual cost functions. The reason of using WSM are: • It is simple and easy to use • It guarantees to find solutions on the entire Pareto optimal set for convex functions. To show the second point, we first introduce the concept of Pareto optimal solution. Definition In multi-objective optimization, a point, x0 ∈ S (Solution Space), is Pareto Optimal iff there does not exists another point, x ∈ S, such that F (x) ≤ F (x0 ), and Fi (x) < Fi (x0 ) for at least one function. According to the above definition, the solution is Pareto optimal if there is no other solution that can improve at least one objective function without deteriorating another function in multi-objective optimization. Now we prove that the CCMPR cost function can reach to entire Pareto optimal set. To prove this theorem 2.2.1 shows that the CCMPR cost function is convex. Theorem 2.2.2 and 2.2.3 show that all the Pareto optimal solutions are reachable by varying the weighting vector for convex functions defined using WSM. Finally, theorem 2.2.4 proves that all the Pareto optimal solutions are reachable in CCMPR cost metric. 17
Theorem 2.2.1. The cost function represented in equation 2.6 is convex. Proof. As minimization of functions f1 , f2 and f3 are convex, any two solution x & x0 , for the functions satisfy the following equation: fi λx + (1 − λ) x0 < λfi (x) + (1 − λ) fi x0 , i = 1, 2, 3.
(2.7)
Adding left hand sides for f1 , f2 , f3 of equations 2.7 imply LHS = w1 f1 λx + (1 − λ) x0 + w2 f2 λx + (1 − λ) x0 + w3 f3 λx + (1 − λ) x0 = C λx + (1 − λ) x0
(2.8)
Adding right hand sides for f1 , f2 , f3 of equations 2.7 imply RHS = w1 λf1 (x) + w1 (1 − λ) f1 x0 + w2 λf2 (x) + w2 (1 − λ) f2 x0 + w3 λf3 (x) + w3 (1 − λ) f3 x0 = λ w1 f1 (x) + w2 f2 (x) w3 f3 (x) n o + (1 − λ) w1 f1 x0 + w2 f2 x0 + w3 f3 x0 = λC (x) + (1 − λ) C x0
(2.9)
Putting values from equation 2.8 & 2.9 in equation 2.7, gives: C λx + (1 − λ) x0 < λC (x) + (1 − λ) C x0 This proves that the CCMPR cost metric is convex. Figure 2.1 shows the solution space for the cost metric. Theorem 2.2.2. The solution of weighted sum method is Pareto optimal, if weighting coefficients are positive, that is wi > 0, ∀i = 1, 2, 3.
Theorem 2.2.3. Given that the multi-objective problem is convex, if x0 ∈ S is Pareto optimal, then there P exists a weighting vector w with wi > 0, ∀i = 1, 2, 3 and i wi = 1 such that x0 is the solution to the multiple objective problem. 18
Cost Function with Minimum Node Enery Cost Function with Maximum Node Enery
Cost Function with Minimum Bandwidth Cost Function with Maximum Bandwidth
1
1
0.8
0.8
0.6
0.6
0.4
0.4
1
0.2
0
0.2
2
200
3
400
4
0 0
5
0.05
6
0.1
800
0.05 Bandwidth
0.1
7
0.15 0.2 Transmit Power
600
0 0 1000 0.15 Transmit Power
9
(a) With Transmit Power and Bandwidth
Node Energy
1200
0.2
8 0.25
0.25
1400
(b) With Transmit Power and Node Energy
Figure 2.1: Solution Space of Cost Function
Proof for theorem 2.2.2 and 2.2.3 can be found in [34].
Theorem 2.2.4. CCMPR cost metric defined in equations 2.5 & 2.6 can reach to entire Pareto optimal solution space.
Proof. Theorem 2.2.1 shows that the CCMPR cost function is convex. According to theorem 2.2.2 and 2.2.3, for convex functions defined using WSM, all the Pareto optimal solutions are reachable by varying the weighting vector. Hence, the selected cost metric can also reach to entire Pareto optimal solution space.
2.2.3 Channel Selection Rule The channel selection rule for CCMPR is defined in equation 2.10. Node j selects channel m from the spectrum opportunities which minimizes the cost function C 0 and tunes its receiver radio to the selected channel. ( ) 1 m C 0 = w1 fnorm Pavg (2.10) + w3 fnorm Bm m is the average transmit power from neighbors. From equation 2.10, it is clear that each Where Pavg node selects a channel which minimizes average transmit power from neighbors and has better channel bandwidth.
19
2.2.4 Transmit Power Control In CCMPR, transmit power control is combined with routing. Whenever a node receives a packet (either destined for the node or for forwarding), it calculates the receiver gain, G, with equation 2.11. G=
Prx Ptx
(2.11)
Transmit Power Used (TPU) field is added to the physical layer header for transmitting the value of Ptx . The TPU field is 1 octet in length similar to the TPU field of management header of IEEE 802.11. It indicates the actual power used in units of dBm. The value of the receiver gain is stored in the neighbor table managed by CCMPR. It stores past N values of the receiver gain. For every (N + 1)th received packet, receiving node sends a transmit power update message back to the one hop source of the message, containing the moving average of the past N values of G. Once the node receives transmit 0 , using equations 2.12, 2.13 and 2.14. power update message, it calculates the target transmit power, Ptx G0 = G ∗ δ
(2.12)
RXT hresh Pmax
Glow =
(2.13)
Glow (2.14) G0 TPU value has a tolerance of ±5dB. Also, the receiver gain is actually the moving average of the past N values of G. This causes some error in calculating the actual gain. Here δ is used to model the probability of error for calculating gain at the receiver. The value of δ is between zero and one. Pmax is the maximum allowed transmit power. RXT hresh is the reception threshold. The packet can be received successfully if the received signal strength is greater than RXT hresh . 0 Ptx = Pmax ∗
The sequence diagram for transmit power control is shown in figure 2.2. Once node A calculates Node A
Node B
Msg Calculate G low Calculate G
te er Upda
TxPow
Msg
Calculate G’, P’tx
Figure 2.2: Sequence Diagram for Transmit Power Control
20
0 for neighbor node B, it stores the value of P 0 in the neighbor table. Transmit power levels are Ptx tx calculated for each available channel of the hop. The packets are transmitted with stored transmit power after referring to the neighbor table.
2.2.5 Implementation Details This section discusses the key features of CCMPR and its implementation details. CCMPR assumes that secondary users can use multiple channels simultaneously. This assumption is valid when users have multiple wireless interfaces; if secondary user has only one wireless interface, the assumption can be justified by having proper channel coordination mechanism [35]. Details about cognitive model and multi-interface implemented in NS2 are discussed in appendix A and B.
2.2.5.1 Route Discovery, Maintenance & Data Forwarding CCMPR is reactive in nature, i.e. when a node has data to send to any specific destination it generates the Route REQuest (RREQ) message. Any intermediate node or destination node which receives the RREQ, first calculates the last link cost using equation 2.6 and updates the header by adding it to the route cost. It also sets up a reverse path to the source using the previous hop of the RREQ as the next hop on the reverse path. If an intermediate node has route to the destination, it sends the Route REPly (RREP) to the source of RREQ message, otherwise it broadcasts the RREQ message. Once the RREQ reaches the destination node, it sends RREP message. The RREP message is routed back to the source of RREQ message via the reversed path. A forward path to the destination is established during the RREP message forwarding. Route maintenance is done using Route ERRor (RERR) messages. When primary user appears on a channel, routes with that channel will be marked as inactive. Those routes will also be notified to the neighbors to avoid transmission of packets over that channel. When primary user vacates that channel, routes with that channel will be marked active and availability will be notified to the neighbors. In multichannel environment, unavailability of spectrum between two nodes due to primary user activity might cause link failure. Whenever the link failure is detected, RERR message is sent back to all the active source nodes of that link. Periodic ‘Hello’ messages are used to detect link failures. Routes are erased by RERR message along its way. Once the source node receives RERR message, it can initiate a new route discovery process. Unused routes in the routing table are removed using a timer-based technique. The routing table contains multiple routes for any specific destination. As discussed earlier, routes having same nodes and different channels are also stored in routing table. Secondary user selects a route with probabilistic approach from the active routes for data transmission. This allows secondary users to adapt to the availability of channels based on primary user activities. 21
2.2.5.2 Forward & Reverse Route Setup The loop-free edge disjoint multi-channel routes are added to the routing table. The rule for implementing edge disjoint routes is same as AOMDV protocol [36]. CCMPR considers edge disjoint routes in place of node disjoint routes as edge disjoint routes are more advantageous in cognitive networks. Let us take an example, as shown in figure 2.3, to understand the benefit of edge disjoint routes over node disjoint routes. If we add edge disjoint routes in routing table, routes with (S 99K I → J1 → R) and Recv Channel x J1
S
R
I
J2 Recv Channel y Multiple Paths Single Path
Figure 2.3: Node/Edge Disjoint Routes in Opportunistic Networks (S 99K I → J2 → R) will be added. It may happen that at any given time, all the channels between node I and J1 are occupied by primary users. This will make corresponding routes unavailable for data transmission of secondary user. In this case secondary users can still transmit data between node I and R using other routes present in routing table. In case of node disjoint routes, routes with one of these will be added which may be unavailable. Hence, edge disjoint rule is more advantageous in opportunistic networks. Whenever node j receives a route request to destination d from neighbor i, the following rule is used to ensure loop freedom: if SqN odi > SqN odj SqN odj = SqN odi ; Update the route; else if SqN odi == SqN odj && Costdi < Costdj Insert new route; Here Costdi represent the cost at node i for destination d. Theorem 2.2.5. The route update rule shown above builds loop-free routes.
22
Proof. Let us assume that the route (i1, i2, · · · , in, i1) forms a loop of size n. For this route to be added in routing table the following condition must be true: SqN odi1 ≥ SqN odi2 ≥ · · · SqN odin ≥ SqN odi1 ⇒ SqN odi1 = SqN odi2 = · · · SqN odin = SqN odi1 ⇒ Costdi1 < Costdi2 < · · · Costdin < Costdi1 ⇒ Costdi1 < Costdi1
(2.15)
The condition in equation 2.15 is impossible. Hence, the routes formed are loop free.
2.2.5.3 Routing Table Management & Data Forwarding The proposed protocol finds multiple paths to the destination considering the path cost. Protocol updates the routing table to include a subset of minimum cost paths. The probability of selecting a path is inversely proportional to the cost of that path. The path probabilities are calculated with: 1
P athP robability = XP athCost 1 ∀paths
(2.16)
P athCost
It is been observed that additional routes beyond a few provide only marginal benefit. Thus, we limit our protocol implementation to store 5 routing paths for each destination. The route entry for any specific destination is shown in figure 2.4. For forwarding data to any destination, first the cumulative
Destination Sequence Number Route Cost Path List Nexthop
Channel
Path Cost
Probability
Route Timeout Figure 2.4: Route Entry for any destination probabilities for the paths are calculated. Then a random number is generated between (0, 1). Based on the random number generated and the cumulative probabilities, path is selected for forwarding the data. Probabilistic selection of paths helps in load balancing. 23
2.3 Performance Evaluation In this section, we evaluate the performance of CCMPR by means of simulation performed in NS2. It is evaluated across multiple scenarios and comparative analysis is carried out against Modified CAODV . Primary user activity in the spectrum band is modeled as an alternating sequence of ON and OFF periods, where ON and OFF denote that the spectrum band is occupied and unoccupied by primary users, respectively. As discussed in [37], ON and OFF periods are exponentially distributed with rate α and β, respectively. For transient period elimination and calculating stopping criterion of simulation, the batch mean technique [38] is used. Stopping criterion gives the mean values of the parameters, which remain unchanged even if simulation is run for larger period. The simulation parameters are listed in table 2.2. The spectrum band for simulation is taken as the 2.4 − 2.5 GHz ISM band which is Parameters
Value
Spectrum Band (GHz)
2.4-2.5
Number of Channels
11
Channel bandwidth for same bandwidth scenario (kbps)
100
Channel Bandwidth range for different bandwidth scenario(kbps)
100-900
Mean Channel bandwidth for different bandwidth scenario (kbps)
500
Number of primary users
10
Primary user Transmission Range (m)
125
Primary user ON state exponential distributed with mean
1 0.5
Primary user OFF state exponential distributed with mean
1 0.1
Cognitive user Interference Range (m)
100
Packet Size (Kb)
1024
Active connections
16
Traffic data type
CBR-UDP
Initial Energy of Nodes (J)
1500
Simulation Run Time (s)
1000
Area Size (m X m)
500 X 500
Table 2.2: Simulation Parameters reserved internationally for industrial, scientific and medical purposes other than telecommunications. Total bandwidth of selected ISM band is 100 MHz. Total 11 channels are considered in simulation including the one common control channel. Control channel bandwidth is considered to be 100 kbps to avoid control channel saturation issue. In case of same bandwidth scenario data channel bandwidth is assumed to be 100 kbps. In case of different bandwidth scenario, bandwidth is randomly selected from 1 100 kbps to 900 kbps. Primary user ON and OFF states are exponentially distributed with mean 0.5 and 1 0.1 , respectively. This means that probability of channel being occupied with primary user is 0.1666 and 24
probability of channel being unoccupied with primary user is 0.8333. Simulation run time is calculated with batch mean technique. CCMPR is compared with CAODV algorithm discussed in section 2.1. In CAODV protocol, routing control packets are sent on all the traffic channels. Common control channel presence is assumed for control data transmission among the cognitive users in simulation model. In the presence of common control channel, transmission of control data on all the data channels will waste the bandwidth resource. So, to compare the results of proposed algorithm with the described simulation model, we modified the CAODV protocol by sending the routing packets on control channel. Simulations are performed to evaluate the performance of proposed protocol by varying cognitive user load and by varying the cognitive user speed. In both the cases simulations are performed for same bandwidth channels and for different bandwidth channels. For each scenario, results are shown for Packet Delivery Ratio (PDR), average end-to-end delay, energy consumed per data packet and routing overhead. PDR measures the ratio between the number of packets transmitted by source and the number of packets received by destination. Average end-to-end delay measures the average time a packet takes to traverse from sources to destination. Energy consumed per data packet measures the average energy consumed by network in delivering any successful data packet, this quantity includes the energy consumed in control packets transmitted for route setup. Routing overhead measures the ratio between the number of control packets transmitted for route setup and number of successful data packets received.
2.3.1 Analysis by varying Cognitive User Load Simulation parameters specific for different bandwidth channels are listed in table 2.3. Parameters
Value
Traffic Load (kbps)
[600 to 1500]
Max node speed (m/s)
10
Routing Parameter w1
0.3
Routing Parameter w2
0.1
Routing Parameter w3
0.6
Table 2.3: Simulation Parameters for different bandwidth channels. Figure 2.5 to 2.8 shows the PDR, average end-to-end delay, energy consumed per data packet and routing overhead by varying cognitive user load for different bandwidth channels. It can be observed from figure 2.5 that PDR is decreasing with the increase in cognitive user load for both the algorithms. This decrease in PDR is due to the fact that collision probability increases with the increase in traffic load. For each cognitive user load value, PDR is higher than approximately 20% for CCMPR. Load balancing feature of CCMPR allows to distribute the load between different paths which reduces the probability of link failures. CCMPR also includes remaining node energy in cost function which reduces 25
100 Modified CAODV CCMPR
80
PDR (%)
60
40
20
0 600
700
800
900
1000 1100 1200 Cognitive User Load (kbps)
1300
1400
1500
Figure 2.5: PDR - varying user load - different bandwidth channels
the link failures by avoids node with low energies. This reduction in link failures increases the PDR. Also, CCMPR prefers paths with higher bandwidth which helps in reducing packet drops. For this scenario mean channel bandwidth is considered as 500 kbps. Total of 10 such channels make the total bandwidth of channels as 5000 kbps. As primary user ON state is exponential distributed with mean 1/0.5 and primary user OFF state is exponential distributed with mean 1/0.1, the probability for spectrum band being unoccupied by primary users is equal to 0.167. Thus, the channel bandwidth available for cognitive users is given by approximately 833.34 kbps (5000 ∗ 0.167). The available bandwidth is used for data communication as well as control signaling in all the layers. Here it can be observed that the PDR of approximately 60% is achieved with 600 − 700 kbps cognitive user load in total available bandwidth of approximately 833.34 kbps. Figure 2.6 shows that the average end-to-end delay is also lower with approximately 10 seconds for all the cognitive user loads in comparison to CAODV protocol. CCMPR algorithm prefers paths with higher bandwidth. High bandwidth supports higher bit rates and thus reduces the transmission time. Also, availability to alternative paths in case of link failures eliminates route discovery latency that also contributed to the delay. Figure 2.7 shows that the energy consumed per data packet is also low for CCMPR. The difference in energy consumed per data packet is approximately 0.1J. The reduction in energy consumed per data packet can be justified with power control mechanism of routing. In CCMPR, each packet is sent with the minimum required power based on the history of channel. Also, it selects paths considering transmit power required to transmit data between each hop which also reduces the energy consumed per packet transmission. It can be seen from figure 2.8 that the routing overhead is slightly higher for CCMPR, but this overhead is well paid for other visible improvements of CCMPR. 26
100 Modified CAODV CCMPR
Avg. Delay (s)
80
60
40
20
0 600
700
800
900
1000 1100 1200 Cognitive User Load (kbps)
1300
1400
1500
Figure 2.6: Average end-to-end delay - varying user load - different bandwidth channels 1 Modified CAODV CCMPR
Energy Consumed Per Packet (J)
0.8
0.6
0.4
0.2
0 600
700
800
900
1000 1100 1200 Cognitive User Load (kbps)
1300
1400
1500
Figure 2.7: Energy consumed per packet - varying user load - different bandwidth channels
Figure 2.9 to 2.12 shows the simulation results by varying cognitive user load for same bandwidth channels. Simulation parameters specific for same bandwidth channels are listed in table 2.4. It is observed that the results in same bandwidth case are similar to the different bandwidth case. Figure 2.9 shows that the PDR for CCMPR is higher than modified CAODV with approximate difference of 20%. It is observed from figure 2.10 that in same bandwidth scenario, the average end-to-end delay of CCMPR is lower with approximately 40 seconds for all the cognitive user loads. It can be observed that the average end-to-end delay for both the algorithms are increased in this scenario. Use of lower 27
1 Modified CAODV CCMPR
Overhead (%)
0.8
0.6
0.4
0.2
0 600
700
800
900
1000 1100 1200 Cognitive User Load (kbps)
1300
1400
1500
Figure 2.8: Routing overhead - varying user load - different bandwidth channels
Parameters
Value
Max node speed (m/s)
[0-25]
Cognitive User Load (kbps)
1000
Routing Parameter w1
0.85
Routing Parameter w2
0.15
Routing Parameter w3
0.0
Table 2.4: Simulation Parameters for same bandwidth channels
bandwidth channels in simulation for this scenario is the reason behind this. Figure 2.11 shows that the 28
100 Modified CAODV CCMPR
80
PDR (%)
60
40
20
0 600
700
800
900
1000 1100 1200 Cognitive User Load (kbps)
1300
1400
1500
Figure 2.9: PDR - varying user load - same bandwidth channels
100 Modified CAODV CCMPR
Avg. Delay (s)
80
60
40
20
0 600
700
800
900
1000 1100 1200 Cognitive User Load (kbps)
1300
1400
1500
Figure 2.10: Average end-to-end delay - varying user load - same bandwidth channels
difference in energy consumed per data packet is approximately 0.2J. As all the channels have same bandwidth, value of w3 is 0 in this scenario. This increases the weight-ages given to transmit power level and node energy (i.e. w1 and w2 ) in the routing cost metric. The difference in energy consumed per data packet in this scenario is higher than the difference in different bandwidth scenario. This difference can be justified with the higher weight-ages given to transmit power level in this scenario. Figure 2.12 shows that the routing overhead is same for both the algorithms in same bandwidth scenario. 29
1 Modified CAODV CCMPR
Energy Consumed Per Packet (J)
0.8
0.6
0.4
0.2
0 600
700
800
900
1000 1100 1200 Cognitive User Load (kbps)
1300
1400
1500
Figure 2.11: Energy consumed per packet - varying user load - same bandwidth channels 1 Modified CAODV CCMPR
Overhead (%)
0.8
0.6
0.4
0.2
0 600
700
800
900
1000
1100
1200
1300
1400
1500
Cognitive User Load (kbps)
Figure 2.12: Routing overhead - varying user load - same bandwidth channels
2.3.2 Analysis by varying Cognitive User Speed This subsection presents the performance analysis of CCMPR with modified CAODV by varying speed of cognitive users. Max speed for static cognitive users is considered as zero. Figure 2.13 to 2.16 shows the simulation results by varying speed of cognitive users for different and same bandwidth channels. It can be observed that the PDR decreases slowly with the increase in the speed of the users. It can also be seen that the PDR for CCMPR is still higher than modified CAODV 30
100 Modified CAODV (Different Bandwidth Case) CCMPR (Different Bandwidth Case) Modified CAODV (Same Bandwidth Case) CCMPR (Same Bandwidth Case) 80
PDR (%)
60
40
20
0 0
5
10
15
20
25
Speed (m/s)
Figure 2.13: PDR by varying cognitive user speed
with approximate difference of 20%.
Figure 2.14 shows that the average end-to-end delay is also
100 Modified CAODV (Different Bandwidth Case) CCMPR (Different Bandwidth Case) Modified CAODV (Same Bandwidth Case) CCMPR (Same Bandwidth Case)
Avg. Delay (s)
80
60
40
20
0 0
5
10
15
20
25
Speed (m/s)
Figure 2.14: Average end-to-end delay by varying cognitive user speed reduced by approximately 10s and 40s for all the cognitive user speeds in different and same bandwidth scenarios. Figure 2.15 shows that the energy consumed per data packet is also lower for CCMPR with approximately 0.1J and 0.3J in different and same bandwidth scenarios, respectively. It can be seen 31
1 Modified CAODV (Different Bandwidth Case) CCMPR (Different Bandwidth Case) Modified CAODV (Same Bandwidth Case) CCMPR (Same Bandwidth Case)
Energy Consumed Per Packet (J)
0.8
0.6
0.4
0.2
0 0
5
10
15
20
25
Speed (m/s)
Figure 2.15: Energy consumed per packet by varying cognitive user speed
from figure 2.16 that the routing overhead is slightly higher for CCMPR. Similar to varying cognitive user load case, this overhead is well paid for other visible improvements of CCMPR. It can be seen that 1 Modified CAODV (Different Bandwidth Case) CCMPR (Different Bandwidth Case) Modified CAODV (Same Bandwidth Case) CCMPR (Same Bandwidth Case)
Overhead (%)
0.8
0.6
0.4
0.2
0 0
5
10
15
20
25
Speed (m/s)
Figure 2.16: Routing overhead by varying cognitive user speed the performance of CCMPR is not degraded much with the increase in cognitive user speed and it still perform well in comparison to modified CAODV. 32
2.4 Chapter Summary In this chapter, Cognitive Cross-layer Multipath Probabilistic Routing is proposed. Proposed algorithm uses multi-objective optimization function as a cost function for routing. It is shown that the CCMPR cost metric is convex and gives Pareto optimal solution. It uses spectrum holes, identified by the MAC layer to transmit data between hops. It gives joint solution for channel selection, routing and transmit power control. Transmit power is selected for each hop in the route based on channel history. Extensive performance evaluation is done by simulating multiple scenarios in NS2. The performance evaluation confirmed that CCMPR ensures high packet delivery ratio, low end-to-end delay and low value of energy consumed per data packet in comparison to an existing protocol from literature. Also, this algorithm gives an option to change the priority of the objective functions based on the user or traffic requirements. Thus, CCMPR is a better optimized option for routing in cognitive networks.
33
Chapter 3 Cognitive Cross-layer Multi-channel MAC Protocol
As discussed in chapter 1, a MAC protocol for cognitive networks should support multi-channel operation with dynamic availability of heterogeneous channels. This chapter presents the MAC layer issues in cognitive networks in detail. It also proposes a medium access protocol, named as Cognitive Cross-layer Multi-channel MAC. CCM-MAC is a modification of the MMAC protocol for cognitive networks (MMAC-CR) [39]. Extensive performance evaluation of CCM-MAC is done by simulating multiple scenarios in NS2. The performance evaluation confirms that CCM-MAC ensures high throughput and low value of energy consumed per packet while keeping the average end-to-end delays same. The rest of this chapter is organized as follows. Sections 3.1 and 3.2 present the literature survey for MAC layer issues and strategies related to cognitive networks. In section 3.4 the proposed protocol is discussed. Section 3.5 presents the results for the proposed protocol. Finally, section 3.6 concludes the chapter.
3.1 Cognitive MAC issues In cognitive networks, functionality of cognitive cycle is the main challenge of MAC layer. Cognitive cycle builds the spectrum opportunity map and dynamically schedules resources among cognitive users. Furthermore, cognitive cycle allows cognitive users to vacate the selected channel when a primary user becomes active. Cormio and Chowdhury [35] provide a survey of MAC protocols and general classification in cognitive environment. Below are some of the main issues of MAC layer in cognitive networks. • Channel Assignment: In multi-channel environments, channel assignment is critical in achieving high channel utilization. Ideally, it is best to have the traffic equally divided among channels. Cognitive networks work with heterogeneous spectrum bands. Thus, the change in transmission channel also changes the transmission parameters and the rate of data transmissions in cognitive networks. Also, availability of channels is not certain due to primary user activity. This makes the selection of transmission channel from the spectrum holes identified by the spectrum sensing more challenging. 34
• Control information sharing: Control signaling is necessary for every communication protocol. It is much more important in cognitive environment to support transmission coordination and spectrum related information exchange between the cognitive users. It helps in neighbor discovery, spectrum sensing coordination, exchange of local measurements and other control signaling needed between the cognitive users. It can be done in following manner: – Common Control Channel (CCC): Portion of spectrum band is allocated for control signaling. CCC can be allocated as in-band CCC or out-of-band CCC depending on whether it shares the data channel or uses a dedicated spectrum, respectively. – Time Slot Based: Portion of time slot in all the channels are used for control signaling. – Frequency Hopping Sequence: Sequence of frequencies is used for control signaling. Cognitive users hop between these bands for control signaling. • Channel Synchronization: Single channel protocols cannot be directly applied to multi-channel environment because the sender and the receiver have to be operating on the same channel. Here the focus is on the situation where each node is equipped with a single interface, so a node can only listen to one channel at a time. When two nodes are operating on the same channel, we say that their channels are synchronized. Thus, before the actual data transmission, both the transmitter and receiver should synchronize their respective radios to the same channel. The process of node moving from one channel to another is called channel switching. In cognitive networks, channel switching is more frequent as cognitive users must vacate the channel whenever primary user comes back. This requirement make channel synchronization as one of the important feature of cognitive MAC protocol. • Medium access control: When a node transmits a packet onto the channel, the signal reaches all nodes in the transmission range of the sender. If a node receives multiple packets on the same channel at the same time, it cannot properly decode the packet because of interference. Thus, medium access control among the nodes is needed to avoid collision similar to simple wireless MAC strategies. • Multi-channel Hidden Node Problem: In a multi-channel environment with single half-duplex transceiver, a node can only hear RTS and CTS transmitted on the tuned channel. In such case, a node is not able to hear other channel RTS and CTS, which leads to multi-channel hidden node problem. A scenario for the multi-channel hidden node problem is shown in figure 3.1. In the shown scenario node A has a packet for B, so A sends an RTS on Channel 1. B selects Channel 2 for data communication and sends a CTS. After the successful handshake node A and B start data communication. However, during the RTS-CTS handshake of node A and B, node C was busy receiving on another channel, so it did not hear the CTS. Node C might initiate a communication with D on Channel 2 for data communication which will result in collision at node B. 35
A
B
C
D Time
RTS
CTS
RTS DATA
CTS
Channel1 Channel2
collision ACK
DATA
Channel3
Figure 3.1: Scenario showing multi-channel hidden node problem • Channels Scheduling: When a node has packets queued for multiple destination nodes with different channels, channels scheduling is needed to schedule the packets on the radio interface based on the operating channel. Some basic approaches for channels scheduling are: – Fixed channel scheduling: The simplest method is to schedule channels with fixed period in a round robin manner. This scheme is not suitable where load is different among channels. – First-in first-out (FIFO): A node switches the channel based on the first packet in the queue. If we schedule packets using FIFO algorithm, in worst case, channel switching could be needed for every single packet which will lead to higher transmission delays. – Threshold based approach: To minimize the channel switching delay, this method tolerates a packet delay up to a certain bound. A node can stay on a particular channel, until a packet to be sent on a different channel has waited more than the threshold. Then it switches the channel.
3.2 Existing Protocols This section presents some of the cognitive MAC protocols from literature: • Dynamic Open Spectrum Sharing (DOSS) [40]: DOSS uses a busy tone broadcasting based approach for collision avoidance. Whenever a node transmits or receives data on a channel, it also emits a busy tone signal in the corresponding busy tone band. Spectrum sensing support is provided. Packet flow sequence is “REQ → REQ-ACK → DATA → ACK”. REQ & REQ-ACK 36
messages also negotiate about the channel to be used. Whenever a node wants to transmit or receive data on a channel, it senses the corresponding busy tone channel, this ensures that the transmission of the other cognitive users are not mistaken with the primary user activity. The drawback of DOSS is that it requires multiple radio transceivers, and separate frequency bands for the busy tone channel and control channel. • C-MAC [41] : In C-MAC, all the channels have super-frames containing a beacon period and a data transfer period with the assumption that beacon period is non-overlapping for all the channels. Data transfer period is accessed in TDMA manner by all the users. C-MAC also uses rendezvous channel for control signaling. In this protocol, spectrum switching is not instantaneous which may cause primary user interference. Also, the selection method of non-overlapping beacon periods is not presented in paper. • HC-MAC [42]: In HC-MAC, each time slot is divided in three parts: contention, sensing and transmission. In contention period, C-CTS, C-RTS are used to reserve a slot for the sensing. In the sensing period, cognitive sender and receiver both sense channels and communicate to get a common free channel, followed by data transfer. In this protocol C-RTS message cannot be received by a node already busy in some communication, and can lead to multi-channel hidden node problem. • MMAC-CR: MMAC-CR is an improvement of MMAC [43], hence it includes multi-channel operation. Time frame is divided into an ATIM window and a data transfer window. The ATIM window is used to negotiate the channel between transmitter and receiver, it also solves the issue of channel synchronization. It uses the IEEE 802.11 Timing Synchronization Function (TSF) for time synchronization. Packet flow sequence is “Beacon → Scan Result Packet (SRP) → ATIM → ATIM-ACK → ATIM-RES” on control channel and “RTS → CTS → DATA → ACK” on data channels. In MMAC-CR, the transmitter insert a list of its spectral opportunities and queue status in the ATIM frame. The receiver compares this list with its own list and selects the common opportunity for data communication. The selected channel is then inserted in the ATIM-ACK frame. To inform the neighbors of the transmitter that were not able to hear the ATIM-ACK frame, the transmitter sends an ATIM-RES frame, which includes the selected data channel. Nodes that did not send or receive ATIM frame; enter a sleep state for the beacon interval to save energy. This protocol does not provide a silent period for spectrum sensing. The silent period for spectrum sensing insures that the cognitive user’s data is not mistaken as primary user’s data. Also, this protocol suffers from spectrum wastage due to the insertion of the complete list of spectral opportunities and queue status in the ATIM frame. • Cognitive Radio-EnAbled Multi-Channel MAC (CREAM-MAC) [44]: The CREAM-MAC protocol maintains a Channel Usage List (CUL) and a Free Channel List (FCL). For medium access, it uses “RTS → CTS → RES → Data” sequence flow. RTS, CTS and RES are done on the control 37
channel. RTS carries the FCL and based on FCL, the receiver selects a channel to be used which is then reserved by a RES message. It uses single transceiver that alternates between monitoring the CCC and the data spectrum bands. It does not provide support for spectrum sensing and channel synchronization. • Cognitive-Radio-based Carrier Sense Medium Access with Collision Avoidance (CR-CSMA/CA) [45]: In CR-CSMA/CA, Prepare-To-Send (PTS) frame is sent before the RTC-CTS mechanism of CSMA/CA for spectrum sensing support. Once other cognitive uses receive PTS frame, they keep quiet for the following duration so that cognitive user signal is not mistaken as a primary user signal. This protocol also does not give any information about channel synchronization. • Channel Aggregation Diversity (CAD) [46]: In CAD MAC, cognitive users select a group of channels from the available channels based on sensing results, and select an upper bounded power level for the selected channels. Then, channel aggregation technology is used to simultaneously use the selected channels for data transmission. CAD MAC assumes that all cognitive nodes are synchronized and have the same time slot division as of primary users. This assumption is not practical for more than one kind of primary users. Summary of these protocols with respect to the issues discussed above is presented in table 3.1. Busy Protocol
Spectrum
Medium Access
Access Method
Interface
Multi-
Channel
Spectrum
Channel
Require-
channel
Synchro-
Sensing
Schedul-
ment
Hidden
nization
Support
ing
Node DOSS
Busy
Tone
REQ-REQACK-
Multiple
Yes
Yes
Yes
No
Broadcasting
DATA-ACK
C-MAC
TDMA Based
TDMA Based
Single
Yes
Yes
No
No
HC-MAC
Contention
RTS-CTS
Single
No
Yes
Yes
No
Single
Yes
Yes
Partial
No
Based MMAC-
Contention
ATIM
Window
CR
Based
with RTS-CST
CREAM-
Contention
RTS-CTS
Single
No
Yes
No
No
MAC
Based
CR-
Contention
RTS-CTS
Single
No
Yes
Yes
No
CSMA/CA
Based
CAD
Channel Aggre-
RTS-CTS-RES
Single
No
Yes
Yes
No
MAC
gation Based
Table 3.1: MAC Layer Strategies
38
tone broadcasting based protocols require multiple radio transceivers and separate frequency bands for busy tone channel and control channel. To avoid interference to primary user in TDMA based protocols (like C-MAC), all secondary users should be synchronized and follow the same time-slot division as of the primary user. Thus, for more than one primary user network, TDMA based approach cannot be used. Most of the contention based protocols do not provide a solution to multi-channel hidden node problem. A cognitive MAC protocol which solves all the challenges of cognitive networks is still needed. As discussed in [47], selection of channel at MAC layer will not always give an efficient end-to-end solution. Hence, it is suggested to select channel at upper layers in cognitive networks.
3.3 Background Details This section discusses the basic assumptions and details about IEEE 802.11 Power Saving Mode (PSM), MMAC [43] and MMAC-CR [39] protocol.
3.3.1 Assumptions • Total M+1 channels are available to be used by secondary users. • One channel is used as CCC. Similar to MMAC & MMAC-CRs, only one handshake on the CCC is needed per connection during the beacon interval. Thus, this protocol doesn’t suffer with control channel starvation. • Channels are non-overlapping, i.e. communication on all the available channels can be done simultaneously. • Secondary users are capable of dynamically switching their channel. • Each host is equipped with a single half-duplex transceiver. • Nodes are synchronized, so that all nodes begin their beacon interval at the same time. We use IEEE 802.11 TSF in our simulations.
3.3.2 IEEE 802.11 PSM IEEE 802.11 is a widely deployed wireless network standard. It specifies two MAC protocols, called Point Coordination Function (PCF) and Distributed Coordination Function (DCF). PCF only works for infrastructure networks, whereas DCF does not require an infrastructure. DCF is based on a scheme called Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA). A node can save energy by going into sleep mode. In sleep mode, a node consumes significantly less energy compared to idle mode, but cannot send or receive packets. It is desirable for a node to enter the sleep mode only when there is no need for exchanging data. In IEEE 802.11 PSM, time is divided into beacon intervals. Every 39
node in the network is synchronized by periodic beacon transmissions. Each beacon interval starts with an ATIM window. Each node in the network stays awake in the ATIM window. If node S has buffered packets for node R, it sends an ATIM frame to node R in the ATIM window. When node R receives an ATIM packet, it replies back to node S with ATIM-ACK. Both S and R will then stay awake for that entire beacon interval. If any node has not sent or received any ATIM packets during the ATIM window, it enters sleep mode until the next beacon time to save power.
3.3.3 MMAC & MMAC-CR In MMAC protocol, transmitter also includes its Preferable Channel List (PCL) in the ATIM frame. After receiving the ATIM frame, receiver selects one channel based on the transmitter’s as well as its own PCL. The ATIM-ACK frame notifies the channel to be used in the vicinity of receiver. Similarly, the ATIM-RES (ATIM-Reservation) frame notifies the channel to be used in the vicinity of transmitter. Nodes that have reserved a channel in the ATIM window, communicate with RTS-CTS mechanism in the data window. The sequence of ATIM hanshake of these protocols are shown in figure 3.2. In this
R
ATIM−RES
ATIM
S
ATIM−ACK
A
B
Figure 3.2: ATIM handshake in MMAC and MMAC-CR protocols figure, node S is a transmitter and node R is a receiver. The solid lines show the communication of ATIM frame, ATIM-ACK frame and ATIM-RES frame between the transmitter and the receiver. The dashes lines show the notification of channel to be used in the vicinity of the transmitter and the receiver. MMAC-CR is discussed in section 3.2. It uses a three way handshake of MMAC protocol to reserve a channel for data communication. In MMAC-CR, the transmitter insert a list of its spectral opportunities and queue status in the ATIM frame. This protocol does not provide a silent period for spectrum sensing. The silent period for spectrum sensing insures that the cognitive user’s data is not mistaken as primary user’s data. Also, this protocol suffers from spectrum wastage due to the insertion of the complete list of spectral opportunities and queue status in the ATIM frame.
3.4 Proposed MAC Protocol This section discusses the proposed MAC protocol, CCM-MAC. This protocol is based on the concept of IEEE 802.11 PSM. The proposed protocol minimizes the overhead by supporting channel as40
signment at routing layer. This way it reduces the size of an ATIM frame. It also reduces the three way handshake of MMAC-CR to two way handshake as ATIM-RES frame transmission is not necessary when channel assignment is done at routing layer. CCM-MAC protocol also provide full spectrum sensing support by providing silent period for spectrum sensing. Subsections below describe the features of the proposed protocol in details.
3.4.1 Channel Assignment Channel selection in an optimized MAC protocol may provide best channel, power and rate assignment for a particular link; but such an assignment can be inefficient for the end-to-end path. Hence, selection of channel is done at routing layer, as discussed in chapter 2. The channel selection rule for a cross layer protocol is shown in equation 3.1. Node j selects channel m from the spectrum opportunities which minimizes the cost function C 0 , and tunes its receiver radio to the selected channel. ( C0 =
1 m w1 fnorm Pavg + w2 fnorm Bm
) (3.1)
m is the average of transmit power required by neighbors to transmit packet to node j and where Pavg Bm is bandwidth of channel m. Here w1 , w2 are the coefficients which decide the weights for each component in the cost function. As all these parameters are in different scales, we use normalization function fnorm (x) to scale them to range [xmin − xmax ] as shown in equation 3.2.
fnorm (x) =
x − xmin xmax − xmin
(3.2)
fnorm (x) will have values between zero and one. From equation 3.1, it is clear that each node selects a channel which minimizes average transmit power from neighbors and has better channel bandwidth.
3.4.2 Medium access control In CCM-MAC, ATIM and ATIM-ACK messages are used to reserve channel for medium access and collision avoidance. ATIM and ATIM-ACK message transmissions are done on control channel. ATIM message contains the value of selected channel for transmission. Receiving node confirms the reservation of same channel in ATIM-ACK message. Nodes that do not exchange ATIM messages go to sleep mode for the beacon interval to save power. After the ATIM window, data transmissions follow the RTS-CTS mechanism of IEEE 802.11 to avoid collisions in data window. The sequence of message transmission for channel reservation and data transmission is shown in figure 3.3. The complete list of spectrum opportunities and queue status are not transmitted in ATIM message (as done in MMAC-CR protocol), which decreases the overhead of transmission. Also, ATIM-RES message is not required, as the ATIM message notifies the transmission channel in the vicinity of sender. 41
SS
B
ACK
DATA
CTS
Beacon RTS
ATIM
Beacon
ATIM−ACK(1)
A
ATIM
D
ATIM−ACK(2)
C
ATIM Window Control Channel
Beacon Interval Data Channels
Time
Figure 3.3: CCM-MAC channel reservation and data transmission process
3.4.3 Spectrum sensing support Unlike MMAC & MMAC-CR, the proposed CAM-MAC protocol provides spectrum sensing support by reserving a slot for fast spectrum sensing (SS) in every ATIM window. In SS period, cognitive users will not transmit or receive any messages. Hence, primary user data will not be mistaken as cognitive user data in spectrum sensing. The nodes randomly select one of the channels to perform a fast scan. Based on the result of fast scan Spectral Image of Primary users (SIP) vector is updated. SIP vector has three kinds of entries: 1. Channel c is free from primary user activity (SIP [c] = 0). 2. Channel c is occupied with primary user activity (SIP [c] = 1). 3. The spectral image of channel c is uncertain (SIP [c] = 2). Spectrum sensing periods of ATIM window also include the C mini-slots which are used to broadcast results of spectrum sensing. This mini-slot process of learning network-wide spectrum opportunities is also used in [48] and [49]. If primary user activity on channel c is uncertain, then a fine scan is performed during the data window by nodes that do not have any data transmission scheduled for the beacon interval.
3.4.4 Other details In CCM-MAC, the ATIM window handshake provides a solution to channel synchronization and multi-channel hidden node problem. Common control channel is used for control information sharing. 42
As only one handshake on CCC is needed per connection during the beacon interval, control channel starvation problem does not arise. Channel scheduling follows the threshold based approach to minimize the channel switching delay. Once buffered packet count for any channel reaches the specified threshold, packets with that channel are transmitted first.
3.5 Performance Evaluation In this section, we evaluate the performance of CCM-MAC by means of simulation performed in NS2. It is evaluated across multiple scenarios and a comparative analysis is done against MMAC-CR protocol. Primary user activity on the spectrum band is modeled as an alternating sequence of ON and OFF periods, where ON and OFF denote that the spectrum band is occupied and unoccupied by primary users, respectively. ON and OFF periods are exponentially distributed with rate α and β, respectively. For transient period elimination and calculating stopping criterion of simulation, batch mean technique is used. Stopping criterion gives the mean values of the parameters, which remain unchanged even if simulation is run for larger period. The simulation parameters are listed in table 3.2. Parameters
Value
Spectrum band (GHz)
2.4-2.5
Number of channels
11
Number of primary users
10
Primary user transmission range (m)
300
α
0.5
β
0.5
Secondary user interference range (m)
100
Packet size (kb)
1024
Traffic data type
CBR-UDP
Initial energy of nodes (J)
1500
Simulation run time (s)
1000
Area size (m X m)
500 X 500
Beacon Interval (TBI )
100 ms
CWmin
15 Table 3.2: Simulation Parameters
43
Figure 3.4 to 3.6 show performance of CCM-MAC and MMAC-CR with respect to the throughput, average delay, and energy consumed per packet by varying traffic load. It is observed from figure 3.4 700 CCMMAC MMAC-CR 600
Throughput (kbps)
500
400
300
200
100
0 400
600
800
1000 Traffic load (kbps)
1200
1400
1600
Figure 3.4: Throughput by varying traffic load that the throughput achieved in CCM-MAC is higher by at least 24%. This improvement is obvious because complete PCL/SRP is not transmitted in CCM-MAC. ATIM-RES message is also not needed in CCM-MAC. Figure 3.5 shows that the average delay is almost the same for both the algorithms in all the user load values. This implies that the increase in throughput is not deteriorating the delay performance. 50 CCMMAC MMAC-CR
Average Delay (s)
40
30
20
10
0 400
600
800
1000 Traffic load (kbps)
1200
1400
Figure 3.5: Average delay by varying traffic load
44
1600
Figure 3.6 shows that the energy consumed per packet is also low for CCM-MAC. The difference in energy consumed per packet is approximately 0.03J. Energy consumption is reduced because CCMMAC selects a channel which minimizes transmit power.
0.1 CCMMAC MMAC-CR
Energy Consumed Per Pkt (J)
0.08
0.06
0.04
0.02
0 400
600
800
1000 Traffic load (kbps)
1200
1400
1600
Figure 3.6: Energy consumed per packet by varying traffic load
The study of energy and time consumption done in idle, sleep, transmit and receive state in different kind of nodes (transmitter, receiver and idle nodes) is shown in figure 3.7. It is clear from figure 3.7 that the idle nodes save energy by entering sleep state for most of the time. The main contributor to energy consumption is the receive state. This is because nodes also receive packets that are not destined for them. This energy consumption can be reduced by increasing the number of channels. Figure 3.8 shows throughput achieved by users with respect to the ATIM window size. For analyzing the effect of ATIM window size, the number of users is considered as 50. It is clear from figure 3.8 that for every ATIM window size throughput of CCM-MAC is better than MMAC-CR protocol. It can be noted that if the size of ATIM window is too small then the number of successful ATIM handshakes will be less than the number of channels available for cognitive users. In such situations, throughput of system will be reduced. But if ATIM window size increases more than a certain value then spectrum bandwidth is wasted due to the long ATIM window size. Thus, very large ATIM window size also limits the throughput performance. It can be observed that the size of ATIM window affects the performance of protocol and should be selected carefully. Figures 3.8 also shows that the required value of ATIM window size increases with the increase in number of channels. As seen in figure 3.8, the required size of ATIM window is 5 ms for 10 channels and 10 ms for 20 channels. 45
6%
6%
15%
15% 60%
22%
73% 3%
(a) Rcvr Energies
(b) Rcvr Time
6%
40%
15%
11%
60%
15%
10%
43%
(c) TX Energies
(d) TX Time
45%
8%
2% 1%
89% 14% 35% 6%
(e) Idle Energies
Idle
(f) Idle Time
Sleep
Tranmission
Reception
Figure 3.7: Distribution of energies and time consumed by receiver, transmitter and idle node
46
1000 CCMMAC with M = 10 CCMMAC with M = 20 MMAC-CR with M = 10 MMAC-CR with M = 20
Throughput (kbps)
800
600
400
200
0 0
5
10
15 ATIM Window Size (ms)
20
25
30
Figure 3.8: Throughput by varying ATIM window size
3.6 Chapter Summary This chapter proposes a MAC layer protocol, CCM-MAC, for multi-channel cognitive networks. This protocol can be used in any cognitive network. Extensive performance evaluation of CCM-MAC is done by simulating multiple scenarios in NS2. As shown in the performance analysis, ATIM window size should be selected based on number of channels available to get better results. The performance evaluation confirms that as compared to MMAC-CR, CCM-MAC ensures high throughput and low value of energy consumed per packet while keeping the average delays performance unchanged.
47
Chapter 4 Performance analysis of Cognitive MAC Protocols with Markov Modeling
4.1 Introduction This chapter develops a Markov model for performance analysis of IEEE 802.11 PSM based cognitive MAC protocols under ideal channel and saturation conditions. This is the first analytic work done for such protocols in multi-channel cognitive environment. The analysis is used to calculate channel capacity, MAC layer throughput and average MAC layer delays. This analysis is helpful in understanding the performance of these MAC protocols in different scenarios. It can also be used to select the design parameters for the protocols based on different user and/or network characteristics. This analysis can be used to improve the protocol designed in chapter 3. The rest of this chapter is organized as follows. Section 4.2 presents the literature survey for performance analysis of MAC protocols. In section 4.3 the markov model for the performance analysis is developed. Section 4.4 presents the results for channel capacity, MAC layer throughput and average MAC layer delays. Finally, section 4.5 concludes the chapter.
4.2 Literature Survey First, Bianchi [18] developed an analytic model to compute throughput for the IEEE 802.11 DCF based MAC protocol with the assumption of a finite number of terminals and ideal channel conditions in 2000. Later in 2002, Chatzimisios et al [50] carried out analysis of MAC layer delay observed in IEEE 802.11 DCF. In [51], analytic modeling is provided for IEEE 802.11 DCF based MAC protocols for cognitive radio networks with single spectrum band. This analysis provides results for throughput obtained by secondary users in CRNs. As IEEE 802.11 DCF based MAC protocol does not address the issues related to cognitive networks, this analysis may not be helpful in the design of cognitive MAC protocol. In 2013, Chen et al [52] presented an analysis of CR-CSMA/CA protocol. This protocol does not provide a solution for the multi-channel hidden terminal problem. Pravati et al [53] presented the analytic model to compute the throughput, average delay and power consumption of IEEE 802.11 IBSS 48
in PSM under ideal channel and saturation conditions. This work only presented the analysis for single channel case and does not considered the cognitive environment.
4.3 Performance Analysis using Markov Model As discussed in previous section, Bianchi presented an analytic model for the IEEE 802.11 DCF based MAC protocol. Bianchi’s model cannot be directly applied to the power saving mode (PSM) of IEEE 802.11. Pravati et al [53] presented the analytic model for power saving mode of IEEE 802.11. This model does not consider multi-channel environment. Also, Pravati’s model is not developed for cognitive MAC protocols and hence does not include probabilities related to cognitive environment, like spectrum unavailability. Analytic model for performance analysis of IEEE 802.11 PSM based cognitive multi-channel MAC protocols in not available in existing literature. This section proposes the analytic model for performance analysis of saturation throughput and MAC layer delay with the assumption of ideal channel conditions for IEEE 802.11 PSM based cognitive multi-channel MAC protocols.
4.3.1 System Model The assumption of a fixed number of cognitive users, each having packets available in MAC buffer, and fixed ATIM window size is considered for the analysis. Single ATIM handshake is allowed for any transmitting cognitive user in an ATIM window. After successful ATIM handshake, a cognitive user can transmit multiple data packets in that beacon interval. All the spectrum bands are assumed to have same bandwidth. The activity of primary users on the spectrum band is modeled as an alternating sequence of ON and OFF periods. ON and OFF denote that the spectrum band is occupied and unoccupied by primary users, respectively. As shown in figure 4.1, ON and OFF periods are exponentially distributed with rate α and β. α
OFF
ON
β
Figure 4.1: Activity model of primary users on spectrum band
49
The posterior probabilities for spectrum band being occupied and unoccupied by primary users are calculated using steady state analysis of continuous time markov chains [54]. β α+β α P (OF F ) = α+β P (ON ) =
(4.1) (4.2)
Probability that transition from OFF state to ON state is seen by transmitted packet of the tagged secondary user, pinf , is calculated as: pinf = P (XOF F < σ) = 1 − e−β∗σ where σ represents the duration of one time-slot.
4.3.2 Markov Model Let s(t) be the stochastic process representing the backoff stage at slot time t, c(t) be the stochastic process representing the backoff time counter at slot time t and l(t) be the stochastic process representing the backoff layer for a given station at slot time t. The backoff stage, s(t), represents the retry limit to transmit an ATIM or data packet within a single beacon interval. The backoff layer, l(t), represents the number of beacon intervals used to successfully transmit an ATIM packet. IEEE 802.11 wireless LAN MAC & PHY specification [55] does not specify any limit on the number of re-transmission of ATIM packet for inter or intra beacon interval. This work assumes the re-transmission limit as 3 for both inter and intra beacon interval as specified by Jung et al [56]. The ATIM window and data window are modeled as a three state and two state discrete time markov model as shown in figure 4.2 and 4.3, respectively. As only one data window is used for data transfer related to each successful ATIM packet transmission, l(t) is not needed to model data window. If OFF period is observed in spectrum sensing slot, then the channel is considered as available for data transmission. In figure 4.2 and 4.3, pa and pd represent the collision probabilities in ATIM window and data window. These probabilities are fixed for specified network size. qa and qd represent the probabilities that ATIM window or data window ends when secondary user is transmitting its packet. Wi represents the size of contention window at the ith backoff stage. Wi = 2i W0 , where W0 represents the minimum contention window size given by W0 = CWmin + 1. In data transmission modeling, (m + 1) represents the Station Short Retry Count (SSRC). According to IEEE 802.11 wireless LAN MAC & PHY specification value of SSRC is considered as 7. If current OFF period finishes during the transmission of data packet with probability pinf , then transmission is considered to be unsuccessful because of primary user activity. In the presented 50
ATIM Window
p’ a
0, 0 ,2 p’’ a
(1 − q a )
1, 0 ,2 p’’ a
(1 − q a )
qa p’ a
(1 − q a )
0, W0 −2 ,2
qa
qa p’ a
(1 − q a ) 0, 1 ,2
1, 1 ,2
qa (1 − q a )
(1 − q a )
1, W1 −2 ,2
(1 − q a )
qa
2, 1 ,2
(1 − q a )
(1 − q a )
2, W2 −2 ,2
qa
0, W0 −1 ,2 qa
(1 − q a )
1, W1 −1 ,2 qa
qa
qa
2, 0 ,2
(1 − q a )
(1 − q a )
2, W2 −1 ,2 qa
qa
p’’ a
p’ a
(1 − q a )
0, 0 , 1 qa
p’ a
0, 1 , 1
(1 − q a )
(1 − q a )
0, W0 −2 , 1
qa
(1 − q a )
0, 0 , 0
0, 1 , 0
qa
(1 − q a )
(1 − q a )
0, W0 −2 , 0
qa
qa
(1 − q a )
0, W0 −1 , 1 qa
(1 − q a )
qa
0, W0 −1 , 0 qa
p’’ a
p’ a
(1 − q a )
2, 0 , 0 qa
p’’ a
2, 1 , 0
(1 − q a )
(1 − q a )
2, W2 −2 , 0
qa
(1 − q a )
2, W2 −1 , 0 qa
qa
p’ = (1 − q a ) (1 − p a ) a p’’ = (1 − q a ) p a a
Figure 4.2: Markov Model for ATIM Window model, p0a , p00a , p0d and p00d are given by: p0a = (1 − qa )(1 − pa ) p00a = pa (1 − qa ) p0d = (1 − qd )(1 − pd )(1 − pinf ) p00d = (1 − qd ){pinf + pd − pd pinf } (4.3) The following notations are used in presenting the Markov model: P {(i1 , j1 , k1 )0 |(i0 , j0 , k0 )0 } = P {s(t + 1) = i1 , c(t + 1) = j1 , l(t + 1) = k1 |s(t) = i0 , c(t) = j0 , l(t) = k0 } P {(i1 , j1 )00 |(i0 , j0 )00 } = P {s(t + 1) = i1 , c(t + 1) = j1 |s(t) = i0 , c(t) = j0 } 51
(4.4)
Data Window
To Data Window
p’ d 0, 0
(1 − q ) d
q d p’ d 1, 0
(1 − q ) d
0, 1
(1 − q ) d
q d (1 − q ) d p’’ d
q d
d
) 0, W0 −1
q d (1 − q ) d
1, 1
(1 − q 0, W0 −2
(1 − q
d
)
q d
q d (1 − q
1, W1 −2
d
) 1, W1 −1
q d
q d
p’’ d
p’ d m, 0 q d
(1 − q ) d p’’ d
(1 − q ) d
m, 1 q d
(1 − q ) d
(1 − q m, W −2 m
d
)
q d
m, W −1 m q d
p’ = (1 − q )(1 − p )(1 − p inf ) d d d p’’ =(1 − q ){ p d d
inf
+p −p d d
pinf }
Figure 4.3: Markov Model for DATA Window
The non zero one-step transition probabilities of the Markov chain in figures 4.2 and 4.3 and their inferences are listed below: • P {(i, j, k)0 |(i, j + 1, k)0 } = (1 − qa ), for i ∈ [0, 2], j ∈ [0, w0 − 1], k ∈ [0, 2] This equation indicates that the ATIM frame backoff counter decrements with probability (1−qa ) within the ATIM window. • P {(0, j, k − 1)0 |(i, j0 , k)0 } = wqa0 , for i ∈ [0, 2], j ∈ [0, w0 − 1], k ∈ [1, 2], j0 ∈ [0, wi − 1] This equation indicates that at any backoff stage and for any backoff counter value if the ATIM window ends, the protocol tries to re-transmit the ATIM frame with backoff stage 0 in the next ATIM window. • P {(0, j, 2)0 |(i, j0 , 0)0 } = wqa0 , for i ∈ [0, 2], j ∈ [0, w0 − 1], j0 ∈ [0, wi − 1] This equation indicates the third unsuccessful transmission of an ATIM frame in one ATIM window. This means that the data cannot be sent in this beacon interval. • P {(0, j, 2)0 |(i, 0, k)0 } = (1 − pa )(1 − qa ), for i ∈ [0, 2], j ∈ [0, w0 − 1], k ∈ [0, 2] This equation indicates a successful transmission of an ATIM frame. • P {(0, j, 2)0 |(2, 0, 0)0 } = w10 , for j ∈ [0, w0 − 1] This equation indicates that at either an ATIM frame is transmitted successfully in the third beacon interval or the ATIM frame is discarded due to maximum trials reached. 52
a) • P {(0, j, k − 1)0 |(2, 0, k)0 } = pa (1−q , for j ∈ [0, w0 − 1], k ∈ [1, 2] w0 This equation indicates that there is a collision at the last try within an ATIM window. a) • P {(i + 1, j, k)0 |(i, 0, k)0 } = pa (1−q , for i ∈ [0, 1], j ∈ [0, wi+1 − 1], k ∈ [0, 2] wi This equation indicates that after an unsuccessful transmission of an ATIM frame, the node increases the backoff stage for transmission of same ATIM frame and selects the backoff time counter uniformly.
• P {(i, j)00 |(i, j + 1)00 } = 1 − qd , for i ∈ [0, m], j ∈ [0, wi − 1] This equation indicates that within the data window, the data frame backoff counter decrements with probability (1 − qd ). • P {(0, j)00 |(i, j0 )00 } = wqd0 , for i ∈ [0, m], j ∈ [0, w0 − 1], j0 ∈ [1, wi − 1] This equation indicates that at any backoff stage and for any backoff counter value if the data window ends, the protocol drops the data frame. p0
• P {(0, j)00 |(i, 0)00 } = wd0 , for i ∈ [0, m], j ∈ [0, w0 − 1] This equation indicates the successful transmission of a data frame. p00
• P {(i + 1, j)00 |(i, 0)00 } = wdi , for i ∈ [0, m − 1], j ∈ [0, wi − 1] This equation indicates that the station increases the backoff stage and chooses the backoff counter uniformly after an unsuccessful transmission of a data frame within the data window. q +p00
• P {(0, j)00 |(m, 0)00 } = dw0 d , for j ∈ [0, w0 − 1] This equation indicates the unsuccessful transmission of a data frame at the last backoff stage.
4.3.3 Model Analysis Let b0i,j,k = limt→∞ P {s(t) = i, c(t) = j, l(t) = k} and b00i,j = limt→∞ P {s(t) = i, c(t) = j} represents the steady state distribution of Markov models for ATIM window and data window, respectively. The steady state equations follow the rules given in equation 4.5 and 4.6. b0i,j,k
p00 = a ∗ wi
wi −(j+1)
X l=0
b0i,0,k = (p00a )i ∗
i Y
(1 − qa )l ∗ b0i−1,0,k for i ∈ [1, 2] & j ∈ [0, wi − 1] & k ∈ [0, 2] l=0
n=1
b00i,j
p00 = d ∗ wi
wi −(j+1)
X l=0
b00i,0 = (p00d )i ∗
(1 − qa )l ∗ b00,0,k for i ∈ [1, 2] & j ∈ [0, wi − 1] wn
P(wn −1)
i Y n=1
(4.5)
(1 − qd )l ∗ b00i−1,0 for i ∈ [1, m] & j ∈ [0, wi − 1] P(wn −1) l=0
(1 − qd ∗ b000,0 for i ∈ [1, m] & j ∈ [0, wi − 1] wn )l
53
(4.6)
Based on the above rules, steady state equation for all the states shown in Markov model are given by equations 4.7 and 4.8.
b0i,j,k
b00i,j
i h P P2 P2 2 1 00 0 0 0 0 + p ∗ b p b + q ∗ b a a a 2,0,0 for i = 0, j = w0 − 1, k = 2 i=0 i,0,0 i=0 k=0 i,0,k w0 Pw0 −(j+1) b00,w0 −1,2 ∗ l=0 (1 − qa )l for i = 0, j ∈ [0, w0 − 2], k = 2 h i P2 Pwi −1 0 1 00 0 = + q b p b a a 2,0,k+1 i,j,k+1 for i = 0, j = w0 − 1, k ∈ [0, 1] i=0 j=0 w0 P wi −(j+1) b00,w0 −1,k ∗ l=0 (1 − qa )l for i = 0, j ∈ [0, w0 − 2], k ∈ [0, 1] Pwi −(j+1) p00 (1 − qa )l ∗ b0i−1,0,k for i ∈ [1, 2], j ∈ [0, wi − 1], k ∈ [0, 2] wai ∗ l=0
i h P P Pm−1 00 m wi −1 00 1 00 0 ∗ + p b + (1 − q )b for i = 0, j = w0 − 1 q b d d m,0 i,0 i,j i=0 j=0 i=0 d w 0 P = b000,w −1 ∗ wi −(j+1) (1 − qd )l for i = 0, j ∈ [0, w0 − 2] l=0 0 00 P p l 00 i −1 wdi ∗ w l=0 (1 − qd ) ∗ bi−1,0 for i ∈ [1, m], j ∈ [0, wi − 1]
(4.7)
(4.8)
As sum of all the state probabilities should be one, normalization equation for the model is shown in equation 4.9. 2 2 wX i −1 X X
b0i,j,k = 1
i=0 j=0 k=0 m wX i −1 X
b00i,j = 1
(4.9)
i=0 j=0
Let τa is the probability that a station transmits ATIM packet in randomly chosen slot. As transmission of ATIM packet occurs when backoff time counter is zero, τa is given by equation 4.10. τa =
2 2 X X
b0i,0,k
(4.10)
i=0 k=0
However, τa depends on the conditional collision probability in ATIM window. The relation between τa and pa is given by: pa = 1 − (1 − τa )N −1
(4.11)
where N is the number of cognitive users. Values of τa and pa can be calculated by solving equations 4.7 - 4.11. Similarly probability that a station transmits data packet in randomly chosen slot, τd , is given by: τd =
m X i=0
54
b00i,0
(4.12)
The relation between τd and pd is given by: pd = 1 − (1 − τd )N ∗pas −1
(4.13)
where pas is the probability of successful transmission of ATIM packet in randomly chosen slot, given by equation 4.14. pas =
N ∗ τa ∗ (1 − τa )N −1 1 − (1 − τa )N
(4.14)
pas is calculated by the probability that exactly one ATIM packet is transmitted on condition that at least one cognitive user transmit the ATIM packet. Values of τd and pd can be calculated by solving equations 4.8 - 4.14.
4.3.4 Throughput Calculations Let S be the normalized system throughput, defined as a fraction of time the system is busy for successful transmission of data. To compute S, let us analyze the possibilities of what can happen to a considered time slot. Any considered time slot could be idle, could have collision or could have a d , P d and P d successful transmission. Let Pidle succ represents the probabilities of randomly chosen slot col
in the data window is idle, leads to collision and leads to successful transmission, respectively. As the actual duration between two transmitting slots varies with the events occurred, the average length of d , is calculated with equation 4.15. data slot for successful transmission, σavg d d d d σavg = Pidle σ + Psucc Tsd + Pcol Tcd
(4.15)
where Tsd and Tcd are average time the medium is sensed busy due to successful transmission and due to d , P d and P d collision of data packet, respectively. Tsd , Tcd , Pidle succ can be expressed as: col
Tsd = TDIF S + 3 ∗ TSIF S + TRT S + TCT S + H + E[P ] + TACK + σ
(4.16)
Tcd = TDIF S + TRT S + σ
(4.17)
d Pidle = (1 − Ptrd )
(4.18)
d Psucc = pds Ptrd
(4.19)
d Pcol = (1 − pds )Ptrd
(4.20)
where TDIF S , TSIF S represents the DCF Inter-frame Space (DIFS) and Short Inter-frame Space (SIFS) duration. TRT S , TCT S and TACK represents the time required to transmit RTS, CTS and acknowledgement packets. H is the size of packet header calculated as H = P HY Header + M ACHeader. E[P ] 55
is the size of data payload. It has been assumed for the analysis that all the data packets have same size. Ptrd is the probability that there is at least one data packet transmitted in the considered slot. Probability of successful data packet transmission is given by pds . Similar to pas , pds is calculated by the probability that exactly one data packet is transmitted on condition that at least one cognitive user transmit the data packet. Expressions of Ptrd and pds are given by equations 4.21 and 4.22.
pds =
Ptrd = 1 − (1 − τd )N ∗pas
(4.21)
N ∗ pas ∗ τd ∗ (1 − τd )N ∗pas −1 Ptrd
(4.22)
Saturation throughput for data window, SData , can be calculated as: Payload information transmitted in a slot Average lenght of the slot pds ∗ Ptrd ∗ E[P ] = d σavg
SData =
(4.23)
Based on the saturation throughput for data window, normalized saturation throughput for one channel in cognitive networks is given by equation 4.24. S = SData ∗
TBI − TAT IM −W indow ∗ P (OF F ) TBI
(4.24)
where TBI and TAT IM −W indow represents the duration of beacon interval and ATIM window, respectively. P (OF F ) is used to consider the duration in which channel is free for cognitive user. As cognitive networks supports simultaneous transmissions on different channels, the capacity and throughput of the system will increase in multi-channel environment. Let us assume that there are total M 0 channels available for cognitive network. The number of simultaneous transmissions can be calculated as: M = min(M axRes, M 0 )
(4.25)
where M axRes is the maximum number of ATIM handshakes possible in ATIM window. To calculate a , as shown M axRes, we first calculate the average length of ATIM slot for successful transmission, σavg
in equation 4.26. a σavg = (1 − Ptra )σ + Ptra pas Tsa + Ptra (1 − pas )Tca
(4.26)
where Ptra is the probability that at least one ATIM packet is transmitted in the considered slot. Tsa and Tca are average time the medium is sensed busy due to successful transmission and due to collision of 56
ATIM packet. Expressions for Ptra , Tsa and Tca are given in equations 4.27 to 4.29. Ptra = 1 − (1 − τa )N
(4.27)
Tsa = TDIF S + TAT IM + TSIF S + TAT IM −ACK
(4.28)
Tca = TDIF S + TAT IM
(4.29)
where TAT IM and TAT IM −ACK represents the time required to transmit ATIM packet and ATIM-ACK packet, respectively. Once average length of slot for successful transmission is calculated, the maximum number of ATIM handshakes possible in ATIM window can be calculated as: M axRes =
TAT IM −W indow a σavg
(4.30) (M )
Probability of M successful transmissions of ATIM packets in ATIM window, pas , assuming that there are M simultaneous transmissions possible is given by: M axRes (M ) pas = (pas )M (1 − pas )M axRes−M M
(4.31)
System saturation throughput can be calculated by adding the throughput with 1 to M simultane0
ous transmissions. Expression for calculating system saturation throughput S (M ) and system capacity 0
C (M ) are given by equations 4.32 and 4.33. 0
S (M ) =
M X
S ∗ p(i) as ∗ i ∗ Bandwidth
(4.32)
i=1
C
(M 0 )
= S ∗ M ∗ Bandwidth
(4.33)
4.3.5 Delay Calculations MAC layer delay is a random value as shared opportunistic medium is used with random access mechanism in cognitive networks. Hence, a detailed analysis of MAC layer delay is required. MAC layer packet could be successfully transmitted or deleted due to maximum retry limit. In both the cases MAC layer notifies the successful transmission or deletion of MAC packet to upper layers. Thus, the MAC layer delay is defined as the time interval from the instant packet received by MAC layer to the instant notification about the final status of the packet sent. In this subsection, MAC layer delay calculations are presented in three parts. First part present the calculations for ATIM window, second part presents the calculations for data window and third part presents the calculations for average MAC layer delays. 57
4.3.5.1 Delay Calculations in ATIM Window
The probability that a ATIM packet is successfully transmitted in backoff stage i and backoff window k is given by: a Psucc (i, k) = p0a ∗ τ a (i, k)
(4.34)
where τ a (i, k) represents the probability that a station tries to transmit ATIM packet in backoff stage i and backoff window k. τ a (i, k) can be calculated with: (p00a )i τ a (i, k) = (p00a )3 + qa (p00a )i (p00a )(3∗2) + 2qa (p00a )3 + qa2 (p00a )i
if k = 2 (4.35)
if k = 1 if k = 0
Delay experienced by ATIM packet when it is transmitted in k th ATIM window can be given by: Da (k) = k ∗ TBI + TAT IM −W indow
(4.36)
a , can be calcuProbability that a ATIM packet is dropped due to maximum retry limit reached, Pdrop
lated with the probability that ATIM packet is not transmitted successfully in any of the backoff stage of any backoff window. a Pdrop =1−
2 2 X X
a Psucc (i, k)
(4.37)
k=0 i=0
Conditional probability that the backoff process of a ATIM packet transmission ends at backoff stage 0
a (i, k), can be i and backoff window k given that the ATIM packet is transmitted successfully, Psucc
calculated with: a (i, k) Psucc a 1 − Pdrop
0
a Psucc (i, k) =
(4.38)
a Let Dsucc represents the average delay experienced by successfully transmitted ATIM packet consid0a represents the average delay experienced by successfully transmitted ering all transmissions and Dsucc 0a a and Dsucc can be calculated by using ATIM packet considering only the successful transmissions. Dsucc
equation 4.34, 4.36 and 4.38. a Dsucc
=
0a Dsucc =
2 X 2 X k=0 i=0 2 X 2 X
a Psucc (i, k) ∗ Da (k)
0
a Psucc (i, k) ∗ Da (k)
k=0 i=0
58
(4.39)
(4.40)
Probability that a ATIM packet is dropped due to maximum retry limit reached in backoff stage i and a (i, k), is given by: backoff window k, Pdrop a Pdrop (i, k) = p00a ∗ τ a (i, k)
(4.41)
Conditional probability that the backoff process of a ATIM packet transmission ends at backoff stage i and backoff window k given that the ATIM packet is dropped due to maximum retry limit reached, 0
a (i, k), can be calculated with: Pdrop a (i, k) Pdrop
0a
Pdrop (i, k) =
a Pdrop
= τ a (i, k)
(4.42)
a Let Ddrop represents the average delay experienced by ATIM packet when it is dropped due to maxi0
a mum retry limit reached considering all the packets and Ddrop represents the average delay experienced
by ATIM packet when it is dropped due to maximum retry limit reached considering only the dropped 0
a a packets. Ddrop and Ddrop can be calculated using equation 4.36, 4.41 and 4.42.
a Ddrop =
0
a Ddrop =
2 X 2 X k=0 i=0 2 X 2 X
a Pdrop (i, k) ∗ Da (k)
0
a Pdrop (i, k) ∗ Da (k)
(4.43)
(4.44)
k=0 i=0
4.3.5.2 Delay Calculations in Data Window
Let Bi is the value of backoff counter generated at stage i. The pdf of Bi follows a uniform distribution of range [0, CWi ]. Let B(v) is the sum of backoff slots generated from stage 0 to v, where v ∈ [0, m]. Therefore, B(v) =
v X
Bi
(4.45)
i=0
The pmf of B(v), given by P r(B(i) = v), is a convolution of the pmfs of all Bi ’s with i ∈ [0, v]. It can P be noted that B(v) is in the range of [0, B(v)max ], where B(v)max = vi=0 CWi . 59
d (i), is given by: Probability that a data packet is successfully transmitted in backoff stage i, Psucc d Psucc (i) = (p00d )i ∗ p0d ∗ P (OF F )
(4.46)
d (i, b) denote the probability that a data packet is successfully transmitted in backoff stage i Let Psucc d (i, b) is given by: where the sum of backoff values up to stage i is b. Psucc d d Psucc (i, b) = Psucc (i) ∗ P r(B(i) = b)
(4.47)
d , can be calculated Probability that a data packet is dropped due to maximum retry limit reached, Pdrop d by the probability that data packet is not transmitted successfully in any of the backoff stage. Thus, Pdrop
is given by: d Pdrop =1−
m X
d Psucc (i)
(4.48)
i=0 0
d (i, b) denotes the probability that the backoff process of a packet transmission ends at Let Psucc
backoff stage i where the sum of backoff values upto stage i is b, given that the data packet is transmitted 0
d (i, b) is given by: successfully. Expression for Psucc d (i, b) Psucc d 1 − Pdrop
0
d Psucc (i, b) =
(4.49)
Delay experienced by data packet when it is successfully transmitted in backoff stage i where the d sum of backoff values up to stage i is b, Dsucc (i, b), can be calculated as: d d Dsucc (i, b) = b ∗ σavg + i ∗ Tcd + Tsd
(4.50)
d , T d and T d are given in subsection 4.3.4. Expressions for σavg c s d Let Dsucc represents the average delay experienced by successfully transmitted data packet consider0d represents the average delay experienced by successfully transmitted ing all the transmissions and Dsucc 0d d data packet considering only the successful transmissions. Dsucc and Dsucc can be calculate by using
equation 4.47, 4.49 and 4.50. d Dsucc =
m B(i1) X Xmax i=0
0d Dsucc =
(4.51)
b=0
m B(i1) X Xmax i=0
d d Psucc (i, b) ∗ Dsucc (i, b)
0
d d Psucc (i, b) ∗ Dsucc (i, b)
b=0
60
(4.52)
Probability that a data packet is dropped due to maximum retry limit reached where the sum of d (b), can be calculated as: backoff values till it is dropped is b, Pdrop d d Pdrop (b) = Pdrop ∗ P r(B(i) = b)
(4.53)
Conditional probability that the backoff process of a data packet transmission ends given that the 0
d , is given by: data packet is dropped due to maximum retry limit reached, Pdrop 0
d Pdrop =
d (b) Pdrop d Pdrop
= P r(B(i) = b)
(4.54)
The delay experienced by data packet when it is dropped due to maximum retry limit reached where d the sum of backoff values till it is dropped is b, Ddrop (b), can be calculated as: d d Ddrop (b) = b ∗ σavg + (m + 1) ∗ Tcd
(4.55)
d Let Ddrop represents the average delay experienced by dropped data packet considering all the pack0
d ets and Ddrop represents the average delay experienced by dropped data packet considering only the 0
d d dropped packets. Ddrop and Ddrop can be calculated with equation 4.53, 4.54 and 4.55.
X
B(i1)max d Ddrop =
d d Ddrop (b) ∗ Pdrop
(4.56)
b=0
X
B(i1)max 0
d Ddrop =
0
d d Ddrop (b) ∗ Pdrop
(4.57)
b=0
4.3.5.3 Combined MAC Layer Delays
Let Dsucc and Ddrop represents the average MAC layer delays experienced in ATIM window and data window for successfully transmitted and dropped data packet, respectively. Dsucc and Ddrop can be calculated as: 0a 0d Dsucc = Dsucc + Dsucc 0
0
a d Ddrop = Ddrop + Ddrop
(4.58) (4.59)
Let Dnotif y represents the average MAC layer delay experienced by packets either dropped or successfully transmitted. Note that we should use the probabilities of ATIM/data packets transmitted successfully or dropped rather than the conditional probabilities while calculating Dnotif y . Thus, Dnotif y 61
can be calculated as: Dnotif y =
2 X 2 X
a Psucc (i, k) ∗ Da (k)
k=0 i=0
+
+
m B(i1) X Xmax
d d Psucc (i, b) ∗ Dsucc (i, b)
i=0 b=0 2 2 XX
a Pdrop (i, k) ∗ Da (k)
k=0 i=0
X
B(i1)max
+
d d Ddrop (b) ∗ Pdrop
(4.60)
b=0
Equation 4.60 can be simplified to equation 4.61. 0
0
0a 0d a a d d a d Dnotif y = (1 − Pdrop )Dsucc + Pdrop Ddrop + (1 − Pdrop )Dsucc + Pdrop Ddrop
(4.61)
4.4 Analysis of throughput, capacity and delay This section presents the performance analysis of CCM-MAC. Table 4.1 lists the values of the parameters used in the calculations.
4.4.1 Model Verification This subsection validates the proposed Markov model with the simulation results. The model results depends upon qa and qd . Here qa is the probability of reaching to the end of the ATIM window when a secondary user is transmitting its packet. This probability depends on network size and ATIM window size. Similarly, qd is the probability of reaching to the end of the data window when a secondary user is transmitting its packet. qd depends on the number of active sessions in data window and the size of data window. The number of active sessions in data window is equal to N ∗ pas . Thus, for fixed size data window qd = c ∗ N ∗ pas . For selecting the value of qa and c, theoretical results with various values of parameters are matched with the CCM-MAC NS2 simulation results with DSSS physical layer. Other parameters are selected from IEEE 802.11 wireless LAN MAC & PHY specification to model OFDM PHY layer specification. The proposed mathematical model is validated against simulation using NS2 as shown in figure 4.4. For simulation ATIM window size and number of channels are taken as 20ms and 10. 62
Parameters
Value
Data Payload
1024 bytes
RTS packet length
20 bytes
CTS packet length
14 bytes
ACK packet length
14 bytes
ATIM packet length
20 bytes
ATIM-ACK packet length
14 bytes
Time slot σ
9µs
Beacon Interval (TBI )
100 ms
SIFS (TSIF S )
16 µ s
DIFS (TDIF S )
TSIF S + (2 ∗ σ) = 34µ s 1µs
Air Propagation Time Bandwidth
1 Mbps
CWmin
15
qa
0.002
c
0.008 Table 4.1: Parameters Used
4.4.2 Markov Model Analysis 4.4.2.1 Effect of number of secondary users & number of channels in system For this analyses, α and β are taken as 0.5, i.e. half of the time the channel is occupied by primary user. The size of ATIM Window, TAT IM −W indow , is taken as 20ms. Results for multi-channel system capacity and throughput are shown in figure 4.5 and 4.6. It is clear from figure 4.5 that the capacity of system is not impacted by the number of cognitive users. It also shows that the capacity of system increases with the increase in the number of channels. Figure 4.6 shows that the throughput of system reduces with the increase in the number of users. This reduction is due to the increase of collision probability within the system. Figure 4.7 shows the MAC layer delay experienced by data packets. The average MAC layer delay includes transmission time and waiting time in MAC layer queue. If a node does not have a successful ATIM transmission then the data packet has to wait for the next beacon 63
2.5 Model Throughput Simulation Throughput
Throughput (Mb/s)
2
1.5
1
0.5
0 0
10
20
30
40
50
Number of Users
Figure 4.4: Markov Model validation with Simulation
18 M=1 M = 10 M = 20 M = 30 M = 40 M = 50 M = 60 M = 70
Capacity of system with M channels (Mb/s)
16
14
12
10
8
6
4
2
0 0
5
10
15
20
25 30 Number of Users
35
40
45
50
Figure 4.5: Effect of number of users and number of channels on Capacity
interval to reserve a slot. As Dsucc only considers successful transmissions, the increase in the number of users does not have significant impact on its value. Probability of successful ATIM transmission decreases with the increase in user density. Packets are dropped if maximum retry limit is reached. 64
16 M=1 M = 10 M = 20 M = 30 M = 40 M = 50 M = 60 M = 70
Throughput of system with M channels (Mb/s)
14
12
10
8
6
4
2
0 0
5
10
15
20
25
30
35
40
45
50
Number of Users
Figure 4.6: Effect of number of users and number of channels on Throughput
2.2 Dsucc Ddrop Dnotify
2 1.8 1.6
Delay (s)
1.4 1.2 1 0.8 0.6 0.4 0.2 0 0
5
10
15
20 25 30 Number of Users
35
40
45
50
Figure 4.7: Effect of number of users and number of channels on Delay
Thus, Ddrop increases much faster with the increase in number of users. Dnotif y considers packets that are being dropped or successfully transmitted. It also increases with the increase in the number of users. 65
4.4.2.2 Effect of ATIM Window Size For analyzing the effect of ATIM window size, the number of cognitive users is considered as 50. Relation between system capacity and throughput with ATIM window size is shown in figure 4.8 and 4.9, respectively.
It can be noted that if the size of ATIM window is too low then the number of 45 M=1 M = 10 M = 20 M = 30 M = 40 M = 50 M = 60 M = 70 M = 80 M = 90 M = 100
Capacity of system with M channels (Mb/s)
40
35
30
25
20
15
10
5
0 0
5
10
15
20 25 30 ATIM Window Size (ms)
35
40
45
50
Figure 4.8: Effect of ATIM window and number of channels on Capacity of the system successful ATIM handshakes will be less than the number of channels available for cognitive users. In such situations, capacity and throughput of system will be less. But if ATIM window size increases more than certain value then spectrum bandwidth is wasted. Thus, very large ATIM window size also limits the capacity and throughput performance. It can be observed that the size of ATIM window affects the performance of protocol and should be selected carefully. Figures also show that the required value of ATIM window size increases with the increase in the number of channels. Thus, the number of channels available for cognitive users should be considered while selecting the size of ATIM window for multi-channel system. 4.4.2.3 Effect of PU Activity Figure 4.10, 4.11 and 4.12 shows the relation between primary user activity model with system capacity, throughput and average MAC delay. For this analysis, ATIM window size is considered as 20 ms and the number of cognitive users is considered as 50. As discussed in section 4.3, primary user 66
18 M=1 M = 10 M = 20 M = 30 M = 40 M = 50 M = 60 M = 70 M = 80 M = 90 M = 100
Throughput of system with M channels (Mb/s)
16
14
12
10
8
6
4
2
0 0
5
10
15
20
25
30
35
40
45
50
ATIM Window Size (ms)
Figure 4.9: Effect of ATIM window and number of channels on Throughput of the system
Capacity of the system (Mb/s) with M = 1 M = 10 M = 20 M = 50
25 20 15 10 5 00.9
0.8
0.7
0.6
0.5
beta
0.4
0.3
0.2
0.1
0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
alpha
Figure 4.10: Effect of PU Activity on Capacity
activity is modeled as an alternating sequence of ON and OFF periods with parameters α and β. With the increase in α, availability of channel for cognitive user increases and hence system capacity and throughput increases. Also with the increase in β, primary user activity on system increases and hence system capacity and throughput decreases. It can also be seen from figure 4.12 that average MAC layer 67
Throughput of the system (Mb/s) with M = 1 M = 10 M = 20 M = 50
9 8 7 6 5 4 3 2 1 00.9
0.8
0.7
0.6
0.5
0.4
beta
0.3
0.2
0.1
0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
alpha
Figure 4.11: Effect of PU Activity on Throughput
Average MAC Layer Delay (Dnotify)
1.3 1.28 1.26 1.24 1.22 1.2 1.18 1.16 1.14 1.120.9
0.8
0.7
0.6 beta
0.5
0.4
0.3
0.2
0.1
0 0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
alpha
Figure 4.12: Effect of PU Activity on Average MAC Layer Delay
delay decreases with the increase in α and increases with the increase in β. This analysis can be used to design and analyze systems with different primary user characteristics. 68
4.5 Conclusion This chapter develops a discrete time Markov chain model for IEEE 802.11 PSM based cognitive MAC protocols. The theoretical analysis of system capacity, achievable throughput and MAC layer delays are presented. The analysis helps in understanding the performance of IEEE 802.11 PSM based cognitive MAC protocols in different scenarios. Presented results show that it is advisable to have flexible ATIM window size for fixed beacon interval system in cognitive networks, where ATIM window size should vary with the variation in available channels and number of users. Thus, this analysis can be used in designing better MAC layer protocol with dynamic ATIM window size.
69
Chapter 5 Cognitive Wireless Sensor Networks Specific Protocols
A general wireless sensor network consists of a set of sensor nodes that are deployed in a field interconnected with a wireless network. Sensor nodes are small low cost devices limited in power. Sensor node is made up of sensing unit, data processing unit, communication unit and power unit. Components of a sensor node are shown in figure 5.1. Normally sensor nodes are spatially distributed throughout the region which has to be monitored; they self-organize into a network through wireless communication and collaborate with each other to accomplish a common task. Each of these scattered sensor nodes has the capabilities to collect data and route the data back to the sink node/base station [57, 58]. As sensor nodes do not receive human interaction/care and usually get deployed in field at random Sensing Unit
Processing Unit Processor
Sensor
ADC
Transceiver Storage
Power Generator
Power Unit
Figure 5.1: The components of a sensor node (Source: 55)
unknown locations, it is impractical to recharge nodes once they are deployed. Thus, the sensor nodes are highly dependent on battery life. WSNs work on the ZigBee protocol [59]. The ZigBee protocol operates in unlicensed frequency bands which are also used by other wireless applications, such as Wi-Fi and Bluetooth. Figure 5.2 shows the frequency occupancy chart of ZigBee, Bluetooth and Wi-Fi. We can see that the Zigbee channels are overlapping with Wi-Fi and Bluetooth channels. Hence, in the scenario 70
Zigbee Channels
2405
2410
2415
2420
2425
2430
2435
2440
2445
2450
2455
2460
2465
2470
2475
2480
WiFi Channels
2412
2437
2462
Bluetooth Channels
2400
2483
Figure 5.2: Frequency occupancy of ZigBee, bluetooth and Wi-Fi
where multiple applications working with different protocols are operational, collision is inevitable. To reduce network congestion, cognitive radio and DSA can be used. Thus, enabling cognitive functionality discussed in chapter 1 makes the WSNs smarter with efficient spectrum utilization. These networks are referred to as Cognitive WSNs. Basic features of CWSNs are self-organization, dynamic network topology, limited power, node failures, mobility of nodes, short-range broadcast communication over opportunistic spectrum, multi-hop routing and large scale deployment. As discussed in chapter 1, WSNs are special kind of cognitive networks with some specific characteristics. The number of sensor nodes in a WSN can be several orders of magnitude higher than the nodes in a general cognitive networks. One or few nodes acts as data sink(s) in WSNs and all the sensed data should be forwarded to the predefined sink(s) unlike general cognitive networks which support any node pairs for routing. This generates a requirement for specific routing protocols for sensor networks. Also, WSNs usually get deployed at random unknown locations (like forest) and it is impractical to recharge sensor nodes once they are deployed which makes energy efficiency more important in WSNs. The key challenge in CWSN is to maximize the lifetime of sensor nodes due to the fact that it is not feasible to replace the batteries of thousands of sensor nodes. Therefore, computational operations of nodes and communication protocols must be energy efficient. This chapter presents the work carried out in CWSN. The first section proposes a network architecture for CWSNs. This architecture also proposes a solution for routing and spectrum access technique in CWSNs. Section 5.2 discusses the hidden primary user problem in cognitive networks and presents a solution for energy efficient localization of primary users. 71
5.1 Network Architecture As each node plays the dual role of data collector and data router in CWSNs, power loss or malfunctioning of a few nodes can cause significant topological changes. It might require rerouting of packets and reorganization of the complete network. Hence, energy efficient communication is a very significant constraint here. This section discusses a network architecture for CWSNs and also shows that the proposed network architecture is energy efficient. The proposed network architecture uses minimum spanning tree for each sector and give solution for routing and spectrum access in CWSNs.
5.1.1 Proposed Network Architecture The proposed architecture uses the clustering concept. The sensor nodes are divided into several clusters. Cluster head selection is described later in this chapter. Nodes belonging to a cluster send data to their cluster head. After receiving data from all member nodes, the cluster head transmits the data to the sink node and/or to other cluster heads. This simplifies the network functionality and reduces complexity. Hence the problem of defining the network structure can be divided into two smaller problems. First problem is to represent nodes in one cluster as one structure and second is to represent network of clusters as one unified super-structure. Normally cluster head is at one-hop distance from other member nodes belonging to the same cluster. Cluster head and other member nodes together form a simple, star-like connection as shown in figure 5.3. In this representation routing is very simple; every sensor
Cluster Head Sensor Node
Figure 5.3: Cluster representation with star topology node sends data directly to the cluster head. Once cluster head receives data from all the sensor nodes in that cluster, fusion algorithms are applied on the received data and the fused estimate is forwarded further. For network architecture between clusters, each cluster is considered as one node. Traditionally, flooding was used to forward data from the cluster to the base station [60]. During flooding the cluster72
heads forward data in all directions. An undirected graph can be used to represent connections among cluster-heads in case of flooding. The main drawback of flooding is inefficient use of resources (especially energy) as unnecessary forwarding is done during flooding [61]. To overcome this issue a tree-based protocol (TREEPSI) has been proposed in [62]. TREEPSI constructs a tree-like hierarchical path of the nodes. Only one spanning tree is created which connects all the nodes in the network. It is difficult to manage this architecture as a single tree including all the nodes in the network is very big. To overcome this issue, a new network architecture is proposed in which the complete area is divided into 30 degrees sectors with base station as origin. Spanning trees are constructed to represent sensor nodes within a sector. This architecture is shown in figure 5.4. In this new structure, every cluster can forWSN Field
WSN Field
MST
Sector 4 Sector 3 Sector 5
Sector 2
Sector 6
Sector 1
Sector 7
BaseStation
BaseStation
Clusters
Clusters
Sector 12
Sector 8 Sector 11 Sector 9 Sector 10 (a)
(b)
Figure 5.4: Sector representation and spanning-tree for a sector ward data to only one neighboring cluster and thus this strategy avoids flooding. This improves energy efficiency as redundant messages are avoided. The edges can be weighted with the energy required to transmit data between the nodes. In this case, solution can be further improved by using Minimum Spanning Tree (MST). MSTs can be created within the sectors considering the base station as a root node. MST improves energy efficiency as either less number of packets needs to be transmitted or packets are transmitted to smaller distance or both. Base station assigns different frequency bands dynamically to different clusters and sectors based on the spectrum availability to improve utilization. It is a energy efficient solution for routing in CWSN. But the solution has a drawback that all nodes become single points of failure. If any internal node of MST fails then the remaining nodes get divided into two disconnected MSTs. Thus, connection between these MSTs are created to make this architecture fault tolerant. Nodes near sector boundaries make connections to other MSTs as shown in figure 5.5. 73
MST Interconnection Clusters
Level 2
Level 1
Level 0
Figure 5.5: Connection of sector MST to other neighboring sectors
In summary, CWSN is represented as a network of minimum spanning trees. The architecture comprises of following connections: • Nodes in a cluster are connected using star topology. • Cluster Heads (CH) within each sector are connected using a single MST. • Cluster heads which are near sector boundaries also connect with neighboring sector. In this architecture, every non-leaf or routing node performs fusion of received data with sensed data and then sends the result to next lower level node. This approach distributes load among large number of sensor nodes. This also leads to reduction in amount of data exchange between the nodes and hence is more energy efficient. The interconnections between neighboring sectors MST make the architecture more fault-tolerant. At periodic intervals node can transmit their remaining energy along with sensed/fused data. If this energy is below a specified threshold then a new MST can be formed keeping the node energy level into account, so that the node is a leaf node and does not perform both, routing and fusion, which require considerable energy.
5.1.2 Implementation Details This subsection describes the implementation details of the proposed architecture. For this architecture, base station should have directional antennas. 74
5.1.2.1 Sectors, Levels and Clusters Formation The sensor network field is divided into equi-angular regions called sectors as discussed in [63]. Each sector is uniquely identified with the help of sector ID. In order to inform nodes of their sector IDs, the base station sends Sector Broadcast Packets (SBP) with directional antennas such that only nodes within a sector receive this broadcast. SBPs contain sector ID and information about the base station. Sample sectors created with 30 degree regions are shown in figure 5.4. Once sectoring is done, the entire field is divided into various levels. Leveling is done using hop-count ratio-based technique. In this technique, hop-count of all the nodes is initialized to infinity. First, the sink node broadcasts packets with hopcount field set as zero. Nodes that directly receive these packets set their level as 1. These updated packets are again broadcast after increment of hop-count field by 1. Nodes that receive these packets, update their level to ‘HopCount + 1’, if their current level is higher than ‘HopCount + 1’. Finally, sensor nodes are grouped together in clusters [64,65]. Clustering is done in two phases . First the cluster heads are selected and then the sensor nodes are aligned to selected cluster heads. Clustering is done with modified ‘Algorithm for Cluster-head Election by Location’ (ACE-L) [66]. In this technique, first a sensor node generates a random number between 0 and 1. If this random number is less than the threshold T (n), the sensor node is elected as a CH. T (n) is calculated as P 1−P ∗[r mod(1/P )] if n ∈ G T (n) = 0 otherwise
(5.1)
where r is the current round, P is the percentage selected such that each node will become a clusterhead at some point within 1/P rounds, and G is the set of nodes that have not being selected as a CH in the last 1/P rounds. After the CHs are selected, the CHs advertise to all sensor nodes in the network that they are the new CHs. Once the sensor nodes receive the advertisement, they determine the cluster to which they want to belong based on the signal strength of the advertisement and send membership notification. 5.1.2.2 Tree Construction After completing sector, level and cluster formation, MSTs are constructed by running the MST creation algorithm considering base station as a root node for each sector. MST creation is done by assigning weights to edges with the help of levels formed as discussed earlier. Edge connecting sensor nodes in levels a and b are assigned weight a − b + 1, if a > b. Thus, edges between nodes which 75
belong to same level are set as 1. And edges between nodes which belong to different levels is set as the difference between levels plus one. Prim’s algorithm is used to construct the MSTs of a given graph. In Prim’s algorithm, root vertex v is selected in a given graph G = (V, E). This root vertex is considered as an origin of the tree. This vertex defines the initial set of vertices A. In each iteration, minimum-weight edge u − v, such that v ∈ A and u 3 A, is selected. Vertex u is added in to the set A. This process is repeated until a spanning tree is formed. Edges that produce a cycle or loop are not considered. The prim’s algorithm is depicted in figure 5.6. 9
A
5
5
C
D 4
9
B
6
2 D
C
5 (d)
5
D 4
E
B
6
C
5
B
5
D
4
4 E
(e)
A 2
5
4
E
(c)
9
A
5 4
5
C
E
2
5 4
D 4
(b)
(a) A
5
4
5
C
E
5
B
6
2
5
4
4
9
A
B
6
2
5 D
9
A
B
6
2
C
5 4 E
(f)
Figure 5.6: Prim’s Algorithm for MST Creation
As discussed earlier, the sensor nodes at the boundaries of sectors are connected with MSTs of neighboring sectors. Two different approaches can be used to identify the border nodes:
1. During sectoring, border nodes will also receive SBP of neighboring sectors with low signal strength. Thus, nodes which receive SBP with different sector IDs can identify themselves as boundary nodes.
2. Base-station can also send separate messages with the help of directional antenna to mark the boundary nodes. Only the nodes which receive this special message can identify themselves as boundary nodes.
Boundary nodes send a message as a request for building interconnection between MSTs. A receiving node accepts this request only if it differs from the sending node in both sector ID and level ID. 76
5.1.2.3 Routing / Data Transmission Once MST construction is done, base station (i.e. the root node of the MST) generates a TDMA schedule for the transmission and circulates it in the MST. Time synchronization is done with the TDMA implementation. Once the MSTs are constructed for each sector and base station is generating the schedule for data transfer, nodes communicate to synchronize their clocks. Timing-Sync Protocol for Sensor Networks (TPSN) [67] is used to achieve multi-hop synchronization. Base station also assigns the frequency bands available to each of the cluster and sector based on the sensed spectrum availability information. When nodes are aware of the TDMA schedule and the frequency bands, they transmit data and perform fusion in appropriate time-slots allotted to them. In every slot, one or more nodes transmit gathered data to the lower level nodes. The lower level nodes fuse the received data with sensed data and send the result to the next lower level nodes. The generation of TDMA schedule for MST is described with the help of an example. Consider MST generated in figure 5.6(f). Table 5.1 shows the edge information of the MST. Nodes D and E participate in the routing and node A, B and C Node ID
Next Hop ID
A
D
B
E
C
D
D
E
E
-
Table 5.1: Edge Information of MST
are the leaf nodes. As nodes A and C have the same next hop node, they both cannot transmit the data simultaneously. Thus, in first round nodes A and B transmit data. In second round node C can transmit its data. In third round node D can transmit the fusion result. Figure 5.7 shows the time order of the TDMA schedule generated. Communication complexity of the discussed architecture is O(n) where n is the number of nodes in a sector. Communication complexity is measured as the number of messages forwarded from leaf node to root node in worst case. In MST, every node transmits data to only one another node. Hence, number of messages required are equal to number of edges in MST, i.e. n − 1. Thus, communication complexity is O(n). Table 5.2 shows the summary about the steps followed for data transfer in proposed architecture. 77
Nodes E D C B A T1
T2
Time
T3
Figure 5.7: TDMA Schedule Order of MST
Step
Nodes Involved
Controlling Node
Clusters Formation
Nodes in one cluster
Cluster Head
Sectors Formation
All the Nodes
Base Station
Levels Formation
All the Nodes
Base Station
MST Construction
Nodes in one sector
Root node of sector
TDMA Schedule Generation
Nodes in one sector
Base Station
Data Transfer
All the Nodes
Cluster Heads
Table 5.2: Summary of data transfer
5.1.3 Simulation Results
This section presents the performance evaluation of the proposed approach via simulation performed using MATLAB, and compares it with TREEPSI. For simplicity, an ideal MAC layer and error-free communication links are assumed. The algorithm will be evaluated in a number of different scenarios. The distance between two levels, d, is taken as 5 meters. Initial energy of nodes is assumed to be 0.25J. Data packet length is assumed to be of 2000 bytes. Like in TREEPSI, the first order radio model for message transmission and reception [68] is assumed. In this model, a radio dissipates 50 nJ/bit to run the transmitter or receiver circuitry (represented as Eelec) and 100 pJ/bit/m2 for the transmitter amplifier (represented as ∈amp ). The equations used to calculate transmission and reception costs for a 78
k−bit message over distance d in transmitter and receiver are given by equation 5.2 and 5.3, respectively. ET X(k, d) = Eelec ∗ k+ ∈amp ∗d2
(5.2)
ERX(k) = Eelec ∗ k
(5.3)
In addition to these, a cost of 5 nJ/bit/message is assumed for data fusion. The lifetime of the sensor network is measured in terms of the rounds nodes begins to die for the two schemes compared. Figure 5.8 shows the death rates of nodes vs rounds of communication for proposed approach and TREEPSI in sensor network. Number of nodes, sectoring angle and network area is considered as 100 nodes, 30 degree and 50X50 meters for this simulation. It can be observed that the nodes die 350 Proposed Approach TREEPSI
Rounds of Communication
300
250
200
150
100
50 0
20
40 60 Node Death Percentage
80
100
Figure 5.8: Rounds of Communication with Node Death Percentage
faster in TREESPI algorithm in comparison to the proposed approach. If a node fails in the proposed approach, only the MST for the faulty node’s sector is reconstructed. This helps in easy maintenance in case of failure and also improves energy efficiency. In TREEPSI, one spanning tree is created which connects all the nodes in the network which makes maintenance very complicated in case of failures. The effect of varying sectoring angle is shown in figure 5.9 to understand this improvement. Rounds of communication decreases with the increase in sectoring angle. Figure 5.10 shows the maximum rounds of communication for different initial energies of nodes. It is obvious that the rounds of communication increases with the increase in initial energy of the nodes. 79
160 Proposed Approach TREEPSI 150
Rounds of Communication
140
130
120
110
100
90 0
20
40
60
80
100
Sectoring Angle
Figure 5.9: Rounds of Communication by varying number of sectoring angle The proposed protocol supports more rounds of communications than the TREEPSI protocol. The improvement offered by the proposed protocol over TREEPSI is approximately 6.5%. 500 Proposed Approach TREEPSI
Rounds of Communication
400
300
200
100
0 0.25
0.5 Initial Energy (J)
1
Figure 5.10: Rounds of Communication by varying initial energies of nodes Figure 5.11 shows the number of time slots required for one round of data communication by varying number of nodes. It can be observed that the number of time slots increases with the increase in the number of nodes in network. Also, the number of time slots required for data communication is less 80
30 Proposed Approach TREEPSI
TDMA slots for One Round
25
20
15
10
5
0 0
20
40 60 Number of Nodes
80
100
Figure 5.11: Time slots required for one round of data communication by varying number of nodes
for the proposed approach. The proposed approach splits the area in sectors and generate MST for each sector for communication. This allows the simultaneous transmissions in different sectors and reduces the number of TDMA slots required for data transmission. The reduction in number of time slots required for data communication reduces the delay in the complete data collection in sensor network. It can be noticed that the proposed approach is consistently better than TREEPSI.
5.1.4 Discussion This section proposes a network architecture for energy efficient data transfer in CWSN which consists of a network of MSTs. Solution for routing and spectrum access is also proposed for this architecture. The work also shows that this multi-level network is fault-tolerant and admits simple data collection and transmission technique. This architecture reduces the total energy consumption by supporting more rounds of data communication and minimizes the data collection time in comparison to TREEPSI protocol.
5.2 Energy Efficient Localization of Primary Users As discussed in chapter 3, the hidden node problem exists in a multi-channel environment. In the hidden node problem, two nodes can be within the range of another node but out of each other’s range. 81
Two such nodes are said to be ‘hidden’ from each other. In cognitive networks, a primary user and cognitive user can be hidden to each other and there could be another primary user which is within the range of both. If this primary user is passively listening, it is not possible to identify the presence of this passive listening user through spectrum sensing. When a user is passively listening, it does not acknowledge or respond to any request. As shown in figure 5.12, PU2 is passively listening which
PU1
Rp
PU2 Rc
Disable Region
CU1
Figure 5.12: Hidden Node Problem cannot be identified. If we disable cognitive users within the coverage radius of PU1 (i.e. Rp ) and PU1 is transmitting data to PU2, then CU1 can cause interference to this transmission. Multiple solutions to the hidden node problem in traditional networks have been provided, such as RTS/CTS handshake for WLAN, Busy Tone Multiple Access (BTMA) for a centralized system [69], Dual Busy Tone Multiple Access (DBTMA) for ad hoc networks [70] and CCM-MAC protocol (proposed in chapter 3). However, these solutions are implemented for networks where users are cooperative to each other, which is not the case with a primary user as a hidden node. In [71], Global Positioning System (GPS) enabled cognitive users cooperate to first estimate the environment based on back propagation method and then locate the position of primary users. In the GPS technique, a wireless node calculates its position by carefully timing the signals sent by the GPS satellites. But this solution can only be used when GPS service is present and it is very expensive. In this work, we use cooperative sensing to identify the presence of primary users and then use the leveling and sectoring based approach for localization. Finally, the disabled region is identified considering the communication range of both primary and cognitive users. This avoids the hidden node problem. The cognitive users within the disabled region are sent to sleep mode until a free channel is detected in that area by spectrum sensing module. This avoids interference with the primary users and 82
also conserves energy. This approach is also suitable to CWSN as battery life is a real constraint in these networks.
5.2.1 Proposed Approach The proposed approach uses the leveling - sectoring based localization [72, 73] where each cognitive user is identified by two coordinates, i.e. level id and sector id. First the entire cognitive network area is divided into various levels. After leveling, each cognitive user has its first coordinate as its level id, i.e. Li . To differentiate between the nodes within the same level, the sensor network field is divided into equiangular regions called sectors as discussed in section 5.1. Each sector is uniquely identified with the help of sector ID (θj ). Since the region was already divided into levels, the sectoring creates sub-sectors as shown in figure 5.13.
Sub−Sector
Figure 5.13: Sub-Sector Representation
Now, the cognitive users know their location in terms of (Li , θj ). These cognitive users now perform the cooperative sensing to identify the presence of primary users [69, 74–79]. In cooperative sensing, multiple cognitive users cooperate to reach an optimal global decision by exchanging and combining individual sensing information. This increases the detection probability and reduces the detection time. Cognitive users send their individual sensing information to the cognitive base station. Once the presence of primary user is detected, cognitive base station calculates the relative position of primary user in terms of (Li , θj ) based on the signal strength detected by cognitive users. According to Friis transmission equation [80], given two antennas and the power input to the transmitting antenna, Pt , the ratio of power available at the output of the receiving antenna, Pr , is given by
Pr = Gt Gr
λ 4πR
2 Pt
(5.4)
where Gt and Gr are the antenna gain of the transmitting and receiving antennas, respectively. λ is the wavelength and R is the distance between transmitter and receiver. Thus, distance R can be calculated 83
as: λ R= 4π
r
Pt Gt Gr Pr
(5.5)
As the distance is inversely proportional to the received power, cognitive base station selects the cognitive user with maximum received power and assigns the same sub-sector location to the primary user. After getting the location information of primary user in terms of (Li , θj ), radius for the disabled region is calculated with the equation: R d = Rc + Rp
(5.6)
where Rc is the coverage radius of cognitive user and Rp is the coverage radius of primary user. The disabled region is shown in figure 5.14.
Rd
1 0 0 1
Rc Rp
Enabled Cognitive User Disabled Cognitive User 0 1 0 Primary User 1
Figure 5.14: Region to be disabled Now, the algorithm calculates the list of sub-sectors that are coming in this region and sends a message to disable all the cognitive users in those sub-sectors. Assume that the level id and sector id of the primary user are (Li , θj ). First, the levels that fall within the disable region are calculated as described below: 1. Calculate the number of levels to be disabled (DisableLevelCnt) at one side (up or down) with Rd +1 (5.7) DisableLevelCnt = d 2. Add the Li , level id of the primary user, in the disable level id list. 3. Add (DisableLevelCnt − 1) levels from (Li − 1) to (Li − (DisableLevelCnt − 1)) in the disable level id list. 4. Add (DisableLevelCnt − 1) levels from (Li + 1) to (Li + (DisableLevelCnt − 1)) in the disable level id list. 84
Then, the sectors that fall within the disable region are calculated as described below: 1. Calculate the distance of the sub-sector midpoint from the cognitive base station. DistanceF romBS = ((Li − 1) ∗ d) +
d 2
(5.8)
2. If cognitive base station is inside the disable region, i.e. DistanceF romBS Rd , then a tangent can be drawn from the base station position as shown in figure 5.16. According to Pythagoras theorem, sin θ =
opposite hypotenuse
and θ can be calculated as θ = sin
−1
opposite hypotenuse
(5.9)
4. Calculate the number of sectors to be disabled (DisableSectorCnt) at one side (left or right) with
θ DisableSectorCnt = +1 SectoringAngle
5. Add θj , the sector id of the primary user, in the disable sector id list. 6. Add (DisableSectorCnt − 1) left neighboring sectors in the disable sector id list. 7. Add (DisableSectorCnt − 1) right neighboring sectors in the disable sector id list. 85
(5.10)
hypotenuse opposite
theta
adjacent
Figure 5.16: Scenario when base station is outside the disable region
As the list of all levels and sectors that fall in the disable region is known, cognitive base station broadcast this list to all cognitive users. If cognitive user’s level id and sector id, both are present in the broadcast list, cognitive user put itself to sleep until a wake-up message is sent from the base station. This approach disables the transmissions from all those users that are in the disable region, but it also disables some cognitive users that are outside. Future research can be done to improve the performance of the proposed approach.
5.2.2 Simulation Results The performance of proposed algorithm is evaluate by means of simulation performed in MATLAB. The algorithm will be evaluated in a number of different scenarios. The distance between two levels, d, is taken as 5 units and the sectoring angle, θ, as 30 degree. The number of wrong enabled cognitive users that should be disabled and the error percentage of disabled cognitive users with respect to actual disabled cognitive users are calculated to evaluate the performance of the approach. The error is calculated with: Error =
q (#CU DisableSim − #CU DisableActual)2
(5.11)
where #CU DisableSim is the number of cognitive users that are disabled using the proposed approach and #CU DisableActual is the number of cognitive users that should be actually disabled. Error% is calculated with:
Error% =
Error #T otalCU
∗ 100
(5.12)
First, the performance is evaluated by varying the number of primary users. For this scenario, number of cognitive users and grid size are taken as 1000 and 2000. Figure 5.17 shows the error percentage for 86
the scenario. According to this graph, it is clear that as the number of primary users increases, the error 100 Error% by varying Primary User 90 80 70
Error%
60 50 40 30 20 10 0 2
4
6
8
10 12 Primary User%
14
16
18
20
Figure 5.17: Error percentage by varying number of primary users
percentage also increases. But after certain level the error percentage is stable. The enabled cognitive user count within the disable region for this scenario is always zero. The performance of proposed approach is also evaluated by varying number of cognitive users in same network. In this scenario, number of primary users is fixed and taken as 10. Figure 5.18 shows that the error percentage is almost constant for all cognitive user loads. This means that the performance of the algorithm is same for sparse and dense cognitive networks. The enabled cognitive user count within the disable region is zero for this scenario. Now, the performance of proposed approach is evaluated by varying the network area. For this scenario, number of cognitive users and primary users are taken as 1000 and 10, respectively. Figure 5.19 shows that if network area is increasing for same number of primary users, then the error percentage is decreasing. The enabled cognitive user count within the disable region for this scenario is also zero for all the grid sizes. It is clear that the performance of proposed algorithm is same if cognitive users are increasing in the network. But, if primary users load is very high, then the error percentage is increasing. If primary user spectrum utilization is high, then it is not advisable to consider that spectrum for cognitive users. Thus, the proposed approach can be implemented where primary user spectrum utilization is low. 87
100 Error% by varying number of Cognitive Users 90 80 70
Error%
60 50 40 30 20 10 0 100
200
300
400
500
600
700
800
900
1000
# Cognitive Users
Figure 5.18: Error percentage by varying number of cognitive users
100 "VaryingNetworkArea.txt" u 1:2 90 80 70
Error%
60 50 40 30 20 10 0 1000
1200
1400
1600
1800
2000
Grid Size
Figure 5.19: Error percentage by varying network area
Finally, the performance of the proposed approach is also evaluated by varying the sectoring angle as shown in figure 5.20. This graph shows that the error percentage is increasing linearly with the increase in sectoring angle. The enabled cognitive user count within the disable region is 0 for all the sectoring 88
100 "VaryingSectorAngle.txt" u 1:2 90 80 70
Error%
60 50 40 30 20 10 0 10
20
30
40
50
60
Sectoring Angle
Figure 5.20: Error percentage by varying Sectoring Angle
angles. Selection of the sectoring angle depends upon the type of antenna used at the cognitive base station and other implementation constraints.
5.2.3 Discussion This section proposed the energy efficient localization of primary users for avoiding interference in cognitive networks. This approach can be implemented in networks where GPS like localization techniques are not available. Proposed algorithm locates the primary user based on leveling and sectoring approach, and then disable region is identified to avoid interference to the primary user. Simulation results for the proposed algorithm shows that the proposed approach provides acceptable results. Specially, the count for wrongly enabled cognitive users is zero for all the scenarios, which shows that the interference to the primary users is prevented. Thus, this approach can be implemented in cognitive networks.
5.3 Chapter Summary This chapter proposes solutions specific to CWSN. A network architecture for CWSNs is proposed which provides a routing and spectrum access solution in CWSNs. Section 5.2 proposes a solution for 89
energy efficient localization of primary users. These solutions are compatible with each other and if implemented simultaneously, they provide a solution for routing, spectrum access technique, minimization of interference to primary users.
90
Chapter 6 Conclusions and Future Works
6.1 Conclusion This thesis proposes cross layer protocols for routing, spectrum allocation, spectrum access, and power control in cognitive networks. Chapter 1 presents information about cognitive networks issues and makes the case that cross layer protocols are essential for such networks. Chapter 2 proposes a protocol for cross layer cognitive multipath probabilistic routing, referred to as CCMPR. The proposed protocol also gives solution for channel allocation and power control for each hop in the multi-hop path. For developing a cross layer protocol, problem is defined as a multiobjective optimization problem. It is shown that the proposed routing metric is Pareto optimal, that is all the optimal solutions are reachable through the defined metric. Performance of the proposed protocol is evaluated using simulation performed in NS2. To implement the proposed algorithm in NS2, a cognitive model and multi-interface support is implemented in NS2. Details about these implementations are presented in appendix A and B. Simulation results confirm that the proposed protocol outperforms an existing protocol from literature for packet delivery ratio, end-to-end delays and energy consumed per packet transmission. Furthermore, chapter 3 proposes a medium access control technique, CCM-MAC, which also provides a solution for multi-channel hidden node problem, channel synchronization and channel scheduling. The proposed protocol supports channel assignment at upper layers and uses common control channel for control signaling. Spectrum sensing support is also provided in the protocol. The proposed protocol does not require multi-interface support; only one transceiver is used for communication. It is also implemented in NS2 for performance evaluation. Single interface multi-channel support is implemented in NS2. Details about single interface multi-channel implementation are in appendix C. Simula91
tion results confirm that the proposed protocol performs better as compared to MMAC-CR protocol for throughput and energy consumed per packet transmission without deteriorating the delay performance. Simulation results also show that the performance of these protocols depends upon the size of ATIM window. Thus, the design parameters for the protocol should be selected after careful analysis. Chapter 4 develops a Markov model for the analysis of the MAC protocol developed in chapter 3. It can be used to analyze the performance of any IEEE 802.11 PSM based cognitive MAC protocols. The analysis is presented to measure the channel capacity, MAC layer throughput and average MAC layer delays. Performance analysis is done to analyze the effect of cognitive user traffic, ATIM window size, number of channels available for cognitive users and primary user activity model. It is advisable to have flexible ATIM window size MAC protocol for fixed beacon interval system in cognitive networks. ATIM window size should vary with the variation in available channels and number of users. Lastly, solutions specific to cognitive wireless sensor networks are studied and presented in chapter 5. An energy efficient architecture which consists of a hierarchical minimum spanning tree is proposed in section 5.1. The proposed architecture provides a solution for routing and spectrum access in the network. The localization of primary users to avoid interference to hidden primary user is also proposed in section 5.2. The proposed localization technique is also energy efficient and guarantees zero interference to primary users.
6.2 Future Work On the basis of major findings of this project, there is ample scope for further research, which is discussed below. There are some improvements that can be done in the design of the cross layer solution proposed in this thesis by including other parameters in multi-objective cost function defined in equation 2.5. CCMMAC protocol could be improved to get better throughput by implementing dynamic selection of the ATIM window size based on the number of channels available to cognitive users. With the recent advancements in technology Machine-To-Machine (M2M) networks and Internetof-Things (IoT) are giving new vision for world. IoT is expected to offer advanced connectivity for devices, systems, and services that goes beyond M2M and covers a variety of protocols, domains, and applications. Cognitive radio and SDNs are the heart of IoT vision. Papers [81–83] propose different architectures for IoT. In general, an IoT network consists of smart object networks which are connected 92
to internet using access points as shown in figure 6.1. Most of the smart object networks of IoT operate in ad hoc manner and use cognitive radio techniques for communication. Protocol design in smart object
Internet User Access
Smart Object Networks
Figure 6.1: IoT Architecture networks of IoT is very similar to cognitive ad hoc networks. Thus, the cross layer solution developed in this thesis can be modified to suit the smart object networks of IoT.
93
Appendix A Cognitive Model Implemented in NS2
The cognitive model code with multi-interface support and single interface multi-channel support in NS2 can be downloaded from https://github.com/DeeptiSinghal/CR_NS2.git.
Adding Cognitive Model To implement the cognitive model three main classes (PUModel class, SpectrumManager class and Repository class) are added to the NS2 code. The functionality of these classes are discussed in the following subsections.
PUModel.[h,cc] This class describes the primary user activities on specific channels, including operating channel, physical location, and transmitting range. Primary user activity in each spectrum band is modeled as a sequence of ON and OFF periods over simulation time. All the information about primary users are contained in a log file, which is generated offline. The channel information, including their bandwidth, frequency and PER, is also contained in log file, which is also generated online. Names and use of functions in PUModel class are: // PUmodel creator PUmodel(); // Method for receiving command from OTCL int command(int argc, const char*const* argv); // Receiving packet method (NOT used) void recv(Packet*, Handler*);
94
// Return true if a primary user is transmitting in the same spectrum of the cognitive user bool is_PU_active(double timeNow, double ts, double x, double y, int channel); bool scan_PU_activity(double timeNow, double ts, int node_id, int channel,double prob_misdetect_) ; // Write the statistics about interference on primary user receivers void write_stat(int param); // Check if the tranmission of a cognitive user may cause interference to a primary user receiver void update_stat_pu_receiver(int id, double timeNow, double txtime, double x, double y, int
channel, double TX_POWER);
// Set Repository void setRepository(Repository* rep); // Method to read data from primary user file and save them in the pu_activity data structure void read_data(char * dir); // Method to check if a primary user is transmitting on a given spectrum at a given time bool check_active(double timeNow, double ts, int channel);
Listing A.1: PUModel class public functions
SpectrumManager.[h,cc] This class performs the main functionality of the cognitive cycle. It coordinates for three main functions of cognitive cycle: spectrum sensing, spectrum decision and the spectrum mobility. Spectrum decision implementation supports random allocation, sequential allocation or allocation at upper layers (like network layer). Names and use of functions in SpectrumManager class are: // Initialize a new Spectrum Manager SpectrumManager(Mac802_11 *mac, int id); SpectrumManager(Mac802_11 *mac, int id, double sense_time, double transmit_time, bool ChDecisionMAC); // Start method: cognitive user agent starts sensing activity on the current channel void start(); // Setup Functions void setPUmodel(double prob, PUmodel *p);
95
void setRepository(Repository* rep); // Return true if cognitive user is NOT doing sensing and is NOT doing spectrum handoff bool is_channel_available(); // Return true if cognitive user is NOT doing spectrum handoff bool is_channel_switching(); // Return true if a primary user is active while receiving the packet, on the same channel bool is_PU_interfering(Packet *p); // Update primary user interference bool update_pu_interference(int nodeid, double txpwr, double time_tx); // Handler for sensing timer void senseHandler(); // Handler for transmission timer: start sensing on the current channel void stopTransmitting(); // Start handoff timer void performHandoff(); // Handler for handoff management: start sensing on the new channel void endHandoff(); // Decide wheter to stay on the current channel or switch to a new channel bool decideSwitch(); // Get the next channel to be used, based on the allocation policy int decideSpectrum(int current_channel); // Perform sensing and return true if primary user activity is detected on the current channel bool sense(int id, double sense_time, double transmit_time, int channel);
Listing A.2: SpectrumManager class public functions
Repository.[h,cc] This class act as a repository for all the information related to the cognitive model. It enables information sharing among protocols at different layers. Names and use of functions in Repository class are: Repository(); int command(int argc, const char*const* argv); void recv(Packet*, Handler*);
96
// Set/Get Function for the Receiver Channel Table int get_recv_channel(int node); void set_recv_channel(int node, int channel); // To update the channel status void set_channel_busy(int node, int channel); void set_channel_free(int node, int channel); bool is_channel_free(int node, int channel); // To get the channel parameters double get_channel_bandwidth(int channel); double get_channel_frequency(int channel); double get_channel_per(int channel); // Set/Get Function for the Sender Channel Table void update_send_channel(int node, int channel, double time); bool is_channel_used_for_sending(int node, int channel, double timeNow); // Returns a random channel between 1 and MAX_CHANNELS int get_random_channel(); // read the current spectrum file, and load the information in the repository_table_spectrum_data void read_spectrum_file(char *fileName);
Listing A.3: Repository class public functions
Modification to support cognitive model Some of the changes in existing NS2 code are done to support the above discussed implementation of cognitive model. Changes are also done in wireless physical layer and MAC layer to support various carrier frequencies and to calculate transmission time for different bandwidth channels on the fly.
Modification in ns-lib.tcl Function node-CR-configure is added so that cognitive model classes can be associated with the MAC layer of node. Node/MobileNode instproc node-CR-configure { puMap rep } { $self instvar mac_ $self instvar ragent_ $mac_(2) set-pu-model $puMap
97
$mac_(0) setRepository $rep $mac_(1) setRepository $rep $mac_(2) setRepository $rep $ragent_ setRepository $rep $mac_(2) sensing-start 0 }
Listing A.4: Modification in ns-lib.tcl
Modification in packet.h • New packet type PT NOTIFICATION is added to send notification to upper layers about interface change and other updates from MAC layer code. • ‘int channel ’ variable is added in struct hdr cmn which is initialized as zero in ‘inline Packet* Packet::alloc()’ function with ‘(HDR CMN(p))− >channel = 0’.
Modification in queue.[h,cc] • Function ‘void resume(int channel);’ is added. This function is called by MAC Layer when a new packet has been sent to upper layers or a new packet has to be sent down. • Function ‘Packet* dequePacket from channel(int channel);’ is added to deque packets which needs to sent on specific channel. • Function ‘QueueHandler::handle’ is updated so that the correct resume function can be called. Similarly function ‘Queue::recv’ is updated so that ‘dequePacket from channel’ function is called in place of ‘deque’ function.
Modification in mac-802 11.[h,cc] • Below are the functions added in mac-802 11 class. // Load the spectrum characteristics for the actual channel (bandwidth, PER etc.) void load_spectrum(spectrum_entry_t spectrum);
// Notify the detection of a primary user on the actual channel
98
void notifyUpperLayer(int channel);
// Handler for SwitchQueueTimer void
switchqueueHandler();
// Handler for SwitchChannelTimer void
switchchannelHandler();
Listing A.5: Modification in mac-802 11 class
• SpectrumManager class is associated with its MAC layer using ‘sm = new SpectrumManager(this,index /MAX RADIO,0.1,1.0)’ in its constructor. • Below is the code added in command function of the MAC layer. // Set the actual cross-layer repository else if (strcmp(argv[1], "setRepository") == 0) { repository_ = (Repository*) TclObject::lookup(argv[2]); if (index_%MAX_RADIO == RECEIVER_RADIO) sm_->setRepository(repository_); return (TCL_OK); }
// Setting the PUmodel for the cognitive user else if (strcasecmp (argv[1], "set-pu-model") == 0) { if (index_%MAX_RADIO == RECEIVER_RADIO)
{
pumodel_ = (PUmodel *) TclObject::lookup(argv[2]); sm_->setPUmodel(0.1, pumodel_); } return TCL_OK; }
// Start sensing activity else if (strcasecmp (argv[1], "sensing-start") == 0) { if (index_%MAX_RADIO == RECEIVER_RADIO) sm_->start(); return TCL_OK; }
99
Listing A.6: Modification in mac-802 11 class • A channel number is set and stored in common header before scheduling packet for physical layer. • Transmission time of a packet changes with the change in carrier frequency of band in multichannel environment. Thus, transmission time calculations should be updated. Listing A.7 shows the time calculation for pktTx packet. timeout = txtime(pktTx_) + DSSS_MaxPropagationDelay + phymib_.getSIFS() + txtime(phymib_.getACKlen(), basicRate_) + DSSS_MaxPropagationDelay; //changed to double band ; if (hdr_cmn::access(pktTx_)->ChannelIndex() == -1) band = basicRate_; else { MobileNode *Nnode = (MobileNode*)Node::get_node_by_address(addr()); band = Nnode->repository_table_spectrum_data[hdr_cmn::access(pktTx_)-> ChannelIndex()].bandwidth; } timeout = txtime(pktTx_) + DSSS_MaxPropagationDelay + phymib_.getSIFS() + txtime(phymib_.getACKlen(), band ) + DSSS_MaxPropagationDelay;
Listing A.7: Modification in mac-802 11 class
Modification in mac-timers.[h,cc] Timers for switching queue (SwitchQueueTimer) and channel (SwitchChannelTimer) are added which respectively call the switchqueueHandler and switchchannelHandler functions added in mac802 11.
Modification in wireless-phy.cc In the original wireless physical layer code in NS2, lamda is a fixed value. While in cognitive environment, value of lamda should be changed with the change in carrier frequency. Calculation of lamda is done as: 100
//In void WirelessPhy::sendDown(Packet *p) function if ( hdr_cmn::access(p)->freq() != 0) { lambda_ = SPEED_OF_LIGHT / (hdr_cmn::access(p)->freq()); } else { lambda_ = SPEED_OF_LIGHT / freq_; } //In int WirelessPhy::sendUp(Packet *p) function lambda_ = p->txinfo_.getLambda();
Listing A.8: Modification in wireless-phy.cc class
Modification in tworayground.cc Here also lamda should be changed with the change in carrier frequency. //In double TwoRayGround::Pr(PacketStamp *t, PacketStamp *r, WirelessPhy *ifp) function double lambda = ifp->getLambda();
// wavelength
//Changed to double lambda = t->getLambda(); // wavelength
Listing A.9: Modification in tworayground.cc class
Modification in shadowing.cc Here also lamda should be changed with the change in carrier frequency. //In double Shadowing::Pr(PacketStamp *t, PacketStamp *r, WirelessPhy *ifp) function double lambda = ifp->getLambda();
// wavelength
//Changed to double lambda = t->getLambda();
// wavelength
Listing A.10: Modification in tworayground.cc class
Changes on Scenario Script Below code is used to configure nodes with cognitive functionality. 101
$node($i) node-CR-configure $pumap $repository $val(nCH)
Listing A.11: Creating a number of nodes with cognitive model
Modification in Makefile.in Add below mentioned files for compilation in Makefile. cognitive/SpectrumManager.o \ cognitive/PUmodel.o \ cognitive/repository.o \
Listing A.12: Modification in Makefile
102
Appendix B Multi-interface Implementation in NS2
This appendix presents the details about implementing multi-interface support in NS2 as referred in chapter 2. In the multi-interface implementation, routing agent of mobile node is connected to multiple blocks containing link layer, interface queue, mac agent, network interface. More details about the topic can be found in [84].
TCL changes Most of the changes are needed in the TCL code for implementation of multi-interface implementation.
Changes in ns-lib.tcl To support multi-interface implementation, we need to create four new functions in ns-lib.tcl. The first function (Listing B.1) is called before creating the wireless node, and allows the user to specify a different number of interfaces per node. This function is called from the scenario script. Simulator instproc change-numifs {newnumifs} { $self instvar numifs_ set numifs_ $newnumifs }
Listing B.1: Function to change the number of interfaces Second function (Listing B.2) is used to get the number of interfaces from other parts of the TCL coding. Simulator instproc get-numifs { } { $self instvar numifs_
103
if [info exists numifs_] { return $numifs_ } else { return "" } }
Listing B.2: Function to get the number of interfaces Third function (Listing B.3) is used to add a channel on a node. This function is also called from scenario script before the node is created. Here ‘index’ is the number of node and ‘ch’ is the channel to be added. Simulator instproc add-channel {index ch} { $self instvar chan puts "Adding Channel number $index"; set chan($index) $ch }
Listing B.3: Function to add an interface on a node The last function (Listing B.4) is used to add the number of interfaces as an argument to the node-config command of the TCL script. Simulator instproc ifNum {val} { $self set numifs_ $val }
Listing B.4: Function to add multiple interfaces as an argument to node-config label In addition to the above added functions, two of the already existing functions need to be modified. The first one is node-config. In this function, first we have to add the numifs variable to the list of arguments passed to the function as listed in listing B.5. $self instvar addressType_
routingAgent_ propType_
macTrace_ \
routerTrace_ agentTrace_ movementTrace_ channelType_ channel_ \ # Changed to $self instvar addressType_
routingAgent_ propType_
macTrace_ \
routerTrace_ agentTrace_ movementTrace_ channelType_ channel_ numifs_ \
Listing B.5: Changes in node-config function
104
In this function, originally chan variable is initialized as a single variable; this specification should be changed as shown in listing B.6. set chan $channel_ # Changed to if { [info exists numifs_]} { set chan(0) $channel_ } else { set chan $channel_ }
Listing B.6: Changes in node-config function Second function to be modified is create-wireless-node. First we have to add the numifs variable to the list of arguments passed to the function as listed in listing B.7. $self instvar routingAgent_ wiredRouting_ propInstance_ llType_ \ macType_ ifqType_ ifqlen_ phyType_ chan antType_ \ energyModel_ initialEnergy_ txPower_ rxPower_ \ idlePower_ sleepPower_ sleepTime_ transitionPower_ transitionTime_ \ topoInstance_ level1_ level2_ inerrProc_ outerrProc_ FECProc_ # Changed to $self instvar routingAgent_ wiredRouting_ propInstance_ llType_ \ macType_ ifqType_ ifqlen_ phyType_ chan antType_ \ energyModel_ initialEnergy_ txPower_ rxPower_ \ idlePower_ sleepPower_ sleepTime_ transitionPower_ transitionTime_ \ topoInstance_ level1_ level2_ inerrProc_ outerrProc_ FECProc_ numifs_
Listing B.7: Changes in node-config function When the multi-interface extension is being used, the add-interface function (defined in the ns-mobilenode.tcl) has to be called as many times as the number of interfaces added to the node as listed in B.8. $node add-interface $chan(0) $propInstance_ $llType_ $macType_ \ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ \ $inerrProc_ $outerrProc_ $FECProc_ # Changed to if { [info exist numifs_] } { for {set i 0} {$i < $numifs_} {incr i} { $node add-interface $chan($i) $propInstance_ $llType_ $macType_ \ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ \
105
$inerrProc_ $outerrProc_ $FECProc_ } } else { $node add-interface $chan(0) $propInstance_ $llType_ $macType_ \ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ \ $inerrProc_ $outerrProc_ $FECProc_ }
Listing B.8: Changes in node-config function Listing B.9 defines the way to notify routing agent about number of interfaces used in simulation. if {[info exist numCHs_]} { $ragent numChannel $numCHs_ }
Listing B.9: Changes in node-config function
Changes in ns-mobilenode.tcl The first function which was modified is add-target. In this function, first get-numifs function defined in ns-lib.tcl is called to get the number of interface added as listed in listing B.10. set numIfsSimulator [ $ns get-numifs ]
Listing B.10: Changes in add-target of ns-mobilenode.tcl Later, if-queue command of the routing agent is called as many times as the number of interfaces the node has as listed in listing B.11. $agent if-queue [$self set ifq_(0)] # Changed to if {$numIfsSimulator != ""} { for {set i 0} {$i < [$self set nifs_]} {incr i} { $agent if-queue $i [$self set ifq_($i)] } }
Listing B.11: Changes in add-target of ns-mobilenode.tcl The second function that needs to be modified is the add-target-rtagent. As we did before, we use the get-numifs function to get the number of interfaces that the node has. 106
set numIfsSimulator [ $ns get-numifs ]
Listing B.12: Changes in add-target-rtagent of ns-mobilenode.tcl We later use this variable so as to link the routing agent with the corresponding link layer entities (ll ). $agent target $sndT $sndT target [$self set ll_(0)] # Changed to if {$numIfsSimulator != ""} { for {set i 0} {$i < [$self set nifs_]} {incr i} { if {$newapi != ""} { set sndT [$self mobility-trace Send "RTR"] } else { set sndT [cmu-trace Send "RTR" $self] } $agent target $i $sndT $sndT target [$self set ll_($i)] } } else { $agent target $sndT $sndT target [$self set ll_(0)] }
Listing B.13: Changes in add-target-rtagent of ns-mobilenode.tcl The last function that needs to be modified is the add-interface. Originally one ARP table per node was created, now we need to add one ARP table per interface. This change is listed in listing B.14. if { $arptable_ == "" } { set arptable_ [new ARPTable $self $mac] # FOR backward compatibility sake, hack only if {$imepflag != ""} { set drpT [$self mobility-trace Drop "IFQ"] } else { set drpT [cmu-trace Drop "IFQ" $self] } $arptable_ drop-target $drpT if { $namfp != "" } { $drpT namattach $namfp
107
} } # Changed to if { $arptable_ == "" } { set arptable_($t) [new ARPTable $self $mac_($t)] set arptable $arptable_($t) $sndT target [$self set ll_(0)] if {$imepflag != ""} { set drpT [$self mobility-trace Drop "IFQ"] } else { set drpT [cmu-trace Drop "IFQ" $self] } $arptable drop-target $drpT if { $namfp != "" } { $drpT namattach $namfp } }
Listing B.14: Changes in add-interface of ns-mobilenode.tcl This latter affects the way the MobileNode is created and reset as shown in listing B.15 and B.16. Node/MobileNode instproc init args { eval $self next $args $self instvar nifs_ arptable_ X_ Y_ Z_ nodetype_ set X_ 0.0 set Y_ 0.0 set Z_ 0.0 #set arptable_ "" set nifs_ 0
;# no ARP table yet ,original
;# number of network interfaces
$self makemip-New$nodetype_ }
Listing B.15: Changes in init of ns-mobilenode.tcl Node/MobileNode instproc reset {} { $self instvar arptable_ nifs_ netif_ mac_ ifq_ ll_ imep_ for {set i 0} {$i < $nifs_} {incr i} { $netif_($i) reset $mac_($i) reset $ll_($i) reset
108
$ifq_($i) reset if { [info exists opt(imep)] && $opt(imep) == "ON" } { $imep_($i) reset } if { $arptable_($i) != "" } { $arptable_($i) reset } } }
Listing B.16: Changes in reset of ns-mobilenode.tcl
C++ changes Some of the changes in C++ code are also needed to adapt to multi-interface implementation. These changes are presented here.
Changes in mobilenode.[cc,h] Originally the nodes are connected to a channel by means of two pointers, one to store the address of previous node and another to store the address of next node. To support multi-interface implementation these pointers are changed to the array of pointers as listed in B.17. MobileNode* nextX_; MobileNode* prevX_; // Changed to MobileNode* nextX_[MAX_CHANNELS]; MobileNode* prevX_[MAX_CHANNELS];
Listing B.17: Changes in mobilenode.h The original inline getLoc function did not work properly with all the changes done to implement multi-interface. So, it is modified as listed in listing B.18. inline void getLoc(double *x, double *y, double *z) { update_position(); *x = X_; *y = Y_;
109
*z = Z_; } // Changed to // In mobilenode.h void getLoc(double *x, double *y, double *z); // In mobilenode.cc void MobileNode::getLoc(double *x, double *y, double *z) { update_position(); *x = X_; *y = Y_; *z = Z_; }
Listing B.18: Changes in mobilenode.h-cc
Changes in channel.cc The two arrays mentioned in listing B.17 are used to manage the corresponding node lists in channel.cc. This is updated as shown in listing B.19. # Change all nextX_ to nextX_[this->index()] and # Change all prevX_ to prevX_[this->index()]
Listing B.19: Changes in channel.cc Before scheduling packets, it is checked that the node’s interface is connected to the channel. If it is connected then only packet reception is scheduled. This change is listed in listing B.20. s.schedule(rifp, newp, propdelay); // Changed to rifp = (rnode->ifhead()).lh_first; for(; rifp; rifp = rifp->nextnode()){ if (rifp->channel() > 0) { s.schedule(rifp, newp, propdelay); } }
Listing B.20: Changes in channel.cc
110
Changes in mac-802 11.cc The last change in the C++ code is needed to identify the interface through which a packet was received. This is done by registering the correct MAC receiving interface within the recv method of mac-802 11.cc as shown in listing B.21. if(tx_active_ && hdr->error() == 0) { hdr->error() = 1; } hdr-face() = addr(); //Added this line if(rx_state_ == MAC_IDLE) {
Listing B.21: Changes in mac-802 11.cc
Changes in Routing Protocol In this section we show how a routing agent adapts to the multi-interface structure.
Changes in routing agent implementation Instead of using the single ifqueue and target in routing agent, we declare two arrays targetlist and ifqueuelist as shown in listing B.22. For this MAX IF needs to be declared beforehand. NsObject
*targetlist[MAX_IF];
PriQueue
*ifqueuelist[MAX_IF];
Listing B.22: Changes in routingAgent.h The next step would be to modify the command function of the routing agent class to initialize the values of the ifqueuelist and targetlist as shown in B.23. else if (argc == 4){ if(strcmp(argv[1], "if-queue") == 0) { printf("[DS-ROUTE] ifqueuelist set for node %d :\n",index); ifqueue = (PriQueue*) TclObject::lookup(argv[3]); int temp_=atoi(argv[2]); if (temp_==nIfaces){ nIfaces++; }
111
ifqueuelist[temp_]= ifqueue; if (ifqueuelist[temp_]){ return TCL_OK; } return TCL_ERROR; } if (strcmp(argv[1],"target")==0 ){ int temp=atoi(argv[2]); if (temp == nIfaces){ nIfaces++; } targetlist[temp]=(NsObject *) TclObject::lookup(argv[3]); //fprintf(stdout,"sono %d sto attivando lo stato dell’interfaccia %d\n",index, temp); interface_state[temp]=1; if(targetlist[temp]) { return TCL_OK; } return TCL_ERROR; } }
Listing B.23: Changes in command method of the routing agent class Modification related to send a broadcast packet is listed in B.24. Scheduler::instance().schedule(target_, pkt, jitter); //Changed to if(nIfaces) { for(int i=0;icopy(); Scheduler::instance().schedule(targetlist[i], p_copy, jitter); } } else { Scheduler::instance().schedule(target_, pkt, jitter); }
Listing B.24: To send a broadcast packet
112
Modification related to send a unicast packet on Iface interface is listed in B.25. Scheduler::instance().schedule(target_, pkt, jitter); //Changed to if(nIfaces) { Scheduler::instance().schedule(targetlist[Iface], p_copy, jitter); } else { Scheduler::instance().schedule(target_, pkt, jitter); }
Listing B.25: To send a unicast packet Before adding any route to routing packet, its receiving interface can be obtained with the code listed in B.26. if(nIfaces) { Iface= ch->iface()-((Mac *)ifqueuelist[0]->target())->addr(); } else { Iface = -1; }
Listing B.26: Getting the interface index
Changes in the Route Table The interface (u int8 t rt interface ;) is also added in to the routing table as only the next node information (nextnode) is not enough for forwarding the data in multi-interface environment. The corresponding function to add and/or update the routing table should be updated.
Changes in Scenario Script At the beginning of the script we must specify the number of interfaces to be added as: set val(ni) 3; #Number of interfaces set val(nn) 10; #Number of users
Listing B.27: Initialization of number of interfaces
113
The creation of wireless channels should be put in the loop to create as many interfaces as specified in the above listing. for {set i 0} {$i < $val(ni) } {incr i } { set chan_($i) [ new $val (chan) ] }
Listing B.28: Creation of wireless channels In order to ensure that an appropriate memory management is performed, the initialization of the god is updated as: create-god [expr $val(nn)*$val(ni)]
Listing B.29: Initialization of the god Adding ifNum option to the node-config function call to add multiple interfaces to node as shown below: $ns node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propInstance $prop \ -phyType $val(netif) \ -topoInstance $topo \ -ifNum $val (ni)
Listing B.30: Initialization of the god Listing B.31 shows a way to configure all nodes to use the same number of interfaces. $ns change-numifs $val(ni) for {set i 0} {$i < $val(ni)} {incr i} { $ns add-channel $i $chan($i) } for {set i 0} {$i < $val(nn) } {incr i} { set node($i) [$ns node] $node($i) random-motion 0
;# disable random motion
}
114
Listing B.31: Creating a number of nodes with same number of interfaces Listing B.32 shows a way to create two nodes with different number of interfaces. # Adding 2 interface at node 0 $ns change-numifs 2 $ns add-channel 0 $chan(0) $ns add-channel 1 $chan(2) set node(0) [$ns node] $node(0) random-motion 0 # Adding 1 interface at node 1 $ns change-numifs 1 $ns add-channel 0 $chan(0) set node(1) [$ns node] $node(1) random-motion 0
Listing B.32: Creating two nodes with different number of interfaces
115
Appendix C Single Interface Multiple Channel Implementation in NS2
This appendix presents the details about implementing single interface multi-channel support in NS2 as referred in chapter 3. In this implementation multiple channels are connected to node’s physical layer. Thus, most of the modifications are done in physical layer implementation and channel implementation.
TCL changes Changes in ns-lib.tcl To support single interface multi-channel implementation, we need to create four new functions in ns-lib.tcl. These functions and their usage is listed in listing C.1. # Procedure to specify different number of channels per node Simulator instproc change-numCHs {newnumCHs} { $self instvar numCHs_ puts "Number of Channels set to $newnumCHs"; set numCHs_ $newnumCHs }
# Procedure to get the number of channels from other parts of the TCL coding Simulator instproc get-numCHs { } { $self instvar numCHs_ if [info exists numCHs_] { return $numCHs_ } else { return "" } }
116
# Procedure to get the channel given the its index from other parts of the TCL coding Simulator instproc get-channel {index} { $self instvar chan return $chan($index) }
# Procedure to add multiple channels as an argument to node-config label Simulator instproc ChannelNum {val} { $self set numCHs_ $val }
Listing C.1: Functions to change the number of interfaces In addition to the above added functions, two of the already existing functions need to be modified. The first one is node-config. In this function, first we have to add the numCHs variable to the list of arguments passed as listed in listing C.2. $self instvar addressType_
routingAgent_ propType_
macTrace_ \
routerTrace_ agentTrace_ movementTrace_ channelType_ channel_ numifs_\ # Changed to $self instvar addressType_
routingAgent_ propType_
macTrace_ \
routerTrace_ agentTrace_ movementTrace_ channelType_ channel_ numifs_ numCHs_\
Listing C.2: Changes in node-config function In this function, originally chan variable is initialized either as a single variable or based on number of interfaces; this specification should be changed to include the single interface multi-channel case as shown in listing C.3. if { [info exists numifs_]} { set chan(0) $channel_ } else { set chan $channel_ } # Changed to if { [info exists numifs_]} { set chan(0) $channel_ } elseif { [info exists numCHs_]} {
117
if {[info exists chan]} { puts "chan already defined, error!" } set chan(0) $channel_ } else { set chan(0) $channel_ }
Listing C.3: Changes in node-config function Second function to be modified is create-wireless-node. First, we have to add the numCHs variable to the list of arguments passed as listed in listing C.4. $self instvar routingAgent_ wiredRouting_ propInstance_ llType_ \ macType_ ifqType_ ifqlen_ phyType_ chan antType_ \ energyModel_ initialEnergy_ txPower_ rxPower_ \ idlePower_ sleepPower_ sleepTime_ transitionPower_ transitionTime_ \ topoInstance_ level1_ level2_ inerrProc_ outerrProc_ FECProc_
numifs_
# Changed to $self instvar routingAgent_ wiredRouting_ propInstance_ llType_ \ macType_ ifqType_ ifqlen_ phyType_ chan antType_ \ energyModel_ initialEnergy_ txPower_ rxPower_ \ idlePower_ sleepPower_ sleepTime_ transitionPower_ transitionTime_ \ topoInstance_ level1_ level2_ inerrProc_ outerrProc_ FECProc_ numifs_ numCHs_
Listing C.4: Changes in node-config function In create-wireless-node function, the add-interface function call has to be updated as listed in C.5. if { [info exist numifs_] } { for {set i 0} {$i < $numifs_} {incr i} { $node add-interface $chan($i) $propInstance_ $llType_ $macType_ \ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ \ $inerrProc_ $outerrProc_ $FECProc_ } } else { $node add-interface $chan(0) $propInstance_ $llType_ $macType_ \ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ \ $inerrProc_ $outerrProc_ $FECProc_ }
118
# Changed to if { [info exist numifs_] } { for {set i 0} {$i < $numifs_} {incr i} { $node add-interface $chan($i) $propInstance_ $llType_ $macType_ \ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ \ $inerrProc_ $outerrProc_ $FECProc_ } } else { if { [info exists numCHs_]} { $node add-interface $chan(0) $propInstance_ $llType_ $macType_ \ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ \ $inerrProc_ $outerrProc_ $FECProc_ } else { $node add-interface $chan(0) $propInstance_ $llType_ $macType_ \ $ifqType_ $ifqlen_ $phyType_ $antType_ $topoInstance_ \ $inerrProc_ $outerrProc_ $FECProc_ } }
Listing C.5: Changes in node-config function Listing C.6 defines the way to notify routing agent about number of channels used in simulation. This code is also added in create-wireless-node function. if {[info exist numCHs_]} { $ragent numChannel $numCHs_ }
Listing C.6: Changes in node-config function
Changes in ns-mobilenode.tcl In this file add-interface function is updated to support multi-channel implementation. Listing C.7 shows the modification needed and their usage. # Get the number of channels defined through scenario script set channelnum [$ns get-numCHs] # ========================================= # Getting all the channels defined in ns-lib.tcl or scenario script
119
if {$channelnum!=""} { for { set j 0} {$j < $channelnum} {incr j} { set channel_($j) [$ns get-channel $j] } } else { set channel [$ns get-channel 0] } # ========================================= # To pass the number of channels to ARP table code if {$channelnum!=""} { $arptable numChannel $channelnum } # ========================================= # Below update pass the channel information to physical layer. Originally single channel information was passed. The update pass information about multiple channels in multi-channel case if {[info exists channel]} { $netif channel $channel } #changed to if {$channelnum!=""} {
;# for every single-interface, add multi-channel
for { set i 0} {$iifhead()).lh_first; for(; rifp; rifp = rifp->nextnode()){ if (rifp->channel() > 0) { s.schedule(rifp, newp, propdelay); } } //changed to rifp = (rnode->ifhead()).lh_first; for(; rifp; rifp = rifp->nextnode()){
122
if (rifp->getchannelnum() > 0) { if(rifp->getmultichannel(this->index()) == this){ s.schedule(rifp, newp, propdelay); } } else { if(rifp->channel()==this){ s.schedule(rifp, newp, propdelay); } } }
Listing C.10: Changes in channel.cc
Changes in phy.[h,cc] Listing C.11 shows the modification done in phy.h. In this file three protected variables are defined: nchannel to store number of channels supported, ChannelIndex to store the current channel index, and multichannel to store pointers to channels. Also two functions, getmultichannel (return the channel given its index) and getchannelnum (return the total number of channels), are added. Channel *multichannel[MAX_IF]; int nchannel; int ChannelIndex;
virtual Channel* getmultichannel(int index) const { return multichannel[index]; }
inline int getchannelnum() { return nchannel; }
Listing C.11: Changes in phy.h Listing C.12 shows the modifications done in phy.cc. //Initialization of added variables. This should be added in Phy::Phy()
123
nchannel=0; for(int i=0;i 0 )
{
{
multichannel[chnl->index()] = chnl; } else { channel_ = chnl; } }
Listing C.12: Changes in phy.cc
Changes in topography.[h,cc] In topography class also, nchannel and multichannel are defined to store number of channels supported and pointers to those channels. Definition and initialization of these variable are listed in listing C.13. //
Definition of added variables
int nchannels; WirelessChannel *multichannel_[MAX_CHANNEL];
124
// Initialization of added variables. Below case is added in Topography() function nchannels=0; for(int i=0;iupdateNodesList(mn, oldX); } // Changed to void Topography::updateNodesList(class MobileNode* mn, double oldX) { if(nchannels==0) { channel_->updateNodesList(mn, oldX); } else { for(int i=0;iupdateNodesList(mn, oldX); } } }
Listing C.14: Changes in topography.cc
Changes in Routing Protocol In this section we show how a routing agent adapts to the single interface multi-channel structure. Modification related to send a broadcast packet is listed in C.15. if(nIfaces) { for(int i=0;icopy(); Scheduler::instance().schedule(targetlist[i], p_copy, jitter); } } else { Scheduler::instance().schedule(target_, pkt, jitter); }
125
//Changed to if(nIfaces) { for(int i=0;icopy(); Scheduler::instance().schedule(targetlist[i], p_copy, jitter); } Packet :: free(p) ; } else if (numCHs) { for(int i=0;icopy(); hdr_cmn::access(p_copy)->channelindex_ = i; Scheduler::instance().schedule(target_, p_copy, jitter); //Arafat } Packet :: free(p) ; } else { Scheduler::instance().schedule(target_, pkt, jitter); }
Listing C.15: To send a broadcast packet Modification related to send a unicast packet on CH channel is listed in C.16. if(nIfaces) { Scheduler::instance().schedule(targetlist[Iface], p_copy, jitter); } else { Scheduler::instance().schedule(target_, pkt, jitter); } //Changed to if(nIfaces) { Scheduler::instance().schedule(targetlist[Iface], p_copy, jitter); } else if (numCHs) { ch->channelindex_ = CH; Scheduler::instance().schedule(target_, p, delay); } else {
126
Scheduler::instance().schedule(target_, pkt, jitter); }
Listing C.16: To send a unicast packet Before adding any route to routing packet, its receiving channel can be obtained with the code listed in C.17. if(nIfaces) { Iface= ch->iface()-((Mac *)ifqueuelist[0]->target())->addr(); } else if (numCHs) { Iface = ch->ChannelIndex(); } else { Iface = -1; }
Listing C.17: Getting the interface index
Changes in Scenario Script At the beginning of the script we must specify the number of channels to be added as: set val(nCH) 3; #Number of channel set val(nn) 10; #Number of users
Listing C.18: Initialization of number of channels The creation of wireless channels should be put in the loop to create as many channels as specified in the above listing. for {set i 0} {$i < $val(nCH) } {incr i } { set chan_($i) [ new $val (chan) ] }
Listing C.19: Creation of wireless channels In order to ensure that an appropriate memory management is performed, the initialization of the god is updated as: 127
create-god [expr $val(nn)*$val(nCH)]
Listing C.20: Initialization of the god Adding ChannelNum option to the node-config function call to add multiple channels to node as shown below: $ns node-config -adhocRouting $val(rp) \ -llType $val(ll) \ -macType $val(mac) \ -ifqType $val(ifq) \ -ifqLen $val(ifqlen) \ -antType $val(ant) \ -propInstance $prop \ -phyType $val(netif) \ -topoInstance $topo \ -ChannelNum $val (nCH)
Listing C.21: Adding multiple channels to node Listing C.22 shows a way to configure all nodes to use the same number of channels. $ns change-numCHs $val(ni) for {set i 0} {$i < $val(ni)} {incr i} { $ns add-channel $i $chan($i) } for {set i 0} {$i < $val(nn) } {incr i} { set node($i) [$ns node] for {set j 0} {$j < $val(nCH)} {incr j} { $node($i) ChannelBandwith $j $Bandwidth($j) $node($i) ChannelFrequency $j $Frequency($j) $node($i) ChannelPer $j $Per($j) } $node($i) random-motion 0
;# disable random motion
}
Listing C.22: Creating a number of nodes with same number of channels Listing C.23 shows a way to create two nodes with different number of channels. # Adding 2 interface at node 0
128
$ns change-numCHs 2 $ns add-channel 0 $chan(0) $ns add-channel 1 $chan(2) set node(0) [$ns node] $node(0) ChannelBandwith 0 900000 $node(0) ChannelFrequency 0 2404500000 $node(0) ChannelPer 0 0.0 $node(0) ChannelBandwith 1 100000 $node(0) ChannelFrequency 1 2409600000 $node(0) ChannelPer 1 0.0 $node(0) random-motion 0 # Adding 1 interface at node 1 $ns change-numCHs 1 $ns add-channel 0 $chan(0) set node(1) [$ns node] $node(0) ChannelBandwith 0 900000 $node(0) ChannelFrequency 0 2404500000 $node(0) ChannelPer 0 0.0 $node(1) random-motion 0
Listing C.23: Creating two nodes with different number of channels
129
Related Publications
Book Chapters • Sumit Kumar, Deepti Singhal, and Rama Murthy Garimella. Cognitive wireless sensor networks. In Qi Hao Fei Hu, editor, Intelligent Sensor Networks: The Integration of Sensor Networks, Signal Processing, and Machine Learning. CRC Press, 2012.
• Deepti Singhal, Chandan Pradhan, Kunal Sankhe, and Rama Murthy Garimella. Cognitive radio networks: Issues and solutions. In Ali Diab, editor, Handbook of Research on Self-Organized Mobile Communication Technologies. IGI Global, Accepted.
Journal • Deepti Singhal and Rama Murthy Garimella. Cognitive cross-layer multipath probabilistic routing for cognitive networks. Wireless Networks, 21(4):11811192, May 2015.
• Sumit Kumar, Deepti Singhal, and Rama Murthy Garimella. Doubly cognitive architecture based cognitive wireless sensor networks. International Journal of Wireless Networks and Broadband Technologies (IJWNBT), 1(2):3035, April 2011.
• Deepti Singhal and Rama Murthy Garimella. Markov Modeling for Performance Analysis of Cognitive MAC Protocol with Power Saving Mode. Submitted in Springer Wireless Personal Communications. 130
Conference • Deepti Singhal and Rama Murthy Garimella. Energy efficient cognitive cross-layer MAC protocol. In International Conference on Advances in Computing, Communications and Informatics (ICACCI), pp.987-992, 10-13 Aug. 2015. doi: 10.1109/ICACCI.2015.7275739 • Deepti Singhal, M.K. Sharma, and Rama Murthy Garimella. Energy efficient localization of primary users for avoiding interference in cognitive networks. In International Conference on Computer Communication and Informatics (ICCCI), pages 15, Jan 2012. • Deepti Singhal, S. Barjatiya, and Rama Murthy Garimella. A novel network architecture for cognitive wireless sensor network. In International Conference on Signal Processing, Communication, Computing and Networking Technologies (ICSCCN), pages 7680, July 2011. • Deepti Singhal and Rama Murthy Garimella. Simple median based information fusion in wireless sensor network. In International Conference on Computer Communication and Informatics (ICCCI), pages 17, Jan 2012.
131
Abbreviations
ACE-L
Algorithm for Cluster head Election by Localization
ASAR
Ant-based Spectrum Aware Routing
ATIM
Ad hoc Traffic Indication Message
ATIM-RES
ATIM Reservation
BTMA
Busy Tone Multiple Access
CAD
Channel Aggregation Diversity
CAODV
Cognitive Ah-hoc On-demand Distance Vector
CCC
Common Control Channel
CCM-MAC
Cognitive Cross-layer Multi-channel MAC
CCMPR
Cognitive Cross-layer Multipath Probabilistic Routing
CH
Cluster Head
CRAN
Cognitive Radio Ad hoc Network
CR-CSMA/CA
Cognitive-Radio-based Carrier Sense Medium Access with Collision Avoidance
CREAM-MAC
Cognitive Radio-EnAbled Multi-Channel MAC
CRN
Cognitive Radio Networks
CRP
Cognitive Routing Protocol
CSMA/CA
Carrier Sense Multiple Access with Collision Avoidance
CWSN
Cognitive Wireless Sensor Network
DBTMA
Dual Busy Tone Multiple Access
DCF
Distributed Coordination Function
DCF
Distributed Coordination Function
DIFS
DCF Inter-frame Space
DOSS
Dynamic Open Spectrum Sharing
DSA
Dynamic Spectrum Allocation
132
DSSS
Direct Sequence Spread Spectrum
DZP
Dead Zone Penetration
FCC
Federal Communications Commission
FIFO
First-in first-out
GPS
Global Positioning System
IBSS
Independent Basic Service Set
IoT
Internet of Things
M2M
Machine To Machine
MST
Minimum Spanning Tree
NS2
Network Simulator 2
OPERA
Optimal Primary-awarE Route quAlity
PCF
Point Coordination Function
PCL
Preferable Channel List
PDR
Packet Delivery Ratio
PSM
Power Saving Mode
RERR
Route Error
RREP
Route Reply
RREQ
Route Request
RTT
Round Trip Time
SBP
Sector Broadcast Packet
SEARCH
SpEctrum Aware Routing protocol for Cognitive ad-Hoc networks
SIFS
Short Inter-frame Space
SIP
Spectral Image of Primary users
SRP
Scan Result Packet
SRP
Scan Result Packet
SS
Spectrum Sensing
SSRC
Station Short Retry Count
TSF
Time Synchronization Function
WSM
Weighted Sum Method
WSN
Wireless Sensor Network
133
References
[1] FCC Spectrum Policy Task Force. FCC Report of the Spectrum Efficiency Working Group. Nov. 2002. [2] Secondary Markets Initiative. [3] J. Mitola and Jr. Maguire, G.Q. Cognitive radio: making software radios more personal. Personal Communications, IEEE, 6(4):13–18, 1999. [4] Ian F. Akyildiz, Won-Yeol Lee, Mehmet C. Vuran, and Shantidev Mohanty. Next generation/dynamic spectrum access/cognitive radio wireless networks: a survey. Comput. Netw., 50:2127– 2159, September 2006. [5] R.W. Thomas, L.A. DaSilva, and A.B. MacKenzie. Cognitive networks. In New Frontiers in Dynamic Spectrum Access Networks, 2005. DySPAN 2005. 2005 First IEEE International Symposium on, pages 352–360, Nov 2005. [6] R.W. Thomas, D.H. Friend, L.A. DaSilva, and A.B. MacKenzie. Cognitive networks: adaptation and learning to achieve end-to-end performance objectives. Communications Magazine, IEEE, 44(12):51–57, Dec 2006. [7] Ian F. Akyildiz, Won-Yeol Lee, and Kaushik R. Chowdhury. CRAHNs: Cognitive Radio Ad Hoc Networks. Ad Hoc Netw., 7(5):810–836, July 2009. [8] A.S. Zahmati, S. Hussain, X. Fernando, and A. Grami. Cognitive Wireless Sensor Networks: Emerging Topics and Recent Challenges. In Science and Technology for Humanity (TIC-STH), 2009 IEEE Toronto International Conference, pages 593 –596, 2009. 134
[9] K.-L.A. Yau, P. Komisarczuk, and P.D. Teal. Cognitive radio-based wireless sensor networks: Conceptual design and open issues. In Local Computer Networks, 2009. LCN 2009. IEEE 34th Conference on, pages 955 –962, oct. 2009. [10] Google spectrum database. [11] H. Khalife, N. Malouch, and S. Fdida. Multihop cognitive radio networks: to route or not to route. Network, IEEE, 23(4):20–25, July 2009. [12] M. Youssef, M. Ibrahim, M. Abdelatif, L. Chen, and A. Vasilakos. Routing Metrics of Cognitive Radio Networks: A Survey. Communications Surveys Tutorials, IEEE, PP(99):1–18, 2013. [13] Samar Abdelaziz and Mustafa ElNainay. Metric-based taxonomy of routing protocols for cognitive radio ad hoc networks. Journal of Network and Computer Applications, (0):–, 2013. [14] I. Beltagy, M. Youssef, and M. El-Derini. A new routing metric and protocol for multipath routing in cognitive networks. In Wireless Communications and Networking Conference (WCNC), 2011 IEEE, pages 974–979, March 2011. [15] M. Karmoose, K. Habak, M. ElNainay, and M. Youssef. Dead zone penetration protocol for cognitive radio networks. In Wireless and Mobile Computing, Networking and Communications (WiMob), 2013 IEEE 9th International Conference on, pages 529–536, Oct 2013. [16] K.R. Chowdhury, M. Di Felice, and I.F. Akyildiz. Tp-crahn: a transport protocol for cognitive radio ad-hoc networks. In INFOCOM 2009, IEEE, pages 2482–2490, April 2009. [17] V. Srivastava and M. Motani. Cross-layer design: a survey and the road ahead. Communications Magazine, IEEE, 43(12):112–119, Dec 2005. [18] G. Bianchi. Performance analysis of the ieee 802.11 distributed coordination function. Selected Areas in Communications, IEEE Journal on, 18(3):535–547, March 2000. [19] S. McCanne and S. Floyd. Network Simulator 2. [Online]. [20] Bowen Li, Dabai Li, Qi hui Wu, and Haiyuan Li. ASAR: Ant-based spectrum aware routing for cognitive radio networks. In Wireless Communications Signal Processing, 2009. WCSP 2009. International Conference on, pages 1–5, 2009. 135
[21] K.R. Chowdhury and M.D. Felice. Search: A routing protocol for mobile cognitive radio ad-hoc networks. Computer Communications, 32(18):1983 – 1997, 2009. [22] K.R. Chowdhury and M. Di Felice. SEARCH: A routing protocol for mobile cognitive radio ad-hoc networks. In Sarnoff Symposium, 2009. SARNOFF ’09. IEEE, pages 1–6, 2009. [23] K.R. Chowdhury and I.F. Akyildiz. CRP: A Routing Protocol for Cognitive Radio Ad Hoc Networks. Selected Areas in Communications, IEEE Journal on, 29(4):794–804, 2011. [24] Marcello Caleffi, I.F. Akyildiz, and L. Paura. OPERA: Optimal Routing Metric for Cognitive Radio Ad Hoc Networks. Wireless Communications, IEEE Transactions on, 11(8):2884–2894, 2012. [25] E.W. Dijkstra. A note on two problems in connexion with graphs. Numerische Mathematik, 1(1):269–271, 1959. [26] Richard Bellman and Lester Ford. On a Routing Problem. Quarterly of Applied Mathematics, 1958. [27] XiaoXia Huang, Dianjie Lu, Pan Li, and Yuguang Fang. Coolest path: Spectrum mobility aware routing metrics in cognitive ad hoc networks. In Distributed Computing Systems (ICDCS), 2011 31st International Conference on, pages 182–191, June 2011. [28] I. Pefkianakis, S.H.Y. Wong, and Songwu Lu. Samer: Spectrum aware mesh routing in cognitive radio networks. In New Frontiers in Dynamic Spectrum Access Networks, 2008. DySPAN 2008. 3rd IEEE Symposium on, pages 1–5, Oct 2008. [29] Ashwin Sampath, Lei Yang, Lili Cao, Haitao Zheng, and Ben Y. Zhao. High throughput spectrumaware routing for cognitive radio networks. In PROC. OF INTERNATIONAL CONFERENCE ON COGNITIVE RADIO ORIENTED WIRELESS NETWORKS AND COMMUNICATIONS (CROWNCOM), 2007. [30] A.S. Cacciapuoti, C. Calcagno, Marcello Caleffi, and L. Paura. CAODV: Routing in mobile ad-hoc cognitive radio networks. In Wireless Days (WD), 2010 IFIP, pages 1–5, 2010. [31] Angela Sara Cacciapuoti, Marcello Caleffi, and Luigi Paura. Reactive routing for mobile cognitive radio ad hoc networks. Ad Hoc Networks, 10(5):803 – 815, 2012. 136
[32] C.E. Perkins and E.M. Royer. Ad-hoc on-demand distance vector routing. In Mobile Computing Systems and Applications, 1999. Proceedings. WMCSA ’99. Second IEEE Workshop on, pages 90–100, 1999. [33] R.T. Marler and J.S. Arora. Survey of Multi-Objective Optimization Methods for Engineering. Structural and Multidisciplinary Optimization, 26(6):369–395, 2004. [34] K. Miettinen. Nonlinear Multiobjective Optimization. Kluwer Academic Publishers, Boston, 1999. [35] Claudia Cormio and Kaushik R. Chowdhury. A survey on MAC protocols for cognitive radio networks. Ad Hoc Networks, 7(7):1315 – 1329, 2009. [36] M.K. Marina and S.R. Das. On-demand multipath distance vector routing in ad hoc networks. In Network Protocols, 2001. Ninth International Conference on, pages 14–23, 2001. [37] Marco Di Felice, Kaushik Roy Chowdhury, Wooseong Kim, Andreas Kassler, and Luciano Bononi. End-to-end Protocols for Cognitive Radio Ad Hoc Networks: An Evaluation Study. Perform. Eval., 68(9):859–875, September 2011. [38] Jerry Banks, John S. Carson, Barry L. Nelson, and David M. Nicol. Discrete-Event System Simulation. Prentice Hall, 3 edition, 2000. [39] M. Timmers, S. Pollin, A Dejonghe, L. Van der Perre, and F. Catthoor. A distributed multichannel mac protocol for multihop cognitive radio networks. Vehicular Technology, IEEE Transactions on, 59(1):446–459, Jan 2010. [40] Liangping Ma, Xiaofeng Han, and Chien-Chung Shen. Dynamic open spectrum sharing mac protocol for wireless ad hoc networks. In New Frontiers in Dynamic Spectrum Access Networks, 2005. DySPAN 2005. 2005 First IEEE International Symposium on, pages 203–213, Nov 2005. [41] Carlos Cordeiro and K. Challapali. C-mac: A cognitive mac protocol for multi-channel wireless networks. In New Frontiers in Dynamic Spectrum Access Networks, 2007. DySPAN 2007. 2nd IEEE International Symposium on, pages 147–157, April 2007. [42] Juncheng Jia, Qian Zhang, and Xuemin Shen. Hc-mac: A hardware-constrained cognitive mac for efficient spectrum management. Selected Areas in Communications, IEEE Journal on, 26(1):106– 117, Jan 2008. 137
[43] Jungmin So and Nitin H. Vaidya. Multi-channel mac for ad hoc networks: Handling multi-channel hidden terminals using a single transceiver. In Proceedings of the 5th ACM International Symposium on Mobile Ad Hoc Networking and Computing, MobiHoc ’04, pages 222–233, New York, NY, USA, 2004. ACM. [44] Xi Zhang and Hang Su. Cream-mac: Cognitive radio-enabled multi-channel mac protocol over dynamic spectrum access networks. Selected Topics in Signal Processing, IEEE Journal of, 5(1):110– 123, Feb 2011. [45] Liqiang Zhao, Wan Zhang, Wenjie Song, and Hailin Zhang. Cognitive radio csma/ca protocol for femto-wlans. In Communication Software and Networks (ICCSN), 2011 IEEE 3rd International Conference on, pages 42–46, May 2011. [46] Pinyi Ren, Yichen Wang, and Qinghe Du. Cad-mac: A channel-aggregation diversity based mac protocol for spectrum and energy efficient cognitive ad hoc networks. Selected Areas in Communications, IEEE Journal on, 32(2):237–250, February 2014. [47] Deepti Singhal and Rama Murthy Garimella. Cognitive cross-layer multipath probabilistic routing for cognitive networks. Wireless Networks, 21(4):1181–1192, May 2015. [48] Hao Nan, Tae-In Hyon, and Sang-Jo Yoo. Distributed coordinated spectrum sharing mac protocol for cognitive radio. In New Frontiers in Dynamic Spectrum Access Networks, 2007. DySPAN 2007. 2nd IEEE International Symposium on, pages 240–249, April 2007. [49] Sang-Jo Yoo, Hao Nan, and Tae-In Hyon. Dcr-mac: Distributed cognitive radio mac protocol for wireless ad hoc networks. Wirel. Commun. Mob. Comput., 9(5):631–653, May 2009. [50] P. Chatzimisios, V. Vitsas, and AC. Boucouvalas. Throughput and delay analysis of ieee 802.11 protocol. In Networked Appliances, 2002. Liverpool. Proceedings. 2002 IEEE 5th International Workshop on, pages 168–174, Oct 2002. [51] Tae Ok Kim, AS. Alfa, and Bong Dae Choi. Performance analysis of a csma/ca based mac protocol for cognitive radio networks. In Vehicular Technology Conference Fall (VTC 2010-Fall), 2010 IEEE 72nd, pages 1–5, Sept 2010. 138
[52] Qian Chen, Wai-Choong Wong, M. Motani, and Ying-Chang Liang. Mac protocol design and performance analysis for random access cognitive radio networks. Selected Areas in Communications, IEEE Journal on, 31(11):2289–2300, November 2013. [53] Pravati Swain, Sandip Chakraborty, Sukumar Nandi, and Purandar Bhaduri. Performance modeling and evaluation of {IEEE} 802.11 {IBSS} power save mode. Ad Hoc Networks, 13, Part B(0):336 – 350, 2014. [54] J.R. Norris. Markov Chains. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 1998. [55] Ieee standard for information technology- telecommunications and information exchange between systems-local and metropolitan area networks-specific requirements-part 11: Wireless lan medium access control (mac) and physical layer (phy) specifications. IEEE Std 802.11-1997, pages i–445, 1997. [56] Eun-Sun Jung and N.F. Vaidya. An energy efficient mac protocol for wireless lans. In INFOCOM 2002. Twenty-First Annual Joint Conference of the IEEE Computer and Communications Societies. Proceedings. IEEE, volume 3, pages 1756–1764 vol.3, 2002. [57] I.F. Akyildiz, Weilian Su, Y. Sankarasubramaniam, and E. Cayirci. A Survey on Sensor Nnetworks. Communications Magazine, IEEE, 40(8):102 – 114, August 2002. [58] I. F. Akyildiz, W. Su, Y. Sankarasubramaniam, and E. Cayirci. Wireless Sensor Networks: A Survey. Computer Networks, 38:393–422, 2002. [59] Zigbee alliance. ZigBee Specifications. [60] Zhao Cheng and Wendi B. Heinzelman. Flooding strategy for target discovery in wireless networks. In Proceedings of the 6th ACM international workshop on Modeling analysis and simulation of wireless and mobile systems, MSWIM ’03, pages 33–41, New York, NY, USA, 2003. ACM. [61] Kemal Akkaya and M. Younis. A Survey on Routing Protocols for Wireless Sensor Networks. Ad Hoc Networks, 3:325–349, 2005. 139
[62] S.S. Satapathy and N. Sarma. TREEPSI: Tree Based Energy Efficient Protocol for Sensor Information. In Wireless and Optical Communications Networks, 2006 IFIP International Conference on, 2006. [63] A. Mirza and R.M. Garimella. Pascal: Power aware sectoring based clustering algorithm for wireless sensor networks. In Information Networking, 2009. ICOIN 2009. International Conference on, pages 1 –6, 2009. [64] W.R. Heinzelman, A. Chandrakasan, and H. Balakrishnan. Energy-efficient communication protocol for wireless microsensor networks. In System Sciences, 2000. Proceedings of the 33rd Annual Hawaii International Conference on, page 10 pp. vol.2, jan. 2000. [65] O. Younis and S. Fahmy. Heed: a hybrid, energy-efficient, distributed clustering approach for ad hoc sensor networks. Mobile Computing, IEEE Transactions on, 3(4):366 – 379, oct.-dec. 2004. [66] Liu Jiancai and Han Xiao. A Novel Clustering Algorithm Based on GPS of the Mobile Ad Hoc Network. In Wireless Communications, Networking and Mobile Computing, 2009. WiCom ’09. 5th International Conference on, pages 1 –4, 2009. [67] Saurabh Ganeriwal, Ram Kumar, and Mani B. Srivastava. Timing-sync protocol for sensor networks. In Proceedings of the 1st International Conference on Embedded Networked Sensor Systems, SenSys ’03, pages 138–149, New York, NY, USA, 2003. ACM. [68] Jin Wang, Yu Niu, Jinsung Cho, and Sungyoung Lee. Analysis of energy consumption in direct transmission and multi-hop transmission for wireless sensor networks. In Signal-Image Technologies and Internet-Based System, 2007. SITIS ’07. Third International IEEE Conference on, pages 275–280, Dec 2007. [69] F. Tobagi and L. Kleinrock. Packet switching in radio channels: Part ii–the hidden terminal problem in carrier sense multiple-access and the busy-tone solution. Communications, IEEE Transactions on, 23(12):1417 – 1433, December 1975. [70] Z.J. Haas and Jing Deng. Dual busy tone multiple access (dbtma)-a multiple access control scheme for ad hoc networks. Communications, IEEE Transactions on, 50(6):975 –985, June 2002. 140
[71] Lin Liu, Zhengyi Li, and Chi Zhou. Backpropagation-based cooperative localization of primary user for avoiding hidden-node problem in cognitive networks. International Journal of Digital Multimedia Broadcasting, page 9, 2010. [72] G. Lakshmi Phani, K. Venkat Sayeesh, K. Vinod Kumar, and G. Rama Murthy. Erfla: Energy efficient combined routing, fusion, localization algorithm in cognitive wsn. In Wireless And Optical Communications Networks (WOCN), 2010 Seventh International Conference On, pages 1 –5, 2010. [73] M.K. Sharma, A. Singal, P.G. Vijay, and R. Murthy. Minimal energy consumption in the localization of a sensor network. In Sustainable Energy Technologies (ICSET), 2010 IEEE International Conference on, pages 1 –4, 2010. [74] A. Ghasemi and E.S. Sousa. Collaborative spectrum sensing for opportunistic access in fading environments. In New Frontiers in Dynamic Spectrum Access Networks, 2005. DySPAN 2005. 2005 First IEEE International Symposium on, pages 131 –136, 2005. [75] G. Ganesan and Y. Li. Cooperative spectrum sensing in cognitive radio networks. In New Frontiers in Dynamic Spectrum Access Networks, 2005. DySPAN 2005. 2005 First IEEE International Symposium on, pages 137 –143, 2005. [76] G. Ganesan and Li Ye. Cooperative spectrum sensing in cognitive radio, part ii: Multiuser networks. Wireless Communications, IEEE Transactions on, 6(6):2214 –2222, 2007. [77] G. Ganesan and Ye Li. Cooperative spectrum sensing in cognitive radio, part i: Two user networks. Wireless Communications, IEEE Transactions on, 6(6):2204 –2213, 2007. [78] J.N. Laneman, D.N.C. Tse, and G.W. Wornell. Cooperative diversity in wireless networks: Efficient protocols and outage behavior. Information Theory, IEEE Transactions on, 50(12):3062 – 3080, 2004. [79] G. Ganesan and Ye Li. Agility improvement through cooperative diversity in cognitive radio. In Global Telecommunications Conference, 2005. GLOBECOM ’05. IEEE, volume 5, pages 5 pp. –2509, 2005. [80] H.T. Friis. A note on a simple transmission formula. Proceedings of the IRE, 34(5):254–256, May 1946. 141
[81] Jayavardhana Gubbi, Rajkumar Buyya, Slaven Marusic, and Marimuthu Palaniswami. Internet of things (iot): A vision, architectural elements, and future directions. Future Generation Computer Systems, 29(7):1645 – 1660, 2013. Including Special sections: Cyber-enabled Distributed Computing for Ubiquitous Cloud and Network Services; Cloud Computing and Scientific Applications Big Data, Scalable Analytics, and Beyond. [82] Zhijing Qin, G. Denker, C. Giannelli, P. Bellavista, and N. Venkatasubramanian. A software defined networking architecture for the internet-of-things. In Network Operations and Management Symposium (NOMS), 2014 IEEE, pages 1–9, May 2014. [83] Jiong Jin, J. Gubbi, Tie Luo, and M. Palaniswami. Network architecture and qos issues in the internet of things for a smart city. In Communications and Information Technologies (ISCIT), 2012 International Symposium on, pages 956–961, Oct 2012. [84] R. A. Calvo and J. P. Campo. Adding multiple interface support in NS-2. [Online].
142