Main Content

INS

Simulate INS sensor

Since R2020b

  • INS block

Libraries:
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

Description

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.

Ports

Input

expand all

Position 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 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 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 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.

Dependencies

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

Data Types: single | double

Angular 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.

Dependencies

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

Data Types: single | double

Enable 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.

Dependencies

To enable this input port, select Enable HasGNSSFix port.

Data Types: single | double

Output

expand all

Position 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 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 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 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.

Dependencies

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

Data Types: single | double

Angular 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.

Dependencies

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

Data Types: single | double

Parameters

expand all

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

Accuracy 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

Accuracy 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

Accuracy 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

Accuracy 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

Accuracy 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

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.

Accuracy 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.

Dependencies

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

Data Types: single | double

Accuracy 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.

Dependencies

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

Data Types: single | double

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 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αt2, 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.

Dependencies

To enable this parameter, select Enable HasGNSSFix port.

Data Types: 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.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2020b