Method for Improving Indoor Positioning Accuracy Using Extended Kalman Filter

Beacons using bluetooth low-energy (BLE) technology have emerged as a new paradigm of indoor positioning service (IPS) because of their advantages such as low power consumption, miniaturization, wide signal range, and low cost. However, the beacon performance is poor in terms of the indoor positioning accuracy because of noise,motion, and fading, all ofwhich are characteristics of a bluetooth signal and depend on the installation location. Therefore, it is necessary to improve the accuracy of beacon-based indoor positioning technology by fusing it with existing indoor positioning technology, which usesWi-Fi, ZigBee, and so forth.This study proposes a beacon-based indoor positioning method using an extended Kalman filter that recursively processes input data including noise. After defining the movement of a smartphone on a flat two-dimensional surface, it was assumed that the beacon signal is nonlinear.Then, the standard deviation and properties of the beacon signal were analyzed. According to the analysis results, an extended Kalman filter was designed and the accuracy of the smartphone’s indoor position was analyzed through simulations and tests. The proposed technique achieved good indoor positioning accuracy, with errors of 0.26m and 0.28m from the average xand y-coordinates, respectively, based solely on the beacon signal.


Introduction
Location determination technology in smartphones equipped with global positioning system (GPS) and Wi-Fi has not only triggered a shift in the paradigm of locationbased services (LBS) but also contributed significantly toward the further development of such services, including navigation and logistics [1,2].IPS are systems that can provide all types of LBS-usually provided outdoors-in an indoor area.It is important for IPS to map a user's indoor positioning information on indoor maps in order to provide the services required by the user.Indoor positioning techniques previously adopted by IPS include the -nearest neighbor, Bayesian, and triangulation methods, which are based on wireless technologies such as Wi-Fi, radio frequency identification (RFID), and ZigBee [3][4][5][6].Recent studies have focused on an ultrawideband-based indoor positioning technology [7,8].
In recent years, beacons have not only contributed toward the growth of mobile LBS but also emerged as a new paradigm of IPS.Beacons are BLE-based short-distance communication technologies.Their advantages include low power consumption, miniaturization, wide signal range, and low cost.Moreover, when communicating with devices as far away as 70 m, the accuracy of BLE is sufficiently high for distinguishing each device with a resolution of 5-10 cm [9][10][11].
In 2013, Apple introduced iBeacon6, and in the following year, iBeacon began to be implemented in areas where various types of information could be provided on the basis of user position, such as information regarding restaurants, airports, art galleries, and other indoor areas.Figure 1 shows an example of a service using iBeacon [12].An iBeacon transmitter is installed at a specific location within a store; although it does not attempt to guide customers to a specific location, it provides them with an automated shopping service by determining their positions throughout the shopping process.This extends from the moment they enter the store to when they request for information about a product (including price) and eventually pay for the product.
As shown in Figure 1, the iBeacon transmitter periodically broadcasts advertising packets, including the device identification (ID), area ID, and signal strength, and each smartphone that receives this information calculates the distance based on the location at which the iBeacon transmitter is installed and the signal strength.Then, the position of the smartphone is located through either control point positioning or multilateral positioning, thus providing the customer with the necessary service and information.
Although the BLE-based iBeacon has many advantages, its performance is poor in terms of the indoor positioning accuracy of a smartphone, and it is difficult to estimate the distance accurately using only the strength of the signal transmitted from the iBeacon transmitter to the smartphone.These issues are attributable to noise, movement, and fading [13,14], all of which are characteristic of a bluetooth signal and depend on the installation location.Therefore, although it is possible to achieve indoor positioning depending solely on the iBeacon signal, the indoor positioning accuracy needs to be improved by fusing the iBeacon approach with another indoor positioning approach based on technologies such as Wi-Fi.However, this would require multiple sensors with different models to be installed in an indoor space, which would introduce additional issues such as higher costs associated with initial construction and maintenance.
Accordingly, this study proposes a technique for improving the indoor positioning accuracy of smartphones using only the iBeacon signal.Because the beacon is installed in an open space, the movement of a smartphone indoors is defined as movement on a flat two-dimensional surface.In addition, because the beacon's received signal strength indicator-(RSSI-) based distance measurement and the smartphone's location on the two-dimensional surface have a nonlinear relationship, an extended Kalman filter is used.Once the standard deviation and properties of the beacon signal are analyzed, the extended Kalman filter is designed on the basis of this analysis.Finally, the indoor positioning accuracy of the smartphone is analyzed by performing simulations and tests.
The remainder of this study is organized as follows.Section 2 briefly reviews previous studies on iBeacon and the extended Kalman filter, which are applied to the technique proposed herein.Section 3 explains the design and implementation of the extended Kalman filter, which improves the iBeacon-based indoor positioning accuracy.In addition, the components of the indoor positioning system and the testing environment are described.Section 4 presents and discusses the results of both the iBeacon signal analysis and the indoor positioning test.Finally, Section 5 states our conclusions and briefly explores the scope for future work.

iBeacon. Having introduced the BLE-based iBeacon in
June 2013, Apple subsequently launched a variety of services that use iBeacon.BLE, which was introduced in June 2010, is equipped with low-energy technology and is commonly referred to as bluetooth smart.BLE minimizes the time spent sending/receiving data by reducing the duty cycle to several milliseconds, and it maximizes the sleep mode to reduce power consumption [10].Because iBeacon is based on a standard BLE technology, it can be supported by any device.Therefore, it is extendible even to a non-iOS device as long as the device is compliant with the standard specifications [15].
iBeacon periodically broadcasts only a few signals, including the universally unique identifier (UUID), major value, minor value, and transmissions (TX) power, to identify the beacon and calculate the distance, as shown in Figure 2. Thus, all indoor LBS are processed on smartphones and service servers.
In the case of the Estimote Beacon (Estimote Beacons are small wireless sensors based on BLE; they broadcast tiny radio signals that can be received and interpreted by smartphones, thereby facilitating microlocation and contextual awareness; Estimote Beacons are tiny computers, each having a powerful Advanced RISC Machine (ARM) processor, memory, and bluetooth smart module; Estimote Beacons are certified to be compatible with iBeacon), which supports iBeacon, the signal transmission cycle and output can be easily modified using a specialized tool.Changing the signal transmission cycle and output will alter the distance measured between the iBeacon transmitter and the smartphone [16].However, modifying the signal output does not guarantee improved accuracy of the measured distance.Therefore, the measurement derived from the iBeacon signal has to be interpreted differently depending on the distance, as summarized in Table 1 [15].
Nevertheless, the definitions stated in Table 1 do not mean that the distance cannot be directly measured using iBeacon.In fact, it means that, in the case of distances estimated using iBeacon, a relative revision should be considered from the perspective of accuracy.

Extended Kalman Filter.
In 1960, Kalman proposed the Kalman filter as a recursive filter for determining the random values of linear and nonlinear systems containing noise [17].
Using its algorithm to track/predict and thus revise the past, present, and future states, the Kalman filter can plot a system's trajectory, making it suitable for application to model systems such as radars, which anticipate and estimate the next state [18][19][20][21].Figure 3(a) shows the basic algorithm of the Kalman filter, which takes a measurement value (  ) as input and outputs a priori state estimate (x  ) of the next state.It is a repetition of prediction and correction processes [22].
(i) The prediction process inputs a former a posteriori state estimate (x −1 ) and a posteriori error covariance ( −1 ), calculating a posteriori state estimate and a priori estimate error covariance (x  ,   ) as the end result.These values are used in the correction process.
The system model variables used in the prediction process are the state transition matrix () and the process noise covariance ().(ii) The output of the correction process is a posteriori state estimate (x  ) and a posteriori estimate error covariance (  ).The values used for the input are not only the a posteriori state estimate and the a priori estimate error covariance (x  ,   ) from the prediction process but also the measurement (  ).
The system model variables used in the correction process are the measurement prediction matrix () and the measurement error covariance matrix ().
The Kalman filter allows accurate forecasting by using the measured value of the current state as well as the value reflecting the prediction from the current state.It is fundamentally based on a linear system.Hence, when it is applied to a nonlinear system, a section of the whole is linearized before the algorithm is applied, rendering it problematic, as a meaningful result can only be drawn from the property of the designated section and not the whole.
An extended Kalman filter allows the nonlinear relationship between the state value and the dynamic model or the measurement model in the Kalman filter to be linearized and used with respect to the nominal point [23,24].It is used as a de facto standard in navigation, GPS, and other nonlinear state estimations [25].The Kalman filter has a measurement model and a dynamic model, whereas the extended Kalman filter shapes either model or both models into a nonlinear model.
Figure 3(b) shows the basic algorithm of the extended Kalman filter, which is a repetition of the prediction and correction processes, as with the Kalman filter.However, it differs from the Kalman filter in that the state value of   does not use the coefficient separately but uses the nonlinear dynamic model or measurement model as it is, such as  +1 = (  ) +   or   = ℎ(  ) + V  [22].

State estimate xk
(1) Project the state ahead: signals, separate iBeacon transmitters have to be installed per floor and per space.Therefore, when setting a space map using the iBeacon transmitters, registration/management has to be performed according to the iBeacon ID value per floor and per space.As discussed later (Section 4.1), iBeacon signals undergo fading.Therefore, the accuracy is low when measuring the distance using only RSSI measurements.In order to improve the distance measurement accuracy, sampling must be performed to eliminate the iBeacon signal noise.A smartphone requires a sampling time of 20 s.
The Kalman filter processes the input data including noise recursively.Further, it provides higher accuracy because it is based on a series of measurements observed over time rather than a single measurement alone, thereby facilitating statistical prediction of the current state.The Kalman filter can estimate the current state from the previous state using the linear property.However, if the signal is nonlinear, as in (2) Project the error covariance ahead: (1) Compute the Kalman gain: (2) Update estimate with measurement: (3) Update the error covariance: the case of iBeacon signal analysis, the Kalman filter cannot be applied.In this study, considering the nonlinear property of iBeacon signals, the extended Kalman filter is employed.In this study, the extended Kalman filter is designed as follows: (i) In the measurement model, iBeacon's RSSI-based distance measurement shares a nonlinear relationship with the state value of the smartphone position.(ii) In the dynamic model, movements of the smartphone position have the appearance of a uniform motionbased linear motion model.
In the measurement model, the RSSI value of the iBeacon signal is assumed to be a measurement (), and this is used when calculating the distance.When the distance is determined using the RSSI value, the decrease in the reception rate per distance can be inconsistent; hence, the nature of the measurement () is deemed nonlinear.The dynamic model is primarily used when calculating the trajectory of missiles, artificial satellites, and so forth.Factors that cause changes in   include the location, velocity, and acceleration, and the resistance it faces varies according to the object's shape and altitude, meaning that there is a quality of dynamic change.The component of the existing algorithm of the Kalman filter that considers the dynamic quality is the weight ().
The extended Kalman filter designed for this study assumes that smartphones move linearly on a flat surface without changes in height; therefore, the dynamic quality is equivalent to the characteristic of an object moving on a twodimensional surface.
Figure 4 shows the algorithm of the extended Kalman filter that was newly designed to reflect the characteristics of the iBeacon signal as well as the smartphone's movement described above.

Implementation.
The indoor positioning function of a smartphone using the newly designed extended Kalman filter based on iBeacon (Section 3.1) is shown in Figure 5. prediction, and correction processes.The matrix function is a two-dimensional covariance matrix.
Figure 6 shows the detailed flow of the initialization, prediction, and correction processes of the "Core Function" in Figure 5.
(1) Initialization.The BS value is received by the smartphone and the "age" is confirmed.The initialization process is conducted when the number of recursions is zero.The initialization process involves calculating the  and  values using the extracted BS value, and it initializes the a priori state estimate value.Once this process is completed, the number of recursions increases and the variable value is delivered for the next process.
(2) Prediction.Once the initial value of the initialization process or the a priori state estimate value based on the recursion result of the extended Kalman filter is provided as input, the local value is initialized to estimate the a posteriori state estimate value.In addition, the time and a posteriori state estimate value are computed with a fixed process noise covariance.
The state transition matrix is set as noise for the covariance matrix.Then, a posteriori state estimate is extracted by calculating the state error covariance, and it is delivered to the correction process.
(3) Correction.The local value is initialized, the BS value is extracted, and the state vector is transmitted.Then, the measurement prediction matrix and residual value are calculated.Subsequently, the Kalman gain is computed and the state vector correction and transmission value are estimated.Next, the correct value and error covariance are calculated, which concludes the correction process, after which the "age" value is increased.

Configuration of Base Station and Indoor Positioning
System. Figure 7 shows a smartphone location tracking

Kalman gain calculation
Error rate calculation Centroid calculation x = 1.0 * x /range/range sum y = 1.0 * y /range/range sum system that uses iBeacon.It consists of a smartphone that estimates and transmits the distance between the BS and itself on the basis of the RSSI from the compiled iBeacon signals and a server system that calculates the smartphone's location on the basis of the BS coordinates and estimated distance.This system was developed in an environment described in Table 2.
iBeacon's maximum transmission distance is defined as 90 m and the standard transmission cycle is defined as 100 ms.However, the cycle can be programmed to operate slower, that is, at 900 ms.The Estimote Beacon, which was used in this study, has a transmission cycle of 200 ms and a maximum transmission distance of 70 m.Figure 8 shows the configuration of a BS using Estimote Beacons.Each grid is 0.5 m long and six iBeacons are installed.
The BS was configured on the basis of the signal property (see Section 4.1).The iBeacons were defined to be located within 5 m according to the distance standard deviation of the iBeacon signals received at the smartphone.

Signal Property.
In this study, we analyzed the signal property of the iBeacon's measured distance, which was used in experiments before we performed the indoor positioning of smartphones using the extended Kalman filter.The distance was estimated using the RSSI value included in the iBeacon signal.The reference points for the measured distance were 1 m, 3 m, and 5 m; each was measured 1,500 times, after which their standard deviation and average were calculated.Allowing for the signal's path loss, the distance measurement using the iBeacon RSSI can be calculated as follows: where PL is total path loss,  TX / RX are transmitted and received signal strength, respectively,  is measured distance,  0 is standard distance (define: 1 m),   is standard deviation (define: 0), and  is path loss exponent.After substituting  RX ( 0 ) with −59 dBm, the signal strength for the 1 m reference point described in the iBeacon development document, (1), ( 2), (3), and (4) were used to calculate the relative distance measurement per RSSI signal strength.
Figure 9 shows measurements of the distance to the iBeacon transmitter from a distance of 1 m.The average of the six measurements to the iBeacon transmitter was 0.6 m, which had an error of 0.34 m. Figure 10 shows measurements of the distance to the iBeacon transmitter from a distance of 3 m.The average of the six measurements to the iBeacon transmitter was 1.39 m, which had an error of 1.61 m. Figure 11 shows measurements of the distance to the iBeacon transmitter from a distance of 5 m.The average of the six measurements to the iBeacon transmitter was 2.21 m, which had an error of 2.79 m.
Thus, the distance measurements from the 1 m, 3 m, and 5 m points resulted in errors of 0.34-2.79m from the real distance.Based on this result, it can be confirmed that while it is possible to measure the distance using only the iBeacon's RSSI value, an error would exist between the real and calculated distances.This is due to a number of factors that cause changes in the received RSSI value, such as the battery life, experiment environment, space configuration, human movement, and smartphone location and direction.
Figure 12 shows the average measurement per unit distance.The average was calculated using the distance measured on the basis of the RSSI value determined from distances of 1 m, 2 m, 3 m, 5 m, and 10 m. Figure 13 shows the standard deviation of the measurements per distance.The distance was measured using 1 m, 2 m, 3 m, 5 m, and 10 m as reference points to verify the accuracy of the "immediate," "near," and "far" distances defined in the iBeacon development document.As can be seen, the deviation was not high when the measurement was taken from distances of 1 m and 2 m, but it increased for distances of 3 m and 5 m and increased further for 10 m.

Indoor Positioning Using Extended Kalman Filter.
From the analysis of the iBeacon's signal property (Section 4.1), we confirmed that there were irregularities and variations in the measurements of the iBeacon RSSI according to the distance and the beacon.Because a single distance measurement using the iBeacon RSSI is not reliable, it is necessary to create a measurement noise model for application to an extended Kalman filter based on the result of the signal property analysis.Table 3 lists the inclination per section of the standard deviation shown in Figure 13.
As can be seen in Table 3, BS6 is not a reliable measurement because of the irregular change in the deviation per     section.The deviations of the other iBeacon RSSIs besides BS6 increased sharply in the section between 5 m and 10 m.Therefore, in this study, the measurement noise model was defined as follows, by reflecting the property of the iBeacon RSSI to apply the model to the algorithm of the extended Kalman filter: 3) . (5 The system variables of the extended Kalman filter using the results presented above can be defined as follows: (i)  Value (standard deviation of process noise): it is standard deviation of the motion model errors.In this study, a scale factor of 1.0 was applied. Define (ii)  Value (standard deviation of measurement noise): it is standard deviation of the measurement model errors.In this study, the value was derived from (5). Define Next, we discuss the analysis result of the smartphone coordinates measured in an experiment environment using the extended Kalman filter, which reflects the analysis of the iBeacon's signal property.
Table 4 lists the values of the iBeacon signal that was measured 1,000 times at the and -coordinates (2,5).Table 5 and Figure 14 specify the indoor positioning value applied with the extended Kalman filter.The average values of the and -coordinates were 2.05 and 5.3, that is, errors of 0.05 and 0.3 from the actual coordinates, and the standard deviations were 0.16 and 0.13, respectively.Because of the nature of the extended Kalman filter, where the accuracy improves as the number of recursions increases, the average and -coordinates were 2.13 and 5.3, respectively, when the number of recursions ranged from 1 to 20.Moreover, the average coordinates became 2.1 and 5.3 when the number of recursions varied from 81 to 100, indicating an error reduction of up to 0.03 and 0.04, respectively.
Table 6 lists the values of the iBeacon signal that was measured 1,000 times at the and -coordinates (6,7).Table 7 and Figure 15 specify the indoor positioning value applied with the extended Kalman filter.The average values  deviations were 0.48 and 1.03, respectively.The errors derived from the average coordinates were accumulated, and when the number of recursions ranged from 81 to 100, the errors in the average and -coordinates became 1.14 and 0.1, respectively, as listed in Table 7.The coordinates with the largest error exhibited a higher standard deviation compared to the other coordinates; thus, it could be concluded that the iBeacon RSSI value was influenced most significantly by the external environment.Table 8 lists the values of the iBeacon signal that was measured 1,000 times at the and -coordinates (9,8).Table 9 and Figure 16 specify the indoor positioning value applied with the extended Kalman filter.The average values of the and -coordinates were 9.43 and 7.81, that is, errors of 0.43 and −0.19 from the actual coordinates, and the standard deviations were 0.48 and 1.03, respectively.As specified in Table 9, the errors in the and -coordinates increased by 0.35 and 0.2, respectively, when the number of recursions ranged from 81 to 100.
By combining all the measurements for each coordinate, it could be confirmed that the errors in the average coordinates reflecting the total number of recursions were 0.53 and 0.56 for the and -coordinates, respectively.This is due to the nature of the extended Kalman filter, where the error margin decreases as the number of recursions increases.The average errors for 1 to 20 recursions were 0.33 and 0.53, respectively, while the errors reduced to 0.17 and 0.48, respectively, when the number of recursions ranged from 80 to 100.Considering that each grid was 0.5 m long, the smartphone's indoor positioning accuracy had errors of 0.26 m and 0.28 m for the and -coordinates, respectively.

Conclusion
Although LBS have been diversified and enhanced through the use of bluetooth, Wi-Fi, GPS, and sensor technologies in smartphones, most such services are still used outdoors.With the proliferation of construction techniques and information and communications technologies, there is a growing need to provide LBS indoors in the same way as they have been previously provided outdoors.Facilitating the provision of LBS in an indoor area requires technologies that can plot indoor maps, identify the positions of users accurately, and analyze routes efficiently.BLE-based beacons periodically broadcast signals containing ID and RSSI, thus playing the role of reference points for locations, as with indoor GPS.Following the launch of iBeacon, Apple applied it to a mobile payment service that replaced near field communication and to a service that provides information on matches held at the stadiums of the Boston Red Sox, LA Dodgers, and so forth.
The key technology of IPS involves the identification of a smartphone location.The existing beacon-based indoor positioning technology has low performance accuracy because of the characteristics of bluetooth signals; hence, it is necessary to enhance the indoor positioning accuracy by combining the existing approach with a location determination approach, which uses wireless technologies such as Wi-Fi and ZigBee.However, this increases the burden of the installation cost for a number of sensors having different models and leads to an increase in the development and maintenance costs because of the fusion of multilateral positioning technology.
To overcome the abovementioned issues, this study proposed a technique for enhancing the indoor positioning accuracy in a two-dimensional indoor area using only a beacon signal.Once it was assumed that the RSSI signal has a nonlinear property, the iBeacon measurement was analyzed and the standard deviation was used to define the measurement noise model () that reflected the signal properties by iBeacon and by distance.The defined  model was applied to the extended Kalman filter that was improved on the basis of the bluetooth signal property, which resulted in a relatively accurate calculation of the smartphone's indoor position.In this study, we were able to achieve improved accuracy compared to beacon-based trilateration.However, a limitation of this study is its inability to sufficiently reflect the smartphone's movement and the beacon's signal property.Based on this study, the next step is to conduct a detailed analysis of the smartphone's movement and the bluetooth signal deviation to generate a weighted value model for each beacon signal and its standard deviation model, which will then be applied to the extended Kalman filter.Furthermore, in the future, we aim to develop a model for restricted area access control using indoor positioning accuracy enhancements.

3. 1 .
Design.This study employs an iBeacon transmitter as a control point for measuring the indoor position of a smartphone.Because the BLE technology applied to iBeacon can only be used in an open space owing to the nature of radio Initial estimates for xk−1 and P k−1

Figure 3 :
Figure3: Comparison between Kalman filter and extended Kalman filter (the state transition matrix () has the following differences: (a) it is not a Jacobian matrix with a linear property; (b) its value is defined in accordance with a Jacobian matrix having nonlinear properties).

Figure 4 :
Figure 4: Design of extended Kalman filter.

( 1 )Figure 5 :
Figure 5: Logic configured for the implementation of the extended Kalman filter.

Figure 6 :
Figure 6: Smartphone positioning process using extended Kalman filter.

Figure 7 :Figure 8 :
Figure 7: Configuration of smartphone indoor positioning system based on iBeacon.

Table 1 :
Four proximity states of iBeacon.

Table 3 :
Distance standard deviation of iBeacon.