**对IEEE 802.15.4中Slotted CSMA-CA的理解**

Part1
IEEE 802.15.4的superframe分为两部分,Active和Inactive;Active又可以分为三部分,Beacon, CAP, CFP,如图1所示。在CFP,每个时隙都被分配好。但在CAP,节点通过CSMA-CA或者slotted CSMA-CA的方式接入信道。下面说说我对IEEE 802.15.4中slotted CSMA-CA的理解。图1为superframe结构。

                                    图1 Superframe structure

Part2
关于slotted CSMA-CA,我最初读的是国际标准IEEE_802.15.4_2011的5.1.1.4章节 “CSMA-CA algorithm”,但由于标准里面细节太多,我没能抓住重点。于是找到解读版的论文“A Survey of Beacon-Enabled IEEE 802.15.4 MAC Protocols in Wireless Sensor Networks”。该论文对slotted CSMA-CA进行了简化阐述,读完它之后再读原标准就容易多了。

论文原文如下
During the CAP, nodes utilize the slotted CSMA-CA mechanism to contend for medium access. The slotted CSMA-CA employs the Binary Exponential Backoff (BEB) algorithm as a means to reduce the probability of collisions over the wireless channel. BEB operates as follows. Before any transmission
attempt three parameters are initialized, namely, the Number of Backoff stages (NB), the Contention Window (CW), and the Backoff Exponent (BE). These parameters are initialized with zero, two, and macMinBE , respectively. After that, the node backs off for a random duration selected from the range [0, 2BE - 1]. Once the backoff period expires, the node proceeds for two Clear Channel Assessments (CCA1 and CCA2). The number of CCAs is controlled by the parameter CW, such that CCAs are conducted as long as CW is not zero. If either CCA reveals that the medium is busy, CW is reset to two. The CCAs are needed to check whether the wireless medium is free from any activity before commencing a transmission. Packet transmission starts only if the medium is found to be clear during the two CCAs (provided that the remaining time slots in the current CAP are sufficient to transmit the packet and its ACK. Otherwise, the node has to postpone the packet transmission to the next superframe). However, if either of the CCAs reveals that the medium is busy, the value of BE will be increased by one (up to a maximum of macMaxBE) and the node backs off again (that is, NB is increased by one and can reach a maximum of macMaxCSMABackoffs). If BE reaches its maximum, it cannot change unless a successful/failed packet transmission occurs or packet retransmission commences. In that case, BE is reset to macMinBE. The packet will be dismissed
这段话描述的是节点A在一次数据传输过程中的所有行为。

关键参数三个:
NB: Number of Backoff stages
NB初始值为0,CCA过程一旦发现信道忙,NB就会加1,直到NB超过最大允许的退避次数macMaxCSMABackoffs后停止
CW: Contention Window
CCA次数,为何要进行多次CCA,一次不行吗?下面会有解释。
注:非时隙CSMA-CA中仅进行一次CCA
BE: Backoff Exponent
每一次退避的时间为多长是由BE值决定的,BE值最初为macMinBE,每次CCA信道忙则BE值加1,一直加到macMaxBE后,BE值保持不变。

                            图2 CSMA-CA mechanism

下面说说为何要不止一次地CCA?论文中这样解释
if a node is performing its CCA1 at the same instant that another node has finished its packet transmission; the first node will sense the medium free. Therefore, in order to give the second node a chance to receive its ACK packet, the first node is required to perform another CCA. This way, 802.15.4 MAC has implicitly employed a priority-based approach in which the ACK packet is favored over other data packets.
也就是说当节点A刚发完数据的时刻,CCA虽然检测到信道空闲,但仍然不能立即抢占信道,因为接下来A要接收ACK。所以要进行两次CCA,以确认信道确实不会有节点再占用。

总结:IEEE 802.15.4中slotted CSMA-CA有以下重点
1, 三个参数。NB,CW,BE
2, CW=2是必须的,因为如果只进行一次CCA依然有冲突隐患。

Part3
以上从论文中的简化版解释中可以大致理解IEEE 802.15.4中slotted CSMA-CA工作方式,下面给出国际标准IEEE_802.15.4_2011的5.1.1.4章节对它的完整表述。图3为国际标准IEEE_802.15.4_2011中slotted CSMA-CA和CSMA-CA的流程图

                         图3 CSMA-CA algorithm

图3和图2有两点不同,其一,增加了非时隙CSMA-CA部分;其二,在Slotted CSMA-CA部分多了一条判断“battery life extension”。本文不关注不同点,只关注相同点。

下面是标准中的原文摘录
Each device shall maintain three variables for each transmission attempt: NB, CW, and BE. NB is the number of times the CSMA-CA algorithm was required to back off while attempting the current transmission; this value shall be initialized to zero before each new transmission attempt. CW is the contention window length, defining the number of backoff periods that need to be clear of channel activity before the transmission can commence. This value shall be initialized to CW0 before each transmission attempt and reset to CW0 each time the channel is assessed to be busy. For operation in the Japanese 950 MHz band, CW0 shall be set to one; otherwise, CW0 shall be set to two. The CW variable is only used for slotted CSMA-CA. BE is the backoff exponent, which is related to how many backoff periods a device shall wait before attempting to assess a channel. In unslotted systems, or slotted systems with the received battery life extension (BLE) field, as defined in Figure 41, set to zero, BE shall be initialized to the value of macMinBE. In slotted systems with the received BLE field set to one, this value shall be initialized to the lesser of two and the value of macMinBE. Note that if macMinBE is set to zero, collision avoidance will be disabled during the first iteration of this algorithm。
如果只读这个标准,很难理解NB,CW,BE分别是什么意思。尤其是NB的定义,更是费解。NB不就等于CCA的次数吗。

总结:IEEE 802.15.4标准虽然内容面面俱到,但很多地方难理解,需要找到合适的论文讲解。

对IEEE 802.15.4中Slotted CSMA-CA的理解相关推荐

  1. IEEE 802.15.4的信道接入机制二信标网络中的CSMA-CA算法

    七. 信标网络中的CSMA-CA算法 相较于非信标网络的CSMA-CA算法,在信标网络中,CSMA-CA算法中有如下几点需要注意: 1.对齐要求 在时槽CSMA-CA中,PAN中每个设备的退避周期边界 ...

  2. ZigBee学习笔记——(二)IEEE 802.15.4无线传感器网络通信标准

    第二章 IEEE 802.15.4无线传感器网络通信标准 一.IEEE 802.15.4标准概述 二.网络组成和拓扑结构 1.网络组成 2.拓扑结构 ①星状网络 ②点对点网络 三.IEEE 802.1 ...

  3. IEEE 802.15.4的信道接入机制三信标网络中的GTS

    八.信标网络中的GTS信道接入管理 1.基本概念和要点 1.1 GTS基本概念 GTS,guaranteed time slot,保证时隙.它用来管理基于时隙的信标网络中非CSMA-CA信道接入. G ...

  4. IEEE 802.15.4和ZigBee

    IEEE 802.15.4网络简介 IEEE 802.15.4网络是指在一个POS内使用相同无线信道并通过IEEE 802.15.4标准相互通信的一组设备的集合,又名LR-WPAN网络.在这个网络中, ...

  5. 不可不知的IEEE 802.15.4和ZigBee基础

    IEEE 802.15.4网络是指在一个POS内使用相同无线信道并通过IEEE 802.15.4标准相互通信的一组设备的集合,又名LR-WPAN网络.ZigBee是基于IEEE802.15.4标准的低 ...

  6. UWB协议:IEEE 802.15.4A‐2011学习

    UWB协议:IEEE 802.15.4A‐2011学习 1. PHY协议 1.1 发送处理 1.1.1 SHR 1.1.2 PHR 1.1.3 DATA 1.2 接收处理 待补充 2. MAC协议 待 ...

  7. 实验十八 IEEE 802.15.4和ZBR协议仿真

    无线网络技术教程第四版实验十八 IEEE 802.15.4和ZBR协议仿真 目录 无线网络技术教程第四版实验十八 IEEE 802.15.4和ZBR协议仿真 1 实验要求和目的 2 实验原理和背景 3 ...

  8. IEEE 802.15.4协议完整中文版 - 4.2 IEEE 802.15.4 WPAN 的组件

    4.2 IEEE 802.15.4 WPAN 的组件 遵循本标准的系统由几个部分组成,其中最基本的是设备.使用同一个物理信道通信的两个或者多个设备构成一个 WPAN.这个 WPAN 应该至少包括一个 ...

  9. 可见光成像通信(Optical Camera Communication,OCC)——基于IEEE 802.15.7-2018标准的解读

    之前博客<可见光通信>较为详细的介绍了可见光通信技术.而本博文则是对OCC(optical camera communication)或称可见光成像通信进行深入的介绍 更多本人做的可见光通 ...

最新文章

  1. elf section类型_ELF文件解析(一):Segment和Section
  2. jmeter提取mysql数据_通过jmeter读取数据库数据,并取值作为请求的入参
  3. python黑网站_Python简单实现HTTP本地代理转发
  4. 【SICP练习】53 练习2.21
  5. 真想做个网站赚点钱啊,
  6. 获取页面iframe里的元素
  7. CDHtmlDialog探索----WebBrowser扩展和网页Javascript错误处理
  8. linux密码带星号,Shell实现输入密码并显示星号
  9. 第11章:项目风险管理——章节真题
  10. 【数据结构】四、双向链表和双向循环链表
  11. eNSP配置VLAN间路由
  12. windows2008服务器安全防护软件哪个好
  13. 什么是ANC降噪技术?耳机工厂来告诉你
  14. 机器人仿真论文阅读2
  15. SPOJ COT 10628 Count on a tree
  16. colorbox弹出层插件使用方法及注意事项
  17. 三角肌前束(02):哑铃交替前举
  18. e-r数据建模-概念模型 逻辑模型 物理模型-总结
  19. 厉害!6 岁学编程,19 岁收月薪 2 万 的 Offer | 程序人生 2020
  20. ACK((Acknowledge character)应答机制(kafka)

热门文章

  1. 【二分图最大独立集】BZOJ4808[马]题解
  2. jdk新特性::作用
  3. 【KnewOne Talk】5key:不仅是 Apps 和新奇酷
  4. C语言期末考试内容(1)主观题
  5. 银行卡休眠状态怎么激活
  6. linux 设置mysql端口转发_linux使用socat进行端口转发,支持tcp/udp数据转发
  7. python美观代码_为何 Python 代码要写得美观而明确
  8. 算法导论第21章:并查集
  9. 阅读vue3官方文档之摘录
  10. Log4j日志级别及使用规范