Electric vehicle in smart grid