Pedestrian Indoor Navigation System Using Inertial Measurement Unit

This paper presents a method for an indoor pedestrian localization, based on the data that solely are measured by a foot-mounted Inertial Measurement Unit (IMU). To locate the user accurately, a comprehensive Extended Kalman Filter (EKF) with five states is developed. Five different error reduction methods are employed to estimate the errors of all five states. These error reduction methods feed EKF independently, at stance phases or different time intervals of swing phases. The navigation system is developed using the accelerometer and gyroscope measurements and without magnetometer, thus it is insensitive to the presence of metal and magnetic fields, and it is able to estimate the user’s tracked trajectory with the same accuracy in both indoor and outdoor environments. The system does not rely on the measurement from external infrastructure (e


Introduction
The large potential applications of a pedestrian navigation system have attracted the attention of many researchers worldwide. Improving the performance of such systems as an important issue is still an open research challenge.
Navigation systems can be considered as indoor and outdoor. Outdoor navigation systems are mostly developed using Global Positioning System (GPS), however GPS is degraded in urban areas, tunnels, thick forest and indoor environments. Indoor navigation systems can be categorized as beacon-based (infrastructure-based) and beacon-free (infrastructure-free) approaches [1]. Beacon-based system relies on the infrastructure such as Wireless Fidelity (WIFI), Ultra-Wideband (UWB), Radio Frequency Identification (RFID) and infrared ultrasound [2][3][4]. Although these systems estimate the user's position with tracking error rate of less than 1% of the total traveled distance, their main drawbacks are the expenses and difficulty of infrastructure deployment. Beacon-free system relies on Inertial Measurement Unit (IMU). Utilizing the latest advancements in Micro Electro Mechanical Systems (MEMS) technology, several types of off-the-shelf IMUs are produced. IMU incorporates an assortment of inertial sensors, including orthogonal gyroscopes, accelerometers, and sometimes magnetometers and barometric pressure sensor [5,6]. However, magnetometer is sensitive to the properties of environments, e.g., presence of metals might influence the magnetometer performance, thus in general it is not reliable enough to be used in an indoor navigation system. The signal generated by gyroscope and accelerometer can be employed to estimate the pedestrian orientation and position. Pedestrian Dead Reckoning (PDR) and Inertial Navigation System (INS) are two conventional methods that provide such estimation, taking advantage of the sequential nature of human bipedal locomotion.
In PDR methodology, position of the pedestrian is obtained based on the step length and heading angle at each detected step. The step length is time-varying, and can be estimated online using its linear relationship with step frequency [7], while the heading is obtained from the data measured by gyroscope or magnetometer. The accuracy of navigation system based on PDR alone can be as low as 2%-10%, where acceleration can be measured on the torso, waist, foot and head [8][9][10][11]; however the error may grow quickly due to the inherent instrumental error, disturbances from the environment and unsteady walking, in addition to error of step length calculation and increment of the heading error as a non-observable state [12,13].
On the other hand, inertial navigation technology can be employed for pedestrian tracking [1,8,14]. In an INS by integrating the angular velocity signals measured by gyroscope, the IMU orientation is obtained. In addition these signals are used to transform the measured accelerations from the local coordinates system to the global coordinates system. Knowing the starting point, the pedestrian position in turn is estimated by double integrating the acceleration after subtracting the gravitational acceleration. However, the data from IMU is susceptible to drift error. Integration and double integration of biases exist on the signals measured by accelerometers and gyroscopes, together with the incorrect projection of gravitational acceleration on the horizontal axes, will result in the large tracking error. This error grows cubically in time and may exceed one meter in a few seconds [12][13][14][15].
A human gait consists of stance and swing phases [16,17]. In order to limit the INS error growth, many researchers mounted IMU on the user's shoe (as shown in Figure 1) and used different techniques to detect the stance phase, based on IMU signals [12,[18][19][20][21]. Among them Foxlin [22] was one of the initiative researchers who used Extended Kalman Filter (EKF) to estimate the error and correct the states in every stance phase using Zero velocity UPdaTe (ZUPT). Zero Angular Rate Update (ZARU) is another common technique that estimates the bias of the gyroscope in every so called still phase [19,23]. Based on the fact that most of the paths in indoor environments are straight, Borenstein et al. [24] proposed a technique called Heuristic Drift Reduction (HDR) to

Inertial Tracking Methods
This section details our proposed pedestrian tracking algorithm. In comparison to the state-of-the-art on EKF-based navigation systems, in this work: (i) we update EKF with the error measurements from all five states and not only one (υ in [22]) or three states (υ, ψ and ω in [19]); (ii) the correction is applied not only at stance phases (alike previous works) but also at different time intervals of swing phases; (iii) different from the previous works, the error reduction methods update EKF independently, which improves the tracking accuracy, significantly; and (iv) the system is developed without using magnetometer, thus it can work properly in the existence of metal. Figure 4 illustrates the framework of the proposed navigation system. As can be seen, IMU measures the user's foot acceleration a and angular velocity ω. These data are used to detect stance phases, and reduce the heading error. Jimenez et al. [1,19] presented the IMU-alone EKF-based INS algorithm for indoor navigation with tracking error rate of 0.8%-1.8% of the total traveled distance. However the accuracy of these systems needs to be improved. This paper presents an infrastructure-free navigation system which accurately locates the pedestrian indoor. The accelerometers and gyroscopes measurements are used to calculate the user's position and orientation, and the 15-element EKF is implemented to correct the estimations. Five different error reduction methods are used to measure the errors of five states, which feed EKF independently. This system is developed as a part of the blind navigation aid project [25]. Taking into account the fact that blind in indoor environments usually follows straight paths and walks parallel to the building's walls, the proper error reduction methods are implemented. In addition, while magnetometer is not used, the system is insensitive to the environment equipment and supplies. Compare to the state-of-the-art, in this work more error reduction methods are employed that feed EKF independently and at both stance and different time intervals of swing phases. It causes to obtain the higher accuracy from an EKF-based INS algorithm. The performance of the navigation system is evaluated in several tests and results show the tracking error is less than 1% in terms of the percentage of the total traveled distance.
The remainder of the paper is organized as follows. Section II presents the IMU sensor used in this work. Section III describes the EKF-based INS method. Section IV details the error reduction methods. Section V discuses an evaluation of several indoor tracking tests, and finally, conclusion and future research directions are summarized in the last section.

Sensor Module Selection
Considering many factors including size, dynamic range, sampling rate and bias, we select the commercially available IMU, NavChipISNC01 from InterSense Inc. [5]. This miniature IMU is a high precision MEMS six-axis inertial measurement unit. Its size with castellations and frame is 92×58×22 mm (length×width×height), and it weighs 51 g. IMU is configured to provide inertial data at 200 Hz. The IMU outputs are a(t), dθ(t) and m(t) that corresponds to the output of the three-axis accelerometer, gyroscope and magnetometer, respectively.
In this work we mount the IMU on the user's foot, to take advantage of the sequential nature of the pedestrian motion and to employ error reduction methods at foot stances. Figure 2 shows how sensor can be fixed on the right foot of the user, using shoe laces. Assuming the user is walking along global y-axis, the sensor local (body) coordinates and the global coordinates are shown. Our algorithm is developed irrespective of the exact position and orientation of IMU on the user's shoe.
At every sample time, IMU measures accelerations and angular velocities. Figure 3 shows the typical signals measured by IMU during five steps of walking. As can be seen, the sequential nature of human

Midstance
Heel-off Toe-off Heel strike Midstance   The final output of the system is the estimated position and orientation of the user in the global coordinates, which are parallel to the building's main walls (North-East, North-West, Up). The rotation matrix that transforms data from the local coordinates to the global coordinates is obtained employing gyroscopes signals [8]. The details of the proposed framework are as follows.

A. Stance detection
In order to detect the stance phase, some conditions are defined. Once all of these conditions are satisfied, the stance is detected. These conditions are as follows • The norm of the gravity-free acceleration becomes less than the defined threshold thr sa .
• The norm of the gravity-free acceleration variance remains under the defined threshold thr sv .
• The norm of the angular velocity becomes less than the defined threshold thr gyro .
If all of these conditions are satisfied for the time more than the defined threshold thr time , the foot is detected to be at the still phase.

B. Inertial navigation system
The conventional INS algorithm estimates the user's position and orientation, based on acceleration (superscript b refers to the body coordinates) and angular velocity b k ω which are measured by IMU's accelerometers and gyroscopes, respectively. The main difficulty of using IMU data is the accumulation of sensors's biases, which leads to a huge error on the estimated position and orientation over a short period of time. In order to correct this error EKF can be used. In this work the error state is a 15-element (five states) vector and is defined as where all five components are 3×1 matrices and, δΨ, δr and δv are the estimated error in heading, position and velocity in the global coordinates, and δω b and δa b are the estimated biases for gyroscopes and accelerometers in local body coordinates, respectively.
To compensate the biases exist in the IMU data, the raw acceleration b k a and angular velocity b k ω are subtracted by the biases estimated by EKF over the previous sample time. In addition, the error estimated by EKF is used to correct the obtained orientation ' G k Ψ , position ' G k r and velocity ' G k v in the global coordinates (superscript G refers to the global coordinates). Thus, the procedure of states biases compensation and error correction can be written as

C. Dynamic orientation tracking
The dynamic orientation is obtained by integrating the angular velocity measured by gyroscope, over the time. Assume be the angular velocity vector at sample time k, in a short sampling time, the axes will be rotated by small rotated angle vector of δΨ which at sample time k can be written as Due to this fact that δt is short, δψ, δθ and δϕ are small. Therefore using approximation [8] the orientation update equation at sample time k can be obtained as where , , z x ω ω ω ω = y and Ω k is the skew symmetric matrix at sample time k, and can be written as Obtaining the rotation matrix, acceleration in the global coordinates at time k [8] can be estimated as Following this notation, in order to obtain velocity and position, the gravity compensated acceleration is integrated and double integrated over the time, which can be written using trapeze integration as where v G and r G are the velocity and position of the user in the global coordinates. Using the error estimated by EKF for velocity and acceleration at time k, the corrected position ' G k r and velocity ' G k v , in the global coordinates, can be obtained from Equation 2. Finally, the rotation matrix is corrected using angles' errors estimated by EKF. Assuming the angles' errors are small, using Pad´e approximation [19], the corrected rotation matrix can be updated as where k Ξ is the skew symmetric matrix at time t, and can be written as

D. Extended Kalman filter
We follow the EKF model addressed in [19,22] and proposed our EKF-based navigation system with dynamic error measurement matrices. Assume ' k δ x is the error state vector at time k, which is a nonlinear function of the states, the linearized state transition at time k can be written as where бx k is the estimated error state at time k, ' x is the corrected error state at time k-1 (can be obtained from Eq. 14), w k-1 is the process noise, and Φ k is a state transition matrix of size 15×15, which can be obtained as is the skew symmetric matrix of global acceleration and is used to estimate the IMU's orientation variations [19]. The measurement model [22] at time k can be written as (13) where z k is the measurement error, H is the measurement matrix, and v k is an additive white zero-mean Gaussian noise, with covariance ( ) Once the measurement at k is obtained, using the Kalman update equation, the filtered error state at time k can be estimated as where K k is the Kalman gain, m k is the actual error measurement, and δx k is the estimated error state [19].
The Kalman gain can be obtained as where P k is the covariance matrix of the estimated error. The process noise w k is due to the sensor noise and calibration residual [22] and its covariance matrix at time k can be obtained as At each sample time, the covariance can be propagated forward employing where ' k P is the estimation error covariance matrix at time k, based on the measurement received at the last sample time k-1, and in turn is obtained as where I is a 15×15 identity matrix.
Following this notation we propose a comprehensive EKF which corrects the estimations based on the five states' error measurements. In our method the estimated biases of gyroscope and accelerometer are compensated in the EKF, at every sample time, while the non-bias estimated error term is obtained and compensated at sample times that the relevant conditions are satisfied. We define the dynamic measurement matrix H and the dynamic error measurement matrix m. Both H and m matrices are equal to 15×15 and 15×1 zero matrices at initialization, respectively. We employed five methods to reduce the error, each of them feeds EKF independently. We split the H and m matrices to five submatrices, each submatrix can be updated based on its relevant condition and method, and separated from the other submatrices. If the relevant condition of submatrix is not satisfied the submatrix will be remained at zero, and then will be neglected. It means that at time k, EKF would be fed based on all, non or some of the five methods. Matrices H and m can be written as 3 where H (.) s are 3×15 and m (.) s are 3×1 matrices, and the superscripts Z, H, R, P and N stand for ZUPT, HDR, ZARU, IPER and ZUNA, respectively.

Error Reduction Methods
In this work in the absence of the external infrastructures, EKF is fed with the combination of five error reduction methods to correct the estimations. These methods are used to decrease the accumulated errors in orientation, velocity and position, and to compensate the sensors' biases exist on the measured angular velocity and acceleration. This section details these employed error reduction methods.

A. Zero Velocity Update (ZUPT)
The Zero velocity UPdaTe or ZUPT method, is based on this fact that when the user's foot is in the stance phase, its velocity is zero. In practical works, this velocity is small but not equal to zero, this difference can be used as an error measurement in velocity to feed EKF [18]. Therefore the actual error measurement submatrix m Z at time k [1], can be obtained as The measurement submatrix H z is defined in the way that selects the velocity error components δv of error state matrix δx (terms 10 to 12), which can be written as

B. Zero Angular Rate Update (ZARU)
The term ZARU stands for Zero Angular Rate Update, as addressed in [19]. It feeds EKF, when the foot is in the so called still phase. The idea is based on this fact that when the foot is motionless on the floor, the measurements from three orthogonal gyroscopes should be equal to zero; thus the data from gyroscope in this case, is in fact the measured error of the angular velocity. Following this notation the angular velocity error measurement submatrix m R can be written as (22) where b k ω is an angular velocity in the local coordinates, at the k th sample time. The measurement submatrix H R is defined to select the angular velocity error components δω b of δx (terms 4 to 6), which can be written as

C. Heuristic Drift Reduction (HDR)
The term HDR stands for Heuristic Drift Reduction, as originally proposed in [24]. The idea is based on the fact, that for the indoor applications, most of the corridors and paths are straight. Employing HDR by detecting the moments that user walks straight, the error in the heading is obtained. In this work, we follow the same idea as [19,24], but we perform it in the different way. We define the sliding window of λ samples and we compare heading at time k to heading at time k -λ. If the difference is less than the threshold, it is detected as an error in heading estimation, and EKF will be fed by this detected error, otherwise it is detected as a real variation of heading due to the user's turning. The advantage of using sliding window is to apply HDR at every time interval (during both swing and stance phases) and not only at stance phase, which yields to improve the accuracy.
Assume Er ψ is the difference between the sliding window's last data The first two rows of H H are defined as zero, to reserve the further development of yaw and pitch errors estimations.

D. Investigative Position Error Reduction (IPER)
IPER is used to obtain the error in calculating the estimated displacement. This method obtains the error of estimated displacement along x and y in every time interval (fixed windowing) based on the idea of the generality of straight paths in indoor applications, and obtains the error of displacement along z-axis at stance phases. The corrections for displacements along x, y and z-axis can feed EKF, independently. Assume the user walks straight and the estimated tracked trajectory is deviated from the expected straight line by angle ρ. Comparing ρ to thr x and thr y the direction of movement is detected to be along x, y or a free walk neither along x nor along y, where thr x and thr y are thresholds of movements along x and y axes and can be chosen based on the actual location of straight paths in the global coordinates (e.g. to detect if user walks along the corridor or parallel to building walls). If the movement is detected to be along x (y) axis, in this case the real movement of pedestrian along y (x) axis is actually equal to zero, therefore the variations in the estimated displacement along y (x) axis is an error, which is used to feed EKF to estimate and correct the position error. Therefore P k m is obtained as where thr ρ is the threshold of straight movements detection, and thr x , thr y and thr ρ are equal to 0, п/2 and 0.2 radians, respectively. To correct the displacement along z-axis, at every stance phase of walking the displacement along z-axis is compared to the position of the IMU at the start point. Without loss of generality it is assumed that the position of IMU along z-axis at the start point is equal to zero, while walking the estimated displacement along z-axis in the stance phase should be equal to the one at the start point and thus should be zero. This difference is used to feed EKF and correct the displacement along z-axis. Thus k P z m can be written as where zk r is the displacement along z-axis at the current sample time. The zero terms of m P do not imply that the error is zero, while determining the proper matrix of H p only the non-zero terms of thr ρ feed EKF, and the zero terms are neglected and thus they are ineffective. Following this notation, H p can be obtained as where P k I is a 3×3 matrix and can be written as The diagonal components of P k I can be determined independently.

E. Zero UNrefined Acceleration update (ZUNA)
At the start point and during system initialization, when the user's foot is still motionless on the floor, the acceleration is measured over three seconds and its mean value is calculated (ā b ). During the midstance phase of walking (when the entire foot is stationary on the floor), the measured acceleration is expected to be equal to the mean value at the start point and the difference is used to feed EKF to correct the measured acceleration. Following this notation N k m at midstance phase can be obtained as The midstance phase is detected in the same way as stance phase but by the smaller thresholds on acceleration and the variance of acceleration and larger threshold of time. The measurement submatrix H N , during midstance phase can be written as

Localization Testing and Results
This section presents the implementation of the navigation algorithm, and analyzes the system performance in different tests. The positioning error can be considered as a percentage of the total traveled distance. From the state-of-the-art the acceptable error of self-contained (IMU-alone) navigation system is about 2% of the total traveled distance [8]. We carried out several indoor tests including repetitive and closed-form trajectories. During the tests IMU was fixed on the user's right foot using shoe laces, as shown in Figure 5. In addition, IMU was connected to the netbook computer through USB port, and the estimated tracked path was displayed in the netbook screen online, while the data were recorded to replicate the test for more processing. The user walked normally at a steady speed of approximately 0.5 -1 m/s in the forward direction.

A. Rectangular path
In the first test the user tracked along a known-length rectangular path, clockwise. To evaluate the accuracy of orientation estimation, at each rectangle's vertex, the user stopped and then turned 90° clockwise, but the system also works well for continuous tracking. User stood at the start point for three seconds, and after tracking the path, stopped at the same point. The error of walking along the desired path and standing at the exact same stop/start point by user was a few centimeters. Figure  6 shows the original acceleration and angular velocity in the local coordinates, measured by IMU during this test. As can be seen during the stance phase the angular velocity is not zero due to the sensor's biases. In addition, the norm of the accelerations in the stance phase at the beginning of the experiment was 1.0129g, due to the gravitational acceleration and sensor's biases. The value of angular velocity along x-axis is larger than other components, because user's foot had more rotation about this axis during walking, compare to other axes.
However, at vertices and during turning the value of angular velocity along z-axis becomes significant because the rotation was on the leveled floor and thus about z-axis. Employing the discussed algorithm, the gravity and biases were removed from the acceleration. The upper part of Figure 7 shows the gravity and bias-free acceleration in the global coordinates. From Figure 7 it is possible to estimate the direction of walking, while in the first and third parts of the graph, the acceleration has the greater value along the y-axis and in the second and last parts the value along x-axis is greater. The norm of the global acceleration at the stance phases has the average value of 0.0017g, which demonstrates the gravity and sensor biases, were compensated properly. The global velocity was obtained by integrating the global acceleration over the time. The second part of the Figure 7 shows the global velocity. As can be seen, the value of the velocity is greater along either y or x axes in the same order as acceleration. Figure 8 shows the displacements along x and y axes, and the orientation of the user during test, which is indeed the yaw angle respect to the global coordinates. The global displacement was obtained by double integrating the global acceleration over the time. In addition, Figure 8 illustrates the user walked and turned clockwise. The reference heading shows the ideal yaw angle, where in a normal walking of human the turning of direction cannot be sharp. Figure 9 illustrates the tracked trajectory in the x-y plane. The reference path was the rectangle with a perimeter of 25.8 m, and its sides were along x and y axes of global coordinates. The estimated path was alike the real tracked trajectory, in the sense of shape and closed-form. The difference between the start and estimated end points was 0.05 m and therefore the tracking error was 0.19% of total traveled distance. Figure 10 shows the estimated tracked path in the three dimensions, as can be seen the estimated path is corrected along all three axes successfully. At the rectangle vertices where the user's foot was on the floor for a longer time, the displacement along z approached zero.

B. Comparison of error reduction methods
To compare the EKF-based navigation system with five error reduction methods to the state-of-the-art (systems with up to three 0.0 2.0x10 4.0x10 6.0x10 8.0x10 1.0x10   Gyro. x Gyro. y Gyro. z error reduction methods), and to evaluate the effect of applying correction at different time intervals and not only at stance phases, a rectangular path was tracked, and the recorded signals were used to replicate the estimation employing EKF with different error reduction methods. Figure 11 shows the different trajectories obtained from EKF in the existence of three, four or five error reduction methods. Figure  12 shows the heading obtained from EKF using different methods. The third part of heading graph tends to approach -270° or 90° which in fact gives the same direction. The error between the start point and estimated stop point is reported in Table 1 in terms of distance and the percentage of Total Traveled Distance (TTD%).

C. Tracking on other indoor paths
To evaluate the performance of the proposed EKF-based INS algorithm for indoor navigation, we carried out some indoor tests over longer trajectories. To consider the repeatability of the algorithm, the rectangular path is tracked six times continuously clockwise in the   forward direction. The results demonstrate the difference between the start and estimated end point was 0.38 m thus the tracking error was 0.25% in terms of the percentage of total traveled distance. The point to point comparison shows the maximum error occurred at the upper right vertex of the triangle where the error is about 0.52 m, despite of estimation error, this error is due to this fact that at the turning point during normal walking, each time the user passed about the same point and not necessarily over the exact point (as start/end point). Figure  13 shows the estimated tracked trajectory. We performed another test in our main building. During the test the user walked forward and stopped if the person was in the path. User started to walk from a point inside the building, and after walking indoor, exited the building and walked along the building's wall and finally entered the building from a different door and stopped at the same point as start point. Figure 14 shows the estimated trajectory, where the real trajectory length was 78 m. The estimated tracked trajectory, was alike the real path in sense of shape and closed-form, and it was shorter than the real trajectory. The difference between the start and estimated end point was 0.6382 m and the tracking error in terms of the percentage of total traveled distance were 0.82%.

Conclusion
This paper presented an accurate infrastructure-free EKF based navigation system for pedestrian indoor navigation, employing only the measurements of accelerometers and gyroscopes of IMU. The contributions of this work in comparison to the conventional systems were as follow: (i) in this work the dynamic error measurement matrix (H) was used, thus different error reduction methods fed EKF independently and at different times, which yielded to obtain the higher accuracy; (ii) the error correction was applied not only at the stance phase but also at different time intervals during the swing phase of human walking; (iii) the algorithm was developed without using magnetometer, thus environment's equipment and supplies have not affected the system performance; therefore it is reliable for indoor applications; and (iv) in our system five different error reduction methods were used, which fed EKF with estimated error of all five states; thus as a result the tracking error were obtained less than 1% (0.19%-0.82%) in terms of the percentage of the total traveled distance, which means the proposed system accuracy is higher than the conventional systems. As a future work the proposed navigation system will be implemented on the user's smartphone.

Global X-Y Trace
Tracked Actual Figure 13: Estimated tracked trajectory of the repetitive test along the rectangular path. The path is tracked six times to obtain the total traveled distance of 154.8 m, the tracking error was 0.25% in terms of the percentage of total traveled distance.