Battery Storage
| Battery Storage | |
|---|---|
| State dimension: | 1 |
| Differential states: | 1 |
| Discrete control functions: | 1 |
The battery storage problem is a classical benchmark in optimal control for energy systems. This description is taken from [1].
It models the optimal operation of a grid-connected battery over a finite time horizon. The single state is the energy stored in the battery (state of charge), and the single control is the net power flow. Positive control corresponds to charging (energy flows into the battery from the grid), while negative control corresponds to discharging (energy flows from the battery to the grid). The objective is to minimise the total electricity cost, given by the integral of the product of a time-varying price signal and the net power drawn from the grid, subject to capacity constraints on the stored energy and power limits on the control. The optimal strategy is to charge when prices are low and discharge when prices are high, yielding an energy-arbitrage policy that exhibits bang–bang structure when there is no regularisation term.
Mathematical formulation
where is the electricity price at time . The cyclic boundary condition ensures that the battery returns to its initial state of charge at the end of the horizon. Charging () incurs a positive cost , while discharging () generates revenue.
Parameters
These fixed values are used within the model:
| Symbol | Value | Description |
|---|---|---|
| 1 | Battery capacity (normalised) | |
| 1 | Maximum charge/discharge power | |
| 1 | Mean electricity price | |
| 0.5 | Price amplitude | |
| 0.5 | Initial (and final) state of charge | |
| 1 | Length of the scheduling horizon |
Reference Solutions
Here is one local solution to the above control problem.
- Reference solution plots
-
State of charge and optimal power schedule for a reference solution.
Miscellaneous and Further Reading
The battery storage optimal control problem arises in the operation of grid-scale energy storage, demand-response programs, and behind-the-meter storage systems. When efficiency losses are incorporated (separate charging efficiency and discharging efficiency ), the state equation becomes , where and , and the problem acquires a mixed-integer character that can be handled by complementarity constraints. A detailed formulation and further discussion can be found in [1].
References
[1] Caillau, J.-B., Cots, O., Gergaud, J., & Martinon, P. OptimalControlProblems.jl: a collection of optimal control problems with ODE's in Julia. https://github.com/control-toolbox/OptimalControlProblems.jl