Model IMU, GPS, and INS/GPS

Sensor Fusion and Tracking Toolbox™ enables you to model inertial measurement units (IMU), Global Positioning Systems (GPS), and inertial navigation systems (INS). You can model specific hardware by setting properties of your models to values from hardware datasheets. You can tune environmental and noise properties to mimic real-world environments. You can use these models to test and validate your fusion algorithms or as placeholders while developing larger applications.

This tutorial provides an overview of inertial sensor and GPS models in Sensor Fusion and Tracking Toolbox.

To learn how to generate the ground-truth motion that drives the sensor models, see waypointTrajectory and kinematicTrajectory. For a tutorial on fusing inertial sensor data, see Determine Orientation Using Inertial Sensors.

Inertial Measurement Unit

An IMU is an electronic device mounted on a platform. The IMU consists of individual sensors that report various information about the platform's motion. IMUs combine multiple sensors, which can include accelerometers, gyroscopes, and magnetometers.

With this toolbox, measurements returned from an IMU model use the following unit and coordinate conventions.

OutputDescriptionUnitsCoordinate System
AccelerationCurrent accelerometer readingm/s2Sensor Body
Angular velocityCurrent gyroscope readingrad/sSensor Body
Magnetic fieldCurrent magnetometer readingμTSensor Body

Usually, the data returned by IMUs is fused together and interpreted as roll, pitch, and yaw of the platform. Real-world IMU sensors can have different axes for each of the individual sensors. The models provided by Sensor Fusion and Tracking Toolbox assume that the individual sensor axes are aligned.

To create an IMU sensor model, use the imuSensor System object™.

IMU = imuSensor
IMU = 

  imuSensor with properties:

          IMUType: 'accel-gyro'
       SampleRate: 100
      Temperature: 25
    Accelerometer: [1×1 accelparams]
        Gyroscope: [1×1 gyroparams]
     RandomStream: 'Global stream'

The default IMU model contains an ideal accelerometer and an ideal gyroscope. The accelparams and gyroparams objects define the accelerometer and gyroscope configuration. You can set the properties of these objects to mimic specific hardware and environments. For more information on IMU parameter objects, see accelparams, gyroparams, and magparams.

To model receiving IMU sensor data, call the IMU model with the ground-truth acceleration and angular velocity of the platform:

trueAcceleration = [1 0 0];
trueAngularVelocity = [1 0 0];
[accelerometerReadings,gyroscopeReadings] = IMU(trueAcceleration,trueAngularVelocity)
accelerometerReadings =

   -1.0000         0    9.8100


gyroscopeReadings =

     1     0     0

You can generate the ground-truth trajectories that you input to the IMU model using kinematicTrajectory and waypointTrajectory.

Global Positioning System

A global positioning system (GPS) provides 3-D position information for platforms (receivers) on the surface of the Earth.

GPS consists of a constellation of satellites that continuously orbit the earth. The satellites maintain a configuration such that a platform is always within view of at least four satellites. By measuring the flight time of signals from the satellites to the platform, the position of the platform can be trilaterated. Satellites timestamp a broadcast signal, which is compared to the platform's clock upon receipt. Three satellites are required to trilaterate a position in three dimensions. The fourth satellite is required to correct for clock synchronization errors between the platform and satellites.

The GPS simulation provided by Sensor Fusion and Tracking Toolbox models the platform (receiver) data that has already been processed and interpreted as altitude, latitude, longitude, velocity, groundspeed, and course.

Measurements returned from the GPS model use the following unit and coordinate conventions.

OutputDescriptionUnitsCoordinate System
LLACurrent global position reading in geodetic coordinates, based on wgs84Ellipsoid Earth modeldegrees (latitude), degrees (longitude), meters (altitude)LLA
VelocityCurrent velocity reading from GPSm/slocal NED
GroundspeedCurrent groundspeed reading from GPSm/slocal NED
CourseCurrent course reading from GPSdegreeslocal NED

The GPS model enables you to set high-level accuracy and noise parameters, as well as the receiver update rate and a reference location.

To create a GPS model, use the gpsSensor System object.

GPS = gpsSensor
GPS = 

  gpsSensor with properties:

                    UpdateRate: 1                  Hz         
             ReferenceLocation: [0 0 0]            [deg deg m]
    HorizontalPositionAccuracy: 1.6                m          
      VerticalPositionAccuracy: 3                  m          
              VelocityAccuracy: 0.1                m/s        
                  RandomStream: 'Global stream'               
                   DecayFactor: 0.999    

To model receiving GPS sensor data, call the GPS model with the ground-truth position and velocity of the platform:

truePosition = [1 0 0];
trueVelocity = [1 0 0];
[LLA,velocity,groundspeed,course] = GPS(truePosition,trueVelocity)
LLA =

    0.0000    0.0000    0.3031


velocity =

    1.0919   -0.0008   -0.1308


groundspeed =

    1.0919


course =

  359.9566 

You can generate the ground-truth trajectories that you input to the GPS model using kinematicTrajectory and waypointTrajectory.

Inertial Navigation System and Global Positioning System

An inertial navigation system (INS) uses inertial sensors like those found on an IMU: accelerometers, gyroscopes, and magnetometers. An INS fuses the inertial sensor data to calculate position, orientation, and velocity of a platform. An INS/GPS uses GPS data to correct the INS. Typically, the INS and GPS readings are fused with an extended Kalman filter, where the INS readings are used in the prediction step, and the GPS readings are used in the update step. A common use for INS/GPS is dead-reckoning when the GPS signal is unreliable.

"INS/GPS" refers to the entire system, including the filtering. The INS/GPS simulation provided by Sensor Fusion and Tracking Toolbox models an INS/GPS and returns the position, velocity, and orientation reported by the inertial sensors and GPS receiver based on a ground-truth motion.

Measurements returned from the INS/GPS use the following unit and coordinate conventions.

OutputDescriptionUnitsCoordinate System
PositionCurrent position reading from the INS/GPSmeterslocal NED
VelocityCurrent velocity reading from the INS/GPSm/slocal NED
OrientationCurrent orientation reading from the INS/GPSquaternion or rotation matrixN/A

To create a INS/GPS model, use the insSensor System object. You can model a real-world INS/GPS system by tuning the accuracy of your fused data: roll, pitch, yaw, position, and velocity.

INS = insSensor
INS = 

  insSensor with properties:

        RollAccuracy: 0.2                deg
       PitchAccuracy: 0.2                deg
         YawAccuracy: 1                  deg
    PositionAccuracy: 1                  m  
    VelocityAccuracy: 0.05               m/s
        RandomStream: 'Global stream'     

To model receiving INS/GPS sensor data, call the INS/GPS model with the ground-truth position and velocity and orientation of the platform:

trueMotion = struct( ...
        'Position',[0 0 0], ...
        'Velocity',[0 0 0], ...
        'Orientation',quaternion(1,0,0,0));
measurement = INS(trueMotion)
measurement = 

  struct with fields:

    Orientation: [1×1 quaternion]
       Position: [0.2939 -0.7873 0.8884]
       Velocity: [-0.0574 -0.0534 -0.0405]

See Also

| |

Related Topics

External Websites