A method for matching and assembling energy communities based on improved slime mold algorithm for electricity-carbon disparity
By improving the slime mold algorithm, the peak-valley coupling potential between energy hubs is quantified and a comprehensive index system is constructed to optimize the structure of energy communities. This solves the problems of resource regulation and electricity-carbon coupling within virtual power plants, and enhances the autonomy and low-carbon performance of the distribution network.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTHEAST UNIV
- Filing Date
- 2026-03-09
- Publication Date
- 2026-06-30
AI Technical Summary
Existing power distribution systems struggle to effectively balance the integrated control of power flow from various types of distributed resources within virtual power plants with the electricity-carbon coupling characteristics within energy communities, hindering the improvement of power distribution network autonomy and low-carbon performance.
An improved slime mold algorithm is adopted to quantitatively analyze the peak-valley coupling potential between energy hubs through a data-driven approach. A comprehensive indicator system that takes into account both regional structural and functional needs is constructed. Combined with an adaptive search mechanism and information sharing strategy, the overall structure and boundaries of energy communities are optimized.
It has achieved comprehensive improvement in the benefits of energy communities in terms of electricity and carbon emission management, enhanced the autonomy and low-carbon nature of the distribution network, and optimized the formation strategy of energy hubs.
Smart Images

Figure CN122315731A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of smart grids, specifically relating to a method for matching and constructing energy communities based on improved slime mold algorithms to address differences in electricity and carbon emissions. Background Technology
[0002] The slime mold optimization algorithm mimics the natural phenomenon of slime molds connecting food sources through a network of secreted slime in complex environments, exhibiting efficient global search capabilities and adaptability. Considering the significant differences in geographical distribution and peak-valley coupling characteristics among energy hubs, traditional distance-based or simple clustering algorithms struggle to fully exploit the complementary characteristics between multiple energy hubs. In contrast, the slime mold optimization algorithm can dynamically adjust node distribution and network connections under the dual constraints of geographical location and load characteristics by simulating network formation and contraction processes, achieving a globally optimal solution for energy community construction.
[0003] Virtual power plants, as a new type of resource aggregator, can utilize advanced information and communication technologies and software systems to aggregate and coordinate the optimization of various demand-side distributed resources, such as distributed photovoltaic, wind power, energy storage, and flexible loads. Because the various types of distributed resources within a virtual power plant exhibit significant differences in physical and dynamic characteristics, how to coordinate the active and reactive power responses of the virtual power plant and achieve integrated power flow regulation of heterogeneous resources within the virtual power plant has become an urgent problem to be solved.
[0004] Existing power distribution systems are ill-suited to meeting the functional requirements of new power distribution networks in terms of autonomy, alleviating the pressure on the main grid's flexible operation, and reducing the pressure on centralized dispatching. Currently, the key to solving the problem of adjustable resource utilization in new power distribution networks lies in transforming the power operation model of the distribution network and embedding different power distribution system forms into this model. An energy community is a regional cluster composed of producers, consumers, and prosumers, aiming to achieve internal consideration of the coupling of multiple heterogeneous energy sources (electricity and carbon), collaborative autonomous energy management, and cascade utilization. This promotes the local satisfaction of the electricity and carbon demands of multiple energy hubs within a local power distribution network, further exploring the autonomy, low-carbon nature, and economic efficiency of the local power distribution network. Therefore, how to comprehensively consider the overall coupling characteristics of different energy hubs within an energy community in terms of electricity and carbon, analyze the potential of each energy hub to form an energy community, and clarify specific formation principles and optimal formation schemes has become an urgent problem to be solved. Summary of the Invention
[0005] This invention addresses the problems existing in the prior art by providing a method for energy community electricity-carbon differential matching based on an improved slime mold algorithm. Starting from the coupling characteristics of various energy hubs at the distribution network level, it considers a data-driven approach to quantitatively analyze the peak-valley coupling potential between different types of energy hubs, achieving initial differential matching analysis for energy hubs with different external characteristics. Combining the overall load characteristics and carbon quota balance of energy hubs, a comprehensive index system is constructed that takes into account both regional structural and functional needs, measuring the synergistic effects of electricity demand surplus / deficit, carbon quota optimization, and mutual benefit among energy hubs. Finally, an energy community formation strategy based on the improved slime mold optimization algorithm is proposed, achieving the invention's objective of improving the comprehensive benefits of energy communities in electricity and carbon emission management from the planning level.
[0006] To address the above technical problems, this invention provides the following technical solution: a method for matching and assembling energy communities based on improved slime mold algorithms, comprising the following steps: S1. A data-driven approach is used to quantitatively analyze the peak-valley coupling potential between different types of energy hubs, and an initial differential matching analysis is conducted for energy hubs with different external characteristics. S2. Combining the overall load characteristics and carbon quota balance of energy hubs, a comprehensive indicator system for the establishment of energy communities is proposed to take into account both regional structural and functional needs, and to measure the synergistic effects of electricity demand surplus and deficit, carbon quota optimization and mutual benefit among energy hubs. S3. With the goal of optimizing the overall characteristics of energy community formation, an improved slime mold optimization algorithm with an adaptive search mechanism and information sharing strategy is adopted to simulate the self-organizing behavior of slime mold networks. Through the dynamic expansion and contraction process between nodes, the overall structure and boundary of the energy community are optimized, forming an energy community formation strategy based on the improved slime mold algorithm.
[0007] Furthermore, in the aforementioned step S1, a data-driven approach is used to quantitatively analyze the peak-valley coupling potential between different types of energy hubs, specifically as follows: A1.1 Cluster analysis is performed on the typical external characteristic curves of each energy hub, namely the typical net daily load curves. The first-order difference algorithm and quantiles based on data-driven analysis are used to extract the morphological characteristics of the overall external characteristic curve of each energy hub in the rising, stable and falling phases, and the original numerical data is transformed into discretized categorical data. A1.2. Utilizing the K-modes algorithm's ability to effectively cluster discretized data, cluster analysis is performed on the external characteristic curves of each energy hub. When an energy hub gathers a large amount of power generation resources, i.e., its overall external characteristic is power generation, this energy hub is still included as a "negative" characteristic load in the differentiated matching analysis during the formation of the energy community.
[0008] Furthermore, the aforementioned step A1.1 includes the following sub-steps: A1.1.1. After preprocessing the daily net load data of each energy hub, obtain its first-order difference value; A1.1.2, Matrix the daily net load data of each energy hub: Transformed into a difference matrix representing the change in net load data: , its origin indivual The structure is composed of 3D row vectors, and the specific expression is: ; A1.1.3. The data distribution of each subsequence in the difference matrix is described using quantiles. Three quantiles are selected, with confidence probabilities set to 0.05, 0.5, and 0.95 respectively. The morphological feature extraction class matrix of the curve is then represented as follows: , is represented as: , The above equation yields a discretized representation consisting of 3, 2, 1, 0, -1, -2, and -3. A 3D matrix, which represents the various resources in The degree to which the net load curves of each energy hub rise, stabilize, and decline within a given time period.
[0009] Furthermore, in the aforementioned step S1, an initial differential matching analysis is performed for energy hubs with different external characteristics, specifically as follows: B1.1, Using coupling coefficients To quantify the peak-valley coupling degree of different energy hubs and calculate the results of suitable combinations, the specific calculation formula is as follows: , In the formula, It is a positive indicator; and These are the normalized th The energy hub and the first During the peak and trough periods of a single day, each energy hub... Net load value at any given time; The number of times when the peak and trough coincide in the daily net load curve representing an energy hub; The total time for the daily net load curve of the energy hub under consideration; For the net load of the energy hub in The time of peak-valley overlap within a given time period; B1.2. The peak net load time is defined as the period when the maximum net load of a typical day or greater than 80% of the maximum net load occurs, and the trough net load time is defined as the period when the minimum net load of a typical day or less than 140% of the minimum net load occurs. B1.3. The value calculated according to the above formula for the corresponding time period is the peak-valley coupling degree between the two energy hubs. It is based on Euclidean distance to reflect the difference in morphological distance between different energy hubs at a specific moment. At the same time, it considers the degree of complementarity of the external characteristic curves of different energy hubs in the time series and calculates the proportion of peak-valley overlap time between different energy hubs. B1.4, through comparison The value indicates the potential for initial differentiated matching between energy hubs. The higher the value, the more pronounced the effect of differentiated matching of energy hubs. When establishing energy communities, priority should be given to... Large energy hubs are grouped into the same energy community to promote the maximum inclusion of demand-side energy hubs in the formation of the energy community.
[0010] Furthermore, in step S2 above, a comprehensive indicator system for the establishment of energy communities that takes into account both regional structural and functional needs is proposed. Specifically, based on the completion of the coupling characteristic assessment of energy hubs and the obtaining of differentiated matching results for energy hubs, the structural and functional needs for the establishment of energy communities are considered. The principle of energy autonomy and mutual benefit is adopted, with the goal of enhancing the overall characteristics of the communities themselves. This comprehensive indicator system for the establishment of energy communities is then constructed. Considering the structural aspects of energy community formation, specifically including: Structurally, each energy hub aggregated within the energy community is treated as a virtual node. The selection of this virtual node is based on the power distribution of the dispersed users within the energy hub, which determines its power centroid. The evaluation index uses the modularity index, which measures the electrical distance between different nodes. express: , In the formula, For connecting nodes and nodes The weight of the edge when the node and nodes When directly connected When not connected ; It is the sum of the weights of all edges in the network; Represents all nodes The sum of the weights of connected edges; when a node and nodes Within the same energy community ,otherwise ; Among these considerations, the network edge weights are determined by electrical distance; electrical distance is used to measure the tightness of electrical coupling between two nodes in an energy community network, and is obtained through the sensitivity relationship between voltage and reactive power, as specifically described below: , In the formula, This is the sensitivity matrix; and These represent voltage amplitude and reactive power change, respectively; matrix The middle row Column elements Represents a node The unit value of reactive power change corresponds to the node The change in voltage is expressed as: , In the formula, Represents a node The change in its own voltage and the node when reactive power changes The ratio of voltage changes; Considering the relationship between two nodes, which is related not only to themselves but also to other nodes in the energy community network, makes the network... There are nodes, and the electrical distance between nodes is defined as follows: , Set the edge weights between nodes to: .
[0011] Furthermore, the aforementioned energy community electricity-carbon difference matching method based on the improved slime mold algorithm considers the functionality of energy community construction. Specifically, it needs to consider the overall characteristics of each energy hub on the one hand, and the self-regulation and autonomy of the energy community on the other hand, giving full play to the complementary characteristics and peak-valley coupling characteristics of the internal energy hubs in terms of electricity and carbon, and reducing large-scale power flow between the energy community and the external distribution network. Its evaluation indicators are expressed by active power balance index, carbon quota balance index, which measure the autonomy of the constructed energy community, and average net load difference index, net load rate standard deviation index, and average peak-valley difference index, which measure the external characteristics of the internal energy hubs. Specifically, these include: The active power balance index is used to adjust the combination of energy hubs in an energy community. For a single energy community, its active power balance index is... Represented as: , , In the formula, For the first Active power balance of an energy community; An indicator of the active power balance in an energy community; The number of energy communities to be established; The active power output that can be provided by all active power sources within the energy community; The sum of all active power loads within an energy community; active power balance index. Range of values The carbon quota balance index is used to adjust the energy hub combination in the energy community. Represented as: , , In the formula, For the first Carbon quota balance of an energy community; A carbon quota balance indicator for energy communities; The total carbon allowances allocated to all power-generating resources within the energy community; The total carbon allowances required by the energy community; To avoid uneven load distribution within energy communities and maximize the combined access of energy hubs, an average net load difference index is constructed based on the daily maximum net load of each energy community. The net load balance of the formed energy community is measured and expressed as: , In the formula, It is a negative indicator; This is the largest value among the maximum net loads across all energy communities. For the first The maximum net load of each energy community; The smaller the value, the more evenly the net load distribution in the energy community. To improve equipment utilization and reduce redundancy within energy communities, evaluation indicators are constructed based on the concept of standard deviation and the net load factor of each energy community. , is represented as: , , In the formula, It is a negative indicator; Net load factor for each energy community; The average net load factor of the energy community; the average peak-valley difference rate index is constructed by using the peak-valley difference rate of each energy community. , is represented as: , In the formula, This indicates the peak-valley difference rate of an energy community.
[0012] Furthermore, the aforementioned comprehensive indicator system for establishing energy communities that takes into account both regional structural and functional needs is expressed as follows: , In the formula, , , , , and For weighting coefficients, full .
[0013] Furthermore, the aforementioned step S3 specifically includes: determining initial parameters and node distribution, dynamic network generation and migration probability adjustment, dynamic node removal and migration load adjustment, dynamic node aggregation and path optimization, global adaptive search and node update, and outputting the optimal component result; The improved slime mold algorithm determines the initial parameters and node distribution, specifically including: Randomly distributed initial nodes indivual, >1. For the study area, each node is considered as a candidate center for load points, and the initial load of the node is recorded. Geographic coordinates , Peak-valley characteristics of load Initialize global parameters, including migration probabilities. Path strength Node weights and fitness threshold This is used to determine the redundancy of nodes; The improved slime mold algorithm includes dynamic network generation and migration probability adjustment, specifically comprising: Based on the geographical distance of the nodes Based on the traditional slime mold optimization algorithm, a load peak-valley coupling characteristic factor is introduced. The migration probability between load points The correction is expressed as follows: , In the formula, Indicates the load point and The degree of peak-valley coupling between them; The geographical distance between nodes; This is the distance normalization coefficient; By introducing a load peak-valley coupling characteristic factor, the formation of energy communities not only considers the geographical proximity between energy hubs, but also makes full use of the complementarity between different energy hubs for optimization. Path strength generated by dynamic networks Updated based on migration probability and dynamic information feedback, expressed as: , In the formula, It serves as a smoothing factor, used to balance the selection of historical paths and new paths; Update node activity based on the concentration of path intensity distribution across nodes. , is represented as: , When node activity is below the threshold When this happens, the node is marked as a redundant node.
[0014] Furthermore, the dynamic node removal and migration load adjustment in the aforementioned improved slime mold algorithm specifically include: For nodes with low activity, check their load characteristics for similarity to surrounding nodes, and prioritize removing nodes with similar loads and low activity. Redundant nodes are removed; their loads are then redistributed to adjacent nodes with higher path strength. The load redistribution rules after a node is removed are as follows: , In the formula, For nodes The new load; This represents the original load of the node; For the removed node to all other adjacent nodes The sum of path strengths; The load of the removed node is redistributed to adjacent nodes according to the path strength ratio; The improved slime mold algorithm includes dynamic node aggregation and path optimization, specifically comprising: The number of nodes is dynamically adjusted based on the load similarity and path strength between nodes; If two nodes satisfy and ,in If the threshold is reached, the nodes are merged into one node, and the new node's load... ; After each node aggregation, the path strength and corrected distance are recalculated. , is represented as: , in, Weights representing geographical distance These represent the load characteristic weights, and both can be dynamically adjusted according to actual planning needs. The load point is calculated in each iteration. With candidate load centers Correction distance And update the network based on path strength.
[0015] Furthermore, the global adaptive search and node update in the aforementioned improved slime mold algorithm specifically include: after each iteration, introducing a dynamic search factor based on the distribution of nodes and network connectivity. Updating the node position is represented as: , in, This is a dynamic search factor, dynamically adjusted based on load differences and path strength between nodes, used to enhance the algorithm's global search capability after local convergence. It represents the change in node position. That is, the position adjustment is less than the preset threshold and the path strength is... When stability is reached, the global iteration ends; The optimal component output in the improved slime mold algorithm specifically includes: Calculate the comprehensive index value of energy community formation obtained in each iteration. The optimal energy community formation plan is the one with the highest comprehensive index value. Based on the comprehensive index system values proposed above, the potential of each energy hub to participate in the formation of energy communities after differentiated matching and combination is analyzed, and the principles for forming energy communities based on energy hubs are clarified.
[0016] Compared with the prior art, the beneficial technical effects of the present invention using the above technical solution are as follows: (1) The present invention is based on the improved slime mold algorithm for energy community electricity-carbon differential matching construction method. It considers the coupling characteristics of each energy hub under the distribution network level, and uses a data-driven method to quantitatively analyze the peak-valley coupling potential between different types of energy hubs. It performs initial differential matching analysis for energy hubs with different external characteristics.
[0017] (2) Based on the improved slime mold algorithm, the present invention proposes a comprehensive index system that takes into account both regional structural and functional needs, combining the overall load characteristics and carbon quota balance of energy hubs, to measure the synergistic effect of electricity demand surplus and shortage, carbon quota optimization and mutual benefit among energy hubs.
[0018] (3) The present invention proposes an energy community electricity-carbon difference matching method based on the improved slime mold algorithm. With the goal of optimizing the overall characteristics of the energy community, it proposes an energy community building strategy based on the improved slime mold optimization algorithm, introduces an adaptive search mechanism and information sharing strategy, takes the simulation of the self-organizing behavior of slime mold network as the core, and optimizes the overall structure and boundary of the energy community through the dynamic expansion and contraction process between nodes. This provides a new idea and method for achieving comprehensive benefit improvement in electricity and carbon emission management of energy communities from the planning level. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the method flow of the present invention. Detailed Implementation
[0020] To better understand the technical content of the present invention, specific embodiments are described below in conjunction with the accompanying drawings.
[0021] In this invention, various aspects of the invention are described with reference to the accompanying drawings, in which numerous illustrative embodiments are shown. Embodiments of the invention are not limited to those depicted in the drawings. It should be understood that the invention is implemented through any of the various concepts and embodiments described above, as well as the concepts and embodiments described in detail below, because the concepts and embodiments disclosed herein are not limited to any particular implementation. Furthermore, some aspects of the invention disclosed may be used alone or in any suitable combination with other aspects of the invention disclosed.
[0022] like Figure 1 As shown, a method for matching and assembling energy communities based on improved slime mold algorithms for electricity-carbon disparity is described below, with the following steps: S1. A data-driven approach is used to quantitatively analyze the peak-valley coupling potential between different types of energy hubs, and an initial differential matching analysis is conducted for energy hubs with different external characteristics. S2. Combining the overall load characteristics and carbon quota balance of energy hubs, a comprehensive indicator system for the establishment of energy communities is proposed to take into account both regional structural and functional needs, and to measure the synergistic effects of electricity demand surplus and deficit, carbon quota optimization and mutual benefit among energy hubs. S3. With the goal of optimizing the overall characteristics of energy community formation, an improved slime mold optimization algorithm with an adaptive search mechanism and information sharing strategy is adopted to simulate the self-organizing behavior of slime mold networks. Through the dynamic expansion and contraction process between nodes, the overall structure and boundary of the energy community are optimized, forming an energy community formation strategy based on the improved slime mold algorithm.
[0023] In a preferred embodiment, step S1 involves a data-driven method to quantitatively analyze the peak-valley coupling potential between different types of energy hubs, specifically as follows: A1.1 Cluster analysis is performed on the typical external characteristic curves of each energy hub, namely the typical net daily load curves. The first-order difference algorithm and quantiles based on data-driven analysis are used to extract the morphological characteristics of the overall external characteristic curve of each energy hub in the rising, stable and falling phases, and the original numerical data is transformed into discretized categorical data. A1.2. Utilizing the K-modes algorithm's ability to effectively cluster discretized data, cluster analysis is performed on the external characteristic curves of each energy hub. When an energy hub gathers a large amount of power generation resources, i.e., its overall external characteristic is power generation, this energy hub is still included as a "negative" characteristic load in the differentiated matching analysis during the formation of the energy community.
[0024] In a preferred embodiment, step A1.1 includes the following sub-steps: A1.1.1. After preprocessing the daily net load data of each energy hub, obtain its first-order difference value; A1.1.2, Matrix the daily net load data of each energy hub: Transformed into a difference matrix representing the change in net load data: , its origin indivual The structure is composed of 3D row vectors, and the specific expression is: ; A1.1.3. Quantiles are used to describe the data distribution of each subsequence in the difference matrix. Since an appropriate number of quantiles can more effectively characterize the morphological features of the net load curves of each energy hub, three quantiles are selected, with confidence probabilities set to 0.05, 0.5, and 0.95, respectively. The extracted morphological feature class matrix of the curve is then represented as follows: , is represented as:
[0025] The above equation yields a discretized 3D matrix consisting of 3, 2, 1, 0, -1, -2, and -3, which represents the value of each resource in the matrix. The degree to which the net load curves of each energy hub rise, stabilize, and decline within a given time period.
[0026] In a preferred embodiment of the present invention, step S1 involves performing an initial differential matching analysis for energy hubs with different external characteristics, specifically as follows: B1.1, Using coupling coefficients To quantify the peak-valley coupling degree of different energy hubs and calculate the results of suitable combinations, the specific calculation formula is as follows:
[0027] In the formula, It is a positive indicator; and These are the normalized th The energy hub and the first During the peak and trough periods of a single day, each energy hub... Net load value at any given time; The number of times when the peak and trough coincide in the daily net load curve representing an energy hub; The total time for the daily net load curve of the energy hub under consideration; For the net load of the energy hub in The time of peak-valley overlap within a given time period; B1.2. The peak net load time is defined as the period when the maximum net load of a typical day or greater than 80% of the maximum net load occurs, and the trough net load time is defined as the period when the minimum net load of a typical day or less than 140% of the minimum net load occurs. B1.3. The value calculated according to the above formula for the corresponding time period is the peak-valley coupling degree between the two energy hubs. It is based on Euclidean distance to reflect the difference in morphological distance between different energy hubs at a specific moment. At the same time, it considers the degree of complementarity of the external characteristic curves of different energy hubs in the time series and calculates the proportion of peak-valley overlap time between different energy hubs. B1.4 The greater the average Euclidean distance of different energy hubs within a day, the greater the proportion of peak and valley overlap time, and the greater the potential for optimized combination. By comparing the size of K value, the potential for initial differentiated matching between energy hubs can be determined. The larger the K value, the more obvious the effect of differentiated matching of energy hubs. When forming energy communities, priority should be given to classifying energy hub combinations with large K values into the same energy community to promote the maximum inclusion of demand-side energy hubs in the formation of energy communities.
[0028] In a preferred embodiment of the present invention, step S2 proposes a comprehensive index system for the establishment of energy communities that takes into account both regional structural and functional needs. Specifically, based on the evaluation of the coupling characteristics of energy hubs and the obtained differentiated matching results of energy hubs, the structural and functional needs of energy community establishment are considered. The system is established with energy autonomy and mutual benefit as the principles, and the goal of improving the overall characteristics of the communities themselves. Considering the structural aspects of energy community formation, specifically including: Structurally, each energy hub aggregated within the energy community is treated as a virtual node. The selection of this virtual node is based on the power distribution of dispersed users within the energy hub, determining its power centroid. This virtual node serves as the research process involved in constructing the following indicators. The nodes within the energy community are closely electrically connected, while the connections between energy communities are loose, facilitating the autonomous operation and energy interaction management of the energy community. The evaluation index uses a modularity index that measures the electrical distance between different nodes. express: , In the formula, For connecting nodes and nodes The weight of an edge (or simply edge weight) is the weight of the edge when the node... and nodes When directly connected When not connected ; It is the sum of the weights of all edges in the network; Represents all nodes The sum of the weights of connected edges; when a node and nodes Within the same energy community ,otherwise ; Among these considerations, the network edge weights are determined by electrical distance; electrical distance is used to measure the tightness of electrical coupling between two nodes in an energy community network, and is obtained through the sensitivity relationship between voltage and reactive power, as specifically described below: , In the formula, This is the sensitivity matrix; and These represent voltage amplitude and reactive power change, respectively; matrix The Middle Line 1 Column elements Represents a node The unit value of reactive power change corresponds to the node The change in voltage is expressed as: , In the formula, Represents a node The change in its own voltage and the node when reactive power changes The ratio of voltage changes The larger the value, the more likely it is to be a node. For nodes The smaller the impact, the greater the distance between the two nodes; Considering the relationship between two nodes, which is related not only to themselves but also to other nodes in the energy community network, makes the network... Each node defines a node. and nodes The electrical distance between them is expressed as: , Modularity is described using the electrical distance between nodes as the edge weight. This reflects both the structural performance of the energy community and the degree of electrical coupling between nodes (energy hubs) within the community. To satisfy the relationship between edge weight and electrical distance—that is, the smaller the electrical distance, the larger the edge weight—the edge weights between nodes are set as follows: .
[0029] As a preferred embodiment, considering the functionality of the energy community, specifically: on the one hand, it is necessary to consider the overall characteristics of each energy hub, and on the other hand, to take into account the self-regulation and autonomy of the energy community, fully leveraging the complementary characteristics and peak-valley coupling characteristics of the internal energy hubs in terms of electricity and carbon, and reducing large-scale power flow between the energy community and the external distribution network. Its evaluation indicators are expressed using active power balance indicators and carbon quota balance indicators to measure the autonomy of the established energy community, and average net load difference indicators, net load rate standard deviation indicators, and average peak-valley difference rate indicators to measure the external characteristics of the internal energy hubs. Specifically, these include: To reduce large-scale power flows between energy communities and fully leverage their autonomy, an active power balance index is used to adjust the combination of energy hubs within the energy community. A higher active power balance index value indicates better electrical energy complementarity among the energy hubs, which can, to some extent, promote the self-consumption of distributed renewable energy and reduce power regulation needs within the energy community. For a single energy community, its active power balance index... Represented as:
[0030] In the formula, Let be the active power balance of the i-th energy community; An indicator of the active power balance in an energy community; The number of energy communities to be established; The active power output that can be provided by all active power sources within the energy community; The active power balance index is the sum of all active power loads within an energy community. This index measures the degree of active power balance within the energy community by analyzing the deviation between active power output and active power load. Range of values Specifically, when the active power output equals the active power load, the active power balance is 1; when the deviation between the two is greater than the active power load, the active power balance is 0.
[0031] To achieve local carbon credit sharing among energy hubs within an energy community, a carbon quota balance index is used to adjust the combination of energy hubs within the community. The higher the carbon quota balance index value of an energy community, the better the carbon complementarity among its internal energy hubs. Represented as: , , In the formula, Let be the carbon quota balance of the i-th energy community; A carbon quota balance indicator for energy communities; The total carbon allowances allocated to all power-generating resources within the energy community; The total carbon allowances required by the energy community; To avoid uneven load distribution within energy communities and maximize the combined access of energy hubs, an average net load difference index is constructed based on the daily maximum net load of each energy community. The net load balance of the formed energy community is measured and expressed as: , In the formula, It is a negative indicator; This is the largest value among the maximum net loads across all energy communities. The maximum net load of the i-th energy community; The smaller the value, the more evenly the net load distribution in the energy community.
[0032] To improve equipment utilization and reduce redundancy within energy communities, evaluation indicators are constructed based on the concept of standard deviation and the net load factor of each energy community. , is represented as: , , In the formula, It is a negative indicator; Net load factor for each energy community; The average net load factor for the energy community; The larger the value and The smaller the value, the higher the load factor of the energy community and the more concentrated the value range, indicating higher equipment utilization.
[0033] To alleviate the high electricity demand on the power grid during peak hours, reduce the peak-valley difference, and improve the safety and reliability of the distribution network, an average peak-valley difference rate index is constructed based on the peak-valley difference rates of various energy communities. , is represented as: , In the formula, This indicates the peak-valley difference rate of an energy community.
[0034] As a preferred embodiment, the comprehensive indicator system for establishing energy communities that takes into account both regional structural and functional needs is expressed as follows: , In the formula, , , , , and For weighting coefficients, full .
[0035] As a preferred embodiment, step S3 specifically includes: determining initial parameters and node distribution, dynamic network generation and migration probability adjustment, dynamic node removal and migration load adjustment, dynamic node aggregation and path optimization, global adaptive search and node update, and outputting the optimal component result. (1) The determination of initial parameters and node distribution in the improved slime mold algorithm specifically includes: Randomly distributed initial nodes indivual( Within the study area, each node is considered a candidate center for load points, and the initial load of each node is recorded. Geographic coordinates , Load peak-valley characteristics Initialize global parameters, including migration probabilities. Path strength Node weights and fitness threshold This is used to determine the redundancy of nodes; (2) The dynamic network generation and migration probability adjustment in the improved slime mold algorithm specifically include: Based on the geographical distance of the nodes Based on the traditional slime mold optimization algorithm, a load peak-valley coupling characteristic factor is introduced. The migration probability between load points The correction is expressed as follows: , In the formula, This indicates the degree of peak-valley coupling between load points i and j; The geographical distance between nodes; This is the distance normalization coefficient; By introducing a load peak-valley coupling characteristic factor, the formation of energy communities not only considers the geographical proximity between energy hubs, but also makes full use of the complementarity between different energy hubs for optimization. Path strength generated by dynamic networks Updated based on migration probability and dynamic information feedback, expressed as: , In the formula, It serves as a smoothing factor, used to balance the selection of historical paths and new paths; Update node activity based on the concentration of path intensity distribution across nodes. , is represented as: , When node activity is below the threshold When this happens, the node is marked as a redundant node.
[0036] (3) Improve the dynamic node removal and migration load adjustment in the slime mold algorithm, specifically including: For nodes with low activity, check their load characteristics for similarity to surrounding nodes, and prioritize removing nodes with similar loads and low activity. Redundant nodes are removed; their loads are then redistributed to adjacent nodes with higher path strength. The load redistribution rules after a node is removed are as follows:
[0037] In the formula, For nodes The new load; This represents the original load of the node; For the node i to be removed, all other neighboring nodes The sum of path strengths; The load of the removed node is redistributed to adjacent nodes according to the path strength ratio; (4) Improve the dynamic node aggregation and path optimization in the slime mold algorithm, specifically including: The number of nodes is dynamically adjusted based on the load similarity and path strength between nodes; If two nodes satisfy and ,in If the threshold is reached, the nodes are merged into one node, and the new node's load... After each node aggregation, the path strength and corrected distance are recalculated. , is represented as:
[0038] in, Weights representing geographical distance These represent the load characteristic weights, and both can be dynamically adjusted according to actual planning needs. The load point needs to be calculated in each iteration. With candidate load centers Correction distance And update the network based on path strength.
[0039] (5) Improve the global adaptive search and node update in the slime mold algorithm, specifically including: after each iteration, introduce a dynamic search factor based on the distribution of nodes and network connectivity. Updating the node position is represented as:
[0040] in, This is a dynamic search factor, dynamically adjusted based on load differences and path strength between nodes, used to enhance the algorithm's global search capability after local convergence. It represents the change in node position. That is, the position adjustment is less than the preset threshold and the path strength is... When stability is reached, the global iteration ends; (6) Improve the output of the optimal component result in the slime mold algorithm, specifically including: Calculate the comprehensive index value of energy community formation obtained in each iteration. The optimal energy community formation plan is the one that outputs the highest comprehensive index value. Based on the comprehensive index system values proposed above, the potential of each energy hub to participate in the formation of energy communities after differentiated matching and combination can be analyzed, and the principles for forming energy communities based on energy hubs can be clarified.
[0041] Embodiments of this application may be provided as methods or computer program products. Therefore, this application may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of this application may be implemented in various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.
[0042] While the present invention has been described above with reference to preferred embodiments, it is not intended to limit the invention. Those skilled in the art can make various modifications and refinements without departing from the spirit and scope of the invention. Therefore, the scope of protection of the present invention shall be determined by the claims.
Claims
1. A method for matching and assembling energy communities based on improved slime mold algorithms, characterized in that, Includes the following steps: S1. A data-driven approach is used to quantitatively analyze the peak-valley coupling potential between different types of energy hubs, and an initial differential matching analysis is conducted for energy hubs with different external characteristics. S2. Combining the overall load characteristics and carbon quota balance of energy hubs, a comprehensive indicator system for the establishment of energy communities is proposed to take into account both regional structural and functional needs, and to measure the synergistic effects of electricity demand surplus and deficit, carbon quota optimization and mutual benefit among energy hubs. S3. With the goal of optimizing the overall characteristics of energy community formation, an improved slime mold optimization algorithm with an adaptive search mechanism and information sharing strategy is adopted to simulate the self-organizing behavior of slime mold networks. Through the dynamic expansion and contraction process between nodes, the overall structure and boundary of the energy community are optimized, forming an energy community formation strategy based on the improved slime mold algorithm.
2. The method for matching and constructing energy communities based on improved slime mold algorithms according to claim 1, characterized in that, In step S1, a data-driven approach is used to quantitatively analyze the peak-valley coupling potential between different types of energy hubs, specifically: A1.1 Cluster analysis is performed on the typical external characteristic curves of each energy hub, namely the typical net daily load curves. The first-order difference algorithm and quantiles based on data-driven analysis are used to extract the morphological characteristics of the overall external characteristic curve of each energy hub in the rising, stable and falling phases, and the original numerical data is transformed into discretized categorical data. A1.
2. Utilizing the K-modes algorithm's ability to effectively cluster discretized data, cluster analysis is performed on the external characteristic curves of each energy hub. When an energy hub gathers a large amount of power generation resources, i.e., its overall external characteristic is power generation, this energy hub is still included as a "negative" characteristic load in the differentiated matching analysis during the formation of the energy community.
3. The method for matching and constructing energy communities based on improved slime mold algorithms according to claim 2, characterized in that, Step A1.1 includes the following sub-steps: A1.1.
1. After preprocessing the daily net load data of each energy hub, obtain its first-order difference value; A1.1.2 Matrix the daily net load data of each energy hub; Transformed into a difference matrix representing the change in net load data: , its origin indivual The structure is composed of 3D row vectors, and the specific expression is: ; A1.1.
3. The data distribution of each subsequence in the difference matrix is described using quantiles. Three quantiles are selected, with confidence probabilities set to 0.05, 0.5, and 0.95 respectively. The morphological feature extraction class matrix of the curve is then represented as follows: , is represented as: , The above equation yields a discretized representation consisting of 3, 2, 1, 0, -1, -2, and -3. A 3D matrix, which represents the various resources in The degree to which the net load curves of each energy hub rise, stabilize, and decline within a given time period.
4. The method for matching and constructing energy communities based on improved slime mold algorithms according to claim 1, characterized in that, In step S1, an initial differential matching analysis is performed for energy hubs with different external characteristics, specifically as follows: B1.1, Using coupling coefficients To quantify and measure the peak-valley coupling degree of different energy hubs and calculate the results of suitable combinations, the specific calculation formula is as follows: , In the formula, It is a positive indicator; and They are the normalized th The energy hub and the first During the peak and trough periods of a single day, each energy hub... Net load value at any given time; The number of times when the peak and trough coincide in the daily net load curve representing an energy hub; The total time for the daily net load curve of the energy hub under consideration; For the net load of the energy hub in The time of peak-valley overlap within a given time period; B1.
2. The peak net load time is defined as the period when the maximum net load of a typical day or greater than 80% of the maximum net load occurs, and the trough net load time is defined as the period when the minimum net load of a typical day or less than 140% of the minimum net load occurs. B1.
3. The value calculated according to the above formula for the corresponding time period is the peak-valley coupling degree between the two energy hubs. It is based on Euclidean distance to reflect the difference in morphological distance between different energy hubs at a specific moment. At the same time, it considers the degree of complementarity of the external characteristic curves of different energy hubs in the time series and calculates the proportion of peak-valley overlap time between different energy hubs. B1.4, through comparison The value indicates the potential for initial differentiated matching between energy hubs. The higher the value, the more pronounced the effect of differentiated matching of energy hubs. When establishing energy communities, priority should be given to... Large energy hubs are grouped into the same energy community to promote the maximum inclusion of demand-side energy hubs in the formation of the energy community.
5. The method for matching and constructing energy communities based on improved slime mold algorithms according to claim 1, characterized in that, Step S2 proposes a comprehensive indicator system for the establishment of energy communities that takes into account both regional structural and functional needs. Specifically, based on the evaluation of the coupling characteristics of energy hubs and the obtained differentiated matching results, the system considers the structural and functional needs of energy community establishment, adheres to the principles of energy autonomy and mutual benefit, and aims to improve the overall characteristics of the communities themselves, thereby constructing a comprehensive indicator system for energy community establishment. Considering the structural aspects of energy community formation, specifically including: Structurally, each energy hub aggregated within the energy community is treated as a virtual node. The selection of this virtual node is based on the power distribution of the dispersed users within the energy hub, which determines its power centroid. The evaluation index uses the modularity index, which measures the electrical distance between different nodes. express: , In the formula, For connecting nodes and nodes The weight of the edge when the node and nodes When directly connected When not connected ; It is the sum of the weights of all edges in the network; Represents all nodes The sum of the weights of connected edges; when a node and nodes Within the same energy community ,otherwise ; Among these considerations, the network edge weights are determined by electrical distance; electrical distance is used to measure the tightness of electrical coupling between two nodes in an energy community network, and is obtained through the sensitivity relationship between voltage and reactive power, as specifically described below: , In the formula, This is the sensitivity matrix; and These represent voltage amplitude and reactive power change, respectively; matrix The middle row Column elements Represents a node The unit value of reactive power change corresponds to the node The change in voltage is expressed as: , In the formula, Represents a node The change in its own voltage and the node when reactive power changes The ratio of voltage changes; Considering the relationship between two nodes, which is related not only to themselves but also to other nodes in the energy community network, makes the network... There are nodes, and the electrical distance between nodes is defined as follows: , Set the edge weights between nodes to: .
6. The method for matching and constructing energy communities based on improved slime mold algorithms according to claim 5, characterized in that, Considering the functionality of energy community formation, specifically: on the one hand, it is necessary to consider the overall characteristics of each energy hub; on the other hand, it is necessary to take into account the self-regulation and autonomy of the energy community, fully leverage the complementary characteristics and peak-valley coupling characteristics of the internal energy hubs in terms of electricity and carbon, and reduce large-scale power flows between the energy community and the external distribution network. The evaluation indicators are expressed using active power balance indicators and carbon quota balance indicators to measure the autonomy of the formed energy community, and average net load difference indicators, net load rate standard deviation indicators, and average peak-valley difference rate indicators to measure the external load characteristics of the internal energy hubs. Specifically, these include: The active power balance index is used to adjust the combination of energy hubs in an energy community. For a single energy community, its active power balance index is... Represented as: , , In the formula, For the first Active power balance of an energy community; An indicator of the active power balance in an energy community; The number of energy communities to be established; The active power output that can be provided by all active power sources within the energy community; The sum of all active power loads within an energy community; active power balance index. Range of values The carbon quota balance index is used to adjust the energy hub combination in the energy community. Represented as: , , In the formula, For the first Carbon quota balance of an energy community; A carbon quota balance indicator for energy communities; The total carbon allowances allocated to all power-generating resources within the energy community; The total carbon allowances required by the energy community; To avoid uneven load distribution within energy communities and maximize the combined access of energy hubs, an average net load difference index is constructed based on the daily maximum net load of each energy community. The net load balance of the formed energy community is measured and expressed as: , In the formula, It is a negative indicator; This is the largest value among the maximum net loads across all energy communities. For the first The maximum net load of each energy community; The smaller the value, the more evenly the net load distribution in the energy community. To improve equipment utilization and reduce redundancy within energy communities, evaluation indicators are constructed based on the concept of standard deviation and the net load factor of each energy community. , is represented as: , , In the formula, It is a negative indicator; Net load factor for each energy community; The average net load factor of the energy community; the average peak-valley difference rate index is constructed by using the peak-valley difference rate of each energy community. , is represented as: , In the formula, This indicates the peak-valley difference rate of an energy community.
7. The method for matching and constructing energy communities based on improved slime mold algorithms according to claim 5, characterized in that, The comprehensive indicator system for establishing energy communities that takes into account both regional structural and functional needs is expressed as follows: , In the formula, , , , , and For weighting coefficients, full .
8. The method for matching and constructing energy communities based on improved slime mold algorithms according to claim 1, characterized in that, Step S3 specifically involves: determining initial parameters and node distribution, dynamic network generation and migration probability adjustment, dynamic node removal and migration load adjustment, dynamic node aggregation and path optimization, global adaptive search and node update, and outputting the optimal component result. The improved slime mold algorithm determines the initial parameters and node distribution, specifically including: Randomly distributed initial nodes indivual, >
1. For the study area, each node is considered as a candidate center for load points, and the initial load of the node is recorded. Geographic coordinates , Peak-valley characteristics of load Initialize global parameters, including migration probabilities. Path strength Node weights and fitness threshold This is used to determine the redundancy of nodes; The improved slime mold algorithm includes dynamic network generation and migration probability adjustment, specifically comprising: Based on the geographical distance of the nodes Based on the traditional slime mold optimization algorithm, a load peak-valley coupling characteristic factor is introduced. The migration probability between load points The correction is expressed as follows: , In the formula, Indicates the load point and The degree of peak-valley coupling between them; The geographical distance between nodes; This is the distance normalization coefficient; By introducing a load peak-valley coupling characteristic factor, the formation of energy communities not only considers the geographical proximity between energy hubs, but also makes full use of the complementarity between different energy hubs for optimization. Path strength generated by dynamic networks Updated based on migration probability and dynamic information feedback, expressed as: , In the formula, It serves as a smoothing factor, used to balance the selection of historical paths and new paths; Update node activity based on the concentration of path intensity distribution across nodes. , is represented as: , When node activity is below the threshold When this happens, the node is marked as a redundant node.
9. The method for matching and constructing energy communities based on improved slime mold algorithms according to claim 8, characterized in that, The improved slime mold algorithm includes dynamic node removal and migration load adjustment, specifically comprising: For nodes with low activity, check their load characteristics for similarity to surrounding nodes, and prioritize removing nodes with similar loads and low activity. Redundant nodes are removed; their loads are then redistributed to adjacent nodes with higher path strength. The load redistribution rules after a node is removed are as follows: , In the formula, For nodes The new load; This represents the original load of the node; For the removed node to all other adjacent nodes The sum of path strengths; The load of the removed node is redistributed to adjacent nodes according to the path strength ratio; The improved slime mold algorithm includes dynamic node aggregation and path optimization, specifically comprising: The number of nodes is dynamically adjusted based on the load similarity and path strength between nodes; If two nodes satisfy and ,in If the threshold is reached, the nodes are merged into one node, and the new node's load... ; After each node aggregation, the path strength and corrected distance are recalculated. , is represented as: , in, Weights representing geographical distance These represent the load characteristic weights, and both can be dynamically adjusted according to actual planning needs. The load point is calculated in each iteration. With candidate load center Correction distance And update the network based on path strength.
10. The method for matching and constructing energy communities based on improved slime mold algorithms according to claim 8, characterized in that, The improved slime mold algorithm includes global adaptive search and node update, specifically: after each iteration, a dynamic search factor is introduced based on the node distribution and network connectivity. Updating the node position is represented as: , in, This is a dynamic search factor, dynamically adjusted based on load differences and path strength between nodes, used to enhance the algorithm's global search capability after local convergence. It represents the change in node position. That is, the position adjustment is less than the preset threshold and the path strength is... When stability is reached, the global iteration ends; The optimal component output in the improved slime mold algorithm specifically includes: Calculate the comprehensive index value of energy community formation obtained in each iteration. The optimal energy community formation plan is the one with the highest comprehensive index value. Based on the comprehensive index system values proposed above, the potential of each energy hub to participate in the formation of energy communities after differentiated matching and combination is analyzed, and the principles for forming energy communities based on energy hubs are clarified.