Module: solarArrayReference
Executive Summary
This module is used to calculate the required rotation angle for a solar array that is able to rotate about its drive axis. The degree of freedom associated with the rotation of the array about the drive axis makes it such that it is possible to improve the incidence angle between the sun and the array surface, thus ensuring maximum power generation.
Message Connection Descriptions
The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.
Msg Variable Name |
Msg Type |
Description |
---|---|---|
hingedRigidBodyRefOutMsg |
Output Hinged Rigid Body Reference Message. |
|
attNavInMsg |
Input Attitude Navigation Message. |
|
attRefInMsg |
Input Attitude Reference Message. |
|
hingedRigidBodyInMsg |
Input Hinged Rigid Body Message Message. |
|
vehConfigInMsg (optional) |
Input vehicle configuration message containing the position of the center of mass of the system. |
|
rwConfigDataInMsg (optional) |
Input message containing the number of reaction wheels, relative inertias and orientations with respect to the body frame. |
|
rwSpeedsInMsg (optional) |
Input message containing the relative speeds of the reaction wheels with respect to the hub. |
Module Assumptions and Limitations
This module computes the rotation angle required to achieve the best incidence angle between the Sun direction and the solar array surface. This does not mean that perfect incidence (Sun direction perpendicular to array surface) is guaranteed. This module assumes that the solar array has only one surface that is able to generate power. This bounds the output reference angle \(\theta_R\) between \(0\) and \(2\pi\). Perfect incidence is achievable when the solar array drive direction and the Sun direction are perpendicular. Conversely, when they are parallel, no power generation is possible, and the reference angle is set to the current angle, to avoid pointless energy consumption attempting to rotate the array.
The Sun direction in body-frame components is extracted from the attNavInMsg
. The output reference angle \(\theta_R\), however, can be computed either based on the reference attitude contained in attRefInMsg
, or the current spacecraft attitude contained also in attNavInMsg
. This depends on the frequency with which the arrays need to be actuated, in comparison with the frequency with which the motion of the spacecraft hub is controlled. The module input attitudeFrame
allows the user to set whether to compute the reference angle based on the reference attitude or current spacecraft attitude.
Detailed Module Description
For this module to operate, the user needs to provide two unit directions as inputs:
\({}^\mathcal{B}\boldsymbol{\hat{a}}_1\): direction of the solar array drive, about which the rotation happens;
\({}^\mathcal{B}\boldsymbol{\hat{a}}_2\): direction perpendicular to the solar array surface, with the array at a zero rotation.
The same math applies to the case where the body reference is used. In that case, the same vectors are expressed in body-frame coordinates. Note that the unit directions \(\boldsymbol{\hat{a}}_i\) have the same components in both the body and reference frame, because they are body-fixed and rotate with the spacecraft hub.
Some logic is implemented such that the computed reference angle \(\theta_R\) and the current rotation angle \(\theta_C\) received as input from the hingedRigidBodyInMsg
are never more than 360 degrees apart.
The derivative of the reference angle \(\dot{\theta}_R\) is computed via finite differences.
Maximum Power Generation
To compute the reference rotation that maximizes Sun incidence \(\theta_{\text{Sun,}R}\), the module computes the unit vector \({}^\mathcal{R}\boldsymbol{\hat{a}}_2\), which is coplanar with \({}^\mathcal{B}\boldsymbol{\hat{a}}_1\) and the Sun direction \({}^\mathcal{R}\boldsymbol{\hat{r}}_S\). This is obtained as:
and then normalizing to obtain \({}^\mathcal{R}\boldsymbol{\hat{a}}_2\). The reference angle \(\theta_{\text{Sun,}R}\) is the angle between \({}^\mathcal{B}\boldsymbol{\hat{a}}_2\) and \({}^\mathcal{R}\boldsymbol{\hat{a}}_2\):
Momentum Dumping
In this pointing mode, the reference angle is computed in order to leverage solar radiation pressure (SRP) to produce a torque on the spacecraft opposing the local net reaction wheel momentum (\(\boldsymbol{H}\)). This functionality applies to a set of two rotating solar arrays whose rotation axes are opposite to one another, and it consists in articulating the two arrays differentially in order to generate a net SRP torque.
With respect to a ‘’zero rotation’’ configuration, where zero rotation consists in having the power-generating surface of the array directly facing the Sun, the desire is to drive one of the two arrays at an offset inclination angle \(\theta\) with respect to the Sun direction. This offset is defined as:
where \(\Theta_\text{max}\), \(\sigma\), and \(n\) are user-defined parameters, and \(\nu\) is defined as:
where \(\boldsymbol{r}_{O/C}\) is the location of the array center of pressure with recpect to the system CM, \(\boldsymbol{\hat{r}}_\text{S}\) is the direction of the Sun wirh respect to the spacecraft, and \(\boldsymbol{H}_\text{RW}\) is the net wheel momentum.
The parameter \(\Theta_\text{max}\) allows to specify a maximum deflection of the array with respect to the Sun, in order to prevent it from ever reaching an edge-on configuration. The parameter \(\sigma\) is a tuning gain, whether the exponent \(n > 1\) allows to introduce a deadband around the zero rotation to avoid chattering.
For more details on the mathematical derivation and stability considerations, see R. Calaon, C. Allard and H. Schaub, “Momentum Management of a Spacecraft equipped with a Dual-Gimballed Electric Thruster”, currently in preparation for submission to the Journal of Spacecraft and Rockets.
User Guide
The required module configuration is:
saReference = solarArrayReference.solarArrayReference()
saReference.ModelTag = "solarArrayReference"
saReference.a1Hat_B = [1, 0, 0]
saReference.a2Hat_B = [0, 0, 1]
saReference.attitudeFrame = 0
saReference.pointingMode = 0
saReference.ThetaMax = np.pi/2
saReference.sigma = 1
saReference.n = 1
unitTestSim.AddModelToTask(unitTaskName, saReference)
The module is configurable with the following parameters:
Parameter |
Description |
---|---|
|
solar array drive direction in B-frame coordinates |
|
solar array zero-rotation direction, in B-frame coordinates |
|
0 for reference angle computed w.r.t reference frame; 1 for reference angle computed w.r.t. body frame; defaults to 0 if not specified |
|
0 for maximum power generation; 1 maximum momentum dumping; defaults to 0 if not specified |
|
between 0 and Pi |
|
tuning gain; setting to zero removes momentum management capability |
|
n > 1 introduces a deadband around zero rotation. |
Enums
Functions
-
void SelfInit_solarArrayReference(solarArrayReferenceConfig *configData, int64_t moduleID)
This method initializes the output messages for this module.
- Parameters:
configData – The configuration data associated with this module
moduleID – The module identifier
-
void Reset_solarArrayReference(solarArrayReferenceConfig *configData, uint64_t callTime, int64_t moduleID)
This method performs a complete reset of the module. Local module variables that retain time varying states between function calls are reset to their default values.
- Parameters:
configData – The configuration data associated with the module
callTime – [ns] time the method is called
moduleID – The module identifier
-
void Update_solarArrayReference(solarArrayReferenceConfig *configData, uint64_t callTime, int64_t moduleID)
This method computes the updated rotation angle reference based on current attitude, reference attitude, and current rotation angle
- Parameters:
configData – The configuration data associated with the module
callTime – The clock time at which the function was called (nanoseconds)
moduleID – The module identifier
-
struct solarArrayReferenceConfig
- #include <solarArrayReference.h>
Top level structure for the sub-module routines.
Public Members
-
double a1Hat_B[3]
solar array drive axis in body frame coordinates
declare these user-defined quantities
-
double a2Hat_B[3]
solar array surface normal at zero rotation
-
AttitudeFrame attitudeFrame
attitudeFrame = 1: compute theta reference based on body frame instead of reference frame
-
double r_AB_B[3]
location of the array center of pressure in body frame coordinates
-
double ThetaMax
[rad] maximum deflection angle allowed in momentum management mode
-
double sigma
[-] gain of the momentum management control law
-
double n
[-] design parameter of the momentum management control law
-
int count
counter variable for finite differences
declare these variables for internal computations
-
uint64_t priorT
prior call time for finite differences
-
double priorThetaR
prior output msg for finite differences
-
RWArrayConfigMsgPayload rwConfigParams
struct to store message containing RW config parameters in body B frame
-
PointingMode pointingMode
flag that assesses whether RW information is provided to perform momentum dumping
input msg measured attitude
-
AttRefMsg_C attRefInMsg
input attitude reference message
-
VehicleConfigMsg_C vehConfigInMsg
input msg vehicle configuration msg (needed for CM location)
-
RWSpeedMsg_C rwSpeedsInMsg
input reaction wheel speeds message
-
RWArrayConfigMsg_C rwConfigDataInMsg
input RWA configuration message
-
HingedRigidBodyMsg_C hingedRigidBodyInMsg
input hinged rigid body message
-
HingedRigidBodyMsg_C hingedRigidBodyRefOutMsg
output msg containing hinged rigid body target angle and angle rate
-
BSKLogger *bskLogger
BSK Logging.
-
double a1Hat_B[3]