## 3 Fingerprinting-Based Technique  
Because of the unavailability of appropriate radio signal propagation models for indoor environments, fingerprinting-based location techniques became popular with RADAR [30]. RADAR is the first fingerprinting-based positioning system, which was developed by Microsoft. Fingerprinting is a scene analysis method in which location in the environment is associated with a unique signal parameter. In this article, RSS of different APs, which are deployed for network services, is used as feature location. In general, the fingerprinting-based technique is divided into two methods: probabilistic and deterministic methods [31]. In this article, the deterministic method is utilized because it does not require many RSS measurements [32]. This technique is performed into two phases:  
* Offline phase: During this phase, the area of interest (AOI) is partitioned into grid points which are called reference points (RP). Each RP is labeled on the map by Cartesian coordinates (\(x_{i}\), \(y_{i}\)). The RSS of various APs are recorded for a specific time period (KT), where K is an integer number which represents the number of samples that are taken at each RP, and T is a time period to record the value of RSS at RP. The fingerprint, \(\overline{\varphi}_{i,j}\), of RP\({}_{j}\) is generated by taking the average of the RSS signal values from APi for \(KT\) period where, \(\overline{\psi}_{i,j}=\frac{1}{K}\sum_{a=1}^{K}\psi_{i,j}(aT)\mid a=1,\,2,\dots.\dots,\,\,K\). Therefore, the radio map (RM) of the AOI is created by cardinality of the fingerprints, as shown in Equation (1): \[\psi=\left[ \begin{array}{cccc}\psi_{1,1}&\psi_{1,2}&\dots&\psi_{1,\,M}\\ \psi_{2,1}&\psi_{2,2}&&\psi_{2,M}\\ &\vdots&\ddots&\vdots\\ \psi_{L,1}&\psi_{L,2}&\dots&\psi_{L,\,M}\end{array} \right]\] (1) where, L and M represent a number of APs, and a number of RPs in the AOI, respectively. Although the fingerprinting-based technique is an easy method to implement, this method has many challenges that should be considered when it is done practically. Establishing a site survey RM is normally a labor-intensive task. However, there are many methods for enhancing the efficiency of the offline phase. These methods are based on Compressive Sensing (CS) theory [27; 33; 34] to reconstruct the RM from a small number of RSS measuremnets instead of surveying the entire AOI. Also, a divesity of MS arises an an important challenge for IPS designers. Most of the existing research assumes that the collecting of fingerprints of a radio map and online measurements are achieved in the same device. Practically, this assumption is not true because the training device, which is used to build the radio map during the offline phase, may be different from the positioning device used during the online phase. These result in different signal strength patterns across the devices, which could degrade the accuracy of the positioning system [35]. Hence, the problem of signal pattern variation across diverse devices should be considered when designing positioning systems. * Online phase: In this phase, the MS at unknown location records \(V=\) (RSS\({}_{1}\), RSS\({}_{2}\),... RSS\({}_{L}\)) from different APs in the AOI. This vector \(V\) is pre-matched with a RM which is created in the offline phase to determine the MS's location. Figure 1 shows the two phases which are used to estimate MS's location. The Euclidean distance between V and all RP vectors in the RM utilized to determine the estimated position, as shown in Equation (2): \[Dj=\|V-\varphi_{j}\|\] (2)  
Figure 1: The fingerprinting-based method. The signal distance vector, \(D_{j}\), is sorted in ascending order. The first K RPs, which have the smallest signal distance, are selected to determine the position of MS, \(\hat{p}=\frac{1}{K}\sum_{i=1}^{K}p_{i}\), where \(p_{i}\) represents the positions of K RPs. The reciprocal of distance, \(D_{j}\), can be utilized as weights to determine the MS's location.