Main Content

Choose Inertial Sensor Fusion Filters

The toolbox provides multiple filters to estimate the pose and velocity of platforms by using on-board 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/s2. 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 error-state 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 built-in 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 built-in or custom motion models and sensor models. For more details, see Fuse Inertial Sensor Data Using insEKF-Based Flexible Fusion Framework.

Object Sensors and InputsStates and Outputs Assumptions or Limitations Algorithm UsedTunable
ecompass
  • Accelerometer

  • Magnetometer

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

  • Gyroscope

  • Magnetometer

Orientation and angular velocity The filter assumes no sustained linear and angular acceleration other than gravitational acceleration.

Error-state Kalman filter

Yes
ahrs10filter
  • Accelerometer

  • Gyroscope

  • Magnetometer

  • Altimeter

Orientation, altitude, vertical velocity, delta angle bias, delta velocity bias, geomagnetic field vector, magnetometer biasThe 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 filterYes
imufilter
  • Accelerometer

  • Gyroscope

Orientation and angular velocity The filter assumes no sustained linear and angular acceleration other than gravitational acceleration.Error-state Kalman filter Yes
complementaryFilter
  • Accelerometer

  • Gyroscope

  • Magnetometer(optional)

Orientation and angular velocity The filter assumes no sustained linear and angular acceleration other than gravitational acceleration.

Non-Kalman filter based approach:

  • Use high and low pass filters to reduce noise in various sensor readings.

  • Fuse the filtered sensor readings based on their assigned weights.

No
insfilterMARG
  • Accelerometer

  • Gyroscope

  • Magnetometer

  • GPS

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:

  • Piecewise constant linear acceleration.

  • Piecewise constant angular velocity.

  • Accelerometer and gyroscope run at the same rate with no sample dropping.

Discrete extended Kalman filterYes
insfilterAsync
  • Accelerometer

  • Gyroscope

  • Magnetometer

  • GPS

Orientation, angular velocity, position, velocity, acceleration, accelerometer bias, gyroscope bias, geomagnetic field vector, magnetometer bias

The filter assumes:

  • Constant angular velocity

  • Constant acceleration

The filter does not require the sensors to be synchronous and each sensor can have sample dropping.

Continuous discrete extended Kalman FilterYes
insfilterNonholonomic
  • Accelerometer

  • Gyroscope

  • GPS

Orientation, position, velocity, gyroscope bias, accelerometer bias

The prediction step takes the accelerometer and gyroscope inputs. Therefore, the filter assumes:

  • Piece-wise constant linear acceleration.

  • Piece-wise constant angular velocity.

  • Accelerometer and gyroscope run at the same rate with no sample dropping.

Also, the filter assumes the platform moves forward without side slip.

Discrete extended Kalman FilterYes
insfilterErrorState
  • Accelerometer

  • Gyroscope

  • Magnetometer

  • GPS

  • Visual odometry scale

Orientation, position, velocity, gyroscope bias, accelerometer bias, and visual odometry scale

The prediction step takes the accelerometer and gyroscope inputs. Therefore, the filter assumes:

  • Piece-wise constant linear acceleration.

  • Piece-wise constant angular velocity.

  • Accelerometer and gyroscope run at the same rate with no sample dropping.

Error-state Kalman filter

Yes

See Also