No usable results when using insEKF() instead of imufilter()

조회 수: 2 (최근 30일)
Christian
Christian 2024년 7월 14일
댓글: Christian 2024년 7월 25일
Part of what I want to do is fuse gyroscope and accelerometer data to get an orientation estimate. When I fuse the data using the imufilter() I get results looking very similar to what I am expecting, without majorly tweaking the noise settings and so on.
I then proceeded to try to fuse it using the insEKF() because I eventually also need to fuse GPS measurements. For the first part I only added the gyroscope and the accelerometer to see the orientation estimate. I coded it very similar to the example in the documentation but for some reason the estimated orientation just start spinning and jumping around "uncontrollably".
Heres part of how Ive implemented it:
I also tried tuning it using the data I got from the other filter but that not seems like the issue. Also fusing the data sequentially using fuse() didnt change anything.
...
gyrofix=[gyro(:,2) gyro(:,3) gyro(:,1)]; %data already in workspace
acclfix=[-accl(:,2) -accl(:,3) -accl(:,1)];
option = insOptions(ReferenceFrame="ENU");
insAccel=insAccelerometer;
insGyro=insGyroscope;
tt_meas=timetable(acclfix,gyrofix,'RowTimes', seconds(0:0.01:(size(acclfix,1)/100)-0.01))
tt_meas.Properties.VariableNames={'Accelerometer' 'Gyroscope'}
tt_meas.Accelerometer(:,:)=0;
filt = insEKF(insAccel, insGyro, option);
initOrient=quaternion(1, 0, 0, 0);
stateparts(filt,"Orientation",compact(initOrient));
statecovparts(filt,"Orientation",0.01);
mnoise=tunernoise(filt);
mnoise.AccelerometerNoise=0.0002;
mnoise.GyroscopeNoise=9e-5;
untunedEst = estimateStates(filt,tt_meas,mnoise);
  댓글 수: 8
Paul
Paul 2024년 7월 24일
Hi Christian,
Have you made any progress on this problem, with either imufilter or insEKF, with the data posted in sensor_measurments.mat?
Christian
Christian 2024년 7월 25일
Hello,
sorry for the late anwer.
tunernoise() of the insEKF object actually doenst have any ProcessNoise or MeasurementNoise property, so that didnt fix the problem.
I ended up using the insfilterAsync which worked without major changes made to the example stated in the documentation (not feeding in any magnetometer readings). The results from this are like I expected them. Im still unsure why its not working with the insEKF though.

댓글을 달려면 로그인하십시오.

답변 (1개)

Brian Fanous
Brian Fanous 2024년 7월 16일
Christian, do you have a ground truth recorded? Meaning, do you have logged data of what you want the filter output to look like? If so, you can try the tune() method on the insEKF to optimize the noise parameters. (You'll still have to handle initializing the filter states correctly).
If you are happy with the results from the imufilter, you could use that as your ground truth orientation. Be aware though that you'll be tuning the insEKF to also match the noise in the output of the imufilter in that case.
  댓글 수: 2
Paul
Paul 2024년 7월 16일
Do you know why the properties of imufilter indicates that the units are rad, rad/sec, and m/sec^2, but the Algorithms section states the units are deg, deg/sec, and g?
Christian
Christian 2024년 7월 25일
I did try using the orientation from the imufilter to tune the insEKF which only tracks the orientation but couldnt get it to work.
Like stated in another comment I ended up using the insfilterAsync which worked without major changes made to the example stated in the documentation (not feeding in any magnetometer readings).
Thanks for your help though.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Inertial Sensor Fusion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by