Skip to content

Simulated Battery

Configurable battery with realistic physics, efficiency losses, thermal effects, degradation, and optional inverter simulation.

Quick Start with Presets

json
{
  "Name": "home-battery",
  "DeviceClass": "SimulatedBattery",
  "AssetType": "Battery",
  "SimulatedBattery": {
    "ConfigurationModel": "MediumResidential"
  }
}

See Battery Presets for all available models.

Custom Configuration

json
{
  "Name": "sim-battery",
  "DeviceClass": "SimulatedBattery",
  "AssetType": "Battery",
  "SimulatedBattery": {
    "ConfigurationModel": "Custom",
    "CapacityWh": 100000.0,
    "InitialSoC": 50.0,
    "InitialSoH": 95.0,
    "MaxPowerW": 100000.0,
    "RoundTripEfficiency": 0.90,
    "Inverter": {
      "Enabled": true,
      "RatedPowerVA": 120000.0,
      "MaxDischargePowerW": 100000.0,
      "MaxChargePowerW": 100000.0
    }
  }
}

Configuration Options

Core Properties

PropertyDescriptionDefault
CapacityWhBattery capacity in watt-hours100,000 Wh (100 kWh)
InitialSoCInitial state of charge percentage50%
InitialSoHInitial state of health percentage95%
InitialTemperatureCInitial temperature in Celsius25°C
RoundTripEfficiencyRound-trip efficiency as decimal0.90 (90%)
MaxPowerWMaximum charge/discharge power in watts100,000 W (100 kW)
MinVoltageMinimum voltage at 0% SoC360 V
MaxVoltageMaximum voltage at 100% SoC420 V

Energy Registers & Cycles

PropertyDescriptionDefault
InitialImportRegisterWhInitial import energy register1,500,000 Wh
InitialExportRegisterWhInitial export energy register1,200,000 Wh
InitialCyclesInitial cycle count120

Chemistry

PropertyDescriptionDefault
ChemistryBattery chemistry typeLiIon

Chemistry options:

  • LiIon - Lithium-Ion (NMC/NCA): 360-420V, gradual S-curve with steeper slopes at extremes
  • LiFePO4 - Lithium Iron Phosphate: 320-365V, flat voltage plateau between 10-90% SoC
  • SodiumIon - Sodium-Ion: 300-380V, more linear curve than Li-Ion

Cooling System

PropertyDescriptionDefault
CoolingCooling system typeActiveAir
AmbientTemperatureCAmbient air temperature20°C
CoolantTemperatureCCoolant temperature for liquid cooling25°C

Cooling options:

TypeDescriptionCooling Factor
PassiveAirNatural convection0.2× (slowest)
ActiveAirForced air circulation1.0× (baseline)
LiquidCoolingWater/glycol circulation3.0× (fastest)
ChillerActive refrigeration cyclePrecise setpoint control

Degradation

PropertyDescriptionDefault
DegradationPerCyclePercentSoH degradation per full cycle0.1%
MinSoHMinimum state of health percentage70%

Pack & Cell Configuration

PropertyDescriptionDefault
PackCountNumber of battery packs1
CellsPerPackNumber of cells per pack96
CapacityPerPackWhCapacity per pack in WhCalculated
CellVoltageVariationVMax voltage variation between cells (±V)0.02 V (±20 mV)
PackTemperatureVariationCTemperature variation between packs (±°C)2.0 °C
CellTemperatureVariationCTemperature variation within a pack (±°C)1.0 °C
PRateCPower-to-capacity ratio (1.0 = 1C)Calculated

Thermal Properties

PropertyDescriptionDefault
IdlePowerWIdle energy consumption for BMS and cooling50 W
ThermalThresholdWPower threshold for thermal effects50,000 W
HeatingRateCPerHourTemperature rise rate at high power0.5 °C/hr
CoolingRateCPerHourBase cooling rate0.2 °C/hr
MaxTemperatureCMaximum operating temperature45°C
ThermalDeratingThresholdCTemperature for power derating40°C
ThermalDeratingFactorPower derating factor at high temp0.95 (5% reduction)

Inverter Configuration

When enabled, the battery's DC power is converted through the inverter before grid connection.

json
"Inverter": {
  "Enabled": true,
  "RatedPowerVA": 250000.0,
  "MaxDischargePowerW": 250000.0,
  "MaxChargePowerW": 250000.0,
  "PeakEfficiency": 0.98,
  "NominalACVoltageV": 230.0,
  "StandbyPowerLossW": 400.0,
  "MaxOperatingTemperatureC": 60.0
}
PropertyDescriptionDefault
EnabledEnable inverter simulationfalse
RatedPowerVAInverter rated power (VA)250,000 VA
MaxDischargePowerWMaximum discharge (export) power on AC side250,000 W
MaxChargePowerWMaximum charge (import) power on AC side250,000 W
PeakEfficiencyPeak conversion efficiency (0.0-1.0)0.98 (98%)
NominalACVoltageVNominal AC voltage (line-to-neutral)230 V
StandbyPowerLossWStandby power consumption400 W
MaxOperatingTemperatureCMaximum operating temperature60°C

Inverter features:

  • Variable efficiency based on load (peak at 30-70% load)
  • Separate charge/discharge limits on AC side
  • Temperature rises with conversion losses
  • Reactive power control (configurable power factor and VAr setpoints)
  • AC voltage, current, frequency, and power factor metrics

The system's effective power is limited by both the battery's MaxPowerW (DC side) and the inverter's limits (AC side).

Per-Pack and Per-Cell Tracking

The battery supports detailed per-pack and per-cell voltage and temperature tracking.

Hierarchy

text
Battery System
├── Pack 0
│   ├── Cell 0
│   ├── Cell 1
│   └── ... (CellsPerPack cells)
├── Pack 1
│   ├── Cell 0
│   └── ...
└── ... (PackCount packs)

Cell Statistics Metrics

MetricDescription
MaxCellVoltageHighest voltage across all cells
MinCellVoltageLowest voltage across all cells
AvgCellVoltageAverage voltage across all cells
MaxCellTemperatureHighest temperature across all cells
MinCellTemperatureLowest temperature across all cells
AvgCellTemperatureAverage temperature across all cells

Implementation Details

  • Deterministic initialization: Same asset name produces identical cell values
  • Voltage drift: ±2 mV per update simulates natural cell imbalance
  • Temperature drift: ±0.05 °C per update for realistic thermal variation

Use Cases

  • Health monitoring: Compare MaxCellVoltage and MinCellVoltage to detect cell imbalance (>100 mV indicates degradation)
  • Thermal management: Monitor MaxCellTemperature to trigger cooling or power derating (>40°C threshold)
  • Pack-level analysis: Iterate through Packs collection to analyze individual pack behavior

Power Setpoint Convention

  • Positive = discharge (export to grid)
  • Negative = charge (import from grid)

Use GetPowerLimits() to check max charge/discharge based on current SoC and temperature.

Examples

Large Commercial Battery (250 kWh)

json
{
  "Name": "commercial-battery",
  "DeviceClass": "SimulatedBattery",
  "AssetType": "Battery",
  "SimulatedBattery": {
    "ConfigurationModel": "Custom",
    "CapacityWh": 250000.0,
    "MaxPowerW": 200000.0,
    "InitialSoC": 80.0,
    "RoundTripEfficiency": 0.92,
    "Chemistry": "LiIon",
    "Inverter": {
      "Enabled": true,
      "RatedPowerVA": 250000.0,
      "MaxDischargePowerW": 200000.0,
      "MaxChargePowerW": 200000.0,
      "PeakEfficiency": 0.98
    }
  }
}

Residential LiFePO4 Battery (13.5 kWh)

json
{
  "Name": "home-battery",
  "DeviceClass": "SimulatedBattery",
  "AssetType": "Battery",
  "SimulatedBattery": {
    "ConfigurationModel": "Custom",
    "CapacityWh": 13500.0,
    "MaxPowerW": 5000.0,
    "InitialSoC": 50.0,
    "MinVoltage": 320.0,
    "MaxVoltage": 365.0,
    "Chemistry": "LiFePO4",
    "Inverter": {
      "Enabled": true,
      "RatedPowerVA": 6000.0,
      "MaxDischargePowerW": 5000.0,
      "MaxChargePowerW": 5000.0
    }
  }
}

Overriding Preset Properties

json
{
  "Name": "customized-residential",
  "DeviceClass": "SimulatedBattery",
  "AssetType": "Battery",
  "SimulatedBattery": {
    "ConfigurationModel": "LargeResidential",
    "InitialSoC": 80.0,
    "RoundTripEfficiency": 0.92
  }
}