Skip to content

Latest commit

 

History

History
177 lines (118 loc) · 8.76 KB

device_scheduler.rst

File metadata and controls

177 lines (118 loc) · 8.76 KB

Device scheduler ===========

Introduction

This generic 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 minimises 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
Priceup(c, j)

up_price

Price of incurring an upwards deviations in commitment c during time period j.

Pricedown(c, j)

down_price

Price of incurring a downwards deviations in commitment c during time period j.

ηup(d, j)

device_derivative_up_efficiency

Upwards conversion efficiency.

ηdown(d, j)

device_derivative_down_efficiency

Downwards conversion efficiency.

Stockmin(d, j)

device_min

Minimum quantity for the stock of device d at the end of time period j.

Stockmax(d, j)

device_max

Maximum quantity for the stock of device d at the end of time period j.

ϵ(d, j)

efficiencies

Stock energy losses.

Pmax(d, j)

device_derivative_max

Maximum flow of device d during time period j.

Pmin(d, j)

device_derivative_min

Minimum flow of device d during time period j.

Pminems(j)

ems_derivative_min

Minimum flow of the EMS during time period j.

Pmaxems(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.

Variables

Symbol Variable in the Code Description
Δup(c, j)

commitment_upwards_deviation

Upwards deviation from the power commitment c of the EMS during time period j.

Δdown(c, j)

commitment_downwards_deviation

Downwards deviation from the power commitment c of the EMS during time period j.

ΔStock(d, j)

n/a

Change of stock of device d at the end of time period j.

Pup(d, j)

device_power_up

Upwards power of device d during time period j.

Pdown(d, j)

device_power_down

Downwards power of device d during time period j.

Pems(j)

ems_power

Aggregated power of all the devices during time period j.

Cost function

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


min [∑c, jΔup(c, j) ⋅ Priceup(c, j) + Δdown(c, j) ⋅ Pricedown(c, j)]

State dynamics

To simplify the description of the model, the auxiliary variable Δ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)$$


Stockmin(d, j) ≤ Stock(d, j) − Stock(d,  − 1) ≤ Stockmax(d, j)

Perfect efficiency


Stock(d, j) = Stock(d, j − 1) + Δ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) + ΔStock(d, j)) ⋅ ϵ(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) ⋅ ϵ(d, j) + Δ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


Pmin(d, j) ≤ Pup(d, j) + Pdown(d, j) ≤ Pmax(d, j)


min(Pmin(d, j), 0) ≤ Pdown(d, j) ≤ 0


0 ≤ Pup(d, j) ≤ max(Pmax(d, j), 0)

Grid constraints


Pems(d, j) = Pup(d, j) + Pdown(d, j)


Pminems(j) ≤ ∑dPems(d, j) ≤ Pmaxems(j)

Power coupling constraints


dPems(d, j) = ∑cCommitment(c, j) + Δup(c, j) + Δdown(c, j)