OPTIMAL CONFIGURATION FOR POWER GRID BATTERY ENERGY STORAGE SYSTEMS