Indoor/Outdoor Switching Algorithm Based on Wi-Fi

2014 International Conference on Indoor Positioning and Indoor Navigation, 27th-30th October 2014
Indoor/Outdoor Switching Algorithm
Based on Wi-Fi Receive Signal Strength and GPS
Nattakorn Saengwongwanichࢾ, XIU Chundi
and WENG Jingnong
ࢾ
Master Program of Space Technology and Application,
School of Electronics and Information Engineering
Beihang University, Beijing, P.R.China.
Email: [email protected], [email protected],
[email protected]
Abstract— Nowadays, buildings are extremely close to each
other, so it is very difficult to estimate the position if the user
walks between indoor and outdoor areas. Thus, providing an
anytime and anywhere positioning system plays an important
role in the seamless positioning. From recent researches, two
methods are commonly used for accurately determining the
position of the user, which are indoor and outdoor positioning.
Although Global Positioning System (GPS) is a very stable
system for outdoor positioning, it does not perform very well for
indoor environment. On the other hand, indoor positioning
system based on Wi-Fi Receive Signal Strength Indicator (RSSI)
has been used to assist GPS to solve the problem mentioned
above. Anyway, both systems have problem with signal
propagation due to Non-Line of Sight (NLOS) and multipath,
therefore, to estimate the accurate indoor and urban
environment, GPS and Wi-Fi cannot be used individually. Hence,
using both systems together is necessary for the future. In this
research, we proposed the seamless indoor/outdoor positioning
system based on Wi-Fi fingerprint technique for switching. The
matching algorithm based on k-Nearest Neighbor and Gaussian
Probability density function was applied to estimate user
positions between fingerprint database system and the real-time
RSSI value, after that the data fusion with the position from GPS
receiver, which is able to increase the accuracy and robustness to
noise of switching process. Moreover, this system works well on
the modern mobile smartphone, which is very convenient and
with low cost. The performance of our simple algorithm was
evaluated by the experimental results, which showed that our
proposed scheme could achieve a certain level of the switching
process accuracy.
Keywords— Indoor/Outdoor Seamless Positioning; Global
Positioning System; Wi-Fi fingerprint technique; Matching
algorithm; Received Signal Strength Indicator
I.
INTRODUCTION
Global Positioning System (GPS) is a satellite position
system developed by the U.S. government [1] and has been
widely applied all around the world. GPS is widely used for
positioning and navigation [2]. GPS allows user to determine
their position and velocity. GPS is a very stable system for
outdoor positioning. However, it is probably that signals from
satellites are not strong enough to estimate position in the
building, especially in tall buildings because GPS signal can
be easily blocked or disturbed by obstacles [3]. It is known
that a receiver need to observe signal from at least four GPS
Pisit Boonsrimuang
Department of Telecommunication Engineering
King Mongkut’s Institute of Technology Ladkrabang
Bangkok, Thailand
Email: [email protected]
satellites in order to calculate the user position in three
dimensional (3D). Moreover, GPS is not designed for indoor
applications and does not perform very well for indoor areas
or even in dense urban areas.
Currently, Wi-Fi is a communication standard defined by
the IEEE802.11 [4] and IEEE802.11 wireless network makes
the technology ideal for developing such as location system.
Not only Wi-Fi signal is used for communication but also the
characteristics of radio signal. Two most commonly used
methods for indoor positioning system are Triangular method
and Wi-Fi Fingerprint method [5],[6]. First, Triangular
method is a very well- known signal propagation approach. It
uses geometric properties of triangle to estimate the human
position. Second, Wi-Fi Fingerprint technique uses
information from surveyed RSSI value. It is divided into two
phases, training phase (offline phase) and positioning phase
(online phase). In offline phase, fingerprint database with
known location coordinates will be obtained. In online phase,
Wi-Fi device performs a scan of the environment. The radio
frequency map or Fingerprint map is built depending on the
sample location coordinates. Matching algorithms, for
example, k-Nearest Neighbor (k-NN), Support Vector
Machine (SVM) [7], are used to estimate the user position by
using mobile phone and calculating Euclidean distance
between Fingerprint database and RSSI value, RSSI
measurement is used to calculate the distance between the
position of the user position and Wi-Fi Access Points (APs)
[8].
Many researchers used the combination of GPS and Wi-Fi
positioning techniques by using Wireless Local Area Network
(WLAN) to achieve the accurate coordinates in indoor
environment [9]. Currently, varieties of Wireless Technology
are applied forindoor position systems. In this paper, we used
Wi-Fi Fingerprint technique because noise is included in the
environment, which could make the results more reliable.
In this paper, we propose the indoor/outdoor switching by
using GPS and Wi-Fi Fingerprint technique based on Gaussian
probability classification algorithm and k-NN algorithm. GPS
was used for outdoor environment and Wi-Fi fingerprint was
used for indoor environment. This paper focuses on the
2014 International Conference on Indoor Positioning and Indoor Navigation, 27th-30th October 2014
seamless indoor/outdoor switching to estimate the user
position in which building the user is at that time.
The remaining sections of this paper are as follow: In
section II, we describe the system model of the propagation
model to estimate user’s position, the coordinate system to use
with survey map and the Wi-Fi fingerprint technique. Section
III introduces the Matching algorithm (k-Nearest Neighbor
and Gaussian Probability Density function). Section IV
presents the experiment results and the last section is the
conclusion of this paper.
II.
SYSTEM MODEL
This system is separated into two parts, outdoor and indoor
part. GPS is used for outdoor part and Wi-Fi APs is used for
indoor part as shown in Fig.1.
this paper, we used the Earth –Centered, Earth-Fixed (ECEF)
that used three-dimensional XYZ coordinates (in meters) to
estimate the location of the user. The origin of the axis (0,0,0)
is located at the reference point. Beihang University, Beijing,
China was chosen as the testing area in this research for
collecting data from mobile smartphone.
In order to use data with the surveys map, latitude and
longitude from Google map must be first converted, then
subtract with the value of ECEF at the origin (0,0,0). So we
get the ECEF value. Fig.1 shows the user walk route, data
collected from GPS using mobile phone and then use
coordinate system to use with surveyed map and the Wi-Fi
APs propagation signal by using logarithm distance path loss
model from (1) shown in Fig.2.
Fig.1: Block diagram of Wi-Fi fingerprint technique
(a) User walk route
A. Radio propagation model
Human position can be estimated by the distribution of the
radio signal from Wi-Fi APs. Due to the characteristic of
signal, which it gradually decreases according to distance
between transmitter and receiver so RSSI value with path loss
model is measured. Path loss model is commonly used in
signal propagation and wireless communications. Path loss
model equation is formed by using the function of logarithm
distance.
In this paper, we used the path loss model to estimate the
user’s position which is as follow:
d Pr (dB ) Pd0 (dBm) 10n log10 wallLoss
d0 (1)
Where Pr represents the power receiver in decibels (dB), Pd0 is
the received power at reference distance or initial RSSI value
at the 1st meter distance, n is path loss exponent. The value of
n is not the same in different environment, d and d0 are the
breakpoint distance and the Euclidean distance between
transmitter and receiver respectively. Anyway wallLoss is a
significant problem in the signal propagation model for the
building due to the installation of each AP has attenuation of
the signal when the signal encounters an obstacle.
B. Coordinate System
A geographic coordinate system is a three dimensional
reference system that locates point on the Earth’s surface. In
(b) Wi-Fi signal propagation
Fig.2: The Simulation of Wi-Fi signal propagation from each
access points depending on the user walk route.
C. Wi-Fi Fingerprint Technique
The Wi-Fi Fingerprint technique used for calculating
location of the user, by a combination of geographical
coordinates and RSSI value received from several Wi-Fi APs.
Hence, the Wi-Fi fingerprint technique consists of two main
phases: training phase (offline phase) and positioning phase
(online phase).
In training phase, radio map is created as the positioning
coordinates of measuring point, at each specific position and
the signal strength data from different APs are collected at
each reference point.
Positioning phase is used after user collected the signal
strength data at the measuring points, the collected data is
matched with the radio map as the positioning coordinates of
measuring point to find the possible position.
III.
MATCHING ALGORITHM
In this paper, k-NN and Gaussian pdf were used as
matching algorithms due to its simplicity.
A. k-Nearest Neighbor
The k-Nearest Neighbors (k-NN) algorithm is the one of
the most popular classification rule. k-NN is a nonparametric
method for classifying K neighbor closet between classes of
training samples and measure RSSI points based on Euclidean
2014 International Conference on Indoor Positioning and Indoor Navigation, 27th-30th October 2014
distance. The shortest Euclidean distance between two inputs
must be defined prior to classifying for K neighbor closet.
Assume that (1) offline radio frequency map; the location of
radio frequency vector collected from Access Points is
߮={߮1,߮2,߮3,…,߮݊}, and (2) online RSSI values collected
from APs at a certain position is ߜ={ߜ1,ߜ2,ߜ3,…,ߜܰ}, and the
number of cut-off area is ݅=1,2,3,…,݊. The Euclidean distance
between these two vectors (߮ and ߜ) is computed by the
following equation:
d i i n
(
i
)2
(2)
i 1
When all of the distance between two vectors (߮ and ߜ) based
on Euclidean distance are calculated, we will get the nearest
distance (D) among all of radio frequency map that can be
used to estimate the user position, which the vector of nearest
distance (D) can be defined as:
D di i n
(
i
)2
IV.
EXPERIMENTAL RESULTS
The testing area is Beihang University, with area of
330m×90m as shown in Fig 3. The fingerprint cut-off area is
3m×3m, total fingerprint labels are 3,300 channels and the
sampling period ǻt=1sec. The initial RSSI value at 1st meter in
(1), we used Pd0 = 3dBm. The path loss exponent of this
system, we used n=3. We assumed that wallLoss is the normal
random variables with zero mean and variance N(0, 2) and to
set-up position of Wi-Fi APs, “WirelessMon”, the program
can show how far the Wi-Fi signal can propagate. In this
paper, each AP used in this research can propagate signal
approximately 20 m. The APs are placed at the entrance of
each building with overall 10 APs in 10 buildings.
(3)
i 1
Fig.3: Test area
B. Gaussian probability density function
Gaussian probability density function (Gaussian pdf) is
widely used in pattern recognition due to its mathematical
tractability and central limit theorem, which the pdf of the sum
of a number of independent random variables tends to infinity,
as well as the Gaussian. The multidimensional Gaussian pdf
can be defined as:
p(x) 1
1
2
(2 ) s
1
2
1
exp( (x m)T S 1 (s m))
2
(4)
where m = E[x] is the mean vector, S is the covariance
matrix defined as S=E[(x−m)(x −m)T ], |S| is the determinant
of S.
Gaussian pdf is often referred to normal pdf and we use the
notation N(m,S). For the 1-dimensional case, x ‫ א‬R, the
probability density function of gaussian is defined as:
1
p(x) 2
exp(
(x m)2
)
2 2
(5)
Where 2 is the variance of the random variable x.
For Gaussian pdf, Bayes’ theorem was used for
classification in order to relate the probability density function
of the data given the class to the posterior probability of the
class given the data.
If
P(1 x) P(2 x) then
x belong to class w1
P(1 x) P (2 x) then
x belong to class w2
GPS value is collected from mobile phone (Galaxy
Nexus2). The value obtained is in NMEA format, which is
then converted to ECEF format so it can be applied to the
survey map, Matlab2014 is used for converting NMEA to
ECEF format. Anyway, we have to use rotation matrix around
z-axis and subtract the ECEF value obtained with ECEF value
at the origin, reference point (0,0,0) , so we can get the value
in N-frame, which can be applied to the survey map.
In switching part, if a person uses mobile phone to receive
the GPS data by starting from outside the building and walk
into the building in order to observe the number of visible
satellites and if less than 4 satellites are observed, the system
will switch to receive data form APs instead, and the position
in which building of the user will be estimated by using Wi-Fi
fingerprint database with matching algorithm (k-NN and
Gaussian pdf) to make it more efficient to estimate the
position of the user. k-NN and Gaussian pdf do not use the
same database fingerprint, k-NN uses only fingerprint, no need
to classify class and k-NN we used the number of nearest
neighbors K=4 but Gaussian pdf has to classify class. In this
research, 10 buildings are observed, and we have to train one
gaussian distribution per class, so we train the database
fingerprint into 10 classes as shown in Fig.4.
(6)
Fig.4: classify class Guassian pdf
2014 International Conference on Indoor Positioning and Indoor Navigation, 27th-30th October 2014
(a)
(b)
(c)
Fig.5: (a) User walk route by using smart phone, the No. of the building start from left to right and the lower to upper.
(b) Using k-NN classification algorithm to estimated position, (c) Using Gaussian pdf algorithm to estimated position
Fig.5 shows the results of the positioning method that we
use different matching algorithm and compared both of k-NN
and Gaussian pdf shown in fig.5b and fig.5c.
V.
CONCLUSION
In this paper, we present the seamless indoor/outdoor
positioning system based on Wi-Fi fingerprint technique for
switching. GPS is used for outdoor and Wi-Fi APs is used for
indoor environment. The matching algorithm based on k-NN
and Gaussian pdf was applied to estimate user positions
between fingerprint database system and the real-time RSSI
value, after that the data fusion with the position from GPS
receiver, GPS was used to collecting the data in 4 paths, first
path is around Building No.1, second path is from Building
No.10 to Building No.1, third path is from Building No.1 to
Building No.8 and Building No.4 and last path from Building
No.1 to Building No.3 & Building No.9 and Building No.10.
As the results, this system is able to increase the accuracy and
robustness to noise, noise value was added into both database,
fingerprint database system and real-time RSSI value from
GPS, and the system still works well. In this paper, we
compared the results from different matching algorithms and it
showed that Gaussian pdf is better than k-NN as shown in
table I.
TABLE I Probability of Switching Gaussian Classifiers & k-NN
Path/white
Gaussian
noise
Path 1
Path 2
Path 3
Path 4
Gaussian Noise
N(0,0)
Gaussian Noise
N(0,3)
ACKNOWLEDGMENT
We would like to thank Asia-Pacific Space Cooperation
Organization (APSCO) and China Scholarship Council (CSC)
for the funding and make this research satisfactorily
completed.
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
Gaussian Noise
N(0,6)
k-NN
GausSian
k-NN
Gaussian
k-NN
GausSian
[8]
100%
100%
89.5%
88.5%
100%
100%
100%
100%
100%
100%
58.1%
88.5%
100%
100%
93%
100%
100%
100%
48.8%
92%
100%
100%
80.2%
100%
[9]
Yeh S.C., Hsu W.H., Su M.Y., Chen C.H., Liu K.H. “A Study on
Outdoor Positioning Technology Using GPS and WiFi Networks,” [A].
IEEE International Conference on Networking, Sensing and Control[C],
2009,pp. 597-601.
Li B., Tan Y.K., Dempster A.G. “Using two global positioning system
satellites to improve wireless fidelity positioning accuracy in urban
canyons,” [J]. IET Communications, 2009, 5(2),pp. 163-171.
Lu H.H., Zhang S., Dong Y.H., Lin X.K. “A Wi-Fi/GPS Integrated
System for Urban Vehicle Positioning,” [A]. 13th International IEEE
Annual Conference on Intelligent Transportation Systems[C], 2010,
pp.1663-1668.
Bagosi T., Baruch Z., “Indoor Localization by WiFi,” [A]. IEEE
International Conference on Intelligent Computer Communication and
Processing (ICCP)[C], 2011, pp.449-452.
Liu H.H., Yuan C., Yang Y.N., "WiFi-Based Indoor Positioning for
Multi Floor Environment, [C]", 2011 IEEE Region 10 Conference,
TENCON 2011, Bali, Nov 2011, 597-801.
Torteeka P., XIU C.D. “Indoor Positioning based on Wi-Fi Fingerprint
Technique using Fuzzy K-Nearest Neighbor,” [A]. 11th International
Bhurban Conference on Applied Science and Technology (IBCAST)[C],
2014,pp.461-465.
H.Liu, H.Darabi, P Banerjee and J.Liu, “Survey of Wireless Indoor
Positioning Techniques and Systems,”, IEEE Transaction on System,
MAN, and Cybernetics-Part C: Application and Reviews, VOL. 37, No.
6, November 2007, pp.1067-1080.
Gualda D., Urena J., Garcia J.C., Garcia E., Ruiz D., “RSSI Distance
Estimation Based on Genetic Programming, [C]” , International
Conference on Indoor Positioning and Indoor Navigation,2013,pp,1-8
Zirari S., Canalda P. “WiFi GPS based Combined positioning
Algorithm,”[A]. IEEE International Conference on Wireless
Communications, Networking and Information Security,”[C], 2010.
pp.684-688