OPTIMAL CAPACITY CONFIGURATION OF ENERGY STORAGE