SimpleCcBattery

Package: inet.power.storage

SimpleCcBattery

simple module

C++ definition

This battery model maintains a residual charge capacity by integrating the difference between the total consumed current and the total generated current over time. This model uses a charge-independent ideal voltage source and a charge-independent internal resistance. It initiates node crash when the residual charge capacity reaches zero. See the base module for signals and statistics.

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Known subclasses

Name Type Description
CcBatteryPack simple module

Models a battery pack consisting of multiple identical cells arranged in series or parallel. Calculates the overall capacity, voltage, and internal resistance based on the cell properties and their arrangement. In a serial arrangement, voltages and internal resistances add up. In a parallel arrangement, capacities add up and internal resistance decreases.

Extends

Name Type Description
CcEnergyStorageBase simple module

This is an abstract base module for current-based energy storage models. It defines shared signals and statistics.

Parameters

Name Type Default value Description
displayStringTextFormat string "%c (%p)"

Determines the text that is written on top of the submodule, supports displaying pars, watches, and module-specific information

nominalCapacity double

Maximum amount of charge stored

initialCapacity double nominalCapacity

The initially stored amount of charge

nominalVoltage double

Open circuit voltage at maximum charge

internalResistance double

Internal resistance

Properties

Name Value Description
class SimpleCcBattery
display i=block/plug

Signals

Name Type Unit Description
currentConsumptionChanged
residualChargeCapacityChanged
currentGenerationChanged

Statistics

Name Title Source Record Unit Interpolation Mode Description
currentGeneration Current generation currentGenerationChanged vector A sample-hold
residualChargeCapacity Residual charge capacity residualChargeCapacityChanged vector C linear
currentConsumption Current consumption currentConsumptionChanged vector A sample-hold

Source code

//
// This battery model maintains a residual charge capacity by integrating the
// difference between the total consumed current and the total generated current
// over time. This model uses a charge-independent ideal voltage source and a
// charge-independent internal resistance. It initiates node crash when the
// residual charge capacity reaches zero. See the base module for signals and
// statistics.
//
simple SimpleCcBattery extends CcEnergyStorageBase
{
    parameters:
        double nominalCapacity @unit(C); // Maximum amount of charge stored
        double initialCapacity @unit(C) = default(nominalCapacity); // The initially stored amount of charge
        double nominalVoltage @unit(V); // Open circuit voltage at maximum charge
        double internalResistance @unit(Ohm); // Internal resistance
        displayStringTextFormat = default("%c (%p)");
        @class(SimpleCcBattery);
}

File: src/inet/power/storage/SimpleCcBattery.ned