An Indoor Integrated Localization Algorithm Based on UWB/BLE

In recent years, some excellent technologies have emerged in the field of indoor localization, but they are not perfect. For example, The Ultra-WideBand(UWB) hardware is expensive, The application of UWB localization in narrow scenes will increase the number of anchors and bring a lot of expenses. Bluetooth-LowEnergy(BLE) localization has a short working distance, so it is not suitable for deployment in wide indoor scenes. In view of the above problems, A integrated localization algorithm based on UWB and BLE is proposed, which is used to achieve full coverage of wide and narrow scenes in indoor localization. The algorithm is based on the extended Kalman filter, and the observation update is accomplished by TDOA and RSSI, so as to realize the integrated localization. Experiments on the algorithm show that UWB localization can achieve an accuracy of 0.2m in large indoor scenes, and BLE localization can achieve an accuracy of 1.6m in small indoor scenes. The localization switching between wide and narrow scenes is smooth and stable with good robustness, which proves that the algorithm can accomplish full scene coverage of indoor localization.


Introduction
With the vigorous development of Internet of Things technology, the era of Internet of Everything is arriving. As an important application of the Internet of Things, Location Based Service (LBS) will be more and more demanded by the public. At present, in the open outdoor environment, GNSS (GPS, BeiDou, etc.) navigation system can realize high-precision navigation and localization. However, due to the occlusion of buildings, GNSS system can not complete indoor localization well. Therefore, how to provide accurate and reliable location information in indoor environment has become a research hotspot of scholars [1].
Wireless network-based localization technology is an important means to achieve indoor localization, and its representative technologies include UWB, WiFi, BLE, ZigBee and so on. Among them, UWB has long working distance and high localization accuracy, but the hardware is expensive; BLE has low power consumption and low cost, but its localization accuracy is not so good and its working distance is short [2]& [3]. In this paper, an integrated localization algorithm based on UWB/BLE is The time difference is multiplied by the speed of light to calculate the distance difference, and the coordinates of the tag can be obtained by solving the simultaneous equations by synthesizing multiple distance differences. Generally speaking, in the localization process, the tag broadcast signals outward, the anchor receive signals and record time stamp information, and the distance difference information can be solved by summarizing the information by multiple anchor [5].
As shown in fig. 1, there are anchor A 1 to n A , and the distance from the tag to the anchor are 1 r to n r respectively. after the tag broadcasts the signal, assuming that the timestamps of the signal reaching the anchor are t 1 to n t respectively, then the distance difference d between the tag and two anchor can be expressed as shown in formula (1).
Where i ≠ j, c is the speed of light. Combining multiple equations, the position information of tag can be obtained by solving the equations. The solution of each distance difference is distributed on the hyperbola corresponding to the connecting line of two anchor. Through multiple sets of distance difference information, it can be determined that the tag are at the intersection points of multiple hyperbolas.
In practical engineering applications, it is necessary to keep clock synchronization between different anchors, otherwise the timestamp information will be confused and the time difference cannot be calculated. In this paper, passive TDOA method is adopted. Anchor chains work together to actively broadcast localization messages. The tag receives localization messages and subtracts timestamps to

BLE Localization Method Based on RSSI
Bluetooth Low-Energy(BLE) is one of the lowest power wireless technologies, which is an extension of traditional Bluetooth. BLE greatly reduces power consumption by sacrificing transmission rate (usually only a few tens of Kbps). It only needs little overhead and low complexity to complete BLE location based on RSSI ranging. The integrated localization system designed in this paper adopts iBeacon and CC2541 Bluetooth chip of TI Company. The system consists of beacon and tag. The iBeacon is fixed in indoor environment, and the tag is worn on pedestrians. The relationship among transmission power, propagation distance and reception power of BLE signal can be described by formula (2), After taking the logarithmic shift term, it can be written as Formula (3), Where () R P dBm is the signal power received by the receiving point, d is the distance from the transmitting node to the receiving node. A is the power of signal propagation 1m away, n is the attenuation factor of wireless signal propagation, which is related to the environment [7].
After measuring the distance between the receiving node and the transmitting node, the trilateration method can be used to complete the localization. Let three iBeacons with known coordinates be and I (x , y ) 3 3 3 , and the tag with unknown coordinates be T(x, y). The distances from the tag to the three iBeacons calculated according to RSSI are 1 d , 2 d and 3 d , and the distance relationship can be expressed as formula (4).
This is a nonlinear system of equations, and the coordinates of the tag can be obtained by Least Square method (LSM). If you need to complete 3D localization, you only need to add another iBeacon and use three times of trilateral localization [8].

UWB/BLE Integrated Localization Algorithm
UWB signal has long propagation distance and high localization accuracy, but its hardware is expensive, so it is not suitable for deployment in narrow scenes. BLE equipment has low cost and effective working distance within 10m, which is suitable for narrow indoor environment but not for wide scenes. Using the method of Integrated localization, UWB and BLE are integrated into one system, which can meet the needs of indoor environment and realize the full scene coverage of indoor localization .
The key of UWB/BLE integrated localization lies in the design of integrated Localization algorithm. This paper proposes an integrated localization algorithm based on extended Kalman filter (EKF). The discrete form of EKF is shown in formulas (5) to (10).
The prediction equation are as fallows, The observation update equations are as fallows, Where, X is the state vector, u is the driving vector, q is the noise vector, p is the state vector error covariance matrix, and Q is the noise covariance matrix. Y is innovation residual vector, z is observation vector, r is observation noise, S is covariance of observation vector error, R is covariance of observation noise, k is Kalman gain matrix, f is the system state transition function, h is the observation function [9].

Vector Definition
The state vector of the integrated localization algorithm is selected as, Where, p is the three-axis coordinate of pedestrians in the scene coordinate system, and v is the three-axis velocity of pedestrians in the scene coordinate system.

Prediction Stage
The time updating process of the state vector is, Where k a is the triaxial acceleration of the system, and t is the interval between two updates.
Because the system in this paper is not equipped with inertial measurement unit, acceleration can't be measured, so the accuracy and sensitivity of localization can be improved by increasing the update frequency to reduce the influence of no measured acceleration [10]. In this paper, the update interval is set to 50ms, because the update time is little enough, and the quadratic term of time is about 0. If the quadratic term of time is ignored, the prediction process formula can be simplified as, (16) k q is the process noise of the system and is generally considered white noise. Process noise will increase the uncertainty of the prediction process, as shown in Equation (5). Where L is the noise transfer matrix, Q is the covariance matrix of process noise. In this system, the covariance matrix of process noise measured based on experimental statistics is as follows,

TDOA Observational Measurement Update
When the tag receives the broadcast messages of the two anchors, TDOA can be used to calculate the distance difference between the tag and the two anchors to complete a measurement update. The predicted value ˆk Z of the observation vector is calculated by the observation function formula (18), The observation is one-dimensional, so the observation error and its covariance matrix are also one-dimensional. Experiments show that the observation error is 0.37 k r  and its covariance is After TDOA measurement update, UWB localization information is integrated into the state vector, and UWB localization is realized [11].

RSSI Observational Measurement Update
The observation vector updated by RSSI measurement is the distance from the tag to the ith iBeacon, the predicted value ˆk Z of the observation vector is calculated through the observation function formula (20), The true value of the observation distance is calculated from the RSSI value received by the tag, and the formula (3) in Section 2 can be deformed to obtain, The observation is one-dimensional, so the observation error and its covariance matrix are also one-dimensional. Experiments show that the observation error is k 0.53 r  and its covariance is After RSSI measurement update, BLE localization information is also integrated into the state vector, and BLE localization is realized.

Experimental Results
In order to verify the effectiveness of the algorithm, this paper conducts pedestrian location experiments in indoor halls and corridors. The indoor hall is 30m×10m and the corridor is 30m×3m. The experimental localization system includes UWB anchors, BLE iBeacon and tag, which integrates UWB and BLE modules. The layout of the test site, UWB anchors and BLE iBeacons is shown in Figure 2.

Figure 2. Lab Scenarios, UWB Anchors and BLE Beacons
In this paper, the static single point localization experiment is carried out in three areas: the hall, the corridor and the junction of the hall and the corridor, and the localization data is collected in each area for 3 minutes. Table 1 analyses location data for different regions. The localization error is about 20cm, and the mean square error of the error is small, indicating that the fluctuation is sparse. The BLE localization accuracy in the corridor area is coarse, the localization error is more than 1.5 m, and the mean square error of the error is close to 1m, indicating that BLE localization has obvious fluctuation. At that junction of the hall and the corridor, UWB and BLE work simultaneously, the average localization error and mean square error of the system are between UWB and In this paper, a walking localization experiment is also carried out, in which pedestrians walk according to the preset trajectory, and the coordinates solved by the algorithm are recorded. After walking the predetermined trajectory, compare the trajectory calculated by the algorithm with the real trajectory. The real trajectory and 2 algorithm trajectories are shown in Figure 3. Figure 3 shows that the walking trajectory of UWB based on TDOA is very close to the real, it is smooth and Fluctuate slightly. There is a rough error between the localization trajectory of BLE based on RSSI and the real trajectory, and there is a certain fluctuation. The error and fluctuation of BLE are both larger than UWB, which is determined by the characteristics of the two localization methods. It can also be seen from the figure that the coincidence between the localization trajectory and the real in the whole scene is good, and the localization switching between the hall and corridor is smooth and stable. The integrated localization algorithm can effectively realize the localization of the whole indoor scene.

Conclusion Remarks
In this paper, the indoor localization technology is studied, and a integrated localization algorithm based on UWB/BLE is proposed. UWB updates the system state through TDOA observations, while BLE through RSSI. By deploying the algorithm to the embedded localization system, the localization experiment in hall-corridor scene is completed. Experiments show that the integrated algorithm can combine the two localization methods perfectly. In the hall scene, the UWB localization accuracy reaches 20cm with slight fluctuation; In the corridor scene, the accuracy of BLE localization reaches 1.6 m, with moderate fluctuation; At the combined position of hall and corridor, the localization switching is smooth and stable, which proves that the integrated localization method proposed is effective.
In addition, the complexity of the integrated algorithm is low, and it can be implemented on the embedded platform with scarce computing resources, so it is a practical algorithm.