Battery Lifetime Modelling and Validation of Wireless Building Automation Devices in Thread
Total Page:16
File Type:pdf, Size:1020Kb
DEGREE PROJECT IN ELECTRICAL ENGINEERING, SECOND CYCLE, 30 CREDITS STOCKHOLM, SWEDEN 2016 Battery Lifetime Modelling and Validation of Wireless Building Automation Devices in Thread EVA AZOIDOU KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF ELECTRICAL ENGINEERING Abstract The need for energy efficiency in wireless communication is prevalent in all areas, but to an even greater extent in low-power and lossy networks that rely on resource- constrained devices. This degree project seeks to address the problem of modelling the battery lifetime of a duty-cycled node, participating in a wireless sensor net- work that is typically used in smart home and building applications. Modelling in MATLAB combined with experimentation are employed to predict the life expect- ancy and to validate using a hardware implementation. Various scenarios including sleepy end devices in a wireless sensor network are modelled and validated; these range from variable wake-up frequency and packet payload transmission to in- creasing network contention with the addition of network load. A comprehensive analysis of the main factors contributing to wasteful energy usage is provided in this thesis project, and it can be concluded that the model can estimate the battery lifetime under different testing scenarios with an error less than 5 %. Keywords: Internet of Things (IoT), battery lifetime, wireless sensor networks, energy efficiency, IEEE 802.15.4 MAC, power consumption model, Thread. Sammanfattning Det finns ett stort behov av energieffektivitet inom tr˚adl¨oskommunikation, s¨arskilt inom n¨atverk med bortfall och l˚agstr¨omf¨orbrukningd¨arresursbegr¨ansadeenheter nyttjas. Det h¨arexamensarbetet efterstr¨avar att l¨osaproblemet med att modellera batterilivsl¨angdenhos en sensoranordning med en l˚agdriftcykel, som en del av ett tr˚adl¨ostsensorn¨atverk avsett f¨or att till¨ampasi smarta hus och byggnader. Model- lering i MATLAB kombinerat med experimentering anv¨andsf¨oratt f¨oruts¨agaden f¨orv¨antade livsl¨angdensamt f¨oratt validera en h˚ardvaruimplementering. Flertalet scenarier med sovande noder modelleras och valideras, med allt fr˚anvariabel up- pvakningsfrekvens och paket¨overf¨oringtill ¨okande resurskonflikter med ytterligare belastning p¨an¨atverket. I detta examensprojekt inkluderas en helt¨ackande ana- lys av huvudorsakerna till energisl¨oseriethos enheterna och slutsatsen kan dras att modellen kan ber¨aknabatterilivsl¨angdenf¨orolika testscenarier med mindre ¨an 5 % fel. Nyckelord: Sakernas internet, batterilivsl¨angd,tr˚adl¨osasensorn¨atverk, ener- gieffektivitet, IEEE 802.15.4 MAC, energif¨orbrukningsmodell, Thread. Table of Contents 1 Introduction 1 1.1 Background .................................. 1 1.2 Problem Definition .............................. 2 1.3 Research Methodology ............................ 3 1.4 Contributions ................................. 3 1.5 Delimitations ................................. 4 1.6 Thesis Structure ............................... 4 2 Background 5 2.1 Thread - a new IoT technology ...................... 5 2.2 CoAP ...................................... 7 2.3 IPv6 ...................................... 8 2.4 6LoWPAN ................................... 9 2.5 IEEE 802.15.4 ................................. 10 2.5.1 Carrier sense multiple access with collision avoidance ..... 10 2.5.2 Busy channel and collision probability .............. 12 2.5.3 Duty cycling mechanism ...................... 12 2.6 Related Work ................................. 13 2.6.1 Battery lifetime models ....................... 13 2.6.2 Markov chain modelling of CSMA-CA .............. 14 3 Battery Lifetime Model 16 3.1 CSMA-CA in IEEE 802.15.4 ........................ 16 1 3.2 SED operations in Thread ......................... 20 3.3 Basic model .................................. 25 3.4 Data collection methods for the model parameters ........... 28 4 Experimental Setup 31 4.1 Experimental design ............................. 31 4.2 Hardware/Software .............................. 32 4.3 Validation environment ........................... 35 5 Performance Evaluation 36 5.1 Test Cases ................................... 36 5.2 Validation metric ............................... 37 5.3 Applicability of the model ......................... 37 5.3.1 Wake-up frequency ......................... 38 5.3.2 Packet Length ............................ 39 5.3.3 Network size and traffic ...................... 41 5.3.4 Accuracy of the model ....................... 42 5.4 Battery Lifetime Improvement ....................... 42 5.5 Summary ................................... 44 6 Concluding Remarks 45 6.1 Conclusions .................................. 45 6.2 Future Work ................................. 45 6.3 Reflections ................................... 46 2 List of Figures 2.1 Thread communication stack and wireless mesh network. ....... 6 2.2 Flowchart for the channel access in the unslotted case of CSMA- CA considering packet transmissions and retransmissions, adapted from [20]. ................................... 11 3.1 Three-dimensional Markov chain model of the CSMA-CA algorithm in IEEE 802.15.4, adapted from [32]. ................... 18 3.2 Markov chain for the main events taking place in a Thread network as regards SED operations. ......................... 22 3.3 Stages of current consumption during a no-data polling event of a sleepy end device. .............................. 23 3.4 Stages of current consumption during a data polling event of a sleepy end device. ................................... 24 4.1 Illustration of the experimental setup. .................. 32 4.2 FRDM-KW24D512 evaluation boards from NXP. ........... 33 4.3 Measurement and testing equipment. ................... 34 4.4 Oscilloscope capture of the averaging operation over 32 waveforms for the case of no-data polling event in Thread. ............. 35 5.1 Proportionate current consumption of the sensor node with respect to operations per hour and polling intervals. .............. 38 5.2 Predicted battery lifetime from the model and its proximity to the experimentally acquired average battery lifetime. ............ 39 5.3 Battery lifetime for transmission of different packet payload lengths. 40 5.4 Decrease in battery lifetime compared to a 10-byte payload trans- mission. .................................... 40 5.5 Battery lifetime of a sleepy end device under the influence of variable network contention. ............................. 41 3 List of Tables 2.1 Comparison of Thread with existing protocols ............. 6 3.1 Exchanged packets between child and parent device .......... 21 3.2 Main symbols used in the battery lifetime model ............ 26 5.1 Validation with normalised mean absolute error (NMAE) for differ- ent polling periods .............................. 42 5.2 Validation with NMAE for different test cases ............. 42 4 List of Acronyms and Abbreviations 6LoWPAN IPv6 over Low power Wireless Personal Area Networks AC/DC alternating current/direct current ACK acknowledgement ADC analog-to-digital converter APP application BE backoff exponent BR border router CCA clear channel assessment CoAP constrained application protocol CON confirmable CSMA-CA carrier sense multiple access with collision avoidance dBm decibel-milliwatt DCF distributed coordination function DVR distance vector routing ED end device HBA home and building automation HTTP hypertext transfer protocol IoT Internet of Things IP Internet Protocol IPv6 Internet Protocol version 6 5 LLN low-power and lossy network M2M machine-to-machine MAC media access control mAh milliampere hour MCU microcontroller unit MLE mesh link establishment MPDU MAC protocol data unit MTU maximum transmission unit NB number of backoffs NIP native IP NMAE normalised mean absolute error NON non-confirmable OTA over-the-air PAN personal area network PCM power consumption model PD parent device PHY physical PSDU PHY service data unit QoS quality-of-service RF radio frequency Rx receive SED sleepy end device Tx transmit UDP user datagram protocol WPAN wireless personal area network WSN wireless sensor network 6 Chapter 1 Introduction The first chapter briefly introduces the wide realm of the Internet of Things (IoT), with focus on the sensing and wireless communication side of it. The problem addressed by the thesis is defined and the goals are identified, while mentioning the aspects that fall within and outside the scope of this thesis. 1.1 Background As the number of things being connected to the Internet has already surpassed the world's population, soon things will generate more data than people, thus leading to the migration from the \Internet of people" towards IoT [1]. The term IoT was conceived by Kevin Ashton in 1999, and he described the notion as things being able to \see, hear and smell the world for themselves" in all its randomness without the need for human intervention [2]. Intelligent buildings, iHomes or Domotics are just simply different ways of referring to the concept of the smart home and building, which is one application area of the multifaceted IoT. The intended vision with the smart commercial and residential establishments is to create a vast dynamic information space where identities and virtual personalities are assigned to physical objects. These things function in unison while being incorporated into the physical world, rendering people oblivious to their existence. The smart objects connect to the Internet and operate in a manner that gives rise to ambient intelligence. The ultimate intention is to enhance the world