simplePowerMonitor¶
Executive Summary¶
The SimplePowerMonitor class is a minimal representation of the PowerStorageBase base class that could represent an electrical battery. It tracks the integrated net power of a set of attached devices analagous to the behavior of the simpleBattery module. The main difference is that SimplePowerMonitor does not limit the amount of energy that can be stored. Thus, it is useful as a power monitor module that simple tracks the positive or negative net energy usage history. The functionality includes:
Compute the integrated and instantaneous net power of all attached devices. Integration is performed with a simple Euler method.
\[W_{stored} = \dot{W}_{net} (t_{current} - t_{previous})\]
Module Assumptions and Limitations¶
See powerStorageBase class for inherited assumption and limitations. The SimpleBattery class assumes that the net energy storage amount is a fixed value.
Message Connection Descriptions¶
This module only uses the input and output messages of the powerStorageBase base class. Because this module does not use the storage capacity, the output message sets the variable storageCapacity
to -1.
User Guide¶
To set up this module users must create a SimplePowerMonitor instance.
1 2 | battery = simplePowerMonitor.SimplePowerMonitor()
battery.ModelTag = "powerMonitorModel"
|
The next step is to attach one or more powerNodeUsageSimMsg instances to it using the addNodeToStorage()
method.
1 | battery.addPowerNodeToModel("msg name")
|
The final step is to specify the output message name.
1 | battery.batPowerOutMsgName= "outMsgName"
|
For more information on how to set up and use this module, see the simple power system example: scenarioPowerDemo
-
class
SimplePowerMonitor
: public PowerStorageBase¶ Public Functions
-
SimplePowerMonitor
()¶ The constructor creates a SimplePowerMonitor instance with zero stored charge and a capacity of -1.
-
~SimplePowerMonitor
()¶
Private Functions
-
void
evaluateBatteryModel
(PowerStorageStatusSimMsg *msg)¶ This method integrates the net power across all the attached devices and stores it.
- Return
void
-