A monthly power supply and demand balance analysis method for regional interconnected power grids based on an electric hydrogen virtual energy pool

By constructing an electric hydrogen virtual energy pool and a multi-agent security reinforcement learning framework, the problem of insufficient system-level support capability for hydrogen energy resources in regional interconnected power grids has been solved, enabling efficient power supply and demand balance analysis and cross-provincial collaborative decision-making, thereby improving the utilization efficiency of hydrogen energy resources and the stability of supply and demand balance.

CN123184014APending Publication Date: 2026-11-27CHONGQING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611246378.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In the existing monthly power supply and demand balance analysis of regional interconnected power grids, the system-level support capability of hydrogen energy resources is not sufficiently characterized, making it difficult to meet the balance support needs of multiple entities, multiple regions, and multiple time scales. Furthermore, multi-agent learning cannot guarantee the executability of the analysis results when the internal state of the hydrogen energy system cannot be fully observed.

Method used

The method based on the electric hydrogen virtual energy pool is adopted. By aggregating hydrogen energy production, storage, transportation and utilization resources into the electric hydrogen virtual energy pool, a feasible domain boundary optimization search model is established. The hydrogen energy support actions are checked and corrected using a multi-agent safety reinforcement learning framework to generate the final execution action, thereby realizing the parameterized representation and safety constraints of the electric hydrogen virtual energy pool boundary.

Benefits of technology

It enables aggregate modeling and boundary quantization under conditions where the internal state of the hydrogen energy system is not visible, improves the efficiency of hydrogen energy resource utilization and cross-provincial collaborative balancing capabilities of regional interconnected power grids, reduces the risk of supply and demand imbalance, and supports the high-proportion consumption of new energy and the low-carbon transformation of energy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123184014A_ABST
    Figure CN123184014A_ABST
Patent Text Reader

Abstract

The application discloses a regional interconnected power grid monthly power supply and demand balance analysis method based on an electric hydrogen virtual energy pool. First, regional interconnected power grid monthly supply and demand balance analysis data and hydrogen energy system operation data are obtained; the electric hydrogen coupling node of the regional interconnected power grid is taken as an energy interaction port, and hydrogen energy production, storage, transportation and use resources are aggregated into an electric hydrogen virtual energy pool; secondly, the electric hydrogen virtual energy pool port equivalent injection power is divided, and an electric hydrogen virtual energy pool feasible region boundary optimization search model is established; a point-by-point simulation method is used to generate boundary point samples, and a boundary solver is used to parameterize the feasible region boundary; then, the parameterized feasible region boundary is taken as a safety layer of a multi-agent safety reinforcement learning framework, hydrogen energy support actions generated by each provincial power grid agent are checked for feasibility and corrected for boundary crossing, and final execution actions are generated; finally, the regional interconnected power grid monthly power supply and demand balance analysis is carried out based on the final execution actions.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of monthly power supply and demand balance analysis of regional interconnected power grids, specifically a method for monthly power supply and demand balance analysis of regional interconnected power grids based on an electric hydrogen virtual energy pool. Background Technology

[0002] Current monthly power supply and demand balance analyses of regional interconnected power grids typically focus on conventional generating units, renewable energy output, load demand, and inter-provincial transmission lines, failing to adequately characterize the system-level support capabilities for widely distributed hydrogen energy resources. Directly performing detailed modeling of the internal equipment, processes, and operational constraints of each hydrogen-related entity presents challenges such as high model dimensionality, strong nonlinearity, complex temporal coupling, significant information barriers among entities, and difficulties in online computation. Furthermore, simply equating hydrogen energy resources to fixed power or simple flexibility ranges fails to reflect their true feasible boundaries across all operational scenarios, including supply support, consumption support, and complementary balance.

[0003] Existing research focuses more on the flexible regulation characteristics of single hydrogen energy entities or localized hydrogen-electric systems, which is insufficient to meet the needs of regional interconnected power grids for the coordinated quantification of balance support capabilities across multiple entities, regions, and time scales. Although small-scale, decentralized, and multi-entity hydrogen-based energy resources are considerable in total, they suffer from problems such as difficulty in centralized control, lack of complete transparency in operational information, resource dispersion and retention, and insufficient utilization of regulation capabilities. This makes it difficult to transform their micro-level energy supply effects into macro-level balance support capabilities for regional interconnected power grids.

[0004] On the other hand, while multi-agent security reinforcement learning can handle collaborative decision-making problems among multiple provincial power grids in regionally interconnected power grids, its actions are prone to physical boundary violations when the internal state of the hydrogen energy system is not fully observable, the feasible domain boundary is high-dimensional and time-varying, and difficult to explicitly analyze. Without a security boundary characterizing hydrogen aggregation support capabilities, multi-agent policy learning, while potentially yielding high returns, struggles to guarantee the executability of monthly supply-demand balance analysis results in actual electro-hydrogen coupling systems. Summary of the Invention

[0005] The purpose of this invention is to provide a method for monthly power supply and demand balance analysis of regional interconnected power grids based on an electric hydrogen virtual energy pool, comprising the following steps:

[0006] Step 1) Obtain monthly supply and demand balance analysis data of the regional interconnected power grid and hydrogen energy system operation data;

[0007] Step 2) Based on the monthly supply and demand balance analysis data of the regional interconnected power grid and the operation data of the hydrogen energy system, the hydrogen production, storage, transmission and utilization resources are aggregated into a virtual energy pool using the electric-hydrogen coupling nodes of the regional interconnected power grid as energy interaction ports.

[0008] Step 3) Divide the equivalent injection power at the port of the electric hydrogen virtual energy pool into target observation variables and conditional observation variables, and establish a feasible domain boundary optimization search model for the electric hydrogen virtual energy pool;

[0009] Step 4) Generate boundary point samples of the feasible region boundary optimization search model using the point-by-point simulation method, and use a boundary solver driven by data and model hybridization to parameterize the feasible region boundary.

[0010] Step 5) The parameterized feasible domain boundary is used as the security layer of the multi-agent security reinforcement learning framework. Feasibility verification and boundary correction are performed on the hydrogen energy support actions generated by each provincial power grid agent to generate the final execution action.

[0011] Step 6) Based on the final execution action, conduct a monthly power supply and demand balance analysis of the regional interconnected power grid to obtain the monthly supply and demand balance analysis results.

[0012] Furthermore, in step 2), the feasible space for supporting the electric hydrogen virtual energy pool is as follows:

[0013] (1)

[0014] In the formula, The equivalent injected power vector for the port of the hydrogen virtual energy pool; n is the provincial power grid number; t is the monthly time-series production simulation period; Let n be the variable for the operation decision of the provincial power grid system; Let n be the operating variables of the hydrogen energy system of the nth provincial power grid; Let n be the discrete operating state variable of the provincial power grid; For the power exchange of inter-provincial connecting lines; For uncertainties in new energy sources and load; , , , , , These are the coefficient matrices for the corresponding variables, and e is the coefficient vector. For the set of nonlinear inequalities constraint for regional interconnected power grids, Let N be the set of provincial power grids, and N be the number of provincial power grids. This is a topological correlation matrix for the interconnection of provincial power grids;

[0015] The equivalent injection power of the nth provincial power grid's hydrogen virtual energy pool port is shown below:

[0016] (2)

[0017] In the formula, This represents the set of hydrogen-to-electricity conversion equipment within the nth provincial power grid. This represents the set of electricity-to-hydrogen conversion devices within the nth provincial power grid. The output power of the hydrogen-to-electricity conversion equipment; The power consumption of the electro-hydrogen conversion equipment.

[0018] Furthermore, in step 3), the feasible domain boundary optimization search model for the electric hydrogen virtual energy pool is as follows:

[0019] (3)

[0020] In the formula, The target observation variable is the virtual injected power of the provincial power grid to be searched for boundary values; These are the conditional observation variables formed by the remaining provincial power grid ports; The given values ​​for the conditional observed variables.

[0021] Furthermore, in step 4), the data structure for the boundary point samples is as follows:

[0022] (4)

[0023] In the formula, In hydrogen storage state, Hydrogen loading, , These are the upper and lower limits of the unit capacity, respectively. For electrical load, Contribute to new energy;

[0024] Furthermore, the boundary solver includes an attention mechanism layer, a convolutional layer, and a fully connected layer;

[0025] The matching weight matrix output by the attention mechanism layer is shown below:

[0026] (5)

[0027] In the formula, softmax is the normalization function; q is the data input matrix of the attention mechanism; W is the weight matrix; The dimension of the weight matrix;

[0028] The feature matrix output by the convolutional layer is shown below:

[0029] (6)

[0030] In the formula, R is the convolution weight parameter matrix; f is the activation function; and b is the bias parameter. It is the convolution operator;

[0031] The parameterized feasible region boundary output by the fully connected layer is shown below:

[0032] (7)

[0033] In the formula, This is the weight matrix of the fully connected layer. This is the bias column vector for the fully connected layer.

[0034] Furthermore, the boundary solver was trained on historical datasets with the training objective of minimizing the loss function;

[0035] The loss function is shown below:

[0036] (8)

[0037] In the formula, MSE is the mean squared error function; Label is the boundary point sample label; For mathematical expectation; The regularization factor constrains the hydrogen virtual energy pool model; The weight coefficients of the data-driven loss term and the model-driven loss term are respectively determined.

[0038] Furthermore, in step 5), the joint observation space in the multi-agent security reinforcement learning framework expands the boundary state of the hydrogen virtual energy pool based on the local observation state of each provincial power grid;

[0039] The local observation status of each provincial power grid intelligent agent is shown below:

[0040] (9)

[0041] In the formula, This represents the local observation state of the nth provincial power grid intelligent agent at time t. The boundary state of the feasible domain of the electric hydrogen virtual energy pool is obtained by parameterization of the boundary solver; For boundary solver network parameters;

[0042] The hydrogen energy support actions generated by the smart grid agents of each province include unit start-up and shutdown decisions and hydrogen energy support injection power at the port of the electric hydrogen virtual energy pool;

[0043] The original actions of each provincial power grid intelligent agent are as follows:

[0044] (10)

[0045] In the formula, The unit start-up and shutdown decision at time t; The hydrogen energy support action at time t is the virtual port of the hydrogen energy system.

[0046] The final action is as follows:

[0047] (11)

[0048] In the formula, Projection operator for the safety layer of the hydrogen virtual energy pool; The original hydrogen energy support action vectors generated for each provincial power grid intelligent agent; , These are the projection functions under the supply-demand complementarity model and the projection functions under the supply-demand complementarity model, respectively.

[0049] The projection functions under the supply-demand complementarity model and the projection functions under the supply-demand complementarity model are shown below:

[0050] (12)

[0051] (13)

[0052] In the formula, Let g be the power output of unit g in the nth provincial power grid intelligent entity at time t. Let w be the output of the new energy generating unit in the nth provincial power grid intelligent entity at time t. Let g be the output of unit g in the m-th provincial power grid smart entity at time t. Let w be the output of the new energy generating unit in the m-th provincial power grid intelligent entity at time t. Let i be the load demand of load node i in the nth provincial power grid intelligent agent at time t. Let i be the load demand of load node i of the m-th provincial power grid intelligent agent at time t. These represent the set of conventional generating units, the set of load nodes, and the set of new energy generating units within the nth provincial power grid. These represent the set of conventional generating units, the set of load nodes, and the set of new energy generating units within the m-th provincial power grid.

[0053] Furthermore, the steps of the multi-agent safety reinforcement learning framework for feasibility verification and boundary correction of hydrogen energy support actions generated by provincial power grid agents include:

[0054] A context encoder is used to encode the historical interaction trajectories of each provincial power grid agent into latent variables that characterize the supply and demand intentions of neighboring provinces and the regional balance status.

[0055] The latent variables and local observations are used together as input to the action policy network, and the action policy network is used to output the final action.

[0056] Furthermore, the context encoder is trained using the information bottleneck principle, and the loss function used during training is shown below:

[0057] (14)

[0058] In the formula, As an auxiliary decoder; The latent space regularization coefficient; Let KL divergence be a metric. For local observation at the next moment;

[0059] The loss function used during the training of the action policy network is shown below: (15)

[0060] In the formula, For the action policy network of the nth agent; For policy network parameters; For the Lagrange multipliers corresponding to the entropy constraint, For the Lagrange multipliers corresponding to the safety cost constraint, It is a mixed joint action; This is the global state; For a joint latent variable vector; These are latent variables; Networks are evaluated for profitability; For global experience replay pool, Let the threshold value be the safety cost constraint for the nth provincial power grid intelligent agent. The entropy temperature coefficient For the Lagrange dual multipliers corresponding to the safety cost constraint, The entropy threshold is the target entropy threshold for the strategy.

[0061] The hidden variables are shown below:

[0062] (16)

[0063] (17)

[0064] In the formula, Let be a random variable that follows a standard normal distribution, and ⊙ be the Hadamard product; Let be the mean vector of the latent variable distribution. Let be the log-variance vector of the latent variable distribution; For context encoder networks, For context encoder network parameters; The historical interaction trajectory of the nth provincial network intelligent agent at time t;

[0065] The historical interaction trajectory of the nth provincial network agent at time t is shown below:

[0066] (18)

[0067] In the formula, H is the length of the historical time window; These are the local observations, actions, reward information, and cost information for the past H time steps, respectively.

[0068] Reward Information As shown below:

[0069] (19)

[0070] (20)

[0071] (twenty one)

[0072] (twenty two)

[0073] (twenty three) (twenty four)

[0074] (25)

[0075] In the formula, For unit start-up and shutdown costs, This is a penalty for region n violating the constraints on the duration of unit startup or shutdown. The optimal power generation cost for the province is obtained by solving the optimal power flow problem based on the relaxation of subproblems. As a project to share the risk of imbalance across the entire network, As a source of responsibility for the imbalance in this province, Compensation for hydrogen energy support services; The penalty coefficient for exceeding the limit of the unit duration constraint. The penalty coefficient corresponding to the risk-sharing item of network-wide imbalance; To prevent the minimum value where the denominator is zero, This refers to the penalty coefficient corresponding to the source item of the imbalance responsibility in this province. Compensation coefficient for unit hydrogen energy support services;

[0076] Cost information As shown below:

[0077] (26)

[0078] (27)

[0079] (28)

[0080] (29)

[0081] In the formula, To mitigate the risk and cost of supply and demand imbalance across the entire network, To reduce the cost of exceeding the limit on the start-up and shutdown duration of the power generation units in this province. This refers to the degree of exceedance of hydrogen energy support actions based on the boundary of the electric hydrogen virtual energy pool; Let be the unit start-up / shutdown state vectors at time t and the previous time, respectively. This represents the unit's continuous start-up and shutdown time vector from the previous moment. These are the load shedding slack and the wind / solar curtailment slack, respectively. For a set of joint strategies, Let N be the action strategy function of the Nth provincial power grid intelligent agent. This is the unit penalty coefficient for exceeding the limit of the unit start-up and shutdown duration constraint. Let g be the minimum downtime of the g-th generator unit in the n-th provincial power grid. Let g be the minimum operating duration of the g-th generator unit in the n-th provincial power grid.

[0082] Furthermore, in step 6), the monthly supply and demand balance analysis results include the unit start-up and shutdown sequence, inter-provincial mutual assistance power, hydrogen energy support power, supply and demand imbalance rate, and expected supply and demand imbalance power.

[0083] The technical effects of this invention are undeniable. Addressing the critical needs of low-carbon and green energy transformation, secure power supply of new power systems, and high-proportion consumption of new energy sources, this invention proposes a monthly power supply and demand balance analysis method for regional interconnected power grids based on a virtual energy pool for hydrogen energy. This method enables aggregated modeling, boundary quantification, security constraints, and collaborative decision-making of wide-area hydrogen energy resources under the condition of protecting the privacy of the main body.

[0084] This invention proposes a virtual energy pool model for hydrogen-electricity systems oriented towards regional interconnected power grids. Using hydrogen-electricity coupling nodes as ports, this model aggregates dispersed hydrogen production, storage, transportation, utilization, and hydrogen-to-electricity resources into a system-level generalized energy feasible set. It can fully represent the full-quadrant support capabilities of hydrogen energy systems in scenarios of supply guarantee, consumption support, and complementary balance, avoiding direct exposure to the complex internal processes and commercial information of the hydrogen energy system.

[0085] This invention proposes a data- and model-driven method for representing the boundary of an electric-hydrogen virtual energy pool. This method acquires boundary point samples through point-by-point simulation and, combined with attention mechanisms, convolutional feature extraction, and model constraint regularization to train the boundary solver, can transform the high-dimensional, nonlinear, and highly time-varying electric-hydrogen coupling feasible domain boundary into a quickly invoked parameterized safety boundary. This provides support for online action verification in monthly supply and demand balance analysis.

[0086] This invention also proposes an analytical framework that embeds the boundary of the electric-hydrogen virtual energy pool as a safety layer into multi-agent safety reinforcement learning. After each provincial power grid agent generates hydrogen energy support actions, this framework uses a safety layer projection operator to perform real-time verification and correction of these actions, preventing unsafe actions from entering the electric-hydrogen physical system. Furthermore, it guides the agents to learn cross-provincial mutual assistance, hydrogen energy support, and supply-demand risk mitigation strategies within the safety boundary through cost and reward functions.

[0087] In summary, this invention can approximately achieve the hydrogen energy support effect obtained through full information modeling under engineering conditions where the internal state of a hydrogen energy system is not visible or should not be fully disclosed; it can intuitively identify the supply and consumption support space of regional interconnected power grids under different new energy penetration rates, different hydrogen storage ratios, and different inter-provincial mutual assistance needs through the boundary of the electric hydrogen virtual energy pool; it can reduce the probability of monthly power supply and demand imbalance and the risk of extreme imbalance, improve the efficiency of hydrogen energy resource utilization and the cross-provincial collaborative balancing capability of regional interconnected power grids, and has good engineering application value. Attached Figure Description

[0088] Figure 1 This is a structural diagram of the regional interconnected power grid hydrogen virtual energy pool of the present invention;

[0089] Figure 2 This is a flowchart of the boundary characterization of the electric hydrogen virtual energy pool based on data and model hybrid driving according to the present invention.

[0090] Figure 3 This is a diagram showing the construction of the boundary point feature matrix of the electric hydrogen virtual energy pool of the present invention.

[0091] Figure 4 This is a diagram of the deep neural network architecture for mapping the boundary of the electric hydrogen virtual energy pool of the present invention.

[0092] Figure 5 This is a graph showing the training loss function of the boundary network of the electric hydrogen virtual energy pool in this invention.

[0093] Figure 6 This is a verification diagram showing the accuracy of the proposed method for delineating the boundary of the electric hydrogen virtual energy pool in this invention;

[0094] Figure 7 This is a diagram illustrating the multi-agent safety reinforcement learning integration strategy based on an electric hydrogen virtual energy pool, as presented in this invention.

[0095] Figure 8 This is a comparison chart of rewards and costs during the training process before and after the embedded electric hydrogen virtual energy pool security layer of the present invention;

[0096] Figure 9 This is a diagram of a two-dimensional virtual energy pool for hydrogen based on test system I according to the present invention;

[0097] Figure 10 This is a virtual energy pool diagram of hydrogen-electricity under different new energy penetration rates according to the present invention;

[0098] Figure 11 This is a diagram of the virtual energy pool for hydrogen-electricity under different inter-provincial hydrogen storage ratios according to the present invention;

[0099] Figure 12 This is a distribution diagram of supply and demand imbalance of the test system I of the present invention under various hydrogen energy capacity scenarios. Detailed Implementation

[0100] The present invention will be further described below with reference to embodiments, but it should not be construed that the scope of the present invention is limited to the following embodiments. Various substitutions and modifications made based on ordinary technical knowledge and common practices in the art without departing from the above-described technical concept of the present invention should be included within the scope of protection of the present invention.

[0101] Example 1:

[0102] See Figures 1 to 12 A method for monthly power supply and demand balance analysis of regional interconnected power grids based on an electric hydrogen virtual energy pool includes the following steps:

[0103] Step 1) Obtain monthly supply and demand balance analysis data of the regional interconnected power grid and hydrogen energy system operation data;

[0104] Monthly supply and demand balance analysis data from regional interconnected power grids and operational data from hydrogen energy systems provide data support for subsequent full-process modeling, solving, decision-making, and analysis, specifically including:

[0105] (1) Feasible space construction for supporting the electric hydrogen virtual energy pool;

[0106] (2) Construction of the feasible domain boundary optimization search model for the electric hydrogen virtual energy pool;

[0107] (3) The construction of a multi-agent safe reinforcement learning framework provides feature inputs for the local observation state, reward function and cost function of multi-agent reinforcement learning, and supports the agent's policy learning and action generation;

[0108] (4) The basis for monthly supply and demand balance analysis, used to calculate various core analysis indicators.

[0109] Step 2) Based on the monthly supply and demand balance analysis data of the regional interconnected power grid and the operation data of the hydrogen energy system, the hydrogen production, storage, transmission and utilization resources are aggregated into a virtual energy pool using the electric-hydrogen coupling nodes of the regional interconnected power grid as energy interaction ports.

[0110] Step 3) Divide the equivalent injection power at the port of the electric hydrogen virtual energy pool into target observation variables and conditional observation variables, and establish a feasible domain boundary optimization search model for the electric hydrogen virtual energy pool;

[0111] Step 4) Generate boundary point samples of the feasible region boundary optimization search model using the point-by-point simulation method, and use a boundary solver driven by data and model hybridization to parameterize the feasible region boundary.

[0112] The boundary solver consists of a neural network. Boundary point samples include data labels and input data for the boundary solver, which are used to train the boundary solver.

[0113] Step 5) The parameterized feasible domain boundary is used as the security layer of the multi-agent security reinforcement learning framework. Feasibility verification and boundary correction are performed on the hydrogen energy support actions generated by each provincial power grid agent to generate the final execution action.

[0114] Step 6) Based on the final execution action, conduct a monthly power supply and demand balance analysis of the regional interconnected power grid to obtain the monthly supply and demand balance analysis results.

[0115] Example 2:

[0116] The main structure of this embodiment is the same as that of Embodiment 1. Further, in step 2), the feasible space for supporting the electric hydrogen virtual energy pool is as follows:

[0117] (1)

[0118] In the formula, The equivalent injected power vector for the port of the hydrogen virtual energy pool; n is the provincial power grid number; t is the monthly time-series production simulation period; Let n be the variable for the operation decision of the provincial power grid system; Let n be the operating variables of the hydrogen energy system of the nth provincial power grid; Let n be the discrete operating state variable of the provincial power grid; For the power exchange of inter-provincial connecting lines; For uncertainties in new energy sources and load; , , , , , These are the coefficient matrices for the corresponding variables, and e is the coefficient vector. For the set of nonlinear inequalities constraint for regional interconnected power grids, Let N be the set of provincial power grids, and N be the number of provincial power grids. This is a topological correlation matrix for the interconnection of provincial power grids;

[0119] The equivalent injection power of the nth provincial power grid's hydrogen virtual energy pool port is shown below:

[0120] (2)

[0121] In the formula, This represents the set of hydrogen-to-electricity conversion equipment within the nth provincial power grid. This represents the set of electricity-to-hydrogen conversion devices within the nth provincial power grid. The output power of the hydrogen-to-electricity conversion equipment; The power consumption of the electro-hydrogen conversion equipment.

[0122] Example 3:

[0123] The main structure of this embodiment is the same as any one of embodiments 1-2. Further, in step 3), the feasible domain boundary optimization search model of the electric hydrogen virtual energy pool is as follows:

[0124] (3)

[0125] In the formula, The target observation variable is the virtual injected power of the provincial power grid to be searched for boundary values; These are the conditional observation variables formed by the remaining provincial power grid ports; The given values ​​for the conditional observed variables.

[0126] Example 4:

[0127] The main structure of this embodiment is the same as any one of embodiments 1-3. Further, in step 4), the data structure of the boundary point samples is as follows:

[0128] (4)

[0129] In the formula, In hydrogen storage state, Hydrogen loading, , These are the upper and lower limits of the unit capacity, respectively. For electrical load, Contribute to new energy;

[0130] Example 5:

[0131] The main structure of this embodiment is the same as any one of embodiments 1-4. Furthermore, the boundary solver includes an attention mechanism layer, a convolutional layer, and a fully connected layer.

[0132] The matching weight matrix output by the attention mechanism layer is shown below:

[0133] (5)

[0134] In the formula, softmax is the normalization function; q is the data input matrix of the attention mechanism; W is the weight matrix; The dimension of the weight matrix;

[0135] The feature matrix output by the convolutional layer is shown below:

[0136] (6)

[0137] In the formula, R is the convolution weight parameter matrix; f is the activation function; and b is the bias parameter. For convolution operation operators;

[0138] The parameterized feasible region boundary output by the fully connected layer is shown below:

[0139] (7)

[0140] In the formula, This is the weight matrix of the fully connected layer. This is the bias column vector for the fully connected layer.

[0141] It is the single boundary point output value of the fully connected layer of the boundary solver. Given a set of inputs (values ​​of conditional observation variables and current operating conditions), it is calculated by the attention layer, convolutional layer, and fully connected layer, and outputs the boundary extreme value of the corresponding target observation variable. It is the smallest computational unit that constitutes the boundary of the feasible region.

[0142] Example 6:

[0143] The main structure of this embodiment is the same as any one of embodiments 1-5. Furthermore, the boundary solver has been trained on a historical dataset, with the training objective being to minimize the loss function; the input is the feasible region boundary, and the output is the parameterized feasible region boundary.

[0144] The loss function is shown below:

[0145] (8)

[0146] In the formula, MSE is the Mean Squared Error function; Label is the boundary point sample label; For mathematical expectation; The regularization factor constrains the hydrogen virtual energy pool model; The weight coefficients of the data-driven loss term and the model-driven loss term are respectively determined.

[0147] Example 7:

[0148] The main structure of this embodiment is the same as any one of embodiments 1-6. Further, in step 5), the joint observation space in the multi-agent safety reinforcement learning framework expands the boundary state of the hydrogen virtual energy pool based on the local observation state of each provincial power grid.

[0149] The local observation status of each provincial power grid intelligent agent is shown below:

[0150] (9)

[0151] In the formula, This represents the local observation state of the nth provincial power grid intelligent agent at time t. The boundary state of the feasible domain of the electric hydrogen virtual energy pool is obtained by parameterization of the boundary solver; For boundary solver network parameters;

[0152] It is the complete set of boundary states of the feasible region of the electric hydrogen virtual energy pool at time t, and is a holistic representation of the boundary of the entire high-dimensional feasible region; subscript The boundary is defined by the parameter. The boundary solver is parameterized, and the subscript t represents the operating condition at time t.

[0153] The hydrogen energy support actions generated by the smart grid agents of each province include unit start-up and shutdown decisions and hydrogen energy support injection power at the port of the electric hydrogen virtual energy pool;

[0154] The original actions of each provincial power grid intelligent agent are as follows:

[0155] (10)

[0156] In the formula, The unit start-up and shutdown decision at time t; The hydrogen energy support action at time t is the virtual port of the hydrogen energy system.

[0157] The final action is as follows:

[0158] (11)

[0159] In the formula, Projection operator for the safety layer of the hydrogen virtual energy pool; The original hydrogen energy support action vectors generated for each provincial power grid intelligent agent; , These are the projection functions under the supply-demand complementarity model and the projection functions under the supply-demand complementarity model, respectively.

[0160] The projection functions under the supply-demand complementarity model and the projection functions under the supply-demand complementarity model are shown below:

[0161] (12)

[0162] (13)

[0163] In the formula, Let g be the power output of unit g in the nth provincial power grid intelligent entity at time t. Let w be the output of the new energy generating unit in the nth provincial power grid intelligent entity at time t. Let g be the output of unit g in the m-th provincial power grid smart entity at time t. Let w be the output of the new energy generating unit in the m-th provincial power grid intelligent entity at time t. Let i be the load demand of load node i in the nth provincial power grid intelligent agent at time t. Let i be the load demand of load node i of the m-th provincial power grid intelligent agent at time t. These are the sets of conventional generating units, load nodes, and new energy generating units (wind power, photovoltaic power, and other new energy sources) within the nth provincial power grid. These represent the set of conventional generating units, the set of load nodes, and the set of new energy generating units (wind power, photovoltaic, and other new energy sources) within the m-th provincial power grid.

[0164] Example 8:

[0165] The main structure of this embodiment is the same as any one of embodiments 1-7. Furthermore, the steps of the multi-agent safety reinforcement learning framework for feasibility verification and boundary correction of hydrogen energy support actions generated by provincial power grid agents include:

[0166] A context encoder is used to encode the historical interaction trajectories of each provincial power grid agent into latent variables that characterize the supply and demand intentions of neighboring provinces and the regional balance status.

[0167] The latent variables and local observations are used together as input to the action policy network, and the action policy network is used to output the final action.

[0168] Example 9:

[0169] The main structure of this embodiment is the same as any one of embodiments 1-8. Furthermore, the context encoder is trained using the information bottleneck principle, and the loss function used during training is as follows:

[0170] (14)

[0171] In the formula, As an auxiliary decoder; The latent space regularization coefficient; The KL (Kullback-Leibler) divergence; For local observation at the next moment;

[0172] The loss function used during the training of the action policy network is shown below: (15)

[0173] In the formula, For the action policy network of the nth agent; For policy network parameters; For the Lagrange multipliers corresponding to the entropy constraint, For the Lagrange multipliers corresponding to the safety cost constraint, It is a mixed joint action; This is the global state; For a joint latent variable vector; These are latent variables; Networks are evaluated for profitability; For global experience replay pool, This represents the safety cost constraint threshold (long-term expected safety cost upper limit) corresponding to the nth provincial power grid intelligent agent. The entropy temperature coefficient For the Lagrange dual multipliers corresponding to the safety cost constraint, The entropy threshold is the target entropy threshold for the strategy.

[0174] The hidden variables are shown below:

[0175] (16)

[0176] (17)

[0177] In the formula, Let be a random variable that follows a standard normal distribution, and ⊙ be the Hadamard product; Let be the mean vector of the latent variable distribution. Let be the log-variance vector of the latent variable distribution; For context encoder networks, For context encoder network parameters; The historical interaction trajectory of the nth provincial network intelligent agent at time t;

[0178] The historical interaction trajectory of the nth provincial network agent at time t is shown below:

[0179] (18)

[0180] In the formula, H is the length of the historical time window; These are the local observations, actions, reward information, and cost information for the past H time steps, respectively.

[0181] Reward Information As shown below:

[0182] (19)

[0183] (20)

[0184] (twenty one)

[0185] (twenty two)

[0186] (twenty three)

[0187] (twenty four)

[0188] (25)

[0189] In the formula, For unit start-up and shutdown costs, This is a penalty for region n violating the constraints on the duration of unit startup or shutdown. The optimal power generation cost for the province is obtained by solving the optimal power flow problem based on the relaxation of subproblems. As a project to share the risk of imbalance across the entire network, As a source of responsibility for the imbalance in this province, Compensation for hydrogen energy support services; The penalty coefficient for exceeding the limit of the unit duration constraint. The penalty coefficient corresponding to the risk-sharing item of network-wide imbalance; To prevent the minimum value where the denominator is zero, This refers to the penalty coefficient corresponding to the source item of the imbalance responsibility in this province. Compensation coefficient for unit hydrogen energy support services;

[0190] Cost information As shown below:

[0191] (26)

[0192] (27)

[0193] (28)

[0194] (29)

[0195] In the formula, To mitigate the risk and cost of supply and demand imbalance across the entire network, To reduce the cost of exceeding the limit on the start-up and shutdown duration of the power generation units in this province. This refers to the degree of exceedance of hydrogen energy support actions based on the boundary of the electric hydrogen virtual energy pool; Let be the unit start-up / shutdown state vectors at time t and the previous time, respectively. This represents the unit's continuous start-up and shutdown time vector from the previous moment. These are the load shedding slack and the wind / solar curtailment slack, respectively. The joint strategy set refers to the overall strategy set comprised of the decision-making strategies of all provincial power grid agents. Let N be the action strategy function of the Nth provincial power grid intelligent agent. The unit penalty coefficient (penalty weight) for exceeding the limit of the unit start-up and shutdown duration constraint. Let g be the minimum downtime of the g-th generator unit in the n-th provincial power grid. Let g be the minimum operating duration of the g-th generator unit in the n-th provincial power grid.

[0196] Example 10:

[0197] The main structure of this embodiment is the same as any one of embodiments 1-9. Further, in step 6), the monthly supply and demand balance analysis results include the unit start-up and shutdown sequence, inter-provincial mutual assistance power, hydrogen energy support power, supply and demand imbalance rate, and expected supply and demand imbalance power.

[0198] Prerequisite parameters for unit start-up and shutdown sequence: Unit start-up and shutdown decisions in the final execution action (corresponding action variables) (The final start-up and shutdown status after safety layer verification and correction); Generator start-up and shutdown sequence generation method: During the entire period of the monthly time-series production simulation, the start-up and shutdown status (start-up / shutdown) of each conventional generator unit in each provincial power grid at each time t is arranged in chronological order to form a generator start-up and shutdown time sequence covering the entire month. This sequence comes directly from the decision results output by the multi-agent and is the basic operating boundary for subsequent power balance calculation and constraint verification.

[0199] Prerequisites for inter-provincial power exchange: Inter-provincial tie-line power exchange Inter-provincial mutual assistance power generation method: take equation (21) as the objective function, consider the constraints of equation (3) to construct the monthly balance optimization model of the interconnected power grid, bring the unit start-up and shutdown and hydrogen energy support decisions generated by each intelligent agent into the model and solve it through the optimization solver, and the solution results can be obtained.

[0200] Hydrogen energy support power corresponding pre-parameters: Hydrogen energy support action of the electro-hydrogen virtual port in the final execution action. Hydrogen energy support power generation method: This power comes directly from the final executed action after being corrected by the security layer projection, representing the net power support obtained by the nth provincial power grid at time t through the electro-hydrogen coupling device.

[0201] Supply and demand imbalance rate generation method: After solving the monthly balance optimization model of the interconnected power grid, the supply and demand status is judged in each time period: when the system power supply capacity cannot meet the load demand (load shedding occurs), or when the output of new energy cannot be fully absorbed (wind and solar curtailment occurs), it is recorded as 1 imbalance period.

[0202] Supply-demand imbalance rate = total number of imbalance periods in a month ÷ total number of simulated periods in a month, used to reflect the frequency of supply-demand imbalance throughout the month.

[0203] The expected power of supply-demand imbalance is generated as follows: After solving the monthly balance optimization model of the interconnected power grid, the expected power of supply-demand imbalance (the sum of load shedding and wind / solar curtailment) for all time periods within the month is calculated mathematically to obtain the expected power of supply-demand imbalance. This indicator reflects the average severity of monthly supply-demand imbalance, and the unit is MW.

[0204] Example 11:

[0205] The purpose of this invention is to provide a method for monthly power supply and demand balance analysis of regional interconnected power grids based on an electro-hydrogen virtual energy pool. This method revolves around the technical chain of "how to aggregate and characterize hydrogen energy resources, how to describe aggregation capabilities, how to constrain agent decision-making with the description results, and how to use the constrained decisions for monthly supply and demand balance analysis." By constructing an electro-hydrogen virtual energy pool and using its feasible domain boundary as a safety layer for multi-agent safety reinforcement learning, it achieves the quantification of hydrogen energy support capabilities, safety action correction, and risk analysis of supply and demand balance in regional interconnected power grids.

[0206] To achieve the above objectives, this invention first acquires monthly supply and demand balance analysis data of the regional interconnected power grid and operation data of the hydrogen energy system, including information on the load of each provincial power grid, output of new energy sources, operating constraints of conventional units, constraints of inter-provincial interconnection lines, hydrogen production equipment, hydrogen-to-electricity equipment, hydrogen storage equipment, hydrogen transportation equipment, and terminal hydrogen load; then, using the electro-hydrogen coupling nodes of the regional interconnected power grid as energy interaction ports, it aggregates the widely dispersed hydrogen energy production, storage, transportation, and utilization resources into an electro-hydrogen virtual energy pool.

[0207] Furthermore, the described electro-hydrogen virtual energy pool is not a simple public model of the internal state of the hydrogen energy host, but rather an equivalent characterization of its external balance support capability at the port level. Its feasible space modeling for support capability is shown below:

[0208] (1)

[0209] In the formula, q represents the equivalent injected power vector at the port of the hydrogen virtual energy pool; q n The equivalent injected power at the nth provincial power grid port is represented by: n represents the provincial power grid number; t represents time; x represents the power system operation decision variable; y represents the hydrogen energy system operation variable; z represents the discrete operation state variable; P Btieζ represents the power exchanged between inter-provincial transmission lines; ζ represents the uncertainty variables of new energy sources and load; q n Positive values ​​indicate supply support, negative values ​​indicate consumption support, A, K, D, H, M, N represent the coefficient matrix of the corresponding variable, and e represents the coefficient vector.

[0210] The equivalent injected power of the nth provincial power grid port in the equivalent injected power vector is shown below:

[0211] (2)

[0212] In the formula, FC n E represents the set of hydrogen-to-electricity conversion equipment within the nth provincial power grid; n P represents the set of electricity-to-hydrogen conversion equipment within the nth provincial power grid; fc,n P represents the output power of the hydrogen-to-electricity conversion equipment. e,n Indicates the power consumption of the electro-hydrogen conversion equipment; q n This represents the net injection power of the hydrogen virtual port presented to the outside world by the nth provincial power grid.

[0213] After obtaining the feasible space of the port equivalent injection power, this invention transforms the high-dimensional feasible domain boundary into computable and learnable boundary point samples. Specifically, the port equivalent injection power vector is divided into target observation variables and conditional observation variables. Given the values ​​of the conditional observation variables, the extreme values ​​of the target observation variables are searched, thereby establishing a boundary optimization search model for the electric hydrogen virtual energy pool.

[0214] (3)

[0215] In the formula, q obj,t q represents the target observed variable, i.e., the virtual injected power of the provincial power grid to be searched for boundary values; con,t C represents the conditional observation variables constituting the remaining provincial power grid ports; step The given values ​​of the conditional observation variables are represented; t represents the monthly time-series production simulation period; by traversing C step The optimization search model is then repeatedly solved to obtain boundary points in different search directions.

[0216] The boundary optimization search model is repeatedly solved using a point-by-point simulation method to obtain a sample set of boundary points for different operating conditions and search directions. The data structure of the sample set is shown below:

[0217] (4)

[0218] In the formula, Indicates the output of new energy sources, Representing electrical load and hydrogen load respectively, For hydrogen storage state, These represent the upper and lower limits of the unit capacity, respectively. These features are used to describe the time-varying characteristics of the boundaries as the operating state changes.

[0219] To address the characteristics of the boundary of the electric hydrogen virtual energy pool—high-dimensional, nonlinear, time-varying, and multi-quadrant distribution—this invention further establishes a data- and model-driven boundary solver. This boundary solver utilizes an attention mechanism layer to identify key coupling relationships between different observation dimensions and operating conditions, and its calculation formula is shown below:

[0220] (5)

[0221] In the formula, softmax represents the normalization function; d represents the matching degree weight matrix; q represents the data input matrix of the attention mechanism; W represents the weight matrix; d represents the matching degree weight matrix. W This represents the dimension of the weight matrix.

[0222] Convolutional layers are used to extract local coupling features from the feature matrix of boundary points, and their calculation formula is shown below:

[0223] (6)

[0224] In the formula, q c R represents the output feature matrix of the convolutional layer; f represents the convolutional weight parameter matrix; b represents the activation function; and b represents the bias parameter.

[0225] Fully connected layers are used to map the above abstract features to the boundary value label space, and their calculation formula is shown below:

[0226] (7)

[0227] In the formula, q c q represents the input feature column vector of the fully connected layer; o W represents the output feature column vector of the fully connected layer; l b represents the weight matrix of the fully connected layer. l This represents the bias column vector of the fully connected layer.

[0228] To balance data fitting accuracy and physical feasibility, the boundary solver employs a training loss function that combines data-driven loss with model-driven constraint regularization:

[0229] (8)

[0230] In the formula, Loss represents the training loss function of the boundary solver; MSE is the mean squared error function; q orepresents the network output boundary value; Label represents the boundary point sample label; E[·] represents the mathematical expectation; C(·) represents the constraint regularization factor of the electric hydrogen virtual energy pool model; γ and λ represent the weight coefficients of the data-driven loss term and the model-driven loss term, respectively.

[0231] After obtaining the parameterized boundary of the hydrogen-electric virtual energy pool, this invention embeds it into a multi-agent security reinforcement learning framework. The local observation states of each provincial power grid agent are extended from the provincial operating state to the boundary state of the hydrogen-electric virtual energy pool, enabling the agents to perceive the current boundary of hydrogen energy aggregation support capabilities.

[0232] (9)

[0233] In the formula, o n,t This represents the local observation state of the nth provincial power grid intelligent agent at time t; x sys,n,t Indicates the internal operating status of a provincial power grid; Ω υ,t υ represents the boundary state of the feasible domain of the hydrogen virtual energy pool obtained by the boundary solver parameterization; υ represents the boundary solver network parameters.

[0234] The actions of each provincial power grid smart agent include unit start-up and shutdown decisions and hydrogen energy support injection power via the electric-hydrogen virtual port. Their action definitions are as follows:

[0235] (10)

[0236] In the formula, a n,t This represents the initial action of the nth provincial power grid intelligent agent at time t; u G,n,t Indicates the decision to start or stop the generator unit; a H,n,t Indicates the hydrogen energy support action of the hydrogen virtual port; q n,t This indicates the equivalent injected power corresponding to this port.

[0237] To prevent the agent's actions from exceeding the feasible domain of the hydrogen virtual energy pool, this invention constructs a safety layer projection operator for the parameterized boundary, verifies and corrects the original hydrogen energy support actions, and generates the final execution actions:

[0238] (11)

[0239] In the formula, Λ VEP Represents the projection operator of the security layer of the hydrogen virtual energy pool; a H,t This represents the original hydrogen energy support action vector generated by each provincial power grid intelligent agent; H,t Ω represents the final execution action vector after correction by the safety layer; υ,t represents the feasible region of the parameterized electric hydrogen virtual energy pool; Proj(·) represents the projection function.

[0240] Specifically, the following projection functions are constructed for the supply-demand complementarity model and the supply-demand competition model:

[0241] (12)

[0242] (13)

[0243] In the formula, Proj ind Proj represents the projection function under a supply-demand complementary model; gam q represents the projection function under a supply-demand competition model; max and q min ω represents the maximum and minimum allowable injection power for each observation dimension, respectively; n,t This represents the responsibility weight of the nth provincial power grid for the risk of supply and demand imbalance in the entire network.

[0244] In the multi-agent safety reinforcement learning, the joint cost function is used to simultaneously reflect the risks of supply and demand imbalance, unit constraint exceeding limits, and hydrogen energy support action exceeding limits. The cost function is shown below:

[0245] (14)

[0246] The following are the criteria for exceeding limits in hydrogen energy support actions:

[0247] (15)

[0248] In the formula, c t Represents the joint cost function; c n,t c represents the instantaneous cost of the nth provincial power grid intelligent agent; eh,t This indicates the degree of exceedance of hydrogen energy support actions based on the boundary of the hydrogen-electric virtual energy pool; a H,t Represents the original hydrogen energy support action vector; H,t This represents the corrected hydrogen energy support action vector.

[0249] Meanwhile, the joint reward function adds a hydrogen energy support service compensation item for the electric hydrogen virtual energy pool, which is used to guide agents to make full use of hydrogen energy resources to participate in supply guarantee and consumption support within a safe and feasible range. The reward function is as follows:

[0250] (16)

[0251] The compensation items for hydrogen energy support services are as follows:

[0252] (17)

[0253] In the formula, r t Represents the joint reward function; r n,tf represents the immediate reward for the nth provincial power grid intelligent agent; eh,n,t λ represents the hydrogen energy support service compensation item for the nth provincial power grid; price,n This represents the unit hydrogen energy support service compensation coefficient; the monthly supply and demand balance analysis results include the unit start-up and shutdown sequence, inter-provincial mutual assistance power, hydrogen energy support power, supply and demand imbalance rate, and expected supply and demand imbalance power.

[0254] Furthermore, the multi-agent security reinforcement learning can employ a multi-agent robust flexible actor-critic algorithm driven by context-aware meta-learning and integrating Benders decomposition, namely, the context-aware multi-agent Benders-Combined RobustSoft Actor-Critic (CMA-BC-RSAC) algorithm. This algorithm encodes the historical interaction trajectories of each provincial power grid agent into latent variables representing the supply and demand intentions of neighboring provinces and the regional balance situation, and uses these latent variables, along with local observations, as inputs to the action policy network. The definition of the agent's historical interaction trajectory is as follows:

[0255] (18)

[0256] In the formula, ς n,t H represents the historical interaction trajectory of the nth provincial power grid intelligent agent at time t; H represents the length of the historical time window; o n,t-i Indicates local observation; a n,t-i Indicates an action; r n,t-i Indicates a reward; c n,t-i represents the security cost; i represents the historical time step index.

[0257] The historical interaction trajectory is mapped to latent variable distribution parameters by a probabilistic context encoder, as shown below:

[0258] (19)

[0259] In the formula, q ψ_n This represents the probabilistic context encoder for the nth agent; z n,t μ represents a latent variable. n,t and σ n,t Let f represent the mean vector and variance vector of the latent variable distribution, respectively; ψ_n Represents an encoder neural network; ψ n This indicates encoder parameters.

[0260] The context encoder is trained using the information bottleneck principle, and its loss function is shown below:

[0261] (20)

[0262] In the formula, L enc p represents the context encoder loss function; dec Indicates the auxiliary decoder; λ z D represents the latent space regularization coefficient; KL Denotes the Kullback-Leibler (KL) divergence; r n,t Indicates a reward; c n,t Indicates safety cost; o n,t+1 Indicates a local observation at the next moment; z n,t This represents the latent variables inferred from historical trajectories.

[0263] During the decentralized execution phase, each provincial power grid agent generates actions based on local observations and latent variables, and introduces security constraints through a primal-dual form, with its Lagrangian function as shown below:

[0264] (twenty one)

[0265] In the formula, L represents the Lagrange function; π θ_n θ represents the action policy network of the nth agent; n Indicates policy network parameters; o n,t Indicates local observation; a n,t Indicates an action within this province; a t mix Indicates a mixed joint action; s t Represents the global state; z t Q represents the joint latent variable vector; r φ This represents a profit-evaluation network; Q c μ and V c η λ represents the safety constraint evaluation network; λ1 and λ2 represent the Lagrange multipliers; α represents the entropy temperature coefficient.

[0266] Based on the Lagrange function described above, the action policy network is updated according to the following loss function:

[0267] (twenty two)

[0268] In the formula, L π Represents the loss function of the action policy network; a -n,t This represents the actions of agents other than the nth provincial power grid agent; the meanings of the remaining symbols are consistent with the aforementioned definitions. Through this algorithm, agents can utilize latent variables to perceive the time-varying supply and demand boundaries of regional interconnected power grids and complete monthly power supply and demand balance analysis while satisfying security constraints.

[0269] Through the above technical solution, the present invention can characterize the system-level balance support capability of wide-area hydrogen energy resources by uniformly representing the boundary of the electric hydrogen virtual energy pool under the condition that the detailed operating status inside the hydrogen energy body cannot be fully disclosed, and transform this boundary into a safety constraint in the intelligent agent's strategy learning process, so that the monthly supply and demand balance analysis results have learnability, interpretability and physical executability.

[0270] Example 12:

[0271] A method for monthly power supply and demand balance analysis of regional interconnected power grids based on an electric hydrogen virtual energy pool includes the following steps:

[0272] 1) Obtain monthly supply and demand balance analysis data for the regional interconnected power grid and operation data for the hydrogen energy system;

[0273] 2) Using the hydrogen-electric coupling nodes of the regional interconnected power grid as energy interaction ports, the widely dispersed hydrogen production, storage, transportation, use and hydrogen-to-electricity resources are aggregated into a virtual hydrogen-electric energy pool.

[0274] 3) The equivalent injected power vector of each provincial power grid port is used to characterize the power supply support, absorption support and complementary balance capability of the electric hydrogen virtual energy pool to the regional interconnected power grid, and its feasible domain boundary is determined under the constraints of power system operation, hydrogen energy system operation and electric hydrogen coupling.

[0275] 4) The feasible domain boundary samples are generated by point-by-point simulation, and the boundary of the electric hydrogen virtual energy pool is parameterized by a boundary solver driven by a combination of data and model.

[0276] 5) The parameterized boundary of the hydrogen virtual energy pool is used as the safety layer for multi-agent safety reinforcement learning, and the feasibility of hydrogen energy support actions generated by each provincial power grid agent is verified and the boundary is corrected.

[0277] 6) Based on the corrected hydrogen energy support actions, conduct monthly power supply and demand balance analysis of regional interconnected power grids, and output unit start-up and shutdown sequence, inter-provincial mutual assistance power, hydrogen energy support power, supply and demand imbalance rate and expected supply and demand imbalance power.

[0278] Furthermore, the described electro-hydrogen virtual energy pool does not expose detailed equipment status and commercial operation information within the hydrogen energy entity in its external characteristics. Instead, it presents its system-level balancing support capability to the regional interconnected power grid through the port equivalent injection power vector. When the port equivalent injection power is positive, it indicates that the electro-hydrogen virtual energy pool provides supply support to the provincial power grid through hydrogen-to-electricity equipment; when the port equivalent injection power is negative, it indicates that the electro-hydrogen virtual energy pool absorbs surplus electrical energy and provides support for the consumption of new energy sources through electricity-to-hydrogen equipment.

[0279] Furthermore, the boundary point sample acquisition process includes: dividing the multi-dimensional port equivalent injection power into target observation variables and conditional observation variables; searching for extreme values ​​of target observation variables after given values ​​of conditional observation variables; traversing different values ​​of conditional observation variables and different time-series operating conditions to form a boundary point sample set covering the supply support area, the consumption support area, and the complementary balance area.

[0280] Furthermore, the boundary solver includes an attention mechanism layer, a convolutional layer, and a fully connected layer. The attention mechanism layer is used to identify the key coupling relationships between boundary point location features, numerical features, and runtime condition features; the convolutional layer is used to extract local coupling features between different observation dimensions; and the fully connected layer is used to map abstract features to the boundary value label space.

[0281] This embodiment uses Test System I to verify the training convergence, accuracy, and timeliness of the boundary solver. Test System I adopts a two-province interconnected power grid composed of the Institute of Electrical and Electronics Engineers (IEEE)-118-node system and one IEEE-39-node system, with a peak power load of 14,820 megawatts (MW) and a renewable energy penetration rate of approximately 39%. The electro-hydrogen coupling equipment and the corresponding wind farm are deployed on the same node, and the total hydrogen energy storage capacity is configured according to a certain proportion of the conventional power generation capacity.

[0282] To verify training convergence, five boundary characterization methods, M1-M5, were used for comparison. M1 represents the data-model hybrid driving method proposed in this invention; M2 is a Convolutional Neural Network (CNN)-Fully Connected (FC) model without model-driven attention mechanism (AM); M3 is a CNN-FC network considering model-driven behavior; M4 is a Deep Neural Network (DNN) model considering model-driven behavior; and M5 is an AM-DNN network considering model-driven behavior. Figure 5 It can be seen that M1 has the smallest convergence algebra and convergence loss value, and can achieve stable convergence in only about 10 generations, while M2 requires about 75 generations. This shows that the model constraint regularization factor can provide effective correction gradients for network parameters and significantly improve the training efficiency of the boundary solver.

[0283] To verify accuracy, the point-by-point simulation method M6 based on the interior point method was used as a high-precision benchmark method. 400 boundary point test samples were selected under different observation sections, different hydrogen storage capacities, and different source load scenarios in test system I, and the output boundary of M1 was compared with the calculated boundary of M6. Figure 6It can be seen that the M1 output curve almost covers the baseline curve, and the absolute errors of both are relatively small compared to the target observed variable label values. Meanwhile, the Mean Absolute Percentage Error (MAPE), Maximum Percentage Error (MPE), and Adjusted R-Squared (ARS) are used as accuracy evaluation indicators.

[0284] Table 1. Accuracy Indicators of the Boundary Characterization Method Proposed in Test System I

[0285]

[0286] As shown in Table 1, the average percentage error of M1 compared to M6 is 0.21%, the maximum percentage error is 2.61%, and the corrected coefficient of determination is close to 1, indicating that the boundary solver has high fitting accuracy and strong generalization ability in test system I.

[0287] To further verify the computational efficiency, M7 and M8 were set as comparison methods. M7 is a comparison method based on fast boundary search, and M8 is a comparison method based on parallel optimization search. The number of search steps was set to 80, and the solution time of different methods in the boundary of the two-dimensional electric hydrogen virtual energy pool of the test system I was recorded.

[0288] Table 2 Comparison of 2D boundary solution time for test system I

[0289]

[0290] As shown in Table 2, M1 can solve the boundary of the two-dimensional hydrogen virtual energy pool of the test system in seconds. The average time taken for a single boundary point is improved by more than 99.99% compared with the traditional optimization search method, which can meet the needs of online analysis of hydrogen energy support capabilities and real-time calling of the security layer.

[0291] Furthermore, the boundary of the hydrogen-electric virtual energy pool is embedded as a safety layer independent of the environment in the multi-agent safety reinforcement learning process. After each provincial power grid agent generates the original hydrogen energy support action, the safety layer first determines whether the action is within the parameterized boundary; if the action is within the feasible region, it is executed directly; if the action goes out of bounds, it is corrected to be within the feasible region or on the boundary through the projection operator, and the degree of action exceeding the limit is fed back to the agent as a cost term.

[0292] To verify the effectiveness of the context-aware multi-agent Benders-Combined Robust Soft Actor-Critic (CMA-BC-RSAC) algorithm with an embedded electric-hydrogen virtual energy pool security layer, two methods, M9 and M10, were compared: M9 is the CMA-BC-RSAC algorithm with an embedded electric-hydrogen virtual energy pool security layer proposed in this invention, where the agent only observes the boundary of the electric-hydrogen virtual energy pool represented by the neural network; M10 is the CMA-BC-RSAC algorithm that extends the global information of the electric-hydrogen coupling system, directly incorporating the internal equipment information of the hydrogen energy system into the agent's state space, serving as a benchmark method for verifying feasibility and accuracy.

[0293] Depend on Figure 8 It can be seen that M10, due to its ability to acquire global state information of the electro-hydrogen system, tends to stabilize around generation 4426; while M9, which only utilizes boundary equivalence information, needs to explore and learn the boundary characteristics of the electro-hydrogen virtual energy pool, and achieves stability around generation 6742. Although M9 has a relatively slower convergence speed, its final total reward value highly overlaps with that of M10, approximately -1.24 × 10⁻⁶. 8 Furthermore, the total cost values ​​are extremely close. This result demonstrates that the boundary of the electric-hydrogen virtual energy pool can effectively characterize the feasible region of complex electric-hydrogen coupling systems. The strategy obtained based on this security layer is close to the baseline strategy when global information is available, while significantly reducing the reliance on privacy data within the hydrogen energy entity.

[0294] Furthermore, a two-dimensional electric-hydrogen virtual energy pool was constructed based on Test System I, and its hydrogen energy support capability was analyzed. The initial time period t=1 and the final time period t=720 of the time-series simulation cycle were selected to obtain the two-dimensional electric-hydrogen virtual energy pool collaboratively constructed by Test System I, as shown below. Figure 9 As shown.

[0295] Depend on Figure 9 It can be seen that the boundary of the electric-hydrogen virtual energy pool forms a closed, bounded, nonlinear, and time-varying feasible domain space across all quadrants. The first quadrant is the supply support zone, indicating that the electric-hydrogen virtual energy pool provides power support to various provincial power grids through hydrogen-to-electricity equipment; the second and fourth quadrants are complementary balance zones, indicating that when one side is short of power and the other side has a surplus, energy transfer across space can be achieved through hydrogen energy; the third quadrant is the absorption support zone, indicating that the electric-hydrogen virtual energy pool absorbs surplus new energy power through electricity-to-hydrogen equipment.

[0296] Specifically, the port injection power range of hydrogen-rich region 2 is approximately [-2350, 1670], significantly larger than the range of hydrogen-poor region 1 [-798, 1053]. This difference directly quantifies the impact of hydrogen resource endowment on the provincial power grid's balancing support capacity. The third quadrant's absorption support area exhibits a bow-shaped nonlinear boundary, indicating that the new energy absorption capacity is affected not only by the power constraints of the power-to-hydrogen conversion equipment but also by the combined effects of network losses and inter-provincial transmission congestion.

[0297] Furthermore, based on the test system I, the impact of new energy penetration rate and inter-provincial initial hydrogen storage ratio on the boundary of the electric hydrogen virtual energy pool is analyzed.

[0298] When the penetration rate of new energy sources changes in increments of one percent, the virtual energy pools of hydrogen-electricity at different penetration rates are as follows: Figure 10 As shown. By Figure 10 It can be seen that as the penetration rate of new energy increases, the supply support area remains basically unchanged, while the consumption support area gradually expands and eventually reaches saturation. When the penetration rate of new energy is not higher than 20%, new energy can be mainly consumed by electricity load, and the consumption support area is small or even non-existent; when the penetration rate of new energy is between 20% and 42%, the power-to-hydrogen equipment absorbs surplus electricity through hydrogen production, and the scope of the consumption support area expands with the increase in penetration rate; when the penetration rate of new energy is higher than 42%, the consumption support capacity reaches saturation due to limitations in line capacity, hydrogen intake of hydrogen storage tanks, and capacity of power-to-hydrogen equipment, and further increasing the installed capacity of new energy will increase the risk of supply and demand imbalance.

[0299] When the initial total hydrogen storage capacity of hydrogen storage tanks in each province remains unchanged at 1580 megawatt-hours (MWh), and the new energy penetration rate is fixed at 32%, the virtual energy pool of electric hydrogen under the initial hydrogen storage capacity ratio among different provinces is as follows: Figure 11 As shown. By Figure 11 It can be seen that the initial hydrogen storage ratio between provinces mainly affects the supply support area. As the hydrogen storage gradually adjusts from a bias towards region 1 to a balanced configuration between the two regions, the supply support space gradually expands, reaching its maximum at a 3:3 ratio; when the hydrogen storage further shifts towards region 2, the supply support space gradually shrinks. This result indicates that the more balanced the spatial distribution of hydrogen energy resources, the lower the demand for inter-provincial hydrogen transportation, the better the local coupling effect of electricity and hydrogen, and the stronger the supply support capability.

[0300] Furthermore, based on the test system I, five hydrogen energy capacity scenarios were set up to analyze the impact of hydrogen energy support on the monthly power supply and demand balance of the regional interconnected power grid: Case 1 is without hydrogen energy support; Case 2 is with hydrogen energy support and the hydrogen energy capacity accounts for 4% of the conventional power installed capacity; Case 3 is 8%; Case 4 is 12%; and Case 5 is 16%.

[0301] Table 3. Supply and demand imbalance risk indicators of Test System I under various hydrogen energy capacity scenarios

[0302]

[0303] Where Pud represents the supply-demand imbalance rate, and Eud represents the expected power of the supply-demand imbalance.

[0304] Depend on Figure 12 As shown in Table 3, the risk of power supply and demand imbalance in Test System I decreases significantly with the increase in the proportion of hydrogen energy capacity. Without hydrogen energy coupling, the power supply and demand imbalance rate of Case 1 is 0.188%, and the expected imbalance power is 118.01 MW; when the proportion of hydrogen energy capacity increases to 16%, the power supply and demand imbalance rate of Case 5 decreases to 0.002%, and the expected imbalance power decreases to 0.3295MW, representing reductions of 98.9% and 99.7%, respectively.

[0305] Further analysis of the supply-demand imbalance distribution reveals that hydrogen energy coupling not only reduces the average imbalance power but also significantly compresses the range of imbalance power distribution, resulting in a substantial reduction in the number of outliers representing extreme tail risks. Taking the load distribution of the test system I as an example, the number of outliers decreased from 1240 in Case 1 to 11 in Case 5, with the core fluctuation range gradually converging to near the zero line. This indicates that the electricity-to-hydrogen conversion equipment can absorb surplus electricity when renewable energy output is abundant, while the hydrogen-to-electricity conversion equipment can provide supply support when electricity is scarce, thereby simultaneously mitigating the supply-demand imbalance risks caused by insufficient upward and downward adjustment capabilities.

[0306] Comparing Cases 2 through 5 reveals that the marginal effect of increasing hydrogen capacity on improving supply and demand balance exhibits a characteristic of first increasing and then decreasing. When hydrogen capacity is low, additional hydrogen capacity can significantly unleash the potential for synergistic regulation between electricity and hydrogen; however, once hydrogen capacity reaches a certain threshold, the system's self-regulation capability essentially meets most supply and demand balance requirements, and the marginal benefit of further increasing hydrogen capacity gradually diminishes. Therefore, in actual planning and operation, a reasonable hydrogen energy allocation ratio should be determined by considering factors such as the penetration rate of new energy sources, the intensity of regional interconnection, the distribution of hydrogen storage space, and the cost of hydrogen energy construction.

[0307] The simulation results of the above-mentioned test system I show that the present invention can achieve rapid characterization of the boundary of the hydrogen energy virtual energy pool, correction of safety actions, and quantification of the monthly supply and demand imbalance risk of the regional interconnected power grid under the condition that the internal state of the hydrogen energy body is not visible, and has high engineering applicability.

[0308] In summary, this embodiment verifies the quantification of hydrogen energy balance support capabilities, safety action correction, and risk analysis of supply and demand imbalance in regional interconnected power grids under conditions where the internal state of the hydrogen energy source is not visible.

Claims

1. A method for monthly power supply and demand balance analysis of regional interconnected power grids based on an electric hydrogen virtual energy pool, characterized in that, Includes the following steps: Step 1) Obtain monthly supply and demand balance analysis data of the regional interconnected power grid and hydrogen energy system operation data; Step 2) Based on the monthly supply and demand balance analysis data of the regional interconnected power grid and the operation data of the hydrogen energy system, the hydrogen production, storage, transmission and utilization resources are aggregated into a virtual energy pool using the electric-hydrogen coupling nodes of the regional interconnected power grid as energy interaction ports. Step 3) Divide the equivalent injection power at the port of the electric hydrogen virtual energy pool into target observation variables and conditional observation variables, and establish a feasible domain boundary optimization search model for the electric hydrogen virtual energy pool; Step 4) Generate boundary point samples of the feasible region boundary optimization search model using the point-by-point simulation method, and use a boundary solver driven by data and model hybridization to parameterize the feasible region boundary. Step 5) The parameterized feasible domain boundary is used as the security layer of the multi-agent security reinforcement learning framework. Feasibility verification and boundary correction are performed on the hydrogen energy support actions generated by each provincial power grid agent to generate the final execution action. Step 6) Based on the final execution action, conduct a monthly power supply and demand balance analysis of the regional interconnected power grid to obtain the monthly supply and demand balance analysis results.

2. The method for monthly power supply and demand balance analysis of a regional interconnected power grid based on an electro-hydrogen virtual energy pool according to claim 1, characterized in that, In step 2), the feasible space for supporting the electric hydrogen virtual energy pool is as follows: (1) In the formula, The equivalent injected power vector for the port of the hydrogen virtual energy pool; n is the provincial power grid number; t is the monthly time-series production simulation period; Let n be the variable for the operation decision of the provincial power grid system; Let n be the operating variables of the hydrogen energy system of the nth provincial power grid; Let n be the discrete operating state variable of the provincial power grid; For the power exchange of inter-provincial connecting lines; For uncertainties in new energy sources and load; , , , , , These are the coefficient matrices for the corresponding variables, and e is the coefficient vector. For the set of nonlinear inequalities constraint for regional interconnected power grids, Let N be the set of provincial power grids, and N be the number of provincial power grids. This is a topological correlation matrix for the interconnection of provincial power grids; The equivalent injection power of the nth provincial power grid's hydrogen virtual energy pool port is shown below: (2) In the formula, This represents the set of hydrogen-to-electricity conversion equipment within the nth provincial power grid. This represents the set of electricity-to-hydrogen conversion devices within the nth provincial power grid. The output power of the hydrogen-to-electricity conversion equipment; The power consumption of the electro-hydrogen conversion equipment.

3. The method for monthly power supply and demand balance analysis of a regional interconnected power grid based on an electro-hydrogen virtual energy pool according to claim 2, characterized in that, In step 3), as shown below: (3) In the formula, The target observation variable is the virtual injected power of the provincial power grid to be searched for boundary values; These are the conditional observation variables formed by the remaining provincial power grid ports; The given values ​​for the conditional observed variables.

4. The method for monthly power supply and demand balance analysis of a regional interconnected power grid based on an electro-hydrogen virtual energy pool according to claim 3, characterized in that, In step 4), the data structure for the boundary point samples is as follows: (4) In the formula, In hydrogen storage state, Hydrogen loading, , These are the upper and lower limits of the unit capacity, respectively. For electrical load, Contribute to new energy.

5. The method for monthly power supply and demand balance analysis of a regional interconnected power grid based on an electro-hydrogen virtual energy pool according to claim 4, characterized in that, The boundary solver includes an attention mechanism layer, a convolutional layer, and a fully connected layer; The matching weight matrix output by the attention mechanism layer is shown below: (5) In the formula, softmax is the normalization function; q is the data input matrix of the attention mechanism; W is the weight matrix; The dimension of the weight matrix; The feature matrix output by the convolutional layer is shown below: (6) In the formula, R is the convolution weight parameter matrix; f is the activation function; and b is the bias parameter. It is the convolution operator; The parameterized feasible region boundary output by the fully connected layer is shown below: (7) In the formula, This is the weight matrix of the fully connected layer. This is the bias column vector for the fully connected layer.

6. The method for monthly power supply and demand balance analysis of a regional interconnected power grid based on an electro-hydrogen virtual energy pool according to claim 5, characterized in that, The boundary solver was trained on a historical dataset with the training objective of minimizing the loss function. The loss function is shown below: (8) In the formula, MSE is the mean squared error function; Label is the boundary point sample label; For mathematical expectation; The regularization factor constrains the hydrogen virtual energy pool model; The weight coefficients of the data-driven loss term and the model-driven loss term are respectively determined.

7. The method for monthly power supply and demand balance analysis of a regional interconnected power grid based on an electro-hydrogen virtual energy pool according to claim 5, characterized in that, In step 5), the joint observation space in the multi-agent security reinforcement learning framework expands the boundary state of the hydrogen-electric virtual energy pool based on the local observation state of each provincial power grid; The local observation status of each provincial power grid intelligent agent is shown below: (9) In the formula, This represents the local observation state of the nth provincial power grid intelligent agent at time t. The boundary state of the feasible domain of the electric hydrogen virtual energy pool is obtained by parameterization of the boundary solver; For boundary solver network parameters; The hydrogen energy support actions generated by the smart grid agents of each province include unit start-up and shutdown decisions and hydrogen energy support injection power at the port of the electric hydrogen virtual energy pool; The original actions of each provincial power grid intelligent agent are as follows: (10) In the formula, The unit start-up and shutdown decision at time t; The hydrogen energy support action at time t is the virtual port of the hydrogen energy system. The final action is as follows: (11) In the formula, Projection operator for the safety layer of the hydrogen virtual energy pool; The original hydrogen energy support action vectors generated for each provincial power grid intelligent agent; , These are the projection functions under the supply-demand complementarity model and the projection functions under the supply-demand complementarity model, respectively. The projection functions under the supply-demand complementarity model and the projection functions under the supply-demand complementarity model are shown below: (12) (13) In the formula, Let g be the power output of unit g in the nth provincial power grid intelligent entity at time t. Let w be the output of the new energy generating unit in the nth provincial power grid intelligent entity at time t. Let g be the output of unit g in the m-th provincial power grid smart entity at time t. Let w be the output of the new energy generating unit in the m-th provincial power grid intelligent entity at time t. Let i be the load demand of load node i in the nth provincial power grid intelligent agent at time t. Let i be the load demand of load node i of the m-th provincial power grid intelligent agent at time t. These represent the set of conventional generating units, the set of load nodes, and the set of new energy generating units within the nth provincial power grid. These represent the set of conventional generating units, the set of load nodes, and the set of new energy generating units within the m-th provincial power grid.

8. The method for monthly power supply and demand balance analysis of a regional interconnected power grid based on an electro-hydrogen virtual energy pool according to claim 7, characterized in that, The steps of the multi-agent safety reinforcement learning framework for feasibility verification and boundary correction of hydrogen energy support actions generated by provincial power grid agents include: A context encoder is used to encode the historical interaction trajectories of each provincial power grid agent into latent variables that characterize the supply and demand intentions of neighboring provinces and the regional balance status. The latent variables and local observations are used together as input to the action policy network, and the action policy network is used to output the final action.

9. A method for monthly power supply and demand balance analysis of a regional interconnected power grid based on an electro-hydrogen virtual energy pool, as described in claim 8, is characterized in that... The context encoder is trained using the information bottleneck principle, and the loss function used during training is shown below: (14) In the formula, As an auxiliary decoder; The latent space regularization coefficient; Let KL divergence be a metric. For local observation at the next moment; The loss function used during the training of the action policy network is shown below: (15) In the formula, For the action policy network of the nth agent; For policy network parameters; For the Lagrange multipliers corresponding to the entropy constraint, For the Lagrange multipliers corresponding to the safety cost constraint, It is a mixed joint action; This is the global state; For a joint latent variable vector; These are latent variables; Networks are evaluated for profitability; For global experience replay pool, Let the threshold value be the safety cost constraint for the nth provincial power grid intelligent agent. The entropy temperature coefficient For the Lagrange dual multipliers corresponding to the safety cost constraint, The entropy threshold is the target entropy threshold for the strategy. The hidden variables are shown below: (16) (17) In the formula, Let be a random variable that follows a standard normal distribution, and ⊙ be the Hadamard product; Let be the mean vector of the latent variable distribution. Let be the log-variance vector of the latent variable distribution; For context encoder networks, For context encoder network parameters; The historical interaction trajectory of the nth provincial network intelligent agent at time t; The historical interaction trajectory of the nth provincial network agent at time t is shown below: (18) In the formula, H is the length of the historical time window; These are the local observations, actions, reward information, and cost information for the past H time steps, respectively. Reward Information As shown below: (19) (20) (21) (22) (23) (24) (25) In the formula, For unit start-up and shutdown costs, This is a penalty for region n violating the constraints on the duration of unit startup or shutdown. The optimal power generation cost for the province is obtained by solving the optimal power flow problem based on the relaxation of subproblems. As a project to share the risk of imbalance across the entire network, As a source of responsibility for the imbalance in this province, Compensation for hydrogen energy support services; The penalty coefficient for exceeding the limit of the unit duration constraint. The penalty coefficient corresponding to the risk-sharing item of network-wide imbalance; To prevent the minimum value where the denominator is zero, This refers to the penalty coefficient corresponding to the source item of the imbalance responsibility in this province. Compensation coefficient for unit hydrogen energy support services; Cost information As shown below: (26) (27) (28) (29) In the formula, To mitigate the risk and cost of supply and demand imbalance across the entire network, To reduce the cost of exceeding the limit on the start-up and shutdown duration of the power generation units in this province. This refers to the degree of exceedance of hydrogen energy support actions based on the boundary of the electric hydrogen virtual energy pool; Let be the unit start-up / shutdown state vectors at time t and the previous time, respectively. This represents the unit's continuous start-up and shutdown time vector from the previous moment. These are the load shedding slack and the wind / solar curtailment slack, respectively. For a set of joint strategies, Let N be the action strategy function of the Nth provincial power grid intelligent agent. This is the unit penalty coefficient for exceeding the limit of the unit start-up and shutdown duration constraint. Let g be the minimum downtime of the g-th generator unit in the n-th provincial power grid. Let g be the minimum operating duration of the g-th generator unit in the n-th provincial power grid.

10. A method for monthly power supply and demand balance analysis of a regional interconnected power grid based on an electro-hydrogen virtual energy pool, as described in claim 8, is characterized in that... In step 6), the monthly supply and demand balance analysis results include the unit start-up and shutdown sequence, inter-provincial mutual assistance power, hydrogen energy support power, supply and demand imbalance rate, and expected supply and demand imbalance power.