You are on page 1of 19

sensors

Article
A Robust Indoor Positioning Method based on
Bluetooth Low Energy with Separate
Channel Information
Baichuan Huang 1 , Jingbin Liu 1,2 , Wei Sun 3,4 and Fan Yang 1,5, *
1 State Key Laboratory of Information Engineering in Surveying, Mapping and Remote Sensing,
Wuhan University, Wuhan 430079, China
2 Department of Remote Sensing and Photogrammetry and the Center of Excellence in Laser Scanning
Research, Finnish Geospatial Research Institute, 02430 Masala, Finland
3 Key Laboratory of Precise Engineering and Industry Surveying, National Administration of Surveying,
Mapping and Geoinformation, Wuhan University, Wuhan 430079, China
4 Wuhan Geomatics Institute, Wuhan 430079, China
5 State Key Laboratory of Geodesy and Earth’s Geodynamics, Chinese Academy of Sciences,
Wuhan 430079, China
* Correspondence: yangfanpost@whu.edu.cn

Received: 22 June 2019; Accepted: 7 August 2019; Published: 9 August 2019 

Abstract: Among the current indoor positioning technologies, Bluetooth low energy (BLE) has gained
increasing attention. In particular, the traditional distance estimation derived from aggregate RSS
and signal-attenuation models is generally unstable because of the complicated interference in indoor
environments. To improve the adaptability and robustness of the BLE positioning system, we propose
making full use of the three separate channels of BLE instead of their combination, which has generally
been used before. In the first step, three signal-attenuation models are separately established for each
BLE advertising channel in the offline phase, and a more stable distance in the online phase can be
acquired by assembling measurements from all three channels with the distance decision strategy.
Subsequently, a weighted trilateration method with uncertainties related to the distances derived
in the first step is proposed to determine the user’s optimal position. The test results demonstrate
that our proposed algorithm for determining the distance error achieves a value of less than 2.2 m at
90%, while for the positioning error, it achieves a value of less than 2.4 m at 90%. Compared with
the traditional methods, the positioning error of our method is reduced by 33% to 38% for different
smartphones and scenarios.

Keywords: indoor positioning; Bluetooth low energy (BLE); separate channels; separate signal-attenuation
models; distance decision strategy; weighted trilateration

1. Introduction
Positioning, navigation, timing, remote sensing and communication (PNTRC) systems will
change our life greatly in the future [1]. In the PNTRC system, the most fundamental and important
technologies are seamless positioning and ubiquitous navigation. In fact, outdoor positioning the
technology is relatively mature, owing to satellite positioning systems like Global Navigation Satellite
System (GNSS). However, currently, there is no single indoor positioning technology that is able to
balance cost, accuracy, performance, robustness, complexity, and limitations [2–4]. The general indoor
positioning technologies include infrared positioning [3,5], ultrasound positioning [3,6], radio frequency
positioning [4], magnetic positioning [7], microelectromechanical systems positioning [8,9], vision-based
positioning [10] and audible sound positioning [11,12]. In particular, radio positioning technologies,

Sensors 2019, 19, 3487; doi:10.3390/s19163487 www.mdpi.com/journal/sensors


Sensors 2019, 19, 3487 2 of 19
Sensors 2019, 19 FOR PEER REVIEW 2

technologies,
such such as radio
as radio frequency frequency
identification identification
(RFID), wireless LAN (RFID),
(WLAN), wireless
ZigBee,LAN (WLAN),
Bluetooth lowZigBee,
energy
Bluetooth
(BLE) low energy (BLE)
and ultrawideband (UWB),and have
ultrawideband
drawn much (UWB), have
attention drawnofmuch
because attention
the issuance of because of the
many wireless
issuance of many wireless radio standards [2,3]. Among these wireless
radio standards [2,3]. Among these wireless systems, the most commonly used ones for indoor systems, the most commonly
used ones for
positioning areindoor
WiFi andpositioning
Bluetooth are WiFi and Bluetooth [13].
[13].
WiFi has
WiFi has over
over 5050 sub-bands on the 2.4 GHz band, and each of them has a bandwidth of 20 MHz. MHz.
Most of the past past pioneering
pioneering work simply used the WiFi received signal strength indication (RSSI),
which reflects
which reflects the the aggregate
aggregate value value of of all
all channel
channel information
information [14].
[14]. The reason why they did not take
advantage
advantage of the sub-band information
information is that the WiFi Access
WiFi Access PointPoint (AP) used to collect information
such as RSSI, but RSSI was originally designed for communication so that the sub-band sub-band information
information
remains private
remains private for for users.
users. TheThe useuse ofof RSSI
RSSI inin previous
previous works
works [4,13,15–17]
[4,13,15–17] has has suffered from many
suffered from many
problems, such as body blockage, the temporal environmental change
problems, such as body blockage, the temporal environmental change effect, etc. Unlike the RSSI, effect, etc. Unlike the RSSI, the
recent
the studies
recent studies leveraging
leveraging channel
channelstatestate
information
information (CSI) fromfrom
(CSI) all sub-bands
all sub-bands havehave
revealed thatthat
revealed CSI
has has
CSI more fine-grained
more information
fine-grained information thanthanRSSI;RSSI;
hence, CSI is
hence, CSImore robust
is more against
robust bodybody
against blockage and
blockage
the temporal
and the temporal environmental
environmental change
change effect, and
effect, andtherefore,
therefore,a abetter
betterpositioning
positioningperformance
performance can be
can be
expected [16,18,19].
expected [16,18,19].
The conceptofofsub-bands
The concept sub-bands cancan
alsoalso be employed
be employed in BLEinpositioning.
BLE positioning.Similarly,Similarly,
BLE has BLE has 40
40 channels
channels
on the 2.4on GHzthe 2.4
band,GHzand band,
eachand each channel
channel has a bandwidth
has a bandwidth of 2 MHz of 2 [14].
MHz In [14]. In addition,
addition, the BLEthe BLE
has
has become
become the focus
the focus of current
of current indoor indoor positioning
positioning technologies
technologies because because
it takesitadvantage
takes advantage of low
of low power
power consumption
consumption and easy anddeployment
easy deployment [20]. A[20]. A comparison
comparison of theoffrequency
the frequencybandsbands between
between WiFiWiFi
and
and is
BLE BLE is illustrated
illustrated in Figurein 1a.Figure 1a. Channels
Channels 37, 38 and37, 39 38 and are
of BLE 39 advertising
of BLE arechannels,advertising channels,
broadcasting
broadcasting
messages messages
in loops, and thein loops,
other 36 andchannels
the other are36 channelsforare
designed designed for in
communication communication
connection [21]. in
connection [21]. Meanwhile, the aggregate received signal strength
Meanwhile, the aggregate received signal strength (RSS) is sampled in the loop of three advertising(RSS) is sampled in the loop of
three advertising
channels [14], see channels
Figure 1b,c. [14],Insee Figure
fact, 1b,c. In channels
the different fact, the different
will produce channels will produceRSS
the distinguished the
distinguished RSS measures because of the frequency band the
measures because of the frequency band the channel occupies. Therefore, an aggregate RSS loses channel occupies. Therefore, an
aggregate RSS loses the fine-grained information and will diminish
the fine-grained information and will diminish the details of the RSS measure from each channel. the details of the RSS measure
from
To thiseach
end,channel.
we propose To this
taking end, we propose
advantage taking
of the threeadvantage of the three
separate channels of theseparate channels
BLE, similar to theof CSI
the
BLE, similar to the CSI approach that has been successfully
approach that has been successfully applied for WiFi positioning systems. applied for WiFi positioning systems.

Figure 1. (a) The three advertising channels of BLE and the three most common WiFi sub-bands.
Figure 1. (a) The three advertising channels of BLE and the three most common WiFi sub-bands.
Channels 37, 38 and 39 are the advertising channels of BLE. The workflow of (b) aggregated RSS and
Channels 37, 38 and 39 are the advertising channels of BLE. The workflow of (b) aggregated RSS and
(c) Separate RSS (i.e., Channel 37).
(c) Separate RSS (i.e., Channel 37).
To date, BLE-based indoor positioning technologies can be classified into a geometric mapping
To date,
approach andBLE-based indoor
fingerprinting positioning
approach, withtechnologies can bethe
the former being classified
primary into a geometric
focus mapping
of this study [16].
approach and fingerprinting approach, with the former being the primary focus of this study [16]. In
In this case, methods such as triangulation, trilateration, and multilateration are generally used to locate
this case, methods such as triangulation, trilateration, and multilateration are generally used to locate
the target [22]. The aim of these methods is to accurately measure the distance between the target and
Sensors 2019, 19, 3487 3 of 19

the target [22]. The aim of these methods is to accurately measure the distance between the target and
APs by leveraging the time of arrival (TOA), time difference of arrival (TDOA), RSS, time of flight (TOF)
and received signal phase [4,16]. Regarding only the RSS approach, the distance can be calculated
by using the instant RSS measure and a radio-propagation model that was established in advance.
However, the distance estimation with the prebuilt radio propagation model in a complicated indoor
environment suffers from many problems, for instance, NLOS (not line of sight) [23], the multipath
effect and path loss [14], signal reflection [22], moving objects [4,24], a noise floor [25], and 802.11
interference [25], which are summarized as spatial variations. In detail, the so-called 802.11 interference
of BLE denotes the effect caused by WiFi because WiFi and BLE run on the same band (2.4 GHz);
see Figure 1a [14,21,25]. In addition, the narrow bandwidth of BLE advertising channels makes
individual RSS tend to fade fast, and the protocol of receiving an advertising package makes the
aggregate RSS tend to fluctuate [20]. Because of the interference depicted before, the traditional RSS
measurement (aggregate RSS from three channels) usually presents a larger uncertainty, which leads to
an incorrect distance estimate with the prebuilt single radio propagation model.
In this paper, we aim to achieve a more robust and precise indoor positioning system.
The structure of the paper is as follows: Section 2 presents the previous work and the background
of the indoor positioning of BLE. In Section 3, the algorithms contain a stable RSS inquire,
the separate signal-attenuation models with the strategy of distance decision and weighted trilateration.
Separate channels and signal-attenuation models are designed to obtain a more stable RSS. In the
meantime, the distance decision and weighted trilateration strategies are used to increase the precision
and adaptability. Section 4 demonstrates the experimental setup and performance of the algorithms.
Finally, Section 5 presents the conclusions and future directions of research.

2. Related Work
To obtain a more stable RSS, Kim [26] proposed an accurate indoor proximity zone detection
technique based on the time window and frequency of the RSS. Ozer [27] improved the performance
of BLE indoor positioning using the Kalman filter to make the RSS smoother. However, he could
not avoid the use of dirty data, resulting in a bad result. Furthermore, Ishida [28] first proposed BLE
separate channel fingerprinting using channel-specific features. Jovan [21] and Ramsey [14] used
three advertising channels to build fingerprinting maps in the process of removing fast fades with
an iPhone to investigate the value of separate channel information. Moreover, Giovanelli [29] used
the CC2650 tag and nRF52840 to estimate the distance covered by the signal corresponding to the
RSS. Nikoukar [25] measured the noise floor in different channels using nRF52480 SoC in different
environments to mitigate the noise and measured the separate RSS values. Although these authors
tried to simulate the real environment, they obtained only separate channel information with specific
devices. In this paper, we focus on the need for easy deployment. Beacons are arranged in separate
channels so that an off-the-shelf smartphone can work in our system.
To improve the precision and adaptability, Subha [30] and Ali [25] proposed adding particular
terms to the original model to absorb the multipath error. Yu [31] put forward a new BLE propagation
model according to the location of the BLE beacons and fused the propagation model and multiple
sensors through the Kalman filter. Moreover, Canton Paterna [32] used frequency diversity, the Kalman
filter and a trilateration method to improve the precision of the BLE system. He compared the largest
RSS value, the mean RSS value and the maximum ratio combined with separate RSS (channel 37, 38 or
39) to choose the best RSS value. He also compared the log-distance path loss model with shadowing,
the International Telecommunication Union (ITU) model for indoor environments and the empirical
model to choose the best model for indoor location in the large analysis. However, Canton Paterna
did not improve the model to simulate the real environment. He chose only the best channel to
estimate the most accurate position without considering the changeable space and time variations
in indoor environments. Zhuang [33] combined the channel-separate polynomial regression model,
channel-separate fingerprinting, outlier detection and the extended Kalman filter. He experimented in
Sensors 2019, 19, 3487 4 of 19

densely and sparsely distributed BLE beacons in all three advertising channels to fit the best model and
to generate the fingerprinting without considering the bad channel results. However, these authors
Sensors 2019,
ignored the19fact
FORthat
PEERindoor
REVIEW environments are changeable and complicated. In contrast, we 4combine

the separated channels and the distance decision strategy to improve the adaptability. In particular,
However, these authors ignored the fact that indoor environments are changeable and complicated.
separate signal-attenuation models provide the estimate distance for the distance decision strategy.
In contrast, we combine the separated channels and the distance decision strategy to improve the
The distance decision
adaptability. strategy
In particular, is directly
separate applied tomodels
signal-attenuation every provide
channelthe
and evaluates
estimate the comparison
distance for the of
each. Moreover, weighted trilateration with the estimate distance derived from the distance
distance decision strategy. The distance decision strategy is directly applied to every channel and decision
strategy
evaluates performs well in obtaining
the comparison the optimal
of each. Moreover, position.
weighted trilateration with the estimate distance
derived from the distance decision strategy performs well in obtaining the optimal position.
3. Algorithm
3. Algorithm
3.1. Separation of the BLE Channels for a More Stable Signal
3.1. Separation of the BLE Channels for a More Stable Signal
BLE broadcasts the messages in quick succession. In the protocol layer, CH 37 (channel 37), CH 38
(channelBLE38),
broadcasts
and CHthe 39messages
(channelin39)
quick succession.
broadcast theIn the protocol
same message layer, CH 37 (channel
repeatedly to avoid 37), CH
package loss.
38 (channel 38), and CH 39 (channel 39) broadcast the same message repeatedly to avoid package
Regarding the listening rule, devices such as smartphones listen to broadcasted messages circulating in
loss. Regarding the listening rule, devices such as smartphones listen to broadcasted messages
CH 37, CH 38 and CH 39. However, the final RSS obtained from BLE is indeed CH all (the aggregated
circulating in CH 37, CH 38 and CH 39. However, the final RSS obtained from BLE is indeed CH all
RSS from all channels), which is summed from the three separate channels in loops. According to
(the aggregated RSS from all channels), which is summed from the three separate channels in loops.
the rule
Accordingof error
to thepropagation, the aggregated
rule of error propagation, RSS has aRSS
the aggregated larger
hasuncertainty than that
a larger uncertainty thanofthat
eachof channel.
Acquiring
each channel. Acquiring a more stable RSS, deemed the foundation of positioning, requires separatechannels.
a more stable RSS, deemed the foundation of positioning, requires separate
Fortunately, separate channel
channels. Fortunately, can’t keep
separate channel can’tinkeep
badinand
badstable character
and stable allall
character thethe
time
time[21].
[21]. In this
this design,
design,
three three are
beacons beacons are scheduled
scheduled to run separately
to run separately in CHin37,CH
CH 37,38CH
and38 CH
and39,
CHwhile
39, while the other
the other beacon is a
beaconbeacon
normal is a normal
thatbeacon that broadcasts
broadcasts the aggregated
the aggregated RSS as aRSS as a benchmark.
benchmark. A simple
A simple experiment
experiment was carried
was
out carried out
between twobetween
brands two brands phones
of mobile of mobile tophones to demonstrate
demonstrate the behaviors
the behaviors of individual
of individual RSS and the
RSS and the aggregated RSS (see Figure 2).
aggregated RSS (see Figure 2).

Figure2.
Figure 2. Comparisons
Comparisons between
between separate
separateRSSRSS
values and the
values andaggregate RSS when
the aggregate RSSusing
whenthe (a) Google
using the (a) Google
Pixel33LLand
Pixel and (b)
(b) Huawei
HuaweiP20P20(for a distance
(for of 2of
a distance meters). The variance
2 meters). of the separate
The variance RSS values
of the separate RSSand
values and
the aggregate RSS with increasing distance using the (c) Google Pixel 3 L and (d) Huawei
the aggregate RSS with increasing distance using the (c) Google Pixel 3 L and (d) Huawei P20. P20.
Sensors 2019, 19, 3487 5 of 19
Sensors 2019, 19 FOR PEER REVIEW 5

It can be seen
It can be seenfromfromFigure
Figure 2a2athat
thatthetheRSS
RSS ofof CH 37 37ranges
rangesfrom
from−31− 31
dBm dBm to −dBm.
to −27 27 dBm. In
In addition,
addition,
the RSSthe ranges
RSS ranges
fromfrom−31 −dBm 31 dBmto −28to −dBm
28 dBm for CH
for CH 38 and
38 and fromfrom
−29− dBm
29 dBm to − dBm
to −25 25 dBm forfor
CH 39.
CH 39.
TheThe variance
variance of CHof CH all (1.6756)
all (1.6756) is higher
is higher thanthan
one ofoneCHof37 CH 37 (0.9915),
(0.9915), CH 38CH 38 (0.6654)
(0.6654) and CH and39CH
(0.7756).
39 (0.7756). The imply
The results resultsthat
implythethat
RSS the
variesRSSgreatly
varies with
greatlythewith the channel,
channel, which iswhich is also supported
also supported by Figure 2b.
by Figure 2b. Furthermore,
Furthermore, it canthat
it can be seen be seen that the aggregate
the aggregate RSS ranges RSS ranges
from −31 from
dBm −to31 dBm
−25 dBm.to −The
25 dBm.
aggregate
The aggregate
RSS apparentlyRSS apparently
has a largerhas a larger
variance variance
than that ofthan
eachthat of each
channel, channel,
at almost allatdistances
almost all distances
(see Figure 2c,d).
(see Figure 2c,d). The
The variance of CH variance of CH
all (1.6465) all (1.6465)
is higher thanisonehigher
of CH than one of CH
37 (0.3555), CH3738(0.3555),
(0.4885)CH and38CH(0.4885)
39 (0.5952).
and CH 39 (0.5952). The results are consistent with our previous assertation
The results are consistent with our previous assertation that an individual RSS should be more that an individual RSSstable.
should be more with
Therefore, stable.theTherefore,
challengewith the challenge
of temporal of temporal
variations, variations,
separate channelsseparate
insteadchannels instead one
of an aggregate
of anare
aggregate
adopted one arestudy
in this adopted in thisastudy
to acquire to acquire
more stable a more stable and
RSS measurement RSStomeasurement and to
improve the positioning
improve the positioning performance because
performance because of the stability of data source. of the stability of data source.

3.2.Distance
3.2. The The Distance Decision
Decision Strategy
Strategy
As separate
As separate channels
channels are used
are used in study,
in this this study, a distance
a distance decision
decision strategy
strategy regarding
regarding the distance
the distance
between
between the receivers
the receivers (smartphones)
(smartphones) and senders
and senders (BLE(BLE beacons)
beacons) shouldshould be developed
be developed to fully
to fully exploit
exploit
allchannel
all the the channel information.
information. Here,Here,
threethree
stepssteps are taken
are taken to achieve
to achieve the objective;
the objective; seeworkflow
see the the workflow
shown shown in Figure
in Figure 3. In 3.
theInfirst
the step,
first step,
threethree separate
separate signal-attenuation
signal-attenuation modelsmodels are trained
are trained in theinoffline
the offline
phase.phase. It’s necessary
It’s necessary but but
not not complex.
complex. Second,
Second, data
data filtering
filtering is is implementedtotoeliminate
implemented eliminateabnormal
abnormal RSS
RSS points (outliers)
(outliers) and
andinterpolate
interpolatethe thefixed
fixedpoint.
point.Finally,
Finally,a method
a method is proposed for fusing
is proposed the separate
for fusing the
distances
separate estimated
distances for each
estimated channel
for each and outputting
channel and outputting the final distance.
the final distance.

CH37 Model 37 Count=3 3-Channel


Output
Final
Count of Distance
Data
CH38 Model 38 Valid Count=2 2-Channel
Filtering
Distance

CH39 Model 39 Count=1 No output

Figure
Figure 3. Overview
3. Overview of theof the proposed
proposed algorithm
algorithm for outputting
for outputting the distance.
the final final distance.

3.2.1.3.2.1. Separate
Separate Signal-Attenuation
Signal-Attenuation Models
Models in theinOffline
the Offline
PhasePhase

The The distance


distance can becanestimated
be estimated by measuring
by measuring the instant
the instant RSS RSS
and and
usingusing a prebuilt
a prebuilt radioradio
propagation
propagation model model that reveals
that reveals the one-to-one
the one-to-one corresponding
corresponding relationship
relationship between between distance
distance and RSS. and
Actually, the log-distance path loss model was most frequently used in previous works because because
RSS. Actually, the log-distance path loss model was most frequently used in previous works the
channel fading characteristic contains a log-normal distribution [23,32,33]. Therefore, our studystudy
the channel fading characteristic contains a log-normal distribution [23,32,33]. Therefore, our
chooses
chooses this model
this model as well
as well to train
to train the signal-attention
the signal-attention models,
models, as shown
as shown below:
below:
𝑑d
!
 
𝑅𝑆𝑆RSS
= 𝑅𝑆𝑆 𝑑 dre+
= RSS f 10𝛼 loglog
+ 10α ++𝑋Xσ (1) (1)
𝑑 dre f
wherewhere𝑅𝑆𝑆 RSSis a dependent
is a dependent variable, 𝑑 is an
variable, d isindependent
an independentvariable, 𝑑
variable, is
drethe reference distance,
f is the reference distance,
and 𝑅𝑆𝑆 𝑑  is the RSS at the reference point. 𝛼 is the parameter representing the path-loss

and RSS dre f is the RSS at the reference point. α is the parameter representing the path-loss exponent,
exponent, and 𝑋
and Xσ followsfollows a Gaussian
a Gaussian distribution,
distribution, with
with zero zero[33].
mean mean [33].
It is apparent that three
It is apparent sets of
that three signal-attenuation
sets models
of signal-attenuation are needed
models because
are needed the information
because of of
the information
threethree
BLE BLEchannels is utilized in our design. Therefore, we establish three signal-attenuation
channels is utilized in our design. Therefore, we establish three signal-attenuation models models
(denoted as 𝑀
(denoted as, 𝑀 M38 𝑀
M37 ,and and) M
with) with
39
respect to CHto37,
respect CHCH37,38CHand
38 CH
and39,CHrespectively, in theinoffline
39, respectively, the offline
training phase.
training However,
phase. only only
However, one model was trained
one model for the
was trained foraggregated RSS in
the aggregated RSSthe
inconventional
the conventional
method.
method.It is apparent that three
It is apparent separate
that three models
separate can better
models reveal
can better the feature
reveal of each
the feature channel
of each channel
information. This offline training phase normally includes two steps: (1) collection of the
information. This offline training phase normally includes two steps: (1) collection of the RSS during RSS during
a given time time
a given period at a fixed
period position,
at a fixed and use
position, and of the
use ofmean valuevalue
the mean of the
ofRSS measurements
the RSS measurements as the
as the
“observation” of this position; (2) the recording of a set of “observations” and the distances between
the receivers (smartphones) and senders (BLE beacons). In this way, a least-square method can be
utilized to find the optimal value of parameter 𝛼 in Equation (1) in the offline phase. Under the
Sensors 2019, 19, 3487 6 of 19

“observation” of this position; (2) the recording of a set of “observations” and the distances between the
receivers (smartphones) and senders (BLE beacons). In this way, a least-square method can be utilized
Sensors
to find 2019, 19 FOR PEER
the optimal value of parameter α in Equation (1) in the offline phase. Under the framework of6
REVIEW

the least-square method, the three parameters can be obtained. α37 represents the path-loss exponent
framework
CH 37. CHof38the least-square
CH 39 eachmethod, thea different
three parameters
parametercan
as αbe obtained. 𝛼 represents the
in and may have 38 or α39 .
path-loss exponent
To test in CHsignal-attenuation
the separate 37. CH 38 and CHmodels,
39 eachamay
longhave a different
corridor parameter
is selected 𝛼 or 𝛼 .
as ourasexperimental
To test the separate signal-attenuation models, a long corridor is selected as our experimental
environment, with the Google Pixel 3 L being used. Sixteen positions are chosen, and the distance
environment, with the Google Pixel 3 L being used. Sixteen positions are chosen, and the distance
between each pair of adjacent positions is 1.2 m. Collection of the RSS for 5 minutes at every fixed
between each pair of adjacent positions is 1.2 m. Collection of the RSS for 5 minutes at every fixed
position to a distance of 19.2 m is carried out, and the mean value of the collection is regarded as
position to a distance of 19.2 m is carried out, and the mean value of the collection is regarded as the
the raw RSS. The raw RSS values are recorded with the true distance at every fixed position. In the
raw RSS. The raw RSS values are recorded with the true distance at every fixed position. In the offline
offline phase, the record is trained to fit the signal-attenuation models (see Figure 4). The dotted line
phase, the record is trained to fit the signal-attenuation models (see Figure 4). The dotted line
represents the mean value of the collected RSS at every fixed position, and the symbol ’*’ represents the
represents the mean value of the collected RSS at every fixed position, and the symbol '*' represents
signal-attenuation models. R2 , called the goodness of fit, is employed to evaluate the established model.
the signal-attenuation models. 𝑅 , called the goodness of fit, is employed to evaluate the established
It is apparent from Figure 4 that the separate signal-attenuation models have a higher R2 values than
model. It is apparent from Figure 4 that the separate signal-attenuation models have a higher 𝑅
those of the aggregate signal-attenuation models. In the offline phase, the separate signal-attenuation
values than those of the aggregate signal-attenuation models. In the offline phase, the separate signal-
models represent the relatively optimal models.
attenuation models represent the relatively optimal models.

Figure4.4. The
Figure The signal-attenuation
signal-attenuation models for the Google Pixel 3 L: the the fitting
fitting model
model for
for (a)
(a) CH
CH all:
all:
R𝑅 =
2 0.5570;(b)
=0.5570; (b)CH
CH37: 2 = 0.7733;
37:𝑅R =0.7733; (c)(c)
CH CH 𝑅R
38:38: 2 = 0.7494;
=0.7494; andand (d) CH
(d) CH R = 0.7313.
2
39: 𝑅39:=0.7313.

InInthe
theonline
onlinephase,
phase,thethedistance
distanceshould
shouldthen
thenbe beestimated
estimatedfrom
fromeach
eachsignal-attenuation
signal-attenuationmodelmodel
(M , M and M ). To verify the separate models in practice, another test in the
(𝑀 , 𝑀 and 𝑀 ). To verify the separate models in practice, another test in the same long corridor
37 38 39 same long corridor
using
usingthe theGoogle
GooglePixel 3 L3 is
Pixel L carried out.out.
is carried In this phase,
In this the RSS
phase, is collected
the RSS for 10for
is collected s at10every
s at fixed
everypoint,
fixed
as in the
point, as offline phase.phase.
in the offline EveryEvery
received RSS isRSS
received input into into
is input the separate signal-attenuation
the separate signal-attenuation models
modelsto
obtain an estimate distance. By recording the true distance and the estimated distance
to obtain an estimate distance. By recording the true distance and the estimated distance inferred inferred from
the models,
from we canwe
the models, output
can the CDFthe
output (cumulative distribution
CDF (cumulative function)function)
distribution map of the maperrors, as shown
of the errors, in
as
Table
shown 1. in Table 1.

Table 1. Distance errors in CH 37, CH 38 and CH 39.


Table 1. Distance errors in CH 37, CH 38 and CH 39.
30% of30%
Timeofin Error
Time in Error60% of60%
TimeofinTime
Errorin Error90% of 90%
TimeofinTime
Errorin Error
Channel ID
Channel ID (m) (m) (m)
(m) (m) (m)
CH
CH3737 2.0 2.0 3.5 3.5 5.2 5.2
CH
CH3838 1.6 2.6 4.6
1.6 2.6 4.6
CH 39 1.1 1.9 4.0
CH 39 1.1 1.9 4.0

The
The implication
implication of
of the
the results
results shown
shown in
in Table
Table11isisthat
thatall
allthree
threesignal-attenuation
signal-attenuationmodels
modelscancan
estimate
estimate a distance from the smartphones to the beacons. The 90 percentile distance errors are are
a distance from the smartphones to the beacons. The 90 percentile distance errors no
no less
less than 4.0 m, which is not sufficient for precise indoor positioning. For this, a distance
than 4.0 m, which is not sufficient for precise indoor positioning. For this, a distance decision decision
algorithm
algorithmwith
withdata
datafiltering
filteringisisproposed
proposedtotoachieve
achieveadaptable
adaptableandandrobust
robustindoor
indoorpositioning.
positioning.

3.2.2. Data Filtering


In this study, three beacons (each of them is coded in the level of firmware to broadcast only one
channel) are combined as a station to achieve the broadcast of separate channel information. It is
worth mentioning that some of the past works directly modified the hardware of a single beacon to
achieve the broadcast of three channels of information at the same time. Unlike previous works, we
bypass the technical difficulty of modifying the hardware and manage to obtain the three channels
of information by simply combining three beacons as a station (each of them is coded in the level of
Sensors 2019, 19, 3487 7 of 19

3.2.2. Data Filtering


In this study, three beacons (each of them is coded in the level of firmware to broadcast only one
channel) are combined as a station to achieve the broadcast of separate channel information. It is
worth mentioning that some of the past works directly modified the hardware of a single beacon
to achieve the broadcast of three channels of information at the same time. Unlike previous works,
we bypass the technical difficulty of modifying the hardware and manage to obtain the three channels
of information by simply combining three beacons as a station (each of them is coded in the level
of firmware to broadcast only one channel). Despite this convenience, our method may introduce
a new problem, that is, the packet loss of some channels during one round of a scanning. We have
assumed that the RSSs from the three channels are completely synchronized, which is contrary to reality.
Hence, we develop a “lost detection” method to tag the channel that is unavailable for one round of
a scanning. In addition, outliers that make great jumps should be detected and removed/smoothed
at this stage, which can be achieved by the median filter algorithm [34]. The details are expanded in
the following.
During a given time period, the received package has a different number of detected beacons.
If one beacon is not detected, the RSS of this beacon in this round of scanning is an empty one, that is,
it is lost. The “lost” RSS is critical for the later distance decision, so we have to distinguish which
beacon is “lost”. To this end, we carry out loss detection as follows (see Equation (2)), which is actually
a process of tagging. When Ri is empty, Ti is equal to 0. In contrast, Ti is equal to 1 if Ri is not empty.
Loss detection provides the tags needed for median filtering:
(
0 Ri is empty
Ti = (2)
1 Ri is not empty

where Ti is the tag in time period i and Ri represents the received RSS in time period i.
After loss detection, median filtering is carried out to address the data with tags
sequentially.
n Here, we take CH 37 o as an example to illustrate the process of median filtering.
RSS37,1 , RSS37,2 , RSS37,3 , . . . , RSS37,i , which denotes the RSS sequence of CH 37 (different smartphones
have
n different sampling frequencies) o during the sampling period, has a matched tag sequence
tag37,1 , tag37,2 , tag37,3 , . . . , tag37,i , found by Equation (2). A sliding window of WL1 in length is adopted
to sample the median value. For i = 1, 2 . . . , t − WL1 + 1, we have:

Ri , Ri+1 , . . . Ri+WL1 +1
(
Ti = 1
RFi = (3)
None Ti = 0

where WL1 is the length of the sliding window, RFi is the selected RSS and Ri represents the RSS of CH
37 in time period i; when the total count is t, the max of i is t − WL1 + 1.
In other words, the purpose of median filtering is to remove the outlier, which behaves as a
sudden jumping point. Mainly, Ti , the tag of the last point in the sliding window, is deemed the
decisive point. If the value of the decisive point is zero, the whole sliding window should be thrown
out. Correspondingly, some fixed points, the median values of the sliding window, should be inserted.
To test the approach of median filtering and loss detection, in the same long corridor, RSS values
are collected at every fixed position for 10 s, as in the online phase. For example, the set of RSS
values for the Huawei P20 at a fixed position 3 m away before and after the methodology is shown
in Figure 5. When the value of WL1 is 5, the probability of the outlier being here is 15%. In fact,
the probability of outliers mainly depends on the environment, which we cannot improve. Figure 5a
shows the plot of raw data, while the reprocessed data are shown in Figure 5b. The number of outliers
in Figure 5a has been considerably reduced in Figure 5b. After median filtering, the sharp noise was
deleted fully. Meanwhile, the process of loss detection is shown in Figure 5b. The fixed point has been
inserted. On the whole, the process of data filtering makes the RSS values more gathered and smooth.
Sensors 2019, 19, 3487 8 of 19

The combination of loss detection and median filtering can output a reprocessed and clean sequence of
Sensors
RSSs2019,
for19later
FOR PEER
use inREVIEW
the distance
decision strategy. 8

Figure 5. The
Figure scatter
5. The plotplot
scatter of (a)
of raw data;
(a) raw (b) (b)
data; processed data.
processed Here,
data. 𝑊𝐿WL
Here, is15 is
in5Equation (3). (3).
in Equation

3.2.3.
3.2.3. Distance
Distance Decision
Decision
AfterAfter
data data filtering,
filtering, thethe three
three setssets of RSS
of RSS values
values correspond
correspond withwith a series
a series of distances
of distances in separate
in separate
channels.
channels. ForFor example,
example, thethe𝑖 ithpoint
pointofofthethefiltered
filteredRSSRSS inin CH
CH 37 can output
output aadistance
distanceresult calledD37 ,
resultcalled
𝐷 as, aswell
wellasasD38𝐷 and and D39𝐷. However,
. However, it should
it should be noted
be notedthatthat
one one
can never expect
can never to acquire
expect D37 , D𝐷38 and
to acquire ,
𝐷 and
D 39 𝐷 every time, as some of these parameters might be lost, as depicted before. To synthesize
every time, as some of these parameters might be lost, as depicted before. To synthesize the final
thedistance, the distance
final distance, decision
the distance algorithm
decision is implemented
algorithm is implemented to analyze and optimally
to analyze and optimallycombine the three
combine
the three estimated distances derived from the separate signal-attenuation models. With thethat
estimated distances derived from the separate signal-attenuation models. With the hypothesis
three beacons
hypothesis that threein three channels
beacons can channels
in three be used tocan output
be usedthe to
final distance,
output our distance
the final distance,decision strategy
our distance
is illustrated
decision strategyasisfollows according
illustrated to the
as follows number to
according of the
valid distances.
number of valid distances.
2-Channel
2-Channel is used
is used when whenthethe number
number of valid
of valid distances
distances (valid
(valid channel
channel information)
information) is two.
is two. In this
In this
case,
case, thethe possible
possible combinations
combinations presumably𝐷D37 and
arepresumably
are and 𝐷 D38, D𝐷37 and
andD𝐷39 , ,ororD𝐷 38 and and D39𝐷. Two
. Two steps
areare
steps followed:
followed: (1) detecting
(1) detectingthe variance
the variance of a single channelchannel
of a single and (2) and
detecting the difference
(2) detecting between the
the difference
two channels.
between the two channels.
ForFor instance,
instance, 𝐷 Dand Q and 𝐷 D(𝑄,
P (Q, P = 38,
𝑃=37, 37, 39)
38, 39)
are are valid
valid here.here. In the
In the firstfirst
step,step,
there there
is a is a threshold
threshold andand
a sliding window for variance detection. The variance detection requires that 𝜎 < 𝑇ℎ𝑟 1 (where 𝜎σ is
a sliding window for variance detection. The variance detection requires that σ < Thr (where is the
thevariance
varianceofofaasingle singlechannel
channeland andThr𝑇ℎ𝑟
1 represents
represents the the
threshold
thresholdof variance
of variancein step one).one).
in step OnlyOnlyif theiftwo
thespecific channels
two specific channelsmeet meet
the requirement
the requirement of variance detection
of variance does step
detection doestwo,stepcalled difference
two, called detection,
difference
commence. The process of difference detection in 2-Channel
detection, commence. The process of difference detection in 2-Channel can be described can be described mathematically as shown
in Equation (4):
mathematically as shown in Equation (4):
Pi+WL2 −1
|DQ,i − DP,i |
∑ i=1 |𝐷 , − 𝐷 , | < Thr2 (4)
WL2 < 𝑇ℎ𝑟 (4)
𝑊𝐿
where WL2 is the length of the sliding window, Thr2 represents the threshold of variance in difference
where 𝑊𝐿 is the length of the sliding window, 𝑇ℎ𝑟 represents the threshold of variance in
detection in time period i, DQ,i is the value of the distance in channel Q and DP,i is the value of the
difference detection in time period 𝑖, 𝐷 , is the value of the distance in channel Q and 𝐷 , is the
distance in channel P.
value ofAs theadistance
consequence, in channel P.
the ultimate output distance Di is the weighted average of DQ and DP :
As a consequence, the ultimate output distance 𝑫 is the weighted average of 𝐷 and 𝐷 :
𝑫Di = =𝑚 m1 ∗∗ 𝐷 , + +𝑚 m2 ∗∗ 𝐷

 DQ,i DP,i
,
⎧ σP

𝜎


⎪ m 1 = σ σ (5)
 𝑚 = Q
σ
+ P
m2 =𝜎 σ ++Qσ𝜎

(5)



⎨ Q
𝜎 P
⎪ 𝑚 =
⎩ 𝜎 +𝜎
where 𝑚 and 𝑚 are the weights for channel Q and channel P, respectively, 𝜎 is the variance of
channel Q, and 𝜎 is the variance of channel P. High variance in variance detection means more
interference and lower weight.
3-Channel is used when the number of valid distances is three. In addition, 3-Channel is more
precise and persuasive than 2-Channel in practice because of the greater availability of
Sensors 2019, 19, 3487 9 of 19

where m1 and m2 are the weights for channel Q and channel P, respectively, σQ is the variance of channel
Q, and σP is the variance of channel P. High variance in variance detection means more interference
and lower weight.
3-Channel is used when the number of valid distances is three. In addition, 3-Channel is more
precise and persuasive than 2-Channel in practice because of the greater availability of measurements.
Similarly, two steps are also followed: (1) detecting the variance of each of the three channels separately
and (2) detecting the difference between every two channels. The differences between any two of the
three distances (D37 , D38 , and D39 ) should be taken into account.
In the first step, there is a threshold and a sliding window for variance detection. The variance
detection requires that σ < Thr1 , as demanded by 2-Channel (where σ is the variance of a single channel
and Thr1 represents the threshold of variance in step one). Only if all three separate channels fulfill
the requirement of variance detection is step two, called difference detection, commenced. The process
of difference detection in 3-Channel can be described mathematically as shown in Equation (6):
 Pi+WL3 −1
|D37,i −D38,i |
i=1
< Thr3


WL

Pi+WL3 −1 3



|D37,i −D39,i |

< Thr3 (6)
 i=1


 WL3

 Pi+WL3 −1
 |D38,i −D39,i |
i=1
< Thr3


WL3

where WL3 is the length of the sliding window, Thr3 represents the threshold of variance in difference
detection in time period i, D37,i is the value of the distance in CH 37, D38,i is the value of the distance in
CH 38 and D39,i is the value of the distance in CH 39.
Accordingly, the ultimate output distance Di is the weighted average of distance 37, distance 38
and distance 39: 

 Di = m1 ∗ D37,i + m2 ∗ D38,i + m3 ∗ D39,i
σ38 +σ39


 1 = 2∗(σ37 +σ38 +σ39 )
m



 m2 =
 σ37 +σ38 (7)

 2∗(σ37 +σ38 +σ39 )
σ37 +σ38


 m =

3 2∗(σ37 +σ38 +σ39 )

where m1 , m2 and m3 are the weights for CH 37, CH 38 and CH 39, respectively, σ37 is the variance of
CH 37, σ38 is the variance of CH 38 and σ39 is the variance of CH 39.
In conclusion, the quality of broadcasting signal is affected by many reasons like walking people,
fixed obstacle (desk, chair, cupboard . . . ) and state of transmitter/receiver, etc. Because of these
complicate factors in indoor environment, the quality of broadcasting is varying time to time, and there
should be thus no fixed relation between the quality and the real distance. However, a direct quality
evaluation is possible in our method, by step (1) detecting the variance of each channel separately and
step (2) detecting the difference between every two channels. In this way, our method only employs
the RSS of “good quality”, resulting in a better distance estimation in theory.
The basic rationale behind our distance decision strategy is that: the interruptions caused
by unpredictable factor like walking people on the three channels are different. In another word,
the three channels will consistently reflect a same distance estimate if no interruption, however,
a large interruption will lead to a large discrepancy of distance estimates between the three channels.
By detecting how large is the discrepancy between channels, our distance decision strategy can tell
if this is a good or bad measure, and avoid to output result in bad quality. However, the traditional
method will adopt all channel outputs without any particular treatment with the error.
In particular, a validation is set up to test our distance decision strategy, as Figure 6 illustrates.
The distance between the station and the smartphone (Google Pixel 3 L) is 5 m. The test is set up
as real as possible by (1) distributing some desks and cupboards as obstacles and (2) rotating the
smartphones. Although the real case is usually more complicated than our setup, we suggest that
the experimental results under our setup still make sense. In addition, three locations (A, B, C) are
Sensors 2019, 19, 3487 10 of 19

tested in the experiment: case A in Figure 6 represents the status of inherent influence. The case of a
Sensorssmartphone backing
2019, 19 FOR PEER away from the station is marked as case C (blocked). In this case, the line of
REVIEW 10sight
is blocked. The case in which a smartphone is positioned vertically with straight lines between the
station
station and and smartphones
smartphones is is consideredcase
considered caseBB (not blocked).
blocked).The
Thethree cases
three provide
cases powerful
provide evidence
powerful
evidence that the direction of the smartphone makes a difference. Table 2 shows the results of thecases
that the direction of the smartphone makes a difference. Table 2 shows the results of the different
whencases
different is 3 m2𝑇ℎ𝑟
Thr1 when in the 3 𝑚step
is first in of
thethe distance
first step ofdecision strategy,
the distance and Thr
decision and 𝑇ℎ𝑟
2 in Equation
strategy, (4), Thr
in 3 in
Equation (4), 𝑇ℎ𝑟
Equation (6) are
inboth 5 m. (6) are both 5 𝑚.
Equation

5m

5 Case C Case A
m
Case B
10 m

FigureFigure Test setup:


6. setup:
6. Test thepoint
the red red point
is theisstation;
the station; the bars
the gray gray denote
bars denote
desksdesks and cupboards;
and cupboards; and the
and the
different
different positions
positions of people
of people represent
represent different
different cases.cases.

Table 2. Results of the test for different cases.


Table 2. Results of the test for different cases.

Case Case A A B B CC
Number of Tests
Number of Tests 10 10 10 10 10
10
Number
Number of Empty of Empty Outputs 1
Outputs 1 6 6 10
10

In NLOS
In fact, fact, NLOS
is oneisofone
theofmain
the main factors
factors that deteriorate
that may may deteriorate distance
distance estimation
estimation fromfrom RF signals
RF signals
(WiFi/BLE),
(WiFi/BLE), and many
and many papers papers in previous
in previous dedicate
dedicate to minimize
to minimize the NLOS
the NLOS effecteffect
[35], [35],
whilewhile
nonenoneof of
themthem
claims claims to completely
to completely solve thesolve the NLOS
NLOS problem problem
as far asaswe farknow.
as weUnlike
know.the Unlike
previous the previous
work thatwork
try tothat try tothe
calibrate calibrate the RSSeven
RSS measures measures
in NLOSeven in NLOS
case, this studycase,prefers
this study prefers
to avoid resultto output
avoid result
(usually output
in bad(usually
quality)ininbad
NLOSquality) in NLOS
case (or case (or
other cases, notother
limitedcases, not limited
to NLOS) so as to to stabilize
NLOS) so theaspositioning.
to stabilize the
positioning.
As Table As Table in
2 demonstrates, 2 demonstrates, in this trial,
this trial, no results no results
are output when arethe
output
line when
of sighttheisline of sight
blocked iniscase
blocked
in caseof
C. Because C.the
Because of the
tails of the separate
tails of the separate signal-attenuation
signal-attenuation models, a small models, a small
jitter jitter will
will result in a result
large in a
large
change. change.
When When
the line the line
of sight of sight is
is blocked, theblocked,
value ofthe thevalue of the RSSvery
RSS becomes becomes
small,very
which small,
will which
cause will
cause
a large a large
error error
in terms of in
theterms of the
distance. distance.
Hence, Hence,
the case will the
not case
meetwillthe not meet the of
requirement requirement
the distanceof the
distance
decision. decision.
In other words,In the
other words, theofprobability
probability no outputof inno
caseoutput in caseInCcase
C is 100%. is 100%.
B, theIndirection
case B, the ofdirection
the
of the smartphones
smartphones does not
does not improve improve
stability stabilitywith
compared compared withA,
that in case that in case
being A, being
marked as anmarked
inherentas an
inherent
influence. Thus,influence. Thus,of
the number the number
times of timesoccurs
no output no output
in case occurs
B is in case Bthan
higher is higher
that in than
casethat
A. in
Thecase A.
The rationale
rationale behind our behind
distanceour decision
distancestrategy
decisionisstrategy
that a moreis that a more
precise precisecan
distance distance can be with
be obtained obtained
morewith more consistent
consistent channel information
channel information among the amongthreetheadvertising
three advertising
channels.channels.
In brief,In brief, the distance
the distance
resultresult is convincing
is convincing whenwhen the three
the three channels
channels outputoutput
similarsimilar distances.
distances.
By combining
By combining the the
useuseof of separate
separate channelinformation
channel information and and the
thedistance
distancedecision
decision strategy,
strategy,wewe suggest
thatthat
suggest the result should
the result havehave
should moremore adaptability and more
adaptability and morerobustness to signal
robustness interruption
to signal caused by,
interruption
causedforby,
example, body blockage.
for example, Our distance
body blockage. decisiondecision
Our distance strategystrategy
based onbaseda relatively long sequence
on a relatively long can
achieve
sequence cangreater
achievepositioning accuracy,accuracy,
greater positioning which is the major
which objective
is the major of this study.
objective of this study.

3.3. Weighted
3.3. Weighted Trilateration
Trilateration
WithWith the distances
the distances measured
measured fromfrom several
several stations,
stations, a weighted
a weighted trilateration
trilateration method
method is proposed
is proposed
to realize positioning. In our experimental setup, a location station is equipped
to realize positioning. In our experimental setup, a location station is equipped with three beacons,with three
and beacons, and each
each beacon beacon issuch
is arranged arranged
that such
it hasthat it has
one one advertising
advertising channel, channel, as described
as described before.
before.
Considering the occurrence of packet loss at our location station, a four-station setup is suggested,
which is also very popular among the state-of-the-art geometric positioning systems.
Trilateration can succeed in locating the target when the measurements taken converge at a
single point. However, in a practical environment, there are some distance errors that lead to an area
of possible locations instead of a single location point. Derivation from the difference detection of
Sensors 2019, 19, 3487 11 of 19

Considering the occurrence of packet loss at our location station, a four-station setup is suggested,
which is also very popular among the state-of-the-art geometric positioning systems.
Sensors 2019,Trilateration
19 FOR PEER REVIEW
can succeed in locating the target when the measurements taken converge at a11 single
point. However, in a practical environment, there are some distance errors that lead to an area of
eachpossible
station in Section instead
locations 3.2.2 is utilized to increase
of a single confidence
location point. regarding
Derivation fromthe
thereceivers (smartphones)
difference detection of each
closer to the senders (stations) by moving the target point.
station in Section 3.2.2 is utilized to increase confidence regarding the receivers (smartphones) closer to
In the case of evaluated errors shown in Figure 7, the intersection of circles creates an area. The
the senders (stations) by moving the target point.
maximumInlikelihood estimate, the least-square method or the triangle centroid localization algorithm
the case of evaluated errors shown in Figure 7, the intersection of circles creates an area.
can solve this problem. Here, the triangle centroid localization algorithm is adopted. In step one, the
The maximum likelihood estimate, the least-square method or the triangle centroid localization
center point 𝐏 of the intersecting area should be given:
algorithm can solve this problem. Here, the triangle centroid localization algorithm is adopted. In step
one, the center point P of the intersecting area 𝑃1 + 𝑃2 +be
should 𝑃3given:
+ 𝑃4
𝑥=
4 (8)
𝑃1 + 𝑃2 + P3𝑃3
x +P4+
x 𝑃4

P1 x+ P2x +
𝑦


=x = 4
(8)
 y = P1 y +P2 y +4P3 y +P4 y


4
where 𝑃1 is the point of intersection between station 3 and station 4, 𝑃1 is the value of 𝑃1
where P1 is the
along the X-axis, 𝑃1 of
andpoint is intersection 𝑃1 alongstation
the value of between 3 and station 4, P1x is the value of P1 along the
the Y-axis.
X-axis, and P1 y is the value of P1 along the Y-axis.

Station 2
r2
Station 1
r1 P1

P2
P4 r4
P3 Station 4

r3

Station 3

Figure 7. Four
Figure 7. intersecting circlescircles
Four intersecting with evaluated errors.
with evaluated errors.

In step
In step two, two, the weight
the weight derived
derived fromfrom difference
difference detection
detection for every
for every side side
can be cancalculated
be calculated as as
shownshown in Equation
in Equation (9). Assume
(9). Assume thatthat the levels
the levels of difference
of difference detection
detection of of
thethe four
four areareΣ Σ, 1Σ, Σ,2 , Σ3
stations
stations
Σ andandΣΣ.4A. Alow
lowlevel
levelofofdifference
differencedetection
detectionmeans
meansthat
thatthe
thereal
realtarget’s
target’slocation
locationisismore
morelikely
likelynear
near the
station.InIn
the station. reality,
reality, thethe occurrence
occurrence of of intersecting
intersecting circles
circles withwith evaluated
evaluated errors
errors is anisevent
an event
withwith
highhigh
probability;
probability; thus,
thus, thethedistance
distance decision
decisionstrategy
strategyplays an important
plays role in trilateration.
an important Consequently,
role in trilateration.
we give thewe
Consequently, weight
give the for weight
every side as follows:
for every side as follows:
ΣΣ2++ΣΣ3 ++Σ4 Σ
k=1 = 3∗(Σ +

⎧𝑘 ΣΣ2 ++
Σ3 +
3 ∗ (Σ + Σ Σ4+) Σ )

1
⎪

Σ1 + Σ3 + Σ4

⎪ k2 = 3∗(ΣΣ1 ++Σ2Σ+Σ+ Σ

3 + Σ4 )

⎪𝑘 = Σ1 + Σ2 + Σ4 (9)

 k3 3=∗ 3∗(Σ(Σ ++ Σ
Σ ++Σ
Σ Σ +) Σ )
+ (9)
 1 2 3 4
 k=4 = ΣΣ1+ +ΣΣ2 ++Σ3 Σ

⎨𝑘


3∗(Σ1 +Σ2 +Σ3 +Σ4 )
⎪ 3 ∗ (Σ + Σ + Σ + Σ )
⎪ Σ +Σ +Σ
where k1 , k2 , k3 and k4 are the weights ⎪𝑘 for= P1, P2, P3 and P4, respectively. A low level of difference
detection means a more precise and⎩larger3weight. ∗ (Σ + Σ + Σ + Σ to) the order of weights, we move the
According
wherecenter 𝑘 , 𝑘P to
𝑘 , point andthe𝑘four
areintersection
the weights points
for in 𝑃1,turn.
𝑃2,For 𝑃3example, k1 >k2 >k3 >k4 ,Awelow
and 𝑃4,ifrespectively. move theof
level center
point P to P
difference detection on the way towards
01 means a more precise P at d , then we move
1 and1 larger weight. According point P to P12 order of weights, weP2 at
01 to the on the way towards
moved2the
, then we move
center 𝑃 to Pthe
pointpoint 12 to P23 intersection
four on the way towardspoints inP3turn.at d3 ,For
andexample, if 𝑘 >𝑘
then we move >𝑘 P
point P34 on
>𝑘23 ,towe
move the center point 𝑃 to 𝑃 on the way towards 𝑃 at 𝑑 , then we move point 𝑃 to 𝑃 on the
way towards 𝑃 at 𝑑 , then we move point 𝑃 to 𝑃 on the way towards 𝑃 at 𝑑 , and then we
move point 𝑃 to 𝑃 on the way towards 𝑃 at 𝑑 . 𝑃 is the final location point. In detail, the
length of the distance moved is shown in Equation (10):
Sensors 2019, 19, 3487 12 of 19
Sensors 2019, 19 FOR PEER REVIEW 12

the way towards P4 at d4 . P34 is the final location point. In detail, the length of the distance moved is
𝑑 = |𝑃 − 𝑃 | ∗ 𝑘
shown in Equation (10): ⎧
 ⎪𝑑 = |𝑃 − 𝑃 | ∗ 𝑘
 d1 = ||P − P1 || ∗ k1 (10)
𝑑 = |𝑃 − 𝑃 | ∗ 𝑘




 d⎪2 = ||P01 − P2 || ∗ k2


|𝑃− P−3 ||𝑃∗ |k3∗ 𝑘 (10)
d⎩3𝑑= = ||P12





 d4 = ||P23 − P4 || ∗ k4

4. Results
4. Results
4.1. Experimental Setup
4.1. Experimental Setup
MAX Beacon, from a company called Bright Beacon (Chungking, China), iwas chosen as the test
beacon.MAX MAXBeacon,
Beacon is from a company
equipped with acalled Bright Beacon
Nordic51822AA unit,(Chungking,
which is a BLE China),
systemiwason achosen
chip. MAX as the
test beacon.
Beacon weighsMAX Beacon
65 g and has is equipped
a lifetime of with
2 to 3ayears
Nordic51822AA
with a broadcast unit, which
powerisofa −BLE system
30 dBm to 4ondBm,
a chip.
MAX Beacon
broadcast frequencyweighs 65 gtoand
of 100 1000hasms,a and
lifetime of 2 todistance
broadcast 3 years with a broadcast
of 3 to 100 m. With power of −30 dBm
a broadcast power to 4
of dBm,
0 dBm, broadcast frequency
we can detect of 100 to 1000
the advertising ms, and
package to asbroadcast
far as 20 distance of 3 to 100
m. By adjusting the m. With a broadcast
firmware, we can
power
make MAX of 0Beacon
dBm, we can detect
advertise in onethechannel.
advertising We package to as far station
set up a location as 20 m.with By adjusting
three MAX theBeacons.
firmware,
Thewethree
can make
MAX MAX Beacons Beacon advertiseasinMAX
are denoted one channel.
beacon1,We MAX set up a location
beacon2 and station with three
MAX beacon3. MAX MAX
Beacons.
beacon1 The three
broadcasts theMAX
messageBeacons
in CH are
37,denoted
MAX beacon2 as MAX beacon1, the
broadcasts MAX beacon2
message in and
CH 38 MAXandbeacon3.
MAX
MAX beacon1
beacon3 broadcasts broadcasts
the message the message
in CH 39. in CH 37, MAX beacon2 broadcasts the message in CH 38 and
MAX beacon3
Figure 8 showsbroadcasts the messagesetups.
two experimental in CH In 39.Figure 8a, four stations are deployed in an office
room with Figure 8 shows
a size of 5 m two experimental
× 10 setups. In
m. Some furniture Figure
(like 8a, four stations
cupboards, so as to are deployed
simulate in anWiFi
NLOS), officeAPs
room
with a size of 5 m × 10 m. Some furniture (like cupboards, so as
and devices embedded with Bluetooth (to simulate 802.11 interruption) are placed in a classroom. to simulate NLOS), WiFi APs and
devices
Figure 8b isembedded
a typical with
officeBluetooth
room, which (to simulate
is similar 802.11 interruption)
to Figure are placed
8a but with however in a aclassroom. Figure 8b
different layout.
is aoffice
This typicalroom office
is inroom,
a sizewhich
of 9 mis× similar
12 m and to filled
Figure 8a but
with a big with however
cupboard and a adifferent
desk. Thelayout. This office
experimental
room
setup is is
asin a size
real of 9 m × with
as possible, 12 m someand filled
extrawith a big cupboard
artificial interference andlike
a desk.
moving Thepeople
experimental
and WiFi setup
Aps,is as
to real
verifyas the
possible, withof
reliability some
our extra artificial
proposed interference
methods. It’s truelike
thatmoving peopleindoor
the practical and WiFi Aps, to verify
environment (likethe
reliabilitymall)
a shopping of ourmayproposed
includemethods. It’s true
several rooms andthat the practical
corridors. indoordue
However, environment (like a shopping
to the limitations of BLE
mall) mayitself,
technology include
fourseveral rooms and
station-based BLEcorridors.
trilateration However,
methoddue cantoonly
the realize
limitations of BLE
accurate technology
positioning
itself,
inside four station-based
a room, otherwise the BLENLOStrilateration
effect causedmethod can only
by walls canrealize
heavilyaccurate
contaminatepositioning
the RSS inside a room,
measures
otherwise
[32,36]. the NLOS effect caused by walls can heavily contaminate the RSS measures [32,36].

9
m

5
m

10 m 12 m

(a) (b)

Figure
Figure 8. The
8. The testtest setup:
setup: (a)(a) a classroom
a classroom (scenario
(scenario #1);
#1); (b)ananoffice
(b) officeroom
room(scenario
(scenario#2).
#2).The
Thered
redpoint
point is
thelocation
is the location station;
station; the
the gray
gray bars
bars denote
denote desks
desks and
and cupboards.
cupboards.

4.2.4.2. Performance
Performance of the
of the Algorithm
Algorithm
4.2.1. The Distance Decision Strategy
4.2.1. The Distance Decision Strategy
Some of the messages broadcast in the separate channels could be lost. The loss is random and
Some of the messages broadcast in the separate channels could be lost. The loss is random and
unpredictable, particularly in a complex environment. The typical raw data of the distance decision
unpredictable, particularly in a complex environment. The typical raw data of the distance decision
are illustrated in Figure 9a. Figure 9a demonstrates the typical distribution when we input the median
are illustrated in Figure 9a. Figure 9a demonstrates the typical distribution when we input the median
value of the sliding window into the traditional log-distance path loss model to obtain a distance;
value of the sliding window into the traditional log-distance path loss model to obtain a distance; see
Equation (1). The X-axis represents time. From 0 s to 20 s, there are only two valid channels (CH 37
channels are available.
As we addressed before, no distance value is output when the number of valid distances is one,
which is shown as a gap in Figure 9. The test uses two smartphones (Google Pixel 3 L and Huawei
P20) to evaluate the impact of device heterogeneity. For each smartphone, the RSS values of separate
channels
Sensors 2019, should
19, 3487 be collected in the offline phase at every fixed position of less than 10 m in our13study.
of 19
The range of 10 m is selected because (1) it is enough for our test field and (2) small fluctuations in
the RSS will lead to a large change in the estimated distance if a larger range is chosen. Figure 9a,b
see Equation (1). The X-axis represents time. From 0 s to 20 s, there are only two valid channels (CH 37
and Figure 9c,d demonstrate the results of the estimated distance with and without the proposed
and CH 39). From 30 s to 60 s, the valid channels are CH 37 and CH 38. From 100 s to 180 s, all three
distance decision strategy.
channels are available.

Figure9.9.Distance
Figure Distanceinferred
inferredfrom
fromthe
theinformation
informationfor
foreach
eachchannel
channelwhen
whenusing
usingthe
the(a)
(a)Google
GooglePixel
Pixel3 3
LLand
and (b) Huawei P20. Distance value output with the distance decision strategy when using the(c)
(b) Huawei P20. Distance value output with the distance decision strategy when using the (c)
Google
GooglePixel
Pixel3 3L Land
and(d)
(d)Huawei
HuaweiP20.
P20.

As we addressed before, no distance value is output when the number of valid distances is one,
In Figure 9a,b, without the distance decision strategy, the distance error in separate channels is
which is shown as a gap in Figure 9. The test uses two smartphones (Google Pixel 3 L and Huawei
posted, being as much as ten meters and even more. In contrast, the distance error when using the
P20) to evaluate the impact of device heterogeneity. For each smartphone, the RSS values of separate
distance decision strategy, as shown in Figure 9c,d, is less than 2.5 m all the time. About 75% of all
channels should be collected in the offline phase at every fixed position of less than 10 m in our study.
scans can output results with Google Pixel 3 L in figure 9c and around 67% with Huawei P20 in Figure
The range of 10 m is selected because (1) it is enough for our test field and (2) small fluctuations in the
9d, which shows the effective continuity of proposed methods. Though, the proposed methods will
RSS will lead to a large change in the estimated distance if a larger range is chosen. Figure 9a,b and
recover from no outputs quickly, see Figure 9d in 60 s. In detail, with consideration of the distance
Figure 9c,d demonstrate the results of the estimated distance with and without the proposed distance
error, Figures 9a and b show better results, implying that both the 2-Channel algorithm and the 3-
decision strategy.
Channel algorithm can output great results. There is a typical distribution in Figure 9a. We use 3-
In Figure 9a,b, without the distance decision strategy, the distance error in separate channels
Channel mostly to determine the distance. Figure 9b not only utilizes 2-Channel but also represents
is posted, being as much as ten meters and even more. In contrast, the distance error when using
the case of a single channel, which outputs no result. After approximately 170 s in Figure 9a, 2-
the distance decision strategy, as shown in Figure 9c,d, is less than 2.5 m all the time. About 75% of
Channel is adopted instead of 3-Channel, even though three separate RSSs are available, as the case
all scans can output results with Google Pixel 3 L in Figure 9c and around 67% with Huawei P20 in
cannot meet the requirement of difference detection of 3-Channel. In other words, 2-Channel and 3-
Figure 9d, which shows the effective continuity of proposed methods. Though, the proposed methods
Channel are effective at reducing the distance error to 2 m.
will recover from no outputs quickly, see Figure 9d in 60 s. In detail, with consideration of the distance
error, Figure 9a,b show better results, implying that both the 2-Channel algorithm and the 3-Channel
algorithm can output great results. There is a typical distribution in Figure 9a. We use 3-Channel
mostly to determine the distance. Figure 9b not only utilizes 2-Channel but also represents the case
of a single channel, which outputs no result. After approximately 170 s in Figure 9a, 2-Channel is
adopted instead of 3-Channel, even though three separate RSSs are available, as the case cannot meet
strategy, the complex interference influences the separate channels, which leads to a bad result. To
our knowledge, no interference can have the same effect on all separate channels. More carefully,
Table 3 shows that for different smartphones, the mean distance error can be less than 2.3 m in such
a complicated and changing indoor environment. The mean distance error becomes larger when the
Sensors 2019,
real distance 19, 3487 and smaller when the real distance decreases. The algorithm aims to avoid
increases 14 of 19
sudden interference as much as possible rather than facing unpredictable and complicated indoor
environments. Therefore, the distance decision strategy possesses the ability to recover from a
the requirement of difference detection of 3-Channel. In other words, 2-Channel and 3-Channel are
complicated indoor environment efficiently and effectively.
effective at reducing the distance error to 2 m.
In our experiment, by using separate signal-attenuation models and the distance decision strategy,
Table 3. The mean distance error with increasing distance for different phones.
the complex interference influences the separate channels, which leads to a bad result. To our
Dist. (m)
knowledge, 0.2
no interference 1.4
can have2.6
the same3.8effect on
5.0all separate
6.2 channels.
7.4 8.6 carefully,
More 9.8 Table 3
shows that for different smartphones, the mean distance error can be less than 2.3 m in such a
Error (m)
complicated
Google Pixeland 3 L changing
0.1
indoor
0.2
environment.
0.8 1.1
The mean
1.2
distance
1.5
error 1.2
becomes 1.9
larger when
2.0
the real
distance
Huawei increases
P20 and
0.1 smaller
0.4 when 0.1
the real distance
1.4 decreases.
1.3 The algorithm
1.5 1.3 aims
1.8 to avoid
2.3 sudden
interference as much as possible rather than facing unpredictable and complicated indoor environments.
Therefore, the distance decision strategy possesses the ability to recover from a complicated indoor
4.2.2.environment
The Weighted efficiently and effectively.
Trilateration
To obtain the performance of weighted
Table 3. The mean distancetrilateration deriveddistance
error with increasing from thefordistance
differentdecision
phones. strategy,
an experimental setup with the Google Pixel 3 L is set up, as shown in Figure 8, with four stations,
where 46 points are uniformlyDist.distributed.
(m) The experiments are carried out by testing at one point
Error (m) 0.2 1.4 2.6 3.8 5.0 6.2 7.4 8.6 9.8
(the center of the block) 100 times to calculate the mean absolute error of the positioning results. Each
center of the grid inGoogle
FigurePixel 3 L
10 denotes a0.1 0.2
test position, 0.8 1.1
excluding 1.2 1.5
the black 1.2
ones, 1.9
which 2.0
depict the
Huawei P20 0.1 0.4 0.1 1.4 1.3 1.5 1.3 1.8 2.3
actual distribution of stations.
In the experiment, the distance between the farthest point and one of the stations is 5 m, and the
4.2.2. The Weighted Trilateration
mean absolute error of the algorithm above is less than 2.4 m at all the points (see Figure 10). This
shows theTo great performance
obtain of weighted
the performance trilateration
of weighted according
trilateration to the
derived decided
from distance.
the distance The mean
decision strategy,
absolute error decreases
an experimental when
setup thethe
with position
Google is Pixel
closer3to L the station
is set up, asand increases
shown when8,the
in Figure position
with is
four stations,
far from
where the46station. Similarly,
points are uniformlythe distributed.
error valuesThe nearexperiments
the WiFi APs and devices
are carried out byembedded withpoint
testing at one
Bluetooth are larger
(the center of thethan those
block) 100oftimes
positions that are
to calculate thefar away.
mean The experiment
absolute error of theshows that our
positioning results.
proposed algorithm
Each center could
of the grid obtain
in Figurea distance
10 denotes mean
a testerror of lessexcluding
position, than 2.4 the
m in scenario
black ones, #1 withdepict
which the the
Google Pixel
actual 3 L.
distribution of stations.

FigureFigure
10. Heatmap of positioning
10. Heatmap mean mean
of positioning absolute error (MAE).
absolute error (MAE).

MoreInimportantly, a comparison
the experiment, between
the distance between different algorithms
the farthest point andin scenario
one of the#1stations
with the
is 5Google
m, and the
Pixelmean
3 L should beerror
absolute carried out.
of the Table 4 reveals
algorithm above isthe
lesssymbols
than 2.4 denoting
m at all thethe different
points algorithms,
(see Figure and
10). This shows
table the
5 illustrates the mean absolute error of the different algorithms. Specifically, in a comparison
great performance of weighted trilateration according to the decided distance. The mean absolute of
the precision of thewhen
error decreases distance errors, aggregate
the position is closer tosignal-attenuation modelswhen
the station and increases withthenormal distance
position is far from
decision (𝐴 +𝐵 ), separate signal-attenuation models with normal distance decision
the station. Similarly, the error values near the WiFi APs and devices embedded with Bluetooth (𝐴 +𝐵 ) or a are
larger than those of positions that are far away. The experiment shows that our proposed algorithm
could obtain a distance mean error of less than 2.4 m in scenario #1 with the Google Pixel 3 L.
More importantly, a comparison between different algorithms in scenario #1 with the Google Pixel
3 L should be carried out. Table 4 reveals the symbols denoting the different algorithms, and table
5 illustrates the mean absolute error of the different algorithms. Specifically, in a comparison of the
precision of the distance errors, aggregate signal-attenuation models with normal distance decision
Sensors 2019, 19, 3487 15 of 19

(A1 + B1 ), separate signal-attenuation models with normal distance decision (A2 + B1 ) or a combination
of separate signal-attenuation models and the distance decision strategy (A2 + B2 ) is adopted to show
the distance error in relation to one of the four stations. Furthermore, in a comparison of the precision
of the positioning errors, aggregate signal-attenuation models with the distance decision strategy
and traditional trilateration (A1 + B1 + C1 ) or separate signal-attenuation models with the distance
decision strategy and traditional trilateration (A2 + B2 + C1 ) or weighted trilateration (A2 + B2 + C2 )
are intensively utilized to analyze the distinct results.

Table 4. Symbols denoting different algorithms.

Algorithm Symbol
Aggregate Channel A1
Separate Channel A2
Normal Distance Decision B1
Proposed Distance Decision B2
Traditional Trilateration C1
Weighted Trilateration C2

In theory, a wrong distance estimated from any channel will destroy the fusion result in the
online phase. The traditional method will adopt all channel information, despite of large error in
certain channel. However, the proposed method in this study fully consider the situation of one or
two channel’s failure in the distance decision. Additionally, three aggregate distances fused with
2-Channel or 3-Channel (A1 + B2 ) is not good as our proposed fusion methods (A2 + B2 ) due to that
the value of separate channel has the lower variance than value of aggregated channel. Unfortunately,
the unstable RSS of aggregate channel make 2-Channel and 3-Channel not working at most of time.
All the reason is that the proposed fusion method has a more pure and more stable source data than
the aggregated method.
Table 5 shows the different results of the different algorithms. 0 A1 + B1 ’ cannot obtain a perfect
result in our real indoor environment because the distance error can be 8.5 m at 98%. The result of
0 A + B0 could be better, but the MAE is not stable. Furthermore, 0 A + B0 can improve the resulting
2 1 2 2
MAE greatly to 2.0 m at 90%. In view of the positioning error, 0 A1 + B1 + C01 can yield 12.8 m at
98%. For 0 A2 + B2 + C02 , we can obtain a better result, that is, 2.2 m at 90%, in contrast to the result of
0 A + B + C0 with a 90% error, that is, 3.6 m. To test our proposed methods using different smartphones
2 2 1
in different scenarios, more experiments should be conducted.

Table 5. Comparison of the precision of the mean absolute error (m).

Mean Absolute Error Algorithm 90% 98%


A1 + B1 (Tradition) 7.1 8.5
Distance Error A2 + B1 (Test) 4.6 5.2
A2 + B2 (Proposed) 2.0 2.2
A1 + B1 + C1 (Tradition) 8.8 12.8
Positioning Error A2 + B2 + C1 (Test) 3.6 4.3
A2 + B2 + C2 (Proposed) 2.2 2.5

Strictly speaking, the “A1 + B1 ” is the aggregated (fusion) methods, and the “A2 + B2 “ is the
proposed methods (separate channel plus distance decision). For positioning, the “A1 + B1 + C1 ” is
the most method with traditional trilateration, and the “A2 + B2 + C1 ” is completely proposed by our
study with weighted trilateration.
Here, three experiments are set up: (1) Google Pixel 3 L in scenario #1; (2) Huawei P20 in scenario
#1; and (3) Google Pixel 3 L in scenario #2. Experiments (1) and (2) aim to evaluate the effect of
Sensors 2019, 19, 3487 16 of 19

different smartphones in the same scenario, while experiments (1) and (3) explore the effect of the same
smartphone in different scenarios.
In2019,
Sensors experiment (1),REVIEW
19 FOR PEER the distance error of traditional methods is 8.5 m at 98%, and the result of test 16
methods is 5.2 m at 98%, but they are not stable. Our proposed methods can improve the error to
2.0
m atm 90%.
at 90%. In view
In view of of
thethe positioning
positioning error,traditional
error, traditionalmethods
methodsyields
yields12.8
12.8mm at
at 98%,
98%, and proposed
methods is 2.2 2.2 mmatat90%,
90%,inincontrast
contrasttotothe
the result
result of of test
test methods
methods with
with a 90%
a 90% error,
error, namely,
namely, 3.6 see
3.6 m; m;
Figure
see 11a,b.
Figure Errors
11a,b. willwill
Errors change for different
change for different smartphones.
smartphones.

Figure 11.
Figure 11. CDF values
values ofof the
the distance
distanceerror
errorand
andpositioning
positioningerror
errorwhen
whenusing
usingthe
the(a,b)
(a,b) Google
Google Pixel
Pixel 3 L3
L in scenario #1; (c,d) Huawei P20 in scenario #1; and (e,f) Google Pixel 3 L in scenario
in scenario #1; (c,d) Huawei P20 in scenario #1; and (e,f) Google Pixel 3 L in scenario #2. #2.

In experiment
experiment (2), the Huawei P20 is used in scenario #1, and the curve of the CDF is more more
dispersed
dispersed thanthanthe theone
oneininFigure
Figure11a.
11a.TheThedistance
distance error of of
error traditional methods
traditional methods is 5.7 m atm50%,
is 5.7 andand
at 50%, the
result of test
the result of methods is 3.8 is
test methods m3.8
at 50%.
m at The
50%.distance error of
The distance traditional
error methods
of traditional is 9.1 misat9.1
methods 98%,
m and the
at 98%,
result
and theof test
resultmethods
of test ismethods
5.8 m at is 98%,5.8 both
m atof98%,
which are of
both higher
which values than those
are higher in experiment
values than those (1)in
because
experimentdifferent smartphones
(1) because have
different different responses
smartphones owing toresponses
have different different chips,
owingelectric circuits
to different and
chips,
materials being and
electric circuits used.materials
The result shows
being thatThe
used. theresult
Google Pixelthat
shows 3 L has
the aGoogle
better Pixel
response
3 L than
has athat of
better
the Huawei
response thanP20 in scenario
that of the Huawei#1. Luckily,
P20 inour proposed
scenario methodsour
#1. Luckily, canproposed
obtain anmethods
error of can
2.2 m at 90%,
obtain an
which
error ofis2.2
close
m atto 90%,
the performance
which is close of to
thethe
Google Pixel 3 L.
performance ofThe result ofPixel
the Google proposed
3 L. Themethods
result ofimplies that
proposed
the distance
methods decision
implies that strategy
the distancecan decision
output a strategy
good result
can even
output when
a goodworse results
result evenappear for different
when worse results
smartphones.
appear for differentIn viewsmartphones.
of the positioningIn viewerror,
of traditional methods
the positioning result
error, in a value
traditional of 14.0result
methods m at 98%,
in a
and
valueproposed
of 14.0 mmethodsat 98%, result in a value
and proposed of 2.4 m
methods at 90%,
result in a in contrast
value of 2.4tomthe resultinofcontrast
at 90%, test methods
to the
with
resulta of
90%testerror, namely,
methods with4.5 m. The
a 90% error, positioning
namely, 4.5error results
m. The add credibility
positioning to theadd
error results ideacredibility
that our
proposed
to the ideamethods
that ourcan recovermethods
proposed from a bad can response withasmartphones
recover from bad responseinwith terms of the distance
smartphones and
in terms
of the distance and positioning errors; see Figure 11c,d. Experiments (1) and (2) show the reliability
in the heterogeneity of smartphones.
In experiment (3), the Google Pixel 3 L is used in scenario #2. Fewer WiFi APs or devices
embedded with Bluetooth but more space are used in scenario #2, which depicts an office room. The
distance error of traditional methods is 8.5 m at 98%, and the result of test methods is 5.1 m at 98%,
Sensors 2019, 19, 3487 17 of 19

positioning errors; see Figure 11c,d. Experiments (1) and (2) show the reliability in the heterogeneity
of smartphones.
In experiment (3), the Google Pixel 3 L is used in scenario #2. Fewer WiFi APs or devices embedded
with Bluetooth but more space are used in scenario #2, which depicts an office room. The distance error
of traditional methods is 8.5 m at 98%, and the result of test methods is 5.1 m at 98%, both of which
are smaller than those in experiment (1) because the influence of some devices running in 802.11 [21]
is smaller. The result shows that scenario #2 is purer than scenario #1. Of course, the performance
of proposed methods can be improved because the distance error is calculated in relation to one
station, whose distance error is 2.1 m at 98%. Different scenarios yield different results. In view of the
positioning error, traditional methods yields a value of 13.9 m at 98%. Test methods yield a value of
3.9 m at 90%, and proposed methods, a value of 2.4 m at 90%. The positioning error is slightly larger
than that in scenario #1. In the experimental setup, the distance error is larger when the smartphone
is far from the station, which affects the positioning error. Additionally, our proposed methods can
recover in different scenarios (see Figure 11c,d). It is apparent that a more precise result can be
obtained when more location stations are deployed, but this will lead to higher cost and complexity.
Experiments (1) and (3) show the reliability in the heterogeneity of environment.
In summary, Figure 11 demonstrates the CDF (cumulative distribution function) of different
algorithms for different smartphones in different scenarios. The proposed methods (separate channel
plus distance decision) is better than the aggregated (fusion) methods in estimating distance.
Even different smartphones have different responses: The proposed methods can output a distance
with less error. Similarly, the proposed methods with weighted trilateration can output a stable and
precise position in different scenarios, making it better than the most methods with traditional
trilateration. The advantage of our proposed methods is demonstrated above in the stability
of data source, the robustness against complex indoor environment, the effective continuity of
outputting results, the powerful recovery from inactive state, the reliability in the heterogeneity of
smartphones environments.

5. Conclusions and Future Work


This paper proposed an adaptable and robust algorithm based on separate channels, separate
signal-attenuation models, the distance decision strategy and weighted trilateration using BLE
beacons with off-the-shelf smartphones. The experimental results show that the proposed methods
(separate channel plus distance decision) for obtaining the distance accuracy yields values less than 2.2 m
at 90%; moreover, the result of the aggregated (fusion) methods was 7.1 m for different smartphones.
In addition, the proposed methods with weighted trilateration for achieved the positioning accuracy
of less than 2.4 m at 90% from 3.6 m away with the most methods with traditional trilateration.
The positioning error was reduced by 33% to 38% for different building environments. Based on the
test results, we conclude that the method is robust and precise for indoor positioning with BLE beacons
and smartphones.
In the future, much of this work could be improved. The system should be improved to a
decimeter positioning system that can handle greater demands and more stations, resulting in more
accuracy. First, the positioning errors of different deployments of stations should be investigated.
Second, complicated interference, such as interruption at the same radio frequency, should be explored
and at least minimized. The measurement of interference can provide a reference for reducing any
negative influence on indoor positioning. Last, the new standard of Bluetooth 5.1 can supply a method
for measuring the AOA and AOD with off-the-shelf products rather than simply simulating data [19].
Combining the information from separate channels with AOA and AOD should be considered.
Above all, a more precise, robust, cheap, easily deployed, popular and well-maintained system for
indoor positioning should be put forward.
Sensors 2019, 19, 3487 18 of 19

Author Contributions: B.H.: Writing−original draft, formal analysis, investigation, validation, software; J.L.:
Methodology, funding acquisition; W.S.: Data curation; F.Y.: Writing−review & editing, visualization.
Funding: This study was supported in part by the National Natural Science Foundation of China (Grant No.
41804016), the China Postdoctoral Science Foundation (Grant No. 2017M622517), the National Research
Development Program of China under Project No. 2016YFB0502204, the Technology Innovation Program
of Hubei Province under Project No. 2018AAA070, the Natural Science Fund of Hubei Province under Project No.
2018CFA007 and the Key Laboratory of Precise Engineering and Industry Surveying, National Administration of
Surveying, Mapping and Geoinformation under Grant No. PF2017−11.
Conflicts of Interest: The authors declare no conflict of interest.

References
1. Li, D.; Shen, X.; Li, D.; Li, S. On civil-military integrated space-based real-time information service system.
Geomat. Inf. Sci. Wuhan Univ. 2017, 42, 1501–1505.
2. Gu, Y.; Anthony, L.; Ignas, N. A survey of indoor positioning systems for wireless personal networks.
IEEE Commun. Surv. Tut. 2009, 11, 13–32. [CrossRef]
3. Dardari, D.; Pau, C.; Petar, M.D. Indoor tracking: Theory, methods, and technologies. IEEE Trans. Veh.
Technol. 2015, 64, 1263–1278. [CrossRef]
4. Liu, H.; Darabi, H.; Banerjee, P.; Liu, J. Survey of wireless indoor positioning techniques and systems.
IEEE Trans. Syst. Man Cybern. Part C 2007, 37, 1067–1080. [CrossRef]
5. Shieh, W.Y.; Hsu, C.J.; Wang, T.H. Vehicle positioning and trajectory tracking by infrared signal-direction
discrimination for short-range vehicle-to-infrastructure communication systems. IEEE Trans. Intell. Transp.
Syst. 2017, 19, 368–379. [CrossRef]
6. Ma, F.; Liu, F.; Zhang, X.; Wang, P.; Bai, H.; Guo, H. An ultrasonic positioning algorithm based on maximum
correntropy criterion extended Kalman filter weighted centroid. Signal Image Video Process. 2018, 12, 1207–1215.
[CrossRef]
7. Lee, N.; Ahn, S.; Han, D. AMID: Accurate magnetic indoor localization using deep learning. Sensors 2018, 18, 1598.
[CrossRef]
8. Liu, J.; Chen, R.; Pei, L.; Guinness, R.; Kuusniemi, H. A hybrid smartphone indoor positioning solution for
mobile LBS. Sensors 2012, 12, 17208–17233. [CrossRef] [PubMed]
9. Liu, J.; Chen, R.; Chen, Y.; Pei, L.; Chen, L. iParking: An intelligent indoor location-based smartphone
parking service. Sensors 2012, 12, 14612–14629. [CrossRef]
10. Wu, T.; Liu, J.; Li, Z.; Liu, K.; Xu, B. Accurate smartphone indoor visual positioning based on a high-precision
3D photorealistic map. Sensors 2018, 18, 1974. [CrossRef]
11. Mandal, A.; Lopes, C.V.; Givargis, T.; Haghighat, A.; Jurdak, R.; Baldi, P. Beep: 3D indoor positioning
using audible sound. In Proceedings of the 5th Consumer Communications and Networking Conference,
Las Vegas, NV, USA, 3–6 January 2005.
12. Rishabh, I.; Kimber, D.; Adcock, J. Indoor localization using controlled ambient sounds. In Proceedings of
the 3rd International Conference on Indoor Positioning and Indoor Navigation (IPIN), Sydney, Australia,
13–15 November 2012.
13. Li, Z.; Liu, J.; Yang, F.; Niu, X.; Li, L.; Wang, Z.; Chen, R. A bayesian density model based radio signal
fingerprinting positioning method for enhanced usability. Sensors 2018, 18, 4063. [CrossRef] [PubMed]
14. Faragher, R.; Robert, H. Location fingerprinting with Buetooth low energy beacons. IEEE J. Sel. Area.
Commun. 2015, 33, 2418–2428. [CrossRef]
15. Li, W.; Wei, D.; Lai, Q.; Li, X.; Yuan, H. Geomagnetism-aided indoor Wi-Fi radio-map construction via
smartphone crowdsourcing. Sensors 2018, 18, 1462. [CrossRef] [PubMed]
16. Yang, Z.; Zhou, Z.; Liu, Y. From RSSI to CSI: Indoor localization via channel response. Acm Comput. Surv.
2013, 46, 25. [CrossRef]
17. Yang, F.; Xiong, J.; Liu, J.; Wang, C.; Li, Z.; Tong, P.; Chen, R. A pairwise SSD fingerprinting method of
smartphone indoor localization for enhanced usability. Remote Sens. 2019, 11, 566. [CrossRef]
18. Wu, Z.; Jiang, L.; Jiang, Z.; Chen, B.; Liu, K.; Xuan, Q.; Xiang, Y. Accurate indoor localization based on CSI
and visibility graph. Sensors 2018, 18, 2549. [CrossRef] [PubMed]
Sensors 2019, 19, 3487 19 of 19

19. Liu, J.B.; Huang, B.C.; Zhang, B.; Li, L.L.; Yang, F.; Zhang, Z.B.; Li, Z.; Tong, P.F. AOA estimation based
on channel state information extracted from WiFi with double antenna. Geomat. Inf. Sci. Wuhan Univ.
2018, 43, 2167–2172.
20. Faragher, R.; Robert, H. An analysis of the accuracy of Bluetooth low energy for indoor positioning
applications. In Proceedings of the 27th International Technical Meeting of the Satellite Division of The
Institute of Navigation (ION GNSS + 2014), Tampa, FL, USA, 8–12 September 2014.
21. Powar, J.; Gao, C.; Harle, R. Assessing the impact of multi-channel BLE beacons on fingerprint-based
positioning. In Proceedings of the 8th International Conference on Indoor Positioning and Indoor Navigation
(IPIN), Sapporo, Japan, 18–21 September 2017.
22. Tomic, S.; Beko, M.; Dinis, R.; Bernardo, L. On target localization using combined RSS and AoA measurements.
Sensors 2018, 18, 1266. [CrossRef]
23. Li, G.; Geng, E.; Ye, Z.; Xu, Y.; Lin, J.; Pang, Y. Indoor positioning algorithm based on the improved RSSI
distance model. Sensors 2018, 18, 2820. [CrossRef]
24. Hashemi, H. The indoor radio propagation channel. Proc. IEEE 1993, 81, 943–968. [CrossRef]
25. Nikoukar, A.; Abboud, M.; Samadi, B.; Güneş, M.; Dezfouli, B. Empirical analysis and modeling of Bluetooth
low-energy (BLE) advertisement channels. In Proceedings of the 17th Annual Mediterranean Ad Hoc
Networking Workshop (Med-Hoc-Net), Capri, Italy, 20–22 June 2018.
26. Kim, D.Y.; Kim, S.H.; Choi, D.; Jin, S.H. Accurate indoor proximity zone detection based on time window
and frequency with Bluetooth low energy. Procedia Comput. Sci. 2015, 56, 88–95. [CrossRef]
27. Ozer, A.; John, E. Improving the accuracy of Bluetooth low energy indoor positioning system using kalman
filtering. In Proceedings of the 3rd International Conference on Computational Science and Computational
Intelligence (CSCI), Las Vegas, NV, USA, 15–17 December 2016.
28. Ishida, S.; Takashima, Y.; Tagashira, S.; Fukuda, A. Proposal of separate channel fingerprinting using
Bluetooth low energy. In Proceedings of the 5th IIAI International Congress on Advanced Applied
Informatics (IIAI-AAI), Kumamoto, Japan, 10–14 July 2016.
29. Giovanelli, D.; Farella, E.; Fontanelli, D.; Macii, D. Bluetooth-based indoor positioning through ToF and RSSI
data fusion. In Proceedings of the 9th International Conference on Indoor Positioning and Indoor Navigation
(IPIN), Nantes, France, 24–27 September 2018.
30. Viswanathan, S.; Srinivasan, S. Improved path loss prediction model for short range indoor positioning using
Bluetooth low energy. Proceedings of 14th IEEE Sensors Conference, Busan, Korea, 1–4 November 2015.
31. Yu, N.; Zhan, X.; Zhao, S.; Wu, Y.; Feng, R. A precise dead reckoning algorithm based on Bluetooth and
multiple sensors. IEEE Internet Things J. 2017, 5, 336–351. [CrossRef]
32. Cantón, P.V.; Calveras, A.A.; Paradells, A.J.; Pérez, B.M. A Bluetooth low energy indoor positioning system
with channel diversity, weighted trilateration and kalman filtering. Sensors 2017, 17, 2927. [CrossRef]
[PubMed]
33. Zhuang, Y.; Yang, J. Smartphone-based indoor localization with Bluetooth low energy beacons. Sensors
2016, 16, 596. [CrossRef] [PubMed]
34. Perreault, S.; Hébert, P. Median filtering in constant time. IEEE Trans. Image Process. 2007, 16, 2389–2394.
[CrossRef] [PubMed]
35. Jo, H.J.; Kim, S. Indoor smartphone localization based on LOS and NLOS identification. Sensors 2018, 18, 3987.
[CrossRef] [PubMed]
36. Jian, Y.Z.; Hai, Y.L.; Zi, L.C.; Zhao, H.L. RSSI based Bluetooth low energy indoor positioning. Proceedings of
5th International Conference on Indoor Positioning & Indoor Navigation, Busan, Korea, 27–30 October 2014.

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access
article distributed under the terms and conditions of the Creative Commons Attribution
(CC BY) license (http://creativecommons.org/licenses/by/4.0/).

You might also like