OPTIMIZATION OF PHOTOVOLTAIC AND BATTERY