Skip to content

Multi Application Controller

SelfConsumptionPeakShavingParallelController

SelfConsumptionPeakShavingParallelController(
    storage_model: Battery,
    cut_off_power_value: float,
    storage_label: str,
    power_share_peak_shaving: float = 0.5,
    capacity_share_peak_shaving: float = 0.5,
)

Bases: ControllerABC


              flowchart TD
              nrgise.controllers.SelfConsumptionPeakShavingParallelController[SelfConsumptionPeakShavingParallelController]
              nrgise.controllers.controller_abc.ControllerABC[ControllerABC]

                              nrgise.controllers.controller_abc.ControllerABC --> nrgise.controllers.SelfConsumptionPeakShavingParallelController
                


              click nrgise.controllers.SelfConsumptionPeakShavingParallelController href "" "nrgise.controllers.SelfConsumptionPeakShavingParallelController"
              click nrgise.controllers.controller_abc.ControllerABC href "" "nrgise.controllers.controller_abc.ControllerABC"
            

Parallel multi application controller which performs self consumption and peak shaving. Each application uses a virtual battery, which limits the capacity and power usage per application (peak shaving or self consumption optimisation). See https://doi.org/10.1109/EEM.2019.8916568 and https://doi.org/10.1016/j.apenergy.2025.125353 for more details on the definition of paralell multi application controllers. The purpose of keeping track of the used energy per application using the virtual batteries is illustrated by the following example:

If self consumption wants to charge and peak shaving wants to discharge. We don't want to do both actions on our physical storage. We can do both at once if we keep track of the energy which is reserved for which application. In the end, this saves us charge cycles on the physical battery.

Parameters:

Name Type Description Default
storage_model Battery

A model of the storage, so the virtual battery models can be derived from its parameters.

required
cut_off_power_value float

The maximum power value which should be reached by using peak shaving. See PeakShavingController for more details

required
storage_label str

Label of the storage to be controlled.

required
power_share_peak_shaving float

Share of storage power which is allocated for peak shaving in [0,1].

0.5
capacity_share_peak_shaving float

Share of storage capacity which is allocated for peak shaving in [0,1].

0.5

Parameters:

Name Type Description Default
storage_model Battery

the whole battery, on which parts are used for peak-shaving and self-consumption

required
cut_off_power_value float

Value at which peak shaving should be performed (see PeakShavingController).

required
storage_label str

name for storage

required
power_share_peak_shaving float

power used for peak-shaving

0.5
capacity_share_peak_shaving float

capacity used for peak-shaving

0.5

SelfConsumptionPeakShavingSequentialController

SelfConsumptionPeakShavingSequentialController(
    load_forecaster: ForecasterABC,
    pv_generation_forecaster: ForecasterABC,
    storage_label: str,
    peak_shaving_cut_off_power_value: float,
    forecast_length: int = 12,
)

Bases: ControllerABC


              flowchart TD
              nrgise.controllers.SelfConsumptionPeakShavingSequentialController[SelfConsumptionPeakShavingSequentialController]
              nrgise.controllers.controller_abc.ControllerABC[ControllerABC]

                              nrgise.controllers.controller_abc.ControllerABC --> nrgise.controllers.SelfConsumptionPeakShavingSequentialController
                


              click nrgise.controllers.SelfConsumptionPeakShavingSequentialController href "" "nrgise.controllers.SelfConsumptionPeakShavingSequentialController"
              click nrgise.controllers.controller_abc.ControllerABC href "" "nrgise.controllers.controller_abc.ControllerABC"
            

Controller which switches between SelfConsumptionController and PeakShavingController (the "switching" makes it sequential). Key assumption is that we are using peak shaving if we see any peak in the forecast or in the current time step. If not, we are doing self consumption.

More details can be found here: https://doi.org/10.1016/j.apenergy.2025.125353

Parameters:

Name Type Description Default
load_forecaster ForecasterABC

Forecaster for the load.

required
pv_generation_forecaster ForecasterABC

Forecaster for renewable generation (e.g. PV).

required
storage_label str

Label of the storage to be controlled.

required
forecast_length int

Length (number of time steps) of the forecast retrieved from the forecaster. If any peak is present in the forecast we are doing peak shaving.

12
peak_shaving_cut_off_power_value float

The maximum power value which should be reached by using peak shaving. See PeakShavingController controller for more details.

required