Editor: Reaction Wheel Power Software
Description
This guide showcases how to add reaction wheel power software to a spacecraft software chain, demonstrating how the software can produce a voltage message that can be converted back into the reaction wheel motor torque. This guide will not show how to configure pointing software chains and assumes that a pointing chain has already been configured. Additionally, this guide will not demonstrate how to connect a reaction wheel to the power bus.
This example scenario can be found at the Power/Demo_AttitudeFeedbackRWPower
level. It uses the reaction wheel array to orient the spacecraft’s attitude to align with the NADIR direction whilst also using power software modules.
Creating the Spacecraft
Start by configuring a level with a spacecraft spawned in orbit. The spacecraft must have the following components for this chain to work correctly:
- Reaction Wheel Array
- Computer
The spacecraft can have any other number of components. The data system is independent of the software and is not required to be configured at the software level. The spacecraft shown is used for this guide.
Construct the Pointing Software
Any valid pointing software algorithm can be used here which can define the pointing orientation of the spacecraft. If unsure how to configure the pointing software, see the pointing chain operator guides for more information. It is assumed a standard pointing ode is used here for this guide. In this case, the LVLH pointing mode is used and the software has been configured.
Adding the Motor Voltage Software
The following software nodes are added after the Motor Torque Software
is added and before the message is stored in the reaction wheels. The next software to add is the Reaction Wheel Motor Voltage Software
, which defines the voltage conversion between the reaction wheel motor torques. The software takes in four messages. The motor torque message should come from the motor torque software, which is standard for all reaction wheel pointing chains. The next three messages typically come from the reaction wheels, with the optional exception of the availability message which if not provided, will assume all wheels are available.
The Motor Voltage software is configurable and three key parameters can be adjusted on the software node.
- Min Voltage: The minimum voltage that can be associated with a particular torque on the reaction wheels. This must be an absolute positive value.
- Max Voltage: The maximum voltage that can be associated with a particular torque on the wheels, ensuring that no voltage can exceed this value.
- K: The torque tracking gain for closed-loop control in voltage per torque.
Adding the Motor Voltage Device Interface Software
The next software module that must be added is the Motor Voltage Device Interface Software
, which takes in the array motor voltage message that was produced by the previous software node. This node can recalculate the motor torque by some mapped factors and determine the new torque of the reaction wheels after the voltage mapping has been applied. This is also the same location in which a power output message would be used as the input message if the power system was connected.
This software takes in three arrays, each of which is the length of the number of reaction wheels available. It is assumed that any values not represented in the array will have a value of 0.
- Bias: This array stores the bias values to add to the torque output.
- Scale Factor: This array stores a scale factor to multiply the gain of the reaction wheel torques for each wheel.
- K: This stores the array values of the proportionality gain constants for converting the voltages back to the motor torques for each wheel.
Connecting the Reaction Wheel Message
The final task is to connect the reaction wheel motor torque message to the reaction wheels by calling the Set In Messages
method on the reaction wheels. This will use the output messages from the device interface software module that was just added. The message must be set on the reaction wheels to ensure it is using the correct motor torque software message.