Module: 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 Module: 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:

  1. 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 Module: 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 Module: 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.

1battery = simplePowerMonitor.SimplePowerMonitor()
2battery.ModelTag = "powerMonitorModel"

The next step is to attach one or more PowerNodeUsageMsgPayload instances to it using the addNodeToStorage() method.

1battery.addPowerNodeToModel(powerMsg)

For more information on how to set up and use this module, see the simple power system example: scenarioPowerDemo


class SimplePowerMonitor : public PowerStorageBase
#include <simplePowerMonitor.h>

simple power monitor class

Public Functions

SimplePowerMonitor()

The constructor creates a SimplePowerMonitor instance with zero stored charge and a capacity of -1.

~SimplePowerMonitor()

Private Functions

void evaluateBatteryModel(PowerStorageStatusMsgPayload *msg)

This method integrates the net power across all the attached devices and stores it.

Returns

void