Hierarchical Constrained Reinforcement Learning with Dynamic Boundary for Spatio-Temporal Vehicle-to-Grid Scheduling

Haoyu Yan, Shutong Ding, Jiebao Zhang, Xi Yao, Yu Liu, Haoyu Wang, Chenchi Luo, Ye ShiarXiv 2026

TL;DR

This paper introduces HPC-RL, a hierarchical constrained reinforcement learning framework designed for large-scale Vehicle-to-Grid (V2G) scheduling. By combining a Generalized Reduced Gradient (GRG) method with a novel dynamic boundary strategy, it strictly enforces both spatial grid physical constraints and temporal EV charging demands. The approach achieves near-optimal scheduling while slashing online computation times from hours to minutes compared to traditional numerical solvers.

What Problem Does This Paper Address?

As electric vehicles (EVs) become more widespread, their collective battery capacity offers a massive opportunity for power grids via Vehicle-to-Grid (V2G) technology. V2G allows bidirectional power flow, meaning EVs can draw power to charge or feed power back into the grid to stabilize it.

However, integrating large-scale EV fleets into the Optimal Power Flow (OPF) framework is incredibly difficult. The problem is a highly complex Mixed-Integer Nonlinear Program due to discrete EV connection states, charging behaviors, and non-linear power flow physics. Traditional numerical solvers scale poorly and take too long for real-time coordination. While Deep Reinforcement Learning (DRL) is fast during deployment, standard safe RL methods rely on soft penalties or post-hoc projections that fail to guarantee strict adherence to physical grid constraints (like power balance) and struggle to manage the dynamic entry and exit of EVs over time.

Methods

The authors propose the Hierarchical Policy for Constrained Reinforcement Learning (HPC-RL) framework, which decouples the problem into a two-layer architecture to handle spatial and temporal constraints separately:

Fig. 1. The HPC-RL pipeline consists of an upper layer solving the OPF-EV using RL with GRG constraints, and a lower layer managing EV charging allocations via dynamic boundaries and priority.
  • Upper Level (Grid-Level OPF): This layer coordinates grid-level power generation and the aggregate charging demands of EV charging stations. It utilizes a physics-integrated GRG-SAC (Generalized Reduced Gradient + Soft Actor-Critic) framework. By applying the Implicit Function Theorem and Newton's method, it analytically embeds non-linear power flow equality constraints directly into the RL action generation process, ensuring strict grid safety.
  • Lower Level (EV-Level Dispatch): This layer manages individual EV power allocation within each station. It introduces a Dynamic Boundary Strategy that translates long-term charging obligations into real-time, actionable power bounds based on an EV's remaining connection time and current State of Charge (SOC). A dynamic priority-based allocation mechanism then distributes the remaining capacity to the most urgent EVs.
  • Demand Information Embedding: To help the agent anticipate temporal variations, a specialized demand embedding layer encodes future charging requirements directly into the state space.

Datasets

The framework was evaluated using standard IEEE power system benchmarks:

  • IEEE 14-bus system (with 3 EV charging stations)
  • IEEE 30-bus system (with 3 EV charging stations)
  • Modified IEEE 141-bus system (with 52 nodes selected as new power generation nodes and 1 EV charging station)

Each charging station maintained a constant connection capacity of 10 EVs per discrete time step across a 24-hour scheduling horizon.

Key Insights and Ideas

  • Spatio-Temporal Decoupling: Instead of treating V2G scheduling as a single massive optimization problem, the authors separate spatial grid constraints (handled at the upper level via physics-informed RL) from temporal EV constraints (handled at the lower level via dynamic boundaries). This eliminates the curse of dimensionality.
  • Staying on the Feasible Manifold: Rather than letting an RL agent make a wild prediction and correcting it later, integrating the GRG method ensures that policy updates always stay within the tangent space of the power-flow manifold, drastically reducing constraint violations during training.
  • Dynamic Boundaries for Variable Fleets: Translating long-term charging deadlines into real-time upper and lower bounds allows the RL network to remain stable and scalable, even as EVs continuously arrive and depart.

Key Results

Extensive experiments demonstrated that HPC-RL successfully balances optimality, safety, and speed:

  • Massive Speedups: Compared to traditional Model Predictive Control (MPC), HPC-RL reduced online computation times by factors of 52× for Case 14, 67× for Case 30, and 319× for Case 141. Large-scale network scheduling dropped from hours to mere minutes.
  • Near-Optimal Performance: HPC-RL achieved near-optimal scheduling strategies, with small objective-cost gaps of only 10.2%, 13.1%, and 7.2% compared to the ideal MPC baseline across the three cases.
  • Strict Constraint Satisfaction: HPC-RL maintained a near-zero constraint violation rate and achieved nearly 100% charging demand satisfaction. In contrast, baseline safe RL algorithms (like CPO and CUP) suffered from severe grid constraint violations and poor demand fulfillment.

Limitations and Future Work

The authors note that the current framework assumes deterministic battery dynamics and exogenous grid demands.

For future work, they plan to extend HPC-RL to accommodate stochastic renewable generation, where highly volatile renewable outputs (like wind and solar) can be integrated as time-varying states or forecast inputs. They also intend to test the framework on more complex distribution network topologies.

Summary updated

BibTeX
@misc{yan2026hierarchical,
  author = {Haoyu Yan and Shutong Ding and Jiebao Zhang and Xi Yao and Yu Liu and Haoyu Wang and Chenchi Luo and Ye Shi},
  title = {{Hierarchical Constrained Reinforcement Learning with Dynamic Boundary for Spatio-Temporal Vehicle-to-Grid Scheduling}},
  year = {2026},
  eprint = {2608.03409},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2608.03409},
}
Figure