Choose Inertial Sensor Fusion Filters
The toolbox provides multiple filters to estimate the pose and velocity of platforms by using onboard inertial sensors (including accelerometer, gyroscope, and altimeter), magnetometer, GPS, and visual odometry measurements. Each filter can process certain types of measurements from certain sensors. Each filter also makes assumptions and may have limitations that you should consider carefully before applying it. For example, many filters assume no sustained linear or angular acceleration other than the gravitational acceleration of 9.81m/s^{2}. Therefore, you should avoid using them during strong and constant acceleration, but these filters can perform reasonably well during short linear acceleration bursts. Also, some filters allow piecewise constant linear acceleration and angular velocity since they allow acceleration and angular velocity inputs during the prediction step.
The internal algorithms of these filters also vary greatly. For example, the ecompass
object uses the TRIAD method to determine the orientation of the
platform with very low computation cost. Many filters (such as ahrsfilter
and imufilter
) adopt the errorstate Kalman filter, in which the state deviation
from the reference state is estimated. Meanwhile, other filters (such as insfilterMARG
and insfilterAsync
) use the extended Kalman filter approach, in which the state is
estimated directly.
To achieve high estimation accuracy, it is important to tune the filter properties and
parameters properly. The toolbox offers the builtin tune
function to
tune parameters and sensor noise for most of the inertial sensor filters (marked as tunable
in the table below).
The table lists the inputs, outputs, assumptions, and algorithms for all the configured inertial sensor fusion filters.
Tip
Other than the filters listed in this table, you can use the insEKF
object to build a flexible inertial sensor fusion framework, in
which you can use builtin or custom motion models and sensor models. For more details,
see Fuse Inertial Sensor Data Using insEKFBased Flexible Fusion Framework.
Object  Sensors and Inputs  States and Outputs  Assumptions or Limitations  Algorithm Used  Tunable 

ecompass

 Orientation  The filter assumes no sustained linear and angular acceleration other than gravitational acceleration.  TRIAD method  No 
ahrsfilter

 Orientation and angular velocity  The filter assumes no sustained linear and angular acceleration other than gravitational acceleration.  Errorstate Kalman filter  Yes 
ahrs10filter 
 Orientation, altitude, vertical velocity, delta angle bias, delta velocity bias, geomagnetic field vector, magnetometer bias  The filter assumes piecewise constant linear acceleration in the vertical direction, and no sustained linear and angular acceleration other than gravitational acceleration in other directions.  Discrete extended Kalman filter  Yes 
imufilter

 Orientation and angular velocity  The filter assumes no sustained linear and angular acceleration other than gravitational acceleration.  Errorstate Kalman filter  Yes 
complementaryFilter 
 Orientation and angular velocity  The filter assumes no sustained linear and angular acceleration other than gravitational acceleration.  NonKalman filter based approach:
 No 
insfilterMARG

 Orientation, position, velocity, delta angle bias, delta velocity bias, geomagnetic field vector, magnetometer bias  The prediction step takes the accelerometer and gyroscope inputs. Therefore, the filter assumes:
 Discrete extended Kalman filter  Yes 
insfilterAsync

 Orientation, angular velocity, position, velocity, acceleration, accelerometer bias, gyroscope bias, geomagnetic field vector, magnetometer bias  The filter assumes:
The filter does not require the sensors to be synchronous and each sensor can have sample dropping.  Continuous discrete extended Kalman Filter  Yes 
insfilterNonholonomic 
 Orientation, position, velocity, gyroscope bias, accelerometer bias  The prediction step takes the accelerometer and gyroscope inputs. Therefore, the filter assumes:
Also, the filter assumes the platform moves forward without side slip.  Discrete extended Kalman Filter  Yes 
insfilterErrorState 
 Orientation, position, velocity, gyroscope bias, accelerometer bias, and visual odometry scale  The prediction step takes the accelerometer and gyroscope inputs. Therefore, the filter assumes:
 Errorstate Kalman filter  Yes 