An RFID Indoor Positioning Algorithm Based on Bayesian Probability and K-Nearest Neighbor

The Global Positioning System (GPS) is widely used in outdoor environmental positioning. However, GPS cannot support indoor positioning because there is no signal for positioning in an indoor environment. Nowadays, there are many situations which require indoor positioning, such as searching for a book in a library, looking for luggage in an airport, emergence navigation for fire alarms, robot location, etc. Many technologies, such as ultrasonic, sensors, Bluetooth, WiFi, magnetic field, Radio Frequency Identification (RFID), etc., are used to perform indoor positioning. Compared with other technologies, RFID used in indoor positioning is more cost and energy efficient. The Traditional RFID indoor positioning algorithm LANDMARC utilizes a Received Signal Strength (RSS) indicator to track objects. However, the RSS value is easily affected by environmental noise and other interference. In this paper, our purpose is to reduce the location fluctuation and error caused by multipath and environmental interference in LANDMARC. We propose a novel indoor positioning algorithm based on Bayesian probability and K-Nearest Neighbor (BKNN). The experimental results show that the Gaussian filter can filter some abnormal RSS values. The proposed BKNN algorithm has the smallest location error compared with the Gaussian-based algorithm, LANDMARC and an improved KNN algorithm. The average error in location estimation is about 15 cm using our method.


Introduction
Location-based services (LBS) are provided by a number of commercial companies, and it improves user satisfaction and offers convenience. Many LBS applications need to know the detailed location of objects. Over the years, many systems have supported automatic positioning, such as the Global Positioning System (GPS), widely used in outdoor environments all over the world. However, GPS cannot support indoor positioning because there is no signal inside buildings. In order to meet the requirements for inside buildings, many indoor positioning technologies are proposed by researchers. Ultrasonic [1], sensor [2], Bluetooth [3], WiFi [4] and magnetic field [5] technologies are used to perform indoor positioning.
Yayan Ugur et al. proposed an ultrasonic based indoor positioning system [6], which uses only ultrasonic signals and calculates the position of the mobile platform with centimeter-level accuracy. The transmitters are at fixed known positions and the time difference of arrival (TDOA) of the receiver, which is embedded on the mobile unit, is calculated to get the mobile unit's position. The system is cost effective because it uses the existing Local Area Network of the building.
Deng Zhi-An et al. proposed a novel position transition detection algorithm [7], which allows the user heading estimation to be pervasive and suitable for daily use and for indoor pedestrian the RFID tags' locations. It then uses a positioning algorithm to calculate the target tag's location. In the literature [33], the authors present a maximum intersected tags method to estimate the target's location. The results show that the location error is about 30~60 cm. Table 1 gives the comparisons of different positioning methods. The COTS reader is a commercial off-the-shelf reader.

COTS Reader
Fingerprint [10,33] High Low High Low Yes Reference tags [25] Normal High Normal Normal Yes AOA [31] High Normal Normal High Yes TDOA [6] Low Low Normal Low No Due to the low cost and easy deployment of passive UHF RFID it is a widely used and researched positioning method. Buffi, A. et al. proposed a phase-based technique for localization and tracking of UHF RFID tags moving along a conveyor belt [34], and the numerical results show that a centimeter-level accuracy in the tag position estimation can be achieved even in a rich multipath environment. In order to overcome the limitations of current RFID systems, Guidi, F. et al. proposed the joint adoption of RFID and ultra-wideband (UWB) tag technologies [35,36], which are introduced to reduce the positioning error thanks to the large bandwidth involved. Arnitz D. et al. give a proof of concept for UWB-based ranging in passive UHF RFID [37], which is robust to multipath propagation. UWB RFID will offer high accuracy localization capabilities in next generation RFID systems. However, the UWB RFID is limited in the range of reader-tag communication [38] and it is costly, as the high accuracy localization requires three readers. To overcome such limitations, Guidi, F. et al. investigated the possibility of jointly adopting millimeter-wave (mmW) technology with passive RFID [39], and the results show that the proposed scheme can outperform the UWB one as it requires a lower number of pulses to achieve the same reader-tag distance and consequently a reduced complexity.
LANDMARC [25] is the first method to use reference tags to locate the target, and its positioning accuracy is about 72 cm. The KNN algorithm [25] is a kind of references tag positioning method, mainly used to estimate the location according to the measured RSS compared with the known RSS value recorded in the database. The KNN is widely used and improved in indoor environment positioning. Li D. in literature [40] proposed a feature-scaling-based k-nearest neighbor (FS-kNN) algorithm for achieving improved localization accuracy, while FS-kNN can achieve an average location error as low as 1.70 m in WiFi fingerprint-based indoor positioning systems. An improved KNN algorithm was introduced by Liang X. et al. which is beneficial to location estimation in a real GSM network [41]. In order to meet the demand of localization precision, LANDMARC is improved as well. In order to find the k value which leads to the best accuracy in each environment, an adaptive KNN algorithm is proposed for RFID location systems [42]. Because the multipath effect and the various indoor environments significantly affect the positioning accuracy, the overall accuracy of LANDMARC fluctuates. In order to solve this problem, Liu X. et al. proposed LANDMARC with an improved KNN algorithm for RFID location systems whose location accuracy is increased by 10.1% on average [43].
This paper mainly focuses on the passive UHF RFID-based indoor positioning method. Inspired by the WiFi indoor positioning algorithm [10] and the KNN algorithm [26], and inspired by Sun Y. and Gu F. who use the sparse signal to descript all the information of the original signal with high probability in the literature [44], we propose an RFID indoor positioning algorithm based on Bayesian probability and K-Nearest Neighbor, using a Gaussian filter to filter the abnormal Received Signal Strength (RSS) value and using the proper k value and the Bayesian estimation method to improve the accuracy of the location. Rather than WiFi technology [10] and active RFID technology [25], we use passive UHF RFID technology to perform indoor positioning resulting in a lower location error of about 15 cm. When comparing the proposed algorithm with the traditional LANDMARC algorithm and other related algorithms, the results show that our algorithm performs with a higher location accuracy. The rest of the paper is organized as follows: In Section 2, we examine the RFID signal characteristic of RSS and phase. Section 3 gives the Bayesian theorem used in our algorithm. In Section 4, an RFID indoor positioning algorithm is proposed where a Gaussian filter is used to filter abnormal RSS values and Bayesian estimation is used to improve positioning accuracy. Section 5 presents the experiments. Finally, Section 6 concludes the paper.

RFID Signal Characteristic
In the following, we use the commodity off-the-shelf RFID reader-Impinj R420 RFID reader and EPC Gen2 UHF RFID tags to perform the test for the signal characteristic of RSS and phase.

RSS
RSS is an important eigenvalue of RFID signals, which can be obtained by the RFID reader reading the RFID tags. Through testing, we found that the RSS value has a linear relationship with the distance between the antenna of the RFID reader and the RFID tags. In Figure 1, we do the test with a continuously increasing distance from 0 to 120 cm by slowly moving an electric toy car equipped with an RFID tag further away, step by step. At the same time, the RFID reader reads the tag and records the RSS value. When the tag is far enough away from the reader's antenna, the RSS value does not change significantly. From Figure 1, we can see that when the distance is at 120 cm, the RSS value is stable. algorithm and other related algorithms, the results show that our algorithm performs with a higher location accuracy. The rest of the paper is organized as follows: In Section 2, we examine the RFID signal characteristic of RSS and phase. Section 3 gives the Bayesian theorem used in our algorithm. In Section 4, an RFID indoor positioning algorithm is proposed where a Gaussian filter is used to filter abnormal RSS values and Bayesian estimation is used to improve positioning accuracy. Section 5 presents the experiments. Finally, Section 6 concludes the paper.

RFID Signal Characteristic
In the following, we use the commodity off-the-shelf RFID reader-Impinj R420 RFID reader and EPC Gen2 UHF RFID tags to perform the test for the signal characteristic of RSS and phase.

RSS
RSS is an important eigenvalue of RFID signals, which can be obtained by the RFID reader reading the RFID tags. Through testing, we found that the RSS value has a linear relationship with the distance between the antenna of the RFID reader and the RFID tags. In Figure 1, we do the test with a continuously increasing distance from 0 to 120 cm by slowly moving an electric toy car equipped with an RFID tag further away, step by step. At the same time, the RFID reader reads the tag and records the RSS value. When the tag is far enough away from the reader's antenna, the RSS value does not change significantly. From Figure 1, we can see that when the distance is at 120 cm, the RSS value is stable. In addition, we put the tag approximately 0.6 m in front of the reader's antenna, as shown in Figure 2. At the same time, we recorded the RSS value. When there are shelters to pass through between the reader and the tag, the RSS value fluctuates greatly, which is shown in Figure 3. Num-Announces are the cumulative sums of numbers of a tag read successfully by the RFID reader, which is normally at a rate of approximately 40 readings per minute. From Figure 3, we can see that the fluctuations are generated when the Num-Announces are about 100, 320, 500 and 715, respectively. This is because we repeatedly put a hand in the space between the reader and the tag, causing interference with the wireless communication which influences the measured RSS. In addition, we put the tag approximately 0.6 m in front of the reader's antenna, as shown in Figure 2. At the same time, we recorded the RSS value. When there are shelters to pass through between the reader and the tag, the RSS value fluctuates greatly, which is shown in Figure 3. Num-Announces are the cumulative sums of numbers of a tag read successfully by the RFID reader, which is normally at a rate of approximately 40 readings per minute. From Figure 3, we can see that the fluctuations are generated when the Num-Announces are about 100, 320, 500 and 715, respectively. This is because we repeatedly put a hand in the space between the reader and the tag, causing interference with the wireless communication which influences the measured RSS.

Phase
The phase is another important eigenvalue of RFID signals which the RFID reader antenna can read from the tag [45]. Similarly, we place the tag at 0.6 m as shown in Figure 2. At the same time, we record the phase value. As Figure 4 shows, if the distance between the tag and the reader is fixed, the phase value changes from 1.50 to 1.56 and the mean of the phase is 1.53, which is caused by the multipath effect and the various noises in the indoor environment. However, we can consider 1.53 as the phase value in the experiment through simple data processing. We hold the view that this characteristic of phase in a fixed distance belongs to a stable status.
We put the RFID tag in front of the antenna of the RFID reader and kept away from it while we used the RFID reader to read the phase value at the same time. As shown in Figure 5, we found that the phase value has a linear relationship with the distance and is cyclical. In addition, the phase difference [46] of tag sensitivity makes it hard to use passive RFID for large-scale location usage.

Phase
The phase is another important eigenvalue of RFID signals which the RFID reader antenna can read from the tag [45]. Similarly, we place the tag at 0.6 m as shown in Figure 2. At the same time, we record the phase value. As Figure 4 shows, if the distance between the tag and the reader is fixed, the phase value changes from 1.50 to 1.56 and the mean of the phase is 1.53, which is caused by the multipath effect and the various noises in the indoor environment. However, we can consider 1.53 as the phase value in the experiment through simple data processing. We hold the view that this characteristic of phase in a fixed distance belongs to a stable status.
We put the RFID tag in front of the antenna of the RFID reader and kept away from it while we used the RFID reader to read the phase value at the same time. As shown in Figure 5, we found that the phase value has a linear relationship with the distance and is cyclical. In addition, the phase difference [46] of tag sensitivity makes it hard to use passive RFID for large-scale location usage.

Phase
The phase is another important eigenvalue of RFID signals which the RFID reader antenna can read from the tag [45]. Similarly, we place the tag at 0.6 m as shown in Figure 2. At the same time, we record the phase value. As Figure 4 shows, if the distance between the tag and the reader is fixed, the phase value changes from 1.50 to 1.56 and the mean of the phase is 1.53, which is caused by the multipath effect and the various noises in the indoor environment. However, we can consider 1.53 as the phase value in the experiment through simple data processing. We hold the view that this characteristic of phase in a fixed distance belongs to a stable status.
We put the RFID tag in front of the antenna of the RFID reader and kept away from it while we used the RFID reader to read the phase value at the same time. As shown in Figure 5, we found that the phase value has a linear relationship with the distance and is cyclical. In addition, the phase difference [46] of tag sensitivity makes it hard to use passive RFID for large-scale location usage.   Thus, if we use the RFID signal to carry out indoor positioning, we must overcome the noise in indoor environment and the cycle characteristic of the phase. In this paper, we mainly solve the noise problem which influences the location accuracy. In the following, we will use a Gaussian filter to filter abnormal RSS values and use Bayesian estimation with the KNN algorithm to improve positioning accuracy in RFID systems.

Bayes Theorem
The formula for conditional probability in statistics is: That is, the probability ( ) that event A and event B occur at the same time is equal to the probability ( ) that event A occurs multiplied by the probability ( | ) that event B occurs under the probability of the occurrence of event A. Or the probability ( ) is equal to the probability ( ) that event B occurs multiplied by the probability ( | ) that event A occurs under the probability of the occurrence of event B. From Equation (1), we can get:   Thus, if we use the RFID signal to carry out indoor positioning, we must overcome the noise in indoor environment and the cycle characteristic of the phase. In this paper, we mainly solve the noise problem which influences the location accuracy. In the following, we will use a Gaussian filter to filter abnormal RSS values and use Bayesian estimation with the KNN algorithm to improve positioning accuracy in RFID systems.

Bayes Theorem
The formula for conditional probability in statistics is: That is, the probability ( ) that event A and event B occur at the same time is equal to the probability ( ) that event A occurs multiplied by the probability ( | ) that event B occurs under the probability of the occurrence of event A. Or the probability ( ) is equal to the probability ( ) that event B occurs multiplied by the probability ( | ) that event A occurs under the probability of the occurrence of event B. From Equation (1), we can get: Thus, if we use the RFID signal to carry out indoor positioning, we must overcome the noise in indoor environment and the cycle characteristic of the phase. In this paper, we mainly solve the noise problem which influences the location accuracy. In the following, we will use a Gaussian filter to filter abnormal RSS values and use Bayesian estimation with the KNN algorithm to improve positioning accuracy in RFID systems.

Bayes Theorem
The formula for conditional probability in statistics is: That is, the probability P(AB) that event A and event B occur at the same time is equal to the probability P(A) that event A occurs multiplied by the probability P(B|A) that event B occurs under the probability of the occurrence of event A. Or the probability P(AB) is equal to the probability P(B) that event B occurs multiplied by the probability P(A|B) that event A occurs under the probability of the occurrence of event B. From Equation (1), we can get: Assume that event B is a probability space which is composed of independent events, then P(A) can be expanded by the full probability formula: Thus, the Bayesian formula can be expressed as: P(B i |A) refers to the posterior probability, but P(A|B n )P(B n ) refers to the prior probability, and P(B i ) refers to the basis probability. The Bayesian formula also can be expressed as: Normally, P(A|B) is not equal to P(B|A) . However, the two have a definite relationship, where Bayesian law is the statement of this relationship. Bayesian law is the relationship of the conditional probability and the marginal probability of random events A and B, which is shown in the following formula: Where P(A|B) is the possibility of event A occuring in the case of event B having occurred, P(A) is the prior probability (also called the marginal probability) of event A which is unaffected by any factor of event B, P(A|B) is the conditional probability of event B having already occurred and is also called the posterior probability of event A, P(B|A) is the conditional probability of event A having already occurred and is also called the posterior probability of event B, and P(B) is the prior probability of event B which is unaffected by any factor of event A. In addition, sometimes P(B|A) P(B) is also called the standardized likelihood. Then the Bayesian law can be expressed as: Posterior probability = Standardized likelihood × Prior probability.
In summary, the parameters are being estimated as a random variable which is a specific distribution form, and the probability density distribution f (x|θ) is transferred as the posterior probability h(x|θ). It first obtains the probability density distribution and then obtains the parameter estimation value through mathematical expectations. The specific steps of the Bayesian estimate are used in our method and listed as follows: (1) Confirm the prior distribution π(θ) of parameter θ.

Proposed Positioning Algorithm
The indoor environment is changeable because of the intensity of the population, the random walking behavior of person, the path's effect and so on. This will make the RSS value of the RFID tag fluctuate around a certain value. The RSS value in the same location can be approximated by the Gaussian probability distribution, and the probability density function can be expressed as the following: where x represents the actual RSS value, µ = 1 m ∑ m i=1 RSSI i represents the mean of the RSS value, 2 and σ represents the standard deviation. In order to overcome the noise in the indoor environment, we used a Gaussian filter to filter the abnormal RSS value and used Bayesian estimation to improve positioning accuracy. The proposed positioning algorithm based on Bayesian probability and KNN (BKNN) has the following three processes: (1) KNN to select k reference tags, (2) the Gaussian filter process and (3) the Bayesian estimation process. The details of algorithm BKNN are as follows: • KNN Suppose there are n readers and m reference tags in an RFID systems, and u target tags are need to be positioned. The RSS vector of the target tags is s = (s 1 , s 2 , s 3 , · · · , s n ), which indicates the RSS value of the target tags detected by the reader i, i ∈ (1, n). For the reference tags, the corresponding RSS vector is θ = (θ 1 , θ 2 , θ 3 , · · · , θ n ). The Euclidean distance is defined as E j = √ θ i − s i , j ∈ (1, m), which is based on the target tag and reference tag. The Euclidean distance E is used to measure the proximity of the target tag and the reference tag, that is, while the reference tag is close to the target tag the E value should be smaller. Therefore, when there are m reference tags, the E value of the target tag p and all reference tags should be smaller. Accordingly, the E value vector of the target tag p and all reference tags can be expressed as E = (E 1 , E 2 , E 3 , · · · , E m ), and sorted in order from small to large which is recorded as E = (E 1 , E 2 , E 3 , · · · , E m ). From this sequence, the k reference tags are selected and the weighted average value is calculated according to the known tag position, and the approximate position of the target tag can be estimated.

• Gaussian Filter Process
In order to make the collected RSS value close to the real value and thus improve the positioning accuracy, we need to filter the fluctuating RSS value which is generated by the probability event or noise interference. Take the RSS collection process as a normal distribution model. When we calculate the RSS, assuming that it is a Gaussian distribution in which µ represents the mean of the RSS value and σ represents the standard deviation. The result of the density function of x is expressed as the following: 2 , RSSI i is the i-th RSS value, and m is the measurement time. The greater the value of σ is, the better the smoothing effect of the Gaussian filter is. We select the a probability is greater than 0.6 which is in the high probability generation area, that is 0.6 ≤ f (x) ≤ 1, 0.15σ + µ ≤ x ≤ 3.09σ + µ. This range of RSS values is selected, and then the geometric average is calculated which is regarded as the target tag's RSS value.

• Bayesian Estimation Process
When calculating the target tag's coordinate using the LANDMARC algorithm, a different k value will produce a different coordinate. The measurement can be repeated k times. Suppose the measurement is independent, according to Bayesian theory, the prior probability model and the posteriori probability model can be set up. The prior probability model is used to estimate the probability at k time of the target's probable position at k − 1 time. After that, the posteriori Let Z k = {Z i , i = 1, 2, 3, . . . , k} represents the sets of all measured k tags' coordinates, and Z i is the i-th tag's measured coordinates. p(Z k |X k ) is the probability of the unknown tag at X k position under the known set Z k , and p(Z k |X k ) is also called as posteriori probability; p(X k |Z k−1 ) is the prior probability which represents the position estimation of unknown tag under the unknown set Z k . Assuming that the measured values are independent of each other, we can get the following formula according to Bayesian formula: The proposed Bayesian estimation based positioning algorithm is as follows: (1) Determine the prior probability: p(X k |Z k−1 ). Suppose X k = (x, y), X k−1 = (x k−1 , y k−1 ), we can obtain the following formula: where D 1 is the distance between X k and X k−1 . (2) Determine the posteriori probability: p(Z k |X k ), which is shown in the following formula.
where p(Z k |X k ) is the probability of the unknown tag at X k position and the measured distance is D 2 , Q represents the distance between the unknown tag and the reader's antenna, and σ 2 represents the uncertainty variance of the measured distance. In our algorithm, four reference tags around the target tags' position are selected, where these positions are (3) Calculate the probability distribution function of the unknown tag's position. According to Formulas (9)-(11), we can calculate the p(X k |Z k ) which represents the probability distribution function of the target tag's location. We then get the following formula: where In Equation (13), q i is the distance between the reference tag and the target tag. The value of (x, y) which could make p(x, y) to be the maximum value can be regarded as the target position. The exponential function is monotonic, and we can find the (x, y) that can make f (x, y) has the maximum. The target function f (x, y) contains nonlinear factors, we define g i (x, y) = (x − a i ) 2 + (y − b i ) 2 and expand the approximate value (x , y ) with Taylor expansion type, and then we can get the following equation: , we can get the following formula: (4) Calculate the target tag's position. What makes p(x, y) to be the maximum value can be considered as the target tag's location. Let the first derivative of Equation (15) equals zero, we can get the following equation: Then the value of (x, y) which is the position of the target tag can be calculated using Equation (16). Figure 6 shows the experimental environment. In our experiments, Impinj R420 RFID reader and EPC Gen2 tags are used. The experimental settings are listed in Table 2. In the experiments, the whole test area is 3.6 m × 4.8 m. We placed 117 reference tags positioned in 9 rows by 13 columns in the monitoring area of the RFID reader (Figure 6a shows part of the monitoring area) and 5 target tags which needed to be positioned. The matchboxes were used to bolster tags in the experiments. The detailed experimental settings with every tag space duration distance are shown in Figure 6b, where the squares and triangles represent reference tags and to-be-positioned target tags, respectively.

Experimental Settings
Then the value of 7, c which is the position of the target tag can be calculated using Equation (16). Figure 6 shows the experimental environment. In our experiments, Impinj R420 RFID reader and EPC Gen2 tags are used. The experimental settings are listed in Table 2. In the experiments, the whole test area is 3.6 m × 4.8 m. We placed 117 reference tags positioned in 9 rows by 13 columns in the monitoring area of the RFID reader (Figure 6a shows part of the monitoring area) and 5 target tags which needed to be positioned. The matchboxes were used to bolster tags in the experiments. The detailed experimental settings with every tag space duration distance are shown in Figure 6b, where the squares and triangles represent reference tags and to-be-positioned target tags, respectively. [Office1]: The Table 2. is revised as t

Results of the Gaussian Filter for RSS
We collected the 5 tags' RSS values using the R420 RFID reader, Figure 7 shows the results of the RSS values where we can see that there are many fluctuations. The Gaussian filter is used to process these abnormal data, Figure 8 shows the results of the filtered RSS value. We can see that the RSS values processed by the Gaussian filter are stable to some extent and there are no large fluctuations.

Results of the Gaussian Filter for RSS
We collected the 5 tags' RSS values using the R420 RFID reader, Figure 7 shows the results of the RSS values where we can see that there are many fluctuations. The Gaussian filter is used to process these abnormal data, Figure 8 shows the results of the filtered RSS value. We can see that the RSS values processed by the Gaussian filter are stable to some extent and there are no large fluctuations.

Results of the Gaussian Filter for RSS
We collected the 5 tags' RSS values using the R420 RFID reader, Figure 7 shows the results of the RSS values where we can see that there are many fluctuations. The Gaussian filter is used to process these abnormal data, Figure 8 shows the results of the filtered RSS value. We can see that the RSS values processed by the Gaussian filter are stable to some extent and there are no large fluctuations.

Results of the Average Location Error
Firstly, we selected the original data obtained from the RFID reader and used the LANDMARC algorithm to position unknown tags. Then the average location error was compared among the LANDMARC algorithm [25], the IKNN algorithm [43], the Gaussian-based algorithm and our BKNN algorithm. In the experiments, 4 reference tags are selected to locate target. We performed 10 timed tests, and each test took about 20 min. So the sum of Num-Announces of each selected reference tag was about 8000, and all of those RSS values were collected and used by positioning algorithms to estimate the 5 target tags. Figure 9 shows the results of the average location error among the compared algorithms. We can see that the location error of the Gaussian-based algorithm is less than that of the LANDMARC and IKNN algorithm, this is because some abnormal RSS values can be filtered by the Gaussian filter. The average error of the BKNN location estimation is about 15 cm, which is the smallest among the compared algorithms. This is because our BKNN uses the proper k value and processed RSS values which can remove abnormal location data, and uses Bayesian probability to estimate the target tag's location which can predict the exact location data. Thus, BKNN reduces the location error and has a much higher location accuracy than that of other compared algorithms. According to literature [43], the tag space between the two reference tags is 1 m, but the average error of location estimation is about 85 cm, while the average error of our algorithm is about 15 cm when the tag space is 40 cm. Though we use more reference tags, the accuracy is improved, which has significant implications for practical indoor positioning algorithms. In low cost RFIDbased indoor positioning environments, the average accuracy of the location estimation of our algorithm is also very effective and suitable for use in indoor location based services, i.e., book searching in the library, locating patients in a hospital, finding people trapped in a burning building, finding an individual's luggage without removing it from the vehicle or the aircraft in an airport and reminding passengers of flights and boarding gates so that they do not miss their flights or delay departures.

Results of the Average Location Error
Firstly, we selected the original data obtained from the RFID reader and used the LANDMARC algorithm to position unknown tags. Then the average location error was compared among the LANDMARC algorithm [25], the IKNN algorithm [43], the Gaussian-based algorithm and our BKNN algorithm. In the experiments, 4 reference tags are selected to locate target. We performed 10 timed tests, and each test took about 20 min. So the sum of Num-Announces of each selected reference tag was about 8000, and all of those RSS values were collected and used by positioning algorithms to estimate the 5 target tags. Figure 9 shows the results of the average location error among the compared algorithms. We can see that the location error of the Gaussian-based algorithm is less than that of the LANDMARC and IKNN algorithm, this is because some abnormal RSS values can be filtered by the Gaussian filter. The average error of the BKNN location estimation is about 15 cm, which is the smallest among the compared algorithms. This is because our BKNN uses the proper k value and processed RSS values which can remove abnormal location data, and uses Bayesian probability to estimate the target tag's location which can predict the exact location data. Thus, BKNN reduces the location error and has a much higher location accuracy than that of other compared algorithms. According to literature [43], the tag space between the two reference tags is 1 m, but the average error of location estimation is about 85 cm, while the average error of our algorithm is about 15 cm when the tag space is 40 cm. Though we use more reference tags, the accuracy is improved, which has significant implications for practical indoor positioning algorithms. In low cost RFID-based indoor positioning environments, the average accuracy of the location estimation of our algorithm is also very effective and suitable for use in indoor location based services, i.e., book searching in the library, locating patients in a hospital, finding people trapped in a burning building, finding an individual's luggage without removing it from the vehicle or the aircraft in an airport and reminding passengers of flights and boarding gates so that they do not miss their flights or delay departures.

Comparisons of BKNN with Different Positioning Methods
In this section, for precision, cost, time consumption, energy consumption, etc., we compare BKNN with other positioning methods, such as LANDMARC [25], fingerprint-based [33], phasebased [34] and IKNN [43]. Table 3 shows the results of the comparisons. As passive UHF RFID was used, the cost and energy consumption is low in our BKNN algorithm. All the compared algorithms use the COTS RFID reader which can easily be implemented in current RFID systems, and because the abnormal data is filtered before calculating the final location, the time consumption is lower than that of the IKNN and LANDMARC algorithms.

Conclusions
This paper has presented an indoor positioning method using passive UHF RFID. However, there are two problems that passive RFID encounters when used in an indoor location. The first problem is that the RSS value of RFID is easily affected by the surrounding dynamic environment. The second problem is the phase value is cyclical and the phase difference is tag sensitive, which makes UHF RFID difficult to use in large-scale locations. In this paper, we mainly solve the noise problem which influences the location accuracy. A Gaussian filter is used to filter abnormal RSS values and Bayesian estimation together with the KNN algorithm are used to improve positioning accuracy. In the experiments, 4 reference tags are selected to locate target. The average location error of our algorithm is about 15 cm, which is the smallest among the compared algorithms. Because the positioning accuracy has a relationship with the collected RSS values of reference tags, how to deploy the optimized placement of readers and reference tags will be studied in our future work.

Comparisons of BKNN with Different Positioning Methods
In this section, for precision, cost, time consumption, energy consumption, etc., we compare BKNN with other positioning methods, such as LANDMARC [25], fingerprint-based [33], phase-based [34] and IKNN [43]. Table 3 shows the results of the comparisons. As passive UHF RFID was used, the cost and energy consumption is low in our BKNN algorithm. All the compared algorithms use the COTS RFID reader which can easily be implemented in current RFID systems, and because the abnormal data is filtered before calculating the final location, the time consumption is lower than that of the IKNN and LANDMARC algorithms.

Conclusions
This paper has presented an indoor positioning method using passive UHF RFID. However, there are two problems that passive RFID encounters when used in an indoor location. The first problem is that the RSS value of RFID is easily affected by the surrounding dynamic environment. The second problem is the phase value is cyclical and the phase difference is tag sensitive, which makes UHF RFID difficult to use in large-scale locations. In this paper, we mainly solve the noise problem which influences the location accuracy. A Gaussian filter is used to filter abnormal RSS values and Bayesian estimation together with the KNN algorithm are used to improve positioning accuracy. In the experiments, 4 reference tags are selected to locate target. The average location error of our algorithm is about 15 cm, which is the smallest among the compared algorithms. Because the positioning accuracy has a relationship with the collected RSS values of reference tags, how to deploy the optimized placement of readers and reference tags will be studied in our future work.