Single Application Controller¶
SelfConsumptionController
¶
SelfConsumptionController(storage_label: str)
Bases: ControllerABC
flowchart TD
nrgise.controllers.SelfConsumptionController[SelfConsumptionController]
nrgise.controllers.controller_abc.ControllerABC[ControllerABC]
nrgise.controllers.controller_abc.ControllerABC --> nrgise.controllers.SelfConsumptionController
click nrgise.controllers.SelfConsumptionController href "" "nrgise.controllers.SelfConsumptionController"
click nrgise.controllers.controller_abc.ControllerABC href "" "nrgise.controllers.controller_abc.ControllerABC"
Storage Controller which performs self consumption optimization.
- Charge storage (negative action) when the power balance is positive, meaning there is more generation than consumption
- Discharge storage (positive action) when the power balance is negative, meaning there is more consumption than generation
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
storage_label
|
str
|
Label of the storage to be controlled. |
required |
PeakShavingController
¶
PeakShavingController(
cut_off_power_value: float, storage_label: str
)
Bases: ControllerABC
flowchart TD
nrgise.controllers.PeakShavingController[PeakShavingController]
nrgise.controllers.controller_abc.ControllerABC[ControllerABC]
nrgise.controllers.controller_abc.ControllerABC --> nrgise.controllers.PeakShavingController
click nrgise.controllers.PeakShavingController href "" "nrgise.controllers.PeakShavingController"
click nrgise.controllers.controller_abc.ControllerABC href "" "nrgise.controllers.controller_abc.ControllerABC"
Discharge if the uncontrolled_power_balance is more extreme as the
cut_off_power_value (and charge if it is not).
Note that the uncontrolled_power_balance is negative if the consumption
is greater as the generation.
Therefore, the cut_off_power_value should be negative as well.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cut_off_power_value
|
float
|
The maximum power value which should not be exceeded. Note that this value is usually negative, as consumption is defined by negative values! |
required |
storage_label
|
str
|
Label of the storage to be controlled. |
required |
FastChargePointController
¶
FastChargePointController(
charge_point_label: str,
stationary_storage_label: str,
fast_charge_soc_limit: float = 0.3,
fast_charge_power: float = 50,
slow_charge_power: float = 10,
stationary_storage_charging_power: float = 10,
)
Bases: ControllerABC
flowchart TD
nrgise.controllers.FastChargePointController[FastChargePointController]
nrgise.controllers.controller_abc.ControllerABC[ControllerABC]
nrgise.controllers.controller_abc.ControllerABC --> nrgise.controllers.FastChargePointController
click nrgise.controllers.FastChargePointController href "" "nrgise.controllers.FastChargePointController"
click nrgise.controllers.controller_abc.ControllerABC href "" "nrgise.controllers.controller_abc.ControllerABC"
A Controller for fast charging. The controller coordinates the amount of power which is used from a stationary storage which enables fast charging an electric vehicle. If the soc of the stationary storage is not sufficient, "slower" charging is done by using power from the grid. If no electric vehicle is connected, the stationay storage is charged.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
charge_point_label
|
str
|
Used to wire charge point and its connected stationary storage together |
required |
stationary_storage_label
|
str
|
Used to wire charge point and its connected stationary storage together |
required |
fast_charge_soc_limit
|
float
|
If the batteries soc is greater than
|
0.3
|
fast_charge_power
|
float
|
Amount of power used to fast charge from the stationary storage. Usually the power which can be served by the storage. |
50
|
slow_charge_power
|
float
|
Amount of power used to slow charge from the grid connection point. Usually the power which can be provided by the grid. |
10
|
stationary_storage_charging_power
|
float
|
How much power to use to charge the battery if no car is connected to the charge point. |
10
|
nrgise.controllers.FastChargePointController.get_action
¶
get_action(state: State) -> tuple[dict[str, float], Any]
Determine charging power setpoints for the charge point and stationary storage.
If an electric vehicle is connected and the stationary storage state of
charge (SoC) exceeds the fast_charge_soc_limit, the vehicle is
charged using the stationary storage at fast_charge_power. Otherwise, the vehicle is
charged from the grid at slow_charge_power.
If no vehicle is connected, the stationary storage is charged using the
configured _battery_charging_power.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
state
|
State
|
Current system state. It must include an |
required |
Returns:
| Type | Description |
|---|---|
tuple[dict[str, float], Any]
|
A tuple containing a dictionary with requested powers for charge
point and stationary battery, indexed by their labels. For both
components: negative power values represent battery charging, while
positive power values represent battery discharging; and |
ProfileFollowerController
¶
ProfileFollowerController(
control_profile: Iterable[float], storage_label: str
)
Bases: ControllerABC
flowchart TD
nrgise.controllers.ProfileFollowerController[ProfileFollowerController]
nrgise.controllers.controller_abc.ControllerABC[ControllerABC]
nrgise.controllers.controller_abc.ControllerABC --> nrgise.controllers.ProfileFollowerController
click nrgise.controllers.ProfileFollowerController href "" "nrgise.controllers.ProfileFollowerController"
click nrgise.controllers.controller_abc.ControllerABC href "" "nrgise.controllers.controller_abc.ControllerABC"
The control actions are considered fixed and are defined by the profile given to the controller. Once all actions of the profile are executed, the profile starts again.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
control_profile
|
Iterable[float]
|
Sequence of control actions (power in kW) which will be requested. |
required |
storage_label
|
str
|
Label of the Controllable. |
required |
TimeOfUseMPCController
¶
TimeOfUseMPCController(
load_forecaster: ForecasterABC,
price_forecaster: ForecasterABC,
time_delta_seconds: float,
storage_model_power: float,
storage_model_capacity: float,
storage_label: str,
forecast_length: int = 24 * 4,
)
Bases: ControllerABC
flowchart TD
nrgise.controllers.TimeOfUseMPCController[TimeOfUseMPCController]
nrgise.controllers.controller_abc.ControllerABC[ControllerABC]
nrgise.controllers.controller_abc.ControllerABC --> nrgise.controllers.TimeOfUseMPCController
click nrgise.controllers.TimeOfUseMPCController href "" "nrgise.controllers.TimeOfUseMPCController"
click nrgise.controllers.controller_abc.ControllerABC href "" "nrgise.controllers.controller_abc.ControllerABC"
Controller which uses Model Predictive Control (MPC) to optimize the operation of a storage system based on time-of-use pricing and load forecasts (charge when prices are low, discharge when high).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
load_forecaster
|
ForecasterABC
|
Forecaster for the load. |
required |
price_forecaster
|
ForecasterABC
|
Forecaster for the prices (expects €/kWh). |
required |
time_delta_seconds
|
float
|
The length of a time step in seconds. |
required |
storage_model_power
|
float
|
The charge and discharge maximum power of the storage system in kW. |
required |
storage_model_capacity
|
float
|
The energy capacity of the storage system in kWh. |
required |
forecast_length
|
int
|
The number of time steps to forecast for the optimization, including the current time step. Also defines the length of the optimisation horizon. |
24 * 4
|
storage_label
|
str
|
The label of the storage system to be controlled. |
required |