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 and the discharge efficiency . The battery energy balance is
where expresses the initial energy in at the beginning of time step , and and denote the power charge and discharge, respectively. The charge and discharge powers are limited by the maximum charge power through
and the maximum discharge power through
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 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:
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 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¶
Operating a Battery in a Hydropower-Dominated System to Balance Net Load Deviations Naversen et al. (2019)
Optimal microgrid operation considering battery degradation using stochastic dual dynamic programming Aaslid et al. (2019)
Non-linear charge-based battery storage optimization model with bi-variate cubic spline constraints Aaslid et al. (2020)
Pricing electricity in constrained networks dominated by stochastic renewable generation and electric energy storage Aaslid et al. (2021)
Stochastic Optimization of Microgrid Operation With Renewable Generation and Energy Storages Aaslid et al. (2022)
Stochastic operation of energy constrained microgrids considering battery degradation Aaslid et al. (2022)
Attributes¶
| Attribute | Data type | I/O | Required | Unit | Default | License | Version added | NaN allowed |
|---|---|---|---|---|---|---|---|---|
| charge_efficiency | double | Input | No | NO_UNIT | 1.0 | SHOP_OPEN | 15.2.0.0 | No |
| discharge_efficiency | double | Input | No | NO_UNIT | 1.0 | SHOP_OPEN | 15.2.0.0 | No |
| max_charge_power | double | Input | Yes | MW | 0.0 | SHOP_OPEN | 15.2.0.0 | No |
| max_discharge_power | double | Input | Yes | MW | 0.0 | SHOP_OPEN | 15.2.0.0 | No |
| max_energy | double | Input | Yes | MWH | 0.0 | SHOP_OPEN | 15.2.0.0 | No |
| initial_energy | double | Input | No | MWH | 0.0 | SHOP_OPEN | 15.2.0.0 | No |
| discharge_cost | double | Input | No | NOK/MWH | 0.0 | SHOP_OPEN | 15.2.0.0 | No |
| charge_cost | double | Input | No | NOK/MWH | 0.0 | SHOP_OPEN | 15.2.0.0 | No |
| max_charge_power_constraint | timeseries | Input | No | MW | None/null | SHOP_OPEN | 15.2.0.0 | Yes |
| max_discharge_power_constraint | timeseries | Input | No | MW | None/null | SHOP_OPEN | 15.2.0.0 | Yes |
| max_energy_constraint | timeseries | Input | No | MWH | None/null | SHOP_OPEN | 15.2.0.0 | Yes |
| min_energy_constraint | timeseries | Input | No | MWH | None/null | SHOP_OPEN | 15.2.0.0 | Yes |
| charge_discharge_mip | timeseries | Input | No | NO_UNIT | None/null | SHOP_OPEN | 15.2.0.0 | No |
| charge_schedule | timeseries | Input | No | MW | None/null | SHOP_OPEN | 15.2.0.0 | No |
| discharge_schedule | timeseries | Input | No | MW | None/null | SHOP_OPEN | 15.2.0.0 | No |
| net_discharge_schedule | timeseries | Input | No | MW | None/null | SHOP_OPEN | 15.2.0.0 | No |
| fcr_n_up_cost | timeseries | Input | No | NOK/MWH | None/null | SHOP_OPEN | 15.5.0.0 | No |
| fcr_n_down_cost | timeseries | Input | No | NOK/MWH | None/null | SHOP_OPEN | 15.5.0.0 | No |
| fcr_d_up_cost | timeseries | Input | No | NOK/MWH | None/null | SHOP_OPEN | 15.5.0.0 | No |
| fcr_d_down_cost | timeseries | Input | No | NOK/MWH | None/null | SHOP_OPEN | 15.5.0.0 | No |
| frr_up_cost | timeseries | Input | No | NOK/MWH | None/null | SHOP_OPEN | 15.5.0.0 | No |
| frr_down_cost | timeseries | Input | No | NOK/MWH | None/null | SHOP_OPEN | 15.5.0.0 | No |
| rr_up_cost | timeseries | Input | No | NOK/MWH | None/null | SHOP_OPEN | 15.5.0.0 | No |
| rr_down_cost | timeseries | Input | No | NOK/MWH | None/null | SHOP_OPEN | 15.5.0.0 | No |
| historical_discharge | timeseries | Input | No | MW | None/null | SHOP_OPEN | 17.19.0 | No |
| rolling_max_discharge_limit | xyt | Input | No | x: MINUTE and y: MWH | None/null | SHOP_OPEN | 17.19.0 | Yes |
| power_charge | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.2.0.0 | No |
| power_discharge | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.2.0.0 | No |
| net_power_discharge | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.2.0.0 | No |
| energy | timeseries | Output | No | MWH | None/null | SHOP_OPEN | 15.2.0.0 | No |
| energy_value | timeseries | Output | No | NOK/MWH | None/null | SHOP_OPEN | 15.2.0.0 | No |
| fcr_n_up_delivery | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.5.0.0 | No |
| fcr_n_down_delivery | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.5.0.0 | No |
| fcr_d_up_delivery | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.5.0.0 | No |
| fcr_d_down_delivery | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.5.0.0 | No |
| frr_up_delivery | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.5.0.0 | No |
| frr_down_delivery | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.5.0.0 | No |
| rr_up_delivery | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.5.0.0 | No |
| rr_down_delivery | timeseries | Output | No | MW | None/null | SHOP_OPEN | 15.5.0.0 | No |
charge_efficiency¶
Charge efficiency coefficient.
discharge_efficiency¶
Discharge efficiency coefficient.
max_charge_power¶
Maximum charge power.
max_discharge_power¶
Maximum discharge power.
max_energy¶
Maximum energy storage capacity.
initial_energy¶
Initial energy storage.
discharge_cost¶
Battery discharge cost.
charge_cost¶
Battery charge cost.
max_charge_power_constraint¶
Maximum charge power constraint.
max_discharge_power_constraint¶
Maximum discharge power constraint.
max_energy_constraint¶
Maximum energy storage constraint.
min_energy_constraint¶
Minimum energy storage constraint.
charge_discharge_mip¶
MIP variable to prevent simultaneous charging and discharging.
charge_schedule¶
Battery charging schedule.
discharge_schedule¶
Battery discharging schedule.
net_discharge_schedule¶
Battery net-discharging schedule.
fcr_n_up_cost¶
The cost of allocating fcr_n_up on this battery.
fcr_n_down_cost¶
The cost of allocating fcr_n_down on this battery.
fcr_d_up_cost¶
The cost of allocating fcr_d_up on this battery.
fcr_d_down_cost¶
The cost of allocating fcr_d_down on this battery.
frr_up_cost¶
The cost of allocating frr_up on this battery.
frr_down_cost¶
The cost of allocating frr_down on this battery.
rr_up_cost¶
The cost of allocating rr_up on this battery.
rr_down_cost¶
The cost of allocating rr_down on this battery.
historical_discharge¶
Battery discharge before the start of the optimization period.
rolling_max_discharge_limit¶
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¶
Power charged from battery.
power_discharge¶
Power discharged from battery.
net_power_discharge¶
Net power discharged from battery.
energy¶
Energy stored in battery.
energy_value¶
Battery energy dual value.
fcr_n_up_delivery¶
Resulting battery fcr_n_up delivery.
fcr_n_down_delivery¶
Resulting battery fcr_n_down delivery.
fcr_d_up_delivery¶
Resulting battery fcr_d_up delivery.
fcr_d_down_delivery¶
Resulting battery fcr_d_down delivery.
frr_up_delivery¶
Resulting battery frr_up delivery.
frr_down_delivery¶
Resulting battery frr_down delivery.
rr_up_delivery¶
Resulting battery rr_up delivery.
rr_down_delivery¶
Resulting battery rr_down delivery.
- 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
- 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
- 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
- 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
- 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