CcBatteryPack

Package: inet.power.storage

CcBatteryPack

simple module

(no description)

Inheritance diagram

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

Extends

Name Type Description
SimpleCcBattery simple module

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 an charge independent internal resistance. It initiates node crash when the residual charge capacity reaches zero. See the base module for signals and statistics.

Parameters

Name Type Default value Description
nominalCapacity double numberOfCells * cellNominalCapacity

maximum amount of charge stored

initialCapacity double nominalCapacity

the initially stored amount of charge

nominalVoltage double arrangement == "serial" ? numberOfCells * cellNominalVoltage : cellNominalVoltage

open circuit voltage at maximum charge

internalResistance double arrangement == "serial" ? numberOfCells * cellInternalResistance : cellInternalResistance / numberOfCells

internal resistance

displayStringTextFormat string "%c (%p)"
numberOfCells int 1

number of cells in the battery pack

arrangement string "serial"
cellNominalCapacity double 7200 C

typical capacity of AA battery is 2 Ah = 7200 C

cellNominalVoltage double 1.5 V
cellInternalResistance double 0.1 Ohm

Properties

Name Value Description
display i=block/plug
class SimpleCcBattery

Signals

Name Type Unit
currentConsumptionChanged
residualChargeCapacityChanged
currentGenerationChanged

Statistics

Name Title Source Record Unit Interpolation Mode
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

simple CcBatteryPack extends SimpleCcBattery
{
    parameters:
        int numberOfCells = default(1); // number of cells in the battery pack
        string arrangement @enum("serial","parallel") = default("serial");
        double cellNominalCapacity @unit(C) = default(7200 C); // typical capacity of AA battery is 2 Ah = 7200 C
        double cellNominalVoltage @unit(V) = default(1.5 V);
        double cellInternalResistance @unit(Ohm) = default(0.1 Ohm);
        nominalCapacity = default(numberOfCells * cellNominalCapacity); // cell capacities are added when arranged in parallel
        nominalVoltage = default(arrangement == "serial" ? numberOfCells * cellNominalVoltage : cellNominalVoltage); // voltage is added when cells arranged in series
        internalResistance = default(arrangement == "serial" ? numberOfCells * cellInternalResistance : cellInternalResistance / numberOfCells); // internal resistance is added when cells arranged in series
}
File: src/inet/power/storage/CcBatteryPack.ned