A layered control system for managing a distributed energy storage, DES, system, wherein the DES system comprises a plurality of nodes (-), each node comprising one or more battery units. The layered control system comprises a first control layer (), a second control layer () and a third control…