4.4.1 Feedback Error Metrics

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 velocity errors.
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



where is 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 where 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 to zero.
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,



where is the desired angular velocity expressed in the desired reference frame, and is the direction cosine matrix as a function of the quaternion as defined in (4.16). Again, and , 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.