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
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Blocks.Interfaces.RealInput | PFlow | Active power exchange | |
| Modelica.Blocks.Interfaces.RealOutput | SoC_out | SoC measurement |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Power | P | Active power exchange | |
| Modelica.Units.SI.ActivePower | PExch | Power exchange = Energy exchange | |
| Modelica.Units.SI.Efficiency | SoC | State of Charge of battery capacity in [%/100] | |
| Modelica.Units.SI.Efficiency | dSoC | Change in SoC in time interval | |
| Modelica.Units.SI.ActivePower | PlosCha | Power losses (converters) during charging | |
| Modelica.Units.SI.ActivePower | PlosDisCha | Power losses (converters) during discharging |