HOW TO DESIGN AN ENERGY STORAGE SYSTEM