Skip to content

Latest commit

 

History

History
195 lines (130 loc) · 9.69 KB

device_scheduler.rst

File metadata and controls

195 lines (130 loc) · 9.69 KB

Storage device scheduler: Linear model

Introduction

This generic storage device scheduler is able to handle an EMS with multiple devices, with various types of constraints on the EMS level and on the device level, and with multiple market commitments on the EMS level.

A typical example is a house with many devices. The commitments are assumed to be with regard to the flow of energy to the device (positive for consumption, negative for production). In practice, this generic scheduler is used in the StorageScheduler to schedule a storage device.

The solver minimizes the costs of deviating from the commitments.

Notation

Indexes

Symbol Variable in the Code Description
c c Commitments, for example, day-ahead or intra-day market commitments.
d d Devices, for example, a battery or a load.
j j 0-indexed time dimension.

Note

The time index j has two interpretations: a time period or an instantaneous moment at the end of time period j. For example, j in flow constraints correspond to time periods, whereas j used in a stock constraint refers to the end of time period j.

Parameters

Symbol Variable in the Code Description
Price_{up}(c,j) up_price Price of incurring an upwards deviations in commitment c during time period j.
Price_{down}(c,j) down_price Price of incurring a downwards deviations in commitment c during time period j.
\eta_{up}(d,j) device_derivative_up_efficiency Upwards conversion efficiency.
\eta_{down}(d,j) device_derivative_down_efficiency Downwards conversion efficiency.
Stock_{min}(d,j) device_min Minimum quantity for the stock of device d at the end of time period j.
Stock_{max}(d,j) device_max Maximum quantity for the stock of device d at the end of time period j.
\epsilon(d,j) efficiencies Stock energy losses.
P_{max}(d,j) device_derivative_max Maximum flow of device d during time period j.
P_{min}(d,j) device_derivative_min Minimum flow of device d during time period j.
P^{ems}_{min}(j) ems_derivative_min Minimum flow of the EMS during time period j.
P^{ems}_{max}(j) ems_derivative_max Maximum flow of the EMS during time period j.
Commitment(c,j) commitment_quantity Commitment c (at EMS level) over time step j.
M M Large constant number, upper bound of Power_{up}(d,j) and |Power_{down}(d,j)|.
D(d,j) stock_delta Explicit energy gain or loss of device d during time period j.

Variables

Symbol Variable in the Code Description
\Delta_{up}(c,j) commitment_upwards_deviation Upwards deviation from the power commitment c of the EMS during time period j.
\Delta_{down}(c,j) commitment_downwards_deviation Downwards deviation from the power commitment c of the EMS during time period j.
\Delta Stock(d,j) n/a Change of stock of device d at the end of time period j.
P_{up}(d,j) device_power_up Upwards power of device d during time period j.
P_{down}(d,j) device_power_down Downwards power of device d during time period j.
P^{ems}(j) ems_power Aggregated power of all the devices during time period j.
\sigma(d,j) device_power_sign Upwards power activation if \sigma(d,j)=1, downwards power activation otherwise.

Cost function

The cost function quantifies the total cost of upwards and downwards deviations from the different commitments.

\min [\sum_{c,j} \Delta_{up}(c,j) \cdot Price_{up}(c,j) +  \Delta_{down}(c,j) \cdot Price_{down}(c,j)]

State dynamics

To simplify the description of the model, the auxiliary variable \Delta Stock(d,j) is introduced in the documentation. It represents the change of Stock(d,j), taking into account conversion efficiencies but not considering the storage losses.

  \Delta Stock(d,j) = \frac{P_{down}(d,j)}{\eta_{down}(d,j) } + P_{up}(d,j)  \cdot \eta_{up}(d,j) + D(d,j)
  Stock_{min}(d,j)  \leq Stock(d,j) - Stock(d,-1)\leq Stock_{max}(d,j)

Perfect efficiency

  Stock(d, j) = Stock(d, j-1) + \Delta Stock(d,j)

Left efficiency

First apply the stock change, then apply the losses (i.e. the stock changes on the left side of the time interval in which the losses apply)

  Stock(d, j)  = (Stock(d, j-1) + \Delta Stock(d,j)) \cdot \epsilon(d,j)

Right efficiency

First apply the losses, then apply the stock change (i.e. the stock changes on the right side of the time interval in which the losses apply)

  Stock(d, j)  = Stock(d, j-1) \cdot \epsilon(d,j) + \Delta Stock(d,j)

Linear efficiency

Assume the change happens at a constant rate, leading to a linear stock change, and exponential decay, within the current interval

  Stock(d, j)  = Stock(d, j-1) \cdot \epsilon(d,j) + \Delta Stock(d,j) \cdot \frac{\epsilon(d,j) - 1}{log(\epsilon(d,j))}

Constraints

Device bounds

  P_{min}(d,j) \leq P_{up}(d,j) + P_{down}(d,j)\leq P_{max}(d,j)
  min(P_{min}(d,j),0) \leq P_{down}(d,j)\leq 0
  0 \leq P_{up}(d,j)\leq max(P_{max}(d,j),0)

Upwards/Downwards activation selection

Avoid simultaneous upwards and downwards activation during the same time period.

  P_{up}(d,j) \leq M \cdot \sigma(d,j)
  -P_{down}(d,j) \leq M \cdot (1-\sigma(d,j))

Grid constraints

P^{ems}(d,j) = P_{up}(d,j) + P_{down}(d,j)
  P^{ems}_{min}(j) \leq \sum_d P^{ems}(d,j) \leq P^{ems}_{max}(j)

Power coupling constraints

\sum_d P^{ems}(d,j) = \sum_c Commitment(c,j) + \Delta_{up}(c,j) + \Delta_{down}(c,j)