Mathematical formulation¶
All constraints formulations can be found in the oemof.solph documentation. We’ll provide a complete mathematical description for the parts we used here soon.
Nomenclature¶
name |
type |
description |
|---|---|---|
\(N\) |
set |
all nodes of the energy system.
This comprises Sources, Sinks, Buses, Transformers,
Generic Storages and optionally DSMSinks
|
\(T\) |
set |
all time steps within the optimization timeframe
(and time increment, i.e. frequency) chosen
|
\(F\) |
set |
all flows of the energy system.
A flow is a directed connection between node A and B
and has a value (i.e. capacity flow) for every time step
|
\(TF\) |
set |
all transformers (conversion units, such as generators) |
\(PGF\) |
set |
all flows imposing a limit to the positive gradient |
\(NGF\) |
set |
all flows imposing a limit to the negative gradient |
\(B\) |
set |
all buses (fictious busbars to connect capacity resp. energy flows) |
\(S\) |
set |
all storage units |
\(I(n)\) |
set |
all inputs for node n |
\(O(n)\) |
set |
all outputs for node n |
\(f(i,o,t)\) |
variable |
Flow from node i (input) to node o (output) at time step t |
\(C\) |
variable |
system costs |
\(p_{DE}(t)\) |
variable |
power price for Germany |
\(P_{i}(n, t)\) |
variable |
inflow into transformer n at time step t |
\(P_{o}(n, t)\) |
variable |
outflow from transformer n at time step t |
\(E(s, t)\) |
variable |
energy currently stored in storage s |
\(c_{var}(i, o, t)\) |
parameter |
variable costs for flow from input i to output o at time step t |
\(\tau(t)\) |
parameter |
time increment of the model for time step t |
\(D_{DE}(t)\) |
parameter |
total load (for Germany) |
\(\eta_{o}(n, t)\) |
parameter |
conversion efficiency for outflow |
\(\eta_{i}(n, t)\) |
parameter |
conversion efficiency for inflow |
\(\Delta P_{pos}(i, o, t)\) |
parameter |
maximum allowed positive gradient for flow from input i to output o
at time step t (transition from t-1 to t)
|
\(\Delta P_{neg}(i, o, t)\) |
parameter |
maximum allowed negative gradient for flow from input i to output o
at time step t (transition from t-1 to t)
|
\(P_{nom}(i, o)\) |
parameter |
installed capacity (all except RES outside Germany)
or maximum achievable output value (RES outside Germany)
|
\(f_{min}(i, o, t)\) |
parameter |
normalized minimum output for flow from input i to output o |
\(f_{max}(i, o, t)\) |
parameter |
normalized maximum output for flow from input i to output o |
\(E_{nom}(s)\) |
parameter |
nominal capacity of storage s (maximum achievable capacity
based on historic utilization, not the installed one)
|
\(E_{min}(s, t)\) |
parameter |
minimum allowed storage level for storage s |
\(E_{max}(s, t)\) |
parameter |
maximum allowed storage level for storage s |
\(\beta(s, t)\) |
parameter |
fraction of lost energy as share of \(E(s, t)\) |
\(\gamma(s, t)\) |
parameter |
fixed loss of energy relative to \(E_{nom}(s)\) per time unit |
\(\delta(s, t)\) |
parameter |
absolute fixed loss of energy per time unit |
\(\dot{E}_i(s, t)\) |
parameter |
energy flowing into storage s at time step t |
\(\dot{E}_o(s, t)\) |
parameter |
energy extracted from storage s at time step t |
\(\eta_i(s, t)\) |
parameter |
conversion factor (i.e. efficiency) of storage s for storing energy |
\(\eta_o(s, t)\) |
parameter |
conversion factor (i.e. efficiency) of storage s for withdrawing
stored energy
|
\(t_u\) |
parameter |
time unit of losses \(\beta(t)\), \(\gamma(t)\), \(\delta(t)\) and time increment \(\tau(t)\) |
\(ef(i, o)\) |
parameter |
emission factor in \(\frac {t \space CO_2}{MWh}\) |
\(EL\) |
parameter |
overall emission linit in \(t \space CO_2\) |
Target function¶
The target function is build together by the _objective_expression terms of all
oemof.solph components used (see the oemof.solph.models module):
System costs: sum of the costs for all flows (commodity / fuel, emissions and operation costs):
Constraints of the core model¶
The following constraints apply to a model in its basic formulation (i.e. not including demand response and emissions limits):
flow balance(s):
with \(\tau(t)\) equalling to the time increment (defaults to 1 hour)
Note
This is equal to an overall energy balance requirement, but build up decentrally from a balancing requirement of every bus, thus allowing for a flexible expansion of the system size.
The power price for Germany is derived from the dual values (shadow prices) of the flow balance for the German electricity price:
energy transformation:
with \(P_{i}(n, t)\) as the inflow into the transformer node n, \(P_{o}(n, t)\) as the transformer outflow, \(\eta_{o}(n, t)\) the conversion efficiency for outputs and \(\eta_{i}(n, t)\) the conversion factors for inflows. We only use the conversion factor for outflows to account for losses from the conversion (within the power plant). \(\mathrm{TF}\) is the set of transformers, i.e. any kind of energy conversion unit. We use this for conventional generators, renewable energy sources (RES) within the market premium scheme in Germany (with 100% efficiency - used just to steer the price-based output in times, RES are price setting) as well as interconnection line losses.
gradient limits for generators
with \(\Delta P_{pos}(i, o, t)\) equalling to the maximum allowed positive an \(\Delta P_{neg}(i, o, t)\) equalling to the maximum allowed negative gradient and \(\mathrm{PGF}\) resp. \(\mathrm{NGF}\) being the set of flows with positive or negative gradient limits (i.e. conventional generators).
minimum and maximum load requirements
with \(P_{nom}(i, o)\) equalling to the installed resp. maximum capacity, \(f_{min}(i, o, t)\) as the normalized minimum flow value and \(f_{max}(i, o, t)\) as the normalized maximum flow value.
Note
Whereas the maximum value is fixed and set to 1 for all units and time steps, the minimum value of some generator types may alter over time. This is especially true for combined heat and power (CHP) plants and industrial power plants (IPP), where a minimum load pattern is fed in, in order to serve the heating or process steam demand.
storages
Storage roundtrip:
\[E(s, |\mathrm{T}|) = E(s, -1)\]
with the last storage level \(E(s, |\mathrm{T}|)\) equalling the initial storage content \(E(s, -1)\).
Storage balance:
\[\begin{split}& E(s, t) = E(s, t-1) \cdot (1 - \beta(s, t)) ^{\tau(t)/(t_u)} \\ & - \gamma(s, t)\cdot E_{nom}(s) \cdot {\tau(t)/(t_u)} - \delta(t) \cdot {\tau(t)/(t_u)} \\ & - \frac{\dot{E}_o(s, t)}{\eta_o(s, t)} \cdot \tau(t) + \dot{E}_i(s, t) \cdot \eta_i(s, t) \cdot \tau(t) \\ & \forall \space s \in \mathrm{S}, \space t \in \mathrm{T}\end{split}\]
with \(E_{nom}(s)\) as the nominal storage capacity, \(\beta(t)\) as the relative loss of stored energy, \(\gamma(t)\) as the fixed loss of stored energy relative to the nominal storage capacity, \(\delta(t)\) as the fixed losses in absolute terms and \(t_u\) the time unit to create dimensionless factors resp. exponents.
Storage level limits:
\[\begin{split}& E_{min}(s, t) \leq E(s, t) \leq E_{max}(s, t) \\ & \forall \space s \in \mathrm{S}, \space t \in \mathrm{T}\end{split}\]
with \(E_{min}(s, t)\) as the minimum and \(E_{max}(s, t)\) as the maximum allowed storage content for time step t.
Constraints for core model extensions¶
The following constraints can be optionally included in the model formulation if the respective control parameter in the configuration file are set accordingly, see Configuring the model.
Emissions limit¶
Limit the overall annual emissions (resp. emissions for the timeframe considered):
with \(ef(i, o)\) as the specific emission factor and \(EL\) as the overall emission cap for the simulation time frame (usually one year).
Demand response constraints¶
Since demand response is one of the key interest points of POMMES, there are three different implementations which can be chosen from:
DIW: Based on a paper by Zerrahn and Schill (2015), pp. 842-843.
DLR: Based on the PhD thesis of Gils (2015)
oemof: Created by Julian Endres. A fairly simple DSM representation which demands the energy balance to be levelled out in fixed cycles
An evaluation of different modeling approaches has been carried out and presented at the INREC 2020 (Kochems 2020). Some of the results are as follows:
DLR: An extensive modeling approach for demand response which neither leads to an over- nor underestimization of potentials and balances modeling detail and computation intensity.
DIW: A solid implementation with the tendency of slight overestimization of potentials since a shift_time is not included. It may get computationally expensive due to a high time-interlinkage in constraint formulations.
oemof: A very computationally efficient approach which only requires the energy balance to be levelled out in certain intervals. If demand response is not at the center of the research and/or parameter availability is limited, this approach should be chosen. Note that approach oemof does allow for load shedding, but does not impose a limit on maximum amount of shedded energy.
For the sake of readability, the variables and parameters used for demand response modeling are listed separately in the following table:
symbol |
type |
explanation |
approach |
|---|---|---|---|
\(DSM_{t}^{up}\) |
V |
DSM up shift (capacity shifted upwards) |
oemof, DIW |
\(DSM_{h, t}^{up}\) |
V |
DSM up shift (additional load) in hour t with delay time h |
DLR |
\(DSM_{t}^{do, shift}\) |
V |
DSM down shift (capacity shifted downwards) |
oemof |
\(DSM_{t, tt}^{do, shift}\) |
V |
DSM down shift (less load) in hour tt
to compensate for upwards shifts in hour t
|
DIW |
\(DSM_{h, t}^{do, shift}\) |
V |
DSM down shift (less load) in hour t with delay time h |
DLR |
\(DSM_{h, t}^{balanceUp}\) |
V |
DSM down shift (less load) in hour t with delay time h
to balance previous upshift
|
DLR |
\(DSM_{h, t}^{balanceDo}\) |
V |
DSM up shift (additional load) in hour t with delay time h
to balance previous downshift
|
DLR |
\(DSM_{t}^{do, shed}\) |
V |
DSM shedded (capacity shedded, i.e. not compensated for) |
all |
\(\dot{E}_{t}\) |
V |
Energy flowing in from (electrical) inflow bus |
all |
\(demand_{t}\) |
P |
(Electrical) demand series (normalized) |
all |
\(demand_{max}\) |
P |
Maximum demand value |
all |
\(h\) |
P |
Maximum delay time for load shift (integer value
from set of feasible delay times per DSM portfolio;
time until the energy balance has to be levelled out again;
roundtrip time of one load shifting cycle, i.e. time window
for upshift and compensating downshift)
|
DLR |
\(H_{DR}\) |
S |
Set of feasible delay times for load shift
of a certain DSM portfolio
|
DLR |
\(t_{shift}\) |
P |
Maximum time for a shift in one direction,
i. e. maximum time for an upshift or a downshift
in a load shifting cycle
|
DLR |
\(L\) |
P |
Maximum delay time for load shift
(time until the energy balance has to be levelled out again;
roundtrip time of one load shifting cycle, i.e. time window
for upshift and compensating downshift)
|
DIW |
\(t_{she}\) |
P |
Maximum time for one load shedding process |
DLR, DIW |
\(E_{t}^{do}\) |
P |
Capacity allowed for a load adjustment downwards
(normalized; shifting + shedding)
|
all |
\(E_{t}^{up}\) |
P |
Capacity allowed for a shift upwards (normalized) |
all |
\(E_{do, max}\) |
P |
Maximum capacity allowed for a load adjustment downwards
(shifting + shedding)
|
all |
\(E_{up, max}\) |
P |
Maximum capacity allowed for a shift upwards |
all |
\(\tau\) |
P |
interval (time within which the
energy balance must be levelled out)
|
oemof |
\(\eta\) |
P |
Efficiency for load shifting processes |
all |
\(\mathbb{T}\) |
P |
Time steps of the model |
all |
\(e_{shift}\) |
P |
Boolean parameter indicating if unit can be used
for load shifting
|
all |
\(e_{shed}\) |
P |
Boolean parameter indicating if unit can be used
for load shedding
|
all |
\(cost_{t}^{dsm, up}\) |
P |
Variable costs for an upwards shift |
all |
\(cost_{t}^{dsm, do, shift}\) |
P |
Variable costs for a downwards shift (load shifting) |
all |
\(cost_{t}^{dsm, do, shed}\) |
P |
Variable costs for shedding load |
all |
\(\Delta t\) |
P |
The time increment of the model |
DLR, DIW |
\(\omega_{t}\) |
P |
Objective weighting of the model for time step t |
all |
\(R_{shi}\) |
P |
Minimum time between the end of one load shifting process
and the start of another
|
DIW |
\(R_{she}\) |
P |
Minimum time between the end of one load shedding process
and the start of another
|
DIW |
\(n_{yearLimitShift}\) |
P |
Maximum allowed number of load shifts (at full capacity)
in the optimization timeframe
|
DLR |
\(n_{yearLimitShed}\) |
P |
Maximum allowed number of load sheds (at full capacity)
in the optimization timeframe
|
DLR |
\(t_{dayLimit}\) |
P |
Maximum duration of load shifts at full capacity per day
resp. in the last hours before the current”
|
DLR |
In the following, the constraint formulations and objective terms are given separately for each approach:
Note
approach `oemof`:
Constraints:
Objective function term:
approach `DIW`:
Constraints:
Objective function term:
approach `DLR`:
Constraints:
Objective function term:
References¶
Gils, Hans Christian (2015): Balancing of Intermittent Renewable Power Generation by Demand Response and Thermal Energy Storage, Stuttgart, http://dx.doi.org/10.18419/opus-6888, accessed 24.09.2021, pp. 67-70.
Kochems, Johannes (2020): Demand response potentials for Germany: potential clustering and comparison of modeling approaches, presentation at the 9th international Ruhr Energy Conference (INREC 2020), 10th September 2020, https://github.com/jokochems/DR_modeling_oemof/blob/master/Kochems_Demand_Response_INREC.pdf, accessed 24.09.2021.
Zerrahn, Alexander and Schill, Wolf-Peter (2015): On the representation of demand-side management in power system models, in: Energy (84), pp. 840-845, 10.1016/j.energy.2015.03.037,