Research on the Heading Calibration for Foot-Mounted Inertial Pedestrian-Positioning System Based on Accelerometer Attitude

: Foot-mounted inertial pedestrian positioning (FIPP) plays an important role for facilitating pedestrian activities. It is suitable for indoor environment applications where global navigation satellite systems are unavailable such as during firefighting and military actions. However, the positioning error of FIPP can increase rapidly due to the measurement noise of the sensors. Zero Velocity Update (ZUPT) is an error correction method proposed to solve this accumulative error. However, the heading misalignment angle, which results in a continuous increase in the positioning error, cannot be estimated by ZUPT. In order to solve this problem, the improved ZUPT based on the Improved Attitude Algorithm (IAA) according to accelerometer measurements is proposed in this paper. When a pedestrian is in the stance phase, the horizontal attitude is estimated by using accelerometer measurements. According to the relationship between the heading misalignment angle and horizontal attitude, the heading misalignment angle is obtained by a series of mathematical derivations. By taking the velocity error and the attitude misalignment angle as observations, the heading misalignment angle and positioning error can be estimated and compensated for through the Kalman filter. Finally, we use MTI-G710 sensor manufactured by XSENS for the actual test and the experiment results show that the proposed method is effectively correct.


Introduction
The Foot-mounted inertial pedestrian positioning (FIPP) is autonomous and unaffected by the external environment. It works well for indoor environment applications without needing global navigation satellite systems. The Foot-mounted Micro Inertial Measurement Unit (MIMU) plays an important part in establishing the pedestrian indoor positioning field. MIMU, composed of a gyroscope and accelerometer, is installed on the foot to measure the angular velocity and acceleration of the foot motion in real time. Then, the pedestrian positioning information is obtained through the Trajectory Calculating algorithm [1][2][3][4][5].
However, Trajectory Calculating has large cumulative error caused by a low-accuracy MIMU sensor [6][7][8][9][10]. Zero Velocity Update (ZUPT) is the most commonly used correction methods for this problem [11][12][13]. When the pedestrian is in a stance phase, the ZUPT is used to correct the positioning error. In ZUPT, the velocity error is taken as the observation to estimate the navigation error caused by inertial sensors measurement noise using the Kalman Filter [14][15][16][17]. However, the systematic error model established for ZUPT is imperfect. The analysis shows that ZUPT can reduce the velocity error, and horizontal misalignment angle of the system, but cannot estimate the heading misalignment angle. However, the heading misalignment angle has a major impact on the positioning error, which results in a continuous increase in the positioning error [18,19]. Generally, the problem of the positioning error caused by unobservable heading misalignment angle can be solved in two ways: One way is reducing the positioning error directly; another way is correcting the heading angle to achieve the purpose of reducing the positioning error.
In order to reduce the positioning error directly, distance constraints have been introduced in some papers [20,21]. Koutsou fixes two radio frequency identification sensors on both feet. The relative position of the feet, which is measured by two RFIDs, was introduced as a new observation method for the Kalman filter. Accordingly, the positioning error can be corrected [22]. Isaac Skog proposes a method of introducing the inequality constraints into the Kalman filter to reduce the positioning error. The core idea of the algorithm is that the relative position between two feet is less than the average pedestrian body height. Then, the position error can be greatly reduced and limited in a range [23]. Piccinni et al. proposes a method for distance estimation based on an OFDM signal combined with the Zadoff-Chu sequences. By exploiting the properties of these sequences, it is possible to evaluate the distance between single transmitter and a synchronized receiver [24,25]. Some papers introduce external sensors, such as WIFI, a iBeacon ultra-wideband, and so on [26]. Then, the standard information obtained from the external sensors is used to reduce the positioning error [27][28][29][30][31]. However, the method mentioned above increases the complexity of pedestrian position hardware, and a new error source will develop, which can degrade the hardware's accuracy.
The second way to reduce the positioning error is to reduce the heading misalignment angle. This most frequently involves using a magnetometer [32][33][34]. The magnetometer is a sensor that measures the intensity of a magnetic field in a local coordinate system. In theory, the heading can be obtained using the magnetic field strength measurement. However, there is a measurement deviation in the magnetometer due to the presence of magnetic interference, resulting in an inaccurate conversion heading, which makes it a sub-optimal solution to be used as a reference to locate the misalignment angle [35]. Many papers are devoted to solving the magnetic interference problem and have obtained optimized results [36,37]. However, these methods cannot be used as a magnetic interference compensation scheme during the pedestrian positioning process because of their long calibration times (more than 20 seconds). Therefore, the stability of the correction scheme using a magnetometer for pedestrian positioning is still not guaranteed.
In line with the problems above, an improved foot-mounted MIMU pedestrian positioning method is proposed in this paper. Our contribution is the Improved Attitude Algorithm (IAA) based on accelerometer measurements without any other external sensors, which was aimed at solving the heading misalignment angle that cannot be observed by ZUPT. The paper consists of four sections: section 2 introduces the principle and analysis of FIPP. Section 3 introduces the IAA based on accelerometers for the optimal estimation and compensation of the heading misalignment angle. It is used to solve the problem that the traditional ZUPT method cannot estimate the heading misalignment angle. In section 4, MTi-G710 is used as the test sensor to verify the effectiveness of the proposed method, while the final section draws the conclusion.

Principle of FIPP
For FIPP, pedestrian positioning information can be obtained by calculating the angular velocity and the linear velocity of the foot movements measured by MIMU in real time. The FIPP consists of two parts: Trajectory Calculating (Section 2.1.1) and the ZUPT algorithm (Section 2.1.2). The FIPP is shown in Figure 1 [35]. For a foot-mounted inertial pedestrian positioning system, MIMU is fixed on the pedestrian foot. The trajectory calculating process based on Trajectory Calculating is as follows, where subscripts k is the sample time; b is the sensor frame (right-front-up frame); n is the navigation frame (east-north-up frame); I is the identity matrix ; T is the sample time; is an antisymmetric matrix of the angular velocity ω measured by gyro; n v is the calculating velocity along the n frame; b f is acceleration measured by accelerometer along the b frame; is the projection of gravity along the n frame; g is the local gravity acceleration; where, are the roll, pitch, and heading, respectively, while x C , y C , and z C are described by the roll, pitch, and heading, respectively. It is shown in Figure 2 that the acceleration b f and angular velocity ω measured by MIMU is the input of the trajectory calculating algorithm, and the position information of the pedestrian is obtained through continuous integration. The MIMU measurement noise results in the measurement error of the ω and b f in Equation (1), which significantly increases the positioning error of n p and reduces the pedestrian tracking results.

ZUPT Error Correction Algorithm
ZUPT is used to correct the cumulative error of Trajectory Calculating. The core idea of ZUPT is that when the pedestrian is in the stance phase, the velocity information calculated by Trajectory Calculating is the velocity error. Based on this observation, the Kalman filter can be used to estimate the positioning error. ZUPT includes two steps: a) zero velocity detection (ZVD); b) error estimation and compensation using the Kalman filter.
ZVD is a detection method used to judge whether the pedestrian is in the stance phase by calculating the MIMU measurement data according to the characteristics of the foot touchdown.
Each gait can be divided into four parts as shown in Figure 3: a stance phase, push-off phase, swing phase, and heel-strike phase. Theoretically, when the pedestrian is in the stance phase, the amplitude of specific force measured by the MIMU is equal to the amplitude of the local gravity acceleration. Therefore, based on this characteristic, ZVD is used to judge the statement of the pedestrian (in the stance phase or not). In this case, the amplitude detector is the most basic method of ZVD. The core formula of the ZVD with this principle is as follows [36,37]: When ZVD judges that the pedestrian is in the stance phase, the error estimation and compensation are carried out. Since the velocity obtained through calculating is the velocity error at the stance phase, taking the velocity error as the observation, the positioning error can be estimated and compensated through the Kalman filter. The system state equations and measurement equations are as follows, is the system state, δp , δv , and Φ are the positioning error, velocity error, and misalignment angle, respectively; Δ is the accelerometer bias; ε is gyroscope drift; is the measure matrix; k η , k ν are the state noise and measurement noise, respectively; A is the system transfer matrix and it can be found in reference [1].

Heading Misalignment Angle Observability Analysis
In Trajectory Calculating, the gyroscope bias is the main factor that causes the divergence of the positioning error. It introduces the positioning error through the attitude misalignment angle. Therefore, it is very important for the ZUPT algorithm to estimate the attitude misalignment angle effectively. Since the horizontal attitude angle can be obtained from the acceleration measurements of pedestrian in a stance phase, whether the heading misalignment angle can be effectively estimated by ZUPT is important. In order to resolve this problem, the observability of heading misalignment angle was analyzed.
According to Equation (1), the velocity error equation is as follows: When the carrier is in horizontal static state, the above formula can be simplified as: After unfolding, the formula becomes: where, x φ , y φ , and z φ are misalignment angles.
When the pedestrian is in the stance phase, the accelerometer bias can be ignored, the above formula can be simplified as: In line with Equation (8), the horizontal misalignment angle can be estimated by the velocity error. There is no direct relationship between the heading misalignment angle and the velocity error. The heading misalignment angle cannot be estimated using the velocity error. Therefore, ZUPT cannot correct the heading misalignment angle, which affects the final positioning results.

FIPP based on Improved Attitude Algorithm (IAA) ZUPT
The analysis results in Section 2.2 shows that the FIPP based on ZUPT cannot effectively estimate the heading misalignment angle. In order to suppress the positioning error caused by the heading misalignment angle, an improved algorithm of ZUPT is proposed as following, which is used while the pedestrian is in a stance phase.

Horizontal Attitude Estimation by Accelerometer
The projecting components of the gravity along the b frame are measured by accelerometers during the pedestrian stance phase. Therefore, a mathematic relationship can be obtained The roll and pitch can be obtained by Equation (10): where . However, there is one problem. In theory, the projecting components of the gravity are measured by accelerometers during the pedestrian stance phase. The accuracy of the horizontal attitude is decreased by the accelerometer's measurement noise. To resolve the problem, a prescribed threshold was introduced. When the difference between the acceleration and the gravity is smaller than the prescribed threshold, horizontal attitude is calculated by Equation (10) b md g T − < f . (11) where b f is the module value of b f ; md T is a prescribed threshold of magnitude discrepancy.
In theory, the value of b g − f is zero when a foot in the stance phase. However, the value of b g − f is constrained to lie in an interval because of accelerometer noise. Therefore, md T should be set based on the statistical characteristics of measurement noise (e.g., variance of the accelerometer measurement error, which is measured before pedestrian positioning). And md T cannot be too large, otherwise the accuracy of roll and pitch obtained by Equation (10) will decrease. Therefore, the value of md T is different for different accelerometers.

Heading Estimation Algorithm by Accelerometer's Horizontal Attitude
According to the transformation matrix relationship between different frames, the relationship between the body frame ( b ), navigation frame ( n ) and the calculating frame ( n  ) can be obtained as follows where n b C  is the transformation matrix calculated by Equation (2).
According to the observability analysis of Equation (4) [38,39], the horizontal misalignment angle can be reduced by ZUPT, but the heading misalignment angle is unobserved. Hence, it is assumed that the horizontal misalignment angle of n n C  in Equation (13) Converting Equations (2) and (14) Based on Equation (16), the misalignment angles can be obtained from Equation (17) 23 13 2 2 21 22 arcsin + 1 Through the mathematical derivations of Equations (12)-(16), the heading misalignment angle can be obtained by Equation (17) when Equation (11) is satisfied.

Improved Pedestrian Positioning Algorithm Based on IAA ZUPT
At the stance phase, the velocity obtained through calculating is the velocity error, and the attitude misalignment angle can be calculated using Equation (17). Taking the velocity error and the attitude misalignment angle as the observation, the positioning error can be estimated and compensated through the Kalman filter. The system state equations and measurement equations are as follows, where   3 3  3 3  3 3  3 3  3 3   3 3  3 3  3 3  3 3  3 3 is the measure matrix and is the observation of the system. The entire system block is shown in Figure 4. It can be seen in Figure 4 that the FIPP based on IAA ZUPT includes three parts: the horizontal attitude estimation is based on accelerometer measurements; the heading estimation was obtained by a series of mathematical derivations based on the horizontal attitude; the error estimation and compensation was obtained using the Kalman filter.  Figure 4. Flowchart of attitude algorithm based on the accelerometer.

Performance Evaluation
To verify the accuracy and validity of the improved pedestrian positioning method based on IAA ZUPT, MTi-G710 MIMU produced by XSENS is used. Table 1 shows the parameters of MTi-G710 [40]. The installation schematic of MTi-G710 is shown in Figure 5a. MTi-G710 is attached to the pedestrian's foot, and the sensors measured data (specific force, angular velocity, GPS position, GPS time, and magnetic field intensity) is collected by MT Software in real time. The sample frequency is 100 Hz. There are two working modes for MTi-G710: (a) the first one is obtaining the navigation information based on the integrated navigation of MIMU/GPS/Magnetometer; (b) the other one is collecting the inertial sensors measurement data in real time, and the navigation information is obtained by the MIMU data and by the algorithm we proposed. In the first mode, the data fusion algorithm proposed by Xsens is used to deal with the data of MIMU, Magnetometer, and GPS. The horizontal accuracy position of GPS is 2.5 m [40]. In the second mode, the algorithm proposed in this paper is used to deal with the original MIMU data. The second mode is used to verify the correctness and effectiveness of proposed algorithm in this paper. And the navigation information from the first mode is used as the standard information to judge the accuracy of the improved algorithm.
Two group experiments are carried out. Test 1 is based on a rectangle path to check and confirm the validity of the IAA ZUPT algorithm. And more parameter details during the calculating process are provided to illustrate the IAA ZUPT performance. Test 2 is used to test the stability of the IAA ZUPT algorithm, therefore, more walking or running paths are carried out. And the walking velocity, position result, and the positioning error are given to illustrate the stability of the IAA ZUPT algorithm under different walking conditions.

Test 1: Algorithm correctness verification
The test path for this trajectory is a rectangle, which is shown in Figure 5b. The walking length is about 300 m for 5 minutes. We can judge the performance of the algorithm proposed in this paper by using GPS standard position information. The threshold of md T in Equation (11) is set with 0.004 m/s 2 . Different pedestrian navigation methods, which are shown in Figure 6, are carried on by using the collecting data. On one hand, the pedestrian position information, which is obtained by the MT software, is used as the standard information. On the other hand, the specific force and angular velocity obtained by the MT software is used in the basic ZUPT and IAA-ZUPT (Basic ZUPT is the simple ZUPT algorithm proposed in reference [1], IAA-ZUPT in section 3). The pedestrian position information, which is calculated by these methods, is used to compare with the standard position information to verify the accuracy and validity of the improved method proposed in this paper.  Figure 7 shows the pedestrian velocity of the experiment. Figure 8a is the heading, and Figure  8b is the heading misalignment angle covariance value of the Kalman filter. Figure 9a is the trajectory with the different method. Figure 9b is the positioning error of the trajectory in Figure 9a. The positive direction of the heading is north by west. According to the path of Figure 5b, pedestrian velocity in Figure 7, and the real trajectory from GPS in Figure 9a, it can be determined that the walking length is 300 m during 320 s. According to the gait cycle definition and assuming the length of every step is 0.5-0.8 m, it is determined that the ZUPT data length for the stance phase is 15 when the sample frequency is 100 Hz.
The heading covariance is used to judge the correctness and effectiveness of the heading estimation. When comparing the heading misalignment angle covariance of the IAA ZUPT algorithm with ZUPT, the convergence rate and the value are better. This is because the heading misalignment angle is introduced as the observation in the Kalman filter. Then, the heading misalignment angle is estimated and the accuracy is improved.
For basic ZUPT, the heading misalignment angle cannot be observed and the positioning error caused by the heading misalignment angle cannot be estimated. According to the MTI-G710 gyro's parameters given in Table 1, it can be calculated that when the pedestrian turns at time 125 s, the heading misalignment angle is in the interval of (25 deg ~ 62.  Figure 9a. Therefore, it can be seen that the gyro's bias has a major influence on the heading and the position. As can be seen in Figure 8 and Figure 9, the heading is corrected back to nearly 30 degrees, and the positioning error is 8 m when carry out a test of 320 s. This means that the positioning accuracy is improved. The heading estimation time in Figure  9b is the time that Equation (11) is satisfied, and the misalignment angles are estimated and corrected by Equation (18).

Test 2: Algorithm stability verification
To test the stability of the IAA ZUPT algorithm, three groups of tests with different paths are carried out with three different persons. Two different walking velocity is carried out for each path. To make the test result more general, the kind and velocity of path for one person is random. The details for each experiment are shown in Table 2, where the average velocity is the ratio between the walking length and the walking time.  Figure 10 shows the results of pedestrian A walking at a velocity of 0.87 m/s. In the 90 s experiment, the positioning error of the IAA ZUPT is nearly 3 m, and the positioning error of the ZUPT is nearly 15 m. The convergence rate and the value of IAA ZUPT is better than ZUPT. The heading misalignment angle has a significant improvement at 40 s and 60 s. After the last turn, the heading misalignment angle of IAA ZUPT and ZUPT is nearly 30 degrees and 55 degrees, respectively.  After analysis of Figures 10 and 11, it can be determined that although the positioning result is worse when the velocity is faster, the IAA ZUPT is still better than the ZUPT. Figure 12 shows the results of pedestrian A walking at a velocity of 0.696 m/s. In the 230 s experiment, the positioning error of the IAA ZUPT is nearly 4.5 m, and the positioning error of the ZUPT is nearly 7 m. While the trajectory shows that the positioning results of the two are very close, it can be seen from the positioning error that the IAA ZUPT is smaller.    The positioning results of 3 groups of experiments are given in Table 3 and Figure 16. Combining with the above 3 groups of experiments, it can be seen that with the correction of the heading misalignment angle, the positioning error of IAA ZUPT is significantly reduced. For different experiments of the same path, although the positioning results will be worse due to reduced filter data when the pedestrian velocity is fast, the positioning result obtained by the IAA ZUPT is also superior to the ZUPT algorithm for each experiment. That means the IAA ZUPT has a positive influence on the positioning result. Therefore, when the walking velocity is fast, the effect of IAA ZUPT for the pedestrian position is more powerful. The experimental results prove the stability of the IAA algorithm.

Conclusions
To solve the problem of the heading misalignment angle of FIPP based on ZUPT being unable to be observed by the Kalman filter, an IAA based on an accelerometer is introduced in this paper. IAA is used to estimate the attitude misalignment angle by taking the velocity error and the attitude misalignment angle as the observation to estimate the positioning error. Then, the positioning error caused by the heading misalignment angle can be compensated for without any external sensors. Hence, this method does not increase the complexity of the system. Based on the above studies, the MTi-G710 sensor manufactured by XSENS was used for the actual test. Through the analysis results from the trajectory tracking, the accuracy and stability of the proposed algorithm in this paper for correcting the positioning error and the heading misalignment angle are verified. This method can restrain the heading misalignment angle, but this method can only be applied when the accelerometer noise is small. The question of how to deal with the accelerometer noise when the pedestrian in the stance phase will be covered in future next research. Funding: This research was funded by National Natural Science Foundation of China, grant number "51879046" and Natural Science Foundation of Heilongjiang Province, grant number" YQ2019F001".

Conflicts of Interest:
The authors declare no conflicts of interest.