IMPROVEMENT OF SUN ANGLE ACCURACY FROM IN-ORBIT DATA OF A QUADRANT PHOTODIODE SUN SENSOR OF SUN ANGLE ACCURACY FROM IN-ORBIT DATA OF A QUADRANT

The sun vector is commonly used for defining a satellite attitude and many types of sensors exist for its determination. 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. Polynomial methods for sun vector determination were considered instead of look-up tables to avoid having a large amount of data to be saved. The influence of dead spaces between photodiodes on sensor accuracy was also investigated. The sensor was tested in space environment. It was found that its output signals went to saturation point. A method for the compensation of signals truncated by saturation was proposed. It was found that: 1) polynomial method provided 0.1deg accuracy for a sensor with ±5deg field of view; 2) accounting for gaps between photodiodes decreases the average error of the angle determined by 15%; 3) a method for compensation of truncated signals saves full sensor FOV with decreasing accuracy till 0.11deg.


Introduction
One of the efficient ways in training highly skilled specialists for rocket and space branch is to attract young people to work in real space projects. University satellites play an important role in such kind of training. However, this kind of satellites has some drawbacks such as: lack of experience for developers in a real project, substitution of team members by newcomers because of students' graduation, and lack or limited access to testing equipment, which can have influence on satellite reliability. While mistakes in professional satellites can lead to huge financial losses, mistakes in university satellites are also unwanted but educative effect from errors identified and corrected through data processing or accounting for future projects will be more significant.
A sun sensor of HORYU-IV nanosatellite is under consideration. The satellite was developed by Kyushu Institute of Technology and successfully launched on February 17, 2016. Sun sensors can be devided in two types: analog and digital sensors [1]- [2]. The selection of a sun sensor type depends on the considered satellite's mission requirements. For HORYU-IV nanosatellite, a fine analog round-shaped pinhole sunsensor (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.
An algorithm for output signals processing of the sun sensor with the use a polynomial method and accounting for gaps between photodiodes was developed. It helped to substitute the often used look-up tables [4], which requires large amount of data storage in the sensor memory [5]. The algorithm developed uses curve fitting equations with few parameters and acceptable accuracy for a university nanosatellite project. After obtaining in-orbit data from the sun sensor it was found that the output data from the sensor was saturated. An error in a circuit design was identified as the reason for saturation which resulted to insufficient light emitter power used for sensor calibration. During pre-flight tests only light source illuminance was set to the same level expected in space environment. Light emitter power was not measured. However, additional ground tests showed that the light emitter had lower power than the satellite in-orbit solar constant. This was a reason for not identifying the sensor's high sensitivity thus leading to its saturation in orbit.
Saturated output data processed by the developed algorithm reduces sun sensor characteristics by either decreasing accuracy or field of view (FOV). Hence, a method for compensating the saturated data is needed to save the sensor's characteristics. The paper describes the sensor concept, mathematical models for sun vector calculation with the use of polynomial equations, gaps accounting between photodiodes, and finaly how to process obtained saturated signals for saving full sensor FOV without considerable decreasing of sensor accuracy.

Sun Vector Determination by Analog Pinhole Sun Sensor
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 and simple linear equations can be used for sun vector determination [6]. 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. 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 [7]. Information which could explain how to solve them was scarce [7]. Hence, a polynomial equation and also a method to take into account gaps were used for improving sun vector determination [9].

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 [7]. Ratios of obtained output data (x 0 , y 0 ) calculated by (1)-(2) provide an information to define the light spot centre (x, y) [10].
Where, A, B, C, and D are output signals from photodiodes.

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 3). 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 senor 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 [10].

Accounting for Gaps between Photodiodes
Gaps exist between photodiodes ( Figure 4) 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).
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 4 and are calculated using (7)- (8): Where, a 11 =O 1 M; a 12 =O 1 K; a 21 =O 1 N; a 22 =O 1 P; b 1 =O 1 N; r is the radius of a light spot; x, y are the measured position of a light spot center calculated without taking into account gaps.
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).
Where, k G is the coefficient, which should be determined during a calibration process.

Determination of Sun Vector
Sun vector is determined as unit vector in 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 vector components. Coordinates can be easily found based on output information from a rate table and an inclinometer used in a testing facility of the sensor. Hence, dependencies between calculated ratios of output signals (x 0 , y 0 ) and obtained coordinates (x, y) can be also found. An example of the dependencies for X axis is shown in Figure 5-a. The ratios were calculated with gaps accounting for a sun sensor with pin hole diameter 1 mm. Figure 5-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 round-shaped pinhole and squared photodiodes. The main goal was to find equations which will fit curves for X and Y axis and give light spot center coordinates with respect to output signals. Polynomial equation was considered.
(a) 3D view of curves with regards to photodiodes coordinate system.
(b) 2D view of curves with regards to x axis of photodiodes coordinate system.

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 5 are sinusoidal and for this reason, even parameters in the polynomial equation can be omitted as described by Eq.(13)-(14). An example angle error determination is shown in Figure  6. It can be seen that polynomial method has uniform distribution of angle error in 100% of sensor's FOV.

Comparison of Sun Sensor Outputs from In-Orbit and Ground Tests
In-orbit sun sensors data were downloaded from the satellite. An example is shown in Figure 7. It contains signals from A, B, C, and D photodiodes and also their sum ABCD. It was found that behavior of measured output signal did not match expected values, measured during ground tests (Figure 8-b). The light spot motion path used in generating sun sensor output signal during ground test is shown in Figure 8-a. (a) Schematic representation of light spot path during ground tests. The sun sensor was inclined to the X axis at an angle and rotated about Y axis.
(b) Correct output signal profile from sun sensor obtained with low power light emission. The data was obtained during ground test with 5 deg inclination to X axis and rotated about the Y axis from -20 to +20 deg. Figure 8: Sun senor output signals obtained from ground tests in a laboratory. In normal mode (without saturation) output signals from the sun sensor should be proportional to the area on surface of the sensor's photodiodes exposed to light multiplied by cosine of light vector ascending angle 0. In considered case, the sun sensor has low FOV (±5deg). Hence, difference in the sum caused by ascending angle is small and the sum can be considered as a constant value U max (Figure 8-b). In-orbit sun sensor data investigation showed that the sum ABCD had steep change in profile. It gave a reason to conclude that some output data was lost. As a result, the sun sensor's characteristics was degraded by decreasing FOV and accuracy.

Sun Sensor Outputs under Different Emitting Power of a Light Source
Additional ground tests to identify reasons for unusual sensor outputs were made with a spare sensor. It was found that after increasing the emitted power from light source the sensor's output signals has the same characteristics as in-orbit sensors (Figure 9). The reason was saturation of output signals caused by exceeding reverse bias level of the photodiodes. Spurious signals were observed in 2 neighboring photodiodes to a saturated one. The third photodiode did not produce any unwanted signal because of small contact area with saturated photodiode. Two additional tests with low and high emitting powers were made to map the output signal levels. Fig. 10 shows separate results for each of photodiode. Fig. 10-a represents maps of output signals obtained with a low intensity light source. They have correct square shapes with rounded corners. But in Fig. 10-b it can be easily recognized that spurious signals appeared at areas where neighboring photodiodes achieved maximum signal levels and went to saturation. From this point it was concluded that the saturation was a reason for spurious signal recorded in neighboring photodiodes. The phenomenon is known as electrical crosstalk. Usually pure electrical crosstalk is negligible if the photodiode array operates under a reverse bias 0. The maximum level of the parameter in a datasheet of the photodiode is 2 % [3]. In considered case the crosstalk exceeds 10% and explanation for it is saturation.

Method for Compensation of Saturated Signals
Saturation of a sun sensor reduces accuracy and FOV of the sensor. There is a need to compensate for truncated signals and find signal levels for usage of method described in Section 2.1. To compensate truncated signals lost due to photodiodes reverse bias, it is important to recover lost signals from saturated photodiode and spurious signals gained as a result of crosstalk.
For solving the issue, a case of a saturated photodiode B is considered. Signals (b) Maps of saturated output signal levels obtained during a test with high emitting power of a light source. Spurious signals were generated when neighboring photodiodes were in saturation. Where, A, B, and C are real (with saturation) outputs from A, B, and C photodiodes; U A_B and U C_B are spurious signals caused by crosstalk for A and C photodiodes respectively (Figure 11-a and 11-c); U B_satur represents lost signal by B photodiode because of saturation (Figure 11-b). All of these real signals are compared with expected signals produced by sensor with higher reverse bias photodiodes.
A difference between real and expected sums of output data is shown in Figure 12 . The difference represents lost signal caused by saturation (U lost ).
To compensate for truncated the following assumptions were made:  Calculation of the sun vector was made only when 3 or 4 photodiodes detect a light source.  Only one of photodiodes was saturated in particular time.  Expected sum of output signals was constant and known, U max (calculated when 3 or 4 photodiodes generated signal and all of them were not saturated)  Signals generated by neighbor photodiodes (A and C) were equal and proportional to a lost signal by B photodiode (18).
Where, k is a proportional coefficient, which was found by optimal fitting during ground tests.  Figure 11: Comparison of real (saturated) output signals with expected output signals if there was no reverse bias limit for photodiodes. Figure 12: Comparison of sums for real (saturated) output signals with expected output signals if there was no reverse bias limit for photodiodes. U max is a maximum sum of output signal. The value has a small curvature and for easier calculation is considered a constant value. U lost represents lost signal which wasn't converted to output signals in any of the photodiodes. For compensating truncated signals next assumptions were made:  Calculation of the sun vector was made only when 3 or 4 photodiodes detect a light source.  Only one of photodiodes was saturated in particular time.  Expected sum of output signals was constant and known, U max (calculated when 3 or 4 photodiodes generated signal and all of them were not saturated)  Signals generated by neighbor photodiodes (A and C) were equal and proportional to a lost signal by B photodiode (18).
A lost signal by B photodiode ( _ ) can be divided in two components: a signal produced by neighbor photodiodes and a lost signal (19).

Sensor Accuracy
Based on requirements from Photo-electrons Current (PEC) Measurement mission of Horyu-IV, attitude and orbit determination system (AODS) should send a logical signal when a sun sensor on the same panel as PEC elements detects the Sun in a field of view (FOV) ±15deg. It was decided to choose total field of view of sun sensor to 15 deg. In this case the sun senor can work as a fine sensor within FOV ±5deg.
On ground calibration of the sensor showed next accuracies: 1) for polynomial curve fitting: 0.1deg; 2) for polynomial curve fitting with gap accounting between photodiodes: 0.9deg. The same algorithm was checked for other sensor configurations (pinhole diameter: 1deg and 1.5deg; distance from pinhole to the photodiode plane: 1.73mm, 3.16mm, and 6.76mm) for real sun sensor model and simulated ones with MATLAB. The average ratio of sun vector determination improvement with gap accounting was found to be 15%. All of the tests were made with normal (unsaturated) data. The full information with test results for all considered sensor configurations can be found at [9].

Results of Saturated Signals Compensation
For investigating efficiency of proposed method in Section 2.2, two tests with the same conditions with difference only in emitting power of light source were made. First set of data was obrained with low power and all of the signals were normal (without saturation) (Figure 8b). Second set of data were obrained with hight power and saturated signals appeared (Figure 9).
Using method described in Section 2.1, angle errors of a sun vector determination were calculated ( Figure 13). Accuracy was obtained as 0.6 deg. Using the same polynomial coefficients, the angle errors of a sun vector were calculated for a sun sensor with saturated signals (Figure 14). It can be seen that the error started increasing from both of the sides from center of the sensor. Hence, the sensor's accuracy became worse. FOV should be reduced twice to keep the same accuracy.
Angle error of a sun vector became considerably smaller after implementing method described in Section 2.2 ( Figure 15. Angle error for saturated data calculated with the use of polynomial coefficients obtained for unsaturated data with inplemantation of signal corection. Figure 15). The accuracy of the sensor was obtained as 0.11 deg which is higher than values obtained for unsaturated data but still within acceptable range because measuring equipment can produce error in measured angle of up to 0.07 deg.