# Secure Indoor Localization Based on Extracting Trusted Fingerprint
## 3 Localization Model
### Error Sources of RSSI  
Nowadays, most researchers usually consider the loss problem of RSSI propagation, and they take corresponding measures to deal with the problem. However, when performing localization in harsh indoor environments such as in underground coal mine localization, the safety of staff needs to have attention paid to it; at the same time, the safety of physical equipment should also be of concern to ensure that the system that uses the equipment can work normally. When the APs are impaired, the RSSI will be changed. In the fingerprint-based localization system, if there are wrong RSSI, this will cause a large localization error. In order to make the localization result more accurate, we need to identify the environmental factors and other external conditions and select more stable and trusted fingerprints for localization. This section analyzes the impact of APs themselves on localization accuracy. In the underground coal mine localization environment, due to the variability of the environment and the complexity of the tools used, the physical equipment may be impaired to varying degrees. The impaired extent of the equipment can be roughly divided into: slightly impaired and completely destroyed. Slightly impaired represents that the device can transmit signals, but due to the equipment being impaired, the signal transmitted by the equipment is weak or unstable. Completely destroyed means that the equipment is unable to work, so it cannot transmit signals. In order to avoid the impact of impaired equipment on the localization accuracy, we need to identify different degrees of impairedness and then apply different solutions for different situations. For slightly impaired APs, we reduce the trust value of the APs in localization so that the fingerprint in the fingerprint database can be more compatible with the fingerprints in the online phase. The deployment and the number of APs also affect the localization result. In order to reduce equipment overhead, when deploying APs, we should achieve the best effect with minimum APs. Therefore, if there are destroyed APs in the localization environment, we should identify and handle the APs in time so as to avoid the impact of the APs on the localization system. We carry out an experimental analysis of the RSSI when there is an impaired AP. First, we fixed the distance between the measuring location and the AP, then we collected the RSSI for impaired AP and normal AP, respectively. In order to verify whether the distance between the measuring location and the AP may have an effect on the distinction between normal AP and impaired AP, we increase the distance between the AP and the measuring location, then collect the RSSI values when the AP is impaired and the AP is normal. The RSSI was recorded every five seconds, and the total duration was 20 min. The experimental results are shown in Figure 3.  
It can be seen from Figure 3 that the RSSI of the impaired AP is obviously lower than the RSSI of the normal AP, no matter the distance between the measuring location and the AP. Furthermore, the RSSI of an impaired AP is extremely unstable compared with the RSSI under normal conditions. If the  
Figure 3: Signal strength analysis. (**a**) Description of RSSI at 2 m away from the AP. (**b**) Description of RSSI at 6 m away from the AP. AP is completely destroyed, it is impossible to receive the AP's RSSI no matter how close we are to the AP. Figure 4 shows the problems with the localization system when an AP is impaired. Figure 4a shows the target location area that the localization system obtains based on the RSSI under normal conditions. When an AP is slightly impaired, the RSSI will decrease. If we do not know that the AP is impaired and use it for localization, the localization result will be affected by the AP, resulting in a large error in the localization result. Figure 4b shows that when an AP is impaired, the localization system obtains the change of the target location area compared with the normal situation.