Jump to content

Battery Storage: Difference between revisions

From mintOC
Line 71: Line 71:




[[Category:MIOCP]]
[[Category:ODE model]]
[[Category:ODE model]]
[[Category:Energy systems]]
[[Category:Energy systems]]

Revision as of 11:48, 3 September 2026

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

minu∫0tfp(t)u(t)dtsubject tox˙(t)=u(t),x(0)=x0,x(tf)=x0,x(t)∈[0,Emax]∀t∈[0,tf],u(t)∈[−Pmax,Pmax]∀t∈[0,tf],

where p(t)=p0+Δpsin⁡(2πt/tf) is the electricity price at time t. The cyclic boundary condition x(tf)=x0 ensures that the battery returns to its initial state of charge at the end of the horizon. Charging (u>0) incurs a positive cost p(t)u(t)>0, while discharging (u<0) generates revenue.

Parameters

These fixed values are used within the model:

Symbol Value Description
Emax 1 Battery capacity (normalised)
Pmax 1 Maximum charge/discharge power
p0 1 Mean electricity price
Δp 0.5 Price amplitude
x0 0.5 Initial (and final) state of charge
tf 1 Length of the scheduling horizon

Reference Solutions

Here is one local solution to the above control problem.

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 ηc∈(0,1] and discharging efficiency ηd∈(0,1]), the state equation becomes x˙=ηcu+−u−/ηd, where u+=max⁡(u,0) and u−=max⁡(−u,0), 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