Você está na página 1de 28

Parte II

Tecnologias dos sistemas de


comunicação em ambiente industrial

5. ZigBee

Bruno Marques,
Ph.D in Electrical and Computer Engineering

Dep. Engenharia Electrotécnica


bmarq@estv.ipv.pt
Campus Politécnico de Repeses
3504 - 510 Viseu
http://www.estv.ipv.pt/paginaspessoais/bmarq/
Portugal

T +351 232 480 500


F +351 232 424 651
Comunicações em Sistemas Industriais
www.elect.estv.ipv.pt
Mestrado em Engenharia Electrotécnica –
© DEE/ESTGV
novembro de 19 Energia e Automação Industrial

Introduction
What is ZigBee?
–Specification of protocols for small, low-power radios
History
•May 2003: IEEE 802.15.4 completed
•December 2004: ZigBee specification ratified
•June 2005: public availability
ZigBee-Alliance
•Companies developing and promoting the standard
•150+ members

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 2

1
ZigBee Alliance - Members

and many more....

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 3

Why do we need another WPAN standard?

Decreasing
•Power consumption
–ZigBee: 10mA <==> BT: 100mA

•Production costs

–In the beginning of 2005


–ZigBee: 1.1 $ <==> BT: 3 $

•Development costs

–Codesize ZB/codesize BT = ½

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 4

2
Why do we need another WPAN standard?

picture taken from [9]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 5

Why do we need another WPAN standard?

Increasing
•Sensitivity
–ZigBee: -92dbm(0,63pW) <==> BT: -82dbm(6,2pW)
•flexibility
–No. of supported nodes
–ZigBee: 65536 (in a mesh) <==> BT: 7 (in a star)
•Security
–ZigBee: AES (128bit) <==> BT: SAFER (64/128bit)
•Latency requirements
–ZigBee: optional guaranteed time slot
•Range
–ZigBee: up to 75 m in LOS condition <==> BT: 10 m

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 6

3
Usage Scenarios

•Industrial & commercial

•Consumer electronics

•Toys & games

•PC & peripherals

•Personal health care

•home/building automation

 Just everything you can imagine for wireless sensor nodes or in general
short range communications

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 7

IEEE 802.15.4 Frequency Bands

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 8

4
Protocol Stack

picture taken from


[10]
Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 9

Architecture

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 10

10

5
ZigBee Node-Types

ZigBee Coordinator (ZBC) (IEEE 802.15.4 FFD)

•only one in a network

•initiates network

•stores information about the network

•all devices communicate with the ZBC

•routing functionality

•bridge to other networks

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 11

11

ZigBee Node-Types

ZigBee Router (ZBR) (IEEE 802.15.4 FFD)

•optional component

•routes between nodes

•extends network coverage

•manages local address allocation/de-allocation

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 12

12

6
ZigBee Node-Types

ZigBee End Device (ZBE) (IEEE 802.15.4 RFD)

•optimized for low power consumption

•cheapest device type

•communicates only with the coordinator

•sensor would be deployed here

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 13

13

Addressing/Discovering ZigBee Nodes

Addressing ZigBee Nodes:


•optimized unique 64 bit address (IEEE 802.15.4)
•16 bit network address (65536 devices)
•256 sub addresses for subunits

Device Discovery
•unicast (NWK id known), broadcast (NWK id unknown)
•ZBC/ZBR-Response:
•IEEE address + NWK address + all known network addresses

Binding
•creating logical links between 2 or more end devices

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 14

14

7
Addressing/Binding ZigBee Endpoints

picture taken from [11]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 15

15

Traffic-Types

1. Data is periodic
•application dictates rate

2. Data is intermittent
•application or stimulus dictates rate (optimum power savings)

3. Data is repetitive (fixed rate a priori)


•device gets guaranteed time slot

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 16

16

8
Traffic-Modes

1. Beacon mode:

•beacon send periodically

•Coordinator and end device

can go to sleep

•Lowest energy consumption

•Precise timing needed

•Beacon period (ms-m)

picture taken from [1]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 17

17

Beacon-Mode

picture taken from [8]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 18

18

9
Traffic-Modes

1. Non-Beacon mode:

•coordinator/routers have to

stay awake (robust power

supply needed)

•heterogeneous network

•asymmetric power

picture taken from [1]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 19

19

Topologies - Tree

picture taken from [7]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 20

20

10
Topologies - Mesh

picture taken from [7]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 21

21

Implementation

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 22

22

11
PHY layer (IEEE 802.15.4)
2400MHz Band specs

•4 Bits per symbol


•DSSS with 32 Bit chips
•O-QPSK modulation
•Sine halfwave impulses Medium

Binary Data Bit Symbol


QPSK
to to
Mod.
Symbol Chip

picture taken from [4]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 23

23

PHY layer (IEEE 802.15.4)

868/915 MHz Band specs

•1 Bit per symbol


•Differential encoding
•DSSS with 15 Bit Chips
•BPSK modulation
•RC impulses (roll-off = 1)
Medium

Binary Data Bit


Diff. BPSK
to
Encoder Mod.
Chip

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 24

24

12
PHY layer (IEEE 802.15.4)
General specs and services

•Error Vector Magnitude (EVM) < 35%


•-3dBm minimum transmit power (500µW)
•Receiver Energy Detection (ED)
•Link Quality Indication (LQI)
•Use ED & LQI to reduce TX-power
•Clear Channel Assessment (CCA) with 3 modes
1.Energy above threshold
2.Carrier sense only
3.Carrier sense with energy above threshold

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 25

25

PHY layer (IEEE 802.15.4)

PHY Protocol Data Unit (PPDU) frame structure


•Frame to be sent via radio
•Preamble for chip and symbol synchronization
•Contains either data or data acknowledgement
•Packet size 8-127 Octets
•Contains MAC Protocol Data Unit (MPDU)

table taken from [1]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 26

26

13
MAC layer (IEEE 802.15.4)

Channel access specification

•Beacon/Nonbeacon
•Define Superframe structure
•Slotted/unslotted CSMA-CA

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 27

27

MAC layer (IEEE 802.15.4)

Managing PANs

•Channel scanning (ED, active, passive, orphan)


•PAN ID conflict detection and resolution
•Starting a PAN
•Sending beacons
•Device discovery
•Device association/disassociation
•Synchronization (beacon/non-beacon)
•Orphaned device realignment

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 28

28

14
MAC layer (IEEE 802.15.4)

Transfer handling
•Transaction based (indirect transmission)
–Beacon indication
–Polling
•Transmission, Reception, Rejection, Retransmission
–Acknowledged
–Not acknowledged
•GTS management
–Allocation/reallocation
–Usage
–Reallocation
•Promiscuous mode
Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 29

29

MAC layer (IEEE 802.15.4)

Frame security

•Provided security features •Available security suites

–Access control –AES-CTR

–Data encryption –AES-CCM

–Frame integrity –AES-CBC-MAC

–Sequential freshness
•Available security modes
–Unsecured mode
–ACL mode
–Secured mode

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 30

30

15
MAC layer (IEEE 802.15.4)

New nodes joining the Network

4
1
6
0
5
2
7
3

Problem: How do 6 and 7 talk to coordinator 0?

Solution: Routing (NWK Layer)

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 31

31

NWK layer (ZigBee)

Distributed address assignment

•Tree structure or self managed by higher layer


•16Bit network space divided among child routers
•Child routers divide their space again for their children
•Depends on:
–Maximum child count per parent (Cm)
–Maximum child-routers per parent (Rm)
–Maximum network depth (Lm)

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 32

32

16
NWK layer (ZigBee)

Distributed address assignment - Example

•Cm=2 ; Rm=2 ; Lm=2

Depth in network d Offset Value


0 3
1 1
2 0

0
2
?

6 4

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 33

33

NWK layer (ZigBee)

Routing cost

•Metric to compare „goodness“ of routes


•Base: Link cost between 2 neighbors
•Path cost = sum of link costs along the path
•Link cost determination:
–Link quality indication from PHY
–Statistical measures

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 34

34

17
NWK layer (ZigBee)

Route discovery

•Find or update route between specific source and destination


•Started if no active route present in routing table
•Broadcast routing request (RREQ) packets
•Generates routing table entries for hops to source
•Endpoint router responds with Routing response (RREP) packet
•Routes generated for hops to destination
•Routing table entry generated in source device

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 35

35

NWK layer (ZigBee)

Route discovery

RREQ
RREP

1 2 3

5 2
1 4

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 36

36

18
NWK layer (ZigBee)

Routing
•Check if routing table entry exists
•Initiate route discovery if possible
•Hierarchical routing as fall-back
Route maintenance
•Track failed deliveries to neighbours
•Initiate route repair when threshold reached
•Careful with network load!
•In case of total connectivity loss:
–Orphaning procedure
–Re-association with network

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 37

37

ZigBee mesh networking example

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 38

38

19
ZigBee mesh networking example

The picture can't be display ed.

The picture can't be


display ed.

The picture can't be display ed.

The picture can't be


display ed.

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 39

39

ZigBee mesh networking example

27 Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 40

40

20
ZigBee mesh networking example

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 41

41

ZigBee mesh networking example

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 42

42

21
ZigBee mesh networking example

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 43

43

Application Level

picture taken from [11]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 44

44

22
Application Level

picture taken from


[11]
Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 45

45

Application Level

Application Support Sub-layer (APS):

•interface to NWK-layer (offers general set of functions)


•Data transmission, binding and security management

picture taken from [1]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 46

46

23
Application Level

picture taken from [11]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 47

47

Application Level

Application Framework:

•Specifies Data types


•Devices describe themselves by ZigBee descriptor:
–frequency band
–power description
–application flags
–application version
–serial number
–manufacturer
–...

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 48

48

24
Application Level

picture taken from [11]

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 49

49

Application Level
ZigBee defined Objects (ZDO):

•provides common function for applications


•Initializes APS, NWK-Layer and Security Service Specification
•offers services like device-discovery / service-discovery, binding and security
management
•assembles information about the network

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 50

50

25
Evaluation

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 51

51

Pros and Cons

Pros Cons

• Not many end devices available yet


•good extension of existing
• Single point of failure (centralized
standards architecture)
•supported by many companies
•low power consumption
•low cost
•easy implemented (Designer
concentrates on end
application)
•flexible network structure

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 52

52

26
ZigBee devices examples

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 53

53

ZigBee for Home Monitoring and Control

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 54

54

27
References

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 55

55

References
[1] ZigBee Specifications v1.0

[2] “Designing with 802.15.4 and ZigBee”, Presentation Slides, available on ZigBee.org

[3] “ZigBee Tutorial”, http://www.tutorial-reports.com/wireless/zigbee

[4] IEEE 802.15.4 Specification

[5] “Network Layer Overview”, Presentation Slides, Ian Marsden, Embedded Systems Show, Birmingham, October 12th, 2006,
064513r00ZB_MG_Network_Layer_Overview.pdf, available on ZigBee.org

[6] “Designing a ZigBee Network”, Presentation Slides, David Egan, Ember Corporation, ESS 2006, Birmingham,
064516r00ZG_MG_Network_Design.pdf, available on ZigBee.org

[7] “ZigBee Architecture Overview”, Presentation Slides, Oslo, Norway June 2005,
ZigBee_Architecture_and_Specifications_Overview.pdf, available on ZigBee.org

[8] “Low Power Consumption Features of the IEEE 802.15.4/ZigBee LR-WPAN Standard”,
http://www.cens.ucla.edu/sensys03/sensys03-callaway.pdf

[9] “ZigBee Home Automation Mobile from Pantech”, http://www.i4u.com/article2561.html

[10] “Basic Lecture - ZigBee” http://www.korwin.net/eng/infor/info_zb_01.asp

[11] “Introduction to the ZigBee Application Framework”, Presentation Slides, ZigBee Open House, San Jose, June 15th, 2006,
053340r06ZB_AFG-Overview-ZigBee-Open-House.pdf, available on ZigBee.org

Bruno F. Marques,
novembro de 19 Comunicações em Sistemas Industriais 56

56

28

Você também pode gostar