edisgo.flex_opt.battery_storage_operation

Module Contents

Functions

apply_reference_operation(edisgo_obj[, ...])

Applies reference storage operation to specified home storage units.

edisgo.flex_opt.battery_storage_operation.apply_reference_operation(edisgo_obj, storage_units_names=None, soe_init=0.0, freq=1)[source]

Applies reference storage operation to specified home storage units.

In the reference storage operation, the home storage system is directly charged when PV feed-in is higher than electricity demand of the building until the storage is fully charged. The storage is directly discharged, in case electricity demand of the building is higher than the PV feed-in, until it is fully discharged. The battery model handles generation positive and demand negative.

To determine the PV feed-in and electricity demand of the building that the home storage is located in (including demand from heat pumps and electric vehicles), this function matches the storage units to PV plants and building electricity demand using the building ID. In case there is no electricity load or no PV system, the storage operation is set to zero.

The resulting storage units’ active power time series are written to loads_active_power. Further, reactive power time series are set up using function set_time_series_reactive_power_control with default values. The state of energy time series that are calculated within this function are not written anywhere, but are returned by this function.

Parameters:
  • edisgo_obj (EDisGo) – EDisGo object to obtain storage units and PV feed-in and electricity demand in same building from.

  • storage_units_names (list(str) or None) – Names of storage units as in storage_units_df to set time for. If None, time series are set for all storage units in storage_units_df.

  • soe_init (float) – Initial state of energy of storage device in MWh. Default: 0 MWh.

  • freq (float) – Frequency of provided time series. Set to one, in case of hourly time series or 0.5 in case of half-hourly time series. Default: 1.

Returns:

Dataframe with time index and state of energy in MWh of each storage in columns. Column names correspond to storage name as in storage_units_df.

Return type:

pandas.DataFrame

Notes

This function requires that the storage parameters building_id, efficiency_store, efficiency_dispatch and max_hours are set in storage_units_df for all storage units specified in parameter storage_units_names.