wpan ieee 802.15.4 (zigbee)

80
WPAN IEEE 802.15.4 (ZigBee)

Upload: bert-beck

Post on 01-Jan-2016

147 views

Category:

Documents


3 download

DESCRIPTION

WPAN IEEE 802.15.4 (ZigBee). WWAN < 15 km 802.20, GSM, GPRS, CDMA, 2.5G, 3G, 4G. WMAN < 5 km 802.16 – 70 Mbps LMDS – 38 Mbps. WLAN < 150 m 11 – 54 Mbps 802.11 HiperLAN/2. WPAN < 10 m Bluetooth 、 UWB 、 Zigbee. 无线通信网络分类图. Common Aliases for Wireless Standards. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: WPAN IEEE 802.15.4 (ZigBee)

WPANIEEE 802.15.4 (ZigBee)

Page 2: WPAN IEEE 802.15.4 (ZigBee)

WPAN< 10 mBluetooth 、 UWB 、 Zigbee

WLAN< 150 m11 – 54 Mbps802.11HiperLAN/2

WMAN< 5 km802.16 – 70 MbpsLMDS – 38 Mbps

WWAN< 15 km802.20, GSM, GPRS, CDMA, 2.5G, 3G, 4G

无线通信网络分类图

Page 3: WPAN IEEE 802.15.4 (ZigBee)

Common Aliases for Wireless Standards

802.11 Wi-Fi

802.15.1 Bluetooth

802.15.3 Ultra Wideband

802.15.4 ZigBee

802.16 WiMAX

Page 4: WPAN IEEE 802.15.4 (ZigBee)

IEEE 802.15 Working Group for Wireless Personal Area Networks

• The 802.15 WPAN effort focuses on the development of consensus standards for Personal Area Networks (PAN) or short distance wireless networks

• WPANs address wireless networking of portable and mobile computing devices such as: PCs, Personal Digital Assistants (PDAs), peripherals, cell phones, pagers, and consumer electronics; allowing these devices to communicate and interoperate with one another.

Page 5: WPAN IEEE 802.15.4 (ZigBee)

Example of home equipment demanding network operations

Page 6: WPAN IEEE 802.15.4 (ZigBee)

IEEE Project 802 Standards

WLANWLAN WMANWMAN

LR-WPANLR-WPAN

WPANWPAN

Page 7: WPAN IEEE 802.15.4 (ZigBee)

IEEE 802.15 Working Group

Page 8: WPAN IEEE 802.15.4 (ZigBee)

IEEE 802.15 Protocol Architecture

Page 9: WPAN IEEE 802.15.4 (ZigBee)

Wireless Local Networks

Page 10: WPAN IEEE 802.15.4 (ZigBee)

Bluetooth• In 1998 – Ericsson, IBM, Toshiba, Nokia and Intel form

Bluetooth Special Interest Group (SIG).• Harald Bluetooth – Danish king who lived more than 1000

years ago • Universal short-range wireless capability• Uses 2.4-GHz band• Available globally for unlicensed users• Devices within 10 m can share up to 720 kbps of capacity• Supports open-ended list of applications

– Data, audio, graphics, video• Data rate – 1 Mbps

Page 11: WPAN IEEE 802.15.4 (ZigBee)

Personal Ad-hoc Networks

Cable Replacement

- Synchronization - Cordless Headset

Landline

Data/Voice Access Points

Bluetooth Applications

…and combinations!

It is reported that more than two billion Bluetooth-ready devices were shipped during 2012 – over 50 millions every day.

Page 12: WPAN IEEE 802.15.4 (ZigBee)

Radio Specification

• Classes of transmitters (on which Bluetooth products are available):– Class 1: Outputs 100 mW for maximum range

• Power control mandatory• Provides greatest distance – up to 100 m• Products: still available

– Class 2: Outputs 2.4 – 2.5 mW at maximum• Power control optional• Transmission distance – 10 m• Products: most common

– Class 3: Nominal output is 1 mW• Lowest power• Transmission distance – 10 cm – 1 m• Products - rare

Page 13: WPAN IEEE 802.15.4 (ZigBee)

Bluetooth Standards Documents

• Core specifications– Details of various layers of Bluetooth protocol

architecture

• Profile specifications– Use of Bluetooth technology to support various

applications

Page 14: WPAN IEEE 802.15.4 (ZigBee)

Bluetooth Protocol Stack

Page 15: WPAN IEEE 802.15.4 (ZigBee)

Bluetooth Protocol Stack

Composed of protocols to allow Bluetooth devices to locate each other and to create, configure and manage both physical and logical links that allow higher layer protocols and applications to pass data through these transport protocols

Transport Protocol GroupRF

Baseband

AudioLink Manager

L2CAP

Data Con

trol

SDP RFCOMM

IP

Applications

Page 16: WPAN IEEE 802.15.4 (ZigBee)

Bluetooth Protocol Stack

Additional transport protocols to allow existing and new applications to operate over Bluetooth. Packet based telephony control signaling protocol also present. Also includes Service Discovery Protocol.

Middleware Protocol Group

RF

Baseband

AudioLink Manager

L2CAP

Data Con

trol

SDP RFCOMM

IP

Applications

Page 17: WPAN IEEE 802.15.4 (ZigBee)

Bluetooth Protocol Stack

Consists of Bluetooth aware as well as un-aware applications.

RF

Baseband

AudioLink Manager

L2CAP

Data Con

trol

SDP RFCOMM

IP

Applications

Application Group

Page 18: WPAN IEEE 802.15.4 (ZigBee)

Link Manager Protocol

Setup and management of Baseband connections

• Piconet Management• Link Configuration• Security

LMP

RF

Baseband

AudioLink Manager

L2CAP

Data Con

trol

SDP RFCOMM

IP

Applications

Page 19: WPAN IEEE 802.15.4 (ZigBee)

L2CAP

L2CAP - Logical Link Control and Adaptation Protocol

L2CAP provides• Protocol multiplexing• Segmentation and Re-assembly• Quality of service negotiationRF

Baseband

AudioLink Manager

L2CAP

Data

SDP RFCOMM

IP

Applications

Page 20: WPAN IEEE 802.15.4 (ZigBee)

RFCOMM (Radio Frequency Communication)-- Serial Port Emulation using RFCOMM

Serial Port emulation on top of a packet oriented link• Similar to HDLC (High level Data Link Control protocol)

• RS232• For supporting legacy apps

RF

Baseband

AudioLink Manager

L2CAP

Data

SDP RFCOMM

IP

Applications

Serial Port

Page 21: WPAN IEEE 802.15.4 (ZigBee)

Usage Models

• File transfer

• Internet bridge

• LAN access

• Synchronization

• Three-in-one phone

• Headset

Page 22: WPAN IEEE 802.15.4 (ZigBee)

Piconets and Scatternets

• Piconet– Basic unit of Bluetooth

networking

– Master and one to seven slave devices

– Master determines channel and phase

• Scatternet– Device in one piconet may

exist as master or slave in another piconet

– Allows many devices to share same area

– Makes efficient use of bandwidth

Page 23: WPAN IEEE 802.15.4 (ZigBee)

Physical Links between Master and Slave

• Synchronous connection oriented (SCO)– Allocates fixed bandwidth between point-to-point

connection of master and slave

– Master maintains link using reserved slots

– Master can support three simultaneous links

• Asynchronous connectionless (ACL)– Point-to-multipoint link between master and all slaves

– Only single ACL link can exist

Page 24: WPAN IEEE 802.15.4 (ZigBee)

Connection Setup

• Inquiry – scan (查询扫描)– Slave 设备周期地监听来自其他设备的查询消

息,以便自己能被发现 , 并在监听到后发送它的地址和时钟信息。

• Inquiry (查询消息)– Master 查找附近的蓝牙

设备,以便通过收集来自从节点响应查询消息中得到该节点的设备地址( 48b )和时钟

Page 25: WPAN IEEE 802.15.4 (ZigBee)

Connection Setup

Master

Active Slave

Parked Slave-Connected-Not in Pico

Standby

• Page (寻呼)– Master 通过在不同的跳频序列发送消息,来激活一个

从节点 , 并建立连接。调频序列由 slaver 的地址码计算出

• Page – scan (寻呼扫描)– Slaver 周期性地在扫描窗间隔时间内唤醒自己,并监听

自己的访问码, Slaver 节点每隔 1.28s 在这个扫描窗上根据寻呼跳频序列选择一个扫描频率

Page 26: WPAN IEEE 802.15.4 (ZigBee)

Bluetooth Packet Fields

• Access code – used for timing synchronization, offset compensation, paging, and inquiry

• Header – used to identify packet type and carry protocol control information

• Payload – contains user voice or data and payload header, if present

Page 27: WPAN IEEE 802.15.4 (ZigBee)

Frame Format of Bluetooth Packets

• The 48 bit address unique to every Bluetooth device is used as the seed to derive the sequence for hopping frequencies of the devices.

• Four types of access codes:– Type 1: identifies a “M” terminal and its piconet address– Type 2: identifies a “S” identity used to page a specific “S”.– Type 3: Fixed access code reserved for the inquiry process– Type 4: dedicated access code reserved to identify specific set of

devices such as fax machines, printers, or cell phones.• Header: 18 bits repeated 3 times with a 1/3 FEC code

bits

access code packet header payload72 54 0-2745 bits

S address type flow ARQN SEQN HEC3 4 1 1 1 8

preamble sync. (trailer)

4 64 (4)

Page 28: WPAN IEEE 802.15.4 (ZigBee)

WPAN: IEEE 802.15

• 802.15-2: Coexistence– Coexistence of Wireless Personal Area Networks (802.15) and

Wireless Local Area Networks (802.11), quantify the mutual interference

• 802.15-3: High-Rate– Standard for high-rate (20Mbit/s or greater) WPANs, while still

low-power/low-cost – Quality of Service isochronous protocol – Ad hoc peer-to-peer networking – Security – Low power consumption – Low cost – Designed to meet the demanding requirements of portable

consumer imaging and multimedia applications

Page 29: WPAN IEEE 802.15.4 (ZigBee)

ZigBee• ZigBee - a specification set of high level communication

protocols designed to use small, low power digital radios based on the IEEE 802.15.4 standard for wireless personal area networks (WPANs)

• This technology is designed to be simpler and cheaper than other WPANs (such as Bluetooth)

• ZigBee uses the IEEE 802.15.4 Low-Rate Wireless Personal Area Network (WPAN) standard to describe its lower protocol layers—the physical layer (PHY), and the medium access control (MAC) portion of the data link layer (DLL).

Page 30: WPAN IEEE 802.15.4 (ZigBee)

ZigBee Applications

ZigBeeLOW DATA-RATE RADIO DEVICES

HOME AUTOMATION

CONSUMER ELECTRONICS

TVVCRDVD/CDremote

securityHVAClightingclosures

PC & PERIPHERALS

TOYS & GAMES

consolesportables

educational

PERSONAL HEALTH CARE

INDUSTRIAL & COMMERCIAL

monitorssensors

automationcontrol

mousekeyboardjoystick

monitorsdiagnostics

sensors

Reference from ZigBee Alliance Inc.

Page 31: WPAN IEEE 802.15.4 (ZigBee)

Development of the Standard

• ZigBee Alliance

– 50+ companies

– Defining upper layers of protocol stack: from network to application, including application profiles

• IEEE 802.15.4 Working Group

– Defining lower layers : MAC and PHY

SILICON

ZIGBEE STACK

APPLICATION Customer

IEEE802.15.4

ZigBee Alliance

Page 32: WPAN IEEE 802.15.4 (ZigBee)

IEEE 802.15.4 Overview

• Wireless Personal Area Networks (WPANs)Wireless Personal Area Networks (WPANs)

– short distance

– small (ultra low complexity)

– low duty-cycle (<0.1%)

– power efficient (the most important factor)(the most important factor)

– inexpensive (ultra low cost) solutions.

• Typically operating in the Personal Operating Space (POS)Personal Operating Space (POS) of 10 meters10 meters.

• Supporting starstar and peer-to-peerpeer-to-peer topologies

– controlled by the PAN coordinatorPAN coordinator

Page 33: WPAN IEEE 802.15.4 (ZigBee)

IEEE 802.15.4 standard• Includes layers up to and including Link Layer Control

– LLC is standardized in 802.1• Supports multiple network topologies including Star,

Cluster Tree and Mesh• Channel scan for beacon is included, but it is left to the

network layer to implement dynamic channel selection

IEEE 802.15.4 MAC

IEEE 802.15.4 LLC IEEE 802.2LLC, Type I

IEEE 802.15.42400 MHz PHY

IEEE 802.15.4868/915 MHz PHY

Data Link Controller (DLC)

Networking App Layer (NWK)

ZigBee Application Framework• Low complexity:

26 service primitives

versus 131 service primitives for 802.15.1 (Bluetooth)

Page 34: WPAN IEEE 802.15.4 (ZigBee)

IEEE 802.15.4 Features• Media access is contention based.

– Using carrier sense multiple access with collision avoidance carrier sense multiple access with collision avoidance (CSMA/CA)(CSMA/CA) MAC protocol

– Similar to IEEE 802.11 CSMA/CA protocol, but not the same

• Provide the optional Superframe structureSuperframe structure

– The PAN coordinator periodically allocates guaranteed time guaranteed time slotsslots (GTS)(GTS) to low latency devices

• Dynamic device addressing

– Two kinds of address of a device– 16-bit Short Address16-bit Short Address– 64-bit Extended Address64-bit Extended Address

• Fully acknowledged protocolFully acknowledged protocol for transfer reliability.

Page 35: WPAN IEEE 802.15.4 (ZigBee)

Device Classes• There are two different device types :

– A full function device (FFD)A full function device (FFD)– A reduced function device (RFD)A reduced function device (RFD)

• The FFD can operate in three modes serving– DeviceDevice– CoordinatorCoordinator– PAN coordinatorPAN coordinator

• The RFD can only operate in a mode serving:– DeviceDevice

• Coordinator provides Coordinator provides synchronization informationsynchronization information to other to other devicesdevices

Page 36: WPAN IEEE 802.15.4 (ZigBee)

FFD vs RFD

• Full function device (FFD)– AnyAny topology– Network coordinator capable– Talks to any other device

• Reduced function device (RFD)– Limited to starstar topology– Cannot become a network coordinator– Talks only to a network coordinator– Very simple implementation

Page 37: WPAN IEEE 802.15.4 (ZigBee)

Network Topologies • Star and Peer2Peer TopologiesStar and Peer2Peer Topologies

Page 38: WPAN IEEE 802.15.4 (ZigBee)

Network Topologies

• Star network Star network formationformation:– An FFD may establish its own network and become the PAN

coordinator.– All star networks operate independently.– Choosing a PAN identifier, which is not currently used by any

other network within the radio sphere of influence.– Both FFDs and RFDs may join the network.

• Peer-to-peer network Peer-to-peer network formationformation:– Each device is capable of communicating with any other

device.– One FFD device will be nominated as the PAN coordinator.

Page 39: WPAN IEEE 802.15.4 (ZigBee)

Star Topology • Home ApplicationHome Application

FFDRFD

RFD

RFD

FFD

FFD

RFD

FFDRFD

RFD

RFD

FFD

FFD

RFD

PAN coordinatorPAN coordinator

Page 40: WPAN IEEE 802.15.4 (ZigBee)

Cluster Tree Topology • Only one PAN coordinator• No detail yet

PAN coordinatorPAN coordinator

Cluster HeadCluster Head

Page 41: WPAN IEEE 802.15.4 (ZigBee)

Cluster Tree Establishment • The PAN coordinatorPAN coordinator forms the first cluster by establishing itself

as the cluster head (CLH)cluster head (CLH) with a cluster identifier (CID) of zerocluster identifier (CID) of zero.• Choosing an unused PAN identifierunused PAN identifier (PANID)(PANID) and broadcasting broadcasting

beaconbeacon frames frames to neighboring devices.• A candidate device receiving a beacon frame may request to join

the network at the CLH.• If the PAN coordinator permits the device, it will add the new

device as a child device in its Access Control List (ACL).• The newly joined device will add the CLH as its parent in its ACL,

and begin transmitting periodic beacons.• Other candidate devices may then join the network at that

device. A larger network (PAN) is possible by forming a mesh of multiple neighboring clusters.

• The PAN coordinator may instruct a device to become the CLH of a new cluster adjacent to the first one.

• Other devices gradually connect and form a multi-cluster network structure.

Page 42: WPAN IEEE 802.15.4 (ZigBee)

Addressing Methods• Two or more devices with a POS communicating on the same

physical channel constitute a WPAN which includes at least at least one FFD (PAN coordinator)one FFD (PAN coordinator)

• Each independent PAN will select a unique PAN identifier unique PAN identifier

• All devices operating on a network shall have unique 64-bit 64-bit extended addressextended address. This address can be used for direct communication in the PAN

• The address can use a 16-bit short address16-bit short address, which is allocated by the PAN coordinator when the device associatesassociates

• Addressing modes:– Network + device identifier (star)

– Source/destination identifier (peer-peer)

– Source/destination cluster tree + device identifier (cluster tree)

Page 43: WPAN IEEE 802.15.4 (ZigBee)

MAC/PHY Functions• Functions in PHY sublayer

– activation and deactivation of the radio transceiveractivation and deactivation of the radio transceiver– energy detectionenergy detection– link quality indicationlink quality indication– clear channel assessment clear channel assessment (CCA) - carrier sense(CCA) - carrier sense– transmitting/receiving bit streamtransmitting/receiving bit stream

• Functions in MAC sublayer– beacon managementbeacon management– channel access channel access (slotted or unslotted CSMA/CA)(slotted or unslotted CSMA/CA)– guarantee time slot management guarantee time slot management (QoS)(QoS)– frame validation frame validation – acknowledged frame deliveryacknowledged frame delivery– associationassociation– disassociationdisassociation– security mechanisms security mechanisms (AES)(AES)

Page 44: WPAN IEEE 802.15.4 (ZigBee)

PHY Specifications• The standard specifies twotwo PHYs :

– 868 MHz/915 MHz868 MHz/915 MHz direct sequence spread spectrum (DSSS) PHY (11 channels)(11 channels)

• 11 channel (20Kb/s)(20Kb/s) in European 868MHz band

• 1010 channels (40Kb/s) inin 915 (902-928)MHz ISM band

– 2450 MHz2450 MHz direct sequence spread spectrum (DSSS) PHY (16 channels)(16 channels)

• 1616 channels (250Kb/s)(250Kb/s) in 2.4GHz band

Page 45: WPAN IEEE 802.15.4 (ZigBee)

PHY Specification

• PHY functionalities:PHY functionalities:– Activation and deactivation of the radio transceiverActivation and deactivation of the radio transceiver– Energy detection within the current channelEnergy detection within the current channel– Link quality indication for received packetsLink quality indication for received packets– Clear channel assessment for CSMA-CAClear channel assessment for CSMA-CA– Channel frequency selectionChannel frequency selection– Data transmission and receptionData transmission and reception

Page 46: WPAN IEEE 802.15.4 (ZigBee)

PHY Specification

Page 47: WPAN IEEE 802.15.4 (ZigBee)

Operating Frequency Range

• A total of 27 channels, numbered 0 to 26, are available across the three frequency bands.

• 16 channels are for 2450 MHz, 10 are for 915 MHz an 1 is for 868 MHz.

BANDBAND COVERAGE COVERAGE DATA RATE DATA RATE CHANNEL(S) CHANNEL(S)

2.4 GHz ISM Worldwide 250 kbps 16

868 MHz Europe 20 kbps 1

915 MHz ISM Americas 40 kbps 10

Page 48: WPAN IEEE 802.15.4 (ZigBee)

PHY Parameters• Transmit Power

– Capable of at least 1 mW 1 mW – Power reduction capabilityPower reduction capability required if > 16 dBm

(reduce to < 4 dBm in single step)

• Transmit Center Frequency Tolerance 40 ppm

• Receiver Sensitivity– -85dBm (2450 MHz)– -92dBm (868/915 MHz)– 1% Packet Error Rate in PSDU = 20 Bytes)

• RSSI Measurements– Packet strength indication– Clear channel assessment – Dynamic channel selection

Page 49: WPAN IEEE 802.15.4 (ZigBee)

PHY PDU Format (PPDU)• PHY Packet Fields

– A synchronization headerA synchronization header• Preamble (32 bits)Preamble (32 bits) – 32 binary zeros used for synchronization• Start of Packet Delimiter (8 bits)Start of Packet Delimiter (8 bits) – 10100111

– A PHY headerA PHY header

• PHY Header (8 bits)PHY Header (8 bits) – 7-bit frame length (0-127) and 1-bit reserved

– A payloadA payload

• PSDU (0 to 127 bytes)PSDU (0 to 127 bytes) – Data field

PreambleStart ofPacket

Delimiter

PHYHeader

PHY ServiceData Unit (PSDU)

6 Bytes 0-127 Bytes

4 Bytes 1 Byte 1 Byte

Page 50: WPAN IEEE 802.15.4 (ZigBee)

MAC Options• Two channel access mechanisms

– Non-beacon network• Standard CSMA-CA communications + ACK• Non-beacon mode is useful in situations where only light

traffic is expected– Beacon-enabled network

• Superframe structure– Set up by network coordinator to transmit beacons at

predetermined intervals– 15ms to 252sec, slotted CSMA-CA

– In general, the ZigBee protocols minimize the time the radio is on, so as to reduce power use.

• In beaconing networks, nodes only need to be active while a beacon is being transmitted.

• In non-beacon-enabled networks, power consumption is decidedly asymmetrical: some devices are always active, while others spend most of their time sleeping.

Page 51: WPAN IEEE 802.15.4 (ZigBee)

Example of Non-Beacon Net• Commercial or home security

– Client units (intrusion sensors, motion detectors, glass break detectors, standing water sensors, loud sound detectors, etc)

• Sleep 99.999% of the time• Wake up on a regular yet random basis to announce their

continued presence in the network (“12 o’clock and all’s well”)

• When an event occurs, the sensor wakes up instantly and transmits the alert (“Somebody’s on the front porch”)

– The ZigBee Coordinator, mains powered, has its receiver on all the time and so can wait to hear from each of these stations

• Since ZigBee Coordinator has “infinite” source of power it can allow clients to sleep for unlimited periods of time to allow them to save power

Page 52: WPAN IEEE 802.15.4 (ZigBee)

Example of Beacon Network• Now make the ZigBee Coordinator battery-operated

also– Client registration to the network

• Client unit when first powered up listens for the ZigBee Coordinator’s network beacon (interval between 0.015 and 252 seconds)

• Register with the coordinator and look for any messages directed to it

• Return to sleep, awaking on a schedule specified by the ZigBee Coordinator

– Once client communications are completed, ZigBee coordinator also returns to sleep

• Application examples: environmental sensors in the forest

Page 53: WPAN IEEE 802.15.4 (ZigBee)

数据到主协调器的通信顺序

• 从设备监听网络的信标• 从设备与超帧结构进行同步• 从设备使用有时隙的 CSMA-CA 向主协调器发送

数据帧• 当主协调器接收到该数据帧后,将返回确认帧

Beacon-enabled network

Page 54: WPAN IEEE 802.15.4 (ZigBee)

数据到主协调器的通信顺序

Non-Beacon-enabled network

Page 55: WPAN IEEE 802.15.4 (ZigBee)

主协调器发送数据

• 主协调器发送网络信标中表明存在有要传输的数据信息。

• 从设备从网络信标中发现存在有主协调器要发送给它的数据信息时,采用有时隙的 CSMA-CA 机制,发送一个数据请求命令。

• 主协调器收到数据请求命令后,返回一个确认帧,并采用有时隙的 CSMA-CA 机制,发送要传输的数据信息帧

• 从设备收到该数据帧后,将返回一个确认帧,表示该数据传输事务已处理完成

• 主协调器收到确认帧后,将数据信息从主协调器的信标未处理信息列表中删除

Beacon-enabled network

Page 56: WPAN IEEE 802.15.4 (ZigBee)

• 非信标网络中传输数据给从设备时,主协调器存储着要传输的数据,由从设备先发送请求数据传输命令后,才能进行数据传输

主协调器发送数据 Non-Beacon-enabled network

Page 57: WPAN IEEE 802.15.4 (ZigBee)

MAC Specifications

• Superframe Structure Superframe Structure – Optional (named as beacon-enabled network)

– The format of the superframe is define by the PAN coordinatorPAN coordinator

– Bounded by network beaconsBounded by network beacons and sent by the PAN coordinatorPAN coordinator

– Divided intoDivided into 1616 equally sized slots and beacon is transmitted in equally sized slots and beacon is transmitted in the first slotthe first slot

– It consists of two periods• Contention Access Period (CAP)Contention Access Period (CAP)• Contention Free Period (CFP)Contention Free Period (CFP)

– Objectives of the beacons• synchronizesynchronize• identify the PANidentify the PAN• describe the structure of the superframesdescribe the structure of the superframes

Page 58: WPAN IEEE 802.15.4 (ZigBee)

MAC Specifications• The superframe 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 PAN coordinator may allocate portions of the active superframe to some applications and these portions are called guaranteed time slots (GTSs).guaranteed time slots (GTSs).

• The GTSs comprise the contention free period (CFP). contention free period (CFP). • The PAN coordinator may allocate up to 77 GTSs at the same

time• A GTS may occupy more than one slot period• A sufficient portion of the CAP shall remain for contention.

Page 59: WPAN IEEE 802.15.4 (ZigBee)

MAC Specifications

• Any device wishing to communicate during the CAP between two beacons shall compete with other devices using a slotted CSMA-CAslotted CSMA-CA mechanism.

• All transactions shall be completed by the time of the next network beacon

• If the coordinator does not wish to use a superframe structure, it can turn off the beacon transmissions– named as non beacon-enabled network– Using Unslotted CSMA/CAUsing Unslotted CSMA/CA

Page 60: WPAN IEEE 802.15.4 (ZigBee)

Superframe Structure

• The structure of this superframe is described by the values of macBeaconOrder ((BOBO)) and macSuperframeOrder ((SOSO)).

– The macBeaconOrder describes the interval at which the coordinator shall transmit its beacon frames.

– The macSuperframeOrder describes the length of the active portion of the superframe, which includes the beacon frame.

Page 61: WPAN IEEE 802.15.4 (ZigBee)

Superframe Structure• The values of BOBO and the beacon interval (BIBI) are related as follows: BI BI = = aBaseSuperframeDuration aBaseSuperframeDuration 22BOBO symbols, if 0symbols, if 0BOBO14 14

• The values of SOSO and the superframe duration (SDSD) are related as follows:

SD = aBaseSuperframeDuration SD = aBaseSuperframeDuration 2 2SOSO symbols, if 0symbols, if 0SOSOBOBO1414

• Note : If BOBO = = 1515, , the coordinator will not transmit beacon and the value of SOSO shall be ignored. (non beacon-enable network) non beacon-enable network) Moreover, macRxOnWhenIdle defines whether the receiver is enabled during periods of transceiver inactivity (default : FALSE)

• If SO = 15SO = 15, the superframe will not be active after the beacon.

• PANs that wish to use the superframe structure shall set 00SOSOBOBO1414.

Page 62: WPAN IEEE 802.15.4 (ZigBee)

General Frame Format

Payload

PH

Y L

ayer

MA

C

Layer

MAC Header(MHR)

MAC Footer(MFR)

MAC Protocol Data Unit (MPDU)

MAC Service Data Unit(MSDU)

PHY Header(PHR)

Synch. Header(SHR)

PHY Service Data Unit (PSDU)

Page 63: WPAN IEEE 802.15.4 (ZigBee)

General MAC Frame Structure

• Four Types of Frames StructureFour Types of Frames Structure:

– Beacon FrameBeacon Frame - used by coordinator

– Data FrameData Frame - used for all transfers of data

– Acknowledgment FrameAcknowledgment Frame - used for confirming successful frame reception

– MAC CommandMAC Command Frame Frame - used for handling all MAC peer entity control transfers

Page 64: WPAN IEEE 802.15.4 (ZigBee)

Beacon Frame Format

Page 65: WPAN IEEE 802.15.4 (ZigBee)

Data Frame Format

Page 66: WPAN IEEE 802.15.4 (ZigBee)

Acknowledgement Frame Format

Page 67: WPAN IEEE 802.15.4 (ZigBee)

MAC Command Frame Format

Page 68: WPAN IEEE 802.15.4 (ZigBee)

CSMA/CA Mechanism• unslotted CSMA/CA:

– A device waits for a random periodrandom period without carrier sense.

– If the channel is idleidle, following the random backoff, it transmits its data. Otherwise, it waits for another random period before retry.

• slotted CSMA/CA:

– It is similar to the unslotted CSMA/CA but follows the backoffbackoff slot boundaryslot boundary.The backoff slots are aligned with the start of the beacon transmission.

Page 69: WPAN IEEE 802.15.4 (ZigBee)

CSMA/CA Mechanism• Frame Acknowledgment

– If the originator does not receive an ACK after some period. It will retry the frame transmission. If an ACK is still not received after several retries, the originator can choose either to terminate or to try again.

• Power Consumption Considerations– Battery powerd devices will require duty-cyclingduty-cycling to

reduce power consumption. These devices will spend most of their operational life in a sleep statesleep state. They shall periodically listen to the RF channel to determine whether a message is pending.

Page 70: WPAN IEEE 802.15.4 (ZigBee)

CSMA-CA Algorithm

• The LR-WPAN uses two types of channel access mechanism, depending on the network configuration.

1. Non beacon-enabled networks use an unslotted CSMA-CA channel access mechanism.

2. Beacon-enabled networks use a slotted CSMA-CA channel access mechanism.

In both cases, the algorithm is implemented using units of time called backoff periods, where one backoff period shall be equal to aUnitBackoffPeriod aUnitBackoffPeriod (=20)(=20) symbols.

Page 71: WPAN IEEE 802.15.4 (ZigBee)

CSMA-CA Algorithm• In slotted CSMA-CA, the backoff period boundaries shall be

aligned with the superframe slot boundaries – the start of the first backoff period of each device is aligned with the

start of the beacon transmission.

• In unslotted CSMA-CA, the backoff periods of one device are not related in time to the backoff periods of any other device in the PAN.

• The CSMA-CA algorithm shall not be used for the transmission of – beacon frames– acknowledgement frames– data frames transmitted in the CFP.

Page 72: WPAN IEEE 802.15.4 (ZigBee)

CSMA-CA Algorithm• Each device shall maintain three variables for each

transmission attempt: – NB NB (no. of backoff – also known as retry count) (4)– CW CW (contention window size, perform PHY CCA)– BE BE (backoff exponent)

• NB is the number of times the CSMA-CA algorithm was required to backoff while attempting the current transmission; this value shall be initialized to 0 before each new transmission attempt.

• CW is the contention window length, defining the number of backoff periods that need to be clear of channel activity before the transmission can commence; this value shall be initialized to 22 before each transmission attempt. The CW variable is only used for slotted CSMA-CA.

• BE is the backoff exponent which is related to how many backoff periods a device shall wait before attempting to assess a channel.

Page 73: WPAN IEEE 802.15.4 (ZigBee)

Flow Chart

Page 74: WPAN IEEE 802.15.4 (ZigBee)

Frame Transmission• If the source address (SA) field is not present, the originator of

the frame shall be assumed to be the PAN coordinator.• If the destination address (DA) field is not present, the recipient

of the frame shall be assumed to be the PAN coordinator.• If both SA and DA addresses are present, the MAC shall

compare the destination and source PAN identifiersdestination and source PAN identifiers– If the PAN identifiers are identical, the intra PAN subfield of the

frame control field shall be set to 1 and the source PAN identifier shall be omitted from the transmitted frame.

• Save bandwidth, only carry the destination PAN identifier

– If the PAN identifiers are different, the intra PAN subfield of the frame control field shall be set to 0 and both destination and source PAN identifier fields shall be included in the transmitted frame.

Page 75: WPAN IEEE 802.15.4 (ZigBee)

Frame reception and rejection1. The frame typeframe type subfield shall not contain an illegal frame type.

2. If the frame type indicates that the frame is a beacon framebeacon frame, the source PAN identifiersource PAN identifier shall match macPANIdmacPANId unless macPANId is equal to 0xffff0xffff,, in which case the beacon frame shall be accepted regardless of the source PAN identifier.

3. If a destination PAN identifierdestination PAN identifier is included in the frame, it shall match macPANIdmacPANId or shall be the broadcast PAN identifier broadcast PAN identifier (0xffff)(0xffff).

4. If a short DAshort DA is included in the frame, it shall match either macShortAddressmacShortAddress or the broadcast address (0xffff)broadcast address (0xffff). Otherwise, it shall match aExtendedAddressaExtendedAddress.

5. If only SA fieldsonly SA fields are included in a data or MAC command frame, the frame shall only be accepted if the device is a PAN coordinator and the source PAN identifier matches macPANIdmacPANId.

Page 76: WPAN IEEE 802.15.4 (ZigBee)

GTS allocation and management• Guaranteed time slot (GTS)Guaranteed time slot (GTS) allows a device to

operate on the channel without interferences. • A GTS only be allocated by the PAN coordinator and

is used for communications between PAN PAN coordinatorcoordinator and devicedevice.

• A data frame transmitted in an allocated GTS shall use only short addressshort address

• The PAN coordinator shall send all frames within a receive GTS with AR=1

• The PAN coordinator may allocate up to seven GTSs at the same time, provided there is sufficient capacity in the superframe.

Page 77: WPAN IEEE 802.15.4 (ZigBee)

GTS allocation and management• A single GTS occupies one or moreone or more superframe slots

• GTSs are allocated on a first-come-first-servedfirst-come-first-served basis and all GTSs shall be placed contiguouslycontiguously at the end of the superframe and after the CAP

• For each GTS, the PAN coordinator records – starting slot– length (in superframe slots) – direction– associated device address

• For each allocated GTS, the device records– starting slot– length– direction

Page 78: WPAN IEEE 802.15.4 (ZigBee)

ZigBee and Bluetooth

• ZigBee– Smaller packets over

large network– Mostly Static networks

with many, infrequently used devices

– Home automation, toys remote controls

– Energy saver!!!

• Bluetooth– Larger packets over small

network– Ad-hoc networks– File transfer; streaming – Cable replacement for items

like screen graphics, pictures, hands-free audio, Mobile phones, headsets, PDAs, etc.

Optimized for different applications

Page 79: WPAN IEEE 802.15.4 (ZigBee)

• Bluetooth and 802.15.4 transceiver physical characteristics are very similar

• Protocols are substantially different and designed for different purposes

• 802.15.4 designed for low to very low duty cycle static and dynamic environments with many active nodes

• Bluetooth designed for high QoS, variety of duty cycles, moderate data rates in fairly static simple networks with limited active nodes

ZigBee and Bluetooth

Page 80: WPAN IEEE 802.15.4 (ZigBee)

Summary

• 802.15.1• 802.15.4 (ZigBee)