41
An Introduction to ZigBee Meng-Huan Wu 2011/03/28 Wireless and Broadband Networks Laboratory Department of CSIE National Taipei University of 1

An Introduction to ZigBee

  • Upload
    baby

  • View
    107

  • Download
    0

Embed Size (px)

DESCRIPTION

An Introduction to ZigBee. Meng-Huan Wu 2011/03/28 Wireless and Broadband Networks Laboratory Department of CSIE National Taipei University of Technology. outline. Introduction IEEE 802.15.4 ZigBee Stack Wireless Sensor Networks Conclusion References. - PowerPoint PPT Presentation

Citation preview

Page 1: An Introduction to  ZigBee

An Introduction to ZigBee

Meng-Huan Wu 2011/03/28

Wireless and Broadband Networks LaboratoryDepartment of CSIENational Taipei University of Technology

1

Page 2: An Introduction to  ZigBee

2

OUTLINEIntroductionIEEE 802.15.4ZigBee StackWireless Sensor NetworksConclusionReferences

Page 3: An Introduction to  ZigBee

3

何謂 ZigBee? ZigBee 一詞源於蜜蜂,蜜蜂透過 ZigZag(Z 字形 ) 舞蹈與同伴相互通信傳遞花與蜜的位置、方向、距離等訊息,因而藉此做為這短距無線通訊新技術的命名。 ZigBee 是一種短距離無線通訊標準,具有低成本、低耗電、低傳輸率、高可靠度及感應網路功能等特性,容易整合個人無線數位環境並應用於多樣的產品,其監控角色高於通訊功能。

Page 4: An Introduction to  ZigBee

4

History 1999 年

針對自動化應用需求的增加,低功耗、低成本以及多節點的無線網路技術概念 ZigBee 因應而生。 2000 年 12 月

IEEE 成立 IEEE 802.15.4 工作組,致力於開發一種可應用在固定、可攜或移動設備上的低成本、低功耗以及多節點的低速率無線連接技術。 2001 年 8 月

美國 Honeywell 等公司發起成立 ZigBee Alliance ,他們提出的 ZigBee 技術被確認納入為 IEEE 802.15.4 標準。 2003 年 5 月

IEEE 802.15.4 標準獲得通過。 2004 年 12 月

推出 ZigBee 技術規範 1.0 版本。 2006 年 12 月

開放 ZigBee v1.1 版本,又稱 ZigBee 2006 。 2008 年1月

開放 ZigBee v1.2 版本,又稱 ZigBee Pro 、 ZigBee 2007 。

Page 5: An Introduction to  ZigBee

5

Introduction 由 ZigBee Alliance 所制定。 特性:低成本、低功率、低傳輸率。

Page 6: An Introduction to  ZigBee

6

IEEE 802 Wireless Space

Bandwidth (Mbps)

ZigBee802.15.4 Bluetooth

802.15.1

802.15.3

WiFi802.11

802.22

802.20WiMax802.16

0.01 0.1 1 10 100 1000

WWAN

WMAN

WLAN

WPAN

Ran

ge

ZigBee standard uniquely fills a gap for low data rate applications

Page 7: An Introduction to  ZigBee

7

IEEE 802.15.4 IEEE 802.15 WPAN™ Task Group 4 (TG4) 制定了標準,主要對 Wireless Personal Area Network 及其他短距離無線通信所制定的標準。 針對 Low-Rate Wireless Personal Area Network 的 PHY

Layer 及 MAC Layer 做規範。 LR-WPAN 被使用傳送傳輸距離較短的區域網路,且

WPAN 的連接不需要基地台,所以可以被實現在不同類型的裝置。

Page 8: An Introduction to  ZigBee

8

IEEE 802.15.4 主要特性 網路拓撲

Star Peer-to-Peer

分配模式 Superframe Guaranteed time slot

低電能消耗 一對 AAA 電池可工作數年的時間

採用 CSMA/CA

Page 9: An Introduction to  ZigBee

9

IEEE 802.15.4 的網路拓撲 全功能裝置 (Full Function Device , FFD)

具有轉發、路由的能力,可以是一個 PAN Coordinator 。 簡化功能裝置 (Reduced Function Device , RFD)

只能與 FFD 發送、接收信號。

Page 10: An Introduction to  ZigBee

10

IEEE 802.15.4 PHY Layer

主要工作: 開啟 / 關閉無線傳輸接收裝置 目前通道偵測 接收封包的連接品質 CSMA/CA 的通道閒置評估 通道頻率選擇 資料的傳送與接收

Page 11: An Introduction to  ZigBee

11

IEEE 802.15.4 運作頻帶頻帶

(MHz)頻率範圍

(MHz)免費使用地區 通道數目 Bit

Rate(Kbps)

調變(DSSS)

868 868~868.6 歐洲 1 20 BPSK

915 902~928 美國 10 40 BPSK

2450 2400~2483.5 全球 16 250 O-QPSK

Page 12: An Introduction to  ZigBee

12

IEEE 802.15.4 MAC Layer 提供資訊服務和管理服務,負責信標 (Beacon) 管理、通道接取、保障時槽 (Guaranteed Time Slots, GTS) 管理、訊框驗證、回覆訊框傳輸及 Association 與

Disassociation 。 兩種傳輸模式

同步模式 (Beacon Mode) 。 非同步模式 (Non-Beacon Mode)

使用 CSMA/CA (Carrier Sense Multiple Access/Collision Avoidance) ,避免傳輸碰撞。 CSMA/CA 是在傳輸之前,會先檢查通道是否有資料傳輸,若通道無資料傳輸,自己先等一段隨機的時間,弱等一段隨機時間後,還是沒有人在使用,則開始進行資料傳輸動作,若是產生碰撞,則稍後重新再傳。

Page 13: An Introduction to  ZigBee

13

ZigBee 傳輸程序 (1/5) Coordinator to device

Slotted

coordinator NetworkDevice

Beacon

Data request

Acknowledgment

Data

Acknowledgment

Page 14: An Introduction to  ZigBee

14

ZigBee 傳輸程序 (2/5) Coordinator to device

Un-Slotted

coordinator NetworkDevice

Data request

Acknowledgment

Data

Acknowledgment

Page 15: An Introduction to  ZigBee

15

ZigBee 傳輸程序 (3/5) Device to coordinator

Slotted

coordinator NetworkDevice

Beacon

Data

Acknowledgment

Page 16: An Introduction to  ZigBee

16

ZigBee 傳輸程序 (4/5) Device to coordinator

Un-Slotted

coordinator NetworkDevice

Data

Acknowledgment

Page 17: An Introduction to  ZigBee

17

ZigBee 傳輸程序 (5/5) Coordinator to coordinator

Only Un-Slotted

coordinator

Data

Acknowledgment

coordinator

Page 18: An Introduction to  ZigBee

18

Superframe (1/2) CAP (Contention Access Period) CFP (Contention Free Period)

Page 19: An Introduction to  ZigBee

19

Superframe (2/2) Beacon 的功能是

啟動 superframe 與其他 device 同步 Coordinator告知 device 有資料要傳輸給他

Page 20: An Introduction to  ZigBee

20

Association Procedure當一個 device 要加入由一個 coordinator 形成的

PAN 時,會先掃描周遭有哪些 PAN ,決定其中一個加入,並且向 PAN的 coordinator association 的要求

Scanchannel

Wait for

response

coordinator NetworkDevice

Association req.ACK

BeaconData req.

ACK

Association req.ACK

Makedecision

Page 21: An Introduction to  ZigBee

21

IEEE 802.15.4 與 ZigBee 對應關係 (1/2)

ZigBee Device Type IEEE 802.15.4 Network IEEE 802.15.4 Device Type

Coordinator PAN Coordinator FFD

Router Coordinator FFD

End Device Device FFD or RFD

Page 22: An Introduction to  ZigBee

22

IEEE 802.15.4 與 ZigBee 對應關係 (2/2)

ZigBee Network Topology IEEE 802.15.4 Network TopologyStar StarTree Peer-to-Peer

Mesh Peer-to-Peer

Page 23: An Introduction to  ZigBee

23

ZigBee 網路拓樸 (1/3) Star Topology 星狀拓樸優點

容易同步化 低延遲 (one-hop)

缺點擴充難

Coordinator

End device

Page 24: An Introduction to  ZigBee

24

ZigBee 網路拓樸 (2/3) Tree Topology 樹狀拓樸優點

低路由成本允許多點跳曜 (multi-hop)

缺點延遲較長 (multi-hop)

Coordinator Router

End device

Page 25: An Introduction to  ZigBee

25

ZigBee 網路拓樸 (3/3) Mesh Topology

網狀拓樸優點

允許多點跳曜 (multi-hop) 網路形成較具彈性 低延遲

缺點 route discovery 成本過大

End device

Coordinator Router

Page 26: An Introduction to  ZigBee

26

Example

Page 27: An Introduction to  ZigBee

27

ZigBee Stack

Page 28: An Introduction to  ZigBee

28

Network Layer

Page 29: An Introduction to  ZigBee

29

Application Support Sublayer

Page 30: An Introduction to  ZigBee

30

Application Layer ZigBee 應用層包含應用支援子層 (Application Support,

APS) 、 ZigBee 裝置元件 (ZigBee device object, ZDO) 和製造商所定義的應用物件 (Application Objects) 。 APS 提供網路層與應用層之間的介面,維持物件之間的連結表 (Binding Table) ,並在連結的裝置之間傳遞訊息。 ZDO 負責建構上層應用所需的資訊、發出或回應連結的要求,發現同一個網路上的裝置與應用服務、以及在網路上的裝置之間建立安全的關係等。

Page 31: An Introduction to  ZigBee

31

AODV 路由演算法來源端廣播 RREQ(Route REQuest) 。中間節點將接收到的 RREQ ,更改 RREQ後,將 RREQ廣播出去直到達到目的端。到達目的端,目的端會發送 RREP(Route REPly) ,再依原路徑回傳至來源端。 RREQ message

<bcast_id, dest_ip, dest_seqno, src_seqno, hop_count>

Page 32: An Introduction to  ZigBee

32

Route Request (RREQ) broadcast flood

Source

Destination

AODV Route Discovery Initiation

Page 33: An Introduction to  ZigBee

33

Route Reply (RREP) propagation

Destination

Source

AODV Route Discovery Completion

Page 34: An Introduction to  ZigBee

34

安全性 採用 128 bit AES 加密方式 ZigBee 信用中心 (Trust Center)

由 Coordinator兼任。 對新加入網路的節點進行認證。三種密鑰: Master Key 、 Network Key 、 Link Key 。 Master Key :可長期利用的 Key ,通常在工廠出貨時就     已被設置。 Network Key :網路範圍內通用的 Key ,信用中心分配。 Link Key :特定的兩個設備間的 Key ,由信用中心分配。

Page 35: An Introduction to  ZigBee

Wireless Sensor Networks 選擇

35

消耗電力 (續航力 )

費用 ( 產品費用、設置費用 )

電波法的限制網路類型安全

數據傳輸速度信息的延遲時間

優 先等級

Page 36: An Introduction to  ZigBee

36

無線規格比較IEEE802.11b Bluetooth ZigBee

Power Profile Hours Days YearsComplexity Very Complex Complex Simple

Node/Master 32 7 65536Latency 3 seconds 10 seconds 30msRange 100m 10m 30m

Date Rate 11Mbps 1Mbps 250Kbps

Security

Authentication Service Set ID

(SSID)

64 bit, 128bit AES and

Application Layer user

defined

128 bit AES and Application Layer user

defined

Page 37: An Introduction to  ZigBee

37

Wireless Sensor Network利用裝備有感測器 (例如:溫溼度感測器、紅外線感測器、太陽能感測器…等 ) 的子節點 (終端機或路由器 ) 和連接到採集系統的父節點 (協調者 ) ,用

ZigBee 無線通訊網路協定來架設的應用裝置,協調者將來自主系統 (PC) 的命令利用 RF射頻傳送到裝有感測器的子節點,子節點再利用 RF射頻連線方式將感測值資料傳遞回協調者。

Page 38: An Introduction to  ZigBee

38

應用

Page 39: An Introduction to  ZigBee

39

Conclusion ZigBee 低成本、低功率、低傳輸率的特性使得常常被用來做 Wireless Sensor Network 。 應用

環境監控家庭自動化醫療設備控制 etc

Page 40: An Introduction to  ZigBee

40

References[1]Adis, Vojvodic, “An Paper on ZigBee,” in Computer  Communication and Distributed Systems on Chalmers

University of Technology, Sweden, EDA 390, May 2006.[2]C.J. Li, Y.F. Wang, and X.J. Guo, “The Application Research of Wireless Sensor Network Based on ZigBee,” in 2010 Second International Conference on MultiMedia and Information Technology, Vol. 2, pp. 89-92, Apr. 2010.[3]鄭立編著, ZigBee 開發手冊,台北:全華圖書股份有限公 司, 2008 。[4]陳柏皓,基於 UPnP 與 ZigBee 的家庭自動化系統設計與實 作,碩士論文,國立台北科技大學自動化科技研究所,台 北, 2008 。

Page 41: An Introduction to  ZigBee

41

Q&A