2010 International Conference on Distributed Computing Systems
ASAP: Scalable Identification and Counting for Contactless RFID Systems Chen Qian† , Yunhuai Liu‡ , Hoilun Ngan‡ , Lionel M. Ni‡ ‡ Department of Computer Science and Engineering Hong Kong University of Science and Technology, Email: {yunhuai, cpeglun, ni}@cse.ust.hk † Department of Computer Science The University of Texas at Austin Email:
[email protected]
desired identification protocol for RFID networks should be time-efficient and scalable. Consider such an application of RFID systems: Hong Kong International Airport (HKIA), one of the largest airports with the second largest volume of annual cargo transportations in the world, is one of the earliest RFID system consumers. Every year, HKIA loses more than $20 million to rectify misplaced and mis-transported bags as every mis-location costs $100 in average to relocate the object. As early as August 2005, HKIA began to adopt the RFID technology in its logistic management system, which handles more than 3.6 million tons of cargo annually, and thousands of objects at a snapshot. One important application is thus to identify all bags in the system for package verification purpose. Time efficiency is a great concern because applications are usually in mobile environments. If the identification process lasts too long, mobile objects may have left the reader’s range before being recognized. Moreover, the protocol should be scalable to support large number of tags as in the HKIA cargo transportation system. Privacy-preserving is also a problem [13] [14], which is beyond the scope of this paper. Slotted ALOHA is an intuitive solution, but it does not appear to be scalable. On the other hand, Tree-traversal (Query Tree) has stable performance, but too many reader queries lower the system efficiency. Protocols that combine estimation and identification together are also designed to make identification more efficient [5] [6] [15] [16]. However, these protocols work efficiently only in a limited range of tag cardinalities. Out of this range, the time efficiency decreases sharply according to theoretical and empirical results. A scalable arbitration protocol with stable and high efficiency is desirable for dynamic RFID systems. In this paper, we propose a novel Adaptive Splitting-based Arbitration Protocol (ASAP). ASAP is efficient, cardinalityinsensitive and scalable. ASAP adaptively groups the tags into multiple subsets and estimates the cardinality of each subset during this process. Subsets form a hierarchy. The number of subsets in each hierarchy is always around log n, where n is the tag cardinality. The ALOHA frame with 32
Abstract—The growing importance of operations such as identification, location sensing and object tracking has led to increasing interests in contactless Radio Frequency Identification (RFID) systems. Enjoying the low cost of RFID tags, modern RFID systems tend to be deployed for large-scale mobile objects. Both the theoretical and experimental results suggest that when tags are mobile and with large numbers, two classical MAC layer collision-arbitration protocols, slotted ALOHA and Tree-traversal, do not satisfy the scalability and time-efficiency requirements of many applications. To address this problem, we propose Adaptively Splitting-based Arbitration Protocol (ASAP), a scheme that provides low-latency RFID identification and has stable performance for massive RFID networks. Theoretical analysis and experimental evaluation show that ASAP outperforms most existing collision-arbitration solutions. ASAP is efficient for both small and large deployment of RFID tags, in terms of time and energy cost. Hence it can benefit dynamic and large-scale RFID systems. Keywords-RFID; ALOHA protocol; Collision arbitration;
I. I NTRODUCTION The Radio Frequency Identification (RFID) is a shortrange radio communication technology that has been widely used in many applications such as identity recognition, localization/tracking [1] [2] [3] [4], and population (cardinality) counting [5] [6] [7]. A standard RFID system is mainly composed of two types of devices: RFID tags and readers. RFID tags, labeled with a unique serial number (ID), are used to identify objects such as human beings and items. RFID readers that carry antennas are used to collect the information of RFID tags nearby. The simple structure and low-cost of RFID systems offer promising advantages to applications of large volumes of objects in a mobile environment [8]. Contactless RFID systems are also called RFID Networks. Restricted by the simple structure, however, RFID tags cannot run CSMA-like protocols to avoid link layer collisions. Two classical collision arbitration protocols are commonly used for RFID networks, namely slotted ALOHA [9] and Tree Traversal [10]. If every tag can report the reader without collision, their identities can be recognized. Hence in the context of RFID networks, collision arbitration protocols are also called identification protocols [11] [12]. The 1063-6927/10 $26.00 © 2010 IEEE DOI 10.1109/ICDCS.2010.84
52
slots is enough for up to estimate 232 tags. The estimation and identification are well combined. Compared with Treetraversal which is also cardinality-insensitive, ASAP is able to improve the time efficiency to almost the twice (the detailed value depends on particular system parameters). Elaborated analysis shows that ASAP has a remarkably shorter processing time and lower energy cost, compared with the existing identification protocols for a wide range of tag cardinality. ASAP works efficiently for large-scale RFID systems, and it also performs no worse than other protocols in small-scale applications. Unlike some other approaches, ASAP does not require knowing the approximate tag number of the system in advance. Hence we believe ASAP can be a possible solution for dynamic RFID systems. The efficiency of ASAP does not depend on any performance models. RFID arbitration protocols are also used for counting tag numbers precisely. The only difference from identification is that, the tag reply message can be a very short notification instead of its ID to tell the reader increasing the counter. For counting tasks that do not require the completely precise result, estimation schemes can be applied [5] [6] [7]. The rest of this paper is organized as follows. In Section II, we discuss the system model and some existing works for RFID identification. Section III presents our basic ideas and the detailed protocol design. We show the theoretical analysis in Section IV, and present the experimental performance evaluation in Section V. We conclude our work in Section VI, and indicate possible future work directions.
We define an energy-efficiency metric with the notations named similarly to the time metric.
II. S YSTEM M ODEL AND P RELIMINARY
Two main kinds of protocols are used in arbitrating collisions in ALOHA networks. In the context of RFID networks, collision arbitration protocols are also called identification protocols. The first type of identification is slotted ALOHA [9]. The reader creates an ALOHA frame with a fixed number of time slots. Each tag randomly picks up a slot to transmit back. If a tag responds to a slot without collision, it is successfully identified by the reader. At the end of the frame, the reader acknowledges the successfully identified tags to keep silent in the next round. In the next round, a new frame will be created for those un-identified tags until all the tags are identified. Suppose the frame length is l and the number of tags is n, and k queries are sent for synchronization. For each particular slot, the probability of success is
Re =
B. Existing Protocols
A. System Model The RFID reader can switch between two modes, i.e., sending mode and listening mode. The basic unit of the sending mode is a query, and the basic unit of the listening mode is a listening slot. We denote the time cost for a query and a listening slot by tq and ts respectively. The time cost for switching from one mode to another is tswitch . During a period, let n, Q, S, Nt and W be the number of tags, queries, listening slots, tag replies and switches, respectively. We define the system time-efficiency Rt for every time unit tu , as follows, n tu Q · tq + S · ts + W · tswitch
(2)
The only difference is that active tags need energy Nt · eresp to reply. Usually the time or energy cost of a query is larger than that of a listening slot. A reply only includes the ID of the tag, while a query includes more than that, such as the ID of the reader, the sequence number of this query, the type of targeted tags, the ALOHA frame length, and the information of tag groups for polling. Also the switching time is considered, because both the reader and tags should do some processing before the next round of reading or listening. We try to include more factors in our efficiency model to make it more generalized. Different parameters can be applied for different RFID systems. Other models for RFID efficiency have been proposed in the literature [17] [18] [15]. For example, in [15] the query cost is not counted. This model may be suitable for those systems with low query latency. The efficiency of our proposed protocol, ASAP, does not depend on any particular performance models and parameters. Under other models, ASAP is still (or even more) efficient by our experimental results.
A contactless RFID system mainly consists of two types of components: RFID readers and tags. They communicate via radio signals. The reader broadcasts the interrogation messages (also called queries) and tags give back the response, carrying the desired information such as tag IDs. Since simultaneous responses by two or more tags will lead to response collisions, the reader cannot successfully receive all information in one round of communications. Therefore, the core problem for successful identification is arbitrating tag collisions in RFID networks.
Rt =
n eu Q · eq + S · es + W · eswitch + Nt · eresp
Pr(sucess) = n ·
1 1 · (1 − )n−1 l l
(3)
The efficiency is n(1 − 1l )n−1 tu l · Pr(sucess)tu = k · tq + l · ts + 2k · tswitch k(tq + 2tswitch ) + l · ts (4) Assume n and l are so large that we can omit the constant k. Also assume ts = tu . We can prove R=
(1)
53
Theorem 1: The highest system efficiency happens when l = n. Also, when l = n,
A desired identification protocol for large-scale RFID networks should have a stable system efficiency close to the maximum rate of slotted ALOHA. Based on Theorem 1, an estimation of tag cardinality can help to improve the efficiency of collision arbitration. Recently several tag estimation schemes are proposed [5] [6]. Bonuccelli et al. designed a protocol Tree Slotted ALOHA (TSA) [15] that combines estimation and identification together, so that it processes faster than Tree algorithm. TSA has a good performance when the cardinality is close to 128 so that the Chebyshev’s inequality-based estimation works. However, if the tag cardinality is dynamic and could be relatively large, Estimation results of TSA will eventually be the same for most large cardinalities, and converge very slowly. DTSA [16] enhances the stability of TSA by dynamically apply the previous estimated value to adjust the next estimation. It, however, still requires there are several identifiable slots. In cases like n equal to several thousand, the estimation converges very slowly too. Therefore TSA and DTSA are both cardinality-sensitive. MSS, designed by Namboodiri and Gao [18], reduces the queries of Tree-traversal by opening a multi-slotted response window for each query. It provide significant energy savings compared with classical Tree protocol. ABS [17] is an enhanced tree-based protocol which reduce the number of collisions by exploiting information obtained from the last process of identification. ABS is an inter-process optimization. In this paper, we mainly focus on a single process. STT [19] is proposed to improve the efficiency for RFID tags with different ID distributions.
Rmax = (1 − 1/n)n−1 ≈ 1/e = 36.8% The value 36.8% is a theoretical upper-bound, since we have not included the query and synchronization cost. In real applications, n is dynamic and could become very large. If n = 500 and l = 100, R decreases to 3.3%. If n = 1000 and l = 100, R is only 0.4%, which means in average the reader cannot hear one successful transmission during 100 slots. The efficiency of Slotted ALOHA is cardinalitysensitive, so that makes the system difficult to scale to large tag cardinalities. The second type, Tree-traversal [10] [17] [18] [19] works as follows: The reader sends out a query to ask the tags with IDs prefixed by 0 and 1 to respond to two slots respectively. If there are collisions, the reader increases the prefix length further to 00, 01, 10 and 11, and sends queries asking tags with these prefixes to reply. This process works like a depthfirst (or breadth-first) traversal on a binary tree. We analyze the performance of Tree-traversal under our model. According to [20], the slot cost of tree algorithm is S = 2.885n. The number of query can be approximated by Q = S − n in ideal cases, since a query is needed by every non-leaf node in the tree. Thus, R=
n 1.89n(tq + 2tswitch ) + 2.89nts
tu
(5)
Supposing in an RFID system, ts = tswitch = tu and tq = 2ts , we have R ≈ 10%. Though the efficiency of Treetraversal is lower than the maximum rate of slotted ALOHA, it is cardinality-insensitive. The performance is stable and independent from the tag cardinality. We formally define the concept of cardinality-insensitive as follows: Definition: An RFID arbitration protocol is cardinalityinsensitive if for any cardinality the time (energy) efficiency falls in the range [a − δ, a + δ], where δ is a relatively small value compared with a. In our model, we use δ = 2%. Some other models only consider the number of the listening slots, and use its inverse to represent the efficiency. If the query cost is ignored, then the efficiency of Treetraversal is 35%, which is similar to the maximum rate of slotted ALOHA. Therefore we should use Tree-traversal in any cases because it is much more stable. This conclusion contradicts the experiences of ALOHA networks [9] [10]. Our model provides a reasonable explanation: slotted ALOHA enjoys a high efficiency in ideal cases, but loses the stability; Tree-traversal wins the stability but the efficiency is lower.
III. A DAPTIVELY S PLITTING - BASED A RBITRATION P ROTOCOL (ASAP) In this section, we describe our identification protocol ASAP. ASAP is a combined estimation-identification protocol. We first introduce the Geometric Splitting-based Estimation (GSE), followed by the detailed design of ASAP. We denote the number of tags and frame size by n and l, respectively. We do not consider other sources of identification errors such as poor read rates, ghost tags and occlusions. We also assume every tag can be probed by the single reader. The identification problem in multi-reader scenarios is left for future research. A. Geometric Splitting-based Estimation The Geometric Splitting-based Estimation (GSE) has first been proposed in [6]. Instead of randomly picking a slot to respond, the tag applies a geometric distributed hash function H to its ID. Here geometric distribution means that 1/2t of the IDs have the hash value t. Then each tag responds in the time slot that matches its hash value, and tags in one time slot form a tag subset. In a hash function, let the tags represent the keys and the slots represent the hash values. As illustrated in Fig. 1,
54
slot 1
slot 2
slot 3
slot 4
slot 5
slot 6
slot 7
slot 8
X
X
X
0
1
0
0
0
Prefix of Ones
Fringe
ALOHA frame, named 1st-d frame, and asks all tags to reply in the slots. If collisions happen (it is almost for sure), ASAP splits the whole tag set into multiple subsets. Each subset contains tags that reply to the same collision slot. We push the collision slots follow a particular pattern, i.e., geometric distribution. The first slot contains about half of the n tags. The second slot contains about 1/4 of the n tags. The k-th slot contains about 1/2k tags. Thus if the reader hears an idle or identifiable slot at position t. The collision slot prior to it (the (t − 1)-th slot ) probably contains 1 or 2 tags. The (t − 2)-th slot has about 3 or 4 tag replies (the previous value multiply by 2). The cardinalities of all collision slots as well as the entire tag number can be estimated by the help of GSE. In GSE the number of collision slots only increases logarithmically with the cardinality. Hence as long as the cardinality is not close to 2l (l is the frame length), the estimation in ASAP is always cardinality-insensitive. Estimations used in TSA and DTSA [15] [16] split the entire tag set into 128 slots evenly, and estimate each subset by the number of collision slots. When tag cardinality increases, almost all slots become collisions, which affects the stability. Fig. 2 gives an example of the ASAP operation. Slot 4, 6, 7 and 8 are idle slots. Slot 5 only has one response and therefore the tag in slot 5 is successfully identified. Slot 1, 2 and 3 are collisions slots. Each of them corresponds to one tag subset. These subsets should be further identified. ˜ i . If n ˜i Suppose the estimated cardinality of subset Si is n is smaller than a threshold T like slot 2 and 3, the reader employ a random ALOHA scheme framed by n ˜ i slots to identify the subset Si . According to Theorem 1, it can achieve a high efficiency. If n ˜ i > T like slot 1, the subset should be splitted further by the scheme described in the last paragraph. Numbered by the recursion levels, the frames are named 1st-d frame, 2nd-d frame, ..., kth-d frame. The recursive process is called k-dimensional Splitting.
Suffix of Zeros
HASHING
Figure 1.
An example of GSE
1st-d frame slot 8
0
slot 7
0
slot 6
0
slot 5
1
slot 4
0
slot 3
C
slot 2
C
slot 1
C
2nd-d frame if ni d ǻlog 2 N ȼ call identification()
if ni ! ǻlog 2 N ȼ call KdSplitting() 0
0
0
0
1
C
C
C
k-d frame
Figure 2.
An example of ASAP
we have n tags that are placed into l slots with geometric distribution, i.e., 1/2t of the tags are in the t-th slot. Therefore, approximately n/2 responses are in the time slot 1, n/4 are in the time slot 2...and n/2t are in the time slot t. Thus, the k-th bit in the merged bitmap BM [k] will almost certainly be zero if k log2 n, and be one if k log2 n. The fringe consists zeros and ones for the k whose value is near log2 n. We can estimate the tag number by: Estimator 1. n ˜ = λ × 2P0 = 1.2897 × 2P0
C. Enhanced Estimation in ASAP Note that the GSE proposed in [6] cannot directly applied to ASAP. For example it is only able to estimate the entire tag cardinality. Also different hashes are required for kdimensional Splitting. We present an enhanced version of GSE in this section. We first extend GSE to estimate the numbers of tags for subsets s1 , s2 , ..., where the set si contains tags that respond to slot i. If slot i is idle or with a single reply, the cardinality of si will be 0 and 1. To estimate the number of tags in a collision slot si , we have, Estimator 2. If the ith slot is a collision slot, the estimated cardinality of tags that reply in this slot, i.e., the cardinality of si , is (7) n˜i = 1.2897 × 2P0 −i
(6)
is an estimator of the tag number n, where P0 is the position of the first idle slot heard by the reader. This estimator is suggested by [21] and [6]. B. General Architecture of ASAP The design principle of ASAP is based on the simple observation that slotted ALOHA is very inefficient when the tag cardinality increases, while Tree-traversal introduces too much control overhead. ASAP adaptively splits the entire tag set into multiple subsets, and estimates the cardinalities during the splitting. With 32-slot frames, ASAP is stable for up to 232 = 4, 294, 967, 296 tags. Essentially, ASAP uses a combined estimationidentification algorithm. Initially, the reader creates an
where P0 is the position of the first idle slot heard by the reader.
55
Slot 1
Slot 2
Slot 3
Slot 4
1 ASAP LoF
Error of Distribution
ALOHA frame
collision slot
0.8 0.6 0.4 0.2
readable slot
0
idle slot
reader
64
256
1024
4096
16384
65536
Number of Tags
unvisited slot
Figure 4.
interrogation range
Figure 3.
The Error of Geometric Distribution in Real Applications
An example of identification in ASAP
tion(). It first apply random slotted ALOHA. If collisions still exist, the reader uses Tree-traversal to deal with the collisions. An example is depicted in Fig. 3. In Fig. 3, as we know in advance that there are approximately four tags in the subset (but the exact number is five), an ALOHA frame with four slots will likely be sufficient to give each tag a dedicated slot when each tag randomly picks one to transmit. If collisions still happen, each collision slot can be considered as a tree root to continue a Tree-traversal. It stops when every tag is identified. In KdSplitting(), the protocol may require a tag to apply several different hash functions for different K=1, 2, ... It is not specified how to obtain multiple different geometric hash functions in [6]. Here we provide a solution. The position of least-significant bit of zero in binary representation of tag ID is geometric distributed. Let us denote this hash as H . Then we also employ a group of uniform distributed hash functions, e.g., Message-Digest algorithm 5 (MD5) or Secure Hash Algorithm (SHA-1), denoted by H1 , ..., Hk . It is obvious that H (H1 (ID)), ..., H (Hk (ID)) are all geometric distributed hash functions, because Hi (ID)’s rightmost zero also has a probability of 1/2t to be in bit t − 1. The hash values of MD5 are 128-bit, but it is not difficult converting them to the length we want. Note that ASAP does not require the hash computation on each tag. To avoid computing hashes on tags, we just pre-compute the hash values for all tags during the manufacture and write the hash values onto them as hard state. Each tag will select one of the values under the request of the reader. During the splitting process, tags just need to compare its last-used hash value and the hash value in the current query. They do not require extra memory to identify their groups. In LoF, the version of GSE proposed in [6], the estimation accuracy highly depends on tag ID distribution. Non-uniform distributed tags will affect the performance of LoF. Our KdSplitting() scheme alleviates the influence of ID distribution to the accuracy of GSE, because all IDs are re-distributed by each MD5 hash function. Figure 4 shows the (empirical) error of geometric distribution for LoF and ASAP. Another method to generate geometric distribution is to do sequential coin-flipping. It is known that the first head (or tail) appearing in sequential coin-flipping follows geometric
Estimator 2 can be derived by the property of geometric distribution. We can expect that 32 slots are sufficient for the estimation algorithm because few applications could have a cardinality of 232 . Therefore, in ASAP, we fix the frame length as 32. Unlike the protocol in [6], the GSE phase in ASAP does not always finish the entire time-slotted frame. In the other words, for most frames, 32 slots is sufficient but not necessary, because obviously in most cases tag numbers are much lower than 232 . According to Estimator 2, we know that the useful information in GSE is the first idle slot (leftmost zero). Therefore as soon as the reader hears an idle, it immediately probes a “STOP” message and opens one listening slot. On receiving a “STOP”’, all tags that have not replied yet should report to the listening slot. In the example of Fig. 2, all tags after slot 5 (if any) should reply to slot 5. We can expect that the number of these tags will not be very large. This technique compresses the listening slots from 32 to about log n+1. It benefits the identifications for which log n 32. D. k-dimensional Splitting The simple version of ASAP protocol immediately applies slotted ALOHA using the estimated values as frame lengths to identify each tag subsets. However, it is suggested that ALOHA should not use long frames due to the time synchronization problem [22]. Therefore, for some si with relatively large size, the protocol splits it further by the kthd frames using different geometric hash functions which is called k-dimensional splitting. In ASAP, we set the threshold as 32. More specifically, the reader performs a splitting by calling the function KdSplitting() when n ˜ i > 32. The algorithm KdSplitting() recursively applies GSE to split the tag sets like Fig. 2. When otherwise, i.e., a subset has an estimated cardinality smaller than 32, the identification scheme is called. KdSplitting() can either be depth-first or breadth-first. Here we use the depth-first one. When an un-identified subsets si whose estimated cardinality is smaller than 32, we call the algorithm Identifica-
56
distribution. Recent progress in RFID hardware show that coin-flipping can be done in RFID tags on some bits which predictably power up randomly [23].
approximately n slots for all identification frames
ĂĂ
Layer 0 Layer 1 Layer 2
IV. A NALYSIS AND D ISCUSSION
Ă Ă
Ă Ă
The most significant performance metrics of identification protocols include the processing time (latency) and the energy consumed. Here we analyze them respectively by developing several analytical models. The time and energy cost models are both based on the sequential (SEQ) operation. The sequential operation is a half-duplex operation where the reader sends out the query message for a specific period, and then changes its mode to listen to the responses until the end of the ALOHA frame. We consider both reader queries and tag responses in the analysis model. Our analysis only focuses on average cases.
Layer L
Figure 5.
Identification Tree
where j < T . Adding the left and right sides of all these inequalities, we obtain, Qs (n) =
T
2j−1 log2 M +
j=1
A. Time Cost Analysis Since
Consider the model described in Section II.A. We present the total number of queries, slots, switches and responses as functions of n. The total time cost can be expressed as T (n) = Q(n)tq + S(n)ts + W (n)tswitch , where Q(n) is the number of queries and S(n) is the number of total time slots required for identifying n tags. We first determine the value of the number of queries Q(n). We can express Q(n) as Qs (n)+Qi (n), where Qs (n) is the number of queries sent in KdSplitting() and Qi (n) is that of Identification(). Qs (n) can further be consider to equal to the times of calling KdSplitting() plus the times of calling Identification() in KdSplitting(). As described in our protocol, after LoF estimation, tag sets whose cardinality is less than or equal to M = 32 are have to call KdSplitting() and others call Identification(). Let T represent the average threshold position of these two kinds of sets. We have 2nT ≈ M because the splitting stops when the set’s cardinality is less than or equal to M . We derive, n (8) T ≈ log2 < log2 n M
T
Qs n/2i
2j−1 (T − j).
j=1
j2j = (T − 1)2T +1 − 1,
j=1
n n log2 log2 n + (10) M M Since log2 n < M = 32, the complexity of Qs (n) is much less than O(n). The value of Qi (n) will be determined later. We then compute the number of total time slots required, S(n). We can express S(n) as Ss (n)+Si (n), where Ss (n) is the number of time slots required in KdSplitting() and Si (n) is that of Identification(). The total number of queries for KdSplitting() is the second term of (11). Four additional time units to send the “Stop” messages should also be included. It is easy to get, Qs (n) =
n(log2 n + 4)