Module: thrusterPlatformReference¶
Executive Summary¶
This module computes a reference orientation for a dual-gimballed platform connected to the main hub. The platform can only perform a tip-and-tilt type of rotation, and therefore one degree of freedom is blocked. A thruster is mounted on the platform, whose direction is known in platform-frame coordinates. The goal of this module is to compute a reference orientation for the platform which can align the thruster direction with the system’s center of mass, to zero the net torque produced by the thruster on the spacecraft. Alternatively, this module can offset the thrust direction with respect to the center of mass to produce a net torque that dumps the momentum accumulated on the reaction wheels.
Message Connection Descriptions¶
The following table lists all the module input and output messages. The module msg variable name 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 |
---|---|---|
vehConfigInMsg |
Input vehicle configuration message containing the position of the center of mass of the system. |
|
rwConfigDataInMsg |
Input message containing the number of reaction wheels, relative inertias and orientations with respect to the body frame. |
|
rwSpeedsInMsg |
Input message containing the relative speeds of the reaction wheels with respect to the hub. |
|
hingedRigidBodyRef1OutMsg |
Output message containing the reference angle and angle rate for the tip angle. |
|
hingedRigidBodyRef2OutMsg |
Output message containing the reference angle and angle rate for the tilt angle. |
|
bodyHeadingOutMsg |
Output message containing the unit direction vector of the thruster in body-frame coordinates. |
|
thrusterTorqueOutMsg |
Output message containing the opposite of the net torque produced by the thruster on the system. |
Detailed Module Description¶
A detailed mathematical derivation of the equations implemented in this module can be found in R. Calaon, L. Kiner, C. Allard and H. Schaub, “Momentum Management of a Spacecraft equipped with a Dual-Gimballed Electric Thruster”.
This module computes a direction cosine matrix \([\mathcal{FM}]\) that describes the rotation between the platform frame \(\mathcal{F}\) and the mount frame \(\mathcal{M}\). To be compliant with the constraint in the motion of the platform, i.e. the dual gimbal, such frame must have a zero in the element (2,1). When such condition is met, the reference angles computed from the D.C.M. allow to align the thruster through the system’s center of mass. The input parameters for this module allow to specify offsets between the origin \(M\) of the hub-fixed mount frame \(\mathcal{M}\) and the origin \(F\) of the platform-fixed frame \(\mathcal{F}\), the application point of the thruster force in the \(\mathcal{F}\) frame, and the direction, in \(\mathcal{F}\)-frame coordinates, of the thrust vector.
When the optional input messages rwConfigDataInMsg
and rwSpeedsInMsg
the user can specify an input parameter K
, which is the proportional gain of a control gain that computes an offset with respect to the center of mass: this allows for the thruster to apply a torque on the system that dumps the momentum accumulated on the wheels. Such control law has the expression:
where \(\boldsymbol{H}_w\) is the momentum on the wheels.
Module Assumptions and Limitations¶
As pointed out in the paper referenced above, it is not always guaranteed that a direction cosine matrix exists, that can satisfy both the pointing requirement on the thrust direction and the kinematic constraint on the dual-gimballed platform. When a solution does not exist, a minimum problem is solved to compute the closest constraint-incompliant D.C.M. The tip and tilt referemce angles \(\nu_{1R}\) and \(\nu_{2R}\) are extracted from the final D.C.M. according to:
without checking whether the D.C.M. \([\mathcal{FM}]\) is constraint compliant. As a result, the angles \(\nu_{1R}\) and \(\nu_{2R}\) produce a constraint compliant reference, which however might not align the thruster with the desired point in the hub.
User Guide¶
The required module configuration is:
platformConfig = thrusterPlatformReference.ThrusterPlatformReferenceConfig()
platformWrap = unitTestSim.setModelDataWrap(platformConfig)
platformWrap.ModelTag = "platformReference"
platformConfig.sigma_MB = sigma_MB
platformConfig.r_BM_M = r_BM_M
platformConfig.r_FM_F = r_FM_F
platformConfig.r_TF_F = r_TF_F
platformConfig.T_F = T_F
platformConfig.K = K
scSim.AddModelToTaskAddModelToTask(simTaskName, platformWrap, platformConfig)
The module is configurable with the following parameters:
Parameter |
Default |
Description |
---|---|---|
|
[0, 0, 0] |
relative rotation between body-fixed frames \(\mathcal{M}\) and \(\mathcal{B}\) |
|
[0, 0, 0] |
relative position of point \(B\) with respect to point \(M\), in \(\mathcal{M}\)-frame coordinates |
|
[0, 0, 0] |
relative position of point \(F\) with respect to point \(M\), in \(\mathcal{F}\)-frame coordinates |
|
[0, 0, 0] |
relative position of point \(T\) with respect to point \(F\), in \(\mathcal{F}\)-frame coordinates |
|
[0, 0, 0] |
thrust vector in \(\mathcal{F}\)-frame coordinates |
|
0 |
proportional gain of the momentum dumping control loop |
Functions
-
void SelfInit_thrusterPlatformReference(ThrusterPlatformReferenceConfig *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
- Returns
void
-
void Reset_thrusterPlatformReference(ThrusterPlatformReferenceConfig *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
- Returns
void
-
void Update_thrusterPlatformReference(ThrusterPlatformReferenceConfig *configData, uint64_t callTime, int64_t moduleID)¶
This method updates the platformAngles message based on the updated information about the system center of mass
- Parameters
configData – The configuration data associated with the module
callTime – The clock time at which the function was called (nanoseconds)
moduleID – The module identifier
- Returns
void
-
void tprComputeFirstRotation(double THat_F[3], double rHat_CM_F[3], double F1M[3][3])¶
-
void tprComputeSecondRotation(double r_CM_F[3], double r_TM_F[3], double r_CT_F[3], double T_F_hat[3], double FF1[3][3])¶
-
void tprComputeThirdRotation(double e_theta[3], double F2M[3][3], double F3F2[3][3])¶
-
void tprComputeFinalRotation(double r_CM_M[3], double r_TM_F[3], double T_F[3], double FM[3][3])¶
-
struct ThrusterPlatformReferenceConfig¶
- #include <thrusterPlatformReference.h>
Top level structure for the sub-module routines.
Public Members
-
double sigma_MB[3]¶
orientation of the M frame w.r.t. the B frame
-
double r_BM_M[3]¶
position of B frame origin w.r.t. M frame origin, in M frame coordinates
-
double r_FM_F[3]¶
position of F frame origin w.r.t. M frame origin, in F frame coordinates
-
double r_TF_F[3]¶
position of the thrust application point w.r.t. F frame origin, in F frame coordinates
-
double T_F[3]¶
thrust vector in F frame coordinates
-
double K¶
momentum dumping time constant [1/s]
-
RWArrayConfigMsgPayload rwConfigParams¶
struct to store message containing RW config parameters in body B frame
-
int momentumDumping¶
flag that assesses whether RW information is provided to perform momentum dumping
-
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 hingedRigidBodyRef1OutMsg¶
output msg containing theta1 reference and thetaDot1 reference
-
HingedRigidBodyMsg_C hingedRigidBodyRef2OutMsg¶
output msg containing theta2 reference and thetaDot2 reference
-
BodyHeadingMsg_C bodyHeadingOutMsg¶
output msg containing the thrust heading in body frame coordinates
-
CmdTorqueBodyMsg_C thrusterTorqueOutMsg¶
output msg containing the opposite of the thruster torque to be compensated by RW’s
-
BSKLogger *bskLogger¶
BSK Logging.
-
double sigma_MB[3]¶