Study of power recoverability through optimal design of energy storage systems