INTEGRATING LITHIUM BATTERIES IN RENEWABLE ENERGY MICROGRIDS