# Implementing an Industry 4.0 UWB-Based Real-Time Locating System for Optimized Tracking
## 4 Results and Discussion
For each point the \(x\) error is:  
\[error_{x_{i}}=x_{R_{i}}-x_{M_{i}} \tag{11}\]  
where \(x_{R_{i}}\) is the actual tag's position for the \(I\) measurement on the \(X\) axis and \(x_{M_{i}}\) is the relevant measured tag's position. The \(RMSE_{X}\) can be calculated as follows:  
\[RMSE_{X}=\sqrt{\frac{\sum_{i=1}^{n}error_{x_{i}^{2}}}{n}} \tag{12}\]  
For each point, the RMSE was calculated based on the 100 estimated position measurements. It was observed that the position estimation varies more for points that face NLOS conditions while communicating with an anchor (Table 3). The error on the \(Y\) axis is similarly calculated by replacing the \(x\) variable with the \(y\):  
\[RMSE_{Y}=\sqrt{\frac{\sum_{i=1}^{n}\left(y_{R_{i}}-y_{M_{i}}\right)^{2}}{n}} \tag{13}\]  
Figure 10: Box plot of the Euclidean error at the NLOS points for (i) the normal trilateration algorithm and (ii) the proposed algorithm. Finally, the \(RMSE_{XY}\) is calculated based on the Euclidean distance between the real-world and measured points and is described using the following equation:  
\[RMSE_{XY}=\sqrt{\frac{\sum_{i=1}^{n}\left(x_{R_{i}}-x_{M_{i}}\right)^{2}+\left(y _{R_{i}}-y_{M_{i}}\right)^{2}}{n}} \tag{14}\]  
The RMSE values from the two experiments and for all the points under study are calculated and presented in Table 3.  
Figure 11a shows the location error of the proposed algorithm at point B. The actual position of the tag is represented by the orange dot, while the blue points and the red \"x\" marks indicate the calculated positions using the normal trilateration method and the proposed algorithm, respectively. The maximum deviations for the proposed algorithm are 0.25 m on the \(X\) axis and 0.22 m on the \(Y\) axis. Additionally, we found that 80% of the observations had a Euclidean distance error of less than 0.18 m, whereas, with the normal trilateration algorithm, only 50% of the observations had this level of error. The maximum observed Euclidean errors for the normal trilateration and proposed algorithm were 0.26 m and 0.37 m, respectively. Thus, we can conclude that the RMSE of the measurements is at an acceptable level and very close to the hardware specifications. It is worth noting that one limitation of the proposed algorithm is its reliance on knowing the previous tag's location, which necessitates either the initialization or initial localization of the tag using at least three anchors. However, it can be utilized in various positioning systems as a fallback solution when the NLOS range correction is ineffective. Finally, a hypothesis test of the mean localization error between the two algorithms was conducted. The null hypothesis was that the mean difference of the localization error under NLOS conditions between the normal trilateration algorithm (M = 17.46 cm, SD = 55 cm, n = 200) and the proposed algorithm (M = 11.89, SD = 32 cm, n = 200) was lower than 4 cm. The results showed that the difference was significant, t(374) = 2.356, \(p\) = 0.009 (1 tail), and we can reject the null hypothesis. Thus, we can conclude that the proposed algorithm's mean error is at least 4 cm lower than that of the normal trilateration algorithm. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Point (\(X\),\(Y\))** & \multicolumn{3}{c}{**Normal Trilateration Algorithm Error**} & \multicolumn{3}{c}{**Proposed RLTS System Error**} \\  & \(X\) RMSE & \(Y\) RMSE & **Euclidean RMSE** & \(X\) RMSE & \(Y\) RMSE & **Euclidean RMSE** \\ \hline A (4.40,3.00) & 0.071 & 0.068 & 0.098 & 0.060 & 0.074 & 0.095 \\ B (2.50,3.20) & 0.143 & 0.141 & 0.201 & 0.097 & 0.110 & 0.147 \\ C (2.40,3.80) & 0.147 & 0.136 & 0.201 & 0