Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 42

Seminar Report On ZIGBEE Submitted by ARUN.

S in partial fulfillment for the award of the degree of BACHELOR OF TECHNOLOGY IN COMPUTER SCIENCE & ENGINEERING SCHOOL OF ENGINEERING COCHIN UNIVERSITYUNIVERSITY OF SCIENCE & TECHNOLOGY, KOCHI-682022 SEPTEMBER 2008

DIVISION OF COMPUTER ENGINEERING SCHOOL OF ENGINEERING COCHIN UNIVERSITY OF SCIENCE AND TECHNOLOGY KOCHI - 682022 Certificate Certified that this is a bonafide record of the seminar entitled ZIGBEE done by ARUN.S of the VIIth semester, Computer Science and Engineering in the year 2008 in part ial fulfillment of the requirements to the award of Degree of Bachelor of Technology in Computer Science and Engineering of Cochin University of Science and Technology. Mrs. Laya Simpson Dr. David Peters S Seminar Guide Head of Division Date : 28/08/2008

ACKNOWLEDGEMENT It is great opportunity to express my sincere thanks to all who have contributed to do this seminar through their support, encouragement and guidance. I express my gratitude and thanks to Miss.Laya Simpson, my seminar guide for his constant guidance and help, all through my work. I thank Mr. Pramod Pavithran, my course coordinator for his boundless cooperatio n and help extended for this seminar. I also express our gratitude to Dr. David Peters S, H.O.D -(C.S.Department), for providing the necessary facilities for the completion of this seminar work in my college. And last, but not least huge thanks goes to all the teaching staff of my college and my friends and my family members for their help in the successful completion of thi s seminar. ARUN.S

TABLE OF CONTENTS LIST OF FIGURES i LIST OF TABLES ii 1 INTRODUCTION 1 1.1 EVOLUTION OF LOW-RATE WIRELESS PERSONAL AREA NETWORK STANDARDIZATION 1 1.2 ZIGBEE AND IEEE 802.15.4 2 1.2.1 ZigBee Alliance 3 1.2.2 Why is it called Zigbee? 4 2 IEEE 802.15.4 WPAN. 5 2.1 GENERAL DESCRIPTION 5 2.2 ZIGBEE CHARACTERISTICS 6 2.3 DEVICE TYPES 7 2.4 NETWORK TOPOLOGIES 8 2.4.1 Star Topology 8 2.4.2 Peer-to-peer Topology 9 2.4.3 Cluster-tree Topology 10 2.5 ARCHITECTURE 12 2.5.1 Network and Application Support layer : 13 2.5.2 Physical (PHY) layer: 13 2.5.3 Media access control (MAC) layer: 14 3 IEEE 802.15.4 PHY 15 3.1 RECEIVER ENERGY DETECTION (ED) 17 3.2 LINK QUALITY INDICATION (LQI) 17 3.3 CLEAR CHANNEL ASSESSMENT (CCA) 18 3.4 PPDU FORMAT 18 4 IEEE 802.15.4 MAC 20

4.1 SUPERFRAME STRUCTURE 21 4.2 CSMA-CA ALGORITHM 22 4.3 TRAFFIC TYPES 23 4.4 DATA TRANSFER MODEL 23 5 ZIGBEE ROUTING LAYER 28 5.1 AODV: AD HOC ON DEMAND DISTANCE VECTOR 28 6 SUMMARY 32 6.1 TECHNOLOGY COMPARISONS 31 6.2 ZIGBEE APPLICATIONS 31 7 CONCLUSION 33 8 REFERENCE 34

LIST OF FIGURES 2.1 Star topology Network 9 2.2 Cluster Network 10 2.3 Mesh Network 11 2.4 ZigBee Architecture 12 3.1 Phy layer Reference model 15 3.2 Operating Frequency Bands 18 4.1 Mac layer Reference model 21 4.2 Super frame structure 23 4.3 communication to a coordinator in a beacon Enabled network. 25 4.4 communication to a coordinator in a nonbeacon Enabled network. 26 4.5 communication from a coordinator in a nonbeacon Enabled network. 27 4.6 communication from a coordinator in a beacon Enabled network. 28 5.1 Reverse and forward path formation in AODV Protocol 31

LIST OF TABLES 3.1 Frequency Bands and data rates 16 6.1 Technology computation 31

ABSTRACT My seminar topic is ZigBee . ZigBee is a new wireless technology developed by the ZigBee Alliance to overcome the limitations of BLUETOOTH and Wi-Fi. ZigBee is developed on the top of IEEE 802.15.4 standard. It is designed for low-power consumption allowing batteries to essentially last forever.Though we have couple of methods for multimedia applications, till now nothing has been developed for sen sor networking and control machines which require longer battery life and continuous working without human intervention. ZigBee devices allow batteries to last up to years using primary cells (low cost) without any chargers (low cost and easy installation). The ZigBee standard provides network, security, and application support services operating on top of the IEEE 802.15.4.IEEE 802.15.4 standard has two basic layer s medium Access Control (MAC) and Physical Layer (PHY) wireless standard. The network layer supports various topologies such star, clustered tree topology and self healing mesh topology. Apart from easy installation and easy implementation ZigB ee has a wide application area such as home networking, industrial networking, many more having different profiles specified for each field. The upcoming of ZigBee will revolutionize the home networking and rest of the wireless world.

ZigBee 1. INTRODUCTION 1.1 Evolution of Low-Rate Wireless Personal Area Network (LR-WPAN) Standardization The cellular network was a natural extension of the wired telephony network that became persistent during the mid-20th century. As the need for mobility and the cost of laying new wires increased, the motivation for a personal connection independent of loc ation to that network also increased. Coverage of large area is provided through (1-2km) cells that co-operate with their neighbors to create a seamless network. Cellular standards basically aimed at facilitating voice communications throughout a metropolitan area. Durin g the mid-1980s, it turned out that an even smaller coverage area is needed for higher user densities and the emergent data traffic. The IEEE 802.11 working group for Wireless Local Area Network (WLAN) is formed, to create a wireless local area network standard. Whereas IEEE 802.11 was concer ned with features such as Ethernet matching speed, long range(100m), complexity to h andle seamless roaming, message forwarding, and data throughput of 2-11Mbps. Wireless personal area networks (WPANs) are used to convey information over rela tively short distances. WPANs are focused on a space around a person or object that typ ically extends up to 10m in all directions. The focus of WPANs is low-cost, low power, short range and very small size. The IEEE 802.15 working group is formed to create WPAN standard. This group has currently defined three classes of WPANs that are differentiated by data rate, b attery drain and quality of service (QoS). The high data rate WPAN (IEEE 802.15.3) is suitable for multi-media applications that require very high quality of services. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee Medium rate WPANs (IEEE 802.15.1/Bluetooth) will handle a variety of tasks ranging from cell phones to PDA communications and have QoS suitable for voice communications. The low rate WPANs (IEEE 802.15.4/LR-WPAN) is intended to serve a set of industrial, residential and medical applications with very low power consumption , with relaxed needs for data rate and QoS. The low data rate enables the LR-WPAN to consume very little power. This feature allows small, power-efficient, inexpensi ve solutions to be implemented for a wide range of devices. 1.2 Zigbee and IEEE 802.15.4 The IEEE 802.15.4 standard is a simple packet data protocol for lightweight wire less networks and specifies the Physical (PHY) and Medium Access Control (MAC) layers for Multiple Radio Frequency (RF) bands, including 868 MHz, 915 MHz, and 2.4 GHz . The IEEE 802.15.4 standard is designed to provide reliable data transmission of modest amounts of data up to 100 meters or more while consuming very little power. IEEE 802.15.4 is typically less than 32 kb in size, featuring a 64-bit address space, source and destination addressing, error detection, and advanced power management. ZigBee technology takes full advantage of the IEEE 802.15.4 standard and extends the capabilities of this new radio standard by defining a flexible and secure networ k layer that supports a variety of architectures to provide highly reliable wireless com munication. ZigBee technology also offers simplicity and a cost-effective approach to buildi ng, construction and remodeling with wireless technology. ZigBee is all set to provi de the consumers with ultimate flexibility, mobility, and ease of use by building wirel ess intelligence and capabilities into every day devices. ZigBee is expected to provide low cost and low power connectivity for equipment that needs battery life as long as several months to several years but does not requi re data transfer rates as high as those enabled by Bluetooth. This kind of network elimi nates use of physical data buses like USB and Ethernet cables. The devices could include Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee telephones, hand-held digital assistants, sensors and controls located within a few meters of each other. Thus, ZigBee technology is a low data rate, low power consumption, low cost; wir eless networking protocol targeted towards automation and remote control applications. 1.3 ZigBee Alliance The ZigBee Alliance is an association of companies working together to enable re liable, cost-effective, low-power, wirelessly networked, monitoring and control products based on an open global standard. The goal of the ZigBee Alliance is to provide the consumer with ultimate flexibi lity, mobility, and ease of use by building wireless intelligence and capabilities int o every day devices. ZigBee technology will be embedded in a wide range of products and applications across consumer, commercial, industrial and government markets worldwide. For the first time, companies will have a standards-based wireless pl atform optimized for the unique needs of remote monitoring and control applications, in cluding simplicity, reliability, low-cost and low-power. 1.4 Why is it called Zigbee? It has been suggested that the name evokes the haphazard paths that bees follow as they harvest pollen, similar to the way packets would move through a mesh network. Using communication system, whereby the bee dances in a zig-zag pattern, worker bee is able to share information such as the location, distance, And direction of a new ly discovered food source to her fellow colony members. Instinctively implementing the ZigBee Principle, bees around the world actively sustain productive itchiness an d promote future generations of Colony members. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 2. IEEE 802.15.4 WPAN 2.1 General description A LR-WPAN is a simple, low-cost communication network that allows wireless connectivity in applications with limited power and relaxed throughput requireme nts. The main objectives of an LR-WPAN are ease of installation, reliable data transfer, shortrange operation, extremely low cost, and a reasonable battery life, while mainta ining a simple and flexible protocol. The three license-free frequencies of the IEEE 802.15.4 standard include sixteen channels at 2.4 GHz, ten channels at 915 MHz, and one channel at 868 MHz, to support glob al or regional deployment. The maximum data rates for each band are 250 kbps, 40 kbps and 20 kbps, respectively. The air interface is direct sequence spread spectrum (DSS S) using binary phase shift keying (BPSK) for 868 MHz and 915 MHz and offset-quadrature phase shift keying (OQPSK) for 2.4 GHz. Other features of the IEEE 802.15.4 PHY include receiver energy detection, link quality indication and clear channel assessment. Both contention-based and contention-fr ee channel access methods are supported. Maximum packet size is 128 bytes, includin g a variable payload of up to 104 bytes. IEEE 802.15.4 employs 64-bit IEEE and 16-bi t short addresses, which supports over 65,000 nodes per network. The IEEE 802.15.4 MAC also enables network association and disassociation, has an optional super frame structure with beacons for time synchronization, and a guar anteed time slot (GTS) mechanism for high priority communications. The access method is carrier sense multiple access with collision avoidance (CSMA-CA). Network routin g schemes are designed to ensure power conservation, and low latency through guara nteed time slots. A unique feature of ZigBee network layer is communication redundancy eliminating single point of failure in mesh networks.

Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee IEEE and ZigBee Alliance have been working closely to specify the entire protoco l stack. IEEE 802.15.4 focuses on the specification of the lower two layers of the protoc ol (physical and data link layer). On the other hand, ZigBee Alliance aims to provi de the upper layers of the protocol stack (from network to the application layer) for interoperable data networking, security services and a range of wireless home an d building control solutions. 2.2 Zigbee characteristics The focus of network applications under the IEEE 802.15.4 / ZigBee standard incl ude the features of low power consumption, needed for only two major modes (Tx/Rx or Sle ep), high density of nodes per network, low costs and simple implementation. These features are enabled by the following characteristics 2.4GHz and 868/915 MHz dual PHY modes. This represents three license-free bands: 2.4-2.4835 GHz, 868-870 MHz and 902928 MHz. The number of channels allotted to each frequency band is fixed at 16 chann els in the 2.45 GHz band, 10 channels in the 915 MHz band, and 1 channel in the 868 MHz band Maximum data rates allowed for each of these frequency bands are fixed as 250 kbps @2.4 GHz, 40 kbps @ 915 MHz, and 20 kbps @868 MHz. Allocated 16 bit short or 64 bit extended addresses. Allocation of guaranteed time slots (GTSs) Carrier sense multiple access with collision avoidance (CSMA-CA) channel access Yields high throughput and low latency for low duty cycle devices like se nsors and controls. Fully hand-shake acknowledged protocol for transfer reliability. Low power consumption with battery life ranging from months to years. Energy detection (ED). Link quality indication (LQI). Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee Multiple topologies : star, peer-to-peer, mesh topologies 2.3 Device Types ZigBee devices are required to conform to the IEEE 802.15.4-2003 Low-Rate Wirele ss Personal Area Network (WPAN) standard. ZigBee wireless devices are expected to transmit 10-75 meters, depending on the RF environment and the power output consumption required for a given application, and will operate in the unlicensed RF worldwide (2.4GHz global, 915MHz Americas or 868 MHz Europe). The data rate is 250kbps at 2.4GHz, 40kbps at 915MHz and 20kbps at 868MHz. There are three different ZigBee device types that operate on these layers in an y selforganizing application network. These devices have 64-bit IEEE addresses, with o ption to enable shorter addresses to reduce packet size, and work in either of two add ressing modes star and peer-to-peer. The ZigBee (PAN) coordinator node: The most capable device, the coordinator forms the root of the network tree and might bridge to other networks. It is abl e to store information about the network.There is one, and only one, ZigBee coordinator in each network to act as the router to other network. It also acts as the repository fo r security keys. The Full Function Device (FFD): The FFD is an intermediary router transmitting data from other devices. It needs lesser memory than the ZigBee coordinator node , and entails lesser manufacturing costs. It can operate in all topologies and can act as a coordinator. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee The Reduced Function Device (RFD) : This device is just capable of talking in th e network; it cannot relay data from other devices. Requiring even less memory, (n o flash, very little ROM and RAM), an RFD will thus be cheaper than an FFD. This device t alks only to a network coordinator and can be implemented very simply in star topolog y. An FFD can talk to RFDs or other FFDs, while an RFD can talk only to an FFD. An RFD is intended for applications that are extremely simple, such as a light switch o r a passive infrared sensor; they do not have the need to send large amounts of data and may only associate with a single FFD at a time. Consequently, the RFD can be implemented using minimal resources and memory capacity. 2.4 Network Topologies Figure 2.1 shows 3 types of topologies that ZigBee supports: star topology, peer -to-peer topology and cluster tree. 2.4.1 Star Topology In the star topology, the communication is established between devices and a sin gle central controller, called the PAN coordinator. The PAN coordinator may be mains powered while the devices will most likely be battery powered. Applications that benefit from this topology include home automation, personal computer (PC) peripherals, toys and games. After an FFD is activated for the first time, it may establish its ow n network and become the PAN coordinator. Each start network chooses a PAN identifier, whi ch is not currently used by any other network within the radio sphere of influence. Th is allows each star network to operate independently. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee Figure 2.1 2.4.2 Peer-to-peer Topology In peer-to-peer topology, there is also one PAN coordinator. In contrast to star topology, any device can communicate with any other device as long as they are in range of one another. A peer-to-peer network can be ad hoc, self-organizing and self-healing. Applications such as industrial control and monitoring, wireless sensor networks , asset and inventory tracking would benefit from such a topology. It also allows multip le hops to route messages from any device to any other device in the network. It can pro vide reliability by multipath routing. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee Figure 2.2 2.4.3 Cluster-tree Topology Cluster-tree network is a special case of a peer-to-peer network in which most d evices are FFDs and an RFD may connect to a cluster-tree network as a leave node at the end of a branch. Any of the FFD can act as a coordinator and provide synchronization serv ices to other devices and coordinators. Only one of these coordinators however is the PAN coordinator. The PAN coordinat or forms the first cluster by establishing itself as the cluster head (CLH) with a cluster Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee identifier (CID) of zero, choosing an unused PAN identifier, and broadcasting be acon frames to neighboring devices. A candidate device receiving a beacon frame may r equest to join the network at the CLH. If the PAN coordinator permits the device to joi n, it will add this new device as a child device in its neighbor list. The newly joined dev ice will add the CLH as its parent in its neighbor list and begin transmitting periodic b eacons such that other candidate devices may then join the network at that device. Once application or network requirements are met, the PAN coordinator may instruct a device to become the CLH of a new cluster adjacent to the first one. The advantage of t his clustered structure is the increased coverage area at the cost of increased mess age latency. Figure 2.3 Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 2.5 Architecture The LR-WPAN architecture is defined in terms of a number of blocks in order to simplify the standard. These blocks are called layers. Each layer is responsible for one part of the standard and offers services to the higher layers. The layout of the blocks is based on the open systems interconnection (OSI) seven-layer model. The interface s between the layers serve to define the logical links between layers. The LR-WPAN architecture can be implemented either as embedded devices or as devices requiri ng the support of an external device such as a PC. An LR-WPAN device comprises a PHY, which contains the radio frequency (RF) transceiver along with its low-level control mechanism, and a MAC sub layer that provides access to the physical channel for all types of transfer. 802.15.4 MAC ZigBee Application layer ZigBee Network layer 802.15.4 PHY 802.15.4 PHY 868/915 Mhz I E E Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee Figure 2.4 802.15.4 / ZIGBEE ARCHITECTURE 2.5.1 Network and Application Support layer: The network layer permits growth of network sans high power transmitters. This l ayer can handle huge numbers of nodes. This level in the ZigBee architecture includes The ZigBee Device Object (ZDO) User-Defined Application Profile(s) The Application Support (APS) Sub-layer. The APS sub-layer's responsibilities include maintenance of tables that enable m atching between two devices and communication among them, and also discovery, the aspect that identifies other devices that operate in the operating space of any device. The responsibility of determining the nature of the device (Coordinator / FFD or RFD) in the network, commencing and replying to binding requests and ensuring a secure relationship between devices rests with the ZDO (Zigbee Define Object). The user defined application refers to the end device that conforms to the ZigBee Standar d. 2.5.2 Physical (PHY) layer: The PHY service enables the transmission and reception of PHY protocol data unit s (PPDU) across the physical radio channel. The features of the IEEE 802.15.4 PHY physical layer are Activation and deactiva tion of the radio transceiver, energy detection (ED), Link quality indication (LQI), cha nnel Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee selection, clear channel assessment (CCA) and transmitting as well as receiving packets across the physical medium. 2.5.3 Media access control (MAC) layer: The MAC service enables the transmission and reception of MAC protocol data unit s (MPDU) across the PHY data service. The features of MAC sub layer are beacon management, channel access, GTS management, frame validation, acknowledged frame delivery, association and disassociation. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 3. IEEE 802.15.4 PHY The PHY provides an interface between the MAC sub layer and the physical radio channel, via the RF firmware and RF hardware. The PHY conceptually includes a management entity called the PLME. This entity provides the layer management ser vice interfaces through which layer management functions may be invoked. The PLME is also responsible for maintaining a database of managed objects pertaining to the PHY. This database is referred to as the PHY PAN Information base (PIB). PD_SAP PLME_SAP RF_SAP PHY LIB PHY LAYER PLME Figure 3.1 PHY LAYER REFERENCE MODEL The PHY provides two services, accessed through two SAPs: The PHY data service accessed through the PHY Data SAP (PD-SAP). The PHY data service enables the transmission and reception of PHY protocol data units (PPDUs ) across the physical radio channel Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee The PHY management service accessed through the PLME s SAP (PLMESAP). The features of the PHY are activation and deactivation of the radio transceiver, en ergy detection(ED), link quality indication (LQI), channel selection, clear channel a ssessment (CCA) and transmitting as well as receiving packets across the physical medium. The standard offers two PHY options based on the frequency band. Both are based on direct sequence spread spectrum (DSSS). The data rate is 250kbps at 2.4GHz, 40kb ps at 915MHz and 20kbps at 868MHz. The higher data rate at 2.4GHz is attributed to a h igherorder modulation scheme. Lower frequency provides longer range due to lower propagation losses. Low rate can be translated into better sensitivity and large r coverage area. Higher rate means higher throughput, lower latency or lower duty cycle. Th is information is summarized in Figure 3.2. Table 3.1 Frequency Bands and Data Rates PHY Frequency Spreading Parameters Data Parameters (MHz) Band(MHz) Chiprate (kchip/s) Modulation Bit rate (kb/s) Symbol rate (ksymbol/s) Symbols 868/915 868-868.6 300 BPSK 20 20 Binary 902-928 600 BPSK 40 40 Binary 2450 2400-2483.5 2000 O-QPSK 250 62.5 16-ary Orthogonal There is a single channel between 868 and 868.6MHz, 10 channels between 902.0 an d 928.0MHz, and 16 channels between 2.4 and 2.4835GHz as shown in Figure 3.3. Seve ral channels in different frequency bands enable the ability to relocate within spec trum. The standard also allows dynamic channel selection, a scan function that steps throu gh a list Division Of Computer Science And Engineering, School Of Engineering, CUSAT 16

ZigBee of supported channels in search of beacon, receiver energy detection, link quali ty indication, channel switching. Figure 3.2 Operating Frequency Bands 3.1 Receiver Energy Detection (ED) The receiver energy detection (ED) measurement is intended for use by a network layer as part of channel selection algorithm. It is an estimate of the received signal power within the bandwidth of an IEEE 802.15.4 channel. No attempt is made to identify or decode signals on the channel. The ED time should be equal to 8 symbol periods. The ED result shall be reported as an 8-bit integer ranging from 0x00 to 0xff. T he minimum ED value (0) shall indicate received power less than 10dB above the spec ified receiver sensitivity. The range of received power spanned by the ED values shall be at least 40dB. Within this range, the mapping from the received power in decibels t o ED values shall be linear with an accuracy of + or . 6dB. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 3.2 Link Quality Indication (LQI) Upon reception of a packet, the PHY sends the PSDU length, PSDU itself and link quality (LQ) in the PD-DATA Indication primitive. The LQI measurement is a characterization of the strength and/or quality of a received packet. The measur ement may be implemented using receiver ED, a signal-to-noise estimation or a combinat ion of these methods. The use of LQI result is up to the network or application layers. The LQI result should be reported as an integer ranging from 0x00 to 0xff. The m inimum and maximum LQI values should be associated with the lowest and highest quality IEEE 802.15.4 signals detectable by the receiver and LQ values should be uniformly di stributed between these two limits. 3.3 Clear Channel Assessment (CCA) The clear channel assessment (CCA) is performed according to at least one of the following three methods: Energy above threshold. CCA shall report a busy medium upon detecting any energy above the ED threshold. Carrier sense only. CCA shall report a busy medium only upon the detection of a signal with the modulation and spreading characteristics of IEEE 802.15.4. This signal may be above or below the ED threshold. Carrier sense with energy above threshold. CCA shall report a busy medium only upon the detection of a signal with the modulation and spreading characteristics of IEEE 802.15.4 with energy above the ED threshold. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 3.4 PPDU Format The PPDU packet structure is illustrated in Figure 3.4. Each PPDU packet consist s of the following basic components: SHR, which allows a receiving device to synchronize and lock into the bit stream PHR, which contains frame length information A variable length payload, which carries the MAC sublayer frame. Figure 3.4 Format of the PPDU Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 4. IEEE 802.15.4 MAC MCPS_SAP MLME_SAP PLME_SAP MAC LIB MAC LAYER MLME PD_SAP Figure 4.1 MAC SUBLAYER REFERENCE MODEL Figure 4.1 depicts the components and interfaces of the MAC sub layer. The MAC sub layer provides an interface between the SSCS and the PHY. The MAC su b layer conceptually includes a management entity called the MLME. This entity pro vides the service interfaces through which layer management functions may be invoked. The Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee MLME is also responsible for maintaining a database of managed objects pertainin g to the MAC sub layer. This database is referred to as the MAC sub layer PIB. The MAC sub layer provides two services: The MAC data service and The MAC management service interfacing to the MAC sub layer management entity (MLME) service access point (SAP) (MLMESAP). The MAC data service enables the transmission and reception of MAC protocol data units (MPDU) across the PHY data service. The features of MAC sub layer are beacon management, channel access, GTS management, frame validation, acknowledged frame delivery, association and disassociation. 4.1 Super frame Structure LR-WPAN allows the optional use of a super frame structure. The format of the su per frame is defined by the coordinator. The super frame is bounded by network beaco ns and is divided into 16 equally sized slots. The beacon frame is sent in the first sl ot of each super frame. If a coordinator does not want to use the super frame structure, it may turn off the beacon transmissions. The beacons are used to synchronize the attached d evices, to identify the PAN and to describe the structure of super frames. The super frame can have an active and an inactive portion. During the inactive portion, the coordinator shall not interact with its PAN and may enter a low-power mode. The active portion consists of contention access period (CAP) and contention free pe riod (CFP). Any device wishing to communicate during the CAP shall compete with other devices using a slotted CSMACA mechanism. On the other hand, the CFP contains guaranteed time slots (GTSs). The GTSs always appear at the end of the active su per frame starting at a slot boundary immediately following the CAP. The PAN coordin ator may allocate up to seven of these GTSs and a GTS can occupy more than one slot p eriod. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee Figure 4.2 SUPER FRAME STRUCTURE 4.2 CSMA-CA Algorithm If superframe structure is used in the PAN, then slotted CSMA-CA shall be used. If beacons are not being used in the PAN or a beacon cannot be located in a beaconenabled network, unslotted CSMA-CA algorithm is used. In both cases, the algorithm is implemented using units of time called backoff periods, which is equal to aUnitBackoffPeriod symbols. In slotted CSMA-CA channel access mechanism, the backoff period boundaries of ev ery device in the PAN are aligned with the superframe slot boundaries of the PAN coordinator. In slotted CSMA-CA, each time a device wishes to transmit data fram es during the CAP, it shall locate the boundary of the next backoff period. In unsl otted CSMA-CA, the backoff periods of one device do not need to be synchronized to the backoff periods of another device. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 4.3 Traffic Types ZigBee/IEEE 802.15.4 addresses three typical traffic types. IEEE 802.15.4 MAC can accommodate all the types. Data is periodic. The application dictates the rate, and the sensor activates ch ecks for data and deactivates. Data is intermittent. The application, or other stimulus, determines the rate, a s in the case of say smoke detectors. The device needs to connect to the network only when communication is necessitated. This type enables optimum saving on energy. Data is repetitive, and the rate is fixed a priori. Depending on allotted time s lots, called GTS (guaranteed time slot), devices operate for fixed durations ZigBee employs either of two modes, beacon or non-beacon to enable the to-and-fr o data traffic. Beacon mode is used when the coordinator runs on batteries and thus off ers maximum power savings, whereas the non-beacon mode finds favour when the coordinator is mains-powered. 4.4 Data Transfer model Three types of data transfer transactions exist: from a coordinator to a device, from a device to a coordinator and between two peer devices. The mechanism for each of these transfers depends on whether the network supports the transmission of beacons. The non-beacon mode will be included in a system where devices are asleep' nearly

always, as in smoke detectors and burglar alarms. The devices wake up and confir m their continued presence in the network at random intervals. When a device wishes to transfer data in a no beacon-enabled network, it simply transmits its data frame, using the unslotted CSMA-CA, to the coordinator. On de tection Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee of activity, the sensors spring to attention', as it were, and transmit to the ev er-waiting coordinator's receiver (since it is mains-powered). There is also an optional acknowledgement at the end as shown in Figure 4.3. In the beacon mode, a device watches out for the coordinator's beacon that gets transmitted at periodically, locks on and looks for messages addressed to it. If message transmission is complete, the coordinator dictates a schedule for the next beaco n so that the device goes to sleep'; in fact, the coordinator itself switches to sleep mode . While using the beacon mode, all the devices in a mesh network know when to communicat e with each other. In this mode, necessarily, the timing circuits have to be quite accurate, or wake up sooner to be sure not to miss the beacon. This in turn means an increase in power consumption by the coordinator's receiver, entailing an optimal increase i n costs. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee When a device wishes to transfer data to a coordinator in a beacon-enabled netwo rk, it first listens for the network beacon. When the beacon is found, it synchronizes to the superframe structure. At the right time, it transmits its data frame, using slot ted CSMACA, to the coordinator. There is an optional acknowledgement at the end as shown in Figure 4.4. The applications transfers are completely controlled by the devices on a PAN rat her than by the coordinator. This provides the energy-conservation feature of the ZigBee network. When a coordinator wishes to transfer data to a device in a beacon-enabled netwo rk, it indicates in the network beacon that the data message is pending. The device per iodically listens to the network beacon, and if a message is pending, transmits a MAC comm and requesting this data, using slotted CSMA-CA . The coordinator optionally acknowl edges the successful transmission of this packet. The pending data frame is then sent using slotted CSMA-CA. The device acknowledged the successful reception of the data by Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee transmitting an acknowledgement frame. Upon receiving the acknowledgement, the message is removed from the list of pending messages in the beacon as shown in F igure 4.5. When a coordinator wishes to transfer data to a device in a nonbeacon-enabled ne twork, it stores the data for the appropriate device to make contact and request data. A device may make contact by transmitting a MAC command requesting the data, using unslot ted CSMA-CA, to its coordinator at an application-defined rate. The coordinator acknowledges this packet. If data are pending, the coordinator transmits the dat a frame using unslotted CSMA-CA. If data are not pending, the coordinator transmits a da ta frame with a zero-length payload to indicate that no data were pending. The device acknowledges this packet as shown in Figure 4.6. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee In a peer-to-peer network, every device can communicate with any other device in its transmission radius. There are two options for this. In the first case, the node will listen constantly and transmit its data using unslotted CSMA-CA. In the second case, th e nodes synchronize with each other so that they can save power. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 5. ZIGBEE ROUTING LAYER 5.1 AODV: Ad hoc On Demand Distance Vector AODV is a pure on-demand route acquisition algorithm: nodes that do not lie on a ctive paths neither maintain any routing information nor participate in any periodic r outing table exchanges. Further, a node does not have to discover and maintain a route to another node until the two needs to communicate, unless the former node is offer ing services as an intermediate forwarding station to maintain connectivity between two other nodes. The primary objectives of the algorithm are to broadcast discovery packets only when necessary, to distinguish between local connectivity management and general topo logy maintenance and to disseminate information about changes in local connectivity t o those neighboring mobile nodes that are likely to need the information. When a source node needs to communicate with another node for which it has no ro uting information in its table, the Path Discovery process is initiated. Every node ma intains two separate counters: sequence number and broadcast id. The source node initiates p ath discovery by broadcasting a route request (RREQ) packet to its neighbors, which includes source addr, source sequence number, broadcast id, dest addr, dest sequ ence number, hop cnt. (Source sequence number is for maintaining freshness informatio n about the reverse route whereas the destination sequence number is for maintaini ng freshness of the route to the destination before it can be accepted by the sourc e.). The pair source addr, broadcast id uniquely identifies a RREQ, where broadcast id is incremented whenever the source issues a new RREQ.When an intermediate node receives a RREQ, if it has already received a RREQ with the same broadcast id an d source address, it drops the redundant RREQ and does not rebroadcast it. Otherwi se, it rebroadcasts it to its own neighbors after increasing hop cnt. Each node keeps t he Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee following information: destination IP address, source IP address, broadcast id, expiration time for reverse path route entry and source node s sequence number. As the RREQ travels from a source to destinations, it automatically sets up the reverse path from all nodes back to the source. To set up a reverse path, a node records the address of the neighbor from which it received the first copy of RREQ. These rev erse path route entries are maintained for at least enough time for the RREQ to trave rse the network and produce a reply to the sender. When the RREQ arrives at a node, possibly the destination itself, that possesses a current route to the destination, the receiving node first checks that the RREQ was rece ived over a bi-directional link. If this node is not destination but has route to the dest ination, it determines whether the route is current by comparing the destination sequence nu mber in its own route entry to the destination sequence number in the RREQ. If RREQ s sequence number for the destination is greater than that recorded by the interme diate node, the intermediate node must not use this route to respond to the RREQ, inst ead rebroadcasts the RREQ. If the route has a destination sequence number that is greater than that contain ed in the RREQ or equal to that contained in the RREQ but a smaller hop count, it can unca st a route reply packet (RREP) back to its neighbor from which it received the RREQ. A RREP contains the following information: source addr, dest addr, dest sequence n umber, hop cnt and lifetime. As the RREP travels back to the source, each node along th e path sets up a forward pointer to the node from which the RREP came, updates its time out information for route entries to the source and destination, and records the lat est destination sequence number for the requested destination. Nodes that are along the path determined by the RREP will timeout after route re quest expiration timer and will delete the reverse pointers since they are not on the path from source to destination as shown in Figure 5.1. The value of this timeout time dep ends on the size of the ad hoc network. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 6. SUMMARY 6.1 Technology Comparisons Table 6.1 6.2 ZigBee Applications The Zigbee Alliance targets applications "across consumer, commercial, industria l and government markets worldwide". Unwired applications are highly sought after in m any networks that are characterized by numerous nodes consuming minimum power and enjoying long battery lives. ZigBee technology is designed to best suit these applications, for the reason th at it enables reduced costs of development, very fast market adoption, and rapid ROI. With Division Of Computer Science And Engineering, School Of Engineering, CUSAT 31

ZigBee ZigBee designed to enable two-way communications, not only will the consumer be able to monitor and keep track of domestic utilities usage, but also feed it to a com puter system for data analysis. A recent analyst report issued by West Technology Research Solutions estimates t hat by the year 2008, "annual shipments for ZigBee chipsets into the home automation se gment alone will exceed 339 million units," and will show up in "light switches, fire and smoke detectors, thermostats, appliances in the kitchen, video and audio remote contro ls, landscaping, and security systems." Futurists are sure to hold ZigBee up and say, "See, I told you so". The ZigBee A lliance is nearly 200 strong and growing, with more OEM's signing up. This means that more and more products and even later, all devices and their controls will be based on th is standard. Since Wireless personal Area Networking applies not only to household devices, b ut also to individualized office automation applications, ZigBee is here to stay. It is more than likely the basis of future home-networking solutions. The technology is designed to be simpler and cheaper than other WPANs such as Bluetooth. The most capable ZigBee node type is said to require only about 10% o f the software of a typical Bluetooth or Wireless Internet node, while the simplest no des are about 2%. ZigBee is aimed at applications with low data rates and low power consumption. . Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 7. CONCLUSION The ZigBee Standard enables the broad-based deployment of reliable wireless netw orks with low complexity, low cost solutions and provides the ability for a product t o run for years on inexpensive primary batteries (for a typical monitoring application). I t is also, of course, capable of inexpensively supporting robust mesh networking technologies ZigBee is all set to provide the consumers with ultimate flexibility, mobility, and eas e of use by building wireless intelligence and capabilities into every day devices. The mission of the ZigBee Working Group is to bring about the existence of a bro ad range of interoperable consumer devices by establishing open industry specificat ions for unlicensed, untethered peripheral, control and entertainment devices requiring t he lowest cost and lowest power consumption communications between compliant devices anywhere in and around the home. Division Of Computer Science And Engineering, School Of Engineering, CUSAT

ZigBee 8. REFERENCE 1. William stalling , wirless communication and netwoks ,Fourth edition pearson publication limited,2004 2. Andrew S. Tenenbaum, Computer Networks , Fourth Edition Pearson Publication, Limited, 2003 3. Behrouz A. Frouzan, Data Communication , Third Edition, Tata McGraw-Hill Publishing , company Limitted, 2004 4. http://www.zigbee.org/en/documents/zigbeeoverview4.pdf Division Of Computer Science And Engineering, School Of Engineering, CUSAT

You might also like