Design and Implementation of a Rudimentary Wirelesshart Network

Design and Implementation of a Rudimentary Wirelesshart Network

UNIVERSITY OF OSLO Department of Informatics Design and Implementation of a Rudimentary WirelessHART Network Anders Asperheim Rune V. Sjøen Kaja F. L. Skaar August 9, 2012 Preface This report is the final result of a 60 point masters project completed at the University of Oslo, Institute of Informatics. The work has been performed by the students Anders Asperheim, Kaja F. L. Skaar and Rune V. Sjøen in the time period 2010-2012. The project has been supervised by professor Stein Gjessing. As an external supervisor we have also had contact with Niels Aakvaag who works at SINTEF, which is the largest research organization in Scandinavia and is located in Norway. We have continued on a project started in 2009 with the goal of provid- ing a full fledged implementation of the WirelessHART protocol on micro controllers from Atmel. Our work is based on this project and our pri- mary goal was to finish implementing the design of the link layer and then continue to provide a basic implementation of a Network Manager and the network layer. The project has not been without challenges but we feel that we have overcome most of them and are now much closer to a fully functioning implementation of WirelessHART. The background research for this project has mainly been performed by studying the WirelessHART standard and literature regarding related work in the field. We would like to thank Stein for guiding us through the project work and offering constructive support and criticism during our regular meet- ings. In addition we would like to thank Niels and all our fellow students in the Network and Distributed Systems lab at the Institute of Informatics for their support and assistance. i Summary This report provides an overview over our efforts in continuing the work started by two previous students with the goal of implementing a full WirelessHART network stack on Atmel wireless sensor nodes. This is a collaborative project between the University of Oslo, Statoil and SINTEF. This report provides the reader with an introduction to the available protocols and technologies in use in the world of wireless sensor networks. After giving the reader an introduction to wireless sensor networks and the underlying physical and link layer characteristics of IEEE 802.15.4 we explore WirelessHART in more detail along with an analysis of the implemented code base and how it performs in our test scenarios. After carefully reviewing the implementation and final code base, it is clear that we have made advances in this area. In particular, our approach to the implementation of a WirelessHART Gateway was found to result in measurable improvements to the operation of the network and the con- tinued effort to provide a full-fledged implementation of a WirelessHART Network. Our methods to address the protocol stack in the WirelessHART Field Devices resulted in an increase in stability and several new features which provide yet another step in the right direction. It also seems evident that although our work has resulted in important updates and improvements in this project, we have not exhausted this area of research. More work should be performed to explore this area further in order to further improve and extend the implementation of both the WirelessHART Field Devices and the WirelessHART Gateway. iii Contents Summary iii 1 Introduction 1 1.1 Background . .1 1.2 Problem Definition . .2 1.3 Key Assumptions and Limitations . .3 1.4 Project Parties . .3 1.4.1 Statoil . .3 1.4.2 Atmel . .4 1.5 Project Baseline . .5 1.6 Project Planning . .5 1.7 Report Outline . .6 1.8 Related Work . .7 1.8.1 When HART goes wireless: Understanding and im- plementing the WirelessHART standard . .7 1.8.2 WirelessHART: Applying Wireless Technology in Real- Time Industrial Process Control . .8 1.8.3 Comparison of the IEEE 802.11, 802.15.1, 802.15.4 and 802.15.6 wireless standards . .8 1.8.4 WirelessHART Network Manager . .8 1.8.5 Design & Implementation of Time Synchronization for Real-Time WirelessHART network . .9 1.8.6 A Review of Current Routing Protocols for Ad Hoc Mobile Wireless Networks . .9 iv 1.9 Chapter Summary . 10 2 Wireless Sensor Networks 11 2.1 Medium Access . 12 2.1.1 Circuit Mode Methods . 12 2.1.2 Packet Mode Methods . 14 2.1.3 CSMA . 15 2.1.4 TDMA . 16 2.1.5 Comparison . 17 2.2 Standards and Protocols . 18 2.2.1 ISO/OSI Model . 18 2.2.2 IEEE 802.11 - Wireless Local Area Network (WLAN) 20 2.2.3 IEEE 802.15.4 - Low Rate Wireless Personal Area Network (LR-WPAN) . 20 2.2.4 ISA100.11a . 22 2.2.5 ROLL . 23 2.3 IEEE 802.15.4 . 23 2.3.1 Components . 23 2.3.2 Topologies . 24 2.3.3 Service Primitives . 24 2.3.4 Physical Layer (PHY) . 25 2.3.5 Medium Access Control Layer (MAC) . 27 2.4 Chapter Summary . 29 3 WirelessHART 30 3.1 Background . 30 3.2 Physical Layer . 33 3.2.1 Frequency Range . 33 3.2.2 Channels . 33 3.2.3 Clear Channel Assessment . 34 3.2.4 Channel Hopping . 34 3.2.5 Physical Layer Primary Data Unit . 35 3.2.6 Service Primitives . 35 3.3 Data Link Layer . 37 3.3.1 Time Division Multiple Access . 37 3.3.2 TDMA State Machine . 37 3.3.3 Time Synchronization . 41 3.3.4 Layer Subdivision . 41 3.3.5 Data Link Layer Protocol Data Unit . 41 3.3.6 Link Scheduler . 45 3.3.7 Service Primitives . 45 3.4 Network Layer . 47 3.4.1 Network Layer Protocol Data Unit . 47 3.4.2 Service Primitives . 49 3.4.3 Routing . 51 3.4.4 Security Sub-layer . 54 3.5 Network Components . 55 3.5.1 Field Devices . 55 3.5.2 Gateway . 56 3.5.3 Production Backbone . 57 3.5.4 Handhelds . 58 3.5.5 Wireless Adapters . 58 3.5.6 Host Applications . 58 3.6 Time Synchronization . 58 3.6.1 Initial Synchronization . 59 3.6.2 Active Synchronization . 60 3.6.3 Passive Synchronization . 60 3.7 WirelessHART Join Process . 60 3.7.1 Overview . 61 3.7.2 The Network Layer Join Process . 64 3.7.3 The Data Link Layer Join Process . 67 3.8 Chapter Summary . 69 4 Hardware and Software 71 4.1 Hardware . 71 4.1.1 AVRRZRaven (ATmega1284P) . 71 4.1.2 ATmega128RFA1 . 74 4.1.3 STK541 . 75 4.1.4 STK600 . 76 4.1.5 JTAGICE mkII . 76 4.1.6 Choosing between ATmega1284P and ATmega128RFA1 78 4.2 Software . 78 4.2.1 AVR Studio . 80 4.2.2 Daintree Sensor Network Analyzer . 80 4.2.3 The Contiki Operating System . 82 4.2.4 15dot4-tools . 85 4.2.5 Wireshark . 85 4.2.6 AVR2025 . 90 4.3 Chapter Summary . 92 5 Summary of Previous Work 93 5.1 Background . 93 5.2 Decoupled MAC-functions from Hardware . 94 5.2.1 Removed ACK from TAL, Implement it on the Data Link Layer . 94 5.2.2 Removed Automatic Retransmission from the TAL 95 5.2.3 Deactivated CSMA/CA and Re-implement Clear-Channel- Assessment . 95 5.3 Implementation of Static Information in the PAN Informa- tion Base (PIB) . 96 5.4 Adapt Service Primitives . 97 5.5 Link Scheduler . 97 5.6 Running the Code . 99 5.7 Chapter Summary . 100 6 Design 101 6.1 Key Focus Areas . 101 6.2 Functional Requirements . 102 6.2.1 Requirement Specification . 103 6.3 Non-functional Requirements . 104 6.3.1 Requirement Specification . 105 6.4 Quality Assurance . 107 6.4.1 Configuration Management . 107 6.4.2 Code Inspection . 107 6.4.3 Source Code Management . 108 6.4.4 Coding Standards . 108 6.4.5 Documentation . 108 6.4.6 Testing and Verification . 108 6.5 WirelessHART Field Devices . 109 6.5.1 TX and RX queues . 109 6.5.2 TDMA State Machine . 110 6.5.3 XMIT Engine . 112 6.5.4 RECV Engine . 115 6.5.5 Design of the Network Abstraction Layer (NAL) . 118 6.6 WirelessHART Gateway . 120 6.6.1 Virtual Gateway . 122 6.6.2 Network Manager . 122 6.6.3 Access Points . 122 6.6.4 Communication Between Virtual Gateway and Net- work Manager . 123 6.6.5 Communication Between Virtual Gateway and Wire- lessHART Network . 123 6.6.6 HART Commands Interface . 124 6.7 Chapter Summary . 124 7 Implementation 126 7.1 WirelessHART Field Devices . 126 7.1.1 TX and RX Queues . 126 7.1.2 TDMA State Machine . 127 7.1.3 Data Link Layer Join . 128 7.1.4 Link Scheduler . 130 7.1.5 XMIT and RECV Engine . ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    249 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us