COST OPTIMAL SIZING OF BATTERY ENERGY STORAGE SYSTEMS IN MICROGRIDS