57
Wireless Communication Project Title: Study of viability of Zigbee Technology on mobility applications. Autors: Sergio Soria, Adriá López, Alberto Hueltes, Daniel Quintas, Ferran Montes Director: Luis Alonso. Date: June 20th 2011

ZigBee Project UPC

Embed Size (px)

DESCRIPTION

Telecom Project

Citation preview

Page 1: ZigBee Project UPC

Wireless Communication

Project

Title: Study of viability of Zigbee Technology on mobility applications.

Autors: Sergio Soria, Adriá López, Alberto Hueltes, Daniel Quintas, Ferran Montes

Director: Luis Alonso.

Date: June 20th 2011

Page 2: ZigBee Project UPC

Title: Study of viability of Zigbee Technology on mobility applications.

Autors: Sergio Soria, Adriá López, Alberto Hueltes, Daniel Quintas, Ferran Montes

Directors: Luis Alonso.

Date: June 20th 2011

Overview

This report tries to summarize the results from an intensive work carried out with a commercial kit of Telegesis nodes, which are representative of Zigbee technology.

The main goal pursued by the project is, at the end of the day, to try to estimate the feasibility of using the Zigbee technology in mobility environments.

First of all, this report includes a brief explanation of the IEEE Standard [802.15.4] in order to clarify what are the main aspects of Zigbee.

Then the goals and an introduction to the first steps followed in order to become familiar with the devices used in this project are shown in chapter 2.

Chapter 3 details the different scenarios created in order to carry out several experiments, which have been useful to characterize the devices and to observe the constraints of the technology, both in static and in mobility environments.

After that, the results are presented in chapter 4, with the same structure followed by the explanation of the experiments in chapter 3. That means, dividing the chapter in measurements belonging to static environment experiments and in measurements belonging to mobility scenarios experiments.

Finally, several conclusions and discussed possible new interesting test in order to go further with the Zigbee nodes are introduced in the final chapter.

Page 3: ZigBee Project UPC

INDEX

INTRODUCTION  ..............................................................................................................  1  

 CHAPTER  1.  ZIGBEE  TECHNOLOGY  ..........................................................................  3  

1.1.   General Overview ...................................................................................................... 3  1.1.1.   Architecture ......................................................................................................... 4  1.1.2.   Type of devices and functionalities ..................................................................... 5  1.1.3.   Topologies ........................................................................................................... 6  

1.2.   Physical Layer (PHY) ................................................................................................ 7  1.2.1.   Main properties .................................................................................................... 7  1.2.2.   Link Quality Indicator (LQI) .................................................................................. 8  

1.3.   Link Layer (MAC) ...................................................................................................... 8  1.3.1.   MAC Layer’s transmission models ...................................................................... 8  

1.4.   Network Layer (NWK) ............................................................................................. 10  1.4.1.   Routing .............................................................................................................. 11  1.4.2.   Route discovery ................................................................................................. 12  1.4.3.   Source Routing .................................................................................................. 13  

 CHAPTER  2.  PROJECT  OBJECTIVES  &  INITIAL  STEPS  ......................................  15  

2.1.   Objectives ............................................................................................................... 15  

2.2.   First steps ............................................................................................................... 17  

 CHAPTER  3.  MESUREMENT  DESCRIPTION  .........................................................  19  

3.1.   General measurements of ZigBee protocol (Static measurements) ................. 19  3.1.1.   RSSI vs Distance & LQI vs Distance ................................................................. 21  3.1.2.   Throughput ........................................................................................................ 22  3.1.3.   Time measurements .......................................................................................... 25  

3.2.   Mobility measurements ......................................................................................... 28  3.2.1.   Two ZigBee devices .......................................................................................... 29  3.2.2.   Three Zigbee devices ........................................................................................ 31  

 CHAPTER  4.  RESULTS  OF  MEASUREMENTS  ........................................................  35  

4.1.   Static measurements ............................................................................................. 35  4.1.1.   RSSI vs. Distance & LQI vs. Distance ............................................................... 35  4.1.2.   Throughput ........................................................................................................ 38  

4.2.   Mobility measurements ......................................................................................... 44  4.2.1.   Mobility measurements ..................................................................................... 44  

 CHAPTER  5.  CONCLUSIONS  AND  FUTURE  LINES  ...............................................  47  

5.1.   Achieved objectives ............................................................................................... 47  5.1.1.   Static environment ............................................................................................. 47  5.1.2.   Mobile environment ........................................................................................... 48  

Page 4: ZigBee Project UPC

Wireless communication project 2

5.2.   Future lines ............................................................................................................. 48  5.2.1.   Security ............................................................................................................. 49  5.2.2.   Power measurements ....................................................................................... 49  5.2.3.   Programmable nodes ........................................................................................ 49  

5.3.   Conclusions ............................................................................................................ 50  

 REFERENCES  .................................................................................................................  51  

 ANNEX  .............................................................................................................................  53  

Annex A: Commands list used ........................................................................................ 53  

Page 5: ZigBee Project UPC

Introduction 1

INTRODUCTION

ZigBee is a standard for wireless communications applications aimed at low cost and low power consumption, such as home automation facilities, sensor networks, industrial control networks, weather stations, PC peripherals, etc. Born from the diversity of manufacturer’s proprietary protocols looking for a solution to the mentioned types of applications. Thus, ZigBee stands as a common specification for all types of development applications that require the features named above.

The protocol is based on the physical layer and access to the medium (MAC) defined in IEEE 802.15.4, as they have the same goal and are aimed at applications with low power consumption type of network working under the LR-PAN (Low Rate - Personal Area Network), which aims to transmit data in a small volume of certain local area.

The fact to look for applications for low power over any other factor implies applications with very low workflows and devices with basic implementations. The low workflow involves the minimization of the transmission time and the operation of the nodes; factors that cause low-latency and fast connection of devices in the network, in addition to greatly increase the number of devices that may be present in it.

The main motivation of the project is to know and study the behaviour of a wireless protocol, which was not originally designed for mobile environments, in mobility applications. ZigBee is chosen because is a standard supported by the IEEE organization and because is a growing technology. The necessity of avoids proprietary protocols and lets the developers to work in a standard specification, which are also reasons for the election.

This project involves the study of the Telegesis platform, which is capable to implement the main performances of the ZigBee specification. Our study is based on mobility environments, allowing us to consider the Zigbee protocol in these scenarios where the nodes don’t follow a fixed configuration in terms of positioning.

Our project involves different stages. In a first step we focus on the study of different parameters of Zigbee protocol and of communication link quality, such as RSSI, LQI, Throughput, etc.

In a next step, we study the performance of the nodes on network-level measurements, and finally we reach the last phase of mesurements on mobility environments.

Page 6: ZigBee Project UPC
Page 7: ZigBee Project UPC

Zigbee technoly 3

CHAPTER 1. ZIGBEE TECHNOLOGY

1.1. General Overview

ZigBee is the name of the specification of a set of protocols for wireless communication level, defined by the ZigBee Alliance, which aim to work in low power radio links. The radio link is defined by IEEE 802.15.4, the first version of which was approved in 2003.

The IEEE 802.15.4 was designed in order to allow communication in wireless personal area networks (WPAN) between devices with low power con low speed (Low Rate – WPAN). This specification has as its main objective as well as applications that do not require high bandwidth do they need reliable communications with a low rate of transmission of data and maximizing the lifespan of their devices (sensor networks, home automation, Control of parking, etc.), because it is assumed that use a battery as the main source of energy.

Unlike other wireless communication protocols, which attempt to achieve the maximum bandwidth possible without concern for power consumption, the IEEE 802.15.4 seeks to achieve the opposite. Then, Table 1.1 shows a small comparison between the main wireless protocols: WiFi, Bluethoot and 802.15.4.

Frequency Bandwidth Power Consumption

Tx. Range Advantages Applications

Wifi 2,4 GHz 54 Mbps 20 - 400 mA 100 m Speed and flexibility

WWW, @, Video

Bluetooth 2,4 GHz 1-3 Mbps 0,2 - 40 mA 10 m Replace

cable and Interoperable

Wireless USB, mobile

IEEE 802.15.4

868 MHz, 915 MHz, 2,4 GHz

250 Kbps 5,1 µA - 1,8 mA 100 m

Robust, consumption,

cost, flexibility and

scalability

Remote control,

monitoring, control and

location

Table 1.1: Wireless technologies comparison matrix.

The IEEE 802.15.4 uses free ISM band (Industrial, Medical & Scientific) and can work at three different frequencies: 868 MHz (Europe), 915 MHz(USA) and 2.4 GHz (All World). The last one is the main choice for developers because its range of operation is global. The simplicity and low cost are the two main characteristics in developing any type of node that implements the standard.

This protocol works at low speeds compared to other wireless communications standards: 250 kbps (2.4 GHz), 40 kbps (at 915 MHz) and 20 kbps (at 868 MHz). Another fundamental objective of the specification is to achieve maximum battery life of devices that implement and may even lead to years with common battery voltages (1.5 V AA batteries).

In this way, IEEE 802.15.4 defines the physical layer and MAC sub-layer for LR-WPAN network previously known, while ZigBee Alliance taking advantage

Page 8: ZigBee Project UPC

Wireless communication project 4

based on the lower layers that are defined by IEEE 802.15.4, works in upper layers and defines the application layer support (the application layer is defined by the user), the network layer and security services. The Table 1.2 shows the comparison matrix between OSI model and IEEE 802.15.4.

Table 1.2: Comparison matrix between OSI model and IEEE 802.15.4.

1.1.1. Architecture

Each of the layers that form the ZigBee protocol stack develops a specific set of services to the layers immediately above. The data entity provides data transmission service and the management entity provides all other necessary services.

Each service entity exposes an interface to the next higher layer through Service Access Point or Service Access Point (SAP) and each SAP provides the service’s primitives to achieve the required functionality.

As mentioned in section 1.1, the IEEE 802.15.4 defines the physical layer (PHY) and underlay media access control (MAC) while ZigBee is based on the lower layers defined by IEEE 802.15.4, that defines the network layer (NWK) and the structure of the application layer, which consists of sub-application support (APS) and ZigBee Device Objects (ZDO). By this way, the manufacturer that defines the application layer uses the work environment and structure of the application layer defined by ZigBee and shares the APS and security services with the ZDO.

The MAC sub-layer controls the access to the link radio channel using the CSMA-CA mechanism, in addition to other responsibilities as the transmission of Beacon frames, synchronization and provide a mechanism for secure transmission.

Then, Figure 1.1 shows the schema that defines the architecture of the ZigBee layers.

Page 9: ZigBee Project UPC

Zigbee technoly 5

Figure 1.1: Layer architecture defined by the ZigBee protocol.

In the figure 1.1, it can be clearly distinguished the layers defined by IEEE 802.15.4, by the ZigBee Alliance and by the user or manufacturer. In addition, the figure also shows the communication between layers through the data administration entities, which use the SAP to access the upper layers.

1.1.2. Type of devices and functionalities

Based on the node’s role on the network, there are defined three types of ZigBee device.

§ Coordinator (ZC): is the type of device most complete and must be present on the network. Its functions are in charge of controlling the network paths (routes) that must to follow the devices to connect to each other.

§ Router (ZR): interconnects separated devices in the topology of the network, in addition to providing a level of application for the execution of user code.

§ End Device (ZED): device with the functionality required to

communicate with its parent node (router or coordinator), but can’t transmit information to other devices. Thus, an end device can remain "asleep" most of the time increasing the lifespan of their batteries. This node type has minimum memory requirements and therefore, is much lower cost.

Completing the definition of the ZigBee node’s types, we can distinguish two types of devices over the IEEE 802.15.4: Full Function Device (FFD) and Reduced Function Device (RFD).

Page 10: ZigBee Project UPC

Wireless communication project 6

§ FFD: devices able to organize and coordinate media access of other devices on the same network. Also known as active nodes can work as a coordinator or ZigBee router thanks to additional memory capacity and computing (ZR or ZC).

§ RFD: devices with low power consumption, low cost and simplicity. Also

known as passive nodes, have limited capabilities and functionalities, and not the complexity of a FFD. They are, for example, the sensors / actuators of the network (ZED). They have no routing capability.

1.1.3. Topologies

In the network layer, ZigBee can support 3 types of different topologies:

§ Star topology: in this topology the communication is established between the nodes (RFD or FFD) and central node called PAN Coordinator (Zigbee coordinator.) Once the nodes are connected in star is chosen the coordinator node, which provides a network identifier (PAN ID) that is different from any other network within range of coverage of this node itself. This central node, is the node which will authorize the transfer of data to other nodes (all of these directly connected to the central node).

Figure 1.2: Star topology.

§ Mesh topology: in this topology also exists the role of the network coordinator node (PAN), but not with the same relevant functions. Unlike the star topology, any device can communicate with any other while both are in the same coverage area or using other nodes to reach the destination because they have the same priority when transmitting. This topology allows multiple node jumps between origin and destination, so it requires routing protocols.

Figure 1.3: Mesh network.

§ Tree topology: also called Tree Cluster is a combination of the two previous topologies. It can be considered as a special case of peer-to-peer topology where different devices FFD and RFD are interconnected forming a hierarchy tree. There may be several coordinator nodes in a given area (routers) in addition to the central node network coordinator (PAN Coordinator), located at the highest level.

Figure 1.4: Cluster tree topology.

Page 11: ZigBee Project UPC

Zigbee technoly 7

1.2. Physical Layer (PHY)

In this section, the main characteristics of the IEE 802.15.4 physical layer will be described.

1.2.1. Main properties

1.2.1.1. Workflow The main objectives of the ZigBee standard are the low consumption and

the low cost of the system.

The solution lies in determining simple modulations with relatively low speed, reducing duty cycle and to use terminals that spend most of time off. Thereby achieving low power consumption.

1.2.1.2. Modulation ZigBee uses modulations relatively easy to implement. How has the least

bit per symbol modulation (keeping constant the distance between symbols in the constellation of phase and quadrature), the lower the power required to transmit error-free compared to other modulation with more bits per symbol. This will look a main objective of the protocol: consume low power.

Here are the modulations used on each frequency band of the ZigBee protocol.

§ 868/915 MHz: BPSK modulation. § 2.4 GHz: O-QPSK modulation.

These modulations achieve the premises of simplicity and easy implementation. In addition, using a sequence of widening spectrum (DSSS - "Direct Sequence Spread Spectrum”) that greatly improves the quality of the transmission optimize the ability to receive the signal correctly.

1.2.1.3. Frequency bands and channel assignments The following table shows the ZigBee frequency bands and the main

features of these.

Freq. Band N. Channels Bit rate Symbol rate Modulation 868–868,6 MHz 1 20 Kb/s 20 Kbauds BPSK 902-928 MHz 10 40 Kb/s 40 Kbauds BPSK

2400-2483,5 MHz 16 259 Kb/s 62,5 Kbauds O-QPSK Table 1.3: IEEE 802.15.4 frequency bands.

Choose one band or another lies in the geographic location and the market to which the application is intended, bearing in mind that not all countries have all proposed free bands. Then, Table 1.4 shows the allocation of channels according to frequency band and the geographical availability.

Page 12: ZigBee Project UPC

Wireless communication project 8

Freq. Band Channel Central

Frequency (MHz)

Geographical availability Limitations

868 MHz 0 868,3 Europe

Workflow less than 1%. No power limitations.

915 MHz

1 906

Free channels in EEUU, Australia, New Zealand and few countries in South America.

No workflow limitations. No power limitations.

2 908 3 910 4 912 5 914 6 916 7 918 8 920 9 922

10 924

2,4 GHz

11 2405

Whole World

No workflow limitations. No power limitations.

12 2410 13 2415 14 2420 15 2425 16 2430 17 2435 18 2440 19 2445 20 2450 21 2455 22 2460 23 2465 24 2470 25 2475 26 2480

Table 1.4: IEEE 802.15.4 channels assignment.

1.2.2. Link Quality Indicator (LQI)

LQI is a parameter that provide physical and MAC layers in IEEE 802.15.4, and that the ZigBee device integrates. Collect the value of the link quality and the power in each packet reception, and can take different values based on the different manufacturers.

1.3. Link Layer (MAC)

1.3.1. MAC Layer’s transmission models

There are two modes of network’s operation defined:

1.3.1.1. With beacons (signalling frames) In this case, a node that wants to start a transmission to the coordinator,

should expect that this will send a signal pattern and then start to transmit

Page 13: ZigBee Project UPC

Zigbee technoly 9

according to the method of operation of the superframe.

The superframe consists of a set of up to 16 slots reserved for transmissions of the nodes, preceded by a signalling frame transmitted by the coordinator of the network that transmits information about which nodes should transmit each slot by its handle and inside what slot. Once the node has the slot assigned, is free to transmit everything in the time assigned.

Is necessary to implement a synchronization mechanism in the superframe structure.

Figure 1.5: Working with signall ing frames.

§ Contention Acces Period: time period when all the nodes can access the medium through CSMA-CA.

§ Contention Free Period: time period of the superframe where a number of GTS (Guaranteed Time Slots) are reserved for specific nodes (one GTS is 1/16 of the superframe total duration). The slots can be assigned and reserved for any of the nodes (to a maximum of 16).

Thus the node, unless it has a GTS allocated, must pass the Contention Access Period following the CSMA-CA mechanism, to ensure them a GTS if you need it. If the node had the GTS allocated shouldjust wait the right time frame after receiving the signal to begin transmitting. The transmission is validated with the ACK sent from the coordinator (if the node requires it).

On the other hand, considering that the transmission will be made from the coordinator to a node, the first one will send to the signalling frame, the information needed to alert to the terminal that will begin to send data. The node, meanwhile, waits his turn to transmit and will send a frame to inform of its availability for the transmission (with request data frame). In the case that the node doesn’t require it, the coordinator will send an ACK and then will proceed to transmit data. To close the transmission, the node will transmit an ACK.

Figure 1.6: Data transmission from coordinator to terminal.

Page 14: ZigBee Project UPC

Wireless communication project 10

1.3.1.2. Beaconless (no signalling frames)

Figure 1.7: Data transmission from terminal to coordinator.

Following this model of transmission so that any node can send data frames, the node will have access to the medium following the CSMA-CA mechanism. The coordinator, for their part, will be responsible for responding with an ACK if the node requires.

Figure 1.8: Data transmission from coordinator to terminal.

Conversely, if the terminal wants to receive instead of sending data from the coordinator, the node sends a data request frame. Once received by the coordinator, will respond with an ACK if the node requires it and start transmitting data.

To end the transmission, node sends an ACK in accordance with the reception of the data.

1.4. Network Layer (NWK)

Specifically, the network layer of a Zigbee coordinator assigns the network addresses of 16 bits to each node and in addition the coordinator assigns MAC IEEE802.15.4 short addresses, composed by 16 bits too, if a device needs it once it joined to the network. These two 16-bit addresses (network and IEEE 802.15.4 MAC layer) must be the same as it will serve as the unique identifier of the device within the network, avoiding addressing conflicts within itself and allowing the communication between the layers of the device.

The network layer also limits the maximum distance that a package can travel into the network. This distance is defined by the number of maximum hops that can make the frames along the network, which will be stored in a parameter called “network radius”, which will be decreased by one unit in each step that makes the packet. Once the frame has taken a leap over the maximum that is allowed, this will be discarded and will be not relayed through the network.

The communication mechanisms that we can find in a ZigBee network can be one of these three types:

Page 15: ZigBee Project UPC

Zigbee technoly 11

§ Broadcast: the transmitted message is delivered to all the devices of the network, taking into account that its has the same PAN ID (this broadcast can’t reach all the networks, is limited to the network under the same identifier PAN ID, where the packet is sent). The destination address of the packet is fixed to the value “0xffff” (all the devices of the same PAN).

§ Multicast: the message is sent to a specific group of the network, where the nodes are identified with the same 16-bit multicast group address.

§ Unicast: the message is sent from the source to a unique destination

node.

1.4.1. Routing

Routing is the process that selects the path where the packets will be retransmitted to the destination. The coordinator and the ZigBee routers are the responsible of this process using the different route discovery mechanisms.

To decide the optimal path, the process takes into account parameters such as link quality, the number of jumps and energy conservation. To simplify this process of analysis, each link between two nodes has an associated 'cost', given the likelihood of successful delivery of packages. The greater the probability that a packet is transmitted successfully, the lower the cost of the link.

The probability that a packet is successfully delivered can be calculated in different ways, and the ZigBee protocol can be used any of these depending on the final system application. Even so, the initial estimate of the probability of successful delivery of packets is based on the average of the LQI parameter, stored value for each packet received, indicating the quality of the link. At higher values of LQI, higher probability of successfully delivers of packages.

The path with lowest cost is the best choice for routing packets, as they have the highest probability of successful delivery of packets transmitted.

The ZigBee coordinator and routers create and maintain the called “routing tables”, used to determine the next step of a message routed to a specific destination. In addition to this table, another table called “route discovery table”, which is used for discovering new routes. The latter includes the costs of the paths, the address of the node requesting the route and the address of the last device that relayed the message to the node that contains the table. The main difference between both tables is that the first (routing table) is permanent and the second (route discovery table) is temporary and expires at a certain time set for the sensor network.

A ZigBee network device also maintains the “neighbour table”, which contains information about the device nodes in its transmission range. This table is updated whenever the node receives a packet of any of its neighbours and is useful when the node needs to find a router or needs to re-associate to the network.

Page 16: ZigBee Project UPC

Wireless communication project 12

1.4.2. Route discovery

The route discovery mechanism is going to be explained based on the next figure 1.9.

Figure 1.9: Route Discovery between A (source) and F (destination).

The figure shows a unicast route discovery (one source and one destination), where node A wants to find the target F. A starts the route discovery by sending the command “route request” via broadcast (to all the nodes in the coverage) that contains the identifier of the route request (“route request identifier”), address of the destination node and the cost of the path. The ID request path is a sequence of 8 bits, which increases its value to 1 unit each time the network layer requests a “route request” and the cost of the path is used to accumulate the total cost of each path route, where its initial value (just when A sends the broadcast order) is zero.

The broadcast order is received by each of the devices located in the wide radio range and listening to the same channel that the node A. In Figure 1.12 (a), nodes B and C receive the broadcast “route request” order and send a confirmation (ACK) to node A. If A does not receive the confirmation, relays the command as often as the network configuration says.

If the node that receives the “route request” command is a ZigBee end device, it will be discarded because this type of node has no routing capabilities (in the example there aren’t end devices; B and C are ZigBee routers). If node B is capable of routing (the routing table is not full), add the cost of the path between A and B in the field of path cost of the “request route” order and broadcast it. Node B updates its own “route discovery table” if the node A or the request, aren’t present in the same. The router C will take the same process. Broadcast messages to nodes B and C reach D and E (Figure 1.9 (b)).

The consecutive broadcasting will be repeated until the node F (destination), that will use the cumulative total cost of the path, saved for each received “route request”, for choosing the best way to set the route to the node A. The node F may choose D or E as its next hop in the transmission (route reply command) to finally answer the origin, the node A. If for example the next hop chosen was node D, this node use the route discovery table to find the next step in relaying the route request response sent back to the node A.

The route from node A (source) to node F (destination) will be called “forward route”. But the reverse path, from node F to node A will receive the name of “backward route”. Both routes (round trip) may be identical or not

Page 17: ZigBee Project UPC

Zigbee technoly 13

(round trip symmetrical or asymmetrical), depending on certain parameter settings of the network.

1.4.3. Source Routing

The network layer let the use of the Source Routing mechanism, where the source of the transmission creates a list of all the nodes that will retransmit the packets and include them inside the sent frame. With this mechanism, when a network device receives the frame, it looks at the next node of the retransmission list included. As the source defines the complete route of the transmission, this method saves processing time in the nodes.

Page 18: ZigBee Project UPC
Page 19: ZigBee Project UPC

Initial steps & Project goal 15

CHAPTER 2. PROJECT OBJECTIVES & INITIAL STEPS

Before detailing the project development and the measurements have been done, this chapter will explain the procedures and the finality of this report. As it was commented previously, at the end of this paper, the mobility measurements, that the group obtained, will be reasoned. However until reach these conclusions, static experiments was performed previous to mobility experiments. For that reason, along this report, ZigBee research applied to static scenarios will be shown before to arrive at the real goal.

In order to apply a basic behavior model which can be used in several scenarios, a set of measurements related with delay, throughput, distances and number of hops without any moving node was done. All these initial experiments mean zero mobility in any ZigBee node. It is important to notice that project’s member hasn’t had previously contact with the ZigBee technology. As consequence, an initial contact with ZigBee technology, through many documents [4][5][6][7][8], and Telegesis Development Kit was done to obtain a basic knowledge of the possible options that the Telegesis framework provides.

2.1. Objectives

The general goal of this paper is to develop a study related with the behavior of the ZigBee protocol in a simple mobility networks and generate the knowledge for future researchers to start from a basic document where is explain typical cases or for increase the experiments or future jobs.

In order to meet the challenges outlined above, the project integrates a set of experiments that were made both within and outside laboratory and they don't involve movement. In those static measurements the following general measurements will be shown.

§ Signal quality versus the distance between nodes. Several combinations of channels where ZigBee can works, level of power and type of nodes allow to the users get an idea of that radios coverage depending on the configuration's device.

§ Throughput. Although obviously, the results of this measure will be most

different than mobility measurements, it helps to get an idea of amount of information that, a basic scenario, allow us to transmit between nodes and have a reference data to compare with other situations.

§ Number of hops. As the goal of this paper is provide information of

Zigbee protocol to implement the technology to realistic cases, everyday cases. Then, is also important to test cases where the communication isn't only between two nodes, since the real world

Page 20: ZigBee Project UPC

Wireless communication project 16

suppose the use of more than one node probably. § Delays. To know the association, discovery and transmission time when

a mobility device enters into coverage area, a several measurements in static situations can be available to other scenarios.

§ Mobility. Final measurements which involve several speeds or more

than one hop. Real mobile scenarios to check if the experimental values are the expected as seen in static experimental values.

ZigBee networking has a diverse range of applications, including but not limited home automation, inventory tracking, and healthcare [3]. Home automation is one of the major application areas for ZigBee wireless networking (typical data rates around 10 Kbps). A security system can be a scope, since it consists of several sensors which need to communicate with central security controller. Due to the low data rate of this protocol, in security scenarios is possible to transmit acceptable quality images wirelessly. Light control is other of the classic examples of using ZigBee in a house or commercial building. If the recess light and the switch are equipped with ZigBee devices, no wired connection between the light and the switch is necessary. But not only is used as a home automation, exist more applications oriented to healthcare industry, where is possible to monitoring a patient’s vital information remotely.

All this steps have been made to get the following objectives:

§ Obtain a global vision of the ZigBee technology performance. A general knowledge of this protocol can help some engineers to take into account if this technology is that they are looking for to use in any future or current project, to improve some works realized. Is important be familiar with several technologies.

§ ZigBee is a technology created, in most part, for sensor networks, home

automation and topics related with that scope. This paper tries to open the engineer's minds to increase that range, through improvements or new approaches, and demonstrate that ZigBee is applicable to another services (in this case into mobility scenarios).

§ Flatten the way to future students that decide increase the research.

This paper can help people, which interested in ZigBee development, follow some research lines or begin from one starting point.

§ As well as the previous points mentioned, the main goal is to observe

how does a network ZigBee behave in mobility scenarios and conclude if is efficient to use it in this cases, and what application could be integrate this protocol. The main reason of this is related to the fact that ZigBee protocol was not originally designed for this type of mobility applications, and we need to study its capabilities in this regard. Through static measurements is possible to apply them to mobility measurements and to come close to the amount of information that it allows us transmitting.

Page 21: ZigBee Project UPC

Zigbee technoly 17

2.2. First steps

Telegesis is a manufacturer of OEM ZigBee modules with full AT command layer. In this project were used Telegesis devices. The Development Kit is composed by two ETRX2 USB development boards, two USB Cables, some ETRX2 modules with a 1.27mm pitch, some ETRX2 module carrier boards fitted with ETRX2 modules, two ETRX2USB (USB sticks) and AA battery holders with leads. From the manufacturer website [2] is possible to download a free version of Telegesis Terminal software which allows us to control the devices and accede at AT commands provided by the framework. In order to monitor traffic among nodes, in the absence of Zigbee sniffer, ETRX2 router connected through Ethernet cable to the PC is possible to show the network packets in Wireshark software. To use the AT commands in Telegesis router isn't possible to connect to it through Telegesis Terminal software, then, the computers that control the router device have used an HyperTerminal software, which basically is like Telegesis Terminal but without facilities that it provides.

The first step was to check all nodes firmware version and update them. To know and display product identification information on software screen, where is shown the firmware version information, must use ATI command [Command listed in annex A].

In order to upgrade the firmware of all the ETRX2 modules to a R302X version, the following steps have been made. To use the bootloader, the command AT+BLOAD [Command listed in annex A] is the responsible to boot up the process. The Telegesis Terminal software provides a button tagged as Bootloader inside Module Control R3xx buttons. Is necessary disconnect through terminal and change the connection parameters to 115200 bps, 8 data bits, 1 stop bit, no parity and no flow control and ,then, connect again. A bootlader menu is shown on screen. Pressing the first option is possible to initiates the upload of the new firmware.

Once the devices have been updated, is possible to establish a simple PAN (Personal Area Network). These devices are programmed to be operated efficiently and connect easily and automatically (with default settings). You could say that the nodes are constantly listening to the environment and

ATI TELEGESIS ETRX2 (Device Name) R302X (Firmware Revision) 000D6F00002167EB (EUI64) OK

EM250 Bootloader v20 b09 1. upload ebl 2. run 3. ebl info BL >

Page 22: ZigBee Project UPC

Wireless communication project 18

rescheduled in case of possible improvement in terms of connection. Of course, this is configurable by the user, but with parameters by default, which can be set through the AT&F [Command listed in annex A] command, is quite simple to set up the first network to take our first steps with ZigBee.

The simplest network only carries the connection of two nodes. One node will act as coordinator and the other could be a simple router or end device. As already mentioned, if we set the different parameters of the device, they must be connected via Ethernet or USB cable to your computer. Once set all parameters, is possible to connect the node to an external battery and it will keep the settings. With nodes connected to the computer and configured at will (in this first contact will be with default parameters), the command AT+EN [Command listed in annex A] should be sent to the device that will as a coordinator. It is noteworthy that, to configure a device as a coordinator, by sending the command for the establishment of this network is transformed directly into the network coordinator, however, other devices if they can be configured as end devices or routers (this is the default). Later explains how to set many parameters needed for each part through the records, in addition to other connection options.

Figure 3.1 shows the simple connection scheme and the two modes of connection to the computer. The coordinator node is connected via an ethernet cable to the ethernet port of the computer and the router is connected via USB cable. The next step is to check the connection of two devices through the interaction with and between them.

Figure 2.1: Basic connection scheme.

Page 23: ZigBee Project UPC

Project development 19

CHAPTER 3. MESUREMENT DESCRIPTION

In this chapter, we will explain all the measurements that we have done in the project. Basically, there are two groups of tests:

§ The first part of measurements is about the ZigBee protocol study. The objective is to know all the main features of the IEEE 802.15.4 radio link, and the implementation of the entire stack of the protocol on the Telegesis nodes. Measurements like link quality parameters and channel throughput will be present. We know this type of tests as the static measurements.

§ The second subset of tests and the most important for the final project objective are the measurements related to the behavior of ZigBee protocol in mobility environments. The main goal of this study is to know in which type of mobility applications we can use this technology. How many packets we can send in different time intervals and variable distances, is an aspect that we should take into account for the final decision. We know this type of tests as the mobility measurements.

3.1. General measurements of ZigBee protocol (Static measurements)

In this part of the document we will resume the test measurements that we made using Telegesis nodes, in order to know the main characteristics of these. As we said above, this type of measurements are related to the acquisition of the knowledge about the main features of the ZigBee protocol under this hardware.

The corresponding measurements that we made are the following:

§ RSSI vs. Distance & LQI vs. Distance (See Section 3.1.1)

ú Signal and channel indicators. ú With different channels (channels 12/20/26). ú With different transmitted power (PTX = -43/-1/4 dBm) ú With different node’s setup (nodes with Power Amplifier (PA) and

nodes without Power Amplifier (no PA).

ú With different distances between nodes (minimum distance of 5m and maximum distance of 100m (no PA) and 140m (PA) between interval distances of 10m, except first measure, which is 5m.

Page 24: ZigBee Project UPC

Wireless communication project 20

§ Throughput vs. Distance (See Section 3.1.2.1.) § Throughput vs. Number of Hops (See Section 3.1.2.2.)

§ Delay vs. Number of Hops (See Section 3.1.2.2.)

The experiments related to the distance have been measured outside the building; meanwhile the experiments related to the number of hops have been measured inside the building. The reason that we have made it in this way is due to the problem that there was about routing nodes. Against the nodes specification, the command AT+SR [Command listed in annex A], which is used to route ways between two remote nodes, didn’t work. Due to this disagreement we decided put the nodes at the coverage limit with the porpoise of force the hops between nodes. As the coverage limits can be larges to these measurements, the solution was to reduce the transmission power of the nodes and then reduce also the coverage area. In the following figures is possible to see the places that have been used for the outside distances and some samples of our group taking measurements of the experiments.

Figure 3.1: Outside distances .

Page 25: ZigBee Project UPC

Zigbee technoly 21

Figure 3.2: Outside measurements I.

Figure 3.3: Outside measurements II .

3.1.1. RSSI vs Distance & LQI vs Distance

The following sections show the scenario configurations of the measurements related with the distance. To make these measurements we had to follow a few steps to configure the nodes related to the records of each device.

§ S00 = Channel mask § S01 = Transmitted power § S02 = Preferred PAN ID

Using the command ATSxx = [value] we can configure each node record. Take into account that in order to show on screen the RSSI and LQI data, also is necessary to configure the Bit C of the record S10 to 1 value.

Then, in order to transmit information between end nodes, use the command AT+PING [Command listed in annex A]. Thus, the device that performs transmission to the receiving node will see the screen by Telegesis Terminal software.

§ With different Channels ú Channels 12, 20 and 26. ú PTX = -1 dBm. ú No Power Amplifier (No PA).

Page 26: ZigBee Project UPC

Wireless communication project 22

ú S-Registers applied to the nodes are shown in Table 3.1.

S00 (channel mask) S01 (Transmitted power) S02 (Preferred PAN ID) 0002 (channel 12)

-1 (dBm) 5555 0200 (channel 20) 8000 (channel 26)

Table 3.1: S-Registers I.

§ With different Transmitted Power ú Channel 12. ú Transmitted powers equal to -43, -1 and 4 dBm. ú No Power Amplifier (No PA). ú S-Registers applied to the nodes are shown in Table 3.2.

S00 (channel mask) S01 (Transmitted power) S02 (Preferred PAN ID)

0002 (channel 12) -1 (dBm)

5555 -43 (dBm) 4 (dBm)

Table 3.2: S-Registers II .

§ With different Node’s Setup ú Channel 12. ú Transmitted power equal to 4 dBm. ú Node Type: No Power Amplifier (No PA) and Power Amplifier (PA). ú S-Registers applied to the nodes are shown in Table 3.3.

S00 (channel mask) S01 (Transmitted power) S02 (Preferred PAN ID) 0002 (channel 12) 4 (dBm) 5555

Table 3.3: S-Registers II I .

All the measurements have been done for 10 times in every distance that we considered, for each radio channel. In the lower distances, we consider an indoor environment for taking the measurements but, in the larger distances we should take these in an outside environment. The main objective of this first point is to make an observation of the reach of Zigbee technology.

3.1.2. Throughput

In these measurements, in the cases that require multiple hops between nodes, with the purpose of avoiding having to be positioned very far from each other, the powers of the equipment will be decreased to reduce the area of coverage. That record is the S01.

To set the transmitter so the device transmits data packets without stopping at a certain time has had to modify the following records.

§ S3B = Contains text to transmit or another actions (up to 50 characters). § S104 = 1 (the bit 4 make that the node acts as SINK device). § S33 = 0001 (a Timer/Counter whose functionality is defined by S34)

Page 27: ZigBee Project UPC

Zigbee technoly 23

§ S34 = 8108 (the unit sends the contents of S3B to the networks sink).

To change just a bit use the nomenclature ATS<Register><bit> = [value].

Once these records have configured in the nodes required, we have to capture for a certain amount of time the packets sent through Wireshark software.

Figure 3.4: Wireshark capture.

To facilitate data processing, we used an address filter with the main objective that the program only shows the useful data. This filter is shown below:

!".!"# == !"#$  !"  ||  !". !"# == !"#$  !"  &&  !"#. !"# > 2

With this command we only show the packets sent from the node’s IP, the packets sent to the node’s IP and the packets bigger than 2 bytes, discarding all the other waste packets.

The throughput has been computed with the following equation:

!"#$$  !ℎ!"#ℎ!"# =  !"#$%&'  !"  !×144×8

!   !"#

Equation 3.1: Gross throughput.

!"#  !ℎ!"#$ℎ!"# =!"#$$  !ℎ!"#$ℎ!"#×119

144  [!"#]

Equation 3.2: Net throughput.

Where T is the time the node has been transmitting. The value of T is about 2 minutes (120 seconds) in each throughput measure. “Packets in T” are the number of packets transmitted in T and the values equal to 144 and 119 are the

Page 28: ZigBee Project UPC

Wireless communication project 24

packet size and the payload, respectively.

3.1.2.1. Throughput vs Distance The scenario used to do these measurements is the same mentioned in the

previous explanations in the starting point of this chapter. In the previous tests about the channel parameters we take the same environment to do also this type of measurements.

§ Channel 12. § Transmitted Power equal to 4 dBm. § Node Type: No PA node. § S-Registers applied to the nodes are shown in Table 3.4.

S00 (channel mask) S01 (Transmitted power) S02 (Preferred PAN ID) 0002 (channel 12) 4 (dBm) 5555

Table 3.4: S-Registers IV.

3.1.2.2. Throughput vs Number of Hops & Delay vs Number of Hops In that measurements, as the coverage limits can be larges to these

measurements, the solution was to reduce the transmission power of the nodes and then reduce also the coverage area. For these reason the measurements have been done in an indoor environment.

§ Channel 24. § Transmitted Power equal to -41 dBm. § Node Type: No PA Node. § S-Registers applied to the nodes are shown in Table 3.5.

S00 (channel mask) S01 (Transmitted power) S02 (Preferred PAN ID) 0200 (channel 12) -41 (dBm) 5555

Table 3.5: S-Registers V.

Figure 3.5: Indoor measurements I.

Page 29: ZigBee Project UPC

Zigbee technoly 25

Figure 3.6: Indoor measurements II.

3.1.3. Time measurements

It is assumed that the total time in which a node can start transmitting is the sum of the time in which a node finds a PAN (discovery time) and time in which this node joins it (association time):

!"#$  !"  !"#$"  !"#$%&'!!'%( = !"#$%&'()  !"#$ + !""#$%!&%#'  !"#$

Equation 3.3: Time to start transmitt ing.

It is understood as transmission time (Tx) the time taken by a packet to reach the receiving node. This is the Round Trip Time (RTT) divided by 2:

!! = !""/2

Equation 3.4: Transmission t ime.

The main objective of this experiment is to find out the association, discovery and transmission times in a static environment with one, two and three hops between the transmitter and receiver nodes.

3.1.3.1. Association and discovery time vs. number of hops

According to the AT commands documentation, there are two commands which joins a node with a created PAN:

§ AT+JN [Command listed in annex A]

With this command the node search for a PAN in all the channels until it finds one available to join. This means that the node has to discover a PAN and join it so the time taken between the command execution and the PAN joining is the total time in which a node can start transmitting.

§ AT+JPAN: <channel>,<PAN ID or EPID> [Command listed in annex A].

This command takes as parameters the channel in which the node has to search for an available PAN to join and the short (PAN ID) or the long (EPID) PAN identification number of the desired PAN. This way, the node has not to scan the other channels so the time taken after the execution of the command

Page 30: ZigBee Project UPC

Wireless communication project 26

and the PAN joining is the association time.

Subtracting the association time to the total time needed to start transmitting, the discovery time can be found.

3.1.3.2. Transmission time vs. number of hops

To get the values for the transmission time, it is used the following command:

§ AT+UCAST:<address>=<data> [Command listed in annex A].

Being <address> the short ID of the receiving node and <data> the information to be sent. When the message reaches the receiver, it sends an ACK message back to the receiver. So the RTT will be the time between the command is sent and the ACK is received and the transmission time will be the RTT divided by 2.

To do the measurements a PAN is set up as seen in the image below.

Figure 3.7: Time measurements scenario.

The COO device is situated with line of sight only with one of the nodes in order to avoid interferences between the nodes and to prevent the ZED node to connect directly to the COO. The image shows the configuration of the PAN with three hops being the configuration with one and two hops the same removing the node at the left end and configuring the last FDD as ZED.

The device configured as ZED is the one with an Ethernet port so the time counter of Wireshark can be used for the time measurements. For the association and discovery time the procedure is the following:

Page 31: ZigBee Project UPC

Zigbee technoly 27

1. Depending on the case, write the AT+JN or the AT+JPAN command in the Hyper Terminal opened in the ZED node and then clean the Wireshark screen.

2. Start capturing packets and just after that send the command and wait for the node to join the PAN.

3. When the message of joined PAN is shown in the Wireshark screen, stop capturing packets.

4. Each measure is repeated five times.

And for the transmission time experiment:

1. Write the AT+UCAST command in the Hyper Terminal opened in the ZED node and then clean the Wireshark screen.

2. Start capturing packets and just after that send the command and wait for the ACK message.

3. When the ACK message is shown in the Wireshark screen, stop capturing packets.

4. Each measure is repeated five times.

3.1.3.3. PAN configuration

There have been established 3 possible scenarios each one with configurations with one, two and three hops respectively. There have been done experiments to find out the discovery and transmission with one channel, half channels and all channels. The values for the association time have been found only for one channel due that the command used take as parameter the channel identification number and therefore has no sense to set up the other channels.

Channel Mask Power PAN ID ZED o FFD

S00 S01 S02 S0AE S0AF

Scenario 1

1 channel COO 0002 -1 5555 0 0

ZED 0002 -1 5555 0 1

Half channels COO 4000 -1 5555 0 0

ZED 54AA -1 5555 0 1

All channels COO 4000 -1 5555 0 0

ZED FFFF -1 5555 0 1

Table 3.6: S-Registers VI.

Page 32: ZigBee Project UPC

Wireless communication project 28

Channel Mask Power PAN ID ZED o FFD

S00 S01 S02 S0AE S0AF

Scenario 2

1 channel

COO 0002 -1 5555 0 0 FFD 0002 -1 5555 0 0

ZED 0002 -1 5555 0 1

Half channels

COO 4000 -1 5555 0 0 FFD 4000 -1 5555 0 0

ZED 54AA -1 5555 0 1

All channels

COO 4000 -1 5555 0 0 FFD 4000 -1 5555 0 0

ZED FFFF -1 5555 0 1

Table 3.7: S-Registers VII.

Channel Mask Power PAN ID ZED o FFD

S00 S01 S02 S0AE S0AF

Scenario 3

1 channel

COO 0002 -1 5555 0 0 FFD 0002 -1 5555 0 0 FFD 0002 -1 5555 0 0

ZED 0002 -1 5555 0 1

Half channels

COO 4000 -1 5555 0 0 FFD 4000 -1 5555 0 0 FFD 4000 -1 5555 0 0

ZED 54AA -1 5555 0 1

All channels

COO 4000 .1 5555 0 0 FFD 4000 -1 5555 0 0 FFD 4000 -1 5555 0 0

ZED FFFF -1 5555 0 1

Table 3.8: S-Registers VIII .

3.2. Mobility measurements

Having explained all that has been experienced in the field static, the next level is to make some basic experiments aimed at mobility. As you can see, the range of measurements is not the same as in previous cases because of time issues. This subsection provides for two important cases, which we believe have the most priority to other cases. The first case is to obtain results with a scenario where only two devices, one moving and one stationary, while in the second case there are three devices, two moving and one moving. The cases will be explained in more detail in the following points.

It is important to mention why we chose these cases as a priority before any

Page 33: ZigBee Project UPC

Zigbee technoly 29

other. Well, one possibility was to try to see how a node behaves when moving from one coverage area, which corresponds to a coordinator to another coverage area, which belongs to another coordinator. This phenomenon is known as handover. To display the screen data transmitted from the node that moves from one area to another would need two devices with Ethernet connection, which it did not have. Basically, resource issues for the following cases were chosen.

3.2.1. Two ZigBee devices

In this case there are only two nodes, so only one jump. The idea of this experiment is as follows: we place a node completely static which act as coordinator and another node, which initially is found outside the coverage area of the PAN created by the static node, enters the coverage area and leave it by drawing a straight path and walking the entire diameter of the area.

The same experiment is tried with different speeds. For a person walking (4 - 5 km/h on average), a vehicle moving at a speed of 25 km / h and moving at 50 km/h. Experiments explained in the following two cases are differentiated with the same speed, one named the other as far and near. The only difference is the time that the mobile node is in the area of coverage. In the event named close, the node passes very close to the coordinator node, since it covers the theoretical diameter of the circumference and passes through its center.

The following figures will show where the measurements were performed. The figures show where the coordinator node is placed and where you place the device acts as a router. In the first two images shows an approximate radius of the network coverage, which is approximately 80 meters. This has been extracted from the static measurements; the radius of coverage can be approximated depending on the output power. The next two figures do not show the coverage area, but show the distance between the mobile node and the coordinator node to 50 km/h in cases near and far.

Figure 3.8: On the left, walking experiment. On the r ight, 25 km/h experiment.

Page 34: ZigBee Project UPC

Wireless communication project 30

Figure 3.9: 50 km/h far.

Figure 3.10: 50 km/h close.

This experiment is very important to the mobile node configuration. There is a common part in shaping both nodes. The two nodes must have the record for the channel mask in default. With this we make the channel is completely random, both in search of a network in the establishment of it. The power is set to -1 dBm. And the PAN preferred as 5555.

For the coordinator, the only difference is that it will behave as SINK node. By the mobile router, since it is outside the coverage area performs a search of a ZigBee network every 0.25 milliseconds. Once connected sends a unicast message to node every 0.25 milliseconds. This measure will get the number of packets that are sent depending on the speed and time that is transmitting packets.

As in all experimental cases, there have been 5 samples of each variety in each case.

Page 35: ZigBee Project UPC

Zigbee technoly 31

COO FDD ATS00 = 0000 (channel mask)

ATS01 = -1 (Transmitted power) ATS02 = 5555 (Preferred PAN ID)

ATS104 = 1 (SINK node) ATS0AE = 1 (ZED node) ATS30 = 0000 (Deactivates auto join) ATS34 = 8015 (Looking for a PAN) ATS33 = 0001 (For every 0.25 msec.) ATS36 = 8120 (Send S3B content) ATS35 = 0001 (For every 0.25 msec.) ATS3B = “AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA”

Table 3.9: Two ZigBee devices commands.

3.2.2. Three Zigbee devices

The idea of this second sub-case is to perform the same experiment as that explained above. The difference is that in this second experiment, so that the mobile node is connected to the coordinator must first go through an intermediate node. That is, add one more jump. The configuration is the same as in the previous experiment. The intermediate node will have default values. In this case we have eliminated the case of 5 km / h away, that is, we only have three cases: walking, 25 km/h to 50 km/h.

In this case, the biggest problem is that when the mobile node passes close to the intermediate node (to cover the entire diameter of coverage), the mobile node should not be connected to the coordinator. The coordinator must be a sufficient distance to connect to the intermediate node and mobile node is not connected to it. For that reason, any scenario where there have been experiments are not identical to the experiments with a single hop, since these second scenarios require specific locations. However, attempts have been likened to the stage as much as possible.

The following figures show the locations of the experiments. The first image corresponds to the scenario where the mobile node moves at a speed similar to that of a person walking, the second at a speed of 25 km/h and 50 km/h.

Page 36: ZigBee Project UPC

Wireless communication project 32

 Figure 3.11: On left, walking experiment. On right, 50 km/h and 25 km/h

experiments.

The places shown in the photos are the EETAC or Escuela de Ingeniería de Telecomunicación y Aeroespacial in Castelldefels.The following photos are by way of example, as moments when the group of students of the subject wireless communication UPC Castelldefels college were doing some mobility measurements.

 Figure 3.12: Mobil i ty measurements I.

Page 37: ZigBee Project UPC

Zigbee technoly 33

Figure 3.13: Mobil i ty measurements II .  

Theoretical study of the behavior of ZigBee devices have been computed to compare the practical values that are get in mobility experiments. The end goal of this experimental measurements and a theoretical study is to apply the static results obtained in the first part in several scenarios where some ZigBee node doesn’t behavior like a static case. Take into account that the important value that this paper can obtain is the number of bytes transmitted from an end node to a coordinator node.

From the static measurements is possible to know the coverage or maximum distance between nodes through transmitted power given. In an initial mobility scenario, only a speed (km/h) parameter is known. As the speed and distance is provided, the time that the node is transmitting can be get through the basic equation that relates the speed, distance and time.

!"#$%&'( ! = !"##$!!"# ∙ !"#$ sec  → !"#$ sec =  

!"#$%&'((!)

!"##$( !sec)

Equation 3.5: Time equation.

The distance given in static measurement is the radius coverage, but as in the experiments of mobility around the diameter of coverage is crossed, the time obtained in the above equation must be multiplied by two. But this is not all it is very important to this end result subtract time values of transmission, association and discovery experiments measured in static as well.

!"#$  !"#$  !"#$%&'!!'$(  (sec) = !"#$ sec ∙ 2 − (!!". + !!"". + !!"#.)

Equation 3.6:Real t ime transmitt ing.

Page 38: ZigBee Project UPC
Page 39: ZigBee Project UPC

Measurements 35

CHAPTER 4. RESULTS OF MEASUREMENTS

This part summarizes the results of the measurements taken in the experiments related with static measurements described in chapter 4. The measurements are resumed in a set of graphics to see more clearly the evolution in the experiment. As in the previous chapter, the results are divided into two groups: measurements static and mobile measurements. The figures and values that are shown below are in the same order as chapter 4.

4.1. Static measurements

This first group of measurements covers a number of experiments where no ZigBee node is moving. As the results show also discussed the outcome and expected. This chapter will try to interpret what you get, in detail in each experiment, and the next chapter will discuss the general interpretation of this technology in a global sense.

4.1.1. RSSI vs. Distance & LQI vs. Distance

The next figures show the results of the different experiments to see the behavior of the RSSI and LQI. RSSI show the strength of the signal received by the node where is taken the measurements, so theoretically as the node is more far away the signal becomes more weak and in the same way, the LQI show the quality of the link so is going to maintains more or less stable until we get out of the coverage area

4.1.1.1. With different Channels As we can see as we move from the static node the signal received

becomes weaker until we get out of the node coverage. The node has de capacity of use different channels or frequencies; channel 26 has a high frequency than channel 12, so need more oscillations to reach the same distance for example. This can be seen in the figure were the RSSI depends in the channel chosen to do the experiment. Channel 12 has better initial values and channel 26 the worst, although the channel 20 has a set of irregularities with this theory because of the terrain and is possible that this channel is more vulnerable to the fading.

Page 40: ZigBee Project UPC

Wireless communication project 36

Figure 4.1: RSSI vs. distance (channels).

The following figure show how the LQI remains stable until we get out the node from coverage, as we said before, the measurements depends on the channel or frequency chosen, so low frequencies has better values. We can see again the irregularities in channel 20 due to the terrain.

Figure 4.2 : LQI vs. distance (channels).

4.1.1.2. With different Transmitted Power

In the same way occurs with the channel or frequency happens with the

-­‐100,0  -­‐95,0  -­‐90,0  -­‐85,0  -­‐80,0  -­‐75,0  -­‐70,0  -­‐65,0  -­‐60,0  -­‐55,0  -­‐50,0  

0,0   20,0   40,0   60,0   80,0  

RSSI  

Distance  [m]  

RSSI  vs  distance  

Channel  12  Channel  20  Channel  26  

Same  Tx  Power  Level:    -­‐1dBm  Same  node  type:  No  PA    

40  

90  

140  

190  

240  

0,0   20,0   40,0   60,0   80,0  

LQI  

Distance  [m]  

LQI  vs  distance  

Channel  12  Channel  20  Channel  26  

Same  Tx  Power  Level:    -­‐1dBm  Same  node  type:  No  PA    

Page 41: ZigBee Project UPC

Measurements 37

power transmition of the node, more power mean more coverage. In the figure we can see the fading suffered at the maximum power.

Figure 4.3: RSSI vs. distance (transmitted power).

Figure 4.4: LQI vs. distance (transmitted power).

4.1.1.3. With different Node’s Setup

Have different nodes that are classified as node PA and no PA, this means that the nodes PA have a power amplifier and can transmit at more power than the nodes no PA, we done a set of experiments to see the different between this two types of nodes. Somewhat the figures are going to be similar to the see

-­‐95,0  -­‐90,0  -­‐85,0  -­‐80,0  -­‐75,0  -­‐70,0  -­‐65,0  -­‐60,0  -­‐55,0  -­‐50,0  -­‐45,0  

0,0   20,0   40,0   60,0   80,0  

RSSI  

Distance  [m]  

RSSI  vs.  distance  

Ptx  =  -­‐43  dBm  

Ptx  =  -­‐1  dBm  

Ptx  =  4  dBm  

Same  Channel:    12  Node  type:  No  PA  

0  

50  

100  

150  

200  

250  

300  

0,0   20,0   40,0   60,0   80,0  

RSSI  

Distance  [m]  

LQI  vs.  distance  

Ptx  =  -­‐43  dBm  

Ptx  =  -­‐1  dBm  

Ptx  =  4  dBm  

Same  Channel:    12  Node  Type:  No  PA  

Page 42: ZigBee Project UPC

Wireless communication project 38

before [Figure ] [Figure ] between the 2 high power levels.

Figure 4.5: RSSI vs. distance (PA vs. no PA).

Figure 4.5 : LQI vs. distance (PA vs. no PA)

4.1.2. Throughput

The next experiments show the behavior of the throughput in front the distance. Theoretically the throughput is going to be related with the strength of the signal so its normal expect that becomes lower, in the same way, that the RSSI do the same.

-­‐90  -­‐85  -­‐80  -­‐75  -­‐70  -­‐65  -­‐60  -­‐55  -­‐50  -­‐45  -­‐40  

0,0   20,0   40,0   60,0   80,0   100,0   120,0  

RSSI  

Distance  [m]  

RSSI  vs.  distance  

No  PA  node  

PA  node  

Same  Channel:    12  Same  PTX:    4  dBm  

0  

50  

100  

150  

200  

250  

300  

0,0   20,0   40,0   60,0   80,0   100,0   120,0  

RSSI  

Distance  [m]  

LQI  vs.  distance  

No  PA  node  

PA  node  

Same  Channel:    12  Same  PTX:    4  dBm  

Page 43: ZigBee Project UPC

Measurements 39

4.1.2.1. Throughput vs. distance

As we can see the throughput becomes lower with the distance this is because the strength of the signal received, or RSSI, is lower too, so with a lower RSSI have more probabilities to lose packets. The irregularities are due to the fading of the terrain.

Figure 4.6: Throughput vs. distance.

4.1.2.2. Throughput vs. number of hops & delay vs. number of hops

The next figure shows how affects to increase the number of hops over the throughput due to the increasing of the delay [as it can be seen in the ¡Error! No se encuentra el origen de la referencia.]. Therefore there are less received packets in the same time period.

0  500  

1000  1500  2000  2500  3000  3500  4000  4500  

12   24   36   48   60   72   84   96   114  

Throughp

ut  [b

ps]  

Distance  [m]  

Throughput  vs.  distance  

rough  throughput  

Useful  throughput  

Page 44: ZigBee Project UPC

Wireless communication project 40

Figure 4.7: Throughput vs. number of hops.

The time of a packet to reach the destination are related with the number of hops and the distance traveled, a packet have to be processed by each node and that introduce a delay in the total time in addition that as more hops do, more distance is suppose do the packet.

Figure 4.9: Delay vs. Number of hops.

4.1.2.3. Association and transmission time vs. number of hops

4761  

3290   3131  3934  

2719   2587  

0  

1000  

2000  

3000  

4000  

5000  

1   2   3  

Throughp

ut  [b

ps]  

number  of  hops  

Throughput  vs.  number  of  hops  

Rough  throughput  

useful  throughput  

71  91  

120  

0  20  40  60  80  100  120  140  

1   2   3  

Delay  [m

s]  

number  of  hops  

Delay  vs.  number  of  hops  

Page 45: ZigBee Project UPC

Measurements 41

Figure 4.10: Association t ime and Delay vs. number of hops .

Figure 4.10 shows the association time and the transmission time measurements in a static scenario. It was expected the higher the number of hops, the higher the value of the time for both measurements. Nevertheless in the case of the association time we can see how that time remains constant even though the number of hops is increased while the behavior of the delay shows an expected trend.

Two conclusions can be extracted from here. In the first place, when a node tries to join a previously established PAN, a communication between that node and the closer node belonging to the PAN it is enough (if security is disabled) to achieve the joining. Therefore, it doesn’t matter the number of hops between the node and the COO.

Besides, it is shown how the delay increases when the number of hops is higher, so it is proven there is some significant processing time in the nodes taking part in the transmission.

4.1.2.4. Discovery + Association time vs. number of hops

The next figure shows the discovery time plus the association time measurement. We were not able to obtain only the discovery time in a single measure. However as we saw in the previous figure, it is possible to measure the association time and then we can isolate the discovery time from subtracting the two measurements. Again, it was expected this time became higher when the number of hops were increased, but it didn’t for the same reason that we explain before. In the process of join a PAN, the joining node needs to communicate only with its closest PAN node in order to succeed, then the later hops don’t affect neither the association time nor the discovery time. Besides the association time vs #hops shows a flat behavior, so the addition of both it has to have a flat behavior too.

Also, it is important to mention the figure show how the different channel

0,000  

0,200  

0,400  

0,600  

0,800  

1   2   3  

Time  [s]  

Number  of  hops  

AssociaBon  Bme  and  Delay  vs.  number  of  hops  

Transmission  Ome  

AssociaOon  Ome  

Page 46: ZigBee Project UPC

Wireless communication project 42

masks affect to these measurements. As it was expected, when the node it is enabled to search the PAN among a higher number of possible channels it takes a higher time to find it.

Figure 4.11: Discovery + Association t ime vs. number of hops .

0,500  

1,000  

1,500  

2,000  

2,500  

3,000  

1   2   3  

Time    [s]  

Number  of  hops  

Discovery  +  AssociaBon  Bme  vs.  number  of  hops  

One  channel  (channel  12)  

Half  channels  (channels  12,14,16,18,21,23,25)  

All  channels  

Page 47: ZigBee Project UPC

Measurements 43

4.1.2.5. Discovery time vs. number of hops

Figure 4.12: Discovery t ime vs. number of hops .

Figure 4.12 shows the discovery time. As it has been said previously, this figure is obtained through the subtraction between the association + discovery time and the association time, so it is an indirectly measured time.

4.1.2.6. Total time vs. number of hops

Figure 4.13: Total t ime vs. number of hops .

The Total time measurement includes the transmission time + association time + discovery time. Until now we know the higher the number of hops, the higher the transmission time is. Also it is proven the association and discovery time remains constant although the number of hopes is increased. Therefore it is obvious that a global measurement it has to be an increasing trend. Besides, the effect of the channel masks is again present in the measurements.

0,000  

0,500  

1,000  

1,500  

2,000  

2,500  

1   2   3  

Time  [s]  

Number  of  hops  

Discovery  Bme  vs.  number  of  hops  

One  channel  (channel  12)  

Half  channels  (channels  12,14,16,18,21,23,25)  

All  channels  

1,000  

1,500  

2,000  

2,500  

3,000  

3,500  

1   2   3  

Time  [s]  

Number  of  hops  

Total  Bme  vs.  number  of  hops  

One  channel  (channel  12)  

Half  channels  (channels  12,14,16,18,21,23,25)  

All  channels  

Page 48: ZigBee Project UPC

Wireless communication project 44

4.2. Mobility measurements

This part summarizes the measurements taken in the experiments related to mobility measurements told in chapter 4. The measurements are summarized in a set of figures to see more clearly the evolution in the experiment.

4.2.1. Mobility measurements

The next figures show the results of the different experiments to see the behavior of nodes Zigbee in mobility experiments, how many packets we can received and the time that we are able to transmit at different speeds to obtain his throughput and see the viability to use this nodes in mobility uses and if the topology affects to much.

4.2.1.1. Measurements with 2 and 3 ZigBee devices

The following figures show the results of the experiments with two nodes and three nodes. The first idea was that at more speed we are able to transmit less information in less time so the throughput would be affected. And at the same time at more hops less information we are able to transmit due to an increment of time to connect to the PAN and a increment in the transmition time to send a packet through several nodes that need to process the packet.

The next figure show the number of transmitted packets we are able to transmit at different speed. As we said at less speed we received more packets, it is evident that with 2 hops the results is drastically lower than with one due to the increment of the delay, saw at the previous chapter , that show us an initial indication that the topology would affects so much in a mobility applications.

Figure 4.14: Number of transmited packets vs. speed (two nodes).

0,000  

50,000  

100,000  

150,000  

200,000  

250,000  

300,000  

350,000  

5   25   50  Cerca   50  Lejos  

Num

ber  o

f  transmite

d  pa

ckets  

Speed  (Km/h)  

Number  of  transmited  packets  vs.  speed  (km/h)  

1  Hop  2  Hops  

Page 49: ZigBee Project UPC

Measurements 45

This second figure summarizes the results of experiments in terms of how time we can transmit at different speed. The different between two and three nodes are due to the increment of the total time to enter in a PAN.

Figure 4.14: Time transmit ig packets vs. speed.

Seeing that results is easy to thought that the thorugput is going to be like a descend line but this is not true. The throughput results it is show at the next figure. As we can see the throuput is higher at 25 km/h or 50 km/h than at 5 km/h. This is due to the fading of the medium. If we are going at 5 km/h and enter in a fading area we are going to take more to get away of this zone than if we are going at 25 o 50 km/h so the throughput is going to be higher at these speeds, although transmit less information than at 5 km/h.

Figure 4.15: Througput vs. speed.

0,000  

20,000  

40,000  

60,000  

80,000  

100,000  

120,000  

140,000  

5   25   50  Cerca   50  Lejos  

Time  tran

smiBng  packets  (sec)  

Speed  (Km/h)  

Time  transmiBng  packets  vs.  speed  (km/h)  

1  Hop  

2  Hops  

0,000  500,000  1000,000  1500,000  2000,000  2500,000  3000,000  3500,000  4000,000  4500,000  5000,000  

5   25   50  Cerca   50  Lejos  

Throughp

ut    

Speed  (Km/h)  

Throughput  vs.  speed  (km/h)  

1  Hop  

2  Hops  

Page 50: ZigBee Project UPC

Wireless communication project 46

If we apply the theoretical study explained in chapter 4:

!!" = −1!"# → !"#$%&'( ! ≈ 80!

!"##$!"ℎ = 5

!"ℎ

!"#$ sec =  !"#$%&'((!)

!"##$( !sec.)=

80!

1,39 !!"#.

= 57,55!"#.

!"#$  !"#$  !"#$%&'!!'$(   sec = !"#$ sec ∙ 2 − !!". + !!"". + !!"#.= 57,55 ∙ 2 − 3,095 = 112,005  !"#.

As we see, the result is similar to that obtained in the measurements of a jump. If this theoretical study applies when we are in a two-hop scenario, the result is the distance obtained in practice. This result leads to the following conclusion. When we are in a two-hop scenario must take into account more parameters than when we are in the simple scenario. This means that the theoretical study should be modified to suit the number of hops.

Page 51: ZigBee Project UPC

Conclusions and future lines 47

CHAPTER 5. CONCLUSIONS AND FUTURE LINES

5.1. Achieved objectives

It has been almost four months experimenting with Zigbee devices from Telegesis, trying to reach the technical limits of these devices. Taking into account the features of the devices provided, it can be assumed that most of these limits have been achieved. In the following lines are analyzed not only the goals reached but also the ones which have been to be missed due to the lack of time or material and which are left for the following students interested in Zigbee technology. At the same time, depending on the results obtained, some possible applications are proposed and finally some conclusions are extracted from the results obtained.

5.1.1. Static environment

Since originally Zigbee was designed as a standard for static and low cost communications, the first set of experiments done has been devoted to measure the static behavior of the devices varying the number of network nodes, the power transmitted and the channels used. These experiments also were done in fact to establish a valid reference to compare the mobility measurements.

Looking at the results obtained in static experiments, Zigbee devices allow direct communications between two nodes of acceptable quality at distances around 80 meters. As more nodes are introduced in the network, different topologies can be designed in order to cover different kind of areas. In the other hand, the values obtained for the throughput are not good enough to consider transmissions of high amounts of data such as image or video even considering the best values obtained with two nodes connected with a straight line of sight between them.

A static use of these Zigbee devices could be a domotic network which automates some daily processes in any home like to raise the blinds in the morning, lower them at the evening or turn on the heating with a phone call. In this case, Zigbee devices could be spread around the house, taking care of the elements to be controlled and connected to a more powerful CPU in charge of the data processing jobs.

An application, which takes into account the low power consumption, would be a Zigbee network deployed over a runner or a cyclist giving information of some biomedical variables like the hearth rate or the blood pressure. It is supposed that the receiver is also moving at the same speed than the transmitter (maybe in the team car), so the distance between both should be almost constant.

All the expected measurements in a static environment involving maximum

Page 52: ZigBee Project UPC

Wireless communication project 48

distance, number of hops and throughput have been done so it can be assumed that the objectives marked in this section have been reached.

5.1.2. Mobile environment

As the experiments expected to be developed with Zigbee devices are in a static environment, it has been considered to do some innovation devoting a set of experiments to do mobility measurements. Since there are neither specifications nor configurations devoted to mobile communications using Zigbee, anyone who tries it is in its own. It is expected to achieve acceptable quality link levels between nodes which are in movement in order to expand the possibilities of Zigbee networks.

The experiments done are oriented to get values for the discovery and association times of a network and to measure the throughput allowed at different speeds. The results shown that is possible to achieve reasonable results in mobility when speed is below 50 km/h. However, throughput is again limiting the possible applications as it has poor levels even with only one hop a speeds around 25 km/h.

At this speeds its use, for example, in highways sharing information about traffic or weather between a node inside a car and a deployed network along the road would be quite difficult to implement with this nodes. Maybe a possible application would be the same situation as before but inside a city when speeds should be limited below 50 km/h.

Again, all the experiments proposed at the beginning of the project have been implemented. This includes measurements at different speeds, with one and two hops. The measurements with three hops have been omitted here as the results obtained with two hops with mobility and three hops in static have shown already some poor values.

In mobility environments, we obtain that the amount of data that could be send through a communication between nodes is:

ú By walk à up to ~40Kbytes ú Low car speed [50Km/h] à up to 5Kbytes

With these results, we notice that the best mobility applications where can be used the technology, are the related with low capacity requirements.

5.2. Future lines

In all these months working with Telegesis devices, some additional experiments were added to the proposed initial ones. Some of them, like increasing the number of hops or changing the network topology in both static and mobile measurements have been implemented. But the following ones have not been able to perform, so are left for future project groups:

Page 53: ZigBee Project UPC

Measurements 49

5.2.1. Security

Telegesis devices allow some security measurements when transmitting data between them. It consists mainly in one of the devices acting as a trust center and setting up passwords and keys to give access to the created PAN and this way allowing the transmission of data between nodes. It is expected that a network with security set up will decrease its performance compared with an open network. The measure of this performance in terms of discovery and association times and throughput would be the main points to investigate.

5.2.2. Power measurements

As it has mentioned before, one of the main goals of Zigbee is to provide low power communications in order to maximize the battery life cycle and this way, give certain autonomy to the nodes. Since the devices from Telegesis require little maintenance, it would be interesting to measure what is exactly the power consumption of each type of node and to propose some solutions to give them a complete autonomy.

5.2.3. Programmable nodes

The devices used in this project offers a fixed set of AT commands to deal with the configuration possibilities of the nodes and the network which means a great ease of use but also limits the possible applications. If the user could create its own commands and the processing capacity of the nodes would get increased, some ways of investigation would be added. This surely means to change the entire nodes but the possibilities that it would offer to explore Zigbee technology capabilities would be high increased.

Page 54: ZigBee Project UPC

Wireless communication project 50

5.3. Conclusions

Taking into account all the points explained in this document and the experience achieved during this time, the following conclusions have been extracted:

§ Throughput. The values obtained confirm that Zigbee is not suitable for transporting large amounts of data in a reasonable time. However, is very useful and reliable to deliver control or status messages.

§ Simplicity at the expense of features. The fixed set of AT commands

available to configure the nodes and so the networks, have been limiting the possible ways to take more and more reliable measurements or to analyze the data obtained. However, it is understood that simplicity is one of the main Zigbee goals and surely it has been achieved with Telegesis nodes.

§ Working environments. As it can be expected the nodes have offered

their best performance in a static environment, so most of the applications would be designed for use without movement. However, the results obtained shown that Telegesis devices allows mobility in certain ways, so it would be feasible to think about scenarios where exist movement between the nodes at low speeds. The autonomy, little size and almost non-existing maintenance of the nodes makes mobile applications the most interesting for this technology.

§ Objectives. At the end of the project, it not only has been learnt about Zigbee technology but also it has been understood the advantages and drawbacks in front of other most known wireless communications systems like Bluetooth or Wi-Fi. Also the methodic way to take measurements learnt and employed during this project, have left reliable experiment results as well as some ways of future investigation. For all this, it can be assumed that the main goals marked at the beginning of this project have been achieved.

Page 55: ZigBee Project UPC

References 51

REFERENCES

The following referenced documents aren’t indispensable for the application of the present document, but they allow more project information. References are either specific (identified by paper title and author) or non-specific (websites).

[1] Zigbee: “Wireless Control That Simply Works”, William C. Craig, program manager wireless communications ZMD America, Inc.

[2] http://www.telegesis.com

[3] ZigBee Wireless Networkink, Drew Gislason. ZigBee Alliance.

[4] First steps with Zigbee devices; David Cuenca et alt. [2010]

[5] IEEE Standard 802 Part 15.4: Wireless Medium Access Control (MAC) and Physical Layer (PHY) Specifications for Low-Rate WirelessPersonal Area Networks (WPANs) [2006]

[6] ETRX2DVKA & ETRX2DVKP – TELEGESIS DEVELOPMENT KIT FOR ZIGBEE® TECHNOLOGY. PRODUCT MANUAL [TG-ETRX2DVK-PM-005-203]

[7] ETRX2 ZigBee® Modules. AT-Command Dictionary [TG-ETRX-R301-AT-Commands]

[8] ETRX2 ZigBee® MODULES. Migration Guide [TG-R2xx to R3xx

Page 56: ZigBee Project UPC
Page 57: ZigBee Project UPC

Annex 53

ANNEX

Annex A: Commands list used

The next table shows the overview of several used AT commands which Telegesis framework supports. Exist more of following commands, but most of them haven't used in this paper.

Commands overview ATI Display Product Identification Information

AT+BLOAD Enter The Bootloader Menu AT&F Restore Factory Defaults

AT+EN Establish Personal Area Network AT+SR Set Source Route To Remote Device

AT+PING Indicate Presence In The Network AT+JN Join Network

AT+JPAN Join Specific Pan AT+UCAST Transmit A Unicast

Table A.1:. Commands overview.