Main Content

Simulate INS sensor

**Library:**Navigation Toolbox / Multisensor Positioning / Sensor Models

Automated Driving Toolbox / Driving Scenario and Sensor Modeling

Sensor Fusion and Tracking Toolbox / Multisensor Positioning / Sensor Models

UAV Toolbox / UAV Scenario and Sensor Modeling

The block simulates an INS sensor, which outputs noise-corrupted position, velocity, and orientation based on the corresponding inputs. The block can also optionally output acceleration and angular velocity based on the corresponding inputs. To change the level of noise present in the output, you can vary the roll, pitch, yaw, position, velocity, acceleration, and angular velocity accuracies. The accuracy is defined as the standard deviation of the noise.

`Position`

— Position of INS sensorPosition of the INS sensor relative to the navigation frame, in meters, specified
as an *N*-by-3 real-valued matrix. *N* is the number
of samples.

**Data Types: **`single`

| `double`

`Velocity`

— Velocity of INS sensorVelocity of the INS sensor relative to the navigation frame, in meters per second,
specified as an *N*-by-3 real-valued matrix. *N* is
the number of samples.

**Data Types: **`single`

| `double`

`Orientation`

— Orientation of INS sensor3-by-3-by-

Orientation of the INS sensor relative to the navigation frame, specified as one of these formats:

A 3-by-3-by-

*N*real-valued array, where each page of the array (3-by-3 matrix) is a rotation matrix.An

*N*-by-4 real-valued matrix, where each row of the matrix is the four elements of a quaternion.An

*N*-by-3 matrix of Euler angles, where each row of the matrix is the three Euler angles corresponding to the z-y-x rotation convention.

*N* is the number of samples.

**Data Types: **`single`

| `double`

`Acceleration`

— Acceleration of INS sensorAcceleration of the INS sensor relative to the navigation frame, in meters per
second squared, specified as an *N*-by-3 real-valued matrix.
*N* is the number of samples.

To enable this input port, select **Use acceleration and angular
velocity**.

**Data Types: **`single`

| `double`

`AngularVelocity`

— Angular velocity of INS sensorAngular velocity of the INS sensor relative to the navigation frame, in degrees
per second, specified as an *N*-by-3 real-valued matrix.
*N* is the number of samples.

To enable this input port, select **Use acceleration and angular
velocity**.

**Data Types: **`single`

| `double`

`HasGNSSFix`

— Enable GNSS fixEnable GNNS fix, specified as an *N*-by-1 logical vector.
*N* is the number of samples. Specify this input as
`false`

to simulate the loss of a GNSS receiver fix. When a GNSS
receiver fix is lost, position measurements drift at a rate specified by the
**Position error factor** parameter.

To enable this input port, select **Enable HasGNSSFix
port**.

**Data Types: **`single`

| `double`

`Position`

— Position of INS sensorPosition of the INS sensor relative to the navigation frame, in meters, returned
as an *N*-by-3 real-valued matrix. *N* is the number
of samples in the input.

**Data Types: **`single`

| `double`

`Velocity`

— Velocity of INS sensorVelocity of the INS sensor relative to the navigation frame, in meters per second,
returned as an *N*-by-3 real-valued matrix. *N* is
the number of samples in the input.

**Data Types: **`single`

| `double`

`Orientation`

— Orientation of INS sensor3-by-3-by-

Orientation of the INS sensor relative to the navigation frame, returned as one of the formats:

A 3-by-3-by-

*N*real-valued array, where each page of the array (3-by-3 matrix) is a rotation matrix.An

*N*-by-4 real-valued matrix, where each row of the matrix is the four elements of a quaternion.An

*N*-by-3 matrix of Euler angles, where each row of the matrix is the three Euler angles corresponding to the z-y-x rotation convention.

*N* is the number of samples in the input.

**Data Types: **`single`

| `double`

`Acceleration`

— Acceleration of INS sensorAcceleration of the INS sensor relative to the navigation frame, in meters per
second squared, returned as an *N*-by-3 real-valued matrix.
*N* is the number of samples.

To enable this output port, select **Use acceleration and angular
velocity**.

**Data Types: **`single`

| `double`

`AngularVelocity`

— Angular velocity of INS sensorAngular velocity of the INS sensor relative to the navigation frame, in degrees
per second, returned as an *N*-by-3 real-valued matrix.
*N* is the number of samples.

To enable this output port, select **Use acceleration and angular
velocity**.

**Data Types: **`single`

| `double`

`Mounting location (m)`

— Location of sensor on platform (m)`[0 0 0]`

(default) | three-element real-valued vector of form [Location of the sensor on the platform, in meters, specified as a three-element
real-valued vector of the form [*x*
*y*
*z*]. The vector defines the offset of the sensor origin from the
origin of the platform.

**Data Types: **`single`

| `double`

`Roll (X-axis) accuracy (deg)`

— Accuracy of roll measurement (deg)`0.2`

(default) | nonnegative real scalarAccuracy of the roll measurement of the sensor body in degrees, specified as a nonnegative real scalar.

Roll is defined as rotation around the *x*-axis of the sensor body.
Roll noise is modeled as white process noise with standard deviation equal to the
specified **Roll accuracy** in degrees.

**Data Types: **`single`

| `double`

`Pitch (Y-axis) accuracy (deg)`

— Accuracy of pitch measurement (deg)`0.2`

(default) | nonnegative real scalarAccuracy of the pitch measurement of the sensor body in degrees, specified as a nonnegative real scalar.

Pitch is defined as rotation around the *y*-axis of the sensor
body. Pitch noise is modeled as white process noise with standard deviation equal to the
specified **Pitch accuracy** in degrees.

**Data Types: **`single`

| `double`

`Yaw (Z-axis) accuracy (deg)`

— Accuracy of yaw measurement (deg)`1`

(default) | nonnegative real scalarAccuracy of the yaw measurement of the sensor body in degrees, specified as a nonnegative real scalar.

Yaw is defined as rotation around the *z*-axis of the sensor body.
Yaw noise is modeled as white process noise with standard deviation equal to the
specified **Yaw accuracy** in degrees.

**Data Types: **`single`

| `double`

`Position accuracy (m)`

— Accuracy of position measurement (m)`1`

(default) | nonnegative real scalar | 1-by-3 vector of nonnegative valuesAccuracy of the position measurement of the sensor body in meters, specified as a nonnegative real scalar or a 1-by-3 vector of nonnegative values. If you specify the parameter as a scalar value, then the block sets the accuracy of all three position components to this value.

Position noise is modeled as white process noise with a standard deviation equal to
the specified **Position accuracy** in meters.

**Data Types: **`single`

| `double`

`Velocity accuracy (m/s)`

— Accuracy of velocity measurement (m/s)`1`

(default) | nonnegative real scalarAccuracy of the velocity measurement of the sensor body in meters per second, specified as a nonnegative real scalar.

Velocity noise is modeled as white process noise with a standard deviation equal to
the specified **Velocity accuracy** in meters per second.

**Data Types: **`single`

| `double`

`Use acceleration and angular velocity`

— Use acceleration and angular velocityoff (default) | on

Select this check box to enable the block inputs of acceleration and angular
velocity through the **Acceleration** and
**AngularVelocity** input ports, respectively. Meanwhile, the block
outputs the acceleration and angular velocity measurements through the
**Acceleration** and **AngularVelocity** output
ports, respectively. Additionally, selecting this parameter enables you to specify the
**Acceleration accuracy** and **Angular velocity
accuracy** parameters.

`Acceleration accuracy (m/s`^{2})

— Accuracy of acceleration measurement (m/s`0`

(default) | nonnegative real scalarAccuracy of the acceleration measurement of the sensor body in meters, specified as a nonnegative real scalar.

Acceleration noise is modeled as white process noise with a standard deviation equal
to the specified **Acceleration accuracy** in meters per second
squared.

To enable this parameter, select **Use acceleration and angular
velocity**.

**Data Types: **`single`

| `double`

`Angular velocity accuracy (deg/s)`

— Accuracy of angular velocity measurement (deg/s)`0`

(default) | nonnegative real scalarAccuracy of the angular velocity measurement of the sensor body in meters, specified as a nonnegative real scalar.

Angular velocity noise is modeled as white process noise with a standard deviation
equal to the specified **Angular velocity accuracy** in degrees per
second.

To enable this parameter, select **Use acceleration and angular
velocity**.

**Data Types: **`single`

| `double`

`Enable HasGNSSFix port`

— Enable `HasGNSSFix`

input portoff (default) | on

Select this check box to enable the **HasGNSSFix** input port. When
the **HasGNSSFix** input is specified as `false`

,
position measurements drift at a rate specified by the **Position error
factor** parameter.

`Position error factor (m)`

— Position error factor (m)`[0 0 0]`

(default) | nonnegative scalar | 1-by-3 real-valued vectorPosition error factor without GNSS fix, specified as a scalar or a 1-by-3 real-valued vector. If you specify the parameter as a scalar value, then the block sets the position error factors of all three position components to this value.

When the **HasGNSSFix** input is specified as
`false`

, the position error grows at a quadratic rate due to constant
bias in the accelerometer. The position error for a position component
*E*(*t*) can be expressed as
*E*(*t*) =
1/2*α**t*^{2}, where
*α* is the position error factor for the corresponding component and
*t* is the time since the GNSS fix is lost. The computed
*E*(*t*) values for the *x*,
*y*, and *z* components are added to the
corresponding position components of the **Position** output.

To enable this parameter, select **Enable HasGNSSFix
port**.

**Data Types: **`double`

`Intial Seed`

— Initial seed for randomization`67`

(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 run`Interpreted 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.

Ha hecho clic en un enlace que corresponde a este comando de MATLAB:

Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web siteYou can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

- América Latina (Español)
- Canada (English)
- United States (English)

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)