How do I resolve a pose-dependent noisy response during IMU sensor fusion with imufilter?

7 views (last 30 days)
Hi, I'm using imufilter to fuse accelerometer and gyroscope data. I previously was having issues with drift so I decided to use the envelope of the gyroscope signal to reset the filter (fuse) when the gyroscope measurement was low. This works fairly well, but now I sometimes get sections of the output orientation signal that show lots of noise. This noise affects all the sensors for the same section of signal (I have recordings from 9 sensors), EDIT: It seems to happen when the accelerometer values are around (9.8, 0, 0), so when one particular axis is aligned with gravity
Here is the code I have been using (I have played round with it but this is basically what I did):
figure,
for n = 1:9
reset(fuse);
[gyro_env_upper,gyro_env_lower] = envelope(IMU(n).gyro,100,'rms');
gyro_env_upper = gyro_env_upper - mean(gyro_env_upper(1:50,:));
gyro_env_lower = gyro_env_lower - mean(gyro_env_lower(1:50,:));
for m = 1:length(IMU(n).gyro)
if ((abs(gyro_env_upper(m,:))<0.002) & (abs(gyro_env_lower(m,:))<0.002))
reset(fuse)
end
q(m,:) = fuse(IMU(n).acc(m,:),IMU(n).gyro(m,:));
end
axang = quat2axang(q);
plot(axang(:,4))
hold on
end
fuse is a declaration of an imufilter, IMU(n).acc and IMU(n).gyro are sets of raw data I have saved in a struct
Here is an example where the noise is present for all 9 sensors at the beginning of the recording only (this is the axis-angle convention, but the noise also affects the quaternion convention)

Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!