A method and system for determining power flow of a complex power system
By dividing the power system into partitions and performing grid-based training set division, combined with distributed training, the problem of large data requirements for traditional machine learning training sets is solved, and efficient power flow calculation for complex power systems is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID HUNAN ELECTRIC POWER COMPANY LIMITED
- Filing Date
- 2024-08-01
- Publication Date
- 2026-05-01
AI Technical Summary
Traditional machine learning training processes require a large amount of data, resulting in high consumption of computing resources. Furthermore, traditional distributed computing architectures cannot effectively adapt to the training needs of machine learning, limiting their application in power flow calculations for large-scale and complex power systems.
The power system is divided into different partitions, and a partition training set is generated based on the grid partitioning. Machine learning is then performed by merging the distributed training sets, which reduces training complexity and improves training efficiency.
By using a distributed training method, the required amount of training data for machine learning is reduced, the efficiency of the training process is improved, and it is suitable for power flow calculations in large-scale complex power systems.
Smart Images

Figure CN119209541B_ABST
Abstract
Description
A method and system for determining power flow in complex power systems Technical Field
[0001] This invention relates to the field of power system technology, and in particular to a method and system for determining power flow in complex power systems. Background Technology
[0002] Traditional machine learning algorithms require large datasets to achieve good performance during model training, resulting in enormous demands on computational and storage resources. This is particularly true when dealing with large-scale, complex datasets, where traditional machine learning training often suffers from slow computation speed and high resource consumption, limiting its application in real-world scenarios. Meanwhile, distributed computing frameworks, with their advantages of horizontal scalability and parallel optimization, have shown great potential in large-scale data processing and computation. However, traditional distributed computing architectures often fail to fully leverage their advantages in machine learning training and cannot adequately meet the demands of machine learning training. Therefore, there is an urgent need to design a new method that integrates machine learning and distributed computing to address the shortcomings of traditional machine learning training methods, which require large amounts of training data. Summary of the Invention
[0003] This invention provides a method and system for determining power flow in complex power systems, in order to address the shortcomings of existing machine learning training sets which require large amounts of data.
[0004] To achieve the above objectives, the present invention employs the following technical solution:
[0005] In a first aspect, the present invention provides a method for determining power flow in a complex power system, comprising:
[0006] The target power system is divided into different partitions, and all distributed resources in each partition are divided into grids. Based on the grid division results, the initial training set of each partition is generated.
[0007] Distributed resources that do not belong to the corresponding partition in the initial training set of the partition are removed from the initial training set of the partition to obtain the final training set of the partition. All final training sets of the partitions are then merged into a whole to obtain the overall training set.
[0008] The entire training set is input into the constructed machine learning model to obtain the trained machine learning model;
[0009] Calculate the power flow distribution results when there are no distributed resources in the target power system, and input the final training set of all the partitions into the trained machine learning model to determine the partition power flow calculation results of all partitions;
[0010] The power flow calculation results of all partitions are merged to obtain the power flow results of the target power system.
[0011] Optionally, dividing the target power system into different zones includes:
[0012] The target power system is divided into partitions based on the number of distributed resources in the target power system, so that the number of distributed resources in each partition is equal.
[0013] Optionally, the step of meshing all distributed resources in each partition includes:
[0014] Determine the active and reactive power output ranges of all distributed resources in each partition, and then divide all distributed resources in each partition into grids by equally spaced output ranges.
[0015] The methods of equally spaced division include:
[0016] Let k represent the segment number, and K represent the total number of segments. ,when When, it represents dividing the active and reactive power output of each distributed resource into two segments, namely the upper and lower limits of active power output and the upper and lower limits of reactive power output, denoted as . , , and When K is any other value, the active and reactive power outputs of different segments are shown in the following formulas:
[0017] ;
[0018] ;
[0019] in, and Let these represent the active and reactive power output values of distributed resource l under the current training set, respectively. , , and Let represent the upper limit of active power output, the lower limit of active power output, the upper limit of reactive power output, and the lower limit of reactive power output, respectively. k represents the segment number, and K represents the total number of segments.
[0020] Optionally, removing distributed resources from the initial training set that do not belong to the corresponding partition of the initial training set includes:
[0021] The active and reactive power output values of distributed resources in the initial training set that do not belong to the corresponding partition of the initial training set are taken according to the elimination formula, which satisfies the following relationship:
[0022] ;
[0023] ;
[0024] in, and Let these represent the active and reactive power output values of distributed resource l under the current training set, respectively. Represents the set of distributed resources in partition n.
[0025] Optionally, the step of training all partitions into a single training set and then combining them into a whole to obtain the overall training set includes:
[0026] The final training set size for each partition is determined by the following relationship:
[0027] ;
[0028] in, This represents the number of training sets in partition n. This represents the number of permutations and combinations of active and reactive power for each distributed resource. Represents the distributed resources of partition n;
[0029] The total number of final training sets is determined based on the number of final training sets in each partition, and the method for determining this number satisfies the following relationship:
[0030] ;
[0031] in, This represents the total number of training sets across all partitions. This represents the number of training sets for partition n.
[0032] Optionally, the power flow distribution results when there are no distributed resources in the target power system include:
[0033] Remove all distributed resources in the target power system and calculate the power flow distribution based on the target power system's topology, line parameters, bus parameters, and load model;
[0034] The topology is the connection relationship between each busbar;
[0035] The line parameters are the resistance, reactance, conductance, and susceptance of the line.
[0036] The bus parameters and load model consist of generator nodes with constant power and load nodes with constant power on the bus.
[0037] Optionally, the calculation of power flow distribution includes:
[0038] Calculate the bus voltage, active power, and reactive power of each branch at each node, and use the calculated reactive power as the power flow distribution.
[0039] Optionally, determine the partition power flow calculation results for all partitions, including:
[0040] The bus voltage at each node and the power of each branch are determined by the following relationship:
[0041] ;
[0042] ;
[0043] ;
[0044] in, This represents the calculated bus voltage value of node i without distributed resources. This represents the calculated bus voltage value of node i in the m-th partition of the nth training set. This indicates the impact of the power flow calculation result of the nth training set partition m on the voltage of node i; , Let represent the calculated active and reactive power values of branch j without distributed resources, respectively. , Let represent the calculated active power and reactive power values of branch j in the nth training set partition m, respectively. , These represent the impact of the power flow calculation results of the nth training set partition m on the active and reactive power of branch j, respectively.
[0045] Optionally, merging the power flow calculation results of all partitions to obtain the power flow results of the target power system includes:
[0046] The summation of the impact of all partition power flow calculation results, plus the power flow calculation results without distributed resources, yields the following formula:
[0047] ;
[0048] ;
[0049] ;
[0050] in, This represents the voltage calculation result of node i in the nth training set. and Let M represent the calculated active and reactive power of the nth training set branch j, respectively, and M represent the number of partitions.
[0051] Secondly, embodiments of this application provide a complex power system flow determination system, including a processor and a memory;
[0052] Memory, used to store computer programs;
[0053] When a processor executes a program stored in memory, it implements any of the steps of the method described in the first aspect.
[0054] Beneficial effects:
[0055] The power flow determination method for complex power systems provided by this invention reduces the complexity of the machine learning training process by dividing the power system into different partitions and generating grid-based training sets for each partition. Machine learning training is then performed directly on different partitions, and the training results are merged to achieve distributed training. This distributed training approach addresses the drawback of traditional machine learning methods, which require large amounts of training sets, significantly improving the efficiency of the machine learning training process and making it suitable for power flow calculations in large-scale complex power systems. Attached Figure Description
[0056] Figure 1 is a flowchart of one of the preferred embodiments of the method for determining power flow in a complex power system according to the present invention;
[0057] Figure 2 is a second flowchart of the method for determining power flow in a complex power system according to a preferred embodiment of the present invention.
[0058] Figure 3 is a flowchart of the training set generation method according to a preferred embodiment of the present invention;
[0059] Figure 4 is a flowchart of the method for generating a training set according to grid partitioning in a preferred embodiment of the present invention;
[0060] Figure 5 is a flowchart of one of the preferred embodiments of the training process and testing method of the machine learning model of the present invention;
[0061] Figure 6 is a flowchart of the training process and testing method of the machine learning model in a preferred embodiment of the present invention. Detailed Implementation
[0062] The technical solution of the present invention will be clearly and completely described below. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0063] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms "an" or "a" and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms "connected" or "linked" and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up," "down," "left," "right," etc., are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship also changes accordingly.
[0064] Please refer to Figures 1-6. This application provides a method for determining power flow in a complex power system, including:
[0065] The target power system is divided into different partitions, and all distributed resources in each partition are divided into grids. Based on the grid division results, the initial training set of each partition is generated.
[0066] Distributed resources that do not belong to the corresponding partition in the initial training set of the partition are removed from the initial training set of the partition to obtain the final training set of the partition. All final training sets of the partitions are then merged into a whole to obtain the overall training set.
[0067] The entire training set is input into the constructed machine learning model to obtain the trained machine learning model;
[0068] Calculate the power flow distribution results when there are no distributed resources in the target power system, and input the final training set of all the partitions into the trained machine learning model to determine the partition power flow calculation results of all partitions;
[0069] The power flow calculation results of all partitions are merged to obtain the power flow results of the target power system.
[0070] In the above embodiments, by dividing the power system into different partitions and generating grid-based training sets for each partition, the complexity of the machine learning training process is reduced. Machine learning training is then performed directly on different partitions, and the training results are merged to achieve distributed training. This distributed training approach addresses the drawback of traditional machine learning methods, which require large amounts of training data, significantly improving the efficiency of the machine learning training process. It is suitable for power flow calculations in large-scale, complex power systems.
[0071] As shown in Figure 3, regarding the training set generation method, firstly, the power system is divided into different partitions, each containing a similar number of distributed resources; secondly, all distributed resources in each partition are divided into their own training sets according to the grid method; then, the output of distributed resources in the training set that do not belong to the corresponding partition is set to 0; finally, the training sets of all partitions are merged into a whole, and this training set containing the whole is used to train the power system.
[0072] As shown in Figure 4, the grid partitioning method represents dividing the active and reactive power outputs of all distributed resources in each partition at equal intervals according to the output range of the corresponding distributed resources.
[0073] In this embodiment, equal interval division refers to dividing the output range of active power and reactive power into equal intervals. For example, when the active power output range is 20-100kW and the total number of segments is 4, the interval between active power output segments is 20kW; when the reactive power output range is 60-100kW and the total number of segments is 4, the interval between reactive power output segments is 10kW. Furthermore, in this embodiment, segmentation refers to dividing the output range into segments. Segmentation reduces the number of training samples.
[0074] Let the symbol k represent the segment number. ,when When, it means dividing the active and reactive power output of each distributed resource into two segments, namely, an upper limit and a lower limit for reactive power output, denoted as . , , and ,when For other values, the output power of different segments is shown in equations (1) and (2), respectively.
[0075] (1)
[0076] (2)
[0077] in, and Let these represent the active and reactive power output values of distributed resource l under the current training set, respectively. , , and Let represent the upper limit of active power output, the lower limit of active power output, the upper limit of reactive power output, and the lower limit of reactive power output, respectively. k represents the segment number, and K represents the total number of segments.
[0078] Not belonging to the corresponding partition The output of the distributed resource l is taken according to equations (3) and (4).
[0079] (3)
[0080] (4)
[0081] in, Represents the set of distributed resources in partition n.
[0082] The number of training sets in the nth partition is shown in Equation (5), and the total number of training sets in all partitions is shown in Equation (6), where s represents the index of the training set. .
[0083] (5)
[0084] (6)
[0085] in, This represents the number of training sets in partition n. This represents the total number of training sets across all partitions. This represents the number of permutations and combinations of active and reactive power for each distributed resource. This represents the distributed resources of partition n.
[0086] The training set for power flow computation represents the combination of different outputs of distributed resources as the input to the machine learning training set, and the power flow computation results of these different combinations as the output of the machine learning training set.
[0087] Machine learning methods include linear regression, multinomial regression, support vector regression, decision tree regression, random forest regression, gradient boosting regression, AdaBoost regression, K-nearest neighbor regression, neural network regression, elastic network regression, ridge regression, Lasso regression, principal component regression, Bayesian regression, deep learning regression, etc.
[0088] As shown in Figure 5, the training process and testing method for the machine learning model are as follows: First, the power flow distribution results without distributed resources are calculated, and the grid method is used to generate training sets for the distributed resources of different partitions. Second, the influence of the training sets of different partitions on the power flow calculation results is recorded. Then, the influence of the distributed resources of all partitions on the power flow calculation results is merged. Finally, the distributed resources of different partitions are input into the model trained by machine learning to obtain the influence of each partition on the power flow calculation. The results of the power flow calculation of each partition are merged to obtain the final power flow calculation result based on machine learning.
[0089] Power flow distribution can be calculated directly using sophisticated simulation tools such as Matpower. A specific model needs to be built, and the line parameters and power distribution need to be set in the simulation tool. After running the simulation, the calculation will be completed, and the results will be directly output in the output section. In practice, simply build the model in the simulation tool.
[0090] As shown in Figure 6, firstly, all distributed resources in the target power system are removed, and the power flow distribution, including the bus voltage of each node, is calculated only based on the topology, line parameters, bus parameters, and load model of the target power system. Active power of each branch and reactive power .
[0091] The effects on the bus voltage of each node and the power of each branch are shown in equations (7-9).
[0092] (7)
[0093] (8)
[0094] (9)
[0095] in, This represents the calculated bus voltage value of node i without distributed resources. This represents the calculated bus voltage value of node i in the m-th partition of the nth training set. This indicates the impact of the power flow calculation result of the nth training set partition m on the voltage of node i; , Let represent the calculated active and reactive power values of branch j without distributed resources, respectively. , Let represent the calculated active power and reactive power values of branch j in the nth training set partition m, respectively. , These represent the impact of the power flow calculation results of the nth training set partition m on the active and reactive power of branch j, respectively.
[0096] The impact of the power flow calculation results of all partitions is summed and the power flow calculation results without distributed resources are added, as shown in equations (10~12).
[0097] (10)
[0098] (11)
[0099] (12)
[0100] in, This represents the voltage calculation result of node i in the nth training set. and Let M represent the calculated active and reactive power of the nth training set branch j, respectively, and M represent the number of partitions.
[0101] This application also provides a complex power flow determination system, including a processor and a memory;
[0102] Memory, used to store computer programs;
[0103] A processor, when executing a program stored in memory, implements any of the steps described in the method for determining power flow in a complex power system.
[0104] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.
Claims
1. A method for determining power flow in a complex power system, characterized in that, include: The target power system is divided into different partitions, and all distributed resources in each partition are divided into grids. Based on the grid division results, the initial training set of each partition is generated. Distributed resources that do not belong to the corresponding partition in the initial training set of the partition are removed from the initial training set of the partition to obtain the final training set of the partition. All final training sets of the partitions are merged into a whole to obtain the overall training set. The overall training set is input into the constructed machine learning model to obtain the trained machine learning model. The power flow distribution results when there are no distributed resources in the target power system are calculated, and all final training sets of the partitions are input into the trained machine learning model to determine the partition power flow calculation results of all partitions. The power flow calculation results of all partitions are merged to obtain the power flow results of the target power system. Determining the power flow calculation results of all partitions includes determining the bus voltage and power of each branch at each node, and the determination method satisfies the following relationship: ; ; ;in, This represents the calculated bus voltage value of node i without distributed resources. This represents the calculated bus voltage value of node i in the m-th partition of the nth training set. This represents the impact of the power flow calculation results of the nth training set partition m on the voltage of node i. 、 Let represent the calculated active and reactive power values of branch j without distributed resources, respectively. 、 Let represent the calculated active power and reactive power values of branch j in the nth training set partition m, respectively. 、 These represent the impact of the power flow calculation results of the nth training set partition m on the active and reactive power of branch j, respectively.
2. The method for determining power flow in complex power systems according to claim 1, characterized in that, The step of dividing the target power system into different partitions includes: dividing the target power system into partitions based on the number of distributed resources in the target power system, so that the number of distributed resources in each partition is equal.
3. The method for determining power flow in complex power systems according to claim 1, characterized in that, The process of meshing all distributed resources in each partition includes: determining the active power output range and reactive power output range of all distributed resources in each partition, and meshing all distributed resources in each partition by dividing the output range at equal intervals; wherein, the equal interval division method includes: using the symbol k to represent the segment number, and the symbol K to represent the total number of segments. ,when When, it represents dividing the active and reactive power output of each distributed resource into two segments, namely the upper and lower limits of active power output and the upper and lower limits of reactive power output, denoted as . 、 、 and ,when For other values, the active and reactive power outputs of different segments are shown in the following formulas: ; ;in, and Let these represent the active and reactive power output values of distributed resource l under the current training set, respectively. 、 、 and Let represent the upper limit of active power output, the lower limit of active power output, the upper limit of reactive power output, and the lower limit of reactive power output, respectively. k represents the segment number, and K represents the total number of segments.
4. The method for determining power flow in complex power systems according to claim 1, characterized in that, The step of removing distributed resources that do not belong to the corresponding partition of the initial training set from the initial training set includes: taking the active power output value and reactive power output value of the distributed resources that do not belong to the corresponding partition of the initial training set according to the removal formula, which satisfies the following relationship: ; ;in, and Let these represent the active and reactive power output values of distributed resource l under the current training set, respectively. Let l represent the set of distributed resources in partition n, where l represents the distributed resource.
5. The method for determining power flow in complex power systems according to claim 1, characterized in that, The step of combining the final training sets of all partitions into a whole to obtain the overall training set includes: determining the number of final training sets for each partition, the method of which satisfies the following relationship: ;in, This represents the number of training sets in partition n. This represents the number of permutations and combinations of active and reactive power for each distributed resource. Represents the set of distributed resources in partition n. Let n represent the distributed resources of partition n; the total number of final training sets is determined based on the number of final training sets in each partition, and the determination method satisfies the following relationship: ;in, This represents the total number of training sets across all partitions. This represents the number of training sets for partition n, and N represents the total number of partitions.
6. The method for determining power flow in complex power systems according to claim 1, characterized in that, The calculation of the power flow distribution results when there are no distributed resources in the target power system includes: removing all distributed resources in the target power system, and calculating the power flow distribution based on the topology, line parameters, bus parameters, and load model of the target power system; the topology is the connection relationship between each bus; the line parameters are the resistance, reactance, conductance, and susceptance on the line; the bus parameters and load model include generator nodes with constant power and load nodes with constant power on the bus.
7. The method for determining power flow in complex power systems according to claim 6, characterized in that, The calculation of power flow distribution includes: calculating the bus voltage of each node, the active power of each branch, and the reactive power of each branch, and using the calculated reactive power as the power flow distribution.
8. The method for determining power flow in complex power systems according to claim 1, characterized in that, The step of merging the power flow calculation results of all partitions to obtain the power flow result of the target power system includes: summing the impact of the power flow calculation results of all partitions and adding the power flow calculation results under the condition of no distributed resources, and the calculation formula satisfies the following relationship: ; ; ;in, This represents the voltage calculation result of node i in the nth training set. and These represent the calculated active and reactive power results for branch j in the nth training set, respectively, where M represents the number of partitions. This represents the calculated bus voltage value of node i without distributed resources. 、 Let represent the calculated active and reactive power values of branch j without distributed resources, respectively. This represents the impact of the power flow calculation results of the nth training set partition m on the voltage of node i. 、 These represent the impact of the power flow calculation results of the nth training set partition m on the active and reactive power of branch j, respectively.
9. A power flow determination system for complex power systems, characterized in that, It includes a processor and a memory; the memory is used to store computer programs; the processor, when executing the program stored in the memory, implements the steps of the method described in any one of claims 1-8.
Citation Information
Patent Citations
Electric power system fully distributed partitioning power flow calculation method
CN107294104A
Power distribution network load flow calculation method based on model information assisted multi-agent
CN116191441A