OPTIMAL PLANNING OF THE DISTRIBUTED ENERGY STORAGE SYSTEM