Problem at +/- 180 degrees in orientation estimation from IMU data
이전 댓글 표시
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?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Correlation and Convolution에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!