## 1.

## Introduction

Let us assume that matrix $\mathbf{R}$ belongs to a special rotation group:

## (1)

$$\mathbf{R}\in \mathrm{SO}(3)\iff \mathbf{R}\in {\mathbb{R}}^{3\times 3}\text{:}\text{\hspace{0.17em}}\text{\hspace{0.17em}}{\mathbf{R}}^{T}\mathbf{R}=\mathbf{I},\mathrm{det}(\mathbf{R})=1,$$## (2)

$${\mathbf{v}}_{i}\in {\mathbb{R}}^{3}\u0438{\mathbf{w}}_{i}\in {\mathbb{R}}^{3}\text{:}\text{\hspace{0.17em}}\text{\hspace{0.17em}}|{\mathbf{v}}_{i}|=1,|{\mathbf{w}}_{i}|=1,$$We shall denote the function (3) as loss function

## (3)

$$L(\mathbf{R})=\frac{1}{2}\sum _{i=1}^{n}{k}_{i}{|{\mathbf{w}}_{i}-\mathbf{R}{\mathbf{v}}_{i}|}^{2},$$The norm of vector $\mathbf{x}$ hereinafter is understood to be the Euclidean norm

It is necessary to find the matrix ${\mathbf{R}}_{\mathrm{opt}}$ from SO(3) which minimizes the loss function

## (5)

$${\mathbf{R}}_{\mathrm{opt}}\text{:}\text{\hspace{0.17em}}\text{\hspace{0.17em}}L({\mathbf{R}}_{\mathrm{opt}})=\underset{\mathbf{R}\in \mathrm{SO}(3)}{\mathrm{Min}}L(\mathbf{R})\mathrm{.}$$This task is called the Wahba problem in honor of Grace Wahba, who has first posed it in Ref. 1. The geometrical meaning of the formulated task is as follows: finding such a rotation in 3-D space, which will maximally bring together the two systems of vectors.

The Wahba problem has important applied significance because its solution is necessary in stellar orientation systems for satellite attitude determination. Stellar orientation systems are intended for determination of satellite attitude in the inertial (geocentric) reference system, and presently they are the most precise among existing^{2} satellite orientation systems.

General functional diagram of a star tracker is shown in Fig. 1. Light from stars is passing through the optical path of the device and is projected on a photodetector. Using special algorithms,^{3}^{,}^{4} stars are segregated on the background of photodetector noise and optical distortions, and their directional cosines are determined in the star tracker reference system.

If vectors $\mathbf{w}$ are interpreted as the directional cosines of stars in the inertial geocentric stellar coordinate system and vectors $\mathbf{v}$ are interpreted as the directional cosines of the same stars but in the star tracker reference system, then matrix ${\mathbf{R}}_{\mathrm{opt}}$ obtained as the result of solving task (5) will determine the attitude of the satellite with reference to the Earth (if the universal time is known). Therefore, hereinafter we shall name ${\mathbf{R}}_{\mathrm{opt}}$ as optimal orientation matrix. Coefficients ${k}_{i}$ are chosen depending on the accuracy of determination of star coordinates on the photosensitive matrix, which is usually proportional to the star energy.

The values of vectors $\mathbf{v}$ are known not accurately because of star orientation instrument errors in the course of determining star positions. Such errors are caused by optical perversions (lens distortion and aberration), noise, and discrete structure of photosensitive matrix. The values of vectors $\mathbf{w}$ are also determined with errors due to inaccuracy of existing star catalogues.

Let ${\mathbf{v}}^{\mathrm{true}}$ and ${\mathbf{w}}^{\mathrm{true}}$ be the true (without introduced error) directional cosines of stars in the inertial reference system and the star tracker reference system, and let ${\mathbf{R}}_{\mathrm{true}}$ be the matrix determining the rotation, which aligns vectors ${\mathbf{v}}^{\mathrm{true}}$ and ${\mathbf{w}}^{\mathrm{true}}$

## (6)

$${\mathbf{w}}_{i}^{\mathrm{true}}={\mathbf{R}}_{\mathrm{true}}{\mathbf{v}}_{i}^{\mathrm{true}}.$$It is possible to consider that vectors $\mathbf{v}$ and $\mathbf{w}$ are

## (7)

$${\mathbf{v}}_{i}={\mathbf{v}}_{i}^{\mathrm{true}}+{\mathbf{\epsilon}}_{i}^{\mathbf{v}}\phantom{\rule{0ex}{0ex}}{\mathbf{w}}_{i}={\mathbf{w}}_{i}^{\mathrm{true}}+{\mathbf{\epsilon}}_{i}^{\mathbf{w}},$$There are two approaches to solve Wahba problem (5): direct minimization of loss function and exact analytical solution. Since the first formulation of the Wahba problem, numerous methods for its analytical solution have been proposed.^{5} Many of these methods seem quite simple, but actual computations come up against complications, e.g., finding the square root from an ill-conditioned matrix.

On the other hand, not much attention in the literature has been devoted to the possibility of direct minimization of the function $L(\mathbf{R})$. The reason is that the application of minimization methods requires the existence of sufficiently close initial approximation and calculation of function $L(\mathbf{R})$ values at every step. The laboriousness of calculating the values of function $L(\mathbf{R})$ grows with increase of the number of vectors $n$.

When solving the Wahba problem in connection with the task of a satellite attitude control, it is necessary to take into consideration the special features of the application domain and the resultant constraints on the character of input data. Usage of these constraints allows the creation of more efficient methods for solving the Wahba problem as compared with the generalized problem formulation. Two such constraints on the values of input data should be noted.

First, the number $n$ of stars for determining orientation usually is not over 50 because of optical characteristics of star trackers and distribution of stars over the celestial sphere. Actually, not all the stars are used for recognition, but only 10 to 15 of the brightest stars, because their coordinates have the highest accuracy.

Second, when considering the solution of the Wahba problem in connection with the task of satellite attitude control, one should take into account the fact that the errors of vectors $\mathbf{v}$ and $\mathbf{w}$ are small as compared with the minimal distance between two arbitrary vectors of the sequence.

## (8)

$$\mathrm{arcos}({\mathbf{v}}_{i}{\mathbf{v}}_{j})\gg |{\mathbf{\epsilon}}_{i}^{\mathbf{v}}|\gg |{\mathbf{\epsilon}}_{i}^{\mathbf{w}}|\phantom{\rule{0ex}{0ex}}\mathrm{arcos}({\mathbf{w}}_{i}{\mathbf{w}}_{j})\gg |{\mathbf{\epsilon}}_{i}^{\mathbf{v}}|\gg |{\mathbf{\epsilon}}_{i}^{\mathbf{w}}|\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\forall \text{\hspace{0.17em}}\text{\hspace{0.17em}}i=1,\dots ,n\phantom{\rule[-0.0ex]{1em}{0.0ex}}j=1,\dots ,n,\phantom{\rule[-0.0ex]{1em}{0.0ex}}i\ne j\mathrm{.}$$Inequalities in Eq. (8) are fulfilled since star catalogues are compiled providing a condition that a distance between the nearest stars by a few times exceeds permissible error ${\mathbf{\epsilon}}_{i}^{\mathbf{v}}$. If the star position error significantly exceeds the possible one (due to proton influence, pixel defects, etc.), then such stars will not be detected by identification algorithm, since they are rejected according to the criterion of mutual angular distances.

Provided that Eq. (8) is fulfilled, it is possible to calculate easily and with sufficient accuracy the initial approximation for the matrix ${\mathbf{R}}_{0}\approx {\mathbf{R}}_{\mathrm{opt}}$ using the triangle attitude determination (TRIAD) method.^{6}^{,}^{7} Using the initial approximation ${\mathbf{R}}_{0}$, it is possible to rotate vectors $\mathbf{v}$ so that they are sufficiently close to vectors $\mathbf{w}$:

The result from this is that

## (10)

$$\mathrm{arcos}({\mathbf{w}}_{i}{\tilde{\mathbf{v}}}_{i})\approx |{\mathbf{\epsilon}}_{i}^{\mathbf{v}}|.$$Hence, when solving the Wahba problem for the task of satellite orientation, it may be assumed that Eq. (10) applies.

## 2.

## Review of Methods for Solution of the Wahba Problem

A short but recent review of methods for solving the Wahba problem is given in Ref. 8. An earlier but detailed analysis of methods for solving the Wahba problem was made by Markley and Mortari in Ref. 5. The basic results related to this problem were obtained in 1980s and 1990s;^{9}10.11.12.^{–}^{13} however, due to rapid progress in space instruments development, in particular, in star sensors, this topic is still actively discussed during the last decade.^{5}6.^{–}^{7}^{,}^{14}15.16.17.18.19.20.^{–}^{21}

The majority of classic methods for solution of the Wahba problem are based on the usage of matrix $\mathbf{B}$ (sometimes called the attitude profile matrix^{6}), which is formed on the basis of vectors $\mathbf{v}$ and $\mathbf{w}$:

One of the first analytical solutions of the Wahba problem has been proposed by Farrell and Stuelpnagel,^{22} who have shown that ${\mathbf{R}}_{\mathrm{opt}}$ coincides with orthogonal matrix $\mathbf{W}$ of polar decomposition $\mathbf{B}=\mathbf{WS}$, where $\mathbf{S}$ is a symmetrical matrix.

According to Farrell, matrix $\mathbf{W}$ may be expressed using matrix $\mathbf{B}$ as

## (12)

$$\parallel {\mathbf{R}}_{\mathrm{opt}}-{\mathbf{B}\parallel}_{F}=\underset{\mathbf{A}\in \mathrm{SO}(3)}{\mathrm{min}}\parallel \mathbf{A}-{\mathbf{B}\parallel}_{F},$$According to Ref. 22, the $\mathbf{W}$ matrix may be expressed through the $\mathbf{B}$ matrix as

Though Eq. (13) appears quite simple, its practical application is connected with considerable difficulties. During solution of the task of satellite orientation, the vectors of sequence $\mathbf{v}$ corresponding to the directional vectors of the stars are located sufficiently close to each other (usually within the cone of 10 angular degrees or smaller), due to the size of the star tracker’s field of view (FOV). For this reason, matrix ${\mathbf{B}}^{T}\mathbf{B}$ is often an ill-conditioned matrix, and the process of computing its square root, for instance, with the Denman-Beaver iteration^{23} is either diverging or has large error.

Matrix $\mathbf{W}$ of polar decomposition may be expressed in terms of singular value decomposition (SVD) of matrix

asEquation (14) is the basis of the method proposed by Markley.^{11} The fast optimal attitude matrix (FOAM) and slower optimal matrix algorithm (SOMA) methods by Markley^{10} are also based on the idea of SVD of matrix $\mathbf{B}$, which in the mentioned methods is reduced to solving the system of nonlinear algebraic equations. According to the computational experiments performed by Markley,^{10} determination of the optimal orientation matrix using the SVD method has higher accuracy than the FOAM and the SOMA methods; however, the latter two methods are faster.

The most popular group of methods for solving Wahba problem are the methods (usually called q-method or Davenport method) calculating the quaternion of the respective orientation matrix ${\mathbf{R}}_{\mathrm{opt}}$, as the eigenvector corresponding to maximal eigenvalue ${\lambda}_{\mathrm{max}}$ of matrix $\mathbf{K}$:

## (16)

$$\mathbf{K}=\left(\begin{array}{cc}\mathbf{S}-s\mathbf{I}& \mathbf{b}\\ {\mathbf{b}}^{T}& s\end{array}\right),$$Vector $\mathbf{b}$ may also be expressed using components of matrix $\mathbf{B}$

## (20)

$$\mathbf{b}=\left[\begin{array}{c}{\mathbf{B}}_{23}-{\mathbf{B}}_{32}\\ {\mathbf{B}}_{31}-{\mathbf{B}}_{13}\\ {\mathbf{B}}_{12}-{\mathbf{B}}_{21}\end{array}\right].$$Matrix $\mathbf{K}$ is a symmetrical matrix; therefore, efficient algorithms exist for calculation of eigenvectors of the matrix, e.g., Jacobi method or the methods based on QR decomposition with preliminary reduction to tridiagonal form.^{24} However, implementation and debugging of such algorithms may be quite labor consuming, considering that coding often has to be performed using low-level programming languages or erasable programmable logic device (EPLD). It is necessary to keep in mind that the specified task has to be solved in real time. Besides, the capacity of spaceborne processors is significantly constrained. Therefore, despite small dimension of matrix $\mathbf{K}$, calculation of its eigenvectors may be laborious.

To avoid straightforward calculation of eigenvectors of matrix $\mathbf{K}$, Shuster and Oh^{9} have proposed the quaternion estimator (QUEST) algorithm, which gives an explicit formula for finding the eigenvector corresponding to the maximal eigenvalue ${\lambda}_{\mathrm{max}}$, provided that this value is known. The maximal eigenvalue is searched for as the root of a nonlinear algebraic equation, which the authors propose to solve using Newton-Raphson method. However, such method of finding eigenvalues is the least stable method, therefore, direct search of eigenvectors of matrix $\mathbf{K}$ gives more accurate results.

Other important results obtained by Schuster are as follows: he was the first to consider the problem from the statistical point of view and has shown that the loss function as a random value is distributed by chi-square distribution law with $2n-3$ degrees of freedom:

Schuster also has shown that the covariance matrix $\mathbf{P}$ of rotational angle error equals to:

Attitude angle errors are the values $\mathbf{\varphi}=({\varphi}_{1},{\varphi}_{2},{\varphi}_{3})$, such that

## (23)

$${\mathbf{R}}_{\mathrm{opt}}=\mathrm{exp}(-[\mathbf{\varphi}\times ]){\mathbf{R}}_{\mathrm{true}},$$Markley^{11} has shown that in case of a large number of observations, the following approximate estimate of the covariance matrix will be valid

The results obtained by Schuster and Markley show that the presented estimates of the Wahba problem are consistent. However, the issue of unbiasedness of the proposed estimates remains open. In order to determine what is the unbiased estimate for SO(3), at first it is necessary to clarify the concepts of mathematical expectation and the average value for the elements of this manifold. Two approaches for determination of the concept of average value for the rotation group—Euclidean and Riemannian—are given, for example, in Refs. 25 and 26.

The approaches to solve the Wahba problem that are closest to the approach proposed in this work were presented by Park and Kim,^{27} Mortari et al.,^{28} and Mortari.^{13} Authors of Ref. 27 were solving the task of constrained minimization similar to Wahba problem for position fixing using global positioning system. The methodology proposed by them is using the exponential relation between Lie group SO(3) and Lie algebra $\mathbb{so}(3)$ for determining the gradient of the loss function and for sequential search of its minimum using Newton’s method and steepest descent method.

The “energy approach algorithm”^{13} proposed by Mortari has a common feature with the proposed, in this article, small-angle rotation (SAR) method: based on the closeness of vectors $\mathbf{v}$ and $\mathbf{w}$, it substitutes the loss function by an approximate function—an energy function. Despite the similarity of the basic approach, the energy approach algorithm is principally different from the SAR because it is based on a computation of eigenvalues or SVD, while the SAR algorithm is based on solving the system of algebraic equations.

## 3.

## SAR Method for Wahba Problem Solution

## 3.1.

### Basic Definitions

Let $\mathbb{so}(3)$ be the set of skew-symmetric matrices

## (25)

$$\mathbb{so}(3)=\{\mathbf{A}\in {\mathbb{R}}^{3\times 3}\text{:}\text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathbf{A}+{\mathbf{A}}^{T}=0\}.$$The exponent of a square matrix $\mathbf{A}$ is the square matrix equaling the sum of infinite series

The properties of the matrix exponent are verified easily

In that case, if matrix $\mathbf{M}\in \mathbb{so}(3)$, then according to Eqs. (27) and (28)

## (30)

$$\mathrm{exp}{(\mathbf{M})}^{T}\mathrm{exp}(\mathbf{M})=\mathrm{exp}(-\mathbf{M})\mathrm{exp}(\mathbf{M})=\mathbf{I}.$$Taking into consideration Eq. (29), this means that $\mathrm{exp}(\mathbf{M})\in \mathrm{SO}(3)$. That is, the exponent of a skew-symmetric matrix is a rotation matrix

## (31)

$$\forall \text{\hspace{0.17em}}\text{\hspace{0.17em}}\mathbf{M}\in \mathbb{so}(3)\Rightarrow \mathrm{exp}(\mathbf{M})\in \mathrm{SO}(3).$$This remarkable fact has deep connection with the theory of Lie groups and algebra.^{29}

For vector $\mathbf{x}=({x}_{1},{x}_{2},{x}_{3})$, we shall denote, hereinafter, as $[\mathbf{x}\times ]$ the skew-symmetric matrix:

## (32)

$$[\mathbf{x}\times ]=\left(\begin{array}{ccc}0& {x}_{3}& -{x}_{2}\\ -{x}_{3}& 0& {x}_{1}\\ {x}_{2}& -{x}_{1}& 0\end{array}\right).$$Let $[\mathbf{a},\mathbf{b}]$ be the operation of cross product, then the following relations hold true

## 3.2.

### SAR Algorithm of the First Order (Angular Momentum Method)

Let us assume that a system of vectors $\mathbf{v}$ and $\mathbf{w}$ exists, satisfying condition (10) specified in Sec. 1. As already mentioned in Sec. 1, after determining the approximate attitude using TRIAD method,^{6}^{,}^{7} using transformations (9), it is possible to achieve the fulfillment of condition (10).

Let $\mathbf{\omega}=({\omega}_{1},{\omega}_{2},{\omega}_{3})$ be the rotation vector of the coordinate system. Then by reason of expression (31), it is possible to replace $L(\mathbf{R})=L[\mathrm{exp}(\mathbf{\omega})]=L(\mathbf{\omega})$, and in this case, the function $L$ may be represented in the form

## (34)

$$L(\mathbf{\omega})=\sum _{i=1}^{n}{k}_{i}{|{\mathbf{w}}_{i}-\mathrm{exp}([\mathbf{\omega}\times ]){\mathbf{v}}_{i}|}^{2}.$$As mentioned in Sec. 1, the rotation angle ${\mathbf{\omega}}_{\mathrm{opt}}$

## (35)

$${\mathbf{\omega}}_{\mathrm{opt}}\text{:}\text{\hspace{0.17em}}\text{\hspace{0.17em}}{\mathbf{R}}_{\mathrm{opt}}=\mathrm{exp}([{\mathbf{\omega}}_{\mathrm{opt}}\times ])$$## (36)

$$L(\mathbf{\omega})\approx {f}_{1}(\mathbf{\omega})=0.5\sum _{i=1}^{n}{k}_{i}{|{\mathbf{w}}_{i}-(\mathbf{I}+[\mathbf{\omega}\times ]){\mathbf{v}}_{i}|}^{2};$$## (37)

$${f}_{1}(\mathbf{\omega})=\mathrm{const}+\sum _{i=1}^{n}{k}_{i}(-{\mathbf{w}}_{i}^{T}[\mathbf{\omega}\times ]{\mathbf{v}}_{i}+0.5{\mathbf{v}}_{i}^{T}{[\mathbf{\omega}\times ]}^{2}{\mathbf{v}}_{i}).$$Taking into account Eq. (33)

## (38)

$${f}_{1}(\mathbf{\omega})=\mathit{const}+\sum _{i=1}^{n}{k}_{i}({[{\mathbf{w}}_{i},{\mathbf{v}}_{i}]}^{T}\mathbf{\omega}+0.5{\mathbf{\omega}}^{T}{[\mathbf{v}\times ]}^{2}\mathbf{\omega}),$$*const*means a constant independent from $\mathbf{\omega}$. Thus, the task of constrained minimization of the loss function $L(\mathbf{\omega})$ may be reduced to the task of unconstrained minimization of the quadratic form ${f}_{1}(\mathbf{\omega})$.

The necessary condition for achieving the extreme point by a function is equality of its gradient to zero. Due to symmetric property of matrix ${[\mathbf{v}\times ]}^{2}$, gradient ${f}_{1}(\mathbf{\omega})$ equals to

## (39)

$$\nabla {f}_{1}(\mathbf{\omega})=\sum _{i=1}^{n}{k}_{i}{[{\mathbf{w}}_{i},{\mathbf{v}}_{i}]}^{T}+\left(\sum _{i=1}^{n}{k}_{i}{[{\mathbf{v}}_{i}\times ]}^{2}\right)\mathbf{\omega}.$$The search for $\mathbf{\omega}$ satisfying the equality $\nabla {f}_{1}(\mathbf{\omega})=0$ is reduced to solve the system of algebraic equations

where and $\mathbf{b}$ is determined in Eq. (19).It is easy to note that matrix $\mathbf{A}$ coincides with the inertia tensor of material points determined by vectors ${\mathbf{v}}_{i}$ and having masses ${k}_{i}$. Hence, the solution of Eq. (40) has a vivid physical interpretation—it is necessary to find such angular velocity $\mathbf{\omega}$ for which the inertia momentum of a rigid system of material points defined by vectors $\mathbf{v}$ and having masses ${k}_{i}$ will equal to the inertia momentum of the same system, if unit velocity ${\mathbf{w}}_{i}$ is applied to each material point. At that, ${f}_{1}(\mathbf{\omega})$ function may be regarded as the value of kinetic energy of the system of material points.

Considering the mentioned mechanical interpretation, the SAR method of the first order may be also called the “angular momentum method.”

It is worth mentioning that Mortari in Ref. 13 also approximated the loss function by a function that he regarded as the kinetic energy function-energy of $n$ compressed springs with coefficients of rigidity ${k}_{i}$. In all the rest, Mortari’s approach has nothing common with the solution proposed here.

## 3.3.

### SAR Algorithm of the Second Order

It is logical to expect from a solution of the Wahba problem that in case of permutation of the sequences of vectors $\mathbf{v}$ and $\mathbf{w}$, the sought-for rotation matrix $\mathbf{A}$ would have to be inversed. For the SAR, it means that the SAR vector $\mathbf{\omega}$ changes its sign. However, for the SAR of the first order, in case of permutation of $\mathbf{v}$ and $\mathbf{w}$, the SAR vector, in general case, changes not only its sign but also the absolute value as well. The reason is that matrix $\mathbf{A}$ (41) depends only upon vectors $\mathbf{v}$ but does not depend upon vectors $\mathbf{w}$.

A modification of the SAR method invariant to permutation of vectors and giving the more accurate estimate of $\mathbf{\omega}$ than Eq. (40) is presented in this section.

Let us transform the loss function $L$ into the gain function, as was done in Ref. 6:

Thus, the task of minimizing the loss function was transformed into the task of maximizing the function $g(\mathbf{\omega})$. Using uncomplicated transformations, it is possible to demonstrate that

## (43)

$$g(\mathbf{\omega})=\sum _{i=1}^{n}{k}_{i}{\mathbf{v}}_{i}^{T}\mathrm{exp}([\mathbf{\omega}\times ]){\mathbf{w}}_{i}.$$Replacing the exponent by the first three terms of relevant series, it is possible to obtain the approximation of the function $g(\mathbf{\omega})\approx {f}_{2}(\mathbf{\omega})$

## (44)

$$g(\mathbf{\omega})\approx {f}_{2}(\mathbf{\omega})=\sum _{i=1}^{n}{k}_{i}{\mathbf{v}}_{i}^{T}(i+[\mathbf{\omega}\times ]+\frac{{[\mathbf{\omega}\times ]}^{2}}{2}){\mathbf{w}}_{i}$$## (45)

$${f}_{2}(\mathbf{\omega})=\mathrm{const}+\left(\sum _{i=1}^{n}{k}_{i}{[{\mathbf{w}}_{i},{\mathbf{v}}_{i}]}^{T}\right)\mathbf{\omega}+0.5{\mathbf{\omega}}^{T}(\sum _{i=1}^{n}{k}_{i}[{\mathbf{v}}_{i}\times ][{\mathbf{w}}_{i}\times ])\mathbf{\omega}\mathrm{.}$$## (46)

$$\nabla {f}_{2}(\mathbf{\omega})=\sum _{i=1}^{n}{k}_{i}{[{\mathbf{w}}_{i},{\mathbf{v}}_{i}]}^{T}+0.5(\sum _{i=1}^{n}{k}_{i}([{\mathbf{v}}_{i}\times ][{\mathbf{w}}_{i}\times ]+[{{\mathbf{w}}_{i}\times ]}^{T}{[{\mathbf{v}}_{i}\times ]}^{T}))\mathbf{\omega}.$$Finding $\mathbf{\omega}$ satisfying the equality $\nabla {f}_{2}(\mathbf{\omega})=0$ is reduced to solving the system of algebraic equations

where## (48)

$$\mathbf{A}=0.5\sum _{i=1}^{n}{k}_{i}([{\mathbf{v}}_{i}\times ][{\mathbf{w}}_{i}\times ]+{[{\mathbf{w}}_{i}\times ]}^{T}{[{\mathbf{v}}_{i}\times ]}^{T}).$$Let us assume ${\mathbf{v}}_{i}=({\mathbf{v}}_{i}^{1},{\mathbf{v}}_{i}^{2},{\mathbf{v}}_{i}^{3})$ and ${\mathbf{w}}_{i}=({\mathbf{w}}_{i}^{1},{\mathbf{w}}_{i}^{2},{\mathbf{w}}_{i}^{3})$, then matrix $\mathbf{A}$ looks as follows:

## (49)

$$\mathbf{A}=\frac{1}{2}\sum _{i=1}^{n}{k}_{i}\left[\begin{array}{ccc}-2({\mathbf{v}}_{i}^{3}{\mathbf{w}}_{i}^{3}+{\mathbf{v}}_{i}^{2}{\mathbf{w}}_{i}^{2})& {\mathbf{v}}_{i}^{1}{\mathbf{w}}_{i}^{2}+{\mathbf{v}}_{i}^{2}{\mathbf{w}}_{i}^{1}& {\mathbf{v}}_{i}^{1}{\mathbf{w}}_{i}^{3}+{\mathbf{v}}_{i}^{3}{\mathbf{w}}_{i}^{1}\\ {\mathbf{v}}_{i}^{1}{\mathbf{w}}_{i}^{2}+{\mathbf{v}}_{i}^{2}{\mathbf{w}}_{i}^{1}& -2({\mathbf{v}}_{i}^{3}{\mathbf{w}}_{i}^{3}+{\mathbf{v}}_{i}^{1}{\mathbf{w}}_{i}^{1})& {\mathbf{v}}_{i}^{2}{\mathbf{w}}_{i}^{3}+{\mathbf{v}}_{i}^{3}{\mathbf{w}}_{i}^{2}\\ {\mathbf{v}}_{i}^{1}{\mathbf{w}}_{i}^{3}+{\mathbf{v}}_{i}^{3}{\mathbf{w}}_{i}^{1}& {\mathbf{v}}_{i}^{2}{\mathbf{w}}_{i}^{3}+{\mathbf{v}}_{i}^{3}{\mathbf{w}}_{i}^{2}& -2({\mathbf{v}}_{i}^{2}{\mathbf{w}}_{i}^{2}+{\mathbf{v}}_{i}^{1}{\mathbf{w}}_{i}^{1})\end{array}\right]\mathrm{.}$$Matrix $\mathbf{A}$ is connected with attitude profile matrix $\mathbf{B}$ by the following equation:

where scalar $s$ and matrix $\mathbf{S}$ are expressed through attitude profile matrix $\mathbf{B}$, as shown in Eqs. (17) and (18).## 3.4.

### Matrix Corresponds to the Small-Rotation Vector

When the SAR vector $\mathbf{\omega}$ is found, the sought-for approximation of matrix ${\mathbf{R}}_{\mathrm{opt}}$ is obtained as

There are many methods for calculating matrix exponent,^{30} but for the case of a skew-symmetric matrix, the simplest way is to use the Rodriguez formula:^{29}

## (52)

$$\mathrm{exp}(\mathbf{\omega})=\mathbf{I}+\mathrm{sin}(\mathrm{\Theta})[\mathbf{\mu}\times ]+[1-\mathrm{cos}(\mathrm{\Theta})]{[\mathbf{\mu}\times ]}^{2},$$Instead of using the matrix form for setting the rotation in ${\mathbf{R}}^{3}$, it is preferable to use the quaternion presentation, which is more convenient as it requires less memory space and allows reduction of the number of operations necessary for vector rotation. Calculation of the orientation quaternion corresponding to rotation $\mathbf{\omega}$ is easier than calculation of the corresponding matrix:

Though usage of quaternions is more convenient from the computational point of view than usage of matrices, we shall continue using the matrix notations in this work for the sake of convenience of theoretical calculations. If required, the matrix notations may be easily substituted by quaternion analogs.

## 4.

## Evaluation of Solution Accuracy

It is necessary to determine the criteria for evaluation of the accuracy of the obtained solution. Different approaches to this issue are possible.

In technical applications, the error of star trackers is measured most often by three Euler angles by which matrix ${\mathbf{R}}_{1}$ must be additionally rotated in order to be aligned with matrix ${\mathbf{R}}_{2}$. Euler angles set the sequential rotation around axes OX, OY, OZ and are commonly used in mechanics and computer graphics and are called roll, pitch, and yaw.

For star sensors, axis OZ traditionally coincides with the optical axis of the device; therefore, the largest orientation errors are achieved for the third angle yaw (rotation around line of sight), whereas the roll and pitch errors are usually equaling to each other.

Euler angles are convenient for practical usage. Usually, a satellite is always facing the Earth with one of its sides (where scanning equipment or radio transmitter is located). The location of the star tracker within the satellite is known; therefore, the orientation error measured in Euler angles determines the error of directing the satellite on the Earth.

However, Euler angles are extremely inconvenient for theoretical evaluations, as they are not invariant to the change of coordinate system. Besides, it is desirable to express the combined error by one number rather than by three numbers.

For evaluation of a difference of rotation matrices, usually two metrics are used-Riemannian and Euclidean. In the first case, the set of rotation matrices SO(3) is regarded as Riemannian metric manifold with metric^{25}

## (54)

$${d}_{R}({\mathbf{R}}_{1},{\mathbf{R}}_{2})=\frac{1}{\sqrt{2}}{\Vert \mathrm{log}({\mathbf{R}}_{1}^{T}{\mathbf{R}}_{2})\Vert}_{F}.$$The Euclidean metric is based on the Frobenius norm

## (55)

$${d}_{E}({\mathbf{R}}_{1},{\mathbf{R}}_{2})=\frac{1}{\sqrt{2}}{\Vert {\mathbf{R}}_{1}-{\mathbf{R}}_{2}\Vert}_{F}.$$The value ${d}_{R}$ varies between 0 and $\pi $, whereas ${d}_{E}$ varies between 0 and 2. The set of all rotation matrices $\mathrm{SO}(3)$ is homeomorphic to a 3-D sphere in four-dimensional space, and each matrix may be interpreted as a point on this sphere. In such an interpretation, ${d}_{R}$ may be regarded as angle, whereas ${d}_{E}$ may be regarded as chord between respective points on the sphere.

The Riemannian distance $d({\mathbf{R}}_{1},{\mathbf{R}}_{2})$ defines the minimal absolute value of the angle by which the coordinate system ${\mathbf{R}}_{1}$ must be rotated around an arbitrary axis in order to align it with the coordinate system ${\mathbf{R}}_{2}$.

If the rotation is performed around one and the same axis for the angles ${\phi}_{1}$ and ${\phi}_{2}$, then for the matrices ${\mathbf{R}}_{1}({\phi}_{1})$ and ${\mathbf{R}}_{2}({\phi}_{2})$, the value of Riemannian metric ${d}_{R}({\mathbf{R}}_{1},{\mathbf{R}}_{2})$ equals to $|{\phi}_{1}-{\phi}_{2}|$, naturally complying with our perception of orientation error.

Considering that accuracy in optics and in astronomy is usually measured by angular minutes (or angular seconds), the value $d$ determining accuracy will be expressed hereinafter in angular minutes.

It is worth mentioning that in case of close matrices, Euclidean metric and Riemannian metric are close to each other

## (56)

$${d}_{E}({\mathbf{R}}_{1},{\mathbf{R}}_{2})\approx {d}_{R}({\mathbf{R}}_{1},{\mathbf{R}}_{2}).$$Based on geometrical interpretation of metrics, relation (56) means equality of arc length and chord length for small angles. As star trackers are high-precision instruments with accuracy of the order of angular seconds, it may be assumed that relation (56) holds for them. In order to highlight this fact, hereinafter, we shall denote the metric ${d}_{R}$ simply as $d$.

## 5.

## Step-by-Step Form of the Algorithm

*Input data* for the algorithm are:

${\mathbf{R}}_{0}$—initial approximation of orientation matrix;

$\mathbf{w}$, $\mathbf{v}$—sequences of unit 3-D vectors of dimensionality $n$;

$\mathrm{\epsilon}$—required accuracy of solution (in radians).

*Output data*:

*Intermediate data*:

All matrices and vectors have the dimension equal to 3.

The general scheme of the SAR is as follows. Gain function $g(\mathbf{\omega})$ is approximated by quadratic form ${f}_{2}(\mathbf{\omega})$. By solving the system of linear Eq. (42), the minimum of function ${f}_{2}(\mathbf{\omega})$ is found. When the respective rotation angles $\mathbf{\omega}$ are found which minimize the function ${f}_{2}(\mathbf{\omega})$, the rotation matrix $\mathbf{R}$ is calculated on its basis. Vectors $\mathbf{v}$ are rotated by matrix $\mathbf{R}$ and approach to $\mathbf{w}$.

These operations are repeated until rotation angle $\mathbf{\omega}$ becomes negligible in the framework of the task being solved.

The steps of iterative algorithm for solving Wahba problem using the SAR method:

1. Determining the initial approximation ${\mathbf{R}}_{0}$ using TRIAD method.

2. ${\mathbf{R}}_{\mathbf{\omega}}=\mathbf{R}={\mathbf{R}}_{0}$.

3. ${\mathbf{v}}_{i}={\mathbf{R}}_{\mathbf{\omega}}{\mathbf{v}}_{i}$, $i=1,\dots ,n$.

4. Determining, on the basis of formula (42), the parameters of the system of linear algebraic equations $\mathbf{A}$ and $\mathbf{b}$ using data $\mathbf{w}$ and $\mathbf{v}$.

5. Solving the system of linear algebraic equations $\mathbf{A}\mathbf{\omega}=\mathbf{b}$.

6. According to formula (52), obtaining rotation matrix ${\mathbf{R}}_{\mathbf{\omega}}$ from vector $\mathbf{\omega}$.

7. $\mathbf{R}={\mathbf{R}}_{\mathbf{\omega}}\mathbf{R}$.

8. If the condition ${\Vert {\mathbf{R}}_{\mathbf{\omega}}\Vert}_{F}^{2}<{\mathrm{\epsilon}}^{2}$ is satisfied, then go to step 9, else to step 3.

9. End of algorithm.

If the rotation is set by quaternion, the algorithm will be similar.

All the steps of the SAR algorithm are sufficiently simple for coding including low-level programming languages. The most source-consuming among these steps are extraction of square root and solving system of linear equations. Binary arithmetic has fast and effective methods for calculating square root. Implementation of Gauss method is also rather simple even using low-level programming languages. Moreover, solution of 3-D system may be easily implemented directly using Cramer formula (for such dimensions, it has a negligible influence on execution time and accuracy). At the same time, finding eigen numbers, even by means of the simplest Jacobi method, requires nontrivial logic which is not simple for implementation using assembler or EPLD without saying about more complicated methods.^{24} Methods of singular matrix decomposition are also complicated for implementation.

The first-order SAR algorithm was implemented in software of 329K star tracker,^{31} which successfully operates on board the data relay satellite Luch-5A since December 2011 and on board the satellite Luch-5B since November 2012. Implementation of the algorithm using digital signal processor (DSP) has shown that it is simple for coding and program debugging.

## 6.

## Simulation Results

## 6.1.

### Convergence of the Method

The SAR of the first order and the second order is obtained using approximation of matrix exponent by its decomposition into exponential series up to the first and the second power, respectively [Eqs. (36) and (44)]. Thus, approximation by means of loss functions ${f}_{1}(\mathbf{\omega})$ and ${f}_{2}(\mathbf{\omega})$ has, respectively, an error of orders $\mathbf{\omega}$ and ${\mathbf{\omega}}^{2}$. Since minimum of functions ${f}_{1}(\mathbf{\omega})$ and ${f}_{2}(\mathbf{\omega})$ is seeking exactly at each step according to formulae (40) and (47), so the final error of function $L(\mathbf{\omega})$ minimum will also have order of $\mathbf{\omega}$ and ${\mathbf{\omega}}^{2}$.

In order to test the accuracy and convergence of the proposed method, its modeling in MATLAB system has been performed. Data of Tables 1Table 2Table 3–4 are obtained by means of averaging not less than 100,000 experiments.

## Table 1

Average error of estimate Ropt using the singular decomposition method and the small-angle rotation (SAR) method of the first order in angular minutes.

Method | Step zero | First step | Second step | Third step | Fourth step | Fifth step |
---|---|---|---|---|---|---|

Singular value decomposition (SVD), Δ1 | 26.2657745 | |||||

SAR, Δ2 | 99.3452572 | 26.2961055 | 26.2657045 | 26.2657761 | 26.2657744 | 26.2657745 |

Difference, Δ | 73.1 | 0.0303 | −6.99×10−5 | 1.65×10−6 | 3.83×10−8 | 3.77×10−10 |

## Table 2

Value of loss function L(R) for the estimate using the singular decomposition method and the SAR method of the first order in angular minutes.

Method | Step zero | First step | Second step | Third step | Fourth step | Fifth step |
---|---|---|---|---|---|---|

SVD, Δ1 | 2.9383489 | |||||

SAR, Δ2 | 4.523 | 2.9395197 | 2.9383489 | 2.9383489 | 2.9383489 | 2.9383489 |

Difference, Δ | 1.58 | 0.00117 | 2.37×10−8 | 1.22×10−11 | 7.99×10−15 | −2.6×10−15 |

## Table 3

Average error of estimate Ropt using the singular decomposition method and the SAR method of the second order in angular minutes.

Method | Step zero | First step | Second step | Third step | Fourth step |
---|---|---|---|---|---|

SVD, Δ1 | 26.0686937 | ||||

SAR, Δ2 | 98.7480572 | 26.0750189 | 26.0686937 | 26.0686937 | 26.0686937 |

Difference, Δ | 72.68 | 0.0063252 | −5.5×10−10 | 1.83×10−12 | 1.78×10−12 |

## Table 4

Value of loss function L(R) for the estimate using the singular decomposition method and the SAR method of the second order in angular minutes.

Method | Step zero | First step | Second step | Third step | Fourth step |
---|---|---|---|---|---|

SVD, Δ1 | 2.9331031 | ||||

SAR, Δ2 | 4.5330924 | 2.9331278 | 2.9331031 | 2.9331031 | 2.9331031 |

Difference, Δ | 1.6 | 2.5×10−5 | 2.2×10−15 | −4.4×10−16 | −4.4×10−16 |

Simulation was performed as follows. Rotation matrix ${\mathbf{R}}_{\mathrm{true}}$ was set in random manner. $n$ unit vectors ${\mathbf{w}}_{i}$ were uniformly placed in a random manner in the FOV (spherical square $2W$) of the star sensor. Some errors were added in coordinates of each vector to $x$ and $y$ components of each vector. Vectors ${\mathbf{v}}_{i}={\mathbf{R}}_{\mathrm{true}}{\mathbf{w}}_{i}+\mathbf{\epsilon}$ were determined with subsequent normalization ${\mathbf{v}}_{i}={\mathbf{v}}_{i}/|{\mathbf{v}}_{i}|$, where $\mathbf{\epsilon}\sim N(0,\sigma )$—normally distributed random values. In this case, it was not allowed that star angular distances to be less than 10 SD $\sigma $ of the added error. Such restriction is quite reasonable since the adjacent stars are not included usually at the guide star catalogues.

Using the SAR and singular decomposition method, estimates of the matrix ${\mathbf{R}}_{\mathrm{opt}}$ were obtained for the sequence $\mathbf{w}$ and $\mathbf{v}$: ${\mathbf{R}}_{\mathrm{opt}1}\u0438{\mathbf{R}}_{\mathrm{opt}2}$. According to formula (49), the errors ${\mathrm{\Delta}}_{1}=d({\mathbf{R}}_{\mathrm{opt}1},{\mathbf{R}}_{\mathrm{true}})$ and ${\mathrm{\Delta}}_{2}=d({\mathbf{R}}_{\mathrm{opt}2},{\mathbf{R}}_{\mathrm{true}})$ were calculated.

The mentioned sequence of operations was performed for two SAR methods: the first and second order.

The values ${\mathrm{\Delta}}_{1}$ and ${\mathrm{\Delta}}_{2}$ and their difference $\mathrm{\Delta}={\mathrm{\Delta}}_{2}-{\mathrm{\Delta}}_{1}$ for the SAR methods of the first and second order are given in Tables 1 and 3. The values of square root from the loss function $L$ are given in Tables 2 and 4.

The following parameters were used during modeling: the side of the square FOV $2W=20$ angular degrees, number of stars $n=15$, SD $\sigma =10.0$ arc min. It should be noted that the SD value used during the simulation is much larger than actual values. This was done in order to increase the number of steps executed by the algorithm before reaching the optimal point. Solution by TRIAD method was used as the initial approximation.

As may be seen from Tables 1Table 2Table 3–4, the singular decomposition method provides more accurate estimate than the SAR though the difference becomes negligibly small after several iterations. Since the exact value ${\mathbf{R}}_{\mathrm{opt}}$ is not known, the estimate ${\mathbf{R}}_{\mathrm{opt}}$ may be approximated (with the accuracy of singular decomposition by method^{32}) by the estimate ${\mathbf{R}}_{\mathrm{opt}}$ of the SVD method. In this case, the third row of the table may be interpreted as the error of the SAR method.

In order to better understand the convergence behavior of the SAR, Figs. 2 and 3 show the dependence of the difference between accuracies of the methods from the number of iterations (in logarithmic scale). Every line in Figs. 2 and 3 corresponds to a single experiment (differing from Tables 1Table 2Table 3–4 whose data are obtained by means of averaging).

The simulation results confirm the conclusion about the method’s convergence rate. As may be seen from Fig. 2 and Table 1, SAR of the first order has linear convergence. Based on Fig. 3 and Table 3, the conclusion may be made that SAR of the second order has super-linear convergence. Graphs in Fig. 3 have form which differs from parabola because the difference between the SAR and the SVD method is stabilized starting from the third step. This is caused by the error of number representation with the type “double” and the error of the singular decomposition algorithm implemented by LAPACK software package.^{32}

At any rate, experimental data are indicative of the fact that the second-order method is by far more effective than that of the first order; therefore, the former is more expedient to be used for calculations. Given this, its computational complexity is just very little higher than that of the first order method. $\mathbf{A}$ matrix calculation for the second-order method will require more multiplication operations than it will for the first-order method. Otherwise, computational complexity of the algorithms is identical.

Simulation shows that if the error of initial approximation of orientation is of the order of 1 angular minute, then after one iteration of the SAR, the achieved resulting accuracy is of the order of ${10}^{-5}$ angular minute, abundantly meeting the requirements to the errors of state-of-the-art star trackers. In case of necessity, two iterations of the method may be performed. Performing more than three iterations of the SAR makes no sense because in this case, the accuracy of the method exceeds the accuracy of data presentation using the type double.

## 6.2.

### Method Stability against Single Errors

An important issue in star tracker attitude estimation is the presence of inaccurate data. Radiation, pixel failures, etc., can cause one or more of the star vectors to have noise values that are significantly larger than others. Methods such as the SVD method and Davenport’s q-method are very robust to this, while faster methods such as QUEST have more problems dealing with this.

Simulation was performed to verify stability of the SAR against errors of such kind. The errors of 60 arc sec, i.e., significantly larger than usual errors for stars, were added to directing vectors of two stars from 15. Since SAR accuracy significantly depends on accuracy of initial approximation, the most interesting for simulation is the case when two vectors having maximum errors are chosen to estimate initial approximation. The simulation data are presented in Table 5. The data of Table 5 were obtained by means of averaging not less than 50,000 experiments.

## Table 5

Comparison of SVD and SAR algorithms’ stability against single errors (errors of SD=60 arc sec are added to the first two vectors).

σ (arc sec) | 1 | 5 | 10 | 15 |
---|---|---|---|---|

SVD (arc sec) | 55.66742 | 57.10473 | 61.02592 | 67.56212 |

SAR, 1 step | 55.69210 | 57.10473 | 61.02592 | 67.56212 |

SAR1–SVD | 1.3×10−6 | −1.9×10−9 | −3.5×10−9 | 8.0×10−10 |

SAR, 2 steps | 55.66742 | 57.10473 | 61.02592 | 67.56212 |

SAR2–SVD | −1.4×10−10 | −1.9×10−9 | −3.6×10−9 | 8.7×10−10 |

Taking into account the characteristics of modern star trackers (with the FOV of angular radius $W\approx 10\text{\hspace{0.17em}}\mathrm{deg}$), SD for star position error is not able to exceed 1 arc min since else it will not be identified by the star identification algorithm according to criterion of mutual angular distances. Proceeding from this estimation, errors of 60 arc sec were added to the first two stars’ positions at the simulation. The SD $\sigma $ of errors for other stars is presented in Table 5 along with the simulation results.

The given Table 5 shows that the SAR algorithm is stable against random single errors and possesses, concerning this criterion, properties close to SVD algorithm. The difference in accuracy for SVD and SAR methods is comparable with the data presentation error.

## 7.

## Computational Aspects

## 7.1.

### Time of Algorithm’s Execution

The purpose of this section is to compare the computational complications of the SAR algorithm and the classical algorithms of solving the Wahba problem based either on SVD or on calculation of eigenvectors.

The components requiring the most computational efforts at each iteration of the SAR are rotation of $n$ vectors with subsequent computation of matrix $\mathbf{A}$ and evaluation of rotation vector $\mathbf{\omega}$ . From the computational point of view, these tasks are reduced to sequential multiplication of $n$ vectors by square matrix or quaternions and subsequent solution of the system of linear algebraic equations.

Although finding the eigenvectors is similar to solving the system of linear equations and is formally characterized by asymptotic^{33} complexity $O({m}^{3})$, the actual number of operations required for finding the eigenvectors is much higher. The reason is that the Jacobi method, similar to the methods of matrix reduction to standard forms and QR decomposition,^{24} requires numerous calculations of square root. Besides, the methods of finding the eigenvectors are iterative, i.e., require numerous recalculations until the desired accuracy is achieved. On the other hand, solving a system of linear equations requires a finite number of steps.

According to Ref. 33, the following statement is valid.

## Statement:

The Gauss method for a system of equations with dimensionality $m$ requires

multiplication and division operations.Based on Eq. (57), solution of the system of equations with dimensionality $3\times 3$ using the Gauss method requires only 17 multiplication operations.

It is obvious that computational complexity of all the algorithms mentioned in the review is $O(n)$ depending on the number of stars, since these algorithms are related to calculating attitude profile matrix $\mathbf{B}$ [Eq. (11)]. Moreover, besides the calculation of the matrix $\mathbf{B}$ rotation of $n$ vectors is required for SAR algorithm. Due to additional computational consumption for the vectors’ rotation, SAR algorithm has linear coefficient, which is larger than SVD and q-method have.

It is also obvious that time of the algorithm operation linearly depends on quantity of iterations.

To compare algorithmic complexity of the proposed algorithms with state-of-the-art algorithms, evaluation of their execution time in PC was performed. SVD, q-method, QUEST, and SAR of the second order for one and two iterations were chosen for the comparison. The algorithms were implemented using MATLAB 7/0 and a computer with the processor Intel Core Duo 2.00 GHz. Time of the algorithms’ execution versus number of stars and the number of iterations are presented in Figs. 4 and 5.

Interpretive program MATLAB is known for its slow operation, so the absolute values of execution time should be regarded very accurately. Real time of algorithm’s execution depends significantly on the method of its implementation using one or another processor. For comparison, time of SAR algorithm’s execution at a single iteration for 10 to 15 stars using 40-MHz DSP processor is equal to 10 *μ*s approximately. For modern space class DSP, this time will be tens of milliseconds.

It is seen from Fig. 4 that the methods SVD, q-method, and QUEST have the same linear coefficient of increase depending on the number of stars. The SAR method has larger linear coefficient comparing with SVD, the q-method, and QUEST and therefore its execution time will rise a greater extent at increasing number of stars. However, as was mentioned above, not all stars are used for recognition but usually only 10 to 15 of the brightest stars because their coordinates have the highest accuracy.

The fact, that SAR algorithms’ execution time rises a greater extent at increasing number of stars comparing with SVD, q-method, and QUEST is a fundamental property of the algorithms. At the same time, the constant constituent of the algorithm’s execution time (the graph value for two stars) may significantly vary depending on implementation of the algorithm using one or another processor.

The SAR algorithm’s execution time versus quantity of the method iterations is presented in Fig. 5. The number of stars in FOV is 10. Execution time for the algorithms SVD, the q-method, and QUEST (shown by horizontal lines) is given for comparison. As should be expected, the dependence has linear form. For quantity of iterations more than two, time of algorithms’ execution for SAR is essentially larger than for SVD, q-method, and QUEST. However, as was mentioned in the preceding section, to meet current accuracy requirements, the method’s one or two iterations are quite sufficient.

## 7.2.

### Conditionality of the Equation System Solution

Unlike the mentioned methods of finding the eigenvectors, solving a system of linear equations using the Gauss method does not require the calculation of square root, and that is the advantage of the SAR. However, employing other method of solution than the Gauss method may necessitate calculation of square root. For example, since matrix $\mathbf{A}$ is a symmetric matrix, the search for system may be solved using the Cholesky method, which, in general case, is more stable than the Gauss method.

To compare stability of the Gauss method and the Cholesky method, a computational experiment was performed. Both methods were programmed in C++ language using Visual Studio 2010. Numbers were represented with double precision. For device FOV angular radius ranging from 1 to 10 deg, matrices $\mathbf{A}$ were generated, and SAR vectors $\mathbf{\omega}$ were calculated by the Gauss method and the Cholesky method. The computational experiment showed that the difference between solutions obtained by the two methods is within ${10}^{-12}$ arc min, which is substantially smaller then the accuracy requirements raised to the present-day star trackers. Therefore, application of the Gauss method instead of the Cholesky method in the context of the task being solved is quite reasonable.

The largest difference in the accuracy of the Gauss method and the Cholesky method was observed for the smallest FOV. The reason is that the closer the stars (and the corresponding vectors) are located to each other, the more degenerated the task of finding the minimum of $L(\mathbf{\omega})$ function. The following fact holds that the smaller the FOV of the star tracker, the more elongated function $L$ is.

The problem of degeneracy of the search task is illustrated in Fig. 6 showing the dependence of the loss function $L$ from parameters ${\omega}_{2}$ and ${\omega}_{3}$. In order to enable the presentation of the dependence in 3-D space, it is supposed that ${\omega}_{1}$ value is known precisely. Figure 6 distinctly shows that diagram $L$ is elongated in shape, and its level lines are similar to ellipses. In optimization theory,^{34} such functions are named as “ravine functions.”

If $L$ function is approximated by a quadratic form, as was done in Eqs. (36) and (44), then the ratio of maximum and minimum singular values of matrix $\mathbf{A}$ of the quadratic form may serve as the measure of elongation of $L$. If matrix $\mathbf{A}$ is positively defined, then the square root of the above mentioned ratio is the ratio of the lengths of maximum and minimum semiaxes of the ellipsoid determined by the corresponding quadratic form. The ratio of maximum and minimum singular values is the matrix condition number $\mathrm{cond}(\mathbf{A})$ for Euclidean norm. Therefore, the size of the device FOV is connected with the elongation of $L$ function, which, in its turn, is connected with the condition number of matrix $\mathbf{A}$ and, respectively, with accuracy of finding $\mathbf{\omega}$.

Based on the mathematic simulation, a following observation was made, in case of disposition of stars in a circular FOV of angular radius $W$, the condition number of matrix $\mathbf{A}$ is proportional to squared cotangent of the FOV angular radius $W$ of the star tracker.

The author did not find the proof of this fact, but its truth is confirmed by simulation results for the several particular cases. During simulation, the stars were arranged in the FOV of the device as shown in Fig. 7. In total, 3 possible relative positions of stars were considered, for the number of stars $n=2,3,4$. Simulation results are shown in Fig. 8. The indicated dependence is valid also for other quantity and mutual positions of the stars.

It is worth mentioning that the problem of degradation of conditionality when the FOV is decreasing is not only the specific problem of the SAR but is also typical for the Wahba problem in general.

## 8.

## Conclusions

The SAR method proposed in this work is an iterative sequential method for solving the Wahba problem, having linear and quadratic convergence. For the data represented by double precision, the optimal solution is achieved after two iterations, with an error of initial approximation many times higher than actually possible. For actual data, one or two iterations of the method are sufficient. Each iteration of the method is reduced to sequential multiplication of $n$ vectors by a matrix or to multiplication of quaternions and solving of the system of linear algebraic equations with dimensionality 3. The method is stable against single errors of individual vectors.

The primary advantage of the proposed method as compared with classical methods based on calculation of eigenvectors and singular decomposition is the simplicity of implementation.

The SAR method of the first order was implemented in software of wide-angle star tracker 329K. The trackers of this type successfully operate already more than 1 year on board of the Russian data relay geostationary satellites Luch-5A and Luch-5B.

## Acknowledgments

This paper is written in the context of developing at JSC «SPE «Geofizika-Cosmos» the algorithms for multiple-head APS-based star tracker 348K. I would like to thank Andrey Zakharov of the Sternberg Astronomical Institute (Moscow State University) who encouraged me to conduct this research and Olga Amosova of Moscow Power Engineering Institute for her advice. Besides, I would like to thank Antonina Ivannikova for her support.

## References

## Biography

**Ivan S. Kruzhilov** received his MSc degree from the Moscow Power Engineering Institute in 2007. From 2005 to 2006, he was a scholarship holder of Siemens AG and studied at the Technical University Ilmenau. He finished his PhD degree in 2010 from the Moscow Power Engineering Institute. He took part in development of star tracker for Russian satellites “Luch-5A” and “Luch-5B” and multiple-head star tracker 348K developed at the Research and Production Enterprise Geofizika-Cosmos. He is a regular member of SPIE. His research interests are in applied mathematics and mathematical simulation.