Aerospace Blockset | ![]() ![]() |
Implement a quaternion representation of six-degrees-of-freedom equations of motion
Library
Description
For a description of the coordinate system employed and the translational dynamics, see the block description for the 6DoF (Euler Angles) block.
The integration of the rate of change of the quaternion vector is given below. The gain drives the norm of the quaternion state vector to 1.0 should
become nonzero. You must choose the value of this gain with care, because a large value improves the decay rate of the error in the norm, but also slows the simulation because fast dynamics are introduced. An error in the magnitude in one element of the quaternion vector is spread equally among all the elements, potentially increasing the error in the state vector.
Dialog Box
Inputs and Outputs
The first input to the block is a vector containing the three applied forces, in Newtons, and the second input is a vector containing the three applied moments, in Newton meters.
The first output is a three-element vector containing the velocity in the Earth-fixed reference frame, in meters per second.
The second output is a three-element vector containing the position in the Earth-fixed reference frame, in meters.
The third output is a three-element vector containing the Euler rotation angles [roll, pitch, yaw], in radians.
The fourth output is a 3-by-3 matrix for the coordinate transformation from Earth-fixed axes to body-fixed axes.
The fifth output is a three-element vector containing the velocity in the body-fixed frame, in meters per second.
The sixth output is a three-element vector containing the angular rates in body-fixed axes, in radians per second.
The seventh output is a three-element vector containing the angular accelerations in body-fixed axes, in radians per second.
Assumptions and Limitations
The block assumes that the applied forces are acting at the center of gravity of the body, and that the mass and inertia are constant.
Examples
See the Simulink model aeroblk_six_dof.mdl
for an example of the use of the 6DoF (Quaternion) block.
See Also
![]() | 6DoF (Euler Angles) | Acceleration Conversion | ![]() |