# Robust Bluetooth AoA Estimation for Indoor Localization Using Particle Filter Fusion
## 4 Simulation Experiments and Analyses
Figure 6: Target navigation tracking results under variable speed conditions. 3. The variation in RMSE with particles is assumed to be between the number of particles [100, 1000], the number of iterations is 20, and the number of particles increases by 50 each time compared to the previous one. In order to better observe the tracking effect of the algorithm, the initial position of the particle is initialized to be the actual position. The effect of the algorithm is judged by the root mean square (RMS) [24], and the corresponding formula for RMS is shown in Equation (28). \[Rmes=\frac{1}{n}\sqrt{\frac{1}{50}\sum_{j=1}^{50}\left[\left(P\theta_{i}-T \theta_{i}\right)^{2}+\left(P\phi_{i}-T\phi_{i}\right)^{2}\right]} \tag{28}\]  
where \(n\) represents the number of iterations the algorithm has gone through. \(P\theta_{i}\) and \(P\phi_{i}\) represent the predicted values of the azimuth and dip angles in step \(i\); \(T\theta_{i}\) and \(T\phi_{i}\) represent the real values of the azimuth and dip angles. The simulation results of the experiment are shown in Figure 7.  
From Figure 7, it can be seen that with the increase in the number of particles, the error between the navigation trajectory and the actual trajectory becomes smaller and smaller and the localization accuracy is gradually improved. Comparing the RMSE values of the algorithm under the uniform speed condition and the variable speed condition, the accuracy of the algorithm under the uniform speed condition is higher, which means that the algorithm under the uniform speed condition is more likely to converge, which is in line with the actual situation. In the uniform speed condition, the algorithm results have been stabilized when the number of particles is 400. Under the variable speed condition, the algorithm starts to stabilize when the number of particles is 800, and the fluctuation of the algorithm is evident when the number of particles is less than 800. Therefore, the number of particles in Experiment 1 and Experiment 2 is chosen to be 800. 4. Examining the variation of RMSE of the algorithm proposed in this paper concerning the signal-to-noise ratio, the number of snapshots is taken as 1000, and the signal-to-noise ratio is varied from \(-5\) dB to 30 dB; the number of particles is fixed at 800. 5. We examine the variation of RMSE of the algorithm proposed in this paper with the number of snapshots. The number of snapshots is between [50 and 2000], the number of iterations is 20, and the number of snapshots increases by 100 each time compared with the previous one. In order to better observe the tracking effect of the algorithm, the initial position of the particle is initialized to be the actual position; the remaining conditions are the same as in Experiment 1. From Figure 8, it can be seen that the algorithm has good estimation accuracy when the signal-to-noise ratio ranges from 15 dB to 30 dB and the number of snapshots changes from 50 to 2000. The estimation accuracy of the algorithm becomes higher and higher as  
Figure 7: Changes in the effect of the number of particles on the root mean square value of the algorithm under uniform and variable speed conditions. the signal-to-noise ratio and the number of snapshots increase. This is because the RMSE of the algorithm converges to the CRB bound as the signal-to-noise ratio and the number of snapshots increase. 6. The algorithm proposed in this paper is compared with two algorithms, single particle filter localization and angle estimation localization. Figure 9 shows the cumulative error distribution curves of the three algorithms. The CDF for horizontal localization is used as a performance metric for localization evaluation, defining the localization error as:  
\[e=\sqrt{\left(\hat{x}-x_{true}\right)^{2}+\left(\hat{y}-y_{true}\right)^{2}} \tag{29}\]  
From the figure, the localization performance of the proposed algorithm is better than that of the other two localization algorithms.