Difference between revisions of "Q Method and Wahba's Problem"

From Satellite Wiki
Jump to: navigation, search
(Created page with "TRIAD method is useful when we have only two vector measurements. If we need better accuracy and have more than two vector measurements, we need to use a more general algorith...")
 
(Q-Method)
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
TRIAD method is useful when we have only two vector measurements. If we need better accuracy and have more than two vector measurements, we need to use a more general algorithm. Before developing an algorithm, we need to make our problem statement more precise.  
 
TRIAD method is useful when we have only two vector measurements. If we need better accuracy and have more than two vector measurements, we need to use a more general algorithm. Before developing an algorithm, we need to make our problem statement more precise.  
Suppose we have a set of N unit vectors v_k, k = 1,2...N. For each vector, we
+
Say we have N unit vectors <math>v_k</math>, k = 1,2...N. We have a sensor measurement in the body frame for each vector, <math>v_{kb}</math>, and a mathematical model of the components in the inertial frame, <math>v_{ki}</math>. Our aim is to find a rotation matrix <math>R_{bi}</math>, such that<br \>
have a sensor measurement in the body frame, v_{kb}, and a mathematical model of the components in the inertial frame, v_{ki}. We want to find a rotation matrix R_{bi}, such that<br \>
 
 
[[File:Equation25.png|frame|center]]
 
[[File:Equation25.png|frame|center]]
for each of the N vectors. Obviously this set of equations is overdetermined if N > 2,
+
for each of the N vectors. It is clear that this set of equations will be overdetermined for N > 2,
and therefore the equation cannot, in general, be satisfied for each k = 1,2..N. Thus
+
and hence the equation, in general, cannot be satisfied for each k = 1,2..N. Hence,
we want to find a solution for R_{bi} that in some sense minimizes the overall error for
+
we wish to find a solution for <math>R_{bi}</math> that in some way minimizes the overall error for
the N vectors. <br \>
+
the N vectors. <ref>http://www.dept.aoe.vt.edu/~cdhall/courses/aoe4140/attde.pdf</ref><br \>
[[File:Equation24.png|frame|center]]
+
[[File:Equation72.png|frame|center]]
In this expression, J is the loss function to be minimized, k is the counter for the
+
In this expression, J is the loss function that has to be minimized, k is the counter for the
N observations, w_k is weight assigned to the kth measurement, v_{kb} is the matrix of measured
+
N observations, <math>w_k</math> is weight assigned to the kth measurement, <math>v_{kb}</math> is the matrix consisting of the measured
components in the body frame, and vki is the matrix of components in the inertial
+
components in the body frame, and <math>v_{ki}</math> is the matrix consisting of components in the inertial
frame as determined by appropriate mathematical models. This loss function is a
+
frame as determined using appropriate mathematical models. This loss function is a
sum of the squared errors for each vector measurement. If the measurements and0
+
sum of the squared errors for each vector measurement. If the measurements and
mathematical models are all perfect, then the first equation on this page will be satisfied for all N vectors
+
mathematical models are perfect, then J = 0, since the first equation on this page will be satisfied for all N vectors. If there are any errors or noisy measurements, then J > 0. The smaller
and J = 0. If there are any errors or noisy measurements, then J > 0. The smaller
+
we make J, the better the approximation of <math>R_{bi}</math>.
we can make J, the better the approximation of R_{bi}.
 
  
 
== Q-Method ==
 
== Q-Method ==
In this section we present one method to solve this minimization problem known as the Q-method.  
+
In this section we present one of the several methods to solve this minimization problem known as the Q-method.  
 
We first expand the loss function as
 
We first expand the loss function as
[[File:Equation26.png|frame|center]]
+
[[File:Equation73.png|frame|center]]
Assuming that the vectors are normalized we see that,
+
Assuming normalized vectors, we see that,
[[File:Equation27.png|frame|center]]
+
[[File:Equation74.png|frame|center]]
 
Defining,
 
Defining,
[[File:Equation28.png|frame|center]]
+
[[File:Equation75.png|frame|center]]
We see that minimizing J is equivalent to maximizing g(R). This problem can be written in a more elegant way by representing rotation matrix R in terms of the quaternion
+
We can see that in order to minimize J, we need to maximize g(R). This problem can be written in a better and more elegant way by representing rotation matrix R in terms of the quaternion
[[File:Equation29.png|frame|Center]]
+
[[File:Equation29.png|frame|center]]
R can be written in terms of q as
+
R can be written in terms of q as <math>R = (q_4^2-q^Tq)I+2qq^T-2q_4[q  \times]</math><br \>
[[File:Equation30.png|frame|center]]
 
 
Where [q x] is the cross product matrix associated with q
 
Where [q x] is the cross product matrix associated with q
 
[[File:Equation31.png|frame|center]]
 
[[File:Equation31.png|frame|center]]
 
One can verify that the gain function in terms of the quaternions is:
 
One can verify that the gain function in terms of the quaternions is:
[[File:Equation32.png|frame|center]]
+
<math>g(\bar{q}) = \bar{q}^TKq</math><br \>
 
Where K is a 4x4 Matrix given by
 
Where K is a 4x4 Matrix given by
[[File:Equation33.png|frame|center]]
+
[[File:Equation77.png|frame|center]]
Wherein,
+
Wherein,<br \>
[[File:Equation34.png|frame|center]]
+
<math>B = \sum w_k(v_{kb}v_{ki}^T)</math><br \>
Now we want to maximise g, but noting that quaternion elements are not independent, but the constraint [[File:Equation35.png]] must also be satisfied. So we use lagrangian multiplier method and differentiate with respect to [[File:Equation36.png]] we get [[File:Equation37.png]] So now, the problem has been reduced to an eigenvalue problem for the matrix K.  
+
<math>S = B+B^T</math><br \>
Since, K is a 4x4 matrix, it can have at most 4 different eigenvalues. Substituting [[File:Equation37.png]] in [[File:Equation38.png]], we get  
+
<math>Z = \sum w_k(v_{kb} \times v_{ki})</math><br \>
 +
<math>\sigma = tr(B)</math> <br \>
 +
 
 +
Now we want to maximise g. However, noting that quaternion elements are not independent, the constraint <math>\bar{q}^Tq = 1</math> must also be satisfied. So we use the lagrangian multiplier method and differentiate with respect to <math>\bar{q}</math> we get <math>K\bar{q} = \lambda \bar{q}</math>. So now, we have reduced the problem to an eigenvalue problem for the matrix K.  
 +
Since, K is a 4x4 matrix, it can have at most 4 different eigenvalues. Substituting <math>K\bar{q} = \lambda \bar{q}</math> in <math>g(\bar{q}) = \bar{q}^TKq</math>, we get  
 
[[File:Equation39.png|frame|center]]
 
[[File:Equation39.png|frame|center]]
 
Now we want to maximise g. So we will chose the eigenvector corresponding to the maximum eigenvalue.
 
Now we want to maximise g. So we will chose the eigenvector corresponding to the maximum eigenvalue.
 
Hence the estimated attitude can be known by solving the eigenvalue problem for the matrix K. <br \>
 
Hence the estimated attitude can be known by solving the eigenvalue problem for the matrix K. <br \>
 +
----
 
If you are done reading this page, you can go back to [[Attitude Determination and Control Subsystem]]
 
If you are done reading this page, you can go back to [[Attitude Determination and Control Subsystem]]
  
 
== References ==
 
== References ==
http://www.dept.aoe.vt.edu/~cdhall/courses/aoe4140/attde.pdf
 

Latest revision as of 12:50, 19 February 2018

TRIAD method is useful when we have only two vector measurements. If we need better accuracy and have more than two vector measurements, we need to use a more general algorithm. Before developing an algorithm, we need to make our problem statement more precise. Say we have N unit vectors [math]v_k[/math], k = 1,2...N. We have a sensor measurement in the body frame for each vector, [math]v_{kb}[/math], and a mathematical model of the components in the inertial frame, [math]v_{ki}[/math]. Our aim is to find a rotation matrix [math]R_{bi}[/math], such that

Equation25.png

for each of the N vectors. It is clear that this set of equations will be overdetermined for N > 2, and hence the equation, in general, cannot be satisfied for each k = 1,2..N. Hence, we wish to find a solution for [math]R_{bi}[/math] that in some way minimizes the overall error for the N vectors. [1]

Equation72.png

In this expression, J is the loss function that has to be minimized, k is the counter for the N observations, [math]w_k[/math] is weight assigned to the kth measurement, [math]v_{kb}[/math] is the matrix consisting of the measured components in the body frame, and [math]v_{ki}[/math] is the matrix consisting of components in the inertial frame as determined using appropriate mathematical models. This loss function is a sum of the squared errors for each vector measurement. If the measurements and mathematical models are perfect, then J = 0, since the first equation on this page will be satisfied for all N vectors. If there are any errors or noisy measurements, then J > 0. The smaller we make J, the better the approximation of [math]R_{bi}[/math].

Q-Method

In this section we present one of the several methods to solve this minimization problem known as the Q-method. We first expand the loss function as

Equation73.png

Assuming normalized vectors, we see that,

Equation74.png

Defining,

Equation75.png

We can see that in order to minimize J, we need to maximize g(R). This problem can be written in a better and more elegant way by representing rotation matrix R in terms of the quaternion

Equation29.png

R can be written in terms of q as [math]R = (q_4^2-q^Tq)I+2qq^T-2q_4[q \times][/math]
Where [q x] is the cross product matrix associated with q

Equation31.png

One can verify that the gain function in terms of the quaternions is: [math]g(\bar{q}) = \bar{q}^TKq[/math]
Where K is a 4x4 Matrix given by

Equation77.png

Wherein,
[math]B = \sum w_k(v_{kb}v_{ki}^T)[/math]
[math]S = B+B^T[/math]
[math]Z = \sum w_k(v_{kb} \times v_{ki})[/math]
[math]\sigma = tr(B)[/math]

Now we want to maximise g. However, noting that quaternion elements are not independent, the constraint [math]\bar{q}^Tq = 1[/math] must also be satisfied. So we use the lagrangian multiplier method and differentiate with respect to [math]\bar{q}[/math] we get [math]K\bar{q} = \lambda \bar{q}[/math]. So now, we have reduced the problem to an eigenvalue problem for the matrix K. Since, K is a 4x4 matrix, it can have at most 4 different eigenvalues. Substituting [math]K\bar{q} = \lambda \bar{q}[/math] in [math]g(\bar{q}) = \bar{q}^TKq[/math], we get

Equation39.png

Now we want to maximise g. So we will chose the eigenvector corresponding to the maximum eigenvalue. Hence the estimated attitude can be known by solving the eigenvalue problem for the matrix K.


If you are done reading this page, you can go back to Attitude Determination and Control Subsystem

References