sunSearch#
Executive Summary#
This module lets the spacecraft perform three consecutive rotations about the three principal body axes. The axes are user defined and any combination of the three is allowed, including repeated rotations about the same axis. Moreover, the user is required to specify the desired slew time for each rotation, the total slew angle, the maximum angular rate, and maximum deliverable torques about each axis. The module reads in the spacecraft current state and computes a guidance message based on current angular rates and reference angular rates and acceleration. The output of this module should be paired with a control module such as mrpPD. The resulting closed-loop guidance and control strategy is designed such that the output kinematic profile corresponds to a bang-bang type of slew maneuver.
Message Connection Descriptions#
The following table lists all the module input and output messages. 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 |
---|---|---|
attNavInMsg |
NavAttMsgPayload |
Input message containing current spacecraft rates in body-frame coordinates. |
vehConfigInMsg |
VehicleConfigMsgPayload |
Input message containing the spacecraft inertia tensor about point B, in the body-frame. |
attGuidOutMsg |
AttGuidMsgPayload |
C++-wrapped output guidance message. |
attGuidOutMsgC |
AttGuidMsgPayload |
C-wrapped output guidance message. |
Detailed Module Description#
For each consecutive rotation, this module attempts to meet all the user-defined requirements. However, the problem is inherently overly-prescribed. This section describes the flow of operations that allows to compute the optimal reference rate and acceleration for each principal axis rotation. For each axis, the maximum angular acceleration \(\alpha_M\) is obtained from the system’s principal inertias and the user-specified maximum deliverable torques:
The subscripts \(i\) are to indicate each principal body axis, and are dropped from now on for ease of notation. The maximum angular rates about each axis \(\omega_M\) are user-defined. The total required slew angle about each axis \(\theta_R\) and the requested slew time \(T_R\) are also user-defined.
Bang-bang maneuver, no coasting, matching the requested time#
First, this module computes a bang-bang maneuver with constant, opposite acceleration in the first and second half of the maneuer. The total maneuver time coincides with \(T_R\). The constant acceleration throughout the maneuver is:
Defining \(t_c\) as the control time, i.e., the time during which actuator control needs to be delivered in order to accelerate and decelerate the spacecraft, it is in this case \(t_c = T_R / 2\). Note that there need to be two identical control time windows in order to ramp the spacecraft’s rate up and then down back to zero. The maximum angular rate is reached at \(t = T_R/2\) and it is \(\omega^* = \frac{2\theta_R}{T_R}\).
Bang-bang maneuver, no coasting, exceeding the requested time#
If the computed angular acceleration exceeds the maximum acceleration \((\alpha^* > \alpha_M)\), the aforementioned maneuver is infeasible. In this case the acceleration is set to the maximum value \(\alpha_M\). The priority is to ensure that the rotation sweeps the required angle \(\theta_R\) exactly, but in order for this to happend with a lower angular acceleration that what is optima, the maneuver happens in a total slew time \(T > T_R\). For a slew maneuver consisting of two accelerated arcs and one coasting arc in the middle, happening at \(\omega^*\), the following equation holds true:
where, for the controlled time \(t_c\) to be real, it needs to be \(T \geq \sqrt{ \frac{4\theta_R}{\alpha_M} }\). To maintain the slew time as short as possible, the choice is \(T = \sqrt{ \frac{4\theta_R}{\alpha_M} }\), where from \(\alpha_M < \alpha^*\) it follows that \(T > T_R\). Solving the second-order equation for the control time gives \(t_c = T/2\), ultimately resulting in a bang-bang maneuver with no coasting, whose total duration exceeds the requested maneuver time. The maximum angular rate is reached at \(t = T/2\) and it is \(\omega^* = \frac{2\theta_R}{T}\).
Bang-bang maneuver with coasting#
If the maximum angular rate reached during the slew exceeds the maximum admissible rate \((\omega^* > \omega_M)\), the maneuver must be adjusted further. Imposing that the maximum rate is \(\omega_M\), the and that the spacecraft stops accelerating and coasts and that rate before decelerating back to zero, gives the following relation:
The control time is obtained as \(t_c = \frac{\omega_M}{\alpha}\) where \(\alpha = \min(\alpha_M, \alpha^*)\). Solving the previous equation for the slew time gives:
which indicates that adding a coasting arc to meet the requirement on the angular rate further increases the total slew time.
User Guide#
The required module configuration is:
attGuid = sunSearch.SunSearch()
attGuid.setSlewTime(90, 90, 90) # [s]
attGuid.setSlewAngle(np.pi/2, np.pi, 2*np.pi) # [rad]
attGuid.setMaxRate(np.pi/180, 2*np.pi/180, 3*np.pi/180) # [rad/s]
attGuid.setMaxTorque(12.5, 25.0, 50) # [Nm]
attGuid.setRotAxis(1, 2, 3) # 1 = 'x', 2 = 'y', 3 = 'z'
Class SunSearch#
-
class SunSearch : public SysModel#
A class to perform EMA SEP pointing.
Public Functions
-
void reset(uint64_t currentSimNanos)#
This method is used to reset the module.
- Returns:
void
-
void updateState(uint64_t currentSimNanos)#
This method is the main carrier for the computation of the guidance message
- Parameters:
currentSimNanos – The current simulation time for system
- Returns:
void
-
void setSlewTime(double const t1, const double t2, const double t3)#
Set the slew time
- Parameters:
double – slewTime
- Returns:
void
-
void setSlewAngle(double const theta1, double const theta2, double const theta3)#
Set the slew angle
- Parameters:
double – slewAngle
- Returns:
void
-
void setMaxRate(double const omega1, double const omega2, double const omega3)#
Set the maximum angle rate
- Parameters:
double – slewMaxRate
- Returns:
void
-
void setMaxTorque(double const u1, double const u2, double const u3)#
Set the maximum torque
- Parameters:
double – slewMaxTorque
- Returns:
void
-
void setRotAxis(int const a1, int const a2, int const a3)#
Set the rotation axis
- Parameters:
double – slewRotAxis
- Returns:
void
-
void reset(uint64_t currentSimNanos)#