modelBattery

Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).

Information

General description

Goal

The Battery.mo model describes the calculations of the State of Charge (SoC) of a battery. The implementation is based on [Tant12].

Description

The dynamic SoC calculation equation is: SoC_t = SoC_{t-1} - sd_t + (eta_c x Pc_t x T_s - 1/eta_d x Pd_t x T_s) / E_nom, with sd_t the self-discharge on time t, eta_c and eta_d the charge and discharge efficiency, Pc_t and Pd_t the charge and discharge power, T_s the time step resolution and E_nom the nominal battery capacity.

It is impossible to charge/discharge a battery at the same time: Pc_t x Pd_t = 0.

Connectors

TypeNameDefaultDescription
Modelica.Blocks.Interfaces.RealInputPFlowActive power exchange
Modelica.Blocks.Interfaces.RealOutputSoC_outSoC measurement

Components

TypeNameDefaultDescription
Modelica.Units.SI.PowerPActive power exchange
Modelica.Units.SI.ActivePowerPExchPower exchange = Energy exchange
Modelica.Units.SI.EfficiencySoCState of Charge of battery capacity in [%/100]
Modelica.Units.SI.EfficiencydSoCChange in SoC in time interval
Modelica.Units.SI.ActivePowerPlosChaPower losses (converters) during charging
Modelica.Units.SI.ActivePowerPlosDisChaPower losses (converters) during discharging