Text this: A generalized passivity-based control approach for power compensation in distribution systems using electrical energy storage systems