mtbFeedforward#

Executive Summary#

This module computes the torque produced by the magnetic torque bars and applies it to the current commanded body torque as a feedforward term.

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.

Module I/O Messages#

Msg Variable Name

Msg Type

Description

vehControlInMsg

CmdTorqueBodyMsgPayload

input message containing the current control torque in the Body frame

dipoleRequestMtbInMsg

MTBCmdMsgPayload

input message containing the individual dipole requests for each torque bar on the vehicle

tamSensorBodyInMsg

TAMSensorBodyMsgPayload

input message for magnetic field sensor data

mtbParamsInMsg

MTBArrayConfigMsgPayload

input message for MTB layout

vehControlOutMsg

CmdTorqueBodyMsgPayload

output message containing the current control torque in the Body frame

Detailed Module Description#

The following presents the mathematics for computing the expected torque produced by the torque rods given their alignment matrix, Gt, the individual rod dipole commands, and the local magnetic field vector in the Body frame. This value is then fed forward to reaction wheels by adding it to the current command Body frame torque to drive the net momentum of the reaction wheel system to zero.

The expected torque produced by the torque rods is given by

\[{}^{\cal B} {\pmb \tau}_{\text{rods}} = [G_t] {\pmb\mu}_{\text{cmds}} \times \ {}^{\cal B}{\bf b}\]

and the feed forward command used to dump the momentum of the reaction wheels is simply the negation of the expected torque produced by the rods.

\[{}^{\cal B} {\pmb\tau}_{\text{ff}} = - {}^{\cal B}{\pmb\tau}_{\text{rods}}\]

User Guide#

See the example script scenarioMtbMomentumManagementSimple for an illustration on how to use this module. Note that the user must specify the torque rod alignment matrix GtMatrix_B in row major form.

Class MtbFeedforward#

class MtbFeedforward : 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. Check if required input messages are connected.

Parameters:

callTime – [ns] time the method is called

Returns:

void

void updateState(uint64_t callTime) override#

Computes the feedforward torque rod torque.

Parameters:

callTime – The clock time at which the function was called (nanoseconds)

Returns:

void

Public Members

ReadFunctor<CmdTorqueBodyMsgPayload> vehControlInMsg#

input message containing the current control torque in the Body frame

ReadFunctor<MTBCmdMsgPayload> dipoleRequestMtbInMsg#

input message containing the individual dipole requests for each torque bar on the vehicle

ReadFunctor<TAMSensorBodyMsgPayload> tamSensorBodyInMsg#

[Tesla] input message for magnetic field sensor data in the Body frame

ReadFunctor<MTBArrayConfigMsgPayload> mtbArrayConfigParamsInMsg#

input message containing configuration parameters for all the torque bars on the vehicle

Message<CmdTorqueBodyMsgPayload> vehControlOutMsg#

output message containing the current control torque in the Body frame

MTBArrayConfigMsgPayload mtbArrayConfigParams#

configuration for MTB layout

BSKLogger bskLogger = {}#

BSK Logging.