# An F-Score-Weighted Indoor Positioning Algorithm Integrating WiFi and Magnetic Field Fingerprints

Authors: Sinem Bozkurt Keser; Ahmet Yazici; Serkan Gunal
Journal: Mobile Information Systems
 (2018)

---

## Abstract

Indoor positioning systems have attracted much attention with the recent development of location-based services. Although global positioning system (GPS) is a widely accepted and accurate outdoor localization system, there is no such a solution for indoor areas. Therefore, various systems are proposed for the indoor positioning problem. Fingerprint-based positioning is one of the widely used methods in this area. WiFi-received signal strength (RSS) is a frequently used signal type for the fingerprint-based positioning system. Since WiFi signal distribution is nonstationary, accuracy is insufficient. Therefore, the performance of indoor positioning systems can be enhanced using multiple signal types. However, the positioning performance of each signal type varies depending on the characteristics of the environment. Considering the variability of the performances of different signal types, an F-score-weighted indoor positioning algorithm, which integrates WiFi-RSS and MF fingerprints, is proposed in this study. In the proposed approach, the positioning is first performed by maximum likelihood estimation for both WiFi-RSS and magnetic field signal values to calculate the F-score of each signal type. Then, each signal type is combined using F-score values as a weight to estimate a position. The experiments are performed using a publicly available dataset that contains real-world data. Experimental results reveal that the proposed algorithm is efficient in achieving accurate indoor positioning and consolidates the system performance compared to using a single type of signal.


---

## Body

## 1. Introduction

Location-based services (LBSs) have become more popular with the recent advancements in mobile computing technology. One of the critical components of the LBS is positioning systems that can be divided into two categories, namely, outdoor and indoor positioning. Global positioning system (GPS) is a well-known solution in the outdoor environment, whereas it gives poor accuracy in the indoor area since it usually requires line-of-sight (LOS) propagation to obtain acceptable accuracy [1]. Therefore, an indoor positioning method is required.Various technologies are developed for solving indoor positioning problem such as global system for mobile communications (GSM) [2], radio-frequency identification (RFID) [3], ultrasonic [4], Bluetooth (BT) [5], wireless fidelity (WiFi) [6], and magnetic field (MF) [7]. These technologies have both advantages and disadvantages depending on their nature and applications. For example, the GSM-based system uses existing infrastructure, but it does not offer reasonable accuracy for indoor areas. RFID-based and ultrasonic-based indoor positioning systems (IPSs) have reasonable accuracies, but they need the installation of additional signals. BT-based IPS has a short operating range and poor predictability. Therefore, it is recommended that BT is used as a supplementary technology in an IPS. WiFi-based IPS is the most widely deployed system when compared to other systems. Besides, WiFi-based indoor positioning is preferred to other technologies due to both massive deployments in the indoor area and extensive usage of WiFi-enabled devices. WiFi-based indoor positioning methods have some drawbacks, such that WiFi signals deteriorate over time, which leads to inaccurate position estimates. Therefore, the accuracy of only WiFi signals may not be adequate for some applications and can be enhanced using multiple signals. In recent researches, MF-based positioning is also considered as a complementary technique to WiFi-based positioning technology to improve the positioning accuracy. The MF-aided positioning is very popular nowadays since all smartphones include a magnetometer to collect the magnetic data freely when needed. Overall, the positioning performance of each signal type varies depending on the characteristics of the environment.Considering the variability of the performances of different signal types, an F-score-weighted indoor positioning algorithm, which integrates WiFi-RSS and MF fingerprints, is proposed in this study. In the proposed approach, firstly, positioning is performed by maximum likelihood estimation for both WiFi-RSS and MF signal values to calculate the F-scores of each signal type. Then, each signal type is combined using F-score values as a weight to estimate a position. The experiments are performed using the publicly available dataset which contains real-world data [8]. The results show that the proposed algorithm is effective and efficient in achieving good indoor positioning accuracy and consolidates the system performance compared to that of just one signal type. The main contributions of this study are that the proposed algorithm considers the environment structure when estimating the position and takes the advantages of two signal types into account at the same time to enhance the positioning performance.The rest of the paper is organized as follows. Related works for indoor positioning technologies are given in Section2. Section 3 introduces the preliminaries for the fingerprint-based positioning. The proposed algorithm is given in Section 4. Section 5 provides the experimental work and the related results. Finally, Section 6 includes the conclusions of the work.


## 2. Related Works

Several methods have been proposed for positioning in the indoor environment. These methods can be classified as triangulation, proximity, pedestrian dead reckoning (PDR), vision analysis, and fingerprinting. Triangulation is a geometric-based method that uses signal parameters to calculate the mobile unit (MU) position [6]. The triangulation method suffers from non-line-of-sight (NLOS) conditions; therefore, it gives erroneous results for indoor positioning. In proximity, the MU location is estimated as the antenna position that receives the strongest signal from the MU [9]. Therefore, a dense grid of antennas with known positions is used. This method is generally used in RFID technology. It requires additional hardware, has low resolution, and has poor accuracy. So, it is impractical for indoor positioning. In PDR, the position of the MU is calculated using the previously calculated position, speed, and the direction of the MU [10]. Since the current position is relative to the previous position, the errors are cumulative. Moreover, the sensors in most smartphones do not provide very accurate data. Therefore, PDR is not solely adequate for an IPS. Vision analysis has a high complexity since it requires the setup of the large image database and the real-time communication between the server and the MU [11]. Therefore, it produces an undesirable solution for indoor positioning.WiFi-received signal strength- (WiFi-RSS-) based fingerprinting method is a widely adopted approach due to its relatively high accuracy and modest cost [12]. It utilizes the existing wireless local area network (WLAN) infrastructure. However, it has some challenges such that WiFi-RSS values suffer from the multipath effect, which leads to erroneous position estimate. Therefore, it can be enhanced using supplementary technologies such as BT or MF. But, using BT with WiFi-RSS-based fingerprinting method is not a good choice. Since both of the technologies operate at the same frequency (2.4 GHz), the signal inference is inevitable. On the other hand, MF has some advantages such that MF does not suffer from NLOS conditions or multipath effects in indoors and it is easy to obtain MF measurements using today’s smartphones. Fingerprinting method can be applied to constitute an MF-based fingerprinting method for indoor positioning [13]. However, it has sensitivity to certain materials. Besides, MF strength diminishes rapidly with distance. Therefore, an MF-based fingerprinting method is best utilized as a supplementary method to WiFi-RSS-based fingerprinting method for indoor positioning. The positioning accuracy of WiFi-based positioning can be enhanced using MF data. A hybrid fingerprint-based positioning, which uses WiFi-RSS and MF values, is proposed in [14, 15]. These studies use both signal types to construct a single hybrid fingerprint map for indoor positioning without any weighting. But, the positioning performances of these signal types vary depending on the characteristics of the environment. In this study, concerning the regarding works, two separated fingerprint maps are utilized and integrated with a novel F-score-based weighting approach. The weights are selected depending on the performance of the individual signal type for a given environment. The details of the proposed works are given in Section 4.


## 3. Preliminaries

Fingerprint-based indoor positioning is a widely used method due to several factors such as its easy implementation, low cost, and the promising positioning accuracy. It includes two phases: fingerprint-based mapping (training) and positioning [12]. In the fingerprint-based mapping phase, the location dependent characteristics of a signal, which is recorded at reference points (RPs), are stored in a database to form a fingerprint map. In the positioning phase, the mobile unit fingerprint is compared to the fingerprints in the database to estimate the position of the mobile unit. RADAR [16] and HORUS [17] are typical IPS based upon WiFi-RSS-based fingerprinting method. Fingerprint-based indoor positioning is illustrated in Figure 1.Figure 1
Fingerprint-based indoor positioning.The processes of fingerprint-based mapping and the algorithms used for training and positioning are given in the following subsections.


### 3.1. Fingerprint-Based Mapping

Fingerprint-based mapping is started with dividing the test area into equal-sized grids; then, signal values are recorded from the center of each grid as a fingerprint. Various studies adopt fingerprint-based indoor positioning in the literature. These studies store the WiFi-RSS values for their database [18, 19]. Recent studies recognize the efficiency of the MF and store the samples from the magnetometer to setup their database [13, 20]. Among these databases, the publicly available databases are quite limited [18–20]. Besides, these databases contain one type of signal measurement. In the previous studies, a multi-signal fingerprint database that includes WiFi-RSS and MF for indoor positioning was proposed [8]. In this study, this database is used. The processes of obtaining the fingerprint-based maps are given below.


#### 3.1.1. Radio Map

Radio map is constructed by dividing the experimental area into equal-sized grids [16]. The center of each grid represents the reference points (RPs) where WiFi-RSS values of the radio signals transmitted by APs are collected. These WiFi-RSS values are stored into the radio map as a fingerprint with the known coordinates of RPs. The fingerprint at the ith RP in the radio map is stored as(1)FPi=lbi,xCoordi,yCoordi,MACi,1,RSSi,1,MACi,2,RSSi,2,…,MACi,ki,RSSi,ki,where FPi is the fingerprint information at RPi, lbi is the label of the RPi, xCoordi and yCoordi are the x and y coordinates of RPi, MACi,j and RSSi,j are the MAC address and WiFi-RSS values of the jth AP received at RPi, and ki is the number of available APs at RPi.


#### 3.1.2. Magnetic Map

Magnetic map is established using the same procedure as the radio map construction. Each fingerprint in the magnetic map contains thex, y, and z values of MF strength values that are obtained by a magnetometer sensor on a mobile device [20]. Magnetometer sensor returns the x, y, and z values of the MF strength values in relation to the device orientation; therefore, the magnitude of each axis may differ as the device’s orientation changes, even when it stays in the same position. So, they must be converted to the world coordinates before being stored in the magnetic map. The accelerometer and gyroscope included on the mobile phone can be used to convert the device orientation to world coordinates. Yaw ϕ and pitch θ angles obtained from the accelerometer are integrated with heading angle ψ from the MF and gyroscope sensors using Kalman filter to obtain the orientation of the mobile device. The orientation angles are used to construct rotation matrix as seen in the following equation:(2)Rxϕ=1000cos⁡ϕ−sin⁡ϕ0sin⁡ϕcos⁡ϕ,RyΘ=cos⁡Θ0sin⁡Θ010−sin⁡Θ0cos⁡Θ,Rzψ=cos⁡ψ−sin⁡ψ0sin⁡ψcos⁡ψ0001.Then, the local MF strength measurements are multiplied by the rotation matrix which includes orientation angles to calculate the global MF strength measurements as follows:(3)Bp=RxϕRyΘRzψBe,where Be and Bp are the MF strength vectors in the device and world coordinate orientations, respectively. Then, using the global values of the MF strength vector Bp, the magnetic fingerprint at the ith RP in the magnetic map is represented as(4)MFPi=lbi,xCoordi,yCoordi,globali,x,globali,y,globali,z,where MFPi is the magnetic fingerprint information at RPi, lbi is the label of the RPi, xCoordi and yCoordi are the x and y coordinates of RPi, and globali,x, globali,y, and globali,z are the global x, y, and z values of MF strength in relation to the world coordinates at RPi.


### 3.2. Training and Positioning

The fingerprint-based positioning system usually includes two stages: training and positioning. Given the radio map or magnetic map, a model is constructed in the training phase. In the positioning phase, the model is used to calculate the position of the mobile unit by comparing measurements of the newly obtained data with the recorded fingerprints from the training data. Depending on the application, the fingerprint map can be divided into training and test data. The training data are used to train the model by pairing the input with actual output. Also, the test data can be used for either positioning or evaluating the wellness of the model.In the literature, various algorithms are used to construct a model for the positioning. In [16], K-nearest neighbour (KNN) is applied to estimate the position. In another study, a decision tree is applied for positioning [21]. The target location is predicted using Naïve Bayes (NB) estimate in [17]. Maximum likelihood estimation (MLE) is one of the most popular algorithms among them which take the standard deviation of the measurements into account [22]. It provides higher accuracy when compared to the other algorithms [23]. Additionally, the calculated likelihood values for different signal types are useful for constructing hybrid solutions for the indoor positioning problem. In the MLE algorithm, the probability of obtaining the mobile device fingerprint F′ at the ith RP whose fingerprint Fi is given by(5)pF′Fi=1∏si2πn/2e−1/2∑xi′−x¯i/si2,Fi=x¯i,si,F′=x1′,x2′,…,xn′,where x¯i and si are the mean and the standard deviation of the signal measurements at the ith RP, xi′ is the signal measurement at an unknown location, and n is the dimension of the fingerprint map. The mean and the standard deviation are calculated by(6)x¯i=1m∑j=1mxij,si=1m−1∑j=1mxij−x¯i2,where m is the number of collected measurements for the RPi and xij is the jth measurement from APi for the radio map. For the magnetic map, xij is MF strength values as given in (4).The computational cost of (5) can be reduced by taking its natural log:(7)pF′Fi=−ln∏si−n2ln⁡2π−12∑xi′−x¯isi2.Since the second term of (7) is constant, it can be ignored. Equation (7) is rewritten by multiplying −1 and defining c=ln∏si as(8)pF′Fi=c+12∑xi′−x¯isi2.Now, (5) is converted to (8) [24]. For the mobile device fingerprint F′, (8) is calculated for each RP, and then the label of the RP is returned by calculating(9)arg⁡mini⁡pF′Fi.Additionally, the wellness of the training model can be evaluated using a separated test data. Model evaluation is carried out as follows: after calculating the estimated position of each test data using (9), the confusion matrix is generated with the estimated position labels and actual position labels. The confusion matrix is a basis for calculating the terms such as true positive (TP), false negative (FN), true negative (TN), and false positive (FP) [25]. The binary case representation of the confusion matrix is given in Table 1.Table 1
Confusion matrix for binary case representation.
Positive (estimated)
Negative (estimated)
Positive (actual)
TP
FN
Negative (actual)
FP
TN
TP: when the user is in RP “i” and is classified as RP “i”; TN: when the user is not in RP “i” and is not classified as RP “i”; FP: when the user is not in RP “i” and is classified as RP “i”; FN: when the user is in RP “i” and is not classified as RP “i”.Then, F-score can be calculated using the confusion matrix as follows:(10)F‐score=2⁡∗⁡TP2⁡∗⁡TP+FP+FN.In the literature, the F-score values are generally used to evaluate the training model performance using the test data. In this study, the F-score values are used to evaluate the model (9) performance for each signal type. Besides, these F-score values are used as the weights of each signal type in the positioning phase to enhance the performance of the indoor positioning system.


## 3.1. Fingerprint-Based Mapping

Fingerprint-based mapping is started with dividing the test area into equal-sized grids; then, signal values are recorded from the center of each grid as a fingerprint. Various studies adopt fingerprint-based indoor positioning in the literature. These studies store the WiFi-RSS values for their database [18, 19]. Recent studies recognize the efficiency of the MF and store the samples from the magnetometer to setup their database [13, 20]. Among these databases, the publicly available databases are quite limited [18–20]. Besides, these databases contain one type of signal measurement. In the previous studies, a multi-signal fingerprint database that includes WiFi-RSS and MF for indoor positioning was proposed [8]. In this study, this database is used. The processes of obtaining the fingerprint-based maps are given below.


### 3.1.1. Radio Map

Radio map is constructed by dividing the experimental area into equal-sized grids [16]. The center of each grid represents the reference points (RPs) where WiFi-RSS values of the radio signals transmitted by APs are collected. These WiFi-RSS values are stored into the radio map as a fingerprint with the known coordinates of RPs. The fingerprint at the ith RP in the radio map is stored as(1)FPi=lbi,xCoordi,yCoordi,MACi,1,RSSi,1,MACi,2,RSSi,2,…,MACi,ki,RSSi,ki,where FPi is the fingerprint information at RPi, lbi is the label of the RPi, xCoordi and yCoordi are the x and y coordinates of RPi, MACi,j and RSSi,j are the MAC address and WiFi-RSS values of the jth AP received at RPi, and ki is the number of available APs at RPi.


### 3.1.2. Magnetic Map

Magnetic map is established using the same procedure as the radio map construction. Each fingerprint in the magnetic map contains thex, y, and z values of MF strength values that are obtained by a magnetometer sensor on a mobile device [20]. Magnetometer sensor returns the x, y, and z values of the MF strength values in relation to the device orientation; therefore, the magnitude of each axis may differ as the device’s orientation changes, even when it stays in the same position. So, they must be converted to the world coordinates before being stored in the magnetic map. The accelerometer and gyroscope included on the mobile phone can be used to convert the device orientation to world coordinates. Yaw ϕ and pitch θ angles obtained from the accelerometer are integrated with heading angle ψ from the MF and gyroscope sensors using Kalman filter to obtain the orientation of the mobile device. The orientation angles are used to construct rotation matrix as seen in the following equation:(2)Rxϕ=1000cos⁡ϕ−sin⁡ϕ0sin⁡ϕcos⁡ϕ,RyΘ=cos⁡Θ0sin⁡Θ010−sin⁡Θ0cos⁡Θ,Rzψ=cos⁡ψ−sin⁡ψ0sin⁡ψcos⁡ψ0001.Then, the local MF strength measurements are multiplied by the rotation matrix which includes orientation angles to calculate the global MF strength measurements as follows:(3)Bp=RxϕRyΘRzψBe,where Be and Bp are the MF strength vectors in the device and world coordinate orientations, respectively. Then, using the global values of the MF strength vector Bp, the magnetic fingerprint at the ith RP in the magnetic map is represented as(4)MFPi=lbi,xCoordi,yCoordi,globali,x,globali,y,globali,z,where MFPi is the magnetic fingerprint information at RPi, lbi is the label of the RPi, xCoordi and yCoordi are the x and y coordinates of RPi, and globali,x, globali,y, and globali,z are the global x, y, and z values of MF strength in relation to the world coordinates at RPi.


## 3.1.1. Radio Map

Radio map is constructed by dividing the experimental area into equal-sized grids [16]. The center of each grid represents the reference points (RPs) where WiFi-RSS values of the radio signals transmitted by APs are collected. These WiFi-RSS values are stored into the radio map as a fingerprint with the known coordinates of RPs. The fingerprint at the ith RP in the radio map is stored as(1)FPi=lbi,xCoordi,yCoordi,MACi,1,RSSi,1,MACi,2,RSSi,2,…,MACi,ki,RSSi,ki,where FPi is the fingerprint information at RPi, lbi is the label of the RPi, xCoordi and yCoordi are the x and y coordinates of RPi, MACi,j and RSSi,j are the MAC address and WiFi-RSS values of the jth AP received at RPi, and ki is the number of available APs at RPi.


## 3.1.2. Magnetic Map

Magnetic map is established using the same procedure as the radio map construction. Each fingerprint in the magnetic map contains thex, y, and z values of MF strength values that are obtained by a magnetometer sensor on a mobile device [20]. Magnetometer sensor returns the x, y, and z values of the MF strength values in relation to the device orientation; therefore, the magnitude of each axis may differ as the device’s orientation changes, even when it stays in the same position. So, they must be converted to the world coordinates before being stored in the magnetic map. The accelerometer and gyroscope included on the mobile phone can be used to convert the device orientation to world coordinates. Yaw ϕ and pitch θ angles obtained from the accelerometer are integrated with heading angle ψ from the MF and gyroscope sensors using Kalman filter to obtain the orientation of the mobile device. The orientation angles are used to construct rotation matrix as seen in the following equation:(2)Rxϕ=1000cos⁡ϕ−sin⁡ϕ0sin⁡ϕcos⁡ϕ,RyΘ=cos⁡Θ0sin⁡Θ010−sin⁡Θ0cos⁡Θ,Rzψ=cos⁡ψ−sin⁡ψ0sin⁡ψcos⁡ψ0001.Then, the local MF strength measurements are multiplied by the rotation matrix which includes orientation angles to calculate the global MF strength measurements as follows:(3)Bp=RxϕRyΘRzψBe,where Be and Bp are the MF strength vectors in the device and world coordinate orientations, respectively. Then, using the global values of the MF strength vector Bp, the magnetic fingerprint at the ith RP in the magnetic map is represented as(4)MFPi=lbi,xCoordi,yCoordi,globali,x,globali,y,globali,z,where MFPi is the magnetic fingerprint information at RPi, lbi is the label of the RPi, xCoordi and yCoordi are the x and y coordinates of RPi, and globali,x, globali,y, and globali,z are the global x, y, and z values of MF strength in relation to the world coordinates at RPi.


## 3.2. Training and Positioning

The fingerprint-based positioning system usually includes two stages: training and positioning. Given the radio map or magnetic map, a model is constructed in the training phase. In the positioning phase, the model is used to calculate the position of the mobile unit by comparing measurements of the newly obtained data with the recorded fingerprints from the training data. Depending on the application, the fingerprint map can be divided into training and test data. The training data are used to train the model by pairing the input with actual output. Also, the test data can be used for either positioning or evaluating the wellness of the model.In the literature, various algorithms are used to construct a model for the positioning. In [16], K-nearest neighbour (KNN) is applied to estimate the position. In another study, a decision tree is applied for positioning [21]. The target location is predicted using Naïve Bayes (NB) estimate in [17]. Maximum likelihood estimation (MLE) is one of the most popular algorithms among them which take the standard deviation of the measurements into account [22]. It provides higher accuracy when compared to the other algorithms [23]. Additionally, the calculated likelihood values for different signal types are useful for constructing hybrid solutions for the indoor positioning problem. In the MLE algorithm, the probability of obtaining the mobile device fingerprint F′ at the ith RP whose fingerprint Fi is given by(5)pF′Fi=1∏si2πn/2e−1/2∑xi′−x¯i/si2,Fi=x¯i,si,F′=x1′,x2′,…,xn′,where x¯i and si are the mean and the standard deviation of the signal measurements at the ith RP, xi′ is the signal measurement at an unknown location, and n is the dimension of the fingerprint map. The mean and the standard deviation are calculated by(6)x¯i=1m∑j=1mxij,si=1m−1∑j=1mxij−x¯i2,where m is the number of collected measurements for the RPi and xij is the jth measurement from APi for the radio map. For the magnetic map, xij is MF strength values as given in (4).The computational cost of (5) can be reduced by taking its natural log:(7)pF′Fi=−ln∏si−n2ln⁡2π−12∑xi′−x¯isi2.Since the second term of (7) is constant, it can be ignored. Equation (7) is rewritten by multiplying −1 and defining c=ln∏si as(8)pF′Fi=c+12∑xi′−x¯isi2.Now, (5) is converted to (8) [24]. For the mobile device fingerprint F′, (8) is calculated for each RP, and then the label of the RP is returned by calculating(9)arg⁡mini⁡pF′Fi.Additionally, the wellness of the training model can be evaluated using a separated test data. Model evaluation is carried out as follows: after calculating the estimated position of each test data using (9), the confusion matrix is generated with the estimated position labels and actual position labels. The confusion matrix is a basis for calculating the terms such as true positive (TP), false negative (FN), true negative (TN), and false positive (FP) [25]. The binary case representation of the confusion matrix is given in Table 1.Table 1
Confusion matrix for binary case representation.
Positive (estimated)
Negative (estimated)
Positive (actual)
TP
FN
Negative (actual)
FP
TN
TP: when the user is in RP “i” and is classified as RP “i”; TN: when the user is not in RP “i” and is not classified as RP “i”; FP: when the user is not in RP “i” and is classified as RP “i”; FN: when the user is in RP “i” and is not classified as RP “i”.Then, F-score can be calculated using the confusion matrix as follows:(10)F‐score=2⁡∗⁡TP2⁡∗⁡TP+FP+FN.In the literature, the F-score values are generally used to evaluate the training model performance using the test data. In this study, the F-score values are used to evaluate the model (9) performance for each signal type. Besides, these F-score values are used as the weights of each signal type in the positioning phase to enhance the performance of the indoor positioning system.


## 4. The Proposed Algorithm

Traditional fingerprint-based positioning algorithms are initialized with constructing database by collecting measurements from the experimental area. The measurements usually contain only WiFi-RSS values obtained from the APs in the region of interest. RFKON database [8], on the other hand, contains both WiFi-RSS and MF strength values for each RP. The measurements in the RFKON database are used for constructing radio map and magnetic map, which are explained in the first subsection of Section 2. The radio map and the magnetic map are utilized as inputs for the proposed F-score-weighted indoor positioning algorithm. The pseudocode of the algorithm is given in Algorithm 1.Algorithm 1: Pseudocode of the proposed method.
Training-testing phase:
Inputs: Radio Map, Magnetic Map.
Outputs: WiFi-RSS-based modelMLEWiFi, MF-based model MLEMF.
(1)
Normalize each instance in radio map and magnetic map using min-max normalization procedure.
(2)
Split the radio map and the magnetic map as training data (60%) and test data (40%).
(3)
Use (6) to obtain x¯i and si for the training data of each signal type.
(4)
Calculate the RP labels for both test data type using (9) separately.
(5)
Apply (10) to calculate the F-score values of each signal type per RP using the calculated RP labels and the actual RP labels. The F-score values are stored as the weight of each signal type as weightWiFi,i and weightMF,i.
(6)
Construct WiFi-RSS-based modelMLEWiFi and MF-based model MLEMF as follows:
MLE
WiFi,
i
=
lb
i
,
x
Coord
i
,
y
Coord
i
,
x
¯
i
,
s
i
,
weight
WiFi
,
i
,
MLE
MF
,
i
=
lb
i
,
x
Coord
i
,
y
Coord
i
,
x
¯
i
,
s
i
,
weight
MF
,
i
.
Positioning phase:
Inputs:MLEWiFi, MLEMF, WiFi New Test Data, MF New Test Data.
Outputs: estimated position.
(1)
ApplyMLEWiFi with (8) using WiFi New Test Data to obtain likelihood values of each RP (pWiFiF′Fi, i=1,…,k, where k is the number of RPs).
(2)
ApplyMLEMF with (8) using MF New Test Data to obtain likelihood values of each RP (pMFF′Fi, i=1,…,k, where k is the number of RPs).
(3)
Normalize likelihood values using max-min normalization method to obtainpWiFiF′Fi and pMFF′Fi.
(4)
Use the following equation to calculate the final position:
arg
min
i
p
WiFi
F
′
F
i
′
∗
weight
WiFi
,
i
+
p
MF
F
′
F
i
′
∗
weight
MF
,
i
.As seen in the Algorithm1, the process of the proposed algorithm is started with normalization of data in each map. For this process, max-min normalization method is employed. Then, each map is split into training data (60%) and test data (40%) in Step 2 of the training-testing phase. The test data are used for obtaining F-score weight values of each signal type. In Step 3 of the training-testing phase, the mean and the standard deviation of each signal type are calculated by (6) to obtain training model parameters. In the next step, (9) is applied to both signal types separately for obtaining estimated RP labels. Then, F-score values of each signal type for each RP are calculated using (10). In the last step of training-testing phase, WiFi-RSS-based model MLEWiFi and MF-based model MLEMF are generated for the F-score-weighted indoor positioning.In the positioning phase, newly obtained WiFi test data, MF test data, and the models are utilized as the inputs. In Steps 1 and 2 of the positioning phase, likelihood values are calculated at each RP for both signal types. Then, the final position is estimated using the formula in step 4 of the positioning phase in Algorithm1. Note that weightWiFi,i and weightMF,i are the WiFi-RSS and MF F-score weights for ith RP, respectively. Depending on the region of the indoor environment, WiFi signals or MF signals may result in better accuracy for the positioning calculation. Then, the corresponding F-score value of the signal will be higher and would be dominant for positioning.


## 5. Experimental Work

The proposed method is compared to existing methods in the literature for the test area of RFKON database. The system architecture of our IPS is shown in Figure2. It contains two major units named as Gezkon and Konsens. Gezkon is a mobile application and it is responsible for collecting WiFi-RSS and MF strength values from the test area. Konsens is a server, which is used to estimate the position of the mobile device and also responsible for updating and calibrating RFKON database. The communication between Konsens and Gezkon is achieved by sensor nodes through the data distribution service layer.Figure 2
System architecture of our IPS.The details of the test area and experimental results are provided in the following subsections.


### 5.1. Test Area

The layout of the test area for RFKON database is shown in Figure3. In this area, real-world indoor localization experiments are conducted to evaluate the performance of the proposed algorithm. The test area is at the Technopark building in Eskisehir Osmangazi University. The area is divided into grid squares 2.4⁡m×2.4⁡m and the center of each grid is reported as RP. There are 20 RPs in the experimental area. The measurements are collected from the 1st floor of this area at each reference point. 40 WiFi and 40 magnetic field measurements are collected at each RP for the training and test phases. Hence, 800 measurements are collected for constructing the training set and 800 measurements for the test set.Figure 3
The map of the floor where the experiments are conducted.As seen in Figure3, there are five sensor nodes, which are represented with small red squares deployed at the locations on the first floor. The red stars represent the RPs used to collect signal measurements from the area.


### 5.2. Experimental Results

WiFi-RSS values or MF values may provide better positioning accuracy depending on the structure of the indoor area. If there are different fingerprint maps for each signal type, the F-score values can be used to understand accurateness for each map. In our experimental area, F-score values are obtained for radio map and magnetic map as in Figure4. Those heat maps illustrate the accurateness of positioning in the given RPs.Figure 4
Heatmap of F-scores for (a) WiFi and (b) MF data using MLE algorithm.
(a)
(b)One can observe from Figure4(a) that F-scores are relatively high in the upper right regions. That is, WiFi-based positioning offers high performance for these regions. However, F-scores are getting lower in the lower-left regions. In other words, WiFi-based positioning offers lower performance for those regions. In the meantime, the heatmap for MF-based positioning, which is shown in Figure 4(b), offers almost a complementary performance. That is, F-scores are relatively low in the upper right regions and relatively high in the lower-left regions. In the middle regions of the map, both WiFi and MF yield similar performance. Therefore, utilizing each signal type with F-score-weighted values concurrently in the proposed positioning algorithm can enhance the performance of the IPS.The proposed positioning algorithm is compared to KNN algorithm that is used in RADAR [16] and NB algorithm that is used in HORUS [17]. The experiments are conducted by comparing KNN, NB, and MLE algorithms using only one signal measurement. Therefore, firstly, the proposed algorithm is compared to KNN, NB, and MLE algorithms with WiFi-RSS data. Then, the comparison is carried out when applying KNN, NB, and MLE algorithms with MF data. Figure 5 illustrates the distribution of localization error comparatively.Figure 5
Performances of the indoor positioning algorithms using only WiFi-RSS data. One can note that the proposed algorithm is apparently superior to the other algorithms when WiFi-RSS signal measurements are utilized.As shown in Figure6, the performance of the proposed method is higher than those of the other algorithms when MF strength measurements are used. It is clear from Figures 5 and 6 that the proposed algorithm outperforms the other algorithms for each type of signal measurement. In Table 2, the positioning performances of the respective algorithms are consolidated for each signal type considering a positioning error less than 3 m and 6 m.Figure 6
Performances of the indoor positioning algorithms using only MF data.Table 2
Consolidated performances of the indoor positioning algorithms using single signal type.
Method
Precision (%)
<3 m
<6 m
Proposed algorithm
91%
97%
MLE WiFi
84%
92%
KNN WiFi
75%
84%
NB WiFi
64%
75%
MLE MF
64%
67%
KNN MF
69%
70%
NB MF
66%
67%The proposed algorithm offers a positioning error less than 3 m for 91% of test data and less than 6 m for 97% of the test data. This performance is far higher than those of the other algorithms. Moreover, the proposed algorithm can effectively integrate MF and WiFi signals for more accurate positioning.The studies [14, 15] use WiFi and MF signal types to construct a hybrid fingerprint map for fingerprint-based indoor positioning to enhance the accuracy of their systems. Therefore, the proposed algorithm is also compared to MLE, KNN, and NB that use hybrid fingerprint map for positioning. Comparative results are given in Figure 7.Figure 7
Performances of the indoor positioning algorithms using hybrid fingerprint data.As seen in the figure, all algorithms offer improved performance, thanks to the hybrid fingerprint map. However, the proposed algorithm is still the best when compared to the other algorithms. In Table3, the positioning performances of the respective algorithms are listed for hybrid data considering a positioning error less than 3 m and 6 m.Table 3
Consolidated performances of the indoor positioning algorithms using hybrid data.
Method
Precision (%)
<3 m
<6 m
Proposed algorithm
91%
97%
MLE hybrid fingerprint
87%
94%
KNN hybrid fingerprint
85%
93%
NB hybrid fingerprint
83%
92%Though the performances of the other algorithms are improved with the help of hybrid data, the proposed method still surpasses the others algorithms.


## 5.1. Test Area

The layout of the test area for RFKON database is shown in Figure3. In this area, real-world indoor localization experiments are conducted to evaluate the performance of the proposed algorithm. The test area is at the Technopark building in Eskisehir Osmangazi University. The area is divided into grid squares 2.4⁡m×2.4⁡m and the center of each grid is reported as RP. There are 20 RPs in the experimental area. The measurements are collected from the 1st floor of this area at each reference point. 40 WiFi and 40 magnetic field measurements are collected at each RP for the training and test phases. Hence, 800 measurements are collected for constructing the training set and 800 measurements for the test set.Figure 3
The map of the floor where the experiments are conducted.As seen in Figure3, there are five sensor nodes, which are represented with small red squares deployed at the locations on the first floor. The red stars represent the RPs used to collect signal measurements from the area.


## 5.2. Experimental Results

WiFi-RSS values or MF values may provide better positioning accuracy depending on the structure of the indoor area. If there are different fingerprint maps for each signal type, the F-score values can be used to understand accurateness for each map. In our experimental area, F-score values are obtained for radio map and magnetic map as in Figure4. Those heat maps illustrate the accurateness of positioning in the given RPs.Figure 4
Heatmap of F-scores for (a) WiFi and (b) MF data using MLE algorithm.
(a)
(b)One can observe from Figure4(a) that F-scores are relatively high in the upper right regions. That is, WiFi-based positioning offers high performance for these regions. However, F-scores are getting lower in the lower-left regions. In other words, WiFi-based positioning offers lower performance for those regions. In the meantime, the heatmap for MF-based positioning, which is shown in Figure 4(b), offers almost a complementary performance. That is, F-scores are relatively low in the upper right regions and relatively high in the lower-left regions. In the middle regions of the map, both WiFi and MF yield similar performance. Therefore, utilizing each signal type with F-score-weighted values concurrently in the proposed positioning algorithm can enhance the performance of the IPS.The proposed positioning algorithm is compared to KNN algorithm that is used in RADAR [16] and NB algorithm that is used in HORUS [17]. The experiments are conducted by comparing KNN, NB, and MLE algorithms using only one signal measurement. Therefore, firstly, the proposed algorithm is compared to KNN, NB, and MLE algorithms with WiFi-RSS data. Then, the comparison is carried out when applying KNN, NB, and MLE algorithms with MF data. Figure 5 illustrates the distribution of localization error comparatively.Figure 5
Performances of the indoor positioning algorithms using only WiFi-RSS data. One can note that the proposed algorithm is apparently superior to the other algorithms when WiFi-RSS signal measurements are utilized.As shown in Figure6, the performance of the proposed method is higher than those of the other algorithms when MF strength measurements are used. It is clear from Figures 5 and 6 that the proposed algorithm outperforms the other algorithms for each type of signal measurement. In Table 2, the positioning performances of the respective algorithms are consolidated for each signal type considering a positioning error less than 3 m and 6 m.Figure 6
Performances of the indoor positioning algorithms using only MF data.Table 2
Consolidated performances of the indoor positioning algorithms using single signal type.
Method
Precision (%)
<3 m
<6 m
Proposed algorithm
91%
97%
MLE WiFi
84%
92%
KNN WiFi
75%
84%
NB WiFi
64%
75%
MLE MF
64%
67%
KNN MF
69%
70%
NB MF
66%
67%The proposed algorithm offers a positioning error less than 3 m for 91% of test data and less than 6 m for 97% of the test data. This performance is far higher than those of the other algorithms. Moreover, the proposed algorithm can effectively integrate MF and WiFi signals for more accurate positioning.The studies [14, 15] use WiFi and MF signal types to construct a hybrid fingerprint map for fingerprint-based indoor positioning to enhance the accuracy of their systems. Therefore, the proposed algorithm is also compared to MLE, KNN, and NB that use hybrid fingerprint map for positioning. Comparative results are given in Figure 7.Figure 7
Performances of the indoor positioning algorithms using hybrid fingerprint data.As seen in the figure, all algorithms offer improved performance, thanks to the hybrid fingerprint map. However, the proposed algorithm is still the best when compared to the other algorithms. In Table3, the positioning performances of the respective algorithms are listed for hybrid data considering a positioning error less than 3 m and 6 m.Table 3
Consolidated performances of the indoor positioning algorithms using hybrid data.
Method
Precision (%)
<3 m
<6 m
Proposed algorithm
91%
97%
MLE hybrid fingerprint
87%
94%
KNN hybrid fingerprint
85%
93%
NB hybrid fingerprint
83%
92%Though the performances of the other algorithms are improved with the help of hybrid data, the proposed method still surpasses the others algorithms.


## 6. Conclusion

In this study, an F-score-weighted indoor positioning algorithm that combines WiFi and MF fingerprints is proposed. In the first phase of the proposed method, MLE algorithm is utilized for positioning using WiFi and MF signal values separately to calculate the F-score values of each signal type. Then, each signal type is integrated by utilizing F-score values as weights to estimate the final position. The experiments are conducted using the publicly available dataset containing real-world data.As a result of the experiments, it is revealed that the positioning performance of each signal type varies depending on the characteristics of the environment. As given in Test Results section, WiFi and MF signals offer their best performances in different parts of the experimental area. Considering the variability of the performances of different signal types, the proposed F-score-weighted indoor positioning algorithm, which integrates WiFi-RSS fingerprints and MF fingerprints, offers the best performance with respect to the other hybrid approaches in the literature.



---

*Source: 7950985-2018-05-02.xml*