# ANTSpin: Efficient Absolute Localization Method of RFID Tags via Spinning Antenna
## 5 Materials and Methods
### 3D Localization  
Use an antenna to rotate by 180 degrees at a constant speed at two known coordinates. For a tag to be located, there are two sets of angles and distances information. On this basis, there are three ideas for three-dimensional localization.  
1. The first type is based on the AOA algorithm. Two angular directions intersect to get the coordinate on the XOY plane, and the distance between the antenna and tags determines the \(Z\)-axis coordinate.
2. Calculate the distance between the tag and the two antennas at first. Take the antenna as the center and distance as the radius of the sphere. The intersecting loop of the two spheres determines the Y-axis coordinate. After that, the problem is converted into two-dimensional localization.
3. Third, the Y-axis coordinates are determined by using the distance data of the two antennas, and the coordinates on the XOZ plane is determined by the intersection of the two relative incident angles and the loop.  
The AOA algorithm has already been mentioned in Section 4.2 and it will not be described here. The other two methods are discussed, as follows. Figure 14a is a top view of the system deployment. Point A and B are the positions of two known coordinates where place antennas and the two antennas are, respectively, recorded as \(\mathrm{ANT_{A}}\) and \(\mathrm{ANT_{B}}\). The distance between the two antennas is L'. The distances \(\mathrm{d_{1}}\) and \(\mathrm{d_{2}}\) of the \(\mathrm{ANT_{A}}\) and \(\mathrm{ANT_{B}}\) to the tag to be positioned are, respectively, calculated according to the method in Section 5.4. For each antenna, the tag may be at any position on the spherical surface with the antenna position as the center of the sphere and the distance d being the radius. The height of the antenna from the ground is H. The equations of the two spheres are:  
\[\begin{array}{l}x^{2}+y^{2}+(z-H)^{2}={d_{1}}^{2}\\ x^{2}+(y-L^{\prime})^{2}+(z-H)^{2}={d_{2}}^{2}\end{array} \tag{16}\]  
The loop where the two spherical surfaces intersect is the alternative position of the tag, as shown in CD in Figure 13a,b. The loop equation is:  
\[\left\{\begin{array}{l}x^{2}+(z-H)^{2}={d_{1}}^{2}-y^{2}\\ y=\frac{{d_{1}}^{2}-{d_{2}}^{2}+L^{\prime 2}}{2L^{\prime}}\end{array}\right. \tag{17}\]  
The radius of the loop is \(r\) and \(Y\)-axis coordinate has been obtained. At this time, the coordinates of \(X\)-axis and \(Z\)-axis can be directly solved into the two-dimensional localization model, as mentioned in the second method above. However, a lot of effective information is wasted; in order to make full use of the collected data and improve accuracy, we undertake further analysis, as mentioned in the third method above. \(X\)-axis coordinate of the tag can be determined by the relative incident angle of the antenna. The two antennas have two relative incident angles, \(\alpha_{1}\) and \(\alpha_{2}\), and the calculated two \(X\)-axis coordinates are averaged as the final result, that is Point F in Figure 13a, then:  
\[X_{T}=\frac{\sqrt{{d_{1}}^{2}-r^{2}}\times\tan\alpha_{1}+\sqrt{{d_{2}}^{2}-r^ {2}}\times\tan\alpha_{2}}{2} \tag{18}\]  
Figure 13: 2D localization principle analysis. (**a**) Top view; (**b**) Sectional view.  
Substitute the \(X\)-axis coordinate values into the loop equation to solve two \(Z\)-axis coordinate values, which are shown as \(G_{1}\) and \(G_{2}\) points in Figure 13b. Previously, the tags are all below the antenna, so the \(G_{1}\) point was chosen to solve the coordinates of all three dimensions of the tag.