eelib.core.devices.ev.ev_model

eELib car models the mobility and charging behavior of EV. The EV’s electricity demand is derived from profiles generated by the open-source tool emopby. The model calculates its soc in every step, based on the cars consumption and possible charging power derived from charging station.

Author: elenia@TUBS
Copyright 2024 elenia
This file is part of eELib, which is free software under the terms of the GNU GPL Version 3.

Module Contents

Classes

EV

Models an electric vehicle and its change of soc depending on driving and charging.

Attributes

_logger

TOLERANCE_OVER_UNDER_CHARGED

_logger
TOLERANCE_OVER_UNDER_CHARGED = '0.001'
class EV(eid: str, start_time: str, file_emobpy: str, step_size: int = 60 * 15, n_steps: int = 1, soc_init: float = 0.5, set_emobpy_val: bool = False, soc_min: float = 0.02, e_max: int = 50000, p_nom_discharge_max: int = -11000, p_nom_charge_max: int = 11000, dcharge_efficiency: float = 0.95, charge_efficiency: float = 0.99)

Models an electric vehicle and its change of soc depending on driving and charging.

_VALID_PARAMETERS
eid
start_time
step_size = '900'
timestep = '0'
p = '0'
p_cha
appearance = 'False'
signal_prognosis_ev_cs = '0'
soc = '0.5'
soc_min = '0.02'
e_max = '50000'
e_bat = '25000.0'
dcharge_efficiency = '0.95'
charge_efficiency = '0.99'
p_nom_discharge_max = '-11000'
p_nom_charge_max = '11000'
emobpy_data = 'None'
classmethod get_valid_parameters() dict

Returns dictionary containing valid parameter types and values.

Returns:

valid parameters for this model

Return type:

dict

_set_emobpy_data(n_steps: int)

Collect data from the emobpy pickle file and save it into the model.

Parameters:

n_steps (int) – number of steps for the simulation

Raises:
  • IndexError – When the time window of the pickle file does not match the simulation window

  • ValueError – when the time resolutions of simulation and pickle file do not match

_check_consumption_capacity()

Check whether the consumption during one trip exceeds the batteries limits. This is based on the consumption and charging point profile. Logs an information, when the consumption during one trip exceeds 90% of the battery capacity.

Raises:

ValueError – When the consumption during one trip exceeds the battery capacity.

step(timestep: int, check_energy_limits: bool = True)

Performs simulation step of eELib ev model.

Parameters:
  • timestep (int) – Current simulation time

  • check_energy_limits (bool) – whether energy limits should be checked. This might be relevant for forecasts, where first no charging takes places and hence the energy limits do not need to be checked. Defaults to True.

_check_appearance()

Check whether the EV is currently connected to the charging point or not.

_calc_power()

Calculate the power at the current timestep within the (dis)charging limits.

_check_energy_within_limit()

Check that battery energy limits are not surpassed.

_calc_power_limits()

Calculate the maximum (dis)charging power for the ev battery depending on the power limits and the current stored energy.