Implementation of Collection Tree Protocol Over Wirelesshart Data-Link
Total Page:16
File Type:pdf, Size:1020Kb
, Implementation of Collection Tree Protocol over WirelessHART Data-Link Author: Kiran Kumar Koneri EXAM WORK 2010 SUBJECT: Electrical Engineering with specialisation in Embedded Systems Postadress: Besöksadress: Telefon: Box 1026 Gjuterigatan 5 036-10 10 00 551 11 Jönköping Implementation of Collection Tree Protocol over WirelessHART Data-Link Author: Kiran Kumar Koneri This thesis work is performed at Jönköping University within the subject area of Electrical Engineering. This work is part of the Master’s Degree program with the specialization in Embedded Systems. The author takes responsibility for opinions, conclusions and findings presented. Supervisor and Examiner: Professor Youzhi Xu Scope: 30 credits (D-Level) Date: Archive Number: Postadress: Besöksadress: Telefon: Box 1026 Gjuterigatan 5 036-10 10 00 551 11 Jönköping Abstract Abstract Wireless Sensor Networks (WSNs) are ad-hoc wireless networks for small form-factor embedded nodes with limited memory, processing and energy resources. Certain applications, like industrial automation and real-time process monitoring requires time synchronized reliable network protocol. Current work for WSNs provides either time synchronized with low reliability (WirelessHART) or reliable network without time synchronization (Collection Tree Protocol). The Collection Tree Protocol (CTP) provides the reliability from 94.7% to 99.9% for CSMA-CA based MAC layer. This paper addresses channel hopping, a class of frequency diverse communication protocol in which subsequent packets are sent over different frequency channels. Channel hopping combats external interference and persistent multipath fading, two of the main causes of failure along a communication link. Channel hopping technique leads to a high reliable and efficient protocol which is specified by HART Communication Foundation and named as WirelessHART. WirelessHART Data-Link layer designed based on TDMA and CSMA-CA mechanism. By implementing the CTP over WirelessHART Data-Link layer, the reliability of the network protocol can be improved compare to actual CTP standard implementation. This thesis describes the design and implementation of Collection Tree Protocol over WirelessHART Data-Link layer. The implementation is done using TinyOS, nesC programming language using Crossbow TelosB CC2420 radio chip nodes. The results and experiments show the evaluation of the system prototype. i Key Words Key Words WSN WirelessHART Time Synchronization Channel Hopping Collection Tree Protocol Reliability Efficiency ii Acknowledgement Acknowledgement First of all, I would like to thank my Professor Youzhi Xu, who provided me an opportunity to do my master thesis in a very promising field of Wireless Sensor Networks. His great ability in grasping the research direction of wireless sensor network deeply inspired and educated me. I would like to express my thanks to Ph.D candidate Wei Shen, who gave me his time, motivation, guidance and encouragement during my whole thesis study and lead me the way to finish. I would like to say special thanks to our master’s program coordinator Alf Johansson and Professor Shashi Kumar, for being always helpful and giving all kinds of support during my master studies. I would like to thank Thomas Gustafson for delivering great and invaluable knowledge. Last but not least, I am very thankful to my lovable and respectable parents Ashok Koneri and Uma Rani Koneri for their motivation during my difficult hours and support throughout my life. Their love and supplications helped me in materializing my goals and in completing my thesis with success. I am also thankful to all my family members and friends for their support and encouragement throughout my studies. iii Table of Contents Table of Contents Abstract .......................................................................................................... i Key Words ..................................................................................................... ii Acknowledgement ....................................................................................... iii List of figures ................................................................................................ vi List of Tables ............................................................................................... vii List of Abbreviations.................................................................................. viii 1. Introduction ............................................................................................ 1 1.1. Background .......................................................................................................... 1 1.2. Purpose and Aim .................................................................................................. 2 1.3. Delimits ................................................................................................................ 3 2. Technical Background ........................................................................... 4 2.1. IEEE 802.15.4 ...................................................................................................... 5 2.2. Introduction to WirelessHART ............................................................................ 5 2.2.1. Physical Layer ................................................................................................ 7 2.2.2. Data – Link Layer ......................................................................................... 7 2.2.3. Network and Transport Layer ......................................................................... 7 2.3. Introduction to Collection Tree Protocol ............................................................. 7 2.4. Related Work........................................................................................................ 8 3. Methodology and Implementation process ........................................ 9 3.1. Research Method .................................................................................................. 9 3.2. Implementation process ...................................................................................... 10 3.3. TinyOS v2.0 ....................................................................................................... 10 4. WirelessHART ..................................................................................... 12 4.1. WirelessHART MAC protocol ........................................................................... 12 4.1.1. The Data-Link packet (DLPDU) ................................................................. 12 4.1.2. TDMA overview .......................................................................................... 14 iv Table of Contents 4.1.3. Shared slot ................................................................................................... 15 4.1.4. Communication Tables ................................................................................ 16 4.2. Source Code – TSCH (Time Synchronized Channel Hoping) ........................... 17 4.2.1. Overview of TSCH ...................................................................................... 17 4.2.2. Packet structure ............................................................................................ 19 4.2.3. TSCH Wiring ............................................................................................. 20 4.2.4. TSCH message handling ............................................................................... 23 5. Review of the Collection Tree Protocol (CTP) ................................ 26 5.1. CTP routing and Data Packets ........................................................................... 26 5.1.1. Physical and MAC overhead ......................................................................... 26 5.1.2. CTP Data Frame ......................................................................................... 26 5.1.3. CTP Routing Frame ..................................................................................... 27 5.1.4. Acknowledgements ........................................................................................ 28 5.2. Link Estimator module ....................................................................................... 28 5.3. Routing Engine module ...................................................................................... 28 5.3.1. Adaptive Beaconing ...................................................................................... 29 5.4. Forwarding Engine ............................................................................................. 29 5.4.1. Loop detection and handling ......................................................................... 30 6. CTP over WirelessHART ................................................................... 31 6.1. CTP – TSCH packet structure ........................................................................... 31 6.2. CTP – TSCH wiring and working ..................................................................... 32 7. Experiments and Results ..................................................................... 35 8. Conclusion and Future Work ............................................................. 38 References ................................................................................................... 39 Appendix 1: TSCH Data-Link layer component graph .......................... 41 Appendix 2: TSCHC component code ..................................................... 42 Appendix 3: CtpP