BATTERY CHARGING AND DISCHARGING OPTIMIZATION FOR EV