26
An Anti-Collision Algorithm for Active RFID

An Anti-Collision Algorithm for Active RFID

Embed Size (px)

DESCRIPTION

An Anti-Collision Algorithm for Active RFID. 摘要 RFID 一种被广泛应用的自动识别技术。有源 RFID 系统比无源 RFID 系统在远距离应用中有更多的优势,但有源系统也会遇到碰撞问题。在对比主要防碰撞算法的基础上,提出了改进的防碰撞算法 DCMA 。设计该算法并进行仿真,最终在有源 RFID 硬件平台上对该算法进行测试。仿真结果表明,有源系统的 DCMA 算法具有低功耗的优点。 - PowerPoint PPT Presentation

Citation preview

Page 1: An Anti-Collision Algorithm for Active RFID

An Anti-Collision Algorithm for Active RFID

Page 2: An Anti-Collision Algorithm for Active RFID

摘要RFID 一种被广泛应用的自动识别技术。有源 RFID 系统比无源 RFID 系统在远距离应用中有更多的优势,但有源系统也会遇到碰撞问题。在对比主要防碰撞算法的基础上,提出了改进的防碰撞算法 DCMA 。设计该算法并进行仿真,最终在有源 RFID 硬件平台上对该算法进行测试。仿真结果表明,有源系统的 DCMA 算法具有低功耗的优点。

Abstract—RFID is a popular automatic identification technology currently, which will have large opportunities in the future. Active RFID system has more advantages in long distance applications than passive RFID system, but itis also in face of the collision problem when many cards work together. On the basis of comparing today’s mainly used anti-collision algorithms, an improved anti-collision algorithm (DCMA) is proposed for the active RFID in thispaper. The algorithm is designed and simulated, and finally tested in an active RFID hardware platform. The simulation shows the low power advantage of the DCMA algorithm in the active RFID system.

Page 3: An Anti-Collision Algorithm for Active RFID

1. 简介

RFID 是一种根据无线电信号获取信息的自动识别技术, 80 年代,随着 LSI 技术的出现,射频识别系统的规模缩小,使得 RF 技术可以在实际应用中被广泛推广。使其发展成为 IT 领域一个成熟的并且越来越受欢迎的技术。

RFID (Radio Frequency Identification) is a kind of technology to acquire information by radio signal identifying object automatically. In the 1980s, as the result of LSItechnology, the size of RF identification system is reduced which pushes the RF identification technology into practical application. It becomes a mature technology and a popular research direction in IT.

Page 4: An Anti-Collision Algorithm for Active RFID

根据能量和调制方式的不同,可以将 RFID 系统分成两类:有源 RFID 系统和无源RFID 系统。有源 RFID 系统由标签中的电池为标签提供能量,无源 RFID 标签从阅读器通过天线发送的无线电波接收能量。有源系统可以支持更远距离的通信,其通信范围可以达到 30 米,使其在很多应用领域都很有优势,如机动车识别系统,门禁系统等

According to power and modulation modes, there are two types of the RFID system: the active RFID system and the passive RFID system. The active RFID tag is powered by battery in the tag, and the passive RFID tag can receive powerfrom the magnetic energies which are transferred by the reader by antenna. The active RFID system can support a longer distance ranging up to thirty meters, which will have advantages in a lot of area like the vehicle identification system, attendance check system etc.

Page 5: An Anti-Collision Algorithm for Active RFID

RFID 系统设计的关键一步就是防碰撞算法的设计。本文,设计了一种新的防碰撞算法,并将其与现存的算法做了对比。低功耗是 RFID 系统设计的另一个关键问题,不仅与硬件有关,还与算法有关,本文提出的算法主要解决如何降低功耗的问题。

A key step for the design of RFID is the design of anticollision algorithm. We are not restricted by the existent anticollision algorithm due to irreplaceable advantages andactiveness in anti-collision algorithm of active RFID. In this paper, we design a new algorithm on comparing the existent ones and we simulate this new algorithm and also implement it in active RFID hardware platform. The low power design is theother key problem that relates not only to hardware but also to the algorithm. The anti-collision algorithm proposed will focus on low power consumption.

Page 6: An Anti-Collision Algorithm for Active RFID

2. 算法总述

目前主要的放碰撞算法有: ALOHA,CSMA/CA,TDMA,FDMA,CDMA. 他们都有各自的特点,并且应用在不用的环境中。但是大多数的算法是基于有物理监听功能的平台。

在设计有源 RFID 系统时,如果系统有物理监听功能的话,我们可以直接采用CAMA/CA 协议来避免碰撞。当数据包的长度段时,我们采用基本的 CSMA/CA 协议,如果数据包的长度很长,我们就结合有 RTS/CTS 的 CSMA/CA 协议。对于硬件无物理监听功能的系统,主要的防碰撞算法是 ALOHA 算法和 CSMA/CA 带有虚拟监听功能的 RTS/CTS 。

The current main anti-collision algorithms are: ALOHA 、 CSMA/CA 、 TDMA 、 FDMA 、 CDMA. They have respective features and are applied in different situation. But most algorithms are based on the hardware system which has physical monitoring function. When designing active RFID system, we can directly adoptCSMA/CA protocol to avoid collision if the system has physical monitoring function. We can adopt basic CSMA/CA if the length of data packet is short, or the CSMA/CAalgorithm with RTS/CTS if the data packet is long. As the hardware system without physical monitoring function, the main anti-collision algorithms are ALOHA and CSMA/CA only with virtual monitoring function of RTS/CTS.

Page 7: An Anti-Collision Algorithm for Active RFID

ALOHA 算法适合传输短数据包,不适合传输长数据包。一旦数据包的长度较长时,碰撞就会显著的增加,信道利用率降低,同时功耗也会增加。带有虚拟监听功能 RTS/CTS 的 CSMA/CA 有两个主要的缺点,第一,功耗高。第二,信道利用率低。

我们设计改进的算法— DCMA( 双信道多路径 )DCMA 适合没有物理监听功能,需要传输长数据包的系统。 DCMA 的第一个优点是:在准备阶段,客户处于断开电源状态。第二个优点是新加入系统的标签不会发生数据包的冲突。

ALOHA algorithm is fit for the transmission of short data packet, but not for long data packet. Once the packet is long, the collisions are increasing obviously and the channel utilization rate is decreased following the increase of power consumption.The CSMA/CA just with virtual monitoring function of RTS/CTS has two big shortages: first, in backoff period, the client is in receiving condition which augments power consumption; second, the new client added to the system of which RTS may collide with data packet, reduces the channel utilization rate. So, we design the improved algorithm---DCMA (Dual channels multiple access). DCMA is fit for the system without physical monitoring function and also fit for the transmission of long data packet. The first advantage of DCMA is that when in backoff period, the clients are in power down mode which reduces power consumption. The second advantage is that the new client added to the system will not collide with the data packet.

Page 8: An Anti-Collision Algorithm for Active RFID

3. 算法文中提出的算法优点的关键在于采用了两个频率的信道,分别作为数据信道和控制信道。通过这种方法就可以分别发送虚拟的监测信号 RTS 和 CTS ,和数据信号,如DATA 和 ACK 。

首先,阅读器和所有的标签用信道 1 ,即控制信道。每一个标签在开始发送数据包之前都有一个二进制的等待时间,发送数据包之前,标签处于睡眠模式。在等待时间过后,标签开始发送 RTS ,其中包括了数据包的长度信息。当阅读其接收到 RTS ,就返回一个 CTS 给相应的标签。

The key advantage of this protocol is the using of two frequency channels which are identified as data channel and control channel, in this way we can transmit virtual monitoring signals such as RTS and CTS and data signals such as DATA and ACK separately.

Page 9: An Anti-Collision Algorithm for Active RFID

At first, the host and all clients use frequency channel 1 which is called control channel. Every client will have a binary exponential backoff before they start to send packets, during the time, the clients are in sleep mode before sending. After backoff time, clients start to send RTS which includes the length information of the packet. When the host receives a RTS, it will return a CTS to the corresponding client.

As soon as host returns a CTS, it will switch its frequency channel to channel 2 which is called data channel, waiting for the DATA packet sent by client. Much like the host, when the client receives a CTS, it will switch its frequency channel tochannel 2 to send DATA packet. In this period both the data packet and the confirm signal ACK will be transmitted in channel 2. Once upon DATA transmission is completed, host will return an ACK to the client, then host will switch back tochannel 1 for the RTS from a next client. The client that has received ACK will switch back to channel 1 and go to sleep mode, waiting for next round.

Page 10: An Anti-Collision Algorithm for Active RFID

一旦阅读器发送了一个 CTS ,就会转换频率到第二个信道,即数据信道,等待由标签发来的数据包。与阅读器相似,当标签接收到一个 CTS ,它就转换频率到信道 2 向阅读器发送 DATA 数据包。在这一阶段,数据包和确认信号 ACK 都在信道 2 中传输。一旦数据传输结束,阅读器就会返回 ACK 给标签,阅读器再次回到信道 1 ,继续阅读下一个标签。接收到 ACK 的标签回到信道 1 ,转入睡眠状态,等待下一个周期。

对于没有收到 CTS 的标签,就会进入睡眠状态继续等待,等待的时间间隔由二进制等待时间算法决定。当它们醒来时,它们再次发送 RTS ,当突然有一个标签开始发送RTS 时,这个 RTS 不会与传输的数据发送碰撞,因为 RTS 在信道 1 中传输, DATA在信道 2 中传输,它们是被完全分开的。因为它们不会互相影响,所以不会减少信道的利用率。

Page 11: An Anti-Collision Algorithm for Active RFID

我们的目的是判断哪一种算法的性能更好,因此需要在仿真实验中做一些假设,以保证任何一种算法的试验条件都是相同的。一下是一些假设:1. 信道是理想信道,信道间无干扰。

2. 对 ALOHA 算法当两个相邻传送的时间间隔不足以发送 DATA 或 ACK ,则认为又碰撞发生。对 CSMA/CA 和 DCMA ,如果时间间隔不足以发送 RTS 和 CTS ,我们也认为又碰撞发生。

3. 我们按照固定的时间单元,即被称为时隙,开测量时间。 RTS,CTS,ACK, 的传送时间为 1 个时隙,传送 DATA 的时间随着 DATA 的长度不同而不同。

4. 对功耗的定义:我们用一个标签在他的活动下所用的时间考测量它的能耗。例如,对 ALOHA 算法,只有在其发送 DATA或接收 ACK 时,才是活动状态,因此,在CSMA/CA 中,当标签等待发送 RTS 时,转备好接收数据,在这整个过程中都消耗能量。

Page 12: An Anti-Collision Algorithm for Active RFID

5. 信道利用率的定义:信道利用率是有效通信时间占总的通信时间的比例。有效通信时间是指用来传输有用数据包的时间,有用的数据包是指,被阅读器或标签成功接收的数据包,而不是在碰撞中被破坏的数据包。总的通信时间是指从开始到结束时的时间。

Page 13: An Anti-Collision Algorithm for Active RFID

红: DCMA;蓝啊; CSMA/CA;绿: ALOHA;数据包的长度: 50 时隙;X轴:标签数目;Y轴:信道利用率;由图中可以看出,随着标签数目的增加,信道利用率降低。因为标签数目的增加会导致更多的碰撞,更多的信道的无效占用。

Page 14: An Anti-Collision Algorithm for Active RFID

DCMA 的信道利用率最高。 ALOHA 的信道利用率最低。这是因为 ALOHA 没有监听功能,而是直接的发送数据包。如果数据包很长,则碰撞就会很频繁,信道的无效占用时间就会很长。当有新的标签向阅读器发送数据包时,就会与正在和阅读器通信的标签发生碰撞,使得标签通信失败,使本来有效的通信变成了无效的通信,造成了利用率的降低。 DCMA考虑到所有这些情况,即使在数据包长度很长,和加入新标签时,性能都是最好的。。

Page 15: An Anti-Collision Algorithm for Active RFID

红: DCMA;蓝啊; CSMA/CA;绿: ALOHA;数据包的长度: 50 时隙;X轴:标签数目;Y轴:功耗;显然,随着标签数目的增加,能耗增加。 DCMA 的能耗最低, ALOHA 的能耗最高。这是因为 ALOHA 没有监听功能,而是直接的发送数据包。如果数据包很长,则碰撞就会很频繁,能耗就会很高。由于 CSMA/CA 在等待阶段也会消耗能量,所以虽然减少的碰撞的数目,所消耗的能量相对还是比较高。 DCMA 在等待阶段,断开电源,并且同时减少了碰撞,因此 DCMA 的能耗最低。

Page 16: An Anti-Collision Algorithm for Active RFID

5.试验结果试验采用单片机控制模块的无线收发,此外单片机还用来系统能量。由于在硬件的设计方面,低功耗是关键的要求之一,我们选择低功耗的 SCM-MSP430F123 作为控制器, RFIC-nRF2401 作为收发模块。电源采用纽扣电池 CR2477 。采用 C430编写DCMA 算法的程序,然后将代码下载到控制器,系统电压 6伏

Page 17: An Anti-Collision Algorithm for Active RFID

纽扣电池容量为 950mA ,收发速率为每天 100 次,每次持续 1秒,由于算法设计的目标是使系统的功耗最低,因此,电池的寿命可以长达 5 年。

Page 18: An Anti-Collision Algorithm for Active RFID

6. 结论

本文提出的防碰撞算法 DCMA ,采用有源 RFID 。我们详细叙述了该算法并对其进行了仿真,仿真结果表明,该算法在降低能耗和提高信道利用率方面都表现出了很好的性能。

Page 19: An Anti-Collision Algorithm for Active RFID

5.试验

试验采用的是 Crossbows Mica2 motes equipped试验平台。

Page 20: An Anti-Collision Algorithm for Active RFID
Page 21: An Anti-Collision Algorithm for Active RFID

由图 6 的下方数据可知,节点 17 在短时间内连续发送了大量的数据包,但是由于采用数据压缩技术,在图 7 中可以看到实时显示的结果 .

6. 结论本文提出了一种具备监测和控制 WSN 的接口,它不仅具有很好的实时性,而且还可以为远端用户提供可视化的数据,并且可以是远端用户通过该接口改变传感器网络的配置。

Page 22: An Anti-Collision Algorithm for Active RFID

6.m-AFSA 在 EDFSA 上的应用对于 EDFSA ,考虑到帧长度的上界,进入阅读区域的标签数目,不仅影响阅读周期的时间 T ,还影响 。在设计系统时,我们令 T 和 G 是完全独立的。我们选择使得 q值最小的 T 值,即使一个标签被阅读的次数最少。对 q 的估计,由等式 11 知, q 不依赖于 t 和 T 。 T 的值与 N,K 和 n 有关。在 EDFSA中,利用表 1 ,得到 N,G 值。由于不断的有新的标签到达,因此在表 1 中,选择可以使吞吐量最大的 N 值。也就是可以将 N 固定为 256. 当 S 值确定时, T 的值就可以知道了, S 与 K 和 n* 有关, n* 是动态变化的,但是其最佳值接近于 2 ,所以选择 2 最为 n* 的近似。当 N 和 n* 确定后, S 就只与 K ,即未读标签数目有关,选择使 S 值,即有效时隙的数目,最大的 K 值。 S 缺的最大值同时也会使 T 最大,因而会使 q 最小,即一个标签被阅读的次数。令 N=256 , n*=2 ,使 K=336 使 S 最大,根据上述规则和公式, T=520.92ms 。

Page 23: An Anti-Collision Algorithm for Active RFID

7 仿真结果7.1 静态设置下系统的性能如前面讨论的,参数 n 在确定标签平均阅读时间时起到了很重要的作用。 N 值过大或过小都会增加阅读标签的总时间,如图 11 所示。

Page 24: An Anti-Collision Algorithm for Active RFID

由前面的结论知,当 n=n* 时,可以使阅读时间最小。由图可知, n=2 时,曲线与n=n* 的曲线最为接近。得到这种结果的原因可以由图 12 给出。

Page 25: An Anti-Collision Algorithm for Active RFID

对于( N,K)的大多数组合, n*=2 ,这就解释了图 11 的试验结果。图 13 是将 AFSA 系统与基于其他算法的系统想比较的结果。显然 AFSA 的系统的阅读时间最短,

Page 26: An Anti-Collision Algorithm for Active RFID

7.2 移动设置下系统的性能令 v=5m/s, l=2m,h=1m 。标签阅读比例为 P=99% , P=99.9%, 阅读标签数目为50000. 由第 6 部分的内容确定确定初始标签分组数 G 和标签离开阅读其区域的比例为 , 仿真试验重复了 20 次。表 2 给出了仿真结果。

从表中可以看出,第一列是使标签阅读比例为 99% 时,所设置的初始的标签数目。从第三,四的对比可知,在 P=99.9% 时,标签离开阅读器区域的比例较低。从表中还可以看出, AFSA 显著地提高了系统的吞吐量。这是因为 AFSA 系统减少了每个阅读过程的时间,因此可以实现更多次阅读循环。