An Improved Anti-collision Algorithm in RFID

21 downloads 0 Views 2MB Size Report
Jul 19, 2010 - identifying the identification codes (IDs) of tags is slow. In this. Microsoft .... In this algorithm, Manchester code is used in order to process of ...
An Improved Anti-collision Algorithm in RFID System Leian Liu, Zhenhua Xie, Jingtian Xi, Shengli Lai School of Electronic and Information Engineering South China University of Technology Guangzhou, 510641, China Email: gudu420(4163com Abstract-Collision is a familiar problem in a RFID (Radio Frequency Identification) system. How to solve this problem effectively is very important to the whole RFID system. A RFID system is always made up of two indispensable components: one is the tag, the other is the reader. Collisions occur when there are so many tags within the interrogation zone of a reader communicating with the reader synchronously. Binary search algorithm is an important anti-collision algorithm to solve the collision problems. But the main disadvantage of any existing

algorithm based on binary search algorithm is the rate of identifying the identification codes (IDs) of tags is slow. In this paper, an improved anti-collision algorithm is proposed. Using this algorithm will recognize more tags in less time compared with other existing algorithms.

Keywords-wireless RF communication, RFID, anti-collision algorithm, multiple access I.

INTRODUCTION

The RFID system is an important branch of the automatic identification system. In a RFID system, wireless RF communication techniques are used. The omnipresent barcode labels that triggered a revolution in identification systems some considerable time ago, are being found to be inadequate in an increasing number of cases [1]. Now here comes RFID. Compared with the barcode, a RFID system has many merits as below: * Tags can be used repeatedly and the information stored in them can be reprogrammed, but barcodes can not; * The information stored in a tag is much larger than that in a barcode;

*

*

When there is a barrier in front of a barcode, the barcode can not be read by a reader, but a tag can be read due to the different working style; A tag can be scanned by a reader more quickly than a

barcode; A tag has a much longer life than a barcode especially when the working condition is extremely bad; * Using tags is much safer than using barcodes. Because of merits mentioned above, RFID systems arouse much interest. Several big companies such as IBM, Sun and Microsoft have launched such programs. So in recent years, RFID systems develop very fast and have been used in many areas. Identity identification and assets management are two areas in which RFID techniques are used widely and maturely. Electronic tags are embed into lots of cards (ID cards, passports and employees' cards, etc) to identify people's identity, such as access control management, access permission checking-up, etc. In the assets management area, a successful case is using RFID techniques to manage passengers' luggage in an airport. Preventing from fakes is another use of RFID techniques. In this area, because electronic tags have lots of merits (tags can be identified very quickly and are very difficult to be forged and also the price of a tag is very low), difficulties of faking are greatly increased. Fakers may shrink back from difficulties. Commercial supply chain is one of the most widely area in which RFID techniques are used. By supply chain, goods in the chain can be run after and people can get the information of them anywhere and anytime. A RFID system is always made up of three components (we can see this clearly in the following figure 1). *

by which the reader can get the information stored in

Data

"FID reader

/

\T

Clock

Energy

Antenna of the reader

/on Antenna of the tag

D|td manqgemjbht gygltm Data management system

Network Figure 1. The structure of RFID system

The first one is the transponder or can also be called the tag, which is located on the object and usually has a special identification code by which the tag can be identified. The tag can be divided into two different parts: the antenna by which the tag can extract energy from the reader and an electronic microchip which controls the tag to work effectively. The second one is the interrogator or can also be called the reader. The reader includes two different parts: the antenna and the reader. In addition, many readers are fitted with an additional interface, such as RS232, RS485, etc, to enable them to forward the data received to another system (PC, robot control system, etc) [1]. Depending upon the design and the technology used, the reader may be a read or read/write device. But usually, it is called as "reader". The reader transmits signals to "wakeup" the tag and transmits instructions to the tag and then receives the return data stored in the tag. The useful data (the data that have been filtrated by the reader) can be used by the data management system by the network. The last one is the data management system. The function of the data management system is storing information and managing data. The data management system can communicate with the reader which is located in the remote place and can get the information of the tag anytime. In conclusion, the function or aim of a RFID system is to identify tags, that is, to get the identification codes of these tags and then get the data stored in tags. At last, the data which have been filtrated are stored and managed by the data management system. The working process of the RFID system is as follows: * The reader transmits interrogation signals at first; * If a tag is within the interrogation zone of the reader,becit e becoes ctiv an the comuncate wih th reder

the tag. From all the above, we can see that if there are many tags within the interrogation zone of the reader, and they communicate with the reader at the same time, the reader will not know which one it should "talk" with at first. The reader will get the wrong information of the tags if the problem which is called as "collision" is not dealt with properly. To deal with the collision problem in a RFID system, several correlative

commands are needed. These commands are called as anti-collision commands or anti-collision algorithms which are discussed in this paper. In the mechanics of communication, communication collision problems always exist. In the same time, lots of methods have been found in order to solve these problems. Generally, these methods can be divided into four parts: SDMA (Space Division Multiple Access), FDMA (Frequency Division Multiple Access), CDMA (Code Division Multiple Access) and TDMA (Time Division Multiple Access). But unfortunately, all these methods can not be used in a RFID system directly because they are much too complicated. To solve collision problems in a RFID system, just like in a communication system, there are always three methods: spatial domain method, frequency domain method, and time domain method. But in most RFID systems, time domain method which means every tag communicates with the reader in the different time is used because it is easier to be put in practice. In general, time domain method has two branches: one is assured algorithm, the other is un-assured algorithm. What is discussed in this paper belongs to assured algorithm. 1.

SOME ExiSTIG ANTI-COLLISION ALGORITHMS

Solving the collision problem is the basic and the most important task in a RFID system. That is, only there is no collision, can a RFID system work properly. So how to solve this problem and how to solve this problem effectively are crucial to the whole RFID system. Until now, there are some methods as follows: A. Bit Arbitration Based Anti-collision Algorithm [2] In this algorithm, all unidentified tags in the interrogation azone of the reader are active at the beginnNg. All active tags will take part in the arbitration process. Newly entering tags

will not take part in the arbitration process if the arbitration process is in process. The pivotal idea of this algorithm is: When there is a request from the reader, all active tags send the value of a given bit of their identification codes. Then tags will be divided into two groups according to the given bit. The reader will choose one group to continue another bit arbitration step and then inquire of next bit until the identification code of a tag is recognized. The identification time of one tag of bit arbitration based algorithm is independent of the number of tags in the interrogation zone of the reader, but linearly dependent of the identification code length. So if there are n tags in the interrogation zone of the reader and the length of every tag's identification code is m, the total number of iterations of bit arbitration based algorithm iS mxn. B. Binary Search algorithm [3] In this algorithm, Manchester code is used in order to recognize the bit where there is a collision. In Manchester code, the ascending edge is coded as logical "O" and the descending edge is coded as logical "1". So when the reader receives an identification code and the states of the code do not change in some bits, the reader can know where collisions occur (we can see this in figure 2). ID of tagl: 10011111

the broken lines in figure 2. Then the reader can know collisions occur in these two bits. In binary search algorithm, tags whose first collided bit is logical "1" do not respond to the reader's next request. But tags whose first collided bit is logical "O" send their identification codes to the reader's next request. After each request, the collided bits become less. The searching process keeps going until the identification code of a tag is recognized. When the identification code of one tag is recognized, the searching process will be repeated from the beginning until the identification codes of all the tags are recognized.

g. C Anti-collision Algorithm Balsed on Jumping and Dynalmic C.

Searching[4]

This algorithm is the same to binary search algorithm except for two aspects. They are: * After the identification code of a tag is recognized, the process of anti-collision algorithm based on jumping and dynamic searching is not just repeated as binary search algorithm. The code which the reader will send next is not the same as that the previous process sent at the beginning. It is the second code (counting backwards) that the previous process sent. Then the third code (counting backwards), the fourth code (counting backwards), etc, until the identification codes of all the tags are recognized. In the first Request command, the reader sends a code "1" instead of sending a maximal code whose length is the same to the tags' identification codes and every bit

ILJTLfL W VLF ID of Tag2: 10111011

F;

of the code is logical "1". In the next Request command, the reader sends the known bits instead of sending all the bits as do in binary search algorithm.

Received ID by the reader: lOx lix 11

VL...VI..Like binary search algorithm, the searching process is from the top bit to the bottom bit. If the higher bits of the tags' identification codes are the same to the known Figure 2. Collisions in received ID In figure 2, there are two tags. These two tags will answer bits, the corresponding tags will send their the reader when the reader sends a Request command to them identification codes to the reader. at the first time. We can see from figure 2 that the values of III. THE IMPROVED ANTI-COLLISION ALGORITHM bit5 and bit2 of tagl's identification code are logical "O" and The proposed anti-collision algorithm is an improved one, logical "I" respectively, but those of the same bits of tag2's compared with binary search algorithm and anti-collision identification code are logical "1" and logical "0" respectively, algorithm based on jumping and dynamic searching. Its goal is thus the states of the identification code that the reader receives will not change in these two bits which are shown by to enhance the speed of identifying tags when collisions occur -f-1 VL.... - -

-

-

in succession. In this algorithm, just like binary search algorithm, there are some stipulations: * The encoding style must be Manchester code. Only using Manchester code can a reader find each collision bit easily and recognize all the tags in its interrogation zone at last. * Several commands are used. The first one is Request command. In the beginning, a reader sends a request command. Tags will reply if they meet a certain condition. The second one is Select command. If the reader receives an identification code and there is no collision, the tag which has been identified will be selected by the reader, and then other commands will be executed (e.g. the Read/Write data command). The third one is Read/Write data command. Data stored in the selected tag will be read or changed according to Read/Write data command. The last command is Unselect command. If a tag acts upon this command, it will enter a "sleeping" state, in which the tag will not answer any command sent by the reader unless it leaves the interrogation zone of the reader and enters again. * The key point of this algorithm is all the tags must answer the reader at the same time, so that tags can send their identification codes to the reader synchronously. Only under such condition can the algorithm work well. All of the above are the same with binary search algorithm and anti-collision algorithm based on jumping and dynamic searching, but the proposed improved algorithm in this paper has two major differences compared with the other two algorithms as follows: * Due to the mutually exclusive value of a binary bit, if there is only one collided bit no matter where it is, the reader does not need to send Request command again and can automatically identify two tags once. * Different search algorithm will be used if collisions occur in succession. After successive collisions have been detected, every correlative bit but the last in Request command will be set to zero. Then two tags which collided at the last bit of the collision sequence will be identified synchronously. Contrasted with the

existing algorithms mentioned above, the next Request command directly equals to the old one plus one. Keep on sending Request command after having it added to one, until all the tags in the interrogation zone have been identified. We can see the process clearly from the following example. Assuming there are 8 tags whose identification codes are 10000001 (tagl), 10001001 (tag2), 10010001 (tag3), 10011001 (tag4), 10100001 (tag5), 10101001 (tag6), 10110001 (tag7), and 10111001 (tag8) in the interrogation zone of the reader, the process of the algorithm is as follows: To begin with, the reader sends a Request command (1), and all the tags in the interrogation zone of the reader will answer the reader. According to the principle of Manchester code, the reader receives the code 1OxxxOO1, so the reader can know that collisions occur in bits D5, D4, and D3. The higher bits where collisions occur are D5 and D4. According to this algorithm, D5 and D4 are set to zero. Bits that are higher than D5 will not be changed, so D7 D6=10. Then the reader sends a Request command (1000). The reader receives the code 1OOOxOO1. Because there is only one bit where the collision occurs, it is no need to send Request command again. The reader can get the identification codes of tagl and tag2. Then the reader runs Read/Write command to deal with tagl and tag2. At last, the reader runs Unselect command in order to turn tagl and tag2 into "sleep" state. Next, the reader sends a Request command (1001). The reader receives the code 1001xOO1. Now D3 is the only bit where the collision occurs. Similarly, the reader can get the identification codes of tag3 and tag4. Then the reader deals with tag3 and tag4 and turns them into "sleep" state at last. Furthermore, the reader sends a Request command (1010). The reader receives the code 101OxOO1. D3 is the only bit where the collision occurs. So the reader can get the identification codes of tag5 and tag6. Then the reader deals with tag5 and tag6 and turns them into "sleep" state at last. Finally, the reader sends a Request command (1011). The reader receives the code 1011xOO1. D3 is the only bit where the collision occurs. So the reader can get the identification codes of tag7 and tag8. Now all the tags are recognized by the reader. The whole process is described in the following table 1.

TABLE I

correct rate of being read by the reader is not as high as people

The searching process of the improved anti-collision algorithm

wish and the rate of identifying the identification codes of tags

is not very fast. So how to solve the collision problems and 1st 3rdsearch enhance the rate of identifying the tags is crucial to the whole 1 1000 1001 1010 1011 Request RFID system. It is urgent to find new ways to solve these problems. In this paper, an improved anti-collision algorithm Received 10xxool 10000001 10010001 10100001 10110001 10001001 10011001 10101001 10111001 ID is proposed. Compared with other existing algorithm, it has .. 10000001 10000001 great advantages especially when the number of collisions Tagl .. becomes larger. And the fact is that the probability that Tag2 10001001 10001001 collisions occur rapidly increases with the number of tags. In . 10010001 10010001 Tag3 Tag4 10011001 10011001 .the final analysis, it is reasonably better to use this algorithm to deal with more tags and it is of great significance to the TagS __ 10100001.10100001I l oo l development and application of RFID system. 10101001 10101001 Tag6 o search

nd

2 search

4th search 5th search

Tag7

10110001

10110001

Tag8

10111001

10111001

From the table 1, we can know that the total number of iterations of the improved anti-collision algorithm is 5. But if anti-collision algorithm based on jumping and dynamic searching is used, the total number of iterations will be 15. Else if binary search algorithm is used, the total number of iterations will be larger. Compared with binary search algorithm and anti-collision algorithm based on jumping and dynamic searching, the total number of iterations of the improved anti-collision algorithm is greatly decreased. In fact, successive collisions mean colliding in succession both physically and logically. The simplification in this paper aims to address the essence of the proposed algorithm easily. In fact, physical succession of collided bits is not necessary, because physically discrete collisions can be regarded as logically successive collisions. So all the conclusions deduced above are established all the same. Using the algorithm proposed in this paper, we can demonstrate the conclusion that if n-bit successive collisions (physically) are detected, 2n tags can be recognized at best

with only 2n-1+1 commands transmitted. IV.

CONCLUSION

RFID systems are used in many areas today and are becoming more and more important. But when RFID techniques are concerned, because the working condition of the tags and the reader is very complicated, to the tags, the

REFERENCES

[1]

Klaus Finkenzeller, RFID Handbook: Fundamentals and Applications in Contactless Smart Cards and Identification, 2nd ed.

[2]

John Wiley & Sons Ltd, 2003. Marcel Jacomet, Adrian Ehrsam, and Urs Gehrig, "Contactless Identification Device With Anticollision Algorithm," IEEE Computer Society CSCC99, Conference on Circuits, Systems, Computers and

[3]

Klaus Finkenzeller, RFID Handbook: Radio-Frequency Identification

[4]

Songsen Yu, Yiju Zhan, Zhiping Wang, and Zhongping Tang, "Anti-collision Algorithm Based on Jumping and Dynamic Searching and Its Analysis," Computer Engineering, Vol.31, pp.19-20, 2005.

Communications,Jul. 4-8, Athens, 1999.

Fundamentals and applications, John Wiley & Sons Ltd, 1999.