A Novel Valued Tolerance Rough Set and Decision Rules Method for Indoor Positioning Using WiFi Fingerprinting

In recent years, due to the ubiquitous presence of WiFi access points in buildings, the WiFi fingerprinting method has become one of the most promising approaches for indoor positioning applications. However, the performance of this method is vulnerable to changes in indoor environments. To tackle this challenge, in this paper, we propose a novel WiFi fingerprinting method that uses the valued tolerance rough set theory–based classification method. In the offline phase, the conventional received signal strength (RSS) fingerprinting database is converted into a decision table. Then a new fingerprinting database with decision rules is constructed based on the decision table, which includes the credibility degrees and the support object set values for all decision rules. In the online phase, various classification levels are applied to find out the best match between the RSS values in the decision rules database and the measured RSS values at the unknown position. The experimental results compared the performance of the proposed method with those of the nearest-neighbor-based and the random statistical methods in two different test cases. The results show that the proposed method greatly outperforms the others in both cases, where it achieves high accuracy with 98.05% of right position classification, which is approximately 50.49% more accurate than the others. The mean positioning errors at wrong estimated positions for the two test cases are 1.71 m and 1.99 m, using the proposed method.


Introduction
Over the past ten years, location-based services have rapidly developed. In these services, positioning is one of the most indispensable approaches. For outdoor environments, the global navigation satellite system (GNSS) can provide very reasonable positioning results, with an average error of 3-5 m [1]. However, this system is limited outdoors since it cannot guarantee the same accuracy indoors, where the satellite signals are reflected or blocked by the walls of buildings. Thus, there is an extreme demand to develop indoor positioning systems (IPSs).
Currently, there are various technologies used to track the position of a mobile user indoors. These technologies can be classified into two groups: building independent and building dependent. The first group includes the IPSs that do not rely on the infrastructure of a building to determine the user's position. Some examples for this group are dead reckoning [2] and image-based [3] technologies. On the other hand, the IPSs that relate to the building where they are operated belong to the second group. For this group, we can divide it into two subgroups: the dedicated infrastructure required and the building's infrastructure utilized. The former subgroup is defined as the IPSs that need the unpopular infrastructure to be set up in a building. Radio frequency identification [4], acoustic signal [5], or visible light communication [6] are some examples belonging to this group. The latter subgroup utilizes the common infrastructure in the building to create the IPSs such as Bluetooth [7,8] and WiFi [9,10]. Among these technologies, WiFi-based positioning [11][12][13] has drawn tremendous attention due to the widespread of WiFi infrastructure in indoor environments such as office buildings, hospitals, malls, etc. Moreover, the high popularization of smart devices such as smartphones or tablets and the compatible implementation of these devices with WiFi systems also leads to the large deployment of this technology for IPS. To enhance the performance of the WiFi-based positioning system, there are hybrid systems that combine the result of the WiFi with other technologies, such as pedestrian dead reckoning [2,9], camera [14], or magnetic field [15].
There are two main approaches for WiFi-based positioning: geometric and fingerprinting [16]. For the former approach, some common conventional positioning methods are the time of arrival [17], time difference of arrival [18], angle of arrival [19], etc. The positioning accuracy of these methods depends on the line-of-sight condition, which is hard to keep indoors, where there are many physical obstacles, such as walls or doors. For the latter one, the WiFi fingerprinting method is another popular method due to its low cost and ease of implementation on smart devices. However, the reflections, the multipath interference, or the changes in the environmental conditions could greatly degrade the performance of this method. Therefore, achieving a reliable and highly accurate WiFi fingerprinting-based positioning method is a challenging problem.
The traditional WiFi fingerprinting method has two phases: the offline and the online phases. In the offline phase, the radio map is built by collecting the RSS values from the available APs at different reference points (RPs) in a target area. The unique set of RSS values at one RP is defined as a fingerprint of that position. In the online phase, by comparing the measured RSS values at one unknown position with the RSS values from the radio map using different matching methods, the user's position can be estimated.
The conventional rough set theory was first proposed by Pawlak [20] as an extension of classical set theory to deal with vague information. This theory conceives that information and knowledge in information systems are expressed via indiscernibility relations (equivalence relations) between objects in the object set. The rough set theory is used for big data mining and knowledge reduction [21,22] and can be applied in various fields such as information systems [23] or real estate market analysis [24,25]. To give a more flexible way to the rough set theory to handle the indiscernibility relation, Stefanowski and Tsoukias [26] introduced the valued tolerance relation and proposed the valued tolerance rough set and decision rules method (VTRS-DR). This method is often applied as a support tool in decision-making systems. Rough set theory based on valued tolerance relation calculates the valued tolerance relation for all objects in the decision table, resulting in a valued tolerance relation matrix where the values belong to [0,1]. This is the extension of the conventional rough set theory proposed by Pawlak. When applied to WiFi fingerprinting-based indoor positioning, the VTRS-DR works not only in the offline phase but also in the online phase. In the offline phase, the conventional RSS fingerprinting database is converted into a decision table where the RSS values are classified into different decision classes which correspond to the predefined RPs. Each tolerance granule corresponding to each object (i.e., one row in the decision table) is calculated based on the valued tolerance relation matrix. After calculating the values of the membership degrees of objects belonging to lower (upper) approximations of each decision class, the credibility degrees of decision rules (i.e., objects in the decision table) are also calculated. Besides that, the support object set values of decision rules are defined by the tolerance granule of objects. A new fingerprinting database with decision rules is constructed from the decision table that includes the credibility degrees and the support object set values for all decision rules. In the online phase, the valued tolerance relation is calculated between the RSS values in the new database and the measured RSS values at an unknown position. The best decision class (i.e., one RP) is chosen among a set of RPs via the proposed method by comparing various components such as the valued tolerance relations, the credibility degrees, the support object set values, and the Euclidean distances; thus, the user's position can be estimated. In our work, it means estimating the unknown position as the RP closest to that position.
To deal with the instability in RSS values from APs, in this paper, a novel VTRS-DR-based WiFi fingerprinting for IPS is proposed. The VTRS-DR method provides an efficient computational structure and helps to solve the indoor positioning problem with high accuracy. The main contributions are figured out as follows: • The VTRS-DR method is applied in the offline phase of the WiFi fingerprinting method by creating a new fingerprinting database with decision rules that includes the credibility degrees and the support object set values for all rules.

•
The VTRS-DR method is also applied in the online phase of the WiFi fingerprinting method by estimating the user's position based on the fingerprinting decision rules database and the measured RSS value to determine the user's position.

•
For performance evaluation, the proposed method is compared with the nearest neighbor-based and the random statistical methods to prove its superior positioning accuracy and robustness.
The rest of this paper is organized as follows. Section 2 discusses the related works. Section 3 describes the basis of the VTRS-DR method. Section 4 introduces the proposed positioning method. Experimental results are displayed in Section 5, and the conclusion is given in Section 6.

Related Works
Generally, there are two categories of WiFi fingerprint-based matching algorithms: deterministic and probabilistic. The deterministic algorithm is very common due to its ease of implementation and its possibility to work well in real time. The nearest neighbor (NN), KNN, and weighted KNN (WKNN) [27,28] are some of the popular deterministic algorithms. To handle the fluctuation of WiFi RSS values, as well as to normalize them, Ninh et al. [10] introduced the random statistical method in the offline phase. The method helped to create a standardized fingerprinting database. In the online phase, to figure out the unknown position of a user, the authors applied the Mahalanobis distance as the matching algorithm to improve the positioning accuracy. The experiments were conducted in different setup conditions in an office room. As a result, the maximum positioning error was only 0.75 m. In Reference [29], instead of using the common Euclidean distance in NN-based algorithms, Duong-Bao et al. implemented five distance measures and compared the positioning results in different settings such as changing the number of setup APs or changing the grid spacing between two RPs. The experimental results showed that the Chi-Squared distance is the best measure with a mean error of 1.17 m in two test cases. Even though these deterministic algorithms could reduce computational complexity, they used only a single reference fingerprint for each RP (i.e., a set of mean RSS values from available AP) for finding the best match between the measured RSS values at an unknown position and the fingerprints in the database, and this could lead to big positioning errors due to the instability of the RSS values.
On the other hand, the probabilistic algorithm needs to know the probability distribution of the RSS values from available APs at every RPs. Even though this algorithm can provide good accuracy, it is more complex than the deterministic algorithm, and the positioning performance relies on the computation of likelihood functions. Some popular probabilistic algorithms are the Kalman filter [9], particle filter [30], and hidden Markov models [31]. Using two Kalman filters, Zhuang et al. [32] fused the positional information from the micro-electromechanical system (MEMS) sensors and WiFi fingerprinting to enhance the tracking accuracy. The MEMS sensors helped to reduce the searching space of WiFi fingerprinting by using an extended Kalman filter, and another Kalman filter was applied to smooth the positioning result of WiFi fingerprinting. From two test scenarios, the results showed that the proposed method improved the accuracy by 47% and 28% with mean errors of 2.2 m and 2.6 m, respectively. In Reference [33], Deng et al. also used the extended Kalman filter in the integrated system, which consisted of pedestrian dead reckoning, WiFi fingerprinting, and special positions in a building (i.e., doors, elevators, escalators, etc.) to reduce the positioning error. From the experiments, it was shown that the mean positioning error was only 1.22 m in a test area of 487.2 m 2 . The two above methods obtained good positioning results; however, they could not completely handle the variation of the RSS values, even though they used different sources (i.e., smartphone sensors and special positions in a building), which would make the systems become more complicated, to calibrate for estimated user's position.
Currently, many latest works use the WiFi fingerprinting technique as the main tool to determine the user's position with the help of machine learning techniques [34][35][36][37][38]. In Reference [37], based on the conventional WiFi fingerprinting, Song et al. proposed the CNNLoc which combined the stacked auto-encoder and convolutional neural network (CNN) to track the users' positions in multi-buildings with multi-floors. The framework required a lot of data preprocessing in the training phase, such as sub-datasets division, rectangle areas creation, cell grids division, etc. As the result, the proposed method obtained a 96.03% accuracy of floor classification with a positioning error of 11.78 m. Moreover, using the deep learning approach, Qin et al. [38] combined the convolutional denoising autoencoder (CDAE) and CNN for the IPS. In the offline phase, the K-means algorithm was used to extract the set of features. During the online phase, the RSS values were put into the CDAE to extract the main features, and then the CNN was used to find out the user's position. The experimental results showed that the mean positioning errors were 1.05 m and 12.4 m for two different datasets. These methods were vulnerable to the changes of RSS values, and they were required to be adjusted to work well with different buildings.
The RSS values collected even from the same AP can fluctuate much due to the changes of environmental conditions, such as the number of working people, the number of electrical devices, the user's body, the period in a day, etc. The aforementioned works have not controlled the instability of the RSS values perfectly. Therefore, we propose a novel WiFi fingerprinting-based method, which utilizes the valued tolerance rough set and decision rules method to classify the user's position among predefined reference points. To the best of our knowledge, applying the VTRS-DR method to solve the indoor positioning challenge has never been recorded before.

VTRS-DR Method
Say we have a set of objects, U = {u 1 , u 2 , . . . , u m } (m is the total number of the fingerprints of RPs), that can be characterized by a set of conditional attributes, C = {RSS 1 , RSS 2 , . . . , RSS n } (a set of n RSS values collected from n APs at one RP, n < m). If we denote a subset of objects in U by a decision attribute d / ∈ C (with d ∈ {RP 1 , RP 2 , . . . , RP N }), which is one RP in a set of N RPs, then we define the decision table DT = (U, C ∪ {d}). The decision attribute d partitions set U into N decision classes (N ≤ m) as D l , l = 1, 2, . . . , N, with each class being one RP in the fingerprinting database. Each decision class is a tolerance class. At the beginning of the VTRS-DR method, the relations between the objects and the attributes can be represented through the decision table, DT, which is given in Table 1. In this table, n conditional attributes (i.e., n RSS values from n APs) C = {RSS 1 , RSS 2 , . . . , RSS n } are given and each attribute RSS j , j = 1, 2, . . . , n, has its RSS values changing in the interval [-100, 0] (dBm). Here, each object (i.e., one row in Table 1) represents one fingerprint (i.e., a unique set of RSS values) of the given RP, which is a decision class. It is worth noting that, in the decision table, DT, we do not need to sort the RPs by their orders, and the number of appearing times of each decision class (i.e., each RP) can be different which depends on the number of RSS scanning times at each RP.
Definition 1 is used to determine whether the objects of set U satisfy the valued tolerance relation built on a set of conditional attributes, A ⊆ C. If a pair of objects has the valued tolerance relation, then these objects may belong to the same tolerance class.

Definition 2.
The valued tolerance relation of each attribute RSS j , in any two objects, u, v ∈ U, is denoted by R j (u, v) and calculated as follows: where RSS j ∈ A ⊆ C, k j > 0 is the discrimination threshold value of the attribute RSS j , j = 1, 2, . . . , n. The discrimination threshold, k, is defined as the threshold of the similarity measure. The value k j is used to measure the similarity between two values of the attribute RSS j . From Equation (1), ∀u, v ∈ U : The value k j determines whether the two objects are indiscernible (equivalent) with the respect to each attribute in rough set theory. Definition 2 is used to calculate the valued tolerance relation between a pair of objects in U built on a conditional attribute, RSS j ∈ A ⊆ C. This definition supports the calculation of the valued tolerance relation between two objects in Definition 3.

Definition 3.
The valued tolerance relation between two objects, u, v ∈ U, on a set of conditional attributes, A ⊆ C, is denoted by R A (u, v) and calculated as follows: From Equation (2), ∀u, v ∈ U : 0 ≤ R A (u, v) ≤ 1, and R A (u, v) satisfies two properties, (a) and (b), of the valued tolerance relation.
Definition 3 used is to determine the valued tolerance relation between a pair of objects in U built on a set of conditional attributes, A ⊆ C. If R A (u, v) = 0, and then two objects, u, v ∈ U, are not related. If 0 < R A (u, v) ≤ 1, then two objects have a valued tolerance relation. If R A (u, v) is closer to 1, then two objects are more related. Then the valued tolerance relation matrix is built, ∀ (u, v) ∈ U × U : 0 ≤ R A (u, v) ≤ 1, where this matrix is symmetric with the main diagonal is equal to 1. This definition supports Definition 4 to calculate the tolerance granule for each object in U.

Definition 4.
A tolerance granule of object u ∈ U for relation R A is denoted by R A (u) and calculated as follows: Definition 4 is used to determine whether the objects in U have the valued tolerance relation with an object, u ∈ U, built on a set of conditional attributes, A ⊆ C. Here, R A (u) is a tolerance granule of u, where it carries a set of objects that has the valued tolerance relation with u (i.e., a set of supporting objects of u). This definition supports Definition 5 to determine the lower and upper approximations of the decision classes (i.e., the tolerance classes) built on a set of conditional attributes, A ⊆ C.

Definition 5.
With a set of decision classes, D ⊆ U, a subset of conditional attributes, A ⊆ C, and an object, u ∈ U, the lower approximations and upper approximations of D for A are denoted by D A and D A and defined as follows: Definition 4 is used to determine whether the objects in have the valued tolerance relation with an object, ∈ , built on a set of conditional attributes, ⊆ . Here, ( ) is a tolerance granule of u, where it carries a set of objects that has the valued tolerance relation with (i.e., a set of supporting objects of ). This definition supports Definition 5 to determine the lower and upper approximations of the decision classes (i.e., the tolerance classes) built on a set of conditional attributes, ⊆ .

Definition 5.
With a set of decision classes, ⊆ , a subset of conditional attributes, ⊆ , and an object, ∈ , the lower approximations and upper approximations of for are denoted by and and defined as follows: Definition 5 used is to determine a lower approximation, , of decision class , which has tolerance granules, ( ), involved in and an upper approximation, , of that has tolerance granules, ( ), intersected with . In this way, any objects that belong to are certainly involved in ; meanwhile, any objects that belong to can be involved in or not. Therefore, the determination of the lower and upper approximations plays an important role in the performance of the VTRS-DR method since it strongly affects the decision results, as well as the calculation space. The closer the and are to the , the more accurate the results and the lower the computational cost.

Definition 6.
With a set of decision classes, ⊆ , a subset of conditional attributes, ⊆ , and an object, ∈ , the membership degrees of object ∈ belonging to and are denoted by ( ) and ( ) and calculated as follows: where is the membership degree of object in the set (i.e., = 1, ∈ 0, ∉ or ∈ {0, 1}).
Definition 6 is used to calculate the membership degree of an object, ∈ , to find out whether it belongs to the lower or upper approximation. The ( ) and ( ) values are in the interval between 0 and 1; thus, the object, , will belong to the approximation that is closer to 1. This is an important criterion to determine the decision class, , that the object, , belongs to.

Definition 7.
With a decision table = ( , ∪ { }) and a subset of attributes, ⊆ , a decision rule that describes an object, ∈ , = 1, 2, … , , is denoted by , and defined by the following: Definition 5 used is to determine a lower approximation, D A , of decision class D, which has tolerance granules, R A (u), involved in D and an upper approximation, D A , of D that has tolerance granules, R A (u), intersected with D. In this way, any objects that belong to D A are certainly involved in D; meanwhile, any objects that belong to D A can be involved in D or not. Therefore, the determination of the lower and upper approximations plays an important role in the performance of the VTRS-DR method since it strongly affects the decision results, as well as the calculation space. The closer the D A and D A are to the D, the more accurate the results and the lower the computational cost.

Definition 6.
With a set of decision classes, D ⊆ U, a subset of conditional attributes, A ⊆ C, and an object, u ∈ U, the membership degrees of object u ∈ U belonging to D A and D A are denoted by µ D A (u) and µ D A (u) and calculated as follows: wherev is the membership degree of object v in the set Definition 6 is used to calculate the membership degree of an object, u ∈ U, to find out whether it belongs to the lower or upper approximation. The µ D A (u) and µ D A (u) values are in the interval between 0 and 1; thus, the object, u, will belong to the approximation that is closer to 1. This is an important criterion to determine the decision class, D, that the object, u, belongs to.

Definition 7.
With a decision table DT = (U, C ∪ {d}) and a subset of attributes, A ⊆ C, a decision rule that describes an object, u i ∈ U, i = 1, 2, . . . , m, is denoted by ρ i , and defined by the following: where RSS j (u i ) is a value of RSS j ∈ A and (D = d(u i )) is a decision class based on decision attribute d of the object u i . Definition 7 is used to describe a decision rule, ρ i , corresponding to an object, u i ∈ U, i = 1, 2, . . . , m. In Equation (8), the left side presents a set of conditional attributes, A ⊆ C, and the right side presents a decision attribute, d, corresponding to a decision class that involves the object, u.

Definition 8.
With a subset of attributes, A ⊆ C, the credibility degree of a decision rule ρ i , i = 1, 2, . . . , m, is denoted by µ A (ρ i ) and calculated as follows: Definition 8 is to calculate the credibility degree of a decision rule, ρ i , i = 1, 2, . . . , m. The µ A (ρ i ) value is in the interval between 0 and 1. If this value is closer to 1, then it is reliable that the object u i is involved in the decision class D. This is an important criterion for classifying a new object into a decision class.

Definition 9.
With a subset of attributes, A ⊆ C, a support object set of a decision rule ρ i , i = 1, 2, . . . , m, is denoted by S A (ρ i ) and calculated as follows: In Equation (10), and with a set of conditional attributes, A ⊆ C, we build a valued tolerance relation, is the support degree of rule ρ i for object u ∈ U. Object u is similar to some extent to the conditional part of the rule ρ i on the set of conditional attributes, A ⊆ C. Moreover, s A is a valued tolerance relation defined exactly as the relation Definition 9 is to determine the S A (ρ i ), a support object set of a decision rule, ρ i , corresponding to an object, u i , i = 1, 2, . . . , m. The S A (ρ i ) of ρ i is equivalent to a tolerance granule, R A (u i ), of the object u i . If many decision classes have the same credibility degrees, then it is difficult to decide which class the object u i belongs to; thus, the support object set of each class will help to solve the problem of classification. This value plays an important role in classifying a new object into a decision class.

The Proposed Positioning Method
In this section, to apply the VTRS-DR method to the WiFi fingerprinting method, we recount how we used the VTRS-DR method with a set of conditional attributes, A = C, meaning that the whole set of C (i.e., the whole APs) in the decision table, DT, was applied. Figure 1 shows the overall structure of the proposed method. The method is applied not only in the offline phase but also in the online phase. For the offline phase, at each reference point, RP l , l = 1, 2, . . . , N, a large number of RSS values from n APs is collected. Then the original RSS fingerprinting database is created, as shown in Table 2. The structure of this database is presented as follows: {Position, Coordinate, RSS values from APs}. To make this database similar to the decision table, DT, in Table 1, two parts {Position, RSS values from APs} in the original database are copied, and the index of each row is added as the first column to mark the objects. Finally, Algorithm 1 is applied to the DT to make the fingerprinting decision rules database. The structure of the fingerprinting decision rules database is shown in Table 3, with the format as follows: {Rule, Conditions of rule, Decision attribute, Support components}. Here, the support components include two values: the credibility degree and the support object set value. For the online phase, based on the fingerprinting decision rules database and measured RSS values θ = (θ 1 , θ 2 , . . . , θ n ) received from one unknown position, the user's position is obtained via Algorithm 2. Algorithm 2 chooses the best RP candidate as the user's position among the whole RPs by considering the valued tolerance relation, the credibility degree, the support object set value, and the Euclidean distance. One example of the proposed method can be seen in Appendix A. Step 1. Create the valued tolerance relation matrix from relations of all pairs of two objects (two rows) in DT: (1) and Equation (2)).
Step 3. Determine the set of decision classes D (i.e., a total number of RPs) of decision table, DT, based on the decision attribute, d. For each decision class, D l , calculate the lower approximations, (D l ) A and the upper approximations, (D l ) A , l = 1, 2, . . . , N (Equation (4) and Equation (5)).
Step 8. Create the fingerprinting decision rules database.

Conditions of Rule
Decision Attribute Support Components  (2)).
Step 2. Determine the smallest value µ ρ i (θ) between the valued tolerance relation R A (θ, ρ i ) and the credibility degree of rule ρ i : Step 3. Calculate the credibility degree of θ to each decision class D l (i.e., one RP), l = 1, 2, . . . , N: is the set of all decision rules that belongs to D l and having µ ρ i (θ) > 0, i = 1, 2, . . . , m.
Step 4. Choose the class D l that maximizes the credibility degree µ D l (θ). If ∃!D l : µ D l (θ) is at the maximum, then choose this D l as the user's position.
Step 5. If the same maximum credibility degrees exist on different L (L < N) decision classes, D l 1 , D l 2 , . . . , D l L , then calculate the relative supports of rules in D l 1 , D l 2 , . . . , D l L , as denoted by Supp(ρ i ). Note that Supp(ρ i ) is a ratio of the number of the support object set S A (ρ i ) to the total number of the set of all objects in any decision class which has the rule ρ i .
Step 6. Calculate the aggregated support of θ as Supp D lp (θ) = max Step 7. Choose the D l p that maximizes the aggregated support Supp D lp (θ). If ∃!D l p : Supp D lp (θ) is at the maximum, then choose this D l p as the user's position.
Step 8. If the same maximum aggregated support values, Supp D lp (θ), exist on many decision classes, then use the Euclidean distance to choose the decision class D l p which has the minimum distance between the set of measured RSS values θ and the mean of RSS values of that decision class; then choose that class (i.e., one RP) as the user's position.

Experimental Setup
To validate the efficiency and accuracy of the proposed method, we used the dataset introduced by Duong-Bao et al. [39]. The dataset was created in an office room at Hunan University, China, over four months. The room had an area of 9.0 × 6.5 m 2 . Five APs were installed at different positions, and each one was fixed at 1.1 m to 1.6 m from the ground, as can be seen in Figure 2. The smartphone played a role as a client to send the scanned RSS values to the server (i.e., the laptop). This server was responsible for storing the RSS values, creating the radio map, and classifying the user's position among predefined RPs. Figure 3 shows the positions of the APs, as well as the RPs in a two-dimensional coordinate. From this figure, there existed 205 RPs in the room, and the grid spacing between two adjacent RPs was 0.5 m. The starting point (RP0) was marked at the entrance door on the top left of the figure, and the other RPs were marked orderly from the left side to the right side, and from the top to the bottom. The last point (RP204) ended at the bottom right, where it was nearby the AP3.
In the offline phase, a subject holding a smartphone in front of his body stood at each determined RP to collect the RSS values from the five available APs. For each RP, the subject scanned the RSS values 100 times in different directions, meaning that there were 20,500 scanning times for 205 RPs. In this phase, various environmental conditions (i.e., the density of people and electrical devices, the direction of the user, the period of a day, etc.) were considered to create a noisy and complex fingerprinting database. In the online phase, the RSS values were collected in two separate test cases which were set up with different environmental conditions. Table 4 shows the conditions for the RSS collection of the two cases. For each case, the subject stood on each RP and used the smartphone to scan the RSS values once, meaning that the subject collected the RSS values 205 times over 205 RPs (i.e., 410 times in two cases). More detailed descriptions of the dataset can be found in Reference [31].
values, creating the radio map, and classifying the user's position among predefined RPs. Figure 3 shows the positions of the APs, as well as the RPs in a two-dimensional coordinate. From this figure, there existed 205 RPs in the room, and the grid spacing between two adjacent RPs was 0.5 m. The starting point (RP0) was marked at the entrance door on the top left of the figure, and the other RPs were marked orderly from the left side to the right side, and from the top to the bottom. The last point (RP204) ended at the bottom right, where it was nearby the AP3.   In the offline phase, a subject holding a smartphone in front of his body stood at each determined RP to collect the RSS values from the five available APs. For each RP, the subject scanned the RSS values 100 times in different directions, meaning that there were 20,500 scanning times for 205 RPs. In this phase, various environmental conditions (i.e., the density of people and electrical devices, the direction of the user, the period of a day, etc.) were considered to create a noisy and complex fingerprinting database. In the online phase, the RSS values were collected in two separate test cases which were set up with different environmental conditions. Table 4 shows the conditions for the RSS collection of the two cases. For each case, the subject stood on each RP and used the smartphone to scan the RSS values once, meaning that the subject collected the RSS values 205 times over 205 RPs (i.e., 410 times in two cases). More detailed descriptions of the dataset can be found in Reference [31].

Conditions
Case 1 Case 2 Density of people 1 to 9 6 to 13

Experimental Results
From the aforementioned dataset, in this experiment, the fingerprinting decision rules database was created from the original RSS fingerprinting database, which involves the RSS values collected from 205 RPs in the offline phase. Therefore, the training data used to build the new database include 20,500 objects corresponding to 20,500 samples (i.e., 20,500 rows) and five conditional attributes corresponding to five APs (i.e., five columns). At each RP position, the subject collected the RSS values 100 times; thus, there are 100 rules for each class (i.e., each RP), which also means that, for each RP, there are 100 collected fingerprints (i.e., set of RSS values). The testing data used the two test cases that were collected in the online phase of the above dataset to classify the user's position. For each test case, the RSS values from the five APs were collected at each RP once, meaning there were 205 sets of RSS values collected over 205 RPs used for performance evaluation.
The discrimination thresholds, k, corresponding to the number of conditional attributes are shown in Table 5. To the best of our knowledge, the k values are mostly chosen from the trial-and-error method, meaning that different sets of k values were put into the proposed method and repeatedly tested to find out the best k values. We chose the discrimination threshold values, k j , for each attribute RSS j , j = 1, 2, . . . , n, to measure the similarity among the objects and calculate the experimental results to find out which set of k j can help the VTRS-DR method to achieve the best result. With each set of k j , the VTRS-DR method builds a fingerprinting decision rules database. We used the database with 20,500 rows to test with the fingerprinting decision rules database corresponding to each k. From the classification results corresponding to different sets of k values, we then chose the set that maximizes the result. To evaluate the performance of our proposed method, we compared it with the NNbased methods (i.e., the 1-NN and WKNN (K is chosen as 3)) [17] and the random statistical (RS) method [14]. Note that the NN-based methods use the original fingerprinting database and the RS method uses the standardized fingerprinting database; meanwhile, the proposed method uses the fingerprinting decision rule database when matching with the measured RSS values in the online phase. For the compared methods, in the offline phase, the fingerprint of one RP is presented as a set of means of collected RSS values (i.e., 100 RSS values for each available AP at that RP). In the online phase, the NN-based and RS methods calculate the distance between the measured RSS values with the fingerprints of the whole RPs to find out the user's position. The Euclidean distance was used for the two NN-based methods, while the Mahalanobis distance was used for the RS method, respectively. The mean error in the experiment is calculated as follows: where ∆ ME is the mean error (m), N is the number of RPs used in the online phase (N = 205), and E l is the Euclidean distance between RP l and its classified position. Figure 4 shows the results of positioning errors of the four methods for the dataset of Case 1. It can be seen from the figure that the VTRS-DR method achieves the best results, as it can mostly find out the exact user's positions among the predefined RPs (i.e., the same positions as the RPs where the user stood), which means no error (0 m). In  Table 6. In this table, we can see that the WKNN method has the smallest minimum positioning error, with only 0.05 m, while the maximum error of the VTRS-DR method is only 3.35 m, which is approximately half of that of other methods, with 8.02, 7.03 m, and 6.73 m, respectively. However, the mean positioning error at wrong classified positions of the proposed method is not the smallest one (1.71 m with the standard deviation of 1.03 m), as it is higher than the WKNN mean error of only 1.17 m but lower than the two others, 2.05 m and 2.06 m. The results show the superiority of the VTRS-DR method to other methods for the dataset of Case 1 since it improves the classified accuracy from the above methods by 53.17% and 43.42%. The WKNN method cannot provide the exact positions where the user stood since this method calculates the mean positions from the three nearest candidates.     Table 7 shows the further statistical analysis of the four methods in Case 2 at error positions. From this table, the proposed method still achieves the smallest maximum error with 3.16 m, but the mean positioning error of the WKNN method is higher than others with 1.26 m.    Table 7 shows the further statistical analysis of the four methods in Case 2 at error positions. From this table, the proposed method still achieves the smallest maximum error with 3.16 m, but the mean positioning error of the WKNN method is higher than others with 1.26 m.  Moreover, the cumulative position error distributions in the two test cases are shown in Figure 6. For Case 1 (a), at the 60th percentile, the positioning error of the proposed method is 0 m, and at the 90th percentile, the error is still 0 m. The 0 m error continues until the 98th percentile. At the same percentiles, the errors of the NN, the WKNN, and RS methods are 0.68 m, 0.48 m, and 0.93 m at the 60th percentile and 3.24 m, 3.02 m, and 2.61 m at the 90th percentile, respectively. From this result, the VTRS-DR method certainly achieves much better accuracy compared to others. For Case 2 (b), the same phenomenon for the positioning errors among four methods also happens where the error of the proposed method is greatly smaller than the results of the other methods at the same percentiles. From both test cases, the VTRS-DR method outperforms the performance of the other methods from the point of view of classification since it can help to correctly classify the unknown position among the predefined RPs. The major reason for the extraordinary results of the proposed method is that it uses many classification levels (i.e., calculating the valued tolerance relation, the credibility degree, the support object set value, and the Euclidean distance).  Moreover, the cumulative position error distributions in the two test cases are shown in Figure 6. For Case 1 (a), at the 60th percentile, the positioning error of the proposed method is 0 m, and at the 90th percentile, the error is still 0 m. The 0 m error continues until the 98th percentile. At the same percentiles, the errors of the NN, the WKNN, and RS methods are 0.68 m, 0.48 m, and 0.93 m at the 60th percentile and 3.24 m, 3.02 m, and 2.61 m at the 90th percentile, respectively. From this result, the VTRS-DR method certainly achieves much better accuracy compared to others. For Case 2 (b), the same phenomenon for the positioning errors among four methods also happens where the error of the proposed method is greatly smaller than the results of the other methods at the same percentiles. From both test cases, the VTRS-DR method outperforms the performance of the other methods from the point of view of classification since it can help to correctly classify the unknown position among the predefined RPs. The major reason for the extraordinary results of the proposed method is that it uses many classification levels (i.e., calculating the valued tolerance relation, the credibility degree, the support object set value, and the Euclidean distance). The computational cost of the four implemented methods is analyzed by calculating the running time of each method on MATLAB (R2019a). We used a Dell Vostro laptop which was equipped with an Intel(R) Core (TM) i7-8550U CPU @1.80 GHz processor, 8 GB RAM, and 128 GB SSD. The operating system was Microsoft Windows 10 Professional Edition (64-bit). The computational cost for creating the fingerprinting decision rules database in the offline phase is approximately 96.62 min, and the time for creating the valued tolerance relation matrix obtains 89.34% of the total running time. Furthermore, Figure 7 shows the running time of the four algorithms over 205 RPs in Case 1 to classify the user's position in the online phase. The figure revealed that the 1-NN becomes the smallest average cost of about 0.0002 s while the VTRS-DR method obtains the biggest average cost of about 0.12 s. Concurrently, the WKNN and RS methods obtain the average values of 0.0077 and 0.0155 s, respectively. From the above costs in two phases, we can easily see that the proposed method will take lots of time to build the fingerprinting decision rules databases, especially the valued tolerance relation matrix, but it does not take much time to estimate the user's position in the online phase. This means that the proposed method can be used in the real-time scenario, while the database creation can be performed on the server readily.  Concurrently, the WKNN and RS methods obtain the average values of 0.0077 and 0.0155 s, respectively. From the above costs in two phases, we can easily see that the proposed method will take lots of time to build the fingerprinting decision rules databases, especially the valued tolerance relation matrix, but it does not take much time to estimate the user's position in the online phase. This means that the proposed method can be used in the real-time scenario, while the database creation can be performed on the server readily. The computational cost of the four implemented methods is analyzed by calculating the running time of each method on MATLAB (R2019a). We used a Dell Vostro laptop which was equipped with an Intel(R) Core (TM) i7-8550U CPU @1.80 GHz processor, 8 GB RAM, and 128 GB SSD. The operating system was Microsoft Windows 10 Professional Edition (64-bit). The computational cost for creating the fingerprinting decision rules database in the offline phase is approximately 96.62 min, and the time for creating the valued tolerance relation matrix obtains 89.34% of the total running time. Furthermore, Figure 7 shows the running time of the four algorithms over 205 RPs in Case 1 to classify the user's position in the online phase. The figure revealed that the 1-NN becomes the smallest average cost of about 0.0002 s while the VTRS-DR method obtains the biggest average cost of about 0.12 s. Concurrently, the WKNN and RS methods obtain the average values of 0.0077 and 0.0155 s, respectively. From the above costs in two phases, we can easily see that the proposed method will take lots of time to build the fingerprinting decision rules databases, especially the valued tolerance relation matrix, but it does not take much time to estimate the user's position in the online phase. This means that the proposed method can be used in the real-time scenario, while the database creation can be performed on the server readily.  Furthermore, to evaluate the robustness of the proposed method, we intentionally reduced the number of APs to four and three APs instead of using the default five APs. Since there are many possible sets of using four or three APs, we used the combination method to consider the whole possible cases. Therefore, if we consider three APs, the number of possible cases is C 3 5 = 10, and with four APs, this number is C 4 5 = 5, respectively. The positioning results of the proposed method in two test cases were also compared to the 1-NN, WKNN, and RS methods. Tables 8 and 9 show the mean positioning errors among the four methods in two cases with different combinations of four APs. For example, the notation {1, 2, 3, 4} in the tables represents the combination of four APs from 1 to 4. From both tables, even though the mean positioning errors of all cases increase, the VTRS-DR method still shows the best performance. The error of the proposed method is by far much lower than the others. However, this is not right when using only three APs in two test cases. The mean positioning errors can be seen in Tables 10 and 11. The results show that the VTRS-DR method cannot outperform the positioning results of other methods; even some combinations' results of the proposed method are much worse than others, for example, the cases of {1, 3, 4} in both cases. The reason can come from the characteristic of the VTRS-DR method that it may require more than a certain number of attributes (i.e., the number of APs) to produce good results. This problem, however, might not occur in practical scenes due to the widespread of APs indoors, especially in urban areas. Figures 8 and 9 display the comparisons of the mean of mean errors of the four methods in three different numbers of APs. From these figures, we can see that the mean of mean errors of the VTRS-DR methods is much better than others in cases using five and four APs, but for three APs, it is slightly better than others in Case 2 but somewhat worse than WKNN method in Case 1 (i.e., 1.766 m for WKNN and 1.865 m for VTRS-DR). Meanwhile, the RS method obtains the worst error in Case 1 with 1.959 m, and the 1-NN method gets the worst error in Case 2 with 2.103 m. The accuracy of the proposed method in Case 2 is better than in Case 1; we think that this is because the RSS values in Case 1 are more stable at any RPs than in Case 2 due to their simpler setup; thus, there may exist many valued tolerance relations that have the same values, and this makes it hard to classify the decision classes clearly. Therefore, the proposed method can work well in complicated environments, which are more popular in real life than stable environments are, such as Case 1.

Conclusions
In this paper, a novel WiFi fingerprinting positioning method based on the valued tolerance and decision rules method was proposed. The proposed method is implemented not only in the offline phase but also in the online phase. In the offline phase, the fingerprinting decision rules database is built from the decision table based on the conventional RSS fingerprinting database. The created database consists of different components, such as the credibility degree and support object set, which are utilized to support the classification of the measured RSS values in the online phase to the precise class. This helps to increase the classification performance. The evaluation shows that the proposed method outperforms the other methods for both the datasets of the two cases which were set up with different environmental conditions, although the test data were collected in a small number (only two sets) of RSS samples on the exact position of each RP rather than the random positions in the target area. The wrong classification rate of the proposed method is very low, which reduced the errors from the other methods from 43.42% to 54.64%. However, the proposed method also has some limitations. The first one is high complexity. Even though it can achieve extraordinary positioning results, the computational complexity makes it difficult to be used in real-time since it needs to compute the relation matrix in the offline phase, as well as the complicated components, such as the credibility degree and support object set values in the online phase. The second limitation is that the performance of the proposed method will greatly degrade when the number of available APs is reduced. For future work, we want to evaluate the performance of this method in bigger areas, such as buildings with multiple floors and various available APs that consist of more complicated environmental conditions. Furthermore, we also want to investigate how to optimize the number, as well as the setup positions, of APs in a target area.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
In this part, we provide an example of how to use the VTRS-DR method to determine the user's position. Suppose we set up five APs and there are ten predefined RPs, RP 1 , RP 2 , . . . , RP 10 , in a test area. At each RP, we collected the RSS values twice, as in Table A1. The decision table, DT, was created from Table A1, as shown in Table A2.   (1) and (2). In this example, we chose k j corresponding to each attribute RSS j , j = 1, 2, . . . , 5, based on the standard normal distribution. Then we applied Definition 3 to calculate the valued tolerance relation for all pairs of objects in the decision table, DT (Table 2). For example, we calculated the relation between the two objects u 3 and u 4 .
By applying the same way to all pairs, we calculated the valued tolerance relation for 20 objects in Table A2 and finally obtained the valued tolerance relation matrix, as shown in Table A3.  Twenty tolerance granules of object u ∈ U for relation R A were calculated based on Definition 4, as follows: From Table A2, we can see that there are ten decision classes:  The results of the membership degrees of each object belong to (D l ) A and (D l ) A , as shown in Table A4. Table A4. The membership degrees of each object belong to (D l ) A and (D l ) A . To build the fingerprinting decision rules database, we used Definition 7. Moreover, we used Definition 8 to calculate the credibility degree of the rule ρ 1 as follows: Furthermore, we used Definition 9 to determine the support object set of decision rule ρ 1 , as follows: S A (ρ 1 ) = R A (u 1 ) = {u 1 , u 2 , u 15 , u 17 , u 18 } The fingerprinting decision rules database is shown in Table A5. To test the positioning result in the online phase, we collected the RSS values at RP 1 with the set θ = (−56, −48, −62, −46, −51) (dBm), where each value is from one AP over five APs. Algorithm 2 of the VTRS-DR method was calculated, step by step, as follows.
Step 4: Because ∃!D 1 : µ D 1 (θ) = 0.516 is the maximum, the new set θ belongs to the decision class D 1 , meaning that Algorithm 2 returns the position of RP 1 (the right classified position); thus, the positioning error is 0 m.