eelib.core.control.EMS.EMS_model
The eElib EMS model was developed as an energy management system on the building level and is therefore connected to all of the building’s components. The control gathers all of the component’s power flows, calculates the energy balance at the building node and the component’s flexibility, and then sends out power set values in each step. Hereby, available solar power is favored to grid consumption, as well as charging / discharging limits of the charging stations, and batteries are considered.
Regarding charging stations, different charging strategies are implemented: Default / Maximum power charging, balanced charging, solar charging and night charging.
Module Contents
Classes
Models an home energy managament system on building level. |
|
Default strategy for Energy Management System. |
|
Aggregation of power flows for depiction of uncontrolled devices in a building. |
|
Baseclass for EMS strategies using forecasts (and optimizations). |
|
Default forecast strategy for Energy Management System. |
|
Optimization-based forecast/schedule strategy for Energy Management System. |
- class HEMS(ename: str, step_size: int, cs_strategy: str = 'max_p', bss_strategy: str = 'surplus')
Bases:
abc.ABC
Models an home energy managament system on building level.
- _VALID_PARAMETERS
- classmethod get_valid_parameters()
Returns dictionary containing valid parameter types and values.
- Returns:
valid parameters for this model
- Return type:
dict
- add_controlled_entity(entities_dict: dict)
Adds a controlled entity to the corresponding EMS’s lists (controlled components and type-specific).
- Parameters:
entities_dict (dict) – Input list with all models of a type (e.g. charging_station) which will be connected to the controller.
- _get_component_by_type(type: str)
Gets all controlled components of passed type.
- Parameters:
type (str) – Query to determine all controlled components of this type.
- Returns:
Returns all entities of queried type.
- Return type:
dict
- abstract step(time: int)
Handles stepping of energy managament systems by checking power values.
- Parameters:
time (int) – Current simulation time
- _calc_power_energy(time: int)
Gathers current power flows, aggregates limits, and calculates energy balances.
- Parameters:
time (int) – Current simulation time
- _set_pv_max()
Calculate pv system setpoints for all devices by using the maximum power.
- _set_cs_p()
Calculate charging station setpoints using the chosen charging strategy.
- _set_hp_p_th()
Calculate heatpump thermal power setpoints by reducing needed power at this step.
- _set_bss_p()
Calculate battery storage system setpoints for all devices using the chosen strategy.
- _reset_financial_values()
Reset all financial values (at the beginning of a new timestep).
- _handle_incoming_signals()
Retrieve tariff settings for this timestep from an incoming tariff signal.
- _calc_financial_output()
Calculate financial values like cost, profit and revenue for this timestep.
- class HEMS_default(ename: str, step_size: int = 900, **kwargs)
Bases:
HEMS
Default strategy for Energy Management System. Should be copied and adapted for the use of a specific EMS concept.
- classmethod get_valid_parameters()
Returns dictionary containing valid parameter types and values.
- Returns:
valid parameters for this model
- Return type:
dict
- step(time: int)
Calculates power set values for each connected component according to the strategy.
- Parameters:
time (int) – Current simulation time
- class GCP_Aggregator_HEMS(ename: str, step_size: int = 900, **kwargs)
Bases:
HEMS
Aggregation of power flows for depiction of uncontrolled devices in a building.
- classmethod get_valid_parameters()
Returns dictionary containing valid parameter types and values.
- Returns:
valid parameters for this model
- Return type:
dict
- step(time)
Aggregation of power values.
- Parameters:
time (int) – Current simulation time
- class HEMS_forecast_base(ename: str, step_size: int, forecast_horizon_hours: int = 24, forecast_frequency_hours: int = 24, forecast_type: str = 'household_only', cs_strategy: str = 'max_p', bss_strategy: str = 'surplus')
Bases:
HEMS
Baseclass for EMS strategies using forecasts (and optimizations).
- forecast_types
- classmethod get_valid_parameters()
Returns dictionary containing valid parameter types and values.
- Returns:
valid parameters for this model
- Return type:
dict
- _request_forecast()
Set models with their attributes and time horizon for forecast request.
- _set_schedule_values()
Take schedules of the devices and convert them into set values.
- _set_power_in_limits(power: float, p_min: float, p_max: float) float
Set a power value with regard to a maximum and minimum value, if given.
- Parameters:
power (float) – current power value to start with
p_min (float) – minimum power limit
p_max (float) – maximum power limit
- Returns:
power value within the limiting bounds
- Return type:
float
- _set_schedule_values_pv()
Take schedules of pv systems and convert them to set values by using the power limits.
- _set_schedule_values_cs()
Take schedules of charging stations and convert to set values by using the limits.
- _set_schedule_values_hp()
Take schedules of heatpumps and convert them to set values by using the power limits.
- _set_schedule_values_bss()
Take schedules of battery storage systems and convert to set values using the limits.
- abstract step(time: int)
Gathers current energy flows and calculates energy balances.
- Parameters:
time (int) – Current simulation time
- class HEMS_forecast_default(ename: str, step_size: int = 900, **kwargs)
Bases:
HEMS_forecast_base
Default forecast strategy for Energy Management System. Should be copied and adapted for the use of a specific EMS concept.
- classmethod get_valid_parameters()
Returns dictionary containing valid parameter types and values.
- Returns:
valid parameters for this model
- Return type:
dict
- step(time: int)
Calculates power set values for each connected component according to the strategy.
- Parameters:
time (int) – Current simulation time
- class HEMS_forecast_opt(ename: str, step_size: int = 900, **kwargs)
Bases:
HEMS_forecast_base
Optimization-based forecast/schedule strategy for Energy Management System.
- classmethod get_valid_parameters()
Returns dictionary containing valid parameter types and values.
- Returns:
valid parameters for this model
- Return type:
dict
- step(time: int)
Calculates power set values for each connected component according to the strategy.
- Parameters:
time (int) – Current simulation time