A power distribution method and system based on a P2P network and edge computing
By constructing a power allocation method based on P2P networks and edge computing, a power coordination function and a total economic cost objective function are developed. The extended ADMM algorithm is then used to optimize the solution, which solves the transmission delay and communication efficiency problems of edge computing smart grids in complex communication topologies. This achieves optimal scheduling and allocation of power resources and improves the reliability and scalability of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA SOUTHERN POWER GRID COMPANY
- Filing Date
- 2022-09-02
- Publication Date
- 2026-07-21
AI Technical Summary
Existing edge computing smart grid models face challenges in unified control of distributed devices, coordination of distributed energy generators and distributed energy storage systems in different geographical locations, timely response to emergencies, and processing of large amounts of data, especially in complex communication topologies where transmission latency is high and communication efficiency is low.
A power allocation method based on P2P networks and edge computing is adopted. By defining the constraints and cost functions of power trading, a power coordination function and a total economic cost objective function are constructed. The extended ADMM algorithm is then used for iterative optimization to achieve the optimal allocation of power resources.
In complex communication topologies, reducing transmission latency, improving communication efficiency, achieving optimal power resource scheduling and allocation, and enhancing system scalability, reliability, controllability, and connectivity availability.
Smart Images

Figure CN115392979B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart grid technology, and in particular to a power distribution method and system based on P2P networks and edge computing. Background Technology
[0002] Smart grids are a new generation of power distribution networks, possessing high adaptability, scalability, security, economy, self-healing, robustness, and protection capabilities in highly dynamic systems, playing a crucial role in smart interconnected communities. In the past, the introduction of edge computing models to smart grids, performing computation at the network edge, has improved the real-time performance, security, and privacy of smart grids. Edge computing transfers cloud computing applications, data, and services from edge nodes of centralized networks, performing computation loading, data storage, caching, and processing, meeting requirements through a carefully designed network of distributed requests. Edge computing can effectively solve the problem of large data volumes by processing data at the network edge. Edge computing models can flexibly scale from a single energy community to multiple communities, even large-scale communities. Secondly, edge computing advocates that computation should occur as close as possible to the data source, saving data transmission time and allowing for low latency. Finally, in edge computing, data can be collected and processed based on geographic location without being transmitted to a privacy-conscious grid cloud.
[0003] While edge computing smart grid models offer significant improvements over traditional smart grid systems in data processing, efficiency, cost reduction, latency reduction, reliable and secure services, increased flexibility, and higher storage capacity, several challenges remain. First, how to achieve unified control and coordination of distributed energy generators, distributed energy storage systems, and constantly changing users across different geographical locations. Second, dealing with unforeseen emergencies, such as the dynamic nature of power facility access, requires smart grids to provide real-time information transmission to the energy distribution network for timely response and control of these events. Finally, as the number of power devices connected to the smart grid increases, the amount of data generated by these devices grows, and the logical communication topology between devices becomes more complex, especially during state changes, making it difficult for traditional edge computing smart grids to coordinate and allocate power resources. Summary of the Invention
[0004] To address the aforementioned technical problems, the present invention aims to provide a power distribution method and system based on P2P networks and edge computing, which can reduce transmission latency at the edge computing layer and improve communication efficiency in complex communication topology networks while achieving optimal power resource scheduling and allocation.
[0005] The first technical solution adopted in this invention is: a power distribution method based on P2P networks and edge computing, comprising the following steps:
[0006] Define the constraints for electricity trading and construct the electricity coordination function;
[0007] Define the cost function for electricity trading and construct the objective function for total economic cost;
[0008] Based on the power coordination function, the optimal power allocation scheme is obtained by solving the total economic cost objective function using the extended ADMM algorithm.
[0009] Furthermore, the step of defining the constraints for electricity trading and constructing the electricity coordination function specifically includes:
[0010] The constraints on electricity trading include those between communities, between communities and power companies, the relationship between the energy storage capacity and energy consumption rate of distributed energy generation systems, and the constraints on electricity trading at edge computing nodes.
[0011] By integrating the above constraints, an electrical energy coordination function is constructed.
[0012] Furthermore, the specific details of the electrical energy coordination function are as follows:
[0013]
[0014] In the above formula, i and j represent two different communities, and τ represents a time slot. This represents the set of other communities that can trade with the community. This represents the amount of electricity exchanged between community i and community j within time slot τ. This represents the electrical energy traded between the community and the power company. This represents the power of the energy generated by renewable energy within a time slot τ. Let represent the amount of renewable energy collected by all users in any community i, P represent a set representing all communities, and π represent a set of time intervals.
[0015] Furthermore, the step of defining the cost function for electricity trading and constructing the total economic cost objective function specifically includes:
[0016] The cost function of electricity trading includes the cost function of distributed energy generation systems and the transaction cost function of edge computing nodes;
[0017] The cost functions of the above-mentioned electricity transactions are integrated to construct the total economic cost objective function.
[0018] Furthermore, the cost function of the distributed energy generation system is expressed as follows:
[0019]
[0020] In the above formula, S represents the power generation rate of renewable energy. αi S βi and S γi The weights representing the costs of power generation, maintenance, and installation. This represents the cost function of a distributed energy generation system.
[0021] Furthermore, the objective function for total economic cost is specifically as follows:
[0022]
[0023] In the above formula, f τ (x τ ) represents the objective function for total economic cost. This indicates the economic cost of electricity generation transactions. This represents the cost of a distributed energy storage system. s represents the cost of receiving electricity transactions at an edge computing node. bi s gi s ri and s ni This indicates the weight of each cost.
[0024] Furthermore, the step of solving the total economic cost objective function using the extended ADMM algorithm based on the power coordination function to obtain the optimal power allocation scheme specifically includes:
[0025] Based on the power coordination function, the total economic cost objective function is augmented using the extended ADMM algorithm to obtain the Lagrange function relation of the total economic cost objective function;
[0026] According to the preset update steps, the Lagrange function relationship of the total economic cost objective function is iteratively updated;
[0027] The iterative update process continues until the result of the iterative update reaches the convergent optimal solution, at which point the iterative update step is terminated and the optimal power allocation scheme is output.
[0028] Furthermore, the Lagrange function expression of the total economic cost objective function is specifically expressed as follows:
[0029]
[0030]
[0031] In the above formula, f τ (x τ) represents the objective function for total economic cost. This indicates the economic cost of electricity generation transactions. This represents the cost of a distributed energy storage system. s represents the cost of receiving electricity transactions at an edge computing node. bi s gi s ri and s ni This indicates the weight of each cost.
[0032] Furthermore, the preset update steps are as follows:
[0033]
[0034]
[0035]
[0036] In the above formula, This represents the energy variable to be allocated for the i-th user in the (k+1)-th iteration. Let the Lagrange multiplication function variable be the variable in the (k+1)th iteration. f represents the Lagrange coefficients at the (k+1)th iteration. τ (·) represents the total economic cost function, g τ (·) denotes the Lagrange multiplication function, β denotes the iteration parameter, and A i Represents the Lagrange constant coefficient. This represents the electrical energy variable to be allocated. Denotes the variables of the Lagrange day function. Let represent the Lagrange coefficients at the k-th iteration.
[0037] The second technical solution adopted in this invention is: a power distribution system based on P2P networks and edge computing, comprising:
[0038] The coordination module is used to define the constraints of electricity trading and construct the electricity coordination function;
[0039] The target module is used to define the cost function of electricity trading and construct the total economic cost objective function;
[0040] The optimization module is used to solve the total economic cost objective function based on the power coordination function and the extended ADMM algorithm to obtain the optimal power allocation scheme.
[0041] The beneficial effects of the method and system of this invention are as follows: This invention constructs an energy coordination function and a total economic cost objective function, and applies them to a dynamic distributed smart grid system. Furthermore, it iteratively optimizes and solves the total economic cost objective function using an extended ADMM algorithm, thereby balancing energy resources in a supportable and economical manner. This enables unified control of coordinated power resources by communities in different geographical locations, and promotes scalability, reliability, robustness, controllability, availability, and improved connectivity between edge computing nodes. By reducing transmission latency at the edge computing layer and improving communication efficiency, it facilitates effective power balance and reliable energy transmission, achieving optimal power resource scheduling and allocation in the current complex communication topology network. Attached Figure Description
[0042] Figure 1 This is a flowchart of the steps of a power distribution method based on P2P network and edge computing according to the present invention.
[0043] Figure 2 This is a structural block diagram of an energy distribution system based on P2P network and edge computing according to the present invention;
[0044] Figure 3 This is a schematic diagram of the edge computing smart grid model based on P2P networks of the present invention. Detailed Implementation
[0045] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
[0046] In this scheme, the set of all communities can be represented by an integer P, where n = P represents the number of communities. Each smart community i ∈ P is equipped with distributed generators and distributed energy storage devices. Under the control of edge computing nodes, the community uses some local distributed generators to produce energy from renewable energy sources. This energy can be used for its own consumption or sold to power companies or other communities. The set of other communities that can trade with the community is denoted as . Where i represents a specific community, i∈P, the P2P network establishes a dedicated mobile communication network based on the correlation of edge computing layer nodes, providing reliable communication for electricity trading between communities or between communities and power companies;
[0047] Reference Figure 3When the nearby communities have sufficient power to meet the transaction request of community i, the nearby smart community responds to the transaction request. The transaction occurs between communities and their neighbors. When the power transaction between communities cannot meet the needs of community i, the power company will respond to the power demand and conduct a power transaction. If there is surplus energy after the power transaction between communities, it can also be traded with the local power company. The edge node determines whether to conduct a transaction. If a transaction is not required for some reason, the transaction request of the edge node will remain unchanged, and it will continue to determine whether the node has other transaction requests. If not, the edge node will be released. After confirming that a transaction will be conducted, the extended ADMM algorithm is used to solve the problem according to the objective function and constraints to obtain the optimal solution, that is, the optimal power allocation scheme.
[0048] Reference Figure 1 This invention provides a power distribution method based on P2P networks and edge computing, which includes the following steps:
[0049] S1. Define the constraints for electricity trading and construct the electricity coordination function;
[0050] S11. Define the constraints for electricity trading between communities;
[0051] Specifically, when the energy generated by community i does not meet its energy consumption requirements or when trading with other communities is more economical, the community i sends an electricity trading request to neighboring communities through a P2P network, and the published electricity trading price is S. i If the transaction occurs between the community and the neighborhood, This represents the amount of electricity exchanged between community i and community j within the time slot τ. Furthermore, for... A positive value indicates that community i purchases energy from community j, and a negative value indicates that community i sells energy to community j. If there is no electricity trading, the value is 0. Since the energy generated and consumed are dynamically changing and the actual capacity is limited, the constraints for electricity trading between communities are as follows:
[0052]
[0053] In this case, assuming that community i provides electricity to community j, that is, community i outputs electricity in exchange for community j, then This represents the minimum electrical energy required by community j, which is the minimum electrical energy needed for community j to carry out its normal activities. This represents the amount of electricity traded by community j to community i. This represents the maximum electrical energy that community i can provide to community j, if it exists. If the amount of electricity traded by community j to community i is less than the amount community j requests, then community j needs to request electricity through other means, such as from the power company. The same applies to the following constraints.
[0054] S12. Define the constraints for electricity transactions between the community and the power company;
[0055] Specifically, when inter-community electricity transactions cannot meet consumer demand or when there is surplus energy after inter-community electricity transactions, community i can engage in electricity transactions with the local power company. This represents the minimum electrical energy required by community i, which is the minimum electrical energy needed for community i to carry out its normal activities. This represents the amount of electricity that community i requests to trade with the power company. This represents the maximum electrical energy that the power company can provide to community i, if... This indicates that community i purchases energy from the power company if This indicates that community i sells energy to the power company; therefore, the constraints for the energy transaction between the community and the power company are as follows:
[0056]
[0057] S13. Define the constraints on the relationship between energy storage capacity and energy consumption rate of distributed energy generation systems.
[0058] Specifically, Indicates the maximum capacity limit of the battery. Indicates power supply Renewable energy, or power source, generated over a time period τ User's energy consumption, S i,max -c typically represents the upper limit of the charging rate. i.min This represents the lower bound of power consumption. Therefore, energy storage capacity and energy efficiency need to be within appropriate ranges, with the following constraints:
[0059]
[0060]
[0061] The battery capacity is expressed as follows:
[0062]
[0063] S14. Define the constraints for power trading at edge computing nodes;
[0064] Specifically, in this scheme, the P2P network establishes a communication network topology between edge computing nodes. When an edge computing node receives a transaction, it must pay for each transaction. Therefore, the number of transactions received should be within a suitable range, i.e., the power transaction constraints of the edge computing nodes are as follows:
[0065]
[0066] S15. Construct the power coordination function;
[0067] Specifically, assuming the current community prioritizes the use of renewable energy, any surplus energy after meeting current needs will be stored in a distributed energy storage system. At any time τ∈π, energy coordination should satisfy the following equation:
[0068]
[0069] In the above formula, i and j represent two different communities, and τ represents a time slot. This represents the set of other communities that can trade with the community. This represents the amount of electricity exchanged between community i and community j within time slot τ. This represents the electrical energy traded between the community and the power company. This represents the power of the energy generated by renewable energy within a time slot τ. Let represent the amount of renewable energy collected by all users in any community i, P represent a set representing all communities, and π represent a set of time intervals.
[0070] S2. Define the cost function for electricity trading and construct the objective function for total economic cost;
[0071] S21. Define the cost function for a distributed energy generation system;
[0072] Specifically, a cost function for a distributed energy generation system is defined, wherein the cost specifically includes installation, operation, and maintenance costs, and the cost function is as follows:
[0073]
[0074] In the above formula, S represents the power generation rate of renewable energy. βi and S γi Indicates the weight of maintenance and installation costs. This represents the cost function of a distributed energy generation system.
[0075] S22. Define the transaction cost function for edge computing nodes;
[0076] Specifically, assuming that the cost of receiving transactions by an edge computing node is affected by transmission loss and communication costs, the cost of receiving transactions by an edge computing node is as follows:
[0077]
[0078] In the above formula, The transaction cost function ρ represents the cost of an edge computing node. ij ρ represents the unit cost of a transaction between community i and community j. ui This represents the unit cost of the transaction between community i and power company u;
[0079] S23. Construct the objective function for total economic cost.
[0080] Specifically, based on the above, considering the flow of electricity and transactions between communities or between communities and the power company, the total economic cost includes transactions between communities and between communities and the power company, as well as the dynamic energy of the energy storage batteries. The economic cost objective function of this scheme is proposed as follows:
[0081]
[0082] In the above formula, f τ (x τ ) represents the objective function for total economic cost. This indicates the economic cost of electricity generation transactions. This represents the cost of a distributed energy storage system. s represents the cost of receiving electricity transactions at an edge computing node. bi s gi s ri and s ni This indicates the weight of each cost.
[0083] S3. Based on the power coordination function, the total economic cost objective function is solved by the extended ADMM algorithm to obtain the optimal power allocation scheme.
[0084] Specifically, the optimization objective of this scheme is to minimize the overall economic cost based on each day, and its equation is expressed as follows:
[0085]
[0086] Furthermore, the above equations are constrained by the energy coordination function and the total economic cost objective function;
[0087] Since the objective function is a convex quadratic programming problem, the above equation can be rewritten as a Lagrange function of the total economic cost objective function using the extended ADMM algorithm, as shown below:
[0088]
[0089]
[0090] In the above formula, Let g represent the objective function of total economic cost. τ (y τ () represents the Lagrange daily function, and A represents the Lagrange constant coefficient. y represents the electrical energy variable to be allocated. τ Represents the variables of the Lagrange multiplication function;
[0091] The core of the ADMM algorithm is the Augmented Lagrangian Method (ALM), a dual algorithm. The Lagrangian function solves optimization problems under multiple constraints. This method can solve an optimization problem with n variables and k constraints. The algorithm process involves repeatedly performing pre-defined iterative update steps until the result reaches a convergent state. Convergence is defined as follows: in each iteration of the ADMM algorithm with different numbers of communities, when the energy efficiency value increases with the number of communities and infinitely approaches a certain energy efficiency value, it indicates convergence. Each step updates only one variable while fixing the other two. The further pre-defined update steps are as follows:
[0092]
[0093]
[0094]
[0095] In the above formula, This represents the energy variable to be allocated for the i-th user in the (k+1)-th iteration. Let the Lagrange multiplication function variable be the variable in the (k+1)th iteration. f represents the Lagrange coefficients at the (k+1)th iteration. τ (·) represents the total economic cost function, g τ (·) denotes the Lagrange multiplication function, β denotes the iteration parameter, and A i Represents the Lagrange constant coefficient. This represents the electrical energy variable to be allocated. Denotes the variables of the Lagrange day function. Represents the Lagrange coefficients at the k-th iteration;
[0096] Furthermore, compared to the classic ADMM algorithm, the extended ADMM algorithm uses fewer iterations and takes less time, thus minimizing the time required for the system to compute the optimal solution. The difference in the extended ADMM can be expressed as follows:
[0097]
[0098]
[0099]
[0100] Where γ∈(0,2), in this model system, γ=1.5, The expression is as follows:
[0101]
[0102] Reference Figure 2 A power distribution system based on P2P networks and edge computing, comprising:
[0103] The coordination module is used to define the constraints of electricity trading and construct the electricity coordination function;
[0104] The target module is used to define the cost function of electricity trading and construct the total economic cost objective function;
[0105] The optimization module is used to solve the total economic cost objective function based on the power coordination function and the extended ADMM algorithm to obtain the optimal power allocation scheme.
[0106] The content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0107] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A power distribution method based on P2P networks and edge computing, characterized in that, Includes the following steps: Define the constraints for electricity trading and construct the electricity coordination function; Define the cost function for electricity trading and construct the objective function for total economic cost; Based on the power coordination function, the optimal power allocation scheme is obtained by solving the total economic cost objective function using the extended ADMM algorithm. The step of defining the constraints for electricity trading and constructing the electricity coordination function specifically includes: The constraints on electricity trading include those between communities, between communities and power companies, the relationship between the energy storage capacity and energy consumption rate of distributed energy generation systems, and the constraints on electricity trading at edge computing nodes. By integrating the above constraints, a power coordination function is constructed. The specific power coordination function is as follows: In the above formula, , This represents two different communities. Indicates a time slot. This represents the set of other communities that can trade with the community. Indicates community and community exist The exchanged power within the time slot, This represents the electrical energy traded between the community and the power company. Indicating renewable energy in The energy generated within the time slot, Represents any community Renewable energy collection by all users It represents a set of all community representatives. A set representing time intervals; The step of solving the total economic cost objective function using the extended ADMM algorithm based on the power coordination function to obtain the optimal power allocation scheme specifically includes: Based on the power coordination function, the total economic cost objective function is augmented using the extended ADMM algorithm to obtain the Lagrange function relation of the total economic cost objective function; According to the preset update steps, the Lagrange function relationship of the total economic cost objective function is iteratively updated; The iterative update process continues until the result of the iterative update reaches the convergent optimal solution, at which point the iterative update step is terminated and the optimal power allocation scheme is output.
2. The power distribution method based on P2P network and edge computing according to claim 1, characterized in that, The step of defining the cost function for electricity trading and constructing the objective function for total economic cost specifically includes: The cost function of electricity trading includes the cost function of distributed energy generation system and the transaction cost function of edge computing node, wherein the cost function of distributed energy generation system includes operation and maintenance cost and installation cost; The cost functions of the above-mentioned electricity transactions are integrated to construct the total economic cost objective function.
3. The power distribution method based on P2P network and edge computing according to claim 2, characterized in that, The cost function of the distributed energy generation system is expressed as follows: In the above formula, Indicating renewable energy in The energy generated within the time slot, , and The weights representing the costs of power generation, maintenance, and installation. This represents the cost function of a distributed energy generation system.
4. The power distribution method based on P2P network and edge computing according to claim 2, characterized in that, The specific objective function for total economic cost is as follows: In the above formula, This represents the objective function for total economic cost. Indicates community In the time slot Internal power transmission Costs Indicates community In the time slot Internal power generation company electricity The cost, The cost function represents the cost of a distributed energy generation system. This represents the cost of receiving electricity transactions at the edge computing node. , , and This indicates the weight of each cost.
5. The power distribution method based on P2P network and edge computing according to claim 4, characterized in that, The Lagrange function expression of the total economic cost objective function is specifically expressed as follows: In the above formula, This represents the objective function for total economic cost. Represents the Lagrange day function, Represents the Lagrange constant coefficient. This represents the electrical energy variable to be allocated. This represents the variable of the Lagrange multiplication function.
6. The power distribution method based on P2P network and edge computing according to claim 1, characterized in that, The specific preset update steps are as follows: In the above formula, Indicates the first During the nth iteration The variable of electrical energy to be allocated for each user Indicates the first The Lagrange multiplication function variable during the next iteration Indicates the first Lagrange coefficients in the next iteration This represents the total economic cost function. Represents the Lagrange day function, Represents the iteration parameters. Represents the Lagrange constant coefficient. This represents the electrical energy variable to be allocated. Indicates the first The user The Lagrange multiplication function variable during the next iteration Indicates the first Lagrange coefficients during the next iteration.
7. A power distribution system based on P2P networks and edge computing, characterized in that, Used to execute the power distribution method based on P2P network and edge computing as described in claim 1. Includes the following modules: The coordination module is used to define the constraints of electricity trading and construct the electricity coordination function; The target module is used to define the cost function of electricity trading and construct the total economic cost objective function; The optimization module is used to solve the total economic cost objective function based on the power coordination function and the extended ADMM algorithm to obtain the optimal power allocation scheme.