Accelerometer bias and Gyroscope bias convergence

29 views (last 30 days)
The EKF implementation sythetic Data example for Visual-Inertial Odometry
In matlab 2018 and matlab 2020 the F matrix and G matrix produces the same results.
In model we consider and for accelerometer bias and gyroscope bias
The Kalman filter should converge to a constant bias after some time and stay constant for the rest of the trajectory. The estimated position, velocity and attitude are very good.
I couldnot explain why the gyroscope bias converges always and accelerometer bias doesnot achieve a constant value? can someone share views for a possible explaination?

Answers (1)

Ryan Salvo
Ryan Salvo on 17 Nov 2020
Hi Ravindra,
I'm not sure if you're looking at the R2020a or R2020b example, but for R2020b, you are seeing the accelerometer bias vary with each update since the initial state covariance is set to a low value. On the other hand, the gyroscope bias varies widely at the beginning of the trajectory since the state covariance is set to a large value.
Look at the helperInitialize function in the R2020b version of the example and you should see the following code:
% Set the gyroscope bias and visual odometry scale factor covariance to
% large values corresponding to low confidence.
filt.StateCovariance(10:12,10:12) = 1e6;
filt.StateCovariance(end) = 2e2;
You can add the following line to set the accelerometer bias covariance to obtain a plot similar to the one you have for the gyroscope bias:
% Set the accelerometer bias covariance to a large value corresponding to low confidence.
filt.StateCovariance(13:15,13:15) = 1e6;
  1 Comment
Ryan Salvo
Ryan Salvo on 19 Nov 2020
Hi Ravindra,
For the same accelerometer bias values in multiple runs, the bias state is only updated during the update phase of the filter, which has the same inputs for both versions of the example. The predict phase of the filter only keeps the bias constant while increasing the state covariance, see the Algorithms section of the insfilterErrorState.
For the NoiseDensity and ConstantBias parameters. The model used in the insfilterErrorState to track the sensor measurements and biases is different than the noise generation model in the imuSensor. You may need to change the AccelerometerNoise and AccelerometerBiasNoise when the NoiseDensity and ConstantBias values are changed, but the amount depends on the input trajectory and your error tolerance. This example section has a good explanation for some of the orientation filters, but can be applicable to the pose estimation filters as well.
Note that in R2020b, some of the insfilter objects have a tune object function that takes ground truth and sensor data and automatically tunes the filter parameters to reduce the estimation error.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!