# A Low-Cost Photodiode Sun Sensor for CubeSat and Planetary Microrover

Authors: Mark A. Post; Junquan Li; Regina Lee
Journal: International Journal of Aerospace Engineering
 (2013)

---

## Abstract

This paper presents the development of low-cost methodologies to determine the attitude of a small, CubeSat-class satellite and a microrover relative to the sun's direction. The use of commercial hardware
and simple embedded designs has become an effective path for university programs to put experimental
payloads in space for minimal cost, and the development of sensors for attitude and heading determination
is often a critical part. The development of two compact and efficient but simple coarse sun sensor
methodologies is presented in this research. A direct measurement of the solar angle uses a photodiode
array sensor and slit mask. Another estimation of the solar angle uses current measurements from
orthogonal arrays of solar cells. The two methodologies are tested and compared on ground hardware.
Testing results show that coarse sun sensing is efficient even with minimal processing and complexity
of design for satellite attitude determination systems and rover navigation systems.


---

## Body

## 1. Introduction

One of the key problems in the development of attitude determination and control systems (ADCS) for small satellites is the use of attitude sensors small enough and efficient enough to fit within mass and power budgets. One of the simplest and most common sensors for attitude determination is the sun sensor [1], which measures the angle of incident light from the sun with respect to an inertial body frame. Both single-axis and dual-axis sensors are available, though a dual-axis sensor can be constructed from two compact single-axis sensors, resulting in lower component costs and processing requirements [2, 3]. In other sun sensor applications, both CCD and CMOS technology have been used to achieve fine pointing accuracy [4, 5], and software methods can be used to increase the accuracy of a sensor [6]. Although several embedded sun sensors for nanosatellite ADCS hardware are now available, it is desirable in many nanosatellite development programs to develop the sun sensors in-house using commercial off-the-shelf (COTS) hardware [7], both for reasons of cost and to increase the potential for further research within their own program. Sun sensors are also used on planetary rovers when other sensors such as magnetometers or GPS receivers are not sufficient. Measuring solar angles with a sun sensor is a good way of estimating absolute orientation [8–10]. Typical requirements include an accuracy on the order of 1 degree and a field of view of 30 degrees or 60 degrees [11]. Wide-field-of-view sun sensors [12] suitable for use on CubeSat and microrover platforms are still an open area of research and, in many cases, simpler systems are desirable. Low-cost sensors for research use are usually constructed by graduate students and researchers and must be efficient, compact in size, and robust enough to survive the space environment. In this paper, simple, low-cost, and wide-field-of-view sun sensor methodologies are presented. The sensors described here are under development for the YUSEND (York University Space Engineering Nanosatellite Demonstration) mission at York University [13, 14], which focuses on CubeSat technology development such as for the 1 U CubeSat shown in Figure 1, as well as a microrover under development for the Northern Light Mars Lander Mission, shown in Figure 2 [15, 16].Figure 1
A 1 U CubeSat with sun sensor.Figure 2
Microrover with sun sensor.In this paper, we outline the development of two coarse sun sensor methodologies that are compact and efficient enough for a CubeSat-class nanosatellites and microrovers and can provide reliable solar angle information for embedded attitude determination and localization. There are several basic methodologies that are in use for sun sensors, including the use of Position-Sensitive Photodiodes (PSD), linear and grid sensor arrays such as CCDs and photodiode arrays, and the measurement of sunlight on solar panels used for power. In this work, we make use of the latter two.First, direct measurement of the solar angle is performed using a photodiode array sensor placed below a slit design in the top that allows light to fall on the sensor element. Second, the solar angle is inferred using separate current measurements from the array of solar cells used for power generation on the exterior of the vehicle. In both cases, the solar angle is calculated by a microcontroller from the geometry of the sun sensor with respect to the vehicle body. For this study, it is assumed that at least a 90° field of view is necessary for each sun sensor, so that complete coverage of the exterior is possible with a sun sensor on each face of a CubeSat. To test and validate the sensors, the sensor hardware is rotated on the spot by a rotary gimbal with angular measurement capability, and simulated sunlight from a Schott 1150 Illuminator light source is provided at a fixed position as shown in Figure3. The nanosatellite model with sun sensor under test on an optical bench and the light source used is shown in Figure 4. Using embedded fixed-point processing, estimations of the current body orientation are processed and made available by serial interface to an on-board computer, which performs the localization and control determination operations [17].Figure 3
Testing diagram for sun sensor hardware.Figure 4
Testing setup on optical bench with light source.


## 2. Sensor Designs

### 2.1. Array Sensor

Photodiode sun sensors have been used often for spacecraft and satellite attitude determination systems [18, 19]. An established and simple method for directly sensing solar angles is to use a simple slit or an other aperture design through which light is allowed to fall at one location on a spatially varying sensor, dependent on the incident angle of light. This design uses a 256-element linear photodiode array, which is both flexible in operation, by allowing the distribution and magnitude of light to be determined, and efficient by utilizing only a single line of sensing elements rather than a matrix such as a Charge-Coupled Device (CCD) array. While some systems use a Position-Sensitive Diode (PSD) as a sensor, an array increases linearity of measurement and provides more flexibility in processing of light distribution data. The TAOS TSL1402R integrated linear photodiode array is used in this design. Reading of data and calculation of solar angles are performed by an Atmel ATMega168PA AVR microcontroller. A block diagram of the connections used between the photodiode array and microcontroller is shown in Figure 5.Figure 5
Diagram of photodiode array sensor.For single-axis sensing, a simple linear slit in a mask over the sensor is used, as shown in Figure6. The slit is positioned vertically centered on the sensor element such that light falls on to the sensor array at angles up to 45° in every direction for a 90° total field of view. For a linear photodiode array with length L, a light vector falls at an angle θ from the normal along the element axis and at an angle ϕ from the normal along the perpendicular to the element axis. The photodiode voltage output of the sensor falls at the point of contact with the light vector, at a distance d from the center of the array. If the slit is positioned at a distance h from the array, this distance is simply
(1)d=htan(θ).Figure 6
Sun angle sensing by photodiode array.To ensure that|θ|≤45°, the sensor distance should be H=d=L/2 and, to ensure |ϕ|≤45°, the slit length should be b=2h=L. It is preferable for higher precision measurements to use as small a slit width a as possible without significant diffractive effects, but the material thickness around the slit is constrained by c<a/tan(θ), which limits how small the slit width a can be, as the beam of light will be “pinched” off at high angles. In this design, L=16mm and the dimensions used were H=8mm and b=18mm. In testing, metal foil with width c=0.5mm provided acceptable performance using a slit width of a=0.8mm.Linear arrays typically provide only one axis of attitude estimation, but, because a pattern on the array can be measured, it is also possible to measure elevation across most angles by using an N-slit [4], as shown in Figure 7. By adding additional slits positioned at an angle δ to the central slit, a pattern with multiple illumination maxima will be projected on to the sensor array and the transverse angle ϕ can be determined by the separations d1 and d2 of the central slit and one of the side maxima.Figure 7
Sun angle sensing by photodiode array and N-slit.As the field of view of the sensor is limited, more than one sun sensor is needed to cover wide angles. Two single slit sensors or one Z-slit sensor can cover two solid angles of 90° with a pyramidal volume of view, and individual sides of a CubeSat can be covered this way depending on mission pointing requirements. For microrover use, a full 180° of view (horizon to horizon) can be covered by four photodiodes attached to the frustum of square pyramid [19, 20]. In the current study, though, a single N-slit sensor is being studied for partial sky coverage on the microrover due to space limitations.To estimate the orientation of a microrover from solar angles, the angle of the body with respect to the ground and the angle of the sun with respect to the ground must be considered. The former can be obtained with inertial measurements from an accelerometer at rest measuring the gravity vector, and the latter can be obtained from solar ephemeris data and current time. To simplify the analysis, we assume that the accelerometer is aligned with the sun sensor so that the angleθ is about the forward-pointing x-axis and the angle ϕ is about the side-pointing y-axis. The rover body angles about the x- and y-axes with respect to the ground frame θg and ϕg can be calculated from the gravity vector (gx,gy,gz) using common aerospace relations as follows:
(2)θg=atan(gygz),ϕg=atan(-gxgy2+gz2).To obtain the sensed horizontal azimuthαs of a vertically-centered sun sensor measurement, the angles θ and ϕ must be adjusted for rover body angle and projected on the horizontal plane using the quadrant-aware arctangent function as follows:
(3)αs=atan2(sin(θ+θg),sin(ϕ+ϕg)).The solar ephemeris data must be computed separately from an estimate of the current position, which can be done with a variety of available software. The rover’s heading with respect to true northαrover can then be calculated using the solar azimuth αe and sensed azimuth αs by [9]
(4)αe>αs⟹αrover=αe-αs,αe≤αs⟹αrover=αs-αe.


### 2.2.  Solar Current Sensing

Due to the constraints on space and power available in a nanosatellite, it is preferred to make use of sensing methodologies that focus on the processing of other available data, rather than discrete sensors. One method of doing this is to sample the currents generated by the nanosatellite’s solar arrays, information that is commonly available on small satellites for peak-power tracking or battery charge monitoring. This has the advantage that a range of angles spanning a set of independently measured noncoplanar solar panels can be measured without an external sensor but is in general less accurate than discrete sensors due to the nonlinearities involved. In this study, we consider a cubic body with a fixed solar panel on each orthogonal face, as shown in Figure8. For a CubeSat geometry, no more than three solar panels are exposed to sunlight at a time in orbit if a point source and negligible reflection from the earth are assumed, with angles θ1, θ2, and θ3. For simplicity, a similar body is assumed for a microrover case, though no solar panel is present on the lower face.Figure 8
Sun angle sensing by solar cell output.The linearity of this measurement varies depending on the solar cells used. Also, nonlinearities are introduced by variations in the load presented to the solar arrays. For a nanosatellite with a linear or pulse regulated battery charge system, this generally arises from changes in battery charge rate as the battery state changes and can be compensated for by including solar cell voltage or an estimation of the charge system state in the solar calculation to determine total power and current output.The current sensing circuit is constructed from a bank of differential amplifiers that are read by using the Analog-to-Digital Converter (ADC) channels available on the ATMega168PA microcontroller that also reads the linear array. A current sense resistor of 0.1 Ω creates a voltage difference from current flowing from the solar panels, which is amplified by an OPA2340 rail-to-rail op-amp in differential configuration with a gain of 100. The output gain with respect to the solar panel current is then 10 V/A. It is assumed that no more than 500 mA will be sourced from the nanosatellite solar panel, so an ADC reference of 5 V can be used in measurement. As custom-constructed solar panels often vary slightly in output, it is still necessary to calibrate the ADC measurements performed by the microcontroller. The current sense amplifier circuit used for sensing is shown in Figure9.Figure 9
Diagram of solar current sensors.The amount of current a solar panel produces depends on the panel areaA0 and changes in angle change the effective area Ae of the solar panel intercepting solar energy. For sunlight with an even power density (W/m2) and constant loading or by using compensation calculations, the effective solar current Ie relative to the maximum solar current I0 intercepted by the solar array varies with the incident angle θ and can be expressed in general terms as a ratio
(5)IeI0=AeA0=cos(θ).Current sensing results are much more noisy and less linear than the results from the photodiode array. In particular, the ADC offsets and gains must be calibrated for each panel separately to ensure that measurements can be compared. Figure16 shows the output from the solar panels after applying a moving average to remove noise. By applying (5) and determining the angular quadrant around the vehicle that the sun is in, it is possible to extract an estimate of relative solar angle to each panel. Combining several panels allows determination of a solar angle with respect to the body at any angle observed by solar panels. While this method may be considered generally less reliable than direct solar measurement, it does allow solar angle measurement without dedicated sensors at a wider range of angles than a single external sensor would be able to measure. Equations (2), (3), and (4) can be applied for a rover so long as two orthogonal axes of angular measurement can be obtained from the solar panel geometry.


## 2.1. Array Sensor

Photodiode sun sensors have been used often for spacecraft and satellite attitude determination systems [18, 19]. An established and simple method for directly sensing solar angles is to use a simple slit or an other aperture design through which light is allowed to fall at one location on a spatially varying sensor, dependent on the incident angle of light. This design uses a 256-element linear photodiode array, which is both flexible in operation, by allowing the distribution and magnitude of light to be determined, and efficient by utilizing only a single line of sensing elements rather than a matrix such as a Charge-Coupled Device (CCD) array. While some systems use a Position-Sensitive Diode (PSD) as a sensor, an array increases linearity of measurement and provides more flexibility in processing of light distribution data. The TAOS TSL1402R integrated linear photodiode array is used in this design. Reading of data and calculation of solar angles are performed by an Atmel ATMega168PA AVR microcontroller. A block diagram of the connections used between the photodiode array and microcontroller is shown in Figure 5.Figure 5
Diagram of photodiode array sensor.For single-axis sensing, a simple linear slit in a mask over the sensor is used, as shown in Figure6. The slit is positioned vertically centered on the sensor element such that light falls on to the sensor array at angles up to 45° in every direction for a 90° total field of view. For a linear photodiode array with length L, a light vector falls at an angle θ from the normal along the element axis and at an angle ϕ from the normal along the perpendicular to the element axis. The photodiode voltage output of the sensor falls at the point of contact with the light vector, at a distance d from the center of the array. If the slit is positioned at a distance h from the array, this distance is simply
(1)d=htan(θ).Figure 6
Sun angle sensing by photodiode array.To ensure that|θ|≤45°, the sensor distance should be H=d=L/2 and, to ensure |ϕ|≤45°, the slit length should be b=2h=L. It is preferable for higher precision measurements to use as small a slit width a as possible without significant diffractive effects, but the material thickness around the slit is constrained by c<a/tan(θ), which limits how small the slit width a can be, as the beam of light will be “pinched” off at high angles. In this design, L=16mm and the dimensions used were H=8mm and b=18mm. In testing, metal foil with width c=0.5mm provided acceptable performance using a slit width of a=0.8mm.Linear arrays typically provide only one axis of attitude estimation, but, because a pattern on the array can be measured, it is also possible to measure elevation across most angles by using an N-slit [4], as shown in Figure 7. By adding additional slits positioned at an angle δ to the central slit, a pattern with multiple illumination maxima will be projected on to the sensor array and the transverse angle ϕ can be determined by the separations d1 and d2 of the central slit and one of the side maxima.Figure 7
Sun angle sensing by photodiode array and N-slit.As the field of view of the sensor is limited, more than one sun sensor is needed to cover wide angles. Two single slit sensors or one Z-slit sensor can cover two solid angles of 90° with a pyramidal volume of view, and individual sides of a CubeSat can be covered this way depending on mission pointing requirements. For microrover use, a full 180° of view (horizon to horizon) can be covered by four photodiodes attached to the frustum of square pyramid [19, 20]. In the current study, though, a single N-slit sensor is being studied for partial sky coverage on the microrover due to space limitations.To estimate the orientation of a microrover from solar angles, the angle of the body with respect to the ground and the angle of the sun with respect to the ground must be considered. The former can be obtained with inertial measurements from an accelerometer at rest measuring the gravity vector, and the latter can be obtained from solar ephemeris data and current time. To simplify the analysis, we assume that the accelerometer is aligned with the sun sensor so that the angleθ is about the forward-pointing x-axis and the angle ϕ is about the side-pointing y-axis. The rover body angles about the x- and y-axes with respect to the ground frame θg and ϕg can be calculated from the gravity vector (gx,gy,gz) using common aerospace relations as follows:
(2)θg=atan(gygz),ϕg=atan(-gxgy2+gz2).To obtain the sensed horizontal azimuthαs of a vertically-centered sun sensor measurement, the angles θ and ϕ must be adjusted for rover body angle and projected on the horizontal plane using the quadrant-aware arctangent function as follows:
(3)αs=atan2(sin(θ+θg),sin(ϕ+ϕg)).The solar ephemeris data must be computed separately from an estimate of the current position, which can be done with a variety of available software. The rover’s heading with respect to true northαrover can then be calculated using the solar azimuth αe and sensed azimuth αs by [9]
(4)αe>αs⟹αrover=αe-αs,αe≤αs⟹αrover=αs-αe.


## 2.2.  Solar Current Sensing

Due to the constraints on space and power available in a nanosatellite, it is preferred to make use of sensing methodologies that focus on the processing of other available data, rather than discrete sensors. One method of doing this is to sample the currents generated by the nanosatellite’s solar arrays, information that is commonly available on small satellites for peak-power tracking or battery charge monitoring. This has the advantage that a range of angles spanning a set of independently measured noncoplanar solar panels can be measured without an external sensor but is in general less accurate than discrete sensors due to the nonlinearities involved. In this study, we consider a cubic body with a fixed solar panel on each orthogonal face, as shown in Figure8. For a CubeSat geometry, no more than three solar panels are exposed to sunlight at a time in orbit if a point source and negligible reflection from the earth are assumed, with angles θ1, θ2, and θ3. For simplicity, a similar body is assumed for a microrover case, though no solar panel is present on the lower face.Figure 8
Sun angle sensing by solar cell output.The linearity of this measurement varies depending on the solar cells used. Also, nonlinearities are introduced by variations in the load presented to the solar arrays. For a nanosatellite with a linear or pulse regulated battery charge system, this generally arises from changes in battery charge rate as the battery state changes and can be compensated for by including solar cell voltage or an estimation of the charge system state in the solar calculation to determine total power and current output.The current sensing circuit is constructed from a bank of differential amplifiers that are read by using the Analog-to-Digital Converter (ADC) channels available on the ATMega168PA microcontroller that also reads the linear array. A current sense resistor of 0.1 Ω creates a voltage difference from current flowing from the solar panels, which is amplified by an OPA2340 rail-to-rail op-amp in differential configuration with a gain of 100. The output gain with respect to the solar panel current is then 10 V/A. It is assumed that no more than 500 mA will be sourced from the nanosatellite solar panel, so an ADC reference of 5 V can be used in measurement. As custom-constructed solar panels often vary slightly in output, it is still necessary to calibrate the ADC measurements performed by the microcontroller. The current sense amplifier circuit used for sensing is shown in Figure9.Figure 9
Diagram of solar current sensors.The amount of current a solar panel produces depends on the panel areaA0 and changes in angle change the effective area Ae of the solar panel intercepting solar energy. For sunlight with an even power density (W/m2) and constant loading or by using compensation calculations, the effective solar current Ie relative to the maximum solar current I0 intercepted by the solar array varies with the incident angle θ and can be expressed in general terms as a ratio
(5)IeI0=AeA0=cos(θ).Current sensing results are much more noisy and less linear than the results from the photodiode array. In particular, the ADC offsets and gains must be calibrated for each panel separately to ensure that measurements can be compared. Figure16 shows the output from the solar panels after applying a moving average to remove noise. By applying (5) and determining the angular quadrant around the vehicle that the sun is in, it is possible to extract an estimate of relative solar angle to each panel. Combining several panels allows determination of a solar angle with respect to the body at any angle observed by solar panels. While this method may be considered generally less reliable than direct solar measurement, it does allow solar angle measurement without dedicated sensors at a wider range of angles than a single external sensor would be able to measure. Equations (2), (3), and (4) can be applied for a rover so long as two orthogonal axes of angular measurement can be obtained from the solar panel geometry.


## 3. Testing Results

### 3.1. Array Sensor Results

Typical illumination measurements from the photodiode array sun sensor are shown in Figure10. The voltage output must be inverted so that illumination becomes positive. Then, a centroiding algorithm [4] is used to determine the center of illumination across the sensor (shown with a vertical line). The centroid positions d are then used in (1) for each angle n sampled to determine the corresponding solar angle by
(6)θn=atan(dh).Figure 10
Example of linear array output.The estimated, centroided solar angleθ is plotted in Figure 11, with the actual solar angle used on the gimbal test apparatus shown as a straight line for comparison. In general, very good agreement is achieved between the estimated and actual solar angles. It is worth noting that this angular data is not filtered or smoothed but still achieves consistent tracking.Figure 11
Sun angleθ results from linear array for 60° to −60°.If an N-slit is used to perform estimation of the transverse angleϕ, multiple illumination centroids are present on the sensor as shown in Figure 12 and must be partitioned separately. However, as the angle ϕ increases from the vertical, it is common for one of the illuminated regions to move off the sensor for moderately high angles of θ and for the other two illuminated regions to approach and ultimately merge together as seen in Figure 13. This poses a problem for centroid partitioning as angle increases. To mitigate this problem, the outer boundaries of the illuminated areas are tracked and the centroids are constrained to be between these boundaries and the midpoint between the boundaries. Having a precise geometry for the N-slit is essential for accuracy in this case, and some calibration must be performed for the alignment of the sensor and N-slit, particularly for the angle δ that the side slits make with the center slit. Using the centroid from the center slit located at position d2 and the centroid of one of the side slits at position d1, the angle ϕ can be estimated by using [4]
(7)ϕn=atan(d2-d1htan(δ)).Figure 12
Example of N-slit output at lowθ angles.Figure 13
Example of N-slit output at highθ angles.The estimated transverse solar angleϕ obtained from N-slit measurements by using (7) is shown in Figure 14. Reasonable agreement is obtained, but the error is higher than in simple linear slit measurements due to the greater complexity of constructing a precise N-slit. Accurate measurements of angles above approximately 35° could not be obtained due to difficulties accurately partitioning and centroiding the illuminated areas on the sensor at high angles of ϕ. The use of a wider N-slit or thinner material and slit width extends the measurable angles of this sensor.Figure 14
Transverse sun angleϕ results from N-slit for 0° to 45°.Using both the anglesθ and ϕ and precalculated solar ephemeris data, a test of calculating the heading of the microrover was conducted. The sun sensor was mounted on the microrover with the orientation aligned with the body frame as stated above, and the microrover rotated from 165° to 135° away from north. The estimated heading angle for the 30° sweep is plotted in Figure 15, with the externally measured angle superimposed for reference. To improve the accuracy of this measurement, a 2-point moving average was used in processing.Figure 15
Estimated microrover heading across 30° of rotation.Figure 16
Solar panel current measurements for −180° to 180°.


### 3.2. Solar Current Results

Current measurement using high gains and ADC sensing generates much more noise than digital sensing using a linear array as described above. Although a constant current draw and capacitive decoupling of the amplifiers and microcontroller pins was used in this study, applying a windowed average to the data assuming slow changes in angle was necessary to achieve consistent results. Figure16 shows the solar panel current output In-1, In, and In+1 for three solar panels enumerated as n-1 (facing the +y axis), n (facing the +x axis), and n+1 (facing the -y axis) in the direction of increasing angle about a 1 U CubeSat. Smooth reference curves for the actual solar angles presented in gimbal testing with respect to each panel cos(θn-1), cos(θn), and cos(θn+1) are superimposed for reference.After filtering the currentIn from each panel n, the quadrant that actual solar angle lies in with respect to the satellite body must be determined. The most straightforward method of doing this is to simply identify which panels are exposed to the most sunlight by comparing the relative solar panel currents and assigning the appropriate sinusoid quadrant function using mapping functions. As the greatest change in illumination is present at high solar angles to each panel, it is possible to determine the quadrant of a sine function for the satellite body frame angle θb by using only In-1 and In+1 to determine the mapping for only the current In as
(8)In-1>In+1⟹θb=asin(Inmax(In)),In-1≤In+1⟹θb=asin(-Inmax(In))+π2.Using (8), the current from each solar panel is used to obtain an estimated body frame angle θb over a 180° arc, shown in Figure 17. It is evident that there are a discontinuity and higher inaccuracy near the angle θb=90° which corresponds to θn=0. This is due to the sudden jump in assignment but also to the inaccuracy of determining angles close to the vertical. To mitigate this, a revised mapping given in (9) can be used that takes advantage of the other solar panels’ contributions at high angles to increase the accuracy of measurement. The estimated body frame angle θb for this case is shown in Figure 18. The revised mapping is as follows:
(9)In-1>In>In+1⟹θb=asin(Inmax(In)),In>In-1>In+1⟹θb=asin(-In-1max(In-1))+π4,In>In+1>In-1⟹θb=asin(In+1max(In+1))+π4,In+1>In>In-1⟹θb=asin(-Inmax(In))+π2.Figure 17
Angle from single solar panel current for 0° to 180°.Figure 18
Angle from all solar panel currents for 0° to 180°.It should be noted that this estimation is not as reliable if the distribution of solar panels over the body is not symmetrically illuminated, such as in the case of the microrover. Hence, (8) is more appropriate for microrover use where less useful information is obtained at θb=90° and (9) is more appropriate for nanosatellite use.


## 3.1. Array Sensor Results

Typical illumination measurements from the photodiode array sun sensor are shown in Figure10. The voltage output must be inverted so that illumination becomes positive. Then, a centroiding algorithm [4] is used to determine the center of illumination across the sensor (shown with a vertical line). The centroid positions d are then used in (1) for each angle n sampled to determine the corresponding solar angle by
(6)θn=atan(dh).Figure 10
Example of linear array output.The estimated, centroided solar angleθ is plotted in Figure 11, with the actual solar angle used on the gimbal test apparatus shown as a straight line for comparison. In general, very good agreement is achieved between the estimated and actual solar angles. It is worth noting that this angular data is not filtered or smoothed but still achieves consistent tracking.Figure 11
Sun angleθ results from linear array for 60° to −60°.If an N-slit is used to perform estimation of the transverse angleϕ, multiple illumination centroids are present on the sensor as shown in Figure 12 and must be partitioned separately. However, as the angle ϕ increases from the vertical, it is common for one of the illuminated regions to move off the sensor for moderately high angles of θ and for the other two illuminated regions to approach and ultimately merge together as seen in Figure 13. This poses a problem for centroid partitioning as angle increases. To mitigate this problem, the outer boundaries of the illuminated areas are tracked and the centroids are constrained to be between these boundaries and the midpoint between the boundaries. Having a precise geometry for the N-slit is essential for accuracy in this case, and some calibration must be performed for the alignment of the sensor and N-slit, particularly for the angle δ that the side slits make with the center slit. Using the centroid from the center slit located at position d2 and the centroid of one of the side slits at position d1, the angle ϕ can be estimated by using [4]
(7)ϕn=atan(d2-d1htan(δ)).Figure 12
Example of N-slit output at lowθ angles.Figure 13
Example of N-slit output at highθ angles.The estimated transverse solar angleϕ obtained from N-slit measurements by using (7) is shown in Figure 14. Reasonable agreement is obtained, but the error is higher than in simple linear slit measurements due to the greater complexity of constructing a precise N-slit. Accurate measurements of angles above approximately 35° could not be obtained due to difficulties accurately partitioning and centroiding the illuminated areas on the sensor at high angles of ϕ. The use of a wider N-slit or thinner material and slit width extends the measurable angles of this sensor.Figure 14
Transverse sun angleϕ results from N-slit for 0° to 45°.Using both the anglesθ and ϕ and precalculated solar ephemeris data, a test of calculating the heading of the microrover was conducted. The sun sensor was mounted on the microrover with the orientation aligned with the body frame as stated above, and the microrover rotated from 165° to 135° away from north. The estimated heading angle for the 30° sweep is plotted in Figure 15, with the externally measured angle superimposed for reference. To improve the accuracy of this measurement, a 2-point moving average was used in processing.Figure 15
Estimated microrover heading across 30° of rotation.Figure 16
Solar panel current measurements for −180° to 180°.


## 3.2. Solar Current Results

Current measurement using high gains and ADC sensing generates much more noise than digital sensing using a linear array as described above. Although a constant current draw and capacitive decoupling of the amplifiers and microcontroller pins was used in this study, applying a windowed average to the data assuming slow changes in angle was necessary to achieve consistent results. Figure16 shows the solar panel current output In-1, In, and In+1 for three solar panels enumerated as n-1 (facing the +y axis), n (facing the +x axis), and n+1 (facing the -y axis) in the direction of increasing angle about a 1 U CubeSat. Smooth reference curves for the actual solar angles presented in gimbal testing with respect to each panel cos(θn-1), cos(θn), and cos(θn+1) are superimposed for reference.After filtering the currentIn from each panel n, the quadrant that actual solar angle lies in with respect to the satellite body must be determined. The most straightforward method of doing this is to simply identify which panels are exposed to the most sunlight by comparing the relative solar panel currents and assigning the appropriate sinusoid quadrant function using mapping functions. As the greatest change in illumination is present at high solar angles to each panel, it is possible to determine the quadrant of a sine function for the satellite body frame angle θb by using only In-1 and In+1 to determine the mapping for only the current In as
(8)In-1>In+1⟹θb=asin(Inmax(In)),In-1≤In+1⟹θb=asin(-Inmax(In))+π2.Using (8), the current from each solar panel is used to obtain an estimated body frame angle θb over a 180° arc, shown in Figure 17. It is evident that there are a discontinuity and higher inaccuracy near the angle θb=90° which corresponds to θn=0. This is due to the sudden jump in assignment but also to the inaccuracy of determining angles close to the vertical. To mitigate this, a revised mapping given in (9) can be used that takes advantage of the other solar panels’ contributions at high angles to increase the accuracy of measurement. The estimated body frame angle θb for this case is shown in Figure 18. The revised mapping is as follows:
(9)In-1>In>In+1⟹θb=asin(Inmax(In)),In>In-1>In+1⟹θb=asin(-In-1max(In-1))+π4,In>In+1>In-1⟹θb=asin(In+1max(In+1))+π4,In+1>In>In-1⟹θb=asin(-Inmax(In))+π2.Figure 17
Angle from single solar panel current for 0° to 180°.Figure 18
Angle from all solar panel currents for 0° to 180°.It should be noted that this estimation is not as reliable if the distribution of solar panels over the body is not symmetrically illuminated, such as in the case of the microrover. Hence, (8) is more appropriate for microrover use where less useful information is obtained at θb=90° and (9) is more appropriate for nanosatellite use.


## 4. Comparison of Results and Discussion

To effectively compare the two methodologies described here, it is important to include the error of measurement with respect to the known angles used during testing. Figure19 shows the estimation error for the linear array angle measurement of θ from Figure 11 using (6). Figure 20 shows the estimation error of the transverse angle ϕ for the array while using an N-slit from Figure 14 using (7), and Figure 21 shows the error in Figure 15 using an N-slit for heading estimation. Finally, Figure 22 shows the estimation error for the solar panel current angle measurement from Figure 18 using (9). The linear array shows a maximum error of approximately ±5° overall with less consistency in the N-slit measurement, while the solar current sensing shows a maximum error of approximately ±7°. These are comparable results, but the linear array data is obtained by centroiding and otherwise unfiltered, while the solar current data requires significant filtering to remove measurement noise. Hence the use of a discrete digital sensor is still expected to provide better reliability and overall accuracy, though with appropriate data processing, solar current measurement can also provide useable and complimentary coarse angle measurements. The tracking accuracy and noise present in microrover heading estimation is comparable to the sensor laboratory tests, but slightly lower as a moving average was used, and indicates that useable heading information can be extracted using a single N-slit sensor.Figure 19
Error in linear arrayθ estimation.Figure 20
Error in linear array with N-slitϕ estimation.Figure 21
Error in heading angle estimation.Figure 22
Error in solar current angle estimation.


## 5. Conclusions

We have implemented and compared two useful methods for coarse solar angle sensing. Using only simple hardware and embedded software implementation, very coarse attitude estimation results can be achieved using either photodiode array or solar panel current measurement methodologies for nanosatellite attitude tracking or microrover navigation. The photodiode array provides good overall accuracy to errors within ±5° without additional filtering and thus requires minimal processing but can be improved beyond this measure if additional filtering is implemented. Dual-axis sensing is possible for a linear array using an N-slit configuration, but precise construction of the slit is essential and transverse angular measurements are more limited. Solar panel current measurements without the use of a discrete sensor can provide angular approximations over the entire exterior of the vehicle to ±7°, but require significant filtering and averaging of measurements, and thus tend to be less accurate and more processing-intensive.Sun sensor designs such as these are useable in university and research hardware development programs due to their simplicity, robustness, and cost-effectiveness. As testing of both sun sensor configurations was done in parallel, both sensors could also be used in parallel on a CubeSat or microrover to achieve higher accuracy under uncertain conditions. Future work will include refinements to the design of both sun sensor methodologies and further improvements to localization and navigation.



---

*Source: 549080-2013-12-17.xml*