IEEE TRANSACTIONS ON MOBILE COMPUTING,VOL.XX,NO.XX,2019 9 Moving direction Fig.15.The distance differences are differ- ent for the equal tag separation along differ- ent directions Fig.16.Different kinds of package stacking Fig.17.Determining package stacking in 3D space the same tag separation.As shown in Fig.15,the tag pair with a constant speed,so in our work,we assume that the [T1,T2}is perpendicular to the antenna plane,while the antenna can perform the mobile scanning with a constant tag pair [T2,T3}is parallel to the antenna plane.Their tag speed v.As a result,it is easy to get the moving distance separation distances are the same,as Adh=Adu,but their I during the time difference At,as:I =v x At.It would perpendicular distance differences are not similar.Suppose be better that the antenna can localize itself accurately,but the distance from Ti to the antenna is 1m,the tag separation our assumption is more economical and convenient to be is 0.2m,so the perpendicular distance difference between satisfied in practice. T2 and T3 is only 1.65cm,which is much smaller than that between T and T2(20cm).Since the distance difference is 4.4 Determine Package Stacking for Multiple Packages so small,the relationship of such tag pair is probably to be wrong.So,besides the fitting effect,it is better to take into 4.4.1 Limitations of Position Indicators for Determining Package Stacking account the perpendicular distance differences of a tag pair when setting weights for voting package orientations. When we determine the package orientation,we derive the indicators for the relative positions among the tags on a 4.The rule of deploying tags in Section 4.3.1 is a simple single package.As the geometry relationships of these tags solution but not a unique solution.The rule that the orien- are known,we can combine these indicators(perpendicular tations of tags should be along different orthogonal axes distance and perpendicular point)from different tags to (in Fig.10(a))is to ensure the high probability of acquiring estimate the indicators of the package's center point.Then, sufficient effective backscattered signals.Actually,it is not necessary to restrict the tag orientations along axes,any similarly,we compare the indicators of the center points of different packages to determine their stacking situation. tag orientation is fine as long as ensuring the probability Note that,these indicators extracted from once 1D scanning of successful tag interrogation regardless of the package may not support the package stacking determination due to placement.Meanwhile,as mentioned in Section 4.3.2,the the 3-DoF in the 3D space.As shown in Fig.16,suppose tag orientation has impacts on the linear fitting result,espe- the antenna is above all the packages and is in front of the cially for the perpendicular distances of tags with different orientations.If two tags should have the same orientation packages along the X axis,it moves along the Y axis.It is easy to determine the package orders along the y axis in design but have different orientations in reality caused by referring to their perpendicular points,but it may be a by the poor tag attachment,it is probable to degrade the problem to determine their orders in the XZ plane.If the performance.What's worse,if the tag array is wrongly stored in the database,i.e.,the EPC of a tag is wrongly packages line up,that is,the packages are along the Z axis or along the X axis,as the left two cases shown in Fig.16,we recorded,or the tag array is attached to the wrong box, can determine their orders along their lining up direction by such bad situations are beyond the ability of our solution. comparing their perpendicular distances of their centers.For However,if applied to the practical industry,the tagged instance,the perpendicular distance of package A should be boxes should be automatically produced by machines,the smaller than others,so package A is ahead of other packages tag attachment ought to satisfy the production standards,so along the X/Z axis.If not,however,as the 2 x 2 package in this paper,we do not bring in the poor tag attachment or stacking of the right case in Fig.16,we cannot identify the other exceptions deliberately. orders of the packages exactly along the X and Z axes at the 5.The antenna has to move along an absolutely straight line same time only through the position indicators.To solve this and knows its real-time moving distance.Our angle-profile- problem,our basic solution is to perform one more mobile based model has a basic requirement that the antenna has scanning along the orthogonal direction of the previous to move along a straight line,such that we can build the scanning direction,so as to limit the number of the free angle profile and then use it to extract position indicators dimensions in the 3D space.The more times of the mobile by referring to Eq.(3).If it happens that the antenna does scanning is,the much more the cost will be,thus we adopt not move along an absolutely straight line,it would cause the mobile scanning twice as the least needed times.Such estimation errors of the antenna's moving distance and that,the package stacking can be determined in the 3D space further degrade the performance.To handle with such a with a 2D mobile scanning.Note that,it is much easier and practical problem,one possible solution is to fix the antenna costs less to perform the 1D scanning than the 2D scanning, on a linear mobile track as shown in Fig.1.Also,it is likely to and in some circumstances,we are only able to perform the design solutions to compensating the location error because 1D scanning,so based on the localization of the tag array, of the imperfect linear movement in the future.Note that,it we also propose a contemporary solution to determining the will cost much more to localize an antenna than to move it package stacking with only once 1D scanning.IEEE TRANSACTIONS ON MOBILE COMPUTING, VOL. XX, NO. XX, 2019 9 -./ -.0 1" 1& 1' Fig. 15. The distance differences are different for the equal tag separation along different directions ) * + , ) * + , ) * + , Y X Z Fig. 16. Different kinds of package stacking Moving direction Y X Z ! " # $ % & ' ( Fig. 17. Determining package stacking in 3D space the same tag separation. As shown in Fig. 15, the tag pair {T1, T2} is perpendicular to the antenna plane, while the tag pair {T2, T3} is parallel to the antenna plane. Their tag separation distances are the same, as ∆dh = ∆dv, but their perpendicular distance differences are not similar. Suppose the distance from T1 to the antenna is 1m, the tag separation is 0.2m, so the perpendicular distance difference between T2 and T3 is only 1.65cm, which is much smaller than that between T1 and T2 (20cm). Since the distance difference is so small, the relationship of such tag pair is probably to be wrong. So, besides the fitting effect, it is better to take into account the perpendicular distance differences of a tag pair when setting weights for voting package orientations. 4. The rule of deploying tags in Section 4.3.1 is a simple solution but not a unique solution. The rule that the orientations of tags should be along different orthogonal axes (in Fig. 10(a)) is to ensure the high probability of acquiring sufficient effective backscattered signals. Actually, it is not necessary to restrict the tag orientations along axes, any tag orientation is fine as long as ensuring the probability of successful tag interrogation regardless of the package placement. Meanwhile, as mentioned in Section 4.3.2, the tag orientation has impacts on the linear fitting result, especially for the perpendicular distances of tags with different orientations. If two tags should have the same orientation in design but have different orientations in reality caused by the poor tag attachment, it is probable to degrade the performance. What’s worse, if the tag array is wrongly stored in the database, i.e., the EPC of a tag is wrongly recorded, or the tag array is attached to the wrong box, such bad situations are beyond the ability of our solution. However, if applied to the practical industry, the tagged boxes should be automatically produced by machines, the tag attachment ought to satisfy the production standards, so in this paper, we do not bring in the poor tag attachment or other exceptions deliberately. 5. The antenna has to move along an absolutely straight line and knows its real-time moving distance. Our angle-profilebased model has a basic requirement that the antenna has to move along a straight line, such that we can build the angle profile and then use it to extract position indicators by referring to Eq. (3). If it happens that the antenna does not move along an absolutely straight line, it would cause estimation errors of the antenna’s moving distance and further degrade the performance. To handle with such a practical problem, one possible solution is to fix the antenna on a linear mobile track as shown in Fig. 1. Also, it is likely to design solutions to compensating the location error because of the imperfect linear movement in the future. Note that, it will cost much more to localize an antenna than to move it with a constant speed, so in our work, we assume that the antenna can perform the mobile scanning with a constant speed v. As a result, it is easy to get the moving distance l during the time difference ∆t, as: l = v × ∆t. It would be better that the antenna can localize itself accurately, but our assumption is more economical and convenient to be satisfied in practice. 4.4 Determine Package Stacking for Multiple Packages 4.4.1 Limitations of Position Indicators for Determining Package Stacking When we determine the package orientation, we derive the indicators for the relative positions among the tags on a single package. As the geometry relationships of these tags are known, we can combine these indicators (perpendicular distance and perpendicular point) from different tags to estimate the indicators of the package’s center point. Then, similarly, we compare the indicators of the center points of different packages to determine their stacking situation. Note that, these indicators extracted from once 1D scanning may not support the package stacking determination due to the 3-DoF in the 3D space. As shown in Fig. 16, suppose the antenna is above all the packages and is in front of the packages along the X axis, it moves along the Y axis. It is easy to determine the package orders along the Y axis by referring to their perpendicular points, but it may be a problem to determine their orders in the XZ plane. If the packages line up, that is, the packages are along the Z axis or along the X axis, as the left two cases shown in Fig. 16, we can determine their orders along their lining up direction by comparing their perpendicular distances of their centers. For instance, the perpendicular distance of package A should be smaller than others, so package A is ahead of other packages along the X/Z axis. If not, however, as the 2 × 2 package stacking of the right case in Fig. 16, we cannot identify the orders of the packages exactly along the X and Z axes at the same time only through the position indicators. To solve this problem, our basic solution is to perform one more mobile scanning along the orthogonal direction of the previous scanning direction, so as to limit the number of the free dimensions in the 3D space. The more times of the mobile scanning is, the much more the cost will be, thus we adopt the mobile scanning twice as the least needed times. Such that, the package stacking can be determined in the 3D space with a 2D mobile scanning. Note that, it is much easier and costs less to perform the 1D scanning than the 2D scanning, and in some circumstances, we are only able to perform the 1D scanning, so based on the localization of the tag array, we also propose a contemporary solution to determining the package stacking with only once 1D scanning