rwNullSpace#
Executive Summary#
This module uses the Reaction Wheel (RW) null space to slow down the wheels. The resulting motor torques are super imposed on top of the attitude feedback control RW motor torques.
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.
Figure 1: rwNullSpace() Module I/O Illustration#
Msg Variable Name |
Msg Type |
Description |
|---|---|---|
rwMotorTorqueInMsg |
RwMotorTorqueMsgPayload |
RW motor torque input message |
rwSpeedsInMsg |
RWSpeedMsgPayload |
RW speed message |
rwDesiredSpeedsInMsg |
RWSpeedMsgPayload |
(optional) input message with the desired RW speeds |
rwConfigInMsg |
RWConstellationMsgPayload |
RW constellation configuration input message |
rwMotorTorqueOutMsg |
RwMotorTorqueMsgPayload |
RW motor torque output message |
Module Description#
Module Purpose#
This module aims to drive the reaction wheel (RW) speeds to desired values by using the null space of the RW array. There are three required input messages:
The feedback control torque which is mapped onto the RW motor torque solution space. The message type is
RWArrayTorqueIntMsg, the same message type as the module output message.The RW speed array message of type
RWSpeedIntMsg.The RW configuration message contains the RW spin axes information. The message type is
RWConstellationFswMsg.
There is one optional input message which provides the desired RW speeds. If this message is not connected, then the desired speeds default to zero values.
The module output message is a RW motor torque array message that sums the input control torque solution with the new null space torque solution that will reduce the RW speeds.
RW Null Space Mathematics#
Let \(N\) be the number of RWs present, while \(\hat{\bm g}_{s_{i}}\) is the \(i^{\text{th}}\) RW spin axis unit direction vector. The RW spin axes matrix is defined as
The null motion RW projection matrix \([\tau]\) is given by:raw-latex:cite{schaub}
This project matrix maps any vector \(\bm d\) into the null-space of \([G_{s}]\) such that no torque is exerted onto the spacecraft. As a result, these null-motion solution never impact the stability or performance of the RW attitude control solution. This concept is illustrated through:
RW Wheel Speed Reduction Control#
Let \(J_{s_{i}}>0\) be the RW inertia about the spin axis \(\hat{\bm g}_{s_{i}}\), \(\Omega_{i}\) be the RW spin speed, and \(\dot{\bm \omega}\) be the inertial spacecraft angular acceleration vector. Let \(\Omega_{i,d}\) be the desired wheel speeds, and
be the wheel speed tracking errors.
The RW motor torque equation is given by:raw-latex:cite{schaub}
Assuming that the spacecraft angular accelerations are much smaller than the wheel accelerations, this is approximated as
Let \(d_{i}\) be the desired torque to drive the \(i^{\text{th}}\) RW spin rate \(\Omega_{i}\) to the desired rate \(\Omega_{i,d}\) be given through
where the feedback gain \(K>0\). Then setting \(u_{s_{i}} = d_{i}\) ideally provides the stable closed loop response
as \(\dot\Omega_{i,d} = 0\).
Let \(\bm d\) be the \(N\times 1\) array of desired RW decelerating motor torques given by
If this RW motor torque were directly applied then a non-zero torque would be produced onto the spacecraft causing attitude deviations. Instead, this desired despin torque \(\bm d\) is mapped through \([\tau]\) onto the null space of the RW array using
Assume the attitude feedback RW motor control solution is given by \(\bm u_{s,\text{cont}}\), then final module RW motor torque array is the sum of these two torques.
Module Functions#
This module has the following functions:
Evaluate RW null projection matrix :math:`[tau]`: When reset the module will pull in the current RW configuration data and create the null motion projection matrix. This matrix remains fixed unit the module is reset again.
Compute a RW deceleration torque: With each update call the module computes a decelerating RW torque solution that lies in the null space of the RW array.
Output a net RW motor torque solution: The module combined the feedback control torque and the null space torque to slow down the RW speeds and outputs a net solution solution.
Module Assumptions and Limitations#
The module assumes all RW devices are operating and available. It also assumes the RW spin axes don’t change during the regular update cycles.
User Guide#
The module must have the feedback gain OmegaGain defined. This must
be a positive value. Further, all 3 input message connections must be
setup.
Module Setup#
The required module configuration is:
module = rwNullSpace.RwNullSpace()
module.modelTag = "rwNullSpace"
module.setOmegaGain(gain)
Class RwNullSpace#
-
class RwNullSpace : public SysModel#
The configuration structure for the rwNullSpace module.
Public Functions
-
void reset(uint64_t callTime) override#
This resets the module to original states by reading in the RW configuration messages and recreating any module specific variables. The output message is reset to zero.
- Parameters:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
-
void updateState(uint64_t callTime) override#
This method takes the input reaction wheel commands as well as the observed reaction wheel speeds and balances the commands so that the overall vehicle momentum is minimized.
- Parameters:
callTime – The clock time at which the function was called (nanoseconds)
- Returns:
void
-
void setOmegaGain(const double gain)#
Set the gain used for the wheel speed difference.
- Parameters:
gain – The gain used for the wheel speed difference.
-
double getOmegaGain() const#
Get the gain used for the wheel speed difference.
- Returns:
double The gain used for the wheel speed difference.
Public Members
-
ReadFunctor<RwMotorTorqueMsgPayload> rwMotorTorqueInMsg#
[-] The name of the Input message
-
ReadFunctor<RWSpeedMsgPayload> rwSpeedsInMsg#
[-] The name of the input RW speeds
-
ReadFunctor<RWSpeedMsgPayload> rwDesiredSpeedsInMsg#
[-] (optional) The name of the desired RW speeds
-
ReadFunctor<RWConstellationMsgPayload> rwConfigInMsg#
[-] The name of the RWA configuration message
-
Message<RwMotorTorqueMsgPayload> rwMotorTorqueOutMsg#
[-] The name of the output message
-
void reset(uint64_t callTime) override#