Algorithm 1 Compute the optimal value of power Algorithm 2 Category Matching based protocol 1:INPUT::the limit of the delay; 1:INPUT:Vo {no.1,no.2,...,no.s}:the vectors for the Po:the power of the pre-scan; numbers of tags in each identified category; 2:PROCEDURE Ci=(ril,ir,li},i{1,2...N):the position of tag 3:Set reader's power to po,get the identified tag size no. category Ci: 4:From the relationship between identified tags size no and 2:PROCEDURE power po in different densities which is showed in training 3:Call Alg.I to get the optimal power po,tag density p. data set T,compute the tag density p by intersection. 4:Based on the Ta,get the minor region radius r. 5:From the relationship between identified tags size no and 5:Get the left point x and the right point of the covered scanning time (t-to)which is showed in training data range by the identified categories. set T.get the acceptable tag size n'by intersection. 6:x=+T;i←1: 6:Use the relationship in the training data set To again,we 7:while x<(z,-r)do can compute the p with the tags size n'and tag density p 8: Get the Vi at each potential position; by intersection. 9: Compute the similarity between Vo and Vi as follows: 7:OUTPUT:the optimal value of power p sim(Vo,Vi)= %·V i=ng:nog Ival·IVA V∑j=1n2o·V∑=1n2 10: x←x+△d;i←i+1; 11:end while 12:Sort the value of sim(Vo,Vi)in descending order.Find the first k nearest position1,...,k according to sim(Vo,Vi). IB:Compute-∑k1i·u,here 1/(1-sim(V6,V)+e) Wi= (e>0) ∑=11/1-sim(%,)+e) 0 3 4 14:OUTPUT:The computed position 2. Fig.7.Matching the identified tags'number as a vector.We treat the positions covered by the identified the similarity between Vo and Vi.we can get k-nearest vectors' categories as the potential positions.From the left to the positions 1,..,k.Then,using an inverse distance weighted right of these potential positions,by making each potential average with the k-nearest multivariate neighbors,we can get position as the center of a circle and the major detecting the target's position As shown in Algorithm 2. region's radius as the circle's radius,we can calculate a series 3)Analysis:This method is the improvement of the Tag of tag size vectors for the identified categories as shown in size weighted average based method.It fully uses the known Fig.7.By matching each calculated vector with other identified conditions and the results of the scanning to compute the tag vectors,we can get k-nearest vectors which have the highest density and the read rate of each category.By using vector similarities,as shown in Algorithm 2.Based on the k-nearest matching method to get the k-nearest neighbours,the accuracy neighbor algorithm,we can compute the final position. and stability of the method is guaranteed.However,there are 2)Algorithm:As shown in Fig.7,the circle filled with light some limitations too.It needs to get parameters of the scene- color represents the major detecting region.The r is the major setting,such as the distributions of detection regions.It also detecting region's radius.By the scanning results,we can get needs to compute the tag density at first,which will cause the major detecting region of each categories Ci and the tag some errors. size ni in each category.We denote these numbers of tags in each category Ci as a vector Vo(no.1,no.2,...,no.s).We C.Distance Voting based Protocol(DVP) calculate the detection region with the known tag density and 1)Motivation:To solve the limitation of the RSSI weighted reader's power.Based on training data set Ta.we can get average based solution,we get the relationship between RSSI thethe minor region radius r.Dotted line circles represent value and distance to the center of the detection region in detection ranges of other candidate positions.Through the different tag density.Then we can compute the distance linear interpolation method based on training data set T.between each tag and the center of the detection region. we can get the estimated tag density p.We calculate the Take the position of the category's midpoint as the each vectors through the geometric method.As shown in Fig.7,the category's position,then we can get a series of potential dotted line circles cover a series of categories,the location position intervals.The intersection of these intervals is the information and the estimated tag densities are known,then estimation position we want. we can get the number of tags in each category.We denote 2)Algorithm:Through algorithm 1,we can get the optimal them as vector Vi(ni.1,ni.2,...,n.s).Finally,by calculating value of the power po.Meanwhile,we can get tag density p.itAlgorithm 1 Compute the optimal value of power 1: INPUT: tl : the limit of the delay; p0: the power of the pre-scan; 2: PROCEDURE 3: Set reader’s power to p0, get the identified tag size n0. 4: From the relationship between identified tags size n0 and power p0 in different densities which is showed in training data set Tb, compute the tag density ρ by intersection. 5: From the relationship between identified tags size n0 and scanning time (tl − t0) which is showed in training data set Tc, get the acceptable tag size n 0 by intersection. 6: Use the relationship in the training data set Tb again, we can compute the pˆ with the tags size n 0 and tag density ρ by intersection. 7: OUTPUT: the optimal value of power pˆ Fig. 7. Matching the identified tags’ number as a vector. We treat the positions covered by the identified categories as the potential positions. From the left to the right of these potential positions, by making each potential position as the center of a circle and the major detecting region’s radius as the circle’s radius, we can calculate a series of tag size vectors for the identified categories as shown in Fig.7. By matching each calculated vector with other identified vectors, we can get k-nearest vectors which have the highest similarities, as shown in Algorithm 2. Based on the k-nearest neighbor algorithm, we can compute the final position. 2) Algorithm: As shown in Fig.7, the circle filled with light color represents the major detecting region.The r is the major detecting region’s radius. By the scanning results, we can get the major detecting region of each categories Ci and the tag size ni in each category. We denote these numbers of tags in each category Ci as a vector V0(n0,1, n0,2, ..., n0,s). We calculate the detection region with the known tag density and reader’s power. Based on training data set Ta, we can get the the minor region radius r. Dotted line circles represent detection ranges of other candidate positions. Through the linear interpolation method based on training data set Tb, we can get the estimated tag density ρ. We calculate the vectors through the geometric method. As shown in Fig.7, the dotted line circles cover a series of categories, the location information and the estimated tag densities are known, then we can get the number of tags in each category. We denote them as vector Vi(ni,1, ni,2, ..., ni,s). Finally, by calculating Algorithm 2 Category Matching based protocol 1: INPUT: V0 = {n0,1, n0,2, ..., n0,s}: the vectors for the numbers of tags in each identified category; Ci = {xi,l, xi,r, li}, i ∈ {1, 2...N}: the position of tag category Ci ; 2: PROCEDURE 3: Call Alg.1 to get the optimal power p0, tag density ρ. 4: Based on the Ta, get the minor region radius r. 5: Get the left point xl and the right point xr of the covered range by the identified categories. 6: x = xl + r;i ← 1; 7: while x < (xr − r) do 8: Get the Vi at each potential position; 9: Compute the similarity between V0 and Vi as follows: sim(V0, Vi) = V0 · Vi |V0| · |Vi | = Ps j=1 ni,j · n0,j qPs j=1 n2 0,j · qPs j=1 n2 i,j 10: x ← x + 4d;i ← i + 1; 11: end while 12: Sort the value of sim(V0, Vi) in descending order. Find the first k nearest positionx1, ..., xk according to sim(V0, Vi). 13: Compute xˆ = Pk i=1 xi · wi , here wi = 1/(1 − sim(V0, Vi) + ε) Pk i=1 1/(1 − sim(V0, Vi) + ε) (ε > 0) 14: OUTPUT: The computed position xˆ. the similarity between V0 and Vi , we can get k-nearest vectors’ positions x1, ..., xk. Then, using an inverse distance weighted average with the k-nearest multivariate neighbors, we can get the target’s position xˆ. As shown in Algorithm 2. 3) Analysis: This method is the improvement of the Tag size weighted average based method. It fully uses the known conditions and the results of the scanning to compute the tag density and the read rate of each category. By using vector matching method to get the k-nearest neighbours, the accuracy and stability of the method is guaranteed. However, there are some limitations too. It needs to get parameters of the scenesetting, such as the distributions of detection regions. It also needs to compute the tag density at first, which will cause some errors. C. Distance Voting based Protocol (DVP) 1) Motivation: To solve the limitation of the RSSI weighted average based solution, we get the relationship between RSSI value and distance to the center of the detection region in different tag density. Then we can compute the distance between each tag and the center of the detection region. Take the position of the category’s midpoint as the each category’s position, then we can get a series of potential position intervals. The intersection of these intervals is the estimation position we want. 2) Algorithm: Through algorithm 1, we can get the optimal value of the power p0. Meanwhile, we can get tag density ρ, it