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.

Module I/O Messages

Msg Variable Name

Msg Type

Description

vehConfigInMsg

VehicleConfigMsgPayload

Input vehicle configuration message containing the position of the center of mass of the system.

thrusterConfigFInMsg

THRConfigMsgPayload

Input thruster configuration message containing the thrust direction vector and magnitude in platform frame coordinates. The entry rThrust_B here is the position of the thrust application point, with respect to the origin of the platform frame, in platform-frame coordinates (\({}^\mathcal{F}\boldsymbol{r}_{T/F}\)).

rwConfigDataInMsg

RWArrayConfigMsgPayload

Input message containing the number of reaction wheels, relative inertias and orientations with respect to the body frame.

rwSpeedsInMsg

RWSpeedMsgPayload

Input message containing the relative speeds of the reaction wheels with respect to the hub.

hingedRigidBodyRef1OutMsg

HingedRigidBodyMsgPayload

Output message containing the reference angle and angle rate for the tip angle.

hingedRigidBodyRef2OutMsg

HingedRigidBodyMsgPayload

Output message containing the reference angle and angle rate for the tilt angle.

bodyHeadingOutMsg

BodyHeadingMsgPayload

Output message containing the unit direction vector of the thruster in body-frame coordinates.

thrusterTorqueOutMsg

CmdTorqueBodyMsgPayload

Output message containing the opposite of the net torque produced by the thruster on the system.

thrusterConfigBOutMsg

THRConfigMsgPayload

Output thruster configuration message containing the thrust direction vector and magnitude in reference body frame coordinates. The entry rThrust_B here is the position of the thrust application point, with respect to the origin of the body frame, in body-frame coordinates (\({}^\mathcal{B}\boldsymbol{r}_{T/B}\)).

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:

\[\boldsymbol{d} = -\frac{1}{t^2} \boldsymbol{t} \times(\kappa \boldsymbol{h}_w + \kappa_I \boldsymbol{H}_w)\]

where \(\boldsymbol{h}_w\) is the momentum on the wheels and \(\boldsymbol{H}_w\) the integral over time of the momentum:

\[\boldsymbol{H}_w = \int_{t_0}^t \boldsymbol{h}_w \text{d}t.\]

The inputs theta1Max and theta2Max are used to set bounds on the output reference angles for the platform. If there are no mechanical bounds, setting these inputs to a negative value bypasses the routine that bounds these angles.

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:

\[\begin{align} \nu_{1R} &= \arctan \left( \frac{f_{23}}{f_{22}} \right) & \nu_{2R} &= \arctan \left( \frac{f_{31}}{f_{11}} \right) \end{align}\]

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:

platformReference = thrusterPlatformReference.thrusterPlatformReference()
platformReference.ModelTag  = "platformReference"
platformReference.sigma_MB  = sigma_MB
platformReference.r_BM_M    = r_BM_M
platformReference.r_FM_F    = r_FM_F
platformReference.K         = K
platformReference.Ki        = Ki
platformReference.theta1Max = theta1Max
platformReference.theta2Max = theta2Max
scSim.AddModelToTaskAddModelToTask(simTaskName, platformReference)

The module is configurable with the following parameters:

Module Parameters

Parameter

Default

Description

sigma_MB

[0, 0, 0]

relative rotation between body-fixed frames \(\mathcal{M}\) and \(\mathcal{B}\)

r_BM_M

[0, 0, 0]

relative position of point \(B\) with respect to point \(M\), in \(\mathcal{M}\)-frame coordinates

r_FM_F

[0, 0, 0]

relative position of point \(F\) with respect to point \(M\), in \(\mathcal{F}\)-frame coordinates

K

0

proportional gain of the momentum dumping control loop

Ki (optional)

0

integral gain of the momentum dumping control loop

theta1Max (optional)

0

absolute bound on tip angle

theta2Max (optional)

0

absolute bound on tilt angle


Enums

enum momentumDumping

Values:

enumerator Yes
enumerator No

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

declare these user-defined quantities

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 K

momentum dumping proportional gain [1/s]

double Ki

momentum dumping integral gain [1]

double theta1Max

absolute bound on tip angle [rad]

double theta2Max

absolute bound on tilt angle [rad]

RWArrayConfigMsgPayload rwConfigParams

struct to store message containing RW config parameters in body B frame

declare variables for internal module calculations

int momentumDumping

flag that assesses whether RW information is provided to perform momentum dumping

double hsInt_M[3]

integral of RW momentum

double priorHs_M[3]

prior RW momentum

uint64_t priorTime

prior call time

VehicleConfigMsg_C vehConfigInMsg

input msg vehicle configuration msg (needed for CM location)

declare module IO interfaces

THRConfigMsg_C thrusterConfigFInMsg

input thruster configuration msg

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

THRConfigMsg_C thrusterConfigBOutMsg

output msg containing the thruster configuration infor in B-frame

BSKLogger *bskLogger

BSK Logging.