To allow the controllers to calculate the torque necessary to
track the desired attitude, a set of error metrics are defined that
quantify the magnitude and direction of the attitude and angular
The attitude error is represented by a quaternion describing a rotation from the estimated reference frame to the desired reference frame, expressed in the vehicle reference frame coordinates. This error metric is calculated using the quaternion difference equation
the skew symmetric matrix defined in (4.11). The vector
points along the Eigen axis of rotation between the desired and
estimated reference frames with magnitude
is the magnitude of the angular error. The fact that
represents the most direct rotation to the desired attitude is one of
the reasons why the quaternion is desirable as a feedback error
metric. Note that ,
hence the goal of the controller is to drive
The angular velocity error is represented by a vector describing the velocity to be lost in order for the estimated velocity to match the desired velocity, expressed in the current vehicle reference frame coordinates. This error metric is created by subtracting the desired and estimated angular velocities,
is the desired angular velocity expressed in the desired reference
is the direction cosine matrix as a function of the quaternion as
defined in (4.16). Again,
so the goal of the controller is also to drive
to zero for tracking nonconstant .
Note that with these definitions of attitude and rate errors, the kinematics of the error quaternion are identical to (4.9), i.e.
This fact is instrumental in the design of the tracking controllers below.