Implement quaternion representation of six-degrees-of-freedom equations of motion of simple variable mass in Earth-centered Earth-fixed (ECEF) coordinates
Equations of Motion/6DOF
The Simple Variable Mass 6DOF ECEF (Quaternion) block considers the rotation of a Earth-centered Earth-fixed (ECEF) coordinate frame (XECEF, YECEF, ZECEF) about an Earth-centered inertial (ECI) reference frame (XECI, YECI, ZECI). The origin of the ECEF coordinate frame is the center of the Earth, additionally the body of interest is assumed to be rigid, an assumption that eliminates the need to consider the forces acting between individual elements of mass. The representation of the rotation of ECEF frame from ECI frame is simplified to consider only the constant rotation of the ellipsoid Earth (ωe) including an initial celestial longitude (LG(0)). This excellent approximation allows the forces due to the Earth's complex motion relative to the “fixed stars” to be neglected.
The translational motion of the ECEF coordinate frame is given below, where the applied forces [Fx Fy Fz]T are in the body frame. Vreb is the relative velocity in the wind axes at which the mass flow () is ejected or added to the body axes.
where the change of position in ECEF is calculated by
and the velocity of the body with respect to ECEF frame, expressed in body frame , angular rates of the body with respect to ECI frame, expressed in body frame . Earth rotation rate , and relative angular rates of the body with respect to north-east-down (NED) frame, expressed in body frame are defined as
The rotational dynamics of the body defined in body-fixed frame are given below, where the applied moments are [L M N]T, and the inertia tensor I is with respect to the origin O.
The inertia tensor is determined using a table lookup which linearly interpolates between Ifull and Iempty based on mass (m). The rate of change of the inertia tensor is estimated by the following equation.
The integration of the rate of change of the quaternion vector is given below.
Aerospace Blockset™ uses quaternions that are defined using the scalar-first convention.
Specifies the input and output units:
Units | Forces | Moment | Acceleration | Velocity | Position | Mass | Inertia |
---|---|---|---|---|---|---|---|
Metric (MKS) | Newton | Newton meter | Meters per second squared | Meters per second | Meters | Kilogram | Kilogram meter squared |
English (Velocity in ft/s) | Pound | Foot pound | Feet per second squared | Feet per second | Feet | Slug | Slug foot squared |
English (Velocity in kts) | Pound | Foot pound | Feet per second squared | Knots | Feet | Slug | Slug foot squared |
Select the type of mass to use:
Fixed | Mass is constant throughout the simulation (see 6DOF ECEF (Quaternion)). |
Simple Variable | Mass and inertia vary linearly as a function of mass rate. |
Custom Variable | Mass and inertia variations are customizable (see Custom Variable Mass 6DOF ECEF (Quaternion)). |
The Simple Variable
selection conforms to the
previously described equations of motion.
The three-element vector for the initial location of the body in the geodetic reference frame. Latitude and longitude values can be any value. However, latitude values of +90 and -90 may return unexpected values because of singularity at the poles.
The three-element vector containing the initial velocity of the body with respect to the ECEF frame, expressed in the body frame.
The three-element vector containing the initial Euler rotation angles [roll, pitch, yaw], in radians. Euler rotation angles are those between the body and NED coordinate systems.
The three-element vector for the initial angular rates of the body with respect to the NED frame, expressed the body frame, in radians per second.
The mass of the rigid body.
A scalar value for the inertia of the body.
A scalar value for the empty mass of the body.
A scalar value for the full mass of the body.
A 3-by-3 inertia tensor matrix for the empty inertia of the body.
A 3-by-3 inertia tensor matrix for the full inertia of the body.
Select this check box to add a mass flow relative velocity port. This is the relative velocity at which the mass is accreted or ablated.
Select this check box to enable an additional output port for the accelerations in body-fixed axes with respect to the inertial frame. You typically connect this signal to the accelerometer.
Specifies the planet model to use: Custom
or
Earth (WGS84)
.
Specifies the radius of the planet at its equator. The units of the
equatorial radius parameter should be the same as the units for ECEF
position. This option is only available when Planet model is set to Custom
.
Specifies the flattening of the planet. This option is only available
when Planet model is set to
Custom
.
Specifies the scalar rotational rate of the planet in rad/s. This
option is only available when Planet
model is set to Custom
.
Specifies the source of Greenwich meridian's initial celestial longitude:
Internal | Use celestial longitude value from Celestial longitude of Greenwich. |
External | Use external input for celestial longitude value. |
The initial angle between Greenwich meridian and the
x-axis of the ECI frame. This parameter appears
if you set Celestial longitude of Greenwich source
to Internal
.
Select this check box to enable an additional output port for the accelerations in body-fixed axes with respect to the inertial frame. You typically connect this signal to the accelerometer.
Assign unique name to each state. You can use state names instead of block paths during linearization.
To assign a name to a single state, enter a unique name between quotes,
for example, 'velocity'
.
To assign names to multiple states, enter a comma-delimited list
surrounded by braces, for example, {'a', 'b', 'c'}
. Each
name must be unique.
If a parameter is empty (' '
), no name assignment
occurs.
The state names apply only to the selected block with the name parameter.
The number of states must divide evenly among the number of state names.
You can specify fewer names than states, but you cannot specify more names than states.
For example, you can specify two names in a system with four states. The first name applies to the first two states and the second name to the last two states.
To assign state names with a variable in the MATLAB® workspace, enter the variable without quotes. A variable can be a character vector, cell array, or structure.
Specify quaternion vector state names.
Default value is ''
.
Specify body rotation rate state names.
Default value is ''
.
Specify velocity state names.
Default value is ''
.
Specify the ECEF position state names.
Default value is ''
.
Specify the inertial position state names.
Default value is ''
.
Specify the Celestial longitude of Greenwich state name.
Default value is ''
.
Specify mass state name.
Default value is ''
.
Input | Dimension Type | Description |
---|---|---|
First | Vector | Contains the three applied forces in body-fixed axes. |
Second | Vector | Contains the three applied moments in body-fixed axes. |
Third | Scalar | Contains one or more rates of change of mass (positive if accreted, negative if ablated). |
Fourth (Optional) | Three-element vector | Contains one or more relative velocities at which the mass is accreted to or ablated from the body-fixed axes. |
Output | Dimension Type | Description |
---|---|---|
First | Three-element vector | Contains the velocity of body respect to ECEF frame, expressed in ECEF frame. |
Second | Three-element vector | Contains the position in the ECEF reference frame. |
Third | Three-element vector | Contains the position in geodetic latitude, longitude and altitude, in degrees, degrees and selected units of length respectively. |
Fourth | Three-element vector | Contains the body rotation angles [roll, pitch, yaw], in radians. Euler rotation angles are those between body and NED coordinate systems. |
Fifth | 3-by-3 matrix | Applies to the coordinate transformation from ECI axes to body-fixed axes. |
Sixth | 3-by-3 matrix | Applies to the coordinate transformation from NED axes to body-fixed axes. |
Seventh | 3-by-3 matrix | Applies to the coordinate transformation from ECEF axes to NED axes. |
Eighth | Three-element vector | Contains the velocity of body with respect to ECEF frame, expressed in body frame. |
Ninth | Three-element vector | Contains the relative angular rates of body with respect to NED frame, expressed in body frame, in radians per second. |
Tenth | Three-element vector | Contains the angular rates of the body with respect to ECI frame, expressed in body frame, in radians per second. |
Eleventh | Three-element vector | Contains the angular accelerations of the body with respect to ECI frame, expressed in body frame, in radians per second squared. |
Twelfth | Three-element vector | Contains the accelerations in body-fixed axes with respect to body frame. |
Thirteenth | Scalar | Is an element containing a flag for fuel tank status:
|
Fourteenth (Optional) | Three-element vector | Contains the accelerations in body-fixed axes with respect to ECEF frame. |
This implementation assumes that the applied forces are acting at the center of gravity of the body.
This implementation generates a geodetic latitude that lies between ±90 degrees, and longitude that lies between ±180 degrees. Additionally, the MSL altitude is approximate.
The Earth is assumed to be ellipsoidal. By setting flattening to 0.0, a spherical planet can be achieved. The Earth's precession, nutation, and polar motion are neglected. The celestial longitude of Greenwich is Greenwich Mean Sidereal Time (GMST) and provides a rough approximation to the sidereal time.
The implementation of the ECEF coordinate system assumes that the origin is at the center of the planet, the x-axis intersects the Greenwich meridian and the equator, the z-axis is the mean spin axis of the planet, positive to the north, and the y-axis completes the right-hand system.
The implementation of the ECI coordinate system assumes that the origin is at the center of the planet, the x-axis is the continuation of the line from the center of the Earth toward the vernal equinox, the z-axis points in the direction of the mean equatorial plane's north pole, positive to the north, and the y-axis completes the right-hand system.
Stevens, B. L., and F. L. Lewis, Aircraft Control and Simulation, Second Edition, John Wiley & Sons, New York, 2003.
McFarland, Richard E., A Standard Kinematic Model for Flight simulation at NASA-Ames, NASA CR-2497.
“Supplement to Department of Defense World Geodetic System 1984 Technical Report: Part I - Methods, Techniques and Data Used in WGS84 Development,” DMA TR8350.2-A.
6th Order Point Mass (Coordinated Flight)
Custom Variable Mass 6DOF (Euler Angles)
Custom Variable Mass 6DOF (Quaternion)
Custom Variable Mass 6DOF ECEF (Quaternion)
Custom Variable Mass 6DOF Wind (Quaternion)
Custom Variable Mass 6DOF Wind (Wind Angles)
Simple Variable Mass 6DOF (Euler Angles)
Simple Variable Mass 6DOF (Quaternion)
Simple Variable Mass 6DOF Wind (Quaternion)