Smart Vehicles in the Smart Grid: Challenges, Trends, and Application to the Design of Charging StationsControl and Optimization Methods for Electric Smart Grids