# Delay Kalman Filter to Estimate the Attitude of a Mobile Object with Indoor Magnetic Field Gradients

^{*}

## Abstract

**:**

## 1. Introduction

- Magnetic field fingerprinting (FP);
- Velocity estimation from spatial magnetic field gradients measured with an assembly of magnetometers;
- Attitude angles estimation from magnetic field gradients measured in time with a single tri-axis magnetometer.

#### 1.1. Magnetic Field Fingerprinting (FP)

#### 1.2. Velocity Estimation from Spatial Magnetic Field Gradients Measured with an Assembly of Magnetometers

#### 1.3. Attitude Angles Estimation from Magnetic Field Gradients Measured in Time by a Single Tri-Axis Magnetometer

#### 1.4. Challenge of Attitude Estimation Filters Based on Magnetic Fields Recorded at Different Epochs

_{0}) and at the epoch of state’s computation (t

_{k}). However they do not consider the fact that the orientation of the mobile object is different at the two epochs 0 and k, which limits the solution. They also do not consider the correlation between the two epochs and the quality of the orientation estimate at the beginning of the quasi static period. This approximation is made in existing filters where averaged data and instantaneous data are fused to estimate the attitude at epoch k.

## 2. The Delay MAGYQ Attitude Estimation Filter

#### 2.1. MEMS Signals Modelling

#### 2.1.1. Magnetometer Signal Model

#### 2.1.2. Accelerometer Signal Model

#### 2.1.3. Gyroscope Signal Model

## 3. Analysis of the Influence of Past Estimates on the Orientation Estimation with Magnetometer Measurements

#### 3.1. Problem Statement

#### 3.2. Magnetic Field Based Observation Equation

## 4. Design of the Novel Attitude Estimation Filter: Delay MAGYQ

#### 4.1. State Vector

#### 4.2. Dynamic Evolution of the State Vector

#### 4.3. Dynamic Evolution of the Covariance Matrix

#### 4.4 Time Evolution of the Covariance Matrix Involving Past Orientation Estimate

_{0}. This orientation is labelled ${q}_{b{t}_{0}}^{n}$. The corresponding estimation error $\mathsf{\delta}{q}_{b{t}_{0}}^{n}$ is linked to the covariance matrix ${P}_{q,{t}_{0}}$. To integrate the time correlation of orientation estimates, the covariance matrix that relates $\mathsf{\delta}{q}_{b{t}_{0}}^{n}$ and $\mathsf{\delta}{x}_{{t}_{k}}$ must be computed. It corresponds to the correlation between past orientation estimate and the present one and is given by

#### 4.5. Update Equations

## 5. Performance Evaluation with Experimental Data

#### 5.1. Experimental Setup

^{2}, which is too small for performing pedestrian walks. Consequently the test subjects were asked to walk on a treadmill even if this may modify the human walking gait as compared to the natural gait of a pedestrian walking on a non-moving ground. Four test subjects (S1, S2, S3 and S4) participated in the experiment.

#### 5.2. Experimental Scenarios

- Texting mode: The test subjects are walking on the treadmill at a 5 km/h comfortable with handheld IMU in a fixed position as compared to the pedestrian’s center of mass. This position corresponds to a traveler that is reading navigation instructions given on the screen of the connected object. Each dataset includes 100 to 140 strides, which corresponds to approximately 120 s.
- Swinging mode: The walking speed is again set to 5 km/h but the arm is naturally oscillating during the walk. The MIMU is still carried in hand during the acquisition and its duration is the same as in the texting scenario.
- Unsupervised walking: The walking speed ranges between 1 and 1.7 m/s. MIMU data was acquired over a 13 min walk, which corresponds to a 780 m to 1.3 km range of distances. No specific instruction was given to the test subject on how to carry the handheld MIMU. He/she walks freely on the treadmill, simulating the use of a connected object that gives navigation indications. During the experiment, several object carrying modes are observed. They correspond to the outcomes of the human activity classification algorithm defined in [16]. Among them are the “Swinging” mode (natural arm oscillation), the “Texting” mode (the upper limbs are constrained), the “Phoning” mode or the Irregular mode (unclassified).

#### 5.3. Attitude Estimation Algorithms Comparison Approach for AEKF, MAGYQ and Delay MAGYQ

- Additive Extended Kalman Filter. The AEKF is a well-known algorithm that estimates the orientation with a quaternion parameterization in its additive form [17]. It assumes that the tri-axis magnetometer measures the Earth magnetic field. This hypothesis is common in most of existing algorithms [18,19].
- Magnetic, Acceleration Fields and Gyroscope Quaternion (MAGYQ) Based Attitude Estimation. This processing exploits steady magnetic field, even perturbed by artificial sources, to estimate the orientation angles. The reference field is not anymore the Earth field but the magnetometer vector measured at the beginning of the quasi static field period. Magnetic angular rates are then derived. Furthermore this algorithm proposes a gyroscope error modelling directly in the quaternion space to reduce linearization errors [5].
- Delay MAGYQ that is proposed in this paper and consider the correlation between the orientation estimate at the beginning of the quasi static magnetic field period and the orientation estimate at the epoch of the filter’s calculation.

- The
**convergence**, which is used to assess the filter’s ability to correctly estimate the state parameters. - The
**convergence****speed,**which completes the convergence criteria by including the time needed to achieve the convergence. - The
**stability**for assessing the filter’s ability to continue to correctly estimate the state parameters once the convergence is achieved.

^{1/2}).

#### 5.4. Experimental Results

#### 5.4.1. Texting Scenario

#### 5.4.2. Swinging Scenario

#### 5.4.3. Unsupervised Walking Scenario

_{0}, which assumes that the magnetometer measures the Earth magnetic field, is not valid and the orientation gets biased.

_{0}is not required to process the raw inertial signals and magnetometer measurements. Consequently, better yaw estimates are obtained thanks to the magnetically derived angular rates with a reference magnetic field that is closer to the reality, i.e., the field at the beginning of the quasi static period. Furthermore the use of magnetic field gradients, when the local field is steady, enables continuous calibration of the gyroscope errors.

## 6. Conclusions

**t**er’s estimates. These mean errors are computed for the entire data collection. The same standard deviation, ranging from 7.7° to 8°, is associated to the error on the yaw angle for all three filters. Another finding is that the linear acceleration sensed by the MIMU perturbs the orientation estimation for all filters. Globally, Delay-MAGYQ is found to be more robust thanks to an improved processing of errors at past epochs for the orientation estimates.

## 7. Perspectives

## Acknowledgments

## Author Contributions

## Conflicts of Interest

## References

- Renaudin, V.; Afzal, M.H.; Lachapelle, G. Magnetic perturbations detection and heading estimation using magnetometers. J. Locat. Based Serv.
**2012**, 6, 161–185. [Google Scholar] [CrossRef] - Haverinen, J.; Kemppainen, A. Global indoor self-localization based on the ambient magnetic field. Robot. Auton. Syst.
**2009**, 57, 1028–1035. [Google Scholar] [CrossRef] - Vissiere, D. Guidance, Navigation and Control Solutions for Unmanned Heterogeneous Vehicles in a Collaborative Mission. Ph.D. Thesis, Ecole des Mines de Paris, Paris, France, 2008. [Google Scholar]
- Afzal, M.H.; Renaudin, V.; Lachapelle, G. Use of earth’s magnetic field for mitigating gyroscope errors regardless of magnetic perturbation. Sensors
**2011**, 11, 11390–11414. [Google Scholar] [CrossRef] [PubMed] - Renaudin, V.; Combettes, C. Magnetic, acceleration fields and gyroscope quaternion (MAGYQ) based attitude estimation with smartphone sensors for indoor pedestrian navigation. Sensors
**2014**, 14, 22864–22890. [Google Scholar] [CrossRef] [PubMed] - Bergamini, E.; Ligorio, G.; Summa, A.; Vannozzi, G.; Cappozzo, A.; Sabatini, A. Estimating orientation using magnetic and inertial sensors and different sensor fusion approaches: Accuracy assessment in manual and locomotion tasks. Sensors
**2014**, 14, 18625. [Google Scholar] [CrossRef] [PubMed] - Michel, T.; Fourati, H.; Geneves, P.; Layaida, N. A comparative analysis of attitude estimation for pedestrian navigation with smartphones. In Proceedings of the 2015 International Conference on Indoor Positioning and Indoor Navigation (IPIN), Banff, AB, Canada, 13–16 October 2015; pp. 1–10.
- Berman, Z. Inertial sensors: Further developments in low-cost calibration and testing. In Proceedings of the ION/IEEE Position Location and System (PLANS), Myrtle Beach, SC, USA, 24–26 April 2012; pp. 837–848.
- Renaudin, V.; Afzal, M.H.; Lachapelle, G. Complete triaxis magnetometer calibration in the magnetic domain. J. Sens.
**2010**, 2010, 967254. [Google Scholar] [CrossRef] - Roumeliotis, S.I.; Burdick, J.W. Stochastic cloning: A generalized framework for processing relative state measurements. In Proceedings of the IEEE International Conference on Robotics and Automation (ICRA ′02), Washington, DC, USA, 11–15 May 2002; pp. 1788–1795.
- Kwakernaak, H. Optimal filtering in linear systems with time delays. IEEE Trans. Autom. Control
**1967**, 12, 169–173. [Google Scholar] [CrossRef] - Lu, X.; Zhang, H.S.; Wang, W.; Teo, K.-L. Kalman filtering for multiple time-delay systems. Automatica
**2005**, 41, 1455–1461. [Google Scholar] [CrossRef] - Analog Device. Tactical Grade Ten Degrees of Freedom Inertial Sensor, ADIS16488. Available online: http://www.analog.com/static/imported-files/data_sheets/ADIS16488.pdf (accessed on 26 April 2016).
- VectorNav. Vectornav VN-300 Dual Antenna GPS/INS. Available online: http://www.vectornav.com/docs/default-source/documentation/vn-300-documentation/PB-12-0004.pdf?sfvrsn=24 (accessed on 1 April 2016).
- Advanced Realtime Tracking. Available online: http://www.ar-tracking.com/technology/optical-tracking/ (accessed on 15 January 2016).
- Susi, M.; Renaudin, V.; Lachapelle, G. Motion mode recognition and step detection algorithms for mobile phone users. Sensors
**2013**, 13, 1539–1562. [Google Scholar] [CrossRef] [PubMed] - Bar-Itzhack, Y.; Oshman, Y. Attitude determination from vector observations: Quaternion estimation. IEEE Trans. Aerosp. Electron. Syst.
**1985**, 21, 128–136. [Google Scholar] [CrossRef] - Marins, J.L.; Yun, X.; Bachmann, E.R.; McGhee, R.B.; Zyda, M.J. An extended kalman filter for quaternion-based orientation estimation using marg sensors. In Proceedings of the International Conference on Intelligent Robots and Systems, Maui, HI, USA, 29 October–3 November 2001; pp. 2003–2011.
- Hamel, T.; Mahony, R. Attitude estimation on SO[3] based on direct inertial measurements. In Proceedings of the IEEE International Conference on Robotics and Automation, Orlando, FL, USA, 15–19 May 2006; pp. 2170–2175.

**Figure 1.**Estimation of the azimuth angle using the Earth’s magnetic field measurement ${y}_{m}$ and the declination angle between the True North and the horizontal component.

**Figure 2.**(

**a**) Motion capture room equipped with the ART IR tracking system, the treadmill and the test subject holding the MIMU in hand. (

**b**) An ART MoCap targets tree is rigidly fixed to the handheld MIMU.

**Figure 6.**Difference between two magnetic field vectors, i.e., the Earth field and the MIMU’s local field, for the subject S1 in the texting scenario.

**Figure 7.**Norm of the accelerations for subject S1 in the texting (red) and swinging (blue) scenarios.

**Figure 8.**Difference between two magnetic field vectors, i.e., the Earth field and the MIMU’s field, for subject S4 in the swinging scenario.

**Figure 9.**Error on the yaw angle estimates for the three attitude estimation filters: AEKF (bleu), MAGYQ (red) and Delay MAGYQ (green).

**Figure 10.**Norm of the residual errors ($K\mathsf{\delta}z$) on the quaternion orientation estimated with MAGYQ (red) and Delay-MAGYQ (green).

**Table 1.**Angular errors of AEKF, MAGYQ and Delay MAGYQ attitude estimation filters for the texting scenario with all four subjects.

Algorithms | AEKF | MAGYQ | Delay MAGYQ | |||
---|---|---|---|---|---|---|

Mean/standard deviation | μ | σ | μ | σ | μ | σ |

Roll (°) | 0.6 | 0.5 | 1.8 | 1.1 | 1.0 | 0.9 |

Pitch (°) | 1.8 | 0.6 | 2.7 | 1.8 | 1.6 | 1.3 |

Yaw (°) | 6.7 | 4.7 | 6.5 | 4.4 | 6.2 | 4.7 |

**Table 2.**Angular errors of AEKF, MAGYQ and Delay MAGYQ attitude estimation filters for the swinging scenario with all four subjects.

Algorithms | AEKF | MAGYQ | Delay MAGYQ | |||
---|---|---|---|---|---|---|

Mean/standard deviation | μ | σ | μ | σ | μ | σ |

Roll (°) | 5.3 | 14.0 | 5.0 | 12.0 | 3.2 | 5.3 |

Pitch (°) | 3.8 | 6.0 | 3.8 | 5.0 | 4.1 | 5.1 |

Yaw (°) | 24.4 | 10.6 | 21.3 | 9.3 | 19.0 | 8.6 |

Algorithms | AEKF | MAGYQ | Delay MAGYQ | |||
---|---|---|---|---|---|---|

Mean/standard deviation | μ | σ | μ | σ | Μ | σ |

Roll (°) | 5.8 | 7.4 | 6.0 | 8.8 | 5.0 | 8.5 |

Pitch (°) | 2.0 | 2.6 | 3.9 | 4.2 | 3.3 | 3.3 |

Yaw (°) | 18.1 | 8.6 | 11.3 | 10.2 | 8.2 | 9.8 |

© 2016 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC-BY) license ( http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Combettes, C.; Renaudin, V.
Delay Kalman Filter to Estimate the Attitude of a Mobile Object with Indoor Magnetic Field Gradients. *Micromachines* **2016**, *7*, 79.
https://doi.org/10.3390/mi7050079

**AMA Style**

Combettes C, Renaudin V.
Delay Kalman Filter to Estimate the Attitude of a Mobile Object with Indoor Magnetic Field Gradients. *Micromachines*. 2016; 7(5):79.
https://doi.org/10.3390/mi7050079

**Chicago/Turabian Style**

Combettes, Christophe, and Valérie Renaudin.
2016. "Delay Kalman Filter to Estimate the Attitude of a Mobile Object with Indoor Magnetic Field Gradients" *Micromachines* 7, no. 5: 79.
https://doi.org/10.3390/mi7050079