modelBatterySimple

Simplified model of a battery without events

Extends from TransiEnt.Basics.Icons.Model (Icon for models).

Information

Purpose

Simple battery model with SOC state and SOC‑dependent charge/discharge limits. Optionally applies input dynamics (dead time and first‑order lag) to the power setpoint before enforcing limits.

Function

  • Energy state: der(E) = P_actual, SOC = E / Bat_Capacity.
  • Setpoint path: P_set → optional fixedDelay(deadTime) → optional FirstOrder(T=tau) → P_set_internal.
  • Hard limit: P_limit = clamp(P_set_internal, -Bat_PowerLimit, +Bat_PowerLimit).
  • SOC limits (no nested lists): – If SOC ≥ 1 and charging or SOC ≤ 0 and discharging ⇒ P_actual = 0.
    – If charging and SOC ≥ threshold_P_curtailment ⇒ linear taper to P_min_rel at SOC = 1.
    – If discharging and SOC ≤ 1 - threshold_P_curtailment ⇒ linear taper to P_min_rel at SOC = 0.
    – Else ⇒ P_actual = P_limit.
  • Electrical coupling: P_actual is exported via a PQ boundary at the complex power port epp.

Inputs

  • P_set — desired charge/discharge power (W, + = charge).
  • epp — electrical grid connection (complex power port).

Outputs

  • SOC — state of charge (0–1).
  • P_set_internal — setpoint after optional dynamics (for diagnostics).
  • P_max — reported absolute power limit (= Bat_PowerLimit).

Notes

  • useDynamics=false bypasses both dead time and first‑order lag.
  • Model omits voltage/current dynamics and efficiency; power is applied directly to the energy state.

Source

Time‑constant references: S. S. T. AG, Technische Information – SUNNY BOY SMART ENERGY / SUNNY BOY STORAGE / SUNNY ISLAND, 1st ed., Sep. 2022.

Parameters

TypeNameDefaultDescription
Realthreshold_P_curtailment0.95If SOC > thr. reduce power linearly
RealP_min_rel0.02Minimum relative power at SOC limits (0 or 1)
Battery
Modelica.Units.SI.EnergyBat_Capacity90e3*3600Battery capacity in Joule
RealBat_SOCStart0.5Battery Charge at start
Modelica.Units.SI.PowerBat_PowerLimit15000Charge and discharge power
Dynamics
BooleanuseDynamicstrueTime constant of delay transfer function
Modelica.Units.SI.TimedeadTime2Time constant of delay transfer function
Modelica.Units.SI.Timetau3Time constant of first order transfer function

Connectors

TypeNameDefaultDescription
TransiEnt.Basics.Interfaces.Electrical.ComplexPowerPortepp
Modelica.Blocks.Interfaces.RealOutputSOC
Modelica.Blocks.Interfaces.RealOutputP_set_internal
TransiEnt.Basics.Interfaces.Electrical.ElectricPowerInP_setSet power for charging and discharging
TransiEnt.Basics.Interfaces.Electrical.ElectricPowerOutP_maxReal Power

Components

TypeNameDefaultDescription
Modelica.Blocks.Sources.RealExpressionP_actual_
Modelica.Blocks.Nonlinear.FixedDelayfixedDelay
Modelica.Blocks.Continuous.FirstOrderfirstOrder
Modelica.Blocks.Math.GainnoDynamics
Modelica.Units.SI.EnergyE
Modelica.Units.SI.PowerP_actual
Modelica.Units.SI.PowerP_limit
TransiEnt.Components.Boundaries.Electrical.ComplexPower.PQBoundarypQBoundary
Modelica.Blocks.Sources.RealExpressionBattery_PowerLimit