Model IMU, GPS, and INS/GPS
Navigation 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 Navigation Toolbox.
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.
|Acceleration||Current accelerometer reading||m/s2||Sensor Body|
|Angular velocity||Current gyroscope reading||rad/s||Sensor Body|
|Magnetic field||Current magnetometer reading||μT||Sensor 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 Navigation Toolbox assume that the individual sensor axes are aligned.
To create an IMU sensor model, use the
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
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
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
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 Navigation 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.
|LLA||Current global position reading in geodetic coordinates, based on wgs84Ellipsoid Earth model||degrees (latitude), degrees (longitude), meters (altitude)||LLA|
|Velocity||Current velocity reading from GPS||m/s||local NED|
|Groundspeed||Current groundspeed reading from GPS||m/s||local NED|
|Course||Current course reading from GPS||degrees||local 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
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
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 Navigation 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.
|Position||Current position reading from the INS/GPS||meters||local NED|
|Velocity||Current velocity reading from the INS/GPS||m/s||local NED|
|Orientation||Current orientation reading from the INS/GPS||quaternion or rotation matrix||N/A|