{ "cells": [ { "cell_type": "markdown", "id": "541114c7", "metadata": {}, "source": [ "(battery)=\n", "# battery\n", "A battery that is a part of a power system.\n", "\n", "| | |\n", "|---|---|\n", "|Input connections|{ref}`reserve_group`, {ref}`busbar`|\n", "|Output connections|{ref}`busbar`, {ref}`reserve_group`|\n", "|License|SHOP_OPEN|\n", "|Release version|15.2.0.0|\n", "\n", "```{contents}\n", ":local:\n", ":depth: 1\n", "```\n", "\n", "## Introduction\n", "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](battery:charge_efficiency) $\\eta_c$ and [discharge efficiency](battery:discharge_efficiency) $\\eta_d$. The battery energy balance is\n", "```{math}\n", ":label: energy-balance\n", "e_{i,t+1} = e_{i,t} + \\eta_c pc_{i,t} - \\frac{1}{\\eta_d} pd_{i,t},\n", "```\n", "where $e_{i,t}$ expresses the [initial energy](battery: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](battery:max_charge_power) $PC_i$\n", "```{math}\n", ":label: max-charge\n", "0 \\leq pc_{i,t} \\leq PC_{i}\n", "```\n", "and the [maximum discharge power](battery:max_discharge_power) $PD_i$\n", "```{math}\n", ":label: max-discharge\n", "0 \\leq pd_{i,t} \\leq PD_{i}.\n", "```\n", "\n", "## Connection\n", "Batteries can be connected to [busbars](busbar) 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.\n", "\n", "## MIP\n", "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 [](battery: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:\n", "```{math}\n", ":label: mip-charge\n", "pc_{i,t} \\leq PC_{i} (1-\\delta_{i,t} )\n", "```\n", "```{math}\n", ":label: mip-discharge\n", "pd_{i,t} \\leq PD_{i} \\delta_{i,t}\n", "```\n", "\n", "## Schedules\n", "Schedules for batteries can be given as both [charge](battery:charge_schedule), [discharge](battery:discharge_schedule), [net-discharge](battery:net_discharge_schedule), [minimum energy](battery:min_energy_constraint) and [maximum energy](battery:max_energy_constraint). Net-discharge represents discharge minus charge. All series can take the special value $nan$ to deactivate the schedule at a given time step.\n", "\n", "## Operating costs\n", "The battery can also have a fixed [charge cost](battery:charge_cost) and [discharge cost](battery:discharge_cost), typically associated with degradation. \n", "\n", "## Results\n", "The results show the battery [charge](battery:power_charge), [discharge](battery:power_discharge) and [net discharge](battery:net_power_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](battery:energy) attribute, and the dual value of the energy balance is given by the [energy value](battery:energy_value).\n", "\n", "\n", "## Examples\n", " - [](battery-wind-solar)\n", " - [](battery_reserves)\n", " \n", "\n", "## References\n", " - Optimal microgrid operation considering battery degradation using stochastic dual dynamic programming {cite}`Aaslid2019b`\n", " - Non-linear charge-based battery storage optimization model with bi-variate cubic spline constraints {cite}`Aaslid2020`\n", " - Pricing electricity in constrained networks dominated by stochastic renewable generation and electric energy storage {cite}`Aaslid2021`\n", " - Stochastic Optimization of Microgrid Operation With Renewable Generation and Energy Storages {cite}`Aaslid2022a`\n", " - Stochastic operation of energy constrained microgrids considering battery degradation {cite}`Aaslid2022b`\n", " - Operating a Battery in a Hydropower-Dominated System to Balance Net Load Deviations {cite}`Naversen2019`\n", " \n", "\n", "## Attributes" ] }, { "cell_type": "code", "execution_count": 1, "id": "8575833a", "metadata": { "tags": [ "remove-input", "full-width" ] }, "outputs": [ { "data": { "text/html": [ "