Battery
Batteries are modeled by three variables \( bat\_soe, bat\_charge, bat\_discharge \).
\( bat\_soe \) is the energy stored in the battery (state of energy), measured in GWh.
\( bat\_charge \) is the energy used for charging the battery, measured in GWh.
\( bat\_discharge \) is the energy discharged from the battery, measured in GWh.
The battery state of charge (soe) is kept track of through a battery balance constraint:
Where \( \textrm{Loss}(b,k) \) represent the fraction of energy lost when charging and discharging the battery.
In the special case of k=1, \( bat\_soe(b,0) \) is obtained from the solution of the previous decision stage.
With the following contritbution to the power balance:
End Valuation
In order to prevent the battery from being emptied in the last time step \( K \), end values are added to the objective function. There are two types of endvalues: Endogenous and exogenous.
Endogenous
The end value is the same for all storage levels and is added to the objective function like this: $\( \textrm{OBJ}: ... + \textrm{BatEnergyValue}(b, K) * \textrm{bat}_{\textrm{soe}}(b, K) + ...\)$
where \( \textrm{BatEnergyValue}(K) \) is the dual value of \( \textrm{BATBAL}(b, 0) \) from the previous period. For the first period \( \textrm{BatEnergyValue}(K) \) is given by an input that defaults to 0.
Exogenous
The battery state of energy is divided into multiple layers that each have an end value. The end value is given as an input NDArray time series, and the number of layers, \(N\), depend on the size of the NDArray. This is similar to how EMPS water values are handled in reservoirs.
Another constraint is introduced for the last time step \(K\):
where \(end\_value\_layer(b,n)\) is the energy layer corresponding to \(\textrm{EndValue}(b,n)\) given by the time series input.
The end values are added to the objective function:
Each the end value layers are equally sized to cover the maximum battery state of energy. Similarly to how it is done in the EMPS water value module, the first end value (index 0) in the NDArray input is used for the minimum state of energy. Since the minimum energy level is 0, this end value is ignored.