IEEE TRANSACTIONS ON MOBILE COMPUTING,VOL.XX,NO.XX,2019 case2 (Fig.14(b)):h1>h3,h3 h5 and for the possible case3(Fig.14(c)):h1 >h3,h3>h5.There are multiple tag pairs for the comparison,here we list part of them for ex- planation.Then,by comparing the relationships of different tag pairs,we vote for the possible cases,and select the case with the highest score as our estimation result.Considering (a)Possible casel (b)Possible case2 (c)Possible case3 that different tags have different credibilities as they are Fig.14.Possible cases for the special package orientation influenced by the ambient noise to different extents,when voting for the relationships,we tend to allocate the heavier their perpendicular points should be the same.That is,the weight to the tag pair with the better linear fitting,such that, spacing of their perpendicular points equals 0 in theory. we set the voting weight of a tag pair with the reciprocal Hence,if the spacing of the perpendicular points for a tag average linear fitting error of the two tags.Moreover,if the pair is 0,it is probable that the tag pair is along the Z linear fitting error is large than the given threshold,that tag axis now,except for some special cases where there is a will be abandoned in the following analysis.Through the tag pair along the X axis,then there are two tag pairs that weighted voting,we can effectively avoid the ambiguous their perpendicular points spacings are equal to 0,we will situation that several relationships get the same scores so as discuss it later.After identifying which tag pair is along to improve the accuracy of the orientation estimation,the the Z axis,we can determine the tags'order by comparing corresponding experiments are referred to Fig.28. their perpendicular distances extracted from their angle profiles.As the antenna is above all the tags,the tag with 4.3.4 Discussion the smaller perpendicular distance of the vertical tag pair 1.There must be a side of the package parallel to the ground. should be above the other along the Z axis.However,such As we assume that there must be a side of the package comparison ignores the relationships of the perpendicular parallel to the ground(which means the package is on the distances for other tags,it is easy to make a wrong decision ground or on other packages,not tilted),thus the state of with only one comparison results.Note that,the spacings of the package is limited,the angle estimation is restricted to the perpendicular points of the tags should stay the same along the Z axis.If not,the searching space of finding the when the package is upside down,as the package rotates optimal angle expands,the simple solution is to add one around the y axis by 180.So we can estimate the relative more mobile scanning along the direction different from the angle of the package first,then use the relationships of the previous one,the 3D reconstruction can be realized as well. perpendicular distances among different tag pairs to vote 2.There may exist serious coupling effect and interrogation for the tags'order of the vertical tag pair,then determine failure when packages are stacked closely.As packages are the bottom face of the package.When selecting the tag stacked closely in the warehouse,the large amounts of tags pairs among all the tags on the package,it is significant and small separations between tags from different packages to avoid the tags in the blind direction by filtering the tags may cause serious coupling effect or interrogation failure with relative weak RSS compared with other tags on the problems [26-30].Such problems can have great influence package.The angle estimation is based on the spacings of on the robustness of our proposed solution,which are really the perpendicular points for different tag pairs,as: difficult to deal with only through the advanced algorithms, the improvement of physical tag design is fundamental and arg min>‖6-d(p)l: (5) plays a more important role in solving these problems.The =1 advanced algorithms can mitigate these problems,but it is where N is the number of tag pairs,is the measured nearly impossible to solve the problems thoroughly.The spacing between the perpendicular points of a tag pair,6i() goal of this paper is to propose a scheme for 3D reconstruc- represents the spacing at relative angle o theoretically. tion on tagged packages,so we do not put much effort into Now,considering the case shown in Fig.10(c),we il- dealing with these problems,instead we design a prototype lustrate how to deal with the special cases where there are system to show the idea with the relative ideal environment, two tag pairs whose perpendicular point spacings are both where the coupling effect and multi-path are not so serious. equal to 0.As the antenna moves along the y axis,the Moreover,we still try to explore the effect of coupling effect perpendicular points of the tag pair on the same surface due to the small tag separation on the robustness,details are [T3,T4}or [T5,T6}are at the same point.With the relative shown in Section 5.2.2 and Fig.24.Previous work Tagyro [6] order of the tag pair [T1,T2),as the tag T is on the left of T2 does researches on the coupling effect between neighboring along the antenna moving direction,there are four possible tags,and finds that when there exists strong coupling effect, cases of the package orientation,as shown in Fig.10(c)and the actual tag separation to the antenna is not the same as Fig.14.Any of these possible cases can transform into an- the physical tag separation,so it is necessary to measure other case by rotating along the Y axis,but the relationships the actual tag separation for the following processing.They of their perpendicular distances differ,so we can use these provides the measurement of the actual tag separation to the relationships to vote for which case is the most possible case. antenna,which is likely to be utilized in our scenario.With As we assume that the antenna is above all the tags and the actual tag separation,the performance of our solution ahead of all the tags along the X axis positive direction, can be improved obviously. let the perpendicular distances for T1,T3,Ts be h1,h3,h5, 3.The difference of the perpendicular distances for the tag then for the case as Fig.10(c):h1<h3,h3 h5,for the pair parallel to the antenna plane may be much smaller than possible casel(Fig.14(a)):h<ha,h3<hs,for the possible that for the tag pair perpendicular to the antenna plane withIEEE TRANSACTIONS ON MOBILE COMPUTING, VOL. XX, NO. XX, 2019 8 ! " X Z Y # $ % & Y X (a) Possible case1 �" �# X Z Y �' �( �) �* �' �( X Z Y �* �) �# �" X Z Y �' �( �" �# �) �* �' �( �# X �" Z Y �* �) (b) Possible case2 # $ X Z Y & % " Y ! (c) Possible case3 Fig. 14. Possible cases for the special package orientation their perpendicular points should be the same. That is, the spacing of their perpendicular points equals 0 in theory. Hence, if the spacing of the perpendicular points for a tag pair is 0, it is probable that the tag pair is along the Z axis now, except for some special cases where there is a tag pair along the X axis, then there are two tag pairs that their perpendicular points spacings are equal to 0, we will discuss it later. After identifying which tag pair is along the Z axis, we can determine the tags’ order by comparing their perpendicular distances extracted from their angle profiles. As the antenna is above all the tags, the tag with the smaller perpendicular distance of the vertical tag pair should be above the other along the Z axis. However, such comparison ignores the relationships of the perpendicular distances for other tags, it is easy to make a wrong decision with only one comparison results. Note that, the spacings of the perpendicular points of the tags should stay the same when the package is upside down, as the package rotates around the Y axis by 180◦ . So we can estimate the relative angle of the package first, then use the relationships of the perpendicular distances among different tag pairs to vote for the tags’ order of the vertical tag pair, then determine the bottom face of the package. When selecting the tag pairs among all the tags on the package, it is significant to avoid the tags in the blind direction by filtering the tags with relative weak RSS compared with other tags on the package. The angle estimation is based on the spacings of the perpendicular points for different tag pairs, as: arg min φ X N i=1 kδ 0 i − δi(φ)k, (5) where N is the number of tag pairs, δ 0 i is the measured spacing between the perpendicular points of a tag pair, δi(φ) represents the spacing at relative angle φ theoretically. Now, considering the case shown in Fig. 10(c), we illustrate how to deal with the special cases where there are two tag pairs whose perpendicular point spacings are both equal to 0. As the antenna moves along the Y axis, the perpendicular points of the tag pair on the same surface {T3, T4} or {T5, T6} are at the same point. With the relative order of the tag pair {T1, T2}, as the tag T1 is on the left of T2 along the antenna moving direction, there are four possible cases of the package orientation, as shown in Fig. 10(c) and Fig. 14. Any of these possible cases can transform into another case by rotating along the Y axis, but the relationships of their perpendicular distances differ, so we can use these relationships to vote for which case is the most possible case. As we assume that the antenna is above all the tags and ahead of all the tags along the X axis positive direction, let the perpendicular distances for T1, T3, T5 be h1, h3, h5, then for the case as Fig. 10(c): h1 < h3, h3 > h5, for the possible case1 (Fig. 14(a)): h1 < h3, h3 < h5, for the possible case2 (Fig. 14(b)): h1 > h3, h3 < h5 and for the possible case3 (Fig. 14(c)): h1 > h3, h3 > h5. There are multiple tag pairs for the comparison, here we list part of them for explanation. Then, by comparing the relationships of different tag pairs, we vote for the possible cases, and select the case with the highest score as our estimation result. Considering that different tags have different credibilities as they are influenced by the ambient noise to different extents, when voting for the relationships, we tend to allocate the heavier weight to the tag pair with the better linear fitting, such that, we set the voting weight of a tag pair with the reciprocal average linear fitting error of the two tags. Moreover, if the linear fitting error is large than the given threshold, that tag will be abandoned in the following analysis. Through the weighted voting, we can effectively avoid the ambiguous situation that several relationships get the same scores so as to improve the accuracy of the orientation estimation, the corresponding experiments are referred to Fig. 28. 4.3.4 Discussion 1. There must be a side of the package parallel to the ground. As we assume that there must be a side of the package parallel to the ground (which means the package is on the ground or on other packages, not tilted), thus the state of the package is limited, the angle estimation is restricted to along the Z axis. If not, the searching space of finding the optimal angle expands, the simple solution is to add one more mobile scanning along the direction different from the previous one, the 3D reconstruction can be realized as well. 2. There may exist serious coupling effect and interrogation failure when packages are stacked closely. As packages are stacked closely in the warehouse, the large amounts of tags and small separations between tags from different packages may cause serious coupling effect or interrogation failure problems [26–30]. Such problems can have great influence on the robustness of our proposed solution, which are really difficult to deal with only through the advanced algorithms, the improvement of physical tag design is fundamental and plays a more important role in solving these problems. The advanced algorithms can mitigate these problems, but it is nearly impossible to solve the problems thoroughly. The goal of this paper is to propose a scheme for 3D reconstruction on tagged packages, so we do not put much effort into dealing with these problems, instead we design a prototype system to show the idea with the relative ideal environment, where the coupling effect and multi-path are not so serious. Moreover, we still try to explore the effect of coupling effect due to the small tag separation on the robustness, details are shown in Section 5.2.2 and Fig. 24. Previous work Tagyro [6] does researches on the coupling effect between neighboring tags, and finds that when there exists strong coupling effect, the actual tag separation to the antenna is not the same as the physical tag separation, so it is necessary to measure the actual tag separation for the following processing. They provides the measurement of the actual tag separation to the antenna, which is likely to be utilized in our scenario. With the actual tag separation, the performance of our solution can be improved obviously. 3. The difference of the perpendicular distances for the tag pair parallel to the antenna plane may be much smaller than that for the tag pair perpendicular to the antenna plane with