The quaternion estimator algorithm (QUEST) is an algorithm designed to solve Wahba's problem, that consists of finding a rotation matrix between two coordinate systems from two sets of observations sampled in each system respectively. The key idea behind the algorithm is to find an expression of the loss function for the Wahba's problem as a quadratic form, using the Cayley–Hamilton theorem and the Newton–Raphson method to efficiently solve the eigenvalue problem and construct a numerically stable representation of the solution.
where are the vector observations in the reference frame, are the vector observations in the body frame, is a rotation matrix between the two frames, and are a set of weights such that . It is possible to rewrite this as a maximisation problem of a gain function
defined in such a way that the loss attains a minimum when is maximised. The gain can in turn be rewritten as
where is known as the attitude profile matrix.
In order to reduce the number of variables, the problem can be reformulated by parametrising the rotation as a unit quaternion with vector part and scalar part , representing the rotation of angle around an axis whose direction is described by the vector , subject to the unity constraint . It is now possible to express in terms of the quaternion parametrisation as
The optimal quaternion can be determined by solving the characteristic equation of and constructing the eigenvector for the largest eigenvalue. From the definition of , it is possible to rewrite
Since , it follows that and therefore for an optimal solution (when the loss is small). This permits to construct the optimal quaternion by replacing in the Rodrigues vector
.
The vector is however singular for . An alternative expression of the solution that does not involve the Rodrigues vector can be constructed using the Cayley–Hamilton theorem. The characteristic equation of a matrix is
where
The Cayley–Hamilton theorem states that any square matrix over a commutative ring satisfies its own characteristic equation, therefore
allowing to write
where
and for this provides a new construction of the optimal vector
that gives the conjugate quaternion representation of the optimal rotation as
where
.
The value of can be determined as a numerical solution of the characteristic equation. Replacing inside the previously obtained characteristic equation
.
gives
where
whose root can be efficiently approximated with the Newton–Raphson method, taking 1 as initial guess of the solution in order to converge to the highest eigenvalue (using the fact, shown above, that when the quaternion is close to the optimal solution).[1][2]
Crassidis, John L; Markley, F Landis; Cheng, Yang (2007). "Survey of nonlinear attitude estimation methods". Journal of Guidance, Control, and Dynamics. 30 (1): 12–28. Bibcode:2007JGCD...30...12C. doi:10.2514/1.22452.
Markley, F Landis; Mortari, Daniele (2000). "Quaternion attitude estimation using vector observations". The Journal of the Astronautical Sciences. 48 (2). Springer: 359–380. Bibcode:2000JAnSc..48..359M. doi:10.1007/BF03546284.
Psiaki, Mark L (2000). "Attitude-determination filtering via extended quaternion estimation". Journal of Guidance, Control, and Dynamics. 23 (2): 206–214. Bibcode:2000JGCD...23..206P. doi:10.2514/2.4540.
Shuster, M.D.; Oh, S.D. (1981). "Three-axis attitude determination from vector observations". Journal of Guidance and Control. 4 (1): 70–77. Bibcode:1981JGCD....4...70S. doi:10.2514/3.19717.
Yun, Xiaoping; Bachmann, Eric R; McGhee, Robert B (2008). "A simplified quaternion-based algorithm for orientation estimation from earth gravity and magnetic field measurements". IEEE Transactions on Instrumentation and Measurement. 57 (3). IEEE: 638–650. doi:10.1109/TIM.2007.911646. hdl:10945/46081. S2CID15571138.