## 3 System Model  
Fingerprint-based localization systems are divided into two phases: offline and online. Figure 1 depicts the WLAN fingerprinting-based indoor positioning system. A radio map is created offline by dividing the area of interest into grids or RPs. At these RPs, a survey is conducted to collect RSS readings from the accessible APs, and then a database is produced, as illustrated in Figure 1. This database is the radio map, which contains map-like identification features but is based on the RSS of the radio waves. The signature created at each RP serves as the RP's fingerprint. On the other hand, during the online phase, the user initiates a query from a specific point inside the area of interest. The system uses different matching algorithms to compare the query with the radio map, and then the most comparable fingerprint is returned as the estimated position. The RPs can be mathematically represented as follows  
\[RP_{j}=(x,y),j=(1,.....N), \tag{1}\]  
where \((x,y)\) is the coordinate point of the RP in the grid-based area, and \(N\) is the total number of RPs. The fingerprint database or radio map can be mathematically described as follows\[\lambda=\begin{bmatrix}RP_{1}&(\psi_{1,1},..,\psi_{1,M})\\ \vdots&\vdots\\ RP_{N}&(\psi_{N,1},..,\psi_{N,M})\end{bmatrix} \tag{2}\]  
where \(\psi_{i,j}\) refers to RSS samples at \(i\)th AP from \(j\)th RP, and \(M\) is the total number of APs.  
To simulate signal transmission over the channel between the AP and RP, a log-normal path loss model is employed. This model can be used for a wide range of environments and considers the random shadowing effects caused by different types of obstacles causing signal blockage. Shadowing effects cannot be ignored when modeling real environments. In indoor situations, path loss is affected by a variety of parameters, including distance (\(D\)), noise (\(\zeta\)), physical barriers (\(\gamma\)), and human presence (\(\rho\)). Each barrier, whether a wall or a human, must have the resulting attenuation represented in the model. As a result, we use the extended log-normal path loss model in our simulations [38].  
\[P(d)=P(d_{0})+10\cdot\mathcal{N}\cdot log(d/d_{0})+\zeta+\sum_{t=1}^{v}(\gamma _{t})+\sum_{k=1}^{Y}(\rho_{x}) \tag{3}\]  
where \(P(d)\) denotes the RSS at point \(d\) in the \((x,y)\) coordinate system, \(P(d_{0})\) denotes the RSS at reference distance (1 m), \(\mathcal{N}\) denotes the path loss coefficient, \(\zeta\) denotes the shadowing effect, and \(d\) denotes the distance between AP and RP. In the summation for wall and human attenuation factors, \(\iota\) is the \(t\)th physical barrier (walls in particular), \(v\) represents the total number of barriers, and \(\kappa\) is the \(x\)th human in the path, with Y as the total number of humans through which the signal attenuated. The RSS values fluctuate over time due to many factors that contribute to signal fading. To counter temporal variations, RSS readings are taken over a period of time, which is defined mathematically by  
\[RSS(i,j)=(S_{i,j}(\tau 1).....S_{i,j}(\tau\Gamma)) \tag{4}\]  
\[\psi_{i,j}=\frac{\sum_{\tau=1}^{\zeta}S_{i,j}(\tau)}{\Gamma} \tag{5}\]  
Figure 1: WLAN fingerprinting-based indoor positioning system.  
where \(i\) is the \(i\)th AP, \(j\) is the \(j\)th RP, \(S_{i,j}(\tau)\) is the RSS sample collected at time instant \(\tau\), and \(\Gamma\) is the total number of collected RSS samples. The average value of RSS samples is used in the fingerprint database.