<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Mean-offset Classifier based on Wi-Fi Indoor Positioning System</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Pasungili Rajesh Ramakrishnan</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Herman Myburgh</string-name>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>University of Pretoria</institution>
          ,
          <addr-line>Gauteng, RSA</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>A mean-offset classification technique was identified. It was found that the meanoffset classifier provides stability under dynamic indoor conditions and provides consistent results when training and test data combinations are swept from 10 - 95%. In this paper the meanoffset classifier is compared to the K-Nearest Neighbors (KNN) and Naïve Bayesian (NB) classifiers, with a view of developing an adaptable and computationally efficient indoor localization model using machine learning principles. It was seen that the mean-offset classifier improved results considerably and achieved an accuracy of 0.85 m and 1.15 m under line-of-sight (LOS) and non-line-of-sight (NLOS) conditions in residential areas.</p>
      </abstract>
      <kwd-group>
        <kwd>KNN</kwd>
        <kwd>LOS</kwd>
        <kwd>Mean-offset</kwd>
        <kwd>Machine learning</kwd>
        <kwd>Naive Bayesian NLOS</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>1.1</p>
    </sec>
    <sec id="sec-2">
      <title>Introduction</title>
      <sec id="sec-2-1">
        <title>Overview</title>
        <p>
          There has been a rapid growth in localization techniques and the application thereof in
indoor environments [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ]. The automation of locating people and objects in indoor
environments, such as shopping malls, hospitals, warehouses and indoor sports centers,
provides industries with valuable statistics that can be used to enhance their businesses.
In this context, a plethora of indoor localization schemes have been proposed based on
the type of signals used such as optical waves, Wireless Local Area Network (WLAN)
radio signals and sound waves [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. WLAN based location has become popular as
wireless technologies are readily available, cost effective, scalable and most importantly
received signal strength indicator (RSSI) can be extracted from most Wi-Fi receivers
easily. There are two main groups in WLAN localization propagation model-based
techniques and fingerprinting models. The former characterizes the indoor channel by
building a site-general or site-specific path loss model based on received signal strength
(RSS) and frequency fading statistics [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. The latter obtains RSSI values and stores it
in a database, after which a similarity metric is used as a differentiating factor to predict
the user’s location. RSSI has two major drawbacks, however. Multipath complicates
and degenerates RSSI values as multiple line-of-sight (LOS) and non-line-of-sight
(NLOS) signals with different phases, amplitudes and delays distort the shape of the
signal, which leads to spatial ambiguity [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ]. The second shortcoming is RSSI instability
i.e. RSSI differs on different devices when recorded at the same place and time. To
overcome the drawbacks faced by RSSI values, machine learning algorithms such as
classification techniques and artificial neural networks (ANN) are implemented.
        </p>
      </sec>
      <sec id="sec-2-2">
        <title>Related work</title>
        <p>
          There has been a growth in implementing machine learning algorithms to RSSI based
indoor localization. Table 1 summarizes the comparisons of localization using machine
learning techniques. In the Kernel-based learning method a spatial filtering step is
introduced to locate the estimated point to a subset of the environment and a kernelized
distance for estimating the Euclidean distance between the observed RSS and the stored
fingerprints is proposed, achieving an accuracy of 2.43m [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. Support vector machines
(SVM) classifiers that implement the linear and gaussian kernel achieve an accuracy of
2 m and 3.12 m respectively [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. In [P], a hybrid approach combining PCA with a grid
search-based Kernel SVM is proposed. The PCA algorithms decorrelates and denoises
the data received in the offline phase before applying the grid search algorithm during
the online phase to achieve an accuracy of 1.37 m [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. The widely used KNN classifier
achieves an accuracy of 3.08 m [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. Decision trees are non-parametric supervised
learning methods, which achieves an accuracy of 2.87 m [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ]. A random forest classifier
selects the tree with the highest votes after multiple decision trees are generated and
achieves an accuracy of 3.1 m [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
        </p>
        <p>A mean-offset classifier which computes the percentage of error between the
users RSSI against the database of trained RSSI centroids is implemented. The
classifier is tested under dynamic indoor conditions where human movement
is present and across multiple days to see if temporal fluctuations affect
localization.</p>
        <p>K-NN and Naïve Bayesian classifiers are implemented and compared to the
mean-offset classifier under static indoor localization scenarios. Training data
are swept from 10 – 90% to compare which classifier performs accurately
when minimum training data are available.</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Methodology</title>
      <p>
        Machine learning algorithms improve the accuracy of localization systems. All
machine learning algorithms are implemented in two phases, training and test phases [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ].
In the first phase, a collection of RSSI values are stored in the database. The data are
then pre-processed by scaling the features and splitting the data into training and test
sets. The classifier then uses the database of RSSI values to learn and build a model by
which location can be predicted. In the test phase, the classifier that has the most
accurate model is used to predict location of the new set of RSSI.
device. The algorithm calculates the  −
  is the value on the RSSI database given as   [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]:
      </p>
      <p>
        norm of  - dimensions RSSI vector   , where
RSSI value from the database ̅ is represented as [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]:
Select the number K of neighbour and take the nearest K neighbours of the new data
point according to the Euclidean distance. The distance between measured ̅ and the
  ∈  
| ̅|
=1
 (̅ − ̅ )= (∑| ̅ − ̅̅̅̅| )

 −1
(1)
(2)
Where  is the measured distance, ̅̅̅̅ is the average and  represents the selected APs.
The value for  = 2
      </p>
      <p>
        as the Euclidean norm-distance is used. The K-NN classifier
chooses the minimum distance of the K-neighbour points where   is the list of points
given as
(̅ −  ̅ ) ≤ (̅, ̅̅̅̅)
  = { 1, … ,   }
̅̅1̅:̅̅ = {̅̅1̅, … , ̅̅̅}
 ̂ =

1

∑  
=1
from the vector   which must satisfy the following conditions [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]:
corresponding to the K fingerprints on the database. Each  contains the RSSI feature
      </p>
      <p>The estimated location,  ̂, by averaging the coordinated of the KNN classifier is
2.2</p>
      <sec id="sec-3-1">
        <title>Naïve Bayesian Classifier (NB)</title>
        <p>
          The Naïve Bayes classifier uses the Bayes theorem to makes classification decisions
with an assumption of conditional independence and uses conditional probabilities to
make classification decisions. In the indoor localization system, the location of a user
needs to be determined given the RSSI feature from APs. To achieve this the probability
of RSSI given in each region and the probability of the regions needs to be calculated.
The probability of the RSSI values is given by [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]:
 
= arg 
[ (
        </p>
        <p>)|) ]
 ( |
( ∑1(| 
)∗ ( 
  )∗ ( 
  ))</p>
        <p>))
)
are
prior
likelihood</p>
        <p>
          distributions.
  )are constant in all cases as there is no
in(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
Where
( ∑1(| 
[
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]:
 (
 (
  )|)
  )∗ ( 
  )|) =
and
  ))and (
        </p>
        <p>
          ( |
formation about the user’s position, hence making it a maximum likelihood estimate
 
= arg 
[(| 
  )]
Hence, maximising the likelihood probability will help make a decision. This problem
is simplified to [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]:
 ( )= arg  [() ∏ (
As the NB classifier assumes these probabilities are conditionally independent.
  = [∑ (

=1
During the training phase, the stored RSSI features in a database are clustered based on
the proximity measure, which quantifies the similarity between the RSSI vectors. In
this scenario RSSI collected from the same room in an indoor environment are clustered
together, Fig 2. Where the prediction of the location, (  ,   ), with the least error,
(
 ), between a test sample and each grids centroid is given as:
|̅̅̅̅̅1̅̅̅̅− 
 
1(  )|
|̅̅̅̅̅2̅̅̅̅−
        </p>
        <p>2(  )|

+
  1 
+
|̅̅̅̅̅3̅̅̅̅−</p>
        <p>3(  )|
  3 
(  ,   ) = (
 )</p>
        <p>2 
) × 100]
2.3</p>
        <p>grids, each grid with the physical location   (  ,   )has a corresponding
fingerprinting vector   = {
of centroids computed across each grid as follows:
1 1, 
2 1, … , 
()  1)where ̅̅̅̅̅(̅̅)̅̅̅ is the database</p>
        <p>̅̅̅̅̅̅̅1̅ = ∑
1

=1

11 (  )
(11)
(12)
(13)</p>
        <sec id="sec-3-1-1">
          <title>Where</title>
          <p>1(  ), 
2(  ),</p>
        </sec>
        <sec id="sec-3-1-2">
          <title>3(  )are the test samples, Fig. 1.</title>
          <p>3
3.1</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Experiment and Results</title>
      <sec id="sec-4-1">
        <title>Experimental setup</title>
        <p>The indoor localization system was carried out on the second floor of a residential
space. The dimension of the residential environment is 11 m by 5 m. It has three
bedrooms (outlined in red, green and blue), a passage (outlined in purple) and one bathroom
(outlined in orange), which are separated by walls and cupboards Fig. 2. There are 119
testing grids that are clustered as outlined in Fig. 2. In training, five RSSI measurements
per AP, a total of 1785 RSSI measurements, were collected across all the grids. In the
online phase, the user moved to five random locations and RSSI measurements from
three APs were stored to a server via an API call and exported to Python, which applied
the classifiers to locate the user’s position.
Fig. 2. Floor map of the residential area. The blue, green, purple, orange and red outlines
indicate the clustered areas.
3.2</p>
      </sec>
      <sec id="sec-4-2">
        <title>Classifier comparison</title>
        <p>To evaluate the classification techniques, the RSSI measurements collected during the
training phase where applied to K-NN, NB and Centroid-Offset classifiers. The
classifiers selected where provided training data that ranged from 10% - 90% as an efficient
classifier needs to be able to adapt to scenarios where only minimum training data is
available. The mean offset classifier outperforms the KNN and NB classifier when the
split between the training-test data is between 20 % and 75% Fig. (3). As more training
data are provided, the NB classifier marginally outperforms the mean-offset classifier.
However, the NB classifier also struggles when &lt; 60% training data are provided.
Overall, the mean-offset classifier consistently achieves accuracy of within 1.3 m.
The mean-offset classifier should account for dynamic changes presented by an indoor
environment, such as temporal fluctuations in RSSI when recorded from the same point
over multiple days and the movement of people and furniture. The Mean-Offset
classifier was applied under two cases: tests were conducted on different times over
multiple days and with movement of people.</p>
        <p>Fig. 4. Measured RSSI values from five different locations over four days indicating the
fluctuation experienced in RSSI values
The test was conducted on five different locations over a period of four days. The
fluctuations in RSSI across the three different APs was recorded and is represented in Fig.
4. The RSSI values had an average fluctuation of – 3dBm across the four days. The
average accuracy over the locations at 12:00, 14:00, 18:00 and 20:00 was 1.08 m, 1 m,
0.83 m, 0.94 m and 0.58 m respectively Fig. 5. The accuracy over five locations across
four days was 0.89 m.
Mean-offset classifier was selected based on its performance as it shows adaptability
under uncertain conditions and in instances where the environment is changing rapidly
and the RSSI values are fluctuating. The test data gathered in an indoor residential area
are applied to the mean-offset classifier and the results are tabulated in Table 2. Under
LOS conditions an accuracy of 0.85 and 1.15 m was achieved in residential area.</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusion and Future work</title>
      <p>In conclusion, the mean-offset classifier was proposed for fingerprint indoor
localization using Wi-Fi. The mean-offset classifier computes the percentage of error between
the users of RSSI against the database of trained RSSI centroids, after which the grid
with the lowest percentage of error is chosen as the location implemented. Experimental
results have demonstrated that the mean-offset classifier achieves an average
localization of 0.86 m with over 70% of errors under 1 m, which outperforms other
kernelbased, KNN, PCA-SVM, linear-SVM, gaussian-SVM, decision tree and random forest
classifiers. Furthermore, main challenges such as RSSI instability and temporal
ambiguity have been mitigated by the mean-offset classifier. The mean-offset classifier
needs to be implemented for dynamic localization under several indoor locations such
as malls, office spaces and underground parking. A hybrid between Artificial Neural
Networks (ANN) and mean-offset is a concept that will be further investigated.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Z.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            <surname>Zhou</surname>
          </string-name>
          , and Y. Liu, “From RSSI to CSI : Indoor Localization via Channel Response,
          <source>” ACM Comput. Surv.</source>
          , vol.
          <volume>46</volume>
          , no.
          <issue>2</issue>
          , p.
          <fpage>25</fpage>
          ,
          <year>2013</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>A.</given-names>
            <surname>Kushki</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K. N.</given-names>
            <surname>Plataniotis</surname>
          </string-name>
          and
          <string-name>
            <given-names>A. N.</given-names>
            <surname>Venetsanopoulos</surname>
          </string-name>
          ,
          <article-title>"Kernel-Based Positioning in Wireless Local Area Networks,"</article-title>
          <source>in IEEE Transactions on Mobile Computing</source>
          , vol.
          <volume>6</volume>
          , no.
          <issue>6</issue>
          , pp.
          <fpage>689</fpage>
          -
          <lpage>705</lpage>
          ,
          <year>June 2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>X.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Cai</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Hei</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Yuan</surname>
          </string-name>
          , “
          <article-title>NLOS identification and mitigation based on channel state information for indoor WiFi localisation</article-title>
          ,”
          <source>in IET Communications</source>
          , vol.
          <volume>11</volume>
          , no.
          <issue>4</issue>
          , pp.
          <fpage>531</fpage>
          -
          <issue>537</issue>
          ,
          <fpage>3</fpage>
          <string-name>
            <surname>9</surname>
          </string-name>
          <fpage>2017</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>A. H.</given-names>
            <surname>Salamah</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Tamazin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. A.</given-names>
            <surname>Sharkas</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Khedr</surname>
          </string-name>
          ,
          <article-title>"An enhanced WiFi indoor localization system based on machine learning,"</article-title>
          <source>2016 International Conference on Indoor Positioning and Indoor Navigation (IPIN)</source>
          , Alcala de Henares,
          <year>2016</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>L.</given-names>
            <surname>Zhang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Y.</given-names>
            <surname>Gu</surname>
          </string-name>
          and
          <string-name>
            <given-names>W.</given-names>
            <surname>Yang</surname>
          </string-name>
          ,
          <article-title>"An efficient machine learning approach for indoor localization," in China Communications</article-title>
          , vol.
          <volume>14</volume>
          , no.
          <issue>11</issue>
          , pp.
          <fpage>141</fpage>
          -
          <lpage>150</lpage>
          , Nov.
          <year>2017</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>K.</given-names>
            <surname>Zia</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Iram</surname>
          </string-name>
          ,
          <string-name>
            <surname>M.</surname>
          </string-name>
          <article-title>Aziz-ul-</article-title>
          <string-name>
            <surname>Haq</surname>
            and
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Zia</surname>
          </string-name>
          ,
          <article-title>"Comparative study of classification techniques for indoor localization of mobile devices," 2018 28th International Telecommunication Networks and Applications Conference (ITNAC), Sydney</article-title>
          ,
          <string-name>
            <surname>NSW</surname>
          </string-name>
          ,
          <year>2018</year>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>5</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>