04344833

4
Design of Hash-tree Anti-collision Algorithm Hong Zhang Lei Han Yu-Lu Li Dept. of Computer Science Dept. of Computer Engineering, Jiangsu Changzhou & Technology, CUMT, Nanjing Institute of Technology, Power Supply Company, Xuzhou, China Nanjing, China Changzhou, China [email protected] [email protected] [email protected] Abstract In RFID system, the problem of the collision between tags is a focus topic. The Hash-tree anti-collision algorithm was proposed in the paper, which adopted hash operation to allocate slots for tags and used tree searching method to identify collision tags in the queue of collision slots. The proposed algorithm doesn’t require readers to test the precise location of collision bits, and its performance beyond 36.8% is better than ALOHA- based algorithms. 1. Introduction Radio Frequency Identification (RFID) came forth in the 1940s, and developed in the 1980s. RFID is a means of storing and retrieving data through electromagnetic transmission to an radio frequency compatible integrated circuit. RFID systems are generally composed of tags and readers. Readers are in charge of sending broadcast and receiving identification information, and tags will send identification information while receiving broadcast. A collision would happen when more than one tag sending identification information at the same time, and the solution of voiding collision is known as the anti-collision algorithm [1] . Anti-collision algorithm affects the efficiency and performance of RFID system. For anti-collision algorithms, EPCglobal proposed Bit-based Binary Tree algorithm and ALOHA-based algorithm, otherwise, ISO proposed the Adaptive Protocol which is similar to the ALOHA-based algorithm. [2] But Bit-based Binary Tree algorithm has the limitation that readers must detect the exact location of collision bits. So some scholars committed to the improvement of the ALOHA-based anti- collision algorithms, and among those achievements, the Enhanced Dynamic Framed Slotted ALOHA (EDFSA) anti-collision algorithm proposed by reference [5] is the best, whose system efficiency is between 34.6% and 36.8%. Today, the application of RFID technology is This work was supported by NSFC (60372102), Natural Science Foundation of Jiangsu province of China (BK2005021), and DFDP (20030290011), and Research Fund for National Laboratory of New Computer Technology (A200309). wider and wider, and the number of users is increasing dramatically. So the probability of tag collision improves greatly, the system efficiency between 34.6% and 36.8% can not meet today’s development. Therefore, the paper presents the Hash-tree anti-collision algorithm, which improves further the system efficiency. 2. Hash-tree anti-collision algorithm The section began with some basic concepts, and then analyzed main issues to be resolved, and designed the algorithm finally. 2.1. Related concepts 2.1.1. Slot. The communication between readers and tags is completed in a special time, and we call the special time as a slot. If a slot is filled with only one tag, the slot will be called as One Slot, the same token, there are Empty Slot or Collision Slot when no or more than one tags in a slot. 2.1.2. Frame. There is a group of slots after readers’ broadcasting used to receive information from tags. And the group of slots constitutes a frame, and the number of slots in frame is called as the frame size. In the paper, L donates the frame size, and a triple of numbers< c 0 , c 1 , c k >that quantify respectively the Empty Slot, One Slot, and Collision Slot. 2.1.3. Hash operation. Hash operations normally complete mapping from one data set to another. In the paper, with hash operation, tags calculate their slot number according to their keys. 2.1.4. Hash-tree anti-collision algorithm. Hash-tree anti-collision algorithm is proposed in this paper. A tag chooses a particular slot using hash operations, and then sends its own identification information in the slot. If tags collision happened, the reader would further identifying collision tags by tree searching method, therefore, the paper call the algorithm as Hash-tree anti-collision algorithm. 2.2. Analysis of main problems Third International Conference on Natural Computation (ICNC 2007) 0-7695-2875-9/07 $25.00 © 2007

description

33

Transcript of 04344833

Page 1: 04344833

Design of Hash-tree Anti-collision Algorithm

Hong Zhang Lei Han Yu-Lu Li Dept. of Computer Science Dept. of Computer Engineering, Jiangsu Changzhou & Technology, CUMT, Nanjing Institute of Technology, Power Supply Company,

Xuzhou, China Nanjing, China Changzhou, China [email protected] [email protected] [email protected]

Abstract

In RFID system, the problem of the collision between tags is a focus topic. The Hash-tree anti-collision algorithm was proposed in the paper, which adopted hash operation to allocate slots for tags and used tree searching method to identify collision tags in the queue of collision slots. The proposed algorithm doesn’t require readers to test the precise location of collision bits, and its performance beyond 36.8% is better than ALOHA-based algorithms. 1. Introduction

Radio Frequency Identification (RFID) came forth in the 1940s, and developed in the 1980s. RFID is a means of storing and retrieving data through electromagnetic transmission to an radio frequency compatible integrated circuit. RFID systems are generally composed of tags and readers. Readers are in charge of sending broadcast and receiving identification information, and tags will send identification information while receiving broadcast. A collision would happen when more than one tag sending identification information at the same time, and the solution of voiding collision is known as the anti-collision algorithm [1].

Anti-collision algorithm affects the efficiency and performance of RFID system. For anti-collision algorithms, EPCglobal proposed Bit-based Binary Tree algorithm and ALOHA-based algorithm, otherwise, ISO proposed the Adaptive Protocol which is similar to the ALOHA-based algorithm.[2] But Bit-based Binary Tree algorithm has the limitation that readers must detect the exact location of collision bits. So some scholars committed to the improvement of the ALOHA-based anti-collision algorithms, and among those achievements, the Enhanced Dynamic Framed Slotted ALOHA (EDFSA) anti-collision algorithm proposed by reference [5] is the best, whose system efficiency is between 34.6% and 36.8%. Today, the application of RFID technology is This work was supported by NSFC (60372102), Natural Science Foundation of Jiangsu province of China (BK2005021), and DFDP (20030290011), and Research Fund for National Laboratory of New Computer Technology (A200309).

wider and wider, and the number of users is increasing dramatically. So the probability of tag collision improves greatly, the system efficiency between 34.6% and 36.8% can not meet today’s development. Therefore, the paper presents the Hash-tree anti-collision algorithm, which improves further the system efficiency. 2. Hash-tree anti-collision algorithm

The section began with some basic concepts, and then analyzed main issues to be resolved, and designed the algorithm finally.

2.1. Related concepts 2.1.1. Slot. The communication between readers and tags is completed in a special time, and we call the special time as a slot. If a slot is filled with only one tag, the slot will be called as One Slot, the same token, there are Empty Slot or Collision Slot when no or more than one tags in a slot. 2.1.2. Frame. There is a group of slots after readers’ broadcasting used to receive information from tags. And the group of slots constitutes a frame, and the number of slots in frame is called as the frame size. In the paper, L donates the frame size, and a triple of numbers< c0, c1, ck >that quantify respectively the Empty Slot, One Slot, and Collision Slot. 2.1.3. Hash operation. Hash operations normally complete mapping from one data set to another. In the paper, with hash operation, tags calculate their slot number according to their keys. 2.1.4. Hash-tree anti-collision algorithm. Hash-tree anti-collision algorithm is proposed in this paper. A tag chooses a particular slot using hash operations, and then sends its own identification information in the slot. If tags collision happened, the reader would further identifying collision tags by tree searching method, therefore, the paper call the algorithm as Hash-tree anti-collision algorithm. 2.2. Analysis of main problems

Third International Conference on Natural Computation (ICNC 2007)0-7695-2875-9/07 $25.00 © 2007

Page 2: 04344833

The essence of the anti-collision algorithm is to reduce

collisions. The ideal situation is that frame size is basically equivalent to the number of tags in the reader’s identification region, and all tags send information in different slots. In addition, the algorithm should be able to further identifying collision tags. So the main problems of anti-collision algorithm are slot allocation, frame size adjustment and searching parameters selection. 2.2.1. Slot allocation. In the Hash-tree anti-collision algorithm, tags select slot by hash operation and not by random method. The method is given in Equation (1).

( ) ( / )%hash key key w L= (1) Where key denotes tag’s key, w is a positive integer provided by reader, in order to improve the effect of slot allocation, frame size L should be a prime number. For example, if a tag’s key is 12345, w and L are respectively 59 and 19. According to Equation (1), hash(key) is equal to 0. So the tag whose key is 12345 will send information in slot No.0. 2.2.2. Frame size adjustment. The number of tags is estimated using identification result of the current frame, and then adjusts dynamically the next frame size. The number of tags can be estimated through three methods as follows: (1) 12 kc c ξ+ + (ξ for correction) [3]; (2) 2.3922ck [4]; (3) kc L [5].

The strategy for frame size adjustment in Hash-tree anti-collision algorithm is as follows: If variable 2.3922ck is between variable L and LMAX in current frame, the next frame size will be computed by Prime(L × 2), at this time, the next frame is called as Expansion Frame, and the current frame is the Original Frame of the Expansion Frame; Otherwise, the next frame size is computed by Little(L), the current frame is the next frame’s father. The meaning of symbols is shown in Table 1. 2.2.3. Searching parameters selection. Hash-tree anti-collision algorithm identifies collision tags using tree searching method. In the process of Deep First Search, it is necessary to change the parameters to distribute tags which had collided in father frame into different slots.

Reverse thinking, we know, the difference of tag keys is those contain a varying number of (w × L) .Therefore, the principle of parameters selection is as follows: variable w in sub-frame is the product of the variables w and L in father frame. Clearly, the limitation of Hash-tree anti-collision algorithm is that the value of w is 2n (n is a natural number). The situation is equivalent to comprise every bit of two keys, and there must be one different bit in two different keys, so recursive searching can return. 2.3. Design of Hash-tree algorithm

2.3.1. Design of communication protocol. Readers send the Command (w, L, f, s) to tags, where, f denotes frame number, s denotes slot number. Both variables f and s are used to choose tags to respond reader’s command. Variable w and variable L are parameters for hash operation. After received a command, the tag decides whether or when to respond according to its own variables ftag (frame number) and the stag (slot number). If variable s is equal to -1, tags whose ftag is equal to f or -1 should respond to the reader. If variable s is more than -1, tags whose ftag and stag are respectively equal to f and s should respond to the reader. After received responding information, the reader will transmit confirmation to the tag. 2.3.2. Design of data structure. Table[Num W FLen Squ Flag] is a 2D table, and is used to record identification result in a frame, where, columns shown in the table are respectively frame number, value of variable w, frame size, queue of collision slots, Original Frame flag.

The reader identifies tags by depth tree searching. If variable kc in current frame is equal to 0, the recursive function return. If variable 2.3922ck is between L and LMAX , the reader should search tags in extended frame. If variable 2.3922ck is more than L, the reader should search tags in sub-frame. The recursive function is given as equation (2).

0( ) 2.3922( 1, )

2.3922( 1, )

k

k MAX

k

return cHashTree f L c LHashTree f extend

c LHashTree f child

== < ≤+ ≤+

(2)

2.3.3. Description of Hash-tree algorithm. Symbols for algorithm description are given in Table 1. Now we describe the hash-tree anti-collision algorithm in two parts, both reader algorithm and tag algorithm. The program list of reader algorithm is as following: STEP1:L=59,w=1,f=0, s=-1; STEP2:Command (w, L, f, s); squ=Generate_queue();

Add_recorder(f, w, L, squ, 0); STEP3:if (!ck) { delete(f); f--; goto STEP7;} else goto STEP4; STEP4:if (2.3922ck>=L) goto STEP5; else goto STEP6; STEP5:if(prime(2*L)>LMAX) goto STEP6;

else { L=prime(2*L); s=-1; w=1; SetFlag(f); f++; Command(w, L, f, s); squ=Generate_queue(); Add_recorder(f, w, L, squ, 0); } goto STEP3;

STEP6:if (Len(f)>5) L=5; else L=Little(Len(f)); s=Slot(f); w=Len(f)*Weight(f); f++;

Command(w, L, f, s); squ=Generate_queue(); Add_recorder(f, w, L, squ, 0); goto STEP3;

STEP7:if(Flag(f)) {delete(f); f--; goto STEP9;} else goto STEP8;

STEP8:deleteSlot(f); if(Slot(f)==-1) {delete(f); f--; goto STEP9; } else goto STEP6;

Third International Conference on Natural Computation (ICNC 2007)0-7695-2875-9/07 $25.00 © 2007

Page 3: 04344833

STEP9:if(f<0) Algorithm is over; else goto STEP7; The procedure of tag algorithm lists following:

STEP1:ftag=stag=-1; STEP2:to receive Command(w, L, f, s); STEP3:if (s==-1||f==ftag) {

compute stag according to formula(1); send data in slot Number stag ; } STEP4:if (receive confirmation from reader) { algorithm end;} else { ftag ++; goto STEP2; }

Table 1. Symbols for algorithm description Symbol Name Significance Little(x) return a prime number not more

than variable x Generate_queue() queue of collision slots in current

frame Slot(f) return 1st element of Squ in frame

No. f, if Squ is empty, return -1 deleteSlot(f) delete 1st element of Squ in frame

No. f Len(f) return the size of frame No. f Weight(f) return the product of all w in table

from frame No. f to frame No.0 Prime(x) return a prime number closest to x SetFlag(f) set the Flag of frame No. f Flag(f) return the Flag of frame No. f Add_recorder( f, w, L, squ, flag)

adding to record [f Table w L squ flag]

delete(f) delete record of the frame No. f LMAX maximal frame size allowed

3. Analysis and verification of Hash-tree algorithm

We compared the performance of the proposed algorithm with that of EDFSA algorithm proposed by reference [5] in two parts, both system efficiency and identification time. Firstly, we analyzed the evaluation model of system efficiency. And then we proved that the system efficiency expectation of the proposed algorithm was beyond 36.8%. Finally, in the simulation environment, the difference of identification time between the proposed algorithm and EDFSA algorithm was given . 3.1. Analysis of System Efficiency

In this section, we introduce system efficiency standard from reference [5], and define system efficiency α as formula (3) below.

1 100%cL

α = × (3)

Following, n denotes the actual number of tags in the readers’ identification region; m denotes the whole number of tags’ key. Variable pk is the probability that a slot occupied by k tags. Variable ak is the expectation of the number of slots occupied by k tags. In probability

theory, a1 can be used to estimate c1, so the expectation of system efficiency (η ) can be defined as formula (4).

1( ) 100%aL

η α= Ε = × (4)

In the first frame of the proposed algorithm, variable w is 1, and all the tags will be divided into L groups, each with m/L tags. The situation that k tags occupy the same time slot is caused by k tags in one group appeared randomly in reader’s identification region. Therefore, we can describe pk-expression for the first frame as formula (5). According to the principle of parameters selection, the space of keys will be smaller and smaller after the first frame. The system efficiency can be got from discussing the characteristics function of the first frame.

( ) ( )1k m L kk

m Lp L m L m

k−

= −

(5)

From (4) and (5) ,we got,

( )1 11

1 1 m La LpL L p L mη −= = = = −

Marking /m L as r, we got ( )1 11 rrη −= − (6) From (6), we got,

( ) ( )( )

( ) ( )1 1 ln 12

1 ln 11

r rr r rd edr r rη − −− − − − =

− (7)

According to Maclaurin formula, we got

( )2ln ln 1 2rr e r r−− = ≈ − +

and differentiate (7),we got,

( ) ( ) ( )( )

( ) ( )2

1 1 ln 12

1 ln 1 2 ln 10

1r r

r r r rd edr r rη − −

− − + − − = >−

(0 1r< ≤ ) (8)

( )1 1 1

0 0lim lim 1 36.8%r

r rr eη − −

→ →= − = = (9)

From (8) and (9), we know η is Monotonous increasing function. When r is closing to 0, η reach to the minimum limit 36.8%. In other words, when the frame size is much smaller than the number of keys, the expectation of system efficiency is 36.8%. System efficiency will be increasing with the proportion between the frame size and the number of keys.

Assuming the second frame is not the expansion frame of the first frame, we get that variable w of the second frame is equal to L of the first frame according to the principle of frame size adjustment. Using L’ to denote the second frame size, we will get kp and η as following.

'' '1'

mk kLL

k

mLL LLp LLm mk

− = −

(10)

Third International Conference on Natural Computation (ICNC 2007)0-7695-2875-9/07 $25.00 © 2007

Page 4: 04344833

1'

1'' / ' 1

mLLLLL p L

− = = −

(11)

Clearly, 'LL

mis larger than

Lm

, and that η is

Monotonous increasing function has be proved ahead. Therefore, the system efficiency of the first frame is smaller than that of the second frame. The expectation of system efficiency is larger and larger with frame number increasing, and its range is between 36.8% and 1.

Using the principle that system efficiency reaches to maximum 36.8% when the number of tags is equal to frame size, EDFSA algorithm keeps system efficiency between 34.6% and 36.8% by the method of dividing tags into several groups.

In a word, the system efficiency of Hash-tree anti-collision algorithm breaks through 38.6%, and excelled ALOHA-based algorithm.

3.2. Identification time comparison

According to basic ideas of both anti-collision algorithm EDFSA and Hash-tree, we realize the simulation program. In the simulation environment, LMAX in both algorithms is 256, and the initial frame size of EDFSA is 10, the relation between identification time (t) and the number of tags (n) is shown in figure 1. When n is less than 60, EDFSA algorithm is better than Hash-tree anti-collision algorithm, it is because the initial frame size of Hash-tree anti-collision algorithm is 59, and maybe waste slot time when n is less than 59. When n is more than 60, Identification time of both algorithms increase linearly with the number of tags. This shows that the two algorithms have the function of selecting tags to respond. But slopes of the two curves are different, Hash-tree anti-collision algorithm is better than EDFSA with a large number of tags, This also shows that the system efficiency of the proposed algorithm is higher than that of EDFSA algorithm.

4. Conclusion

The paper proposed an anti-collision algorithm, hash-

tree anti-collision algorithm, which has many merits such as higher system efficiency, simple and so on. The

system efficiency of Hash-tree algorithm is beyond 36.8%, better than that of EDFSA algorithm. However, the Hash-tree algorithm is simpler than the Bit-based Binary Tree algorithm, doesn’t need readers to detect the exact location of collision bits. Simulation results show that the number of tags more than 60, particularly with the large number of tags, the algorithm shown an obvious advantage. In addition, Hash-tree anti-collision algorithm has theoretical significance to solve anti-collision problem, and is bound to promote RFID system to be used in the mine tracking system, vehicle monitoring, electronic payments, and other fields.

0

1000

2000

3000

4000

5000

6000

10 30 50 150

250

350

450

550

650

750

850

950 n

t (ms)

EDFSA HashTr ee

Figure 1. Tag identification time for the number of tags

References [1] Songsen Yu, Yiju Zhan.Anti-collision Algorithm Based on Jumping and Dynamic Searching and Its Analysis. Computer Engineering, 2005, 31(9). [2] Peter Bawkes, Consultant to BTG International Ltd. Anti-collision and Transponder Selection Methods for Grouped “Vicinity” Cards and RFID tags. RFID Technology, 1999. [3] H. Vogt. Multiple Object Identification with Passive RFID Tags. 2002 IEEE International Conference on Systems, Man and Cybernetics, October 2002. [4] Jae-Ryong Cha, Jae-Hyun Kim. Novel Anti-collision Algorithms for Fast Object Identification in RFID System. ICPADS’05, 2005. [5] Su-Ryun Lee, Sung-Don Joo, Chae-Woo Lee. An Enhanced Dynamic Framed Slotted ALOHA Algorithm for RFID Tag. MobiQuitous’05, 2005.

Third International Conference on Natural Computation (ICNC 2007)0-7695-2875-9/07 $25.00 © 2007