Implementation of a battery energy storage system (BESS)