Exposure Time Optimization for Highly Dynamic Star Trackers

Under highly dynamic conditions, the star-spots on the image sensor of a star tracker move across many pixels during the exposure time, which will reduce star detection sensitivity and increase star location errors. However, this kind of effect can be compensated well by setting an appropriate exposure time. This paper focuses on how exposure time affects the star tracker under highly dynamic conditions and how to determine the most appropriate exposure time for this case. Firstly, the effect of exposure time on star detection sensitivity is analyzed by establishing the dynamic star-spot imaging model. Then the star location error is deduced based on the error analysis of the sub-pixel centroiding algorithm. Combining these analyses, the effect of exposure time on attitude accuracy is finally determined. Some simulations are carried out to validate these effects, and the results show that there are different optimal exposure times for different angular velocities of a star tracker with a given configuration. In addition, the results of night sky experiments using a real star tracker agree with the simulation results. The summarized regularities in this paper should prove helpful in the system design and dynamic performance evaluation of the highly dynamic star trackers.


Introduction
As the highest accuracy attitude measurement device, star trackers are capable of providing arcsec level 3-axis attitude and are widely used in many spacecrafts. A star tracker can be treated as a special electronic camera connected to a microcomputer. It can take star images of a part of the sky and identify these stars in the star image. Based on the position information of these identified stars, the attitude of spacecraft can be determined [1][2][3][4].
With the expansion of the application fields, especially on spacecrafts with the capability of rapid and large angle attitude maneuver control, star trackers must still work normally and steadily. Under these highly dynamic conditions, a crucial problem arises: due to the large angular velocity of the spacecraft, the star-spots in the star image will move across many pixels during the exposure time and ultimately form obvious trails. This will affect star detection sensitivity and star location accuracy seriously and result in low attitude accuracy and poor stability. This case can be ameliorated by adjusting the dynamic working parameters, especially the exposure time. Increasing the exposure time means more energy is gathered at each star-spot, which enhances high star detection sensitivity, but on the other hand, increasing the exposure time aggravates the movement of the star-spots and makes it more difficult to locate them. By contrast, reducing the exposure time alleviates the movement effect and reduces star location errors, but at the cost of an energy loss. Therefore, under highly dynamic conditions there exists an optimal exposure time and it is necessary to choose this proper exposure time for star trackers.
As discussed above, under highly dynamic conditions the exposure time mainly affects two aspects of star trackers: star detection sensitivity and star location accuracy. The exposure time directly determines the total energy and length of each star-spot in the star image, and both of them together affect star detection sensitivity. Star detection sensitivity determines the number of the star-spots, which is an important factor affecting the attitude accuracy and stability of a star tracker. In the past years, some research about star detection sensitivity has been reported. In [5] a rough estimation method for star detection sensitivity utilizing the SNR model for static conditions was first reported. Reference [6] gives a general expression of star detection sensitivity based on the theory described in [5], but under highly dynamic conditions the star-spots model can't use the two-dimensional Gaussian distribution like in static conditions, so that the star detection sensitivity model developed for static conditions is not suitable for dynamic conditions. Reference [7] gives a dynamic star-spot imaging model, and obtains the regularity of star detection sensitivity at different angular velocities for a star tracker.
The movement of the star-spots during the exposure time also increases the difficulty of locating the star-spots and lowers the star location accuracy. The star location accuracy is the primary factor determining the attitude accuracy of a star tracker. In the past, many researchers have concentrated on the exploration of star location errors. Reference [8] obtains the star location error of the ideal star-spots in a 5 × 5 centroiding window by calculation of the effects of various noise components. Reference [9] shows an explicit expression of the S-curve systematic error caused by the different positions of the star-spot center in a certain pixel. Reference [10] gives a typical model of star location error containing a systematic contribution and a random one. However, all these researches mainly focus on static conditions, and we need to make research in depth the star location errors under highly dynamic conditions. This paper presents a method for optimizing the exposure time from the two aspects: star detection sensitivity and star location accuracy, and obtains the optimal exposure times for different angular velocities of a star tracker. This paper is divided into six sections. Following the Introduction, we first introduce the dynamic star-spot imaging model and star detection sensitivity with regard to the exposure time in Section 2. In Section 3, the star location error is deduced based on the error analysis of the sub-pixel centroiding algorithm, and the effect of the exposure time on the star location error is obtained. Combining the analyses in Sections 2 and 3, the overall effect of exposure time on attitude accuracy is obtained in Section 4, and the optimal exposure time is determined with the highest attitude accuracy as the criterion. Night sky experiments with a real star tracker are carried out in Section 5. Conclusions are drawn in the last section.

Dynamic Star-Spot Imaging Model
Under static conditions, the angular velocity of the carrier is very low and stars can be assumed to be point sources. The star is projected on the focal plane and this generates a defocused star-spot as shown in Figure 1. The point spread function of the optical system can be described as a two-dimensional Gaussian function, which is the energy distribution shape of the imaged star-spot. The static star-spot imaging model is given by [11]: where μ 0 is the total energy that star tracker absorbs from a single star during the exposure time, usually expressed using the signal photoelectrons, (x c , y c ) is the center of the star-spot, and σ pixel is the Gaussian radius, determined by the defocused extent of the optical system. The total signal photoelectrons μ 0 of the star-spot is calculated using the photoelectrons transmit model [7]: where τ A is the atmospheric transmissivity, τ 0 is the optical transmittance, E 0 = 2.96 × 10 −14 W/mm 2 , refers to the measured flux (on the Earth in the absence of the atmosphere) of the star with magnitude 0 [12], Mv is the magnitude, D is the optical aperture, T e is the exposure time, QE is the quantum efficiency of the image sensor, E ph is the average energy of a single photon, and K fill is the fill factor of the image sensor. Under highly dynamic conditions, the traditional two-dimensional Gaussian distribution is not suitable because the star-spots obviously move as shown in Figure 2. A tiny moment during the exposure time is taken out and expressed using the ΔT(t). In this moment the star-spot can be expressed approximately using the traditional two-dimensional Gaussian distribution [7]. Supposing that the star-spot center coordinates at any time t in the exposure period is (x c (t), y c (t)) and the total energy during the ΔT(t) is μ 0 (t), the star-spot model during this moment can be expressed as: Considering the angular velocity of the carrier is basically steady and the exposure time is not long, the star-spot trail can be regarded approximately as a beeline. The length of the star-spot trail can be calculated approximately using l = fwT e /DX, where f is the focal length, w is the angular velocity, T e is the exposure time and DX is the size of each pixel. Defining θ as the angle between the star-spot trail and the x axis and (x 0 , y 0 ) as the star-spot center coordinates at the time t = 0, (x c (t), y c (t)) is approximately: The total signal photoelectrons in (x, y) can be obtained by adding up the signal photoelectrons of all moments during the exposure time, so the dynamic star-spot imaging model can be obtained from the integral of S(x, y, t): On the real image plane, the total signal photoelectrons of the star-spot are divided into many pixels. The signal photoelectrons of the pixel (m, n) can be obtained through the integral of the S(x, y) in the pixel position:

SNR Model
Star detection sensitivity Mv is a magnitude threshold over which the star can be detected by a star tracker. Under highly dynamic conditions, it can be calculated using the SNR model. The SNR of a pixel is the ratio of its signal photoelectrons to its noise electrons.
For analysis convenience, we classify the pixels in the star-spot trail into two types. As shown in Figure 3, the pixels in the middle of the trail are classified as the first type, which includes the most photoelectrons. Those pixels next to the first type belong to the second type, whose photoelectrons are just secondary to the first type of pixels. If these two types of pixels can form a connected domain of a certain size, the star-spot can be correctly extracted from the star image. A criterion can be set that the star can be successfully detected if the second type of pixels in the connected domain meet the SNR requirement [13]. We define S as the average signal photoelectrons of the second type of pixels, and η as the ratio of the S to the total energy μ 0 . Taking the CMOS image sensor as an example, the noise electrons N of the pixel [14][15][16][17][18] is given as: where n DC , n S , n PRNU , n TN , n FPN , n ADC are dark current noise, photon shot noise, photon non-uniformity response noise, temporal noise, fixed pattern noise and analog-to-digital conversion noise, respectively, which are listed in Table 1. Therefore the SNR of the second type of pixels and the star detection sensitivity Mv can be expressed as: where S is the average signal photoelectrons of the second type of pixels, N is the average noise electrons of the same pixels, V sn is the SNR threshold.
which indicates the star detection sensitivity Mv is the only factor that affects the number of the star-spots in a given FOV.
Simulations are done to obtain the η values with different trail lengths (l = 0~19 pixels). The η is mainly affected by two factors: the length of the star-spot trail and the angle between the star-spot trail and the x axis. The angle depends on the direction of the angular velocity. The results with a 45° angle are shown in Table 2.
The product of the η and the trail length l approximates to a fixed value 0.264 when the length l > 9 pixels, which is a valid generalization that can be used to calculate the η when l > 19 pixels. The Mv and N star under different exposure times (T e = 0~200 ms) and different angular velocities (w = 1°/s, 2°/s and 4°/s) are also obtained in Figure 4, with other parameters listed in Table 3.   As shown in Figure 4a, the general regularity is that the star detection sensitivity rises rapidly at first and then slowly approaches a constant with the increasing exposure time. When the exposure time is very short, the star-spot trail is very short, and increasing the exposure time means the gathering of the energy in each pixel, so the SNR and star detection sensitivity rise quickly, but with the continually increase of exposure time, the star-spot moves longer and the total energy spreads out over more pixels. The energy of each pixel begins to increase slowly and finally remains invariable, so that the star detection sensitivity slowly approaches a constant.
The above analysis indicates that star detection sensitivity has a limit value for each angular velocity. In Figure 4a, star detection sensitivity of the star tracker with a given configuration at the angular velocities of 1°/s, 2°/s and 4°/s are 6.38, 5.65 and 4.91, respectively.
In addition, it must be noted that the critical exposure times when the star detection sensitivity approaches the limit value are different for different angular velocities. The higher the angular velocity is, the shorter the critical exposure time is. Under highly dynamic conditions, the increase of exposure time has two effects: the increase of the energy at a single pixel and the dispersion of the energy over several pixels. The critical exposure time, denoted as T SDS , can be regarded as the balance point of these two effects. In case that the exposure time is over the balance point, increasing the exposure time is useless and cannot produce higher star detection sensitivity.

Sub-Pixel Centroiding Algorithm
The sub-pixel centroiding algorithm is utilized to improve star location accuracy. Generally, the optical system of star tracker is slightly defocused, and the star-spots in the star image will occupy several pixels. This will help to calculate the star-spot centroid with sub-pixel accuracy. The sub-pixel centroiding algorithm is given by [19]:   (11) where C is a limited area, called centroiding window, S(x, y) is the dynamic star-spot imaging function in Equation (5), and (x c (t), y c (t)) is the star-spot center at the time t (0 ≤ t ≤ T e ).
For the dynamic star-spot, the prescriptive center of the whole star-spot trail is the star-spot center at the time t = T e /2: (x c (T e /2), y c (T e /2)). According to Equation (4), the x c (t) and y c (t) are approximately linear functions. Consequently, x __ ≈ x c (T e /2), y __ ≈ y c (T e /2), and it is feasible to use the sub-pixel centroiding algorithm to determine the star-spot location, even under highly dynamic conditions. In fact, it must be noted that the available image is discrete, and the imaging function S(x, y) is sampled in each pixel. The real formula used to calculate the star-spot centroid is: where n is the number of pixels in the centroiding window, (x k , y k ) is the geometric center of the kth pixel, and I k is the sampling value of the kth pixel. The sampling value I k is directly proportional to the amount of signal photoelectrons S k , which can be calculated using Equation (6) (13) where λ is the ratio, N well is the full well charge of the image sensor, and q is the quantization bits. Therefore, according to Equation (7), I k variance can be expressed as:

Star Location Error
Under highly dynamic conditions, star location error of the star tracker using the sub-pixel centroiding algorithm includes the following error sources: (1) The error from the nonlinearity of the x c (t) and y c (t), which is mainly caused by the variation of the angular velocity [20]. Considering the exposure time is usually very short, the angular velocity during that short time can be approximated as a constant in most cases, so this error is not taken into account in this paper. (2) The systematic error caused by using the geometric center of the pixel instead of the energy center in the sub-pixel centroiding algorithm. Under static conditions, it changes like the sine curve with the different position of the star-spot center in a pixel, and is usually called as the S-curve error [21]. (3) The random error caused by the random noises of the image sensor, which is determined by the range of the random noises and the length of star-spot trail. Generally, more noises and especially the noises at the pixel farther away from the star-spot centroid will aggravate this kind of error.
For convenience, the following analysis takes the x __ as an example. According to Equation (12), the star location error of the x __ derives from two sources: x k and I k . Assuming that the errors of different pixels are not correlated, the systematic error and the random error of the dynamic star-spot can be derived as:  (16) where σ x,2 is the systematic error resulting from the use of the geometrical center instead of the energy center, σ x,3 is the random error caused by the image sensor noises, and I 0 is the sum of all sampling values in centroiding window. The energy center of the kth pixel can be calculated as:  (17) where C k is the region of the kth pixel, S(x, y) is the dynamic star-spot imaging function, so the systematic error is written as: Substituting Equation (14) into Equation (16) The random error σ x,3 must be determined computing all the pixels with their noises in the centroiding window. If the centroiding window is set as the traditional rectangular window, the σ x,3 will obviously increase because many unnecessary pixels with fixed noises are computed. Generally, the centroiding window for the dynamic star-spot is set as the Window A in Figure 5. The length of Window A is the same as the star-spot trail, and its width is set to 6σ pixel pixels because the section plane of the star-spot trail fits Gaussian distribution. Dividing the Window A into many sub-windows like Window B whose width is just a pixel, some approximate expressions for calculating the σ x,3 are obtained as follows:  (20) where l is the length of the star-spot trail, θ is the angle between the star-spot trail and x axis, l 1 is the width of centroiding window, m is the length of the star-spot trail in the x direction. As shown in Figure 5, the number of the pixels in the sub-window is l 1 /cos(θ),and the m is lcos(θ) pixels. Obviously, the m is also the number of the sub-windows, and the total sampling value I B of the sub-window is I 0 /m: According to the dynamic star-spot model, the signal photoelectrons distribution of the sub-window fit approximately the Gaussian distribution with a Gaussian radius σ pixel /cos (θ). The sum of I k 2 in the sub-window is approximately I B 2 /(3.6σ pixel /cos (θ)) statistically: The l, I 0 and θ are three main factors affecting the random error, the l and I 0 are directly related to the exposure time, and the θ is decided by the direction of angular velocity. The total systematic error and the total random error can be written as: ,3 ,3 x y The simulation is carried out to obtain the two errors with different exposure times (T e = 0~200 ms) and different angular velocities (w = 1°/s, 2°/s and 4°/s), with other parameters listed in Table 3. Effects of exposure time on the σ 2 , σ 3 when the angle θ is 45°are shown in Figure 6. Under highly dynamic conditions, the systematic error also changes like the S-curve error under static conditions. The amplitude of the systematic error, as shown in Figure 6a, decreases like an inverse proportion function with the increase of exposure time. This is because the I k /I 0 is decreasing and the energy center of each pixel becomes nearer to the geometric center with the lengthening of the star-spot trail. The amplitude of the systematic error in the static condition is exp[−2(πσ) 2 ]/π, which mainly depends on the Gaussian radius [9]. For the 0.7 pixel Gaussian radius, it is just about 2 × 10 −5 pixels which is in agreement with the above simulation. Compared with the random error in Figure 6b, the systematic error is very small and negligible, so that the star location error under highly dynamic conditions mainly depends on the random error caused by the image sensor noises.
For the random error, it decreases slightly at first when the exposure time is very short, and then keeps rising at an almost fixed speed, which means an inflexion exists. According to Equation (23), at a given angular velocity, the random error is affected mainly by two factors: the total energy I 0 and the length l of the star-spot trail. When the exposure time is very short, the star-spot trail is very short and the total energy of each star-spot is very little. The increase of the exposure time means the gathering of the energy and the rising of the SNR, which results in that the random error decreases slightly at first. However, as the I 0 and l increase to some extent, the cube of the (lcos(θ) + 1) increases faster than the square of the I 0 , and the derivative of the random error to the exposure time is also almost a positive constant, so the random error begins to rise at a fixed speed. It is obvious that higher the angular velocity is, faster the length l increases, higher the speed is. We can denote the exposure time at the inflection point as T SLE , where the star tracker can achieve the highest star location accuracy.

Exposure Time Optimization
As an attitude measurement device, the main purpose of the star tracker is to provide highly-precision attitude information. Attitude accuracy is the most primary factor for performance evaluation. It can be estimated using the following equation [12]: where E cross-angle is the estimation of the attitude error, A is the FOV of star tracker, E centroid is the average star location error, N pixel is the pixel array of the image sensor, and N star is the number of the star-spots in the star image. For a given star tracker, A and N pixel can be regarded as constants, so the attitude accuracy is mainly determined by E centroid and N star which are directly related to the exposure time. Hence, we can optimize the exposure time using the highest attitude accuracy as the criterion. Combining star detection sensitivity and star location error, effect of exposure time on the attitude error is shown in Figure 7. Variation regularity of the attitude error is basically consistent with the star location error. It decreases at first and then increases. The curve also has an inflection point which is just behind the inflection point (T SLE ) of the star location error. According to Equation (24), the attitude error is directly proportional to E centroid and inversely proportional to the square root of N star . According to the previous analysis, when the exposure time is short, N star will increase and E centroid will reduce, so the attitude error decreases slightly at first. Then E centroid starts to rise when the exposure time pass T SLE , but the square root of N star increases more quickly than E centroid , which leads to the still decreasing of the attitude error. But with the continually increasing of exposure time, E centroid will get ahead of the square root of N star and the attitude error will increase. Finally, N star remains a constant and the increase speed of the attitude error is the same as the star location error. The exposure time for the inflection point of the attitude error, denoted as the optimal exposure time, is between T SLE and T SDS , which reflects exactly the overall consideration on star detection sensitivity and star location error. It is noticed that when the angular velocity is relatively low, for example the 1°/s in the figure, the attitude error has a flat variation which means that we can choose a proper exposure time from a wide range, but for high angular velocities, we must set the exposure time carefully to obtain the best performance. The optimal exposure times at different angular velocities are calculated as shown in Figure 8. The result shows the optimal exposure time decreases like the inverse proportion function with the increase of angular velocity.

Night Sky Experiments
To validate the result of the simulations, night sky experiments using a recently developed star tracker were carried out. The star tracker, shown in Figure 9a, has a 14° × 14° rectangular FOV with a CMOS image sensor consisting of 2048 × 2048 pixels, with other parameters as listed in Table 3. The night sky experiment was performed at the Xinglong Astronomical Observatory of the Chinese Academy of Sciences. The star tracker was placed on a one dimension rotary table which was mounted on a tripod as shown in Figure 9b. Angular velocities of the rotary table were set to 1°/s and 2°/s. The exposure times were set to 10,15,20,25,30,35,40,45, 50, 60, 80, 100, 120, 150, 175 and 200 ms respectively. For each of the 32 conditions, star-spot data of more than 100 star images were collected with the tested star tracker. The average number of the star-spots and the average star location error in each of conditions are calculated as shown in Figure 10. In Figure 10a, the general regularity of the average number of star-spots is that it increases fast at first and then levels off slowly with the increasing exposure time. It can be seen from the figure that for the angular velocity of 1°/s, the average star number is 6.46 at the exposure time of 10 ms, then reaches slowly to the limit value 23.01 at 100 ms. For the angular velocity of 2°/s, it is 6.78 at 10 ms, reaches the limit value 15.69 at 60 ms. To sum up, the numerical value and general regularity of the average number of star-spots in the experiment are in agreement with the results of the previous simulations.
The average star location error, as shown in Figure 10b, keeps rising in the range of the exposure time 10 ms to 200 ms. For the angular velocity of 1°/s, the star location error is 0.24 pixels at 10 ms, and then increases steadily at a fixed speed and reaches 0.82 pixels at 200 ms. For the angular velocity of 2°/s, it is 0.44 pixel at 10 ms, reaches 1.81 pixel at 200 ms. The experimental results of star location error also agree basically with the simulations.
Finally, the attitude error is calculated as shown in Figure 11. The attitude error at angular velocities of 1°/s and 2°/s both have their inflection points, which are the corresponding optimal exposure times with the value of about 30 ms and 20 ms respectively. In previous simulations as shown in Figure 8, the optimal exposure times are 30.7 ms and 17.6 ms for 1°/s and 2°/s respectively, which are very close to the experimental results. Figure 11. The attitude error with different exposure times in the experiment.

Conclusions
Effects of exposure time on star detection sensitivity and star location accuracy for a star tracker under highly dynamic conditions are analyzed in this paper. On this basis, the effects of exposure time on attitude accuracy and the corresponding optimal exposure times are also obtained. Some simulations and night sky experiments are carried out to validate these effects. The above content can be summarized as follows: (1) Under highly dynamic conditions, star-spots will move across many pixels and form an obvious trail on the image sensor during the exposure time. The length of the star-spot trail is decided by the angular velocity and the exposure time, and the higher the angular velocity is, the larger the exposure time is, so the longer the trail is. This phenomenon has a bad influence on star detection sensitivity and star location accuracy, which result in low star tracker attitude accuracy. (2) Firstly, the model of star detection sensitivity for the high dynamic condition is developed.
According to the simulation, the star detection sensitivity rises rapidly at first with the increasing exposure time, and then slowly approaches a limit value. The limit values at different angular velocities are different, and the higher the angular velocity is, the smaller the limit value is. The critical exposure time T SDS for the limit value are also different, and the higher the angular velocity is, the shorter the T SDS is.
(3) Then this paper establishes the model of star location error for the highly dynamic conditions, and identifies the main error sources through theoretical analysis and simulation. The simulation result shows that when the exposure time is very short, the star-spot trail is short and negligible. Increasing of exposure time means the gathering of the energy, which leads to the rising of SNR and the decreasing of star location error. When the exposure time increases to some extent, the star-spot trail gradually becomes obvious and the star location error starts to rise at a steady speed, and the higher the angular velocity is, the larger the rise speed is. Overall, the star location error has a minimum at the inflection point with the exposure time T SLE . (4) The estimation of attitude accuracy for highly dynamic conditions is obtained, which is used to determine the optimal exposure time of different angular velocities. The result shows the optimal exposure time is between the T SLE and the T SDS , and decreases like an inversely proportional function with the increase of angular velocity. (5) Night sky experiments using a CMOS star tracker have been carried out, and the experimental results validate those of the simulations.