Multi-configurational energy storage management in a residential nanogrid under constraints of renewable energy resources and demand uncertainties | Synapse