simpleBattery#

Executive Summary#

The SimpleBattery class is a minimal model of battery functionality that considers:

  1. Integrated net input power of the attached modules

  2. The battery’s maximum storage capacity as defined by the storageCapacity attribute. Integration of the net input power 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.

User Guide#

To set up this module users must create a SimpleBattery instance:

battery = simpleBattery.SimpleBattery()
battery.modelTag = "batteryModel"

In addition to the variables that must be set for the PowerStorageBase base class, this module requires the storageCapacity attribute to be specified. The total power stored in the battery will be limited to not exceed this capacity value:

battery.storageCapacity = 10.0 # Given in Joules or Watt-seconds

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

battery.addPowerNodeToModel(powerMsg)

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

Class SimpleBattery#

class SimpleBattery : public PowerStorageBase#

simple battery class

Public Functions

SimpleBattery()#

The constructor creates a SimpleBattery instance with zero stored charge

Public Members

double storageCapacity#

[W-s] Battery capacity in Watt-seconds (Joules).

BSKLogger bskLogger#

— BSK Logging