Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Next Article in Journal
Temperature-Controlled Crystal Size of Wide Band Gap Nickel Oxide and Its Application in Electrochromism
Next Article in Special Issue
Control of Spring Softening and Hardening in the Squared Daisy
Previous Article in Journal
Bending Setups for Reliability Investigation of Flexible Electronics
Previous Article in Special Issue
Analysis of Parametric and Subharmonic Excitation in Push-Pull Driven Disk Resonator Gyroscopes
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Attitude and Heading Estimation for Indoor Positioning Based on the Adaptive Cubature Kalman Filter

1
Guangdong Provincial Key Laboratory of Urbanization and Geo-Simulation, School of Geography and Planning, Sun Yat-sen University, 135 # Xingangxi Road, Guangzhou 510275, China
2
School of Geomatics Science and Technology, Nanjing Tech University, 30# Puzhu Road, Nanjing 211816, China
*
Authors to whom correspondence should be addressed.
Micromachines 2021, 12(1), 79; https://doi.org/10.3390/mi12010079
Submission received: 28 November 2020 / Revised: 8 January 2021 / Accepted: 11 January 2021 / Published: 13 January 2021
(This article belongs to the Special Issue Integrated MEMS Resonators)

Abstract

:
The demands for indoor positioning in location-based services (LBS) and applications grow rapidly. It is beneficial for indoor positioning to combine attitude and heading information. Accurate attitude and heading estimation based on magnetic, angular rate, and gravity (MARG) sensors of micro-electro-mechanical systems (MEMS) has received increasing attention due to its high availability and independence. This paper proposes a quaternion-based adaptive cubature Kalman filter (ACKF) algorithm to estimate the attitude and heading based on smart phone-embedded MARG sensors. In this algorithm, the fading memory weighted method and the limited memory weighted method are used to adaptively correct the statistical characteristics of the nonlinear system and reduce the estimation bias of the filter. The latest step data is used as the memory window data of the limited memory weighted method. Moreover, for restraining the divergence, the filter innovation sequence is used to rectify the noise covariance measurements and system. Besides, an adaptive factor based on prediction residual construction is used to overcome the filter model error and the influence of abnormal disturbance. In the static test, compared with the Sage-Husa cubature Kalman filter (SHCKF), cubature Kalman filter (CKF), and extended Kalman filter (EKF), the mean absolute errors (MAE) of the heading pitch and roll calculated by the proposed algorithm decreased by 4–18%, 14–29%, and 61–77% respectively. In the dynamic test, compared with the above three filters, the MAE of the heading reduced by 1–8%, 2–18%, and 2–21%, and the mean of location errors decreased by 9–22%, 19–31%, and 32–54% respectively by using the proposed algorithm for three participants. Generally, the proposed algorithm can effectively improve the accuracy of heading. Moreover, it can also improve the accuracy of attitude under quasistatic conditions.

1. Introduction

Location-based services (LBS) are becoming more and more popular because of the exponential use of mobile devices [1]. As we know, location is an essential part of LBS. Global navigation satellite system (GNSS), including GPS, GLONASS, Galileo, Beidou navigation satellite system (BDS) and other regional systems, provide accurate location services outdoors. However, due to the limitations of satellite signals, GNSS is always unavailable in indoor environments. Thus, extra sensors are necessary to strengthen indoor positioning. In the past decades, WiFi [2,3,4], Bluetooth [5,6,7], ultra-wideband (UWB) [8,9,10], and micro-electro-mechanical system (MEMS) [11,12,13] have been studied for indoor positioning. Among these techniques, MEMS sensors are more competitive as their independence of the existing infrastructures in indoor environments [14,15,16]. Moreover, MEMS magnetic, angular rate, and gravity (MARG) sensors are lightweight, low-cost, and more and more accurate, which greatly facilitates their application in indoor positioning [17]. Numerous studies, in terms of pedestrian dead reckoning (PDR) [18,19,20], intelligent robots [20,21,22], and indoor UAV navigation [23] are dedicated to estimating the attitude and heading based on MEMS MARG sensors. Currently, MARG sensors are embedded in each smartphone. Thus the attitude and heading of a smartphone are conveniently estimated using data from the MARG sensors. Attitude and heading are important for motion tracking applications and indoor positioning and navigation. Real-time position of a pedestrian can be easily obtained from the smartphone information provided that relative attitude and heading between the pedestrian and his/her smartphone. In addition, the attitude information from the MARG sensors potentially improves the heading estimation, because it can further consider the effects of the roll and pitch [24].
Attitude and heading is usually represented by the Euler angle, which consists of roll, pitch, and yaw angles. Roll and pitch angles can be used to represent the attitude, and heading can be computed from the yaw angle. In quasistatic conditions or a magnetically clean environment, the attitude and heading can be calculated based on the measured gravitational acceleration and the geomagnetic field. However, the values are easily impacted by the surrounding environment or other factors, which cause them to fluctuate greatly around the true value. At the same time, the attitude and heading can also be derived from the gyro angular rate. However, due to the integration process in the inertial navigation mechanization, the gyro sensor error will accumulate, resulting in unreliable estimation, especially in the case of a long time running. Naturally, the attitude and heading should be calculated by fusing the aforementioned sensor data, and the fusion is always employing a complementary filter (CF) and Kalman filter (KF) [25].
CF is relatively easy to implement and requires low computational cost. However, the accuracy of attitude and heading produced by CF is slightly lower than that estimated by KF, and even worse in dynamic environments [25]. The Kalman filter utilizes raw measurement from the receiver to estimate the system state [26]. The KF assumes that the system model is known and linear, and the system noise and measurement noise are white. If these assumptions are violated, the KF’s result will be suboptimal and unstable. To solve the nonlinear problem, the extended Kalman filter (EKF) [27] algorithm is proposed. Although the EKF model is linearized by first-order Taylor series expansion of the process/measurement models for the current state estimate, it is difficult to obtain the ideal estimation, when the system has strong nonlinearity or the initial estimation error is large. In the Gaussian case, sigma point approaches used in an unscented Kalman filter (UKF) [28] and cubature Kalman filter (CKF) [29] have appeared. Compared with EKF, UKF and CKF provide estimates with higher accuracy and avoid the calculation of the Jacobian matrix. However, the UKF does not have a strict mathematical derivation. In the filter iteration process, state estimation covariance is difficult to maintain being positive due to matrix decomposition and inversion. Especially when the state dimension is high, the UKF filter accuracy will diverge. CKF was proposed by Arasaratnam and Haykin [30]. The core is to capture the statistical characteristics of random variables after the nonlinear transformation according to basic cubature points generated by the spherical-radial cubature rule [31]. Compared with EKF, CKF does not need linearization of the nonlinear model and calculation of the Jacobian matrix. Moreover, compared with UKF, CKF has stronger adaptability, especially for high-dimensional estimation [31,32]. Therefore, CKF is seen as a powerful tool to solve the nonlinear estimation problem in the data fusion of MARG sensors.
However, a priori statistical properties of the noise should be accurately known in the design of the CKF algorithm. On the one hand, due to the restriction of testing samples, the statistical apriority is hard to know exactly in practical application. Furthermore, in the actual operational environment, the statistical characteristics become complex and change dynamically because of various uncertain factors [32]. Uncertainties of noise statistics and the system model make the accuracy of estimation decrease or even diverge. In order to solve the problem, there have been many efforts undertaken to develop an adaptive CKF to enhance the adaptability and robustness [31,32,33,34,35,36,37]. The adaptive filter algorithms, using some types of statistic estimator to evaluate the unknown or time-varying noise, including the Sage-Husa estimator [31,32], variational Bayesian [33,34], maximum likelihood [35,36], maximum a posteriori [37], and covariance matching [38]. Therein, the Sage-Husa estimator is one of the widely used adaptive methods, since it has the advantages that the recursive formula is simple and the principle is clear and easy to implement [31,32]. In the traditional Sage-Husa cubature Kalman filter (SHCKF), the noise parameters are estimated by the equal-weighted time-averaging algorithm. When the noise parameter is a known fixed value, and the estimation is effective and convergent, and the estimation of the noise parameter is more and more accurate with the increase of time. However, MARG sensors of smartphones have the characteristics of low cost and low accuracy, and their noise characteristics are easily changed by the external environment. Therefore, the parameters of the MARG sensors’ noise updated in real-time can better reflect the current data characteristics.
When the noise statistical characteristics change rapidly, recent observation data plays an important role in estimating the noise statistics at the current time, while too old data have little effect. Especially for a complex motion process, the true value of noise statistics at the current moment has a stronger correlation with recent historical data. Another problem is that if the Kalman gain becomes smaller and smaller, the role of the new measurement data reflecting the true state to a certain extent is getting weaker and weaker in the estimation, which results in data saturation and may cause the filter to diverge. In some cases, especially when the order of the system is relatively high, there is often a divergence of values. Besides, dynamic model errors are difficult to accurately describe in advance, and for sudden steering, large dynamic model errors are introduced into the filter [39]. In response to these problems, this paper proposes a quaternion-based adaptive cubature Kalman filter (ACKF) to estimate the attitude and heading of a smartphone with its embedded sensors’ data. To adaptively correct the noise parameters of the nonlinear system and reduce the estimation bias of the filter, the fading memory weighted method and the limited memory weighted method are used to replace the equal-weighted time-averaging algorithm to estimate and correct the model noise parameters. Then the statistical properties of the nonlinear system are estimated and corrected by the fading memory weighted method and limited memory weighted method. At the same time, according to the characteristics of pedestrian walking, this paper proposes that the latest step data is used as the memory window data of the limited memory weighted method in this paper. The accuracy of the filter estimation is enhanced by increasing the weight of the latest historical observation data and reducing the old data weights. Moreover, based on the stability of the filter, the paper analyzes the reasons for the divergence of the filter algorithm, and the filter innovation sequence is used to rectify the measurement and system noise covariance for restraining the divergence. Besides, to balance the contributions of the measurements and the dynamic model information, an adaptive factor based on prediction residual construction is used to overcome the filter model error and the influence of abnormal disturbance.
Theoretical analysis and experimental results show that the proposed ACKF algorithm can provide better accuracy, and effectively eliminate interference from dynamic noise compared with conventional SHCKF, CKF and EKF. In general, the contributions of our work can be summarized as follows. First of all, an adaptive cubature Kalman filter algorithm combining the fading memory factor and the limiting memory factor is proposed to estimate the attitude and heading based on data from MARG sensors. According to the characteristics of pedestrian walking, the latest step data is used as a memory window in the pedestrian walking process. Second, by judging the positive definiteness of the measurement and system noise covariance matrix, the possible filter divergence is suppressed by correcting the measurement and system noise covariance. Finally, the paper uses an adaptive factor to weaken the influence of the filter model errors and abnormal disturbances. In addition, static and dynamic experiments were conducted. In terms of the heading, the proposed algorithm can provide a more stable and accurate heading estimation information. While for the attitude, the proposed algorithm can effectively improve the accuracy under quasistatic conditions.
The rest of this paper is organized as follows: In Section 2 the attitude and heading estimations for indoor positioning are described in detail. In Section 3 we explain the proposed method in general. Experiments and results analysis are given in Section 4. Discussion is given in Section 5. Finally, the conclusions and future work are presented in Section 6.

2. Methodology

Low-cost MARG sensors embedded in the smartphone, such as an accelerometer, magnetometer, and gyroscope provide raw data for attitude and heading estimation [25]. As Figure 1 presents, the outputs from the accelerometer and magnetometer can be used to calculate the attitude and heading. Moreover, the attitude and heading can also be computed by the angular rate. The two kinds of calculations are then fused using a filter algorithm, and the optimal values are produced iteratively.
The attitude and heading for a smartphone are defined as the relative orientation of its device coordinate system concerning a reference coordinate system [40]. To explain the attitude and heading, we defined three different coordinate systems, as depicted in Figure 2. The local Cartesian coordinates coordinate system is defined that the XG, YG, and ZG axes point east, north, and sky, respectively in Figure 2a. MARG sensors data outputted by built-in sensors of a smartphone is always organized depending on the device coordinate system, as shown in Figure 2b. XD and YD axes are on the same plane with the phone screen pointing rightward and forward respectively, and the ZD axis points out of the phone screen under the right-hand rule. For indoor positioning, the attitude and heading values of the smartphone are further transformed to derive pedestrian heading. Additionally, therefore, a user coordinate system is necessary. We can see from Figure 2c, YU axis points forward aligning with the orientation of the user’s body. ZU axis is coinciding with ZG. XU axis is the right side of the user body and obtained by the cross product of YU and ZU.

2.1. Attitude and Heading in the Form of a Quaternion

Attitude and heading can be expressed using several parameterizations, such as the Euler angles, Rodrigues parameters, the quaternion, etc. Quaternion has been widely used because of its less computation burden and global non-singularity. A quaternion consists of four elements:
q q 0   q 1   q 2   q 3 = q 0 + q 1 i + q 2 j + q 3 k
where q 0 , q 1 , q 2 , and q 3 are real numbers, and i, j, and k are unit vectors. The quaternion satisfies the constraint of the unit norm.
q 0 2 + q 1 2 + q 2 2 + q 3 2 = 1
Let q 0 = c o s θ 2 , q 1 = l s i n θ 2 , q 2 = m s i n θ 2 , q 3 = n s i n θ 2 , the quaternion equation is:
q q 0 , q 1 , q 2 , q 3 = c o s θ 2 + ( l i + m j + n k ) s i n θ 2 = c o s θ 2 + u R s i n θ 2
where θ is the rotation angle and u is a unit vector.
When the body coordinate system is b (in this paper, the body coordinate system is the device coordinate system), and the navigation coordinate system is n, C b n is the coordinate transformation matrix from the b coordinate system to the n coordinate system, which can be used to calculate the heading angle and attitude angle. Then coordinate transformation matrix C b n can be described as [41]:
C b n = I + 2 U s i n θ 2 c o s θ 2 + 2 s i n 2 θ 2 U × U
where U = 0 n m n 0 l m l 0 .
Combining q 0 = c o s θ 2 , q 1 = l s i n θ 2 , q 2 = m s i n θ 2 , and q 3 = n s i n θ 2 , the Equation (4) can be expressed as the following:
C b n = 1 2 q 2 2 + q 3 2 2 q 1 q 2 q 0 q 3 2 q 1 q 3 + q 0 q 2 2 q 1 q 2 + q 0 q 3 1 2 q 1 2 + q 3 2 2 q 2 q 3 q 0 q 1 2 q 1 q 3 q 0 q 2 2 q 2 q 3 + q 0 q 1 1 2 q 1 2 + q 2 2
Moreover, in the navigation coordinate system, the directions of XG, YG, and ZG are specified as East, North, and Up. A coordinate transformation matrix corresponding to three basic rotations can be expressed as:
C ψ Z = c o s ψ s i n ψ 0 s i n ψ c o s ψ 0 0 0 1 , C φ Y = c o s φ 0 s i n φ 0 1 0 s i n φ 0 c o s φ , C θ X = 1 0 0 0 c o s θ s i n θ 0 s i n θ c o s θ
where ψ is the yaw angle; θ is the pitch angle; and φ is the roll angle.
Then the attitude matrix between the body coordinate system b and the navigation coordinate system n is shown in the following:
C n b = C φ Y C θ X C ψ Z = c o s φ c o s ψ + s i n φ s i n ψ s i n θ c o s φ s i n ψ + s i n φ c o s ψ s i n θ s i n φ c o s θ s i n ψ c o s θ c o s ψ c o s θ s i n θ s i n φ c o s ψ c o s φ s i n ψ s i n θ s i n φ s i n ψ c o s φ c o s ψ s i n θ c o s φ c o s θ
The coordinate system is always a rectangular coordinate system during the rotation from the n coordinate system to the b coordinate system. So, C n b is the orthogonal matrix and C n b = ( C b n ) T . Combining Equations (5) and (6), the Euler angle can be described as:
θ = a r c s i n 2 q 2 q 3 + q 0 q 1 φ = a r c t a n 2 q 1 q 3 q 0 q 2 1 2 q 1 2 + q 2 2 ψ m = a r c t a n 2 q 1 q 2 q 0 q 3 1 2 q 1 2 + q 3 2
The heading can be determined with the ψ.
ψ = ψ m + D
where D is the local declination angle.

2.2. Attitude and Heading Estimation with Readings of a Gyroscope

The attitude and heading can be computed according to initial values and angular rates outputted by a gyroscope. The quaternion q ˙ , representing the changed attitude and heading from the previous quaternion, can be expressed as:
q ˙ = 1 2 q w
where w is the angular rate vector with its quaternion form [0, w x , w y , w z ]T, in which w x , w y , w z are angular rate values along x, y and z axes of the device coordinate system.
The matrix form of (9) can be written as:
q ˙ = 1 2 M w q = 1 2 0 w x w y w z w x 0 w z w y w y a 32 0 w x w z w y w x 0 q 0 q 1 q 2 q 3
According to the Peano-Baker series, the solution of (10) is:
q k + 1 = [ I + Δ t 2 Δ Θ ] q k
where I is the n*n unit matrix, Δ t is the sampling interval, ∆Θ is the incremental angle matrix with its form of Θ x , Θ y , and Θ z .
According to Equations (7) and (11), an estimate of the pitch, roll, and heading can be obtained based on the angular rate.

2.3. Attitude and Heading Estimation with Readings of an Accelerometer and a Magnetometer

Pitch and roll angles can be achieved by the accelerometer information too. According to the definition of the global coordinate system and device coordinate system in the above, the relationship between gravitational acceleration components in the frame b and the gravity vector in the frame n, when regardless of its acceleration of the multisensory system, can be written as [14]:
g x g y g z = C n b 0 0 g = g c o s θ s i n φ g s i n θ g c o s θ c o s φ
where g x , g y , and g z denote the measurements of the accelerometer, and g represents the local gravitational acceleration. Then, the pitch and roll can be obtained as follows:
θ = a r c s i n g y g φ = a r c t a n g x g z
In addition, the measured magnetic field of the magnetometer can be used to compute the yaw angle. Before that, the magnetometer often needs to be calibrated to eliminate the impacts of hard iron, soft iron, and scale factor [25]. In this paper, we tried to cut down the effect of the hard iron and scale factor. The magnetic field correction model can be established as the following. Detailed implementation of the model refers to [25]:
m = K m * + m 0 = d i a g K x , K y , K z ( m x * m y * m z * + m x 0 m y 0 m z 0 )
where m = m x   m y   m z T , K denotes a scale transformation matrix.
A standard three-axis magnetometer reads the magnetic field in an aircraft’s body axis system as ( m x , m y , and m z ). The relationship between magnetometer readings and the Earth’s magnetic field vector ( m E , m N , and m S ) arranged in East, North, and Sky is as follows:
m x m y m z = ( C n b ) m E m N   m S = ( C b n ) T m E m N m S
where C b n is the transformation matrix between the body coordinate system and the navigation coordinate system.
To determine the yaw angles, the geomagnetic vector can be resolved onto a local tangent plane. Hence, Equation (15) can be rearranged as follows [42]:
m h s i n ψ m h c o s ψ m S = c o s φ 0 s i n φ s i n φ s i n θ c o s θ c o s φ s i n θ s i n φ c o s θ s i n θ c o s φ c o s θ m x m y m z
where m h s i n ψ and m h c o s ψ are the x- and y-axis components in the h-frame, respectively.
According to Equation (16), the heading angle can be derived as follows:
ψ = a r c t a n m x c o s φ + m z s i n φ m x s i n θ s i n φ + m y c o s θ m z c o s θ s i n φ + D
Taking into account the local magnetic declination, the actual local heading based on the magnetometer was computed.
Finally, according to Equations (13) and (17), the attitude and heading were obtained.
The above two methods for attitude and heading estimation could be fused to achieve more accurate results, and a frame of adaptive cubature Kalman filter was applied in this paper. In the following, the process of adaptive cubature Kalman filter algorithm for attitude and heading estimation was explained in detail.

3. Quaternion-Based Adaptive Cubature Kalman Filter Algorithm for Attitude and Heading Estimation

A quaternion-based adaptive cubature Kalman filter algorithm was proposed to estimate the attitude and heading, and its frame is shown in the figure below. Compared with EKF, ACKF does not need linearization of the nonlinear model and calculation of the Jacobian matrix, and ACKF has stronger adaptability compared with UKF. Therefore, the ACKF can be used for estimating the attitude and heading through fusing the outputs of the accelerometer, magnetometer, and gyroscope. To weaken the influence of system model errors and measurement outliers, the fading memory weighted and limited memory weighted methods were applied. Moreover, the filter innovation sequence was used to rectify the measurement noise covariance and system noise covariance matrices for restraining the divergence. Besides, an adaptive factor based on prediction residual construction was used to overcome the filter model error and the influence of abnormal disturbance, as shown in Figure 3.

3.1. Measuring and State Model

The two kinds of attitude and heading estimates will be designed to form the states and measurements in the filter algorithm. Denote X k = q ^ 0   q ^ 1   q ^ 2   q ^ 3 T as the state at time k, z k = θ   φ   ψ T as the measurement at time k. The state equation is written as:
X k = q ^ 0 q ^ 1 q ^ 2 q ^ 3 k = Δ t 2 1 w x w y w z w x 1 w z w y w y w z 1 w x w z w y w x 1 q 0 q 1 q 2 q 3 k 1 + w k 1
where w k 1 denotes the model noise. The measurement equation is written as:
z k = θ   φ   ψ T = a r c s i n 2 q 2 q 3 + q 0 q 1 a r c t a n 2 q 1 q 3 q 0 q 2 1 2 q 1 2 + q 2 2 a r c t a n 2 q 1 q 2 q 0 q 3 1 2 q 1 2 + q 3 2 + v k
where v k denotes the measurement noise.
According to Equations (18) and (19), the filter considers the following process and observation models:
X k = F k 1 X k 1 + w k 1 z k = h X k + v k
where X k and z k represent the system state and measurement at time instant k; h (.) is known vector mappings. w k 1 and v k are the noise of the process and measurement. Nonlinear filter estimates unknown system states based on the current time and previous noisy observations.

3.2. Conventional Cubature Kalman Filter Algorithm

3.2.1. Cubature Rule

Since the mean and variance can express the Gaussian distribution, the Gaussian filter of the Kalman filter structure can be used to process the state estimation task. The general form is as follows:
x ^ k | k = x ^ k | k 1 + W k ( z k z ^ k ) P k | k = P k | k 1 W k P z z , k | k 1 W k T W k = P x z , k | k 1 P z z , k | k 1 1
where x ^ k | k and P k | k are the mean and variance of a probability distribution p ( x k | Z k ) . x ^ k | k 1 and P k | k 1 are the state prediction value and its covariance at k time, z ^ k and P z z , k | k 1 are predicted measurement and covariance. P x z , k | k 1 is the predicted cross-covariance. W k is Kalman gain.
The calculation of the above mathematical expectations involves the same dimension as the system state. Consider a multidimensional weighted integral of the form:
I T = D T x w x d x
where T . is some arbitrary function, D R n is the region of integration, and the known weighted function w(x) ≥ 0.
In general, the solution to the above equation is difficult to obtain. So, it is necessary to find numerical integration methods to compute it. Based on the spherical-radial cubature rule, the cubature Kalman filter can be used to calculate Equation (22). The basic task for computing the equation by spherical-radial cubature rule is to find a set of points x i and weights w i that approximates the integral I T by a weighted sum of function evaluations. According to the spherical-radial cubature rule [30], the Equation (22) can be rearranged as:
I T i = 0 m w i T ξ i
where w i = 1 / m , i = 1 , 2 , m , m = 2 n . ξ i is the cubature point located at the intersection of the unit sphere and its axes, ξ i = m 2 1 i , 1 = 1 . 0 , , 0 . 1 , , 1 . 0 , , 0 . 1 .

3.2.2. Cubature Kalman Filter Algorithm Process

In the time update process, the Bayesian filter computes the mean x ^ k | k 1 and the associated covariance P k | k 1 of the Gaussian predictive density.
Assume at time k that the posterior density function is known. The cubature points X i , k 1 | k 1 can be calculated as:
X i , k 1 | k 1 = P k 1 | k 1 ξ i + x ^ k 1 | k 1
where P k 1 | k 1 is the error covariance matrix at time instant k − 1; ξ i is Basic cubature points.
The transmission of cubature points can be evaluated as the following:
X i , k | k 1 * = F k 1 X i , k | k 1
where F k 1 is the known matrix function.
The state prediction x ^ k | k 1 and the covariance matrix of state prediction P k | k 1 can be achieved as follows:
x ^ k | k 1 = 1 m i = 1 m X i , k | k 1 *
P k | k 1 = 1 m i = 1 m X i , k | k 1 * X i , k | k 1 * T x ^ k | k 1 x ^ k | k 1 T + Q k 1
where Q k 1 is the system noise covariance.
It is well known that errors in the predicted measurements are zero-mean white sequences. Under the assumption that these errors can be well approximated by the Gaussian, the cubature points X i , k | k 1 can be evaluated (i = 1, 2………, m, m = 2n):
X i , k | k 1 = P k | k 1 ξ i + x ^ k | k 1
Then the transmission of cubature points Z i , k | k 1 can be obtained:
Z i , k | k 1 = h X i , k | k 1 , v k
where h . is known function, v k is the measurement noise.
Then measurement prediction z ^ k | k 1 can be described as:
z ^ k | k 1 = 1 m I = 1 m Z i , k | k 1
Combining Equations (29) and (30), the innovation covariance matrix P z z , k | k 1 can be estimated:
P z z , k | k 1 = 1 m I = 1 m Z i , k | k 1 Z i , k | k 1 T z ^ k | k 1 z ^ k | k 1 T + R k
where R k is the measurement noise covariance.
The cross-covariance matrix P x z , k | k 1 can be calculated:
P x z , k | k 1 = 1 m I = 1 m X i , k | k 1 Z i , k | k 1 T x ^ k | k 1 z k | k 1 T
Combining Equations (31) and (32), The Kalman gain W k can be described:
W k = P z z , k | k 1 P x z , k | k 1 1
The state update x ^ k | k can be written as:
x ^ k | k = x ^ k | k 1 + W k z k z ^ k | k 1
Since the state needs to be normalized further, the state update x ^ k | k can be computed as the following:
x ^ k | k = x ^ k | k / x ^ k | k
The corresponding error covariance P k | k can be estimated as:
P k | k = P k | k 1 W k P z z , k | k 1 W k 1

3.3. Adaptive Cubature Kalman Filter Algorithm

The traditional cubature Kalman filter algorithm requires the statistical characteristics of the system state noise and measurement noise. In practical applications, due to the complexity of the environment, it is difficult to obtain statistics of noises, which introduces uncertainties and causes the prediction accuracy to decrease or even diverge [30,43]. To dynamically correct the system noise and measurement noise, the Sage-Husa estimator has been applied to the CKF algorithm to update the noise covariance estimator, Q ^ k and R ^ k . The Sage-Husa filter algorithm applies to the non-Gaussian noise case. If dynamic noise and observation noise is non-correlated, the algorithm estimates the noise variance by a fading factor, continuously adjusting the system model in a recursive algorithm to modify model parameters confirmed by prior information [44,45]. Since the Sage-Husa filter algorithm uses the method of average information distribution, the contribution of noise parameters to the estimation is 1/k. However, the sensors of the smartphone are low cost and inaccurate. The noise parameters of MARG sensors are easily changed by the external environment. Therefore, the noise parameters updated in real-time can better reflect the current data characteristics. It is necessary to emphasize the role of the latest measurement information, and gradually weaken the effect of stale information. To estimate the noise parameters more accurately, the noise covariance was estimated using the fading memory weighted method and the limited memory weighted method in this paper. According to the characteristics of pedestrian walking, the latest step data was used as a memory window in the pedestrian walking process, as depicted in Figure 4. Since the limited memory weighted method requires the covariance of the estimated and predicted values at the k-w moment to be known, the paper used the fading memory weighted method to calculate the model noise parameters from the starting time to the k-w moment. Then from the moment k − w + 1, the noise covariance was calculated by the limited memory weighted method. This paper estimated and corrected the model noise parameters by combining a fading memory weighted method and limited memory weighted method to improve the accuracy of filter estimation.
In general, the statistical properties of general nonlinear systems were considered as follows:
E ω k = q         c o v ω k , ω j T = Q δ k j E v k = r         c o v v k , v j T = R δ k j c o v ω k , v j T = 0 ;
where q and r are the means of system noise and measurement noise respectively, Q is the covariance matrix of system noise, and R is the covariance matrix of measurement noise.
In the fading memory weighted method, the weighted factor λ i can be rewritten as:
λ i = λ i 1 b , 0.95 < b < 0.99 , i = 1 k λ i = 1
where λ i = d k b i 1 , d k = ( 1 b ) / ( 1 b k + 1 ) , i = 1, 2……k, b is the forgetting factor.
For real-time measurement noise, it is necessary to add parameter value λ to determine the filter memory length. The smaller the value of λ, the greater effect of the latest observations on the current estimate.
According to the Sage-Husa maximum posterior estimation algorithm and time-variant noise statistic estimator, the measurement noise covariance R ^ k and the state noise covariance Q ^ k of the fading memory weighted method can be expressed as follows [31]:
R ^ k = 1 d k R ^ k 1 + d k [ ε k ε k T ( 1 2 n I = 1 m Z i , k | k 1 Z i , k | k 1 T z ^ k | k 1 z k | k 1 T ) ]
Q ^ k = 1 d k Q ^ k 1 + d k [ K k ε k ε k T K k T + P k | k ( 1 2 n i = 1 m X i , k | k 1 * X i , k | k 1 * T x ^ k | k 1 x ^ k | k 1 T ) ]
where ε k is the filter innovation, and ε k = z k z ^ k | k 1 .
When the movement state of the system changes rapidly, the latest observation data is particularly important for estimating the noise statistics at the current time, and the effect of the old data is small [46,47]. Due to the dynamic of smartphone sensor noise, the estimated value of noise statistics at the current time has a stronger correlation with the latest historical data. To increase the weight of the latest historical data, a limited memory weighted method was used to calculate the estimate of the noise parameter. The limited memory weighted method is an exponential weighting method for fixed-length historical data before the current time.
This paper proposed that the latest step data is selected as the length of the memory window in the pedestrian walking process, as shown in Figure 4. In the limited memory weighted method, the weighted factor βi can be rewritten as:
β i = β i 1 b ; 0.95 < b < 0.99 , i = 1 k β i = 1
where β i = d w b i 1 , d w = 1 b / 1 b w , and b is the forgetting factor. After the k-w moment, replace the weight coefficients in Equations (38)–(39) with β k + 1 i , then in the limited memory adaptive filter the measurement noise covariance R ^ k and the state noise covariance Q ^ k can be expressed as:
R ^ k = b R ^ k 1 + d w [ ε k ε k T ( 1 2 n i = 1 2 n Z i , k | k 1 Z i , k | k 1 T z ^ k | k 1 z k | k 1 T ) ] + d w b w R ^ k w
where
R ^ k w = ε k w ε k w T ( 1 2 n i = 1 2 n Z i , k w | k w 1 Z i , k w | k w 1 T z ^ k w | k w 1 z k w | k w 1 T )
Q ^ k = b Q ^ k 1 + d w [ K k ε k ε k T K k T + P k | k ( 1 2 n i = 1 2 n X i , k | k 1 * X i , k | k 1 * T x ^ k | k 1 x ^ k | k 1 T ) ] + d w b w Q ^ k w
where
Q ^ k w = W k w ε k w ε k w T W k w T + P k w | k w ( 1 2 n i = 1 2 n X i , k w | k w 1 * X i , k w | k w 1 * T x ^ k w | k w 1 x ^ k w | k w 1 T )
By analyzing the recursive process of the filter, it is found that if the Kalman gain becomes smaller and smaller, the role of the new measurement data reflecting the true state to a certain extent is getting weaker and weaker in the estimation, which may result in data saturation and causes the filter to diverge. Therefore, the main measure to restrain the filter divergence is to pay attention to the role of new measurement data in the current filter. In practical applications, when filtering divergence occurs, the measurement noise covariance R and the state noise covariance Q always lose semi-positive or positive definiteness, and then the filter variance will diverge. For Equations (39), (40), (42) and (43), we found that when the absolute values of the non-diagonal non-zero elements of the cross-covariance on the right side of the Equations (39), (40), (42) and (43) were so great to a certain degree, or there were negative values in the diagonal elements of the error covariance, it will make R and Q lose their positive definiteness. Therefore the loss of positive semidefiniteness of Q and the loss of positive definiteness of R can be regarded as a sign of filter divergence. As long as Q and R are always positive semidefinite and positive definite during the recursive calculation process, the filtering divergence can be prevented.
In this paper, based on the biased noise variance estimation method, the measurement noise covariance R and the state noise covariance Q were corrected by the filter innovation for restraining the divergence when Q loses positive semidefiniteness and R loses positive definite. For the fading memory weighted method, the corrected measurement and state noise covariance are as follows:
R ^ k = 1 d k R ^ k 1 + d k ε k ε k T
Q ^ k = 1 d k Q ^ k 1 + d k K k ε k ε k T K k T
For the limited memory weighted method, the corrected measurement and state noise covariance can be expressed as follows:
R ^ k = b R ^ k 1 + d w ε k ε k T + d w b w R ^ k w
Q ^ k = b Q ^ k 1 + d w K k ε k ε k T K k T + d w b w Q ^ k w
In actual circumstances, the moving object is generally difficult to maintain regular motion. So, it is very difficult to construct an accurate functional model. Moreover, during the movement of the carrier, the carrier will inevitably be affected by abnormal interference from the outside world, resulting in the state model not being able to truly reflect the movement law of the carrier. To overcome the filter model error and the influence of abnormal disturbance, an adaptive factor (α) is applied by using predicted state discrepancy statistics to overcome the abnormal influence of state disturbance [39]. In this paper, the adaptive factor is the two-segment function together with the statistic of the predicted state discrepancy, which can be represented as:
k = 1 , Δ V ˜ k c 0 c 0 Δ V ˜ k , Δ V ˜ k > c 0
where c0 is a constant, which can be adjusted depending on the practical implementation, usually c0 = 2.0 − 3.0.; Δ V ˜ k is the statistic of the predicted state discrepancy, defined as Δ V ˜ k = ε k T ε / t r P ^ k | k 1 1 2 .
To control the influence of the dynamic model error, the adaptive factor is applied for correcting the Kalman gain. Having weakened the negative impacts of measurement outliers and state model errors, the innovation covariance matrix P z z , k | k 1 * and the cross-covariance matrix P x z , k | k 1 can be expressed as:
P z z , k | k 1 * = 1 k ( 1 m I = 1 m Z i , k | k 1 Z i , k | k 1 T z ^ k | k 1 z ^ k | k 1 T ) + R k
P x z , k | k 1 = 1 k ( 1 m I = 1 m X i , k | k 1 Z i , k | k 1 T x ^ k | k 1 z k | k 1 T )

4. Experiments and Result Analysis

To evaluate the proposed approach, we conducted extensive experiments in both static and dynamic situations. The smartphone MI 5 was selected as the test device, which was embedded with MARG sensors. As for comparisons, EKF, CKF, and SHCKF were used as baselines. The initial state noise and measurement noise covariance matrices of the proposed filter were empirically determined depending on each measurement outputted by the smartphone in the static and dynamic test [25]. For static tests, Q = d i a g ( e 5 , e 5 , e 5 ) , R = d i a g ( e 3 , e 3 , e 3 ) , and for the dynamic test, Q = d i a g ( e 4 , e 4 , e 4 ) , R = d i a g ( e 3 , e 3 , e 3 ) , where d i a g . represents a diagonal matrix. Moreover, in static and dynamic tests the sampling frequency of data was 50 Hz. The forgetting factor b and the constant c0 were empirically determined, and the values for b and c0 were 0.96 and 2.1 respectively.

4.1. Experiment in the Static Condition and Result Analysis

In the static test, a MI 5 smartphone was placed on the desktop to collect MARG sensors data. Since the smartphone was stationary, a sampling period was selected as the length of the memory window. Although the attitude and heading values calculated from the outputs of the accelerometer and magnetometer fluctuated severely, the average of a sample set with enough size could be used as a reference [25]. Figure 5 shows the absolute error and angle of the attitude and heading of the adaptive cubature Kalman filter (ACKF), Sage-Husa cubature Kalman filter (SHCKF), cubature Kalman filter (CKF), and extended Kalman filter (EKF) results in the static test. From Figure 5, we can see that the absolute value of the attitude and heading errors of the EKF results were larger and more unstable than those of the CKF, SHCKF, and ACKF results. This is because the EKF algorithm uses linearization to approximate nonlinear functions, so its estimation accuracy is not high. The CKF, SHCKF, and ACKF algorithms employ a third-degree spherical-radical cubature rule to compute the Gaussian-weighted integrals numerically and use cubature point sets to approximate the mean and variance. So, CKF, SHCKF, and ACKF have stronger adaptability than EKF. Besides, although the results of ACKF, SHCKF, and CKF were similar, the mean absolute error (MAE) of the ACKF results was best in Table 1. Since the ACKF method emphasized the role of the latest measurement information, and gradually weakened the effect of stale information. The noise covariance was estimated using the fading memory weighted method and the limited memory weighted method to estimate the noise parameters more accurately. Table 1 and Figure 6 present the error absolute value of the ACKF, SHCKF, CKF, and EKF algorithms results. According to the results of Table 1, the MAE of ACKF results were more accurate than those of SHCKF, CKF, and EKF algorithms. Compared with the SHCKF, CKF, and EKF, the mean absolute error (MAE) of the heading of the ACKF results decreased to about 13.21%, 28.70%, and 76.55% respectively. Moreover, the ACKF reduced to about 4.46%, 14.77%, and 61.24% of the MAE of pitch compared to the other algorithms respectively. Additionally, the MAE of the roll of the ACKF results diminished to about 17.14%, 28.69%, and 73.95% respectively.

4.2. Experiment in the Dynamic Condition and Result Analysis

To further verify the superiority of the proposed ACKF on attitude and heading estimation, the dynamic test was conducted in the corridors on the first floors of a research building. The floor plans are presented in Figure 7. In the dynamic test, we held the MI 5 smartphone at a constant speed through a corridor, as shown in Figure 6. During the experiment, there were sudden turns, and the movement state of the smartphone was changed during the sudden turn. Due to the reference values of roll and pitch cannot be measured, the dynamic test focused on processing and comparing heading results. Due to the reference heading being difficult to achieve in a dynamic test, the estimation error cannot be directly presented. This paper used two methods to assess the heading error. On the one hand, the dynamic test was conducted in the corridor. As the start point and the end point were the same and in the middle of a straight corridor, the average heading of a straight corridor at the beginning can be used as a reference value for the heading at the end. On the other hand, the location tracking performance of PDR can reflect heading estimation performance to some extent [25]. Generally, research on PDR includes three aspects: heading estimation, location tracking, and speed estimation. Heading estimation is the focus of this article. Location tracking is based on the primary theory of dead reckoning [25,36]. The speed estimation research mainly includes stride detection and step length estimation. For stride detection, it can be obtained by calculating the measured total acceleration peak. Besides an empirical model is employed for step length estimation as the following. Detailed implementation refers to [25,36].
S t e p L e n g t h = S × A m a x A m i n 4
where A m a x and A m i n are the maximum and minimum vertical acceleration in a single step; S is the personalized parameter that needs to be calibrated for each pedestrian.
Moreover, the roll and pitch information from the smartphone potentially improves the heading estimation, because it also considers the effects of the roll and pitch [24]. The measured values of an accelerometer, magnetometer, and gyroscope in the body coordinate system can be converted to the horizontal plane of the navigation coordinate system:
a l = C b l a b = C b l a x   a y   a z T m l = C b l m b = C b l m x   m y   m z T w l = C b l w b = C b l w x   w y   w z T
where a l = a x l   a y l   a z l is the projection of accelerometer measurements in the horizontal plane, m l = m x l   m y l   m z l is the projection of magnetometer measurements in the horizontal plane, and w l = w x l   w y l   w z l is the projection of gyroscope measurements in the horizontal plane.
Combined with the step length and heading of the current step, the two steps of the relative displacement increment are given as:
X k + 1 = X k + S t e p L e n g t h × c o s ( ψ ) Y k + 1 = Y k + S t e p L e n g t h × s i n ( ψ )
where x and y represent the x-axis and y-axis values in the n-frame, and k + 1 and k represent the respective step counts; S t e p L e n g t h is the step length; and ψ is the heading in the n-frame.
In the dynamic test, we used the location tracking performance of PDR to reflect heading estimation performance. There were three people involved in the experiment. Each participant had different heights and weights, as shown in Table 2. The length of the corridor that they walked was as long as 148.39 m each.
The heading results in the dynamic test are presented in Figure 8. Figure 8a,c,e shows the results of the heading. The black line in Figure 8 is the heading reference from the initial heading. Figure 8b,d,f presents the absolute value of heading error for the last twenty seconds of the test. From Figure 8, we can see that the proposed ACKF algorithm could provide a more stable and accurate heading estimation information compared with the EKF, CKF, and SHCKF algorithms. Table 3 and Figure 9 give the statistical results of the heading error. As we can see from Table 3, the mean absolute error (MAE) of the heading of the ACKF results reduced about 7.10%, 18.61%, and 20.69% respectively in the first participant test. The MAE of the heading for the second participant test decreased about 5.93%, 11.72%, and 19.68% respectively. In addition the last participant results decreased 1.69%, 2.28%, and 2.58% respectively. Due to the complex and changeable indoor environment, there were multiple interference sources. When pedestrians are walking with their smartphones in their hands, there is still swaying and shaking, which also have a certain impact on the heading. Therefore, the real-time heading angle calculated by the smartphone sensor not only includes the actual heading angle of the pedestrian but also may include deviations caused by environmental influences and pedestrian swaying and shaking. From the heading results of the dynamic experiment, it is found that the improvement of the proposed algorithm accuracy is not obvious. This can be explained that in the dynamic experiment, due to the complex indoor environment, there are multiple interference sources. When pedestrians are walking with their smartphones in their hands, there is still swaying and shaking, which also have a certain impact on the heading. Therefore, the real-time heading angle calculated by the smartphone sensor not only includes the actual heading angle of the pedestrian but also may include deviations caused by environmental influences and pedestrian swaying and shaking. The pedestrian swaying and shaking may cause fluctuations in heading results at many points and interfered with the average heading. Meanwhile, the reference heading angle used in this paper was the average value of the heading at the initial stage, which can only reflect the average value of heading changes to a certain extent, and cannot reflect the filtering performance well. Therefore, the accuracy improvement was not obvious. Besides, heading experiment results only verified the last 1000 sampling data, and the data accuracy of the whole dynamic experiment was not compared. So, the PDR location tracking method was proposed to verify the accuracy of whole dynamic experiments.
Figure 10 shows the results of location tracking, which can reflect more intuitive improvements of heading estimation. The black line in Figure 10 is the reference trace. Figure 10 illustrates the comparison of the location and location errors calculated by the ACKF, SHCKF, CKF, and EKF algorithms. In Figure 10, for all of the three participants, compared with the results of EKF, the results of the CKF, SHCKF, and ACKF approximate the reference trace better for the three participants. Since the EKF uses the first-order approximation to approximate nonlinear functions, which will accumulate errors and decrease the estimation accuracy. Moreover, the results of SHCKF and ACKF were accurate and stable than those of CKF. This is due to ACKF and SHCKF algorithms introducing the optimal adaptive factor so that they can accurately track the uncertainty of the model errors. Besides, the accuracy of the ACKF results was the best. Since the ACKF algorithm uses the fading memory weighted method and the limited memory weighted method to estimate the noise parameters, which can emphasize the role of the latest measurement information, and gradually weakens the effect of stale information, improving the estimation accuracy. Moreover, an adaptive factor is applied to overcome the abnormal influence of sudden turns. All three figures indicate that ACKF, SHCKF, CKF, and EKF provide low location errors at the beginning of tracking. However, ACKF performs and the walking distance becomes longer. Experimental results show that there was a problem of error accumulation in PDR, and ACKF could better solve this problem to a certain extent. Table 4 and Figure 11 give the statistical results of the location errors. Compared with the SHCKF, CKF, and EKF, the mean of location errors of the ACKF results decreased about 9.92%, 23.24%, and 45.33% respectively in the first participant test. The mean of location errors of the second participant ACKF results decreased by 21.62%, 30.51%, 53.13%, and the last participant results decreased by 17.36%, 19.80%, and 32.06%.
In general, the results of the static test show that the proposed ACKF could provide optimal models for attitude and heading estimation. In the location tracking test, it is noticeable that the proposed ACKF had smaller errors and was more stable compared with the SHCKF, CKF, and EKF. Meanwhile, for PDR, the statistical characteristics of pedestrian moving were dynamically changing. The proposed ACKF filter could adapt to dynamic conditions. Therefore, it could be concluded that the proposed ACKF method could achieve better accuracy making it more suitable for indoor positioning.

5. Discussion

This paper proposed a quaternion-based adaptive cubature Kalman filter (ACKF) to estimate the attitude and heading of a smartphone with its embedded sensors’ data. According to the characteristics of pedestrian walking, this paper proposed that the latest step data was used as the memory window data of the limited memory weighted method. In the process of pedestrian walking, the state of the pedestrian was usually stable within one step, and the output position in the pedestrian dead reckoning algorithm was separated by steps. At the same time, we found that the closest step data had the strongest correlation with the current heading through experimental comparison. Figure 12 presents the mean and standard deviation of the latest 1–10 step data as the memory window. As we can see from Figure 12, when the latest step data was selected as the length of the memory window, the mean and standard deviation of the results was the smallest.
To evaluate the proposed approach, we conducted extensive experiments in both static and dynamic situations. In the static experiment, the proposed algorithm outperformed the other three filters remarkably, while in the dynamic test, the superiority of the proposed one over the others was not so great. The reason is that the complex environment and changeable conditions, such as swaying and shaking of the pedestrian’s body during the dynamic test could cause severe fluctuations in heading results. Thus, the attitude information from the MARG sensors potentially improved the heading estimation by considering the effects of the roll and pitch [24]. Considering the influence of attitude, we derived headings in the horizontal plain. Take an experiment participant as an example, the results are presented in Figure 13. From Figure 13, we can see that the improved ACKF algorithm (IACKF) results were closest to the actual path compared with the other methods. Table 5 gives the statistical results of the location errors. The mean and standard deviation of the results obtained by the improved algorithm was the smallest.
Due to the complex indoor environment, there were multiple sources influencing attitude and heading estimation. The proposed algorithm could alleviate the negative impact of the inaccurate setting of the noise covariance matrix to a certain extent, but the position error could be still accumulated, so adaptive and robust algorithms with better performances need to be investigated in the future. Considering the randomness of the way users hold smartphones, we will consider identifying more complex pedestrian activities in the next step.

6. Conclusions

This paper proposed a quaternion-based adaptive cubature Kalman filter algorithm for attitude and heading estimation fused with the outputs of MARG sensors. The fading memory weighted method and the limited memory weighted method were used to reduce the weight of stale data and adaptively modify the model noise parameters. The filter innovation sequence was used to rectify the measurement noise covariance and system noise covariance matrices for restraining the divergence. Besides the adaptive factor is applied by using predicted state discrepancy statistics to overcome the sudden steering of state disturbance. The static and dynamic experiments were conducted in an indoor environment to verify the superiority of the proposed algorithm. In terms of the heading, the proposed algorithm could provide a more stable and accurate heading estimation information. For the attitude, the proposed algorithm could effectively improve the accuracy under quasistatic condition. Moreover, in the dynamic test, the heading calculated by EKF, CKF, SHCKF, and ACKF was input into the PDR method respectively. The location tracking performance shows that the heading calculated by the proposed algorithm could make the location estimation more accurate.

Author Contributions

Conceptualization, J.G. and L.X.; Methodology, J.G. and D.W.; Software, J.G. and D.W.; Validation, J.G. and D.W.; Formal Analysis, J.G. and D.W.; Investigation, J.G. and D.W.; Data Curation, J.G. and D.W.; Writing—Original Draft Preparation, J.G.; Writing—Review and Editing, J.G. and D.W.; Visualization, J.G. and D.W.; Supervision, L.X.; Project Administration, L.X. and D.W.; Funding Acquisition, L.X. and D.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Key Research and Development Program of China, grant number 2017YFB0504103, Key Research and Development Program of Guangdong Province, grant number 2020B0101130009, National Natural Science Foundation of China, grant number 41071284, the Fundamental Research Funds for the Central Universities, grant number 17lgpy43, the Key Science and Technology Planning Projects of Guangzhou, grant number 201604046007.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Data sharing is not applicable to this article.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Arana, O.; Garcia, F.; Gomez, J.; Rangel, V. MSP: Providing Location Privacy in WLAN Networks with a MAC Swapping Protocol. Comput. Netw. 2018, 138, 136–148. [Google Scholar] [CrossRef]
  2. Deng, Z.A.; Hu, Y.; Yu, J.; Na, Z. Extended Kalman Filter for Real Time Indoor Localization by Fusing WiFi and Smartphone Inertial Sensors. Micromachines 2015, 6, 523–543. [Google Scholar] [CrossRef] [Green Version]
  3. Zhang, S.; Wang, W.; Jiang, T. WiFi-Inertial Indoor Pose Estimation for Micro Aerial Vehicles. IEEE Trans. Ind. Electron. 2020. [Google Scholar] [CrossRef] [Green Version]
  4. Li, Y.; Zhuang, Y.; Lan, H.; Zhang, P.; Niu, X.; El-Sheimy, N. WiFi-Aided Magnetic Matching for Indoor Navigation with Consumer Portable Devices. Micromachines 2015, 6, 747–764. [Google Scholar] [CrossRef] [Green Version]
  5. Chen, L.; Pei, L.; Kuusniemi, H.; Chen, Y.; Kröger, T.; Chen, R. Bayesian fusion for indoor positioning using bluetooth fingerprints. Wirel. Pers. Commun. 2013, 70, 1735–1745. [Google Scholar] [CrossRef]
  6. Pušnik, M.; Galun, M.; Šumak, B. Improved Bluetooth Low Energy Sensor Detection for Indoor Localization Services. Sensors 2020, 20, 2336. [Google Scholar] [CrossRef] [Green Version]
  7. Yadav, R.K.; Bhattarai, B.; Gang, H.S.; Pyun, J.Y. Trusted K Nearest Bayesian Estimation for Indoor Positioning System. IEEE Access 2019, 7, 51484–51498. [Google Scholar] [CrossRef]
  8. Hong, J.; Kim, K.J.; Kim, C.G. Comparison of Indoor Positioning System Using Wi-Fi and UWB. In Proceedings of the Asian Conference on Intelligent Information and Database Systems, Dong Hoi City, Vietnam, 19–21 March 2018; pp. 623–632. [Google Scholar]
  9. Li, X.; Wang, Y.; Khoshelham, K. Comparative analysis of robust extended Kalman filter and incremental smoothing for UWB/PDR fusion positioning in NLOS environments. Acta Geod. Geophys. 2019, 54, 157–179. [Google Scholar] [CrossRef]
  10. Liu, F.; Zhang, J.; Wang, J.; Han, H.; Yang, D. An UWB/Vision Fusion Scheme for Determining Pedestrians’ Indoor Location. Sensors 2020, 20, 1139. [Google Scholar] [CrossRef] [Green Version]
  11. Huang, L.; Li, H.; Yu, B.; Gan, X.; Wang, B.; Li, Y.; Zhu, R. Combination of Smartphone MEMS Sensors and Environmental Prior Information for Pedestrian Indoor Positioning. Sensors 2020, 20, 2263. [Google Scholar] [CrossRef] [Green Version]
  12. Wang, B.; Liu, X.; Yu, B.; Jia, R.; Huang, L. Posture Recognition and Heading Estimation Based on Machine Learning Using MEMS Sensors. In Proceedings of the International Conference on Artificial Intelligence for Communications and Networks, Harbin, China, 25–26 May 2019; pp. 496–508. [Google Scholar]
  13. Combettes, C.; Renaudin, V. Delay Kalman Filter to Estimate the Attitude of a Mobile Object with Indoor Magnetic Field Gradients. Micromachines 2016, 7, 79. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  14. Cui, Y.; Zhang, Y.; Huang, Y.; Wang, Z.; Fu, H. Novel WiFi/MEMS Integrated Indoor Navigation System Based on Two-Stage EKF. Micromachines 2019, 10, 198. [Google Scholar] [CrossRef] [Green Version]
  15. Dongjin, W.; Linyuan, X.; Jijun, G.; Qingyi, P. Robust Adaptive Extended Kalman Filtering for Smart Phone-based Pedestrian Dead Reckoning Systems. In Proceedings of the 2018 Ubiquitous Positioning, Indoor Navigation and Location-Based Services (UPINLBS), Wuhan, China, 22–23 March 2018; pp. 1–8. [Google Scholar] [CrossRef]
  16. Zhang, J.; Li, J.; Che, X.; Zhang, X.; Hu, C.; Feng, K.; Xu, T. The Optimal Design of Modulation Angular Rate for MEMS-Based Rotary Semi-SINS. Micromachines 2019, 10, 111. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  17. Fan, B.; Li, Q.; Liu, T. How Magnetic Disturbance Influences the Attitude and Heading in Magnetic and Inertial Sensor-Based Orientation Estimation. Sensors 2018, 18, 76. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  18. Tian, Z.; Fang, X.; Zhou, M.; Li, L. Smartphone-Based Indoor Integrated WiFi/MEMS Positioning Algorithm in a Multi-Floor Environment. Micromachines 2015, 6, 347–363. [Google Scholar] [CrossRef] [Green Version]
  19. Li, X.; Wei, D.; Lai, Q.; Xu, Y.; Yuan, H. Smartphone-based integrated PDR/GPS/Bluetooth pedestrian location. Adv. Space Res. 2017, 59, 877–887. [Google Scholar] [CrossRef]
  20. Ren, M.; Guo, H.; Shi, J.; Meng, J. Indoor Pedestrian Navigation Based on Conditional Random Field Algorithm. Micromachines 2017, 8, 320. [Google Scholar] [CrossRef] [Green Version]
  21. Luo, R.C.; Lai, C.C. Enriched Indoor Map Construction Based on Multisensor Fusion Approach for Intelligent Service Robot. IEEE Trans. Ind. Electron. 2012, 59, 3135–3145. [Google Scholar] [CrossRef]
  22. Amanatiadis, A. A Multisensor Indoor Localization System for Biped Robots Operating in Industrial Environments. IEEE Trans. Ind. Electron. 2016, 63, 7597–7606. [Google Scholar] [CrossRef]
  23. Teuliere, C.; Marchand, E.; Eck, L. 3-D Model-Based Tracking for UAV Indoor Localization. IEEE Trans. Cybern. 2017, 45, 869–879. [Google Scholar] [CrossRef] [Green Version]
  24. Zhuang, Y.; Lan, H.; Li, Y.; El-Sheimy, N. PDR/INS/WiFi Integration Based on Handheld Devices for Indoor Pedestrian Navigation. Micromachines 2015, 6, 793–812. [Google Scholar] [CrossRef] [Green Version]
  25. Wu, D.; Xia, L.; Geng, J. Heading Estimation for Pedestrian Dead Reckoning Based on Robust Adaptive Kalman Filtering. Sensors 2018, 18, 1970. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  26. Niu, X.; Ban, Y.; Zhang, Q.; Zhang, T.; Zhang, H.; Liu, J. Quantitative Analysis to the Impacts of IMU Quality in GPS/INS Deep Integration. Micromachines 2015, 6, 1082–1099. [Google Scholar] [CrossRef] [Green Version]
  27. Wang, H.; Liu, N.; Su, Z.; Li, Q. Research on Low-Cost Attitude Estimation for MINS/Dual-Antenna GNSS Integrated Navigation Method. Micromachines 2019, 10, 362. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  28. Garcia, R.V.; Kuga, H.K.; Silva, W.R. Unscented Kalman filter and smoothing applied to attitude estimation of artificial satellites. Comput. Appl. Math. 2018, 37, 1–10. [Google Scholar] [CrossRef]
  29. Zhang, W.J.; Wang, S.Y.; Feng, Y.L.; Feng, J.C. Huber-based high-degree cubature Kalman tracking algorithm. Acta Phys. Sin. 2016, 65. [Google Scholar] [CrossRef]
  30. Arasaratnam, I.; Haykin, S. Cubature Kalman Filters. IEEE Trans. Autom. Control 2009, 54, 1254–1269. [Google Scholar] [CrossRef] [Green Version]
  31. Yu, F.; Sun, Q.; Lv, C.; Ben, Y.; Fu, Y. A SLAM algorithm based on adaptive cubature kalman filter. Math. Probl. Eng. 2014, 2014, 171958. [Google Scholar] [CrossRef]
  32. Liu, M.; Lai, J.; Li, Z.; Liu, J. An adaptive cubature Kalman filter algorithm for inertial and land-based navigation system. Aerosp. Sci. Technol. 2016, 51, 52–60. [Google Scholar] [CrossRef]
  33. Miao, Z.Y.; Lv, Y.L.; Xu, D.J.; Shen, F.; Pang, S.W. Analysis of a variational Bayesian adaptive cubature Kalman filter tracking loop for high dynamic conditions. GPS Solutions 2017, 21, 111–122. [Google Scholar] [CrossRef]
  34. Shen, F.; Xu, G. An enhanced UWB-based range/GPS cooperative positioning approach using adaptive variational Bayesian cubature Kalman filtering. Math. Probl. Eng. 2015, 2015, 843719. [Google Scholar] [CrossRef]
  35. Zhang, Y.; Huang, Y.; Li, N.; Zhao, L. Embedded cubature Kalman filter with adaptive setting of free parameter. Signal Process. 2015, 114, 112–116. [Google Scholar] [CrossRef]
  36. Mu, J.; Cai, Y. Likelihood-based iteration square-root cubature Kalman filter with applications to state estimation of re-entry ballistic target. Trans. Inst. Meas. Control. 2013, 35, 949–958. [Google Scholar] [CrossRef]
  37. Zhao, L.; Wang, J.; Yu, T.; Jian, H.; Liu, T. Design of adaptive robust square-root cubature Kalman filter with noise statistic estimator. Appl. Math. Comput. 2015, 256, 352–367. [Google Scholar] [CrossRef]
  38. Tang, X.; Wei, J.; Chen, K. Square-root adaptive cubature Kalman filter with application to spacecraft attitude estimation. In Proceedings of the 2012 15th International Conference on Information Fusion, Singapore, 9–12 July 2012; pp. 1406–1412. [Google Scholar]
  39. Xu, T.; Jiang, N.; Sun, Z. An improved adaptive Sage filter with applications in GEO orbit determination and GPS kinematic positioning. Sci. China Phys. Mech. Astron. 2012, 55, 892–898. [Google Scholar] [CrossRef]
  40. Deng, Z.A.; Wang, G.; Hu, Y.; Wu, D. Heading estimation for indoor pedestrian navigation using a smartphone in the pocket. Sensors 2015, 15, 21518–21536. [Google Scholar] [CrossRef]
  41. Qin, Y. Inertial Navigation; Science Press: Beijing, China, 2014. [Google Scholar]
  42. Yoo, T.S.; Hong, S.K.; Yoon, H.M.; Park, S. Gain-scheduled complementary filter design for a MEMS based attitude and heading reference system. Sensors 2011, 11, 3816–3830. [Google Scholar] [CrossRef]
  43. Tseng, C.H.; Lin, S.F.; Jwo, D.J. Fuzzy adaptive cubature Kalman filter for integrated navigation systems. Sensors 2016, 16, 1167. [Google Scholar] [CrossRef] [Green Version]
  44. Cui, N.; Zhang, L.; Wang, X.; Yang, F.; Lu, B. Application of adaptive high-degree cubature Kalman filter in target tracking. Acta Aeronaut. Astronaut. Sin. 2015, 36, 3885–3895. [Google Scholar] [CrossRef]
  45. Wang, J.; Liu, J.; Cai, B. Study on information fusion algorithm in embedded integrated navigation system. In Proceedings of the 2008 International Conference on Intelligent Computation Technology and Automation (ICICTA), Hunan, China, 20–22 October 2008. [Google Scholar]
  46. Sage, A.P.; Husa, G.W. Algorithms for sequential adaptive estimation of prior statistics. In Proceedings of the 1969 IEEE Symposium on Adaptive Processes (8th) Decision and Control, University Park, PA, USA, 17–19 November 1969. [Google Scholar]
  47. Chen, W.; Chen, R.; Chen, Y.; Kuusniemi, H.; Wang, J. An effective Pedestrian Dead Reckoning algorithm using a unified heading error model. In Proceedings of the IEEE/ION Position, Location and Navigation Symposium (PLANS), Palm Springs, CA, USA, 4–6 May 2010; pp. 340–347. [Google Scholar]
Figure 1. The frame of the fusion filter algorithm [25].
Figure 1. The frame of the fusion filter algorithm [25].
Micromachines 12 00079 g001
Figure 2. Illustration of the defined coordinate systems, (a) the local Cartesian coordinates coordinate system, (b) the device coordinate system, (c) the user coordinate system.
Figure 2. Illustration of the defined coordinate systems, (a) the local Cartesian coordinates coordinate system, (b) the device coordinate system, (c) the user coordinate system.
Micromachines 12 00079 g002
Figure 3. The frame of the quaternion-based adaptive cubature Kalman filter (ACKF) algorithm.
Figure 3. The frame of the quaternion-based adaptive cubature Kalman filter (ACKF) algorithm.
Micromachines 12 00079 g003
Figure 4. A memory window of the limited memory weighted method.
Figure 4. A memory window of the limited memory weighted method.
Micromachines 12 00079 g004
Figure 5. The results of the static test: (a) heading angle; (b) absolute value of the heading error; (c) pitch angle; (d) absolute value of pitch error; (e) roll angle; and (f) absolute value of the roll error.
Figure 5. The results of the static test: (a) heading angle; (b) absolute value of the heading error; (c) pitch angle; (d) absolute value of pitch error; (e) roll angle; and (f) absolute value of the roll error.
Micromachines 12 00079 g005aMicromachines 12 00079 g005b
Figure 6. Distributions of mean absolute errors of extended Kalman filter (EKF), cubature Kalman filter (CKF), Sage-Husa cubature Kalman filter (SHCKF), and ACKF.
Figure 6. Distributions of mean absolute errors of extended Kalman filter (EKF), cubature Kalman filter (CKF), Sage-Husa cubature Kalman filter (SHCKF), and ACKF.
Micromachines 12 00079 g006
Figure 7. Floor plan of the site for the dynamic test at a corridor.
Figure 7. Floor plan of the site for the dynamic test at a corridor.
Micromachines 12 00079 g007
Figure 8. Distributions of heading and the absolute value of heading error for three participants, (a,b) participant 1, (c,d) participant 2, and (e,f) participant 3.
Figure 8. Distributions of heading and the absolute value of heading error for three participants, (a,b) participant 1, (c,d) participant 2, and (e,f) participant 3.
Micromachines 12 00079 g008
Figure 9. Distributions of the MAE of EKF, CKF, SHCKF, and ACKF results with respect to three participants.
Figure 9. Distributions of the MAE of EKF, CKF, SHCKF, and ACKF results with respect to three participants.
Micromachines 12 00079 g009
Figure 10. Distributions of location errors in location tracking of EKF, CKF, SHCKF, and ACKF for three participants, (a) participant 1, (b) participant 2, and (c) participant 3.
Figure 10. Distributions of location errors in location tracking of EKF, CKF, SHCKF, and ACKF for three participants, (a) participant 1, (b) participant 2, and (c) participant 3.
Micromachines 12 00079 g010
Figure 11. Distributions of the mean of location errors in location tracking for three participants.
Figure 11. Distributions of the mean of location errors in location tracking for three participants.
Micromachines 12 00079 g011
Figure 12. Distributions of the mean and standard deviation different steps as the memory window.
Figure 12. Distributions of the mean and standard deviation different steps as the memory window.
Micromachines 12 00079 g012
Figure 13. Distributions of different methods.
Figure 13. Distributions of different methods.
Micromachines 12 00079 g013
Table 1. Statistical results of the absolute value of heading, pitch, and roll error in the static test.
Table 1. Statistical results of the absolute value of heading, pitch, and roll error in the static test.
Error MetricsACKFSHCKFCKFEKF
The absolute value of Heading error (degree)Max1.37931.77452.63255.1126
Min0.00000.00000.00000.0001
Mean0.26410.30430.37041.1261
The absolute value of Pitch error (degree)Max0.09890.09840.09900.3469
Min0.00000.00000.00000.0010
Mean0.01500.01570.01760.0387
The absolute value of Roll error (degree)Max0.03850.04030.08020.5616
Min0.00000.00000.00000.0018
Mean0.00870.01050.01220.0334
Table 2. Detailed information of all participants (S is the step length parameter).
Table 2. Detailed information of all participants (S is the step length parameter).
ParticipantSexHeight (m)Weight (kg)S
1Male1.75870.48
2Female1.72800.48
3Male173800.46
Table 3. Comparisons of the mean absolute error (MAE) of heading (degree).
Table 3. Comparisons of the mean absolute error (MAE) of heading (degree).
ParticipantError MetricsACKFSHCKFCKFEKF
FirstMean5.46285.88026.71186.8883
SecondMean5.16255.48815.84806.4277
ThirdMean6.51676.62846.66876.6890
Table 4. Comparisons of mean localization errors (m).
Table 4. Comparisons of mean localization errors (m).
ParticipantError MetricsACKFSHCKFCKFEKF
FirstMean2.52272.80053.28664.6148
SecondMean1.68052.14412.41853.5855
ThirdMean1.45081.75561.80892.1353
Table 5. Comparisons of the mean and standard deviation of different methods.
Table 5. Comparisons of the mean and standard deviation of different methods.
Error MetricsIACKFACKFSHCKFCKFEKF
Mean (m)1.18131.45081.75561.80892.1353
Standard Deviation (m)0.63820.76461.02821.09001.4251
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Geng, J.; Xia, L.; Wu, D. Attitude and Heading Estimation for Indoor Positioning Based on the Adaptive Cubature Kalman Filter. Micromachines 2021, 12, 79. https://doi.org/10.3390/mi12010079

AMA Style

Geng J, Xia L, Wu D. Attitude and Heading Estimation for Indoor Positioning Based on the Adaptive Cubature Kalman Filter. Micromachines. 2021; 12(1):79. https://doi.org/10.3390/mi12010079

Chicago/Turabian Style

Geng, Jijun, Linyuan Xia, and Dongjin Wu. 2021. "Attitude and Heading Estimation for Indoor Positioning Based on the Adaptive Cubature Kalman Filter" Micromachines 12, no. 1: 79. https://doi.org/10.3390/mi12010079

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop