56
Wireless Sensor Networks Case Study: ZigBee & IEEE802.15.4 S.rou.2 Dr.M.Y.Wu@CSE Shanghai Jiaotong University Shanghai, China Dr.W.Shu@ECE University of New Mexico Albuquerque, NM, USA

Wireless Sensor Networks Case Study: ZigBee & IEEE802.15.4

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Wireless Sensor NetworksCase Study: ZigBee & IEEE802.15.4

S.rou.2

Dr.M.Y.Wu@CSEShanghai Jiaotong University

Shanghai, China

Dr.W.Shu@ECEUniversity of New Mexico

Albuquerque, NM, USA

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-2

ZigBee & 802.15.4

ZigBee overviewIEEE 802.15.4 overviewZigBee & bluetoothEnd

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-3

What is ZigBee?

Technology for cost-effective wireless networking solutions based on IEEE 802.15.4 Non-profit industry consortium

6 promoters: Honeywell, Invensys, Mitsubishi, Motorola, Philips, and Samsung> 100 participants

Mission statement:• To enable reliable, cost-effective, low-power, wirelessly

networked, monitoring and control products based on an open global standard.

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-4

ZigBee Solution

Targeted atHome/building automation & controlsConsumer electronics & PC peripheralsMedical monitoring & Toys

Design issuesLow-cost & long battery lifeSimplicity & reliabilityNetworking capabilityinteroperability

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-5

Where is ZigBee in wireless marketSH

OR

T

<

RA

NG

E>

LO

NG

LOW < DATA RATE > HIGH

PAN

LAN

TEXT GRAPHICS INTERNET HI-FI AUDIO

STREAMINGVIDEO

DIGITALVIDEO

MULTI-CHANNELVIDEO

Bluetooth1

Bluetooth 2ZigBee

802.11b

802.11a/HL2 & 802.11g

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-6

Where is ZigBee in wireless market

Range (meters)

WLAN

20-250kb/s

Bluetooth

Bluetooth 2

ZigBee

802.11

Data Rate

WPAN

WPAN

1 - 54 Mb/s 802.11b (Wi-Fi)

802.11g, 802.11a, HiperLAN

UWB/802.15.3a

1 Mb/s

>110 Mb/s

0 10010

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-7

ZigBee & 802.15.4 History

ZigBee

IEEE 802.15.4

1998 1999 2000 2001 2002

RSI/TRDProposals

Initial MRD v0.2

PAR

Proposalto IEEE

ProposalsStand.

CompleteReviews

ZigBee Allianceformed

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-8

ZigBee applications

ZigBeeWireless Control that

Simply Works

RESIDENTIAL/LIGHT

COMMERCIAL CONTROL

CONSUMER ELECTRONICS

TVVCRDVD/CDremote

securityHVAClighting controlaccess controllawn & garden irrigation

PC & PERIPHERALS

INDUSTRIALCONTROL

asset mgtprocess controlenvironmental

energy mgt

PERSONAL HEALTH CARE

BUILDING AUTOMATION

securityHVAC

AMRlighting control

access control

mousekeyboardjoystick

patient monitoring

fitness monitoring

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-9

Stack references: ZigBee & IP/UDP

IEEE 802.15.4 PHY

IEEE 802.15.4 MAC (CPS)

ZigBee NWK

MAC (SSCS)802.2 LLC

IP

API UDP

ZA1 ZA2 … ZAn IA1 IAn

Transmission & reception on the physical radio channel

Channel access, PAN maintenance, reliable data transport

Topology management, MAC management, routing, discovery

protocol, security management

Application interface designed usinggeneral profile

End developer applications, designed using application profiles

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-10

Protocol stack

Full protocol stack <32 k

Simple-node stack ~4k

Coordinators-noderequire extra RAMNode device databaseTransaction tablePairing tablePHY LAYER

2.4 GHz 915MHz 868 MHz

MAC LAYERMAC LAYER

NETWORK LAYERStar/Cluster/Mesh

APPLICATION INTERFACE

APPLICATIONS

SiliconApplication ZigBee Stack

Customer

IEEE802.15.4

ZigBee Alliance

SECURITY

8-bit microcontroller, a simple platform

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-11

Wireless communication patterns

One-to-one Simple wire replacementDirect connection between devices

One-to-manyCentralized control/routing

Wi-Fi, GSM, Bluetooth All data have to go through “base station”

Mesh + MultihopSelf configuration/healingFull RF redundancy with multiple data pathsFully distributed paradigm

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-12

• 64K network (client) nodes• Optimized for timing-critical

applications– Network join time:

~30 ms – Sleeping slave changing to

active: ~15 ms

– Active slave channel access time: ~15 ms

Network coordinatorFull Function nodeReduced Function node

Communications flowVirtual links

Node numbers and timings

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-13

ZigBee Topology Models

ZigBee coordinator

ZigBee Routers

ZigBee End Devices

Star

Cluster Tree

Mesh

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-14

ZigBee & 802.15.4

ZigBee overviewIEEE 802.15.4 overviewZigBee & bluetoothEnd

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-15

IEEE 802.15.4 Basics

A simple packet data protocol for lightweight wireless networksChannel Access

CSMA/CA: Carrier Sense Multiple Access with Collision Avoidance and optional time slotting

Message acknowledgement and an optional beacon structureReleased in May 2003, works well for

Long battery life, selectable latency for controllers, sensors, remote monitoring and portable electronics

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-16

Frequencies and data rates

1040 kbpsAmericasISM915 MHz

120 kbpsEurope868 MHz

16250 kbpsWorldwideISM2.4 GHz

Channel#DataRateCoverageCoverageFrequency

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-17

Frequencies and data rates

Choose to work in one of 27 channelsDepending on

AvailabilityCongestion stateData rate of each channel

250 kbps for computer peripherals, toys20-40 kbps for sensors, smart tags, consumer electronics

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-18

IEEE 802.15.4 & ZigBee stacks

Includes layers up to and including Link Layer ControlLLC is standardized in 802.1

Supports multiple network topologies including Star, Cluster Tree and MeshLow complexity:

14 PHY primitives 35 MAC primitives49 primitives total, versus 131 primitives in802.15.1 (Bluetooth) 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

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-19

IEEE 802.15.4 System Configuration

Motorola RF Packet Radio Motorola 8-bit MCU

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-20

IEEE 802.15.4 MAC

Employs 64-bit IEEE & 16-bit short addressesUltimate network size can reach 264 nodes Using local addressing, simple networks of 64K (216) nodes can be configured, with reduced address overhead

Device complexitya simple 8-bit MCU and a pair of AAA batteries!

CSMA-CA channel accessSimple frame structure, optional superframe structure with beaconsGTS mechanismRTS/CTS mechanism is dropped

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-21

IEEE 802.15.4 Device Types

Network Coordinator (a special FFD)Maintains overall network knowledge; most memory and computing power

Full Function Device (FFD)Full 802.15.4 functionality, all 49 primitivesAdditional memory, computing power make it ideal for a network router functionCould also be used in network edge devices (where the network touches the real world)

Reduced Function Device (RFD)Limited (as specified by the standard) functionality to control cost and complexity, 38 primitives @ min configurationGeneral usage will be in network edge devices

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-22

Device communication

Difference in their communication patternsAn FFD

Can talk toRFDSFFDs

Operate in three modesPAN coordinator, coordinator, device

An RFD Can talk to

An FFDOperate in the device mode

P2P communication cannot happen between two RFDs

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-23

Data transmission

Direct data transmissionUnslotted CSMA/CA

non-beacon-enabled modeSlotted CSMA/CA

beacon-enabled mode

Indirect data transmissionApplicable to data transfer from a coordinator to its devicesA device find out if it has a packet by checking the beacon

Guaranteed time slot (GTS) data transmissionApplicable to data transfer between coordinator & its devices

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-24

Power-saving mechanisms

Based on beacon-enabled modeIn direct data transmission

If the BatteryLifeExtension is TRUE, the receiver is disabled after macBattLifeExtPeriods backoff periods. So awake about 1/64 of the duration of a superframe.

In indirect data transmissionA device can enter a low power state (sleeping) after checking the beacon.

In GTS data transmissionHas a low duty cycle, but relative expensive in power

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-25

Self configuration

Association procedureSelect a channelSelect an ID for the PANDetermine whether to use beacon or non-beacon

If beacon, choose the beacon order & superframe orderAssign a 16-bit short address for a deviceSet BatteryLifeExtension option

OrphaningA device is considered orphaned if missed MaxLost-Beacons

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-26

MAC Channel Access

Non-beacon networkStandard ALOHA CSMA/CA communicationsPositive ACK for successfully received packets

Beacon-enabled networkSuperframe structure

For dedicated bandwidth up and low latencySetup by network coordinator to transmit beacons at predetermined intervals

15ms to 252s (15.38ms*2n where 0 ≤ n ≤ 14)16 equal-width time slots between beaconsChannel access in each time slot is contention free

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-27

Security & Robust

Three security levels specifiedNoneAccess control listsSymmetric key employing AES-128

802.15.4/ZigBee protocol is very robustClear channel checking before transmissionBackoff and retry if no ACK receivedDuty cycle of device is usually extremely low

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-28

Data Frame format

One of two most basic and important structures in 15.4Provides up to 104 byte data payload capacityData sequence numbering to ensure that all packets are trackedRobust frame structure improves reception in difficult conditionsFrame Check Sequence (FCS) ensures that packets received are without error

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-29

Acknowledgement Frame Format

The other most important structure for 15.4Provides active feedback from receiver to sender that packet was received without errorShort packet that takes advantage of standards-specified “quiet time”immediately after data packet transmission

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-30

MAC Command Frame format

Mechanism for remote control/configuration of client nodesAllows a centralized network manager to configure individual clients no matter how large the network

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-31

Beacon Frame (superframe) format

Beacons add a new level of functionality to a networkClient devices can wake up only when a beacon is to be broadcast, listen for their address, and if not heard, return to sleepBeacons are important for mesh and cluster tree networks to keep all of the nodes synchronized without requiring nodes to consume precious battery energy listening for long periods of time

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-32

Frequencies and Data Rates

The two PHY bands (UHF/Microwave) have different physical, protocol-based and geopolitical characteristics

Worldwide coverage available at 2.4GHz at 250kbps900MHz for Americas and some of the Pacific868MHz for European-specific markets

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-33

PHY Performance

802.15.4 has excellent performance in low SNR environments

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-34

Non-Beacon vs Beacon Modes

Non-Beacon ModeA simple, traditional multiple access system used in simple peer and near-peer networksThink of it like a two-way radio network, where each client is autonomous and can initiate a conversation at will, but could interfere with others unintentionallyHowever, the recipient may not hear the call or the channel might already be in use

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-35

Example of Non-Beacon Network

Commercial or home securityDevices

Sleep 99.999% of the timeWake 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 CoordinatorMains powered, has its receiver on all the time and so can wait to hear Can allow clients to sleep for unlimited periods of time to allow them to save power

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-36

Non-Beacon vs Beacon Modes

Beacon ModeA very powerful mechanism for controlling power consumption in extended networks like cluster tree or meshAllows all clients in a local piece of the network the ability to know when to communicate with each otherHere, the two-way radio network has a central dispatcher who manages the channel and arranges the calls

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-37

Example of Beacon Networkthe ZigBee Coordinator battery-operated also

All units in system are now battery-operatedClient 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 itReturn to sleep, awaking on a schedule specified by the ZigBee CoordinatorOnce client communications are completed, ZigBee coordinator also returns to sleep

This timing requirement potentially impacts the cost of the timing circuit in each end device

Longer intervals of sleep mean that the timer must be more accurate orTurn on earlier to make sure that the beacon is heard, increasing receiver power consumption, orImprove the quality of the timing oscillator circuit (increase cost) orControl the maximum period of time between beacons to not exceed 252 seconds, keeping oscillator circuit costs low

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-38

Growing the Network

In a beacon-environment, growing the network means keeping the overall network synchronizedAccording to pre-existing network rules, the joining network’s PAN Coordinator is probably demoted to Router, and passes along information about its network (as required) to the PAN coordinatorBeacon information passed from ZigBee Coordinator to now-Router, router knows now when to awake to hear network beacon

Demoted to router

New link established

Existing network’s

Coordinator

Joining Network

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-39

Reliability at different layers

PHY: Direct Sequence with Frequency Agility (DS/FA)

MAC: ARQ, Coordinator buffering

Network: Mesh Network (redundant routing)

Application Support Layer: Security

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-40

Reliability at PHY layer

Direct sequence: allows the radio to reject multipath and interference by use of a special “chip” sequence. The more chips per symbol, the higher its ability to reject multipath and interference.

Frequency Agility: ability to change frequencies to avoid interference from a known interferer or other signal source.

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-41

Direct Sequence and Frequency Agility

2.4 GHz

Channels 11-26

2.4835 GHz

5 MHz

2.4 GHz PHY

Over the Air After DS correlation

Interferer Desired Signal

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-42

Reliability at MAC layer

ARQ (acknowledgement request) is where a successful transmission is verified by replying with an acknowledge (ACK). If the ACK is not received the transmission is sent again

Coordinator buffering where the network coordinator buffers messages for sleeping nodes until they wake again

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-43

Reliability at network layer

Mesh Networking: allows various paths of routing data to the destination device. In this way if a device in the primary route is not able to passthe data, a different valid route is formed, transparent to the user.

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-44

Reliability: Mesh Networking

ZigBee End Device (RFD or FFD)

ZigBee Router (FFD)

ZigBee Coordinator (FFD)

Mesh Link

Star Link

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-45

ZigBee & 802.15.4

ZigBee overviewIEEE 802.15.4 overviewZigBee & bluetoothEnd

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-46

Why do we need both technologies?

Bluetooth wireless technologyWell focused towards voice applications and higher data rate applications (cell phones, headsets, etc.)

ZigBee technologyBest suited for control and monitoring applicationsL3: Low data rates, Low power, Low costsEase of use (remote controls, sensor nets, etc.)

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-47

Optimized for different applications

ZigBeeSmaller packets over large networkMostly Static networks with infrequently used devicesHome automation, toys, remote controls, etc.

BluetoothLarger packets over small networkAd-hoc networksFile transfer Screen graphics, pictures, hands-free audio, Mobile phones, headsets, PDAs, etc.

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-48

ZigBeeIs better for devices Where the battery is ‘rarely’replacedTargets are :

Tiny fraction of host powerNew opportunities where wireless not yet used

Address different needs

Bluetoothis a cable replacement for items like Phones, Laptop Computers, Headsetsexpects regular chargingTarget is to use <10% of host power

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-49

ZigBeeDSSS: 11 chips/ symbol62.5 K symbols/s 4 Bits/ symbolPeak Information Rate~128 Kbit/secondOQPSK with shappingProtocol level: 28Kb

BluetoothFHSS1 M Symbol / secondPeak Information Rate ~720 Kbit / secondProtocol level: 250KbFrequency hop makes it hard to create extended net w/o large syn cost

Use different air interface

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-50

ZigBeeVery low duty cycleStart & Mesh networks with up to 216 nodes Very long primary battery life applicationsAbility to remain quiescent for long periods of time without communicating to the network

Use different protocols

BluetoothModerate duty cycleQuasi-static star network with up to 7 client-nodes Used where either power is cycled or main-poweredWire replacement for consumer devices with

Moderate data ratesVery high QoSVery low, guaranteed latency

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-51

Silicon

PHY Layer

MAC LayerMAC Layer

Data Link Layer

Network Layer

ZigBeeStack Application

Application Interface

Application

Protocol Stack Comparison

Silicon

RFBaseband

Link Controller

Voic

e

Link ManagerHost Control Interface

L2CAP

TelephonyControlProtocol

Inte

rcom

Hea

dset

Cor

dles

sG

roup

Cal

l

RFCOMM(Serial Port)

OBEX

BluetoothStack Applications

vCar

dvC

alvN

ote

vMes

sage

Dia

l-up

Net

wor

king

Fax ServiceDiscoveryProtocol

User Interface

Zigbee Bluetooth

ZigBee and Bluetooth

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-52

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

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-53

ZigBee and Bluetooth

Bluetooth ZigBee

AIR INTERFACE FHSS DSSS

PROTOCOL STACK 250 kb 28 kb

BATTERY rechargeable non-rechargeable

DEVICES/NETWORK 8 255

LINK RATE 1 Mbps 250 kbps

RANGE ~10 meters (w/o pa) ~30

Comparison Overview

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-54

Li-Coin Cell Battery Life(Beacon Interval vs Heartrate vs Days)

0

100

200

300

400

500

600

700

800

9000.

015

0.03

1

0.06

2

0.12

3

0.24

6

0.49

2

0.98

4

1.96

9

3.93

7

7.87

5

15.7

49

31.4

98

62.9

96

125.

993

251.

986

Beacon Interval (sec)

Day

s

607286104124149179BT@72bps

Bluetooth 33 days (park mode @ 1.28s)

802.15.4/ZigBee superior at all beacon intervals greater than 0.246s

At beacon interval ~1s, 15.4/ZigBee battery life

nearly 136 days

At beacon interval ~60s, 15.4/ZigBee battery life

approx 750 days

802.15.4/ZigBee vs Bluetooth

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-55

Feature(s) IEEE 802.11b Bluetooth ZigBeePower Profile Hours Days YearsComplexity Very Complex Complex Simple

Nodes/Master 32 7 64000

Latency up to 3 secs up tp 10 secs 30ms

Range 100 m 10m 70m-300mExtendability Roaming possible No YESData Rate 11Mbps 1Mbps 250Kbps

SecurityAuthentication Service Set

ID (SSID)64 bit, 128 bit

128 bit AES and Application Layer user defined

Comparison of key features

@ by Dr.Shu@UNM & Dr.Wu@SJTU

S.rou.2-56

WPAN: IEEE 802.15.4

802.15.4a:Alternative PHY with lower data rate as extension to 802.15.4Properties: precise localization (< 1m precision), extremely low power consumption, longer rangeTwo PHY alternatives

UWB (Ultra Wideband): ultra short pulses, communication and localizationCSS (Chirp Spread Spectrum): communication only

802.15.4b:Extensions, corrections, and clarifications regarding 802.15.4Usage of new bands, more flexible security mechanisms

802.15.5: Mesh NetworkingPartial meshes, full meshesRange extension, more robustness, longer battery live