rateServoFullNonlinear#

Executive Summary#

This module implements a nonlinear rate servo control uses the attiude steering message and determine the ADCS control torque vector.

The module PDF Description contains further information on this module’s function, how to run it, as well as testing.

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

cmdTorqueOutMsg

CmdTorqueBodyMsgPayload

commanded torque output message

guidInMsg

AttGuidMsgPayload

attitude guidance input message

vehConfigInMsg

VehicleConfigMsgPayload

vehicle configuration input message

rwSpeedsInMsg

RWSpeedMsgPayload

(optional) RW speed input message

rwAvailInMsg

RWAvailabilityMsgPayload

(optional) RW availability input message

rwParamsInMsg

RWArrayConfigMsgPayload

(optional) RW configuration parameter input message

rateSteeringInMsg

RateCmdMsgPayload

commanded rate input message

Class RateServoFullNonlinear#

class RateServoFullNonlinear : public SysModel#

The configuration structure for the rateServoFullNonlinear module.

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.

Parameters:
  • this – The configuration data associated with the servo rate control

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

  • moduleID – The module identifier

Returns:

void

void updateState(uint64_t callTime) override#

This method takes 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:
  • this – The configuration data associated with the servo rate control

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

  • moduleID – The module identifier

Returns:

void

Public Members

double P#

[N*m*s] Rate error feedback gain applied

double Ki#

[N*m] Integration feedback error on rate error

double knownTorquePntB_B[3]#

[N*m] known external torque in body frame vector components

double integralLimit#

[N*m] Integration limit to avoid wind-up issue

uint64_t priorTime#

[ns] Last time the attitude control is called

double z[3]#

[rad] integral state of delta_omega

double ISCPntB_B[9]#

[kg m^2] Spacecraft Inertia

RWArrayConfigMsgPayload rwConfigParams#

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

Message<CmdTorqueBodyMsgPayload> cmdTorqueOutMsg#

commanded torque output message

ReadFunctor<AttGuidMsgPayload> guidInMsg#

attitude guidance input message

ReadFunctor<VehicleConfigMsgPayload> vehConfigInMsg#

vehicle configuration input message

ReadFunctor<RWSpeedMsgPayload> rwSpeedsInMsg#

(optional) RW speed input message

ReadFunctor<RWAvailabilityMsgPayload> rwAvailInMsg#

(optional) RW availability input message

ReadFunctor<RWArrayConfigMsgPayload> rwParamsInMsg#

(optional) RW configuration parameter input message

ReadFunctor<RateCmdMsgPayload> rateSteeringInMsg#

commanded rate input message

BSKLogger bskLogger = {}#

BSK Logging.