insfilter

Create inertial navigation filter

Syntax

filt = insfilter
filt = insfilter(type)
filt = insfilter(Name,Value)

Description

filt = insfilter returns an inertial navigation filter object that estimates pose based on accelerometer, gyroscope, GPS, and magnetometer measurements.

example

filt = insfilter(type) returns an inertial navigation filter based on type.

example

filt = insfilter(Name,Value) returns an inertial navigation filter configured by the name-value pair arguments.

Examples

collapse all

You can specify the type of INS filter to create by specifying name-value pairs as true or false. For example, to create the default NHConstrainedIMUFuser object, specify NonholonomicHeading as true, Magnetometer as false, AsyncIMU as false, and ErrorState as false.

nhFilter = insfilter('NonholonomicHeading',true, ...
                     'Magnetometer',false, ...
                     'AsyncIMU',false, ...
                     'ErrorState',false)
nhFilter = 

  NHConstrainedIMUGPSFuser with properties:

        IMUSampleRate: 100        Hz         
    ReferenceLocation: [0 0 0]    [deg deg m]
     DecimationFactor: 2                     

   Extended Kalman Filter Values
              State: [16x1 double]     
    StateCovariance: [16x16 double]    

   Process Noise Variances
                  GyroscopeNoise: [4.8e-06 4.8e-06 4.8e-06]    (rad/s)²
              AccelerometerNoise: [0.048 0.048 0.048]          (m/s²)² 
              GyroscopeBiasNoise: [4e-14 4e-14 4e-14]          (rad/s)²
        GyroscopeBiasDecayFactor: 0.999                                
          AccelerometerBiasNoise: [4e-14 4e-14 4e-14]          (m/s²)² 
    AccelerometerBiasDecayFactor: 0.9999                               

   Measurement Noise Variances
    ZeroVelocityConstraintNoise: 0.01    (m/s)²

You can also create a filter by specifying the minimum number of nondefault parameters required. By default, AsyncIMU and ErrorState are false, so you do not need to specify them to create an NHConstrainedIMUGPSFuser.

nhFilter = insfilter('NonholonomicHeading',true, ...
                     'Magnetometer',false)
nhFilter = 

  NHConstrainedIMUGPSFuser with properties:

        IMUSampleRate: 100        Hz         
    ReferenceLocation: [0 0 0]    [deg deg m]
     DecimationFactor: 2                     

   Extended Kalman Filter Values
              State: [16x1 double]     
    StateCovariance: [16x16 double]    

   Process Noise Variances
                  GyroscopeNoise: [4.8e-06 4.8e-06 4.8e-06]    (rad/s)²
              AccelerometerNoise: [0.048 0.048 0.048]          (m/s²)² 
              GyroscopeBiasNoise: [4e-14 4e-14 4e-14]          (rad/s)²
        GyroscopeBiasDecayFactor: 0.999                                
          AccelerometerBiasNoise: [4e-14 4e-14 4e-14]          (m/s²)² 
    AccelerometerBiasDecayFactor: 0.9999                               

   Measurement Noise Variances
    ZeroVelocityConstraintNoise: 0.01    (m/s)²

You can create a specific INS filter object by specifying a string for the type argument. Create an AsyncMARGGPSFuser by calling the insfilter function with "asyncimu".

filter = insfilter("asyncimu")
filter = 
  AsyncMARGGPSFuser with properties:

    ReferenceLocation: [0 0 0]           [deg deg m]
                State: [28x1 double]                
      StateCovariance: [28x28 double]               

   Additive Process Noise Variances
           QuaternionNoise: [1x4 double]                      
      AngularVelocityNoise: [0.005 0.005 0.005]       (rad/s)²
             PositionNoise: [1e-06 1e-06 1e-06]       m²      
             VelocityNoise: [1e-06 1e-06 1e-06]       (m/s)²  
         AccelerationNoise: [50 50 50]                (m/s²)² 
        GyroscopeBiasNoise: [1e-10 1e-10 1e-10]       (rad/s)²
    AccelerometerBiasNoise: [0.0001 0.0001 0.0001]    (m/s²)² 
    GeomagneticVectorNoise: [1e-06 1e-06 1e-06]       uT²     
     MagnetometerBiasNoise: [0.1 0.1 0.1]             uT²     

To specify an ErrorStateIMUGPSFuser, call insfilter with "errorstate".

filter = insfilter("errorstate")
filter = 
  ErrorStateIMUGPSFuser with properties:

        IMUSampleRate: 100               Hz         
    ReferenceLocation: [0 0 0]           [deg deg m]
                State: [17x1 double]                
      StateCovariance: [16x16 double]               

   Process Noise Variances
            GyroscopeNoise: [1e-06 1e-06 1e-06]       (rad/s)²
        AccelerometerNoise: [0.0001 0.0001 0.0001]    (m/s²)² 
        GyroscopeBiasNoise: [1e-09 1e-09 1e-09]       (rad/s)²
    AccelerometerBiasNoise: [0.0001 0.0001 0.0001]    (m/s²)² 

The default INS filter is the MARGGPSFuser object. Call insfilter with no input arguments to create the default INS filter.

filter = insfilter
filter = 

  MARGGPSFuser with properties:

        IMUSampleRate: 100               Hz         
    ReferenceLocation: [0 0 0]           [deg deg m]
                State: [22x1 double]                
      StateCovariance: [22x22 double]               

   Multiplicative Process Noise Variances
            GyroscopeNoise: [1e-09 1e-09 1e-09]       (rad/s)²
        AccelerometerNoise: [0.0001 0.0001 0.0001]    (m/s²)² 
        GyroscopeBiasNoise: [1e-10 1e-10 1e-10]       (rad/s)²
    AccelerometerBiasNoise: [0.0001 0.0001 0.0001]    (m/s²)² 

   Additive Process Noise Variances
    GeomagneticVectorNoise: [1e-06 1e-06 1e-06]    uT²
     MagnetometerBiasNoise: [0.1 0.1 0.1]          uT²

Input Arguments

collapse all

You can create an INS filter object by specifying the filter type, or by specifying name-value pairs.

Supported Configurations

typeName-Value PairFilter ObjectFilter Description
 

NonholonomicHeading

Magnetometer

AsyncIMU

ErrorState

  
'marg'falsetruefalsefalseMARGGPSFuser

Pose estimation using an extended Kalman filter based on accelerometer, gyroscope, GPS, and magnetometer input.

'asyncimu'falsetruetruefalseAsyncMARGGPSFuser

Pose estimation using an extended continuous-discrete Kalman filter based on accelerometer, gyroscope, GPS, and magnetometer input.

'nonholonomic'truefalsefalsefalseNHConstrainedIMUGPSFuser

Pose estimation using an extended Kalman filter based on accelerometer, gyroscope, and GPS input with constraints on the velocity in the lateral and vertical body axes.

'errorstate'falsefalsefalsetrueErrorStateIMUGPSFuser

Pose estimation using an error-state Kalman filter based on accelerometer, gyroscope, GPS, and monocular visual odometry input.

Type of INS filter to create, specified as "marg", "asyncimu", "nonholonomic", or "errorstate".

Data Types: char | string

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: "NonholonomicHeading",true

Create a filter with nonholonomic heading constraints, specified as the comma-separated pair 'NonholonomicHeading' and true or false.

Data Types: logical

Create a filter that uses magnetometer readings, specified as the comma-separated pair 'Magnetometer' and true or false.

Data Types: logical

Create a continuous-discrete filter, specified as the comma-separated pair 'Magnetometer' and true or false.

Data Types: logical

Create an error-state Kalman filter that uses visual odometry data, specified as the comma-separated pair 'ErrorState' and true or false.

Data Types: logical

Output Arguments

collapse all

Inertial navigation filter, returned as a MARGGPSFuser, NHConstrainedIMUGPSFuser, AsyncMARGGPSFuser, or ErrorStateIMUGPSFuser object.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Introduced in R2018b