1. Introduction
Localization is an important function of mobile devices. Smartphones, tablets, and wireless network devices provide not only communication functions but, thanks to being able to measure one’s current location, can also help users navigate and provide location-based services [
1]. Mobile devices are now equipped with multiple radio interfaces that can be used to estimate device location. Bluetooth and GPS receivers exist in almost every smartphone. There are also many indoor positioning systems (IPSs) based on available WiFi. Most positioning systems are based on a single technology, but there are also hybrid positioning systems available for finding the location of a mobile device using several different positioning technologies. According to the Cisco Visual Networking Index [
2], in 2018 there were approximately 20 billion networking devices, of which 24% were smartphones. This shows that there is an enormous market of devices capable of using different indoor and outdoor positioning techniques.
Most positioning systems are based on measurements coming from one technology. GPS technology has become the most widely deployed solution [
3], with billions of devices using it for outdoor-location measurements. There were trials for also using GPS for indoor positioning, see, e.g., Reference [
4], but due to the high attenuation of walls, in most applications GPS was not suitable for IPS systems. Multiple other technologies for location estimation were developed based on infrared, magnetism, radio waves, sound, or visual light information. Between those, two technologies became very popular: WiFi indoor positioning [
5], due to the high availability of WiFi devices, and Bluetooth Low Energy (BLE), thanks to battery-powered beacons. Nevertheless, the GPS remains a main source of location functions, with other, less accurate methods mainly being used when GPS signal is unavailable.
Most smartphones are now equipped with GPS, WiFi, and Bluetooth, allowing the use any of those three technologies for positioning. The selection method that location techniques use in a specific location is still an open question. The simplest solution (but widely used) is to use the most accurate available technology, for example, using the GPS when signal is available, and location-based 3G and WiFi AP received signal strength indication (RSSI) measurements when the GPS signal is unavailable. Operating systems for mobile devices, such as Google Android or iOS, provide location API functions to retrieve the current location [
6,
7]. Nevertheless, when positioning systems based on WiFi or BLE are deployed, it is an unresolved challenge to merge the information provided by various sources. While WLAN and BLE positioning are mainly used indoors, there are many cases in which they can also be used outdoors. For example, Zou et al. [
8] described an energy-efficient scheme for indoor- and outdoor-location-based services running on the mobile devices based on iBeacon technology; Zhang et al. [
9] used crowdsourcing to develop WiFi fingerprint positioning. WiFi signals are omnipresent in cities and BLE beacons are deployed to support mobile applications with guide functions in places like castles [
10] or cities [
11].
There are a few examples of hybrid location-estimation techniques that gather information from two radio technologies to estimate location. Baniukevic et al. [
12] employed both Wi-Fi and Bluetooth in one system and used fingerprinting, which requires gathering information about signal maps for both technologies. A similar approach was to create a fusion of WiFi and Bluetooth fingerprinting in which RSS measurements were compared against the fingerprints of the points within the previously determined zone, using Bluetooth to increase precision [
13]. Another paper [
14] presented a smartphone indoor-positioning engine named HIPE that merged information from different smartphone sensors to resolve position estimates with the application of Hidden Markov Model (HMM) problems, a grid-based filter, and the Viterbi algorithm. There are many other solutions that use a special-purpose hardware unit to observe the WLAN-RSSI with the merger of other radio-signal measurements for indoor positioning by fingerprinting [
15]. However, all these techniques depend on the precision of the signal level maps, which are costly to obtain and are required to provide measurements for each location technology.
The aggregation of location information provided by various sources is not a simple task, as location measurements are provided in different time instants and intervals (e.g., most GPS interfaces by default provide location data once per second, while BLE beacons may be transmitted every 300 ms, and WLAN beacons are by default transmitted every 100 ms). Aggregation needs to take into account measuring-device movements between moments at which the location measurements are gathered. A device moving even at quite a low speed may move between two consecutive measurements by a few meters (e.g., a bicycle moving with a speed of 18 km/h traverses 5 m between two GPS location measurements). In Reference [
16], the authors proposed an energy-efficient prediction-based method for target tracking, taking into account the distance from the predicted location and remaining node energy. Nevertheless, the proposed method is based only on a single source of location information.
The fusion of the outcome of two location techniques was previously discussed [
17]. Bayesian filtering and data-level fusion with the merger of a simulated annealing algorithm was used to obtain a position estimate. In another paper [
18], GPS information was merged with an inertial navigation system using Kalman filters for effective land-vehicle localization. Another solution is to use one technology to improve the accuracy of another, for example, in Reference [
19], Ultra wideband (UWB) nodes used GPS signal to establish a fine degree of synchronization, resulting in more accurate positional determination via UWB. It allows to provide very precise measurements, but requires specialized hardware and data processing. All of the above listed techniques are based on the specifics of two (or more) particular location technologies and do not allow to merge the outcome of different location techniques in a generic way, taking into account the difference in the measurement time of the technologies. Another issue is that error characteristics for GPS, WLAN, and BLE are significantly different, which makes it almost impossible to use the average of many measurements into a single, more accurate location estimation.
The rest of the paper is organized as follows: in
Section 2 we describe the proposed method of location-measurement aggregation, in
Section 3 we describe the methodology of error-estimation aggregation, and in
Section 4 we show the simulation results. We finish with our conclusions in
Section 5.
2. Proposed Location-Aggregation Method
The main idea of the proposed location-aggregation algorithm is to discover a point in which the probability of finding a mobile node is the largest at a given moment of time. For this purpose, it is necessary to estimate the distribution errors of each available system used for localization and to find a location in which probability multiplication of the presence according to all location-information sources (e.g., GPS, WLAN, or BLE) is highest. In addition, when the device is moving, more recent measurements more precisely represent its current position. This is due to the error caused by the change of location, that is, the movement of the device between the time at which the measurement was made and the current time is smaller. This is taken into account by weights, which are described in detail in
Section 2.5.
2.1. Error-Distribution Fitting
Simulation of the behavior of analyzed methods requires fitting probability density functions to real data as, to the best of the authors’ knowledge, there are no papers showing the analytical probability distribution functions of WLAN or BLE localization systems. The main purpose is the estimation of the error distributions of individual location-estimation methods. During the fitting procedure, a well-known heuristic algorithm called particle-swarm optimization [
20] was applied [
21].
This method imitates a swarm intelligence (e.g., fish, birds). During consecutive iterations, points move to new places in the domain considering their own best position in history, the best position of the swarm, and randomness, according to the following equations:
where
,
are the localization and velocity of the
i-th point during the
j-th iteration, respectively.
is the best position (with the highest value of an evaluation function) of
i-th point,
is the best position of the swarm and
is the current position of
i-th point.
,
are coefficients,
is a pseudorandom number from interval
. In this case,
,
, according to Reference [
22].
On the basis of real data, three gamma distributions were estimated, associated with the analyzed methods. The hypothesis that gamma distribution is a good approximation of distribution errors was taken because the histograms of the location methods present in the literature show that error probability distributions are left-skewed and have long right tails. The calculations presented in following subsections confirm these arguments.
2.2. GPS
In the case of the GPS, the probability density function was generated by using data coming from the Federal Aviation Administration in Washington [
23]. A sample was composed of more than 255 million elements. The data provide measurements with horizontal errors in meters, divided into 0.1 m width intervals in the range from 0 to 13.6 m:
where
is the number of elements in
i-th bin of the histogram.
Such data are normalized and used to fit the probability density function of errors. Normalization means the division of each grid point by the total number of occurrences and multiplication by interval length (0.1 m) to ensure that
. It is required to go from a discrete to a continuous distribution. Thus,
In the presented case,
.
Figure 1 shows an empirical probability density function of GPS horizontal error based on the described data. The analytical function needs to be matched to these data to represent the GPS error in the model. To find such a function, the optimization procedure was used to find the function parameters that provided the smallest root-mean-squared error. The goal function of the optimization has following form:
where
is a value of the gamma distribution with a shape parameter
k and a scale parameter
in
i-th point of grid,
is the probability of a specific error in
i-th point of grid,
.
The appropriate probability density function was estimated by using particle-swarm optimization (30 particles, 1000 epochs). The exact results are available in
Table 1. It turned out that gamma distribution with a shape parameter
and a scale parameter
was a proper choice for fitting empirical values from GPS. This distribution was also proposed in Referehce [
24]. It yields to the following equation:
A graph of the probability density function of gamma distribution with adjusted parameters can be seen in
Figure 2. GPS is the most accurate from three described methods, but it gives results only every 1000 ms.
2.3. WLAN
The second applied method for collecting localization data is based on Wireless LAN fingerprinting [
25]. It was proposed for indoor localization and has lower accuracy than the GPS, but is also available in many outdoor locations, where multiple WiFi APs are deployed. It is also possible to get a frequent output of measurements because WiFi beacons are transmitted every 100 ms. Similarly, particle-swarm optimization was used to designate the gamma-distribution parameters: gamma distribution represents well error characteristics in positioning methods based on fingerprinting [
26]. According to values of cumulative distribution function (CDF) representing the localization error of a method based on kernel principal-component analysis (Figure 9 in Reference [
25]), following evaluation function
that was created:
Heuristic methods indicated that
(a shape parameter) and
(a scale parameter) were good choices for gamma distribution. The obtained results enable to create a pattern for probability density function:
Equation (
7) graph is shown in
Figure 3. It is possible to see that the most likely error value in the case of the method based on WLAN is about one meter.
2.4. BLE Beacons
The third method used for localization of a mobile node concerns BLE beacons. Error distribution was estimated on the basis of error values shown in Table 6.6 in Reference [
27]. Assessment was not as good as in previous cases because the available data were not so detailed, but it was enough for reliable simulations. Again, gamma-distribution parameters were fitted using particle-swarm optimization. Evaluation function
, designated, for minimization is as follows:
where
k and
are the shape and scale parameters of gamma distribution, respectively. The least value of Equation (
8) was achieved by using
and
, which led to the following probability density function:
A graph of Equation (
9) is presented in
Figure 4. This method is the least accurate of the three described approaches, thus providing the biggest localization error of, in most cases, more than two meters. Despite this, thanks to the low cost of the beacons, localization based on BLE is becoming increasingly popular.
The distribution errors of three presented methods were estimated. They are shown together in
Figure 5. Thanks to such an estimation technique, a bigger impact on a value of
has more precise modules: the maximum of
, and
is equal to 0.88, 0.49, and 0.38, respectively.
2.5. Location Aggregation
The location-aggregation algorithm uses the multiplication rule for independent events to find a location, for which the coincidence of errors for each method is highest. This approach is similar to the maximum-likelihood method. There are multiple sources of location information, in the analyzed case, coming from GPS, WLAN, and BLE positioning systems. The point at which the product of each of the methods’ error PDF is highest was selected as a candidate. It was assumed that this is the location in which the measured device is most likely present. The goal of the algorithm is realized through maximizing a value of evaluation function
:
where
is the Euclidean distance between
i-th point of a given method (GPS, WLAN, or BLE) and a calculated point
. Thus,
is a solution of the issue. Because of the estimation of errors by using gamma distributions,
is unimodal function, so
has a unique solution that is the method output. It is now necessary to precisely describe the components of
.
Location measurement by different methods is done at different time instants. In this paper, three sources of location information of the mobile node are considered: GPS, WLAN, and BLE beacons. It is assumed that GPS sends location data every 1000 ms, WLAN has an interval of 100 ms, and BLE beacons transmit data every 300 ms. Those are the default intervals at which following devices output location measurements. Furthermore, it is the smallest interval in which location measurements are possible. The aggregated location is calculated every 250 ms.
Within one time window (250 ms), it is possible to obtain two or three measurements from the system based on WLAN, zero or one from GPS, and, similarly, zero or one measurement of location information from BLE beacons. Hence, all the collected data from previous computations were used in the calculations. If any system (GPS or BLE), however, did not provide information in the previous window, the latest measurement from such a method was attached to the calculations. So, in the presented case, , or 3 and . Furthermore, the meaning of coefficients needed to be clarified (t is a current time and is the time at which i-th measurement was delivered). These are weighting factors that define the importance of subsequent summands. The smaller a difference is, the higher the value that the corresponding coefficient has. This means that the newest data have the biggest impact on the final result.
To find the estimated location, the maximum of function needs to be found. For this purpose, two approaches were compared: the grid method, and the local-search heuristic algorithm. The first is based on grid generation: the domain of the search is divided into squares with an equal size (for the sake of the analysis, 1 cm cm was used). Then, the value of is calculated in each square. Coordinates in which the square with the maximum value of is located are an output of this method. While this approach is computationally complex, it is simple in implementation, and allows to achieve the desired accuracy by changing the size of the square.
The second technique, local search, is a relatively simple and widely used optimization method [
28]. It has lower computational complexity, as it does not require calculating the values of
in so many points. One should define an initial point (in this paper, it is an arithmetic mean of
m points obtained from the following methods, where
m is the number of summands in
according to the described approach). During consecutive iterations, new points are randomly generated in the neighborhood of the best one according to the following equation:
where
is the
j-th coordinate of the
i-th point,
is a point with the highest value of evaluation function until the last iteration,
is a vector of parameters, and
is a pseudorandom number from uniform distribution in interval
. Then, if
, the point is considered as the best so far. At the end of each iteration, the values of
are reduced (exploitation of domain).
Algorithm 1 presents a pseudocode of the proposed location-aggregation method.
Algorithm 1 Pseudocode of the localization-aggregation method |
Input: Points indicated by used methods with timestamps: GPS ; , WLAN , , BLE , , distributions of errors of GPS (), WLAN () and (), present timestamp t Output: Coordinates of the optimum with value of function (Equation (10)) Calculate range of calculations:, , , . Find a point where , , with the maximum value of evaluation function (10) according to the grid method, local search, or another optimization method. |