# IMU

IMU simulation model

• Library:
• Sensor Fusion and Tracking Toolbox / Multisensor Positioning / Sensor Models

Navigation Toolbox / Multisensor Positioning / Sensor Models

## Description

The IMU Simulink® block models receiving data from an inertial measurement unit (IMU) composed of accelerometer, gyroscope, and magnetometer sensors.

## Ports

### Input

expand all

Acceleration of the IMU in the local navigation coordinate system, specified as an N-by-3 matrix of real scalars in meters per second squared. N is the number of samples in the current frame.

Data Types: `single` | `double`

Angular velocity of the IMU sensor body frame in the local navigation coordinate system, specified as an N-by-3 matrix of scalars in radians per second. N is the number of samples in the current frame.

Data Types: `single` | `double`

Orientation of the IMU sensor body frame with respect to the local navigation coordinate system, specified as an N-by-4 array of real scalars or a 3-by-3-by-N rotation matrix. Each row the of the N-by-4 array is assumed to be the four elements of a `quaternion` (Sensor Fusion and Tracking Toolbox). N is the number of samples in the current frame.

Data Types: `single` | `double`

### Output

expand all

Accelerometer measurement of the IMU in the sensor body coordinate system, returned as an N-by-3 matrix of real scalars in meters per second squared. N is the number of samples in the current frame.

Data Types: `single` | `double`

Gyroscope measurement of the IMU in the sensor body coordinate system, returned as an N-by-3 matrix of real scalars in radians per second. N is the number of samples in the current frame.

Data Types: `single` | `double`

Magnetometer measurement of the IMU in the sensor body coordinate system, returned as an N-by-3 matrix of real scalars in microtesla. N is the number of samples in the current frame.

Data Types: `single` | `double`

## Parameters

expand all

Parameters

Navigation reference frame, specified as `NED` (North-East-Down) or `ENU` (East-North-Up).

Operating temperature of the IMU in degrees Celsius, specified as a real scalar.

When the block calculates temperature scale factors and environmental drift noises, 25 oC is used as the nominal temperature.

Data Types: `single` | `double`

Magnetic field vector expressed in the NED navigation frame, specified as a 1-by-3 vector of scalars.

The default magnetic field corresponds to the magnetic field at latitude zero, longitude zero, and altitude zero.

#### Dependencies

To enable this parameter, set Reference frame to `NED`.

Data Types: `single` | `double`

Magnetic field vector expressed in the ENU navigation frame, specified as a 1-by-3 vector of scalars.

The default magnetic field corresponds to the magnetic field at latitude zero, longitude zero, and altitude zero.

#### Dependencies

To enable this parameter, set Reference frame to `ENU`.

Data Types: `single` | `double`

Initial seed of a random number generator algorithm, specified as a nonnegative integer.

Data Types: `single` | `double`

• `Interpreted execution` — Simulate the model using the MATLAB® interpreter. This option shortens startup time. In `Interpreted execution` mode, you can debug the source code of the block.

• `Code generation` — Simulate the model using generated C code. The first time that you run a simulation, Simulink generates C code for the block. The C code is reused for subsequent simulations if the model does not change. This option requires additional startup time.

Accelerometer

Maximum sensor reading in m/s2, specified as a real positive scalar.

Data Types: `single` | `double`

Resolution of sensor measurements in (m/s2)/LSB, specified as a real nonnegative scalar.

Data Types: `single` | `double`

Constant sensor offset bias in m/s2, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Sensor axes skew in a percentage, specified as a real scalar or 3-element row vector with values ranging from 0 to 100. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Velocity random walk in (m/s2/√Hz), specified as a real scalar or 3-element row vector. This property corresponds to the power spectral density of sensor noise. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Instability of the bias offset in m/s2, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Acceleration random walk of sensor in (m/s2)(√Hz), specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Sensor bias from temperature in (m/s2)/℃, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Scale factor error from temperature in %/℃, specified as a real scalar or real 3-element row vector with values ranging from 0 to 100. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Gyroscope

Data Types: `single` | `double`

Resolution of sensor measurements in (rad/s)/LSB, specified as a real nonnegative scalar.

Data Types: `single` | `double`

Constant sensor offset bias in rad/s, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Sensor axes skew in a percentage, specified as a real scalar or 3-element row vector with values ranging from 0 to 100. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Sensor bias from linear acceleration in (rad/s)/(m/s2), specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Acceleration random walk of sensor in (rad/s)/(√Hz), specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Instability of the bias offset in rad/s, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Integrated white noise of sensor in (rad/s)(√Hz), specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Sensor bias from temperature in (rad/s)/℃, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Scale factor error from temperature in %/℃, specified as a real scalar or real 3-element row vector with values ranging from 0 to 100. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Magnetometer

Maximum sensor reading in μT, specified as a real positive scalar.

Data Types: `single` | `double`

Resolution of sensor measurements in (μT)/LSB, specified as a real nonnegative scalar.

Data Types: `single` | `double`

Constant sensor offset bias in μT, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Sensor axes skew in a percentage, specified as a real scalar or 3-element row vector with values ranging from 0 to 100. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Power spectral density of sensor noise in μT/√Hz, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Instability of the bias offset in μT, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Integrated white noise of sensor in (μT)*√Hz, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Sensor bias from temperature in μT/℃, specified as a real scalar or 3-element row vector. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

Scale factor error from temperature in %/℃, specified as a real scalar or real 3-element row vector with values ranging from 0 to 100. Any scalar input is converted into a real 3-element row vector where each element has the input scalar value.

Data Types: `single` | `double`

expand all

## Version History

Introduced in R2020a