Indoor Tracking by Adding IMU and UWB Using Unscented Kalman Filter

In recent days Internet of Things (IoT) applications becoming prominent, like smart home, connected health, smart farming, smart retail and smart manufacturing, will lead to a challenging task in providing low cost, high precision localization and tracking in indoor environments. Positioning in indoor is yet an open issue mostly because of not receiving the signals of GPS in the context of indoor. Inertial Measurement Unit can give an exact indoor tracking, however, they regularly experience the cumulated error as the speed and position are gotten by incorporating the increasing acceleration constantly as for time. At the same time Ultra Wideband localization and tracking will be influenced by the real time indoor conditions. It is difficult to utilize an independent localization and tracking system to accomplish high precision in indoor conditions. In this paper, we come up with an incorporated positioning system in indoor by joining IMU and the UWB over the Unscented Kalman Filter (UKF) and the Extended Kalman Filter (EKF) to enhance the precision. All these algorithms are analyzed and assessed dependent on their exhibition.


Introduction
High-precision and low-cost localization and navigating systems for indoor portable devices have gotten basic in IoT applications, like smart home and smart manufacturing [1]. As of late, real-time location systems (RTLS) are being utilized for stock administration and security uphold in manufacturing plants and circulation focuses. It is vital in RTLS to appraise the position of moving articles, for example, forklifts and laborers along with the fixed bodies. To evaluate the position of movable items, an exceptionally fast and exact algorithm is needed.
The precise and strong indoor position is a major facilitator in forthcoming Internet applications. Inertial navigation is a technique utilizing the estimation from the IMU, primarily, gyroscopes and accelerometers for positioning and navigation [2]. Utilizing the estimation given by the IMU, the Inertial Navigation System (INS) can enumerate the velocity, position and the direction of the system beginning from some known starting point. In any case, because of their drawn out floats, for example, accelerometer inclination and scale factor mistakes, from the calculated states of navigation (position, velocity, and attitude) will gain with time. For tracking of target in indoor 3D environment, there are many technical issues to reduce because of the indoor environment complexity [3,4]. The effect of bumps like equipment, furniture, walls, the existence of human etc. causes multi path and fading problems. There are individual technologies which are used in wireless network, for example, Wi-Fi, Bluetooth, ZigBee and UWB. The better appropriate innovation for large precision localization is UWB.
Ultra-Wideband is a radio innovation, which is essentially different in relation to the at present generally utilized conventional radio technologies. It transmits signals over various groups of frequencies (3.1-10.6 GHz) all the while with hundreds MHz of transmission capacity (more prominent than 500 MHz). It is intended for Indoor Positioning Systems (IPSs) to conquer numerous difficulties, for example, signals because of extreme multi path reflect from furniture and wall, Non-Line-of-Sight (NLOS) signal because of blockages, and scattering of signal because of more prominent thickness of obstacles. With the known positions of reference nodes, by estimating the Time-of-Arrival (TOA) from each of the reference node to target, the relating distances can be calculated. By using calculated distances, the location of the target can be estimated utilizing various methods of positioning [5][6][7][8]. Since 2010, localization devices based on UWB radio sensor, like Pozyx from KickStarter and DWM1000 from DecaWave [9], have gotten industrially accessible. At present, a few IPSs like the Ubisense System and Zebra System, utilizing UWB radio sensor have been conveyed [10,11].
In spite of the fact that UWB has been recognized as perfect radio technology in indoor scenario for getting accurate data about the location, still there is a challenge for the IPS based on UWB technology to predict precise location data because of the multi path propagation of the direct LOS signal and propagation of the NLOS signal. To defeat the multi path impacts, a simple method is to eliminate the obstructions that may cause those inferences or to consider the open zone. This choice may not be conceivable in most indoor situations. IMU-based INSs are obtuse toward these interference but the errors resulted from the estimated position will increase over time. So these two technologies, IMU and UWB can be coupled for applications of IPS because these two technologies are corresponding to one another.
In [12], the examination on three-dimensional UWB positioning utilizing distinctive conservative reference node configurations is conducted. Linear least squares with TOA values obtained using threshold based search back algorithm is used for positioning.To defeat the issues with respect to positioning, the development of the structure of two algorithms named Extended Kalman Filter (EKF) and Unscented Kalman Filter (UKF) positioning methods are presented at [13]. But here the authors considered a two -dimensional system only. Demonstration of calculating the TOA values utilizing the two-way-ranging, positioning using the least squares (LS) and tracking with help of the EKF algorithm presented in [14].
In [15] an altered EKF sequential update, here, the Jacobian matrix and vector of measurement with the pseudo versions, for tracking of the target in indoor following applications to ultra-wideband systems utilizing Time Difference of Arrival (TDOA) estimation is introduced. We will get high exactness with TDOA on account of the enormous transmission capacity of UWB signals, however, its application is compelled by the corresponded measurement noise because of TDOA values. A multi-sensor combination design is presented in [16] for the IPS. At the point where UWB can be accessible and reliable, the IMU error of long term drift is aligned using UWB. Something else, then it shit to IMU from UWB promptly to obtain status of location and tracking. In [17], a combined solution of localization using both UWB, IMU is presented, that results continuous and precise location, particularly on account of NLOS situations. But, in [17], regarding the time synchronization issue, all the UWB modules are associated with a central regulator through the fibre line. This will build the deployment complexity and the expense of the system. TOA algorithm is used in both [16] and [17] and have not taken the clock drift impact into account. Besides, despite the fact that acceleration noise of IMU is taken in the acceleration measurements, the impact of this on the displacement, velocity because of incorporation is not evaluated in [16,17].
In [18], a tracking and positioning algorithm coupling IMU, UWB and sensors specific to an area is recommended. This indicated that combination solution will acquire high precise 3D velocity and knowledge of height by utilizing the biomechanical lower body model. Note that large portion of the current indoor navigation and positioning methods depended on lower body frameworks of human that expands expense and deployment difficulty [19].
Hence, to accomplish less price and more precise navigation, positioning of indoor system, this paper centers on coupling of UWB and IMU dependent on Filter calculations. The information received from IMU is utilized to equation of state and information received from UWB is utilized to equation of observation for filter calculations. For improving accuracy of indoor positioning further, the nonlinear kalman filter, namely, UKF algorithm is considered in this paper.
In [2], considered that the target moves in 2D environment and for range measurement Time of Fight (TOF) ranging method is used and Least Square method for calculating the position using TOF values. In this paper 3D environment is considered for comparing performance of algorithms. For Calculating the TOF values time synchronization is needed between the target and reference nodes, which can overcome by using TOA estimation algorithms using the samples of energy signal and for positioning Iterative method is considered. The accuracy of position can be improved by using Iterative method and convergence problem can be overcome.
The main contributions of this paper can be summarized as follows: Positioning with UWB using the Iterative method compared with linear least squares method using TOA values for two different configurations of reference node placement. An UKF fusion positioning algorithm introduced to decrease the computational complexity and to get better accuracy compared with EKF. From the results of simulation, we can conclude that algorithm based on UWB can obtain high precision of position compared to EKF fusion positioning algorithm in a three-dimensional area. The effect of the number of reference nodes or reference nodes density is also performed for all the algorithms.
In Sect. 2, Indoor positioning System using IMU is explained first and then positioning using UWB, which uses TOA values as range measurements and Iterative Method for position estimation is explained. In Sect. 3, the calculations dependent on coupling IMU and UWB positioning system is introduced in environment of 3D. In Sect. 4, results of simulation are given and localization accuracy of all algorithms are analyzed and explained. Conclusions are given in Sect. 5.

Positioning and Tracking System Using the Coupling of IMU and UWB
The proposed positioning and tracking system by coupling sensor based IMU and UWB localizing system in indoor environment of three dimension is given in Fig. 1. Here the three axis(x, y, and z) accelerometers, one UWB radio sensor (given as Target sensor) are placed on the body of a platform, and four UWB radio sensors (given as reference sensors) are placed inside the building with known locations.

Positioning Algorithm Using IMU
To change the coordinates from one set to another, we need a rotation matrix that reveals to us precisely how one frame is rotated with respect to the other. Rotations are especially precarious mathematical objects and they can be the source of significant bugs if not managed cautiously and determinedly. There is a wide range of approaches to represent rotations [20]. The best method of representing a rotation is utilizing the euler angles. These angles represent an arbitrary rotation as the creation of three separate rotations about different principal axes. Euler angles are attractive in part because they are a parsimonious representation, requiring only three parameters instead of nine for a full rotation matrix, and it is easier to understand than another way of quaternion method and no need to calculate quaternion multiplication [2]. C1, C2, and C3 are the Euler angles about x, y, and z axis respectively, given as shown below. By considering rotations with infinite, then the functions of trigonometry approximate as sin (θ) ≈θ and cos (θ) ≈ 1. Using these approximations, C can be written in terms of angular velocity as shown in (2). a , the accelerometers of the three axis are used to calculate the acceleration in system A as follows Then, the acceleration in system B, a , can be calculated using the rotation matrix as follows If we consider the acceleration gravity g, then the acceleration in system B can be calculated by subtracting it from its value as follows If we consider the sampling interval is short, then constant force is subjected to the carrier with a linear motion of uniform acceleration. Let the position of the system B be x b , can be calculated as follows , v(t) and a b (t) be the position, velocity and the acceleration of the system respectively measured at 't,x b (t + 1) be the location at '(t + 1)' time,(Δt) be the sampling interval.

Position Processing Algorithm Using UWB
UWB positioning of an unknown target node can be made by using fixed known locations of reference nodes. For a 3D environment a minimum of four reference nodes will be enough for positioning. Positioning of the target node can be performed in two steps. First one is measuring the signal parameters either time difference of arrival (TDOA) or time of arrival (TOA) or direction of arrival (DOA) or received signal strength (RSS), of the transmitted signal from reference nodes utilized as range values for target positioning. Second step, using range values, the location of the target can be calculated. The most applicable one for the UWB system is TOA as this takes the advantage of a huge time resolution of UWB signals [21]

TOA Estimation Algorithms
Measuring the TOA values is difficult because of the scattering nature of UWB signals. Always the path which arrived first need not be the robust path. Hence, there is requirement of proper range and low complexity methods at attainable rates of sampling. The Fig. 2 represents the technique for measurement of TOA values. Here TOA evaluation is realized utilizing the z[n] samples, which are appropriated from the square-law mechanism.
The TOA calculation adopting the samples of energy obtained from square law mechanism, shown in Fig. 3. Maximum Energy Selection, where the sample output

Estimation of Position
Position of the target node can be calculated by using well known triangulation/ trilateration (2D) or multilateration for higher dimensions by two ways. One is equations of type nonlinear obtained using nonlinear relations like maximum likelihood (ML) and nonlinear least squares (NLS) algorithms. Another way is converting these equations into linear like weighted linear least squares (WLLS), linear least squares (LLS) algorithms. But in triangulation/ trilateration the three circles with radius as the measured distance between a reference sensor and the target sensor using TOA values may not converge to a single point there by the performance of the system decreases. If we consider three dimensions where we require four reference nodes, this convergence issue still extends and degrades the performance. So another method called Iterative method with Hessain function is used. The function for optimization method is where,x = p, q, r, t 0 T be the position to calculate.t i , t m be the i th reference sensor received time and target sensor transmitted time.
To calculate the location of the target sensor the following iterative equation is used.
where,x be the location at the k th iteration, be the size of the increment,s be the objective function is the Hessain function increased by utilizing below equation here, The mean of known reference nodes is taken as the initial estimate and the Identity matrix (I) as the hessian grid beginning.

Algorithm Based on IMU and UWB
To beat the individual deficiencies of the UWB and IMU, we execute an UKF that couple the two positioning systems so that the UWB sensor based result of position is used to change the IMU mistakes and the IMU sensor based result of position solution is used to distinguish and isolate the adjusted UWB sensor data to build the general precision of positioning performance. Here, we present the coupling algorithm using EKF first, then the coupling algorithm using UKF [2].

EKF Algorithm
Here we are considering a plane of three -dimensions target moving with uniform acceleration. The vector of state at time k, is given by here, x(k) be the position, v(k) be the velocity, and a(k) be the acceleration. Let (Δt) be the sample interval and (Δt)w(k) is the process noise of acceleration. Then (Δt) 2 2 w(k) represents the process noise of velocity and (Δt) 3 6 w(k) represents the process noise of position, because of integrating acceleration two times. The velocity and acceleration values can be obtained from IMU.
The equation of state at time (k + 1) with uniform acceleration motion is given in (12) (10) The matrix form of the state equation written as where F represents the transition matrix of state,G represents the driving matrix of noise. The vector of process noise having mean as zero and matrix of covariance Q is given by

And
And Let the observation vector be z(k) , including the correct distance from reference sensor to target sensor d i (k) and the observation noise n i (k).
The equation of observation matrix including the range between the target sensor, four reference sensors and the angle between target sensor to four reference sensors is expressed as (x(k) ⋅ x 1 ) = x x x 1 + x y y 1 + x x z 1 be the dot product of two vectors namely the position of reference sensor and the position of target sensor for i = 1. And, The above nonlinear equations require linearization, so the EKF algorithm is used with Taylor expansion of first order.
H(k) , the matrix of Jacobian is given as in (19).
Here in EKF we are calculating the matrix of Jacobian, which increases the algorithm's complexity of computation. If the assumption of linearization is not correct, then algorithm of EKF performance will diverge and degrade. Algorithm 1 gives the EKF algorithm process step by step. where,

Unscented Kalman Filter
For the estimation of parameter EKF is the standard technique, but EKF is having some drawbacks. In EKF, the non-linear equations of the system are converted into linear equations. In this situation, the accuracy of EKF can attain up to first order of Taylor's series and also, it needs to calculate the matrix of Jacobian. Because of the mentioned drawbacks and issues, UKF has been used to present better performance as compared to the EKF algorithm and especially for the non-linear systems. UKF is based on unscented transformation (UT), the approach used to estimate the statistics of the random variable. In UKF, some points are used to catch the actual covariance and mean of the random variables. Dissimilar to EKF, UKF doesn't have to calculate matrix of Jacobian at every instance and embraces unscented transform to produce reliable measurements which undergo transformation of nonlinear. To random variable with distribution as Gaussian, unscented transform can catch covariance, mean precisely to Taylor series 3 rd order. So it can successfully conquer the low precision restriction of the EKF algorithm. So the algorithm of UKF is more advantageous and exact when contrasted with the algorithm of EKF.
In the 3D plane expecting that the target sensor is moving with uniform acceleration, the vector of state contains acceleration, velocity and position and the vector of measurement containing distances and angles from reference sensors to target sensors is the equivalent to that in the algorithm EKF.
Here the 2n + 1 sigma points can be calculated by using (21), these points are propagated through the nonlinearity and are used to calculate the covariance and mean of the variable after transformation. where W (i) m is the sigma points mean weight and W (i) c is the sigma points covariance weight, i in the above weights is the sample point index.
Generally, α is normally taken as a small positive value to maintain the sigma points mean nearer to x, β is a positive coefficient to integrate the x prior distribution, and κ is taken as zero to make the matrix P(n + λ) as a non-negative-definite matrix. The algorithm begins considering the initial mean as m 0 and co-variance as P 0 .
The algorithm of Unscented Kalman Filter algorithm is given below.

Results and Discussion
A number of Monte Carlo simulations were performed to estimate the performance of algorithms, in terms of precision for both the localization and tracking methods. We are considering two scenarios for placement of reference nodes. First one, at the top four corners of the building and second one Cuboid-Shape Configuration as shown below. For the given two scenarios the reference nodes are fixed accordingly and the unknown target position is randomly selected. The estimated position of the target using Iterative method (IM) is compared with the traditional linear least squares (LLS) method of UWB for two scenarios in Figs. 4 and 5 The estimated target position for each run result is obtained and averaged over 1000 runs are presented. The result shows that the Iterative method gives better accuracy compared to the linear least squares method.
The variance of time of arrival error, 2 TOA,i , is assigned proportional to the distance between reference node i = 1,2,3,4 and the target node, d 2 i with SNR = d 2 Here the mean square position error MSPE of the linear least squares (LLS) method and iterative method (IM) for SNR belongs to [− 10, 60] dB are compared. The MSPE is given As expected, the iterative method is preferable to the LLS method and the MSPE is less for both scenarios as given in Figs. 6 and 7 for two scenarios respectively.
The comparison of two scenarios is given in Fig. 8. And among the scenarios, the second with Cuboid-Shape Configuration gives better performance compared to the first scenario with reference nodes at the top four corners of the building.The MSPE of iterative method, with reference nodes fixed as second scenario is smaller by around 1 dB at SNR ∈ [− 10 60] dB compared to the first scenario. For the second scenario, the reference nodes occupy four corners including top and bottom of the area of localization. Hence, almost the total area of localization is covered. In the case of the scenario1 reference sensors at top of the positioning area covered less area compared to previous one. So geometry of the reference nodes plays an important role in calculating positioning. The Cumulative distribution function of location errors for both scenarios are given in Fig. 9. It can be observed that scenario 2 is the best precise technique with an error under 2 m in 90% of situations, for scenario 1 a similar exactness is accomplished in just between 60 and 70% of situations.
A simulation to evaluate the performance of indoor tracking with UWB positioning and IMU tracking is compared with EKF and is compared with the true (ground truth) trajectory in Fig. 10. EKF gives better performance compared to UWB with IMU. In this simulation, for the first time the estimated state vector is taken as Xest is Zero matrix, in which Xtrue = Xest. The parameters of UKF are taken as α = 0.001, k = 0, and β = 2. The state vector size is n = length (Xest). Where the process noise vector is taken as Gaussian white sequences noise with zero mean and covariance R = I σ 2 , where, σ = 0.01. The covariance matrix of process noise is given by Q = I × 10 −10 , here I is the identity matrix. The comparison of EKF and UKF tracking algorithms is shown in Fig. 11. UKF still provides better estimation accuracy than EKF does. We can see that the tracking result is quite good with the estimated result from UKF.
The function of cumulative distribution of the tracking errors for all the algorithms are given in Fig. 12. It is noticed that UKF tracking algorithm is the best precise technique with an error around 2 m in 90% of situations, but for EKF a similar exactness is accomplished in 75% and only 60% in case of UWB.

Density of the Reference Nodes
By expanding the number of the reference sensors may reduce the positioning errors. For four reference sensors, the position is similar to in Fig. 4. The position of 8 The mean square error (MSE) for different numbers of reference nodes is summarized in Table1 for all algorithms. To sum up, we can say that expanding the quantity of reference sensors diminishes the positioning errors basically when utilizing techniques dependent on nonlinear Kalman filtering. However, no substantial improvement is achieved by expanding the quantity of reference nodes beyond some point. This must be evaded, since expanding this number increments mostly the complication.

Conclusion
In this paper, we have proposed an effective approach for indoor tracking and positioning systems in 3D. The positioning is calculated using Ultra Wideband with the TOA values received from all four reference nodes. The TOA values are obtained using Maximum energy Selection Search Back algorithm. And the position is calculated using an iterative method by using those TOA values. The positioning using Iterative method is compared with the linear least squares algorithm and showed that Iterative method gives better performance compared with linear least square algorithm. The positioning performance is compared in two scenarios, reference nodes placed at top corners of the building and other as cuboid shape configuration. The latter gives better results compared to previous configuration. The position of reference nodes has a significant effect on the exactness of localization.
The tracking is done by integrating UWB with IMU. And the performance can still be increased by using the nonlinear Extended and Unscented kalman filters. The state equations of the Kalman filters are obtained from IMU data and the observation equation from UWB measurements. EKF is compared with UKF and showed that later can improve the performance.
The outcomes got shows that the proposed UKF technique have been contrasted with the EKF and have shown significant gain in tracking of moving objects. The UKF displays excellent performance when contrasted with regular EKF since the series approximations in the EKF calculation can lead to poor representations of the nonlinear functions and probability distributions of interest.  In this paper the impact of the quantity of reference sensors on the position exactness has also been analysed. Undoubtedly, as expected, normally, the position exactness increments when the quantity of reference sensors increments, however just up to a specific value. Anyway the cost to pay for this is an expansion in the computational load.
Funding Not Applicable.

Conflict of interest
The author declare that they have no conflict of interest.