Increasing performance of electric vehicles in ride-hailing services using deep reinforcement learning

Jacob F. Pettit, Ruben Glatt, Jonathan R. Donadee, Brenden K. PetersenarXiv 2019

TL;DR

Transitioning ride-hailing fleets to electric vehicles (EVs) is critical for reducing urban emissions, but drivers face a complex balancing act between passenger demand, charging queues, and fluctuating electricity prices. This paper demonstrates that Deep Reinforcement Learning (DRL) can successfully optimize an EV driver's sequential decision-making policy to maximize revenue while minimizing charging costs and emissions without any prior environmental knowledge.

What Problem Does This Paper Address?

Electrifying ride-hailing services (like Uber and Lyft) or future autonomous vehicle fleets is a powerful lever for cutting transportation emissions. However, EV drivers face operational hurdles that internal combustion engine drivers don't: shorter driving ranges, longer refueling times, and limited, often congested charging infrastructure.

To make a living efficiently, an EV ride-hailing driver must constantly decide when and where to charge. This decision depends on a web of highly dynamic, stochastic factors: time-varying electricity prices, grid carbon intensity, ride-hailing surge pricing, passenger demand patterns, traffic conditions, and charging station wait times. Because these variables exhibit strong spatial and temporal patterns, human drivers and simple rule-based systems struggle to find the mathematical sweet spot. This paper tackles the challenge of learning an optimal driving and charging policy for a single agent operating within this complex environment.

Methods

The authors frame the sequential driving and charging problem as a Markov Decision Process (MDP) and build a data-driven simulation environment using OpenAI Gym.

  • Action Space: The action space is kept simple and discrete. At each decision point, the agent chooses between two actions: accept a new ride or drive to the nearest charging station to charge the battery to full.
  • Observation Space: The agent receives a vector containing its current battery level, the time of day, the expected battery usage for the next ride, the expected charging cost, the expected emissions, the estimated time the vehicle would finish charging, and the current queue duration at the nearest station.
  • Reward Function: The reward function is designed to balance economics and ecology: $$r = \begin{cases} -(c + \epsilon E) & \text{if choosing to charge} \\ \xi & \text{if successfully providing a ride} \\ -3(c + \epsilon E) & \text{if attempting a ride with insufficient battery} \end{cases}$$ Where $c$ is charging cost, $\epsilon$ is emissions, $\xi$ is ride revenue, and $E$ acts as a tunable carbon tax. Crucially, the heavy penalty for running out of battery forces the agent to learn proactive charging behavior.

  • Algorithm: The authors utilize Trust Region Policy Optimization (TRPO), a stable policy gradient DRL algorithm, parameterized using a standard two-layer perceptron (64 units per layer with tanh activations).

Datasets

To ensure the simulation reflects real-world dynamics, the environment is driven by three distinct datasets:

  1. New York City Taxicab Dataset (2015): Used to build a probabilistic model of trip demand, destinations, and revenues within Manhattan, which was discretized into a grid of 120 zones.
  2. PG&E Commercial Energy Prices: Provides realistic, time-varying electricity costs based on California commercial rate designs.
  3. CAISO Grid Emission Data: Real-time carbon intensity data from the California Independent System Operator, allowing the reward function to accurately penalize charging during high-emission periods.

Key Insights and Ideas

  • Proactive Arbitrage: The DRL agent naturally discovers temporal arbitrage. It learns to avoid charging during peak commute hours when ride demand (and surge pricing) is highest and charging stations are congested, even if its battery is relatively low.
  • Exploiting Clean Energy Windows: The agent automatically aligns its charging behavior with grid realities. In California, this means concentrating charging in the middle of the night (low demand) or around noon, when solar overproduction drops both electricity prices and grid carbon intensity.
  • Risk Mitigation and Consistency: Unlike fixed-threshold strategies that can fail catastrophically if an EV runs out of juice during an unexpectedly long trip, the DRL policy learns a flexible safety margin tailored to the expected length of upcoming trips.

Key Results

The trained TRPO agent was evaluated against handcrafted heuristic policies that trigger charging when the battery falls below a fixed threshold ($\lambda = 10\%, 25\%, \text{ or } 50\%$).

  • Higher and More Consistent Rewards: The TRPO agent achieved a higher average reward than the heuristics. More importantly, its performance exhibited much lower variance, completely avoiding the low-reward tail events that occur when threshold policies run out of battery or get stuck in long queues.
Reward distribution comparison between TRPO and baseline threshold policies.
  • Economic Efficiency: The DRL agent significantly reduced the dollars spent on energy per mile driven, outperforming even the best-tuned heuristic ($\lambda = 10\%$).
Comparison of dollars spent on energy per mile driven.
  • Smart Scheduling: As shown in the charging distribution, the agent successfully learned to concentrate its charging events during the cheapest and cleanest times of day (late night and midday).
Distribution of the agent's choice to charge over the course of the day relative to energy prices.

Limitations and Future Work

  • The Exogenous Environment Assumption: The primary limitation is that this is a single-agent study. The environment (including charging station queues and ride demand) is treated as exogenous. If an entire fleet of ride-hailing EVs adopted this exact policy, they would collectively create new congestion peaks at the recommended times and locations.
  • Simplified Simulation: The simulation uses a relatively coarse spatial discretization (120 zones) and assumes a fixed charging power of 100kW.
  • Future Directions: The authors note that the logical next step is extending this framework to Multi-Agent DRL. This would allow coordination within a centralized fleet management system for Connected and Autonomous Vehicles (CAVs), ensuring that vehicles distribute themselves optimally across charging infrastructure without causing grid or queue overloads.

Summary updated

BibTeX
@misc{pettit2019increasing,
  author = {Jacob F. Pettit and Ruben Glatt and Jonathan R. Donadee and Brenden K. Petersen},
  title = {{Increasing performance of electric vehicles in ride-hailing services using deep reinforcement learning}},
  year = {2019},
  eprint = {1912.03408},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.03408},
}
Figure