Public API

Formulations

StorageSystemsSimulations.StorageDispatchWithReservesType

Formulation type to add storage formulation than can provide ancillary services. If a storage unit does not contribute to any service, then the variables and constraints related to services are ignored.

Example

DeviceModel(
    StorageType, # E.g. EnergyReservoirStorage or GenericStorage
    StorageDispatchWithReserves;
    attributes=Dict(
        "reservation" => true,
        "cycling_limits" => false,
        "energy_target" => false,
        "complete_coverage" => false,
        "regularization" => true,
    ),
    use_slacks=false,
)

The formulation supports the following attributes when used in a PowerSimulations.DeviceModel:

Attributes

  • "reservation": Forces the storage to operate exclusively on charge or discharge mode through the entire operation interval. We recommend setting this to false for models with relatively longer time resolutions (e.g., 1-Hr) since the storage can take simultaneous charge or discharge positions on average over the period.
  • "cycling_limits": This limits the storage's energy cycling. A single charging (discharging) cycle is fully charging (discharging) the storage once. The calculation uses the total energy charge/discharge and the number of cycles. Currently, the formulation only supports a fixed value per operation period. Additional variables for StorageChargeCyclingSlackVariable and StorageDischargeCyclingSlackVariable are included in the model if use_slacks is set to true.
  • "energy_target": Set a target at the end of the model horizon for the storage's state of charge. Currently, the formulation only supports a fixed value per operation period. Additional variables for StorageEnergyShortageVariable and StorageEnergySurplusVariable are included in the model if use_slacks is set to true.
Warning

Combining cycle limits and energy target attributes is not recommended. Both attributes impose constraints on energy. There is no guarantee that the constraints can be satisfied simultaneously.

  • "complete_coverage": This attribute implements constraints that require the battery to cover the sum of all the ancillary services it participates in simultaneously. It is equivalent to holding energy in case all the services get deployed simultaneously. This constraint is added to the constraints that cover each service independently and corresponds to a more conservative operation regime.
  • "regularization": This attribute smooths the charge/discharge profiles to avoid bang-bang solutions via a penalty on the absolute value of the intra-temporal variations of the charge and discharge power. Solving for optimal storage dispatch can stall in models with large amounts of curtailment or long periods with negative or zero prices due to numerical degeneracy. The regularization term is scaled by the storage device's power limits to normalize the term and avoid additional penalties to larger storage units.
Danger

Setting the energy target attribute in combination with EnergyTargetFeedforward or EnergyLimitFeedforward is not permitted and StorageSystemsSimulations.jl will throw an exception.

See the StorageDispatchWithReserves Mathematical Model for the full mathematical description.

source

Variables

Auxiliary Variables

Constraints

StorageSystemsSimulations.StorageCyclingChargeType

Struct to create the storage cycling limits for the charge variable. Used when cycling_limits = true.

The specified constraint is formulated as:

\[\sum_{t \in \mathcal{T}} \left(\sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} R^*_{p,t} sb_{stc,p,t} + p^{st,ch}_{t} \right)\eta^{ch}_{st} \Delta t - c^{ch-} \leq C_{st} E^{max}_{st}\]

source
StorageSystemsSimulations.StorageCyclingDischargeType

Struct to create the storage cycling limits for the discharge variable. Used when cycling_limits = true.

The specified constraint is formulated as:

\[\sum_{t \in \mathcal{T}} \left(\sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} R^*_{p,t} sb_{std,p,t} + p^{st,ds}_{t}\right)\frac{1}{\eta^{ds}_{st}} \Delta t - c^{ds-} \leq C_{st} E^{max}_{st}\]

source
StorageSystemsSimulations.ReserveCoverageConstraintType

Struct to specify the individual product ancillary service coverage at the beginning of the period for charge and discharge variables.

The specified constraints are formulated as:

\[\begin{align*} & sb_{stc,p,1} \eta^{ch}_{st} N_{p} \Delta t \le E_{st}^{max} - e^{st}_0, \quad \forall p \in \mathcal{P}^{as_{dn}} \\ & sb_{stc,p,t} \eta^{ch}_{st} N_{p} \Delta t \le E_{st}^{max} - e^{st}_{t-1}, \quad \forall p \in \mathcal{P}^{as_{dn}}, \forall t \in \{2,\dots, T\} \\ & sb_{std,p,1} \frac{1}{\eta^{ds}_{st}} N_{p} \Delta t \leq e^{st}_0 - E^{min}_{st}, \quad \forall p \in \mathcal{P}^{as_{up}} \\ & sb_{std,p,t} \frac{1}{\eta^{ds}_{st}} N_{p} \Delta t \leq e^{st}_{t-1} - E^{min}_{st}, \quad \forall p \in \mathcal{P}^{as_{up}}, \forall t \in \{2,\dots, T\} \end{align*}\]

source
StorageSystemsSimulations.ReserveCoverageConstraintEndOfPeriodType

Struct to specify the individual product ancillary service coverage at the end of the period for charge and discharge variables.

The specified constraints are formulated as:

\[\begin{align*} & sb_{stc,p,t} \eta^{ch}_{st} N_{p} \Delta t \le E_{st}^{max} - e^{st}_{t}, \quad \forall p \in \mathcal{P}^{as_{dn}}, \forall t \in \{1,\dots, T\} \\ & sb_{std,p,t} \frac{1}{\eta^{ds}_{st}} N_{p} \Delta t \leq e^{st}_{t}- E^{min}_{st}, \quad \forall p \in \mathcal{P}^{as_{up}}, \forall t \in \{1,\dots, T\} \end{align*}\]

source
StorageSystemsSimulations.ReserveCompleteCoverageConstraintType

Struct to specify all products ancillary service coverage at the beginning of the period for charge and discharge variables. Used when the attribute complete_coverage = true.

The specified constraints are formulated as:

\[\begin{align*} & \sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} sb_{stc,p,1} \eta^{ch}_{st} N_{p} \Delta t \le E_{st}^{max} - e^{st}_0 \\ & \sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} sb_{stc,p,t} \eta^{ch}_{st} N_{p} \Delta t \le E_{st}^{max} - e^{st}_{t-1}, \quad \forall t \in \{2,\dots, T\} \\ & \sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} sb_{std,p,1} \frac{1}{\eta^{ds}_{st}} N_{p} \Delta t \leq e^{st}_0 - E^{min}_{st} \\ & \sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} sb_{std,p,t} \frac{1}{\eta^{ds}_{st}} N_{p} \Delta t \leq e^{st}_{t-1}- E^{min}_{st}, \quad \forall t \in \{2,\dots, T\} \end{align*}\]

source
StorageSystemsSimulations.ReserveCompleteCoverageConstraintEndOfPeriodType

Struct to specify all products ancillary service coverage at the end of the period for charge and discharge variables. Used when the attribute complete_coverage = true.

The specified constraints are formulated as:

\[\begin{align*} & \sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} sb_{stc,p,t} \eta^{ch}_{st} N_{p} \Delta t \le E_{st}^{max} - e^{st}_{t}, \quad \forall t \in \{1,\dots, T\} \\ & \sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} sb_{std,p,t} \frac{1}{\eta^{ds}_{st}} N_{p} \Delta t \leq e^{st}_{t}- E^{min}_{st}, \quad \forall t \in \{1,\dots, T\} \end{align*}\]

source
StorageSystemsSimulations.StorageTotalReserveConstraintType

Struct to specify an auxiliary constraint for adding charge and discharge into a single active power reserve variable.

The specified constraint is formulated as:

\[sb_{stc, p, t} + sb_{std, p, t} = r_{p,t}, \quad \forall p \in \mathcal{P}, \forall t \in \{1,\dots, T\}\]

source
StorageSystemsSimulations.ReserveDischargeConstraintType

Struct to specify the lower and upper bounds of the discharge variable considering reserves.

The specified constraints are formulated as:

\[\begin{align*} & p^{st, ds}_{t} + \sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} sb_{std,p,t} \leq \text{ss}^{st}_{t}P^{max,ds}_{st} \quad \forall t \in \{1,\dots, T\} \\ & p^{st, ds}_{t} - \sum_{p \in \mathcal{P}^{ ext{as}_\text{dn}}} sb_{std,p,t} \geq 0, \quad \forall t \in \{1,\dots, T\} \end{align*}\]

source
StorageSystemsSimulations.ReserveChargeConstraintType

Struct to specify the lower and upper bounds of the charge variable considering reserves.

The specified constraints are formulated as:

\[\begin{align*} &p^{st, ch}_{t} + \sum_{p \in \mathcal{P}^{\text{as}_\text{dn}}} sb_{stc,p,t} \leq (1 - \text{ss}^{st}_{t})P^{max,ch}_{st}, \quad \forall t \in \{1,\dots, T\} \\ & p^{st, ch}_{t} - \sum_{p \in \mathcal{P}^{\text{as}_\text{up}}} sb_{stc,p,t} \geq 0, \quad \forall t \in \{1,\dots, T\} \end{align*}\]

source

Parameters

FeedForwards