== Introduction ==Obtaining quaternion information from q-method involves solving We had begun with the eigenvalue problem of overdetermination because we had more equations than the unknown variables. Now, with sensor errors it becomes impossible to solve for a 4X4 Matrix. This can be done on MATLAB or other computer tools. But these variables such that it satisfies all the solution is numerically intensiveequations (remember, these equations are superfluous). On-board computing is So Wahba’s problem gives us a serious concern for any satellite designer and hence a better algorithm way to solve , if not circumvent, at least rationally deal with this problem using less computing is required. <br \>The QuEST algorithm provides It defines a less efficient but a ‘faster’ way weighted error function (i.e errors from each of the sensors are given weightage based on reliability) which is to solve the eigenvalue problembe minimised.
== The Algorithm ==Recall from [[Q Method and Wahba's Problem]] that the optimal attitude minimizes the loss function,[[File:Equation40Equation74.JPGpng|frame|center]]And maximizes The error function J can be simplified to a summation involving <math>w_k</math> (the weights, which are constants set by us) and the gain function, g as defined below[[File:Equation41Equation75.png|frame|center]]ThusIt is easy to see that minimising J is equivalent to maximising g. <br \>This expression when written in terms of quaternions becomes very compact. And qmethod showed that maximising g involved solving an eigenvalue problem. This can be done on MATLAB or other computer tools. But the solution is numerically intensive.<ref>http://www.dept.aoe.vt.edu/~cdhall/courses/aoe4140/attde.pdf</ref> Satellite makers need a better algorithm than [[Q Method and Wahba's Problem| Q-method]] to determine the attitude with minimal compromise in the accuracy. The QuEST algorithm provides a less efficient but a ‘faster’ way to solve the eigenvalue problem.<br \>QuEST starts with the assumption that sensor errors are minimal so that J can be minimised to a very low value. Rewriting J in terms of g,
[[File:Equation42.png|frame|center]]
[[File:Equation43.png]] where [[File:Equation44.png]] is the maximum eigenvalue of the K matrix defined in [[Q Method and Wahba's Problem]].
If we approximate J to be very small (this approximation is valid as we want to minimize J and now if after completing this method, we calculate J, it would be very small),
[[File:Equation46.png|frame|center]]
Defining and writing the equation in terms of Rodrigue’s parameter '''p''' simplifies the equationSo, generally, QuEST uses Newton Raphson method starting with [[File:Equation47Equation44.png|frame|center]]calculated above, and over multiple iterations reaches at a more accurate value for λ.<br \>where Notice how this is different from the qmethod. QuEST doesn’t directly solve for the eigen values. It starts with a reasonable guess and then moves on to check out if there are values close to this guess that can do better.<br \>Now to solve for the quaternion, both scalar and vector parts are divided <math>q_4 =cos \frac{\phi}{2}</math> (<math>q_4</math> is the scalar part; <math> \phi</math> is the vector along axis angle of rotation ). Note, this only changes the magnitude of the quaternion and Φ the final answer can be corrected for later by normalising it. So, the vector part now is <math>\boldsymbol{p} = \frac{\bar{\boldsymbol{q}}}{q_4} = a*tan\frac{\phi}{2}</math>,where <math>a</math> is the angle vector along axis of rotation. Eigenvalue The initial matrix equation, which was to be solved is now written turns out asfollows
[[File:Equation48.png|frame|center]]
Which can be solved '''p''' is being operated on by gauss an invertible matrix. And Gauss elimination. <br \>Once the could be employed to find its inverse and hence solve for '''p''' has been obtained. <br \>Finally, the quaternion can be found out by notingis normalised to get an unit quaternion.
[[File:Equation49.png|frame|center]]
Hence In general, while choosing between algorithm one has to make a tradeoff between getting a more accurate answer and implementing a computationally intensive code. QuEST adopts less accurate approach than qmethod at the estimated quaternion is obtained without solving eigenvalue equationcost of reducing computation. <br \>----
If you are done reading this page, you can go back to [[Attitude Determination and Control Subsystem]]
== References ==