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. 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 (Sensor Fusion and Tracking Toolbox) function to tune parameters and sensor noise for the imufilter, ahrsfilter, and insfilterAsync directly.

The table lists the inputs, outputs, assumptions, and algorithms for all the inertial sensor fusion filters.

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

  • Magnetometer

Orientation The filter assumes no sustained linear and angular acceleration other than gravitational acceleration.TRIAD method
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

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 filter
imufilter
  • Accelerometer

  • Gyroscope

Orientation and angular velocity The filter assumes no sustained linear and angular acceleration other than gravitational acceleration.Error-state Kalman filter
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.

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 filter
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 Filter
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 Filter
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

See Also