Next Article in Journal
Success History-Based Adaptive Differential Evolution Using Turning-Based Mutation
Previous Article in Journal
On a Free Boundary Problem for American Options Under the Generalized Black–Scholes Model
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Possibilities of Using Kalman Filters in Indoor Localization

Faculty of Informatics and Management, University of Hradec Kralove, Rokitanskeho 62, 50003 Hradec Kralove, Czech Republic
*
Author to whom correspondence should be addressed.
Mathematics 2020, 8(9), 1564; https://doi.org/10.3390/math8091564
Submission received: 29 July 2020 / Revised: 7 September 2020 / Accepted: 9 September 2020 / Published: 11 September 2020

Abstract

:
Kalman filters are a set of algorithms based on the idea of a filter described by Rudolf Emil Kalman in 1960. Kalman filters are used in various application domains, including localization, object tracking, and navigation. The text provides an overview and discussion of the possibilities of using Kalman filters in indoor localization. The problems of static localization and localization of dynamically moving objects are investigated, and corresponding stochastic models are created. Three algorithms for static localization and one algorithm for dynamic localization are described and demonstrated. All algorithms are implemented in the MATLAB software, and then their performance is tested on Bluetooth Low Energy data from a real indoor environment. The results show that by using Kalman filters, the mean localization error of two meters can be achieved, which is one meter less than in the case of using the standard fingerprinting technique. In general, the presented principles of Kalman filters are applicable in connection with various technologies and data of various nature.

1. Introduction

The Kalman filter represents a theoretical basis for various recursive methods in the examination of stochastic (linear) dynamic systems. The algorithm is based on the idea that the unknown state of the system can be estimated using certain measured data. The filter is named after Rudolf Emil Kalman, a Hungarian mathematician living in the United States, who published it in the article [1] in 1960. In the next period, various algorithms based on the principles of the Kalman filter were derived by various authors. These algorithms are all referred to as Kalman filters, and can be suitably used in certain specific situations, for example, resulting from failure to meet some theoretical assumptions of the classical Kalman filter in solving practical problems. The Kalman filter, or generally, Kalman filters, can be used in various application domains, including localization, object tracking, and navigation.
The development in the area of mobile technologies and smart solutions stimulates the need to deal with the issue of locating mobile devices or objects in space. An intelligent location-aware system can adapt and provide the user with information relevant to their geographical context.
Services based on the awareness of the user’s location are known as location-based services (LBS) [2,3,4]. For the use of these services, it is important to be able to determine the position of a device (and a person using this device) not only in outdoor space but also very often inside buildings (indoor localization). In addition to static positioning, it is possible to track a dynamically moving object and also predict its motion.
Indoor localization is used in a number of areas [5], for example, navigation in public buildings, along with the intelligent provision of necessary or interesting context information to the user, depending on where they are currently located. Among other application areas of indoor localization rescue and crisis management, security and military applications, smart homes, targeted marketing, entertainment and tourism, and many more can be mentioned. Indoor localization also gains increasing importance in connection with today’s popular concepts such as augmented reality.

1.1. Related Work

Unfortunately, there is no standardized solution for locating mobile devices or objects inside buildings. The Global Positioning System (GPS) and other global navigation satellite systems satisfactorily solve the problem of determining the location in outdoor areas, but their use is unavailable inside buildings.
Various radio technologies used within existing wireless networks in buildings, such as Wi-Fi, Bluetooth (especially Bluetooth Low Energy, BLE), Zigbee, etc. are often employed for indoor localization. Additionally, light or acoustic waves can be used for localization. Each of these technologies allows for certain localization accuracy, and its implementation is associated with greater or lesser financial and time costs. In addition to these technologies, approaches making use of data collected from the inertial measurement unit (IMU) incorporated into mobile devices are also applied.
In general, there are various localization techniques [5]. The first group consists of approaches based on the principles of trigonometry, and the knowledge of the angles from which the signal arrives from the reference points (transmitters) of a known position or the knowledge of the distances of the localized object to these known reference points. However, these approaches are not suitable for use in indoor environments with many obstacles, where there is no direct visibility between the localized object and the reference points.
Another localization technique which is frequently used indoors is called fingerprinting. Fingerprinting consists of two phases. In the first (off-line) phase a reference fingerprint map is created by measuring and storing the received signal strength indicator (RSSI) from the individual transmitters at predetermined locations with known positions. During the second (on-line) phase the position of the localized object is determined by comparing the currently measured RSSIs and fingerprints from the reference map. This technique will be described in more detail in the following section.
Pedestrian dead reckoning (PDR) is another localization technique, which is based on a different kind of information. This technique uses data on the movement of the mobile device provided by its sensors (accelerometer, gyroscope, magnetometer–i.e., IMU), and, assuming the initial position is known, it then estimates the evolution of the current position over time. The advantage of PDR is its independence of the existence of radio networks, but on the other hand, it is necessary to know the exact initial position, the accuracy of the estimates also depends on the quality of the sensors, and the estimation errors tend to accumulate and grow over long periods of time.

1.1.1. Fingerprinting

Fingerprinting is a widely used technique in indoor localization and often serves as a benchmarking technique for newly developed algorithms. Its implementation is usually not costly and difficult, as it uses wireless radio networks, that often exist in buildings. Typically, this is Wi-Fi technology (IEEE 802.11), or currently popular Bluetooth Low Energy (BLE) technology (for example iBeacon protocol and transmitters, which Apple introduced in 2013 [6]). The disadvantage of fingerprinting is the need to re-create a new reference fingerprint map for any change in the network infrastructure.
Determination of the position by the fingerprinting technique consists of measuring the current signal strength from individual transmitters, i.e., creating a current fingerprint at a particular current location, and then comparing this fingerprint with fingerprints from the reference map. The aim is to find the most similar reference fingerprint, the similarity being measured by the distance of the fingerprints in the space of all fingerprints. Different metrics can be used to calculate the distance, usually the Manhattan metric or the Euclidean metric. This procedure is referred to as the nearest neighbour (NN) algorithm. The position associated with the nearest reference fingerprint is then considered to be the current estimated position.
In a more general sense, several (k) most similar reference fingerprints can be found, and the estimated position can be calculated as the average of the positions of these reference fingerprints. This is known as the k-nearest neighbours (KNN) algorithm.
Another, even more general, modification of the above procedure is the weighted k-nearest neighbours (WKNN) algorithm, which calculates the position as the weighted average of the positions of the k reference fingerprints, with more similar fingerprints having a higher weight. The WKNN algorithm is used in indoor localization most often, theoretically, higher value of k leads to more accurate results but at the cost of increased computational demands, in practice, it is often chosen k = 3, k = 4.
One of the first systems for indoor localization based on radio networks was RADAR [7], designed by Microsoft researchers.

1.1.2. Motivation for Using Kalman Filters

However, the disadvantages of using the radio signal in indoor localization follow from the physical patterns of its propagation and the nature of the indoor environment. The signal inside a building collides with a number of different obstacles from different materials (walls, furniture, people, etc.) and thus absorbs, refracts or reflects. Signal properties (signal strength) vary in such a complex environment, depending on location and time, in a way that cannot be simply described and formalized.
Measured signal strength at a particular location also depends on the mobile device (receiver), its current orientation during the measurement, etc. As a result of all the above, it is difficult to achieve the ideal accuracy of localization that would be required inside a building.
Therefore, there is constantly an effort to find extensions or improvements to existing techniques or techniques that are completely new, which will allow for higher accuracy of localization. Very often, these are different mathematical and statistical methods that help to reduce the impact of noise in radio data generated by the aforementioned physical principles of signal propagation.
Kalman filters are an example of such a method. Kotanen et al. [8] are one of the first who represent possibilities of using the extended Kalman filter (EKF) in indoor localization. They deal with solving a problem of static localization within a single room, the filter being applied to data on the distances of the localized object to the reference transmitting points calculated from the measured strength of the Bluetooth signal. The extended Kalman filter is also used by Yim et al. [9], their localization technique is based on existing wireless local area networks in buildings.
Two modifications of the standard Kalman filter called the position Kalman filter (PKF) [10,11] and the fingerprint Kalman filter (FKF) [12] have been developed for use in indoor localization. Both algorithms are originally used by authors for static localization in a building with a Wi-Fi network. The PKF has as its input already calculated position estimates (obtained, for example, by the fingerprinting technique), while the FKF works directly with the measured signal strength, and therefore has a better ability to filter the noise contained therein, subsequent position estimation is based on the principles of the fingerprinting technique and the WKNN algorithm.
These approaches are further applied and developed by other authors, for example, Lee et al. [6] use the first mentioned approach along with BLE beacons, Fang et al. [13] extend the FKF by adaptive calculation of noise covariance etc.
The Kalman filter can also be used as a tool to combine data of a different nature from different sources. This is used, for example, by Coronel et al. [14], Lee et al. [15], Chen et al. [16], Chen et al. [17], Yu et al. [18], Liu et al. [19] when dealing with a dynamic localization problem, they combine radio data and motion data from the respective mobile device sensors.
In addition to Kalman filters, particle filters are also used in indoor localization [20,21,22,23]. Particle filters have more general application possibilities, but the disadvantage is higher computational costs limiting their real-time use on devices with limited performance. Additionally, the accuracy achieved is not significantly better. Localization techniques using neural networks, genetic algorithms, etc. also exist.
The aim of this text is to provide an overview of the possibilities of using Kalman filters in indoor localization. Different localization algorithms based on the Kalman filtering idea will be described and implemented. The algorithms will be based on the above-mentioned papers and some of them will be modified and extended in various ways. Emphasis will also be placed on their practical demonstration and subsequent testing under realistic conditions, as some of these algorithms are tested by their authors only in precisely prepared laboratory conditions (such as localization in one empty room with four radio transmitters at corners, etc.) or on simulated data. In addition to the original use for static localization, some algorithms will also be employed when solving a problem of localization of a dynamically moving object. Corresponding stochastic models for representing these problems will be created. The obtained results will be discussed so that the text can help and serve as a starting point inspiration for practitioners and researchers dealing with indoor localization and related tasks.

2. Materials and Methods

A brief introduction to Kalman filters and the possibilities of their use in indoor localization follows.

2.1. Introduction to Kalman Filters

The Kalman filter is a tool to estimate the state of a stochastic linear dynamic system using measured data contaminated by noise. The estimate produced by the Kalman filter is statistically optimal in some sense (for example when considering the minimization of the mean square error; see [24] for details). The use of the Kalman filter is illustrated in Figure 1.
The Kalman filter works with all available information, i.e., it uses all available measured data, the system model together with a statistical description of its inaccuracies, noise, and measurement errors, as well as information about the initial conditions and the initial state of the system.

2.1.1. The Kalman Filter Algorithm

Let us consider a stochastic linear dynamic system in discrete time represented by the following state-space model (let us assume here that the system has no inputs)
x k = Φ k 1 x k 1 + w k 1 ,
z k = H k x k + v k .
Equation (1), referred to as the state equation, describes system dynamics, the vector x k n is the (unknown) system state vector at time t k , the matrix Φ k 1 n × n represents dynamic evolution of the system state between times t k 1 and t k . Equation (2) is called the measurement equation, the vector z k m is referred to as the system output vector, the measurement vector or the observation vector, the matrix H k m × n then describes the relationship between the system state and the measurement. Since this is a stochastic system, the vectors x k and z k , k = 0 ,   1 ,   2 ,   , can be considered random variables, their sequences { x k } and { z k } are then random (stochastic) processes.
{ w k } and { v k } are random noise processes, let us assume that they are uncorrelated Gaussian processes with zero mean and covariance matrix Q k and R k , respectively, at time t k (the processes have properties of Gaussian white noise).
Furthermore, let x 0 be a random variable with a Gaussian (normal) distribution with known mean x 0 and known covariance matrix P 0 . In addition, let x 0 and both noises always be uncorrelated. So, we can summarize that for all t k
E w k = 0 ,
E v k = 0 ,
E w k 1 w k 2 T = Q k 1 δ ( k 2 k 1 ) ,
E v k 1 v k 2 T = R k 1 δ ( k 2 k 1 ) ,
E w k 1 v k 2 T = 0 ,
E x 0 w k T = 0 ,
E x 0 v k T = 0 ,
where the symbol δ denotes the Kronecker delta
δ ( k ) = {   1 ,   k = 0 ,   0 ,   k 0 .
The aim of the Kalman filter is to find an estimate of the state vector x k at time t k , denoted as x ^ k , so that this estimate is optimal (for example, in terms of minimizing the mean square error).
The algorithm of the Kalman filter is recursive, the calculation at general time t k consists of two main steps-first, the a priori estimate x ^ k ( ) at time t k is calculated by substituting the a posteriori estimate from time t k 1 into the deterministic part of the state equation, and then this estimate is updated (corrected) using the measurement taken at time t k , which results in obtaining the a posteriori estimate x ^ k ( + ) at time t k .
The following relation can be written for the a priori estimate of the state vector x ^ k ( ) at time t k , the uncertainty of this estimate being expressed by the a priori error covariance matrix P k ( )
x ^ k ( ) = Φ k 1 x ^ k 1 ( + ) ,
P k ( ) = Φ k 1 P k 1 ( + ) Φ k 1 T + Q k 1 .
Subsequent to obtaining the measured data z k , the a posteriori estimate of the state vector x ^ k ( + ) is determined by the combination of the a priori estimate and the difference between the actual and the expected value of the measurement weighted by the matrix K k , its uncertainty is expressed by the a posteriori error covariance matrix P k ( + )
x ^ k ( + ) = x ^ k ( ) + K k [ z k H k x ^ k ( ) ] ,
P k ( + ) = P k ( ) K k H k P k ( ) ,
K k = P k ( ) H k T [ H k P k ( ) H k T + R k ] 1 .
A detailed derivation of the given equations of the Kalman filter can be found, for example, in [25]; more detailed presentations of the algorithm, its features and its theoretical assumptions are provided, for example, in [24,25,26]; practical aspects of the implementation of the filter are discussed, for example, in [26]. The time complexity of one recursion of the Kalman filter is determined by matrix multiplication (usually n m in practice); asymptotic complexity when considering the naïve matrix multiplication algorithm is O ( n 3 ) , when using, for example, the Strassen algorithm, it is O ( n 2.807 ) .

2.1.2. The Extended Kalman Filter

The use of the Kalman filter, as mentioned above, assumes the system is linear. In reality, however, the system dynamics or the relationship between its state and measurements (or both) may often be nonlinear. The system model then has this form (noise is still assumed to be additive)
x k = ϕ k 1 ( x k 1 ) + w k 1 ,
z k = h k ( x k ) + v k ,
where ϕ k 1 and h k are (generally) non-linear functions.
One of the modifications of the standard Kalman filter, which allows operating with non-linear systems, is the extended Kalman filter (EKF). The EKF is based on the linearization of the non-linear function around the current estimate and is particularly suitable for weakly non-linear systems. Equations of the EKF have the following form
x ^ k ( ) = ϕ k 1 ( x ^ k 1 ( + ) ) ,
P k ( ) =   Φ k 1 P k 1 ( + ) Φ k 1 T + Q k 1 .
x ^ k ( + ) = x ^ k ( ) + K k [ z k h k ( x ^ k ( ) ) ] ,
P k ( + ) = P k ( ) K k H k P k ( ) ,
K k = P k ( ) H k T [ H k P k ( ) H k T + R k ] 1 ,
where Φ k 1 and H k are the Jacobi matrices
Φ k 1 = ϕ k 1 x | x ^ k 1 ( + ) ,
H k = h k x | x ^ k ( ) .

2.2. Kalman Filters and Indoor Localization

From the point of view of indoor localization, it is obvious that the sought position is represented in the system model by the unknown vector x . As a measurement vector z , different data can be understood. The following part of the text will describe the implementation of three algorithms for static localization and one algorithm for dynamic localization, with measurements z always being data of a different nature.
The problem of localization within one floor of a building, i.e., the determination of the coordinates in a two-dimensional space (in the plane), is addressed.
BLE data was used in practical experiments, as the BLE technology is frequently employed in practice, but the procedures described could also be applied to data of other radio technologies.

2.2.1. Static Localization

When dealing with the problem of static localization, it is assumed that the position of the localized object does not change over time, which implies that the matrix Φ k is equal to the identity matrix for all t k , i.e., that the state equation of the system model has the form
( x k y k ) = ( 1 0 0 1 ) ( x k 1 y k 1 ) + w k 1 .
This assumption is common to all three of the following algorithms.

Algorithm 1

The original idea was published by Kotanen et al. [8]; later, this approach was investigated and applied by, for example, Yim et al. [9] or Lee et al. [6]. The algorithm is based on the calculation of the distances to the individual transmitting devices (beacons) from the strength of their signal measured at the current location. The following relation can be used to convert signal strength to distance
d = d 0 · 10 ( P R X ( d 0 ) P R X ( d ) ) / 10 n ,
where P R X ( d ) is the measured signal strength at the current location, P R X ( d 0 ) is the signal strength at the reference distance d 0 (usually 1 m) from the beacon, and n is the path loss exponent. We used the specific values of n = 4 (indoor environment) and P R X ( 1   m ) = 62 (the value corresponds to the transmission power of 0 dBm, which the beacons in our experiments had [27]).
Elements of the measurement vector are these calculated distances, then the measurement equation of the system model has the form
( d 1   k d 2   k d m   k ) = ( ( x 1 x k ) 2 + ( y 1 y k ) 2 ( x 2 x k ) 2 + ( y 2 y k ) 2 ( x m x k ) 2 + ( y m y k ) 2 ) + v k ,
where d i is the distance to the i-th beacon, and [ x i ,   y i ] are the coordinates of the i-th beacon, i = 1 , 2 , , m (m is the number of beacons). As a result of the non-linearity in the measurement equation, the use of the EKF algorithm is suitable. The values of the elements of the matrices Q k and R k for individual time instants are determined experimentally from test data.
The advantage of this algorithm is its simplicity, as it does not require special prior preparation, such as the off-line phase of fingerprinting. On the other hand, however, it does not achieve high accuracy of localization, as the principle of the conversion of measured signal strength to distance generally leads to significant errors in the context of indoor localization.

Algorithm 2

The algorithm is based on the principles of the PKF (position Kalman filter) [10,11], since already calculated position estimates are understood as the measurement vector elements. These estimates are obtained using some other technique (e.g., fingerprinting + WKNN). Unlike the previous algorithm, this is not a localization technique in the true sense, but only a tool that should refine existing estimates. This ability, however, is limited to a certain extent by not working with raw measured data, which makes it possible to reduce the impact of noise only indirectly.
The measurement equation has this simple form
( z x   k z y   k ) = ( 1 0 0 1 ) ( x k y k ) + v k .
The entire system model is linear, so the standard Kalman filter can be used.

Algorithm 3

The third algorithm described is the FKF (fingerprint Kalman filter) proposed by Ali-Löytty et al. [12]. The algorithm calculates the position estimates directly from the signal strength data, which are considered in the system model as the measurements, together with using the principles of the fingerprinting technique. A prerequisite for its use is therefore the prior creation of a reference fingerprint map.
The state equation of the model is the same as for the other algorithms, and the calculation of the a priori position estimate is identical to applying the first step of the standard Kalman filter. However, the measurement equation is not explicitly expressed, and the relations for calculating the a posteriori position estimate are slightly different, but the Kalman filter principle is maintained. Differences arise from the fact that the measurement estimate (which is then used in the calculation of the a posteriori position estimate) is not constructed according to the measurement equation, but by the fingerprinting technique and the WKNN algorithm. The equations for calculating the a posteriori position estimate and the corresponding a posteriori error covariance matrix have the form
x ^ k ( + ) = x ^ k ( ) + P x z k P z z k 1 [ z k z ^ k ] ,
P k ( + ) = P x x k P x z k P z z k 1 P x z k T ,
z ^ k = i I F β i , k a ¯ i ,
P x x k = i I F β i , k [ P p i + [ p i p ^ k ] [ p i p ^ k ] T ] ,
P x z k = i I F β i , k [ p i p ^ k ] [ a ¯ i z ^ k ] T ,
P z z k = i I F β i , k [ P a i + [ a ¯ i z ^ k ] [ a ¯ i z ^ k ] T ] ,
p ^ k = i I F β i , k p i ,
where x denotes the state vector of sought coordinates, z measurement (measured signal strength values from transmitting devices (beacons)), β i weight of the i-th reference fingerprint, a ¯ i mean of reference map signal strength values, p i coordinates of the i-th reference fingerprint, P a i (co)variance of reference map signal strength values, P p i (co)variance of uniform distribution in the i-th cell of the reference map; I F is the set of indices to the set of all reference fingerprints. There are several ways to calculate β i and P p i , a description of one of them together with detailed explanation and derivation of the FKF equations is given in [12].

2.2.2. Dynamic Localization

In the problem of dynamic localization, not only the current position, but also the velocity of motion is considered as unknown, in this case, the state equation of the system model has the form
( x k y k u x   k u y   k ) = ( 1 0 Δ t 0   0 1   0 Δ t 0 0 0 0 1 0 0 1 ) ( x k 1 y k 1 u x   k 1 u y   k 1 ) + w k 1 .

Algorithm 4

The already calculated position estimates in individual time instants are taken as the measurements in this algorithm, so the measurement equation of the system model has the form
( z x   k z y   k ) = ( 1 0 0 0 0 1 0 0 ) ( x k y k u x   k u y   k ) + v k .
The state equation and the measurement equation are linear, so the standard Kalman filter can be used.
The aim of the algorithm is to refine the motion trajectory estimate by combining the a priori information about the expected position in the current time instant calculated on the basis of the motion model and the information about the estimated position obtained from the radio network data.
The algorithm can be further extended by the ability to detect outlying observations (measurements) that follows from the principles of the Kalman filter. If any of the individual position estimates given to the Kalman filter as a measurement is outlying, it will not be included in the filter calculations and will not damage the estimate of the entire trajectory. The outlying nature of the measurement is judged by the difference between its actual and expected value known as the innovation.
The Kalman filter also allows solving the situation of a missing measurement at some time instant, if this occurs, the a priori estimate obtained according to the state equation of the system model will be considered as the current estimate. This procedure also allows the algorithm to be used for future position prediction.

3. Results and Discussion

3.1. Implementation and Testing of the Algorithms

Implementation was performed in MATLAB R2019a. The graphical output of the implementation of the Algorithm 3 shown in Figure 2 serves to illustrate the results of the static localization experiments. The graphs at the top of the figure show the evolution of the estimates of the coordinates x and y during 40 iterations of the algorithm, the graph at the bottom depicts the evolution of the estimation errors. The results of the implementation of the Algorithm 4 for dynamic localization are illustrated in Figure 3. The graphs in the figure offer the possibility of comparing the actual true positions, the original position estimates obtained from the measured radio data and the position estimates after the application of the Kalman filter. The lower graph then shows the original and new magnitude of the estimation error at individual time instants.
Testing of all algorithms was carried out on real data from the building of the Faculty of Informatics and Management of the University of Hradec Kralove. On the second floor of this building, there is a total of 17 BLE transmitters Estimote Beacon (HW revision D3.4). All devices were set to a transmission power of 0 dBm and a transmission interval of 100 ms.
For the purpose of testing the static localization algorithms, 20 locations were selected to carry out a continuous signal strength measurement of 20 s each. Two walking paths were designed to test the dynamic localization algorithms, the first path led around the floor, the second path was straight, leading down the corridor only on one side of the floor. Due to the use of the fingerprinting technique, a reference map consisting of 171 fingerprints was also created.
Figure 4, Figure 5 and Figure 6 show a floor plan with 20 locations (squares) where the static localization algorithms were tested, as well as the estimates of their positions obtained by Algorithms 1–3 (circles) (individual locations are differentiated by colors). Figure 7 shows the first walking path, Figure 8 the second walking path, the actual trajectory of motion is shown in green, its estimate obtained by the fingerprinting technique in red, and the resulting estimate, according to Algorithm 4 in blue.
The values of the noise covariance matrices (resp. variances) were determined experimentally in all the experiments. The initial values of the state vectors and the corresponding error covariance matrices can be chosen to some extent arbitrarily or various strategies can be used (for example, the known position of the beacon, whose measured signal is the strongest at the given location, can be considered the initial estimate of the unknown position, etc.).

3.2. Results and Discussion

All the described algorithms were tested on the prepared data, and the fingerprinting technique with the WKNN algorithm was applied for comparison purposes. The following descriptive statistics were calculated from the results: mean estimation error (ME), root mean square error (RMSE), median error (MDN E), maximum error (MAX E).

3.2.1. Static Localization

The results of the testing of the static localization algorithms are summarized in Table 1 (values are expressed in meters and rounded to 2 decimal places).
Algorithm 1 provides the worst results, and the data analysis also shows that the noise distribution does not meet the assumptions required by the Kalman filter. The results obtained using Algorithm 2 are slightly better than those gained only by the standard fingerprinting technique, the improvement is evident especially in the reduction of the maximum error, the decrease in the mean error is not so significant. Algorithm 3 achieves the best results in all criteria, the mean error is 2 m, which is one meter less than in the case of fingerprinting.

3.2.2. Dynamic Localization

Table 2 and Table 3 contain a summary of the test results of Algorithm 4 for dynamic localization and its comparison with the fingerprinting technique, i.e., with the original data on which the Kalman filter (Algorithm 4) was applied.
In the case of the path 1, that led around the floor, using Algorithm 4 reduced the mean error from 3 m to 2 m, the maximum error was also significantly reduced. A significant reduction in the error occurred on straight sections of the corridors; on the contrary, the error slightly increased in the corners. This follows from the Kalman filter principles—the system model maintains the trend of the previous motion and does not expect an immediate change in the direction of motion by cornering, so it takes some time for the filter to adapt to the new direction of motion. This is also evident from Figure 7. It is also confirmed that the Kalman filter is generally more suitable for tracking the motion of large and heavy objects, whose motion trajectory is smooth.
Path 2 was designed to illustrate again the phenomenon described above. Thus, when dealing with localization of an object moving at an unknown constant velocity, a mean error of only about 0.5 m can be achieved.
The described problem could be partially eliminated by using the PDR technique, which would replace the a priori estimation of the position according to the given state equation of the system model, see, for example, [14,15,16,17,18,19].
In the performed experiment, it was assumed that the object moves at a constant speed of 1 m/s. In general, however, the speed of motion may not be constant but may change arbitrarily (the tracked object may even stop) and the Kalman filter adapts to these changes, but also with a certain delay, similar to the case of changing the direction of motion.
The swiftness of adaptation to changes in motion can be influenced by setting the values of the covariance matrices (variances) of the noises. If the measurement noise is high, the filter will give more weight to the position estimates predicted by the model, the effect of the measurements is suppressed, and changes in motion are reflected more slowly. Conversely, in the case of significant inaccuracies (noise) of the model, the effect of the measurements is more pronounced in the estimates and it is possible to react more quickly to changes in motion. However, it is always necessary to find a suitable compromise between confidence in measurements and a model.
All the data, source codes, and complete testing results are available as Supplementary Materials.

4. Conclusions

The text studied the possibilities of using Kalman filters in indoor localization. Three algorithms for static localization and one algorithm for locating dynamically moving objects were described. All algorithms were implemented in MATLAB, and subsequently tested on data from a real indoor environment. The results showed that by using Kalman filters, the mean localization error of two meters can be achieved in both types of problems, which is one meter less than in the case of using the standard fingerprinting technique. The best results were obtained by applying the Kalman filter directly to the raw data on the measured radio signal strength. The advantage of Kalman filters can also be seen in the low computational costs, which do not prevent their real-time use. Despite the improvements brought by the use of Kalman filters, it is still difficult to reach the ideal accuracy of localization that would be required in a complex indoor environment with the use of noisy radio data. Some additional improvement could be achieved by combining Kalman filters with other techniques, such as the PDR technique mentioned above. In general, the presented ideas and principles of Kalman filters are applicable in connection with various technologies and data of various nature.

Supplementary Materials

The source codes and data used for the experiments and the testing results are available at https://www.mdpi.com/2227-7390/8/9/1564/s1.

Author Contributions

Conceptualization, K.F.; methodology, K.F.; software, K.F.; validation, K.F.; formal analysis, K.F.; investigation, K.F.; resources, K.F.; data curation, K.F.; writing, K.F.; visualization, K.F.; supervision, P.P. All authors have read and agreed to the published version of the manuscript.

Funding

The paper was supported by the Specific Research Project at the Faculty of Informatics and Management of the University of Hradec Kralove, Czech Republic.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Kalman, R.E. A new approach to linear filtering and prediction problems. J. Basic Eng. 1960, 82, 35–45. [Google Scholar] [CrossRef] [Green Version]
  2. Ryschka, S.; Murawski, M.; Bick, M. Location-based services. Bus. Inf. Syst. Eng. 2016, 58, 233–237. [Google Scholar] [CrossRef]
  3. Bentley, F.; Cramer, H.; Müller, J. Beyond the bar: The places where location-based services are used in the city. Pers. Ubiquitous Comput. 2015, 19, 217–223. [Google Scholar] [CrossRef]
  4. Lin, Y.B.; Lin, Y.W.; Hsiao, C.Y.; Wang, S.Y. Location-based IoT applications on campus: The IoTtalk approach. Pervasive Mob. Comput. 2017, 40, 660–673. [Google Scholar] [CrossRef]
  5. Werner, M. Indoor Location-Based Services: Prerequisites and Foundations, 1st ed.; Springer International Publishing: Cham, Switzerland, 2014. [Google Scholar]
  6. Lee, S.H.; Lim, I.K.; Lee, J.K. Method for improving indoor positioning accuracy using extended Kalman filter. Mob. Inf. Syst. 2016, 2016, 1–15. [Google Scholar] [CrossRef] [Green Version]
  7. Bahl, P.; Padmanabhan, V.N. RADAR: An in-building RF-based user location and tracking system. In Proceedings of the Nineteenth Annual Joint Conference of the IEEE Computer and Communications Societies (INFOCOM), Tel Aviv, Israel, 26–30 March 2000; IEEE Computer Society Press: Los Alamitos, CA, USA, 2000; pp. 775–784. [Google Scholar]
  8. Kotanen, A.; Hännikäinen, M.; Leppäkoski, H.; Hämäläinen, T.D. Experiments on local positioning with Bluetooth. In Proceedings of the International Conference on Information Technology: Coding and Computing, Las Vegas, NV, USA, 28–30 April 2003; IEEE Computer Society Press: Los Alamitos, CA, USA, 2003; pp. 297–303. [Google Scholar]
  9. Yim, J.; Park, C.; Joo, J.; Jeong, S. Extended Kalman filter for wireless LAN based indoor positioning. Decis. Support Syst. 2008, 45, 960–971. [Google Scholar] [CrossRef]
  10. Kwon, J.; Dundar, B.; Varaiya, P. Hybrid algorithm for indoor positioning using wireless LAN. In Proceedings of the IEEE 60th Vehicular Technology Conference, Los Angeles, NV, USA, 26–29 September 2004; IEEE Computer Society Press: Los Alamitos, CA, USA, 2004; pp. 4625–4629. [Google Scholar]
  11. Ali-Löytty, S.; Sirola, N.; Piché, R. Consistency of three Kalman filter extensions in hybrid navigation. In Proceedings of the European Navigation Conference GNSS 2005, Munich, Germany, 19–22 July 2005. [Google Scholar]
  12. Ali-Löytty, S.; Perala, T.; Honkavirta, V.; Piché, R. Fingerprint Kalman filter in indoor positioning applications. In Proceedings of the 2009 IEEE Control Applications, (CCA) & Intelligent Control, (ISIC), St. Petersburg, Russia, 8–10 July 2009; IEEE Computer Society Press: Los Alamitos, CA, USA, 2009; pp. 1678–1683. [Google Scholar]
  13. Fang, X.; Nan, L.; Jiang, Z.; Chen, L. Noise-aware fingerprint localization algorithm for wireless sensor network based on adaptive fingerprint Kalman filter. Comput. Netw. 2017, 124, 97–107. [Google Scholar] [CrossRef]
  14. Coronel, P.; Furrer, S.; Schott, W.; Weiss, B. Indoor location tracking using inertial navigation sensors and radio beacons. In The Internet of Things; Floerkemeier, C., Langheinrich, M., Fleisch, E., Mattern, F., Sarma, S.E., Eds.; Springer: Berlin/Heidelberg, Germany, 2008; pp. 325–340. [Google Scholar]
  15. Lee, S.; Cho, B.; Koo, B.; Ryu, S.; Choi, J.; Kim, S. Kalman filter-based indoor position tracking with self-calibration for RSS variation mitigation. Int. J. Distrib. Sens. Netw. 2015, 11, 1–10. [Google Scholar] [CrossRef]
  16. Chen, Z.; Zou, H.; Jiang, H.; Zhu, Q.; Soh, Y.; Xie, L. Fusion of WiFi, smartphone sensors and landmarks using the Kalman filter for indoor localization. Sensors 2015, 15, 715–732. [Google Scholar] [CrossRef] [PubMed]
  17. Chen, Z.; Zhu, Q.; Soh, Y. Smartphone inertial sensor-based indoor localization and tracking with iBeacon corrections. IEEE Trans. Ind. Inform. 2016, 12, 1540–1549. [Google Scholar] [CrossRef]
  18. Yu, Y.; Chen, R.Z.; Chen, L.; Guo, G.Y.; Ye, F.; Liu, Z.Y. A robust dead reckoning algorithm based on Wi-Fi FTM and multiple sensors. Remote Sens. 2019, 11, 504. [Google Scholar] [CrossRef] [Green Version]
  19. Liu, L.; Li, B.F.; Yang, L.; Liu, T.X. Real-Time Indoor Positioning Approach Using iBeacons and Smartphone Sensors. Appl. Sci. 2020, 10, 2003. [Google Scholar] [CrossRef] [Green Version]
  20. Nurminen, H.; Ristimäki, A.; Ali-Löytty, S.; Piché, R. Particle filter and smoother for indoor localization. In Proceedings of the International Conference on Indoor Positioning and Indoor Navigation, Montbeliard-Belfort, France, 28–31 October 2013; IEEE Computer Society Press: Los Alamitos, CA, USA, 2013; pp. 1–10. [Google Scholar]
  21. Wu, Z.; Jedari, E.; Muscedere, R.; Rashidzadeh, R. Improved particle filter based on WLAN RSSI fingerprinting and smart sensors for indoor localization. Comput. Commun. 2016, 83, 64–71. [Google Scholar] [CrossRef]
  22. Sung, K.; Lee, D.K.; Kim, H. Indoor pedestrian localization using iBeacon and improved Kalman filter. Sensors 2018, 18, 1722. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  23. Mackey, A.; Spachos, P.; Song, L.; Plataniotis, K.N. Improving BLE Beacon Proximity Estimation Accuracy Through Bayesian Filtering. IEEE Internet Things J. 2020, 7, 3160–3169. [Google Scholar] [CrossRef] [Green Version]
  24. Maybeck, P.S. Stochastic Models, Estimation and Control, 1st ed.; Academic Press: New York, NY, USA, 1979. [Google Scholar]
  25. Grewal, M.S.; Andrews, A.P. Kalman Filtering: Theory and Practice Using MATLAB, 4th ed.; Wiley: Hoboken, NJ, USA, 2015. [Google Scholar]
  26. Simon, D. Optimal State Estimation: Kalman, H [Infinity] and Nonlinear Approaches, 1st ed.; Wiley: Hoboken, NJ, USA, 2006. [Google Scholar]
  27. Krawiec, P. Measured Power Values. Estimote, Inc. Available online: http://forums.estimote.com/t/measured-power-values/2977 (accessed on 17 July 2020).
Figure 1. Scheme of applying the Kalman filter.
Figure 1. Scheme of applying the Kalman filter.
Mathematics 08 01564 g001
Figure 2. Graphical output of the implementation of Algorithm 3. (The error is measured in the units of the used coordinate system, with 50 units corresponding to the distance of 1 m).
Figure 2. Graphical output of the implementation of Algorithm 3. (The error is measured in the units of the used coordinate system, with 50 units corresponding to the distance of 1 m).
Mathematics 08 01564 g002
Figure 3. Graphical output of the implementation of Algorithm 4. (The errors are measured in the units of the used coordinate system, with 50 units corresponding to the distance of 1 m).
Figure 3. Graphical output of the implementation of Algorithm 4. (The errors are measured in the units of the used coordinate system, with 50 units corresponding to the distance of 1 m).
Mathematics 08 01564 g003
Figure 4. Visualization of test results for the Algorithm 1.
Figure 4. Visualization of test results for the Algorithm 1.
Mathematics 08 01564 g004
Figure 5. Visualization of test results for the Algorithm 2.
Figure 5. Visualization of test results for the Algorithm 2.
Mathematics 08 01564 g005
Figure 6. Visualization of test results for the Algorithm 3.
Figure 6. Visualization of test results for the Algorithm 3.
Mathematics 08 01564 g006
Figure 7. Visualization of test results for the Algorithm 4–path 1.
Figure 7. Visualization of test results for the Algorithm 4–path 1.
Mathematics 08 01564 g007
Figure 8. Visualization of test results for the Algorithm 4–path 2.
Figure 8. Visualization of test results for the Algorithm 4–path 2.
Mathematics 08 01564 g008
Table 1. Summary of test results for static localization algorithms.
Table 1. Summary of test results for static localization algorithms.
MERMSEMDN EMAX E
Fingerprinting3.033.773.018.70
Algorithm 17.858.738.3514.60
Algorithm 22.943.462.976.10
Algorithm 32.062.641.886.00
Table 2. Summary of test results for dynamic localization algorithms–path 1.
Table 2. Summary of test results for dynamic localization algorithms–path 1.
Path 1MERMSEMDN EMAX E
Fingerprinting3.014.482.1321.33
Algorithm 42.092.561.826.85
Table 3. Summary of test results for dynamic localization algorithms–path 2.
Table 3. Summary of test results for dynamic localization algorithms–path 2.
Path 2MERMSEMDNEMAXE
Fingerprinting1.632.091.374.68
Algorithm 40.510.570.550.99

Share and Cite

MDPI and ACS Style

Fronckova, K.; Prazak, P. Possibilities of Using Kalman Filters in Indoor Localization. Mathematics 2020, 8, 1564. https://doi.org/10.3390/math8091564

AMA Style

Fronckova K, Prazak P. Possibilities of Using Kalman Filters in Indoor Localization. Mathematics. 2020; 8(9):1564. https://doi.org/10.3390/math8091564

Chicago/Turabian Style

Fronckova, Katerina, and Pavel Prazak. 2020. "Possibilities of Using Kalman Filters in Indoor Localization" Mathematics 8, no. 9: 1564. https://doi.org/10.3390/math8091564

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop