Multi-microgrid energy sharing method and system

By using GAN to generate typical scenery scenes and adaptive genetic algorithms for dynamic virtual aggregation in multi-micro grid systems, the problem that uncertainty of scenery resources affects scheduling accuracy is solved, and more efficient and flexible energy management and cost reduction are achieved.

CN119695867APending Publication Date: 2025-03-25STATE GRID HENAN ELECTRIC POWER ELECTRIC POWER SCI RES INST +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411760399.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

The prior art is difficult to effectively deal with the uncertainty of wind and light resources in multi-micro grid scheduling, which affects the accuracy of scheduling.

Method used

Using a generative adversarial network (GAN) to generate typical scenery scenes, combined with adaptive genetic algorithms and electrical correlation intensity indicators, dynamic virtual aggregation of multi-microgrids forms a virtual microgrid group, and a multi-microgrid energy sharing model is constructed to optimize energy interaction.

Benefits of technology

By generating landscape scenes that are closer to reality, the accuracy of scheduling and system flexibility are improved, operating costs are reduced, and the utilization rate of renewable energy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119695867A_ABST
    Figure CN119695867A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-microgrid energy sharing method and system, and the method comprises the steps: enabling a plurality of microgrids to be dynamically and virtually aggregated to obtain a virtual microgrid group by taking the optimization of a source-load-storage resource matching degree evaluation index between virtual microgrid groups and an aggregation degree evaluation index of the virtual microgrid groups as a target under each typical scene of wind and light; taking the minimum total operation cost of the virtual micro-grid group as an optimization target, and combining the optimization target with the energy interaction constraint in the same virtual micro-grid group to form a multi-micro-grid energy sharing model; iteratively solving the multi-microgrid energy sharing model by adopting an alternating direction multiplier method to obtain an optimal solution so as to update a source-load-storage resource matching degree evaluation index and an aggregation degree evaluation index of the virtual microgrid group; and when the error between the matching degree evaluation index and the aggregation degree evaluation index after updating and before updating does not exceed a threshold value, it is judged that a convergence condition is met, and an optimal solution is used as a multi-microgrid energy sharing result, so that the system flexibility is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of microgrid dispatching, and relates to a multi-microgrid energy sharing method and system under dynamic virtual aggregation. Background Art

[0002] As a distributed energy resource (DER) integrated technology including renewable energy, microgrid is an effective management form of distributed power generation. It can integrate a variety of dispatchable power resources, reduce the instability of system power by optimizing the dispatch strategy of microgrid, and thus improve the integration efficiency of renewable energy and realize the local consumption of renewable energy. Independent microgrids have problems such as low reliability and inability to operate reliably and stably due to the lack of power support from large power grids. In order to overcome these problems, multiple microgrids in a region can be connected to form a multi-microgrid system, which can not only enhance the operating reliability of the system, but also maximize the utilization of internal renewable energy.

[0003] In the prior art, in order to solve the impact of the uncertainty of wind and solar resources in microgrids on the operation of microgrids, it is proposed to use scenario generation to convert uncertain factors into multiple deterministic scenarios to describe the output uncertainty of wind and solar resources. However, the current multi-microgrid scheduling model mainly uses Monte Carlo sampling or Latin hypercube sampling to generate typical scenarios of wind and solar output. However, the above methods all need to assume that the relevant parameters of renewable energy output obey a certain probability distribution and fit the renewable energy output through the probability distribution. However, there is a certain difference between the renewable energy output determined above and the actual output of renewable energy, which will affect the accuracy of scheduling.

[0004] Distributed power sources have good development prospects when connected to active distribution systems in the form of microgrids, but the location and operation mode of microgrids connected to distribution networks will directly affect the stable operation and flexibility of distribution networks. Existing technologies apply zoning control to active distribution network management, realize regional autonomy through zoning aggregation, and optimize the overall system through energy collaborative optimization strategies between regions. The grid is partitioned by clustering and deep learning algorithms to achieve rapid voltage regulation. A multi-microgrid interconnection optimization planning method is proposed based on clustering, and the utilization rate of new energy is improved by determining the optimal topology of the system. The devices in the energy Internet are aggregated into multiple connected areas to absorb renewable energy. A microgrid virtual aggregation method based on electrical correlation strength is proposed, and a multi-microgrid power interaction model is constructed. However, the boundary of the existing technology when performing zoning aggregation is a fixed method and cannot be changed dynamically. The dynamic area division method of the distribution network uses a genetic algorithm to solve the optimal index of the region and updates the zoning result by designing a trigger mechanism. The interconnected multi-microgrids are dynamically aggregated into a virtual microgrid group, and "energy autonomy" is performed within the group, but the energy optimization results within the group are not analyzed. Aiming at the coordination problem among multiple microgrids, a multi-microgrid energy sharing method based on alternating direction multiplier method is proposed, but the uncertainty of wind and solar power output is not analyzed. Therefore, a multi-microgrid energy sharing scheme based on dynamic virtual aggregation is proposed. Summary of the invention

[0005] In order to solve the deficiencies in the prior art, the present invention provides a multi-microgrid energy sharing method and system based on dynamic virtual aggregation, which adopts a generative adversarial network method to generate typical wind and solar power scenarios, and adopts an adaptive genetic algorithm to dynamically virtual aggregate multiple microgrids into a virtual microgrid group based on source-load-storage balance index and electrical correlation strength index for the generated typical wind and solar power scenarios; constructs a multi-microgrid energy sharing model within the virtual microgrid group, and determines the optimal output of distributed generator sets in each microgrid, so as to reduce the operating cost of multiple microgrids and improve system flexibility.

[0006] The present invention adopts the following technical solution.

[0007] The present invention proposes a multi-microgrid energy sharing method, wherein the multi-microgrid system includes multiple microgrids, and the output equipment in each microgrid includes: a wind turbine generator set, a photovoltaic generator set, a micro gas turbine, a power load and an energy storage device; including:

[0008] According to the historical operation data and actual operation data of each microgrid, a generative adversarial network is used to generate various wind-solar scenarios, and the K-medoids algorithm is used to reduce the generated wind-solar scenarios to obtain typical wind-solar scenarios.

[0009] In each typical wind and solar scenario, with the goal of optimizing the source-load-storage resource matching evaluation index between each virtual microgrid group and the aggregation evaluation index of the virtual microgrid group, multiple microgrids are dynamically virtual aggregated to obtain a virtual microgrid group.

[0010] Taking the minimum total operating cost of the virtual microgrid group as the optimization goal, the optimization goal and the energy interaction constraints within the same virtual microgrid group are combined to form a multi-microgrid energy sharing model.

[0011] The alternating direction multiplier method is used to iteratively solve the multi-microgrid energy sharing model to obtain the optimal solution. The optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index of the virtual microgrid group. When the error between the updated source-load-storage balance optimization index and aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met and the optimal solution is taken as the multi-microgrid energy sharing result.

[0012] Preferably, according to the historical operation data and actual operation data of each microgrid, a generative adversarial network is used to generate a wind-solar scenario, including:

[0013] The generative adversarial network includes a generator and a discriminator. According to the training objectives of the generator and the discriminator, the loss functions L of the generator and the discriminator are constructed respectively. G And the loss function L D , the loss function L G And the loss function L D The details are as follows:

[0014]

[0015] Where, L G is the loss function of the generator, L D is the loss function of the discriminator, The historical running data z is subject to the generated sample probability distribution p z The expectation at (z) is the empirical average of the historical running data z and the generator output value; The actual running data x follows the true sample probability distribution p g The expectation at (x) is the empirical average of the actual running data x and the output value of the generator; G(z) is the generated data, and D() is the discriminant function of the discriminator;

[0016] The objective function of the generative adversarial network satisfies the following relationship:

[0017]

[0018] Where V(D,G) is a game value function, the goal of which is to minimize the probability distribution of generated samples p G (z) and the true sample probability distribution p g (x) distribution differences between

[0019] The generative adversarial network is trained based on the historical operation data and actual operation data of each microgrid and the objective function of the generative adversarial network.

[0020] Preferably, the generated scenery scene is reduced using a K-medoids algorithm, including:

[0021] The scenery scenes generated by the generative adversarial network are grouped into a set S, and the optimal set J that can replace the set S is found using the following relationship:

[0022]

[0023] In the formula, p i is the i-th scenery scene u i The probability of occurrence; d(u i ,u j ) is the i-th scenery scene u i and the jth scenery scene u j The distance between them; t is the time variable, T is 24 hours; They are the i-th scenery scene at time t and the j-th scenery scene at time t respectively;

[0024] Randomly select r scenery scenes from the optimal set J as the initial cluster centers. Indicates that r is the number of cluster centers;

[0025] Iterative clustering, by solving the optimal set J to obtain new cluster centers;

[0026] Iterate clustering and determine whether it converges. If it does not converge, repeat iterative clustering. If it converges, use r cluster centers {J 1 ,J 2 ,...,J r} is a typical scene of scenery;

[0027] Calculate the probability p of a typical scene i , p i is the ratio of the number of occurrences of the i-th typical scenery scene to the total number of scenery scenes, i = 1, 2, …, r.

[0028] Preferably, the power supply and demand imbalance in the virtual microgrid group is used as a source-load-storage balance index of a virtual microgrid group; the source-load-storage balance index of the virtual microgrid group is processed by segmented averaging to obtain a source-load-storage balance optimization index of the virtual microgrid group; based on the source-load-storage balance optimization indexes of multiple virtual microgrid groups, the source-load-storage resource matching degree evaluation index of each virtual microgrid group is obtained;

[0029] Based on the Newman fast partitioning method, the topological structure of the weighted network is equivalently obtained according to the topological structure of the microgrid to establish a weighted network; the ratio of the transmission capacity between nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated using the electrical correlation strength; based on the aggregation degree evaluation index after dynamic virtual aggregation of the weighted network, the degree of each node in the microgrid is used to determine the aggregation degree evaluation index of each microgrid in the virtual microgrid group.

[0030] Preferably, the source-load-storage balance index within a virtual microgrid satisfies the following relationship:

[0031]

[0032] Where n is the number of the virtual microgrid group obtained by dynamic virtual aggregation of i microgrids in the virtual microgrid group, i∈n means that the i-th microgrid belongs to the n-th virtual microgrid group, is the power corresponding to the supply-demand imbalance of the nth virtual microgrid at time t, is the load of the nth virtual microgrid at time t, P PV,n , P WT,n are the output power of the photovoltaic generator set and the output power of the wind generator set in the nth virtual microgrid group, is the load of the i-th microgrid at time t; is the load of the i-th microgrid participating in demand response at time t; is the real-time power of energy storage of the i-th microgrid at time t; are the output power of the photovoltaic generator set and the output power of the wind generator set of the i-th microgrid at time t respectively;

[0033] The following relationship is used to obtain the optimal index of source-load-storage balance of a virtual microgrid:

[0034]

[0035] In the formula, is the optimization index of the source-load-storage balance of the nth virtual microgrid at time t, with a value range of [0,1];

[0036] Based on the optimization index of the source-load-storage balance of each virtual microgrid group, the source-load-storage resource matching degree evaluation index of each virtual microgrid group is obtained by the following relationship:

[0037]

[0038] In the formula, φ M It is an evaluation index of the matching degree of source-load-storage resources between virtual microgrid groups. T is 24 hours, and N is the total number of virtual microgrid groups.

[0039] Preferably, based on the Newman fast partitioning method, the topological structure of the weighted network is equivalently obtained according to the topological structure of the microgrid, and the weighted network is established according to the topological structure of the weighted network; wherein the topological structure of the microgrid includes I nodes and L branches; the ratio of the transmission capacity between the nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated according to the following relationship:

[0040]

[0041] In the formula, H i and H j are the degrees of nodes i and j in the microgrid, B ij is the electrical connection strength between node i and node j in the microgrid, satisfying B ij =C ij / Z ij , C ij is the transmission capacity between node i and node j, Z ij is the line impedance between node i and node j, I is the number of nodes;

[0042] Based on the evaluation index of the degree of aggregation after dynamic virtual aggregation of weighted networks, the degree of each node in the microgrid is used to calculate the evaluation index of the degree of aggregation of each microgrid in the virtual microgrid group according to the following relationship:

[0043]

[0044] In the formula, φ e It is an evaluation index of the aggregation degree of each microgrid in the virtual microgrid group.

[0045] Preferably, in each typical wind and solar scenario, with the goal of optimizing the source-load-storage resource matching evaluation index between each virtual microgrid group and the aggregation evaluation index of the virtual microgrid group, multiple microgrids are dynamically virtually aggregated to obtain a virtual microgrid group, including:

[0046] The weighted sum of the source-load-storage resource matching degree evaluation index between each virtual microgrid group and the aggregation degree evaluation index of the virtual microgrid group is used as the comprehensive index for dynamic aggregation of multiple microgrids, satisfying the following relationship:

[0047] φ=γ 1 φ M +γ 2 φ e

[0048] Where, φ is the comprehensive index of dynamic aggregation of multiple microgrids, φ M is the evaluation index of the matching degree of source-load-storage resources between virtual microgrids, φ e is the evaluation index of the aggregation degree of each microgrid in the virtual microgrid group, γ 1 and γ 2 are the weights of the source-load-storage resource matching degree evaluation index between each virtual microgrid group and the weights of the microgrid aggregation degree evaluation index in the virtual microgrid group, both of which have a value range of [0-1];

[0049] In each typical wind and solar scenario, the virtual microgrid group corresponding to the maximum value of the comprehensive index during dynamic aggregation of multiple microgrids is taken as the dynamic virtual aggregation result of multiple microgrids.

[0050] Preferably, the optimization objective of the multi-microgrid energy sharing model satisfies the following relationship:

[0051]

[0052] In the formula, F MG,n is the total operating cost of the nth virtual microgrid group, They are the electricity purchase and sales cost, gas turbine operation cost, and energy storage operation cost of the nth virtual microgrid group to the upper power grid; is the electricity purchase cost between microgrids in the nth virtual microgrid group; ω G ,ω M ,ω E ,ω T is the weight factor of each cost; the nth virtual microgrid group includes i microgrids, are the purchase and sale prices of electricity between the microgrid and the distribution network at time t, are the amount of electricity purchased and sold between the ith microgrid and the distribution network in the nth virtual microgrid group at time t; ω MT,1 ,ω MT,2 ,ω MT,3 are the power generation cost coefficients of gas turbines, is the gas turbine output in the ith microgrid in the nth virtual microgrid cluster at time t; is the unit operating cost of energy storage, and are the energy storage discharge power and energy storage charging power in the i-th microgrid in the n-th virtual microgrid group at time t, respectively; is the unit price of electricity sold by the microgrid, is the electric power traded between the ith microgrid and the i′th microgrid in the nth virtual microgrid group at time t, i′∈n\i indicates that the i′th microgrid is a microgrid different from the ith microgrid in the nth virtual microgrid group. When it is a positive value, it means the electric power sold by the i-th microgrid to the i′th microgrid at time t; T is the total number of times.

[0053] Preferably, the energy interaction constraints within the same virtual microgrid group satisfy the following relationship:

[0054]

[0055] In the formula, is the output of the photovoltaic power station in the i-th microgrid in the n-th virtual microgrid group at time t, is the wind farm output in the i-th microgrid in the n-th virtual microgrid group at time t, k is the number of microgrids that sold electricity; P max The upper limit of power purchase and sale between each microgrid and the grid; and is a binary variable, When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t; When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. It is the maximum value of the power purchased and sold by the power grid.

[0056] Preferably, the alternating direction multiplier method is used to iteratively solve the multi-microgrid energy sharing model to obtain the optimal solution, and the optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching degree evaluation index and the aggregation degree evaluation index of the virtual microgrid group; when the error between the updated source-load-storage balance optimization index and the aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and the aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met, and the optimal solution is used as the multi-microgrid energy sharing result, including:

[0057] When obtaining dynamic virtual aggregation of multiple microgrids under typical wind and solar scenarios, the source-load-storage resource matching evaluation index of the virtual microgrid group corresponding to the maximum value of the comprehensive index is used. And the aggregation degree evaluation index of virtual microgrid group As initialization value;

[0058] In the kth iteration, the optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching evaluation index of the virtual microgrid group. And the aggregation degree evaluation index of virtual microgrid group

[0059] When both satisfy and When , the optimal solution of the multi-microgrid energy sharing model is output; where Δ M is the source-load-storage balance threshold, Δ e is the aggregation degree threshold.

[0060] Preferably, Δ M The value is a non-negative number not greater than 0.1, Δ e The value is a non-negative number not greater than 0.1.

[0061] The present invention also proposes a multi-microgrid energy sharing system, comprising:

[0062] The scenario generation module is used to generate various wind-solar scenarios using a generative adversarial network based on the historical operation data and actual operation data of each microgrid, and to reduce the generated wind-solar scenarios using the K-medoids algorithm to obtain typical wind-solar scenarios;

[0063] The virtual microgrid generation module is used to dynamically aggregate multiple microgrids to obtain a virtual microgrid in each typical wind and solar scenario, with the goal of optimizing the source-load-storage resource matching evaluation index between each virtual microgrid and the aggregation evaluation index of the virtual microgrid.

[0064] The energy sharing model solving module is used to minimize the total operating cost of the virtual microgrid group as the optimization goal, and jointly construct a multi-microgrid energy sharing model by combining the optimization goal and the energy interaction constraints within the same virtual microgrid group; the multi-microgrid energy sharing model is iteratively solved by the alternating direction multiplier method to obtain the optimal solution, and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index of the virtual microgrid group are updated by using the optimal solution of the multi-microgrid energy sharing model; when the error between the updated source-load-storage balance optimization index and aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met, and the optimal solution is used as the multi-microgrid energy sharing result.

[0065] The scenario generation module uses a generative adversarial network to generate wind and solar scenarios based on the historical and actual operation data of each microgrid, including:

[0066] The generative adversarial network includes a generator and a discriminator. According to the training objectives of the generator and the discriminator, the loss functions L of the generator and the discriminator are constructed respectively. G And the loss function L D , the loss function L G And the loss function L D The details are as follows:

[0067]

[0068] Where, L G is the loss function of the generator, L D is the loss function of the discriminator, The historical running data z is subject to the generated sample probability distribution p z The expectation at (z) is the empirical average of the historical running data z and the generator output value; The actual running data x follows the true sample probability distribution p g The expectation at (x) is the empirical average of the actual running data x and the output value of the generator; G(z) is the generated data, and D() is the discriminant function of the discriminator;

[0069] The objective function of the generative adversarial network satisfies the following relationship:

[0070]

[0071] Where V(D,G) is a game value function, the goal of which is to minimize the probability distribution of generated samples p G (z) and the true sample probability distribution p g (x) distribution differences between

[0072] The generative adversarial network is trained based on the historical operation data and actual operation data of each microgrid and the objective function of the generative adversarial network.

[0073] The scene generation module uses the K-medoids algorithm to reduce the generated scenery scenes, including:

[0074] The scenery scenes generated by the generative adversarial network are grouped into a set S, and the optimal set J that can replace the set S is found using the following relationship:

[0075]

[0076] In the formula, p i is the i-th scenery scene u i The probability of occurrence; d(u i ,u j ) is the i-th scenery scene u i and the jth scenery scene uj The distance between them; t is the time variable, T is 24 hours; They are the i-th scenery scene at time t and the j-th scenery scene at time t respectively;

[0077] Randomly select r scenery scenes from the optimal set J as the initial cluster centers. Indicates that r is the number of cluster centers;

[0078] Iterative clustering, by solving the optimal set J to obtain new cluster centers;

[0079] Iterate clustering and determine whether it converges. If it does not converge, repeat iterative clustering. If it converges, use r cluster centers {J 1 ,J 2 ,...,J r} is a typical scene of scenery;

[0080] Calculate the probability of occurrence p of typical scenery scenes i , p i is the ratio of the number of occurrences of the i-th typical scenery scene to the total number of scenery scenes, i = 1, 2, …, r.

[0081] The virtual microgrid generation module uses the power supply and demand imbalance within the virtual microgrid as a source-load-storage balance index of a virtual microgrid; obtains a source-load-storage balance optimization index of a virtual microgrid after performing segmented averaging on the source-load-storage balance optimization index of the virtual microgrid; obtains a source-load-storage resource matching degree evaluation index of each virtual microgrid based on the source-load-storage balance optimization index of multiple virtual microgrids;

[0082] The virtual microgrid group generation module, based on the Newman fast partitioning method, obtains the topological structure of the weighted network according to the topological structure of the microgrid to establish a weighted network; the ratio of the transmission capacity between the nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated using the electrical correlation strength; based on the aggregation degree evaluation index after dynamic virtual aggregation of the weighted network, the degree of each node in the microgrid is used to determine the aggregation degree evaluation index of each microgrid in the virtual microgrid group.

[0083] The source-load-storage balance index within a virtual microgrid satisfies the following relationship:

[0084]

[0085] Where n is the number of the virtual microgrid group obtained by dynamic virtual aggregation of i microgrids in the virtual microgrid group, i∈n means that the i-th microgrid belongs to the n-th virtual microgrid group, is the power corresponding to the supply-demand imbalance of the nth virtual microgrid at time t, is the load of the nth virtual microgrid at time t, P PV,n , P WT,n are the output power of the photovoltaic generator set and the output power of the wind generator set in the nth virtual microgrid group, is the load of the i-th microgrid at time t; is the load of the i-th microgrid participating in demand response at time t; is the real-time power of energy storage of the i-th microgrid at time t; are the output power of the photovoltaic generator set and the output power of the wind generator set of the i-th microgrid at time t respectively;

[0086] The following relationship is used to obtain the optimal index of source-load-storage balance of a virtual microgrid:

[0087]

[0088] In the formula, is the optimization index of the source-load-storage balance of the nth virtual microgrid at time t, with a value range of [0,1];

[0089] Based on the optimization index of the source-load-storage balance of each virtual microgrid group, the source-load-storage resource matching degree evaluation index of each virtual microgrid group is obtained by the following relationship:

[0090]

[0091] In the formula, φ M It is an evaluation index of the matching degree of source-load-storage resources between virtual microgrid groups. T is 24 hours, and N is the total number of virtual microgrid groups.

[0092] Based on the Newman fast partitioning method, the topological structure of the weighted network is equivalent to the topological structure of the microgrid, and the weighted network is established according to the topological structure of the weighted network; the topological structure of the microgrid includes I nodes and L branches; the ratio of the transmission capacity between the nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated according to the following relationship:

[0093]

[0094] In the formula, H i and H j are the degrees of nodes i and j in the microgrid, B ij is the electrical connection strength between node i and node j in the microgrid, satisfying B ij =C ij / Z ij , C ij is the transmission capacity between node i and node j, Zij is the line impedance between node i and node j, I is the number of nodes;

[0095] Based on the evaluation index of the degree of aggregation after dynamic virtual aggregation of weighted networks, the degree of each node in the microgrid is used to calculate the evaluation index of the degree of aggregation of each microgrid in the virtual microgrid group according to the following relationship:

[0096]

[0097] In the formula, φ e It is an evaluation index of the aggregation degree of each microgrid in the virtual microgrid group.

[0098] The virtual microgrid generation module dynamically aggregates multiple microgrids to obtain a virtual microgrid group under typical wind and solar scenarios, with the goal of optimizing the source-load-storage resource matching evaluation index between virtual microgrid groups and the aggregation evaluation index of virtual microgrid groups, including:

[0099] The weighted sum of the source-load-storage resource matching degree evaluation index between each virtual microgrid group and the aggregation degree evaluation index of the virtual microgrid group is used as the comprehensive index for dynamic aggregation of multiple microgrids, satisfying the following relationship:

[0100] φ=γ 1 φ M +γ 2 φ e

[0101] Where, φ is the comprehensive index of dynamic aggregation of multiple microgrids, φ M is the evaluation index of the matching degree of source-load-storage resources between virtual microgrids, φ e is the evaluation index of the aggregation degree of each microgrid in the virtual microgrid group, γ 1 and γ 2 are the weights of the source-load-storage resource matching degree evaluation index between each virtual microgrid group and the weights of the microgrid aggregation degree evaluation index in the virtual microgrid group, both of which have a value range of [0-1];

[0102] In each typical wind and solar scenario, the virtual microgrid group corresponding to the maximum value of the comprehensive index during dynamic aggregation of multiple microgrids is taken as the dynamic virtual aggregation result of multiple microgrids.

[0103] The optimization objective of the multi-microgrid energy sharing model in the energy sharing model establishment module satisfies the following relationship:

[0104]

[0105] In the formula, F MG,n is the total operating cost of the nth virtual microgrid group, They are the electricity purchase and sales cost, gas turbine operation cost, and energy storage operation cost of the nth virtual microgrid group to the upper power grid; is the electricity purchase cost between microgrids in the nth virtual microgrid group; ω G ,ω M ,ω E ,ω T is the weight factor of each cost; the nth virtual microgrid group includes i microgrids, are the purchase and sale prices of electricity between the microgrid and the distribution network at time t, are the amount of electricity purchased and sold between the ith microgrid and the distribution network in the nth virtual microgrid group at time t; ω MT,1 ,ω MT,2 ,ω MT,3 are the power generation cost coefficients of gas turbines, is the gas turbine output in the ith microgrid in the nth virtual microgrid cluster at time t; is the unit operating cost of energy storage, and are the energy storage discharge power and energy storage charging power in the i-th microgrid in the n-th virtual microgrid group at time t, respectively; is the unit price of electricity sold by the microgrid, is the electric power traded between the ith microgrid and the i′th microgrid in the nth virtual microgrid group at time t, i′∈n\i indicates that the i′th microgrid is a microgrid different from the ith microgrid in the nth virtual microgrid group. When it is a positive value, it means the electric power sold by the i-th microgrid to the i′th microgrid at time t; T is the total number of times.

[0106] The energy interaction constraints within the same virtual microgrid group satisfy the following relationship:

[0107]

[0108] In the formula, is the output of the photovoltaic power station in the i-th microgrid in the n-th virtual microgrid group at time t, is the wind farm output in the i-th microgrid in the n-th virtual microgrid group at time t, k is the number of microgrids that sold electricity; P max The upper limit of power purchase and sale between each microgrid and the grid; and is a binary variable, When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t; When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. It is the maximum value of the power purchased and sold by the power grid.

[0109] The alternating direction multiplier method is used to iteratively solve the multi-microgrid energy sharing model to obtain the optimal solution. The optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index of the virtual microgrid group; when the error between the updated source-load-storage balance optimization index and aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met, and the optimal solution is used as the multi-microgrid energy sharing result, including:

[0110] When obtaining dynamic virtual aggregation of multiple microgrids under typical wind and solar scenarios, the source-load-storage resource matching evaluation index of the virtual microgrid group corresponding to the maximum value of the comprehensive index is used. And the aggregation degree evaluation index of virtual microgrid group As initialization value;

[0111] In the kth iteration, the optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching evaluation index of the virtual microgrid group. And the aggregation degree evaluation index of virtual microgrid group

[0112] When both satisfy and When , the optimal solution of the multi-microgrid energy sharing model is output; where Δ M is the source-load-storage balance threshold, Δ e is the aggregation degree threshold.

[0113] Δ M The value is a non-negative number not greater than 0.1, Δ e The value is a non-negative number not greater than 0.1.

[0114] A terminal comprises a processor and a storage medium; the storage medium is used to store instructions; the processor is used to operate according to the instructions to execute the steps of the method.

[0115] A computer-readable storage medium stores a computer program, which implements the steps of the method when executed by a processor.

[0116] The beneficial effect of the present invention is that, compared with the prior art, it at least includes taking into account the impact of the uncertainty of wind and solar resources on the operation of the microgrid system, using GAN to generate the uncertainty of wind and solar resources in typical wind and solar scenarios, and the generated scenarios are closer to the actual scenarios compared to the traditional generation method assuming probability distribution. It is proposed to combine the comprehensive index of source-load-storage matching and electrical correlation strength as a dynamic aggregation index, and select an adaptive genetic algorithm to perform a global search and solution on the aggregation results, thereby ensuring the resource matching degree and structural strength within the virtual microgrid group. The operation mode of the virtual microgrid group reduces the cross-regional power flow, reduces the means of operation control to the group as much as possible, reduces the complexity of control, and improves the operation speed and flexibility of the distribution network. According to the aggregated virtual microgrid group, a multi-microgrid energy sharing model within the group is constructed to improve the utilization rate of renewable energy. The ADMM algorithm is used to solve the energy sharing model, which can achieve rapid scheduling within the virtual microgrid group while maintaining multiple microgrids to achieve an optimal virtual dynamic aggregation. It not only meets the privacy protection requirements of each microgrid, but also reduces the dependence on the upper-level power grid, and at the same time reduces individual and overall operating costs, while achieving improved economy and flexibility of multi-microgrid systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0117] Figure 1 It is a flow chart of a multi-microgrid energy sharing method based on dynamic virtual aggregation proposed by the present invention;

[0118] Figure 2 is a schematic diagram of an IEEE-33 node power distribution system in an embodiment of the present invention;

[0119] Figure 3 is the MG1 photovoltaic scene reduction diagram obtained in an embodiment of the present invention;

[0120] Figure 4 is the MG3 photovoltaic scene reduction diagram obtained in the embodiment of the present invention;

[0121] Figure 5 is a MG2 wind turbine scenario reduction diagram obtained in an embodiment of the present invention;

[0122] Figure 6 is a MG3 wind turbine scenario reduction diagram obtained in an embodiment of the present invention;

[0123] Figure 7 is a schematic diagram of aggregation results of virtual microgrid groups under different typical wind and solar scenarios in an embodiment of the present invention;

[0124] Figure 8 is a curve diagram of the interaction power between microgrids in a virtual microgrid group in an embodiment of the present invention;

[0125] Fig. 9is a curve diagram of the cost under different numbers of iterations in an embodiment of the present invention. DETAILED DESCRIPTION

[0126] In order to make the purpose, technical scheme and advantages of the present invention clearer, the technical scheme of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. The embodiments described in this application are only embodiments of a part of the present invention, rather than all embodiments. Based on the spirit of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the protection scope of the present invention.

[0127] The present invention provides a multi-microgrid energy sharing method based on dynamic virtual aggregation, wherein the multi-microgrid system includes multiple microgrids, such as Figure 1 As shown, including:

[0128] Step 1: Based on the historical operation data and actual operation data of each microgrid, a generative adversarial network is used to generate various wind-solar scenarios, and the generated wind-solar scenarios are reduced using the K-medoids algorithm to obtain typical wind-solar scenarios.

[0129] Specifically, the historical operation data and actual operation data of the output equipment in each microgrid are obtained, wherein the output equipment includes: wind turbines, photovoltaic generators, micro gas turbines, power loads and energy storage equipment.

[0130] Specifically, step 1 includes:

[0131] Step 1.1: Generate wind-solar scenarios using generative adversarial networks (GAN) based on the historical and actual operation data of each microgrid, including:

[0132] Step 1.1.1, the generative adversarial network includes a generator and a discriminator. According to the training objectives of the generator and the discriminator, the loss functions L of the generator and the discriminator are constructed respectively. G And the loss function L D , the loss function L G And the loss function L D They satisfy the following relationships respectively:

[0133]

[0134] Where, L G is the loss function of the generator, L D is the loss function of the discriminator, The historical running data z is subject to the generated sample probability distribution p zThe expectation at (z) is the empirical average of the historical running data z and the generator output value; The actual running data x follows the true sample probability distribution p g (x) is the expectation at the time of the actual running data x and the empirical average of the generator output value; G(z) is the generated data, and D() is the discriminant function of the discriminator.

[0135] Step 1.1.2, the objective function of the generative adversarial network satisfies the following relationship:

[0136]

[0137] Where V(D,G) is a game value function whose goal is to minimize the probability distribution of generated samples p G (z) and the true sample probability distribution p g The difference in distribution between (x).

[0138] Through repeated iterations of data, historical operation data and actual operation data become more and more similar, and the discriminator network also improves its discrimination ability through learning. When the discriminator cannot determine the source of the input sample data, the training is completed, and a landscape scene is obtained.

[0139] In step 1.1.3, the generative adversarial network is trained according to the historical operation data and actual operation data of each microgrid and the objective function of the generative adversarial network.

[0140] Step 1.2: Use the K-medoids algorithm to reduce the generated scenery scenes to obtain typical scenery scenes, including:

[0141] Step 1.2.1, group the scenery scenes generated by the generative adversarial network into a set S, and find the optimal set J that can replace the set S according to the following relationship:

[0142]

[0143] In the formula, p i is the i-th scenery scene u i The probability of occurrence; d(u i ,u j ) is the i-th scenery scene u i and the jth scenery scene u j The distance between them; t is the time variable, T is 24 hours; They are the i-th scenery scene at time t and the j-th scenery scene at time t respectively.

[0144] Step 1.2.2: Randomly select r scenes from the optimal set J as the initial cluster centers. It indicates that r is the number of cluster centers.

[0145] In step 1.2.3, each scenery scene is assigned to the corresponding class based on the minimum distance between each scenery scene and the initial cluster center.

[0146] Step 1.2.4, iterative clustering, by solving the optimal set J to obtain new cluster centers.

[0147] Step 1.2.5, iterate clustering and determine whether it converges. If not, repeat step 2.2.3. If converged, use r cluster centers {J 1 ,J 2 ,...,J r} is a typical scenery scene.

[0148] Step 1.2.6, calculate the probability p of the typical scene of scenery i , p i is the ratio of the number of occurrences of the i-th typical scenery scene to the total number of scenery scenes, i = 1, 2, …, r.

[0149] Step 2: Under each typical wind-solar scenario, with the goal of optimizing the source-load-storage resource matching evaluation index between each virtual microgrid group and the aggregation evaluation index of the virtual microgrid group, multiple microgrids are dynamically virtually aggregated to obtain a virtual microgrid group.

[0150] Specifically, step 2 includes:

[0151] Step 2.1, taking the power supply and demand imbalance within the virtual microgrid group as a source-load-storage balance index of a virtual microgrid group; performing piecewise averaging processing on the source-load-storage balance index of the virtual microgrid group to obtain a source-load-storage balance optimization index of the virtual microgrid group; based on the source-load-storage balance optimization indexes of multiple virtual microgrid groups, obtaining the source-load-storage resource matching degree evaluation index of each virtual microgrid group.

[0152] Specifically, the source-load-storage balance index within a virtual microgrid satisfies the following relationship:

[0153]

[0154] Where n is the number of the virtual microgrid group obtained by dynamic virtual aggregation of i microgrids in the virtual microgrid group, i∈n means that the i-th microgrid belongs to the n-th virtual microgrid group, is the power corresponding to the supply-demand imbalance of the nth virtual microgrid at time t, is the load of the nth virtual microgrid at time t, P PV,n , P WT,n are the output power of the photovoltaic generator set and the output power of the wind generator set in the nth virtual microgrid group, is the load of the i-th microgrid at time t; is the load of the i-th microgrid participating in demand response at time t; is the real-time power of energy storage of the i-th microgrid at time t; are the output power of the photovoltaic generator set and the output power of the wind generator set of the i-th microgrid at time t respectively.

[0155] In the embodiment, the power supply and demand imbalance in the virtual microgrid group is used as a source-load-storage balance index of a virtual microgrid group. However, since the output power of renewable energy, load, and energy storage output power all have time-varying characteristics, it is necessary to perform segmented averaging on the source-load-storage balance index to eliminate the influence of the time-varying characteristics. Therefore, the following relationship is used to obtain the source-load-storage balance optimization index of a virtual microgrid group:

[0156]

[0157] In the formula, is the source-load-storage balance optimization index of the nth virtual microgrid group at time t, and its value range is [0,1].

[0158] Based on the optimization index of the source-load-storage balance of each virtual microgrid group, the source-load-storage resource matching degree evaluation index of each virtual microgrid group is obtained by the following relationship:

[0159]

[0160] In the formula, φ M is the evaluation index of the matching degree of source-load-storage resources between virtual microgrid groups, T is 24, and N is the total number of virtual microgrid groups;

[0161] The goal of multiple microgrid aggregation is to achieve internal energy supply and demand balance and regional autonomy in the aggregated virtual microgrid group, reduce energy interaction with the distribution network, and reduce overall operating costs and distribution network losses. The larger the evaluation index of the source-load-storage resource matching degree between each virtual microgrid group, the higher the source-load-storage resource matching degree between each virtual microgrid group after the aggregation of multiple microgrids.

[0162] Step 2.2, based on the Newman fast partitioning method, the topological structure of the weighted network is equivalently obtained according to the topological structure of the microgrid to establish a weighted network; the ratio of the transmission capacity between the nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated using the electrical correlation strength; based on the aggregation degree evaluation index after dynamic virtual aggregation of the weighted network, the degree of each node in the microgrid is used to determine the aggregation degree evaluation index of each microgrid in the virtual microgrid group.

[0163] Specifically, step 2.2 includes:

[0164] Step 2.2.1, based on the Newman fast partitioning method, the topological structure of the weighted network is equivalently obtained according to the topological structure of the microgrid, and a weighted network is established according to the topological structure of the weighted network; the topological structure of the microgrid includes I nodes and L branches; the ratio of the transmission capacity between the nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated according to the following relationship:

[0165]

[0166] In the formula, H i and H j are the degrees of nodes i and j in the microgrid, B ij is the electrical connection strength between node i and node j in the microgrid, satisfying B ij =C ij / Z ij , C ij is the transmission capacity between node i and node j, Z ij is the line impedance between node i and node j, I is the number of nodes;

[0167] In the existing Newman fast partitioning method, the topological structure of the weighted network uses the connection matrix A = [a ij ] means that the element a in the i-th row and j-th column of the connection matrix ij Satisfies the following relationship:

[0168]

[0169] Where U ij is the weight between node i and node j.

[0170] The aggregation degree evaluation index of the weighted network after dynamic virtual aggregation satisfies the following relationship:

[0171]

[0172] In the formula, φ a is the quantitative parameter of the virtual microgrid group, I is the number of nodes, L is the number of branches, δ(i, j) is a 0-1 state quantity representing whether nodes i and j coincide. When nodes i and j coincide, δ(i, j) is 0, otherwise δ(i, j) is 1; k i , k j are the degrees of node i and node j respectively, and the degree of node i satisfies

[0173] If the existing Newman fast partitioning method is directly used for microgrid aggregation, the following problems still exist:

[0174] 1) It is impossible to reflect the influence of two physical properties, impedance and capacity, at the same time;

[0175] 2) It cannot reflect the contribution of all paths between two points to the transmission of electric energy, which does not conform to the physical laws of the power grid;

[0176] Therefore, the present invention proposes to improve the existing Newman fast partitioning method. During the improvement process, it was found that the electrical correlation strength can be regarded as the composite weight of the power grid. The smaller the line impedance between the two nodes, the smaller the transmission loss; the larger the transmission capacity between the two nodes, the larger the maximum transmittable power. Therefore, the smaller the line impedance and the larger the transmission capacity, the greater the electrical correlation strength between the two nodes. Therefore, the electrical correlation strength is used to calculate the degree of the node in the microgrid to update the degree of the node in the existing Newman fast partitioning method, so that the improved Newman fast partitioning method can characterize the two basic steady-state characteristics of the line impedance and transmission capacity of the microgrid, and can reflect the contribution of the flow path between the nodes in the microgrid to the power transmission, so as to be more in line with the dynamic characteristics of the microgrid.

[0177] Step 2.2.2, based on the aggregation degree evaluation index after dynamic virtual aggregation of the weighted network, the aggregation degree evaluation index of each microgrid in the virtual microgrid group is calculated by using the degree of each node in the microgrid according to the following relationship:

[0178]

[0179] In the formula, φ e It is an evaluation index of the aggregation degree of each microgrid in the virtual microgrid group.

[0180] Specifically, the aggregation degree evaluation index of the virtual microgrid group represents the difference between the distribution probability of the electrical correlation strength between each node in the microgrid and the distribution probability of the electrical correlation strength between each node in the microgrid in the virtual microgrid group. Randomly draw a unit electrical correlation strength in network Y, then the probability of the unit electrical correlation strength connecting from node i to node j depends on the probabilities of two events: event A, the unit electrical correlation strength starts from node i; event B, the unit electrical correlation strength ends at node j; according to the definition of degree, the probability of event A is The probability of event B is For network Y, the electrical connection strength B between nodes i and j ij It is known that events A and B are not completely independent. When event A is true, the probability of event B is Then the probability of randomly selecting the unit electrical connection strength from node i to node j is: There is another network R. Assume that the total number of nodes in network R is the same as the total number of nodes in network Y, and the degrees of nodes i and j are also the same, but the nodes in network R are completely randomly distributed, that is, the electrical correlation strength is completely randomly distributed and is not affected by the electrical correlation strength B. ij , so events A and B are completely independent, then the probability of drawing a connection from node i to node j is: At this time φ e It also represents the difference between the electrical correlation strength between nodes in network Y and the distribution probability of electrical correlation strength in random network R during dynamic virtual aggregation.

[0181] The larger the aggregation evaluation index of the virtual microgrid group is, the tighter the microgrids in the virtual microgrid group are aggregated.

[0182] Step 2.3, in each typical wind and solar scenario, with the goal of optimizing the source-load-storage resource matching evaluation index between each virtual microgrid group and the aggregation evaluation index of the virtual microgrid group, multiple microgrids are dynamically virtual aggregated to obtain a virtual microgrid group;

[0183] The dynamic aggregation process of microgrids can be regarded as a multi-objective optimization problem. The higher the source-load-storage balance, the better the output coordination of the source-load-storage in the aggregated virtual microgrid group. The higher the electrical correlation strength, the closer the electrical correlation is between the nodes connected to the microgrids in the virtual microgrid group during the aggregation of multiple microgrids. In order to obtain the final aggregation result, the multi-objective is converted into a single objective using the weighted method.

[0184] The weighted sum of the source-load-storage resource matching degree evaluation index between each virtual microgrid group and the aggregation degree evaluation index of the virtual microgrid group is used as the comprehensive index for dynamic aggregation of multiple microgrids, satisfying the following relationship:

[0185] φ=γ 1 φ M +γ 2 φ e

[0186] Where, φ is the comprehensive index of dynamic aggregation of multiple microgrids, φ M is the evaluation index of the matching degree of source-load-storage resources between virtual microgrids, φ e is the evaluation index of the aggregation degree of each microgrid in the virtual microgrid group, γ 1 and γ 2 They are the weights of the source-load-storage resource matching degree evaluation index between each virtual microgrid group and the weights of the microgrid aggregation degree evaluation index in the virtual microgrid group, and their value ranges are [0-1].

[0187] The present invention proposes a comprehensive index that takes into account the source-load-storage balance and the electrical correlation strength. Based on the comprehensive index, it can objectively take into account the dual characteristics of structure and function, and ensure the demand for electrical connection between multiple microgrids within a virtual microgrid group.

[0188] A genetic algorithm is used to solve the comprehensive index. During the solution, the crossover probability and mutation probability are adaptively adjusted according to the number of population iterations and the fitness of the individuals to improve the solution efficiency.

[0189] Step 3: Taking the minimization of the total operating cost of the virtual microgrid group as the optimization objective, the optimization objective and the energy interaction constraints within the same virtual microgrid group are combined to form a multi-microgrid energy sharing model.

[0190] Energy sharing analysis is conducted on multiple microgrids within the aggregated virtual microgrid group. Considering the microgrid's own operating costs, the cost of purchasing electricity from the superior power grid, and the cost of electricity trading, the optimization goal of the multi-microgrid energy sharing model is constructed.

[0191] The optimization objective of the multi-microgrid energy sharing model satisfies the following relationship:

[0192]

[0193]

[0194] In the formula, F MG,n is the total operating cost of the nth virtual microgrid group, They are the electricity purchase and sales cost, gas turbine operation cost, and energy storage operation cost of the nth virtual microgrid group to the upper power grid; is the electricity purchase cost between microgrids in the nth virtual microgrid group; ω G ,ω M ,ω E ,ω T is the weight factor of each cost; the nth virtual microgrid group includes i microgrids, are the purchase and sale prices of electricity between the microgrid and the distribution network at time t, are the amount of electricity purchased and sold between the ith microgrid and the distribution network in the nth virtual microgrid group at time t; ω MT,1 ,ω MT,2 ,ω MT,3 are the power generation cost coefficients of gas turbines, is the gas turbine output in the ith microgrid in the nth virtual microgrid cluster at time t; is the unit operating cost of energy storage, and are the energy storage discharge power and energy storage charging power in the i-th microgrid in the n-th virtual microgrid group at time t, respectively; is the unit price of electricity sold by the microgrid, is the electric power traded between the ith microgrid and the i′th microgrid in the nth virtual microgrid group at time t, i′∈n\i indicates that the i′th microgrid is a microgrid different from the ith microgrid in the nth virtual microgrid group. When it is a positive value, it means the electric power sold by the i-th microgrid to the i′th microgrid at time t; T is the total number of times.

[0195] The energy interaction constraints within the same virtual microgrid group satisfy the following relationship:

[0196]

[0197] In the formula, is the output of the photovoltaic power station in the i-th microgrid in the n-th virtual microgrid group at time t, is the wind farm output in the i-th microgrid in the n-th virtual microgrid group at time t, k is the number of microgrids that sold electricity; P max The upper limit of power purchase and sale between each microgrid and the grid; and is a binary variable, When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t; When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. It is the maximum value of the power purchased and sold by the power grid.

[0198] The optimization objectives and energy interaction constraints within the same virtual microgrid group are combined to form a multi-microgrid energy sharing model.

[0199] Step 4, the alternating direction multiplier method (ADMM) is used to iteratively solve the multi-microgrid energy sharing model to obtain the optimal solution, and the optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching degree evaluation index and the aggregation degree evaluation index of the virtual microgrid group; when the error between the updated source-load-storage balance optimization index and the aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and the aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met, and the optimal solution is used as the multi-microgrid energy sharing result.

[0200] Among them, the optimal solution includes the electric power traded between microgrids within the virtual microgrid cluster;

[0201] Specifically, the process of determining whether convergence has occurred includes:

[0202] Obtain the source-load-storage resource matching evaluation index of the virtual microgrid group corresponding to the maximum value of the comprehensive index when multiple microgrids are dynamically virtualized under typical wind and solar scenarios And the aggregation degree evaluation index of virtual microgrid group As initialization value;

[0203] In the kth iteration, the optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching evaluation index of the virtual microgrid group. And the aggregation degree evaluation index of virtual microgrid group

[0204] When both meet and When , the optimal solution of the multi-microgrid energy sharing model is output; where Δ M is the source-load-storage balance threshold, Δ e is the aggregation degree threshold;

[0205] In the embodiment, Δ M The value is a non-negative number not greater than 0.1, Δ e The value is a non-negative number not greater than 0.1.

[0206] The ADMM algorithm is an efficient, simple algorithm with good convergence, and does not require the objective function to be a strictly convex function.

[0207] In the embodiment, firstly, the scene data is analyzed, the electric energy interaction amount is initialized, and an initial electric energy interaction scheduling plan is submitted to each microgrid; then each microgrid solves its own optimal scheduling plan and the electric energy interaction amount with other microgrids based on the multi-microgrid energy sharing model according to its own renewable energy and load conditions, and uploads it to the scheduling center through the interconnection line; iterative solution is performed, each microgrid is continuously updated, and it is determined whether the error converges. If it converges, the iteration stops and the electric energy interaction amount between each microgrid is output. If it does not converge, the iteration continues.

[0208] The present invention also proposes a multi-microgrid energy sharing system based on dynamic virtual aggregation, comprising:

[0209] The scenario generation module is used to generate various wind-solar scenarios using a generative adversarial network based on the historical operation data and actual operation data of each microgrid, and to reduce the generated wind-solar scenarios using the K-medoids algorithm to obtain typical wind-solar scenarios;

[0210] The virtual microgrid generation module is used to dynamically aggregate multiple microgrids to obtain a virtual microgrid in each typical wind and solar scenario, with the goal of optimizing the source-load-storage resource matching evaluation index between each virtual microgrid and the aggregation evaluation index of the virtual microgrid.

[0211] The energy sharing model solving module is used to minimize the total operating cost of the virtual microgrid group as the optimization goal, and jointly construct a multi-microgrid energy sharing model by combining the optimization goal and the energy interaction constraints within the same virtual microgrid group; the multi-microgrid energy sharing model is iteratively solved by the alternating direction multiplier method to obtain the optimal solution, and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index of the virtual microgrid group are updated by using the optimal solution of the multi-microgrid energy sharing model; when the error between the updated source-load-storage balance optimization index and aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met, and the optimal solution is used as the multi-microgrid energy sharing result.

[0212] The multi-microgrid energy sharing strategy under dynamic virtual aggregation designed by the present invention takes into account the uncertainty of wind and solar power processing, dynamically aggregates multiple microgrids by integrating two indicators, and then dispatches and solves the energy sharing problem of multiple microgrids in the aggregated virtual microgrid group. This improves the flexibility of the system and reduces the operating cost of the microgrid.

[0213] The IEEE-33 node power distribution system is used for example simulation. The IEEE-33 node example is attached. Figure 2 As shown, nodes 4, 7, 9, 11, 20, 22, 24, 27, and 29 are respectively connected to a microgrid, and each microgrid is equipped with an energy storage, a micro gas turbine, and a wind turbine photovoltaic power generation device.

[0214] Based on the method proposed in the present invention, the MG1 photovoltaic scene, MG3 photovoltaic scene, MG2 wind turbine scene and MG3 wind turbine scene are obtained as follows: Figure 3 , 4 , 5 and 6 as shown.

[0215] The multi-microgrid energy sharing method under dynamic aggregation designed by the present invention comprehensively considers time and space conditions, establishes a dynamic aggregation model, and uses a genetic algorithm to solve it. The virtual dynamic aggregation result is shown in the figure Figure 7 Then, according to the aggregated virtual microgrid group, the group is optimized and dispatched, and a multi-microgrid energy sharing model within the group is constructed. The optimization is carried out with the goal of minimizing the cost of the virtual microgrid group, and the ADMM algorithm is used to solve the problem. The solution result is shown in Figure 8 and Fig. 9 As shown in the figure. The YALMIP toolbox in MATLAB is used to solve the overall model by calling the CPLEX solver. The simulation results show that the operating costs of each microgrid and virtual microgrid group are reduced, and the power trading between microgrids improves the flexibility of the system.

[0216] The scenario generation module uses a generative adversarial network to generate wind and solar scenarios based on the historical and actual operation data of each microgrid, including:

[0217] The generative adversarial network includes a generator and a discriminator. According to the training objectives of the generator and the discriminator, the loss functions L of the generator and the discriminator are constructed respectively. G And the loss function L D , the loss function L G And the loss function L D The details are as follows:

[0218]

[0219] Where, L G is the loss function of the generator, L D is the loss function of the discriminator, The historical running data z is subject to the generated sample probability distribution p z The expectation at (z) is the empirical average of the historical running data z and the generator output value; The actual running data x follows the true sample probability distribution p g The expectation at (x) is the empirical average of the actual running data x and the output value of the generator; G(z) is the generated data, and D() is the discriminant function of the discriminator;

[0220] The objective function of the generative adversarial network satisfies the following relationship:

[0221]

[0222] Where V(D,G) is a game value function, the goal of which is to minimize the probability distribution of generated samples p G (z) and the true sample probability distribution p g (x) distribution differences between

[0223] The generative adversarial network is trained based on the historical operation data and actual operation data of each microgrid and the objective function of the generative adversarial network.

[0224] The scene generation module uses the K-medoids algorithm to reduce the generated scenery scenes, including:

[0225] The scenery scenes generated by the generative adversarial network are grouped into a set S, and the optimal set J that can replace the set S is found using the following relationship:

[0226]

[0227] In the formula, p i is the i-th scenery scene u iThe probability of occurrence; d(u i ,u j ) is the i-th scenery scene u i and the jth scenery scene u j The distance between them; t is the time variable, T is 24 hours; They are the i-th scenery scene at time t and the j-th scenery scene at time t respectively;

[0228] Randomly select r scenery scenes from the optimal set J as the initial cluster centers. Indicates that r is the number of cluster centers;

[0229] Iterative clustering, by solving the optimal set J to obtain new cluster centers;

[0230] Iterate clustering and determine whether it converges. If it does not converge, repeat iterative clustering. If it converges, use r cluster centers {J 1 ,J 2 ,...,J r} is a typical scene of scenery;

[0231] Calculate the probability p of a typical scene i , p i is the ratio of the number of occurrences of the i-th typical scenery scene to the total number of scenery scenes, i = 1, 2, …, r.

[0232] The virtual microgrid generation module uses the power supply and demand imbalance within the virtual microgrid as a source-load-storage balance index of a virtual microgrid; obtains a source-load-storage balance optimization index of a virtual microgrid after performing segmented averaging on the source-load-storage balance optimization index of the virtual microgrid; obtains a source-load-storage resource matching degree evaluation index of each virtual microgrid based on the source-load-storage balance optimization index of multiple virtual microgrids;

[0233] The virtual microgrid group generation module, based on the Newman fast partitioning method, obtains the topological structure of the weighted network according to the topological structure of the microgrid to establish a weighted network; the ratio of the transmission capacity between the nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated using the electrical correlation strength; based on the aggregation degree evaluation index after dynamic virtual aggregation of the weighted network, the degree of each node in the microgrid is used to determine the aggregation degree evaluation index of each microgrid in the virtual microgrid group.

[0234] The source-load-storage balance index within a virtual microgrid satisfies the following relationship:

[0235]

[0236] Where n is the number of the virtual microgrid group obtained by dynamic virtual aggregation of i microgrids in the virtual microgrid group, i∈n means that the i-th microgrid belongs to the n-th virtual microgrid group, is the power corresponding to the supply-demand imbalance of the nth virtual microgrid at time t, is the load of the nth virtual microgrid at time t, P PV,n , P WT,n are the output power of the photovoltaic generator set and the output power of the wind generator set in the nth virtual microgrid group, is the load of the i-th microgrid at time t; is the load of the i-th microgrid participating in demand response at time t; is the real-time power of energy storage of the i-th microgrid at time t; are the output power of the photovoltaic generator set and the output power of the wind generator set of the i-th microgrid at time t respectively;

[0237] The following relationship is used to obtain the optimal index of source-load-storage balance of a virtual microgrid:

[0238]

[0239] In the formula, is the optimization index of the source-load-storage balance of the nth virtual microgrid at time t, with a value range of [0,1];

[0240] Based on the optimization index of the source-load-storage balance of each virtual microgrid group, the source-load-storage resource matching degree evaluation index of each virtual microgrid group is obtained by the following relationship:

[0241]

[0242] In the formula, φ M It is an evaluation index of the matching degree of source-load-storage resources between virtual microgrid groups. T is 24 hours, and N is the total number of virtual microgrid groups.

[0243] Based on the Newman fast partitioning method, the topological structure of the weighted network is equivalent to the topological structure of the microgrid, and the weighted network is established according to the topological structure of the weighted network; the topological structure of the microgrid includes I nodes and L branches; the ratio of the transmission capacity between the nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated according to the following relationship:

[0244]

[0245] In the formula, H i and H j are the degrees of nodes i and j in the microgrid, B ijis the electrical connection strength between node i and node j in the microgrid, satisfying B ij =C ij / Z ij , C ij is the transmission capacity between node i and node j, Z ij is the line impedance between node i and node j, I is the number of nodes;

[0246] Based on the evaluation index of the degree of aggregation after dynamic virtual aggregation of weighted networks, the degree of each node in the microgrid is used to calculate the evaluation index of the degree of aggregation of each microgrid in the virtual microgrid group according to the following relationship:

[0247]

[0248] In the formula, φ e It is an evaluation index of the aggregation degree of each microgrid in the virtual microgrid group.

[0249] The virtual microgrid generation module dynamically aggregates multiple microgrids to obtain a virtual microgrid group under typical wind and solar scenarios, with the goal of optimizing the source-load-storage resource matching evaluation index between virtual microgrid groups and the aggregation evaluation index of virtual microgrid groups, including:

[0250] The weighted sum of the source-load-storage resource matching degree evaluation index between each virtual microgrid group and the aggregation degree evaluation index of the virtual microgrid group is used as the comprehensive index for dynamic aggregation of multiple microgrids, satisfying the following relationship:

[0251] φ=γ 1 φ M +γ 2 φ e

[0252] Where, φ is the comprehensive index of dynamic aggregation of multiple microgrids, φ M is the evaluation index of the matching degree of source-load-storage resources between virtual microgrids, φ e is the evaluation index of the aggregation degree of each microgrid in the virtual microgrid group, γ 1 and γ 2 are the weights of the source-load-storage resource matching degree evaluation index between each virtual microgrid group and the weights of the microgrid aggregation degree evaluation index in the virtual microgrid group, both of which have a value range of [0-1];

[0253] In each typical wind and solar scenario, the virtual microgrid group corresponding to the maximum value of the comprehensive index during dynamic aggregation of multiple microgrids is taken as the dynamic virtual aggregation result of multiple microgrids.

[0254] The optimization objective of the multi-microgrid energy sharing model in the energy sharing model establishment module satisfies the following relationship:

[0255]

[0256]

[0257] In the formula, F MG,n is the total operating cost of the nth virtual microgrid group, They are the electricity purchase and sales cost, gas turbine operation cost, and energy storage operation cost of the nth virtual microgrid group to the upper power grid; is the electricity purchase cost between microgrids in the nth virtual microgrid group; ω G ,ω M ,ω E ,ω T is the weight factor of each cost; the nth virtual microgrid group includes i microgrids, are the purchase and sale prices of electricity between the microgrid and the distribution network at time t, are the amount of electricity purchased and sold between the ith microgrid and the distribution network in the nth virtual microgrid group at time t; ω MT,1 ,ω MT,2 ,ω MT,3 are the power generation cost coefficients of gas turbines, is the gas turbine output in the ith microgrid in the nth virtual microgrid cluster at time t; is the unit operating cost of energy storage, and are the energy storage discharge power and energy storage charging power in the i-th microgrid in the n-th virtual microgrid group at time t, respectively; is the unit price of electricity sold by the microgrid, is the electric power traded between the ith microgrid and the i′th microgrid in the nth virtual microgrid group at time t, i′∈n\i indicates that the i′th microgrid is a microgrid different from the ith microgrid in the nth virtual microgrid group. When it is a positive value, it means the electric power sold by the i-th microgrid to the i′th microgrid at time t; T is the total number of times.

[0258] The energy interaction constraints within the same virtual microgrid group satisfy the following relationship:

[0259]

[0260] In the formula, is the output of the photovoltaic power station in the i-th microgrid in the n-th virtual microgrid group at time t, is the wind farm output in the i-th microgrid in the n-th virtual microgrid group at time t, k is the number of microgrids that sold electricity; P max The upper limit of power purchase and sale between each microgrid and the grid; and is a binary variable, When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t; When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. It is the maximum value of the power purchased and sold by the power grid.

[0261] The alternating direction multiplier method is used to iteratively solve the multi-microgrid energy sharing model to obtain the optimal solution. The optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index of the virtual microgrid group; when the error between the updated source-load-storage balance optimization index and aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met, and the optimal solution is used as the multi-microgrid energy sharing result, including:

[0262] When obtaining dynamic virtual aggregation of multiple microgrids under typical wind and solar scenarios, the source-load-storage resource matching evaluation index of the virtual microgrid group corresponding to the maximum value of the comprehensive index is used. And the aggregation degree evaluation index of virtual microgrid group As initialization value;

[0263] In the kth iteration, the optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching evaluation index of the virtual microgrid group. And the aggregation degree evaluation index of virtual microgrid group

[0264] When both meet and When , the optimal solution of the multi-microgrid energy sharing model is output; where Δ M is the source-load-storage balance threshold, Δ e is the aggregation degree threshold.

[0265] Δ M The value is a non-negative number not greater than 0.1, Δ e The value is a non-negative number not greater than 0.1.

[0266] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0267] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.

[0268] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.

[0269] The computer program instructions for performing the operation of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be customized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present disclosure.

[0270] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.

Claims

1. A multi-microgrid energy sharing method, wherein the multi-microgrid system includes multiple microgrids, and the output equipment in each microgrid includes: Wind turbines, photovoltaic generators, micro gas turbines, power loads and energy storage equipment; characterized by comprising: According to the historical operation data and actual operation data of each microgrid, a generative adversarial network is used to generate various wind-solar scenarios, and the K-medoids algorithm is used to reduce the generated wind-solar scenarios to obtain typical wind-solar scenarios. In each typical wind and solar scenario, with the goal of optimizing the source-load-storage resource matching evaluation index between each virtual microgrid group and the aggregation evaluation index of the virtual microgrid group, multiple microgrids are dynamically virtual aggregated to obtain a virtual microgrid group. Taking the minimum total operating cost of the virtual microgrid group as the optimization goal, the optimization goal and the energy interaction constraints within the same virtual microgrid group are combined to form a multi-microgrid energy sharing model. The alternating direction multiplier method is used to iteratively solve the multi-microgrid energy sharing model to obtain the optimal solution. The optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index of the virtual microgrid group. When the error between the updated source-load-storage balance optimization index and aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met and the optimal solution is taken as the multi-microgrid energy sharing result.

2. The multi-microgrid energy sharing method according to claim 1, characterized in that: Based on the historical and actual operation data of each microgrid, a generative adversarial network is used to generate wind and solar scenarios, including: The generative adversarial network includes a generator and a discriminator. According to the training objectives of the generator and the discriminator, the loss functions L of the generator and the discriminator are constructed respectively. G And the loss function L D , the loss function L G And the loss function L D The details are as follows: L G =-E z~pz(z) {log[1-D(G(z))]} L D =-E x~pg(x) [logD(x)]+E z~pz(z) {log[1-D(G(z))]} Where, L G is the loss function of the generator, L D is the loss function of the discriminator, The historical running data z is subject to the generated sample probability distribution p z The expectation at (z) is the empirical average of the historical running data z and the generator output value; The actual running data x follows the true sample probability distribution p g The expectation at (x) is the empirical average of the actual running data x and the output value of the generator; G(z) is the generated data, and D() is the discriminant function of the discriminator; The objective function of the generative adversarial network satisfies the following relationship: Where V(D,G) is a game value function, the goal of which is to minimize the probability distribution of generated samples p G (z) and the true sample probability distribution p g (x) distribution differences between The generative adversarial network is trained based on the historical operation data and actual operation data of each microgrid and the objective function of the generative adversarial network.

3. The multi-microgrid energy sharing method according to claim 2, characterized in that: The K-medoids algorithm is used to reduce the generated scenery scenes, including: The scenery scenes generated by the generative adversarial network are grouped into a set S, and the optimal set J that can replace the set S is found using the following relationship: In the formula, p i is the i-th scenery scene u i The probability of occurrence; d(u i ,u j ) is the i-th scenery scene u i and the jth scenery scene u j The distance between them; t is the time variable, T is 24 hours; They are the i-th scenery scene at time t and the j-th scenery scene at time t respectively; Randomly select r scenery scenes from the optimal set J as the initial cluster centers. Indicates that r is the number of cluster centers; Iterative clustering, by solving the optimal set J to obtain new cluster centers; Iterate clustering and determine whether it converges. If it does not converge, repeat iterative clustering. If it converges, use r cluster centers {J1, J2, ..., J r } is a typical scene of scenery; Calculate the probability p of a typical scene i , p i is the ratio of the number of occurrences of the i-th typical scenery scene to the total number of scenery scenes, i = 1, 2, …, r.

4. The multi-microgrid energy sharing method according to claim 1, characterized in that: The power supply and demand imbalance in the virtual microgrid group is used as a source-load-storage balance index of a virtual microgrid group; the source-load-storage balance index of the virtual microgrid group is processed by segmented averaging to obtain a source-load-storage balance optimization index of the virtual microgrid group; based on the source-load-storage balance optimization indexes of multiple virtual microgrid groups, the source-load-storage resource matching degree evaluation index of each virtual microgrid group is obtained; Based on the Newman fast partitioning method, the topological structure of the weighted network is equivalently obtained according to the topological structure of the microgrid to establish a weighted network; the ratio of the transmission capacity between nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated using the electrical correlation strength; based on the aggregation degree evaluation index after dynamic virtual aggregation of the weighted network, the degree of each node in the microgrid is used to determine the aggregation degree evaluation index of each microgrid in the virtual microgrid group.

5. The multi-microgrid energy sharing method according to claim 4, characterized in that: The source-load-storage balance index within a virtual microgrid satisfies the following relationship: Where n is the number of the virtual microgrid group obtained by dynamic virtual aggregation of i microgrids in the virtual microgrid group, i∈n means that the i-th microgrid belongs to the n-th virtual microgrid group, is the power corresponding to the supply-demand imbalance of the nth virtual microgrid at time t, is the load of the nth virtual microgrid at time t, P PV,n , P WT,n are the output power of the photovoltaic generator set and the output power of the wind generator set in the nth virtual microgrid group, is the load of the i-th microgrid at time t; is the load of the i-th microgrid participating in demand response at time t; is the real-time power of energy storage of the i-th microgrid at time t; are the output power of the photovoltaic generator set and the output power of the wind generator set of the i-th microgrid at time t respectively; The following relationship is used to obtain the optimal index of source-load-storage balance of a virtual microgrid: In the formula, is the optimization index of the source-load-storage balance of the nth virtual microgrid at time t, with a value range of [0,1]; Based on the optimization index of the source-load-storage balance of each virtual microgrid group, the source-load-storage resource matching degree evaluation index of each virtual microgrid group is obtained by the following relationship: In the formula, φ M It is an evaluation index of the matching degree of source-load-storage resources among virtual microgrid groups. T is 24 hours, and N is the total number of virtual microgrid groups.

6. The multi-microgrid energy sharing method according to claim 5, characterized in that: Based on the Newman fast partitioning method, the topological structure of the weighted network is equivalent to the topological structure of the microgrid, and the weighted network is established according to the topological structure of the weighted network; the topological structure of the microgrid includes I nodes and L branches; the ratio of the transmission capacity between the nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated according to the following relationship: In the formula, H i and H j are the degrees of nodes i and j in the microgrid, B ij is the electrical connection strength between node i and node j in the microgrid, satisfying B ij =C ij / Z ij , C ij is the transmission capacity between node i and node j, Z ij is the line impedance between node i and node j, I is the number of nodes; Based on the evaluation index of the degree of aggregation after dynamic virtual aggregation of weighted networks, the degree of each node in the microgrid is used to calculate the evaluation index of the degree of aggregation of each microgrid in the virtual microgrid group according to the following relationship: In the formula, φ e It is an evaluation index of the aggregation degree of each microgrid in the virtual microgrid group.

7. The multi-microgrid energy sharing method according to claim 6, characterized in that: In each typical wind and solar scenario, with the goal of optimizing the source-load-storage resource matching evaluation index between each virtual microgrid group and the aggregation evaluation index of the virtual microgrid group, multiple microgrids are dynamically virtual aggregated to obtain a virtual microgrid group, including: The weighted sum of the source-load-storage resource matching degree evaluation index between each virtual microgrid group and the aggregation degree evaluation index of the virtual microgrid group is used as the comprehensive index for dynamic aggregation of multiple microgrids, satisfying the following relationship: φ=γ1φ M +g2f e Where, φ is the comprehensive index of dynamic aggregation of multiple microgrids, φ M is the evaluation index of the matching degree of source-load-storage resources between virtual microgrids, φ e is the evaluation index of the aggregation degree of each microgrid in the virtual microgrid group, γ1 and γ2 are the weights of the evaluation index of the source-load-storage resource matching degree between each virtual microgrid group and the weights of the evaluation index of the aggregation degree of each microgrid in the virtual microgrid group, respectively, and the value range is [0-1]; In each typical wind and solar scenario, the virtual microgrid group corresponding to the maximum value of the comprehensive index during dynamic aggregation of multiple microgrids is taken as the dynamic virtual aggregation result of multiple microgrids.

8. The multi-microgrid energy sharing method according to claim 1, characterized in that: The optimization objective of the multi-microgrid energy sharing model satisfies the following relationship: In the formula, F MG,n is the total operating cost of the nth virtual microgrid group, They are the electricity purchase and sales cost, gas turbine operation cost, and energy storage operation cost of the nth virtual microgrid group to the upper power grid; is the electricity purchase cost between microgrids in the nth virtual microgrid group; ω G ,ω M ,ω E ,ω T is the weight factor of each cost; the nth virtual microgrid group includes i microgrids, are the purchase and sale prices of electricity between the microgrid and the distribution network at time t, are the amount of electricity purchased and sold between the ith microgrid and the distribution network in the nth virtual microgrid group at time t; ω MT,1 ,ω MT,2 ,ω MT,3 are the power generation cost coefficients of gas turbines, is the gas turbine output in the ith microgrid in the nth virtual microgrid cluster at time t; is the unit operating cost of energy storage, and are the energy storage discharge power and energy storage charging power in the i-th microgrid in the n-th virtual microgrid group at time t, respectively; is the unit price of electricity sold by the microgrid, is the electric power traded between the ith microgrid and the i′th microgrid in the nth virtual microgrid group at time t, i′∈n\i indicates that the i′th microgrid is a microgrid different from the ith microgrid in the nth virtual microgrid group. When it is a positive value, it means the electric power sold by the i-th microgrid to the i′th microgrid at time t; T is the total number of times.

9. The multi-microgrid energy sharing method according to claim 8, characterized in that: The energy interaction constraints within the same virtual microgrid group satisfy the following relationship: In the formula, is the output of the photovoltaic power station in the i-th microgrid in the n-th virtual microgrid group at time t, is the wind farm output in the i-th microgrid in the n-th virtual microgrid group at time t, k is the number of microgrids that sold electricity; P max The upper limit of power purchase and sale between each microgrid and the grid; and is a binary variable, When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t; When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. It is the maximum value of the power purchased and sold by the power grid.

10. The multi-microgrid energy sharing method according to claim 7, characterized in that: The alternating direction multiplier method is used to iteratively solve the multi-microgrid energy sharing model to obtain the optimal solution. The optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index of the virtual microgrid group; when the error between the updated source-load-storage balance optimization index and aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met, and the optimal solution is used as the multi-microgrid energy sharing result, including: When obtaining dynamic virtual aggregation of multiple microgrids under typical wind and solar scenarios, the source-load-storage resource matching evaluation index of the virtual microgrid group corresponding to the maximum value of the comprehensive index is used. And the aggregation degree evaluation index of virtual microgrid group As initialization value; In the kth iteration, the optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching evaluation index of the virtual microgrid group. And the aggregation degree evaluation index of virtual microgrid group When both satisfy and When , the optimal solution of the multi-microgrid energy sharing model is output; where Δ M is the source-load-storage balance threshold, Δ e is the aggregation degree threshold.

11. The multi-microgrid energy sharing method according to claim 10, characterized in that: Δ M The value is a non-negative number not greater than 0.1, Δ e The value is a non-negative number not greater than 0.

1.

12. A multi-microgrid energy sharing system, characterized in that: include: The scenario generation module is used to generate various wind-solar scenarios using a generative adversarial network based on the historical operation data and actual operation data of each microgrid, and to reduce the generated wind-solar scenarios using the K-medoids algorithm to obtain typical wind-solar scenarios; The virtual microgrid generation module is used to dynamically aggregate multiple microgrids to obtain a virtual microgrid in each typical wind and solar scenario, with the goal of optimizing the source-load-storage resource matching evaluation index between each virtual microgrid and the aggregation evaluation index of the virtual microgrid. The energy sharing model solving module is used to minimize the total operating cost of the virtual microgrid group as the optimization goal, and jointly construct a multi-microgrid energy sharing model by combining the optimization goal and the energy interaction constraints within the same virtual microgrid group; the multi-microgrid energy sharing model is iteratively solved by the alternating direction multiplier method to obtain the optimal solution, and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index of the virtual microgrid group are updated by using the optimal solution of the multi-microgrid energy sharing model; when the error between the updated source-load-storage balance optimization index and aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met, and the optimal solution is used as the multi-microgrid energy sharing result.

13. The multi-microgrid energy sharing system according to claim 12, characterized in that: The scenario generation module uses a generative adversarial network to generate wind and solar scenarios based on the historical and actual operation data of each microgrid, including: The generative adversarial network includes a generator and a discriminator. According to the training objectives of the generator and the discriminator, the loss functions L of the generator and the discriminator are constructed respectively. G And the loss function L D , the loss function L G And the loss function L D The details are as follows: Where, L G is the loss function of the generator, L D is the loss function of the discriminator, The historical running data z is subject to the generated sample probability distribution p z The expectation at (z) is the empirical average of the historical running data z and the generator output value; The actual running data x follows the true sample probability distribution p g The expectation at (x) is the empirical average of the actual running data x and the output value of the generator; G(z) is the generated data, and D() is the discriminant function of the discriminator; The objective function of the generative adversarial network satisfies the following relationship: Where V(D,G) is a game value function, the goal of which is to minimize the probability distribution of generated samples p G (z) and the true sample probability distribution p g (x) distribution differences between The generative adversarial network is trained based on the historical operation data and actual operation data of each microgrid and the objective function of the generative adversarial network.

14. The multi-microgrid energy sharing system according to claim 13, characterized in that: The scene generation module uses the K-medoids algorithm to reduce the generated scenery scenes, including: The scenery scenes generated by the generative adversarial network are grouped into a set S, and the optimal set J that can replace the set S is found using the following relationship: In the formula, p i is the i-th scenery scene u i The probability of occurrence; d(u i ,u j ) is the i-th scenery scene u i and the jth scenery scene u j The distance between them; t is the time variable, T is 24 hours; They are the i-th scenery scene at time t and the j-th scenery scene at time t respectively; Randomly select r scenery scenes from the optimal set J as the initial cluster centers. Indicates that r is the number of cluster centers; Iterative clustering, by solving the optimal set J to obtain new cluster centers; Iterate clustering and determine whether it converges. If it does not converge, repeat iterative clustering. If it converges, use r cluster centers {J1, J2, ..., J r } is a typical scene of scenery; Calculate the probability p of a typical scene i , p i is the ratio of the number of occurrences of the i-th typical scenery scene to the total number of scenery scenes, i = 1, 2, …, r.

15. The multi-microgrid energy sharing system according to claim 12, characterized in that: The virtual microgrid generation module uses the power supply and demand imbalance within the virtual microgrid as a source-load-storage balance index of a virtual microgrid; obtains a source-load-storage balance optimization index of a virtual microgrid after performing segmented averaging on the source-load-storage balance optimization index of the virtual microgrid; obtains a source-load-storage resource matching degree evaluation index of each virtual microgrid based on the source-load-storage balance optimization index of multiple virtual microgrids; The virtual microgrid group generation module, based on the Newman fast partitioning method, obtains the topological structure of the weighted network according to the topological structure of the microgrid to establish a weighted network; the ratio of the transmission capacity between the nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated using the electrical correlation strength; based on the aggregation degree evaluation index after dynamic virtual aggregation of the weighted network, the degree of each node in the microgrid is used to determine the aggregation degree evaluation index of each microgrid in the virtual microgrid group.

16. The multi-microgrid energy sharing system according to claim 15, characterized in that: The source-load-storage balance index within a virtual microgrid satisfies the following relationship: Where n is the number of the virtual microgrid group obtained by dynamic virtual aggregation of i microgrids in the virtual microgrid group, i∈n means that the i-th microgrid belongs to the n-th virtual microgrid group, is the power corresponding to the supply-demand imbalance of the nth virtual microgrid at time t, is the load of the nth virtual microgrid at time t, P PV,n , P WT,n are the output power of the photovoltaic generator set and the output power of the wind generator set in the nth virtual microgrid group, is the load of the i-th microgrid at time t; is the load of the i-th microgrid participating in demand response at time t; is the real-time power of energy storage of the i-th microgrid at time t; are the output power of the photovoltaic generator set and the output power of the wind generator set of the i-th microgrid at time t respectively; The following relationship is used to obtain the optimal index of source-load-storage balance of a virtual microgrid: In the formula, is the optimization index of the source-load-storage balance of the nth virtual microgrid at time t, with a value range of [0,1]; Based on the optimization index of the source-load-storage balance of each virtual microgrid group, the source-load-storage resource matching degree evaluation index of each virtual microgrid group is obtained by the following relationship: In the formula, φ M It is an evaluation index of the matching degree of source-load-storage resources among virtual microgrid groups. T is 24 hours, and N is the total number of virtual microgrid groups.

17. The multi-microgrid energy sharing system according to claim 16, characterized in that: Based on the Newman fast partitioning method, the topological structure of the weighted network is equivalent to the topological structure of the microgrid, and the weighted network is established according to the topological structure of the weighted network; the topological structure of the microgrid includes I nodes and L branches; the ratio of the transmission capacity between the nodes in the microgrid to the line impedance is used as the electrical correlation strength between the microgrid nodes, and the degree of each node in the microgrid is calculated according to the following relationship: In the formula, H i and H j are the degrees of nodes i and j in the microgrid, B ij is the electrical connection strength between node i and node j in the microgrid, satisfying B ij =C ij / Z ij , C ij is the transmission capacity between node i and node j, Z ij is the line impedance between node i and node j, I is the number of nodes; Based on the evaluation index of the degree of aggregation after dynamic virtual aggregation of weighted networks, the degree of each node in the microgrid is used to calculate the evaluation index of the degree of aggregation of each microgrid in the virtual microgrid group according to the following relationship: In the formula, φ e It is an evaluation index of the aggregation degree of each microgrid in the virtual microgrid group.

18. The multi-microgrid energy sharing system according to claim 17, characterized in that: The virtual microgrid generation module dynamically aggregates multiple microgrids to obtain a virtual microgrid group under typical wind and solar scenarios, with the goal of optimizing the source-load-storage resource matching evaluation index between virtual microgrid groups and the aggregation evaluation index of virtual microgrid groups, including: The weighted sum of the source-load-storage resource matching degree evaluation index between each virtual microgrid group and the aggregation degree evaluation index of the virtual microgrid group is used as the comprehensive index for dynamic aggregation of multiple microgrids, satisfying the following relationship: φ=γ1φ M +g2f e Where, φ is the comprehensive index of dynamic aggregation of multiple microgrids, φ M is the evaluation index of the matching degree of source-load-storage resources between virtual microgrids, φ e is the evaluation index of the aggregation degree of each microgrid in the virtual microgrid group, γ1 and γ2 are the weights of the evaluation index of the source-load-storage resource matching degree between each virtual microgrid group and the weights of the evaluation index of the aggregation degree of each microgrid in the virtual microgrid group, respectively, and the value range is [0-1]; In each typical wind and solar scenario, the virtual microgrid group corresponding to the maximum value of the comprehensive index during dynamic aggregation of multiple microgrids is taken as the dynamic virtual aggregation result of multiple microgrids.

19. The multi-microgrid energy sharing system according to claim 12, characterized in that: The optimization objective of the multi-microgrid energy sharing model in the energy sharing model establishment module satisfies the following relationship: In the formula, F MG,n is the total operating cost of the nth virtual microgrid group, They are the electricity purchase and sales cost, gas turbine operation cost, and energy storage operation cost of the nth virtual microgrid group to the upper power grid; is the electricity purchase cost between microgrids in the nth virtual microgrid group; ω G ,ω M ,ω E ,ω T is the weight factor of each cost; the nth virtual microgrid group includes i microgrids, are the purchase and sale prices of electricity between the microgrid and the distribution network at time t, are the amount of electricity purchased and sold between the ith microgrid and the distribution network in the nth virtual microgrid group at time t; ω MT,1 ,ω MT,2 ,ω MT,3 are the power generation cost coefficients of gas turbines, is the gas turbine output in the ith microgrid in the nth virtual microgrid cluster at time t; is the unit operating cost of energy storage, and are the energy storage discharge power and energy storage charging power in the i-th microgrid in the n-th virtual microgrid group at time t, respectively; is the unit price of electricity sold by the microgrid, is the electric power traded between the ith microgrid and the i′th microgrid in the nth virtual microgrid group at time t, i′∈n\i indicates that the i′th microgrid is a microgrid different from the ith microgrid in the nth virtual microgrid group. When it is a positive value, it means the electric power sold by the i-th microgrid to the i′th microgrid at time t; T is the total number of times.

20. The multi-microgrid energy sharing system according to claim 19, characterized in that: The energy interaction constraints within the same virtual microgrid group satisfy the following relationship: In the formula, is the output of the photovoltaic power station in the i-th microgrid in the n-th virtual microgrid group at time t, is the wind farm output in the i-th microgrid in the n-th virtual microgrid group at time t, k is the number of microgrids that sold electricity; P max The upper limit of power purchase and sale between each microgrid and the grid; and is a binary variable, When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t; When it is 1, it means that the i-th microgrid in the n-th virtual microgrid group sells electricity at time t. When it is 0, it means that the i-th microgrid in the n-th virtual microgrid group purchases electricity at time t. It is the maximum value of the power purchased and sold by the power grid.

21. The multi-microgrid energy sharing system according to claim 18, characterized in that: The alternating direction multiplier method is used to iteratively solve the multi-microgrid energy sharing model to obtain the optimal solution. The optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index of the virtual microgrid group; when the error between the updated source-load-storage balance optimization index and aggregation degree evaluation index and the source-load-storage resource matching degree evaluation index and aggregation degree evaluation index before the update does not exceed the threshold, it is determined that the convergence condition is met, and the optimal solution is used as the multi-microgrid energy sharing result, including: When obtaining dynamic virtual aggregation of multiple microgrids under typical wind and solar scenarios, the source-load-storage resource matching evaluation index of the virtual microgrid group corresponding to the maximum value of the comprehensive index is used. And the aggregation degree evaluation index of virtual microgrid group As initialization value; In the kth iteration, the optimal solution of the multi-microgrid energy sharing model is used to update the source-load-storage resource matching evaluation index of the virtual microgrid group. And the aggregation degree evaluation index of virtual microgrid group When both satisfy and When , the optimal solution of the multi-microgrid energy sharing model is output; where Δ M is the source-load-storage balance threshold, Δ e is the aggregation degree threshold.

22. The multi-microgrid energy sharing system according to claim 10, characterized in that: Δ M The value is a non-negative number not greater than 0.1, Δ e The value is a non-negative number not greater than 0.

1.

23. A terminal comprising a processor and a storage medium; characterized in that: The storage medium is used to store instructions; The processor is configured to operate according to the instructions to execute the steps of the method according to any one of claims 1 to 11.

24. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.