You are on page 1of 58

HYBRID INDOOR POSITIONING WITH WI-FI AND BLUETOOTH

Undergraduate graduation project report submitted in partial fulfillment of


the requirements for the
Degree of Bachelor of Science of Engineering
in

The Department of Electronic & Telecommunication Engineering


University of Moratuwa.

Supervisor: Group Members:


Prof Dileeka Dias 140113L D.D. Denipitiya

140178M S.M.I.P. Gnanarathne

140425U P.G.T. Nuradha

140448R B.L.C. Perera

December 2018
Approval of the Department of Electronic & Telecommunication
Engineering

……………………………………………….
Head, Department of Electronic &
Telecommunication Engineering

This is to certify that I/we have read this project and that in my/our opinion it is fully
adequate, in scope and quality, as an Undergraduate Graduation Project.

Supervisor: Dr/Prof Dileeka Dias

Signature: …………………………………

Date: ……………………………………….

ii
Declaration

This declaration is made on December 15, 2018.

Declaration by Project Group


We declare that the dissertation entitled Hybrid Indoor Positioning with Wi-Fi and
Bluetooth and the work presented in it are our own. We confirm that:
• this work was done wholly or mainly in candidature for a B.Sc. Engineering
degree at this university,
• where any part of this dissertation has previously been submitted for a degree or
any other qualification at this university or any other institute, has been clearly
stated,
• where we have consulted the published work of others, is always clearly
attributed,
• where we have quoted from the work of others, the source is always given.
• with the exception of such quotations, this dissertation is entirely our own work,
• we have acknowledged all main sources of help,
• parts of this dissertation have been published. (see List of Publications).
[OPTIONAL]

……………………….. …………………………………
Date D.D.Denipitiya (140113L)

…………………………………
S.M.I.P.Gnanarathne(140178M)

…………………………………
P.G.T. Nuradha (140425U)

…………………………………
B.L.C. Perera (140448R)

iii
Declaration by Supervisor

I/We have supervised and accepted this dissertation for the submission of the degree.

……………………………………….. ………………………………
Prof./Dr. Dileeka Dias Date

iv
Abstract

HYBRID INDOOR POSITIONING WITH WI-FI AND BLUETOOTH

Group Members: D.D.Denipitiya, S.M.I.P. Gnanarathne, P.G.T. Nuradha, B.L.C. Perera

Supervisor: Prof. Dileeka Dias

Keywords: Wi-Fi, Bluetooth, Hybrid, Localisation, Machine Learning, access point


breakdown.

With the increasing use of location-based services (LBS), the need of accurate
indoor position is increasing day by day. LBS can further enhance customer and
company relationship in order to engage in better business or can maintain inventories of
a warehouse more efficiently. It is evident that developing an indoor positioning system
opens doors to limitless opportunities. However, due to multipath losses and absence of
line of sight, it is not feasible to deploy the Global Positioning System (GPS) for indoor
environments. Therefore, our focus shifts to technologies that can be used indoors for
accurate positioning.
The scope of our project expands in the following areas. First, collection of data
from Wi-Fi access points and Bluetooth beacons is done where after a machine learning
model is developed to predict the position of the user. Analysis of the impact of a
malfunctioning Bluetooth or Wi-Fi access point is another area of study in this project.
Finally, the system accuracy in static and dynamic environments is analyzed in detail. As
an example for its usage in an LBS, a web app is developed to show the position of a user
within the ENTC building.
The purpose of this project is to develop a robust positioning system using Wi-Fi
and Bluetooth technologies. We focus on laying out an efficient an accurate platform on
which LBS can be implemented seamlessly. The system developed is fine-tuned with
different positioning algorithms using machine learning techniques. In the latter part of
the report, an analysis of the accuracy and the immunity of the system for malfunctioning
access points is discussed.
v
Using machine learning techniques for indoor localization, we have obtained
satisfactory and accurate positioning within the ENTC building, which was our test area.
The results attained prove satisfactory and shows improvement when compared with the
existing literature.

vi
DEDICATION

To our Parents

vii
Acknowledgments
We would like to take this opportunity to express our gratitude to
supervisor Prof. Dileeka Dias for the continuous guidance and immense support given
throughout the project. We also would like to take this opportunity to convey our sincere
gratitude to all the colleagues for the great endeavours taken in completing the project.
Furthermore, we would like to thank all the people who helped us in various aspects in
making this project a huge success.

viii
Approval of the Department of Electronic & Telecommunication Engineering

This is to certify that I/we have read this project and that in my/our opinion it is fully
adequate, in scope and quality, as an Undergraduate Graduation Project.

Supervisor: Dr/Prof Dileeka Dias

Signature: …………………………………

Date: ……………………………………….

ix
Table of Contents

Declaration ......................................................................................................................... iii

Abstract ................................................................................................................................ v

Acknowledgments ............................................................................................................ viii

List of Fig s ....................................................................................................................... xii

List of Tables ....................................................................................................................xiv

Acronyms and Abbreviations ............................................................................................ xv

1.INTRODUCTION ............................................................................................................ 1

1.1 Background ................................................................................................................ 1

1.2 Research Purpose ....................................................................................................... 1

1.3 Problem Statement ..................................................................................................... 1

1.4 Primary Objectives ..................................................................................................... 2

1.5 Scope .......................................................................................................................... 2

1.6 Literature Review ....................................................................................................... 2

1.6.1 Wireless Positioning Techniques ........................................................................ 3

1.6.2 Machine Learning Techniques ............................................................................ 5

1.6.3 Wireless Positioning Technologies ..................................................................... 6

1.6.4 Existing systems .................................................................................................. 7

1.7 Proposed Solution .................................................................................................... 14

1.8 Basic Architecture .................................................................................................... 15

2. METHODOLOGY ........................................................................................................ 16

Introduction .................................................................................................................... 16

2.1 Data Collection ........................................................................................................ 16

2.1.1 Python GUI development ............................................................................ 16


x
2.1.2 Android development overview ................................................................... 17

2.1.2.1 Wi-Fi Scanner ................................................................................................ 19

2.1.2.1.1 Architecture of Wi-Fi Scanner .................................................................... 19

2.2 Radio map Creation ................................................................................................. 24

2.3 Positioning using Wi- Fi RSSI only......................................................................... 26

2.2.1 Data Preprocessing............................................................................................ 26

2.2.2 Outlier Detection ............................................................................................... 27

2.4 Analysis of malfunctioning access points ................................................................ 28

2.5 Positioning using Bluetooth RSSI only ................................................................... 29

2.3.1 Placement Algorithm ........................................................................................ 33

2.3.2 Selected configuration ...................................................................................... 34

3.RESULTS ....................................................................................................................... 35

3.1 Wi-Fi RSSI system .................................................................................................. 35

3.1.1 Data filtering ..................................................................................................... 35

3.1.3 Immunity to Malfunctioning of Access Points ................................................. 37

3.2 Bluetooth RSSI System............................................................................................ 39

4.DISCUSSIONS AND CONCLUSION .......................................................................... 41

4.1 Discussion ................................................................................................................ 41

4.2 Conclusion ............................................................................................................... 41

Bibliographical References ................................................................................................ 42

xi
LIST OF FIGURES
Fig 1.1 Representation of a MIMO system .......................................................................... 3
Fig 1.2 AoA Computation considering 2 transmitters ......................................................... 4
Fig 1.3 Comparison of the Existing Systems for Indoor positioning.................................. 7
Fig 1.4 Typical architecture of an iBeacon .......................................................................... 8
Fig 1.5 Flow Diagram of Proposed Solution ..................................................................... 14
Fig 1.6 Basic Architecture of the System .......................................................................... 15
Fig 2.1 Python GUI for data collection ............................................................................. 16
Fig 2.2 Life cycle of an Activity ....................................................................................... 18
Fig 2.3 Life cycle of a service ........................................................................................... 19
Fig 2.4 User Interface of Wi-Fi scanner ........................................................................... 20
Fig 2.5 Performance of a BLE scanner ............................................................................. 22
Fig 2.6 Use Interface of BLE scanner ....................... 24
Fig 2.7 Breakdown Analysis ............................................................................................. 25
Fig 2.8 Outlier detection algorithm ................................................................................... 27
Fig 2.9 3D depiction of outlier .......................................................................................... 27
Fig 2.10 Removal of Outliers........................................................................................... 28
Fig 2.11 Actual Coverage Map ......................................................................................... 31
Fig 2.12 Calculation of path loss Component ................................................................... 32
Fig 2.13 Approximated coverage map .............................................................................. 33
Fig 2.14 Final beacon placement configuration ................................................................ 34
Fig 2.15 Actual heatmap of selected configuration .......................................................... 34
Fig 2.16 Approximated heatmap of selected configuration .............................................. 34
Fig 3.1 Cumulative Distribution Function (CDF) of positional error with different
filtering techniques ............................................................................................................. 35
Fig 3.2 Impact of applying post filtering techniques ........................................................ 36
Fig 3.3 Impact of self correcting algorithm for malfunctioning of Access Points............ 38
Fig 3.4 Impact when KNN is used .................................................................................... 39

xii
xiii
LIST OF TABLES
Table 1.1 Comparison of Wireless Technologies for indoor positioning ............................ 6
Table 1.2 Comparison of Hybrid Wireless Systems with Wi-Fi and Bluetooth ................ 11
Table 2.1 Observed RSSI values........................................................................................ 30
Table 2.2 Power level to Weight conversion ..................................................................... 31
Table 2.3 Path loss exponents for different environments ................................................. 32
Table 3.1 Accuracies of corresponding models ................................................................. 37
Table 3.2 Accuracy comparison of different configurations ............................................. 39

xiv
ACRONYMS AND ABBREVIATIONS

Wi-Fi: Wireless Fidelity


RSSI: Received S
BLE: Bluetooth Low Energy
CSI: Channel State Information
LBS: Location Based Services
KNN: K Nearest Neighbours
SVM: Support Vector Machine
ANN Artificial Neural Network

xv
Chapter 1
1. INTRODUCTION

1.1 Background
With the increase of extended uses of the internet, location-based services (LBS) have
been playing a major role in day-to-day life. These services provide practical information
that is useful in many ways. LBS can further enhance the customer and company
relationship in order to engage in better business, a consumer can easily identify an
available parking slot in a basement car park or an inventory of a warehouse can be
maintained efficiently. Now it is evident that developing indoor positioning systems open
doors to limitless opportunities.
Considering the fact that Global Positioning System (GPS) cannot be used indoors due to
multipath losses and absence of Line of Sight, it is not feasible to use GPS for indoor
positioning. Therefore, technologies used indoors can provide the solution for accurate
positioning.
In our project we focus on laying out an efficient and accurate platform on which
location-based services can be implemented seamlessly.

1.2 Research Purpose


This report discusses the feasibility of using a hybrid model of Wi-Fi and low power
Bluetooth (BLE) technologies to implement better indoor positioning. The use of GPS
indoors is difficult and inaccurate, because the signals are affected by the building in the
indoor environment. Therefore, by designing a hybrid model that fuses the advantages of
both Wi-Fi and BLE, we would be able to provide an accurate indoor positioning model
that could cater to the LBS increase day by day.

1.3 Problem Statement


Even though Indoor localization has been studied and applied in several ways, there are
still unsolved areas remaining. We have identified two key problems out of them.

1
1. The accuracy of wireless positioning systems depends on various environmental
factors such as multipath propagation, environmental noise, environmental
dynamics etc.
2. The malfunctioning of access points deteriorates accuracy of the system.
The accuracy of the system in various environmental conditions and in situations where
the required data is missing has to be considered.

1.4 Primary Objectives


The primary objectives of the project are as follows,
• Study about Hybrid wireless positioning systems which use multiple technologies
• Study about hybrid techniques which can improve the solution to the above problems
• Develop a positioning system using Wi-Fi Access points and Bluetooth Beacons
• System fine tuning with different positioning algorithms
• Analyze the accuracy and the immunity of system for the malfunctioning of the
access points

1.5 Scope
The scope of our project is as follows.
• Collect data from Wi-Fi access points and Bluetooth beacons
• Develop a Machine Learning model to predict the position of the user
• Analyse the impact of malfunctioning of BT and Wi-Fi access points
• Analyse the system accuracy in static and dynamic environments
• Develop a Web app to show the position of the user within ENTC building

1.6 Literature Review


In this section the main categories of Wireless Positioning Systems are discussed based
on the existing Literature. Wireless positioning techniques, Technologies and Existing
Systems are discussed in detail.

2
1.6.1 Wireless Positioning Techniques
There are several positioning techniques proposed to be utilized as a means to do accurate
positioning. The Characteristics and operating methods of them are introduced in this
section.
1.6.1.1 Received Signal Strength Indicator (RSSI)
The power level of the received signal is denoted by the RSSI values. Therefore, the
higher the RSSI, the stronger the signal is, as denoted by 𝑅𝑆𝑆𝐼 = −10𝑛𝑙𝑜𝑔10 (𝑑) + 𝐴.
RSSI can be used to estimate the distance between transmitter and the receiver device.
According to the equation, higher the RSSI value the smaller the distance between
transmitter and the receiver. RSSI based localization needs at least three transmitter
points to the same receiver. Then calculate each absolute distance from the transmitter to
the receiver. Based on the calculations, the location can be obtained by using geometry
and trigonometry calculations.
1.6.1.2 Channel State Information CSI
The channel state information is introduced with the Multiple Inputs Multiple Outputs
antenna arrays (MIMO).

Fig 1.1 Representation of a MIMO system

CSI is a measurement related to the quality of the channel between the transmitter and the
receiver. CSI can be written in a polar form as 𝐻(𝑓) = 𝐻(𝑓) ∨ 𝑒 𝑗𝑠𝑖𝑛𝑔(𝐻) where, |H(f)| is
the amplitude or the magnitude of the response and j sing(H) is the phase response of the
frequency f of the channel. As a general note, CSI describes how a signal propagates from
the transmitter to the receiver. Since the channel depends on the distance and the

3
environment, the CSI values also depends on those factors. Therefore CSI is utilized to
obtain the location of the transmitter.
1.6.1.3 Time of Arrival (ToA)
Measurement of the signal propagation time between the transmitter and the receiver can
be used to obtain the location of the receiver. The relative distance between the
transmitter and the receiver can be denoted by 𝑟 = 𝑡 ∗ 𝑐, where c is the speed of light and
the t is the signal propagation time from transmitter to the receiver. The receiver location
can be calculated using three transmitter base stations applying geometric mathematics.
However, the ToA requires strict synchronization between transmitters and receivers as
the distance can be changed drastically, even if there is a slight change in time.
1.6.1.4 Time Difference of Arrival (TDoA)
This technique exploits the difference in signal propagation times from different
transmitters, measured at the receiver. These absolute time values are converted into
distance values by the ToA equation. The receiver is now located on the hyperboloid
given by
2 2 2
𝐿𝐷𝑖,𝑗 = √(𝑋𝑖 − 𝑥)2 − (𝑌𝑖 − 𝑦)2 − (𝑍𝑖 − 𝑧)2 − √(𝑋𝑗 − 𝑥) − (𝑌𝑗 − 𝑦) − (𝑍𝑗 − 𝑧)

where (𝑋𝑖 , 𝑌𝑖 , 𝑍𝑖 ) are the coordinates of the transmitter or reference node I and (x,y,z) are
the coordinates of the receiver. At least three transmitters are required for calculating the
exact location.
1.6.1.5 Angle of Arrival (AoA)
Angle of Arrival (AoA) mainly determines the source position through the measurement
of the base station signal to the object's azimuth, as shown in Fig 1- 2

Fig 1.2 AoA Computation considering 2 transmitters

4
This technique requires directional antennas for positioning. The main advantage is that
the location of the receiver can be estimated with two transmitters in 2D environment or
three transmitters in 3D environment. However, it requires complex hardware and careful
calibration compared to other techniques. Because, a slight error of angle can be
translated into a huge error in the distance calculation.

1.6.2 Machine Learning Techniques


Machine Learning techniques basically use to learn the behaviours of RSSI or CSI values
with respect to the distance. Then for a given RSSI or CSI value, it will recognize the
location of the receiver.
1.6.2.1 Multi-Layer Perceptron Neural Networks (MLP-NN)
They are used for a number of classification and forecasting applications. When using
MLP-NN for localization, they needed to be trained for using RSSI values and
coordinates as the labels. Thereafter, it can be used to recognize the location coordinates
based on the RSSI values. In an MLP-NN, RSSI values will be multiplied by a weight
matrix and the results will go through an activation function to create a hidden layer in the
MLP-NN. Then after some hidden layers, the result will be calculated using the softmax
function.
1.6.2.2 K-Nearest Neighbor (kNN)
This technique needs RSSI values to estimate the location. Algorithm relies on the RSSI
values to obtain the k nearest matches of the known locations using root mean square
error. The location is calculated by averaging the nearest matches.
1.6.2.3 Random Forest
Random Forest is an ensemble technique designed with multiple decision trees. The
output of the Random Forest Classifier is the class number that most frequently occurs in
the output of the decision trees. (Mode of the outputs). The output of the Random Forest
Regressor is the average of the outputs given by the decision trees. (Mean of the outputs)
1.6.2.4 Support Vector Machine (SVM)
It was introduced for binary classification but improved for multiclass classification
throughout the years. SVM is a supervised learning technique which uses RSSI values
and locations as training data and labels for the localization. SVM tries to define a
5
boundary between classes (locations) and based on the distance between new data and
class boundary, it will estimate the location. In the implementation, training is done under
a regularization term which helps to improve the performances of the classification.

1.6.3 Wireless Positioning Technologies

Table 1.1 Comparison of Wireless Technologies for indoor positioning

Positioning based service is increasing important technology that plays a vital role in
modern life. Positioning scenarios can be divided into two categories; outdoor positioning
and indoor positioning. GPS is used for outdoor positioning. GPS only works better in
open areas, since GPS signals can be blocked by buildings, thick forests and other types
of physical obstacles. Therefore, indoor positioning is introduced as an extension of
outdoor positioning.
Indoor positioning can be used for navigation in large malls or complex yet unfamiliar
place for users. Unlike outdoor positioning, indoor places might be small and easy to
deploy extra infrastructure. There are different technologies used for wireless positioning.

6
Zigbee is widely used for localization of wireless sensor networks (WSN). Another
wireless technology, RFID is primarily used for transferring and storing data using
electromagnetic transmission from a transmitter to RF compatible circuit. It consists of a
reader that can communicate with RFID tags. Both Zigbee and RFID are not favorable for
indoor positioning of users because, those technologies are not readily available in the
majority of portable user devices like smart phones and laptops.

Most of the portable user devices such as smart phones, laptops are Wi-Fi and Bluetooth
enabled. Since existing Wi-Fi access points can be also used as reference access points,
basic positioning systems can be built without the need of additional infrastructure.
Current BLE based positioning solutions rely on RSS based measurements and RSS
based systems are less complex. Therefore, a hybrid positioning system with Wi-Fi and
Bluetooth is considered here.

1.6.4 Existing systems


The diagram below shows some of the research works conducted on indoor positioning
considering Wi-Fi and Bluetooth as the positioning technologies and RSSI and CSI as
positioning techniques.
CSI cannot be incorporated into Bluetooth (BT) as there is no Orthogonal Frequency

Fig 1.3 Comparison of the Existing Systems for Indoor


positioning

Modulation schemes in BLE to support orthogonal subcarriers used in the computation of


CSI.

7
1.6.3.1 Wi-Fi RSSI
Received Signal Strength Indicator (RSSI) is defined as the indication of the power level
being received by the antenna of a user. Since this is a relative measure, the higher the
RSSI is the stronger the signal, and vice versa.

Wi-Fi RSSI is the indication of Wi-Fi signal strength captured by a device. Most of the
current work done in positioning systems using Wi-Fi, use RSSI as a benchmark for
comparison.

The advantages of using Wi-Fi RSSI in positioning systems are as follows.

• Easy to implement

• Cost efficient

• Can be used with a number of technologies

• Low hardware requirements

1.6.3.2 BLE RSSI

Fig 1.4 Typical architecture of an iBeacon

BLE can be used with different positioning techniques such as RSSI, AoA and ToF.
However, most of the existing BLE based systems are based on RSS inputs. Therefore, if
BLE in its original form is used in a positioning system, the reliance on RSS based inputs
limits its localization accuracy. However, its range, low cost and low energy consumption
motivate developers to use BLE as a positioning technology.
There are two BLE based protocols; iBeacon (by Apple Inc.) and Eddystone (by Google
Inc.) which are mainly used for proximity-based services.
8
iBeacon protocol allows iBeacon to transmit beacons or signals at periodic interval. The
beacon message consists of a mandatory 16-byte UUID (Universally Unique Identifier)
and optional 2-byte major and minor values. BLE enabled devices, which have
proprietary applications to listen to the beacons can pick up the beacon messages and use
RSSI to estimate the proximity between the iBeacon device and the user. After receiving
an iBeacon message, the device consults a server to identify the action affiliated with the
received beacon. For example to open a door to display some interactive content on a
monitor, based on the user’s proximity to some beacon or another entity. The typical
iBeacon architecture is shown in Fig 1-4
A fundamental constraint of iBeacon is that only the average RSSI value is reported to
the user device every one second, even though the beacons are transmitted at 50ms
intervals. This is to account for the variations in the instantaneous RSS values on the user
device. However, this RSS averaging and reporting delay can impose significant
challenges to real-time localization. [15]

1.6.3.3 Wi Fi CSI
Due to the simplicity and low hardware requirements, most available localization systems
use received signal strength(RSS) as fingerprints. The major disadvantage of this method
is that, RSS values usually have a high variability over the time for a fixed location, due
to the multipath effects in indoor environments. This causes large error in the location
estimation process. It is possible to use Channel State Information (CSI) as fingerprints.
Some Network Interface Cards provide their CSI details. The Intel Wi-Fi link 5300 NIC
provides CSI data from 30 different subcarriers.
Different approaches have been proposed using phase and amplitude of CS data.
• Consider the amplitude responses for fingerprinting
CSI values are stable at fixed positions, but those are varying at adjacent locations and the
multipath effect on CSI values causes various clusters of subcarriers with respect to the
attenuation experienced by the subcarriers. Therefore, pre-processing techniques are used
to generate input values. After the calibration process, in the offline phase, machine
learning approaches can be used to generate clusters for different locations. Another
approach is generating feature-based fingerprints. This utilizes many weights obtained by
deep learning to denote different locations. In the online localization phase, the
9
probabilistic method or the position estimation based on data fusion, which normalizes
the magnitudes of CSI values using weights for different positions to obtain its estimated
location.
• Using the calibrated phase information of CSI
Most of the literature ignored the phase information of CSI data due to the randomness
and the unavailability of the raw phase information. Some of the literature uses phase
information without calibrating while some of them are using linear transformation to
remove the offset of phase information. Then they use deep networks with hidden layers
to train the calibrated phase data and use weights to represent their fingerprints. Greedy
algorithms have been used to reduce the computational overhead. The online stage uses a
probabilistic method (Bayes method) for location estimation.
Some of the approaches incorporate both magnitude and phase information of CSI from
each subcarrier for fingerprinting.
1.6.3.4 Hybrid Systems
Two approaches have been proposed in the literature to combine Wi-Fi and BT into one
positioning system.
1. Employing Scene Analysis for both infrastructure. [1,2,5]
A combined Radio map is created for both Wi-Fi and BT signals at each reference
point in the offline phase and that combined map is utilized in the online phase to
estimate user position.
2. Applying Scene Analysis and Proximity Analysis to Wi-Fi and BT respectively in
one positioning system [3,4]
When Wi-Fi is deployed as the main infrastructure, a limited no of BT Access points are
deployed as add-ons to divide indoor space into disjoint partitions. As a result, the
original, large radio map is divided into small ones which result in reducing the
computation cost of online position estimation.

10
Table 1.2 Comparison of Hybrid Wireless Systems with Wi-Fi and Bluetooth

System Technique Approach Methodology Algorithms used Performance

[1] Wi-Fi - RSSI Wi-Fi APs- RSS K- NN for both The average rate
BT - RSSI Provide Fingerprint the selection of of correct
Fingerprinting Umbrella Data Wi-Fi and estimation of Wi-
Coverage Collection iBeacon AP Fi, iBeacon and
iBeacons - (Noise Hybrid system are
Precisely Filtering) 54%, 72% and
localize the Online 81%respectively.
mobile users phase - The performance
Position is also evaluated
Selection by the running
- Signal time. The
selection averaged
(Wi-Fi & positioning time
iBeacon) of Wi-Fi, iBeacon
and Hybrid
system are 326
ms, 504 ms, and
430 ms
respectively.

[2] Wi-Fi - RSSI Wi-Fi gives offline - Wi Fi - Room "The experimental


Fingerprinting a rough Radio map level accuracy result showed that
BT - RSSI - estimation of All the users by K-NN the BLE
Trilateration the position can use When there are trilateration
BLE mobile 3 positions positioning
estimates the devices as a obtained at the achieved 90%
exact Wi-Fi same period of accuracy within
position of receiver to time, asset can 1.21 m
the asset collect radio be positioned can effectively
When the fingerprints by BLE assist users to
user of all Trilateration locate and track

11
approach the reference assets in a large
asset. points into building"
database.

[3] Wi-Fi RSSI Wi-Fi APs RSSI Fingerprinting Accuracy =


BT RSSI can divide fingerprint based correct data /
the space information algorithm- K- Total data Overall
into different is NN (averaged) correct
sections, and established estimation rate of
iBeacon can after each indoor
accurately removing positioning system
locate where the burst is 0.54 (Wi-Fi),
you are in noises 0.72(iBeacon),
the indoor among all 0.81(Hybrid).
environment RSSIs per
location
and
confining
the RSSIs
by the
direction of
the
smartphone
Predict a
model

[5] Wi-Fi RSSI Information Wi-Fi - PCA The hybrid


BT RSSI of 2 fingerprint transformation method obtaining
localization BT - BLE from the best
systems(Wi- beacon with fingerprint performance is the
Fi, BT) are the strongest database after one fusing BLE
fused signal offline phase with PCA
together Hybrid- and fingerprints and k-
using a priori Estimate communicate it NN matching,

12
information spatial to the mobile which allows to
on their distribution device. Then obtain almost
accuracy of location do either K-NN perfect location
errors in the matching or K- estimation
offline phase means (99.74%) with as
and use it to clustering few as 10
correct principal
estimation. components.

13
1.7 Proposed Solution
The proposed solution mainly consists of three phases. The first phase is collecting Wi-Fi
RSSI data, Wi-Fi CSI data and Bluetooth RSSI data. As the next phase, developing five
different machine learning models.
• Wi-Fi RSSI
• BT RSSI
• Hybrid Wi-Fi and Bluetooth RSSI
• Wi-fi CSI

Final phase of the proposed solution is analysing the models based on the malfunctioning
of access points and system accuracy in static and dynamic environments. Malfunctioning
of access points is further subdivided into the breakdown of Wi-Fi access points, BT
beacons and the analysis of access points that are not in range. The analysis of the system
accuracy in various environments considering environmental changes will be carried
down based on error CDF.

Fig 1.5 Flow Diagram of Proposed Solution

14
1.8 Basic Architecture

Fig 1.6 Basic Architecture of the System

The indoor positioning system with Wi-Fi and Bluetooth has two phases; offline phase
and online phase. At the offline phase, the proposed space will be divided into a grid.
Then, the BLE RSS data and Wi-Fi RSS/CSI data will be collected at each grid point
using existing Wi-Fi access points in the ENTC building and the iBeacons placed.
Collected data will be sent to a server for processing and an optimum machine learning
model will be developed. Then at the online phase, test data (both BLE RSS and Wi-Fi
RSS/CSI) will be collected and fed to a location algorithm. Finally, the estimated location
will be displayed on a web application.

15
Chapter 2
METHODOLOGY

Introduction
This section covers the methods and approaches we have used with respective to the
proposed methodology based on the literature review conducted.

2.1 Data Collection

• Designing a python GUI and Android application to scan for Wi-Fi and BT
fingerprints to collect RSSI data

2.1.1 Python GUI development


A Python GUI was developed to collect Wi-Fi and Bluetooth RSSI readings using the
laptop. This GUI runs on Ubuntu machines since it requires to collect RSSI values from
the internal of the computer. The Python GUI developed is capable of recording a log of
the readings it detects, along with corresponding access point MAC addresses.

Fig 2.1 Python GUI for data collection

16
2.1.2 Android development overview
The mobile application development has several major approaches such as Google
android, apple iPhone, RIM Blackberry and Microsoft Windows 8. Android is a Linux
based operating system. The android systems support rich user interface libraries and
background processing. The applications were developed using Android Studio IDE and
it provides graphical development environment based on the Eclipse IDE to develop
applications. The Android Developer tool (ADT) is a plugin for Eclipse IDE that is
designed to give a powerful integrated environment in which to build android
applications. ADT has capabilities to quickly setup new android projects, debug
applications using Android SDK tools and export .apk files in order to distribute the
application.

17
Android applications are primarily written in Java programming language. The compiled
Java code is compressed with an archive file with a suffix of .apk. this file can be
distributed for installing applications on mobile devices. The android applications use

Fig 2.2 Life cycle of an


Activity

activities as central features because it has rich visual user interface for the user to
undertake. A simplified lifecycle of an Activity is shown in the Fig 2.2.

18
Service has a simple life cycle than activity lifecycle. Generally, an activity can start or
stop a service. Therefore, the service lifecycle can be represented as follows.

Fig 2.3 Life cycle of a service

2.1.2.1 Wi-Fi Scanner


Wi-Fi scanning mobile application was developed for scanning available Wi-Fi access
points and for storing observed data in phone storage. Huawei ALE-L21 phone was used
for debugging purpose. The android application is developed using API 23 Marshmallow
Android 6.
Since Wi-Fi scanner basically scans for available Wi-Fi access points and stores data files
in phone storage, the application needed to enforce permission to Access Wi-Fi state,
change Wi-Fi state and write to external storage from AndroidManifest.xml file for
security reasons.

2.1.2.1.1 Architecture of Wi-Fi Scanner


Using the initialized methods from Mainactivity.java file, Wi-Fi access point data is
extracted. “WiFiManager” object was created using inbuild “WiFiManager” library to
handle all the Wi-Fi based situations. First, in the “onCreate” phase of Activity lifecycle
“WiFiManager” checks whether the phone is Wi-Fi enabled or not. If not, it has given
permission to change the mobile phone’s Wi-Fi state from the manifest.xml file. Then it
scans for Wi-Fi access points. A “BroadcastReceiver” object is registered for getting scan
results of “WiFiManager” during “onReceive” phase. Wi-Fi scan process can be called
19
iteratively until a specified number of scans are covered. All the received results which
consist of the BSSID of each access point and their RSSI value, are stored in an
“ArrayList”. The above results can be obtained from both by launching the app and by
pressing “start Scan” button from user interface if the app is already launched.
The iteration which indicates the current scan number is shown in the user interface.
Therefore, the user can easily identify whether the scanning process is finished or still
going on. After finishing the basic scanning process, the user can provide a file name
relevant to the location and save a text file within the device storage for further usage of
machine learning model creation. The performance flowchart of Wi-Fi Scanner is shown
below.

Fig 2.4 User Interface of Wi-Fi scanner

2.1.2.2 BLE Scanner


The technology used to create a BLE scanner is different from a Wi-Fi scanner. A Wi-Fi
scanner detects access points based on a number of iterations. A BLE scanner waits for a
specified amount of time to detect Bluetooth access points and determines a number of
scans according to the frequency of the same device is been detected. As the Wi-Fi
20
scanner, the BLE scanner also keeps an array list which consist of access point addresses
and RSSI values. That information can be saved with a given name as a text file in device
storage. The basic components and their functionalities are as follows.
1. First, the application obtains permission to access Bluetooth, Bluetooth admin and
to write external storage from AndroidManifest.xml file for security reasons.
2. Broadcast Receiver
“onReceive” method is defined for Broadcast receiver to check and get
information about Bluetooth state (on/ off) of the device.
3. Array Adapter
Array adapter contains an “ArrayList” which consist of detected Bluetooth access
points. The details contain in “ArrayList” are displayed within the user interface
using a “ListView” object.
4. Bluetooth device
A wrapper class is designed for detected Bluetooth devices to behave as objects
where device IDs and its RSSI values can be kept as their attributes.
5. Scanner
The Scanner mainly performs access point detecting tasks within a given time
period. “BluetoothManager” is initialized at the creation of the scanner.
“BluetoothAdapter” which is responsible for scanning activities throughout the
period is created using the “BluetoothManager”. A “Handler” object is created for
initializing threads for executing different disjoint tasks.
“scanDevice” method is defined inside the Scanner for searching the BLE devices.
A new thread is initialized to detect available access points using the “Handle”
object inside the method. The thread will be executed throughout a specified time
period. Whenever an access point is detected, the thread will call to a callback
function. A new thread is created within the callback function to add the device
into the “ArrayList”. Keeping records of the detected devices was very important
because, those were the data we were going to use for creating machine learning
models. A hash map was used to store the data from a single scan and an
“ArrayList” was used for keeping all the records.

21
Finally, when the specified time is finished, the thread will die, Bluetooth
scanning process will be stopped. Then the application is again available for a new
scan.
6. Main activity
The Main activity clearly defines the basic flow and its phases of the application.
“onCreate” phase performs several activities. First, it checks whether the phone is
BLE capable. The app will be terminated if the device is not BLE supported.
Broadcast Receiver, Scanner, “ArrayList” and Hash map are initialized at the
“onCreate” phase. Also, the Array adapter will update the user interface according
to the changes of access points. “onClick” activity is defined here which will
provide options for saving a text file with the scanned data within the phone
storage whenever, the scan period is finished.
“onStart” phase registers the Broadcast Receiver. “onStop” phase unregisters the
Broadcast Receiver. Therefore, these two phases deal with the Bluetooth state of
the device.
“onClick” activity is defined for starting BLE scan whenever the “Scan” button is
pressed, if the scanner is not in the scanning state.

7. Save as text file


This function is called at the “onCreate” phase of main Activity. Whenever it is
called, it accesses the device storage and saves a text file which consist of a device
MAC addresses and their RSSI values. After saving the file, the application is
open to start a new scan.
Fig 2-0.5 Performance of a BLE scanner

22
Fig 2.5 Performance of a BLE scanner
23
The above components altogether provide BLE scanning functionality. The basic
scanning process is as follows.

Fig 2.6 Use Interface of BLE scanner

2.2 Radio map Creation


First the data was collected offline. The typical Wi-Fi scans taken using Homedale
desktop application with the Dell Inspiron 15 laptop, Wi-Fi scanner and BLE scanner
android application. The collected Wi-Fi data consists of the RSSI value and the mac
address of the Wi-Fi router. Each Wi-Fi scan consists of 11 RSSI values from 11 different
routers.

Place Number of Classes Data per Class


ENTC1 108 100
Common Area 13 120
Computer Lab 30 120

24
The above table shows the RSSI data of the access point at various reference locations. In
addition, a number of positions in each place and number of Wi-FI scans in each
reference location. The laptop with the Wi-FI adapter wirelessly obtains the MAC address
and RSSI value of the AP at various locations.
Let 𝑃(𝛼) represents the matrix of RSSI values measured from different APs at reference
point α.
𝑅𝑆𝑆𝐼1,1 ⋯ 𝑅𝑆𝑆𝐼1,𝑁
𝑃(𝛼) = [ ⋮ ⋱ ⋮ ]
𝑅𝑆𝑆𝐼𝑀,1 ⋯ 𝑅𝑆𝑆𝐼𝑀,𝑁
M represents the number of Wi-Fi scans at reference point α and N is the total number of
available access points. After selecting APs which covers all three places, RSS time series
are measured from each AP at each RP, which is utilized to create the location fingerprint
database. After the completion of the fingerprint collection, different machine learning
classification algorithms were used to predict the position. But the accuracies are not up
to the expected level with the raw data. As a solution, we implemented an outlier removal
mechanism to increase accuracy. After choosing most suitable algorithm, analysis of
access point breaks down has been performed. Fig 2.14 shows the overall hierarchy of the
proposed system. First analyse the raw data using different machine learning algorithms.
After choosing the most suitable one anomaly detection technique was used to remove the
noise in the radio map. Finally, room level classification and breakdown analysis were
done.

25

Fig 2.7 Breakdown Analysis


2.3 Positioning using Wi- Fi RSSI only

2.2.1 Data Preprocessing


In indoor wireless systems, data preprocessing is important due to external factors like
noise, multipath propagation etc. This also affects for the accuracy of the position
estimation from the algorithms designed. The following filters were used for
preprocessing of Wi-Fi RSSI
• Mean Filtering
This is a widely used linear filtering method which gives the average of the signal
strengths collected over fixed no of scans.
• Median Filtering
This is a nonlinear, low pass filter which can be used to remove outliers in the RSSI
values collected.
• Kalman Filtering
Kalman filtering has been used for signal and data filtering in different fields. It is an
iterative process that uses a set of equations and consecutive data inputs to quickly
estimate the true value when measured values contain unpredicted, random error,
uncertainty or variation. This algorithm involves Kalman gain, updated estimate and error
in estimate calculation. [16]
In Kalman filtering, it is essential to find out the measurement noise with reference to the
variation of signal strength obtained from training data. Process noise should be decided
based on the entire system error which is generally smaller.
The following filters were implemented in Python and used for data preprocessing.
Filtered data was obtained with the window size of 10 consecutive scans from a fixed
position.
Kalman filter was also used for estimation filtering in our project.
• Position Estimation filtering using Kalman filtering
In this approach, for 10 consecutive scans from a fixed position, 10 position estimates are
calculated from the model created during the offline phase. Then for those 10 positional
estimates, Kalman filtering is applied. In this case, measurement noise is decided based

26
on the mean squared error of the machine learning model which was trained from raw
data.

2.2.2 Outlier Detection

Fig 2.8 Outlier detection algorithm

The outlier detection system based on clustering algorithms and dimension reduction
technique. Collected dataset consists of 11 features, which can be considered as high
dimension. Moreover, the dataset has a sparse distribution over the high dimensional
space. Since clustering is based on the distance between two data points we used
dimension reduction such as PCA to prepare data for outlier detection using clustering.
The PCA applied on the power values which are converted from RSSI values in the
dataset.
Principle Component Analysis is mainly used in an unsupervised manner and use to
detect the inherent structure of data. In addition, it uses to reduce the dimensionality in
feature space which contains most of the information in a larger set. Each feature of input
data represents one dimension in feature space. PCA is transforming these correlated
features into an uncorrelated variable set. The first principal component accounts for as
much of the variance in the data as possible, and each succeeding component accounts for
as much of the remaining variance as possible.

27

Fig 2.9 3D depiction of outlier


Fig 2.10 Removal of Outliers

The next step was clustering using K means algorithm. K means aims to partition n
samples into k clusters and each observation belongs to the cluster which has nearest
mean. As shown in the Fig , all identified outliers were removed from the data set. Then
different classification algorithms were performed for the outlier removed dataset.

2.4 Analysis of malfunctioning access points

• Analysis on the impact of the malfunctioning of Access points on the


accuracy of the system.
When a model is created using the existing access points (AP), to achieve the accuracy
we expect, it is essential to have all the access points working properly. If one of the key
access points breakdown, there is a higher probability of estimating the position with a
higher error margin. The malfunctioning of Wi-Fi access points is not under our control.
At the same time, when we are designing a positioning system, we want it to be
applicable for a longer period. Therefore, it is essential to detect when an AP is not
working properly and make necessary changes accordingly.
We are analyzing the above-mentioned issue with 2 different approaches.
Approach 1
The following procedure is to be followed with the approach 1
• Based on the room level classification, key APs are detected analyzing
the impact of the malfunctioning of different APs on the accuracy of
the positioning system
• In the estimating phase, Malfunctioned APs are detected if a key AP of
a respective room is not working for 10 consecutive scans

28
• In the self-correcting system, the position estimation model is rebuilt
without considering the malfunctioning AP
Similar approach has been presented in the literature using Random Forest algorithm
[17]. However, they have applied the self-correcting algorithm to the complete model.
We are proposing a method to apply the self-correcting algorithm only for relevant radio
maps based on the room level classification.
When room level classification is done, we can only focus on a sub section of the radio
map without considering the entire radio map when the online fingerprints are matched
with offline fingerprints included in the radio map. This also reduces the complexity of
the positioning system without comprising the accuracy.

2.5 Positioning using Bluetooth RSSI only


Signal propagation in indoor environment is complex due to interference, environmental
noise, multipath fading, signal reflection properties, floor plan, building structure etc...
Therefore, the area from which a beacon is visible is very irregular. We developed a
simple, novel solution for beacon placement by efficiently using a beacon coverage
matrix.
Bluetooth positioning differs from Wi-Fi positioning because in Wi-Fi, the existing
access points were considered. Since we used existing Wi-Fi infrastructure in the
university, we did not have the controllability of wi-fi access points, but in Bluetooth we
have the controllability of Bluetooth beacon placement since, we were targeting the best
locations for beacon placement.
Several algorithms were found for beacon placement which were done by researchers
from the literature review. Since they are using specific software and complex processing
techniques for analyzing the beacon coverage and since we had several restrictions for
beacon placement, we ended up with a simple algorithm which can be implemented using
MATLAB.
First, we placed a single beacon and measured the RSSI with the distance. Measurements
were taken cell by cell considering a grid of size 11*15 which has a cell size of
60cm*60cm. using the measured data a coverage map was generated by giving a weight
to each cell considering the received power level. The RSSI value (in Dbm) was

29
converted into its received power (in mW) and scaled to assign a weight for each level.
The variability of the measured data was very high as shown in the table.
The coverage map was generated as follows.
The Table 3 shows the calculated mean RSSI values at each cell point considering 10
scans and the variances at each cell.
Table 2.1 Observed RSSI values 60
cm
-82.83 -79.45 -78.32 -77.51 -76.83 -74.54 -72.67 -80.55 -72.96 -79.54 -77.03 -77.98 -78.23 -81.75 -83.26
3.01 2.64 3.9 3.28 4.01 2.66 1.09 3.65 1.25 3.94 3.53 3.52 2.49 1.76 2.47 60 cm
-84.56 -77.96 -79.56 -76.52 -76.95 -70.27 -70.79 -77.56 -74.38 -71.19 -79.83 -75.81 -77.46 -79.18 -84.27
2.83 1.26 4.2 3.15 3.56 1.95 2.87 3.8 3.56 1.06 2.12 4.25 2.48 3.77 1.79

-81.46 -79.84 -78.36 -77.3 -77.3 -72.68 -69.18 -72.98 -74.48 -72.0 -74.81 -75.4 -76.8 -78.94 -81.84
2.41 3.7 3.5 2.34 4.07 3.0 3.66 2.46 2.62 1.11 2.86 2.16 1.48 1.76 2.53
-82.65 -79.78 -76.9 -75.55 -78.4 -74.3 -78.4 -79.33 -78.51 -74.0 -74.83 -75.89 -75.55 -79.77 -82.71
1.45 2.74 3.06 1.83 1.99 2.75 3.25 2.61 2.32 2.45 2.71 2.37 3.15 2.76 2.4
-85.12 -81.49 -75.84 -78.22 -75.4 -76.86 -76.7 -75.39 -75.76 -77.74 -76.17 -76.34 -78.3 -78.13 -83.74
2.13 3.29 2.47 3.2 2.63 3.64 3.52 3.29 3.87 2.95 2.65 4.69 2.06 1.88 2.81
-82.43 -84.72 -79.6 -78.66 -79.0 -78.53 -82.5 -81.31 -79.8 -82.27 -78.53 -78.31 -79.78 -84.3 -85.7
3.11 2.39 4.28 3.94 4.73 2.91 4.0 4.27 1.22 4.58 4.21 2.16 3.67 4.37 3.2
-85.59 -84.28 -82.64 -80.8 -79.5 -80.75 -82.58 -77.25 -79.27 -82.43 -77.64 -81.7 -83.64 -81.2 -84.9
1.28 1.6 3.47 2.85 2.01 1.88 1.32 4.29 2.38 1.66 2.72 4.3 3.77 2.4 1.98
-85.37 -82.46 -80.79 -77.93 -78.44 -78.66 -82.79 -79.19 -78.64 -79.86 -79.1 -78.37 -81.94 -80.76 -83.17
2.04 1.83 3.58 2.87 2.27 3.43 2.1 2.19 3.77 4.0 2.24 1.7 3.65 2.84 1.97

-84.36 -82.19 -80.73 -85.29 -77.48 -78.76 -77.35 -85.01 -85.78 -82.03 -82.95 -80.78 -83.28 -83.91 -85.21
1.58 3.24 2.16 1.33 1.88 3.61 1.06 2.33 1.89 3.63 3.38 2.87 3.77 2.84 2.57

-84.95 -83.74 -82.61 -80.35 -82.49 -81.7 -83.49 -85.75 -84.9 -81.47 -80.57 -83.69 -85.9 -81.76 -84.6
2.76 3.1 4.16 3.4 1.42 2.73 3.09 2.81 3.27 1.75 2.83 2.79 3.43 2.82 1.3

-85.1 -83.45 -81.34 -84.27 -82.76 -85.98 -83.76 -84.19 -82.47 -82.67 -82.76 -84.9 -81.16 -85.43 -83.74
2.1 2.46 3.28 3.17 2.03 2.49 3.25 2.9 3.07 2.56 1.93 2.31 1.28 1.76 2.15

1. RSSI value at each cell (in dBm) was converted into linear power level in
milliwatt (mW).
𝑃𝑜𝑤𝑒𝑟 (𝑚𝑊)
𝑅𝑆𝑆𝐼 (𝑑𝐵𝑚) = 10 log10
1 𝑚𝑊
2. A weight is assigned for each power level as shown in the Table 4.

30
Table 2.2 Power level to Weight conversion

Power in mW Weight on coverage map


10-9 – 10-8 1
10-8 – 10-7 2
10-7 – 10-6 3
10-6 – 10-5 4
… …
3. The coverage map was generated by applying a weight for each cell

Fig 2.11 Actual Coverage Map

Since we wanted a generalized coverage map which can be applied for any beacon for
analyzing the coverage of floor map, first we generated a coverage map for free space.
Since it highly deviated with the observed coverage map, we generated an approximate
coverage map by considering the path loss component (n)
𝑑
𝑅𝑆𝑆𝐼(𝑑) = 𝑅𝑆𝑆𝐼(𝑑0 ) + 10𝑛 log 𝑑 where, 𝑑0 = 1𝑚
0

31
Measured RSSI values of grid size 11*15 were fitted into a linear regression line which
minimizes the least square error in order to calculate the path loss component. The

Fig 2.62 Calculation of path loss Component

concluded path loss component (n) in our scenario is obtained as 3.25 and RSSI at 1m
distance is obtained as -76.42 Dbm according to the Fig .
Table 2.3 Path loss exponents for different environments

Then, the approximated RSSI values were calculated at same cell locations by
considering the calculated path loss component and generated an approximate beacon
coverage map for a single beacon.

32
Fig 2.13 Approximated coverage map

The necessity of a generalized beacon coverage map was coming up because, the
variability of Bluetooth signals differs from beacon to beacon. When the observed and
approximated coverage maps are compared, it can be seen that the coverage distribution
of the observed map can be approximated to the distribution of a calculated one. Since we
were going to introduce a better beacon placement algorithm, the generalized
approximated coverage map was used as the main entity for checking the signal coverage
of a selected building.

• Calculating minimum possible distance between two beacons to avoid


interference
The required minimum distance between two beacons was calculated to avoid the
interference between beacons. For that a single beacon was kept steady and varied the
distance of another beacon and measured the RSSI value of a selected fixed position.
Then the distance where the variability of RSSI was minimized was taken as the
minimum required distance between the two beacons and it is observed as 200cm.
Beacon placement started from the computer lab which has a rectangular shape. The lab
was divided into a grid of size 16*20 which has the same cell size as the coverage matrix.

2.3.1 Placement Algorithm

• Divide the lab into a grid and initialize all the cell values as 0.
• Select distances between two beacons which is greater than 200cm (both
horizontally and vertically) and start placing beacons from a corner of a wall.
• The placement height was selected as 2m which exceeds the height of an average
man a little bit
33
• Place beacons using the placement algorithm in both symmetrically and
asymmetrically by varying horizontal and vertical distances between beacons.
• While placing, each cell value accumulates with the value of overlapped cell from
the coverage map.
• Optimum beacon placement configuration is selected in order to maximize the
beacon coverage with a limited number of beacons.
• Compare the accuracy of rejected configurations the with same number of
beacons with the selected configuration.
• Verify the selected configuration as the best configuration.

2.3.2 Selected configuration

Fig 2.14 Final beacon placement


configuration

Fig 2.16 Approximated heatmap of selected configuration


Fig 2.157 Actual heatmap of selected configuration

34
Chapter 3
3. RESULTS
This section covers the results obtained from the following different experiments
discussed in the Methodology section. The results are analysed based on Wi-Fi RSSI
system and Bluetooth RSSI system

3.1 Wi-Fi RSSI system


The results we obtained from filtering data, creating models, training data, testing data
and carrying out the analysis are presented.

3.1.1 Data filtering


The impact of different filtering techniques on the position estimation accuracy is shown
in the diagram below.
ENTC 1 – With the Regression Model

Fig 3.1 Cumulative Distribution Function (CDF) of positional


error with different filtering techniques

35
Classification accuracy of different section (classes) in the Common Room and Computer
Lab also increases with a higher margin with the filtering of raw data.
This shows that data preprocessing improves the accuracy of the positioning system
reducing the impact of the variation of signal strengths.
The impact of applying Kalman filtering for position estimation is well depicted from the
improvement of the positional estimation as shown in the diagram below.

Fig 3.2 Impact of applying post filtering techniques

Datasets were collected from ENTC1 and the Common room to perform localization
using finger printing method. Approaches for localization are mainly two-fold and can be
categorized as classification models and regression models. After considering the uniform
geometry, ENTC1 dataset was selected for the experiments and kept other datasets for the
validation purposes. At the beginning, experiments were conducted using raw data from
APs for classification approach. Support Vector Machine (SVM) and Artificial Neural
Network (ANN) were used as supervised classifiers and KNN, K-means clustering were
used as unsupervised cluster-based classifiers for the experiments. However,
classifications accuracies are not up to the expected level and implemented an outlier
detection as a data pre-processing method to enhance the accuracies of models. Outlier
detection was done based on a clustering approach using K-means algorithm. Since the
input data was high dimensional, Principal Component Analysis (PCA) was applied to the
inputs, which are converted from decibel scale to the linear scale to reduce dimensionality
to prevent from curse of dimensionality effect. Thereafter, K-means clustering was
applied, the outliers were detected and filtered out those detected outliers from the data

36
set. This dataset was again used in the classification stage and accuracy was improved as
expected.

Table 3.1 Accuracies of corresponding models

Accuracy (With
Accuracy (Without Outlier
Model Outlier
Detection)
Detection)

ANN 88.81% 89.49%

KNN -3 89.19% 90.09%

SVM 96% 100%

3.1.3 Immunity to Malfunctioning of Access Points


Immunity to the breakdown of Access points can be improved by introducing self-
correcting approaches into the positioning system. By the results we obtained, it was clear
that a breakdown of a key AP has a huge impact on the accuracy of the system. The
adjustments and approaches we came up with, look promising for the accuracy
improvement with an added complexity to the system.
We applied Random Forest and K-Nearest Neighbor (K-NN) regression algorithms to the
filtered training data and the impact of malfunctioning of APs and the self-correcting
algorithm were studied. The diagrams below show the performance of the positioning
system under different conditions and modifications applied to the indoor positioning
system.

37
With Random Forest Regressor

Fig 3.3 Impact of self correcting algorithm for malfunctioning of Access Points

With K-NN Regressor ( N=3)

38
Fig 3.4 Impact when KNN is used

3.2 Bluetooth RSSI System


In the BT RSSI system, we considered about coming up with a simple beacon placement
algorithm. This section covers the verification of the algorithm and the results obtained
with respect to positioning accuracy.
3.2.1 Bluetooth Placement Verification
As explained in the Methodology section, we collected BT RSSI data from BLE RSSI
recording mobile application placing beacons in different configurations. The table below
shows the positioning accuracy of classifying 9 different classes(tables) in the Computer
Lab using only BT RSSI.
Table 3.2 Accuracy comparison of different configurations

Algorithm Random Forest KNN


Config 1 0.892 0.903
Config 2 0.635 0.622
Config 3 0.824 0.764
Config 4 0.811 0.784
Config 5 0.926 0.885
Config 6 0.892 0.905
Config 7 0.885 0.878

According to the selected configuration the whole computer lab was able to cover using
four beacons. The accuracy verification table shows the accuracies of Random Forest and

39
K-nearest-neighbor models for the configurations generated from the algorithm which has
exactly four beacons. Only the configurations which has four beacons were compared for
accuracy because, by increasing the number of beacons, the accuracy will inherently
increase and by decreasing the number of beacons the accuracy will inherently decrease.
We found seven symmetrical and asymmetrical beacon configurations from the
algorithm, each provide different positions for beacons. As described in the placement
algorithm, the best configuration for beacon placement was chosen by the algorithm by
considering the maximum coverage with minimum number of beacons which minimizes
the interference between them. The verification table proves that the selected
configuration (Config 6) provide higher positioning accuracy than the rejected ones.

40
Chapter 4
4. DISCUSSIONS AND CONCLUSION

4.1 Discussion
With the results we have obtained so far, it is clear that raw data should be pre-processed
to eliminate the effect of environmental noise to a certain extent for both the Wi-Fi RSSI
system and BT RSSI system. Both the data filtering techniques and outlier detection
approach has proved to be applicable for improving the performance of the indoor
positioning system.
The analysis carried down based on the malfunctioning of access points and the self-
correcting algorithm with the detection of AP breakdown have given substantial
improvements to the performance of the system in unexpected scenarios.
We used existing Wi-Fi infrastructure for the positioning purpose. So we do not have
controllability over them. With the BT placement algorithm employed, we can add
controllability to the hybrid positioning system with the use of good features of both Wi-
Fi and BT systems.

Conclusion
We have considered about Wi-Fi and BT positioning systems separately deciding the
optimum placements for BT beacons. We have also analyzed the performance of the
system under different considerations such as malfunctioning of APs.
We are planning to complete the following tasks in the future.
• Studying about Channel State Information (CSI) of Wi-Fi and positioning models
using CSI
• Combining Wi-Fi RSSI and BT RSSI and coming up with a hybrid model for
wireless positioning
• Carrying out further analysis on the system performance considering the
malfunctioning of Access points, environmental changes, device diversity in the
receiving device used for positioning
• Developing a mobile application to predict the location in the online phase.
41
BIBLIOGRAPHICAL REFERENCES

[1] S. Y. Bai, C. C. Chiu, J. C. Hsu and J.S.Leu, "Campus-wide wireless indoor


positioning with hybrid iBeacon and Wi-Fi system," 2017 6th International Symposium
on Next Generation Electronics (ISNE), Keelung, 2017, pp. 1-2
[2] C. H. Kao, R. S. Hsiao, T. X. Chen, P. S. Chen and M. J. Pan, "A hybrid indoor
positioning for asset tracking using Bluetooth low energy and Wi-Fi," 2017 IEEE
International Conference on Consumer Electronics - Taiwan (ICCE-TW), Taipei, 2017,
pp. 63-64
[3] C. C. Chiu, J. C. Hsu and J. S. Leu, "Implementation and analysis of Hybrid Wireless
Indoor Positioning with iBeacon and Wi-Fi," 2016 8th International Congress on Ultra
Modern Telecommunications and Control Systems and Workshops (ICUMT), Lisbon,
2016, pp. 80-84.
[4] A. Baniukevic, C. S. Jensen and H. Lu, "Hybrid Indoor Positioning with Wi-Fi and
Bluetooth: Architecture and Performance,"2013 IEEE 14th International Conference on
Mobile Data Management, Milan, 2013, pp. 207-216K.
[5] K. Antevski, A. E. C. Redondi and R. Pitic, "A hybrid BLE and Wi-Fi localization
system for the creation of study groups in smart libraries," 2016 9th IFIP Wireless and
Mobile Networking Conference (WMNC), Colmar, 2016, pp. 41-48
[6]L. Zhao, H. Wang, P. Li and J. Liu, "An improved Wi-FI indoor localization method
combining channel state information and received signal strength," 2017 36th Chinese
Control Conference (CCC), Dalian, 2017, pp. 8964-8969.
[7] X. Wang, X. Wang and S. Mao, "ResLoc: Deep residual sharing learning for indoor
localization with CSI tensors," 2017 IEEE 28th Annual International Symposium on
Personal, Indoor, and Mobile Radio Communications (PIMRC), Montreal, QC, 2017, pp.
1-6.
[8] X. Wang, L. Gao, S. Mao and S. Pandey, "DeepFi: Deep learning for indoor
fingerprinting using channel state information," 2015 IEEE Wireless Communications
and Networking Conference (WCNC), New Orleans, LA, 2015, pp. 1666-1671.

42
[9] Y. Xie, Y. Wang, A. Nallanathan and L. Wang, "An Improved K-Nearest-Neighbor
Indoor Localization Method Based on Spearman Distance," in IEEE Signal Processing
Letters, vol. 23, no. 3, pp. 351-355, March 2016.
[10] Y. Xie, Y. Wang, A. Nallanathan and L. Wang, "An Improved K-Nearest-Neighbor
Indoor Localization Method Based on Spearman Distance," in IEEE Signal Processing
Letters, vol. 23, no. 3, pp. 351-355, March 2016.
[11] I. Gorovyi, A. Roenko, A. Pitertsev, I. Chervonyak and V. Vovk, "Real-time system
for indoor user localization an navigation using bluetooth beacons," 2017 IEEE First
Ukraine Conference on Electrical and Computer Engineering (UKRCON), Kiev, 2017,
pp. 1025-1030.
[12] S. S. Chawathe, "Beacon Placement for Indoor Localization using Bluetooth," 2008
11th International IEEE Conference on Intelligent Transportation Systems, Beijing, 2008,
pp. 980-985.
[13] S. P. Subramanian, J. Sommer, F. P. Zeh, S. Schmitt and W. Rosenstiel, "PBIL PDR
for scalable Bluetooth Indoor Localization," 2009 Third International Conference on Next
Generation Mobile Applications, Services and Technologies, Cardiff, Wales, 2009, pp.
170-175.
[14] P. K. Yoon, S. Zihajehzadeh, B. S. Kang and E. J. Park, "Adaptive Kalman filter for
indoor localization using Bluetooth Low Energy and inertial measurement unit," 2015
37th Annual International Conference of the IEEE Engineering in Medicine and Biology
Society (EMBC), Milan, 2015, pp. 825-828.
[15] F. Zafari, A. Gkelias, and K. K. Leung, “A Survey of Indoor Localization Systems
and Technologies”, arXiv:1709.01015, 2017
[16] Online Reference - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5461075/
[17] G ́orak, R., Luckner, M., "Malfunction immune wi-fi localisation method"
In:Computational Collective Intelligence, Lecture Notes in Computer Science, vol. 9329,
pp.328–337. Springer International Publishing (2015)

43

You might also like