Problem at +/- 180 degrees in orientation estimation from IMU data

9 vues (au cours des 30 derniers jours)
Gian-Luca Gubler
Gian-Luca Gubler le 20 Nov 2020
I'm analyzing IMU data from a head-mounted sensor to estimate the orientation. Below is the code that shows how I'm doing this:
%Load data
filename = 'id12_task4.csv';
data = readtable(filename);
%Convert tables to arrays
Acceleration = table2array(data(:,2:4));
AngularVelocity = table2array(data(:,8:10));
%Convert degrees to radians
AngularVelocity = deg2rad(AngularVelocity);
%Create imu filter object
decim = 1;
fuse = imufilter('SampleRate', 250,'DecimationFactor', decim);
%Fuse sensors
q = fuse(Acceleration,AngularVelocity);
%Compute time intervals based on sampling rate (here = 250Hz)
time = (0:decim:size(Acceleration,1)-1)/250;
%Get orientation estimation values for yaw
e = eulerd(q,'ZYX','frame');
ez = e(:,1);
%Plot orientation estimation as a function of time
plot(time, ez);
title('Orientation Estimate');
xlabel('Time (s)');
ylabel('Rotation (degrees)');
As a next step, I identify the peaks in the signal to compute the number of head turns and the accumulated change in orientation across peaks.
The obvious problem with this method is that an angle > 180 degrees will be defined as a negative angle, creating "movements" in the signal where there shouldn't be any, if this signal were to reflect the true head movements.
How can I deal with this problem to get an accurate estimation of the number of head turns and the accumulated change in orientation across peaks?

Réponse acceptée

James Tursa
James Tursa le 20 Nov 2020

Plus de réponses (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by