• No results found

M2M and Mobile Communications: an Implementation in the Solar Energy Industry

N/A
N/A
Protected

Academic year: 2022

Share "M2M and Mobile Communications: an Implementation in the Solar Energy Industry"

Copied!
111
0
0

Loading.... (view fulltext now)

Full text

(1)

STOCKHOLM, SWEDEN 2015

M2M and Mobile Communications: an Implementation in the Solar Energy Industry

ANTONIO GONZALEZ ROBLES

KTH ROYAL INSTITUTE OF TECHNOLOGY

SCHOOL OF INFORMATION AND COMMUNICATION TECHNOLOGY

(2)

implementation in the solar energy industry

ANTONIO GONZ´ ALEZ ROBLES

Master’s Degree Project

Stockholm, Sweden June 2015

(3)
(4)

School of Science

Master’s Degree Programme in Security and Mobile Computing

Antonio González Robles

M2M and Mobile Communications: an

implementation in the solar energy industry

Master’s Thesis

Stockholm, 30.06.2015

Supervisor: Prof. Markus Hidell, KTH Royal Institute of Technology Prof. Jukka Nurminen, Aalto University

Instructor: Daniel Wahlberg, Solelia Greentech

(5)
(6)

Aalto University School of Science

Degree Programme in Security and Mobile Computing

ABSTRACT OF THE MASTER’S THESIS

Author: Antonio González Robles

Title: M2M and Mobile Communications: an implementation in the solar energy industry

Number of pages: 20+89 Date: 30.06.2015 Language: English Professorship: Data Communications

Software

Code: T-110

Supervisor: Prof. Markus Hidell, KTH Royal Institute of Technology Prof. Jukka Nurminen, Aalto University

Advisor: Daniel Wahlberg, Solelia Greentech

Machine-to-Machine (M2M) communications are used for several purposes, for instance to transmit information derived from measurements collected from monitoring instruments. M2M communications also allow intelligent devices to exchange real-time data without human intervention. Through a literature survey regarding M2M, Mobile Communications, and Communication Protocols for M2M, such as the Constrained Application Protocol (CoAP), we found that the CoAP-UDP model is more suitable for M2M systems, than the HTTP-TCP approach. Additionally, CoAP supports a DTLS implementation to provide end- to-end security to protect communications. Consequently, CoAP was the selected technology that allowed us to achieve the goal of designing a low-cost, scalable, secure, and standard-based communication solution for the company supporting the project: Solelia Greentech. This company is the largest provider in Scandinavia of solar chargers for electrical vehicles. The development and experimental implementation of this solution was also successfully accomplished.

We created a prototype that is able to gather information from a pulse generator (e.g. smart meter), process the data, run a CoAP server, and transmit data resources to CoAP clients through a secure DTLS channel. Furthermore, a performance analysis of the system and other existing Web server alternatives was performed. As a result of this process, we concluded that the CoAP server we developed reaches between four and seven times higher throughputs than the compared systems. Therefore, this project represents a viable alternative for existing solutions on the market.

Keywords: M2M, CoAP, DTLS, Raspberry Pi, UDP, Wireless, Smart meter

(7)
(8)

Aalto Universitetet

Högskolan för teknikvetenskaper Degree Programme in Security and Mobile Computing

SAMMANDRAG AV DIPLOMARBETET

Författare: Antonio González Robles

Titel: M2M and Mobile Communications: an implementation in the solar energy industry

Sidantal: 20+89 Datum: 30.06.2015 Språk: Engelska Professur: Data Communications

Software

Koden: T-110

Övervakare: Prof. Markus Hidell, KTH Royal Institute of Technology Prof. Jukka Nurminen, Aalto University

Handledare: Daniel Wahlberg, Solelia Greentech

Machine-to-machine (M2M) kommunikation används för flera syften, till exempel överföra information från mätningar som samlats in från övervakningsprogram instrument. M2M kommunikation gör det också möjligt att intelligenta enheter utbyter data i realtid utan mänsklig inblandning. Genom en litteraturstudie om M2M, mobil kommunikation, och kommunikationsprotokoll för M2M, såsom Constrained Application Protocol (CoAP), fann vi att CoAP-UDP-modellen är mer lämpade för M2M-system, än HTTP-TCP strategi. Dessutom, CoAP stöder ett DTLS genomförande som bidrar med end-to-end säkerhet för att skydda kommunikation. Följaktligen CoAP var den valda tekniken som tillät oss att uppnå målet att utforma en billig, skalbar, säker och standardbaserad kommunikationslösning för företag som stödde projektet: Solelia Greentech. Detta företag är den största leverantören i Skandinavien av solar laddare för eldrivna fordon. Utveckling och experimentella genomförande av denna lösning var också lyckat fulländad. Vi skapade en prototyp som kan samla information från en pulsgenerator (t.ex. smarta mätare), process data, köra en CoAP server, och överföra dataresurser till CoAP-klient genom en säker DTLS kanal. En prestandaanalys av systemet och andra befintliga webbservern alternativ utfördes. Som en följd av denna process, vi drog slutsatsen att CoAP servern vi utvecklat når mellan fyra och sju gånger högre genomloppstid än de jämförda systemen. Därför Detta projekt är ett lönsamt alternativ för befintliga lösningar på marknaden.

Keywords: M2M, CoAP, DTLS, Raspberry Pi, UDP, Wireless, Smart meter

(9)
(10)

I want to thank Professor Markus Hidell from KTH Royal Institute of Technology, and Professor Jukka Nurminen from Aalto University for their guidance. Also, to May-Britt Eklund Larsson, my program coordinator at KTH. And specially to Aino Roms, my program coordinator at Aalto University, who was always very supportive. Furthermore, I want to thank Solelia Greentech’s team: Carolina, Daniel, Patrik and Per. For facilitating the information which is basis for this project, as well as for being so supportive and helpful.

Achieving this Master’s Degree was possible due to the scholarship provided by the Mexican institution CONACYT (Centro Nacional de Ciencia y Tecnología). As well as the support from Dirección General de Relaciones Internacionales (DGRI) de la Secretaría de Educación Pública (SEP), SEMARNAT, and Nordplus.

In addition, I want to express my gratitude to my family, thus, I would like to do it in my native language:

Gracias por el apoyo siempre constante, por la compresión y por todo el cariño, a mi mamá.

También a mis hermanas Nancy y Esther que definitivamente fueron una parte fundamental para que yo pudiera lograr este objetivo, no puedo agradecerles suficiente por toda su ayuda. También a todos mis sobrinos, sobrinas y al resto de la familia, que siempre me envían sus mejores deseos, me reconforta pensar en ellos y en que pronto volveré a verlos. También a Male, por haberme incentivado a venir a Europa a enfrentar este desafío, así como a mis amigos de toda la vida en México que siempre me animaron a cumplir este sueño, y también a los nuevos amigos que, gracias a este programa, he hecho en Europa.

Finally, I would like to thank Aalto University, KTH Royal Institute of Technology, and the NordSecMob program for such a great experience. I will always be a proud alumni of these great Universities.

Stockholm, 30.06.2015

Antonio González Robles

ix

(11)
(12)

Abstract . . . v

Acknowledgements . . . ix

Contents . . . xi

Abbreviations . . . xiii

List of Tables . . . xvii

List of Figures . . . xx

1 Introduction 1 1.1 Overview . . . 1

1.2 Problem description . . . 1

1.3 Contributions . . . 2

1.4 Ethics and sustainable development . . . 2

1.5 Methodology . . . 2

1.5.1 Literature survey . . . 3

1.5.2 Development and implementation . . . 3

1.5.3 Experimentation . . . 3

1.6 Thesis organization . . . 4

2 Background 5 2.1 Photovoltaics and Electrical Vehicles industries . . . 5

2.1.1 Electric Vehicles and the existing electrical infrastructure . . . 5

2.1.2 Photovoltaic charging stations . . . 6

2.1.3 Smart metering . . . 7

2.2 Machine-to-Machine Communication (M2M) . . . 7

2.2.1 M2M architecture . . . 9

2.2.2 M2M market . . . 9

2.3 M2M enabling technologies (Wireless communication systems) . . . 11

2.3.1 IEEE 802.15.4TM . . . 11

2.3.2 ZigBeeTM . . . 14

2.3.3 Bluetooth . . . 15

2.3.4 3G . . . 19

2.3.5 LTE / LTE-A . . . 22

2.3.6 IEEE 802.11af (White-Fi) . . . 25

2.3.7 IEEE 802.11ah (Working standard for sub-1Ghz in M2M) . . . 27

2.4 Communication protocols for M2M . . . 30

2.4.1 RESTful Web services . . . 30

2.4.2 6LoWPAN . . . 31

2.4.3 The Constrained Application Protocol (CoAP) . . . 32

3 Design 35 3.1 Motivation . . . 36

3.2 Objective . . . 37

3.3 Principles . . . 38

3.4 Architecture . . . 39

xi

(13)

3.4.1 Smart meter . . . 39

3.4.2 SunPiCoAP Server . . . 40

3.4.3 SunPiCoAP Client . . . 41

3.4.4 Solbanken System in the central server . . . 42

3.5 Communication protocol details . . . 42

3.5.1 CoAP-HTTP comparison and interoperability . . . 42

3.5.2 CoAP communication . . . 43

3.5.3 CoAP Resource Discovery . . . 45

3.5.4 Observing resources . . . 45

3.5.5 CoAP security . . . 47

3.5.6 Binary data format . . . 47

3.5.7 Benefits of the Architecture . . . 48

4 Implementation 51 4.1 Hardware . . . 52

4.1.1 Pulse generator . . . 52

4.1.2 Raspberry Pi and cellular communications . . . 54

4.2 SunPiCoAP server application logic . . . 59

4.2.1 Pulse detection, data handling, and logging mechanisms . . . 59

4.2.2 CoAP implementation . . . 60

4.2.3 Metric resources . . . 61

4.2.4 Log resources . . . 63

4.2.5 Subscription resources . . . 65

4.2.6 Server DTLS Authentication . . . 68

4.3 SunPiCoAP client application logic . . . 70

4.3.1 Client requesting CoAP resources . . . 71

4.3.2 Client DTLS Authentication . . . 72

5 Discussion 75 5.1 Post-implementation analysis . . . 75

5.2 Experimental environment . . . 76

5.3 HTTP Servers comparison . . . 77

6 Conclusion 81 6.1 Summary and conclusions . . . 81

6.2 Future work . . . 82

References . . . 83

(14)

1xRTT One Times Radio Transmission Technology 3GPP 3rd Generation Partnership Project

3GPP2 3rd Generation Partnership Project 2

ACK Acknowledgment

AFH Adaptive Frequency Hopping AID Association Identifier

AMA Active Member Address

AMC Adaptive Modulation And Coding

AP Access Point

ARPU Average Revenue Per User ATT Attribute Protocol

BR/EDR Bluetooth Basic Rate / Enhanced Data Rate CA Certification Authority

CBC-MAC Cipher Block Chaining Message Authentication Code CBOR Concise Binary Object Representation

CDMA Code Division Multiple Access

CN Core Network

CoAP Constrained Application Protocol CoMP Downlink Coordinated Multipoint

CON Confirmable

CoRE Constrained Restful Environments CQI Channel Quality Indicator

CSMA/CA Carrier Sense Multiple Access With Collision Avoidance DPCCH Dedicated Physical Control Channels

DPDCH Dedicated Physical Data Channel

DTLS Datagram TLS

E-UTRA Evolved UMTS Terrestrial Radio Access ECC Elliptic Curve Cryptography

ECDHE Elliptic Curve Diffie-Hellman

ECDSA Elliptic Curve Digital Signature Algorithm EDGE Enhanced Data Rates For Global Evolution EDR Enhanced Data Rate

eNB Evolved Node B

EPS Evolved Packet System

ERTM Enhanced Retransmission Mode

ETSI European Telecommunication Standard Institute EV-DO Evolution Data Optimized

EVs Electric Vehicles

FDMA Frequency Division Multiple Access FFD Full-Function Device

GDB Geolocation Database

xiii

(15)

GDD Geolocation-Database-Dependent Entities

GGSN Gateway GPRS Support Node

GPIO General Purpose Input/Output GPRS General Packet Radio Service

GSM Global System For Mobile Communication

H2H Human To Human

HARQ Hybrid Automatic Repeat Request HCI Host Controller Interface

HS High Speed

HS-DPCCH High Speed Dedicated Physical Control Channel HS-DSCH High Speed Downlink Shared Channel

HS-SCCH High Speed Shared Control Channel HSDPA High Speed Downlink Packet Access

HSDPA/HSUPA High Speed Down- Link/Uplink Packet Access HTTP Hypertext Transfer Protocol

IMT-2000 International Mobile Telecommunications

IoT Internet Of Things

IP Internet Protocol

ISM Unlicensed Industrial, Scientific And Medical Band ITU International Telecommunication Union

JSON Javascript Object Notation

kWh Kilowatt Hour

L2CAP Logical Link Control And Adaptation Protocol

LE Low Energy

LoWPAN Low Power Wireless Personal Area Networks

LTE Long Term Evolution

LTE-A LTE Advanced

M2M Machine-To-Machine

MAC Medium Access Control

MLME-SAP MAC Layer Management Entity Interface

ND Neighbor Discovery

NDP Null Data Packets

Node-Bs Base Stations

NON Non-Confirmable

OFDMA Orthogonal Frequency Decision Multiple Access

OMA Open Mobile Alliance

PAN Personal Area Network

PAR Peak-To-Average

PHY PHYsical Layer

PKI Public Key Infrastructure

PMA Passive Member Address

PRAW Periodic Restricted Access Window

PRF Pseudorandom Function

PSK Phase-Shift-Key

PSK Pre-Shared Secret

PV Photovoltaics

QoS Quality of Service

QPSK Quadrature Phase-Shift Keying

RAN Radio Access Network

RAW Restricted Access Window

RDF Resource Description Framework

RF Radio Frequency

RFD Reduced Function Device

RLQP Registered Location Query Protocol RLSS Registered Location Secure Server

(16)

RNC Radio Network Controllers

RPi Raspberry Pi

RPK Raw Public Key

RRC Radio Resource Control

RST Reset

SAP Service Access Points

SC-FDMA Single-Carrier Frequency Division Multiple Access SDP Service Discovery Protocol

SIG Bluetooth Special Interest Group

SM Streaming Mode

SMP Security Manager Protocol SNR Signal To Noise Radio

SoC System-On-A-Chip

STAs Stations

STBC Space-Time Block Code TCS Telephony Control Protocol TDMA Time Division Multiple Access TIM Traffic Indication Map

TKL Token Length

TLS Transport Layer Security TLV Type-Length-Value TVWS TV White Space UDP User Datagram Protocol

UE User Equipment

UHF Ultra High Frequency

UMTS Universal Mobile Telecommunications System URI Universal Resource Identifier

UTRAN UMTS Terrestrial Radio Access Network VHF Very High Frequency

VoIP Voice Over IP WAN Wide Area Network

WCDMA UMTS Wideband CDMA

WSDB White Space Database WSDs White Space Devices

WSM White Space Map

WSN Wireless Sensor Network

(17)
(18)

2.1 Specifications of different Bluetooth classes. . . 16

2.2 Technical feature comparison of HDSPA/WCDMA/EVDO Rev. A services. . . 23

2.3 Different HTTP-methods and their characteristics. . . 30

4.1 Pulses per second (Hz) . . . 53

4.2 kWh per second . . . 53

4.3 Frequency (Hz) . . . 54

4.4 Raspberry Pi Model B+ characteristics . . . 55

4.5 Database table “pulsespermaxresolution” . . . 60

4.6 Metric resources . . . 62

4.7 Subscription resources . . . 66

xvii

(19)
(20)

2.1 Average time a car is parked everyday [1]. . . 6

2.2 M2M network architecture . . . 10

2.3 The IEEE 802.15.4 channel structure . . . 12

2.4 The superframe structure . . . 14

2.5 Piconets and scatternet . . . 17

2.6 UTMS network architecture . . . 22

2.7 IEEE 802.11ah network . . . 27

2.8 Communication stacks for RESTful Web Services in Constrained Networks . . . . 33

2.9 Network architecture with CoAP and HTTP entities . . . 34

3.1 Solelia Greentech’s Solbanken system model. . . 35

3.2 The complete system is divided into four main components, which also are subdivided into smaller modules according a specific functionality. . . 39

3.3 Structure of the CoAP stack in an endpoint. Each component is implemented as a layer. . . 41

3.4 CoAP mesage format. Source: [2] . . . 44

3.5 Observing a Resource in CoAP. . . 46

3.6 Layout of a packet secured with DTLS. . . 48

3.7 Full DTLS handshake protocol. Messages with * are optional. . . 49

4.1 What is a pulse? . . . 52

4.2 555 timer IC circuit in astable mode. . . 53

4.3 The 555 timer IC in a breadboard with all required resistors, jumpers, and capacitors 54 4.4 The pulse generator diagram with the values of the most important resistors and capacitors. . . 54

4.5 Raspberry Pi architecture. . . 55

4.6 The row of GPIO pins is located in the top-left part of the diagram. SourceBy Efa2 (Own work) [CC BY-SA 4.0 (http://creativecommons.org/licenses/by-sa/4.0)], via Wikimedia Commons . . . 56

4.7 Raspberry Pi Model B+ GPIO pins. Source: (http://pi4j.com/pins/model-b- plus.html) [3] . . . 57

4.8 Four GPIO pins are required: Two input pins, one 5VDC pin, and one ground pin. 58 4.9 Diagram that represents the connection between the RPi and the pulse generator. In this example, only one input pin is connected (GPIO 4 – energy consumption) . 58 4.10 Raspberry Pi Model B+ and the pulse generator connected. . . 58

4.11 Flow diagram of the SunPiCoAP pulse monitoring process. . . 60

4.12 Example of messages being exchanged in a typical "metric" resource request. . . . 61

4.13 Example of messages being exchanged in a typical "log" resource request. . . 61

4.14 Example of messages being exchanged in a typical "subscription" resource request. 61 4.15 Metric resource request process. . . 63

4.16 Log resource request process. . . 65

4.17 Subscription resource request process. . . 66

xix

(21)

4.18 DTLS PSK Authentication including the Cookie Exchange. Messages with * are

optional. . . 69

4.19 DTLS RPK Authentication. . . 70

4.20 Process to generate certificates and key stores. . . 70

4.21 The complete process since a CoAP client sends a GET request to a resource on the server, until the server responds by returning the corresponding response over a DTLS channel. . . 71

4.22 Process that the SunPiCoAP client performs to consume a resource from the server. 72 4.23 Client DTLS Authentication process. . . 73

5.1 The Raspberry Pi Model B+ is connected to the client over Ethernet. The client runs both CoAPBench and ApacheBench to simulate multiple concurrent clients that send requests to the server in order to obtain performance information. . . 76

5.2 Apache HTTP Server throughput on a Raspberry Pi Model B+. . . 78

5.3 Node.js Web Server throughput on a Raspberry Pi Model B+. . . 78

5.4 SunPiCoAP Server throughput on a Raspberry Pi Model B+. . . 79

5.5 Throughput comparison between The SunPiCoAP Server, Apache HTTP Server and Node.js Web Server. . . 79

(22)

Introduction

1.1 Overview

Due to increasing environmental concerns, in the last few years two technologies have joined forces in order to disrupt traditional markets with a sustainable vision: Electric Vehicles (EVs) [4] and photovoltaics (PV), which is the method used to convert solar energy into direct current electricity using semiconducting materials [5]. Additionally, continuous improvements in manufacturing meth- ods, increasing sophistication in technological developments, government support, and participation from the private sector, have stimulated substantial cost reductions. Therefore, popularity of the EVs-PV synergy is growing, specially in developed countries, allowing these technologies to obtain a considerable share of the market. In addition, communication technologies have played an important role to induce EV-PV industry growth.

For instance, Machine-to-machine (M2M) [6] communication technologies are used in a variety of industrial processes to transmit information derived from measurements collected from instru- ments monitoring physical or environmental conditions, usually in remote locations, to a central hub for analysis. Examples of this type of implementations include capturing different events, such as temperature, atmospheric pressure, or electricity generation/consumption regarding the photovoltaics industry. The collected information is transmitted to a central server, which executes autonomic software programmed to provide services, such as analysis and transformation of the data into meaningful information, and often performs automatic decision-making. The ultimate goals of M2M communications are to stimulate operational efficiency, and to enhance business processes and customer satisfaction.

In addition, smart metering is widely considered as a core element for modern energy grids infrastructure. Advanced utility meters using M2M technologies can collect sensory data about energy generation and consumption, in an autonomous way. As a result, M2M applications improve the efficiency and reliability of energy distribution, as well as the monitoring and billing processes.

In this chapter we first describe the problem we are trying to solve. Second, the expected contributions of this thesis project are outlined. Third, the methodology used for each stage of the project is described. Finally, the thesis organization is defined.

1.2 Problem description

M2M technology can help companies and customers to gain better visibility over energy generation and consumption, as well as to prevent service outage, thereby facilitating customer relationship management and demand-side management.

However, M2M technology still has challenges to be overcome, for instance:

– Standardization levels are limited due to the fact that there is a multitude of business models, ecosystems, services, protocols and devices.

(23)

– Frequently processes, resources and systems in each company are different; therefore, custom- made solutions must be developed, which increase overall costs.

– Complex requirements and fragmented ecosystem makes industry efforts insufficient in order to maintain rapid adoption.

– Currently, M2M solutions generate large amounts of data, and the tendency is to grow in the future. Thus, companies are still investigating about efficient solutions to handle this amount of data.

– Lack of an integral solution to provide security for M2M in various layers is an important concern.

1.3 Contributions

The contributions of this thesis include a software application designed to handle the connection and the data transmission between M2M end-devices and the central server. These end-devices gather information from solar panels and electric charging meters. Additionally, the collected data is transmitted over a Wide Area Network (WAN) in order to allow the application layer in the server to analyze the data, and to make autonomous decisions based on programmed rules and the environment conditions.

For this project, small, low-cost, general purpose computers with cellular connectivity represent the end-devices. In addition, Constrained Application Protocol (CoAP) [2] is used as basis for implementing the logic (software application) over end-devices and the server, in order to increase standardization, scalability, cost efficiency, and security for M2M communications. Furthermore, a working prototype with minimum functionality, and an evaluation of this prototype are also included.

1.4 Ethics and sustainable development

In order to accomplish the goals established by a large number of countries around the world regarding climate change, clean energy generation, reduction of Greenhouse Gas (GHG) emissions, as well as reducing dependence on fossil fuels, a variety of factors must fulfilled. These factors include government incentives, technological improvements, marketing and mass production, and reasonable costs for the consumer.

Fortunately, governments, academia, and the private sector have been working together to expand the market share of both the photovoltaics and the electric vehicle technologies. Governments have a fundamental role in this task, due to the fact that they invest in technological research and development, and they are responsible for establishing the standards, regulations, and requirements for reducing the GHG emission, as well as for increasing the clean energy generation levels. However, the private sector also invests heavily in research and development on these topics.

Therefore, as part of the Solelia Greentech strategy and with the support of KTH, this project was designed with the goal of contributing to the implementation of new technologies that provide enhanced, affordable, and standardized communication solutions for the solar energy production and distribution industry, while reducing investment costs on equipment, as well as on development and implementation processes. Consequently, the improvements on the industry procedures will result in lower costs for consumers. As a result, higher adoption rates of the photovoltaic and electric vehicle technologies will be achieved, which will contribute to accomplish the environmental goals and objectives.

1.5 Methodology

The project comprises three main phases: literature survey, prototype development and imple- mentation, and experimentation. The corresponding methods for each phase are described as

(24)

follows:

1.5.1 Literature survey

In order to execute the first phase, corresponding to the literature survey, it is necessary to perform an exhaustive online search using the most recognized libraries on the Web for articles and papers related to Machine-to-Machine communication, Mobile Communications, and Communication Protocols for M2M. Due to the vast number of articles related to these topics, a filtered search is required; thus, a limited number of keywords is used, for example: M2M, 802.15.4, REST, CoAP, or DTLS. The preferred sources of information are:

– KTH electronic library – Aalto electronic library – IEEE explore

– ACM digital library – Secure Direct – Wiley Online library

Subsequently, collected resources through this method are organized, and a qualitative analysis is performed in order to determine if they are valuable for the aim of the project.

1.5.2 Development and implementation

After obtaining the most appropriated resources from the literature survey, it is possible to make a decision about which technologies will be used. Consequently, the project proceeds to the second phase: development and implementation. This process comprises various general steps, which are described as follows:

– Study and analysis of the existing software solution used by the company that is supervising the project: Solelia Greentech [7].

– Selection of the most appropriate hardware and software platform according to the low-cost, low-complexity implementation requirements.

– Building a hardware prototype of a pulse generator that emulates the behavior of the real smart meter equipment.

– Development of a pulse monitoring module that obtains data from the pulse generator.

– Development of a CoAP server program which gathers data from the pulse monitoring module, process the data, and subsequently delivers information to interested clients over a secure channel.

– Development of a CoAP client program that can consume CoAP resources from the server and pre-process the data in order to pass it to the system currently being used by Solelia Greentech.

1.5.3 Experimentation

An experiment is designed in the third phase, as well as a performance analysis. The experiment comprises a series of tasks running on the prototype device, and a comparison between the software solution proposed in this project and other existing technologies is performed in order to determine if the proposed solution provides an advantage over the compared technologies. The results of this experiment and subsequent analysis are presented in chapter 5.

(25)

1.6 Thesis organization

The structure of this thesis is as follows: Chapter 2 provides background information regarding Machine-to-Machine (M2M) communications, key enabling technologies, communication protocols for M2M, as well as basic information about photovoltaic and electrical vehicles industries. In chapter 3, design decisions concerning the project are described; specifically motivations, objective of the project, and principles. In addition, the prototype architecture is presented in this chapter, as well as a more detailed overview of the selected communication protocol. Chapter 4 explains the implementation of the system, including specific technologies that are used in this process.

Furthermore, a detailed description of each element of the system is presented. In chapter 5 the functionality evaluation, as well as the performance measurements are discussed. Finally, a summary of the project and final conclusions are stated in chapter 6, which concludes the thesis with a discussion about future improvements planned for the system.

(26)

Background

2.1 Photovoltaics and Electrical Vehicles industries

Nowadays, energy suppliers around the world are upgrading their traditional energy grids toward modern Smart Grids [8]. The main features of these type of grids are: fully digital two-way communications infrastructure, and services that allow them to capture real time energy production, transmission and consumption levels. These features represent an opportunity for energy companies to improve their electricity generation and distribution methods by having more accurate diagnostics, as well as providing better services to their customers. Smart Grids comprise a large number of technologies, which in general can be categorized as: Renewable/distributed energy generation, transmission and distribution, smart metering, and electrical vehicles (charging station management).

2.1.1 Electric Vehicles and the existing electrical infrastructure

Electric Vehicles (EVs) [4] at reasonable costs are finally achieving a substantial portion of the market due to several factors, for instance: remarkable developments in communications and batteries technologies, increasing involvement from the private sector, as well as different governments support [9]. The latter has been essential in order to encourage technological research and development.

Furthermore, governments have set the goals and standards for EVs technology, as well as the requirements for producing energy through renewable sources, in order to reduce dependence on fossil fuels.

However, a higher number of EVs competing for resources in the grid may trigger supply problems. Thus, it is necessary to design the most appropriate charging strategy, which can be done by analyzing driving patterns of cars.

Figure 2.1 shows the average time a car is parked everyday, according to a study [1] performed in Denmark. It can be observed that, even though cars are more frequently utilized during specific periods (e.g. 8:00, 16:00, 17:00), the vast majority of cars are not driven during most of the day, which allows to design a proper charging strategy.

Typically, three strategies can be implemented to charge EVs during parking periods:

– As fast as possible with the highest possible power.

– Using less power during the longest available time or during several periods.

– Depending on the availability of the renewable energy source.

As previously stated, EVs popularity raises concerns regarding electrical infrastructure, due to traditional networks are designed to work under certain conditions, such as supplying energy for typical domestic installations. Consequently, it is crucial that electrical networks expand in terms of capacity, and the ability to integrate renewable energy sources, while guaranteeing an appropriate distribution; as well as working within secure limits that protect equipment and the network itself [4]. Therefore, modern electrical networks are being designed to prevent problems derived from the

5

(27)

Figure 2.1: Average time a car is parked everyday [1].

growing use of EVs. In addition, in the last few years, and thanks to the electrical infrastructure development, it is possible to have access to more charging options for EVs, such as charging at home, working places, public charging stations, and public parking areas.

2.1.2 Photovoltaic charging stations

Electric cars can be fully charged by photovoltaic (PV) generated electricity [5]. This type of renewable energy source is a good replacement for fossil fuels, and nowadays more charging options are available.

Installing PV panels and charging stations at workplaces in order to charge car batteries during the daytime is becoming an attractive alternative. According to [1], every day cars are parked most of the day; thus, cars can use PV solutions at workplace’s parking areas while employees work. If an EV is charged every day in order to obtain only the daily required energy, the typical charging time takes 2-5 hours [5]. Usually, working time is approximately since 8:00-9:00, until 16:00-17:00; thus, the required charging time will be achieved easily. However, if all users start charging their cars when they arrive to their workplaces, load peaks and other issues will arise. Therefore, innovative charging strategies must be designed in order to avoid these problems, such as delayed charge start strategy [5].

Delayed charge start is based on the knowledge about daily PV generation curve and user’s energy consumption habits. Despite private PV solutions are connected to the grid, the aim of PVs is to reduce electricity consumption from the public or external grid as much as possible, while maintaining stable loads. Therefore, the central scheduler can execute an algorithm that validates power generation conditions in order to start or delay charging processes. This methodology can be described as follows:

– IF PV is producing electricity (daytime).

– AND the current charging load is lower than the PV production.

(28)

– THEN scheduler allows another charger to start working.

– IF PV is not producing electricity (nighttime).

– AND current charging load is higher than the PV production.

– THEN next car enters into a waiting list.

2.1.3 Smart metering

Smart meters allow monitoring the grid in a remote manner, as well as transmitting energy production and consumption information reliably and more often, in order to improve the distribution network management [10]. For example, energy companies can reduce operation costs derived from manual operations (e.g. meter reading, service disconnection and reconnection). In addition, companies can provide better customer service by identifying different segments of their clientele. Furthermore, they can identify customers that commit energy theft, which can be an issue in some countries.

In order to exploit smart meters potential, a secure, two-way communication with the organiza- tions that provide the service using the public infrastructure (utilities) is required. Consequently, the industry has realized that implementing a separated, intelligent communications module is more important than the meter itself, due to the fact that the communications module is responsible for crucial management decisions [10], for instance:

– Starting the connection with the backend servers.

– Managing the security of the connection.

– Monitoring the signal strength.

– Preventing jamming atacks.

– Re-routing when the primary communication path is inaccesible.

This modular architecture allows to use the same meter with a variety of communication modules (e.g. Power-line communications [11], Radio Frequency (RF) mesh, cellular) depending on the needs. In addition, being able to change the communications module allows companies to upgrade communication technologies as required. Furthermore, these modules usually have enough resources to acquire more functionalities by receiving software updates.

Moreover, in order deploy an appropriate Smart Metering solution, the Smart Metering commu- nications infrastructure must accomplish a number of requirements, such as: Low maintenance, low power consumption, low installation costs, interoperability and security.

2.2 Machine-to-Machine Communication (M2M)

Machine-to-Machine (M2M) or machine-type communication technology can be described as a combination of diverse communication, electronic, and software technologies. It has been standard- ized by International standard developing organizations, such as the European Telecommunication Standard Institute (ETSI) and 3rd Generation Partnership Project (3GPP), which collected essential requirements from different M2M technologies and the Internet of Things (IoT) vertical markets in order to elaborate a standard [6]. M2M popularity has been constantly increasing during the last few years.

M2M technologies are utilized in a variety of industrial processes, for example to gather information derived from measurements collected from monitoring instruments, usually in remote locations, and subsequently transmit this information to a central hub for further analysis. Examples of this kind of implementation include capturing different events, such as temperature, atmospheric pressure, or electrical energy generation/consumption. The collected information is transmitted through wired, wireless or hybrid networks to a central server, which executes autonomic software programs designed to provide different services to the networked devices, such as translation or

(29)

interpretation of the data into meaningful information, and often, increasing the automatic decision- making process quality. On the other hand, data flow can also be performed in the other direction, that is from the server to the end-devices in order to send control commands, data queries, or the latest software updates.

M2M communication also indicates that intelligent devices exchange real-time data among each other without human intervention, satisfying the increasing industry requirements for automatic monitoring, command scheduling and data acquisition [12]. The ultimate goals of M2M technologies are to stimulate operational efficiency, and to enhance business processes and customer satisfaction.

In order to develop a M2M solution some key elements must be covered [13], for instance:

• End-devices. An instrument, equipment, sensor or embedded system with communication capabilities can be considered as an M2M end-device. For example: smart meters, RFID tags, GPS chips, or smartcards. These devices usually include one or many special functionalities that provide more elements to the user for making an appropriate decision when selecting them. These functionalities include power consumption, reliability, availability, connectivity options, input/output capabilities, logging capabilities, or security [13].

In addition, some end-devices have resource constraints (e.g. memory); thus, the M2M solutions must be carefully designed due to the fact that critical implementations, such as healthcare or military applications, might need advanced features and to transmit a complete set of data for further analysis. However, some M2M applications only require a minimum amount of data to work properly and to deliver satisfactory analytics. Therefore, in order to reduce the volume of data being transmitted, a filtering process can be implemented at end-devices or gateways.

• Device connectivity. In the network design stage, a set of protocols must be considered for short-range and long-range communications. Short-range options include a large variety of protocols [14], for instance ZigBee, Bluetooth, Serial or Wi-Fi. Regarding long-range communications, options can be based on cellular driven technologies (GPRS, 3G, LTE, etc.), and most recently IEEE 802.11AF [15] and IEEE 802.11AH [16]. The communication protocol selection depends on many factors, such as the geographical location of the end-devices, the availability of services, costs, functionality, latency, bandwidth, security, and local regulations.

In addition, it is desirable to cause minimal changes to the landscape and to the existing hardware when selecting any protocol.

• Standardization. Due to the immense variety of devices, networks, applications, industries, protocols and even topologies and geographies, standardization has become an imperative necessity. Currently, most M2M solutions are proprietary driven, which causes more pro- gramming complexity, almost non-existent compatibility, as well as higher costs. Therefore, solutions should be designed and built based on industry standards in order to achieve better interoperability, maintainability, and scalability; in addition to lower costs and more simplicity when extracting meaningful information from networked devices.

• Security. Typical data flow in M2M solutions occur through various layers [17]: First, from a M2M end-device to a M2M gateway within the M2M Area Network. Second, from the M2M gateway to the Wide Area Network. And finally, to the enterprise system. Due to this flow, data security can be compromised at any of these layers. Thus, it is crucial to select the appropriate security measures and the proper layer to implement these measures.

However, implementing sophisticated cryptographic solutions at the end-device layer is not always possible due to limited hardware resources, such as memory. Therefore, some security features can be implemented at the gateway level due to the fact that recent hardware have programmable features, as well as more memory and processing power. Furthermore, cellular network security must be analyzed in order to select the protocol that offers sufficient levels of security. And finally, because of the increasing security features that recent communication protocols provide, even at the end-device layer, a careful analysis must be performed in order to select the best possible alternative.

(30)

2.2.1 M2M architecture

Figure 2.2 illustrates the M2M architecture, which is generally divided into three layers:

First, the M2M Terminal Layer is comprised of M2M device nodes, M2M area network and M2M access gateway. M2M device nodes include sensors, actuators, and other devices that are usually found in a Wireless Sensor Network (WSN) [18]. M2M area network allows M2M devices to connect to the M2M Gateway. M2M Gateway provides connectivity between M2M area network and the Network Layer, and it also carries a variety of service capabilities. Furthermore, M2M Gateway can work as a proxy to the Network Layer when M2M devices have restricted capabilities or limited resources that makes them unable to directly connect to the Core Network or perform advanced M2M operations. For instance, when sensory data requires some pre-processing in order to provide the system with sufficient elements for making an appropriate decision regarding to triggering or stopping an actuator. Consequently, data is sent to the M2M Gateway, where further analysis is performed and application logic is executed, finally sending back the required commands to the actuator.

Second, the Network Layer, which includes both wired network and wireless network (e.g.

Cellular Base Stations, Wi-Fi, WiMAX, etc.), handles the data transmission from the terminal layer to the application layer. Furthermore, it comprises a collection of service capabilities. A variety of M2M functionalities are exposed by these service capabilities through a group of interfaces, described in [19].

And third, the Application Layer. This layer comprises the M2M server and the business logic. A M2M server stores and transmits sensory data, originated in the terminal layer, to the business application which analyzes the data and automatically performs an action according to predefined instructions [17].

2.2.2 M2M market

In the business scope, companies from a variety of sectors have noticed that M2M solutions can provide remarkable efficiency improvements in their core business processes. Furthermore, M2M technology is creating a new platform for enterprises to design and deliver new services.

M2M communications success derives from the diversity of solutions that this set of technologies has to offer to each unit in the ecosystem. It gives chipset manufacturers and providers, M2M device producers, network operators, and system integrators the opportunity to provide their products or services. M2M communications offer a common technology infrastructure, which allows enterprises to offer value-added products and services.

Government policies in different countries represents another contributing factor for fast M2M adoption. This growth offers network operators the opportunity to participate into the market, due to the popularity and extended coverage of cellular networks for long-range data transmission.

A study by GSMA Intelligence [20] calculates the adoption of cellular M2M connections worldwide will reach approximately one billion in 2020, with a growth rate of 25% per year in the 2015-2020 period.

Network operators’ participation in this market increases the availability of M2M services, and may reduce the implementation complexity for customers by delivering advanced features [21] (e.g.

subscriptions, signaling congestion control). However, compatibility and standardization issues may arise when management is exclusively executed by network operators.

Although the industry has confidence on constant M2M technologies growth [22], remaining challenges to be overcome still prevail, for instance:

– Standardization is limited, due to the multitude of business models, ecosystems, services, protocols and devices available nowadays.

– Usually processes, resources, and systems in each company are different. Therefore, custom solutions are implemented.

– Complex requirements and fragmented ecosystem makes industry efforts insufficient in order to maintain rapid adoption.

(31)

Figure 2.2: M2M network architecture

– M2M applications are designed only to particular vertical markets.

– Currently, M2M solutions generates large amounts of data, and the tendency is to keep growing in the future. Thus, companies are still investigating about efficient solutions to handle this amount of data.

– Lack of an integral solution to provide security for M2M technologies in different layers is an important concern.

Due to the fact that M2M industry is somehow fragmented and covers a large variety of sectors, such as telecommunications, transportation, energy, or health; specific groups within an industry, also defined as verticals, create and support their own dominant solutions in order to solve their requirements. This approach drives to limited competition and low standardization levels; therefore, numerous organizations are designing and promoting standards.

Telecommunication companies have observed an opportunity to take leadership on this endeavor and they are gathering experts in the field to work on solving this issue. Additional traffic is also generated by emerging high bandwidth M2M applications, which leads to greater Average Revenue Per User (ARPU) [23].

(32)

2.3 M2M enabling technologies (Wireless communication sys- tems)

Wireless communication protocols achieved huge popularity and support from the industry because of the substantial benefits they offer [22]. During the last few years, a number of standardization organizations, such as 3GPP, the Open Mobile Alliance (OMA), IEEE and the European Telecom- munications Standards Institute (ETSI) have worked on M2M communications standardization. In particular, 3GPP and IEEE are working on M2M cellular communications, and ETSI is working on M2M service architecture.

In the M2M communications scope, two types of wireless communication exist: shot-range and long-range [21]. Examples of short-range radio technologies include Wi-Fi [24], ZigBee [21], IEEE 802.15.4 [25] and Bluetooth [26]. Long-range protocols are usually based on cellular technologies, such as 3G [27] and LTE [28], and more recently on IEEE 802.11AF [15] and IEEE 802.11AH [16].

Due to differences between M2M devices and traditional mobile terminals, it is a challenge to plan and operate cellular networks having into account M2M communications. Traditional cellular networks are designed and planned to manage Human-to-Human (H2H) traffic. Although M2M devices require less resources for data transmission, due to the elevated number of M2M devices, this type of traffic generates high signaling levels over the Radio Access Network, which creates additional issues [29].

In addition, heterogeneity of M2M devices and their capabilities makes planning and operational tasks even more complicated. Therefore, mobile operators have implemented different optimization procedures in order to include M2M devices into their networks [30], [31]. For instance, grouping these devices according to their features and creating subscription models in order to provide services only to compatible devices, thus, controlling network resources more efficiently.

A number of short-range communications and long-range communications, related to M2M, are described in this section.

2.3.1 IEEE 802.15.4

TM

In the wireless networks scope, as well in wired networks, the network layer is responsible for different features or functionalities, such as topology, and naming/binding services (e.g. addressing or routing). However, the implementation of these features in wireless networks is substantially more complicated due to an essential element: energy constraints. Therefore, IEEE 802.15.4 standard [32] is carefully designed to be implemented in various areas with energy conservation concerns due to elevated costs, or because of locations that are difficult to access in order to replace batteries. For example: industrial control, sensing and location at disaster sites, physical environment monitoring, tags, or smart badges.

Moreover, network layers based on this standard must be capable of self-organization and self- maintenance in order to reduce costs. Thus, the IEEE 802.15.4 approach is considerably different to other IEEE 802 standards that seek for higher data rates and more functionality, due to the fact that the goal of this standard is to provide a simple solution for transmitting a reduced volume of data generated in control and sensor devices [33].

The core of the standard describes and regulates three layers: Radio Frequency (RF) Link, PHYsical layer, and Medium Access Control (MAC). However, it does not directly define a preferred network topology, nor networking methods beyond simple peer-to-peer communication link. Therefore, it only provides the standard specifications of the protocol and the radio resource.

Although, this approach provides the opportunity for third-parties to develop different techniques outside the standard to benefit of this radio technology. Examples of these third-parties include ZigBee Alliance (ZigBee mesh network), IETF (IPv6 over 802.15.4 working group) [34], and IEEE (802.15.5 mesh networking group) [33].

The goal of this standard is to allow simple devices to run for long periods, usually for years, on standard batteries, due to the fact that most of the time these devices remain in an extremely low- power state. As a result, this standard is planned for low-duty-cycle communications. Nevertheless, in order to maintain message transfer reliability between devices, the protocol allows taking

(33)

advantage of receipt acknowledgement capabilities. In addition, this standard provides these devices with a robust, trustworthy wireless technology, as well as methods and formats of communication between the radio devices, and the capability for every radio device in the network to be uniquely identified. Moreover, IEEE 802.15.4 is planned to offer developers the required tools in order to benefit from the use of radio devices based on this standard, without requiring special training in communication protocols or radio technologies, due to its simplicity. This section presents an overall description of the standard architecture, having the RF channel Layer as the physical medium, the PHYsical Layer that controls the RF channel features, and the Medium Access Control (MAC) Layer controlling the PHY.

Radio Frequency (RF) Link

The IEEE standard defines the RF Link parameters, such as channelization, modulation, coding, spreading, and symbol/bit rate. The standard specifies 27 frequency channels spread across different unlicensed frequency bands in various geographic regions. For instance, the 868/915 MHz PHY supports the 868.3 MHz channel in the European Union, which is, under the regulations, limited to a 0.1% transmitter duty cycle [32].

Furthermore, 10 more channels are supported in the frequency band between 902.0 MHz and 928.0 MHz, however, according to the regulations this band has no duty cycle limitations. In addition, these two bands can use comparable or even identical hardware due to the fact that they are very close in frequency, as well as the improbable circumstance that a single network would ever use all 11 channels [33]. As a result, manufacturing costs can be substantially reduced.

The third covered frequency band by the standard is the 2400 MHz PHY, which supports 16 channels between 2400MHz and 2483.5MHz. This band has no duty cycle restrictions either.

Additionally, this band has a larger channel spacing of 5MHz, in contrast to the 2MHz space from the previous bands, intended to facilitate transmission and reception requirements. Figure 2.3 illustrates the IEEE 802.15.4 channel structure.

Figure 2.3: The IEEE 802.15.4 channel structure

Phase-shift-key (PSK) modulation mode [32], which is the core of most of the high performance modem standards nowadays, is used by IEEE 802.15.4 due to the fact that it provides more strength and better recovery capabilities in different noisy propagation environments or with low signal levels.

(34)

PHYsical Layer

The main functions of PHYsical Layer (PHY) in IEEE 802.15.4 are packet data flow control and radio channel management. Regarding packet data flow control, PHY defines 4 frames, each with a specific function: Data, Acknowledgement, Beacon and MAC command. The receiving station uses the acknowledgmet frame to notify the transmitting station that a data packet was succesfully received. When stations are executing low-power modes, the beacon frame is implemented. This frame can also be used by routers trying to establish networks. MAC command frame is utilized to send low-level commands between devices. Concerning radio channel management, PHY uses Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) [35]. This protocol is utilized to access the radio channel, and its operation can be described as follows: If a radio has data to transmit, instead of immediately sending the data, it will first listen to the channel to ensure the channel is clear, then it can start the transmission. In contrast, if the channel is occupied, the radio will wait for a random period of time to check again if the channel is clear. Some reasons for a channel to be occupied include another IEEE 802.15.4 station performing a transmission at the same time, or because of interference caused by non-802.15.4 devices, such as Wi-Fi stations or microwave ovens. In addition, the addressing methodology in IEEE 802.15.4 allows all devices to have a unique, 64-bit address. Although, in some cases like in complex networks transporting small blocks of data, devices joining existing networks are allowed to exchange the 64-bit address for a 16-bit local address, provided by a dedicated network coordinator, called the Personal Area Network (PAN) coordinator. As a result, a substantial reduction in the header size and the packet length is observed. Thus, making communications more efficient within the network.

Medium Access Control (MAC) Layer

The main functions of the IEEE 802.15.4 MAC Layer, provided by an important number of primitives, include inbound and outbound data transfers, and management of RF and PHY by using high-level entities of these layers. In order to gain access to the upper layers, the MAC layer uses two different Service Access Points (SAP). First, MAC Layer Management Entity Interface (MLME-SAP), which provides control and monitor functions. Second, MAC-SAP that offers data management. IEEE 802.15.4 does not represent a full set of the Media Layers as specified in the OSI model – the Network layer is a task to be implemented by the developer. Another function of the MAC layer is to generate network beacons, which allow devices to find existing networks, and to associate/disassociate from these networks as required. According to the specification [32], when a device is turned on, an upper layer entity sends a command to the transceiver, which starts searching for existing networks, by scanning every available channel. If the device finds an existing network, the device will try to associate to that network. In contrast, if no network is found, and if the device is a Full-Function Device (FFD), it will attempt to create its own network. In addition, when networks are supported by permanently powered routers, they usually implement network beacons just for network discovery. Furthermore, in Time Division Multiple Access (TDMA) [36]

networks, these beacons offer a timing indication for devices, in order to denote when it is possible to access the channel during contention-based and contention-free periods.

Superframe

In some cases, in order to achieve low latencies, IEEE 802.15.4 applications may need dedicated bandwidth. Therefore, IEEE 802.15.4 specification describes an optional operation mode, called superframe mode. In superframe mode, superframe beacons are transmitted by the PAN coordinator in predefined intervals that operates in a 15ms-245ms range. It is described by the following equation:

Beacon interval = 15.83ms ∗ 2n Where n = 0 to 14

The existing time between two beacons is divided into 16 time slots, which must be equal regardless the superframe duration. A transmission can occur at any time during a time slot, but

(35)

the transmission must be terminated before the next beacon. Usually, the channel access in the time slots is contention-based. However, in order to have a contention-free period, special time slots called guaranteed time slots (GTS) may be assigned to a single device that requires a low-latency transmission or dedicated bandwidth. This contention-free period is always located right before the next superframe beacon. Figure 2.4 illustrates the superframe structure.

Figure 2.4: The superframe structure

2.3.2 ZigBee

TM

ZigBee [37] is a wireless standard based on the IEEE 802.15.4 standard [32]. The aim of ZigBee is to provide monitoring, control, and building/home automation capabilities, by interconnecting low-powered sensors and actuators. In addition, this standard offers transmission coverage within a 10 to 100 meters range, depending on factors such as power output and environmental conditions.

Although it is based in IEEE 802.15.4, it extends the specification by including additional higher layers.

IEEE 802.15.4 defines two types of devices: Full Functioning Device (FFD) and Reduced Function Device (RFD). FDD can perform both sensor and actuator functions; as well as acting as PAN coordinator. FDD is able to communicate with both FDDs and RFDs. On the other hand, RFD has reduced processing capabilities, as well as low resource and communication requirements, therefore productions costs are lower. However, RDD is only able to communicate with its FDD parent, not with other RDD.

As for ZigBee, three types of devices are defined [38]. First, the ZigBee coordinator is an FFD device that coordinates and acts as the root of the network; it also establishes a bridge with other networks. Furthermore, the ZigBee coordinator stores network information and it is also responsible for the network security, as well as for keeping the security keys. Second, the ZigBee router, which is an FFD device that is composed of sensors and actuators, however, it also performs router tasks, by having the capacity to relay messages from other devices. Finally, the ZigBee end-device, which is an RDF device that can connect to sensors and actuators, and in order to reduce battery consumption, it can spend most of the time in sleep mode. However, due to its limited processing capacity, it is not able to relay messages; although, it is less expensive to produce because of its restricted resources. Currently, ZigBee standard is in version 3.0. The purpose of this version is to unify the ZigBee Alliance Wireless standards into a single one. ZigBee 3.0 operates at 2.4GHz, which is an unlicensed frequency available across the globe, and it uses ZigBee PRO networking in order to provide reliable communication in low-powered devices.

ZigBee PRO is an extended specification that provides major improvements in resiliency, security, simplified usability in larger and complex networks, and network scalability. Network scalability is possible because of a new addressing method: stochastic addressing. This method allows new nodes to randomly choose an address from the entire 16-bit address space when they join the network. In

(36)

contrast, the original method used a cluster-tree routing algorithm, where the ZigBee coordinator acted as the root of both the network and the address tree, thus, each node address depends on its position within the tree. As a result of the new method implementation, all addresses are available anywhere in the network to all nodes, and the address assignment remain consistent independently of changes in RF conditions. Furthermore, in the exceptional case of a collision caused by two nodes choosing the same address, an address conflict resolution mechanism is provided by the network stack, which uses the unique node IEEE MAC address for these exceptional occasions.

Some benefits that ZigBee technology offers, include:

– ZigBee is low-power, which allows devices operated with batteries to work for long periods of time, usually for years.

– New ZigBee Green Power feature permits devices to work without even requiring batteries.

– ZigBee is scalable. In other words, it is ideal for a smart home network; or it can handle large, complex networks with hundreds of nodes within a smart city.

– ZigBee is reliable, robust, and secure. In order to provide superior security, it utilizes a variety of mechanisms, for instance security keys for both the device and the network, frame counters, or AES-128 encryption.

The ZigBee specification substantially improves the IEEE 802.15.4 standard by including valuable features, such as network and security layers, as well as an application framework. Based on these principles, the ZigBee Alliance provides standard application profiles that allow developers to create interoperable solutions between devices from different vendors, examples of these profiles include:

smart energy, building and home automation, health care, telecom services, monitoring and control.

However, ZigBee solutions are not limited to these standards, due to the fact that manufacturers can develop their own specific standards if their applications do not require interoperability with other vendor devices.

Another benefit of ZigBee is the use of small, low-power, and cheap digital radios in order to establish low data rate wireless networks. As a result, ZigBee devices are excellent for network controllers and sensors that require to work for long periods of time with reduced battery consumption, and that only need to transfer small blocks of information. The duty cycle of the nodes in a ZigBee network, that are powered by batteries, is very low. Once a ZigBee node is associated with a network it can wake up and communicate with other ZigBee devices, and immediately after the communication return to a sleep state. This behavior offers improved energy efficiency and superior battery life. Due to the large variety of wireless technologies in the market, ZigBee requires the capacity to establish connections with other wireless networks. Therefore, a solution is provided by the ZigBee Alliance: ZigBee gateway. This solution translates the ZigBee network and protocols to another standard formats existing in a large variety of systems. Thus, it offers an interface between traditional IP devices and ZigBee devices, by converting both IP and ZigBee commands and addresses between them, allowing more diversity of applications and devices that are capable to connect and control ZigBee networks and devices.

2.3.3 Bluetooth

Bluetooth is an open specification that allows low-power devices to wirelessly transfer data. Bluetooth offers important benefits, such as low cost production and ubiquitous presence, due to the fact that Bluetooth specification describes a uniform structure for a large variety of devices that can connect and transfer data with each other [39]. However, it works only over short distances, which the specification separates into 3 classes that are presented in table 2.1.

A group of companies including IBM, Intel, Nokia, Toshiba, and leaded by Ericsson, created this technology. However, a second, more numerous group of companies, formed the Bluetooth Special Interest Group (SIG) later in order to promote and develop the technology even further.

During the last 20 years, an important number of specification versions have been announced.

The first versions presented different problems, for instance poor interoperability between devices,

(37)

Table 2.1: Specifications of different Bluetooth classes.

Max allowed power Class

mW dBm

Approximate range (m)

Class1 100 20 5

Class2 2.5 4 10

Class3 1 0 100

which prevented better adoption of the technology. However, many of these problems were solved in recent versions, in addition to including new powerful features that helped this technology to become popular.

Such changes were gradually included [40]. For example, version 1.2 solved radio frequency interference by implementing a hopping sequence algorithm to avoid the use of congested frequencies.

Version 2.0+EDR included Enhanced Data Rate (EDR), which provides a set of additional packet types that use the new 2 Mb/s and 3 Mb/s modes. Version 3.0+HS introduced a feature called High Speed (HS) that allows Bluetooth radio to run over an alternate radio, such as 802.11, in order to reach speeds of up to 24 Mb/s. Finally, version 4.0 added a new feature called Low Energy (LE), which adds support for collecting data from devices which generate data at a very low rate,

such as IoT sensors.

In order to ease Bluetooth development, it can be separated into two different specifications.

First, Core Specification, which describes how the technology works. Second, Profile Specification, which defines guidelines to create interoperating devices based on the Core Specification.

Bluetooth technical features

• Spectrum. Bluetooth works in the unlicensed industrial, scientific and medical (ISM) band between 2.4 GHz and 2.485 GHz, which is available in the majority of countries around the world. This technology uses spread spectrum, full-duplex signal, frequency hopping at 1600 hops/sec [40].

• Interference. In order to solve the interference caused by congested frequencies in the 2.4 GHZ spectrum, Bluetooth Basic Rate / Enhanced Data Rate (BR/EDR), which was introduced in the specification version 2.0, implements a feature called Adaptive Frequency Hopping (AFH). This feature works by scanning the spectrum to detect other devices in order to avoid the frequencies that these devices are using. The adaptive hopping inspects the spectrum in 79 hops shifted by 1 MHz, starting from 2.402 GHz and stopping at 2.480 GHz. As a result, this technology substantially reduces interference and increments efficient transmissions. In other words, it offers greater performance in Bluetooth devices working next to other wireless technology devices in the same spectrum.

• Range. Although a minimum range is defined by the Core Specification, the range usually depends on the application and on the manufacturer implementation, due to the fact that they are allowed to increase the range if the application requires it.

The common use cases for the three classes include: Class 1 radios (100 meters): Commonly in industrial applications. Class 2 radios (10 meters): Usually in mobile devices (i.e. cell phone).

Class 3 radios (1 meter): Devices supported by batteries, such as a pointing devices (mouse).

Bluetooth devices can start an automatic, electronic conversation when they are within a range in order to determine if they have data to share or if one device needs to control the other. After the conversation has successfully started, these devices form a network. The basic communication unit in Bluetooth is a frame that comprises a transmit packet, as well as a receive packet. Each packet can comprise one, or multiple slots (3 or 5). Data rate depends on the number of slots used, for example a single-slot frame hops at 1600 hops/s, however multi-slot frames allow higher data rates.

(38)

Network architecture

Bluetooth specification allows two types of communications: peer-to-peer and small ad-hoc networks (piconet) [26]. By definition, peer-to-peer communication gives equal capabilities to each device.

Conversely, during a piconet connection, one device performs master functions, and the other devices are slaves. Master functions include: controlling the hopping sequence, and synchronizing all devices to the master clock. In addition, each device in a piconet can establish simultaneous communication with up to seven devices in the same piconet. Moreover, each device can be part of different piconets at the same time.

The process, after a successful piconet connection is established, can be described as follows: A device gets connected into a piconet. This device receives a 3-bit Active Member Address (AMA) [40] that permits other devices within the piconet to address it. A piconet supports up to 8 active devices simultaneously, therefore, when the limit has been reached, the master selects a device and put it into a special “park” state. This means the radio device release its AMA, and an 8-bit Passive Member Address (PMA) is assigned to it, although it remains under the piconet control.

Finally, the released AMA can be used by a new device waiting to join the piconet.

Furthermore, these connectivity options allow to connect different piconets, forming scatternets.

A scatternet is comprised of two or more piconets linked together by one device in each piconet, which performs bridging functions between piconets. Figure 2.5 demonstrates a scatternet.

Figure 2.5: Piconets and scatternet

When two radio devices use different higher level communication protocols, and it is necessary to establish a connection between them, the Logical Link Control and Adaptation Protocol (L2CAP) [41]

can be used in order to multiplex and de-multiplex multiple logical connections. This protocol provides a channel-based abstraction for both applications and services. Furthermore, it is responsible for segmentation and reassembly of application data, which may be transported to any logical link that supports L2CAP.

Originally, a variety of L2CAP modes were included in Bluetooth: Basic mode, Retransmission mode, and Flow Control mode. However, in Addendum 1 [40], two L2CAP modes were included into the Bluetooth Core Specification: Enhanced Retransmission Mode (ERTM) and Streaming Mode (SM). These modes replace original Retransmission and Flow Control modes. ERTM provides a reliable L2CAP channel. Conversely, SM provides an unreliable L2CAP channel, due to the fact that this mode does not include retransmission of flow control in order to keep simplicity.

Due to the large variety of hardware implementations, the Bluetooth software architecture was designed to allow different devices to establish communication between each other through the use of the Host Controller Interface (HCI) as an interface between Bluetooth core and the Bluetooth

References

Related documents

46 Konkreta exempel skulle kunna vara främjandeinsatser för affärsänglar/affärsängelnätverk, skapa arenor där aktörer från utbuds- och efterfrågesidan kan mötas eller

The increasing availability of data and attention to services has increased the understanding of the contribution of services to innovation and productivity in

Generella styrmedel kan ha varit mindre verksamma än man har trott De generella styrmedlen, till skillnad från de specifika styrmedlen, har kommit att användas i större

Parallellmarknader innebär dock inte en drivkraft för en grön omställning Ökad andel direktförsäljning räddar många lokala producenter och kan tyckas utgöra en drivkraft

Närmare 90 procent av de statliga medlen (intäkter och utgifter) för näringslivets klimatomställning går till generella styrmedel, det vill säga styrmedel som påverkar

I dag uppgår denna del av befolkningen till knappt 4 200 personer och år 2030 beräknas det finnas drygt 4 800 personer i Gällivare kommun som är 65 år eller äldre i

Industrial Emissions Directive, supplemented by horizontal legislation (e.g., Framework Directives on Waste and Water, Emissions Trading System, etc) and guidance on operating

Velmi užitečný je také refactoring kódu, který zásadním způsobem zjednodušuje práci s kódem jako takovým, úkony jako přejmenování proměnné nebo třídy by