Zigbee Mac Layer Concept (IEEE 802.15.4)

Lecture Notes: Zigbee MAC Layer (IEEE 802.15.4)

1. Introduction

Purpose: The Zigbee MAC layer (IEEE 802.15.4) manages transmission over a single link, focusing on channel access, data/management services, and network formation.
Key Topics:
Channel access mechanisms: Unslotted CSMA-CA, Slotted CSMA-CA, Guaranteed Time Slots (GTS).
Superframe structure in slotted (beacon-enabled) mode.
Network formation and management (association, disassociation, scans).

Figure 1. Zigbee Mac Layer [1].

2. Channel Access Mechanisms 

Unslotted (Non-Beacon Enabled) Mode:
  - Simple CSMA-CA: Nodes transmit anytime after checking channel idle status.
  - No time slots; actions can start at any instant.
  - Used in applications without strict timing requirements.

Slotted (Beacon-Enabled) Mode:
  - Time divided into fixed-duration slots (superframe).
  - Beacon frames synchronize nodes and define superframe boundaries.
  - Supports Contention Access Period (CAP) and Guaranteed Time Slots (GTS).

Guaranteed Time Slots (GTS):
  - Dedicated slots for low-latency or high-priority traffic.
  - Located in the Contention-Free Period (CFP) of the superframe.

Figure 2. GTS [1].

3. Superframe Structure 

Figure 3. Superframe Structure for Slotted Mode [1].

Components:
  - Beacon Interval (BI): Time between two consecutive beacons.
  - Superframe Duration (SD): Active portion of the BI (16 slots).
  - Inactive Period: Nodes can sleep to save energy.
Formulas:
  - SD = aBaseSuperframeDuration \times 2^{SO}

  - BI = aBaseSuperframeDuration \times 2^{BO}
  - \text{Duty Cycle} = \frac{SD}{BI} = \frac{2^{SO}}{2^{BO}} = 2^{SO - BO}

  • BI:Beacon Interval(信标间隔),即两个信标之间的时间

  • aBaseSuperframDuration:基础超级帧长度(通常为 960 symbols)

  • BO:Beacon Order,控制信标间隔的长短

  • 当 BO=SO 时,网络是持续活动的(non-beacon-enabled)

  • 当 BO>SO 时,会有非活动时段(inactive period)

  • 非活动时段长度: BI−SD

4. CSMA-CA Algorithm 

Figure 4. Specific Process of CSMA-CA [1].

Process:
  1. Initialize parameters:NB = 0,\quad BE = \text{macMinBE}. 

  • NB:Number of Backoffs,退避尝试次数,初始化为 0

  • BE:Backoff Exponent,退避指数,初始化为标准中给定的 macMinBE (通常为 3)

  • 这表示设备第一次尝试发送前的初始状态

  2. Delay for random backoff period (2^{BE} - 1).

  • 表示随机退避的最大槽数索引:设备将在区间 [0,\ 2^{BE} - 1] 内随机选择一个数作为退避时长(单位为 backoff slots)

  • BE 是当前的退避指数(Backoff Exponent)

  3. Perform Clear Channel Assessment (CCA).
  4. If idle, transmit; if busy, increment NB and BE, repeat until NB > \text{macMaxCSMABackoffs}.

  • 该过程在 NB > \text{macMaxCSMABackoffs} 时终止,表示达到最大重试次数,放弃传输

Slotted vs. Unslotted:
  - Slotted: Backoff aligns with slot boundaries.
  - Unslotted: No alignment required.

5. Data Transfer Modes

Figure 5. Star Topology Data Transfer [1].

Beacon-Enabled Mode:
  - To ZC: EDs use CAP or GTS to send data.
  - From ZC: Indirect transfer via beacon’s pending address list.

   

Figure 6. Data Transfer to / from ZC in Beacon-Enabled Mode [1].

Non-Beacon Mode:
  - EDs use unslotted CSMA-CA to send data.
  - ZC relies on ED polling for indirect transfers.

Figure 7. Data Transfer to / from ZC in Beacon-Enabled Mode [1].

Peer-to-Peer: Requires synchronization (e.g., periodic beacons).

The key issue is synchronisation

– To enable two adjacent nodes to communicate without using the ZC

– The receiver must be listening when the sender transmits

• Options (amongst others to advertise their availability to communicate)

– Devices may be permanently in receive mode

– Devices may broadcast periodic beacons

Figure 8. Data Transfer in Peer-to-Peer Mode [1].

6. Network Formation and Management

Association:
  - EDs join a network via active/passive scans.
  - ZC decides whether to accept the association request.

Figure 9. Association [1].

Disassociation:
  - Initiated by either device or coordinator due to poor link quality or node failure.

Figure 10. Disassociation [1].


Channel Scans:
  - Energy Detection: Measures RF energy.
  - Active Scan: Sends Beacon Request.
  - Passive Scan: Listens for beacons.
  - Orphan Scan: Reconnects orphaned devices.

Figure 11. Channel Scans [1].

7. MAC Primitives

Data Primitives:
  - `MCPS-DATA`: Handles data transmission.
  - `MCPS-PURGE`: Cancels pending transmissions.
Management Primitives:
  - `MLME-ASSOCIATE`: Manages network joining.
  - `MLME-SCAN`: Initiates channel scans.
  - `MLME-GTS`: Manages GTS allocation.

8. Transmission Scenarios

Success: Frame and ACK delivered.
Lost Message Frame (LMF): Frame not received; sender retries.
Lost ACK Frame (LAF): ACK not received; sender retries (same as LMF).

Figure 12. Transmission Scenarios [1].

9. Summary

Zigbee MAC supports two modes: beacon-enabled (complex, structured) and non-beacon (simple, flexible).
Key features: Superframes, CSMA-CA, GTS, and robust network management.
Applications: IoT, smart home, industrial automation (low-power, low-data-rate).

10. Abbreviations

CAP: Contention Access Period  
GTS: Guaranteed Time Slot  
ZC: Zigbee Coordinator  
ED: End Device  
SO/BO: Superframe/Beacon Order  
CSMA-CA: Carrier Sense Multiple Access with Collision Avoidance.  

Note: Numerical values (e.g., macMinBE = 3) refer to the 2.4 GHz PHY layer; other PHYs may differ.

Disclaimer

This material is strictly for educational use only. Any other use, including but not limited to commercial, distributive, or derivative purposes, is strictly prohibited. If any citation is missing or improperly referenced, please contact the author immediately for correction or update.

Reference

[1] Ding, Z. (2025) Zigbee MAC Layer (Lecture 14). EEEN60184 Internet and Communications Networks. University of Manchester, School of Electrical and Electronic Engineering.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值