Real-time analysis of star sensor attitude accuracy

In the conventional methods of star sensor accuracy evaluation, neither the accuracy calculation formula nor the Monte Carlo method can comprehensively reflect the attitude measurement accuracy of star sensors in real-time. In this paper, a real-time analysis and calculation model for the attitude measurement accuracy of star sensors is proposed. Firstly, the basic attitude measurement model of the star sensor is established through the pinhole imaging model. Moreover, a moving frame of star sensor attitude measurement is established to avoid the defects of attitude representation by the Euler angle in the star sensor accuracy analysis. Then, combined with the error transfer of implicit overdetermined equations proposed in this paper, the error transfers of starspot extraction random error, star catalog random error, and intrinsic parameter system error are provided. Finally, simulation and field experiments are conducted to verify the accuracy of the proposed error analysis theory. The experimental results show that the attitude measurement accuracy of star sensors can be accurately estimated by using single-frame data of guide stars.


Introduction
The vast number of vehicles operating in outer space has expanded the range of human activity and cognition.In order to accomplish specific tasks like earth imaging, satellite communication, space observation, and interstellar travel, orbit and attitude accuracy should be ensured.As an attitude sensor, the star sensor is characterized by high accuracy, low power consumption, long life, strong antiinterference, and independent navigation without reliance on other systems.The star sensor is widely used in aeronautics and aerospace and has become the mainstream direction of attitude sensor research.
Accuracy is the most critical performance indicator of the star sensor.There are two types of methods to calculate the accuracy of star sensors; one is the theoretical calculation formula, and the other is the Monte Carlo algorithm.In the research of star sensors, there are many formulas to represent star sensor accuracy, including accuracy of attitude angle [1] , optical axis pointing accuracy [2,3]   , noise equivalent angle [4], and accuracy of starspot extraction [5,6] .However, these are only representations of partly influencing factors of attitude accuracy.As such, they cannot estimate star sensor accuracy in real-time.For example, the accuracy of attitude angle [1] , proposed by Abreu, is widely used in the design of star sensors.Attitude angle accuracy is an approximate estimate of the

Basic model
Firstly, the celestial coordinate system and the star sensor coordinate system are established, which are respectively expressed as ܱ െ ܺ ூ ܻ ூ ܼ ூ and ܱ െ ܺ ܻ ܼ .
Then, the yaw angle (optical axis pointing to right ascension), pitch angle (optical axis pointing to declination), and roll angle, which are the attitude angles of the star sensor, are defined as (ߙ, ߜ, ߶) [8] .Among these, yaw angle ߙ is the included angle between the axis ܱܺ ூ and the projection of axis ܱܼ on plane ܺ ூ ܱܻ ூ , where the counterclockwise direction of axis ܱܺ ூ is forward direction; pitch angle ߜ is the included angle between the axis ܱܼ and the projection of axis ܱܼ on plane ܺ ூ ܱܼ ூ , where the counterclockwise direction of projection is the forward direction; roll angle ߶ is the included angle between the axis ܱܻ and the projection of axis ܱܼ ூ on plane ܺ ܱܻ , where the clockwise direction of the projection is the forward direction.
According to the above definition of attitude angles of star sensor, the attitude transformation matrix [9] ூௌ (ߙ, ߜ, ߶) from the star sensor coordinate system (S system) to the celestial coordinate system (I system) is obtained.
It is assumed that the coordinates of ܰ starspots on the image plane are obtained as ‫ݔ({‬ , ‫ݕ‬ )|1 ݅ ܰ} by processing the star image captured by the star sensor.Moreover, the coordinates of the corresponding guide stars in the celestial coordinate system are {(ߙ , ߜ )|1 ݅ ܰ}, where (ߙ , ߜ ) respectively stand for the right ascension and the declination of ݅ th guide star.The attitude measurement of the star sensor is presented according to the pinhole imaging model as follows: where the unit direction vector of the guide star in the celestial coordinate system is expressed as: The unit direction vector of the guide star in the star sensor coordinate system can be written as: where ‫ݎ‬ = ඥ(‫ݔ‬ െ ‫ݔ‬ ) ଶ + ‫ݕ(‬ െ ‫ݕ‬ ) ଶ + ݂ ଶ is the normalization parameter, and ‫ݔ(‬ , ‫ݕ‬ ) and ݂ are the principal point and the focal length of the star sensor, respectively.Finally, the following equation is obtained based on Equation ( 1): where is the influential factor of attitude measurement and = [ߙ, ߜ, ߶] ் is the attitude angle of the star sensor.

Moving Frame Model
Two problems regarding the Euler angle must be addressed to describe the attitude accuracy of the star sensor.The first one is the singularity of the Euler angle representing attitude, i.e., when ߜ = ± గ ଶ , ߙ, and ߶ are not unique.The other more critical problem is that the same longitudinal arc lengths ‫ݏ‬ ఈ and ‫ݏ‬ ఋ correspond to different arc angles ߠ.In other words, the derivative of arc length with respect to arc angle is inconsistent: Theoretically, when the distribution of guide stars is determined in the field of view, the attitude accuracy of the star sensor is independent of the star sensor attitude.However, the derivative of latitudinal arc length with respect to the arc angle shown in Equation ( 5) is dependent on latitude.In other words, the yaw angle error in Equation ( 4) increases with the latitude for the same distribution of guide stars.Therefore, the proper definition of star sensor attitude angle is necessary to characterize the star sensor's attitude accuracy correctly.
According to Equation (5), the aforementioned problem disappears when the optical axis points towards the equatorial plane of the celestial sphere.The space determined by = [ߙ, ߜ, ߶] ் is a non-Euclidean space.However, its local space contains Euclidean geometric properties in the form of a three-dimensional manifold [10] .To ensure Euclidean geometric properties of the Euler angle, = [ߙ, ߜ, ߶] ் needs to establish a set of local bases that change with the optical axis (or a moving frame).Therefore, in this paper, it is proposed that the reference attitude matrix ூௌ ோ and local attitude matrix ூௌ are jointly employed to represent the attitude: where reference attitude matrix ூௌ ோ is the theoretical attitude matrix of the star sensor.Since the true value of ூௌ is typically unknown, the estimated value of attitude is usually used as a representation of ூௌ ோ = ூௌ .
To avoid confusion, the attitude angle corresponding to the local attitude matrix ூௌ is still represented by = [ߙ, ߜ, ߶] ் , i.e.: where ூௌ is represented by the 1-2-3 Euler rotation.(ߠ), (ߠ) and (ߠ) denote the basic transformation matrix of ܱܺ axis, ܱܻ axis, and ܱܼ axis rotating by an angle of ߠ, respectively.
In addition, a similar problem exists in the coordinate {(ߙ , ߜ )|1 ݅ ܰ} of the guide star in the celestial coordinate system.Similarly, the local rotation matrix is defined as where ௌூ (ߙ , ߜ ) = (ߜ ) (ߙ ), and ߙ and ߜ represent the yaw angle and pitch angle of the unit direction vector of the guide star in the local celestial coordinate system.
Finally, Equation ( 4) is modified into: The attitude angle = [ߙ, ߜ, ߶] ் of the star sensor is always in the proximity of the zero element under the representation of the moving frame.Therefore, the dependency of attitude accuracy on the coordinate system selection is avoided.Moreover, the reference attitude matrix ூௌ ோ = ூௌ does not need to solve the corresponding Euler angle.Thus, the Euler angle singularity problem is resolved.
The factors affecting the attitude measurement accuracy of the star sensor include the extraction error of starspots, the star catalog error, and the intrinsic parameter error.The extraction error of starspots and the star catalog error are random errors, while the intrinsic parameter error is a system error.
Due to conjugating object space light and image space light, the angular position error of the guide star in the star catalog is equivalent to the extraction error of starspots on the image plane.The angular position error of a guide star in the star catalog is less than 0.01" [11] .On the other hand, the angular error of starspot extraction is more than one order of magnitude higher.Therefore, compared with the extraction error of the starspot, the angular position error of a guide star in the star catalog can be ignored and will not be further discussed in this paper.Equation ( 8) is thus simplified as:

Error Transfer of Implicit Overdetermined Equations
We make the implicit overdetermined equations be: where and are independent and dependent variables, respectively.We take the differential expansion of Equation ( 10) with respect to (, ): where ߜ and ߜ are small quantities with respect to and , respectively.A generalized inverse solution is used as follows: where are sensitivity matrices of with respect to and , respectively.The mean vector represents the system error in Equation ( 12) due to the definite error transfer relation: Since it is impossible to obtain true values of (, ) , estimated value ൫ , ൯ are used for approximate representation: Due to its random distribution, the random error is represented by the covariance matrix of Equation ( 12): Similarly, since the true value of (, ) cannot be obtained, corresponding estimated values ൫ , ൯ are used for the following approximate representation: where = [(ߜ) ் ߜ] denotes the covariance matrix of independent variable error, and = [(ߜ) ் ߜ] denotes the covariance matrix of dependent variable error.The diagonal elements of both reflect the random noise level.Since Equation ( 10) represents implicit overdetermined equations, Equation ( 14) and Equation ( 16) are different from the error transfer of implicit well-determined equations [12] provided by the Joint Committee for Guides in Metrology (JCGM).They can be considered as more general error transfer formulas.

Simulation Experiment
A major trend of star sensor development [13] is low cost and miniaturization, which means smaller optical apertures and fewer guide stars.In the most extreme cases, only two guide stars are detected in the field of view.Then, an important issue is the distribution of the two guide stars in the field of view which can lead to high attitude accuracy.In this section, the answer is directly addressed through single-frame data analysis, and the theoretical results are compared by thousands of Monte Carlo calculations.The parameters of the star sensor are provided in Table 1.Then, the distribution of two stars in the field of view is divided into four types, as shown in Figure 1 and Table 2.
(1)Two stars near the center of the field of view; (2)Two stars near the edge of the field of view in the same region; (3)A single star near the center of the field of view, the other one near the edge; (4)Two stars near the edge of the field of view in different regions.2, and the Singular Value Decomposition (SVD) algorithm [14] are all employed to solve the attitude matrix of the star sensor ூௌ .Theoretical attitude parameters in Table 2 are placed into the reference matrix of the star sensor ூ ோ , and Equation ( 6) is used to calculate the local attitude matrix of the star sensor ூௌ = ൫ ூௌ ோ ൯ ் ூௌ .The attitude angle ൫ߜ ఈ, , ߜ ఋ, , ߜ థ, ൯ corresponding to ூௌ (1 ݇ ‫)ܭ‬ is solved by employing Equation (17): The attitude errors estimated by Monte Carlo are obtained according to Equation (18): It is incorrect to perform the Monte Carlo algorithm by directly obtaining the attitude angle via Equation ( 4) and calculating the attitude measurement error according to the difference between the true values of the attitude angle.As analyzed in Section 2, the Euler angle does not belong to the Euclidean space category, and Euclidean distance is not defined in the global space.Consequently, the incorrect Monte Carlo algorithm is meaningless for representing the star sensor accuracy.
The coordinates of single-frame starspots with extraction error, the parameters of the star sensor in Table 1, and the coordinates of guide stars in Table 2 are substituted into Equation ( 16).Thus, the covariance matrix of random errors in attitude measurement is obtained.The measurement errors of attitude angles estimated by using single-frame data are denoted by:  For comparison purposes, Abreu's attitude measurement accuracy evaluation of star sensor [1] is employed.This method can be expressed as ቀߪ ఈ (௨) , ߪ ఋ (௨) , ߪ థ (௨) ቁ.
As shown in Table 3, it can be observed that the results obtained by the proposed method are relatively close to the Monte Carlo results, which proves the effectiveness of the algorithm.The assumption of uniform distribution of guide stars is not valid for a few stars.Moreover, the attitude measurement accuracy of the star sensor depends on the distribution of guide stars in the sky.Abreu's method would result in a large deviation in the estimation of attitude measurement accuracy of the star sensor, especially in the roll angle accuracy estimation.
When only two guide stars are present in the field of view and are distributed on both sides of the principal point, the yaw angle and the pitch angle can be obtained with relatively high accuracy.Furthermore, the accuracy of the roll angle increases with the distance between the guide stars.
After analyzing the extraction error influence of starspot on attitude measurement accuracy, the influence of system errors of principal point and focal length on attitude measurement accuracy is further investigated.It is assumed that the calibrated values of the principal point and the focal length of the star sensor are (513, 511) and 31.9000mm, respectively.The corresponding system errors of the intrinsic parameter are (1, -1) pixels and 0.0407 mm, which are the attitude measurement errors induced by the estimation of system errors of the intrinsic parameter by substituting 70.3", -70.3", and -260" into Equation (14).The parameters of the case 4 experiment shown in Table 2 are taken as input, and the calculation result of the proposed method by using single-frame data is obtained as ቀο ఈ (ா௦௧) , ο ఋ (ா௦௧) , ο థ (ா௦௧) ቁ = (-66.9",-69.6", -0.1").Based on the star sensor parameters shown in Table 1, the coordinates of the two guide stars, and the theoretical coordinates of starspots in Table 2, the attitude matrix of the star sensor ூௌ is solved by employing the SVD algorithm.Theoretical attitude parameters in Table 2 are substituted into the reference matrix of the star sensor ூௌ ோ .Equation ( 6) is used to calculate the local attitude matrix of the star sensor ூௌ = ൫ ூௌ ோ ൯ ் ூௌ , and the attitude angles corresponding to ூௌ are obtained as ቀο ఈ (ெ) , ο ఋ (ெ) , ο థ (ெ) ቁ =(-66.7",-69.5", -0.1").Without changing other parameters, the system error of focal length is set to 0 mm, and recalculation results by using single-frame data are obtained as ቀο ఈ (ா௦௧) , ο ఋ (ா௦௧) , ο థ (ா௦௧) ቁ =(-70.8",-71.2",-0.2");ቀο ఈ (ெ) , ο ఋ (ெ) , ο థ (ெ) ቁ =(-70.8",-71.2", -0.2").Compared with the calculation results of the Monte Carlo method, it is found that the analysis theory of the proposed method well reflects the influence of the system error of intrinsic parameters on attitude measurement.In general, the star sensor image can be approximated in paraxial terms, i.e., ‫ݔ|‬ െ ‫ݔ‬ |, ‫ݕ|‬ െ ‫ݕ‬ | ‫ا‬ ݂.Then, the following expressions can be written: where ߝ is a small quantity associated with the field of view angle and uppercase ‫)כ(ܱ‬ denotes equivalent order.Then: where ൫ο ௫ , ο ௬ ൯ and ο are system errors of principal point and focal length, respectively.Equations ( 20) and ( 21) show that the effect of the focal length system error on the unit direction vector in the star sensor coordinates can be ignored in comparison with the effect of the principal point system error on the unit direction vector in the star sensor coordinates.In other words, once the star map matching is completed, the system error of focal length has less influence on the accuracy of attitude measurement than that of the principal point.This observation is consistent with the simulation results.

Field Experiment
In this paper, the error analysis model of star sensor attitude measurement is verified via the field experiment data.Before the experiment, the intrinsic parameters, including the principal point, the focal length, and the distortion of the star sensor, are calibrated, as shown in Table 4.The star sensor is fixed on a three-dimensional rotating platform.In contrast, the zero position of the Z-axis of the rotating platform coincides with the optical axis of the star sensor.The star sensor extracts starspot coordinates on the image plane, guides star tracking, matches star maps, and communicates with the host computer.After matching the star map, the extracted coordinates of starspots and the corresponding guide stars are output to the data acquisition computer at the frequency of 8 Hz via the communication interface of the star sensor.Each frame can output up to five guide stars.When the number of the extracted guide star exceeds five, the truncation output contains the first five tracked guide stars.Since the 3-axis rotating platform is in a static state relative to the ground, the earth is equivalent to a rotating platform subjected to a uniform motion.By combining guide stars and star catalog, the attitude angles (ߙ , ߜ , ߶ ), as shown in Figure 2(b) and the attitude matrix ூௌ of the star sensor are estimated.The attitude angle of a star sensor can be obtained by fitting estimation as the theoretical value ൫ߙ , ߜ , ߶ ൯.Then, the reference matrix of a star sensor ூௌ ோ is calculated.
After calibrating intrinsic parameters in a star sensor, the measured starspot extraction accuracy is approximately equal to ߪ = 0.1 pixel obtained by statistical analysis of an angular distance error.For independence assumption of angle measurement errors in and directions in the image plane coordinates, ߪ = ଵ ξଶ ߪ = 3.3".Then, the covariance matrix of random error of star image points extraction is equal to = ݂ ଶ ߪ ଶ ଶே×ଶே .The star sensor attitude angle calculates the attitude measurement accuracy of single star extraction error (ߙ , ߜ , ߶ ) and the relevant parameters of the star sensor are listed in Table 4.By substituting them into Equation ( 16) and Equation ( 19), the measurement errors of the attitude angles of single-frame dataቀߪ ఈ (ா௦௧) , ߪ ఋ (ா௦௧) , ߪ థ (ா௦௧) ቁ are obtained, as shown in Figure 3, with the corresponding averaged values of (1.6", 1.7", 14.7").The results are relatively close to the measured values, with the difference in measurement accuracy of the roll angle being 1.2" and the relative error being roughly 8%.When using the Abreu method 1 , the evaluated measurement accuracy of star sensor attitude is obtained as ቀߪ ఈ (௨) , ߪ ఋ (௨) , ߪ థ (௨) ቁ = (1.5",1.5", 13.6").The difference in measurement accuracy of the roll angle is 2.3", and the relative error is approximately equal to 15%.Moreover, with an increase in the number of guide stars, their uniform distribution is gradually achieved, and the measurement accuracy of the pitch and yaw angles obtained by Abreu's method is gradually improved.However, for a relatively large number of guide stars, the roll angle calculation accuracy of Abreu's method is still lower than the proposed method.Therefore, it is necessary to correct Abreu's method.To verify the system error of intrinsic parameter to attitude measurement accuracy, the calibrated values of the principal point and the focal length of the star sensor are assumed as (753, 772) and 23.9050 mm, respectively.Then, calculate the attitude matrix ூௌ for data matching to a star map.Moreover, according to the calibrated theoretical values of the principal point and the focal length of a field star sensor, which are (752,773) and 23.9087 mm, the attitude, i.e., the reference matrix ூௌ ோ of a star sensor, is calculated for data matching a star map.Equation ( 6) is used to calculate the local attitude matrix of the star sensor ூௌ = ൫ ூௌ ோ ൯ ் ூௌ .According to Equation (17), the attitude measurement errors ቀο ఈ, (ெ) , ο ఋ, (ெ) , ο థ, (ெ) ቁ (1 ݇ ‫)ܭ‬ corresponding to ூௌ is solved (black solid lines shown in Figure 4).Furthermore, the average values are obtained as (-48.8",-45.8", -2.8").The calibrated values of the principal point and the focal length of the indoor star sensor are (753,772) and 23.9000 mm, respectively.The system errors of intrinsic parameters are (1.0,-1.0) pixels and -0.0037 mm.The attitude measurement errors ቀο ఈ, (ா௦௧) , ο ఋ, (ா௦௧) , ο థ, (ா௦௧) ቁ (1 ݇ ‫)ܭ‬ (Red solid lines are shown in Figure 4) induced by the system errors of intrinsic parameters are estimated by Equation ( 14) for 47", -47", and -32".Due to the small variation of guide star distribution in the field of view, the average errors are obtained as (-45.7",-48.2", -2.7").Compared with the Monte Carlo, a minor difference exists between the two values.On the one hand, the aforementioned proves the effectiveness of the system error analysis method for intrinsic parameters.On the other hand, it is shown that the Euler angle has manifold characteristics, and the local space of the Euler angle is equivalent to a Euclidean space.Furthermore, according to the proposed method, the intrinsic parameters in the star sensor without error in focal length equal to (752, 773) and 23.9087 mm are substituted to calculate ቀο ఈ, (ெ) , ο ఋ, (ெ) , ο థ, (ெ) ቁ and ቀο ఈ, (ா௦௧) , ο ఋ, (ா௦௧) , ο థ, (ா௦௧) ቁ, as shown in Figure 5. Respective averaging results are (-47.0",-47.0", -2.7") and (-46.9",-47.0", -2.7"), i.e., an insignificant difference is observed between the two.Combined with the conducted experimental investigations, it can be concluded that the measurement system error of attitude angle caused by the principal point error is higher than the one caused by the focal length error.
Regarding the system errors of intrinsic parameters, the contribution of principal points to attitude measurement system error is much larger than that of a single-star extraction error to attitude measurement random error.The deviation caused by the system error of the principal point is constant, which can be eliminated by the calibration of the installation attitude matrix.However, it is difficult to eliminate the random error of attitude measurement caused by the starspot extraction error.

Conclusions
In this paper, the Euler angle was selected to intuitively represent the attitude of a star sensor.By employing the moving frame, the defects of attitude representation by the Euler angle in the accuracy analysis of star sensors were avoided, including the dependence of attitude accuracy on the selection of the coordinate system and the singularity of the Euler angle.The error transfer of implicit overdetermined equations was derived, and the attitude accuracy analysis of a star sensor was established, including the random and system error transfer models.The error transfer model of a star sensor was analyzed from three aspects: random error of starspot extraction, random error of star catalog, and system error of intrinsic parameter.
Conducted experimental analysis shows that the contribution of the random error of the star catalog to the attitude measurement of a star sensor can be ignored.Regarding the influences of system errors of intrinsic parameters on the attitude measurement accuracy of a star sensor, the system error of focal length contributes less to attitude measurement than the principal point.
The most significant difference between this paper and the previous models for attitude error or accuracy analysis of a star sensor is that the accuracy analysis proposed in this paper is a real-time error transfer model.After the star sensor completes the attitude capture, the corresponding attitude accuracy on each frame of the star image can be synchronously estimated.

ୀ
are sensitivity matrices of function with respect to and at the estimated value ൫ , ൯, and ο and ο = ൣο ఈ , ο ఋ , ο థ ൧ ் are system errors of influential factors and attitude measurement, respectively.

Figure 1 .
Figure 1.Different distributions of two guide stars in the field of view.

Table 4 .
Relevant parameters of the star sensor used in field experiments.experiments, the star sensor points at the zenith and the rotating platform are static.The earth is equivalent to a rotating platform moving slowly and uniformly.A total of ‫ܭ‬ = 5 000 frames of data are collected.The trajectory formed by the superposition of extracted coordinates of star image points is shown in Figure 2(a).

Figure 2 .
Figure 2. Field experiments: (a) trajectory formed by the superposition of starspots on the image plane, and (b) calculated attitude of the star sensor.

Figure 3 .
Figure 3. Positive and negative mean square deviation of attitude measurement errors ൫ߜ ఈ , ߜ ఋ , ߜ థ ൯ obtained by Monte Carlo method and by the proposed error analysis: (a) yaw angle, (b) pitch angle, and (c) roll angle.

Figure 4 .
Figure 4.In the field experiments, when the systematic errors of intrinsic parameters are set as (1.0,-1.0)pixels and -0.0037mm, the system errors of attitude angle obtained by the Monte Carlo (solid black lines) and the proposed method (solid red lines).Here, (a), (b), and (c) represent error analysis results of yaw, pitch, and roll, respectively.

Figure 5 .
Figure 5.In the field experiments, when the systematic errors of intrinsic parameters are set as (1.0,-1.0)pixels and 0mm, the system errors of attitude angle obtained by the Monte Carlo (solid black lines) and the proposed method (solid red lines).Here, (a), (b), and (c) represent error analysis results of yaw, pitch, and roll, respectively.

Table 1 .
Relevant experimental parameters of a star sensor.

Table 2 .
Experimental parameters associated with attitude.Each experiment case is simulated ‫ܭ‬ = 1000 times by Monte Carlo to estimate the actual attitude angle error.The coordinates of starspots with extraction error, parameters of the star sensor shown in Table1, coordinates of guide stars shown in Table )

Table 3 .
Comparison of attitude measurement error among various methods in the simulation experiment.

Table 5 .
Comparison of attitude measurement errors among different methods in field experiments.