# Custom Variable Mass 6DOF Wind (Quaternion)

Implement quaternion representation of six-degrees-of-freedom equations of motion of custom variable mass with respect to wind axes

**Library:**Aerospace Blockset / Equations of Motion / 6DOF

## Description

The Custom Variable Mass 6DOF Wind (Quaternion) block
implements a quaternion representation of six-degrees-of-freedom equations of motion of
custom variable mass with respect to wind axes. It considers the rotation of a
wind-fixed coordinate frame
(*X _{w}*,

*Y*,

_{w}*Z*) about an flat Earth reference frame (

_{w}*X*,

_{e}*Y*,

_{e}*Z*). The origin of the wind-fixed coordinate frame is the center of gravity of the body. For more information on the wind-fixed coordinate frame, see Algorithms.

_{e}Aerospace Blockset™ uses quaternions that are defined using the scalar-first convention.

## Limitations

The block assumes that the applied forces act at the center of gravity of the body.

## Ports

### Input

### Output

## Parameters

## Algorithms

The origin of the wind-fixed coordinate frame is the center of gravity of the body, and the body is assumed to be rigid, an assumption that eliminates the need to consider the forces acting between individual elements of mass. The flat Earth reference frame is considered inertial, an excellent approximation that allows the forces due to the Earth's motion relative to the “fixed stars” to be neglected.

The translational motion of the wind-fixed coordinate frame is given below, where the
applied forces [*F _{x}*,

*F*,

_{y}*F*]

_{z}^{T }are in the wind-fixed frame.

*Vre*

_{w}is the relative velocity in the wind axes at which the mass flow ($$\dot{m}$$) is ejected or added to the body.

$$\begin{array}{l}{\overline{F}}_{w}=\left[\begin{array}{l}{F}_{x}\\ {F}_{y}\\ {F}_{z}\end{array}\right]=m({\dot{\overline{V}}}_{w}+{\overline{\omega}}_{w}\times {\overline{V}}_{w})+\dot{m}\overline{V}r{e}_{w}\\ {A}_{be}=DC{M}_{wb}\frac{\left[{\overline{F}}_{w}-\dot{m}{V}_{re}\right]}{m}\\ {\overline{V}}_{w}=\left[\begin{array}{l}V\\ 0\\ 0\end{array}\right],{\overline{\omega}}_{w}=\left[\begin{array}{l}{p}_{w}\\ {q}_{w}\\ {r}_{w}\end{array}\right]=DM{C}_{wb}\left[\begin{array}{c}{p}_{b}-\dot{\beta}\mathrm{sin}\alpha \\ {q}_{b}-\dot{\alpha}\\ {r}_{b}+\dot{\beta}\mathrm{cos}\alpha \end{array}\right],{\overline{w}}_{b}=\left[\begin{array}{l}{p}_{b}\\ {q}_{b}\\ {r}_{b}\end{array}\right]\\ {A}_{bb}=DC{M}_{wb}\left[\frac{\overline{F}w-\dot{m}{V}_{re}}{m}-{\overline{\omega}}_{w}\times {\overline{V}}_{w}\right]\end{array}$$

The rotational dynamics of the 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. Inertia tensor
*I* is easier to define in body-fixed frame.

$$\begin{array}{l}{\overline{M}}_{b}=\left[\begin{array}{l}L\\ M\\ N\end{array}\right]=I{\dot{\overline{\omega}}}_{b}+{\overline{\omega}}_{b}\times (I{\overline{\omega}}_{b})+\dot{I}{\overline{\omega}}_{b}\\ {A}_{bb}=\left[\begin{array}{l}{\dot{U}}_{b}\\ {\dot{V}}_{b}\\ {\dot{W}}_{b}\end{array}\right]=DC{M}_{wb}\left[\frac{\overline{F}w-\dot{m}{V}_{re}}{m}-{\overline{\omega}}_{w}\times {\overline{V}}_{w}\right]\\ I=\left[\begin{array}{ccc}{I}_{xx}& -{I}_{xy}& -{I}_{xz}\\ -{I}_{yx}& {I}_{yy}& -{I}_{yz}\\ -{I}_{zx}& -{I}_{zy}& {I}_{zz}\end{array}\right]\end{array}$$

The integration of the rate of change of the quaternion vector is given below.

$$\left[\begin{array}{l}{\dot{q}}_{0}\\ {\dot{q}}_{1}\\ {\dot{q}}_{2}\\ {\dot{q}}_{3}\end{array}\right]=-\frac{1}{2}\left[\begin{array}{cccc}0& p& q& r\\ -p& 0& -r& q\\ -q& r& 0& -p\\ -r& -q& p& 0\end{array}\right]\left[\begin{array}{l}{q}_{0}\\ {q}_{1}\\ {q}_{2}\\ {q}_{3}\end{array}\right]$$

## References

[1] Stevens, Brian, and Frank Lewis.
*Aircraft Control and Simulation*, 2nd ed. Hoboken, NJ: John
Wiley & Sons, 2003.

[2] Zipfel, Peter H. *Modeling
and Simulation of Aerospace Vehicle Dynamics*. 2nd ed. Reston, VA: AIAA
Education Series, 2007.

## Extended Capabilities

## Version History

**Introduced in R2006a**

## See Also

6DOF (Euler Angles) | 6DOF (Quaternion) | 6DOF ECEF (Quaternion) | 6DOF Wind (Quaternion) | 6DOF Wind (Wind Angles) | Custom Variable Mass 6DOF (Euler Angles) | Custom Variable Mass 6DOF (Quaternion) | Custom Variable Mass 6DOF ECEF (Quaternion) | Custom Variable Mass 6DOF Wind (Wind Angles) | Simple Variable Mass 6DOF ECEF (Quaternion) | Simple Variable Mass 6DOF (Euler Angles) | Simple Variable Mass 6DOF (Quaternion) | Simple Variable Mass 6DOF Wind (Wind Angles)