semf
|
Interface for using state of charge in a battery model. More...
#include <batterystateofcharge.h>
Public Member Functions | |
virtual | ~BatteryStateOfCharge ()=default |
virtual void | updateSoc (uint16_t timeDelta, T_VOLTAGE voltage, T_CURRENT current, T_TEMPERATURE temperature)=0 |
Updates the state of charge relative to the current, voltage and temperature of the battery. More... | |
virtual T_SOC | relativeSoc () const =0 |
Returns the relative state of charge. This is the value normally showed on a display. More... | |
virtual T_SOC | absoluteSoc () const =0 |
Returns the absolute state of charge. More... | |
Protected Member Functions | |
virtual void | initSocByLastSoc (T_SOC lastAbsoluteSoc)=0 |
Initializes the state of charge calculation by the open circuit voltage after booting. More... | |
virtual void | initSocByOcv (T_VOLTAGE ocv) |
Initializes the state of charge calculation by the open circuit voltage after booting. More... | |
virtual void | setAbsoluteSoc (T_SOC soc)=0 |
Sets the absolute state of charge. More... | |
Interface for using state of charge in a battery model.
T_CAPACITY | Type for capacity in Ah. |
T_SOC | Type of state of charge in percentage. |
T_VOLTAGE | Type of voltage in V. |
T_CURRENT | Type of current in A. Charging current is positive, discharging is negative. |
T_TEMPERATURE | Type of temperature in °C. |
Definition at line 28 of file batterystateofcharge.h.
|
virtualdefault |
|
pure virtual |
Returns the absolute state of charge.
It is calculated relative to the design capacity.
Implemented in semf::app::BatteryModelWithoutDataset< T_CAPACITY, T_SOCSOH, T_VOLTAGE, T_CURRENT, T_TEMPERATURE >.
|
protectedpure virtual |
Initializes the state of charge calculation by the open circuit voltage after booting.
lastAbsoluteSoc | Last known absolute state of charge in percent. |
|
inlineprotectedvirtual |
Initializes the state of charge calculation by the open circuit voltage after booting.
ocv | Open circuit voltage after booting. |
Definition at line 66 of file batterystateofcharge.h.
|
pure virtual |
Returns the relative state of charge. This is the value normally showed on a display.
It is calculated by absolute state of charge / state of health respectively with the full charged battery capacity.
Implemented in semf::app::BatteryModelWithoutDataset< T_CAPACITY, T_SOCSOH, T_VOLTAGE, T_CURRENT, T_TEMPERATURE >.
|
protectedpure virtual |
Sets the absolute state of charge.
soc | Absolute state of charge in percent. |
Implemented in semf::app::BatteryModelWithoutDataset< T_CAPACITY, T_SOCSOH, T_VOLTAGE, T_CURRENT, T_TEMPERATURE >.
|
pure virtual |
Updates the state of charge relative to the current, voltage and temperature of the battery.
timeDelta | Milliseconds past since last function call. |
voltage | Battery voltage in V. |
current | Battery current in A. Charging is positive, discharging is negative. |
temperature | Battery temperature in °C. |
Implemented in semf::app::BatteryModelWithoutDataset< T_CAPACITY, T_SOCSOH, T_VOLTAGE, T_CURRENT, T_TEMPERATURE >.