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

10 ビュー (過去 30 日間)
Gian-Luca Gubler
Gian-Luca Gubler 2020 年 11 月 20 日
コメント済み: Gian-Luca Gubler 2020 年 11 月 20 日
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?

採用された回答

James Tursa
James Tursa 2020 年 11 月 20 日
  1 件のコメント
Gian-Luca Gubler
Gian-Luca Gubler 2020 年 11 月 20 日
Exactly what I was looking for. Thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by