rateControl#
Executive Summary#
This module implements a feedback control law to damp the angular rates of the spacecraft until they are brought to zero.
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 |
|---|---|---|
vehConfigInMsg |
VehicleConfigMsgPayload |
Attitude guidance input message |
guidInMsg |
AttGuidMsgPayload |
Vehicle configuration input message |
cmdTorqueOutMsg |
CmdTorqueBodyMsgPayload |
Commanded torque output message |
Detailed Module Description#
The control is similar to mrpPD, but does not feed back on the orientation error:
where \(P\) is a positive, user-defined scalar quantity.
User Guide#
The required module configuration is:
module = rateDamp.RateDamp()
module.modelTag = "rateDamp"
module.setDerivativeGainP(P)
module.setKnownTorquePntB_B(knownTorquePntB_B)
Class RateControl#
-
class RateControl : public SysModel#
Public Functions
-
void reset(uint64_t currentSimNanos) 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.
- Parameters:
callTime – [ns] Time the method is called
- Returns:
void
-
void updateState(uint64_t currentSimNanos) override#
This method takes the attitude and rate errors relative to the reference frame, as well as the reference frame angular rates and acceleration, and computes the required control torque Lr.
- Parameters:
callTime – [ns] Time the method is called
- Returns:
void
-
void setDerivativeGainP(double P)#
Setter method for the derivative gain P.
- Parameters:
P – [N*m*s] Rate error feedback gain applied
- Returns:
void
-
double getDerivativeGainP() const#
Getter method for the derivative gain P.
- Returns:
const double
-
void setKnownTorquePntB_B(const Eigen::Vector3d &knownTorquePntB_B)#
Setter method for the known external torque about point B.
- Parameters:
knownTorquePntB_B – [N*m] Known external torque expressed in body frame components
- Returns:
void
-
const Eigen::Vector3d &getKnownTorquePntB_B() const#
Getter method for the known torque about point B.
- Returns:
const Eigen::Vector3d
-
void reset(uint64_t currentSimNanos) override#