CHARGING AND DISCHARGING A BATTERY AT THE SAME TIME