### Inhalt des Dokuments

# Orientation Estimation for Inertial Sensors in Disturbed Magnetic Fields

### From Fachgebiet Regelungssysteme TU Berlin

### Abstract

In this project, we consider the standard sensor fusion problem in IMU orientation estimation and highlight the malicious effects that inhomogeneous magnetic fields, which are often found in indoor environments, can have on the inclination portions (roll and pitch) of the orientation estimate. To address this challenge, we develop new methods that use an analytical solution of the sensor fusion problem and purely horizontal magnetometer-based corrections. The methods assure that magnetic field measurements affect only the heading (yaw) component of the orientation estimate. Furthermore, we parametrize our algorithms such that the user can choose the time constant and aggressiveness with which the algorithms balance between gyroscope drift compensation and rejection of disturbances caused by inhomogeneous magnetic fields or by velocity changes.

### People involved

- Thomas Seel
- Moritz Apel
- Stefan Ruppin

## Description

In the following, a brief description of the developed methods and recent results of the project is provided.

IMU orientation estimation is typically performed by employing a sensor fusion scheme in one variation or another. The short-term accuracy of the gyroscope-based strapdown integration is combined with the long-term accuracy of the orientation information gained from accelerometer and magnetometer readings. The large number of sensor fusion algorithms that have been proposed for IMU orientation estimation differ mainly by the mathematical framework they use and by the filter they employ for combining the measurement signals.

### Magnetometer-Based Corrections

Most fusion filters allow the user to specify weights or covariance matrices that influence the balance between prediction and correction. But comparatively little attention has been given to the question in which way the sensor fusion should rely on each of the raw measurement signals. Recent research has demonstrated that magnetometers are hardly reliable in many indoor environments. Therefore, magnetometer readings should be used only for the purpose for which they are essential, i.e. to remove drift in the azimuth part of the orientation, and should not influence the inclination part of the orientation.

To this end, we propose an analytical solution for the sensor fusion problem and a horizontal projection of the magnetometer readings. Figure 2 illustrates the major difference between conventional magnetometer-based corrections and the proposed horizontal-projection method. We demonstrate that this approach leaves the inclination portion of the orientation estimate unchanged. Precisely, we consider the following simple scenario:

- The local sensor coordinate system and the fixed reference frame coincide as the sensor rests for a very long period of time.
- During that period of time, the measured acceleration is perfectly vertical and the projection of the measured magnetic field vector into the horizontal plane points perfectly into positive x-direction of both coordinate systems.
- Then the magnetic field vector is disturbed such that its magnitude and its z-component remain unchanged but the x- and y-component (precisely the magnetic field heading) take new constant values.
- Consider a weak and a strong disturbance, during which the heading of the magnetic field changes by 50° and by approximately 180° respectively.

Figure 3 shows exemplary results of both methods for the described magnetic disturbance scenario. The roll angle estimate of the conventional algorithm is affected by 4°. Moreover, for the strong disturbance described in the scenario above, the pitch angle is heavily disturbed from the very first seconds. Even if the considered magnetic disturbance would last only a few seconds, the accuracy of the pitch angle estimate would still be severely deteriorated. As postulated, the proposed novel algorithm exhibits none of this undesirable behavior. Regardless of the disturbance magnitude, the yaw angle converges smoothly with the same time constant, and the pitch and roll angle estimates remain unaffected.

### Intuitive Algorithm Parametrization

Another important aspect is parametrization. The vast majority of methods proposed in the literature contain tuning parameters, ranging from complementary filter weight to noise covariance in Kalman filter implementations. Interpretation of these parameters is often as difficult as assigning reasonable values to them. Moreover, in many cases, a change in the sampling frequency results in a need to adjust the filter weights. For the present algorithm, we propose a parametrization that allows the user to choose a time scale and a level of aggressiveness for the correction. For example, assume that the sensor is at rest but that a disagreement is observed between the prediction and the accelerometer readings. Then we would like to set the time constant tau at which the orientation estimate converges to the orientation defined by the accelerometer readings. This is illustrated in Figure 4.

Due to the described advantages, the proposed algorithms can be used in outdoor AND indoor environments. If (at least the heading of) the magnetic field is homogeneous, then the entire orientation estimate will be highly accurate. If the magnetic field is heavily disturbed, only the yaw portion of the orientation estimate will be affected. Since the algorithm parameters are designed to correlate directly with important features of the sensor fusion, they are easily adjusted to the individual circumstances.

As a consequence of the discussed arguments, we consider the new methods highly suitable for many applications of inertial sensors including human motion analysis in biomedical or sports context. Our current and future work is concerned with dynamic adaptation of the fusion weights, optimization of the computational load, and with validation against optical motion capture systems.

Detailed explanations and further results can be found in the references below.

## Related Publications

- T. Seel, S. Ruppin.
**Eliminating the Effect of Magnetic Disturbances on the Inclination Estimates of Inertial Sensors**. In*Proc. of 20th IFAC World Congress (to appear in IFAC-PapersOnLine)*, pages 1–6, Toulouse, France, 2017. - Bibtex
**Author :**T. Seel, S. Ruppin**Title :**Eliminating the Effect of Magnetic Disturbances on the Inclination Estimates of Inertial Sensors**In :**In*Proc. of 20th IFAC World Congress (to appear in IFAC-PapersOnLine)*,**Date :**2017

- D. Laidig, T. Schauer, T. Seel.
**Exploiting Kinematic Constraints to Compensate Magnetic Disturbances when Calculating Joint Angles of Approximate Hinge Joints from Orientation Estimates of Inertial Sensors**. In*Proc. of 15th IEEE Conference on Rehabilitation Robotics (ICORR)*, pages 1–6, Toulouse, France, 2017. - Bibtex
**Author :**D. Laidig, T. Schauer, T. Seel**Title :**Exploiting Kinematic Constraints to Compensate Magnetic Disturbances when Calculating Joint Angles of Approximate Hinge Joints from Orientation Estimates of Inertial Sensors**In :**In*Proc. of 15th IEEE Conference on Rehabilitation Robotics (ICORR)*,**Date :**2017

- D. Laidig, P. Müller, T. Seel.
**Automatic Anatomical Calibration for IMU-based Elbow Angle Measurement in Disturbed Magnetic Fields**. In*Proc. of 51st Annual Meeting of the German Society for Biomedical Engineering*, pages 1–4, Dresden, Germany, 2017. - Bibtex
**Author :**D. Laidig, P. Müller, T. Seel**Title :**Automatic Anatomical Calibration for IMU-based Elbow Angle Measurement in Disturbed Magnetic Fields**In :**In*Proc. of 51st Annual Meeting of the German Society for Biomedical Engineering*,**Date :**2017

- M. Valtin, C. Salchow, T. Seel, D. Laidig, T. Schauer.
**Modular finger and hand motion capturing system based on inertial and magnetic sensors**.*Current Directions in Biomedical Engineering*, 3 (1):19–23, 2017. - Bibtex| PDF | DOI | Link
**Author :**M. Valtin, C. Salchow, T. Seel, D. Laidig, T. Schauer**Title :**Modular finger and hand motion capturing system based on inertial and magnetic sensors**In :***Current Directions in Biomedical Engineering*,**Date :**2017