Orientation estimation algorithms with 9D IMU

Loading...
Thumbnail Image

Files

URL

Journal Title

Journal ISSN

Volume Title

Sähkötekniikan korkeakoulu | Bachelor's thesis
Electronic archive copy is available locally at the Harald Herlin Learning Centre. The staff of Aalto University has access to the electronic bachelor's theses by logging into Aaltodoc with their personal Aalto user ID. Read more about the availability of the bachelor's theses.

Department

Mcode

ELEC3014

Language

en

Pages

27

Series

Abstract

The objective of this Bachelor’s thesis was to research, how the 9D IMU (inertial measurement unit) sensors are utilized in orientation estimation and to compare different fusion algorithms. The study also covers the differences between 9D and 6D IMUs. 9D IMU consists of 3 micro-electromechanical systems, which are an gyroscope, an accelerometer and an magnetometer. "9D" refers to the nine degrees of measurement, provided by the three independent sensors. These 3 axes are x (roll), y (pitch) and z (yaw). The thesis focuses on the working principles of the sensors and the fusion algorithms, which utilize the measured data. A gyroscope measures the angular velocity of each axis, the data can be integrated as a function of time. When the gyroscope experiences movement the inner structures vibrate. From the vibrational energy it is possible to calculate the angular velocity. From the velocity the new orientation can be integrated in relation to time. An accelerometer measures roll- and pitch-angle changes by means of the gravity while the sensor is stationary. A magnetometer measures only the yaw-angle by detecting the strength and direction of the Earth’s magnetic field. 9D IMU differ from a 6D IMU by the addition of a magnetometer. 6D IMU is able to estimate roll- and pitch-angles with an gyroscope and an accelerometer. However, the 6D IMU is unable to directly measure yaw-angle as it is missing a magnetometer. A gyroscope provides rotational data of the yaw-angle, but the measurement accumulates drift due to the sensor bias and noise. This leads to inaccurate orientation readings through time. To combine the three sensors, sensor fusion algorithms are required. This study compared three popular sensor fusion algorithms, which are the Extended Kalman filter (EKF), the Madqwick filter and the Mahony filter. The EKF is an extension of the Kalman Filter for non-linear systems. EKF takes into account the uncertainties of the model and measurements. Madqwick filter is an optimizing fusion algorithm, which combines the data from each IMU sensor to estimate the orientation in quaternion format. Mahony filter is based on a PI controller, which reduces drift from the gyroscope by utilizing the measured data from an accelerometer and magnetometer. During the comparison it was found that the Mahony filter is the computationally lightest filter from the three filters. The EKF was found to be the heaviest and slowest. Regarding the memory usage and coding complexity Mahony’s and Madqwicks’s filters were light, while the EKF’s code was larger and more complex. The most 4 precice and accurate filter was EKF and Mahony’s and Madqwick’s filter were nearly equal. To conclude, when the objective is to achieve maximal orientation accuracy, it is recommended to use the EKF. In cases where the highest possible accuracy is not required, it is better to use Mahony’s filter for it’s light implementation. When 3D orientation estimation is required a 9D IMU is optimal, otherwise a 6D IMU is sufficient.

Kandidaatintyön tavoitteena oli tutkia, miten 9D inertiaalimittausyksikön (inertial-measurement-unit, IMU) sensoreita käytetään asennon estimoinnissa ja vertailla eri sensorifuusioalgoritmeja. Työssä käsitellään myös 6D ja 9D IMUjen eroja. 9D IMU koostuu kolmesta mikrosysteemisensorista, jotka ovat gyroskooppi, kiihtyvyysanturi ja magnetometri. “9D” viittaa IMUn antamaan kolmen akselin dataan jokaisesta sensorista. Nämä kolme akselia ovat x (roll), y (pitch) ja z (yaw). Työ keskittyy sensoreiden toimintaperiaatteisiin ja fuusioalgoritmeihin, joilla sensoreiden ulostulodataa voidaan hyödyntää asennon estimoinnissa. Gyroskooppi mittaa jokaisen akselin kulmanopeuden ja sen avulla voidaan integroida kulman muutos ajan funktiona. Liikuttaessa gyroskooppia sen sisällä olevat rakenteet tärähtelevät. Tämän tärähtelyn energiasta voidaan laskea kulmanopeus, josta voidaan integroida ajan suhteen uusi asento orientaatio. Kiihtyvyysanturi mittaa roll- ja pitch-kulmien muutoksia painovoiman aiheuttamien liikkeiden perusteella sensorin ollessa paikallaan. Magnetometri mittaa vain yaw-kulmaa mittaamalla maapallon magneettikentän voimakkuutta ja suuntaa. 9D IMU eroaa 6D IMUsta magnetometrin lisäämisellä. 6D IMU pystyy estimoimaan roll- ja pitch-kulmia gyroskoopin ja kiihtyvyysanturin avulla, mutta 6D IMU ei pysty suoraan mittaamaan yaw-kulmaa magnetometrin puuttumisen vuoksi. Gyroskooppi antaa kierrosnopeus dataa yaw kulmasta. Gyroskoopin mittaama yaw-data kerää driftiä, joka johtuu sensorin harhasta ja kohinasta. Tästä johtuen yaw-kulman estimointi muuttuu ajan kanssa epätarkaksi. Kolmen sensorin yhdistämiseksi tarvitaan sensorifuusioalgoritmeja, jotta sensorien ulostulo dataa voidaan hyödyntää. Työssä vertailtiin kolmea suosittua fuusioalgoritmia, jotka ovat Extended Kalman suodatin (EKF), Madqwick suodatin ja Mahony suodatin. EKF on Kalman-suodattimen laajennus epälineaarisiin järjestelmiin, joka huomioi mallin ja mittausten epävarmuudet. Madqwick suodatin on optimoiva fuusioalgoritmi, joka yhdistää IMU sensoreiden tiedot arvioidakseen asennon kvaternion muodossa. Mahony filter käyttää PI säädintä korjaamaan gyroskoopin driftiä kiihtyvyys- ja magnetometri datan avulla. Fuusioalgoritmi vertailussa kävi ilmi, että Mahony-suodatin on laskennallisesti kevyin näistä kolmesta suodattimesta, kun taas EKF raskain ja hitain. Muistin käytön ja ohjelmoinnin kompleksisuuden suhteen Mahony ja Madgwick olivat kevyitä, kun taas EKF on suurempi ja monimutkaisempi toteuttaa. Tarkin suodatin oli EKF; Mahony ja Madgwick olivat suurin piirtein yhtä tarkkoja. Johtopäätöksenä on, että mikäli estimoinnissa halutaan mahdollisimman tarkkoja arvioita asennosta, on suositeltavaa käyttää Extended Kalman suodatinta. Tapauksissa, joissa maksimaalista tarkkuutta ei vaadita Mahony on optimaalisempi kevyen laskennan vuoksi. Mikäli tarvitaan 3D orientaation estimointia, 9D IMU on tarpeellinen. Muissa tapauksissa 6D IMU riittävä.

Description

Supervisor

Forsman, Pekka

Thesis advisor

Forsman, Pekka

Other note

Citation