zigbee protocol stack

66
BITS Pilani K K Birla Goa Campus

Upload: sahil-arora

Post on 30-Oct-2014

43 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ZigBee Protocol Stack

BITS PilaniK K Birla Goa Campus

Page 2: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Page 3: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Page 4: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

WHAT IS ZIGBEE?

• Technological Standard Created for Control and Sensor Networks

• Based on the IEEE 802.15.4 Standard

• Created by the ZigBee Alliance

Page 5: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

SENSOR/CONTROL NETWORK REQUIREMENTS

• Large networks that can operate reliably for years without any intervention

• Very long battery life

• very low infrastructure cost and low complexity

• Device data rate and QoS needs are low

• Standardized protocols are necessary to allow multiple vendors to interoperate

3

Page 6: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

• Engineers feel Wi-Fi and Bluetooth may be unsuitable for certain applications.

• ZigBee-compliant radios may operate on one of three different radio bands: the 800 MHz, 900 MHz, or 2.4 GHz frequencies.

• Follows the internationally recognized radio standard for the MAC and PHY Layer.

Need For Zigbee

Page 7: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

WHY ZIGBEE?

• Reliable• Mesh networking• Low data-rate applications• Very long battery life• Secure• Scalable• Low cost• Global applicability

Page 8: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Low Data Rate Radio Devices

TV VCR DVD CD Remote

Mouse Keyboard Joystick Gamepad

Security HVAC Lighting Closures

PETs Gameboy

s Educational

Monitors Diagnostic

s Sensors

Industrial & Commercial

Consumer Electronics

Personal Healthcare

Monitors Sensor

s Automation Control

Toys & Games

Home Automation

PC Peripherals

TARGET MARKETS

Page 9: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Page 10: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Page 11: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZIGBEE VS BLUETOOTH

Page 12: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZIGBEE AND BLUETOOTH

Optimized for different applications

17

• ZigBee Smaller packets over large

network Mostly Static networks with

many, infrequently used devices

It is better where battery is ‘rarely’ replaced &wireless not yet used.

• Bluetooth Larger packets over small

network Ad-hoc networks File transfer Bluetooth is a cable

replacement for items like Phones, Laptop etc.

Page 13: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Zigbee vs WiFi vs Bluetooth ZigBee Wi-Fi Bluetooth

Range 10 – 100 m 50 – 100 m 10 – 100 m

Networking Topologies

Ad-hoc, mesh point to hub Ad-hoc – very small networks

Operating frequency

868 MHz (Europe) ; 900-928 MHz (NA) , 2.4 GHz (worldwide)

2.4 and 5 GHz 2.4 GHz

Complexity Low High High

Power consumption

very low (design goal)

High Moderate

Applications Industial control and monitoring, building automation, toys, games

Wireless LAN connectivity, broadband internet access

Wireless connectivity between devices.

Page 14: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Choosing the right wireless technology

Page 15: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

1. Power

WIFI ZIGBEE

VS

Page 16: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

2. BIT RATE

WIFI ZIGBEEVS

Page 17: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

3. Range

WIFI ZIGBEE

VS

Page 18: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

SYSTEM ARCHITECTURE

Page 19: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

WHAT IS ZIGBEE PROTOCOL?

• The IEEE 802.15.4 covers the physical layer and the MAC layer of low-rate WPAN.

• The ZigBee is “an emerging standard that is based on the IEEE 802.15.4 and adds network construction (star networks, peer-to-peer/mesh networks, and cluster-tree networks), application services, and more”.

Page 20: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

IEEE 802.15.4

• IEEE 802.15.4 is a standard defined by for low rate, wireless personal area network.

• The standard defines the Physical layer and Medium Access Layer.

Page 21: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Page 22: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZigBee Node-Types

ZigBee Coordinator (ZBC) (IEEE 802.15.4)

• only one in a network

• initiates network

• stores information about the network

• all devices communicate with the ZBC

• routing functionality

• bridge to other networks

Page 23: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZigBee Router (ZBR) (IEEE 802.15.4)

• optional component

• routes between nodes

• extends network coverage

• manages local address allocation/de-allocation

Page 24: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZigBee End Device (ZBE) (IEEE 802.15.4 )

• optimized for low power consumption

• cheapest device type

• communicates only with the coordinator

• sensor would be deployed here

Page 25: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZigBee Network Topologies

Star

Mesh

Cluster Tree PAN coordinator

Full Function Device

Reduced Function Device

Page 26: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Page 27: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZigBee Network Topologies

• Star Topology – Advantage

• Easy to synchronize• Low latency

– Disadvantage• Small scale

Page 28: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZigBee Network Topologies

• Mesh Topology– Advantage

• Robust multihop communication• Network is more flexible• Lower latency

– Disadvantage• Route discovery is costly• Needs storage for routing table

Page 29: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZigBee Network Topologies

• Cluster Tree– Advantage

• Low routing cost• Allow multihop communication

– Disadvantage• Route reconstruction is costly• Latency may be quite long

Page 30: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZIGBEE MESH NETWORKING

Page 31: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZIGBEE MESH NETWORKING

Page 32: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZIGBEE MESH NETWORKING

Page 33: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZIGBEE MESH NETWORKING

Page 34: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZIGBEE MESH NETWORKING

Page 35: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Radio Interface and Modulation

Page 36: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZigBee Frequency Bands

Page 37: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Quality of Service (QoS)

• High data throughput

• Low duty cycle

• ZigBee is ideal for home, business, and industrial automation where control devices and sensors are commonly used

• the battery life of ZigBee devices is very long

Page 38: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

PROTOCOL ARCHITECTURE

Page 39: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Page 40: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

picture taken from [11]

Page 41: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

PHYSICAL LAYER

• The 802.15.4 standard specifies two different services that the Physical Layer(PHY) provides.

• The PHY data service controls the radio, and thus, the transmission and reception of the PPDUs.

• The management service performs Energy Detection in the channel, Clear Channel Assesment before sending the messages and provides LQI for the received packets.

Page 42: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

IEEE 802.15.4 Physical Layer

• PHY functionalities:– Activation and deactivation of the radio

transceiver– Energy detection within the current channel– Link quality indication for received packets– Clear channel assessment for CSMA-CA– Channel frequency selection– Data transmission and reception

Page 43: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

IEEE 802.15.4 BANDS 868/868.6 MHz for Europe 902/928 MHz for North America 2400/2483.5 MHz worldwide

Binary Data

Page 44: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

PHY frame structure

• PHY packet fields– Preamble (32 bits) – synchronization – Start of packet delimiter (8 bits) – shall be

formatted as “11100101”– PHY header (8 bits) –PSDU length– PSDU (0 to 127 bytes) – data field

PreambleStart ofPacketDelimiter

PHY Header

PHY ServiceData Unit (PSDU)

4 Octets 0-127 Bytes

Sync Header PHY Payload

1 Octets 1 Octets

Frame Length(7 bit)

Reserve(1 bit)

Page 45: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

picture taken from [11]

Page 46: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

MAC LAYER

• Interface between the PHY layer and the higher layer protocols.

• Handles all access to physical radio channel and is responsible for:  Supporting PAN association and disassociationSupporting device securityHandling and maintaining the GTS mechanismProviding a reliable link between two peer MAC

entities

Page 47: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

IEEE 802.15.4 MAC Layer

• Device Classes– Full function device (FFD)

• Can function in any topology • Capable of being Network coordinator • Can talk to any other device (FFD/RFD)

– Reduced function device (RFD)• Limited to star topology• Cannot become network coordinator • Talks only to FFDs

• Address– All devices must have 64 bit IEEE addresses– Short (16 bit) addresses can be allocated to reduce

packet size

Page 48: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

MAC LAYER FRAME FORMATS• The IEEE 802.15.4 defines four frame types:

beacon, data, acknowledgment, and MAC command frame.

• All frame types are based on the general MAC frame format.

• The frame control field describes and specifies the above different frame types.

Page 49: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

DATA FRAME FORMAT

BEACON FRAME FORMAT

Page 50: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

COMMAND FRAME FORMAT

ACKNOWLEDGEMENT FRAME FORMAT

Page 51: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Transmission Mode

Page 52: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

picture taken from [11]

Page 53: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

NETWORK LAYER

• The ZigBee standard works on top of the IEEE 802.15.4 addressing schema by using the standard 64-bit and the short 16-bit addressing.

• Network layer responsibilities:

– Establishment of a new network.– New device configuration, addressing

assignment, network synchronization– Frames security– Message routing.

Page 54: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Page 55: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Application Layer

The application layer consists of

• APS (Application Support) sub-layer, • Application framework • Application objects, and • ZDO (ZigBee Device Object).

Page 56: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

SECURITY IN ZIGBEE

Page 57: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Security in Zigbee

• ZigBee security is based on 128-bit AES algorithm• Security services include methods for key

establishment, device management, & frame protection.

• ZigBee defines security for the MAC, NWK and APS layers

• Security for applications is provided through Application Profiles.

Page 58: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

ZigBee/IEEE 802.15.4

PHY868MHz / 915MHz / 2.4GHz

MAC

Application

NetworkStar / Mesh / Cluster-Tree

Security32- / 64- / 128-bit encryption

API

ZigBeeAlliance

IEEE 802.15.4

Customer

ZigBee Alliance -“the software” -Network, Security & Application layers -Brand managementIEEE 802.15.4

-“the hardware” -Physical & Media Access Control layers

Page 59: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Trust Center

ZigBee introduces the concept of the trust Center, which • Stores the keys for the network• Uses the security services to configure a device with

its key• Uses the security services to authorize a device

onto the network

The ZigBee Coordinator is usually designated the Trust Center

Page 60: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Security keys

Master keys• used as shared secret between two devices when

they perform the Key Establishment Procedure

Network keys• Perform Network Layer security on a ZigBee

network.

Link keys• Secure messages between two devices at the

Application Layer.

Page 61: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

CONCLUSION

• Zigbee applications are in diverse areas• Zigbee Alliance works as a non-profit

organization which has more than 200 members.

• IEEE 802.15.4 covers Physical Layer And Mac Layer.

• Zigbee adds network construction,application services, and more.

Page 62: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

PROS AND CONS

• Pros

good extension of existing standards

supported by many companies

low power consumption low cost easy implemented

(Designer concentrates on end application)

flexible network structure

Cons

Not many end devices available yet

Single point of failure (centralized architecture)

Page 63: ZigBee Protocol Stack
Page 64: ZigBee Protocol Stack
Page 65: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

Page 66: ZigBee Protocol Stack

BITS Pilani, K K Birla Goa Campus

IEEE 802.15.4 MAC Layer

• Traffic Type– Periodic data

• e.g. sensors

– Intermittent data• e.g. light switch

– Repetitive low latency data• e.g. mouse