Cognitive Radio using Radio Resource Management A Major Qualifying Project Submitted to the Faculty of the WORCESTER POLYTECHNIC INSTITUTE in partial fulfillment of the degree requirements for the Degree in Bachelor of Science in Electrical and Computer Engineering by ______________________________ Michael Ghizzoni ______________________________ Mathew Kelley ______________________________ Conor Rochford Project Number: AW-002 Date: 10/23/09 Sponsoring Organization: University of Limerick: Project Advisors: __________________________________ Professor Alexander Wyglinski, Advisor __________________________________ Professor Richard Vaz, Advisor Abstract This report presents a cognitive radio network that optimizes routing to preserve battery capacity while maintaining an acceptable signal quality. This is implemented by collecting data on the current link quality and battery charges of the nodes in the network and by performing a routing algorithm to optimize the signal quality of the links and the battery life of the nodes. The network performs the entire optimization process successfully 87.5% of 40 test trials. II Acknowledgements Without the help of many individuals and resources available to us this project would not have been possible. There were many people who both assisted with any problems or questions that we had and there were others who made sure that we had appropriate accommodations and all of the resources that we need. Thank you to the University of Limerick for sponsoring our project, providing us with office space, and all of the hardware that we needed. Special thanks to Sean McGrath for overseeing the project and acting as our primary faculty advisor. Thank you to Michael Barry for answering all of our questions and providing daily guidance and direction to our project. Thank you to Digi International, specifically the live chat tech support staff for all of the hardware specific questions and concerns that we came across. This made working with the XBee chips run significantly smoother. Thank you to Richard Hoptroff with Flexipanel ltd for all of his support and help with the UZBee dongles. A thank you to Bob Recny, a Senior Product Engineer at FTDI Chip, for his help with the UZBee Dongles regarding the UZBee+ Virtual COM Port drivers. III Of course, thank you to Worcester Polytechnic Institute, specifically the Interdisciplinary and Global Studies Division for making all of the necessary arrangements for the project and project center. Special thanks go out to Professor Alexander Wyglinski and Professor Richard Vaz for advising the projects and lending appropriate guidance and encouragement during the weekly teleconferences and throughout the project. Finally, thank you to Charlotte Tuohy for being our liaison for the project center. She secured living arrangements for us and made sure that we had everything we needed upon arrival and throughout the experience. IV Executive Summary Cognitive radio systems, which acquire hardware and network conditions through sensors, transmissions and user inputs to use them as feedback to control radio operation, has become increasingly important as more institutions, companies and homes adopt wireless technologies. Medical institutions in particular, which have adopted wireless networks for patient monitoring, emergency paging and records transfer without wires, require these cognitive systems. Pagers and “motes”, which are medical instrumentation with embedded RF modules, need to be routed to maintain the necessary link quality while consciously preserving battery charge of these battery-powered nodes to maximize their duration of operation. The proposed solution of this problem is to implement an ad hoc network with a conscious coordinator that collects each links bit error rate (BER) and received signal strength indication (RSSI) and each nodes battery charge and performs a routing algorithm to promote battery charge preservation without compromising signal quality. The coordinator also derives the appropriate transmission power for each node that will accommodate the quality of service (QoS), but also minimize interference and current draw. After careful analysis and experimentation of the capabilities of a variety of RF modules, this network was implemented using Xbee Series 2 ZB RF modules with application programming interface (API) firmware which comprised the ZigBee stack. The coordinator of the network was programmed to initiate and synchronize the feedback cycle that is used to update the routes and power levels of the routers in the network with a node discovery request. When the routers receive this transmission, all the nodes sequentially perform a node discovery to find and store all the addresses of the nodes within single hop range. Each node then sends two link assessment requests to each node found during node discovery at two different power levels. At the same time, the nodes receive link assessment requests and use them to derive BER and RSSI of each single hop link at the two different transmission powers. Each router then sends its link quality data along with its battery charge to the coordinator, which performs the routing algorithm and transmit power level assignment. Two routing algorithms were implemented that use two different methods to optimize the routing by meeting the application’s QoS while considering the battery life of each node. The first algorithm is called the transmission power limiting algorithm. This algorithm calculates link costs by adding weighted terms dependent on BER, RSSI, transmit power level, and battery charge. The routing V algorithm will then select the multi-hop routes from the routers to the coordinator and back with the lowest maximum link cost. The path limiting algorithm considers the increase in current draw for every route a node is an intermittent hop in and minimizes the burden of relaying packets for the nodes with the least charge. This is accomplished by first passing every found link through a BER screen. The links that meet this QoS are then used to find all paths that can be used to circumvent nodes with low battery charge. Dijkstra’s algorithm is performed using solely RSSI to create initial paths and then the battery life is calculated for each node. The nodes with the least battery life are then circumvented by using the alternative routes around it. The coordinator then assigns the minimum transmit power levels to each node that accommodate to the QoS requirements of all the links they are required to use for the assigned routes. The coordinator then sets its own routes and sends the assigned routes and power levels to their respective router. The routers then adjust their route to the coordinator. The entire cycle is repeated shortly after to keep up with real time environment and hardware changes. When the XBee Series 2 ZB RF modules arrived in week five, the network protocol that initiated node discovery, performed node discovery, assessed link quality, transmitted cognitive data to the coordinator, and sent source routes was coded and debugged simultaneously. Many timing and settings adjustments were made to decrease the packet loss rate, node discovery inconsistency and unintended router resets in the next five weeks. With all these adjustments, the unintended router resets were decreased to 10%, the packet loss rate was decreased to 6.7%, and the node discovery consistency was brought up to 94%. These values are based on 40 documented tests of the entire cycle. The routing algorithms that were programmed for the coordinator operated as expected 100% when tested using simulations and when integrated into the coordinator’s code. The transmission power limiting algorithm correctly calculates the quality of routes based on the cognitive parameters received and routes accordingly. The path limiting algorithm maximizes the nodes’ battery lives giving priority to the nodes with the least battery charge. VI Table of Contents Abstract ......................................................................................................................................................... II Acknowledgements ...................................................................................................................................... III Executive Summary ....................................................................................................................................... V List of Figures ............................................................................................................................................. XIII List of Tables ............................................................................................................................................. XVII 1. Introduction .......................................................................................................................................... 1 2. Background ........................................................................................................................................... 4 2.1. Cognitive Radio ............................................................................................................................. 4 2.1.1. The Original Concept of Cognitive Radio .............................................................................. 5 2.1.2. Current Cognitive Radio Research ........................................................................................ 6 2.2. Cognitive Parameters .................................................................................................................... 6 2.2.1. Received Signal Strength Indicator (RSSI) ............................................................................. 7 2.2.2. Signal to Interference and Noise Ratio (SINR) ...................................................................... 7 2.2.3. Error Detection...................................................................................................................... 9 2.2.4. Spectrum Sensing ................................................................................................................ 11 2.3. Radio Resource Management (RRM) Techniques ...................................................................... 16 2.3.1. Transmission Power ............................................................................................................ 16 2.3.2. Admission Control ............................................................................................................... 17 2.3.3. Forward Error Correction (FEC) ........................................................................................... 20 2.3.4. Automatic Repeat Request (ARQ) ....................................................................................... 21 2.4. Existing Protocols ........................................................................................................................ 23 2.4.1. WiFi Protocol (802.11) ........................................................................................................ 23 2.4.2. Bluetooth Protocol (802.15.1) ............................................................................................ 24 2.4.3. ZigBee Protocol (802.15.4) .................................................................................................. 24 2.4.4. Comparison of Wireless Technologies ................................................................................ 26 2.5. Multi-hopping Methods for ZigBee............................................................................................. 26 VII 2.5.1. Ad Hoc On-Demand Distance Vector Routing .................................................................... 27 2.5.2. Broadcasting ....................................................................................................................... 27 2.5.3. Many-to-One ....................................................................................................................... 27 2.5.4. Source Routing .................................................................................................................... 27 2.6. Routing Algorithms ..................................................................................................................... 28 2.6.1. Dijkstra's Algorithm ............................................................................................................. 28 2.6.2. A* Routing ........................................................................................................................... 32 2.7. Chapter Summary ....................................................................................................................... 32 3. Project Goals and Design Decisions .................................................................................................... 33 3.1. Cognitive Radio for Medical Devices ........................................................................................... 33 3.2. Product Requirements ................................................................................................................ 34 3.2.1. Reliability ............................................................................................................................. 34 3.2.2. Portability ............................................................................................................................ 34 3.2.3. Energy Efficiency ................................................................................................................. 34 3.2.4. Data Rate ............................................................................................................................. 34 3.3. Project Management and Tasks .................................................................................................. 35 3.4. Optimization Process .................................................................................................................. 36 3.5. Cognitive Parameters .................................................................................................................. 38 3.6. Radio Resource Management ..................................................................................................... 38 3.7. Hardware .................................................................................................................................... 38 3.7.1. UZBee Dongles .................................................................................................................... 39 3.7.2. XBee Development Boards ................................................................................................. 44 3.7.3. Conclusions ......................................................................................................................... 49 3.8. Firmware ..................................................................................................................................... 49 3.8.1. Transparent Operation Firmware ....................................................................................... 50 3.8.2. Data Parsing in Transparent Operation .............................................................................. 50 3.8.3. Altering Transmission Power in Transparent Operation .................................................... 54 VIII 3.8.4. Multi-Hopping with Transparent Firmware ........................................................................ 55 3.8.5. API Operation ...................................................................................................................... 56 3.8.6. Conclusions ......................................................................................................................... 58 3.9. Chapter Summary ....................................................................................................................... 58 4. Prototype Implementation ................................................................................................................. 59 4.1. Node Discovery Request ............................................................................................................. 59 4.1.1. Node Discovery ................................................................................................................... 60 4.2. Link Assessment .......................................................................................................................... 61 4.2.1. BER Check ............................................................................................................................ 63 4.2.2. RSSI Extraction .................................................................................................................... 64 4.2.3. Cognitive Data Packet ......................................................................................................... 65 4.3. Routing Algorithm ....................................................................................................................... 66 4.3.1. Transmission Power Limiting Algorithm ............................................................................. 66 4.3.2. Path Limiting Algorithm ...................................................................................................... 75 4.4. Source Routes ............................................................................................................................. 90 4.4.1. Setting the Coordinator Source Routes .............................................................................. 90 4.4.2. Setting the Source Route and Power Level of the Routers ................................................. 91 4.5. Chapter Summary ....................................................................................................................... 92 5. Testing and Verification ...................................................................................................................... 93 5.1. Node Discovery ........................................................................................................................... 93 5.1.1. Node Discovery for the Coordinator ................................................................................... 93 5.1.2. Node Discovery for Routers ................................................................................................ 95 5.2. Cognitive Parameter Acquisition ................................................................................................ 97 5.2.1. Cognitive Parameter Acquisition for the Coordinator ........................................................ 97 5.2.2. Cognitive Parameter Acquisition for Routers ..................................................................... 98 5.3. Routing Algorithm ....................................................................................................................... 99 5.3.1. Transmission Power Limiting Routing Algorithm .............................................................. 102 IX 5.3.2. Path Limiting Routing Algorithm ....................................................................................... 104 5.3.3. Parsing and Setting Source Routes in the Router ............................................................. 107 5.4. Chapter Summary ..................................................................................................................... 108 6. Conclusions ....................................................................................................................................... 109 7. Future Work ...................................................................................................................................... 112 7.1. Battery Monitoring ................................................................................................................... 112 7.2. Transmission Power in Path Limiting Algorithm ....................................................................... 113 7.3. Cognitive Radio in other Protocols ........................................................................................... 114 8. References ........................................................................................................................................ 115 A. Appendix A ........................................................................................................................................ 117 Transparent Mode Methods ................................................................................................................. 117 setupXbee ......................................................................................................................................... 117 findRssi .............................................................................................................................................. 117 powerLevel ........................................................................................................................................ 118 sendSensorData ................................................................................................................................ 118 Transparent Mode Setup and Loop ...................................................................................................... 119 Router ............................................................................................................................................... 119 API Mode Router Methods ................................................................................................................... 121 findNetwork ...................................................................................................................................... 121 receiveData ....................................................................................................................................... 121 modeOne .......................................................................................................................................... 123 modeTwo .......................................................................................................................................... 123 modeThree ........................................................................................................................................ 124 nodeDiscovery................................................................................................................................... 124 powerLevel ........................................................................................................................................ 125 arrayLength ....................................................................................................................................... 126 apiTx .................................................................................................................................................. 126 X
Description: