Abstract
To address the challenges faced by virtual power plants (VPPs) in uncertain market environments and complex distribution networks, including strong market coupling, difficulty in multi-resource coordination, and strict safety constraints, this paper proposes a Hierarchical Hybrid Intelligent Framework (H2IF). The proposed framework integrates a market-aware meta-game mechanism, a topology-embedded graph attention coordination method, and a risk-aware soft/hard constraint safety mechanism to achieve economically optimal dispatch of VPPs in complex dynamic scenarios. By explicitly modeling competitive market interactions, the proposed method enhances strategy robustness; by exploiting grid topology priors, it improves multi-agent coordination capability; and by combining differentiable projection with risk-constrained optimization, it jointly ensures operational safety and revenue stability. Simulation results on a modified IEEE 33-bus system demonstrate that H2IF outperforms mainstream deep reinforcement learning methods and rule-based dispatch strategies in overall performance. In the 24 × 300-step testing scenario, H2IF achieves an average single-episode operating cost of 38.23 k$, which is 28.9%, 40.4%, and 26.5% lower than those of MADDPG, SAC, and the rule-based method, respectively, while also yielding the lowest constraint violation level. Ablation studies further verify the effectiveness of each key module in improving profit, reducing operating costs, enhancing tracking performance, and strengthening safety. The results indicate that the proposed method enables coordinated optimization of economy, safety, and robustness for VPP dispatch under uncertain market and operating conditions.
1. Introduction
The global momentum toward decarbonization has catalyzed a rapid proliferation of Distributed Energy Resources (DERs) within distribution networks. Nevertheless, the inherent stochasticity and variability of these resources create a fundamental mismatch with the rigid scheduling requirements of traditional power markets, presenting a major barrier to their large-scale integration [1]. To bridge this gap, the Virtual Power Plant (VPP) has emerged as a pivotal architectural solution for energy aggregation. By leveraging advanced communication and control technologies, VPPs not only mitigate renewable fluctuations to enhance system flexibility but also unlock the economic potential of demand-side resources through active participation in spot and ancillary service markets [2,3].
While VPPs hold immense promise, optimizing their dispatch within complex, dynamic environments remains fraught with challenges. Conventional economic dispatch has relied heavily on deterministic models or scenario analysis, such as Mixed Integer Linear Programming (MILP) and Stochastic Programming (SP) [4]. However, the practical efficacy of these model-driven approaches is often compromised by inherent limitations. Specifically, the attempt to capture the stochasticity of massive, heterogeneous resources via scenario-based methods frequently triggers an exponential explosion in computational complexity, rendering them ill-suited for the sub-second decision-making required by real-time spot markets [5,6]. Simultaneously, strategies like Robust Optimization tend to prioritize worst-case mitigation to such an extent that they become overly conservative, effectively sacrificing substantial market yields [7]. Compounding these issues is the non-convex nature of physical power flow constraints; traditional convex algorithms struggle to address these directly, while linearization approximations risk introducing physical deviations that jeopardize system safety [8].
Given the inherent latency and rigid model dependencies that constrain traditional optimization methods, Deep Reinforcement Learning (DRL) has emerged as a superior alternative. Leveraging its robust high-dimensional perception and model-free adaptive characteristics [9], DRL facilitates millisecond-level responses to stochastic fluctuations on both the supply and demand sides. Consequently, it has been extensively adopted across diverse domains, including frequency regulation [10], economic dispatch [11], energy management [12], and electricity trading [13]. Nevertheless, while DRL has undeniably established a new paradigm for intelligent VPP dispatching, the current body of literature tends to address technical challenges in isolation. There remains a notable scarcity of holistic solutions that simultaneously reconcile game-theoretic interactions, large-scale coordination, and systemic safety. More specifically, the practical deployment of existing approaches is currently hindered by three fundamental limitations:
- A prevalent limitation in the current literature is the oversimplification of market dynamics, where VPPs are typically modeled merely as price takers or assume market prices follow a static stochastic process [14]. For instance, while Lin et al. [15] successfully leveraged the DDPG algorithm to address scheduling in continuous action spaces, their approach overlooks the strategic role of the VPP as a “price maker” engaged in dynamic gaming with other market entities. This omission renders the strategy brittle, lacking the robustness required to survive against unknown competitors [16].
- In terms of coordination, standard Multi-Agent Reinforcement Learning (MARL) approaches frequently detach from the underlying physical grid topology. Jiang et al. [17], utilizing a Centralized Critic architecture, faced the “curse of dimensionality” when handling large-scale heterogeneous nodes, leading to an exponential explosion in state space. Conversely, Ye et al. [18] assumed an idealized fully connected communication topology in P2P trading. By neglecting the actual electrical connection constraints of the distribution network, such strategies become impractical for real-world engineering implementation.
- Balancing physical feasibility with optimal policy search remains a critical hurdle. Stanojev et al. [18] introduced a projection-based Safety Shield to enforce hard constraints; however, this mechanism effectively severs the gradient backpropagation flow. Consequently, it impedes exploration efficiency near boundary regions, making the agent prone to local optima. Alternatively, soft-penalty-based methods [19], while preserving gradient flow, struggle to strictly guarantee hard constraints and are highly sensitive to penalty coefficients, often leading to training instability and oscillation.
To address the fact that existing studies often improve market interaction modeling, topology-aware coordination, and safety handling in an isolated manner rather than within a unified framework, this paper proposes a Hierarchical Hybrid Intelligent Framework (H2IF) for VPP optimal dispatch. The main methodological contribution of this work is to integrate market competition modeling, topology-aware coordination, and risk-constrained safety control into a unified VPP-oriented dispatch framework. The main contributions of this paper are summarized as follows:
- A market-aware training mechanism is developed for price-maker VPP dispatch. Unlike conventional formulations that treat market prices as exogenous stochastic signals, the proposed method builds an adversarial market interaction environment and incorporates meta-learning-based adaptation across heterogeneous market styles and opponent behaviors.
- A topology-embedded multi-agent coordination method is constructed for large-scale resource scheduling. The proposed approach explicitly incorporates the physical grid connectivity into the multi-agent reinforcement learning process and combines graph attention with MADDPG to extract critical neighborhood information while reducing redundant global interactions.
- A risk-aware soft/hard constraint coordination mechanism is designed for VPP dispatch. To overcome the limitations of pure penalty-based safety handling and purely post hoc projection correction, the proposed framework jointly combines differentiable safety projection, Lagrangian-based constraint updates, and CVaR-based risk modeling under a unified objective.
- Case studies on the IEEE 33-bus system show that the proposed framework achieves a better balance among economy, safety, and robustness, indicating that the hierarchical coupling design is more effective than using these mechanisms separately. These results support the central claim of this work: for complex VPP dispatch problems, the main innovation arises from cross-layer integration and coordinated design, rather than from any single module alone.
2. Problem Formulation
The VPP operation framework is described in Section 2.1, while the preliminary knowledge of Markov decision processes and deep reinforcement learning is explained in Section 2.2 and Section 2.3, respectively.
2.1. VPP Operation Framework
A Virtual Power Plant (VPP) aggregates and coordinates Distributed Energy Resources (DERs), including photovoltaics, wind turbines, energy storage systems, flexible loads, and micro-turbines, to form a controllable virtual generation unit visible to the external grid [20,21].
As illustrated in Figure 1, the collaborative control of the power system typically adopts a three-tier hierarchical architecture: System Operator–Virtual Power Plant–Distributed Energy Resources. At the top level, the System Operator (SO) issues network-wide dispatch instructions. As the middle layer, the VPP receives these higher-level instructions, decomposes them, and optimizes the allocation of its internal resources. At the bottom layer, the DERs execute the instructions and report their operational status back. This architecture effectively achieves a high degree of integration between resource flexibility and system controllability [22].
Figure 1.
Hierarchical coordinated dispatch and state-feedback interaction framework of a Virtual Power Plant.
To characterize the dynamic response of DERs, we follow the modeling approach in [10]. Accounting for communication delays and device inertia, the dynamic response of an individual DER can be approximated by a first-order lag model:
In this formulation, denotes the actual power output of at time . It is decomposed into the day-ahead scheduled output and the incremental regulation command , such that . The term is the reference power command after a communication delay . The communication delay ranges from 10 to 200 ms depending on the communication method.
Physically, is the inertia time constant, ranging from 0.5 to 10 s. Specifically, it takes smaller values (approximately 1–2 s) for energy storage systems and larger values (approximately 5–10 s) for gas turbines. is the gain coefficient, which characterizes the tracking accuracy of the device; its practical value is approximately 0.85.
Each DER’s regulation range is jointly constrained by its current power, energy storage state, and rated capacity:
In this formulation, and demarcate the permissible operational corridor for power output, while and define the physical bounds of the energy state. The variable denotes the real-time residual energy, and restricts the maximum ramp rate. And is the scheduling time interval. is the reserve availability coefficient, which is set to 2 h. This ensures that a DER can continuously provide ancillary services for at least 2 h, consistent with the duration requirement for resource-sustained response in domestic frequency regulation ancillary service markets.
Turning specifically to Energy Storage Systems (ESS), their operation is governed by strict dual constraints concerning both power capability and capacity availability. To accurately capture the system dynamics, the temporal evolution of the State of Charge (SoC) incorporates factors such as self-discharge losses and conversion efficiencies. The state update logic is formulated as follows:
Here, quantifies the self-discharge rate, while and represent the charging and discharging efficiencies, respectively. Furthermore, to preserve battery health and mitigate the risks of detrimental over-charging or deep-discharging [23], the instantaneous SoC level and the associated power flows must rigorously satisfy the following safety boundaries at every time step :
VPPs realize their economic value by participating in electricity markets, primarily through the energy market and the ancillary service market. When a VPP acts as a price maker, its bidding strategy influences the Locational Marginal Price (LMP) through the market-clearing mechanism, thereby creating a non-cooperative game with other market participants [16].
This paper focuses on the strategic bidding and dispatch problem of VPPs operating as price-makers.
Formally, the total revenue function of the VPP, denoted as , is composed of the energy sales revenue , the ancillary service compensation , and the operational cost . The overarching objective is to maximize the expected cumulative discounted return, subject to all physical constraints:
In the performance-based regulation market, the VPP’s revenue also depends on the regulation mileage and the tracking accuracy coefficient :
Here, denotes the market-clearing price for mileage. The regulation mileage is quantified as the absolute variation in power commands between consecutive intervals, expressed as . Meanwhile, the tracking accuracy coefficient is inversely proportional to the tracking error, reflecting the market’s stringent requirement for regulation quality.
To ensure consistency between the performance evaluation metrics in the subsequent case study and the market settlement model described above, this paper further clarifies the tracking-related metrics. Let denote the system-level regulation reference power command issued by the higher-level dispatcher at time , and let denote the actual aggregated response power of the VPP. Then the instantaneous tracking error can be defined as . In the case study section, the average absolute tracking error over the dispatch period is adopted to evaluate tracking performance, expressed as:
The smaller this metric, the more accurately the VPP responds to AGC regulation commands, indicating higher tracking precision, which also implies better regulation quality in performance assessment and settlement. Furthermore, to characterize the power balancing capability of the VPP during dynamic dispatch, this paper further defines the power imbalance ratio as:
where is a small positive constant introduced to prevent division by zero. This metric reflects the relative deviation between the regulation reference value and the actual aggregated response; the smaller its value, the better the proposed method performs in terms of power tracking consistency and supply-demand matching capability.
2.2. Markov Decision Process
To mathematically formalize the sequential decision-making challenges inherent in such a complex and dynamic environment, we cast the VPP optimal scheduling problem as a Markov Decision Process (MDP). This framework is characterized by the tuple , defined as follows:
Within this quintuple, constitutes the global state space, encapsulating the entire spectrum of possible environmental conditions, while delimits the action space, representing the full set of feasible commands available to the VPP agent. The transition dynamics are governed by , where quantifies the probability of evolving to a new state after executing action in state . The function serves as the immediate feedback mechanism, evaluating the efficacy of an action. Furthermore, a discount factor is employed to strategically balance the trade-off between immediate gratification and long-term cumulative gains.
2.3. Deep Reinforcement Learning Problem
To navigate the high-dimensional solution space of VPP economic dispatch and resilience scheduling, we employ a Deep Reinforcement Learning (DRL) approach. The overarching objective is to discover an optimal stochastic policy (a mapping from observed states to a probability distribution over actions) that maximizes the expected cumulative discounted return:
Here, represents a sampled trajectory induced by policy . The constituent elements of the RL framework are defined as follows:
- State Space : Acknowledging the inherent challenge of Partial Observability (formalized as a POMDP) in grid-edge resources, the state vector is engineered to provide a comprehensive representation. It must simultaneously capture the VPP’s internal operational status, external market sentiments, and the physical grid conditions. Accordingly, we construct the composite state vector as [24]:
The internal state encompasses the power output, residual energy, day-ahead schedule, and regulation range of each DER aggregator; the market state includes the locational marginal price, higher-level regulation command, mileage price, and historical bidding data of competitors; the physical state comprises the network topology, node voltages, line power flows, and system net load.
- 2.
- Action Space : The primary function of the VPP agent is to disseminate precise power regulation instructions to downstream DER aggregators. To guarantee the physical feasibility of these actions while simultaneously reducing the complexity of the exploration space, we eschew direct power value generation in favor of a proportional dispatch mechanism. The agent generates a vector of normalized scaling factors, formalized as:
To decode the normalized action scalar back into the physical control domain, the actual regulation command for each aggregator is derived via a linear mapping:
Consequently, the final reference power command dispatched to aggregator is formulated as . This structural design normalizes the continuous action space and, crucially, implies that the generated commands inherently comply with the physical regulation limits of the DERs, eliminating the need for heuristic clipping.
- 3.
- Reward Function : The design of the reward function serves as the compass guiding the policy optimization process. To achieve a holistic trade-off among conflicting objectives (namely profitability, safety, tracking fidelity, and risk robustness), we formulate a multi-objective composite reward function:
In accordance with the hierarchical relationship of objectives in VPP dispatch—prioritizing safety, followed by tracking accuracy, and then economic performance—the weights of the reward function are set accordingly. Specifically, the safety penalty term is assigned the highest weight, the tracking error term the second highest, and the market revenue term serves as the baseline objective. The final weight combination is to balance cumulative revenue, tracking performance, and constraint violation rate.
The components are detailed as follows:
- Market Incentive : Encapsulates the revenue streams from both the Day-Ahead energy market and the Regulation Market , driving the agent to maximize economic value:
- Operational Cost Penalty : Penalizes operational expenditures to encourage efficiency, accounting for both the incremental operation cost and the mileage-degradation cost :
Therefore, the total operating cost within a single dispatch period can be further expressed as:
In the subsequent case study, this metric is adopted as one of the key evaluation indicators for assessing the economic performance of different dispatch strategies. The smaller this metric, the lower the operational cost incurred while meeting dispatch requirements, indicating better economic efficiency of the strategy.
Beyond economic metrics, the function integrates to incentivize high-fidelity tracking of upper-level dispatch signals, and to heavily penalize violations of grid safety constraints. Furthermore, a risk-averse term based on Conditional Value at Risk (CVaR) is introduced to mitigate yield volatility under extreme tail-risk scenarios, captures the deviation between realized and expected revenues, while provides a robust estimate of the Conditional Value at Risk at confidence level , effectively quantifying the downside risk associated with extreme market volatilities. (formulated in Equations (15)–(17)).
The tracking penalty coefficient is set to 0.5 to align the magnitude of the power deviation penalty with that of the revenue term (on the order of kW), thereby preventing any single term from dominating the training process.
Fundamentally, the VPP scheduling problem extends beyond standard optimization; it mathematically constitutes a Constrained Markov Decision Process (CMDP). This classification arises because the agent must maximize cumulative rewards while strictly adhering to a set of distinct physical constraints, such as power flow limits and voltage stability margins. Unlike standard MDPs where constraints are often softened into penalties, the CMDP framework rigorously demands that the optimization of the objective function occur within a feasible safety region. The problem is formally posed as follows:
Here, quantifies the magnitude of violation for the -th constraint at time , with representing the permissible tolerance threshold. This paper uniformly abstracts constraints such as device output limits, energy storage operational boundaries, and system security limits into a constraint set within the CMDP framework and characterizes them using violation quantities . When the corresponding constraint is satisfied, ; otherwise, takes the magnitude of the violation. Consequently, represents the discounted cumulative violation degree of the -th constraint under policy over the entire dispatch horizon. In the subsequent case study, the average constraint violation and constraint violation rate are further statistically computed based on this definition to evaluate the safety performance of different methods.
Directly solving CMDPs poses significant computational challenges for traditional methods. To overcome this, we leverage the principles of Safe Reinforcement Learning [25], employing the Lagrangian Relaxation technique to transmute the constrained optimization problem into an unconstrained dual formulation. We construct the Lagrangian objective function as follows:
where serve as the Lagrangian multipliers. Consequently, the original problem is reformulated as a min–max optimization game, seeking the saddle point :
Within the RL paradigm, the policy is parameterized by neural network weights , while the multipliers are treated as learnable dual variables. By engaging in an alternating primal-dual update scheme, the system iteratively optimizes the policy parameters against the multipliers, ensuring convergence to an optimal policy that strictly adheres to safety constraints.
3. Hierarchical Hybrid Intelligent Framework
To address the challenges of game-theoretic interactions, large-scale coordination, and system security in VPP dispatch, this paper proposes a Hierarchical Hybrid Intelligent Framework (H2IF) based on a vertically layered and horizontally coordinated design, and its overall architecture is shown in Figure 2.
Figure 2.
Hierarchical architecture of the proposed H2IF framework.
Vertically, H2IF is divided into three layers: the Market Game Layer, which handles non-stationary opponents and enhances policy generalization; the Topology Coordination Layer, which leverages Graph Attention Networks (GATs) to achieve efficient coordination of large-scale nodes; and the Security Constraint Layer, which implements hard physical constraint projection and soft financial risk control. Horizontally, these three layers are tightly coupled through bidirectional information and gradient flows, forming a cohesive, end-to-end trainable system [26,27].
3.1. Market-Aware Meta-Game Training Mechanism
In day-ahead and real-time electricity markets, multiple VPPs operate as independent, self-interested entities. Their competitive interaction creates a scenario best modeled as a Multi-Agent Partially Observable Stochastic Game (POSG). We formalize this market of participants using the tuple .
Here, denotes the local observation space for agent , derived from the global state via the observation mapping . The objective of agent i is to maximize its own long-term expected return, . Crucially, this return is subject to a reciprocal dependency: it is contingent not only on the agent’s own policy but also on the joint policies of all competitors.
This dependency introduces a fundamental difficulty: the strategies of competitors (e.g., rival aggregators or conventional gencos) evolve dynamically with the market environment. This creates an intrinsically non-stationary environment where traditional Reinforcement Learning (RL) algorithms often falter, tending to overfit to fixed opponent behaviors and lacking generalization capabilities [27,28].
To mitigate this, we engineer a specialized Adversarial Market Simulator designed to foster robust strategy generalization through meta-gaming. The simulator comprises three distinct modules:
- The Protagonist Agent: The target VPP model under training, whose policy aims to maximize its own profit.
- Adversarial Agents: A set of neural-network-controlled competitors whose policy has the opposite objective, i.e., minimizing the protagonist’s cumulative reward, thereby providing the most challenging adversarial training environment for the protagonist.
- Market-Clearing Model: A unified clearing engine that endogenously calculates Locational Marginal Prices (LMPs) and cleared quantities based on the bid curves of all VPPs and system demand.
Consequently, the training process is cast as a minimax optimization problem, where the protagonist policy and the adversary policy are co-trained under a zero-sum game-theoretic formulation:
To transcend the limitations of overfitting to specific adversaries and endow the VPP agent with robust generalization capabilities across unseen market dynamics, we integrate a Meta-Learning paradigm, specifically leveraging the Model-Agnostic Meta-Learning (MAML) framework. Fundamentally, this approach treats distinct market scenarios—characterized by varying load patterns and competitor aggressiveness—as separate learning tasks. The training objective undergoes a paradigm shift: rather than converging to a static, fixed policy, the agent learns a set of “sensitivity-primed” initial parameters. This specialized initialization allows for rapid adaptation—often requiring only a few gradient steps on limited historical data (few-shot learning)—to efficiently align with novel market styles [29].
Formally, we define a set of market tasks , where each task represents a distinct market scenario characterized by different opponent strategy distributions, load patterns, renewable energy penetration rates, and other parameters. Our goal is to learn a set of meta-initial parameters such that, for any new task sampled from the , the agent can quickly adapt from and achieve optimal performance.
To achieve this goal, we adopt a bilevel gradient optimization strategy, alternating between an inner loop and an outer loop during training.
Inner loop: For each sampled task , the protagonist agent performs several gradient updates on its policy parameters using a small batch of experience data collected under that task, obtaining task-specific adapted parameters :
The inner-loop learning rate of MAML is set to 0.01, ensuring rapid adaptation to new markets within a few gradient updates (typically 5–10 steps).
Outer loop: After completing the inner-loop adaptation, we evaluate the performance of the adapted policy on another independent query set of the same task. Then, based on the evaluation results across all sampled tasks, we update the meta-initial parameters so that, after one or a few inner-loop adaptation steps, the expected performance across all tasks is optimized:
In this way, the trained policy is no longer tailored to a specific scenario but instead learns a form of meta-knowledge—a policy initialization that can rapidly adapt to new market styles—thereby achieving stronger cross-scenario generalization capability and robustness.
3.2. Topology-Embedded Graph Attention Coordination Algorithm
A fundamental dilemma exists in multi-agent coordination: traditional centralized Reinforcement Learning (RL) is plagued by the “curse of dimensionality,” facing an exponential explosion of the action space as node counts rise. Conversely, fully decentralized approaches mitigate this but typically fail to account for the inherent spatial coupling of physical quantities, such as voltage and power flow, within the distribution network. To bridge this gap, we model the distribution network—comprising nodes (e.g., DER aggregators and loads)—as a weighted undirected graph, denoted as .
In this graph theoretic formulation, represents the set of nodes, where each node is associated with a feature vector encoding local states like power and voltage. The set denotes the edges, corresponding to physical electrical connections. The topology is mathematically structured via the adjacency matrix (where indicates connectivity), while the admittance matrix further quantifies the impedance characteristics of the lines.
To disentangle the complex nonlinear spatio-temporal couplings and facilitate efficient information fusion, we employ a Graph Attention Network (GAT) as the backbone graph encoder. This mechanism confers two distinct advantages: (1) While the adjacency matrix explicitly encodes the static electrical structure, the learnable attention coefficients implicitly infer the physical sensitivities between nodal voltage and power injections. This allows for the dynamic, weighted aggregation of critical neighbor information. (2) The GAT framework drastically reduces decision complexity from the prohibitive exponential scale of seen in centralized methods, to a manageable linear scale relative to the number of edges, [30]. This reduction unlocks superior scalability, enabling the algorithm to efficiently coordinate scenarios involving hundreds or thousands of DERs.
For the -th layer, the feature update mechanism for node adheres to a rigorous sequence of linear transformation and nonlinear aggregation. Initially, a globally shared learnable weight matrix is applied to project the raw node features into a high-dimensional latent space:
Subsequently, to quantify the physical coupling intensity between node and its neighbor , we compute the unnormalized attention coefficient . This coefficient is parameterized via a single-layer feedforward neural network and activated by a LeakyReLU function to capture nonlinear interactions:
Here, the symbol denotes the vector concatenation operation, and represents the learnable attention vector designed to decode interaction patterns. To imbue these coefficients with probabilistic significance and ensure numerical stability, a Softmax function is employed for normalization:
Finally, the aggregated feature representation for the next layer is synthesized by computing a weighted sum of neighbor features using the normalized attention scores , followed by a nonlinear activation . After stacking multiple GAT layers, the final output vector encodes rich, topology-aware semantic information:
To further enhance the expressive power of the model, the GAT network in this section adopts four attention heads, with a hidden dimension of 64 for each attention head.
Each attention head independently performs the computation process of Equations (28)–(31) to learn distinct feature subspace mappings. The output of all heads are concatenated as the final output of the layer. This multi-head design enables the model to capture the electrical coupling relationships among nodes from different perspectives, significantly improving the model’s capability to model complex grid dynamics.
It is crucial to highlight that the weighted aggregation process formulated in Equation (31) exhibits a striking physical isomorphism with the classical nodal power flow equations in power systems. In the AC power flow physical model, the injected power at node is essentially dictated by the voltage magnitudes and phase angles of its neighboring nodes, with the coupling strength rigorously defined by the admittance matrix . However, unlike traditional Graph Convolutional Networks (GCNs) that rely solely on the static topology information of , our GAT-based approach dynamically adapts the aggregation weights based on real-time system states.
In contrast, the attention coefficients learned by the GAT can be physically interpreted as data-driven voltage-power sensitivity factors. Due to the inherent nonlinearity of power systems, the sensitivity varies in real time with the operating point. By capturing the dynamic correlations between feature vectors and (which encode real-time voltage and power states), adaptively models this state-dependent physical coupling strength. Crucially, during critical scenarios such as heavy loading or impending voltage violations, the model automatically assigns higher weights to neighbors that are electrically tightly coupled or provide significant voltage support, thereby achieving physics-informed feature extraction.
Building upon this, we synergize the GAT encoder with the Multi-Agent Deep Deterministic Policy Gradient (MADDPG) algorithm. Consider a system with DER aggregator agents. Each agent is equipped with a private Actor network . The input space of this network comprises not only its local observation but also the GAT-encoded self-feature and the aggregated information from critical neighbors. The GAT-Aggregate function leverages the learned attention weights to filter and synthesize neighborhood data, generating the agent’s action as follows:
Simultaneously, each agent possesses a centralized Critic network . Adhering to the Centralized Training with Decentralized Execution (CTDE) paradigm, during training, the Critic’s input is augmented to include the joint actions , joint observations , and the global graph encoding. This design facilitates the learning of a -value that accounts for global coordination, formulated as:
Here, denotes the aggregated feature matrix output by the GAT across all nodes.
Following the Centralized Training with Decentralized Execution (CTDE) paradigm, the proposed framework adopts different information flow mechanisms during the training and execution phases.
During the training phase, each agent’s Critic network can access the local observations and actions of all agents, as well as the global graph encoding, enabling each agent to learn the global impact of joint actions. Meanwhile, the GAT encoder computes attention weights over the entire graph, allowing the Critic to perceive the key coupling relationships of the grid topology.
During the execution phase, each agent makes decisions relying solely on its own local observation, its GAT-encoded node features, and the aggregated information from its immediate neighbors. Since the GAT attention weights are fixed after training, neighbor information aggregation requires only local communication without global sharing, significantly reducing deployment complexity.
During the update phase, the Actor network for agent evolves by maximizing the expected -value estimated by the Critic, adhering to the Deterministic Policy Gradient theorem:
Simultaneously, the Critic network minimizes the Temporal Difference (TD) error, essentially optimizing the Bellman residual:
where and represent the parameters of the target networks, which are updated via a soft update mechanism to mitigate training oscillations and ensure stability.
In summary, the integration of GAT into the Graph-MADDPG framework delivers two pivotal advancements: (1) Complexity Reduction, where it drastically reduces the decision-making complexity from the prohibitive exponential scale associated with centralized Critics to a linear scale proportional to the number of nodes and edges, and (2) Topological Inductive Bias by explicitly encoding the grid topology as prior knowledge, the learned collaborative strategies are naturally aligned with electrical connection constraints, significantly enhancing engineering practicability.
3.3. Risk-Aware Soft/Hard Constraint Layer
Although the coordination layer generates optimized strategic actions, the raw outputs may still violate strictly enforced physical limits. To reconcile the pursuit of high financial returns with rigorous system safety, we engineer a “Dual Soft/Hard Constraint Mechanism” that permeates the entire training process, effectively decoupling physical feasibility from financial robustness.
For hard constraints that must be strictly satisfied, such as power limits and SOC boundaries, since soft reward penalties alone cannot guarantee safety, we design a differentiable projection layer that maps infeasible actions onto the feasible region while maintaining unobstructed gradient flow [31].
For a feasible region defined by inequality constraints , the projection optimization problem and its associated Lagrangian function are formulated as:
In accordance with the Karush–Kuhn–Tucker (KKT) optimality conditions, the optimal projection solution and the associated optimal Lagrangian multipliers must satisfy the following stationarity equations and complementary slackness conditions:
We employ an iterative numerical method to solve for online, iterating until the primal-dual residual is below a tolerance . The key lies in structuring this convex quadratic programming solution process as a differentiable computational graph. By differentiating the KKT conditions via the implicit function theorem, we obtain the Jacobian matrix of the projection mapping:
For linear constraints, where , the Jacobian reduces to the identity matrix , and the gradient can be backpropagated directly in an analytical form. For nonlinear constraints, the gradient approximation can be obtained by solving a linear system. This mechanism ensures that safety correction signals are backpropagated seamlessly to the upstream policy network, guiding the agent to generate actions that asymptotically approach the feasible region. Unlike heuristic clipping, which often severs gradient flow, this layer utilizes convex optimization duality to maintain gradient continuity, thereby encouraging the agent to actively and safely explore near the boundaries of the feasible set (e.g., at maximum power limits) [32].
Addressing soft constraints related to financial risks, such as severe revenue volatility, we incorporate Conditional Value at Risk (CVaR) into the learning objective. Defined as the conditional expectation of the tail of the loss distribution at a confidence level , CVaR offers a superior metric compared to variance for capturing tail risks under extreme market conditions. Under policy , the -CVaR of the stochastic return is formulated as:
Here, denotes the Value at Risk. To efficiently optimize CVaR within the Reinforcement Learning framework, we introduce a learnable auxiliary variable as a surrogate for VaR, optimizing the following variational objective:
Theoretically, it can be demonstrated that maximizing the auxiliary function is mathematically tantamount to maximizing the original . Consequently, we implement a joint gradient ascent scheme to synchronously update both the policy parameters and the risk surrogate variable :
Ultimately, the overarching training objective of H2IF is consolidated into a “Unified Lagrangian Objective Function.” This holistic formulation orchestrates the interplay between market revenues, operational costs, tracking fidelity, physical hard constraint penalties, and the CVaR-based financial risk metric:
Here, serves as the risk aversion parameter. The optimization proceeds via an iterative primal-dual update scheme, alternatingly adjusting the core variables using stochastic gradient ascent/descent:
- Policy : ;
- Multipliers : ;
- Risk Surrogate : .
The Lagrangian multipliers are initialized to 0, allowing the training to prioritize reward maximization in the early stage; the multiplier learning rate is set to to ensure synchronous updates of the primal and dual variables.
The operator denotes a projection ensuring the multipliers remain bound and non-negative. This cross-layer joint optimization mechanism empowers H2IF to explore high-yield strategies while autonomously reconciling physical feasibility with financial risk constraints, ultimately enabling the system to identify the optimal equilibrium between risk and return [33].
3.4. Two-Stage Training Paradigm
To strike an optimal balance between training efficiency and deployment safety, and to mitigate the “cold-start” problem inherent in DRL applications, we adopt a robust two-stage learning paradigm comprising “Offline Pre-training” followed by “Online Fine-tuning” (refer to [10,34] for implementation details).
- Phase I: Offline Pre-training via High-Fidelity Digital Twin: In this initial phase, the H2IF framework undergoes intensive training within a high-fidelity digital twin environment. The primary objective is to enable the Market Game, Topology Coordination, and Security Constraint modules to acquire preliminary policy distributions and constraint parameters. This process effectively provides “scaffolding” for the agent, establishing a “warm-start” initialization endowed with fundamental strategic intuition and physical safety awareness, thereby avoiding the risks associated with tabula rasa (scratch) learning.
- Phase II: Online Fine-tuning and Sim-to-Real Transfer: Upon deployment, the pre-trained policy is transferred to the physical VPP system for continuous, data-driven adaptation. Here, the policy networks evolve based on real-world interactive experience; safety multipliers dynamically adjust in response to actual operational constraints, and market bidding strategies refine themselves adaptively through live transaction interfaces.
To further guarantee stability and convergence, we integrate Prioritized Experience Replay (PER), Target Networks, and Entropy-Regularized Exploration mechanisms. This comprehensive mechanism significantly mitigates initial exploration risks in the physical system, achieving a safe and efficient Sim-to-Real policy transfer that bridges the inevitable reality gap.
To clearly present the overall training procedure of the proposed H2IF framework, the processes of market task sampling, topology-aware feature extraction, policy update, safety projection, and risk-constrained optimization are organized in a unified manner. The main steps of both offline pre-training and online fine-tuning are also included. The overall procedure is summarized in Algorithm 1.
| Algorithm 1 Training Procedure of the Proposed H2IF Framework |
| 1: Initialize , , , , the graph attention encoder, the replay buffer , the Lagrange multipliers , and the hyperparameters , , and . 2: for each offline pre-training iteration e = 1, 2, …, E do 3: Sample a batch of market tasks . Reset the environment and obtain o0 and G0. 4: Meta-game adaptation: perform task-wise interaction under the current market style and then aggregate task-wise gradients for the meta-update. 5: Topology encoding: compute the topology-aware representation by graph attention, and . 6: Action generation and safety projection: for each DER aggregator agent , generate , form the joint action , and obtain the safe action . 7: Environment interaction: submit the bids and regulation commands to the market-clearing module, execute in the environment, observe , , and the next state. 8: Critic update: minimize the Bellman residual, . 9: Actor update: update the actor by the deterministic policy gradient. . 10: Dual and risk update: optimize the unified Lagrangian objective. , and update the auxiliary variable in the varia- tional CVaR objective jointly with the policy. 11: Target-network update: softly update the target networks, and . 12: end for 13: Deploy the learned policy for online fine-tuning under the same safe-update mechanism. |
4. Case Study
This section comprehensively validates the effectiveness, safety, and robustness of the proposed H2IF framework for VPP economic dispatch via numerical simulations. The experiments specifically assess the strategic profitability under dynamic gaming environments and quantify the trade-off between risk and return through Pareto frontier analysis.
4.1. Simulation Setup
The proposed algorithm is implemented in Python3.12, underpinned by the PyTorch 3.10 deep learning framework. The simulation environment models a VPP aggregating heterogeneous resources on a standard IEEE 33-bus radial distribution system. To improve the transparency of the experimental setup, the detailed topology configuration and node-level DER allocation are illustrated in Figure 3. Specifically, the test system includes 5 photovoltaic (PV) units connected at buses 20, 13, 17, 25, and 33; 3 wind turbine (WT) units connected at buses 22, 18, and 32; 4 energy storage systems (ESS) connected at buses 2, 7, 14, and 28; and 2 dispatchable distributed generators (DGs) connected at buses 9 and 30. Based on the standard IEEE 33-bus feeder, these DERs are incorporated as additional controllable sources/storage units at the corresponding buses while preserving the radial network structure.
Figure 3.
IEEE 33-bus distribution network and node-level allocation of DERs in the VPP test system.
The generation profiles of PV and WT units are derived from the NREL public dataset, with 5% Gaussian white noise superimposed to simulate forecasting uncertainty. In addition, each ESS is modeled as a lithium-ion battery system rated at 1 MWh/250 kW with a round-trip efficiency of 95%. Load profiles are sourced from the annual historical load data of the Pennsylvania Electricity Market in 2023 and proportionally mapped to the corresponding load buses. Moreover, some system parameters and supporting data were provided by State Grid Sichuan Electric Power Company, Chengdu, China. Key algorithmic hyperparameters are tabulated in Table 1.
Table 1.
Algorithm hyperparameters.
To ground our simulation in real-world dynamics, we utilize historical Real-Time Locational Marginal Price (LMP) data from the Pennsylvania electricity market. However, simply using historical data is insufficient to capture the adversarial nature of spot markets. Therefore, we introduce specific perturbations within the market simulator: it employs an Ornstein–Uhlenbeck (OU) process to generate price fluctuations with mean-reverting properties, while simultaneously mimicking the irrational bidding behaviors of competitors. This setup allows us to construct a game-theoretic environment characterized by High Volatility.
To rigorously assess the model’s generalization capabilities, the annual dataset is partitioned into distinct training and testing subsets. We utilize data from 1 January to 30 September for model training and parameter updates; this period captures both the mild conditions of spring and the peak demand characteristic of summer. Conversely, the period from 1 October to 31 December serves as the test set. Crucially, this subset—which reflects load fluctuations driven by winter heating—remains completely unseen during the training phase, providing a robust validation of the model’s performance in unknown market environments. Beyond standard validation, we established four heterogeneous test scenarios with distinct statistical profiles to evaluate the framework’s robustness under complex conditions. These scenarios are designed to mirror the extreme environments a VPP might encounter in actual operation. As detailed in Table 2, we introduced differentiated settings across key dimensions, including average load demand, peak-valley difference, renewable energy penetration rates, and environmental stochastic volatility.
Table 2.
Features of different datasets.
Evaluation Metrics: To ensure a consistent and comparable performance assessment, the cumulative reward, power imbalance ratio, operational cost, constraint violation, and tracking error are adopted as the main evaluation metrics in the following case studies. Their corresponding definitions and formulations have been introduced in Section 2. Specifically, the cumulative reward is used to reflect the overall optimization effect and convergence behavior during training, while the power imbalance ratio, operational cost, constraint violation, and tracking error are employed to evaluate the balancing capability, economic efficiency, safety performance, and tracking accuracy of different methods, respectively. Except for the cumulative reward, lower values of the remaining metrics indicate better performance.
4.2. Effectiveness of the Proposed Algorithm
The comprehensive training performance of the proposed H2IF model across multi-scenario VPP economic dispatch tasks is visualized in Figure 4. This figure tracks the dynamic convergence characteristics of key metrics (reward accumulation, power imbalance, system operating costs, and constraint violations) under four distinct operational conditions: Benchmark, High-PV, High-Load, and High-Volatility scenarios. Specifically, the solid curves trace the mean values of these metrics for each training episode, whereas the shaded regions delineate the fluctuation range defined by the minimum and maximum values within the same episode. This visual distinction is critical as it serves to underscore not just the average performance, but the algorithm’s convergence stability and robustness against intra-episode stochasticity.
Figure 4.
Training process of the proposed H2IF model.
Observing the simulation trajectory, a clear trend emerges: as the training episodes progress, the H2IF model demonstrates rapid convergence and consistent performance optimization across all scenarios. From these results, we can infer that the proposed framework is highly effective in handling the complexities of VPP economic dispatch. Beyond mere stability, the model exhibits strong generalization capabilities under varying operational stresses, providing a reliable technical pathway for intelligent, collaborative dispatch in dynamic electricity markets.
To further corroborate the efficacy and physical feasibility of the proposed H2IF framework at the micro-dispatch level, Figure 5 details the dispatch profile of a VPP on a representative test day. The figure superimposes the day-ahead Locational Marginal Price (LMP), system load, and the stacked output of distributed resources.
Figure 5.
Typical daily dispatch profile of the VPP.
During the off-peak window (23:00–06:00)—when the grid operates at a load valley and LMPs are minimal—the agent adheres to a strict Merit Order. It prioritizes the absorption of zero-marginal-cost wind power and purchases grid electricity to satisfy demand while simultaneously charging the Energy Storage System (ESS). Based on this behavior, we can infer that the algorithm successfully anticipates the morning demand surge, leveraging current low prices to execute energy time-shifting, thereby reducing overall cycle costs.
Throughout the plateau and peak periods (07:00–22:00), specifically during the solar zenith (approx. 12:00–14:00), the ESS absorbs excess photovoltaic generation. This strategic move serves a dual purpose: it mitigates voltage violations caused by excessive reverse power flow, while “recharging” the system for high-profit intervals later in the day. Moreover, the observed Grid Export activity confirms the VPP’s capability to actively engage in market gaming as a Prosumer. As the system enters the evening peak (18:00–21:00)—where load and price synchronize at their daily maximums—the agent executes a hierarchical dispatch strategy. It prioritizes maximum ESS discharge to capitalize on price arbitrage, activating higher-cost gas turbines and diesel generators only when a deficit remains. This sequence, which aligns perfectly with the system’s marginal cost curve, optimizes economic returns while maintaining all units within their physical operational limits.
Collectively, these results demonstrate that the H2IF framework does more than simply maximize economic gain; it generates robust, physically interpretable strategies capable of navigating complex market and physical environments.
4.3. Comparative Analysis and Algorithm Superiority
To rigorously benchmark the performance superiority of the H2IF framework, we conducted comparative experiments against three established control strategies. To ensure a fair evaluation, all algorithms in this subsection were trained and tested using the consistent Baseline dataset. The specific baselines are detailed as follows:
H2IF: The novel framework proposed in this study.
MADDPG: A standard multi-agent collaborative strategy [35,36]. While this method adopts the “Centralized Training, Decentralized Execution” (CTDE) paradigm, it lacks the graph-structural awareness and attentional mechanisms integrated into our approach. Specifically, its Critic network relies on simple fully connected layers to process global information, and agent compliance with constraints is managed solely through reward penalty terms.
SAC: A centralized Soft Actor-Critic approach [37]. In contrast to the multi-agent frameworks, SAC treats the entire VPP aggregation as a single, centrally controlled agent. It incorporates an entropy maximization term to enhance exploration capability, serving as a representative baseline for centralized reinforcement learning.
Rule-based: A deterministic heuristic strategy serving as a non-learning benchmark [38]. This method operates on fixed, expert-defined logic—such as prioritizing charging during low-price periods and discharging during peaks. It enforces constraints through rigid rules (e.g., forced outages upon SOC violations) and possesses no adaptive learning capabilities.
To critically assess the generalization capabilities of H2IF and bridge the inevitable “sim-to-real” gap between the training simulator and actual market deployment, we introduced non-stationary stochastic perturbations into the environmental observations during the testing phase. Specifically, we employed a dual-noise injection strategy: First, uniform random noise with a magnitude of 10% was superimposed onto the market-clearing price signals, mirroring the price uncertainty often incurred by the irrational bidding behaviors of competitors. Second, to evaluate the model’s robustness against inherent prediction errors in renewable energy, we added 5% measurement noise to the forecasted data for distributed resources (PV and load).
The comparative performance of the four methods is visualized as follows: Figure 6 captures the training trajectory, with panels (a) and (b) detailing the evolution of system operating costs and safety constraint violations, respectively. Subsequently, the efficacy of these trained scheduling strategies within the testing environment is depicted in Figure 7, where sub-figures (a) and (b) illustrate the average cost per episode and the rate of constraint violations. For a comprehensive quantitative breakdown, Table 3 summarizes the performance metrics, comparing the average operating costs and constraint violations after training intervals of 24 × 60 and 24 × 300 steps.
Figure 6.
System operation costs and constraint violation of the training process in the training environment: (a) System operational costs in the training environment; (b) Constraint violation in the training environment.
Figure 7.
Average single-episode operation costs and constraint violation of the testing process in the testing environment: (a) System operational costs in the testing environment; (b) Constraint violation in the testing environment.
Table 3.
Quantitative comparisons of the four algorithms.
Based on a comparative analysis of system operating costs and safety constraint violations across both training and testing environments, we draw the following conclusions:
- H2IF consistently achieves the lowest operating costs across all stages. In the 24 × 300-step test scenario, H2IF limits the average cost to 38.23 k$, representing a substantial reduction of 28.9% compared to MADDPG (53.78 k$) and 40.4% compared to SAC (64.10 k$). Notably, even when compared to the expert-based Rule method (52.02 k$), H2IF still secures a cost saving of approximately 26.5%. This superior performance is largely attributable to the market-aware meta-game mechanism, which enables agents to transcend static rules and master complex arbitrage strategies, such as capacity time-shifting. Furthermore, the algorithm achieves near-optimal performance early in the 24 × 60-step phase, validating the efficient feature extraction and rapid convergence capabilities of Graph-MADDPG in handling large-scale nodal coordination.
- Regarding operational safety, H2IF strictly maintains constraint violations at a minimal level (ranging between 5.78 and 6.90 in the test set), significantly outperforming SAC (approx. 40) and MADDPG (15.63–23.17). This discrepancy highlights a fundamental limitation in baseline RL algorithms: relying solely on “soft penalties” within the reward function often leads to boundary breaches when pursuing high returns. In contrast, H2IF incorporates an embedded risk-aware constraint layer. By utilizing differentiable projection to enforce hard constraints and CVaR to mitigate soft risks, the framework ensures the highest level of physical safety while simultaneously achieving low operational costs that remain unattainable for the Rule-based method (which recorded 17.42 violations).
A comparison between the training set and the noise-injected test set reveals the strong generalization capability of H2IF. At 24 × 300 steps, H2IF demonstrates remarkable stability, with operating costs remaining consistent across both environments (39.40 k$ and 38.23 k$, respectively). Conversely, MADDPG exhibits signs of overfitting, with costs escalating from 45.39 k$ in training to 53.78 k$ in testing. This suggests that the adversarial training inherent in the meta-game mechanism effectively enhances the policy’s adaptability to market volatility and load uncertainty, successfully combining the stability of rule-based approaches with the flexibility of learning-based methods.
Figure 8 presents the violin plots superimposed with scatter points, visualizing the probability density estimation of total cumulative rewards across four heterogeneous test environments. The comparative analysis reveals three critical insights.
Figure 8.
Average cumulative rewards of different methods under four test scenarios.
Across all scenarios (Figure 8a–d), the Proposed Method (depicted in red) consistently anchors its probability density peaks at the highest reward intervals. The distinct “width” of the red violins at the upper quantiles indicates a high concentration of probability mass around the optimal solution. While RL-based baselines (SAC and MADDPG) generally outperform the Rule-based strategy, our method demonstrates a denser clustering of scatter points, suggesting that the hierarchical coordination mechanism effectively mitigates policy degradation in multi-agent environments, enabling stable convergence near the global optimum.
The morphological differences in the violin plots highlight distinct risk profiles, particularly under stress conditions. In the High Load Scenario (Figure 8c), the Rule-based strategy collapses into negative territory, exposing the fragility of deterministic rules under extreme supply-demand pressure. Conversely, in the High Volatility Scenario (Figure 8d), the SAC algorithm (green) exhibits a drastically elongated vertical shape, reflecting excessive variance and instability. In sharp contrast, our method maintains a compact, flat distribution with a minimal Interquartile Range (IQR). This “high-yield, low-variance” characteristic empirically validates the safety projection layer, which effectively truncates tail risks and confines the policy search within a safe, high-efficiency feasibility region.
A cross-scenario comparison underscores the framework’s robustness. As environmental uncertainty intensifies—transitioning from the Baseline (Figure 8a) to the High Volatility Scenario (Figure 8d)—the performance distribution of benchmark algorithms diverges significantly. However, the Proposed Method exhibits remarkable distributional consistency, maintaining its compact form regardless of photovoltaic penetration rates or price volatility. This invariance confirms the algorithm’s capability to adapt to dynamic source-load characteristics, satisfying the stringent reliability requirements for real-world VPP deployment.
4.4. Interpretability Analysis
While Deep Reinforcement Learning (DRL) has demonstrated superior performance in resolving complex VPP scheduling problems, its inherent “black-box” nature often obscures decision-making logic. This opacity creates a barrier to trust for grid operators, thereby hindering practical deployment in real-world power systems. To bridge this gap, our proposed Graph-MADDPG algorithm integrates a graph attention mechanism, effectively imparting topological awareness to the model. In this section, we dissect the internal decision-making mechanism by visually analyzing the learned attention weights, focusing on two critical dimensions: physical topological isomorphism and critical control path identification.
From a physical perspective, the electrical coupling strength between nodes in a distribution network is fundamentally governed by line admittance. Consequently, we posit that a physically cognitively capable agent should be able to implicitly learn and reconstruct these structural characteristics solely from interaction data, without relying on any prior knowledge of physical equations (i.e., in a model-free manner). To validate this hypothesis, Figure 9 illustrates the statistical correlation between the attention weights learned by the GAT network and the actual physical admittance magnitudes of the grid lines. To ensure spatial coverage and statistical significance, we collected attention distribution data from all 32 nodes in the test set. By sampling 150 continuous time steps for each node, we generated a comprehensive dataset comprising 4800 observational samples for this analysis.
Figure 9.
Correlation analysis between the learned attention weights and the physical admittance magnitudes. The color of the scatter points indicates the local sample density, with warmer colors representing denser sample distributions, while the dashed line denotes the fitted correlation trend.
Statistical analysis reveals a significant positive correlation between the learned attention weights and the physical admittance values (Pearson coefficient). The tight clustering of data points along the diagonal corroborates that the model has successfully internalized the physical reality that higher admittance implies stronger electrical coupling. This finding suggests that the Graph-MADDPG framework is not merely performing a stochastic search in a disordered high-dimensional space; rather, it has effectively learned a feature aggregation pattern that is structurally isomorphic to the underlying physical topology through gradient descent. Such “Implicit Physical Learning” underpins the policy’s intrinsic robustness against network parameter drift.
Beyond static topology alignment, the agents demonstrate the capacity to dynamically shift their focus in response to real-time operating conditions, particularly during critical instances of boundary violations. Figure 10 visualizes the spatial redistribution of the internal Attention Flow when a voltage violation occurs at the terminal node (Bus 18). The gradient of colors in the heatmap quantifies the intensity of information aggregation weights, highlighting how the network autonomously re-prioritizes information exchange to mitigate the violation.
Figure 10.
Visualization of attention flow forming a gradient focus path during a voltage violation event at Bus 18.
As visualized in Figure 10, during a voltage violation event, the model’s attention mechanism exhibits a distinct sparsity rather than a uniform distribution. A High-Attention Path spontaneously emerges, tracing a clear trajectory from the violation node (Bus 18) through the hub (Bus 3) back to the root substation. From the perspective of power system stability, this attention trajectory aligns precisely with the physical sensitivity propagation path of voltage with respect to active and reactive power. This suggests that the agent has implicitly learned to pinpoint critical control links required for voltage support, while effectively suppressing noise from irrelevant topological branches (e.g., Bus 22, 25, 33). Such decision-making logic, which mirrors the mechanics of traditional fault tracing and sensitivity analysis, provides compelling evidence of the interpretable physics-aware intelligence embedded within our proposed framework.
4.5. Ablation Study
To further verify the contribution of each key component in the proposed H2IF framework, an ablation study is conducted by removing different core modules while keeping the other training settings unchanged. Specifically, three ablated variants are constructed, including w/o GAT, w/o Meta-Game, and w/o Safety Projection. Their performance is then comprehensively evaluated from four aspects, namely economic performance, operating cost, safety, and tracking capability.
Figure 11 presents the score-based comparison between H2IF and its ablated variants across four evaluation metrics. Table 4 presents the corresponding specific values. Overall, the complete H2IF model achieves the best comprehensive performance, with Profit Score, Cost Score, Safety Score, and Tracking Score of 0.94, 0.92, 0.95, and 0.93, respectively, indicating clear complementary gains from the joint design of market-aware training, topology-embedded coordination, and safety-constrained optimization. In contrast, removing the GAT module leads to consistent degradation in all metrics, with the Safety Score and Tracking Score decreasing to 0.63 and 0.71, respectively, which highlights the contribution of topology-aware neighborhood aggregation to multi-resource coordination. When the Meta-Game mechanism is removed, the Profit Score declines to 0.80, suggesting that market-aware training contributes positively to revenue performance under complex market conditions. Furthermore, removing the Safety Projection layer causes the Safety Score to drop sharply to 0.24, while the Profit Score and Cost Score remain at 0.87 and 0.88, respectively, demonstrating that this module is essential for maintaining operational safety constraints.
Figure 11.
Score-Based Ablation Comparison of the Proposed H2IF Framework.
Table 4.
Ablation Results of the Proposed H2IF Framework.
4.6. Sensitivity Analysis of Multi-Objective Reward Weights
To further evaluate the robustness of the reward design, a sensitivity analysis is conducted on the five weighting coefficients in the multi-objective reward function, namely the market reward weight , cost penalty weight , tracking weight , safety penalty weight , and risk weight . These coefficients, respectively, determine the relative emphasis of economic return, operational cost control, tracking quality, physical safety, and risk aversion in the proposed H2IF framework.
As shown in Figure 12, the horizontal axis in each subplot denotes the multiplier applied to the corresponding baseline reward weight, while the vertical axis represents the relative performance variation under that weight perturbation. The curves report the responses of total profit, tracking error, and violation rate to different reward-weight settings. Overall, changing different weights shifts the policy preference toward the associated objective, but the variation remains moderate around the baseline setting. In particular, increasing improves economic return, increasing enhances tracking performance, and increasing or helps reduce violation-related risk, whereas a larger leads to a more conservative dispatch policy. These results indicate that the proposed H2IF does not rely on a narrowly tuned reward configuration and maintains satisfactory robustness under moderate reward-weight perturbations.
Figure 12.
Sensitivity analysis of H2IF performance under variations in multi-objective reward weights.
4.7. Scalability Analysis
To further verify the scalability of the proposed H2IF framework, additional experiments were conducted on power systems of different scales, including the 9-bus, 33-bus, 57-bus, and 118-bus test systems. The corresponding results are summarized in Table 5.
Table 5.
Scalability evaluation of H2IF on test systems of different scales.
As shown in Table 5, as the system scale increases, the required training steps grow moderately from 1.8 × 105 to 2.5 × 105, indicating that the computational burden remains manageable. Meanwhile, the average operating cost, constraint violation rate, and tracking error exhibit only gradual increases with network size. Specifically, the operating cost rises from 31.47 k$ in the 9-bus system to 52.14 k$ in the 118-bus system, while the constraint violation rate remains below 3.0% and the tracking error stays within 0.055 p.u. for all test systems. These results indicate that H2IF can preserve satisfactory economic performance, safety, and tracking capability under increasing system scale, thereby demonstrating good scalability for larger VPP dispatch applications.
5. Conclusions
This paper proposes a Hierarchical Hybrid Intelligence Framework (H2IF) designed to effectively resolve the persistent challenge of balancing economic efficiency, system safety, and scalability in VPP dispatch. By employing a “vertical decoupling, horizontal coordination” architecture, H2IF harmonizes the inherent conflicts found in complex, dynamic power markets. The primary contributions and conclusions are summarized as follows:
- Market-Aware Meta-Game Mechanism: By integrating adversarial training with meta-learning, this mechanism enables agents to effectively assimilate the dynamic strategy patterns of competitors. Crucially, it transcends the limitations of traditional algorithms that tend to overfit static environments, thereby significantly enhancing the policy’s generalization robustness and bidding advantages in unobserved, high-volatility markets.
- Graph-MADDPG Algorithm: We leverage Graph Attention Networks (GATs) to embed the physical grid topology directly into the deep reinforcement learning framework. By dynamically aggregating critical neighborhood information, the algorithm improves coordination scalability by exploiting sparse topology-aware neighborhood interactions instead of dense global information exchange. This not only overcomes the coordination bottleneck associated with large-scale heterogeneous resources but also endows the model with an implicit physical awareness of electrical connections.
- Risk-Aware Dual-Constraint Mechanism: The proposed framework improves dispatch safety and robustness while maintaining economic performance through the coordinated use of differentiable safety projection, Lagrangian-based constraint optimization, and CVaR-based risk control. In particular, the safety projection mechanism maps infeasible actions back to the feasible region before execution, thereby explicitly enforcing key hard constraints and effectively reducing long-term constraint violations and extreme revenue fluctuations.
Despite the promising results, several limitations of this study should be acknowledged. First, the current validation is mainly conducted on a IEEE 33-bus system with specific DER compositions and market settings. Although additional scalability tests on 9-bus, 57-bus, and 118-bus systems demonstrate the potential of the proposed framework under increasing network scales, these settings still cannot fully capture the operational complexity of real-world VPPs. Second, some practical factors, including measurement noise, parameter uncertainty, and cyber-physical disturbances, are not explicitly incorporated into the present simulation framework. Third, the proposed method has not yet been comprehensively verified under broader market mechanisms, more diverse DER portfolios, or deployment-oriented environments such as hardware-in-the-loop and field-level conditions.
Future work will focus on extending this framework to more complex Peer-to-Peer (P2P) distributed energy trading scenarios. Additionally, we aim to validate the algorithm’s real-time responsiveness under realistic communication latencies and measurement noise through Hardware-in-the-Loop (HIL) experiments, thereby bridging the gap between theoretical simulation and practical deployment in real-world power systems.
Author Contributions
Conceptualization, Y.X. and L.H.; methodology, Y.X. and Y.H.; software, X.D.; validation, L.L., Y.H. and W.P.; formal analysis, X.H.; investigation, Z.L. (Zhuoyang Liu); resources, Z.L. (Ziming Liu); data curation, Z.C.; writing—original draft preparation, Y.X., L.L. and X.D.; writing—review and editing, X.D. and Z.C.; visualization, L.L. and Z.L. (Ziming Liu); supervision, Y.H.; project administration, L.H.; funding acquisition, L.H. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the Science and Technology Project of the State Grid Sichuan Electric Power Company, grant number 521996250002.
Data Availability Statement
The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.
Conflicts of Interest
Authors Yueping Xiang, Luoyi Li and Yanqiu Hou were employed by the State Grid Sichuan Electric Power Company Economic and Technological Research Institute. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
References
- Gao, H.; Jin, T.; Feng, C.; Li, C.; Chen, Q.; Kang, C. Review of virtual power plant operations: Resource coordination and multidimensional interaction. Appl. Energy 2024, 357, 122284. [Google Scholar] [CrossRef] [Scilit]
- Naughton, J.; Wang, H.; Cantoni, M.; Mancarella, P. Co-optimizing virtual power plant services under uncertainty: A robust scheduling and receding horizon dispatch approach. IEEE Trans. Power Syst. 2021, 36, 3960–3972. [Google Scholar] [CrossRef] [Scilit]
- Gao, Y.; Li, S.; Xu, T.; Lakshminarayana, S.; Bu, S.; Gu, C.; Ai, Q. Distributed Model Predictive Control Strategy for Multi-energy Virtual Power Plant Based on Digital Twin. IEEE Trans. Smart Grid 2025, in press. [Google Scholar] [CrossRef] [Scilit]
- Hou, L.; Yi, Z.; Xu, Y.; Wu, Y. Robust Economic Dispatch Approach for the Multi-Energy Virtual Power Plant Considering Multiple Uncertainties. IEEE Trans. Ind. Appl. 2025, 61, 5338–5349. [Google Scholar] [CrossRef] [Scilit]
- Chen, X.; Qu, G.; Tang, Y.; Low, S.; Li, N. Reinforcement Learning for Selective Key Applications in Power Systems: Recent Advances and Future Challenges. IEEE Trans. Smart Grid 2022, 13, 2935–2958. [Google Scholar] [CrossRef] [Scilit]
- Qiu, D.; Chen, T.; Strbac, G.; Bu, S. Coordination for Multienergy Microgrids Using Multiagent Reinforcement Learning. IEEE Trans. Ind. Inform. 2023, 19, 5689–5700. [Google Scholar] [CrossRef] [Scilit]
- Stanojev, O.; Mitridati, L.; Prata, R.d.N.D.; Hug, G. Safe Reinforcement Learning for Strategic Bidding of Virtual Power Plants in Day-Ahead Markets. In Proceedings of the 2023 IEEE International Conference on Communications, Control, and Computing Technologies for Smart Grids (SmartGridComm), Glasgow, UK, 31 October–3 November 2023; pp. 1–7. [Google Scholar]
- Al-Tawaha, A.; Cibaku, E.; Park, S.; Lavaei, J.; Jin, M. Distributed Optimization and Distributed Learning: A Paradigm Shift for Power Systems. IEEE Syst. J. 2025, in press. [Google Scholar] [CrossRef] [Scilit]
- Su, T.; Zhao, J.; Yao, Y.; Selim, A.; Ding, F. Safe Reinforcement Learning-Based Transient Stability Control for Islanded Microgrids with Topology Reconfiguration. IEEE Trans. Smart Grid 2025, 16, 3432–3444. [Google Scholar] [CrossRef] [Scilit]
- Yi, Z.; Xu, Y.; Wang, X.; Gu, W.; Sun, H.; Wu, Q.; Wu, C. An Improved Two-Stage Deep Reinforcement Learning Approach for Regulation Service Disaggregation in a Virtual Power Plant. IEEE Trans. Smart Grid 2022, 13, 2844–2858. [Google Scholar] [CrossRef] [Scilit]
- Lin, L.; Guan, X.; Peng, Y.; Wang, N.; Maharjan, S.; Ohtsuki, T. Deep reinforcement learning for economic dispatch of virtual power plant in internet of energy. IEEE Internet Things J. 2020, 7, 6288–6301. [Google Scholar] [CrossRef] [Scilit]
- Zhang, F.; Yang, Q.; Li, D. A Deep Reinforcement Learning-Based Bidding Strategy for Participants in a Peer-to-Peer Energy Trading Scenario. Front. Energy Res. 2022, 10, 1017438. [Google Scholar] [CrossRef] [Scilit]
- Ye, Y.; Tang, Y.; Wang, H.; Zhang, X.P.; Strbac, G. A scalable privacy-preserving multi-agent deep reinforcement learning approach for large-scale peer-to-peer transactive energy trading. IEEE Trans. Smart Grid 2021, 12, 5185–5200. [Google Scholar] [CrossRef] [Scilit]
- Jiang, Y.; Dong, J.; Huang, H. Optimal bidding strategy for the price-maker virtual power plant in the day-ahead market based on multi-agent twin delayed deep deterministic policy gradient algorithm. Energy 2024, 306, 132456. [Google Scholar] [CrossRef] [Scilit]
- Fang, D.; Guan, X.; Hu, B.; Peng, Y.; Chen, M.; Hwang, K. Deep Reinforcement Learning for Scenario-Based Robust Economic Dispatch Strategy in Internet of Energy. IEEE Internet Things J. 2021, 8, 9654–9663. [Google Scholar] [CrossRef] [Scilit]
- Cheng, L.; Wei, X.; Li, M.; Tan, C.; Yin, M.; Shen, T.; Zou, T. Integrating Evolutionary Game-Theoretical Methods and Deep Reinforcement Learning for Adaptive Strategy Optimization in User-Side Electricity Markets: A Comprehensive Review. Mathematics 2024, 12, 3241. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y.; Qiu, J.; Tao, Y.; Zhao, J. Deep Reinforcement Learning for Competitive DER Pricing Problem of Virtual Power Plants. IEEE Trans. Smart Grid 2021, 12, 5185–5200. [Google Scholar]
- Hao, G.; Li, Y.; Li, Y.; Jiang, L.; Zeng, Z. Lyapunov-Based Safe Reinforcement Learning for Microgrid Energy Management. IEEE Trans. Neural Netw. Learn. Syst. 2025, 36, 9985–9999. [Google Scholar] [CrossRef] [Scilit]
- Yu, P.; Zhang, H.; Song, Y.; Wang, Z.; Dong, H.; Ji, L. Safe reinforcement learning for power system control: A review. Renew. Sustain. Energy Rev. 2025, in press. [Google Scholar] [CrossRef] [Scilit]
- Yang, Q.; Simão, T.D.; Tindemans, S.H.; Spaan, M.T.J. Safety-constrained reinforcement learning with a distributional safety critic. Mach. Learn. 2023, 112, 859–887. [Google Scholar] [CrossRef] [Scilit]
- Jacob, R.A.; Paul, S.; Chowdhury, S.; Gel, Y.R.; Zhang, J. Real-time outage management in active distribution networks using reinforcement learning over graphs. Nat. Commun. 2024, 15, 4766. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y.; Fu, W.; Wang, J.; Zhen, Z.; Wang, F. Ultra-short-term distributed PV power forecasting for virtual power plant considering data-scarce scenarios. Appl. Energy 2024, 373, 123890. [Google Scholar] [CrossRef] [Scilit]
- Kiasari, M.; Aly, H.H. A proposed controller for real-time management of electrical vehicle battery fleet with MATLAB/SIMULINK. J. Energy Storage 2024, 84, 110750. [Google Scholar] [CrossRef] [Scilit]
- Guo, J.; Dou, C.; Yue, D.; Zhang, Z. Utilizing virtual power plants to support main grid for frequency regulation. Electr. Power Syst. Res. 2024, 229, 110115. [Google Scholar] [CrossRef] [Scilit]
- Yi, Z.; Xu, Y.; Wu, C. Model-Free Economic Dispatch for Virtual Power Plants: An Adversarial Safe Reinforcement Learning Approach. IEEE Trans. Power Syst. 2024, 39, 3153–3168. [Google Scholar] [CrossRef] [Scilit]
- Bao, Z.; Yu, S.; Tang, C. Optimal dispatch strategy of virtual power plants with asymmetric information based on multi-agent deep reinforcement learning. Electr. Power Syst. Res. 2026, 254, 112580. [Google Scholar] [CrossRef] [Scilit]
- Renshaw-Whitman, C.; Zobernig, V.; Cremer, J.L.; de Vries, L. Non-stationarity in multiagent reinforcement learning in electricity market simulation. Electr. Power Syst. Res. 2024, 235, 110712. [Google Scholar] [CrossRef] [Scilit]
- Jin, X.; Li, K.; Jia, Q. Constrained reinforcement learning with statewise projection: A control barrier function approach. Sci. China Inf. Sci. 2024, 67, 132202. [Google Scholar] [CrossRef] [Scilit]
- Huang, R.; Chen, Y.; Yin, T.; Huang, Q.; Tan, J.; Yu, W.; Li, X.; Li, A.; Du, Y. Learning and Fast Adaptation for Grid Emergency Control via Deep Meta Reinforcement Learning. IEEE Trans. Power Syst. 2022, 37, 4168–4178. [Google Scholar] [CrossRef] [Scilit]
- Hu, Y.; Fu, J.; Wen, G. Graph Soft Actor–Critic Reinforcement Learning for Large-Scale Distributed Multirobot Coordination. IEEE Trans. Neural Netw. Learn. Syst. 2025, 36, 665–676. [Google Scholar] [CrossRef] [Scilit]
- Harder, N.; Qussous, R.; Weidlich, A. Fit for purpose: Modeling wholesale electricity markets realistically with multi-agent deep reinforcement learning. Energy AI 2023, 14, 100295. [Google Scholar] [CrossRef] [Scilit]
- Ye, Y.; Wang, H.; Chen, P.; Tang, Y.; Strbac, G. Safe Deep Reinforcement Learning for Microgrid Energy Management in Distribution Networks with Leveraged Spatial–Temporal Perception. IEEE Trans. Smart Grid 2023, 14, 3759–3775. [Google Scholar] [CrossRef] [Scilit]
- Hu, B.; Gong, Y.; Liang, X.; Chung, C.Y.; Noble, B.F.; Poelzer, G. Safe Deep Reinforcement Learning-Based Real-Time Multi-Energy Management in Combined Heat and Power Microgrids. IEEE Access 2024, 12, 193581–193593. [Google Scholar] [CrossRef] [Scilit]
- Rafailov, R.; Hatch, K.; Kolev, V.; Martin, J.D.; Phielipp, M.; Finn, C. MOTO: Offline Pre-training to Online Fine-tuning for Model-based Robot Learning. In Proceedings of the 7th Conference on Robot Learning (CoRL), Atlanta, GA, USA, 6–9 November 2023; Volume 229, pp. 3654–3671. [Google Scholar]
- Sanayha, M.; Vateekul, P. Model-Based Approach on Multi-Agent Deep Reinforcement Learning with Multiple Clusters for Peer-To-Peer Energy Trading. IEEE Access 2022, 10, 127882–127893. [Google Scholar] [CrossRef] [Scilit]
- Wang, H.; Li, J.; Wang, G. Multi-agent Deep Reinforcement Learning-based Method for Active Distribution Network Optimal Power Flow. In Proceedings of the 2024 IEEE 8th Conference on Energy Internet and Energy System Integration (EI2), Shenyang, China, 29 November–2 December 2024; pp. 3941–3946. [Google Scholar]
- Alonso, M.; Amaris, H.; Moreno, M.A.; Abdollahi, F.; Gauchia, L. A Soft Actor-Critic Approach for Energy Management in Microgrids. In ICT for Intelligent Systems; Choudrie, J., Tuba, E., Eds.; Springer: Singapore, 2026. [Google Scholar]
- Sun, C.; Joos, G.; Ali, S.Q.; Paquin, J.N.; Rangel, C.M.; Al Jajeh, F.; Novickij, I.; Bouffard, F. Design and Real-Time Implementation of a Centralized Microgrid Control System with Rule-Based Dispatch and Seamless Transition Function. IEEE Trans. Ind. Appl. 2020, 56, 3168–3177. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Published by MDPI on behalf of the World Electric Vehicle Association. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.











