Research on An Improved RFID Collision Algorithm

Radio Frequency Identification(RFID) is a kind of information that using radio Identification technology. Anti-collision algorithm has always been a research topic for researchers. The anti-collision algorithm of labels is mainly divided into two major categories: ALOHA-Based Anti-Collision Algorithms and Anti-collision algorithm based on binary search. Both algorithms have their own advantages and disadvantages, Anti-collision algorithm that based on ALOHA is simple and fast, but it will lose labels. Binary-based anti-collision algorithm can be searched for every tag, and it is not easy to lose tags, but it is relatively complicated and has poor security. Therefore, this paper proposes an Anti-collision algorithm which combines the dynamic frame slot Anti-collision algorithm with the return binary search algorithm.


Status of RFID research
RFID technology is developing rapidly in developed countries all over the world. For example, the United States has widely used RFID technology [1] . Compared with the developing countries, China is the representative of the developing countries. This technology still belongs to the emerging industry and is in the process of active development. At present, the main development directions of RFID include: Anticollision technology research, security and privacy issues, the system of high-frequency and physical Internet of things, and so on. Tag collision is a technical problem in RFID technology. Wenzhao WU [2] proposed that the problem of label anti-collision is dealt with by dynamic binary tree algorithm DBS, quad tree algorithm DFS and query tree algorithm QT, respectively. ZHOU M [3] proposed that an anti-collision algorithm BLBO with lock-back is proposed by adding the lock-back function to the traditional binary tree. After the reader decodes, the collision bit is locked according to the result to solve the tag collision. Reference combines the characteristics of CDMA and DFSA algorithms to reduce tag collision to a greater extent [4] . Document [5] skipped idle time slots by adjusting the length of the inventory frame to increase the anti-collision capability of the system.

Collision problem in RFID system
When communicating between the tag and the reader, multiple signals will be transmitted simultaneously in both directions. The information itself will cause interference to each other during the transmission. The collision of such signals directly leads to the error of information reception and the waste of energy. Therefore, anti-collision algorithms have emerged in order to solve the collision problem in such tags and readers. This technology can not only reduce the collision problem in information transmission. At the same time, it can also ensure the security and integrity of information transmission, making the entire system more secure and reliable.
There are two types of collisions in a radio frequency identification system. One is a reader-writer collision and the other is a collision between tags. Tag collision, that is, two or more tags in the valid range of recognition of the same reader send information to the reader at the same time. This information may be disturbed, which is also called tag collision. This collision has seriously affected the work efficiency of the RFID system. Therefore, the research on the anti-collision algorithm has also received great attention from all walks of life.

Classical label Anti-collision algorithm
In the RFID system, if there are multiple electronic tags in the recognition area of the reader, there may be a collision problem between the electronic tags during the information transmission. At present, common Anticollision algorithm of label include ALOHA-based randomness algorithms and binary search-based deterministic algorithms. The ALOHA algorithm is a kind of time division multiple access method. The advantages are easy to implement, low cost, work in the high frequency band. It is widely used in library management, product management and other fields. Because of the randomness of Aloha algorithm, the phenomenon of "label starvation" is inevitable in the recognition process. And as the number of tags increases, the system efficiency will continue to decrease [1] . Therefore, the Aloha algorithm is mostly used in the case where the number of tags is not very large.
In order to eliminate the occurrence of partial collisions and increase throughput, the S-Aloha algorithm is used to discretize the time into multiple time slots of the same size. Since the tag is controlled by the reader synchronously, the tag can only respond at the beginning of each slot. You can't send data at will. Tags will only appear successfully transmitted or completely collided.
At this point, there is the following relationship between throughput S and average packet exchange quantity G: (1) The maximum throughput of the system can be obtained when G is equal to 1 by the derivation operation of the upper expression.
(2) The throughput of Aloha algorithm is twice as high as that of P-ALOHA algorithm. However, requirements for readers and electronic tags have increased accordingly. To achieve network synchronization, time slots are also computed.
Based on the S-ALOHA algorithm, the FSA algorithm introduces the concept of frame, that is, multiple time slots constitute a frame. At the beginning of the recognition process, the reader broadcasts the frame length L to the surrounding tag [2] . The tag responds and randomly selects one of the 1-L slots in the frame as its slot value to feed back to the reader. If the value of the slot counter is the same as the random slot value selected by the label, the tag will send its own message to the reader. If the label is successfully identified, exit the system.
The length of the frame used for the reader is L, and the number of tags to be recognized is n. When there are k tags responding simultaneously in one time slot [3] , its probability follows the binomial distribution: Therefore, the probability of successful slot time is: The number of gaps successfully identified is: The throughput of the system is as follows: (6) From the derivation of the upper formula, we can get: (7) So, when the frame length is equal to the number of tags to be identified, the system gets the maximum throughput (Len): (8) According to the above formula, the maximum throughput occurs when the frame length and the number of tags are approximately the same. Because the frame length is fixed in this algorithm, the reading time is longer and serious collisions occur when the number of tags is much larger than the frame length. When the number of tags is much smaller than the frame length, there are too many free slots, And the recognition time will be longer.

Collision Prevention Algorithm Based On Binary Search
Faced with the problem of large amount of information and high communication complexity between the reader and the electronic tag, a dynamic binary search algorithm [4] was proposed. We compared with binary search algorithm (BS). In a dynamic binary search algorithm, when the reader and tag interact with each other, the total length of the data sent and received is N. Under the condition of identifying the same tag, the amount of information transmitted by the algorithm is half of the amount of information transmitted by the binary search algorithm [5] . It can reduce the amount of transmission information and improve the efficiency of the system.
In the binary search algorithm, every transmission of information transmits a complete serial number. So that electronic tags and readers between the amount of information transmission is so large. In order to reduce the amount of information and the complexity of communication between readers and electronic tags, a dynamic binary search algorithm is proposed [6] . In the dynamic binary number search algorithm, the query command that the reader sends to the tag is only a part of the ID serial number. The response of the tag transmits the rest of the ID serial number. This can effectively reduce the amount of information transmitted and improve the efficiency of the system.
As shown in the figure below, the query command sent by the reader contains the N~X bit information from the highest bit to the highest collision bit. label returns(X-1) ~0 bit information. This greatly reduces the amount of information transmitted. When the reader and the tag interact with each other, the sum of the length of the transmitted and received data is N. Under the condition of identifying the same tag, the dynamic binary search algorithm is one-half of the amount of information transmitted by the binary search algorithm. After identifying a tag, the two algorithms will go back to the original node and repeat the algorithm. For the valid range of tag event, RBS algorithm, the first tag can be recognized in the first round of recognition. This process is the same as the BS algorithm. The idea of improvement is that when the first tag is successfully identified, it will not return to the original collision node. Instead, it retreats to the upper layer of the node, the parent node. The steps of the recoverable algorithm are as follows: The reader sends the Request (11111111) command to the tag in scope. The tag responds and sends its own serial number. The reader uses Manchester code to decode the serial number. Iterate through the collision until all labels are identified. At this point. the collision is judged as follows: Case 1: If a collision occurs, it can find the highest collision bit and set the position to 0. Leave the sequence number above this bit unchanged, and the sequence number below this bit is set to 1. Then, it will gets the next Request command parameter and renews the response and sends its own sequence number.
Case 2: If there is no collision, the reader successfully identifies the target tag and executes the Read-data command on the target tag first. Read the information stored by the tag itself. The Unselect command is then executed on the target label to put it into a "dormant" state. Then return to the next node to form a new Request command for the query.

An Improved Anti-collision Algorithm Based on RFID
In this paper, the dynamic frame slot anti-collision algorithm is combined with the return binary search algorithm. An improved anti-collision algorithm is proposed. For example, the shortcomings of dynamic frame slot collision prevention algorithms: Because of the randomness of Aloha algorithm, the phenomenon of "label starvation" is inevitable in the recognition process [7] . And with the number of tags increased, the system efficiency will continue to decline. Moreover, when the initial frame length and the number of tags are different, the recognition time of the system will be longer. The disadvantages of returning the binary search algorithm: When the initial frame length and the number of electronic tags are different, the number of searches is more, and it takes a long time to access all tags [8] . An improved algorithm is presented by combining the two algorithms in the research. In this algorithm, the frame slot algorithm is used to determine some tags, and another algorithm is used to determine the time slot of collision. The combination of the two algorithms can reduce the number of searches and improve the tag throughput. The implementation flow of the algorithm is as follows: Suppose a frame has four slots, and five of the tags collide. All of these tags are analysed by dynamic frame slot Aloha algorithm. And the label 1 and label 5 are read out successfully. The rest of the tags collided in slot 3. After anti-collision processing of time slot 3, D1, D5, and D7 were found to collided. The next is mainly to carry on the data transmission to it. Then, the advantages of the scheme are further proved by the comparison of throughput. After entering the binary search algorithm, the procedure is as follows: Step1. The reader sends the rest (11111111) command to the surrounding, and all tags respond to the reader because in the binary, code with the same number of bits,1 is the largest at all positions. The tags then send their IDs to the reader [9] . The reader will use Mancheste encoding to code and decode to obtain 1x1x001x. After processing, the tags will send the command issued by the next reader (01010001, 0).
Step2. REQUEST(01010001, 0),The three tags lock their own collision bits D0, D4, and D6, which are 010, 001, and 100, respectively. At this point, only the first two tags answered. Returns the remaining bits of their own, which are 10,01, and the reader decodes 0xx. The next time the reader sends the command REQUEST (00).
Step3. For this node, when the reader sends REQUEST (00), the corresponding tag of 001 responds to the command of the reader. Since no other tag collides with it and satisfies the successful reading condition, the reader then exchanges data with the tag. After that, the UNSELECT command is executed. The tag that was successfully read enters the "silent" state and no longer participates in other commands in the reader. Then return to this collision node, process another branch, and send the next command REQUEST (01).
Step4. The reader sends the REQUEST (01) command, and the 010 corresponds to the tag response. No collisions and reader data transfers, and then make it into the "silent" state. Then the collision node is processed and the previous collision node reader sends a command REQUEST (1).
Step5. Reader sends command request (1), Then it sends 100 corresponding tag to respond [10] , and other tags do not respond. Satisfies the successful read condition and transmits data to the reader. After a successful read, deselect command to make it "silent". At this point, all the tags are read.

4.1.The reader search times analysis
The number of searches for n tags identified by BS and DBS algorithms is: (9) The Integ() denotes an upward rounding. However, n in the new anti-collision algorithm is changed into n′. The search times of the new anti-collision algorithm are as follows: (10) Because of the new anti-collision algorithm combined with the fixed-frame slot algorithm, the plot method is used to map different time slots and different label numbers. Do search times analysis with BS and DBS algorithms as shown in figure. It can be seen from the simulateon trend diagram that with the increase of the number of tags, the number of search times of the new anti-collision algorithm is less than that of the traditional binary search algorithm.

4.2.Throughput analysis
The throughput of BS anti-collision algorithm and DBS anti-collision algorithm and the new anti-collision algorithm are respectively: (11) (12) The throughput calculation formulas of Aloha algorithm and slot Aloha algorithm are as fallows: (13) (14) From the formula and Figure, we can see the maximum throughput of Aloha algorithm is 18.4% and slot Aloha algorithm is 36.8%.
From the above analysis, the new binary algorithm is superior to the BS algorithm and DBS algorithm in terms of throughput. It is also superior to ALOHA algorithm and frame slot ALOHA algorithm.