The MAC Layer ZigBee and 802.15.4
2014
The ZigBee Alliance Solution
• Targeted at home and building automation and controls, consumer electronics, toys etc.
• Industry standard (IEEE 802.15.4 radios)
• Primary drivers are simplicity, long battery life, networking capabilities, reliability, and cost
• Short range and low data rate
The Wireless MarketS
HO
RT
<
R
AN
GE
>
L
ON
G
LOW < DATA RATE > HIGH
PAN
LAN
TEXT GRAPHICS INTERNET HI-FI AUDIO
STREAMINGVIDEO
DIGITALVIDEO
MULTI-CHANNELVIDEO
Bluetooth1
Bluetooth 2
ZigBee
802.11b
802.11a/HL2 & 802.11g
Applications
ZigBeeWireless Control that
Simply Works
RESIDENTIAL/LIGHT
COMMERCIAL CONTROL
CONSUMER ELECTRONICS
TVVCRDVD/CDremote
securityHVAClighting controlaccess controllawn & garden irrigation
PC & PERIPHERALS
INDUSTRIALCONTROL
asset mgtprocess control
environmentalenergy mgt
PERSONAL HEALTH CARE
BUILDING AUTOMATION
securityHVAC
AMRlighting control
access control
mousekeyboardjoystick
patient monitoring
fitness monitoring
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
IEEE 802.15.4 Basics• 802.15.4 is a simple packet data protocol:
– CSMA/CA - Carrier Sense Multiple Access with collision avoidance
– Optional time slotting and beacon structure– Three bands, 27 channels specified
• 2.4 GHz: 16 channels, 250 kbps• 868.3 MHz : 1 channel, 20 kbps• 902-928 MHz: 10 channels, 40 kbps
• Works well for:– Long battery life, selectable latency for
controllers, sensors, remote monitoring and portable electronics
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)
IEEE 802.15.4 Device Types• Three device types
– Network Coordinator• Maintains overall network knowledge; most
memory and computing power– Full Function Device
• Carries full 802.15.4 functionality and all features specified by the standard; ideal for a network router function
– Reduced Function Device• Carriers limited functionality; used for network
edge devices• All of these devices can be no more complicated
than the transceiver, a simple 8-bit MCU and a pair of AAA batteries!
ZigBee Topology Models
ZigBee coordinatorZigBee RoutersZigBee End Devices
Star
Star topology The communication is established between devices and a single central controller, called the PAN coordinator.
ZigBee Topology Models
ZigBee coordinator
ZigBee Routers
ZigBee End Devices
Mesh
Cluster Tree
Mesh 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.
Cluster-tree network is a special case of a Mesh network
IEEE 802.15.4 PHY
• Features– Activation/Deactivation of radio Transceiver– Energy Detection (ED)– Link Quality Indication (LQI)– Channel Selection– Clear Channel Assessment (CCA)– Transmission/Reception of packets over physical
medium
Channels in Zigbee and WiFi
Network Formation:To form a new network, the first node -- ZigBee Coordinator, scan through the list of available channels so that the network will operate on the channel with least interference.
WiFi Co-Channel Interference is a major threat to ZigBee
Measured Results
Measured RSSI on the primary outdoors 802.15.4 network as a function of transmissions on the competing WiFi network
Signal Strength Distribution
• Measurement at ZigBee nodes when the WiFi data rate varies
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
-60 -50 -40 -30 -20 -10 0 10
Cu
mu
lativ
e P
rob
ab
ility
Dis
trib
utio
n
RSSI (dBm)
clear1Mb5Mb
10Mb15Mb22Mb
Bit-error distribution for ZigBee
• Bit-error distribution for 15.4 packets that failed the CRC check when the interfering 802.11 transmitter is in the symmetric region.
• Bit-error distribution for 15.4 packets that failed the CRC check when the interfering 802.11g transmitter is in the asymmetric region
Symmetric Region
• Packet corrupted at front
• Three techniques examined– Decrease correlation threshold
• Reduce the constrain
– Increase preamble length• Higher change to have valid preamble
– Multi-header
Asymmetric Region
• Forward error correction (FEC)– Apply error-correction code (ECC)
• Two ECCs– Hamming code
• Adding extra parity bits
• Can detect up to two bit errors and correct one bit error
– Reed-Solomon Code• Block-based error-correction code
• Divided message into x blocks of data and y blocks of parity
Frame cluster per 5s
Frame cluster per 1s
Frame cluster per 0.2s
Self-similarity of 802.11 frame cluster arrival process
21
White Space in Real-life WiFi Traffic
• Large amount of channel idle time
• WiFi frames are clusteredwhite space: cluster gaps that can be utilized by ZigBee
Basic Idea of WISE
• Sender splits ZigBee frame into sub-frames• Fill the white space with sub-frames• Receiver assembles sub-frames into frame
ZigBee
Time
WiFi frame cluster ZigBee sub-frames
ZigBee frame pending
sampling window
Channel Diversity
PRR over a duration of one hour for different channels on an IQ link.
at any given point of time, it is highly likely that at least one channel is operating in the good phase
Engineer” temporal white-spaces between WiFi transmissions
Sending WiFi compliant signals to refrain WiFi stations from transmitting
MAC Options• Two channel access mechanisms
– Non-beacon network• Standard CSMA-CA communications + ACK• Non-beacon mode is useful in situations where only light t
raffic 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.
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 co
ntinued presence in the network (“12 o’clock and all’s well”)• When an event occurs, the sensor wakes up instantly and tra
nsmits 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
Example of Beacon Network• Now make the ZigBee Coordinator battery-operated al
so– 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
数据到主协调器的通信顺序
• 从设备监听网络的信标• 从设备与超帧结构进行同步• 从设备使用有时隙的 CSMA-CA 向主协调器发送
数据帧• 当主协调器接收到该数据帧后,将返回确认帧
Beacon-enabled network
数据到主协调器的通信顺序
Non-Beacon-enabled network
主协调器发送数据
• 主协调器发送网络信标中表明存在有要传输的数据信息。
• 从设备从网络信标中发现存在有主协调器要发送给它的数据信息时,采用有时隙的 CSMA-CA 机制,发送一个数据请求命令。
• 主协调器收到数据请求命令后,返回一个确认帧,并采用有时隙的 CSMA-CA 机制,发送要传输的数据信息帧
• 从设备收到该数据帧后,将返回一个确认帧,表示该数据传输事务已处理完成
• 主协调器收到确认帧后,将数据信息从主协调器的信标未处理信息列表中删除
Beacon-enabled network
• 非信标网络中传输数据给从设备时,主协调器存储着要传输的数据,由从设备先发送请求数据传输命令后,才能进行数据传输
主协调器发送数据 Non-Beacon-enabled network
Beacon-enabled network
• 时间划分成等间隔的周期,该周期由协调点发送的信标帧 (Beacon) 界定,通常由激活期和非激活期两部分构成。
• 所有节点在激活期进行业务的交互,在非激活期则转为低功耗模式。
• 如果节点有对实时业务的需求,可向网络协调点申请预留时隙 GTS( 保护时隙 ) ,形成免竞争期
激活期
第一个时隙传输信标
竞争期 免竞争期
Beacon-enabled network
• 当普通节点有数据发给协调点时,首先侦听网络信标,接收到信标帧后完成与协调点的同步
• 而后在 CAP 中采用时隙 CSMA/CA 发送数据帧• 协调点成功接收到该帧后回复相应的应答。
激活期 (或竞争期 )
第一个时隙传输信标
Beacon-enabled network
• 如果协调点有数据要发给普通节点,在信标帧中指出有将要发给某节点的的地址( pending address field )中。
• 普通节点周期性侦听网络信标,收到信标帧后,若发现信标帧的地址列表中有自身地址,则将采用时隙 CSMA/CA 机制向协调点发送数据请求命令帧,协调点给予应答。
激活期
Beacon Frame format
• Client devices wake up only when the beacon is broadcast, listen for their address, and if not heard, return to sleep
• Beacons keep all of the nodes synchronized • nodes need not listen all the time; save battery energy
ZigBee and Bluetooth
• ZigBee– Smaller packets over la
rge network– Mostly Static networks
with many, infrequently used devices
– Home automation, toys remote controls
– Energy saver!!!
• Bluetooth– Larger packets over small n
etwork– 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
Air interfaceZigBee• DSSS-11 chips/ symbol• 62.5 K symbols/s • 4 Bits/ symbol• Peak Information Rate
~128 Kbit/second
Bluetooth• FHSS• 1 M Symbol / s• Peak Information Rate ~720 Kbit / second
ZigBee and Bluetooth
Silicon
PHY Layer
MAC LayerMAC Layer
Data Link Layer
Network Layer
ZigBeeStack
Application
Application Interface
Application
Protocol Stack Comparison
Silicon
RFBaseband
Link Controller
Vo
ice
Link Manager
Host Control Interface
L2CAP
TelephonyControlProtocol
Inte
rco
m
Hea
dse
t
Co
rdle
ss
Gro
up
Cal
l
RFCOMM(Serial Port)
OBEX
BluetoothStack
Applications
vCar
d
vCal
vNo
te
vMes
sag
e
Dia
l-u
pN
etw
ork
ing
Fax ServiceDiscoveryProtocol
User Interface
Zigbee Bluetooth
ZigBee and Bluetooth
Bluetooth:• Network join time = >3s• Sleeping slave changing to active = 3s typically• Active slave channel access time = 2ms typically
ZigBee:• Network join time = 30ms typically • Sleeping slave changing to active = 15ms typically• Active slave channel access time = 15ms typically
Timing Considerations
ZigBee protocol is optimized for timing critical applications
ZigBee and Bluetooth
Conclusion
• 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
Conclusion• ZigBee targets applications not addressable by Blu
etooth or any other wireless standard
• ZigBee and Bluetooth complement for a broader solution
ZigBee and Bluetooth