# Relational Positioning Method for 2D and 3D Ad Hoc Sensor Networks in Industry 4.0
## 4 Simulations and Results
### The 3D Evaluation
Simulations in Figure 8 were performed for a 3D scenario with four ANs, (\(n=43\), \(L=1\)). Note that results in Figure 8 are not normalized to \(d\). In this analysis, we can observe that for \(r_{0}=2.5\) m, approximately 100% of the calculations are under 3 m of error. The worst analyzed case is when \(r_{0}=2\) m, which can be explained because distance estimations from anchors to the \(n_{0}\) are based on the hop count, and for a very small \(r_{0}\), we achieve longer routes, resulting in bad distance estimations. However, this can be alleviated by increasing the number of nodes in the space, as previously observed in Figure 7. From these results, we can infer that the best hop distance estimation is achieved for \(r_{0}=2.5\) m. We can also infer that for \(r_{0}<2.5\) m, the distance might be overestimated, and for \(r_{0}>2.5\) m, the distance might be underestimated. In practice, it is difficult to guarantee uniform deployment of ANs, as in Figure 5a. Therefore, evaluations were carried out for regular and non-regular scenarios. Simulations  
Figure 8: Quadratic error CDF analysis for different transmission ranges, \(r_{0}\), and \(n=43\), using four ANs in a 3D scenario. Figure 7: Error analysis for different numbers of nodes \(n\) in the network and different transmission ranges, \(r_{0}\), using four ANs in a 3D scenario, with \(d=10\) m.  
were conducted for different shapes of the tetrahedron base, and the results obtained were similar to those reported in Figures 7 and 8. These results are presented in Table 3. Note that moving only \(AN_{3}\) coordinates gives enough variability to the scenario setup, as the tetrahedron's base is changed. In these simulations, coordinate \(x_{3}\) was varied, and coordinate \(y_{3}\) was fixed in order to keep the same tetrahedron volume to keep the comparison fair. Simulation parameters were set as \(n=43\), \(d=10\) m, \(AN_{1}\)(0,0,0), \(AN_{2}\)(\(d\),0,0), \(AN_{3}\)(\(x_{3}\), \(d\) sin\(\frac{\pi}{3}\), 0), \(AN_{4}\)(\(\frac{d}{2}\), \(\frac{d}{2}\) tan\(\frac{\pi}{6}\), \(h\)), and \(h=10\) m.  
However, when the tetrahedron height \(h\) is increased, we observe a slight degradation of the proposed PL method, which is due to the increased size of the searching space. In Table 4, these results are presented for different transmission ranges, \(n=43\), \(d=10\) m and \(AN_{1}\)(0,0,0), \(AN_{2}\)(\(d\),0,0), \(AN_{3}\)(\(d\) cos\(\frac{\pi}{3}\), \(d\) sin\(\frac{\pi}{3}\), 0), \(AN_{4}\)(\(\frac{d}{2}\), \(\frac{d}{2}\) tan\(\frac{\pi}{6}\), \(h\)). Note that the proposed method shows robustness under volume increments; that is, for a volume increment of 30% (from \(h=10\) m to \(h=13\) m), the normalized error \(\varepsilon/d\) increment ranges from 3.5% to 17%. In Figure 9, we analyzed the localization method for different values of the discretization unit \(L\). As we anticipated, a finer discretization grid helps to reduce the normalized error \(\varepsilon/d\) significantly. In this figure, we can observe that when the discretization unit is decreased to \(L=\frac{1}{2}\) m, improvements ranging from 39% to 45% can be achieved. As we continue to decrease \(L\), \(\varepsilon/d\) diminishes in a lower proportion. With this analysis, we demonstrate that a finer discretization leads to a lower distance error (close to 1 m) for \(L=\frac{1}{2}\) m, and to 0.8 m for \(L=\frac{1}{3}\) m.  
However, as we decreased the discretization step \(L\), we increased the number of vertices in the searching space, increasing the uncertainty. In Table 5, we analyzed the entropy function for the 3D scenario illustrated in Figure 5a, for \(L=1\) m and \(L=\frac{1}{2}\) m. The entropy values for \(L=1\) m and \(L=1/2\) m without the proposed method on the discretized space are \(H_{L=1}=5.04\) and \(H_{L=1/2}=6.9735\), respectively. Note that the method helps to significantly decrease the uncertainty. In Figure 10, we present the performance comparison for a 3D scenario with four to seven ANs.