# Proximity-Based Adaptive Indoor Positioning Method Using Received Signal Strength Indicator
## 3 Proposed Indoor Positioning Method
### RSSI Error Correction  
RSSI is an indicator representing the strength of a received signal. The optimal parameters of a radio propagation model, which describes relations between distance and \begin{table}
\begin{tabular}{c c c c} \hline \hline  & **Outlier Removal** & **RSSI Correction** & **Position Correction** \\ \hline [PERSON] et al. [15] & None & Kalman filter & None \\ [PERSON] et al. [21] & None & Kalman filter & Average filter \\ [PERSON] et al. [25] & None & None & Firefly algorithm and \\ [PERSON] et al. [26] & Based on Gaussian distribution & Linear regression & None \\ [PERSON] et al. [27] & Thompson Tau test & Continuous feature scaling & None \\ [PERSON] and [PERSON] [28] & None & Kalman filter & None \\ [PERSON] et al. [29] & None & Gaussian filter & Weighted sliding window \\ [PERSON] and [PERSON] [30] & None & None & Levenberg–Marquardt \\ [PERSON] and [PERSON] [31] & None & Referring to previous RSSI & None \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of existing studies. Figure 1: Flowchart for the proposed method. RSSI, depend on the environment between an AP and a receiver. For indoor environments, LDPLM is widely adopted as the radio propagation model [21; 22; 23; 24]. LDPLM calculates a distance from an AP to an RSSI as follows:  
\[PL=PL_{0}+10n\log_{10}\left(\frac{d}{d_{0}}\right) \tag{1}\]  
where \(d\) represents the distances between both the AP and receiver, \(d_{0}\) is a predefined reference distance, \(PL\) and \(PL_{0}\) are RSSIs measured at distances \(d\) and \(d_{0}\), respectively, and \(n\) is a path loss exponent. The path loss exponent \(n\) is determined based on the spatial environment of a measurement space. Typically, \(n\) is known to be optimal in the range of 2-3 for a space without any obstacles and 4-6 for a space with many obstacles [21]. Equation (1) is rearranged for \(d\) as follows:  
\[d=10^{\frac{PL-PL_{0}}{10n}}d_{0} \tag{2}\]  
RSSI outliners may be received due to phenomena such as refraction and reflection caused by obstacles on propagation paths. To remove these outliers, a threshold \(T_{o}\) is set as follows:  
\[T_{o}=-10n\log_{10}(d_{max})+\alpha \tag{3}\]  
where \(d_{max}\) is the maximum reception distance within the positioning region and \(\alpha\) is a reference RSSI value at a distance of 1 m.  
RSSI measurements may vary depending on the presence of obstacles along the signal receiving path. Environments with and without obstacles along the straight path between the transmitter and receiver are referred to as LOS (line of sight) and NLOS (non-line of sight), respectively. Noise in the RSSIs is greater in LOS than in NLOS. Figure 2 shows RSSI measurements 1000 times at a distance of 10 m in both LOS and NLOS. In Figure 2, RSSI data are collected by a beacon with iBeacon protocol, a transmission power of 5 dBm, and an advertising interval of 100 ms. Additionally, the smartphone receiver is a Samsung Galaxy S22, equipped with Bluetooth version 5.2. Black, red, and blue solid lines in Figure 2 represent the measured RSSI values, the threshold (\(T_{o}\)) for outliers, and an RSSI corresponding to a distance of 10 m, respectively. RSSIs are measured in a range from \(-80\) to \(-50\) in LOS and from \(-90\) to 65 in NLOS, respectively. Despite measuring signals at the same distance, lower RSSIs are generally measured in the NLOS environment compared to the LOS environment. Furthermore, the RSSI collected from NLOS contains many outliers that cannot be measured in a positioning environment. RSSI outliers can be handled through outlier removal or replacement. For RSSI outlier removal or replacement, RSSIs that are lower than \(T_{o}\) are removed or replaced with \(T_{o}\). Figure 3 and Table 2 show the corrected and actual distances through outlier removal and replacement and their MAEs (mean absolute errors) with respect to Figure 2, respectively. Both outlier removal and replacement have similar MAEs in LOS because outliers occur infrequently. For the RSSI MAEs in NLOS, outlier removal is better than outlier replacement.