Engee documentation

6DOF (Quaternion)

Equations of motion with six degrees of freedom relative to body axes expressed in terms of quaternions.

blockType: SubSystem

Path in the library:

/Aerospace/Equations of Motion/6DOF/6DOF (Quaternion)

Description

Block 6DOF (Quaternion) implements the equations of motion of a rigid body in space with six degrees of freedom relative to the axes of the body expressed in terms of quaternions. It is assumed that the applied forces act in the center of gravity of the body.

The integration of the quaternion vector is shown below. Ratio sets the norm of the quaternion state vector equal to 1.0 if ɛ is not equal to zero. The choice of the value of this coefficient should be approached with caution, since its high value increases the rate of reduction of the error in the norm, but at the same time slows down the simulation due to the appearance of rapid dynamics. The error in the value of one of the elements of the quaternion vector is evenly distributed among all the elements, which potentially increases the error in the state vector.

ɛ
ɛ

Ports

Entrance

# Fxyz (N) — applied force

+ a 3-by-1 vector

Details

The applied force, given as a vector 3 on 1.

Data types

Float64

Support for complex numbers

None

# Mxyz (N-m) — applied moment

+ a 3-by-1 vector

Details

The applied moment, specified as a vector 3 on 1.

Data types

Float64

Support for complex numbers

None

# dm/dt (kg/s) is the rate of mass change

+ scalar

Details

One or more rates of mass change (positive for accretion, negative for ablation), indicated as a scalar.

Dependencies

To use this port:

  • set for the parameter Mass type: meaning Simple Variable;

  • set for the parameter Mass type: meaning Custom Variable and check the box Include mass flow relative velocity.

Data types

Float64

Support for complex numbers

None

# Vre (m/s) is the relative velocity of the mass flow

+ a 3-by-1 vector

Details

The relative velocity of the mass flow, given as a vector 3 on 1.

Dependencies

To use this port, set the parameter Mass type: meaning Simple Variable or Custom Variable and check the box Include mass flow relative velocity.

Data types

Float64

Support for complex numbers

None

# m (kg) — weight

+ scalar

Details

The mass, set as a scalar.

Dependencies

To use this port, set the parameter Mass type: meaning Custom Variable.

Data types

Float64

Support for complex numbers

None

# dI/dt (kg-m2/s) is the rate of change of the inertia tensor matrix

+ the 3 by 3 matrix

Details

The rate of change of the inertia tensor matrix, given as a matrix 3 on 3.

Dependencies

To use this port, set the parameter Mass type: meaning Custom Variable.

Data types

Float64

Support for complex numbers

None

# I (kg-m2) is the matrix of the inertia tensor

+ the 3 by 3 matrix

Details

The matrix of the inertia tensor, defined as a matrix 3 on 3.

Dependencies

To use this port, set the parameter Mass type: meaning Custom Variable.

Data types

Float64

Support for complex numbers

None

Output

# Ve (m/s) is the velocity in the reference frame of local flat rectangular coordinates

+ a 3-by-1 vector

Details

Velocity in the reference frame of local flat rectangular coordinates, returned as a vector 3 on 1.

Data types

Float64

Support for complex numbers

None

# Xe (m) is the position in space in the frame of reference of local flat rectangular coordinates

+ a 3-by-1 vector

Details

The position in space in the reference frame of local flat rectangular coordinates, returned as a vector 3 on 1.

Data types

Float64

Support for complex numbers

None

# ϕθψ (rad) — Euler rotation angles

+ a 3-by-1 vector

Details

Euler rotation angles (roll, pitch, yaw) in radians, determining the internal rotation returned as a vector 3 on 1.

Data types

Float64

Support for complex numbers

None

# DCMbe — coordinate transformation

+ the 3 by 3 matrix

Details

Transformation of coordinates from a system of local flat rectangular coordinates to a coordinate system of a body, returned as a matrix 3 on 3.

Data types

Float64

Support for complex numbers

None

# Vb (m/s) is the velocity in the associated coordinate system

+ a 3-by-1 vector

Details

Velocity in the associated coordinate system, returned as a vector 3 on 1.

Data types

Float64

Support for complex numbers

None

# ωb (rad/s) is the angular velocity in the associated coordinate system

+ a 3-by-1 vector

Details

Angular velocity in the associated coordinate system in radians per second, returned as a vector 3 on 1.

Data types

Float64

Support for complex numbers

None

# dwb/dt is the angular acceleration in the associated coordinate system

+ a 3-by-1 vector

Details

Angular acceleration in the associated coordinate system, returned as a vector 3 on 1.

Data types

Float64

Support for complex numbers

None

# Abb (m/s2) — acceleration in the associated coordinate system

+ a 3-by-1 vector

Details

Acceleration in the associated coordinate system, returned as a vector 3 on 1.

Data types

Float64

Support for complex numbers

None

# Abe (m/s2) is the inertial acceleration in the associated coordinate system

+ a 3-by-1 vector

Details

Inertial acceleration in the associated coordinate system, returned as a vector 3 on 1.

Dependencies

To use this port, check the box Include inertial acceleration.

Data types

Float64

Support for complex numbers

None

# Fuel — fuel tank condition

+ scalar

Details

The state of the fuel tank, returned as:

  • 1 — the tank is full;

  • 0 — the tank is neither full nor empty;

  • −1 — the tank is empty.

Dependencies

To use this port, set the parameter Mass type: meaning Simple Variable.

Data types

Float64

Support for complex numbers

None

Parameters

Parameters

# Mass type: — type of mass
Fixed | Simple Variable | Custom Variable

Details

You can choose from three types of mass:

  • Fixed — fixed mass, when this value is selected, the mass remains unchanged throughout the simulation.;

  • Simple Variable — variable mass, when this value is selected, mass and inertia change linearly depending on the rate of change of mass;

  • Custom Variable — user-defined variable mass, when this value is selected, the change in mass and inertia can be adjusted at your discretion.

Values

Fixed | Simple Variable | Custom Variable

Default value

Fixed

Program usage name

mtype

Tunable

No

Evaluatable

Yes

# Representation: — representation of equations of motion
Quaternion

Details

You can choose to use Euler angles or quaternions in the equations of motion. In the current block implementation, only the value is available for this parameter. Quaternion.

Values

Quaternion

Default value

Quaternion

Program usage name

rep

Tunable

No

Evaluatable

Yes

# Initial position in inertial axes [Xe,Ye,Ze]: — position relative to the axes of inertia

Details

The initial position of a body in a reference frame connected to a flat Earth, defined as a vector 3 on 1.

Default value

[0.0; 0.0; 0.0]

Program usage name

xme_0

Tunable

No

Evaluatable

Yes

# Initial velocity in body axes [U,v,w]: — velocity along the axes of the body

Details

The initial velocity along the axes of the body in the associated coordinate system, given as a vector 3 on 1.

Default value

[0.0; 0.0; 0.0]

Program usage name

Vm_0

Tunable

No

Evaluatable

Yes

# Initial Euler orientation [roll, pitch, yaw]: — the initial Euler angles

Details

The initial Euler angles (roll, pitch, yaw) in radians, given as a vector 3 on 1. The Euler angles are the angles between the body and the north-east-bottom (NED) coordinate system.

Default value

[0.0; 0.0; 0.0]

Program usage name

eul_0

Tunable

No

Evaluatable

Yes

# Initial body rotation rates [p,q,r]: — initial body rotation

Details

The initial angular velocities of the body relative to the north-east-bottom reference frame (NED) in radians per second, given as a vector 3 on 1.

Default value

[0.0; 0.0; 0.0]

Program usage name

pm_0

Tunable

No

Evaluatable

Yes

# Initial mass: — initial weight

Details

Initial body weight.

Dependencies

To use this parameter, set for the parameter Mass type: meaning Fixed or Simple Variable.

Default value

1.0

Program usage name

mass_0

Tunable

No

Evaluatable

Yes

# Empty mass: — minimum weight

Details

The minimum body weight, below which it will not be possible to go down with any weight expenditure.

Dependencies

To use this parameter, set for the parameter Mass type: meaning Simple Variable.

Default value

0.5

Program usage name

mass_e

Tunable

No

Evaluatable

Yes

# Full mass: — maximum mass

Details

Maximum body weight.

Dependencies

To use this parameter, set for the parameter Mass type: meaning Simple Variable.

Default value

2.0

Program usage name

mass_f

Tunable

No

Evaluatable

Yes

# Inertia: — inertia

Details

Inertia of the body.

Dependencies

To use this parameter, set for the parameter Mass type: meaning Fixed or Simple Variable.

Default value

[1.0 0.0 0.0; 0.0 1.0 0.0; 0.0 0.0 1.0]

Program usage name

inertia

Tunable

No

Evaluatable

Yes

# Empty inertia matrix: — inertia at minimum mass

Details

The inertia matrix at minimum mass.

Dependencies

To use this parameter, set for the parameter Mass type: meaning Simple Variable.

Default value

[1.0 0.0 0.0; 0.0 1.0 0.0; 0.0 0.0 1.0]

Program usage name

inertia_e

Tunable

No

Evaluatable

Yes

# Full inertia matrix: — inertia at maximum mass

Details

The inertia matrix at maximum mass.

Dependencies

To use this parameter, set for the parameter Mass type: meaning Simple Variable.

Default value

[2.0 0.0 0.0; 0.0 2.0 0.0; 0.0 0.0 2.0]

Program usage name

inertia_f

Tunable

No

Evaluatable

Yes

# Gain for quaternion normalization: — the normalizing coefficient

Details

The coefficient for maintaining the norm of the quaternion vector is 1.

Default value

1.0

Program usage name

k_quat

Tunable

No

Evaluatable

Yes

# Include mass flow relative velocity — relative velocity of the mass flow

Details

Select this option to add a port for measuring the relative velocity of the mass flow.

Dependencies

To use this parameter, set for the parameter Mass type: meaning Simple Variable or Custom Variable.

Default value

false (switched off)

Program usage name

vre_flag

Tunable

No

Evaluatable

Yes

# Include inertial acceleration — accounting for inertial acceleration

Details

Select this option to add a port for inertial acceleration.

Default value

false (switched off)

Program usage name

abi_flag

Tunable

No

Evaluatable

Yes