The Battery.mo
model describes the calculations of the
State of Charge (SoC) of a battery. The implementation is based on [Tant12].
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.