# Secure Indoor Localization Based on Extracting Trusted Fingerprint
## 5 Experiment Analysis
### Effects of the Number of Impaired AP  
It can be seen from Figure 9 that when an AP is impaired, the algorithm proposed in this paper can achieve a better filtering effect and eliminate the influence of impaired APs on the localization accuracy. However, there may be multiple impaired APs in the environment, so there is a need for experimental verification of the presence of multiple impaired APs. During the experiment, APs were first placed in the experimental environment, and one of the AP's antennas was impaired, while the rest of the APs were normal. In this environment, the algorithm proposed in this paper and the localization algorithm without AP filtering are implemented. Then, in the experimental environment, two APs with impaired antennas were placed, and the remaining APs were normal. In this environment, the algorithm proposed in this paper and the location algorithm without the AP filter were implemented. The experimental results are shown in Figure 10. In Figure 10, the black and red lines indicate that  
Figure 9: Error analysis of different impaired levels. (**a**) Multiple localization with the same location. (**b**) Error mean in multiple localization of different locations. there are two impaired APs in the environment. The green and blue lines indicate that there is an impaired AP in the environment. The black line and the green line represent the localization results of the traditional fingerprint localization algorithm that does not perform the AP security check. The red and blue lines represent the localization results of the proposed fingerprint localization algorithm. Figure 10a shows that multiple localization are performed in the same location, and then, observe the impact of different numbers of impaired APs on the localization results. As can be seen from Figure 10a, when there is no AP security check, the more the number of impaired APs, the worse the localization result. When implementing the algorithm proposed in this paper, we can filter the impaired APs with good localization accuracy and maintain a good localization stability. Figure 10b shows the average error for multiple localizations in multiple locations. As can be seen from Figure 10b, when the impaired APs in the localization environment increase, the localization error of the proposed algorithm increases, but the average localization error is controlled within 1 m. However, without the security checks of AP, the localization accuracy drops drastically as the number of compromised APs increases. Therefore, when the localization equipment is impaired in the environment, the algorithm proposed in this paper can well control the bad influence caused by the impaired AP and keep the localization system safe and reliable. Due to the uncertainty of the degree of impaired APs in the localization environment, we need to observe the stability of the localization system as the number of impaired APs increases. In the experiment, we set different numbers of impaired APs and then make 100 locations in each case and calculate the probability distribution of their localization accuracy. Figure 11 shows the localization results for different numbers of impaired APs. The abscissa indicates the positioning error; the ordinate indicates the probability distribution of the error; and the lines of different colors indicate the number of impaired APs. Figure 11a shows the localization results of the proposed algorithm. Figure 11b shows the localization results of the traditional fingerprinting algorithm. Comparing Figure 11a,b, it can be clearly seen that whatever the number of impaired APs, as long as there are normal APs, the proposed algorithm can achieve a better localization effect. As can be seen from Figure 11, as the number of impaired APs increases, the localization error gradually increases. In the algorithm proposed in this paper, the more APs are impaired, the fewer APs are available for localization. Therefore, the localization errors change as the number of impaired APs increases.