Table of Contents

Sensor: Coarse Sun Sensor

Description

This class is designed to model the state of a single coarse sun sensor (CSS) attached to a spacecraft. It emulates the “counts” that will typically be output by the ADC on board a spacecraft. The coarse sun sensor module also supports user-enabled faulty behaviour by assigning a value to the fault state member of a given sensor.

Example Use Cases

  • Creating a CSS constellation to determine the sun direction vector on a spacecraft.
  • Predict the sunlight factor on the spacecraft using non-truth simulated noise parameters.

Module Implementation

To estimate the sun heading vector \(\textbf{s}\), the satellite vectors between the sun and the position in the inertial frame \(N\) as used. Assume that the \(H\) frame is the sun frame, then:

\[ \space^N\textbf{s} = \space^N\vec{r}_{NH}-\space^N\vec{r}_{NB} \]

After normalizing this vector to \(\hat{\textbf{s}}\), and using the mapping of the attitude \({\sigma}_{NB}\) to \([BN]\), it is mapped into body frame components through:

\[ \space^B\hat{\textbf{s}} = [BN]^N\hat{\textbf{s}} \]

The CSS unit normal vector can be specified as \(\space^B\hat{\textbf{n}}\) in the body frame components. The normalized cosine sensor signal \(\hat{\gamma}\) is determined through the equation:

\[ \hat{\gamma} = \hat{\textbf{n}}\cdot\hat{\textbf{s}} = \cos\phi \]

where \(\phi\) is the CSS sunlight incidence angle. This is the normalized CSS signal where a value of \(1.0\) is returned if the sensor is looking straight at the sun. If the sensor axis \(\hat{\textbf{n}}\) is more than the field of view half-angle, set through the field of view (FOV) parameter, from the sun axis, then a value of \(0.0\) is returned from the signal. This FOV variable is the angle from \(\hat{\textbf{n}}\) beyond which the CSS signal is set to zero. The Kelly parameter allows for the CSS signal to pinch towards zero for larger incidence angles. The Kelly distribution, \(p_\kappa\) can be computed as a function \(f_\kappa\):

\[ f_\kappa = 1 - e^{-\hat{\gamma}^2/\kappa} \]

This means that the normalized curve of the Kelly application would be:

\[ \gamma_\kappa = \gamma f_\kappa \]

This now reflects the true output behaviour of the sun sensor at larger incidence angles. The cosine curve is scaled according to the intensity of the light the sensor receives. This also includes scaling based on solar flux at a given distance from the sun as well as eclipse shadowing. The model is standardized for \(1 AU\) from the sun, where any distance from the sun will result in reading as per the equations above. The solar intensity factor based on distance from the sun is:

\[ f_\mathrm{sunDist} = \frac{(1 AU)^2}{r^2_{HB}}\bigg[\frac{m^2}{m^2}\bigg] \]

The shadow factor due to the eclipse is given as \(f_s\). The output curve adjusted for light intensity is:

\[ \gamma_{\mathrm{li}} = \gamma_\kappa f_\mathrm{sunDist}f_s \]

If the spacecraft is outside of the planet’s shadow, \(f_s\) is evaluated as 1.0. If it is within the shadow, then it is \(0\le f_s \lt 1\). This curve has now accounted for the light intensity, but not for the magnitude or units of the sensor output. To do that, a scale factor, \(f_\mathrm{scale}\) is factored into the equation:

\[ \gamma_\mathrm{clean} = f_\mathrm{scale}\gamma_{\mathrm{li}} \]

where \(\gamma_\mathrm{clean}\) is the output of a sensor with no noise. Gaussian noise and sensor can be added to the signal. The normalized bias is set through a sensor bias, while the normalized noise is set through the sensor noise std parameter. Let \(n\) be the normalized sensor noise and \(b\) be the normalized sensor bias. These values are non-dimensional and apply to the unscaled output. Therefore, they will also be scaled when a scale factor is applied to the output. To calculate the noise of the sensor, the following equation is applied.

\[ \gamma_\mathrm{noise} = (\gamma_\mathrm{li} + n + b)f_\mathrm{scale} \]

This indicates that sensor noise is not a function of light incidence angle or light intensity. The noise or bias could have caused the sensor to produce a value less than 0.0 or higher than is possible for the hardware. To prevent this, saturation values are input and treated as a maximum or minimum value.

\[ \gamma_\mathrm{capped} = \min(\mathrm{maxOutput}, \gamma_\mathrm{noise}) \\ \gamma_\mathrm{out} = \min(\mathrm{minOutput}, \gamma_\mathrm{capped}) \]

where \(\gamma_\mathrm{out}\) is the final output of the sensor module.

Assumptions/Limitations

  • The module assumes that sensor readings and bias are the same in every direction from normal. In reality, there may be different biases or errors depending on which direction the sun vector is from the sensor's normal vector. This limits the use of this module to sensors that are symmetric or only slightly asymmetric.
  • Currently, the model is hard-coded to zero out any albedo input, so it is limited to cases where albedo is not important.
  • The model assumes the sensor to have a nominal cosine behaviour. This is distorted by the Kelly factor. To improve behaviour closer to reality where housing and spacecraft glint might cause slightly non-conical non-cosine behaviour, a look-up table of sensor outputs compared to sun headings could be implemented in future work.

References

[1] Autonomous Vehicle Systems (AVS) Laboratory, 2023