Module: ReactionWheelPower¶
Executive Summary¶
This module evaluates the power draw of a Module: reactionWheelStateEffector. It reads a message with the RW states containing the wheel speed and motor torque value. These are used to evaluate the power required to change the wheel speed. In addition, there is a base power draw of the RW device that accounts for the electrical power required for the RW device just to be on.
This module is a sub-class of Module: powerNodeBase class. As such it has the common properties:
Writes out a powerNodeUsageSimMsg describing its power consumption at each sim update based on its power consumption attribute
Can be switched on or off using an optional message of type deviceStatusIntMsg
Message Connection Descriptions¶
This module uses the input and output messages of the Module: powerNodeBase base class. The following table lists all the module input and output messages in addition to the base class. The module message variable name is set by the user from python. The message type contains a link to the message structure definition, while the description provides information on what this message is used for.
Figure 1: fswModuleTemplate()
Module I/O Illustration¶
Msg Variable Name |
Msg Type |
Description |
---|---|---|
rwStateInMsgName |
RW state input message to provide the reaction wheel speed and motor torque information. |
Detailed Module Description¶
Let \(p_{\text{RW}}\) be the net electrical power required to operate a reaction wheel device. This power requirement is computed from the base power requirement to operate the device and the mechancial power requirement to torque a spinning disk. Let \(p_{\text{base}}\) be the base RW device power requirement. This is a positive value indicating what power is required to just turn on the RW device, never mind control the wheel speed.
To compute the power required to change the energy state of a RW device the work/energy principle is used as discussed in Analytical Mechanics of Space Systems. The mechanical power required to change the wheel speed relative to the spacecraft body is
where \(u_s\) is the RW motor torque.
Case 1: No Mechanical Energy Recovery¶
The most basic RW power behavior assumes that it takes electrical power to both accelerate and decelerate the RW spin rate. Let the efficiency factor of converting electrical to mechanical power be given by \(\eta_{e2m}\). The net RW power is then
Case 2: Recovering Partially Mechanical Energy¶
The next case considers the RW device ability to partially recover the mechanical energy when breaking the RW speed. Let the mechanical to electrical conversion efficiency factor be \(\eta_{m2e}\). If the wheel speed is being made larger then \(p_{\text{mech}} > 0\) and Eq. (2) is used to evaluate the net RW power requirement.
If the wheel speed is being made smaller and \(p_{\text{mech}} < 0\), then if \(\eta_{m2e} >= 0\) the model assumes that breaking the wheel generates some power and thus decreases the net RW power requirement. This is evaluated using:
Note that \(p_{\text{RW}}\) could become negative in this situation, illustrating power being returned to the spacecraft power system.
Case 3: No Power Requirement for Breaking¶
If the user wants to model a case where breaking the RW speed requires no power, then simply set \(\eta_{m2e}\) = 0.
Module Power Output Evaluation¶
Having computed the net RW power need \(p_{\text{RW}}\), next the module power outpute \(p_{\text{out}}\) must be determined. Note that \(p_{\text{RW}}\) is typically a positive value, indicating it takes power to run this RW device. Thus, the power draw on the network is simply
Module Assumptions and Limitations¶
See Module: powerNodeBase class for inherited assumption and limitations. This RW power module assumes a positive RW power requirement manifests as a negative power draw on the spacecraft power system. A negative RW power requirement \(p_{\text{RW}}\) means the devices is converting mechanical energy back to the power grid.
User Guide¶
Inheritance¶
This module inherits the user guide from the Module: powerNodeBase base class. See that documentation for features common to that base class.
Minimum Module Setup¶
The following code illustrates the minimum module setup within Python assuming the module is
connected to the first RW (thus the 0
label):
testModule = PowerRW.PowerRW()
testModule.ModelTag = "bskSat"
testModule.basePowerNeed = 10. # baseline power draw, Watts
testModule.rwStateInMsgName = testModule.ModelTag + "_rw_config_0_data"
unitTestSim.AddModelToTask(unitTaskName, testModule)
The user needs to specify a base power consumption \(p_{\text{base}}\) through the variable basePowerNeed
.
This should be a positive value to reflect the power required just to turn on the RW device, even without
any motor torque commands being applied.
You also need to specify the RW state message with the module variable rwStateInMsgName
.
This setup will evaluate the RW power using Eq. (2) where 100% efficiency is assumed in converting
electrical to mechanical energy with elecToMechEfficiency
= \(\eta_{e2m}\) = 1, and no electrical energy is recovered
from breaking the wheel speeds with mechToElecEfficiency
= \(eta_{m2}\) = 1.
Accounting for Non-Ideal Power Conversion¶
For example, if 10W of electrical power does not lead to 10W of mechanical power, then this is modeled by setting
the module variable elecToMechEfficiency
to a strictly positive value less than 1. The value of 1 represents 100% conversion
efficiency and is the default value for this parameter.
To account for harvesting mechanical power during the RW speed braking process, converting mechanical to electrical
power, then the variable \(1 \ge\) mechToElecEfficiency
\(\ge 0\) must be set to a positive value. The value of
1 again 100% conversion efficiency (not realisitic). Typically this is a smaller percentage.
To account that breaking does not require any electrical power, then simply set
mechToElecEfficiency
to 0.
-
class
ReactionWheelPower
: public PowerNodeBase¶ Public Functions
-
ReactionWheelPower
()¶ Constructor
-
~ReactionWheelPower
()¶
-
void
customCrossInit
()¶ Custom message subscription method.
This method subscribes to the RW state message.
- Return
void
-
void
customReset
(uint64_t CurrentSimNanos)¶ Custom reset method.
This method is used to reset the module. Here variables are checked for correct values.
- Return
void
-
bool
customReadMessages
()¶ Custom read method, similar to customSelfInit; returns true by default.
This method is used to read incoming RW state message.
- Return
void
Public Members
-
std::string
rwStateInMsgName
¶ Reaction wheel state input message name.
-
double
elecToMechEfficiency
¶ efficiency factor to convert electrical power to mechanical power
-
double
mechToElecEfficiency
¶ efficiency factor to convert mechanical power to electrical power
-
double
basePowerNeed
¶ [W] base electrical power required to operate RW, typically a positive value
Private Functions
-
void
evaluatePowerModel
(PowerNodeUsageSimMsg *powerUsageMsg)¶ Computes the RW power load. Determines the netPower attribute in powerUsageSimMessage.
Private Members
-
int64_t
rwStateInMsgId
¶ Message ID for the RW state input message.
-
RWConfigLogSimMsg
rwStatus
¶ copy of the RW status message
-