OPTIMAL CONFIGURATION OF BATTERY ENERGY STORAGE SYSTEM IN PRIMARY