LC-DFSA: Low Complexity Dynamic Frame Slotted Aloha Anti-Collision Algorithm for RFID System

With the rapid development of the Internet of Things (IoT), the radio frequency identification (RFID) system becomes increasingly important. Tag identification is a basic problem of the RFID system, whose purpose is to inventory tags. However, in recent years, it requires a very short time for massive tag identification, which brings serious challenges. The traditional Aloha based anti-collision algorithms have disadvantages of either low efficiency or high complexity. Therefore, this article proposes a low complexity dynamic frame slotted Aloha (DFSA) anti-collision algorithm, named LC-DFSA. The reader can estimate the range of tag numbers according to the last frame size, the number of successful slots and the ratio of idle slots. Then the optimal frame size can be calculated. Complexity analysis is deployed in this article, and we validate the correctness of the analysis. Through our simulations, LC-DFSA outperforms other schemes in both the average access efficiency and the algorithm complexity. It also can be conveniently applied to engineering implementations.


Introduction
Over the years, with the rapid development of information technology, the Internet of Things (IoT) has begun to penetrate into people's lives [1]. IoT realizes the Internet of everything through sensor technology, communication technology, network technology and so on [2]. Radio frequency identification (RFID) is an important part of IoT.
Tag identification is a basic and important problem in the RFID system [3]. It is implemented by information exchanged between a reader and many tags, which are attached to different objects [4]. Nowadays, due to the higher demand of logistics [5], warehouse inventory [6], vehicle [7] and other scenarios [8][9][10], tag identification has to face to tricky challenges: to identify massive tags in a very short amount of time. Therefore, high efficient tag identification with low complexity is quite important.
As an important issue of tag identification, response collision needs attentions. In the ISO/IEC 18000 standard, solutions to collision problems are mentioned. Anti-collision techniques can be roughly divided into two types: protocols based on Aloha and protocols based on Binary Tree. For example, in ISO/IEC 18000-6 [11], mode A is a kind of Aloha based protocol, while mode B is a protocol based on Binary Tree. Mode A explicitly proposes the concept of the Dynamic Frame Slotted Aloha (DFSA) algorithm. However, it does not specify how to achieve it.
Some specific DFSA algorithms have been put forward. Mustapha et al. [12] proposed a Tag Estimation Method (TEM) that combined Bayesian and lower bound estimating. Chu et al. [13] estimated tag population through an enhanced Bayesian Method used in the physical layer. Wang et al. [14] used the secant iteration method to estimate the number of tags. Chen [15] performed once early judgment to adjust frame sizes. HajMirzaei [16] proposed a TEM based on Manchester encoding, and Chen [17] • This paper proposes a low complexity anti-collision algorithm named LC-DFSA, which can be conveniently applied to engineering implementations. • Meanwhile, the computational and signaling complexity of LC-DFSA is low for a passive RFID system, and the compatibility for the standard framework is good as well.
The rest of this paper is arranged as follows. In the Section 2, Aloha based algorithms are briefly reviewed. The LC-DFSA algorithm will be introduced in the Section 3. After that, Section 4 concludes simulation results and analysis, and Section 5 summarizes this paper in the end.

Brief Introduction to Aloha Based Anti-Collision Algorithm
Anti-collision algorithms based on Aloha can be roughly divided into five categories [18]: Pure Aloha (PA), Slotted Aloha (SA), Frame Slotted Aloha (FSA), DFSA and Enhanced Dynamic Frame Slotted Aloha (EDFSA).
Pure Aloha (PA): When tags are in the communication range of a reader, they will automatically reply their ID to the reader immediately. Then it will result in three situations: successful identification, complete collision and partial collision. If current identification is failed, the tag will respond again after a random interval of time, and the above steps repeat until all tags are identified by the reader successfully.
Slotted Aloha (SA): Continuous time is split into discrete slots. All tags can only respond at the beginning of the slot. Since the slot duration is longer than that of response, SA avoids partial collisions and improves the efficiency of RFID.
Frame Slotted Aloha (FSA): Several slots make up one frame. Each tag can only respond once in one frame, which can alleviate the problem of frequent response of some tags.
DFSA: After a frame, the reader can dynamically adjust the size of next frame according to the current situation. Therefore, it can improve the efficiency of the RFID system no matter how many tags there are.
Enhanced Dynamic Frame Slotted Aloha (EDFSA): Because the maximum frame size in mode A is 256 [11], when the tag population is larger, the efficiency of the RFID system decreases rapidly. Therefore, tags can be grouped and identified in turn when the tag amount is larger. EDFSA has greatly improved the efficiency of large-scale tag identification.

Motivation
It is always the case in tag identification that the tag population is unknown. As shown in Figures 1 and 2, when the tag number is much larger than the frame size, collisions will be serious. It will spend more frames to identify all tags. But when the tag number is much smaller than the frame size, plenty of idle slots will be wasted. It will also lead to the reduction of overall efficiency. Therefore, we need an algorithm that can adjust the frame size dynamically. In this way, no matter what the tag number is, tag identification can maintain high efficiency all the time.
Sensors 2020, 20, x FOR PEER REVIEW 3 of 13 spend more frames to identify all tags. But when the tag number is much smaller than the frame size, plenty of idle slots will be wasted. It will also lead to the reduction of overall efficiency. Therefore, we need an algorithm that can adjust the frame size dynamically. In this way, no matter what the tag number is, tag identification can maintain high efficiency all the time.

Key Idea
If the tag number is known, we can calculate the appropriate frame size to maximize access efficiency. Since frame sizes may not be continuous natural numbers, different tag numbers may correspond to the same optimal frame size. Therefore, even if the number of tags is unknown, if the approximate range of tag numbers can be estimated, the optimal frame size also can be determined. Figure 3 shows the process of tag identification.   Sensors 2020, 20, x FOR PEER REVIEW 3 of 13 spend more frames to identify all tags. But when the tag number is much smaller than the frame size, plenty of idle slots will be wasted. It will also lead to the reduction of overall efficiency. Therefore, we need an algorithm that can adjust the frame size dynamically. In this way, no matter what the tag number is, tag identification can maintain high efficiency all the time.

Key Idea
If the tag number is known, we can calculate the appropriate frame size to maximize access efficiency. Since frame sizes may not be continuous natural numbers, different tag numbers may correspond to the same optimal frame size. Therefore, even if the number of tags is unknown, if the approximate range of tag numbers can be estimated, the optimal frame size also can be determined. Figure 3 shows the process of tag identification.

Key Idea
If the tag number is known, we can calculate the appropriate frame size to maximize access efficiency. Since frame sizes may not be continuous natural numbers, different tag numbers may correspond to the same optimal frame size. Therefore, even if the number of tags is unknown, if the approximate range of tag numbers can be estimated, the optimal frame size also can be determined. Figure 3 shows the process of tag identification.
Sensors 2020, 20, x FOR PEER REVIEW 3 of 13 spend more frames to identify all tags. But when the tag number is much smaller than the frame size, plenty of idle slots will be wasted. It will also lead to the reduction of overall efficiency. Therefore, we need an algorithm that can adjust the frame size dynamically. In this way, no matter what the tag number is, tag identification can maintain high efficiency all the time.

Key Idea
If the tag number is known, we can calculate the appropriate frame size to maximize access efficiency. Since frame sizes may not be continuous natural numbers, different tag numbers may correspond to the same optimal frame size. Therefore, even if the number of tags is unknown, if the approximate range of tag numbers can be estimated, the optimal frame size also can be determined. Figure 3 shows the process of tag identification.   In this paper, the corresponding relationship between tag numbers and optimal frame sizes is obtained through access efficiency. Then, the optimal size of next frame can be calculated by the last frame size, successful slots number and the ratio of idle slots.

Optimal Frame Size
Assuming that the tag number is fixed, it is obvious that the frame size can be neither too large nor too small. Therefore, in the case of a fixed tag number, it is necessary to determine the optimal frame size, so as to reach the highest efficiency. Table 1 shows some notations which will be used in the theoretical analysis. Probability that a tag is successful in a slot P I Probability that a slot is idle η S Expected ratio of successful slots in a frame η I Expected ratio of idle slots in a frame For a particular slot, the probability that each tag chooses the slot is 1 N and the probability of selecting other slots is 1 − 1 N . So, the probability of a successful slot is given by: and the probability that a tag is successful in a frame is: Then we can get the expected successful tags number in a frame, which is: Therefore, the expected value of access efficiency can be calculated as: As we can see from Equation (4), η S is a function of M and N. When M is fixed, η S will be a unary function of N. In order to maximize η S , perform: Then we get: As shown in Figure 4, the maximum access efficiency will be realized if the frame size is equal to the tag number.

Tag Number-Optimal Frame Size Table
In ISO/IEC 18000-6, the frame size can only be taken from the several discrete values [11], assuming that frame sizes are the values from a discrete integer sequence However, the range of tag numbers belongs to positive integers. It is almost impossible that the frame size is exactly the same as the tag number all of the time. Therefore, when the tag number is fixed, we need to confirm the available optimal frame size to maximize access efficiency. Eventually, we can get the relationship between optimal frame sizes and tag numbers. For a fixed tag number M , there are many frame sizes that can be chosen. Through S  , we can calculate the maximum access efficiency and determine the optimal frame size.
As we can see from Equation (4) The demarcation points Dem i M are the solution of Equation (7): Demarcation points are the boundary values of the ranges of tag numbers. If the actual tag number is between N  will become the optimal size of next frame. When frame sizes are restricted to the power of 2, the demarcation points are shown, as in Table 2.  The tag number-optimal frame size table is shown in Table 3. For example, if the tag number is 70, the RFID system will get the highest efficiency when the frame size is 64. Efficiency will be lower if the frame size is 32 or any other number.

Tag Number-Optimal Frame Size Table
In ISO/IEC 18000-6, the frame size can only be taken from the several discrete values [11], assuming that frame sizes are the values from a discrete integer sequence {N 1 , N 2 , N 3 , · · · · · · , N max }. However, the range of tag numbers belongs to positive integers. It is almost impossible that the frame size is exactly the same as the tag number all of the time. Therefore, when the tag number is fixed, we need to confirm the available optimal frame size to maximize access efficiency. Eventually, we can get the relationship between optimal frame sizes and tag numbers.
For a fixed tag number M, there are many frame sizes that can be chosen. Through η S , we can calculate the maximum access efficiency and determine the optimal frame size.
As we can see from Equation (4), η S is a function of tag number M and frame size N, and the demarcation points of tag numbers between N i and N i+1 can be calculated through the following equation: The demarcation points M Dem i are the solution of Equation (7): Demarcation points are the boundary values of the ranges of tag numbers. If the actual tag number is between M Dem i and M Dem i+1 , then N i+1 will become the optimal size of next frame. When frame sizes are restricted to the power of 2, the demarcation points are shown, as in Table 2. The tag number-optimal frame size table is shown in Table 3. For example, if the tag number is 70, the RFID system will get the highest efficiency when the frame size is 64. Efficiency will be lower if the frame size is 32 or any other number.

LC-DFSA Algorithm
The size of the last frame, the successful slots number and the ratio of idle slots are used in LC-DFSA to estimate the range of the tag number and to calculate the optimal next frame size.
The probability of appearance of an idle slot is given by: Then the expected idle slots number in a frame is: Therefore, the expected ratio of idle slots can be calculated as: Figure 5 shows the relationship between tag numbers and idle slot ratios when frame sizes are fixed. Idle slot ratio η I is a monotonic minus function of tag number M. Therefore, we can estimate the range of tag numbers by η I due to its monotonicity. Through Equation (8), we can calculate tag number demarcation points, which are M Dem i (i = 1, 2, 3, 4, · · · · · · , max − 1). In order to determine the optimal size of next frame, the demarcation points that we actually use are: M Dem i + N S (i = 1, 2, 3, 4, · · · · · · , max − 1). N S is the actual successful slot number of the last frame. According to the size of the last frame, the reader can get η I for each demarcation point. Then the reader can calculate the actual idle slot ratio Therefore, the range of current tag number M Est can be estimated by comparing η I and η I of the demarcation points. . Then, the size of next frame will be 4 N , which is 16. Figure 6 shows the demarcation points when the last frame size is small, assuming ' 0 S N  . As we can see from Figure 6, when the frame size is much smaller than the tag number, the idle slot ratio curve descends rapidly. It may not be possible to accurately determine the range of tag numbers. For example, assume that the size of the last frame is 8 and ' 0 S N  . When ' 0 i N  , the next frame size will be max N according to our algorithm above. However, the actual tag number may be only 50. It will waste plenty of slots in this case. To solve the problem, we can analyze the border of successful, idle and collision slot ratios. Figure 7 shows the ratios of idle, successful and collision slots when the frame size is 32. If the tag number is larger than
If the tag number is larger than  + N S . Then, the size of next frame will be N 4 , which is 16. Figure 6 shows the demarcation points when the last frame size is small, assuming N S = 0. For instance, assume that the last frame size is 32 and ' I  is between . Then, the size of next frame will be 4 N , which is 16. Figure 6 shows the demarcation points when the last frame size is small, assuming ' 0 S N  . As we can see from Figure 6, when the frame size is much smaller than the tag number, the idle slot ratio curve descends rapidly. It may not be possible to accurately determine the range of tag numbers. For example, assume that the size of the last frame is 8 and ' 0 S N  . When ' 0 i N  , the next frame size will be max N according to our algorithm above. However, the actual tag number may be only 50. It will waste plenty of slots in this case. To solve the problem, we can analyze the border of successful, idle and collision slot ratios. Figure 7 shows the ratios of idle, successful and collision slots when the frame size is 32. If the tag number is larger than
If the tag number is larger than  As we can see from Figure 6, when the frame size is much smaller than the tag number, the idle slot ratio curve descends rapidly. It may not be possible to accurately determine the range of tag numbers. For example, assume that the size of the last frame is 8 and N S = 0. When N i = 0, the next frame size will be N max according to our algorithm above. However, the actual tag number may be only 50. It will waste plenty of slots in this case. To solve the problem, we can analyze the border of successful, idle and collision slot ratios. Figure 7 shows the ratios of idle, successful and collision slots when the frame size is 32. If the tag number is larger than M Border Idle , the probability of N I = 0 will be very high. M Border Idle is the solution of Equation (12).

of 13
If the tag number is larger than M Border Suc , the actual number of successful slots will be likely to reduce to 0. M Border Suc is the solution of Equation (13).
In the case of that the tag number is larger than M Border Coll , all slots in the frame will be almost in collision. M Border Coll is the solution of Equation (14).
Sensors 2020, 20, x FOR PEER REVIEW 8 of 13 In the case of that the tag number is larger than Border Coll M , all slots in the frame will be almost in collision.
Border Coll M is the solution of Equation (14).

5:
Next N will be calculated by  Therefore, as Algorithm 1 presents, when N I = 0 and N S > 0, it means that the actual remaining tags may not be so many. The tag number will be estimated as M Border Idle conservatively, and the next frame size can be calculated through the relationship between tag numbers and optimal frame sizes. Meanwhile, when N I = 0 and N S = 0, the next frame size will be determined through M Border Coll , and if N I > 0, we can calculate the next frame size according to M Est directly. Then, start a new frame and repeat above steps until all the tags are identified. If N S = 0 5: N Next will be calculated by M Border Coll . 6: Else 7: N Next will be calculated by M Border Idle . 8: Else 9: Calculate η I and η I (M Dem i + N S ). 10: Compare η I and η I (M Dem i + N S ). And get M Est . 11: N Next will be calculated by M Est directly. 12: Start a new frame with N Next slots. 13: Else 14: Tag inventory completes.

Complexity Analysis
As shown in Table 4, the LC-DFSA algorithm performs normal signaling interactions of standard ISO/IEC 18000-6, which leads to its lowest signaling complexity. Chen [15] could achieve low complexity based on the normal signaling interactions of the Q-algorithm. The signaling complexity of Wang and Chen [17] would be a little bit higher due to their continuous frame sizes. However, HajMirzaei increased the signaling overhead a lot to improve the estimation accuracy of tag numbers. Therefore, the signaling complexity of HajMirzaei was the highest. Table 4. Complexity comparison.

Different Algorithms Signaling Complexity Computational Complexity Standard Compatibility
Wang [14] Normal Normal Good Chen [15] Low Low Normal HajMirzaei [16] High Low Good Chen [17] Normal High Good LC-DFSA Low Low Good As for computational complexity, all the demarcation points and border values of LC-DFSA can save in the memory of the reader. Thus, the computational complexity of the LC-DFSA algorithm is low. Chen [15] estimated the tag number as S i + 2.39C i , which needs few computing resources. Chen [17] would calculate the probability of each possible number of tags through the multinomial distribution formula, and then would find the tag number, which has the maximum probability. It costs a lot of resources, so it is unavailable for engineering implementation. Wang solved a transcendental equation by secant iteration and eliminated the pseudo solution, which increased its computational complexity; HajMirzaei only performed some simple calculations and comparisons, which led to its low computational complexity.
Standard compatibility is also important for anti-collision algorithms. Chen [15] could only achieve within the framework of the UHF Class-1 Generation-2 RFID Standard [19], which lowered the compatibility for standards. However, the others can be applied in not only ISO/IEC 18000-6A, but also ISO/IEC 18000-6C, whose framework is the same as UHF Class-1 Generation-2. They have better standard compatibility than Chen [15].

Simulation and Analysis
MATLAB 2018 is used for our simulations. The number of tags ranges from 1000 to 10,000. All simulation results are the average value of 5000 simulations. The initial frame sizes of all the algorithms are set as 1024 in our simulations. The frame sizes {N 1 , N 2 , N 3 , · · · · · · , N max } in the LC-DFSA algorithm are restricted to the power of 2, and the check point of Chen [15] is 3L 4 th. In Figure 8, the blue line represents the actual frame sizes of the LC-DFSA algorithm, while the red line shows the optimal frame sizes. The tag number is 10,000 and the initial frame size is set as 1024. In this case, 10,000 tags can be identified after 30 frames. According to the simulation results, after the second frame, the actual frame sizes are consistent with the optimal frame sizes, which shows the effectiveness of the LC-DFSA algorithm. Figure 9 shows the access efficiency of different algorithms, which is also known as throughput. From the results, HajMirzaei has the worst performance among these three algorithms. When the tag number is smaller than 4000, the difference between Chen's efficiency and LC-DFSA's efficiency is small, and as the tag number increases further, the efficiency of Chen decreases. The accuracy of S i + 2.39C i is worse when the tag number and the frame size are mismatched with each other. The average efficiency of Chen is 0.3309 and that of HajMirzaei is 0.3176. The proposed LC-DFSA algorithm is 0.3448, which is the highest. In this way, the LC-DFSA algorithm improves 4.2% when compared with Chen, and it is an improvement of 5.4% when compared with HajMirzaei. Sensors 2020, 20, x FOR PEER REVIEW 10 of 13 Figure 8. Actual and optimal frame size. Figure 9 shows the access efficiency of different algorithms, which is also known as throughput. From the results, HajMirzaei has the worst performance among these three algorithms. When the tag number is smaller than 4000, the difference between Chen's efficiency and LC-DFSA's efficiency is small, and as the tag number increases further, the efficiency of Chen decreases. The accuracy of  From the view of algorithm complexity, Chen, LC-DFSA and HajMirzaei only perform some fixed calculation and comparison, so the complexity of them are all (1) O . Besides, Figure 10 shows the simulation run time of each algorithm. To some extent, it can be proved that the LC-DFSA algorithm has the lowest complexity. Collision analysis by Manchester encoding increases the overhead of HajMirzaei, and Chen performs the examination in the middle of the frame, which will lead to more frames. Moreover, frame sizes of LC-DFSA are discrete while frame sizes of HajMirzaei can be any natural number. It also lowers the complexity of LC-DFSA.   Figure 9 shows the access efficiency of different algorithms, which is also known as throughput. From the results, HajMirzaei has the worst performance among these three algorithms. When the tag number is smaller than 4000, the difference between Chen's efficiency and LC-DFSA's efficiency is small, and as the tag number increases further, the efficiency of Chen decreases. The accuracy of  From the view of algorithm complexity, Chen, LC-DFSA and HajMirzaei only perform some fixed calculation and comparison, so the complexity of them are all (1) O . Besides, Figure 10 shows the simulation run time of each algorithm. To some extent, it can be proved that the LC-DFSA algorithm has the lowest complexity. Collision analysis by Manchester encoding increases the overhead of HajMirzaei, and Chen performs the examination in the middle of the frame, which will lead to more frames. Moreover, frame sizes of LC-DFSA are discrete while frame sizes of HajMirzaei can be any natural number. It also lowers the complexity of LC-DFSA. From the view of algorithm complexity, Chen, LC-DFSA and HajMirzaei only perform some fixed calculation and comparison, so the complexity of them are all O(1). Besides, Figure 10 shows the simulation run time of each algorithm. To some extent, it can be proved that the LC-DFSA algorithm has the lowest complexity. Collision analysis by Manchester encoding increases the overhead of HajMirzaei, and Chen performs the examination in the middle of the frame, which will lead to more frames. Moreover, frame sizes of LC-DFSA are discrete while frame sizes of HajMirzaei can be any natural number. It also lowers the complexity of LC-DFSA. Figures 11 and 12 show the effect of different initial frame sizes on the access efficiency. As we can see from Figure 11, the initial frame size has a great impact on efficiency. However, if the tag number is larger, then the influence of the initial frame size will be smaller. From Figure 12, it is found that when the initial frame size is small compared with the tag number, there will be stable access efficiency no matter how large the tag amount is. However, when the initial frame size is larger, the efficiency drops dramatically if the tag number is small. Besides, we can also find that there will be the maximum efficiency when the initial frame size is the same as the number of tags.  Figures 11 and 12 show the effect of different initial frame sizes on the access efficiency. As we can see from Figure 11, the initial frame size has a great impact on efficiency. However, if the tag number is larger, then the influence of the initial frame size will be smaller. From Figure 12, it is found that when the initial frame size is small compared with the tag number, there will be stable access efficiency no matter how large the tag amount is. However, when the initial frame size is larger, the efficiency drops dramatically if the tag number is small. Besides, we can also find that there will be the maximum efficiency when the initial frame size is the same as the number of tags.     Figures 11 and 12 show the effect of different initial frame sizes on the access efficiency. As we can see from Figure 11, the initial frame size has a great impact on efficiency. However, if the tag number is larger, then the influence of the initial frame size will be smaller. From Figure 12, it is found that when the initial frame size is small compared with the tag number, there will be stable access efficiency no matter how large the tag amount is. However, when the initial frame size is larger, the efficiency drops dramatically if the tag number is small. Besides, we can also find that there will be the maximum efficiency when the initial frame size is the same as the number of tags.     Figures 11 and 12 show the effect of different initial frame sizes on the access efficiency. As we can see from Figure 11, the initial frame size has a great impact on efficiency. However, if the tag number is larger, then the influence of the initial frame size will be smaller. From Figure 12, it is found that when the initial frame size is small compared with the tag number, there will be stable access efficiency no matter how large the tag amount is. However, when the initial frame size is larger, the efficiency drops dramatically if the tag number is small. Besides, we can also find that there will be the maximum efficiency when the initial frame size is the same as the number of tags.

Conclusions and Future Work
This article proposes the LC-DFSA algorithm with the purpose of complexity reduction and efficiency improvement for RFID systems. The reader can estimate the range of tag numbers according to the demarcation points and border values, which can be calculated through theoretical analyses. Then the size of next frame can be determined by the relationship between tag numbers and optimal frame sizes. Through our simulations, it is found that the complexity of the LC-DFSA algorithm is lower than that of Chen and HajMirzaei, and LC-DFSA also improves efficiency when compared with Chen and HajMirzaei. Therefore, the proposed LC-DFSA algorithm has the best comprehensive performance.
We still have some work to do in the future. For DFSA algorithms, the initial frame size has an effect on access efficiency. We will try to analyze different initial frame sizes separately so that the frame size can approach the optimal frame size as quickly as possible.