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.

(1)\[\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.

(2)\[ \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)\]
(3)\[ Stock_{min}(d,j) \leq Stock(d,j) - Stock(d,-1)\leq Stock_{max}(d,j)\]

Perfect efficiency

(4)\[ 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)

(5)\[ 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)

(6)\[ 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

(7)\[ 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

(8)\[ P_{min}(d,j) \leq P_{up}(d,j) + P_{down}(d,j)\leq P_{max}(d,j)\]
(9)\[ min(P_{min}(d,j),0) \leq P_{down}(d,j)\leq 0\]
(10)\[ 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.

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

Grid constraints

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

Power coupling constraints

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