  This paper presents a millisecond-level look-ahead control algorithm for
energy storage with constant space complexity and worst-case linear run-time
complexity. The algorithm connects the optimal control with the Lagrangian
multiplier associated with the state-of-charge constraint. It is compared to
solving look-ahead control using a state-of-the-art convex optimization solver.
Simulation results show that both methods obtain the same control result, while
the proposed algorithm runs up to 100,000 times faster and solves most problems
within one millisecond. The theoretical results from developing this algorithm
also provide key insights into designing optimal energy storage control schemes
at the centralized system level as well as under distributed settings.
