Actuator: Reaction Wheel Array
Description
The reaction wheel array component is a container and interface for a set of ReactionWheel
modules. By default, it registers any reaction wheel component that has been attached to it as a child object as part of its array to manage.
It’s primary purpose is to act as a single interface to control the attached reaction wheel array and to collect ensemble information e.g. reaction wheel mass properties and contributions to the parent objects Equations of Motion (EOM). This design is to simplify user interactions (e.g. one command message array can be attached to a single object instead of individual commands to each reaction wheel) and to better support unit specific model calibration (e.g. calibrating each reaction wheel to represent measured performance).
Example Use Cases
- Reaction Wheel Actuators: This module can be used as the primary interface for a reaction wheel based actuation set in an ADCS.
Module Implementation
Unlike other modules, the ReactionWheelArray
component is designed to act as the interface between instances of the ReactionWheel
class and the parent object’s equations of motion (EOM) e.g. the spacecraft. As a result, the ReactionWheel
class does not implement the standard UpdateMassProperties and UpdateContributions functions described in the Spacecraft
module. Instead, those methods are implemented here and this module calls reaction wheel specific behaviors. This is to ensure that reaction wheels do not double their contribution to the parent component. Note: A limitation of this approach is that the reaction wheel module must connected to a reaction wheel array, even if it’s a singleton, to function correctly.
The following sections provide high level pseudo-code illustrating the behaviour of the main ReactionWheelArray
methods.
OnBegin
At the beginning of every simulation, this module will run the following procedure:
protected override void OnBegin(double time)
{
// 1 - Collect array of reaction wheel components from children
Wheels = GetChildren<ReactionWheel>();
}
This provides a good example of how to use the GetChildrenReactionWheel
and return an array of ReactionWheel
modules.
RegisterStates
The ReactionWheel
class is an example of a module that has a local StateProperty
variable that requires integration. In its current implementation, it uses the spacecraft’s integrator integrate the reaction wheel speed and rotation angle, where specific ReactionWheel
models primary task to to specify the derivates of these properties.
The pseudo-code provided below gives an example of how the reaction wheel array registers its child ReactionWheel
components with the spacecraft integrator. See the ReactionWheel
module description for more details on how these parameters are used.
public override void RegisterStates(StateProperties properties)
{
// 1 - Loop through reaction wheels and record important parameters
foreach (var rw in Wheels)
{
if (rw.WheelModelType == ReactionWheelType.JitterSimple || rw.WheelModelType == ReactionWheelType.JitterFullyCoupled)
NumRWJitter++;
omegasForInit[index] = rw.Omega;
thetasForInit[index] = rw.Theta;
index++;
}
// 2 - Create the rw wheel state integrator
OmegasState = properties.Get("reactionWheelOmegas", (uint)NumRW);
ThetasState = properties.Get("reactionWheelThetas", (uint)NumRW);
// 3 - Set the inital values
OmegasState.SetValue(omegasForInit);
ThetasState.SetValue(thetasForInit);
}
OnUpdate
At every tick step, the module follows the following procedure:
protected override void OnUpdate(double time, double step)
{
// 1 - Read input commands
// 2 - Configure reaction wheel requests
// 3 - Write output messages
}
- The module checks for a valid array of torque command messages, which are the primary mechanism required to command reaction wheel speeds. If the message is null, torque requests are zeroed by default.
- The input reaction wheel torque command array is distributed amongst attached reaction wheels. Note: The assumption is that the index of attached children matches the reaction wheel configuration message that’s provided to the flight software. This configuration message is output from the
ReactionWheelArray
object but a command error pattern is to misalign this command array. This must be done manually. - Triggers a write output message function on self.
UpdateMassProperties
As discussed above, unlike most components, the ReactionWheel
module do not impliment an UpdateMassProperties function. Instead, as shown below, the ReactionWheelArray
component implements this function and calls a RW specific update mass properties function. It’s important to note, that this function updates the local mass information stored on each reaction wheel as normal.
public override void UpdateMassProperties(double time, double step)
{
// 1 - Update the reaction wheel mass properties
foreach (var rw in Wheels)
{
rw.UpdateRWMassProperties(ThetasState.Value[index], OmegasState.Value[index]);
index++;
}
}
Assumptions/Limitations
- Reaction wheels are assumed to be added to the reaction wheel array as child components.