Module: thrFiringSchmitt

Executive Summary

A Schmitt trigger logic is implemented to map a desired thruster force value into a thruster on command time.

The module reads in the attitude control thruster force values for both on- and off-pulsing scenarios, and then maps this into a time which specifies how long a thruster should be on. The thruster configuration data is read in through a separate input message in the reset method. The Schmitt trigger allows for an upper and lower bound where the thruster is either turned on or off. More information can be found in the PDF Description. The paper Steady-State Attitude and Control Effort Sensitivity Analysis of Discretized Thruster Implementations includes a detailed discussion on the Schmitt Trigger and compares it to other thruster firing methods.

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.

../../../../_images/moduleImgThrFiringSchmitt.svg

Figure 1: thrFiringSchmitt() Module I/O Illustration

Module I/O Messages

Msg Variable Name

Msg Type

Description

thrForceInMsg

THRArrayCmdForceMsgPayload

thruster force input message

onTimeOutMsg

THRArrayOnTimeCmdMsgPayload

thruster on-time output message

thrConfInMsg

THRArrayConfigMsgPayload

Thruster array configuration input message


Functions

void SelfInit_thrFiringSchmitt(thrFiringSchmittConfig *configData, int64_t moduleID)

This method initializes the configData for this module. It creates a single output message of type THRArrayOnTimeCmdMsgPayload.

Parameters
  • configData – The configuration data associated with this module

  • moduleID – The ID associated with the configData

Returns

void

void Update_thrFiringSchmitt(thrFiringSchmittConfig *configData, uint64_t callTime, int64_t moduleID)

This method maps the input thruster command forces into thruster on times using a remainder tracking logic.

Parameters
  • configData – The configuration data associated with the module

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

  • moduleID – The ID associated with the configData

Returns

void

void Reset_thrFiringSchmitt(thrFiringSchmittConfig *configData, uint64_t callTime, int64_t moduleID)

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
  • configData – The configuration data associated with the module

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

  • moduleID – The ID associated with the configData

Returns

void

struct thrFiringSchmittConfig
#include <thrFiringSchmitt.h>

Top level structure for the sub-module routines.

Public Members

double level_on

[-] ON duty cycle fraction

double level_off

[-] OFF duty cycle fraction

double thrMinFireTime

[s] Minimum ON time for thrusters

int baseThrustState

[-] Indicates on-pulsing (0) or off-pusling (1)

int numThrusters

[-] The number of thrusters available on vehicle

double maxThrust[MAX_EFF_CNT]

[N] Max thrust

boolean_t lastThrustState[MAX_EFF_CNT]

[-] ON/OFF state of thrusters from previous call

uint64_t prevCallTime

callTime from previous function call

THRArrayCmdForceMsg_C thrForceInMsg

The name of the Input message.

THRArrayOnTimeCmdMsg_C onTimeOutMsg

The name of the output message*, onTimeOutMsg.

THRArrayConfigMsg_C thrConfInMsg

The name of the thruster cluster Input message.

BSKLogger *bskLogger

BSK Logging.