eelib.core.control.EMS.EMS_hp_helper

Helper functions for handling of heatpumps in EMS.

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

Functions

hp_set_power_with_limits(→ float)

Set the thermal power of a heatpump with regard to its three limits (max, min, min_on).

set_hp_time(→ int)

Update on-/off-time of heatpump with regard to its current power output.

calc_hp_power_limits(hp_p_rated, hp_p_min_th_rel, hp_state)

Set thermal power limits of heatpump with regard to state.

set_hp_state(→ str)

Update state of heatpump with regard to its on- or off-time and minimum state time.

hp_set_power_with_limits(hp_p_th_max: float, hp_p_th_min_on: float, hp_p_th_min: float, hp_p_th_target: float) float

Set the thermal power of a heatpump with regard to its three limits (max, min, min_on).

Parameters:
  • hp_p_th_max (float) – maximum thermal power

  • hp_p_th_min_on (float) – minimum thermal power in on-state

  • hp_p_th_min (float) – minimum thermal power overall

  • hp_p_th_target (float) – desired power value

Returns:

thermal power set value according to power limits

Return type:

float

Note

This function was created based on the function step() in heatpump_model.

set_hp_time(step_size: int, p_th_set: float, hp_time_on: int, hp_time_off: int) int

Update on-/off-time of heatpump with regard to its current power output.

Parameters:
  • step_size (int) – current simulation step size

  • p_th_set (float) – current thermal power output

  • hp_time_on (int) – current time in on-state [s]

  • hp_time_off (int) – current time in off-state [s]

Returns:

  1. updated time in on-state [s]

  2. updated time in off-state [s]

Return type:

int, int

Note

This function was created based on the function step() in heatpump_model.

calc_hp_power_limits(hp_p_rated: float, hp_p_min_th_rel: float, hp_state: str)

Set thermal power limits of heatpump with regard to state.

Parameters:
  • hp_p_rated (float) – rated thermal power of heatpump

  • hp_p_min_th_rel (float) – relative minimum thermal power in on-state (regarding rated)

  • hp_state (str) – current state of the heatpump

Returns:

  1. maximum thermal power

  2. minimum thermal power in on-state

  3. minimum thermal power

Return type:

float, float, float

Note

This function was created based on the function __calc_thermal_limits() in heatpump_model.

set_hp_state(p_th_set: float, hp_time_on: int, hp_time_off: int, hp_time_min: int) str

Update state of heatpump with regard to its on- or off-time and minimum state time.

Parameters:
  • p_th_set (float) – current thermal power output

  • hp_time_on (int) – current time in on-state [s]

  • hp_time_off (int) – current time in off-state [s]

  • hp_time_min (int) – minimum time for one state [s]

Returns:

updated state of the heatpump

Return type:

str

Note

This function was created based on the function step() in heatpump_model.