battery#

A battery that is a part of a power system.

Input connections

reserve_group, busbar

Output connections

reserve_group, busbar

License

SHOP_OPEN

Release version

15.2.0.0

Introduction#

A battery can be used to temporarily store energy in a power system. The battery can charge and discharge power where the power losses are given by the charge efficiency \(\eta_c\) and discharge efficiency \(\eta_d\). The battery energy balance is

(1)#\[e_{i,t+1} = e_{i,t} + \eta_c pc_{i,t} - \frac{1}{\eta_d} pd_{i,t},\]

where \(e_{i,t}\) expresses the initial energy in battery \(i\) at the beginning of time step \(t\), and \(pc_{i,t}\), \(pd_{i,t}\) the power charge and discharge respectively. The charge and discharge power is limited by the maximum charge power \(PC_i\)

(2)#\[0 \leq pc_{i,t} \leq PC_{i}\]

and the maximum discharge power \(PD_i\)

(3)#\[0 \leq pd_{i,t} \leq PD_{i}.\]

Connection#

Batteries can be connected to busbars if used in combination with ac_line and/or dc_line. If busbars are not created explicitly, a copper plate representation is used where all sources and loads are connected to the same point.

MIP#

The battery net-discharge curve is discontinuous. Therefore, batteries are typically modelled with separate charge and discharge variables. This is, in reality, a relaxation that allows simultaneous charging and discharging. This will typically not occur simply since it is not optimal to waste energy. However, in situations with surplus renewable generation or negative electricity price, the optimization might exploit this relaxation. This can be avoided by using mixed-integer programming and is activated with the charge_discharge_mip attribute. Given the binary variable \(\delta_{i,t}\) which takes the value 0 when charging and 1 when discharging, the additional restrictions will ensure that charging and discharging does not occur simultaneously:

(4)#\[pc_{i,t} \leq PC_{i} (1-\delta_{i,t} )\]
(5)#\[pd_{i,t} \leq PD_{i} \delta_{i,t}\]

Schedules#

Schedules for batteries can be given as both charge, discharge, net-discharge, minimum energy and maximum energy. Net-discharge represents discharge minus charge. All series can take the special value \(nan\) to deactivate the schedule at a given time step.

Operating costs#

The battery can also have a fixed charge cost and discharge cost, typically associated with degradation.

Results#

The results show the battery charge, discharge and net discharge. Net discharge will always represent the difference between discharge and charge. However, the charge and discharge are also useful quantities as they can reveal situations where simultaneous charging and discharging occurs. These situations will also issue a warning. The battery state-of-charge is shown in by the energy attribute, and the dual value of the energy balance is given by the energy value.

Examples#

References#

  • Optimal microgrid operation considering battery degradation using stochastic dual dynamic programming [1]

  • Non-linear charge-based battery storage optimization model with bi-variate cubic spline constraints [2]

  • Pricing electricity in constrained networks dominated by stochastic renewable generation and electric energy storage [3]

  • Stochastic Optimization of Microgrid Operation With Renewable Generation and Energy Storages [4]

  • Stochastic operation of energy constrained microgrids considering battery degradation [5]

  • Operating a Battery in a Hydropower-Dominated System to Balance Net Load Deviations [6]

Attributes#

charge_efficiency#

Data type: double. Unit: NO_UNIT.

Charge efficiency coefficient.

discharge_efficiency#

Data type: double. Unit: NO_UNIT.

Discharge efficiency coefficient.

max_charge_power#

Data type: double. Unit: MW.

Maximum charge power.

max_discharge_power#

Data type: double. Unit: MW.

Maximum discharge power.

max_energy#

Data type: double. Unit: MWH.

Maximum energy storage capacity.

initial_energy#

Data type: double. Unit: MWH.

Initial energy storage.

discharge_cost#

Data type: double. Unit: NOK/MWH.

Battery discharge cost.

charge_cost#

Data type: double. Unit: NOK/MWH.

Battery charge cost.

max_charge_power_constraint#

Data type: timeseries. Unit: MW.

Maximum charge power constraint.

max_discharge_power_constraint#

Data type: timeseries. Unit: MW.

Maximum discharge power constraint.

max_energy_constraint#

Data type: timeseries. Unit: MWH.

Maximum energy storage constraint.

min_energy_constraint#

Data type: timeseries. Unit: MWH.

Minimum energy storage constraint.

charge_discharge_mip#

Data type: timeseries. Unit: NO_UNIT.

MIP variable to prevent simultaneous charging and discharging.

charge_schedule#

Data type: timeseries. Unit: MW.

Battery charging schedule.

discharge_schedule#

Data type: timeseries. Unit: MW.

Battery discharging schedule.

net_discharge_schedule#

Data type: timeseries. Unit: MW.

Battery net-discharging schedule.

fcr_n_up_cost#

Data type: timeseries. Unit: NOK/MWH.

The cost of allocating fcr_n_up on this battery.

fcr_n_down_cost#

Data type: timeseries. Unit: NOK/MWH.

The cost of allocating fcr_n_down on this battery.

fcr_d_up_cost#

Data type: timeseries. Unit: NOK/MWH.

The cost of allocating fcr_d_up on this battery.

fcr_d_down_cost#

Data type: timeseries. Unit: NOK/MWH.

The cost of allocating fcr_d_down on this battery.

frr_up_cost#

Data type: timeseries. Unit: NOK/MWH.

The cost of allocating frr_up on this battery.

frr_down_cost#

Data type: timeseries. Unit: NOK/MWH.

The cost of allocating frr_down on this battery.

rr_up_cost#

Data type: timeseries. Unit: NOK/MWH.

The cost of allocating rr_up on this battery.

rr_down_cost#

Data type: timeseries. Unit: NOK/MWH.

The cost of allocating rr_down on this battery.

historical_discharge#

Data type: timeseries. Unit: MW.

Battery discharge before the start of the optimization period.

rolling_max_discharge_limit#

Data type: xyt. Unit: x: MINUTE and y: MWH.

Input to specify rolling battery discharge constraints that limit the maximum total stored energy discharged within a rolling time window. The x-values represent the length of the rolling time window and the y-values specify the maximum allowed energy discharged. Each (x, y) point in each xy curve represents a rolling ramping constraint.

power_charge#

Data type: timeseries. Unit: MW.

Power charged from battery.

power_discharge#

Data type: timeseries. Unit: MW.

Power discharged from battery.

net_power_discharge#

Data type: timeseries. Unit: MW.

Net power discharged from battery.

energy#

Data type: timeseries. Unit: MWH.

Energy stored in battery.

energy_value#

Data type: timeseries. Unit: NOK/MWH.

Battery energy dual value.

fcr_n_up_delivery#

Data type: timeseries. Unit: MW.

Resulting battery fcr_n_up delivery.

fcr_n_down_delivery#

Data type: timeseries. Unit: MW.

Resulting battery fcr_n_down delivery.

fcr_d_up_delivery#

Data type: timeseries. Unit: MW.

Resulting battery fcr_d_up delivery.

fcr_d_down_delivery#

Data type: timeseries. Unit: MW.

Resulting battery fcr_d_down delivery.

frr_up_delivery#

Data type: timeseries. Unit: MW.

Resulting battery frr_up delivery.

frr_down_delivery#

Data type: timeseries. Unit: MW.

Resulting battery frr_down delivery.

rr_up_delivery#

Data type: timeseries. Unit: MW.

Resulting battery rr_up delivery.

rr_down_delivery#

Data type: timeseries. Unit: MW.

Resulting battery rr_down delivery.