Electric vehicles and smart grids: impacts, challenges and opportunities