Optimization of a Sun Vector Determination for Pinhole Type Sun Sensor

The sun vector is commonly used for defining a satellite attitude and many types of sensors exist for its determination. An attitude determination system is designed for each satellite project based on missions’ requirements. A fine pinhole sun sensor type was chosen and designed for HORYU-IV nanosatellite of Kyushu Institute of Technology. This sensor has a round-shaped hole and uses commercial off-the-shelf silicon photodiode, which consists of four small sensitive elements arranged close to each other. This type of sensors commonly uses look-up tables for providing high accuracy, which requires a large amount of data to be saved. Linear and polynomial methods for sun vector determination were considered instead of look-up tables to avoid having a large amount of data to be saved. Moreover, the influence of dead spaces between photodiodes on sensor accuracy was also investigated. Six real sun sensors and their theoretical models with different configurations were designed for investigating the difference between various calculating methods. The comparison of accuracies between proposed methods for real sun sensor models leads to two main findings: 1) on average, a polynomial method decreases error level of determined angle by 70% when compared with linear method; 2) accounting for gaps between photodiodes further decreases the average error of the angle determined by 15 % for polynomial, and by 6% for linear method when compared with methods not accounting for gaps.


Introduction
There are various attitude determination systems (ADS) applied to find satellite orientation relative to an inertia reference or some object of interest, such as the Earth, and two or more Http://www.granthaalayah.com ©International Journal of Research -GRANTHAALAYAH [437] reference vectors are required to achieve this [1]. A sun vector is one of the commonly used directional unit vectors and it can be measured by sun sensors. Sun sensors can be devided in two types: analog and digital sensors [2]. The selection of a sun sensor type depends on a considered satellite's mission requirements. For HORYU-IV nanosatellite developed at Kyushu Institute of Technology (Kyutech), a fine analog round-shaped pinhole sun sensor (Figure 1) was selected and developed. It uses a commercial off-the-shelf (COTS) analog sensor namely, quadrant silicon PIN photodiode S4349 (Hamamatsu), which consists of four small photodiodes arranged close to each other [3]. This type of sun sensor was chosen because of relative ease of production and low cost.
Quadrant photodiode sensors often use look-up tables to describe relations between output signals from photodiodes and a sun vector [4]. Look-up tables provide the best accuracies. However, a large amount of data has to be saved in the sensor memory or ADS when using them [5]. In the case of HORYU-IV, the ADS did not have enough memory to save all data from lookup tables. Moreover, sensors also had to be calibrated on-orbit. Hence, fitting equations with few coefficients were considered. They give less accuracy than look-up tables but they are more convenient and for many nanosatellites they can provide acceptable accuracy.
When look-up tables are replaced by fitting equations, parameters such as pinhole shape and the gaps size between photodiodes influence the sun vector accuracy or field of view (FOV). Many commercial analog pinhole sun sensors for nanosatellites have square-shaped hole [6]- [9] and simple linear equations can be used for sun vector determination. When square-shaped holes are used taking into account gaps between photodiodes is relatively easy to do since the intersection area has a square shape. The sun sensor developed for HORYU-IV has round shaped-hole primarily because it is easier to manufacture when compared with square-shaped one. Therefore in this case, two problems appeared: 1) taking gaps into account by calculating the intersection area betwen a circle and rectangles; 2) decrease in FOV or accuracy when using linear equations [10]. Information which could explain how to solve them was scarce [10]. Hence, a polynomial equation and also a method to take into account gaps were thus investigated for improving sun vector determination. Without using look-up tables, this paper compares combinations of considered methods to determine accuracy of sun sensor with round-shaped pinhole. Six real sun sensors were built and compared with their corresponding theoretical models. Diameter of each pinhole and respective distance between pinhole to photodiodes plane were variables. Comparisons were made for calibrated sensors.

Sensor Concept
Operation of the sensor is based on a principle that when an incident light passes through a pinhole it illuminates a spot on the four photodiodes ( Figure 2). Each diode's output is a current proportional to the amount of light it is exposed to [10]. Ratios of obtained output data (c x , c y ) calculated by (1)-(2) provide an information to define the light spot centre (x, y) [5]- [6], [12]. (1) Where, A, B, C, and D are output signals from photodiodes.

Testing Environment and Accuracy
The accuracies of developed sun sensors were verified in the testing environment as shown in Fig. 3. It consisted of a light source, a rate table, and a rotative holder with an inclinometer. With this set up, a sun sensor could be rotated around two axis of the test table: X (manual rotation) and Y (automatic rotation). The angles were measured by the inclinometer and a built-in encoder Http://www.granthaalayah.com ©International Journal of Research -GRANTHAALAYAH [439] in the rate table with the same accuracy of 0.05 deg. The combination of these two devices produced a maximum positioning error of 0.07 deg.
The test table allowed to build a map of depencies between a sensor output signals and its orientation with respect to the light source with average steps of 1 deg for X axis and of 0.08 deg for Y axis. The output data were synchronized data from the rate table, the inclinometer, and the tested sun sensor. Data were transmited through COM ports to PC and all data were visualised and collected in one set using an in-house developed program using Matlab and Simulink softwares.

Investigated Area in the Sensor
The sensor's FOV can be divided in four groups. Each group represents areas of the light spot center on the sensor plane where different number of photodiodes detects light at the same time ( Figure 4). Equations (1)-(2) are applicable in cases where a light spot is seen by three or four photodiodes. In this case, the sensor works as a fine sun sensor in these areas. The size of the areas can be changed by varying the pinhole diameter. With regard to FOV, the maximal and optimal diameter is equal to half the sensor size, L. The minimal diameter should be bigger than the gap between photodiodes [12].

Accounting for Gaps Between Photodiodes
Gaps exist between photodiodes ( Figure 5) and can be an additional source of error for the sun angle determination. This error depends on the pinhole diameter and gaps size. For the error correction (1)-(2) should be modified as described by (3)-(4).
(3) Where, G ABCD represents a lost signal due to all gaps being covered by light spot; G AB , G BC , G AD , and G CD represent lost signals due to gaps related to considered pairs of photodiodes (respectively, AB, BC, CD, and AD) being covered by a light spot.  The output signals detected by photodiodes are proportional to areas covered by a light spot. Based on it, equation (5) can be used for calculating lost signals due to gaps.
Where, S A , S B , S C , and S D are areas of photodiodes covered by a light spot; S Gi is the area of a gap between the considered photodiodes covered by a light spot.
For example, an S G between A and B photodiodes can be found as described in (6).
Where, S 1 and S 2 are shown in Figure 5 and are calculated using (7)-(8): Where, a 11   Equations (7)-(8) can be converted to a simpler form for the calculations in the simulations. An example for S 1 is given in (9)-(11).
Derivative of the equations is shown in (12).
After a series of tests with real sun sensors, it was found that (5) did not correctly represent gaps variation. Hence, a coefficient, which reduces signal loss due to gaps, was added as described in (13).
Where, k G is the coefficient, which should be determined during a calibration process. The sum of output signals, U, is used as a criteria for choosing k G as described in (14).
Where, α is the incident angle of light measured by the testing equipment ( Figure 3). This is used for the correction of the silicon photodiodes output current sinusoidal variations with regards to the sun angle [1].
For all angles, the sum of output signals, U, when a light spot is fully located on the photodiodes, should be constant in the cases where photodiodes are placed near each other without gaps.
Taking into account the gap should compensate for signal loses if there are spaces between photodiodes. An example is shown in Figure 6 for a sun sensor with a pinhole diameter of 1 mm and a distance between photodiodes of 0.1 mm. There are three sets of graphics which represent three different k G : 1) k G,1 =∞ (when gaps are not taken into account); 2) k G,2 =6 (provides reduced gap compensation); and 3) k G,3 =1 (provides full gap compansation). For k G,1 =∞ gaps produce signal loses, but with k G,1 =1 the compensation signal is much larger than required. An optimal coefficient to prevent signal loss was found to be k G,2 =6. Figure 6: Output signals correction by taking into account gaps with different coefficients.

Determination of Sun Vector
Sun vector is determined in terms of sun's elevation and azimuth with related to a sun sensor frame. Distance from the pinhole to the photodiodes plane, h, and coordinates of a light spot center are used for calculating the angles. Coordinates can be easily found based on output information from the rate table and the inclinometer. Hence, dependencies between calculated ratios of output signals (c x , c y ) and obtained coordinates (x, y) can be also found. An example of the dependencies for X axis is shown in Figure 7-a. The ratios were calculated with gaps accounting for a sun sensor with pin hole diameter 1 mm. The dependencies are represented by curves obtained by continuous rotation of the rate table from -40 deg to +40 deg for different constant inclinations of the sun sensor holder. The initial position of the test table had perpendicular orientation with regards to a light beam (the rate table encoder and the inclinometer showed 0 deg). Figure 7-b shows the same curves in 2-D interpretation. It can be seen that the curves are similar and can be considered as one curve. It has sinusoidal form due to combination of a roundshaped pinhole and squared photodiodes.
The main goal was to find equations which would fit curves for X and Y axis and give light spot center coordinates with respect to output signals. Linear as well as polynomial equations were considered.
(15) (16) Where, x l , y l are the coordinates of a light spot; k x , k y are the coefficients of fitted line inclination (k x =k y for simetrical quadrant photodiode).
A sensor can be adjusted for different combinations of accuracy and FOV by varying k x , and k y . For the linear method, accuracy and FOV are inversely proportional for any cases with a line inclination comprised between cases 1 and 3 (Figure 8-a). Angle error for each of three line inclination are shown in Figure 8-b. Concluion of Figure 8 can be found in Table 1. It shows that inclination of fitted line can be choosen for achieving highest accuracy with limited FOV (case No 1) or maximum FOV with limited accuracy (case No 3).
(a) Schematic representation of linear curve fitting using different inclinations.

Polynomial Equation
Using Matlab software, sets of curves obtained by (3)-(4) were averaged and polynomial parameters were found using a curve fitting tool. It was defined that increasing the polynom over the 7 th order would not give considerable improvement in angle error correction. The curves in Figure 7 are sinusoidal and for this reason, even parameters in the polynomial equation can be omitted as described by (17)-(18). An example angle error determination is shown in Figure  9. It can be seen that polynomial method has uniform distribution of angle error in 100% of sensor's FOV.

Methods Comparison
The type of sensor has low FOV. Hence, sensor accuracy with maximum FOV (case No 3 for linear method) was chosen as criteria for comparison. Four methods were compared: 1) linear without taking into account gaps; 2) linear taking into account gaps; 3) polynomial without taking into account gaps; 4) polynomial taking into account gaps.
The sensor FOV and accuracy can be changed by varying the distance from photodiodes to pinhole plane, h, and by varying the pinhole diameter, d. Hence, by combining two diameters (1 mm and 1.5 mm) with three pinhole to photodiodes plane distances (1.73 mm, 3.15 mm and 6.76 mm), the six resulting sun sensor configurations could be considered.
Real sun sensors and their theoretical models were created for defining the various accuracies calculated by the considered methods. The theoretical model was developed based on statement that output signals from the sensor are proportional to areas covered by a light spot. A geometrical problem was solved to obtain the data.
During calibration of real sun sensors it was defined that the optimal coefficient, k G , when gaps accounting is equal to 6. The same coefitient was used for theoretical models (for the cases where k G =1, accuracies for methods 2 and 4 are higher). Table 2 and Table 3 respectively show obtained accuracies and FOVs for modeled and real sun sensors. Accuracies were measured in degrees and represent 3σ deviation of an angle between a sun vector determined by the testing equipment and measured by a sun sensor.   From Table 2, it can be seen that accuracies calculated by polynomial methods for sun sensors with a pinhole of 1.5 mm are slightly better than for 1.0 mm pinhole diameter. This is due to a decreasing percentage of gaps area covered by a light spot. However, accuracies calculated by linear methods for 1.0 mm pinhole are better because of decreased FOV.

Results Comparison
The methods 2, 3, and 4 were compared with respect to the method 1. The graphs from Figure 10 show that improving accuracies of real and theoretical models of sun sensors for investigated methods compare well to linear method. Averaged improvements are shown in Table 4 and Table 5. They describe the differences between linear and polynomial methods, and also between the methods taking and not taking into account gaps. There are some difference between results obtained by real and theoretical models that can be explained by existing errors of angle determination caused by testing equipments. However, both of the model types showed that using polynomial equations and gaps accounting provide improvement in sensors accuracies.

Conclusions
Many sun sensors are available for nanosatellites, which can provide high accuracies and wide FOV. However, their cost is relatively high. In-house developed sensors have several advantages for university satellites such as contributing to students education and reducing a project cost.
An analog round-shaped pinhole sun sensor was designed for the HORYU-IV nanosatellite developed at Kyutech. Linear and polynomial methods were considered for replacing the use of look-up tables for sun vector determination. Moreover, gaps between sensor's photodiodes were also considered in the proposed methods. Six sun sensors and their theoretical models with different configurations were built to investigate sensor accuracy improvements.
The investigation showed that:  taking into account gaps provides correction for output signals but an optimal coefficient should be used for converting gaps area covered by light spot to current proportional signals;  increasing light spot diameter decreases sun vector determination error using polynomial method and increases the error using linear method;  on average, polynomial method decreased error level of determined angle by 70% of that obtained by linear method for real sun sensor models;  on average, accounting for gaps between photodiodes decreases error level of angle determination for a polynomial method by 15% and by 6% for linear method for real sun sensor models.