mrpPD#

Executive Summary#

This module provides a MRP based PD attitude control module. It is similar to mrpFeedback, but without the RW or the integral feedback option. The feedback control is able to asymptotically track a reference attitude if there are no unknown dynamics and the attitude control torque is implemented with a thruster set.

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

Attitude guidance input message

guidInMsg

AttGuidMsgPayload

Vehicle configuration input message

cmdTorqueOutMsg

CmdTorqueBodyMsgPayload

Commanded torque output message

Detailed Module Description#

This attitude feedback module using the MRP feedback control related to the control in section 8.4.1 in Analytical Mechanics of Space Systems:

(1)#\[{\bf L}_{r} = -K \pmb\sigma - [P] \delta\pmb\omega + [I](\dot{\pmb\omega}_{r} - [\tilde{\pmb\omega}]\pmb\omega_{r}) +[\tilde{\pmb \omega}_{r}] ] [I]\pmb\omega - \bf L\]

Note that this control solution creates an external control torque which must be produced with a cluster of thrusters. No reaction wheel information is used here. Further, the feedback control component is a simple proportional and derivative feedback formulation. As shown in Analytical Mechanics of Space Systems, this control can asymptotically track a general reference trajectory given by the reference frame \(\cal R\).

Module Assumptions and Limitations#

This control assumes the spacecraft is rigid and that the inertia tensor does not vary with time.

User Guide#

The required module configuration is:

module = mrpPD.mrpPD()
module.modelTag = "mrpPD"
module.setProportionalGainK(K)
module.setDerivativeGainP(P)
module.setKnownTorquePntB_B(knownTorquePntB_B)

Class MrpPD#

class MrpPD : public SysModel#

MRP PD control class.

Public Functions

void reset(uint64_t currentSimNanos) override#

Reset method for the BSK module adapter interface. This method also calls the algorithm reset method.

Parameters:

callTime – [ns] Time the method is called

Returns:

void

void updateState(uint64_t currentSimNanos) override#

Update method for the BSK module adapter interface. This method also calls the algorithm update method.

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:

double

void setKnownTorquePntB_B(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 setProportionalGainK(double K)#

Setter method for the proportional gain K.

Parameters:

K – [rad/s] Proportional gain applied to MRP errors

Returns:

void

double getProportionalGainK() const#

Getter method for the proportional gain K.

Returns:

double

Public Members

ReadFunctor<AttGuidMsgPayload> guidInMsg#

Attitude guidance input message.

ReadFunctor<VehicleConfigMsgPayload> vehConfigInMsg#

Vehicle configuration input message.

Message<CmdTorqueBodyMsgPayload> cmdTorqueOutMsg#

Commanded torque output message.