Channel-Quality Aware RFID Tag Identification Algorithm to Accommodate the Varying Channel Quality of IoT Environment

Radio Frequency Identification (RFID) technique is broadly adopted as the automated identification system for the Internet of Things (IoT). Many RFID anti-collision algorithms were proposed to accelerate the tag identification process. However, they misjudged some unreadable slots which were due to collision instead of the bad channel condition, causing low bandwidth usage. This study proposes the Channel-quality Aware Query Tree algorithm (CAQT) to improve the identification performance in an error-prone channel environment. CAQT has three novel features: (1) it estimates the channel quality continuously and statistically in the rapidly changing channel quality environment; (2) it asks the tag for retransmission or to split the collide tags based on the channel quality; (3) the number of the groups which it splits tags is based on the estimated number of tags collide in current slot. The simulation results show that CAQT uses less than 31% slots compared with the conventional algorithms. The simulation results also demonstrate that CAQT provides enhanced performance when the channel quality is varying especially in outdoor environment, for example, ticket checking for railway or subway system.


Introduction
The Radio Frequency Identification (RFID) technique [1][2][3] is broadly applied as the automated identification system for Internet of Things (IoT) environment because of its feasibility, convenience, fast and contactless object identification method, as compared with the conventional bar-code system.An RFID system consists of a reader and several tags.Each tag has a unique identification (ID), and the reader identifies objects which attached tag through radio signal.During the tag identification procedure, tags may transmit signals to the reader simultaneously and collide each other, meaning that the bandwidth resource is wasted and the duration of the identification process is prolonged.A well-designed tag anti-collision protocol is thus required for RFID tag identification.
Many RFID anti-collision algorithms were proposed and can be classified into two categories, which are Aloha-based [4] and Tree-based [5] algorithms.The Aloha-based algorithms attempt to adjust the frame size to minimize the duration of the identification process by observing the probabilities of collision and successful transmission in current frame.On the other hand, the Tree-based algorithms repeatedly subdivide collided tags into groups until each group contains, at most, one tag.
receives the signals but cannot decode any information from them.As shown in Figure 2, a collision is generally caused by that two or more tags choose the same slot to send message to the reader.During the identification process, the reader periodically broadcasts a query or some information with regarding the frame in the first slot of the frame.The tags within radio coverage range of the reader will select one slot and response their own ID in this slot if their ID matches the query.Ideally, the number of slots within a frame should equal to the number of the tags within the coverage of a reader in order to maximize the bandwidth usage.Otherwise, some unused slots will exist if the number of slots is larger than the number of the tags, or the tags will suffer serious collisions if the number of slots is fewer than the number of the tags.Therefore, the RFID reader has to estimate the number of the tags to decide an appropriate frame size.

Error-Prone Channel
The RFID reader and tags frequently exchange messages within a frame.However, the signal strength of tags is typically very weak and significantly attenuated by distance comparing with the signal power of RFID reader.Therefore, the tags may be interfered from one or more readers [8,9], and this phenomenon is reflected in the form of packet error rate (PER).For example, as shown in Figure 3, the signal from Tag A to Reader B may be interfered by the signal transmitted by Reader A. Reader B cannot identify this phenomenon is caused by the interference from Reader A. Therefore, Reader B would wrongly regard it as that two or more tags simultaneously send message in the same slot, even though there is only one tag within its interrogation range.receives the signals but cannot decode any information from them.As shown in Figure 2, a collision is generally caused by that two or more tags choose the same slot to send message to the reader.During the identification process, the reader periodically broadcasts a query or some information with regarding the frame in the first slot of the frame.The tags within radio coverage range of the reader will select one slot and response their own ID in this slot if their ID matches the query.Ideally, the number of slots within a frame should equal to the number of the tags within the coverage of a reader in order to maximize the bandwidth usage.Otherwise, some unused slots will exist if the number of slots is larger than the number of the tags, or the tags will suffer serious collisions if the number of slots is fewer than the number of the tags.Therefore, the RFID reader has to estimate the number of the tags to decide an appropriate frame size.

Error-Prone Channel
The RFID reader and tags frequently exchange messages within a frame.However, the signal strength of tags is typically very weak and significantly attenuated by distance comparing with the signal power of RFID reader.Therefore, the tags may be interfered from one or more readers [8,9], and this phenomenon is reflected in the form of packet error rate (PER).For example, as shown in Figure 3, the signal from Tag A to Reader B may be interfered by the signal transmitted by Reader A. Reader B cannot identify this phenomenon is caused by the interference from Reader A. Therefore, Reader B would wrongly regard it as that two or more tags simultaneously send message in the same slot, even though there is only one tag within its interrogation range.During the identification process, the reader periodically broadcasts a query or some information with regarding the frame in the first slot of the frame.The tags within radio coverage range of the reader will select one slot and response their own ID in this slot if their ID matches the query.Ideally, the number of slots within a frame should equal to the number of the tags within the coverage of a reader in order to maximize the bandwidth usage.Otherwise, some unused slots will exist if the number of slots is larger than the number of the tags, or the tags will suffer serious collisions if the number of slots is fewer than the number of the tags.Therefore, the RFID reader has to estimate the number of the tags to decide an appropriate frame size.

Error-Prone Channel
The RFID reader and tags frequently exchange messages within a frame.However, the signal strength of tags is typically very weak and significantly attenuated by distance comparing with the signal power of RFID reader.Therefore, the tags may be interfered from one or more readers [8,9], and this phenomenon is reflected in the form of packet error rate (PER).For example, as shown in Figure 3, the signal from Tag A to Reader B may be interfered by the signal transmitted by Reader A. Reader B cannot identify this phenomenon is caused by the interference from Reader A. Therefore, Reader B would wrongly regard it as that two or more tags simultaneously send message in the same slot, even though there is only one tag within its interrogation range.The inability to distinguish the difference between collision and channel error would cause that the reader inaccurately estimates the number of tags within in its interrogation range.This is because that most tag estimation methods are based on the probability of collision and the reader cannot distinguish the difference between collision and interference.This means that the reader will overestimate the number of collision slots and underestimate number of readable slots, as shown in Figure 4.According to the overestimated collisions, the tag estimation algorithm would wrongly regard that too many tags transmit message in current frame which causes high collision probability, and then it increases the number of slots in the next frame in order to decrease the collisions.Therefore, the slots in the next frame are overestimated and the bandwidth usage inescapably decreases.

Previous Studies
Many RFID anti-collision algorithms were proposed to identify all tags by using the minimal bandwidth resource.These algorithms can be divided into two categories, which are the probabilistic methods and deterministic methods.
The probabilistic methods, which are also called the Aloha-based algorithms [10][11][12][13][14][15][16][17][18], attempt to adjust the frame size to maximize the bandwidth usage by observing the probabilities of collision and idle in current frame.That is, each tag randomly chooses one slot in current frame to send its message to the reader, and then the reader observes the number of collisions, readable, and idle slots in this frame in order to estimation the number of tags within its interrogation range.Ideally, in order to minimize the collision and idle slots, the number of slots in a frame should equal to the number of tags within a reader's interrogation range.Therefore, the reader then modifies the next frame size to the number of the tags.
The deterministic methods, which are also called the Tree-based algorithms [19][20][21][22][23][24][25][26][27][28][29][30][31], resolve a collision among tags by repeatedly subdivided into groups until each group contains at most one tag.The Tree-based algorithms can be further classified into the binary tree protocol (BT) and query tree The inability to distinguish the difference between collision and channel error would cause that the reader inaccurately estimates the number of tags within in its interrogation range.This is because that most tag estimation methods are based on the probability of collision and the reader cannot distinguish the difference between collision and interference.This means that the reader will overestimate the number of collision slots and underestimate number of readable slots, as shown in Figure 4.According to the overestimated collisions, the tag estimation algorithm would wrongly regard that too many tags transmit message in current frame which causes high collision probability, and then it increases the number of slots in the next frame in order to decrease the collisions.Therefore, the slots in the next frame are overestimated and the bandwidth usage inescapably decreases.The inability to distinguish the difference between collision and channel error would cause that the reader inaccurately estimates the number of tags within in its interrogation range.This is because that most tag estimation methods are based on the probability of collision and the reader cannot distinguish the difference between collision and interference.This means that the reader will overestimate the number of collision slots and underestimate number of readable slots, as shown in Figure 4.According to the overestimated collisions, the tag estimation algorithm would wrongly regard that too many tags transmit message in current frame which causes high collision probability, and then it increases the number of slots in the next frame in order to decrease the collisions.Therefore, the slots in the next frame are overestimated and the bandwidth usage inescapably decreases.

Previous Studies
Many RFID anti-collision algorithms were proposed to identify all tags by using the minimal bandwidth resource.These algorithms can be divided into two categories, which are the probabilistic methods and deterministic methods.
The probabilistic methods, which are also called the Aloha-based algorithms [10][11][12][13][14][15][16][17][18], attempt to adjust the frame size to maximize the bandwidth usage by observing the probabilities of collision and idle in current frame.That is, each tag randomly chooses one slot in current frame to send its message to the reader, and then the reader observes the number of collisions, readable, and idle slots in this frame in order to estimation the number of tags within its interrogation range.Ideally, in order to minimize the collision and idle slots, the number of slots in a frame should equal to the number of tags within a reader's interrogation range.Therefore, the reader then modifies the next frame size to the number of the tags.

Previous Studies
Many RFID anti-collision algorithms were proposed to identify all tags by using the minimal bandwidth resource.These algorithms can be divided into two categories, which are the probabilistic methods and deterministic methods.
The probabilistic methods, which are also called the Aloha-based algorithms [10][11][12][13][14][15][16][17][18], attempt to adjust the frame size to maximize the bandwidth usage by observing the probabilities of collision and idle in current frame.That is, each tag randomly chooses one slot in current frame to send its message to the reader, and then the reader observes the number of collisions, readable, and idle slots in this frame in order to estimation the number of tags within its interrogation range.Ideally, in order to minimize the collision and idle slots, the number of slots in a frame should equal to the number of tags within a reader's interrogation range.Therefore, the reader then modifies the next frame size to the number of the tags.
The deterministic methods, which are also called the Tree-based algorithms [19][20][21][22][23][24][25][26][27][28][29][30][31], resolve a collision among tags by repeatedly subdivided into groups until each group contains at most one tag.The Tree-based algorithms can be further classified into the binary tree protocol (BT) and query tree protocol (QT).For BT, the collided tags are separated by randomly choosing a binary number and sending it back to the reader.This procedure repeats until the reader confirms each group contains at most one tag.With regards to QT, the collided tags are split by the reader's query.If the tag's ID prefix matches this query, the tag will respond with its ID to the reader.This query procedure continues until no collided response occurs for each query.However, these conventional algorithms did not consider the condition of channel error, meaning that the reader would overestimate the number of collided tags.
The error resilient estimation and adaptive binary selection algorithm (ERE-ABS) was proposed to handle the issue of channel error [6].ERE-ABS applies the PER and number of tags to judge which event, i.e., collision or channel error, treated by the reader would acquire the highest throughput and then adopts the corresponding strategy, when the reader receives an unreadable message.That is, for example, if the throughput of regarding the unreadable message as the result caused by channel error is higher than the throughput of treating this message as a collision, the reader would ask the tag who transmitted this message to retransmit it immediately.Otherwise, the reader would treat it as a collision and adopt the Tree-based anti-collision procedure so as to identify the collided tags.
As shown in Figure 5, the ERE-ABS used two phases for accurate estimate channel status and improves identification efficiency.In the error resilient estimation (ERE) phase, the reader would attempt to split the number of tags into j groups until the probability of idle slots is smaller than the threshold.And then, the reader will operate the estimate process to calculate number of tags and channel state.In the adaptive binary selection (ABS) phase, the reader would apply the estimate result to judge retransmission or binary selection when it detects a collision slot.
Appl.Sci.2019, 9, x FOR PEER REVIEW 5 of 15 protocol (QT).For BT, the collided tags are separated by randomly choosing a binary number and sending it back to the reader.This procedure repeats until the reader confirms each group contains at most one tag.With regards to QT, the collided tags are split by the reader's query.If the tag's ID prefix matches this query, the tag will respond with its ID to the reader.This query procedure continues until no collided response occurs for each query.However, these conventional algorithms did not consider the condition of channel error, meaning that the reader would overestimate the number of collided tags.The error resilient estimation and adaptive binary selection algorithm (ERE-ABS) was proposed to handle the issue of channel error [6].ERE-ABS applies the PER and number of tags to judge which event, i.e., collision or channel error, treated by the reader would acquire the highest throughput and then adopts the corresponding strategy, when the reader receives an unreadable message.That is, for example, if the throughput of regarding the unreadable message as the result caused by channel error is higher than the throughput of treating this message as a collision, the reader would ask the tag who transmitted this message to retransmit it immediately.Otherwise, the reader would treat it as a collision and adopt the Tree-based anti-collision procedure so as to identify the collided tags.
As shown in Figure 5, the ERE-ABS used two phases for accurate estimate channel status and improves identification efficiency.In the error resilient estimation (ERE) phase, the reader would attempt to split the number of tags into j groups until the probability of idle slots is smaller than the threshold.And then, the reader will operate the estimate process to calculate number of tags and channel state.In the adaptive binary selection (ABS) phase, the reader would apply the estimate result to judge retransmission or binary selection when it detects a collision slot.However, the channel status changes rapidly and ERE-ABS does not dynamically adjust PER and the number of tags during the collision resolving procedure.This results in that the PER and the number of tags may be incorrectly estimated and therefore cannot reflect the actual condition with regards to the current RFID system, meaning that the inferior throughput will be inescapably caused.

Proposed Channel-Quality Aware Query Tree Algorithm
This study proposes the Channel-quality Aware Query Tree algorithm (CAQT) to minimize the effect of the rapidly changing channel quality on estimating number of the tags.The CAQT is based on query tree protocol and can be characterized by three features: (1) it estimates PER in each slot including the collision resolution process in order to improve the accuracy of the tag estimation in the rapidly changing channel quality environment; (2) when a reader receives an unreadable message from tags, it then adopts the most efficient strategy, which is to ask the tag to retransmit it or to split the collide tags, after evaluating the efficiency of regarding this event caused by channel error and that of treating it as a collision event; However, the channel status changes rapidly and ERE-ABS does not dynamically adjust PER and the number of tags during the collision resolving procedure.This results in that the PER and the number of tags may be incorrectly estimated and therefore cannot reflect the actual condition with regards to the current RFID system, meaning that the inferior throughput will be inescapably caused.

Proposed Channel-Quality Aware Query Tree Algorithm
This study proposes the Channel-quality Aware Query Tree algorithm (CAQT) to minimize the effect of the rapidly changing channel quality on estimating number of the tags.The CAQT is based on query tree protocol and can be characterized by three features: (1) it estimates PER in each slot including the collision resolution process in order to improve the accuracy of the tag estimation in the rapidly changing channel quality environment; (2) when a reader receives an unreadable message from tags, it then adopts the most efficient strategy, which is to ask the tag to retransmit it or to split the collide tags, after evaluating the efficiency of regarding this event caused by channel error and that of treating it as a collision event; Appl.Sci.2019, 9, 321 6 of 14 (3) the number of the group which it splits is based on the estimated number of tags collide in current slot in order to accelerate the tag identification process.

Channel Error Rate Estimation
Since PER is required to evaluate the efficiency of asking the unreadable tag to retransmit the message or to split the collided tags, CAQT estimates PER through sampling the slot in which only one tag transmits.The following shows the details: First, the tree-based RFID anti-collision operation is utilized to distinguish whether the unreadable slot is due to collision or channel error.That is, if the reader only identifies one tag in the split slots after detecting an unreadable slot, this unreadable slot can be deducted as the slot interfered by noise rather than the collided slot, as shown in Figure 6.
Appl.Sci.2019, 9, x FOR PEER REVIEW 6 of 15 (3) the number of the group which it splits is based on the estimated number of tags collide in current slot in order to accelerate the tag identification process.

Channel Error Rate Estimation
Since PER is required to evaluate the efficiency of asking the unreadable tag to retransmit the message or to split the collided tags, CAQT estimates PER through sampling the slot in which only one tag transmits.The following shows the details: First, the tree-based RFID anti-collision operation is utilized to distinguish whether the unreadable slot is due to collision or channel error.That is, if the reader only identifies one tag in the split slots after detecting an unreadable slot, this unreadable slot can be deducted as the slot interfered by noise rather than the collided slot, as shown in Figure 6.Second, the reader estimates the PER by calculating the number of the readable slots between the two adjacent slots in which only one tag transmits and suffers channel error, named s U herein.
That is, as shown in Figure 7, the slots between two adjacent s U , which means the slots starts after 1 i s U − and ends to (includes) i s U , can be categorized into three groups including readable slots, idle slots, and unreadable slots.The readable slots mean that only one tag transmits in these slots including i s U ; the unreadable slot indicates there are more tags transmitted in one slot, and these tags therefore collide; the idle slot is the slot that no tag transmits in it.The PER for the readable slots between , where i r N is the number of readable slots between 1 i s U − and i s U .Thus, to assume that the channel error is uniform distributed in each slot, the PER for the slots between PER , can be estimated by Finally, the exponential smoothing method is applied to forecast the PER in the following slots, which is, where  PER is the estimated PER in the following slots and  old PER is the previous estimated PER.
In addition, the coefficient α is used to revise  PER .Second, the reader estimates the PER by calculating the number of the readable slots between the two adjacent slots in which only one tag transmits and suffers channel error, named U s herein.That is, as shown in Figure 7, the slots between two adjacent U s , which means the slots starts after U i−1 s and ends to (includes) U i s , can be categorized into three groups including readable slots, idle slots, and unreadable slots.The readable slots mean that only one tag transmits in these slots including U i s ; the unreadable slot indicates there are more tags transmitted in one slot, and these tags therefore collide; the idle slot is the slot that no tag transmits in it.The PER for the readable slots between U i−1 s and U i s can be calculated by 1 , where N i r is the number of readable slots between U i−1 s and U i s .Thus, to assume that the channel error is uniform distributed in each slot, the PER for the slots between U i−1 s and U i s , named PER i , can be estimated by Finally, the exponential smoothing method is applied to forecast the PER in the following slots, which is, where PER is the estimated PER in the following slots and PER old is the previous estimated PER.
In addition, the coefficient α is used to revise PER.

The CAQT Algorithm
For the conventional tree-based collision resolution protocols, when a reader encounters an unreadable slot, this reader would regard collision occurs in this slot and then split the tags into several groups in order to resolve the collision.However, this strategy causes inferior performance because the unreadable slot may result from the channel error.To be more specific, when there is only one tag transmitting in one slot and encountering channel error, the reader would treat this slot as a collision slot and attempt to use more slots to resolve this collision.Nevertheless, only one slot will be used, and remaining slots will be wasted.
This study therefore provides a CAQT to overcome above mentioned issue.When a reader encounters an unreadable slot, CAQT will statistically judge whether it is simply due to channel error or it is caused by collision.If this unreadable slot is due to channel error, CAQT will ask the tag to retransmit its message in the next slot.On the other hand, CAQT will treat this unreadable slot as a collision and split the collided tags into several group to resolve the collision.
Figure 8 shows the flowchart of CAQT.The basic idea of CAQT is that, for example, when the reader detect a slot of which the status is unreadable, the reader would calculate rtx E and spl E to determine whether to ask the tag for retransmission or to split the collided tags.If spl E is lower than rtx E .When the reader detects an unreadable slot, it then statistically calculates the efficiency.In this case, the slots consumed by the splitting procedure (3 slots) are more

The CAQT Algorithm
For the conventional tree-based collision resolution protocols, when a reader encounters an unreadable slot, this reader would regard collision occurs in this slot and then split the tags into several groups in order to resolve the collision.However, this strategy causes inferior performance because the unreadable slot may result from the channel error.To be more specific, when there is only one tag transmitting in one slot and encountering channel error, the reader would treat this slot as a collision slot and attempt to use more slots to resolve this collision.Nevertheless, only one slot will be used, and remaining slots will be wasted.
This study therefore provides a CAQT to overcome above mentioned issue.When a reader encounters an unreadable slot, CAQT will statistically judge whether it is simply due to channel error or it is caused by collision.If this unreadable slot is due to channel error, CAQT will ask the tag to retransmit its message in the next slot.On the other hand, CAQT will treat this unreadable slot as a collision and split the collided tags into several group to resolve the collision.
Figure 8 shows the flowchart of CAQT.The basic idea of CAQT is that, for example, when the reader detect a slot of which the status is unreadable, the reader would calculate E rtx and E spl to determine whether to ask the tag for retransmission or to split the collided tags.

The CAQT Algorithm
For the conventional tree-based collision resolution protocols, when a reader encounters an unreadable slot, this reader would regard collision occurs in this slot and then split the tags into several groups in order to resolve the collision.However, this strategy causes inferior performance because the unreadable slot may result from the channel error.To be more specific, when there is only one tag transmitting in one slot and encountering channel error, the reader would treat this slot as a collision slot and attempt to use more slots to resolve this collision.Nevertheless, only one slot will be used, and remaining slots will be wasted.
This study therefore provides a CAQT to overcome above mentioned issue.When a reader encounters an unreadable slot, CAQT will statistically judge whether it is simply due to channel error or it is caused by collision.If this unreadable slot is due to channel error, CAQT will ask the tag to retransmit its message in the next slot.On the other hand, CAQT will treat this unreadable slot as a collision and split the collided tags into several group to resolve the collision.
Figure 8 shows the flowchart of CAQT.The basic idea of CAQT is that, for example, when the reader detect a slot of which the status is unreadable, the reader would calculate rtx E and spl E to determine whether to ask the tag for retransmission or to split the collided tags.If spl E is lower than rtx E .When the reader detects an unreadable slot, it then statistically calculates the efficiency.In this case, the slots consumed by the splitting procedure (3 slots) are more If E spl is lower than E rtx .When the reader detects an unreadable slot, it then statistically calculates the efficiency.In this case, the slots consumed by the splitting procedure (3 slots) are more than that consumed by retransmission (1 slot).Therefore, the reader then asks the tag to retransmit its message immediately.On the other hand, if E spl is higher than E rtx , the reader would treat this event as the collision and then adopt the Query tree-based algorithm to split the tags.
Figure 9 demonstrates the pseudo code of CAQT.Line 3~5 in the Main function and Line 8~10 in the query function as the same as the conventional query tree based algorithm for the initial query.Once an unreadable slot is detected in Line 7, CAQT has to estimate the number of tags ( m) which transmit their message in this slot.To assume m is the margin between the current estimated number of tags within the reader radio coverage ( N curr ) and the previously estimated one ( N pre ) and is therefore the reason resulting in this collision, that is: The number of the tags within the reader radio coverage ( N) can be estimated by where N s is the number of identified tags and Pr(q) is the probability to identify the N s tags through the query string q.Since the procedure to resolve the collided tags is based on Query Tree algorithm, and thus the Pr(q) can be estimated by where q i is the i-th character of the query string q and length(q) is the length of the query string q [32].
It should be noted that the query string q is a binary string, which is q = q 1 q 2 ...q j ...q k where q j ∈ {0, 1}.
Then the reader has to compare the efficiency between asking the tags to retransmit and splitting the collided tags, which are denoted by E rtx m, PER and E spl m, PER , respectively.The efficiency means the expected number of tags can be transmit in one slot.If the efficiency of retransmission is higher than that of splitting, as shown in Line 13-19, the reader will ask the tag to retransmit immediately.Otherwise, as shown in Line 20-29, the reader will adopt the query tree algorithm to split the tag for collision resolution.
Regarding the efficiency of retransmission, E rtx m, PER is calculated by: where P rtx is the probability of successful retransmission in current slot and is the slots used in the k-th retransmission.Therefore, k × (1 − P rtx ) × (P rtx ) k−1 is the expected used slot given that the tag is successfully identified in k-th retransmission, and is the expected number of slots to successfully retransmit a tag.Furthermore, P rtx is the probability that has r tags successfully transmit in current slot and remaining (r − 1) tags suffer channel error, which is deduced by: It should be noted that, if the reader still detects the unreadable slot after asking the tag to transmit, the reader will regard the unreadable slot is more likely due to collision rather than channel error.
Then the reader will split the tag follows the procedure of the query tree-based algorithm to resolve the collision, as shown in Line 16-19.
The efficiency of splitting the tags by query tree-based algorithm, E spl m, PER , is the expected slots to resolve the m collided tags and is calculated by: where S PER, m is the total number of slots which use to recognize m tags and can be recursively estimated by: where the probability of j tags transmits in i-th slot.It should be noted that the number of slots applied to split the tags should be equal to the number of estimated collided tags ideally [33,34].Therefore, there are m slots applied in current tag-splitting procedure.
In addition, as shown in Line 23-24 of Figure 8, when only one slot is readable and remaining slots are idle, this means the previous unreadable slot is due to channel error rather than collision.Therefore, the PER should be updated by the procedure described in Section 3.1.
However, it should be noted that the time complexity of CAQT in the worst case scenario is n × (k + 2 − ln n) [35] if all unreadable slots are due to collision.The efficiency of splitting the tags by query tree-based algorithm,   ( ) E , spl m PER , is the expected slots to resolve the  m collided tags and is calculated by: S , PER m is the total number of slots which use to recognize  m tags and can be recursively estimated by: where the probability of j tags transmits in i-th slot.It should be noted that the number of slots applied to split the tags should be equal to the number of estimated collided tags ideally [33,34].Therefore, there are  m slots applied in current tag-splitting procedure.
In addition, as shown in Line 23-24 of Figure 8, when only one slot is readable and remaining slots are idle, this means the previous unreadable slot is due to channel error rather than collision.Therefore, the  PER should be updated by the procedure described in Section 3.1.However, it should be noted that the time complexity of CAQT in the worst case scenario is ( 2 ln ) n k n × + − [35] if all unreadable slots are due to collision.

Simulation Results
Simulations were conducted to compare the performance of CAQT with the query-based (QT) algorithm [21], the typical aloha-based algorithm called dynamic frame-slotted Aloha (DFSA) [14,18], and ERE-ABS [6] in terms of number of slots and number of idle slots under varying number of tags and PERs.The number of slots means the total number of slots to identify all tags, and the number of idle slots is the total number of idle slots during the tag identification procedure.The estimated number of tags during the progress of tag identification was also investigated to ensure DFSA can adjust the estimated number of tags under error-prone channel.
The simulation environment setting was as the same as that in [6] for fair comparison.That is, for the DFSA algorithm, the minimum frame size was set to the minimum frame size in order to estimate n through the tag estimation algorithm; regarding the ERE-ABS, L est was set to 128, the threshold for probability of idle slots P idle_th = 0.2, and the factor f d = 4 used to reduce the number of tags; for CAQT, the α was set to 0.75 to estimate channel condition.
As shown in Figure 10, the effect of various PER ranging between 0 and 0.5 was explored when number of tags is 500.Figure 10a demonstrates that CAQT used the fewest slots to identify all tags, and Figure 10b also presents that CAQT had the fewest idle slots during the tag identification procedure.Therefore, CAQT outperformed QT, DFSA, and ERE-ABS under all PER cases.This was because QT and DFSA could not distinguish the unreadable slot was due to collision or channel error, meaning that QT and DFSA inescapably overestimated the number of tags within the coverage of the reader.Therefore, the overestimated number of tags caused that QT used too many slots to split the tags and results in lots of unnecessary idle slots for resolving the unidentified tags.On the other hand, the overestimated number of tags made DFSA difficult to accurately determine the optimal initial frame size and therefore suffer many idle slots.
Appl.Sci.2019, 9, x FOR PEER REVIEW 10 of 15 Simulations were conducted to compare the performance of CAQT with the query-based (QT) algorithm [21], the typical aloha-based algorithm called dynamic frame-slotted Aloha (DFSA) [14,18], and ERE-ABS [6] in terms of number of slots and number of idle slots under varying number of tags and PERs.The number of slots means the total number of slots to identify all tags, and the number of idle slots is the total number of idle slots during the tag identification procedure.The estimated number of tags during the progress of tag identification was also investigated to ensure DFSA can adjust the estimated number of tags under error-prone channel.
The simulation environment setting was as the same as that in [6] for fair comparison.That is, for the DFSA algorithm, the minimum frame size was set to the minimum frame size in order to estimate n through the tag estimation algorithm; regarding the ERE-ABS, est L was set to 128, the threshold for probability of idle slots As shown in Figure 10, the effect of various PER ranging between 0 and 0.5 was explored when number of tags is 500.Figure 10a demonstrates that CAQT used the fewest slots to identify all tags, and Figure 10b also presents that CAQT had the fewest idle slots during the tag identification procedure.Therefore, CAQT outperformed QT, DFSA, and ERE-ABS under all PER cases.This was because QT and DFSA could not distinguish the unreadable slot was due to collision or channel error, meaning that QT and DFSA inescapably overestimated the number of tags within the coverage of the reader.Therefore, the overestimated number of tags caused that QT used too many slots to split the tags and results in lots of unnecessary idle slots for resolving the unidentified tags.On the other hand, the overestimated number of tags made DFSA difficult to accurately determine the optimal initial frame size and therefore suffer many idle slots.With regards to ERE-ABS, its inferior performance was due to that ERE-BAS merely estimated the PER before the tag resolution procedure.However, the channel status changed rapidly, the estimated PER might not accurately reflect the current channel condition since ERE-ABS did not dynamically adjust the PER during the collision resolving procedure.This resulted in the number of the idle slots still being large.With regards to ERE-ABS, its inferior performance was due to that ERE-BAS merely estimated the PER before the tag resolution procedure.However, the channel status changed rapidly, the estimated PER might not accurately reflect the current channel condition since ERE-ABS did not dynamically adjust the PER during the collision resolving procedure.This resulted in the number of the idle slots still being large.
CAQT owned the superior performance compared with other methods, and the higher PER was, the larger improvement CAQT had.As shown in Figure 10a, CAQT only used 69.0%, 57.8%, and 87.2% slots consumed by QT, DFSA, and ERE-ABS, respectively, when the PER is 0.5.The two reasons were (1) it estimated PER in each slot including the collision resolution process in order to improve the accuracy of the tag estimation in the rapidly changing channel quality environment, and (2) when a reader received an unreadable message from tags, it then statistically determined the most efficient strategy, which was to ask the tag to retransmit it or to split the collide tags.
Therefore, the number of unnecessary idle slots was reduced, as shown in Figure 10b, and the performance was improved.
It should be noted that the higher PER was, the more slots were interfered by poor channel condition, meaning that more slots were required to identify all tags by all algorithm.
The CAQT also had better performance comparing with others when PER was equal to 0. This is because, QT and ERE-ABS simply divided collided tags into two groups while detecting a collision event, resulting in that more slots were used to resolve the collide tags and poor performance was caused.On the other hand, CAQT can estimate the number of collided tags of a collision event and then separate tags into groups of which the number equals the estimated collided tags.This strategy can therefore minimize the slots used for resolving the collided tags and provide a better performance than other algorithms.
Figure 11 demonstrates the effect of various numbers of tags ranging between 500 and 4000 when PER was set to 0.3.Figure 11a shows that CAQT used the fewest slots to identify all tags and also had the fewest idle slots show in Figure 11b during tag identification procedure.Thus, the CAQT had superior performance compared with QT, DFSA, and ERE-ABS.The reasons were as the same as discussed in Figure 10.In addition, as shown in Figure 11a, the more tags existed in the reader's coverage, the more slots were required to identify all tags by all algorithms.
Appl.Sci.2019, 9, x FOR PEER REVIEW 11 of 15 CAQT owned the superior performance compared with other methods, and the higher PER was, the larger improvement CAQT had.As shown in Figure 10a, CAQT only used 69.0%, 57.8%, and 87.2% slots consumed by QT, DFSA, and ERE-ABS, respectively, when the PER is 0.5.The two reasons were (1) it estimated PER in each slot including the collision resolution process in order to improve the accuracy of the tag estimation in the rapidly changing channel quality environment, and (2) when a reader received an unreadable message from tags, it then statistically determined the most efficient strategy, which was to ask the tag to retransmit it or to split the collide tags.
Therefore, the number of unnecessary idle slots was reduced, as shown in Figure 10b, and the performance was improved.
It should be noted that the higher PER was, the more slots were interfered by poor channel condition, meaning that more slots were required to identify all tags by all algorithm.
The CAQT also had better performance comparing with others when PER was equal to 0. This is because, QT and ERE-ABS simply divided collided tags into two groups while detecting a collision event, resulting in that more slots were used to resolve the collide tags and poor performance was caused.On the other hand, CAQT can estimate the number of collided tags of a collision event and then separate tags into groups of which the number equals the estimated collided tags.This strategy can therefore minimize the slots used for resolving the collided tags and provide a better performance than other algorithms.
Figure 11 demonstrates the effect of various numbers of tags ranging between 500 and 4000 when PER was set to 0.3.Figure 11a shows that CAQT used the fewest slots to identify all tags and also had the fewest idle slots show in Figure 11b during tag identification procedure.Thus, the CAQT had superior performance compared with QT, DFSA, and ERE-ABS.The reasons were as the same as discussed in Figure 10.In addition, as shown in Figure 11a, the more tags existed in the reader's coverage, the more slots were required to identify all tags by all algorithms.Figure 12a demonstrates the estimated PER during the tag identification progress while the number of tags was set to 500 and PER was set to 0.3.Since ERE-ABS only calculated the PER before the tag resolution process, the estimate PER would keep a value during the whole tag identification procedure.Therefore, the max and min estimated PER during the 100 times identification process is used to compare the deviation.However, the CAQT could dynamically adjust PER according to the  procedure.Therefore, the max and min estimated PER during the 100 times identification process is used to compare the deviation.However, the CAQT could dynamically adjust PER according to the current channel condition, and then thus the estimated PER would slightly oscillate and approached the real PER, which was 0.3.Figure 12b also presents that the number of idle slots of CAQT was fewer than that of ERE-ABS during the whole tag identification procedure because CAQT could accurately estimate the PER while ERE-ABS could not.

Conclusions and Future Work
This study proposes the CAQT algorithm to cope with the overestimated number of tags problem in the error-prone channel environment.The CAQT not only estimates current channel condition in order to estimate more accurate number of tags in the rapidly changing channel quality environment, but it also statistically determines the most efficient strategy, which is to ask the tag to retransmit it or to split the collide tags, in order to minimize the number of idle slots.The simulation results show that CAQT significantly outperforms the existing algorithms, which are ERE-ABS, QT, and DFSA.CAQT only used 69.0%, 57.8%, and 87.2% slots consumed by QT, DFSA, and ERE-ABS, respectively, when the PER was 0.5.Therefore, the CAQT provides realistic description and a useful guideline of how things or people can be identified in varying channel quality of IoT environment, which contributes to the development of consumer electronics industry and literature.The simulation

Conclusions and Future Work
This study proposes the CAQT algorithm to cope with the overestimated number of tags problem in the error-prone channel environment.The CAQT not only estimates current channel condition in order to estimate more accurate number of tags in the rapidly changing channel quality environment, but it also statistically determines the most efficient strategy, which is to ask the tag to retransmit it or to split the collide tags, in order to minimize the number of idle slots.The simulation results show that CAQT significantly outperforms the existing algorithms, which are ERE-ABS, QT, and DFSA.CAQT only used 69.0%, 57.8%, and 87.2% slots consumed by QT, DFSA, and ERE-ABS, respectively, when the

Figure 1 .
Figure 1.Relationship between slots and frame.

Figure 1 .
Figure 1.Relationship between slots and frame.

Figure 1 .
Figure 1.Relationship between slots and frame.

Figure 3 .
Figure 3. Example of the interference.

Figure 3 .
Figure 3. Example of the interference.

Figure 3 .
Figure 3. Example of the interference.

Figure 6 .
Figure 6.An example of unreadable slots.

Figure 6 .
Figure 6.An example of unreadable slots.

Figure 7 .
Figure 7.An example of PER (Packet Error Rate) between 1 i s U − and i s U .

Figure 7 .
Figure 7.An example of PER (Packet Error Rate) between U i−1 s and U i s .

Figure 7 .
Figure 7.An example of PER (Packet Error Rate) between 1 i s U − and i s U .

4 df
= used to reduce the number of tags; for CAQT, the α was set to 0.75 to estimate channel condition.

Figure 10 .
Figure 10.The effect of Packet Error Rate (PER).

Figure 10 .
Figure 10.The effect of Packet Error Rate (PER).

Figure 11 .
Figure 11.The effect of number of tags.

Figure 11 .
Figure 11.The effect of number of tags.

Figure
Figure12ademonstrates the estimated PER during the tag identification progress while the number of tags was set to 500 and PER was set to 0.3.Since ERE-ABS only calculated the PER before the tag resolution process, the estimate PER would keep a value during the whole tag identification

Figure 12 .
Figure 12.Estimated number of tags during the tag identification progress.

Figure 12 .
Figure 12.Estimated number of tags during the tag identification progress.