of three components:1)Preprocess:with the RF-signals of VI.DETERMINE PACKAGE ORIENTATION the tags,RF-3DScan builds the angle profiles by using the FOR EACH SINGLE PACKAGE phase differences at different time points for each tag,and To reconstruct a single package,it makes the same sense extracts the indicators in the angle profiles for the relative to determine the package orientation.so we just need to localization among the tags by linear fitting.2)Determine identify the bottom face of this package,and estimate the package orientation for a single package:by comparing the relative rotation angle of the vertical sides against the antenna relative positions of the tags on a specified package,RF- plane in a specified coordinate system.The basic idea of our 3DScan can determine which side of the package is on the approach is that we attach a set of passive RFID tags on the ground,and then evaluates the angle of the vertical sides in package under special rules,then employ one antenna to do a specified coordinate system.3)Determine package stacking 1-dimensional mobile scanning to build the angle profiles for for multiple packages:after deriving the orientation of a single each tag.Next,we compare them to determine the relative package,the centers of the packages are also determined positions of the tags,thus we can further realize the 3D along the scanning direction.By performing a 2-dimensional reconstruction for a single package. mobile scanning,RF-3DScan combines the results from the two orthogonal scanning,so the relative positions of these A.Deploy Reference Tags packages in the 3D space can be determined. In order to determine the package orientation only by 1- dimensional mobile scanning,we need to deploy the tags in an V.DATA PREPROCESS efficient way.The design principle of the tag deployment is to With the raw RF-signals,we need to build angle profiles of use as fewer as tags to depict the package uniquely,accurately different tags first.The preprocessing can be divided into three and conveniently.So,we make two rules as follows: steps:angle computation,angle smoothing and linear fitting. Rule 1:The orientations of the tags should be along different A.Angle Computation orthogonal axes.As the package can be with any orientation As the antenna collects phases at different time points in the 3D space,we should pay attention to ensuring there are always enough effective tags reflecting the signals to the during its mobile scanning,we can extract the phase dif- ferences for a tag at different positions.Using these phase antenna.As the 3D space can be defined with three orthogonal differences,we compute the angle-of-arrivals with Eg.2.To axes,we can just let the tags deployed along these axes alone, get a deterministic angle,as mentioned above,the separation as shown in Fig.8(a).With this rule,tags along one direction of the positions among two phases should be within A/4. at most are in the blind direction,so other tags can get enough power to reflect their signals to the antenna effectively. B.Angle Smoothing Rule 2:The tags should be deployed along different orthog- Although using the phase difference from the two positions onal axes.As for identifying the bottom face of the package with the small separation can get a unique angle,the noise like it is the same to find which tags are along the vertical axis and multi-path effect would influence the measured phases,there what order these tags are.So,there should be at least three would exist large fluctuation in angles,so angle smoothing is tag pairs (four tags)along three orthogonal axes separately,as required.Usually,the phases collected by the antenna is not shown in Fig.8(b).Under this rule,whatever the orientation uniform,so is the angle distribution,thus it is not suitable of the package is,there is always one tag pair along the to use the common smooth algorithms,e.g.,low-pass filter. △9+y十 vertical axis,so we can transform the identification of the Taking the noise u into consideration:cosa =2d2 bottom face of the package into finding the vertical tag pair when d is very small,has much influence on cosa. and determining their orders along the vertical axis. While when d increases,such distortion effect decreases,but Combining the above two rules,Fig.8(c)illustrates a there exist redundant angles in the results,only one of them possible tag deployment satisfying these two rules.No matter is the true value.Hence,we can derive two sets of angles what orientation the package is,there are four tags at least to from two phase separations:a small one and a large one,then avoid the signal blind direction.Also,there is always one tag use the unique angles from the small separation to filter the pair along the Z axis.By determining the tags'order of this several angle candidates from the large separation,thus,we get tag pair,we can derive which side of the package is on the a relative accurate angle profile with less fluctuation [12].Note ground then. that,too large separation will bring too much environmental B.Determine Package Orientation change and break the restraint of the angle estimation method. Thus,we set the small separation around 5-8cm and the large To determine the package orientation,it demands to identify the bottom face of the package and the relative angle of the separation within 15cm empirically when the antenna is in front of the packages about 1m. vertical sides in a specified coordinate system.Considering our assumption that one side of the cube package must be C.Linear Fitting parallel to the ground,when we deploy the tags of a package With the smoothed angles at different positions from an like the solution described in Fig.8(c),we can identify which angle profile for a certain tag,we can use the linear model as tag pair is along the Z axis and what order the tag pair is Eq.4 to fit them,then derive the two important indicators(h instead.In this case,let the antenna do mobile scanning along and lo)of that tag for the later relative localization comparison. the X or Y axis only once,we can determine the orientationof three components: 1) Preprocess: with the RF-signals of the tags, RF-3DScan builds the angle profiles by using the phase differences at different time points for each tag, and extracts the indicators in the angle profiles for the relative localization among the tags by linear fitting. 2) Determine package orientation for a single package: by comparing the relative positions of the tags on a specified package, RF- 3DScan can determine which side of the package is on the ground, and then evaluates the angle of the vertical sides in a specified coordinate system. 3) Determine package stacking for multiple packages: after deriving the orientation of a single package, the centers of the packages are also determined along the scanning direction. By performing a 2-dimensional mobile scanning, RF-3DScan combines the results from the two orthogonal scanning, so the relative positions of these packages in the 3D space can be determined. V. DATA PREPROCESS With the raw RF-signals, we need to build angle profiles of different tags first. The preprocessing can be divided into three steps: angle computation, angle smoothing and linear fitting. A. Angle Computation As the antenna collects phases at different time points during its mobile scanning, we can extract the phase differences for a tag at different positions. Using these phase differences, we compute the angle-of-arrivals with Eq. 2. To get a deterministic angle, as mentioned above, the separation of the positions among two phases should be within λ/4. B. Angle Smoothing Although using the phase difference from the two positions with the small separation can get a unique angle, the noise like multi-path effect would influence the measured phases, there would exist large fluctuation in angles, so angle smoothing is required. Usually, the phases collected by the antenna is not uniform, so is the angle distribution, thus it is not suitable to use the common smooth algorithms, e.g., low-pass filter. Taking the noise μ into consideration: cos α = λ 2d Δθ+μ 2π + nλ 2d , when d is very small, μ has much influence on cos α. While when d increases, such distortion effect decreases, but there exist redundant angles in the results, only one of them is the true value. Hence, we can derive two sets of angles from two phase separations: a small one and a large one, then use the unique angles from the small separation to filter the several angle candidates from the large separation, thus, we get a relative accurate angle profile with less fluctuation [12]. Note that, too large separation will bring too much environmental change and break the restraint of the angle estimation method. Thus, we set the small separation around 5-8cm and the large separation within 15cm empirically when the antenna is in front of the packages about 1m. C. Linear Fitting With the smoothed angles at different positions from an angle profile for a certain tag, we can use the linear model as Eq. 4 to fit them, then derive the two important indicators (h and l0) of that tag for the later relative localization comparison. VI. DETERMINE PACKAGE ORIENTATION FOR EACH SINGLE PACKAGE To reconstruct a single package, it makes the same sense to determine the package orientation, so we just need to identify the bottom face of this package, and estimate the relative rotation angle of the vertical sides against the antenna plane in a specified coordinate system. The basic idea of our approach is that we attach a set of passive RFID tags on the package under special rules, then employ one antenna to do 1-dimensional mobile scanning to build the angle profiles for each tag. Next, we compare them to determine the relative positions of the tags, thus we can further realize the 3D reconstruction for a single package. A. Deploy Reference Tags In order to determine the package orientation only by 1- dimensional mobile scanning, we need to deploy the tags in an efficient way. The design principle of the tag deployment is to use as fewer as tags to depict the package uniquely, accurately and conveniently. So, we make two rules as follows: Rule 1: The orientations of the tags should be along different orthogonal axes. As the package can be with any orientation in the 3D space, we should pay attention to ensuring there are always enough effective tags reflecting the signals to the antenna. As the 3D space can be defined with three orthogonal axes, we can just let the tags deployed along these axes alone, as shown in Fig. 8(a). With this rule, tags along one direction at most are in the blind direction, so other tags can get enough power to reflect their signals to the antenna effectively. Rule 2: The tags should be deployed along different orthogonal axes. As for identifying the bottom face of the package, it is the same to find which tags are along the vertical axis and what order these tags are. So, there should be at least three tag pairs (four tags) along three orthogonal axes separately, as shown in Fig. 8(b). Under this rule, whatever the orientation of the package is, there is always one tag pair along the vertical axis, so we can transform the identification of the bottom face of the package into finding the vertical tag pair and determining their orders along the vertical axis. Combining the above two rules, Fig. 8(c) illustrates a possible tag deployment satisfying these two rules. No matter what orientation the package is, there are four tags at least to avoid the signal blind direction. Also, there is always one tag pair along the Z axis. By determining the tags’ order of this tag pair, we can derive which side of the package is on the ground then. B. Determine Package Orientation To determine the package orientation, it demands to identify the bottom face of the package and the relative angle of the vertical sides in a specified coordinate system. Considering our assumption that one side of the cube package must be parallel to the ground, when we deploy the tags of a package like the solution described in Fig. 8(c), we can identify which tag pair is along the Z axis and what order the tag pair is instead. In this case, let the antenna do mobile scanning along the X or Y axis only once, we can determine the orientation