Battery degradation
Submodules
Degradation base class
- class fleetrl.utils.battery_degradation.batt_deg.BatteryDegradation[source]
Bases:
object
- calculate_degradation(soc_list, charging_power, time_conf, temp)[source]
This is the parent class for degradation methods. Any new implemented method must follow this style of inputs and outputs. Then, the method can be used in FleetRL by changing one line of code in the import.
The degradation methods in FleetRL are implemented such that degradation is calculated in real-time. In the step method of the environment class, the current SoH is calculated by SoH -= degradation
- Parameters:
soc_list (
list
) – Historic values of SoC until nowcharging_power (
float
) – Charging power in kWtime_conf (
TimeConfig
) – Time config instance, necessary for time step lengthtemp (
float
) – Temperature to use in battery degradation in °C
- Return type:
float
- Returns:
Degradation of battery (unit-less, reduction of SoH, which is max. 1)
Method comparison
Empirical degradation
- class fleetrl.utils.battery_degradation.empirical_degradation.EmpiricalDegradation(init_soh, num_cars)[source]
Bases:
BatteryDegradation
- calculate_degradation(soc_log, charging_power, time_conf, temp)[source]
Similar to non-linear SEI, the most recent event is taken, and the linear-based degradation is calculated. No rainflow counting, thus degradation is computed for each time step.
find out the most recent entries in the soc list
get old and new soc
get average soc
compute cycle and calendar based on avg soc and charging power
- Parameters:
soc_log (
list
) – Historical log of SOCcharging_power (
float
) – EVSE power in kWtime_conf (
TimeConfig
) – time config objecttemp (
float
) – temperature
- Return type:
array
- Returns:
Degradation, float
Degradation logger
Non-linear degradation (Rainflow SEI)
- class fleetrl.utils.battery_degradation.rainflow_sei_degradation.RainflowSeiDegradation(init_soh, num_cars)[source]
Bases:
BatteryDegradation
Non-linear battery degradation model, Xu et al. - Source: Modeling of Lithium-Ion Battery Degradation for Cell Life Assessment - https://ieeexplore.ieee.org/document/7488267
- calculate_degradation(soc_log, charging_power, time_conf, temp)[source]
Calculates degradation. SOC from environment is converted to the necessary format for rainflow counting. Every time step, this function is called with a new soc_log entry. The rainflow library calculates the resulting cycle counts, which do not grow identically with soc_log entries. Rainflow results are used for the SOH calculations. If a new rainflow result entry appears, a calculation iteration is conducted. For calculation, the second most recent rainflow result is used.
- Parameters:
soc_log (
list
) – SOC list for each time step t: t1:[soc_car1, soc_car2, …], t2:[soc_car1, soc_car2,…]charging_power (
float
) – kW of the chargertime_conf (
TimeConfig
) – Time config instance from the environmenttemp (
float
) – Temperature (default at 25°C)
- Return type:
array
- Returns:
Numpy array of degradation for each vehicle [deg_1, deg_2, …]