A power distribution network-microgrid group planning and operation collaborative optimization method and system, and a medium

By constructing a hierarchical hydrogen energy network and a multi-agent collaborative optimization method, the problem of separation between planning and operation in the distribution network-microgrid group was solved, realizing dynamic coordination between equipment capacity and operation strategy, improving the system's adaptability and efficiency, and optimizing the regulation capability of electric vehicles.

CN123163003APending Publication Date: 2026-11-24SHANGHAI UNIVERSITY OF ELECTRIC POWER
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202611322390.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-28
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

In existing technologies, the planning and operation of distribution networks and microgrid clusters are separated, resulting in overly conservative planning schemes or redundant investments. The integration of hydrogen energy systems is low, the mobile energy storage potential of electric vehicles is not fully utilized, and the lack of multi-entity coordination mechanisms makes it difficult to achieve dynamic coordination under the uncertainty of new energy output and load demand.

Method used

A hierarchical hydrogen energy network is constructed, which interconnects the centralized hydrogen energy system on the distribution network side with the distributed hydrogen energy units on each microgrid side. Through a two-layer optimization architecture with alternating planning and operation layers, combined with the dispatchable power boundary of electric vehicle aggregators, collaborative optimization of all entities is achieved, and multi-agent reinforcement learning is used for decision-making.

Benefits of technology

It enables dynamic coordination between equipment capacity configuration and operation strategy, improves the system's adaptability to new energy output and load demand, enhances the utilization efficiency of hydrogen energy system, optimizes the regulation capability of electric vehicles, and protects the data privacy of decision-makers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123163003A_ABST
    Figure CN123163003A_ABST
Patent Text Reader

Abstract

This invention discloses a method, system, and medium for the coordinated optimization of planning and operation of a distribution network-microgrid cluster. The method includes: acquiring operational data of the distribution network and microgrids, as well as the access status and state of charge (SOC) of electric vehicles; establishing a hierarchical hydrogen energy network interconnected with centralized and distributed hydrogen energy, constructing and solving a planning layer model to obtain an equipment configuration scheme; determining the dispatchable power boundary of the aggregator based on the electric vehicle access status, SOC, and battery capacity; constructing an operation layer model based on the configuration scheme, coordinating the optimization of each microgrid and the aggregator as independent decision-making entities to generate an operation strategy; iterating alternately between the configuration scheme and the operation strategy until convergence, outputting the equipment configuration scheme and the corresponding operation strategy; and converting the operation strategy into power control commands for execution. This invention achieves dynamic coordination of equipment capacity configuration and real-time operation scheduling in a distribution network-microgrid cluster through alternating planning and operation iterations and the coordinated scheduling of hydrogen energy and electric vehicles.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of smart grid operation and control technology, and in particular to a method, system and medium for the coordinated optimization of planning and operation of distribution network-microgrid groups. Background Technology

[0002] With the deepening of the "dual carbon" goal, high-proportion renewable energy sources, represented by wind and solar, are being rapidly integrated into distribution networks and microgrid systems. However, the strong intermittency, randomness, and anti-peak-shaving characteristics of renewable energy output pose severe challenges to the system in terms of power balance and voltage stability. At the same time, the continuous improvement of the electrification level of end-user energy, especially the large-scale access of electric vehicles, further exacerbates the uncertainty on both the source and load sides. Under the condition of high-proportion renewable energy access, how to achieve safe and economical operation of distribution networks and microgrid clusters has become a research hotspot in the field of power system planning and operation.

[0003] Hydrogen energy, as a clean and efficient secondary energy carrier, possesses unique advantages in long-term energy storage and cross-cycle regulation, effectively compensating for the shortcomings of battery storage in terms of energy density and storage duration. Meanwhile, electric vehicles, as a mobile energy storage resource, can achieve spatiotemporal energy transfer through V2G technology, exhibiting characteristics of fast response and flexible dispatch. Integrating the combined response capabilities of hydrogen energy systems and electric vehicles into the planning and operation of distribution networks and microgrid clusters to construct an electric-hydrogen-vehicle multi-energy collaborative system is an important technological path to improve the absorption capacity of new energy sources and the economic efficiency of system operation.

[0004] However, existing research has the following shortcomings: (1) Planning and operation are separated, making it difficult to achieve global optimization. Most existing technologies handle the expansion planning of the distribution network, the capacity configuration of the hydrogen energy system and the operation scheduling strategy separately. They adopt a progressive method of planning first and then operation. The planning stage is based on static estimation of typical days and fails to fully consider the reverse impact of operation strategy on the planning scheme, resulting in overly conservative planning schemes or redundant investment.

[0005] (2) The hydrogen energy system has low integration and lacks a centralized-distributed collaborative architecture. Current technologies often treat hydrogen energy systems simply as stationary energy storage devices, or only configure them on the distribution network side, or only deploy them within a single microgrid. There is a lack of system modeling for centralized + distributed hierarchical hydrogen energy networks, resulting in low overall utilization efficiency of hydrogen energy systems.

[0006] (3) Electric vehicles are only treated as loads, and their potential for mobile energy storage has not been fully explored. In most planning and operation models, electric vehicles are still simply regarded as time-shiftable charging loads, and their V2G discharge capacity and dispatchable domain as mobile energy storage resources have not been fully utilized.

[0007] (4) The lack of multi-subject collaborative mechanism. Existing studies mostly adopt centralized optimization methods, assuming that all subjects share complete information and obey unified scheduling, ignoring the local observation characteristics and decision autonomy of each subject.

[0008] A search revealed that application publication number CN121261325A discloses a multi-agent collaborative integrated optimization method and system for distribution network planning and operation. This scheme divides the power generation, grid, load, and storage entities into independent agents, constructing a two-layer multi-agent game model including a planning layer and an operation layer. The planning layer solves for the optimal capacity configuration for each agent and transmits it to the operation layer as a constraint boundary. The operation layer then feeds back the operational benefits to the planning layer to update the reward function. However, this scheme uses a one-way capacity transfer and benefit feedback mechanism between the planning and operation layers, lacking a bidirectional iterative mechanism for configuration schemes and operation strategies. This fails to ensure that the planning scheme and operation strategy converge synchronously during the iteration process. Furthermore, the action constraint boundaries of each agent in the operation layer are statically calculated from the capacity parameters of the planning layer, failing to dynamically adjust with real-time fluctuations in renewable energy output and load, resulting in a mismatch between the feasible domain of the operation strategy and the actual operating state of the system.

[0009] Therefore, how to achieve dynamic coordination between the planned capacity allocation and real-time operation scheduling of various regulating resources in the distribution network-microgrid group under the condition that there is strong uncertainty between the output of new energy sources and the load demand is a technical problem that needs to be solved. Summary of the Invention

[0010] The purpose of this invention is to overcome the defects of the prior art by providing a method, system and medium for the coordinated optimization of planning and operation of distribution network-microgrid groups.

[0011] The objective of this invention can be achieved through the following technical solutions: According to a first aspect of the present invention, a method for coordinated optimization of planning and operation of a distribution network-microgrid group is provided, comprising: Acquire operational data of the distribution network and microgrid, as well as the access status and state of charge information of electric vehicles under the jurisdiction of electric vehicle aggregators; A hierarchical hydrogen energy network is established, which interconnects the centralized hydrogen energy system on the distribution network side with the distributed hydrogen energy units on each microgrid side. A planning layer optimization model is constructed and solved to obtain an equipment configuration scheme that includes the capacity of the centralized hydrogen energy system and the distributed hydrogen energy units. The schedulable power boundary of the electric vehicle aggregator is determined based on the access status, state of charge, and battery capacity of each electric vehicle. Based on the equipment configuration scheme, an operation layer optimization model is constructed, and each microgrid and the electric vehicle aggregator are treated as independent decision-making entities for collaborative optimization, generating operation strategies for each entity; The device configuration scheme and the operation strategy are alternately iterated until the change in the device configuration scheme is less than a preset threshold in a predetermined number of consecutive iterations, and then the device configuration scheme and the corresponding operation strategy are output. The operating strategy is converted into power control commands for each controllable device and then issued for execution.

[0012] As a preferred technical solution, the dispatchable power boundary of the electric vehicle aggregator includes upward reserve capacity. and downward reserve capacity The calculation formulas are as follows: , , in, For electric vehicles, The total number of electric vehicles. and The first The maximum discharge power and maximum charging power of an electric vehicle and These represent the actual discharge power and the actual charging power during time period t, respectively. The state of charge at time t, and These represent the minimum and maximum states of charge, respectively. For the battery's rated capacity, and These are discharge efficiency and charging efficiency, respectively. For time intervals.

[0013] As a preferred technical solution, the distributed hydrogen energy units are respectively configured within each microgrid; the sum of the capacity of the centralized hydrogen energy system and the capacity of the distributed hydrogen energy units within each microgrid satisfies the regional hydrogen energy supply and demand balance constraint. , , in, and These are the centralized hydrogen energy system and the microgrid, respectively. The rated power of the electrolyzer in the internal distributed hydrogen energy unit, and These are the corresponding rated capacities of the hydrogen storage tanks. For microgrid collection, and These are the minimum electrolysis power and minimum hydrogen storage capacity required to meet the region's hydrogen energy demand, respectively.

[0014] As a preferred technical solution, the equipment capacity of the centralized hydrogen energy system on the distribution network side includes the rated power of the centralized electrolyzer, the rated power of the centralized fuel cell, and the rated capacity of the centralized hydrogen storage tank; the capacity of the distributed hydrogen energy unit on the microgrid side includes the rated power of the distributed electrolyzer, the rated power of the distributed fuel cell, and the rated capacity of the distributed hydrogen storage tank.

[0015] As a preferred technical solution, in the operation layer optimization model, each microgrid and the electric vehicle aggregator correspond to an intelligent agent, and the reward function of each intelligent agent... The calculation formula is: , in, For intelligent agents During the period Operating costs The carbon emission cost of agent i, Penalties for power imbalance and equipment exceeding limits. For collaborative reward items, , , These are the weighting coefficients; The penalty item The calculation formula is: in, This refers to the state of charge of the energy storage device during time period t. and These are its lower limit and upper limit, respectively. This represents the power imbalance of the microgrid during time period t. and This is the penalty coefficient.

[0016] As a preferred technical solution, the collaborative reward item The calculation formula is: , in, For microgrids The net exchange power with the distribution network during time period t. For distribution network dispatching reference values, The net exchange power of electric vehicle aggregators in time period t. This is an indicator function, whose value is 1 if the product of the net exchange power is less than 0, and 0 otherwise. This is the reward coefficient.

[0017] As a preferred technical solution, the operation strategy of each microgrid includes time-series scheduling instructions for gas turbine output, energy storage charging and discharging power, distributed electrolyzer power consumption, and distributed fuel cell power generation; the operation strategy of the electric vehicle aggregator includes time-series scheduling instructions for total charging power and total V2G discharging power.

[0018] As a preferred technical solution, in the operation layer optimization model, the agents of each microgrid and the electric vehicle aggregator are trained using a centralized training-decentralized execution framework; during training, the commentator network of each agent obtains global state information and joint action information of all agents to evaluate the policy; during execution, the policy network of each agent outputs actions based only on its own local observation information.

[0019] According to a second aspect of the present invention, a system is provided for implementing the method for coordinated optimization of planning and operation of the distribution network-microgrid group, comprising: The data acquisition module is used to acquire the operation data of the distribution network and microgrid, as well as the access status and charge status information of electric vehicles under the jurisdiction of the electric vehicle aggregator. The planning layer processing module is used to establish a hierarchical hydrogen energy network that interconnects the centralized hydrogen energy system on the distribution network side with the distributed hydrogen energy units on each microgrid side, construct and solve the planning layer optimization model, and output the equipment configuration scheme. The operation layer processing module determines the schedulable power boundary of the electric vehicle aggregator based on the access status, state of charge and battery capacity of each electric vehicle, and generates the operation strategies of each microgrid and the electric vehicle aggregator based on the equipment configuration scheme using a multi-agent reinforcement learning model. The iterative optimization module is used to alternately iterate between the device configuration scheme and the operation strategy until the change in the device configuration scheme is less than a preset threshold in a predetermined number of consecutive iterations, and then outputs the device configuration scheme and the corresponding operation strategy. The control execution module is used to convert the operation strategy into power control commands for each controllable device and send them to the corresponding execution mechanism for execution.

[0020] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method described thereon.

[0021] Compared with the prior art, the present invention has the following advantages: 1. This invention constructs a two-layer optimization architecture with alternating iterations between the planning layer and the operation layer, enabling the equipment capacity configuration scheme to be adaptively adjusted based on the operational effects fed back from the operation layer. At the same time, it ensures that the operation strategy is precisely matched with the actual equipment capacity, realizing dynamic coordination between planned capacity configuration and real-time operation scheduling of regulation resources such as hydrogen energy storage and electric vehicles in the distribution network-microgrid group. This avoids the mismatch between equipment capacity configuration and power balance demand caused by the disconnect between planning and operation, and improves the system's adaptability to environments with strong uncertainties in new energy output and load demand.

[0022] 2. This invention establishes a hierarchical hydrogen energy network that interconnects a centralized hydrogen energy system on the distribution network side with distributed hydrogen energy units on each microgrid side. This combines the scale effect of centralized hydrogen production with the response of distributed hydrogen consumption. The centralized system undertakes regional-level electricity-hydrogen conversion and cross-cycle energy storage, while the distributed units undertake short-term power balance within the microgrid. The two systems complement each other in capacity, thereby improving the overall utilization efficiency of the hydrogen energy system at both the regional and local time scales.

[0023] 3. This invention determines the schedulable power boundary of the aggregator based on the electric vehicle's access status, state of charge, and battery capacity. This transforms the electric vehicle from a load model with a fixed power range into a flexible adjustment node subject to both instantaneous power limits and remaining available energy. This dynamically links the adjustment capability of the electric vehicle aggregator with the real-time energy state and time constraints of each vehicle, providing an accurate electric vehicle adjustment capability boundary for operational layer optimization and avoiding scheduling schemes that are infeasible due to adjustment capability estimation errors.

[0024] 4. This invention achieves collaborative optimization by treating each microgrid and electric vehicle aggregator as independent decision-making entities. During the training phase, each decision-making entity learns collaborative strategies using global information, and during the execution phase, it can output decisions based solely on its own local observation information. This eliminates the need for each entity to share private information such as load curves and energy consumption habits, thus protecting the data privacy of each decision-making entity while realizing multi-entity collaborative optimization. Simultaneously, by designing a reward function that includes power imbalance penalties and collaborative rewards, the invention guides electric vehicle aggregators to discharge during peak periods of microgrid net load and charge during off-peak periods, achieving spontaneous complementarity between electric vehicles and microgrids and reducing the system peak-valley difference. Attached Figure Description

[0025] Figure 1 This is a diagram illustrating the overall architecture of the method of the present invention; Figure 2 This is a flowchart of the upper-level planning and solving process of the method of the present invention; Figure 3 This is a flowchart illustrating the lower-level operation and solution process of the method of the present invention; Figure 4 This is a flowchart of the two-layer iterative solution method of the present invention; Figure 5 This is a diagram of the distribution network-microgrid group system architecture according to an embodiment of the present invention; Figure 6 The convergence curve of the PSO algorithm in this embodiment of the invention; Figure 7 This is a capacity configuration diagram of a hydrogen energy device according to an embodiment of the present invention; Figure 8 This is a diagram illustrating the typical daily operating cost of an embodiment of the present invention. Figure 9 A comparison of typical daily carbon emission curves in embodiments of the present invention; Figure 10 This is a voltage distribution diagram of IEEE 33 nodes according to an embodiment of the present invention; Figure 11 This is a flowchart of the method of the present invention. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0027] Example 1: like Figure 1 and Figure 11 As shown, this invention provides a method for coordinated optimization of planning and operation of distribution network-microgrid groups, including: Step S1: Obtain the operation data of the distribution network and microgrid, as well as the access status and charge status information of electric vehicles under the jurisdiction of the electric vehicle aggregator, and perform scenario modeling for the uncertainty of new energy output and load; Step S2: Establish a hierarchical hydrogen energy network interconnected by a centralized hydrogen energy system on the distribution network side and distributed hydrogen energy units on each microgrid side. Construct and solve a planning layer optimization model to obtain an equipment configuration scheme that includes the capacity of the centralized hydrogen energy system and the distributed hydrogen energy units. The planning layer optimization model takes minimizing the sum of the total life cycle investment cost of the equipment and the operating cost fed back from the lower layer as the optimization objective, and uses the distribution network expansion variable and the hydrogen energy system capacity as decision variables. Step S3: Determine the dispatchable power boundary of the electric vehicle aggregator based on the access status, state of charge, and battery capacity of each electric vehicle. The dispatchable power boundary includes upward reserve capacity and downward reserve capacity, reflecting the power regulation capability that the electric vehicle aggregator can provide as a mobile energy storage resource; Step S4: Based on the equipment configuration scheme, construct an operation layer optimization model, treat each microgrid and the electric vehicle aggregator as independent decision-making entities for collaborative optimization, generate operation strategies for each entity, and coordinate the timing output of gas turbines, energy storage devices, hydrogen energy devices and electric vehicle aggregators in each microgrid with the goal of minimizing typical daily operating costs. Step S5: Iterate alternately between the device configuration scheme and the operation strategy until the change in the device configuration scheme is less than a preset threshold in a predetermined number of consecutive iterations, and output the optimal device configuration scheme and the corresponding optimal operation strategy; Step S6: Convert the optimal operating strategy into power control commands for each controllable device and issue them for execution.

[0028] The steps of this invention will be described in detail below.

[0029] Step S101: Data acquisition and uncertainty scenario modeling.

[0030] Step S1011: Data acquisition.

[0031] Acquire electrical operating parameters for each node in the distribution network, including node voltage amplitude, phase angle, and branch impedance parameters; acquire predicted output data for various types of distributed power sources, including solar intensity and output predictions for photovoltaic power generation systems, and wind speed and output predictions for wind power generation systems; acquire load forecast data, including time-series load forecast curves for each microgrid; acquire access status and state of charge information for electric vehicles under the jurisdiction of electric vehicle aggregators, including access time, expected departure time, current state of charge, battery rated capacity, maximum charging and discharging power, and user-set minimum state of charge requirements for off-grid operation for each electric vehicle.

[0032] Step S1012: Modeling the uncertainty of new energy output.

[0033] Photovoltaic power output is significantly affected by light intensity and temperature, exhibiting marked randomness and intermittency. This invention uses a Beta distribution to describe the probabilistic characteristics of photovoltaic power output, fitting the distribution parameters using historical data; photovoltaic power output prediction value. Compared with actual value The relationship between them can be represented as: , In the formula: The prediction error follows a mean of 0 and a standard deviation of . The normal distribution; Predicted values ​​for photovoltaic power output.

[0034] Wind power output forecast Compared with actual value The relationship between them is: , In the formula: The wind power prediction error follows a normal distribution. , Let be the standard deviation of the prediction error for time period t.

[0035] Step S1013: Modeling load uncertainty.

[0036] Load demand is affected by multiple factors such as season, time of day, weather conditions, and user behavior, exhibiting a certain degree of random fluctuation. The actual load of node i in time period t Represented as: , In the formula: Forecast values ​​for load points; The load forecasting error follows a normal distribution. .

[0037] Step S1014: Modeling the uncertainty of electric vehicle user behavior.

[0038] Electric vehicle access behavior is influenced by users' travel habits and has significant randomness. This invention uses the Monte Carlo method to generate individual electric vehicle behavior scenarios, and then obtains the schedulable domain of the aggregator through aggregation.

[0039] Access time of electric vehicle v Follows a truncated normal distribution: In the formula: This represents the average access time. Standard deviation; and These are the minimum and maximum access times.

[0040] departure time of electric vehicle v Follows a truncated normal distribution: Daily mileage Follows a log-normal distribution: The initial SOC of an electric vehicle when it is engaged is determined by the daily mileage: In the formula: This represents the maximum driving range of electric vehicle v.

[0041] Step S1015: Scene generation and reduction.

[0042] To achieve a balance between computational feasibility and characterization of random fluctuations, this invention employs a method combining Latin hypercube sampling and K-means clustering for scene generation and reduction.

[0043] Latin hypercube sampling is used to generate a sample containing... Given a sample set of initial scenarios, for a K-dimensional random variable, the cumulative probability distribution function of each dimension is equally divided into... In each of the intervals, a point is randomly sampled, and then the sampled values ​​from each dimension are randomly combined to form... An initial scene.

[0044] Let the initial scene set be Each scene For a given set of time series data on photovoltaic power output, wind power output, load, and electric vehicle connection status, K-means clustering will... The initial scenes clustered into For a representative scenario, the clustering objective is to minimize the sum of squared Euclidean distances between the scenario and its cluster center: , In the formula: This is a binary indicator variable, which takes the value 1 when scenario k belongs to cluster j, and 0 otherwise. The center of cluster j is the clustering center, and each representative scene after clustering... probability weights This is the ratio of the number of scenes belonging to this cluster to the total number of scenes.

[0045] By generating and reducing the above scenarios, multiple preset operating scenarios and their probability weights are obtained, which are used for training and evaluation of the subsequent operation layer optimization model under different uncertainty scenarios. This process retains the main statistical characteristics of the output of new energy and the random fluctuation of load, and controls the computational complexity within the range acceptable for engineering, avoiding the computational explosion problem caused by traversing each scenario.

[0046] Step S201: Hierarchical hydrogen energy network and planning layer optimization model.

[0047] Step S2011: Hierarchical hydrogen energy network architecture.

[0048] This invention establishes a hierarchical hydrogen energy network that interconnects a centralized hydrogen energy system on the distribution network side with distributed hydrogen energy units on each microgrid side.

[0049] The centralized hydrogen energy system on the distribution network side is configured at the hub nodes of the distribution network. It includes large-capacity electrolyzers, large-capacity hydrogen fuel cells and large hydrogen storage tanks, and is responsible for large-scale electricity-hydrogen conversion and cross-cycle energy storage at the regional level. Each distributed hydrogen energy unit on the microgrid side is configured within each microgrid and includes a small-capacity electrolyzer, fuel cell and hydrogen storage tank. It is closer to the load center and has a fast response speed, and is used to meet the short-term power balance needs and local hydrogen energy supply within the microgrid. Centralized hydrogen energy systems and distributed hydrogen energy units are interconnected through hydrogen energy transmission channels to form a complete regional hydrogen energy network. The centralized system is responsible for large-scale hydrogen production and cross-cycle energy storage, while the distributed units are responsible for local hydrogen-to-electricity conversion and short-term balance. The two complement each other in terms of capacity and function.

[0050] Establishing a hierarchical hydrogen energy network can organically combine the economies of scale of centralized hydrogen production with the flexible response of distributed hydrogen use, overcoming the technical shortcomings of slow response of a single centralized system and high cost of a single distributed system, and realizing the coordinated utilization of hydrogen energy at both the regional and local time scales.

[0051] Step S2012: Decision variables of the planning layer optimization model.

[0052] The decision variables of the planning-level optimization model cover two categories: distribution network expansion variables and hydrogen energy system capacity variables.

[0053] Distribution network expansion variables include: binary variables for line expansion. This indicates whether branch (i,j) needs to be upgraded; the transformer capacity expansion is an integer variable. , indicating the number of transformers added to the capacity at node k.

[0054] All capacity variables of hydrogen energy systems are continuous variables, including: Centralized hydrogen energy system for power distribution network: Rated power of centralized electrolyzer Centralized fuel cell rated power Rated capacity of centralized hydrogen storage tank .

[0055] Microgrid m Distributed hydrogen energy unit: Rated power of distributed electrolyzer Rated power of distributed fuel cells Rated capacity of distributed hydrogen storage tanks .

[0056] Step S2013: Objective function of the planning layer optimization model.

[0057] The planning-level optimization model aims to minimize the annual comprehensive cost, which consists of two components: the annual value of investment cost and the annual value of operating cost. , In the formula: Annual comprehensive cost, Annual value of investment cost This represents the annual operating cost.

[0058] Annual value of investment cost The calculation uses the equivalent annual value method, converting the one-time investment into an equivalent annual value. For power distribution network expansion investment, it is calculated based on its useful life of 20 years; for hydrogen energy system equipment investment, it is calculated based on its useful life of 10 years. The specific calculation formula is as follows: , In the formula: r is the discount rate; For the lifespan of power grid equipment; For the lifespan of hydrogen energy equipment; The expansion investment cost for branch (i,j); Cost of increasing the capacity of a single transformer at node k; The unit power investment cost of the electrolytic cell; The unit power investment cost of fuel cells; The unit capacity investment cost of the hydrogen storage tank; For the set of routes; For the set of transformer nodes; It is a collection of microgrids.

[0059] Annual operating cost The results are obtained by aggregating the lower-level operation optimization results, including the electricity purchase cost of the distribution network to the upper-level grid, the fuel cost of gas turbines in each microgrid, the operation and maintenance depreciation cost of equipment, and the dispatch compensation cost of electric vehicle aggregators.

[0060] Step S2014: Constraints of the planning layer optimization model.

[0061] The planning-level optimization model includes the following constraints: (1) Regional hydrogen energy supply and demand balance constraints The sum of the capacity of the centralized hydrogen energy system and the capacity of the distributed hydrogen energy units within each microgrid must meet the minimum regional hydrogen energy demand: , , In the formula: Minimum electrolysis power required to meet regional hydrogen energy demand; Minimum hydrogen storage capacity to meet regional hydrogen energy demand.

[0062] This constraint embodies the hierarchical and collaborative concept of centralized as the main approach and distributed as a supplement. The capacity of the centralized system and the distributed system are not independent of each other, but together constitute the regional hydrogen energy supply system. The sum of the two must meet the overall hydrogen energy demand of the region. The physical meaning of this constraint is that, regardless of the operating scenario, the total hydrogen production capacity of all electrolyzers and the total hydrogen storage capacity of all hydrogen storage tanks in the region must reach a minimum guaranteed level to ensure that the system still has a basic hydrogen energy supply capacity when the output of new energy sources is insufficient or when the demand for hydrogen energy is high.

[0063] (2) Distribution network capacity safety constraints The expanded line capacity and transformer capacity must meet the N-1 safety criterion, meaning that the system can still operate normally even if any component fails and is taken out of service. , , In the formula: and These represent the original capacity and the expanded capacity of branch (i,j), respectively. For unit expansion increment; The peak power predicted for the planned horizontal year; The safety margin factor is N-1; and These represent the original capacity and the expanded capacity of the transformer at node k, respectively. For unit expansion increment; This is the peak power predicted for the planned horizontal year.

[0064] The N-1 safety constraint is an objective physical requirement for the safe and stable operation of a power system. It ensures that if any component (line or transformer) is taken out of service due to a fault, the remaining components can still bear the full load without overload, thereby ensuring power supply reliability and system safety.

[0065] (3) Investment budget constraints Investments in grid expansion and hydrogen energy systems are each subject to pre-set investment caps.

[0066] (4) Non-negativity of variables and integer constraints .

[0067] Step S2015: Solving the optimization model at the planning level.

[0068] like Figure 2 As shown, the planning layer optimization model belongs to the mixed integer nonlinear programming problem, in which line expansion is a binary variable, transformer expansion is an integer variable, and hydrogen energy system capacity is a continuous variable. This invention uses an improved particle swarm optimization algorithm to solve the problem.

[0069] Each particle is encoded as a hybrid vector that fully represents a planning scheme, containing all binary, integer, and continuous variables.

[0070] To balance the algorithm's global exploration capability and local exploitation capability, this invention employs an adaptive inertia weight strategy. Inertia weight Adaptive adjustment based on iteration number k and population fitness distribution: , In the formula: and These represent the maximum and minimum values ​​of the inertia weight; This represents the maximum number of iterations. , and These are the average, minimum, and maximum fitness values ​​of the k-th generation population, respectively. It is a very small positive number.

[0071] The design principle of adaptive inertia weight is as follows: In the early stages of algorithm iteration, the population is dispersed with significant differences in fitness. At this time, the inertia weight automatically maintains a large value to enhance global exploration capabilities and avoid prematurely falling into local optima. In the later stages of iteration, the population tends to converge, and the fitness distribution becomes concentrated. The inertia weight automatically decreases to promote fine-grained local search. When the population fitness distribution is concentrated (i.e., ... When the population fitness distribution is relatively small, the inertia weight is increased to prevent premature convergence; when the population fitness distribution is scattered, the inertia weight is decreased to accelerate convergence.

[0072] The particle velocity update formula is: , In the formula: Let be the velocity of particle i in the kth generation; This represents the historical best position of particle i; This is the historical best position for the population; , , For learning factors; , , It is a random number; The first term is a random vector; the last term is a random perturbation term, which is used to inject random perturbations into the particle velocity during the algorithm iteration process, helping the particles escape local optima and enhancing the diversity of the population.

[0073] For binary variables, the Sigmoid function is used to map the velocity to the probability of taking the value 1, and then the binary value is determined by random sampling. For integer variables, the rounding method is used.

[0074] The constraint handling employs an adaptive penalty function method, with the penalty factor in the k-th generation. Adaptive growth with iteration algebra: , In the formula: This is the initial penalty factor; This is the growth coefficient.

[0075] The fitness function of a particle is: , In the formula: Let be the violation amount of the j-th constraint.

[0076] The adaptive penalty function method uses a small penalty factor in the early stages of algorithm iteration, allowing the algorithm to explore outside the feasible region boundary to find a better solution; in the later stages of iteration, the penalty factor gradually increases, forcing the algorithm to converge to the feasible region and avoiding the final output of an infeasible solution.

[0077] Step S301: Determining the dispatchable power boundary of the electric vehicle aggregator.

[0078] Step S3011: Individual behavior model of electric vehicles.

[0079] This invention uses an electric vehicle aggregator as an intermediary between the microgrid and the electric vehicles, and each electric vehicle under the aggregator's jurisdiction has an independent battery model: , In the formula: Let v be the state of charge of the electric vehicle at the end of time period t; and For charging efficiency and discharging efficiency; This refers to the battery's rated capacity. For time intervals.

[0080] The battery SOC constraint and charge / discharge power constraint are as follows: , , , , In the formula: and It is a binary indicator variable for charging and discharging states.

[0081] User travel constraints require vehicles to meet minimum SOC requirements when leaving the network: , Furthermore, the vehicles only participate in dispatching during the period when they are connected to the power grid: , Step S3012: Dispatchable power boundary of electric vehicle aggregator.

[0082] Electric vehicle aggregators act as intermediaries, aggregating the charging and discharging capabilities of a large number of electric vehicles within a region. The total charging power and total V2G discharging power that the aggregator can dispatch are: , , The aggregator's net switching power is: , when At that time, the aggregator discharges into the power grid; when At that time, the aggregator charges from the power grid.

[0083] Upward backup capacity that aggregators can provide and downward reserve capacity Determine them according to the following formulas respectively: , , Upward reserve capacity This indicates the ability of electric vehicle aggregators to additionally discharge into the grid during time period t. This ability is limited by two factors: the first is the instantaneous power limit, which is the sum of the unused V2G discharge power of all electric vehicles. If the vehicles have already discharged at maximum power, there is no room for further upward adjustment. The second is the energy limit, which is the remaining dischargeable energy of all electric vehicles between their current state of charge and the minimum permissible state of charge, divided by the time interval. If the remaining energy of the vehicles is insufficient to support continuous discharge into the next time period, then even if there is a power margin, it cannot provide effective backup. Taking the minimum of these two factors accurately depicts the objective nature of EV aggregators as mobile energy storage, which are subject to both instantaneous power limits and remaining usable energy constraints. Similarly, downward reserve capacity... This indicates that the aggregator's ability to increase charging power is also limited by both instantaneous power limits and available charging space (i.e., how much energy the battery can still absorb).

[0084] This invention introduces the dimensions of SOC and remaining dwell time to dynamically link the power regulation capability of EV aggregators with the real-time energy state and time constraints of each vehicle. This allows the schedulable domain of the aggregator to accurately reflect the physical characteristics of electric vehicles as mobile energy storage. That is, its regulation capability depends not only on the rated value of the charging and discharging power hardware, but also on time-varying factors such as the current remaining battery power and the user's offline time. This provides a more accurate boundary for the EV regulation capability for subsequent operation layer optimization, avoiding the problem of infeasible or suboptimal scheduling schemes caused by overestimating or underestimating the EV regulation capability.

[0085] Step S401: Runtime layer optimization model and multi-agent collaborative optimization.

[0086] Step S4011: Optimize the architecture of the runtime model.

[0087] Based on the equipment configuration scheme obtained in step S201, the present invention constructs an operation layer optimization model, which treats each microgrid and electric vehicle aggregator as an independent decision-making entity for collaborative optimization.

[0088] Each microgrid must satisfy the active power balance constraint during time period t: The terms in the formula are photovoltaic power output, wind power output, gas turbine power output, fuel cell discharge power, energy storage discharge power, microgrid power purchase, EV V2G discharge power, load power, electrolyzer power consumption, energy storage charging power, EV charging power, and microgrid power sales.

[0089] The device operation constraints involved in the runtime optimization model include: (1) Operational constraints of distributed hydrogen energy units. The relationship between the hydrogen production rate and power consumption of the electrolyzer is determined by the electrochemical conversion efficiency. The output of the electrolyzer is limited by the rated power and ramp rate. The output of the fuel cell is limited by the rated power and minimum output. The amount of hydrogen in the hydrogen storage tank changes dynamically over time and is affected by hydrogen production, hydrogen consumption and external hydrogen sales. Its capacity constraints include the maximum hydrogen storage capacity limit and the minimum hydrogen storage level limit.

[0090] (2) Energy storage constraints. The charging and discharging power of battery energy storage is limited by the rated power, and the charging and discharging states are mutually exclusive. The dynamic evolution of the energy storage state of charge follows the law of conservation of energy and is constrained by the minimum and maximum charge. The charge at the beginning and end of the scheduling cycle must be kept consistent to ensure the sustainable use of energy storage.

[0091] (3) Gas turbine constraints. The output of a gas turbine is limited by the ramp rate and the upper and lower limits of output.

[0092] (4) Distribution network operation constraints. The DistFlow branch power flow model is used to describe the power flow of the distribution network, including node power balance constraints, branch voltage and current relationship constraints, node voltage safety constraints, and branch current carrying capacity constraints.

[0093] Step S4012: Multi-agent reinforcement learning modeling.

[0094] Traditional centralized optimization methods require all agents to share complete information and obey unified scheduling. In multi-agent scenarios, this approach faces engineering challenges such as high computational complexity and significant privacy risks. To address these issues, this invention models the runtime optimization problem as a multi-agent collaborative decision-making problem and employs multi-agent reinforcement learning for solution.

[0095] like Figure 3 As shown, each microgrid and electric vehicle aggregator is defined as an agent. At time t, agent i determines its local observation state. Select Action The combined actions of all agents constitute the system action, the environment transitions to the next state, and the system returns immediate rewards to each agent. .

[0096] The state space design of the agent is as follows: For a microgrid intelligent agent m, its local observation status includes: photovoltaic power output forecast, wind power output forecast, load forecast, energy storage charge status, hydrogen storage tank hydrogen charge status, time-of-use electricity price information, power output of each device in the previous time period, and dispatch instructions from electric vehicle aggregators.

[0097] For the electric vehicle aggregator intelligent agent, its local observation status includes: the net load forecast of each microgrid, time-of-use electricity price information, the SOC distribution histogram of all connected electric vehicles, the remaining dwell time distribution of all connected electric vehicles, the total charging and discharging power of the previous period, and the reserve demand of each microgrid.

[0098] The action space design for each agent is as follows: For a microgrid intelligent agent m, its actions include: gas turbine output, energy storage charging power, energy storage discharging power, electrolyzer power consumption, and fuel cell power generation.

[0099] For electric vehicle aggregator intelligent agents, their actions include: total charging power and total V2G discharge power.

[0100] Step S4013: Design the reward function.

[0101] This invention designs the reward function for each agent as the sum of negative operating costs, constraint violation penalties, and collaborative rewards: , In the formula: Let $t be the operating cost (in yuan) of agent i in time period t. The carbon emission cost (in yuan) for agent i. To constrain violations and penalties; For collaborative reward items; , , , These are the weighting coefficients.

[0102] This reward function design decomposes the optimization objective of the multi-agent system into three quantifiable reward and penalty components. By adjusting the weight coefficients, it guides the behavior of each agent to converge toward the system's optimal direction. Specifically, the first component encourages agents to reduce their own operating costs, such as reducing electricity purchases and optimizing equipment output. The second component forces agents to comply with the physical security constraints of the power system, such as power balance and SOC limits. The third component incentivizes agents to form complementary scheduling behaviors with other agents, such as EVs discharging during peak loads and charging during off-peak hours.

[0103] Penalty items The design aims to ensure that the physical constraint of safe and stable operation of the power system is met, and its calculation formula is: , In the formula: This represents the state of charge of the energy storage device during time period t. and These are its lower and upper limits, respectively; This represents the power imbalance of the microgrid during time period t. and This is the penalty coefficient.

[0104] The expression for the collaborative reward item is: , In the formula: This represents the net exchange power between the microgrid m and the distribution network during time period t. A positive value indicates electricity purchase, and a negative value indicates electricity sale. For distribution network dispatching reference values; This represents the net exchange power of electric vehicle aggregators during time period t, with positive values ​​indicating discharge to the grid and negative values ​​indicating charging from the grid. This is an indicator function, whose value is 1 when the product of the net exchange power is less than 0, and 0 otherwise; This is the reward coefficient.

[0105] The first item of the collaborative reward encourages microgrids to track the dispatch reference value of the distribution network, avoiding significant deviations in the exchange power between the microgrid and the distribution network from the expected value, thereby maintaining power balance and voltage stability at the distribution network level; in the second item, the discrimination logic of the indicator function is: when (EV discharges to the grid) and When the microgrid purchases electricity from the grid, a positive product indicates that the EV's discharge direction is consistent with the microgrid's power purchase direction, meaning the EV is providing power support to the microgrid. This is a complementary behavior of EV discharge supplying power to the microgrid during peak hours and should be rewarded; conversely, when... (EV charging from the grid) and When the microgrid sells electricity to the grid, the product is positive, indicating that the EV's charging behavior occurs when the microgrid has surplus power to send out, meaning the microgrid's renewable energy output is in surplus and the EV is absorbing this excess power. This is also a complementary behavior of EV charging and absorbing renewable energy during off-peak hours, and should be rewarded. However, when the signs of the two are opposite and the product is negative, it indicates that the EV's behavior is opposite to the microgrid's demand direction. For example, the microgrid is buying electricity from the grid while the EV is charging from the grid, or the microgrid is selling electricity to the grid while the EV is discharging electricity to the grid. In this case, the indicator function is 0, and no reward is given.

[0106] Step S4014: Multi-agent reinforcement learning training framework.

[0107] This invention employs a centralized training-decentralized execution framework to train a multi-agent reinforcement learning model. During the training phase, the critic network of each agent can access global state information and joint action information of all agents, thereby accurately evaluating the value of joint actions and providing high-quality gradient signals for the policy networks of each agent. During the execution phase, the policy network of each agent can output actions based solely on its own local observation information, without sharing global information or requiring real-time data interaction between agents.

[0108] Through centralized training, the commentator network learned how LA would reduce the complex coupling relationship of load if MGO raised prices; through decentralized execution, each agent can make decisions based solely on local observations, such as local load, local electricity price, and local EV status, without having to upload private data such as user load curves, energy consumption habits, or equipment parameters.

[0109] During training, the critic network is updated by minimizing the temporal difference error. The loss function of the critic network for the i-th agent is: , In the formula: The target Q value; This is an experience replay pool.

[0110] The policy network is updated using the deterministic policy gradient theorem, while the target network uses a soft update mechanism to stabilize the training process.

[0111] To enhance the robustness of the strategy to uncertainties in renewable energy output, this invention employs domain randomization during training. At the beginning of each training round, the distribution parameters of renewable energy output prediction errors and the parameters of load prediction errors are randomly sampled, enabling the agent to be trained under various uncertainty scenarios and learn a robust strategy that can adapt to a wide range of uncertain environments.

[0112] Step S501: Alternating iteration and convergence determination.

[0113] After obtaining the equipment configuration scheme in step S201 and the operation strategy in step S401, the present invention iterates alternately between the equipment configuration scheme and the operation strategy to achieve deep synergy between planning and operation.

[0114] Specifically, such as Figure 4 As shown, the objective function of the planning layer optimization model in step S201 includes the annual value of the operating cost. This value is obtained by aggregating the optimization results of the operation layer in step S401. In the first iteration, the planning layer optimizes based on the initially estimated operation cost to obtain the initial equipment configuration scheme. Then, the operation layer performs multi-agent collaborative optimization based on the equipment configuration scheme to calculate the operation cost for each typical day and each scenario. The operation cost is fed back to the planning layer to update the operation cost item in the objective function of the planning layer. The planning layer then re-optimizes to obtain the updated equipment configuration scheme. This process is repeated.

[0115] The planning layer can perceive the differences in operating costs generated by different equipment configuration schemes in actual operation, so that when making capacity decisions, it not only considers the investment cost, but also the operating cost that the capacity scheme may generate throughout its entire life cycle; the operation layer, on the other hand, always optimizes based on the current equipment configuration scheme to ensure that the operation strategy matches the actual capacity of the equipment. Through this two-way information transmission, the problem of capacity redundancy or insufficiency caused by the traditional separate method is solved.

[0116] The iteration termination condition is: the change in the equipment configuration scheme during a predetermined number of consecutive iterations is less than a preset threshold. Specifically, after obtaining the equipment configuration scheme in the k-th iteration, it is compared with the scheme in the (k-1)-th iteration. The sum of the changes in all decision variables is calculated. If the changes for a predetermined number of consecutive iterations (e.g., 5 consecutive iterations) are all less than the preset threshold (e.g., the sum of the absolute values ​​of the changes in each variable is less than...), the iteration terminates. If the iteration converges, the current optimal device configuration scheme and the corresponding optimal operation strategy are output.

[0117] To accelerate iterative convergence, this invention introduces a transfer learning mechanism: when the upper-layer scheme changes little, the parameters of the multi-agent reinforcement learning model trained in the previous round of lower-layer training are used as the initial values ​​for the new round of training, avoiding repeated training from zero in each iteration; specifically, a transfer strategy based on parameter differences is adopted, and a complete retraining is triggered only when the changes in the device configuration scheme parameters exceed the threshold, otherwise only a small number of fine-tuning training steps are performed.

[0118] Step S601: Power control command generation and execution.

[0119] The optimal operating strategy output in step S501 is converted into power control commands for each controllable device. Specifically, the optimal operating strategy includes the output setting value of the gas turbine in each microgrid at each time period, the charging and discharging power setting value of the energy storage device, the power consumption setting value of the distributed electrolyzer, the power generation setting value of the distributed fuel cell, and the total charging power setting value and total V2G discharge power setting value of the electric vehicle aggregator.

[0120] The aforementioned power setting values ​​are transmitted via the communication network to the local controllers of each microgrid and the aggregation controllers of electric vehicle aggregators. The local controllers convert the power commands into specific equipment control signals: for electrolyzers and fuel cells, the power commands adjust their input / output power through the pulse width modulation (PWM) control signals of the rectifier / inverter; for energy storage devices, the power commands control their charging and discharging states and power levels through the drive circuit of the energy storage converter (PCS); for electric vehicle aggregators, the total charging and discharging power command is broken down into individual charging and discharging commands for each on-grid electric vehicle through the aggregator's distribution strategy, and then transmitted to the on-board chargers of each vehicle through V2G charging piles.

[0121] Through the execution of the above power control commands, each controllable device outputs power in sequence according to the optimal operating strategy, so as to achieve safe and economical operation of the distribution network-microgrid group under the condition that there is uncertainty between the output of new energy and the load demand.

[0122] To verify the effectiveness and superiority of the proposed collaborative optimization method for the planning and operation of distribution networks and microgrids, this embodiment is based on simulation verification using an improved IEEE 33-node distribution network system.

[0123] (1) Basic data and scenario settings This embodiment uses an improved IEEE 33-node distribution network system as the test system, such as... Figure 5As shown, the system connects to three microgrids, with base loads of 350kW, 280kW, and 450kW respectively, photovoltaic capacities of 250kW, 200kW, and 320kW respectively, and wind power capacities of 180kW, 140kW, and 220kW respectively. The electric vehicle aggregator aggregates 300 electric vehicles with battery capacities between 40kWh and 80kWh, and charging / discharging power of 7.2kW (slow charging) or 50kW (fast charging, accounting for 30%).

[0124] Time-of-use electricity pricing is set with reference to the peak-valley electricity price for industrial users: the purchase price is 0.98 yuan / kWh during peak hours (08:00-11:00, 18:00-21:00) and 0.35 yuan / kWh during off-peak hours. The sales price is calculated at 80% of the purchase price.

[0125] Uncertainty handling employed Latin hypercube sampling to generate 200 initial scenarios, which were then clustered using K-means to obtain 5 representative scenarios with probability weights of 0.22, 0.20, 0.19, 0.20, and 0.19, respectively. The improved particle swarm optimization algorithm was implemented with a population size of 25 and a maximum of 40 iterations.

[0126] (2) Analysis of convergence of upper-level planning and hydrogen energy capacity allocation Under the above parameter settings, the two-layer iterative optimization method of the present invention is executed. Figure 6 To improve the convergence curve of the particle swarm optimization algorithm when solving higher-level planning problems, as shown in the figure, the annual comprehensive cost was reduced from 1.47 × 10⁻⁶ in the initial generation. 7 The cost per unit time (CPS) decreased rapidly, with a reduction of 23.4% in the first 10 generations, demonstrating the algorithm's strong global exploration capability in its early stages. From the 10th to the 20th generation, the rate of decrease in the objective function value slowed down, and the adaptive inertia weight began to gradually decrease, indicating a transition from global search to local fine-grained search. After the 20th generation, the convergence curve stabilized, and by the 30th generation, the annualized cost had basically stabilized at 1.12 × 10⁻⁶. 7 The final convergence value is 1.098 × 10⁻⁶ near the 10th century. 7 The entire convergence process exhibits a typical characteristic of being fast at first and then slow, without any obvious premature convergence or oscillating divergence, verifying the effectiveness of the adaptive inertial weight strategy and random perturbation term of this invention in balance exploration and development.

[0127] Table 1 lists the capacity configuration results of hydrogen energy equipment in the optimal planning scheme. The central hydrogen energy system has an electrolyzer with a rated power of 1870kW, a fuel cell with a rated power of 1050kW, and a hydrogen storage tank with a capacity of 560kg. The distributed hydrogen energy unit configuration of microgrid 1 is an electrolyzer with a rated power of 480kW, a fuel cell with a rated power of 280kW, and a hydrogen storage capacity of 220kg. Microgrid 2 has an electrolyzer with a rated power of 390kW, a fuel cell with a rated power of 210kW, and a hydrogen storage capacity of 180kg. Microgrid 3 has an electrolyzer with a rated power of 620kW, a fuel cell with a rated power of 360kW, and a hydrogen storage capacity of 290kg.

[0128] Table 1 In terms of capacity distribution, the central system handles approximately 55.7% of the total electrolysis power and 55.3% of the total fuel cell power, reflecting a hierarchical planning approach that prioritizes centralized systems while supplementing them with distributed systems. The combined hydrogen storage capacity of the three microgrids is 690 kg, exceeding the 560 kg of the central hydrogen storage tank, indicating that the distributed hydrogen storage units are closer to the load center and are suitable for meeting the short-term hydrogen energy balance needs within the microgrid. The ratio of the total fuel cell capacity to the total electrolyzer capacity is approximately 0.57, consistent with the engineering experience of typical electro-hydrogen-electric cycle efficiency (approximately 55%–60%), indirectly verifying the rationality of the planning model. Furthermore, the capacity of various hydrogen energy devices in microgrid 3 is the largest among the three microgrids, which is consistent with the characteristics of microgrid 3 having the largest base load (450 kW) and a high penetration rate of new energy sources. This indicates that the capacity configuration results are positively correlated with the load level and new energy resource endowment of each microgrid, demonstrating the adaptive capability of the planning-level optimization model to regional differences.

[0129] Figure 7 A direct comparison of the planned capacities of each device shows that the central electrolyzer capacity of 1870kW is significantly higher than that of the distributed electrolyzers in each microgrid, demonstrating the economic advantages of large-scale hydrogen production. However, the central hydrogen storage tank is not the largest single unit; the combined hydrogen storage capacity of the three microgrids exceeds that of the central hydrogen storage tank. This pattern of primarily distributed hydrogen storage and supplemented by centralized hydrogen production is adapted to the spatiotemporal distribution characteristics of multi-level hydrogen energy supply and demand in the distribution network-microgrid cluster.

[0130] (3) Analysis of typical daily operating cost composition Figure 8The typical daily operating cost breakdown shows that electricity purchase cost is RMB 15,230 / day, accounting for 65.3% of the total cost, making it the largest expenditure item. Compared with a scenario without hydrogen energy coupling, the synergistic effect of the hydrogen energy system and electric vehicle V2G in this scheme reduces the purchased power by approximately 22%, effectively reducing the power dependence on the upper-level grid. Fuel cost is RMB 4,120 / day, accounting for 17.7%, mainly from the natural gas consumption of the gas turbine in the microgrid. Due to the introduction of tiered carbon trading prices, the gas turbine is only activated when the output of new energy sources is severely insufficient, and its operating time and output level are limited to a low level. V2G compensation cost is RMB 2,850 / day, accounting for 12.2%. This cost reflects the discharge compensation paid by the electric vehicle aggregator to the vehicle owner, indicating that the aggregator obtains reasonable revenue from discharging into the grid during peak hours. Carbon cost is RMB 1,120 / day, accounting for 4.8%, and the actual carbon emissions of the system are approximately 7,467 kg CO2 / day.

[0131] Table 2 provides a breakdown of the daily operating costs for each microgrid.

[0132] Table 2 Microgrid 3 has the highest electricity purchase cost and fuel cost, reaching 6,780 yuan / day and 2,100 yuan / day respectively. This is because it has the largest base load and its renewable energy output fluctuates greatly, requiring higher power support from the upstream grid and gas turbines. Microgrid 1 has the lowest fuel cost, at only 980 yuan / day, which is consistent with its relatively abundant photovoltaic and wind power capacity and fewer gas turbine start-stop cycles. In terms of V2G compensation cost, microgrid 3 has the highest cost (1,020 yuan / day), reflecting that it has the largest peak-valley load difference and requires more electric vehicle discharge to participate in peak shaving support.

[0133] (4) Analysis of carbon emission characteristics and low-carbon benefits Figure 9For a comparison of typical daily carbon emission curves, the carbon emission rate troughs between 04:00 and 05:00, reaching approximately 78 kg / h. During this time, the system load is low and wind power output is relatively high, reducing the demand for electricity from the grid. Carbon emissions peak between 19:00 and 20:00, at approximately 118 kg / h. This period coincides with the evening peak electricity consumption, and photovoltaic output has dropped to zero. The gas turbine and the grid share the increased load. Compared to a scenario without hydrogen coupling, this scheme reduces peak carbon emissions by approximately 22 kg / h, a decrease of 15.7%. Total daily carbon emissions decrease from approximately 2450 kg to 2070 kg, a decrease of 15.5%. The reduction in carbon emissions mainly comes from two pathways: first, during periods of wind and solar curtailment, the electrolyzer absorbs surplus renewable energy for hydrogen production, reducing reliance on fossil fuel power generation; second, during peak load periods, fuel cells utilize stored hydrogen to generate electricity, replacing some of the gas turbine output.

[0134] Table 3 presents the comparison results of carbon emissions on typical days in different seasons.

[0135] Table 3 In spring, due to ample sunshine and suitable temperatures, photovoltaic power output is high, resulting in the lowest carbon emissions at 1980 kg / day. In summer, carbon emissions rise to 2150 kg / day due to increased air conditioning load. In winter, the peak load is the highest, with carbon emissions reaching 2230 kg / day, but due to relatively abundant wind power resources, the carbon reduction rate remains at 14.8%. The average carbon emissions across the four seasons are about 15.8% lower than the hydrogen-free solution, with an annual carbon emission reduction of about 127.5 tons.

[0136] The above results demonstrate that the present invention effectively reduces the system's dependence on fossil fuels by using spatiotemporal energy transfer in hydrogen energy systems and flexible adjustment of vehicle-to-grid (V2G) technology, thus achieving a substantial reduction in carbon emissions at the physical level.

[0137] (5) Analysis of the response characteristics of electric vehicle aggregators Table 4 summarizes the scheduling results of electric vehicle aggregators on a typical day.

[0138] Table 4 Of the 300 electric vehicles, 187 actually participated in V2G discharge, with a participation rate of 62.3%, indicating that most car owners were willing to discharge via V2G and responded to the aggregator's dispatch instructions during peak hours. The average discharge amount of the participating vehicles was 8.6 kWh / vehicle, and the average discharge power was 6.2 kW. In terms of charging, all vehicles on the network participated in charging dispatch, with an average charging amount of 12.4 kWh / vehicle.

[0139] The aggregator's net charging capacity was 1040 kWh, indicating an overall net charging status. However, the distribution of charging and discharging periods exhibited a typical low-charge, high-discharge arbitrage strategy: discharging was concentrated during the evening peak hours of 18:00-21:00, effectively alleviating the power supply pressure on the distribution network; charging was concentrated during the off-peak hours of 23:00-05:00, utilizing low electricity prices for energy replenishment. During peak hours, V2G could provide approximately 680 kW of upward reserve capacity, effectively alleviating regional power congestion in the distribution network.

[0140] (6) Analysis of distribution network node voltage and line load Figure 10 The voltage distribution of the IEEE 33-node distribution network during a typical evening peak period (18:00) is shown. The per-unit voltage of the root node is 1.000 pu. As the feeder extends, the node voltage gradually decreases along the line, with the voltage of the last node (node ​​32) being 0.952 pu. All node voltages meet the safe operating range of 0.95 to 1.05 pu. Compared with the scenario without V2G discharge, after the electric vehicle aggregator injects power into the distribution network during the evening peak, the voltage of the last node increases by about 0.018 pu, effectively improving the voltage quality at the end of the feeder.

[0141] Table 5 lists the load rate of heavily loaded lines during the evening peak hours.

[0142] Table 5 Line L2-3 (nodes 2-3) has the highest load rate, reaching 87.6%, which is close to the thermal stability limit; Line L9-10 (nodes 9-10) has a load rate of 82.3%, which is also at a high load level. In this planning scheme, due to investment budget constraints, the above lines were not expanded, but through the spatiotemporal energy transfer of the hydrogen energy system and the flexible adjustment of electric vehicle V2G, the load rates of each line were controlled within the safety margin.

[0143] The method of this invention constructs a two-layer optimization architecture with alternating iterations of the planning layer and the operation layer. It incorporates the capacity collaborative configuration of centralized and distributed hydrogen energy systems and the schedulable power boundary modeling of electric vehicle aggregators into a unified optimization framework. This enables dynamic collaborative optimization of equipment configuration schemes and operation strategies for distribution networks and microgrid groups. The method allows the planning scheme to perceive the differences in power regulation effects generated by different equipment capacities in actual operation, while ensuring that the operation strategy is accurately matched with the actual capacity of the equipment.

[0144] Example 2: This invention also provides a collaborative optimization system for the planning and operation of distribution network-microgrid clusters, comprising: Data acquisition module: Used to acquire operational data of the distribution network and microgrids, as well as the access status and state of charge information of electric vehicles under the jurisdiction of electric vehicle aggregators; specifically, this module acquires the voltage amplitude, phase angle, and branch impedance parameters of each node in the distribution network, acquires the predicted output data of photovoltaic power generation systems and wind power generation systems, acquires the electrical load time-series prediction curves of each microgrid, and acquires the access time, expected departure time, current state of charge, battery rated capacity, maximum charging and discharging power, and user-set minimum state of charge for each electric vehicle.

[0145] The planning layer processing module is used to establish a hierarchical hydrogen energy network interconnected with a centralized hydrogen energy system on the distribution network side and distributed hydrogen energy units on each microgrid side. It constructs and solves the planning layer optimization model, outputting an equipment configuration scheme. Specifically, this module uses distribution network expansion variables and hydrogen energy system capacity as decision variables, aiming to minimize the sum of the total lifecycle investment cost of equipment and the operating cost fed back from the lower layer. It employs an improved particle swarm optimization algorithm to solve the planning layer optimization model, obtaining an equipment configuration scheme that includes the capacity of both the centralized hydrogen energy system and the distributed hydrogen energy units. The centralized hydrogen energy system and the distributed hydrogen energy units are interconnected through hydrogen energy transmission channels. The centralized hydrogen energy system undertakes regional-level electricity-hydrogen conversion and cross-cycle energy storage functions, while each distributed hydrogen energy unit undertakes short-term power balance and local hydrogen energy supply functions within the microgrid.

[0146] The operation layer processing module is used to determine the schedulable power boundary of the electric vehicle aggregator based on the access status, state of charge, and battery capacity of each electric vehicle, and to generate the operation strategies of each microgrid and the electric vehicle aggregator using a multi-agent reinforcement learning model based on the equipment configuration scheme. Each microgrid and electric vehicle aggregator corresponds to an agent, and each agent is trained using a centralized training-distributed execution framework. In the operation layer processing module, the schedulable power boundary of the electric vehicle aggregator includes upward reserve capacity and downward reserve capacity. In the operation layer processing module, the reward function of each agent includes a penalty term and a cooperative reward term.

[0147] Iterative optimization module: used to alternately iterate between the device configuration scheme and the operation strategy until the change in the device configuration scheme is less than a preset threshold in a predetermined number of consecutive iterations, and output the optimal device configuration scheme and the corresponding optimal operation strategy.

[0148] Control execution module: This module is used to convert the optimal operating strategy into power control commands for each controllable device and send them to the corresponding actuators for execution. Specifically, this module sends the output setpoints of the gas turbines, the charging and discharging power setpoints of the energy storage devices, the power consumption setpoints of the distributed electrolyzers, the power generation setpoints of the distributed fuel cells, and the total charging power setpoints and total V2G discharge power setpoints of the electric vehicle aggregators to the local controllers of each microgrid and the aggregation controllers of the electric vehicle aggregators through the communication network. The controllers then convert the power commands into specific device control signals and drive their execution.

[0149] The system of this invention, through the coordinated cooperation of various modules, can achieve centralized training and decentralized execution of multiple agents without requiring the sharing of privacy data among decision-making entities. It automatically converts the optimal operating strategy into power control instructions for each controllable device and issues them for execution. It has good engineering practicality, deployability and real-time adaptability to uncertainties in new energy output and load.

[0150] Example 3: The electronic device of this invention includes a central processing unit (CPU), which can perform various appropriate actions and processes according to computer program instructions stored in read-only memory (ROM) or loaded from a storage unit into random access memory (RAM). The RAM may also store various programs and data required for device operation. The CPU, ROM, and RAM are interconnected via a bus. Input / output (I / O) interfaces are also connected to the bus.

[0151] Multiple components in the device are connected to the I / O interface, including: input units such as keyboards and mice; output units such as various types of displays and speakers; storage units such as disks and optical discs; and communication units such as network interface cards (NICs), modems, and wireless transceivers. The communication unit allows the device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0152] The processing unit executes the various methods and processes described above, such as methods S1 to S6. For example, in some embodiments, methods S1 to S6 may be implemented as computer software programs tangibly contained in a machine-readable medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on the device via ROM and / or a communication unit. When the computer program is loaded into RAM and executed by the CPU, one or more steps of methods S1 to S6 described above may be performed. Alternatively, in other embodiments, the CPU may be configured to execute methods S1 to S6 by any other suitable means (e.g., by means of firmware).

[0153] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.

[0154] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0155] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0156] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for coordinated optimization of planning and operation of distribution network-microgrid groups, characterized in that, include: Acquire operational data of the distribution network and microgrid, as well as the access status and state of charge information of electric vehicles under the jurisdiction of electric vehicle aggregators; A hierarchical hydrogen energy network is established, which interconnects the centralized hydrogen energy system on the distribution network side with the distributed hydrogen energy units on each microgrid side. A planning layer optimization model is constructed and solved to obtain an equipment configuration scheme that includes the capacity of the centralized hydrogen energy system and the distributed hydrogen energy units. The schedulable power boundary of the electric vehicle aggregator is determined based on the access status, state of charge, and battery capacity of each electric vehicle. Based on the equipment configuration scheme, an operation layer optimization model is constructed, and each microgrid and the electric vehicle aggregator are treated as independent decision-making entities for collaborative optimization, generating operation strategies for each entity; The device configuration scheme and the operation strategy are alternately iterated until the change in the device configuration scheme is less than a preset threshold in a predetermined number of consecutive iterations, and then the device configuration scheme and the corresponding operation strategy are output. The operating strategy is converted into power control commands for each controllable device and then issued for execution.

2. The method for coordinated optimization of planning and operation of distribution network-microgrid groups according to claim 1, characterized in that, The dispatchable power boundary of the electric vehicle aggregator includes upward reserve capacity. and downward reserve capacity The calculation formulas are as follows: , , in, For electric vehicles, The total number of electric vehicles. and The first The maximum discharge power and maximum charging power of an electric vehicle and These represent the actual discharge power and the actual charging power during time period t, respectively. The state of charge at time t, and These represent the minimum and maximum states of charge, respectively. For the battery's rated capacity, and These are discharge efficiency and charging efficiency, respectively. For time intervals.

3. The method for coordinated optimization of planning and operation of distribution network-microgrid groups according to claim 1, characterized in that, The centralized hydrogen energy system is configured on the distribution network side, and the distributed hydrogen energy units are configured within each microgrid; the sum of the capacity of the centralized hydrogen energy system and the capacity of the distributed hydrogen energy units within each microgrid satisfies the regional hydrogen energy supply and demand balance constraint. , , in, and These are the centralized hydrogen energy system and the microgrid, respectively. The rated power of the electrolyzer in the internal distributed hydrogen energy unit, and These are the corresponding rated capacities of the hydrogen storage tanks. For microgrid collection, and These are the minimum electrolysis power and minimum hydrogen storage capacity required to meet the region's hydrogen energy demand, respectively.

4. The method for coordinated optimization of planning and operation of distribution network-microgrid groups according to claim 1, characterized in that, The equipment capacity of the centralized hydrogen energy system on the distribution network side includes the rated power of the centralized electrolyzer, the rated power of the centralized fuel cell, and the rated capacity of the centralized hydrogen storage tank; the capacity of the distributed hydrogen energy unit on the microgrid side includes the rated power of the distributed electrolyzer, the rated power of the distributed fuel cell, and the rated capacity of the distributed hydrogen storage tank.

5. The method for coordinated optimization of planning and operation of distribution network-microgrid groups according to claim 1, characterized in that, In the operational layer optimization model, each microgrid and the electric vehicle aggregator correspond to an agent, and the reward function of each agent is... The calculation formula is: , in, For intelligent agents During the period Operating costs The carbon emission cost of agent i, Penalties for power imbalance and equipment exceeding limits. For collaborative reward items, , , These are the weighting coefficients; The penalty item The calculation formula is: in, This refers to the state of charge of the energy storage device during time period t. and These are its lower limit and upper limit, respectively. This represents the power imbalance of the microgrid during time period t. , , This is the penalty coefficient.

6. The method for coordinated optimization of planning and operation of a distribution network-microgrid group according to claim 5, characterized in that, The collaborative reward item The calculation formula is: , in, For microgrids The net exchange power with the distribution network during time period t. For distribution network dispatching reference values, The net exchange power of electric vehicle aggregators in time period t. This is an indicator function, whose value is 1 if the product of the net exchange power is less than 0, and 0 otherwise. This is the reward coefficient.

7. The method for coordinated optimization of planning and operation of distribution network-microgrid groups according to claim 1, characterized in that, The operation strategies of each microgrid include time-series scheduling instructions for gas turbine output, energy storage charging and discharging power, distributed electrolyzer power consumption, and distributed fuel cell power generation; the operation strategy of the electric vehicle aggregator includes time-series scheduling instructions for total charging power and total V2G discharging power.

8. The method for coordinated optimization of planning and operation of distribution network-microgrid groups according to claim 1, characterized in that, In the operation layer optimization model, the agents of each microgrid and the electric vehicle aggregator are trained using a centralized training-decentralized execution framework. During training, the critic network of each agent obtains global state information and joint action information of all agents to evaluate the policy. During execution, the policy network of each agent outputs actions based only on its own local observation information.

9. A system for implementing the collaborative optimization method for planning and operation of distribution network-microgrid groups as described in any one of claims 1-8, characterized in that, include: The data acquisition module is used to acquire the operation data of the distribution network and microgrid, as well as the access status and charge status information of electric vehicles under the jurisdiction of the electric vehicle aggregator. The planning layer processing module is used to establish a hierarchical hydrogen energy network that interconnects the centralized hydrogen energy system on the distribution network side with the distributed hydrogen energy units on each microgrid side, construct and solve the planning layer optimization model, and output the equipment configuration scheme. The operation layer processing module determines the schedulable power boundary of the electric vehicle aggregator based on the access status, state of charge and battery capacity of each electric vehicle, and generates the operation strategies of each microgrid and the electric vehicle aggregator based on the equipment configuration scheme using a multi-agent reinforcement learning model. The iterative optimization module is used to alternately iterate between the device configuration scheme and the operation strategy until the change in the device configuration scheme is less than a preset threshold in a predetermined number of consecutive iterations, and then outputs the device configuration scheme and the corresponding operation strategy. The control execution module is used to convert the operation strategy into power control commands for each controllable device and send them to the corresponding execution mechanism for execution.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Multi-agent collaborative power distribution network planning and operation integrated optimization method and system

    CN121261325A