IMU simulation model
Navigation Toolbox Toolbox / Multisensor Positioning / Sensor Models
Sensor Fusion and Tracking Toolbox / Multisensor Positioning / Sensor Models
The IMU Simulink® block models receiving data from an inertial measurement unit (IMU) composed of accelerometer, gyroscope, and magnetometer sensors.
Linear Acceleration
— Acceleration of IMU in local navigation coordinate system
(m/s2)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
— Angular velocity of IMU in local navigation coordinate system (rad/s)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
— Orientation of IMU in local navigation coordinate systemOrientation 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
Accel
— Accelerometer measurement of IMU in sensor body coordinate system
(m/s2)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
Gyro
— Gyroscope measurement of IMU in sensor body coordinate system (rad/s)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
Mag
— Magnetometer measurement of IMU in sensor body coordinate system (μT)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
Reference frame
— Navigation reference frameNED
(default) | ENU
Navigation reference frame, specified as NED
(North-East-Down) or
ENU
(East-North-Up).
Temperature (oC)
— Operating temperature of IMU (oC)25
(default) | real scalarOperating 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 (NED)
— Magnetic field vector expressed in NED navigation frame (μT)[27.5550, -2.4169, -16.0849]
(default) | 1-by-3 vector of scalarMagnetic 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.
To enable this parameter, set Reference frame to
NED
.
Data Types: single
| double
MagneticField (ENU)
— Magnetic field vector expressed in ENU navigation frame (μT)[-2.4169, 27.5550, 16.0849]
(default) | 1-by-3 vector of scalarMagnetic 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.
To enable this parameter, set Reference frame to
ENU
.
Data Types: single
| double
Seed
— Initial seed for randomization67
(default) | nonnegative integerInitial seed of a random number generator algorithm, specified as a nonnegative integer.
Data Types: single
| double
Simulate using
— Type of simulation to runInterpreted Execution
(default) | Code Generation
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.
Maximum readings (m/s2)
— Maximum sensor reading (m/s2)inf
(default) | real positive scalarMaximum sensor reading in m/s2, specified as a real positive scalar.
Data Types: single
| double
Resolution ((m/s2)/LSB)
— Resolution of sensor measurements ((m/s2)/LSB)0
(default) | real nonnegative scalarResolution of sensor measurements in (m/s2)/LSB, specified as a real nonnegative scalar.
Data Types: single
| double
Constant offset bias (m/s2)
— Constant sensor offset bias (m/s2)[0 0 0]
(default) | real scalar | real 3-element row vectorConstant 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
Axis skew (%)
— Sensor axes skew (%)[0 0 0]
(default) | real scalar in the range [0,100] | real 3-element row vector in the range [0,100]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 (m/s2/√Hz)
— Velocity random walk (m/s2/√Hz)[0 0 0]
(default) | real scalar | real 3-element row vectorVelocity 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
Bias Instability (m/s2)
— Instability of the bias offset (m/s2)[0 0 0]
(default) | real scalar | real 3-element row vectorInstability 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 ((m/s2)(√Hz))
— Acceleration random walk ((m/s2)(√Hz))[0 0 0]
(default) | real scalar | real 3-element row vectorAcceleration 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
Bias from temperature ((m/s2)/℃)
— Sensor bias from temperature ((m/s2)/℃)[0 0 0]
(default) | real scalar | real 3-element row vectorSensor 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
Temperature scale factor (%/℃)
— Scale factor error from temperature (%/℃)[0 0 0]
(default) | real scalar in the range [0,100] | real 3-element row vector in the range [0,100]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
Maximum readings (rad/s)
— Maximum sensor reading (rad/s)inf
(default) | real positive scalarMaximum sensor reading in rad/s, specified as a real positive scalar.
Data Types: single
| double
Resolution ((rad/s)/LSB)
— Resolution of sensor measurements ((rad/s)/LSB)0
(default) | real nonnegative scalarResolution of sensor measurements in (rad/s)/LSB, specified as a real nonnegative scalar.
Data Types: single
| double
Constant offset bias (rad/s)
— Constant sensor offset bias (rad/s)[0 0 0]
(default) | real scalar | real 3-element row vectorConstant 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
Axis skew (%)
— Sensor axes skew (%)[0 0 0]
(default) | real scalar in the range [0,100] | real 3-element row vector in the range [0,100]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
Bias from acceleration ((rad/s)/(m/s2)
— Sensor bias from linear acceleration (rad/s)/(m/s2)[0 0 0]
(default) | real scalar | real 3-element row vectorSensor 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
Angle random walk ((rad/s)/(√Hz))
— Acceleration random walk ((rad/s)/(√Hz))[0 0 0]
(default) | real scalar | real 3-element row vectorAcceleration 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
Bias Instability (rad/s)
— Instability of the bias offset (rad/s)[0 0 0]
(default) | real scalar | real 3-element row vectorInstability 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
Rate random walk ((rad/s)(√Hz))
— Integrated white noise of sensor ((rad/s)(√Hz))[0 0 0]
(default) | real scalar | real 3-element row vectorIntegrated 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
Bias from temperature ((rad/s)/℃)
— Sensor bias from temperature ((rad/s)/℃)[0 0 0]
(default) | real scalar | real 3-element row vectorSensor 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
Temperature scale factor (%/℃)
— Scale factor error from temperature (%/℃)[0 0 0]
(default) | real scalar in the range [0,100] | real 3-element row vector in the range [0,100]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
Maximum readings (μT)
— Maximum sensor reading (μT)inf
(default) | real positive scalarMaximum sensor reading in μT, specified as a real positive scalar.
Data Types: single
| double
Resolution ((μT)/LSB)
— Resolution of sensor measurements ((μT)/LSB)0
(default) | real nonnegative scalarResolution of sensor measurements in (μT)/LSB, specified as a real nonnegative scalar.
Data Types: single
| double
Constant offset bias (μT)
— Constant sensor offset bias (μT)[0 0 0]
(default) | real scalar | real 3-element row vectorConstant 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
Axis skew (%)
— Sensor axes skew (%)[0 0 0]
(default) | real scalar in the range [0,100] | real 3-element row vector in the range [0,100]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
White noise PSD (μT/√Hz)
— Power spectral density of sensor noise (μT/√Hz)[0 0 0]
(default) | real scalar | real 3-element row vectorPower 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
Bias Instability (μT)
— Instability of the bias offset (μT)[0 0 0]
(default) | real scalar | real 3-element row vectorInstability 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
Random walk ((μT)*√Hz)
— Integrated white noise of sensor ((μT)*√Hz)[0 0 0]
(default) | real scalar | real 3-element row vectorIntegrated 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
Bias from temperature (μT/℃)
— Sensor bias from temperature (μT/℃)[0 0 0]
(default) | real scalar | real 3-element row vectorSensor 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
Temperature scale factor (%/℃)
— Scale factor error from temperature (%/℃)[0 0 0]
(default) | real scalar in the range [0,100] | real 3-element row vector in the range [0,100]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
The accelerometer model uses the ground-truth orientation and acceleration inputs and the imuSensor
and accelparams
(Sensor Fusion and Tracking Toolbox) properties to model accelerometer readings.
To obtain the total acceleration (totalAcc), the acceleration is preprocessed by negating and adding the gravity constant vector (g= [0; 0; 9.8] m/s2) as:
Then the total acceleration is converted from the local navigation frame to the sensor frame using:
If the orientation is input in quaternion form, it is converted to a rotation matrix before processing.
The ground-truth acceleration in the sensor frame, a, passes through the bulk model, which adds axes misalignment and bias:
where ConstantBias (Sensor Fusion and Tracking Toolbox) is a property of accelparams
(Sensor Fusion and Tracking Toolbox), and α1, α2, and α3 are given by the first, second, and third elements of the AxesMisalignment (Sensor Fusion and Tracking Toolbox) property of accelparams
(Sensor Fusion and Tracking Toolbox).
The bias instability drift is modeled as white noise biased and then filtered:
where BiasInstability (Sensor Fusion and Tracking Toolbox) is a property of accelparams
(Sensor Fusion and Tracking Toolbox), and h1 is a filter defined by the SampleRate (Sensor Fusion and Tracking Toolbox) property:
White noise drift is modeled by multiplying elements of the white noise random stream by the standard deviation:
where SampleRate (Sensor Fusion and Tracking Toolbox) is an imuSensor
property, and NoiseDensity (Sensor Fusion and Tracking Toolbox) is an accelparams
(Sensor Fusion and Tracking Toolbox) property. Elements of w are random numbers given by settings of the imuSensor
random stream.
The random walk drift is modeled by biasing elements of the white noise random stream and then filtering:
where RandomWalk (Sensor Fusion and Tracking Toolbox) is a property of accelparams
(Sensor Fusion and Tracking Toolbox), SampleRate (Sensor Fusion and Tracking Toolbox) is a property of imuSensor
, and h2 is a filter defined as:
The environmental drift noise is modeled by multiplying the temperature difference from a standard with the temperature bias:
where Temperature (Sensor Fusion and Tracking Toolbox) is a property of imuSensor
, and TemperatureBias (Sensor Fusion and Tracking Toolbox) is a property of accelparams
(Sensor Fusion and Tracking Toolbox). The constant 25 corresponds to a standard temperature.
The temperature scale factor error is modeled as:
where Temperature (Sensor Fusion and Tracking Toolbox) is a property of imuSensor
, and TemperatureScaleFactor (Sensor Fusion and Tracking Toolbox) is a property of accelparams
(Sensor Fusion and Tracking Toolbox). The constant 25 corresponds to a standard temperature.
The quantization is modeled by first saturating the continuous signal model:
and then setting the resolution:
where MeasurementRange (Sensor Fusion and Tracking Toolbox) is a property of accelparams
(Sensor Fusion and Tracking Toolbox).
The gyroscope model uses the ground-truth orientation, acceleration, and angular velocity inputs, and the imuSensor
and gyroparams
(Sensor Fusion and Tracking Toolbox) properties to model accelerometer readings.
The ground-truth angular velocity is converted from the local frame to the sensor frame using the ground-truth orientation:
If the orientation is input in quaternion form, it is converted to a rotation matrix before processing.
The ground-truth angular velocity in the sensor frame, a, passes through the bulk model, which adds axes misalignment and bias:
where ConstantBias (Sensor Fusion and Tracking Toolbox) is a property of gyroparams
(Sensor Fusion and Tracking Toolbox), and α1, α2, and α3 are given by the first, second, and third elements of the AxesMisalignment (Sensor Fusion and Tracking Toolbox) property of gyroparams
(Sensor Fusion and Tracking Toolbox).
The bias instability drift is modeled as white noise biased and then filtered:
where BiasInstability (Sensor Fusion and Tracking Toolbox) is a property of gyroparams
(Sensor Fusion and Tracking Toolbox) and h1 is a filter defined by the SampleRate (Sensor Fusion and Tracking Toolbox) property:
White noise drift is modeled by multiplying elements of the white noise random stream by the standard deviation:
where SampleRate (Sensor Fusion and Tracking Toolbox) is an imuSensor
property, and NoiseDensity (Sensor Fusion and Tracking Toolbox) is an gyroparams
(Sensor Fusion and Tracking Toolbox) property. The elements of w are random numbers given by settings of the imuSensor
random stream.
The random walk drift is modeled by biasing elements of the white noise random stream and then filtering:
where RandomWalk (Sensor Fusion and Tracking Toolbox) is a property of gyroparams
(Sensor Fusion and Tracking Toolbox), SampleRate (Sensor Fusion and Tracking Toolbox) is a property of imuSensor
, and h2 is a filter defined as:
The environmental drift noise is modeled by multiplying the temperature difference from a standard with the temperature bias:
where Temperature (Sensor Fusion and Tracking Toolbox) is a property of imuSensor
, and TemperatureBias (Sensor Fusion and Tracking Toolbox) is a property of gyroparams
(Sensor Fusion and Tracking Toolbox). The constant 25 corresponds to a standard temperature.
The temperature scale factor error is modeled as:
where Temperature (Sensor Fusion and Tracking Toolbox) is a property of imuSensor
, and TemperatureScaleFactor (Sensor Fusion and Tracking Toolbox) is a property of gyroparams
(Sensor Fusion and Tracking Toolbox). The constant 25 corresponds to a standard temperature.
The quantization is modeled by first saturating the continuous signal model:
and then setting the resolution:
where MeasurementRange (Sensor Fusion and Tracking Toolbox) is a property of gyroparams
(Sensor Fusion and Tracking Toolbox).
The magnetometer model uses the ground-truth orientation and acceleration inputs, and the imuSensor
and magparams
(Sensor Fusion and Tracking Toolbox) properties to model magnetometer readings.
The ground-truth acceleration is converted from the local frame to the sensor frame using the ground-truth orientation:
If the orientation is input in quaternion form, it is converted to a rotation matrix before processing.
The ground-truth acceleration in the sensor frame, a, passes through the bulk model, which adds axes misalignment and bias:
where ConstantBias (Sensor Fusion and Tracking Toolbox) is a property of magparams
(Sensor Fusion and Tracking Toolbox), and α1, α2, and α3 are given by the first, second, and third elements of the AxesMisalignment (Sensor Fusion and Tracking Toolbox) property of magparams
(Sensor Fusion and Tracking Toolbox).
The bias instability drift is modeled as white noise biased and then filtered:
where BiasInstability (Sensor Fusion and Tracking Toolbox) is a property of magparams
(Sensor Fusion and Tracking Toolbox) and h1 is a filter defined by the SampleRate (Sensor Fusion and Tracking Toolbox) property:
White noise drift is modeled by multiplying elements of the white noise random stream by the standard deviation:
where SampleRate (Sensor Fusion and Tracking Toolbox) is an imuSensor
property, and NoiseDensity (Sensor Fusion and Tracking Toolbox) is an magparams
(Sensor Fusion and Tracking Toolbox) property. The elements of w are random numbers given by settings of the imuSensor
random stream.
The random walk drift is modeled by biasing elements of the white noise random stream and then filtering:
where RandomWalk (Sensor Fusion and Tracking Toolbox) is a property of magparams
(Sensor Fusion and Tracking Toolbox), SampleRate (Sensor Fusion and Tracking Toolbox) is a property of imuSensor
, and h2 is a filter defined as:
The environmental drift noise is modeled by multiplying the temperature difference from a standard with the temperature bias:
where Temperature (Sensor Fusion and Tracking Toolbox) is a property of imuSensor
, and TemperatureBias (Sensor Fusion and Tracking Toolbox) is a property of magparams
(Sensor Fusion and Tracking Toolbox). The constant 25 corresponds to a standard temperature.
The temperature scale factor error is modeled as:
where Temperature (Sensor Fusion and Tracking Toolbox) is a property of imuSensor
, and TemperatureScaleFactor (Sensor Fusion and Tracking Toolbox) is a property of magparams
(Sensor Fusion and Tracking Toolbox). The constant 25 corresponds to a standard temperature.
The quantization is modeled by first saturating the continuous signal model:
and then setting the resolution:
where MeasurementRange (Sensor Fusion and Tracking Toolbox) is a property of magparams
(Sensor Fusion and Tracking Toolbox).
gyroparams
| magparams
| accelparams
(Sensor Fusion and Tracking Toolbox)