mtbMomentumManagement#
Executive Summary#
This module computes the appropriate wheel torques and magnetic torque bar dipoles to bias the wheels to their desired speeds. Note that there is no gurantee that the wheel speeds will converge to their bias when less than 3 orthornormal torque rods are in use. In this case it is recommended that a nullspace controller be used to drive the wheels toward their bias. Documentation for the math used in this module can be found in a paper by Eric Hogan.
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 |
---|---|---|
rwParamsInMsg |
RWArrayConfigMsgPayload |
input message for RW parameters |
mtbParamsInMsg |
MTBArrayConfigMsgPayload |
input message for MTB layout |
tamSensorBodyInMsg |
TAMSensorBodyMsgPayload |
input message for magnetic field sensor data |
rwSpeedsInMsg |
RWSpeedMsgPayload |
input message for RW speeds |
rwMotorTorqueInMsg |
ArrayMotorTorqueMsgPayload |
input message for RW motor torques |
mtbCmdOutMsg |
MTBCmdMsgPayload |
output message for MTB dipole commands |
rwMotorTorqueOutMsg |
ArrayMotorTorqueMsgPayload |
output message for RW motor torques |
User Guide#
See the example script scenarioMtbMomentumManagement for an illustration on how to use this module.
The user must set the momentum dumping gain value cGain
to a postive value. The required input messages are described above.
The optional module list wheelSpeedBiases
can be set to desired RW spin rates in terms of rad/sec. If this is not set,
the default values are zero rates.
Note that the MTB input configuration message variable GtMatrix_B
must be provided in a row major format.
Class MtbMomentumManagement#
-
class MtbMomentumManagement : public SysModel#
Top level structure for the sub-module routines.
Public Functions
-
void reset(uint64_t callTime) override#
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. The local copy of the message output buffer should be cleared.
- Parameters:
callTime – [ns] time the method is called
- Returns:
void
-
void updateState(uint64_t callTime) override#
Computes the appropriate wheel torques and magnetic torque bar dipoles to bias the wheels to their desired speeds.
- Parameters:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
Public Members
-
double wheelSpeedBiases[MAX_EFF_CNT]#
[rad/s] reaction wheel speed biases
-
double cGain#
[1/s] reaction wheel momentum feedback gain
-
ReadFunctor<RWArrayConfigMsgPayload> rwParamsInMsg#
input message for RW parameters
-
ReadFunctor<MTBArrayConfigMsgPayload> mtbParamsInMsg#
input message for MTB layout
-
ReadFunctor<TAMSensorBodyMsgPayload> tamSensorBodyInMsg#
input message for magnetic field sensor data in the Body frame
-
ReadFunctor<RWSpeedMsgPayload> rwSpeedsInMsg#
input message for RW speeds
-
ReadFunctor<ArrayMotorTorqueMsgPayload> rwMotorTorqueInMsg#
input message for RW motor torques
-
Message<MTBCmdMsgPayload> mtbCmdOutMsg#
output message for MTB dipole commands
-
Message<ArrayMotorTorqueMsgPayload> rwMotorTorqueOutMsg#
output message for RW motor torques
-
BSKLogger bskLogger = {}#
BSK Logging.
-
double tauDesiredMTB_B[3]#
[N-m] desired torque produced by the magnetic torque bars in the Body frame
-
double tauDesiredRW_B[3]#
[N-m] desired torque produced by the reaction wheels in the Body frame
-
double hDeltaWheels_W[MAX_EFF_CNT]#
[N-m-s] momentum of each wheel
-
double hDeltaWheels_B[3]#
[N-m-s] momentum of reaction wheels in the Body frame
-
double tauDesiredRW_W[MAX_EFF_CNT]#
[N-m] Desired individual wheel torques
-
double tauIdealRW_W[MAX_EFF_CNT]#
[N-m-s] Ideal individual wheel torques
-
double tauIdealRW_B[MAX_EFF_CNT]#
[N-m-s] Ideal wheel torque in the body frame
-
double wheelSpeedError_W[MAX_EFF_CNT]#
[N-m-s] difference between current wheel speeds and desired wheel speeds
-
RWArrayConfigMsgPayload rwConfigParams#
configuration for RW’s
-
MTBArrayConfigMsgPayload mtbConfigParams#
configuration for MTB layout
-
void reset(uint64_t callTime) override#