Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

battery

iLab Assistant

A battery that is a part of a power system.

Input connectionsreserve_group, busbar
Output connectionsreserve_group, busbar
LicenseSHOP_OPEN
Release version15.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 ηc\eta_\textup{c} and the discharge efficiency ηd\eta_\textup{d}. The battery energy balance is

et+1=et+ηcpct−1ηdpdt,e_{t+1} = e_t + \eta_\textup{c} \textup{pc}_t - \frac{1}{\eta_\textup{d}} \textup{pd}_t,

where ete_t expresses the initial energy in at the beginning of time step tt, and pct\textup{pc}_t and pdt\textup{pd}_t denote the power charge and discharge, respectively. The charge and discharge powers are limited by the maximum charge power PC\textup{PC} through

0≤pct≤PC0 \leq \textup{pc}_t \leq \textup{PC}

and the maximum discharge power PD\textup{PD} through

0≤pdt≤PD.0 \leq \textup{pd}_t \leq \textup{PD}.

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 δt\delta_{t} which takes the value 0 when charging and 1 when discharging, the following additional restrictions will ensure that charging and discharging does not occur simultaneously:

pct≤PC(1−δt)\textup{pc}_t \leq \textup{PC} (1-\delta_t )
pdt≤PDδt\textup{pd}_t \leq \textup{PD} \delta_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 nannan 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

Attributes

AttributeData typeI/ORequiredUnitDefaultLicenseVersion addedNaN allowed
charge_efficiencydoubleInputNoNO_UNIT1.0SHOP_OPEN15.2.0.0No
discharge_efficiencydoubleInputNoNO_UNIT1.0SHOP_OPEN15.2.0.0No
max_charge_powerdoubleInputYesMW0.0SHOP_OPEN15.2.0.0No
max_discharge_powerdoubleInputYesMW0.0SHOP_OPEN15.2.0.0No
max_energydoubleInputYesMWH0.0SHOP_OPEN15.2.0.0No
initial_energydoubleInputNoMWH0.0SHOP_OPEN15.2.0.0No
discharge_costdoubleInputNoNOK/MWH0.0SHOP_OPEN15.2.0.0No
charge_costdoubleInputNoNOK/MWH0.0SHOP_OPEN15.2.0.0No
max_charge_power_constrainttimeseriesInputNoMWNone/nullSHOP_OPEN15.2.0.0Yes
max_discharge_power_constrainttimeseriesInputNoMWNone/nullSHOP_OPEN15.2.0.0Yes
max_energy_constrainttimeseriesInputNoMWHNone/nullSHOP_OPEN15.2.0.0Yes
min_energy_constrainttimeseriesInputNoMWHNone/nullSHOP_OPEN15.2.0.0Yes
charge_discharge_miptimeseriesInputNoNO_UNITNone/nullSHOP_OPEN15.2.0.0No
charge_scheduletimeseriesInputNoMWNone/nullSHOP_OPEN15.2.0.0No
discharge_scheduletimeseriesInputNoMWNone/nullSHOP_OPEN15.2.0.0No
net_discharge_scheduletimeseriesInputNoMWNone/nullSHOP_OPEN15.2.0.0No
fcr_n_up_costtimeseriesInputNoNOK/MWHNone/nullSHOP_OPEN15.5.0.0No
fcr_n_down_costtimeseriesInputNoNOK/MWHNone/nullSHOP_OPEN15.5.0.0No
fcr_d_up_costtimeseriesInputNoNOK/MWHNone/nullSHOP_OPEN15.5.0.0No
fcr_d_down_costtimeseriesInputNoNOK/MWHNone/nullSHOP_OPEN15.5.0.0No
frr_up_costtimeseriesInputNoNOK/MWHNone/nullSHOP_OPEN15.5.0.0No
frr_down_costtimeseriesInputNoNOK/MWHNone/nullSHOP_OPEN15.5.0.0No
rr_up_costtimeseriesInputNoNOK/MWHNone/nullSHOP_OPEN15.5.0.0No
rr_down_costtimeseriesInputNoNOK/MWHNone/nullSHOP_OPEN15.5.0.0No
historical_dischargetimeseriesInputNoMWNone/nullSHOP_OPEN17.19.0No
rolling_max_discharge_limitxytInputNox: MINUTE and y: MWHNone/nullSHOP_OPEN17.19.0Yes
power_chargetimeseriesOutputNoMWNone/nullSHOP_OPEN15.2.0.0No
power_dischargetimeseriesOutputNoMWNone/nullSHOP_OPEN15.2.0.0No
net_power_dischargetimeseriesOutputNoMWNone/nullSHOP_OPEN15.2.0.0No
energytimeseriesOutputNoMWHNone/nullSHOP_OPEN15.2.0.0No
energy_valuetimeseriesOutputNoNOK/MWHNone/nullSHOP_OPEN15.2.0.0No
fcr_n_up_deliverytimeseriesOutputNoMWNone/nullSHOP_OPEN15.5.0.0No
fcr_n_down_deliverytimeseriesOutputNoMWNone/nullSHOP_OPEN15.5.0.0No
fcr_d_up_deliverytimeseriesOutputNoMWNone/nullSHOP_OPEN15.5.0.0No
fcr_d_down_deliverytimeseriesOutputNoMWNone/nullSHOP_OPEN15.5.0.0No
frr_up_deliverytimeseriesOutputNoMWNone/nullSHOP_OPEN15.5.0.0No
frr_down_deliverytimeseriesOutputNoMWNone/nullSHOP_OPEN15.5.0.0No
rr_up_deliverytimeseriesOutputNoMWNone/nullSHOP_OPEN15.5.0.0No
rr_down_deliverytimeseriesOutputNoMWNone/nullSHOP_OPEN15.5.0.0No

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.

References
  1. Naversen, C. Ø., Bjarghov, S., & Helseth, A. (2019). Operating a Battery in a Hydropower-Dominated System to Balance Net Load Deviations. International Conference on the European Energy Market, EEM, 2019-September. 10.1109/EEM.2019.8916534
  2. Aaslid, P., Belsnes, M. M., & Fosso, O. B. (2019). Optimal microgrid operation considering battery degradation using stochastic dual dynamic programming. SEST 2019 - 2nd International Conference on Smart Energy Systems and Technologies, 1–6. 10.1109/SEST.2019.8849150
  3. Aaslid, P., Geth, F., Korpås, M., Belsnes, M. M., & Fosso, O. B. (2020). Non-linear charge-based battery storage optimization model with bi-variate cubic spline constraints. Journal of Energy Storage, 32, 101979. 10.1016/j.est.2020.101979
  4. Aaslid, P., Korpås, M., Belsnes, M. M., & Fosso, O. B. (2021). Pricing electricity in constrained networks dominated by stochastic renewable generation and electric energy storage. Electric Power Systems Research, 197, 107169. 10.1016/j.epsr.2021.107169
  5. Aaslid, P., Korpås, M., Belsnes, M. M., & Fosso, O. B. (2022). Stochastic Optimization of Microgrid Operation With Renewable Generation and Energy Storages. IEEE Transactions on Sustainable Energy, 1–1. 10.1109/TSTE.2022.3156069
  6. Aaslid, P., Korpås, M., Belsnes, M. M., & Fosso, O. B. (2022). Stochastic operation of energy constrained microgrids considering battery degradation. Electric Power Systems Research, 212, 108462. 10.1016/J.EPSR.2022.108462