Alternating current optimal power flow solving method based on distributed machine learning

By applying distributed machine learning and community discovery algorithms in the power system, the independent training DNN model is used to predict voltage parameters to solve the problem of high -efficiency solution to the optimal trend of AC, and realize the stability and economic operation of the power system.

CN119341006AActive Publication Date: 2025-01-21深圳北航新兴产业技术研究院 +1

Patent Information

Application Number
CN202411167635.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-23
Publication Date
2025-01-21
Estimated Expiration
2044-08-23

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently solve the AC optimal current (AC-OPF) problem, especially in large-scale systems and rapidly changing power grid environments, resulting in high computational complexity and low solution efficiency.

Method used

Adopt a method based on distributed machine learning, divide the grid area through the community to discover algorithms, and independently train deep neural network (DNN) models in each region to learn the mapping relationship between the input characteristics and output features, and then predict the voltage amplitude and angle.

Benefits of technology

The calculation and training efficiency of the optimal trend of AC is improved, and the real -time power balance can be achieved in high -proportion new energy power systems, maintaining the stability and economic operation of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341006A_ABST
    Figure CN119341006A_ABST
Patent Text Reader

Abstract

The invention discloses an alternating current optimal power flow solving method based on distributed machine learning. The alternating current optimal power flow solving method comprises the following steps: establishing an alternating current optimal power flow model; the method comprises the following steps: modeling a power system network into a weighted graph based on a complex network theory, and performing community division on the weighted graph by using a Louvain algorithm; the method comprises the following steps: dividing a power system network into a plurality of non-overlapping regions, and decomposing a characteristic variable and a prediction variable in each region; for each region, independently training a DNN model so as to learn a mapping relation between an input feature vector and an output feature vector; and the trained DNN model uses an input feature vector to predict voltage amplitudes and angles of non-zero injection nodes in a region, and the voltage amplitudes and angles of all the non-zero injection nodes are obtained by combining prediction results of all the DNN models. The AC-OPF problem can be efficiently solved, real-time power balance of the high-proportion new energy power system is facilitated, and stable and economical operation of the power system is maintained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power systems, and in particular to an AC optimal power flow solving method based on distributed machine learning. Background Art

[0002] The AC Optimal Power Flow (AC-OPF) problem is a classic problem in the field of power systems. Its goal is to optimize the cost of power generation by adjusting the controllable variables while satisfying all operating constraints. With the increasing proportion of renewable energy and power electronic equipment connected to the power grid, the operating state of the power grid will change more frequently, which puts higher requirements on the online and fast solution of the AC-OPF problem to ensure the stability and cost-effectiveness of the power system operation. However, due to its inherent nonlinearity and complex constraints, the AC-OPF problem has high computational complexity, which brings severe challenges to the efficient solution of the AC-OPF problem.

[0003] Existing AC-OPF optimization solution methods can be roughly divided into traditional optimization methods and meta-heuristic algorithms. Traditional optimization methods include linear programming, quadratic programming, gradient method, Newton-Raphson method, interior point method, etc. These methods usually provide accurate solutions with good stability and interpretability, especially for small-scale systems and simple constraints. However, due to high computational complexity and long iteration time, these methods may face challenges when dealing with large-scale systems. Meta-heuristic methods, such as genetic algorithms, particle swarm optimization, and simulated annealing, have the advantages of strong global search capabilities, good adaptability, and high robustness, and are suitable for complex problems and large-scale systems. However, meta-heuristic algorithms such as simulated annealing and particle swarm optimization may face challenges in the optimality of solutions and parameter setting.

[0004] In recent years, machine learning methods have received increasing attention and can be mainly divided into hybrid methods and independent methods. The hybrid method combines deep neural networks (DNNs) as auxiliary tools and traditional solvers based on physical principles to accelerate the optimization solution process. However, this method still needs to solve restricted optimization problems, resulting in relatively slow calculation speed. Independent methods can directly predict the optimal solution of the AC-OPF problem, including methods combining Lagrangian methods with deep learning, physics-guided graph convolutional neural networks, or "prediction-reconstruction" methods. These methods do not rely on traditional iterative solution methods and can achieve end-to-end optimization, thereby effectively reducing the calculation time. However, when dealing with large-scale systems, the neural network training time may be long.

[0005] Therefore, how to provide an AC optimal power flow solution method based on distributed machine learning has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention

[0006] In view of this, the purpose of the present invention is to provide an AC optimal power flow solving method based on distributed machine learning, which combines machine learning and community discovery algorithm to efficiently solve the AC-OPF problem, help to achieve real-time power balance of high-proportion renewable energy power systems, and maintain stable and economical operation of the power system.

[0007] The present invention solves the technical problem by adopting the following technical solution:

[0008] A method for solving AC optimal power flow based on distributed machine learning includes the following steps:

[0009] S1, establish AC optimal power flow model;

[0010] S2, grid partitioning based on community discovery: Based on complex network theory, the power system network is modeled as a weighted graph, and the Louvain algorithm is used to perform community partition on the weighted graph;

[0011] S3, decomposition of characteristic variables and predictor variables: the power system network is divided into multiple non-overlapping areas, and the characteristic variables and predictor variables in each area are decomposed;

[0012] S4, distributed machine learning method based on regional division: For each region, a DNN model is trained independently to learn the mapping relationship between the input feature vector and the output feature vector; the trained DNN model uses the input feature vector to predict the voltage amplitude and angle of the non-zero injection nodes in the region, and the voltage amplitude and angle of all non-zero injection nodes are obtained by merging the prediction results of all DNN models.

[0013] Furthermore, in S1, the method for establishing the AC optimal power flow model is as follows:

[0014] The standard AC-OPF model is used, as shown in equations (1)-(9):

[0015]

[0016] in, Represents the set of all nodes; represents the generator node set; E represents the branch set; P gi represents the active power of the generator at node i, C i (P gi ) represents its power generation cost; (i,j) represents the branch from node i to node j, G ij and B ij Respectively represent the admittance and susceptance of branch (i, j); P i and Qi represents the net injected active and reactive power; Q gi , P di and Q di Respectively represent the generator reactive power, load active power and load reactive power of node i; V i and θ i Respectively represent the voltage amplitude and voltage angle of node i; θ ij Represents the voltage angle difference between node i and node j, that is, θ ij =θ i -θ j ;P ij and Q ij Respectively represent the active and reactive power of branch (i, j); and x Indicates the upper and lower bounds of a variable x; represents the maximum apparent power flow of branch (i, j); the optimization objective of the AC-OPF model is to minimize the total power generation cost in equation (1) while ensuring that all constraints in equations (2)-(9) are satisfied;

[0017] According to Kron's simplification principle, for zero injection nodes ZIBs, equations (2)-(5) are expressed in the form of Cartesian coordinates as follows:

[0018]

[0019] in, is the set of ZIBs considered as internal nodes in the Kron simplification method; according to equations (10)-(12), ZIBs are removed from the AC-OPF model of equations (1)-(9).

[0020] Furthermore, in S2, the method of using Louvain algorithm to divide the weighted graph into communities is as follows:

[0021] The Louvain algorithm initializes each node as a separate region; first, for each node in the network, the increase in modularity is calculated when the node is moved to an adjacent region; then, the node is moved to the adjacent region that can provide the maximum increase in modularity; second, nodes with the same label are merged into a super node to form a larger region; the above steps are iterated until the modularity cannot be further improved.

[0022] Furthermore, the modularity Q is used to evaluate the effectiveness of the partitioning. The calculation formula is as follows:

[0023]

[0024] Where W represents the sum of all edge weights; A ijis the value of vertices i and j in the adjacency matrix; s i and j Represents the strength of vertices i and j, which is the node degree; when vertices i and j belong to the same region, that is, c i =c j When δ(c i ,c j ) is 1 if the value is true or false, otherwise it is 0.

[0025] Furthermore, in S3, the method for decomposing the characteristic variables and the predictor variables is as follows:

[0026] Assume that a power system network is divided into k non-overlapping regions. For each region a, the input feature vector X a It is expressed as follows:

[0027]

[0028] in, represents the set of nodes in area a; Represents the set of neighboring nodes of region a; the output feature vector of region a It is expressed as follows:

[0029]

[0030]

[0031] in, is the set of ZIBs in region a.

[0032] In regions with balance nodes, set the voltage angle of the balance node to zero and change it from Exclude; Output Further decomposed into voltage magnitude vector and the voltage angle vector

[0033] Furthermore, in S4, the voltage amplitude of the zero injection node ZIBs is calculated using the Kron simplified method and angle Then, based on the predicted voltage and the provided load P d , Q d , calculate the left side of equation (5); then, directly calculate the remaining solution variables by using the obtained left side values and auxiliary variables No need to solve nonlinear power flow equations; for each node i: 1) If only a generator or load exists, directly obtain its predicted active and reactive power generation (i.e. and ) or active and reactive loads (i.e. and ); 2) If the generator and load coexist, and Set to a given load value P di and Q di , and then directly calculate through equation (5) and . In obtaining Then, the objective function is calculated using equation (1).

[0034] Furthermore, in order to improve the training efficiency, the voltage amplitude and angle of each region are predicted separately, and the loss function is shown as follows:

[0035]

[0036] in, and Represent the loss functions of voltage amplitude and angle in region a respectively; and Respectively represent the voltage amplitude and angle prediction value of node i in area a; V i and θ i They represent the voltage amplitude and angle true values ​​of node i in region a respectively; the true values ​​are obtained by solving the AC-OPF problem using the IPOPT solver.

[0037] Furthermore, S5 is included to improve the prediction performance by a post-processing method, as follows:

[0038] After checking the inequality constraints (6)-(9), if there is any constraint violation, the corresponding voltage magnitude and angle will be adjusted according to the following process:

[0039]

[0040] in, represents the output feature vector of the prediction process, including the predicted voltage amplitude and angle, represents the output feature vector after post-processing, and ΔY represents the correction amount, which is determined as follows:

[0041]

[0042] in, Indicates F Y The pseudo-inverse of ; V and θ represent the voltage amplitude and angle respectively; and x represents the upper and lower bounds of a variable x; the inequality constraints (6)-(9) are expressed in a compact form as equation (20), where f represents the inequality constraint vector and Y represents the output eigenvector; for each inequality constraint fi (Y), equation error Δf i Defined as formula (21), take the part of each constraint that exceeds the upper and lower limits; use Δf to adaptively adjust the value of ΔY through formula (19), and the adjusted The value of is kept within limits to ensure voltage constraints.

[0043] Furthermore, S6 is included, and the effectiveness is verified by an IEEE 30-node standard test system example, as follows:

[0044] Based on the Louvain algorithm, branch reactance, branch resistance, branch impedance, branch active power, branch reactive power and branch apparent power were used as weights to obtain six types of grid area division results; under each type of division, DNN training and testing used the same data set, containing 12,500 samples, with a training-test ratio of 80-20%; the AC-OPF optimal solution obtained by the IPOPT solver was taken as the true value; the total load curve within a certain period of time was normalized and then multiplied by the default load value of the standard test system to obtain the daily load data; and the performance of DeepOPF-D was evaluated.

[0045] Furthermore, each DNN model contains two hidden layers with 32 and 16 neurons respectively; the hidden layer uses the ReLU activation function, the output layer uses the Sigmoid activation function, and the maximum number of iterations, mini-batch size, and learning rate are set to 6000, 100, and 0.001, respectively.

[0046] The invention discloses a method for solving AC optimal power flow based on distributed machine learning, which has the following beneficial effects:

[0047] The present invention provides an AC optimal power flow solving method based on distributed machine learning, which can perform distributed learning on load-optimal solution mapping, improve the calculation and training efficiency of solving the AC optimal power flow problem, contribute to real-time power balance of a high-proportion new energy power system, and maintain the stability and economic operation of the power system. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a flow chart of the method of the present invention;

[0049] Figure 2 Schematic diagram of Louvain algorithm of the present invention;

[0050] Figure 3 This is a schematic diagram of the partitioning results of the IEEE 30-node standard test system using branch reactance as weights of the present invention;

[0051] Figure 4 Schematic diagram of DeepOPF-D of the present invention;

[0052] Figure 5 For the present invention Q ij Schematic diagram of the DeepOPF-D result for power grid area division as branch weights;

[0053] Figure 6 For the present invention Q ij The power generation cost results of DeepOPF-D using branch weights for grid area partitioning. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0055] refer to Figure 1 The present invention discloses a method for solving AC optimal power flow based on distributed machine learning, comprising the following steps:

[0056] S1, establish AC optimal power flow model;

[0057] The standard AC-OPF model is used, as shown in equations (1)-(9):

[0058]

[0059] in, Represents the set of all nodes; represents the generator node set; E represents the branch set; P gi represents the active power of the generator at node i, C i (P gi ) represents its power generation cost; (i,j) represents the branch from node i to node j, G ij and B ij Respectively represent the admittance and susceptance of branch (i, j); P i and Q i represents the net injected active and reactive power; Q gi , P di and Q di Respectively represent the generator reactive power, load active power and load reactive power of node i; V i and θ i Respectively represent the voltage amplitude and voltage angle of node i; θ ij Represents the voltage angle difference between node i and node j, that is, θij =θ i -θ j ;P ij and Q ij Respectively represent the active and reactive power of branch (i, j); and x Indicates the upper and lower bounds of a variable x; represents the maximum apparent power flow of branch (i, j); the optimization objective of the AC-OPF model is to minimize the total power generation cost in equation (1) while ensuring that all constraints in equations (2)-(9) are satisfied; the branch power is given by equations (2)-(3); equation (4) is Kirchhoff's circuit law; equation (5) is the node net injected power; equation (6) is the generator active and reactive power constraints; equation (7) is the voltage amplitude constraint; equations (8)-(9) are the voltage angle and branch power constraints, respectively.

[0060] According to Kron's simplification principle, for zero injection nodes ZIBs, equations (2)-(5) are expressed in the form of Cartesian coordinates as follows:

[0061]

[0062] in, is the set of ZIBs considered as internal nodes in the Kron simplification method; according to equations (10)-(12), ZIBs are removed from the AC-OPF model of equations (1)-(9).

[0063] S2, grid partitioning based on community discovery: Based on complex network theory, the power system network is modeled as a weighted graph, and the Louvain algorithm is used to perform community partition on the weighted graph;

[0064] Based on complex network theory, the power system network can be modeled as a weighted graph. Each node in the network is modeled as a vertex in the graph, and the branch is modeled as an edge in the graph, which can be represented as a graph G(V,E), where V and E represent the set of vertices and edges, respectively. The weight of the edge is usually set to the impedance or reactance of the branch. Then, the Louvain algorithm is used to divide the weighted graph into communities. The modularity Q is usually used to evaluate the effectiveness of the division, and the calculation formula is as follows:

[0065]

[0066] Where W represents the sum of all edge weights; A ij is the value of vertices i and j in the adjacency matrix; s i and j Represents the strength of vertex i and node j, which is the node degree. When vertices i and j belong to the same region (i.e., c i =cj ), δ(c i ,c j ) is 1 if the value is true or false, otherwise it is 0.

[0067] The Louvain algorithm initializes each node as a separate region. First, Figure 2 As shown, for each node in the network, the increase in modularity is calculated when the node is moved to an adjacent region. Then, the node is moved to the adjacent region that can provide the maximum increase in modularity. Secondly, nodes with the same label are merged into a super node to form a larger region. The above steps are iterated until the modularity cannot be further improved. Figure 3 An example of an IEEE 30-node standard test system is shown, where the weights of the edges are set to the reactance of the branches.

[0068] S3, decomposition of characteristic variables and predictor variables: the power system network is divided into multiple non-overlapping areas, and the characteristic variables and predictor variables in each area are decomposed;

[0069] Without loss of generality, we assume that a power system network can be divided into k non-overlapping regions. For each region a, the input feature vector X a It can be expressed as follows:

[0070]

[0071] in, represents the set of nodes in area a; Represents the set of neighboring nodes of region a. The output feature vector of region a It can be expressed as follows:

[0072]

[0073] in, is the set of ZIBs in region a.

[0074] In regions with balance nodes, set the voltage angle of the balance node to zero and change it from Excluded from output It can be further decomposed into the voltage magnitude vector and the voltage angle vector As shown in formula (16), this decomposition can realize distributed learning of the complex mapping relationship between load and non-ZIB voltage and realize parallel training of DNN model.

[0075] The reason why the loads in the region and the neighboring nodes are used as input is that according to the power flow equations (2)-(5), P at node i is i and Qi The calculation is only with the set and The remaining nodes are related to the nodes in G ij =0 and B ij = 0, so it has no effect on the calculation at node i. In addition, this decomposition can make the load-optimal solution mapping smoother and easier to learn.

[0076] S4, distributed machine learning method based on regional division: For each region, a DNN model is trained independently to learn the mapping relationship between the input feature vector and the output feature vector; the trained DNN model uses the input feature vector to predict the voltage amplitude and angle of the non-zero injection nodes in the region, and the voltage amplitude and angle of all non-zero injection nodes are obtained by merging the prediction results of all DNN models.

[0077] The schematic diagram of the proposed DeepOPF-D is shown in Figure 4 The voltage amplitude of the zero injection node ZIBs is calculated using the Kron simplified method. and angle ; Then, based on the predicted voltage and the provided load P d , Q d , calculate the left side of equation (5); then, directly calculate the remaining solution variables by using the obtained left side values and auxiliary variables , no need to solve the nonlinear power flow equation; specifically, for each node i: 1) If only a generator or load exists, directly obtain its predicted active and reactive power generation (i.e. and ) or active and reactive loads (i.e. and ); 2) If the generator and load coexist, and Set to a given load value P di and Q di , and then directly calculate through equation (5) and . In obtaining Then, the objective function is calculated using equation (1).

[0078] In order to improve the training efficiency, the voltage amplitude and angle of each region are predicted separately, and the loss function is shown as follows:

[0079]

[0080] in, and Represent the loss functions of voltage amplitude and angle in region a respectively; and Respectively represent the voltage amplitude and angle prediction value of node i in area a; V i and θ i They represent the voltage amplitude and angle true values ​​of node i in region a respectively; the true values ​​are obtained by solving the AC-OPF problem using traditional solvers such as IPOPT (Interior Point Optimizer) solver.

[0081] DeepOPF-D is based on the existing method DeepOPF-V. Compared with DeepOPF-V, DeepOPF-D has made the following two key improvements:

[0082] 1) As shown in equations (10)-(12), the Kron simplification method is applied to remove the voltage of ZIBs from the prediction variables. Since there are usually a large number of ZIBs in the actual power system, the scale of the DNN model can be greatly reduced.

[0083] 2) Based on complex network theory, the power system network is modeled as a weighted graph and divided into smaller areas for distributed learning, which is the main improvement.

[0084] S5, improve the prediction performance through post-processing method, the method is as follows:

[0085] In order to enhance the feasibility of the predicted solution, a post-processing method is adopted. After checking the inequality constraints (6)-(9), if there is any constraint violation, the corresponding voltage amplitude and angle will be adjusted according to the following process:

[0086]

[0087] in, represents the output feature vector of the prediction process, including the predicted voltage amplitude and angle, represents the output feature vector after post-processing, and ΔY represents the correction amount, which is determined as follows:

[0088]

[0089]

[0090] in, Indicates F Y The pseudo-inverse of ; V and θ represent the voltage amplitude and angle respectively; and x represents the upper and lower bounds of a variable x; the inequality constraints (6)-(9) are expressed in a compact form as equation (20), where f represents the inequality constraint vector and Y represents the output eigenvector; for each inequality constraint f i (Y), equation error Δfi Defined as formula (21), take the part of each constraint that exceeds the upper and lower limits; use Δf to adaptively adjust the value of ΔY through formula (19), and the adjusted The value of is kept within limits to ensure voltage constraints.

[0091] S6, the effectiveness is verified by the IEEE 30-node standard test system example, the method is as follows:

[0092] Based on the Louvain algorithm, branch reactance, branch resistance, branch impedance, branch active power, branch reactive power and branch apparent power were used as weights to obtain six types of grid area division results; under each type of division, DNN training and testing used the same data set, containing 12,500 samples, with a training-test ratio of 80-20%; the AC-OPF optimal solution obtained by the IPOPT solver was taken as the true value; the total load curve of the Power Administration within a certain period of time was normalized and then multiplied by the default load value of the standard test system to obtain the daily load data; and the performance of DeepOPF-D was evaluated.

[0093] Each DNN model contains two hidden layers with 32 and 16 neurons respectively. The hidden layer uses ReLU (Rectified Linear Unit) activation function, and the output layer uses Sigmoid activation function. The maximum number of iterations, mini-batch size, and learning rate are set to 6000, 100, and 0.001, respectively.

[0094] The following metrics are used to evaluate the performance of DeepOPF-D:

[0095] 1) Optimality loss: evaluates the average relative deviation of DeepOPF-D from the optimal target obtained by the IPOPT solver, denoted as η opt .

[0096] 2) Constraint satisfaction rate: The effectiveness of DeepOPF-D is evaluated by measuring the percentage of constraint satisfaction. η V , and To represent P g , Q g , V, constraint satisfaction rate of branch power and branch angle.

[0097] 3) Load satisfaction rate: used to evaluate the percentage of load satisfaction in the power system. and Respectively represent P d and Q d satisfaction rate.

[0098] 4) Training time: represents the longest time consumed by the DNN model during parallel training, denoted as t train .

[0099] 5) Speedup ratio: represents the computation time of IPOPT solver and DeepOPF-D. dnn The ratio η sp .

[0100] The AC optimal power flow algorithm DeepOPF-D based on distributed machine learning proposed in the present invention is compared with different technical methods, wherein the compared technical methods include:

[0101] M0: DeepOPF-D, an AC optimal power flow algorithm based on distributed machine learning proposed in this invention;

[0102] M1: DeepOPF-V in [9] is modified using Korn simplification method for fair comparison. The input of the DNN model is the load of all nodes, and the output is the voltage amplitude and angle of all non-ZIBs.

[0103] M2: Similar to DeepOPF-D, the only difference is the random decomposition of features and predictors.

[0104] M3: Similar to DeepOPF-D, the only difference is that each node is considered as a separate region.

[0105] Due to the different dimensions of the input data, the neural network structure of DeepOPF-D may be different from the other three compared methods, while other parameters remain the same for all compared methods. The hidden layer structures of M1, M2, and M3 are 128-128 neurons, 32-16 neurons, and 8-8 neurons, respectively. In order to ensure the reliability of the experimental results, all experiments were repeated three times to obtain the average performance. Table 1 shows the simulation results of DeepOPF-D under different types of branch weights.

[0106]

[0107] Table 1

[0108] The results in Table 1 show that DeepOPF-D performs best when the branch power is used as the branch weight for power system network area partitioning. However, the results of the three groups X, R, and Z based on impedance parameter partitioning show higher optimality loss, lower generator reactive power constraint satisfaction rate and reactive load satisfaction rate. ij , Q ij and S ij Among the three groups of results, especially in Q ijIn the above analysis, the optimality loss is negligible (i.e., less than 0.39%). In addition, almost all load, generator constraints, and branch power constraints are satisfied (i.e., greater than 99.7%).

[0109] Figure 5 and Figure 6 The predicted solutions and true values ​​of DeepOPF-D in the IEEE 30-node system are shown, including 10 samples randomly selected from the test dataset. Figure 5 (a) and Figure 5 (b) Taking node 13 and node 2 as examples, it can be observed that the predicted values ​​of load and generator power are very close to the true values. Figure 6 It shows the approximation between the predicted target and the actual value. Table 2 shows the comparison of simulation results of different technical methods.

[0110]

[0111] Table 2

[0112] Table 2 shows that DeepOPF-D performs better in terms of optimality loss, load satisfaction rate, and branch power constraint satisfaction rate compared to M2 and M3. This indicates that reasonable and appropriate power system network area partitioning can improve the performance of DNN models. Compared with M1, a 4.8% reduction in training time can be observed. This is due to the smaller input and output dimensions after the partitioning. It is worth noting that, as shown in the results of M3, when the input and output dimensions are further reduced compared to the overall scale, the training time is also further reduced. As the system scale increases, the ratio of the partition size relative to the overall power network scale will further decrease, and the improvement in training efficiency is expected to become more obvious. In addition, the computational time results in Table 2 show that DeepOPF-D significantly accelerates the solution of the AC-OPF problem compared to the IPOPT solver, with the computational speed increased by three orders of magnitude.

[0113] The present invention provides an AC optimal power flow solving method based on distributed machine learning, which can perform distributed learning on load-optimal solution mapping, improve the calculation and training efficiency of solving the AC optimal power flow problem, contribute to real-time power balance of a high-proportion new energy power system, and maintain the stability and economic operation of the power system.

[0114] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for solving AC optimal power flow based on distributed machine learning, characterized in that: The steps include: S1, establish AC optimal power flow model; S2, grid partitioning based on community discovery: Based on complex network theory, the power system network is modeled as a weighted graph, and the Louvain algorithm is used to perform community partition on the weighted graph; S3, decomposition of characteristic variables and predictor variables: the power system network is divided into multiple non-overlapping areas, and the characteristic variables and predictor variables in each area are decomposed; S4, distributed machine learning method based on regional division: For each region, a DNN model is trained independently to learn the mapping relationship between the input feature vector and the output feature vector; the trained DNN model uses the input feature vector to predict the voltage amplitude and angle of the non-zero injection nodes in the region, and the voltage amplitude and angle of all non-zero injection nodes are obtained by merging the prediction results of all DNN models.

2. The AC optimal power flow solution method based on distributed machine learning according to claim 1 is characterized in that: In S1, the method of establishing the AC optimal power flow model is as follows: The standard AC-OPF model is used, as shown in equations (1)-(9): in, Represents the set of all nodes; represents the generator node set; E represents the branch set; P gi represents the active power of the generator at node i, C i (P gi ) represents its power generation cost; (i,j) represents the branch from node i to node j, G ij and B ij Respectively represent the admittance and susceptance of branch (i, j); P i and Q i represents the net injected active and reactive power; Q gi , P di and Q di Respectively represent the generator reactive power, load active power and load reactive power of node i; V i and θ i Respectively represent the voltage amplitude and voltage angle of node i; θ ij Represents the voltage angle difference between node i and node j, that is, θ ij =θ i -θ j ;P ij and Q ij Respectively represent the active and reactive power of branch (i, j); and x represent the upper and lower bounds of a variable x; represents the maximum apparent power flow of branch (i, j); the optimization objective of the AC-OPF model is to minimize the total power generation cost in equation (1) while ensuring that all constraints in equations (2)-(9) are satisfied; According to Kron's simplification principle, for zero injection nodes ZIBs, equations (2)-(5) are expressed in the form of Cartesian coordinates as follows: in, is the set of ZIBs considered as internal nodes in the Kron simplification method; according to equations (10)-(12), ZIBs are removed from the AC-OPF model of equations (1)-(9).

3. The AC optimal power flow solution method based on distributed machine learning according to claim 2 is characterized in that: In S2, the method of using Louvain algorithm to divide the weighted graph into communities is as follows: The Louvain algorithm initializes each node as a separate region; first, for each node in the network, the increase in modularity is calculated when the node is moved to an adjacent region; then, the node is moved to the adjacent region that can provide the maximum increase in modularity; second, nodes with the same label are merged into a super node to form a larger region; the above steps are iterated until the modularity cannot be further improved.

4. The method for solving AC optimal power flow based on distributed machine learning according to claim 3 is characterized in that: The modularity Q is used to evaluate the effectiveness of the partitioning. The calculation formula is as follows: Where W represents the sum of all edge weights; A ij is the value of vertices i and j in the adjacency matrix; s i and j Represents the strength of vertices i and j, which is the node degree; when vertices i and j belong to the same region, that is, c i =c j When δ(c i ,c j ) is 1 if the value is true or false, otherwise it is 0.

5. The method for solving AC optimal power flow based on distributed machine learning according to claim 4 is characterized in that: In S3, the method for decomposing feature variables and predictor variables is as follows: Assume that a power system network is divided into k non-overlapping regions. For each region a, the input feature vector X a It is expressed as follows: in, represents the set of nodes in area a; Represents the set of neighboring nodes of region a; the output feature vector of region a It is expressed as follows: in, is the set of ZIBs in region a; In regions with balance nodes, set the voltage angle of the balance node to zero and change it from Exclude; Output Further decomposed into voltage magnitude vector and the voltage angle vector 6. The method for solving AC optimal power flow based on distributed machine learning according to claim 5, characterized in that: In S4, the voltage amplitude of the zero injection node ZIBs is calculated using the Kron simplified method. and angle Then, based on the predicted voltage and the provided load P d , Q d , calculate the left side of equation (5); then, directly calculate the remaining solution variables by using the obtained left side values and auxiliary variables No need to solve nonlinear power flow equations; for each node i: 1) If only a generator or load exists, directly obtain its predicted active and reactive power generation (i.e. and ) or active and reactive loads (i.e. and ); 2) If the generator and load coexist, and Set to a given load value P di and Q di , and then directly calculate through equation (5) and In getting Then, the objective function is calculated using equation (1).

7. The method for solving AC optimal power flow based on distributed machine learning according to claim 6, characterized in that: In order to improve the training efficiency, the voltage amplitude and angle of each region are predicted separately, and the loss function is shown as follows: in, and Represent the loss functions of voltage amplitude and angle in region a respectively; and Respectively represent the voltage amplitude and angle prediction value of node i in area a; V i and θ i They represent the voltage amplitude and angle true values ​​of node i in region a respectively; the true values ​​are obtained by solving the AC-OPF problem using the IPOPT solver.

8. The method for solving AC optimal power flow based on distributed machine learning according to claim 7, characterized in that: It also includes S5, which improves the prediction performance through post-processing methods as follows: After checking the inequality constraints (6)-(9), if there is any constraint violation, the corresponding voltage magnitude and angle will be adjusted according to the following process: in, represents the output feature vector of the prediction process, including the predicted voltage amplitude and angle, represents the output feature vector after post-processing, and ΔY represents the correction amount, which is determined as follows: in, Indicates F Y The pseudo-inverse of ; V and θ represent the voltage amplitude and angle respectively; and x represents the upper and lower bounds of a variable x; the inequality constraints (6)-(9) are expressed in a compact form as equation (20), where f represents the inequality constraint vector and Y represents the output eigenvector; for each inequality constraint f i (Y), equation error Δf i Defined as formula (21), take the part of each constraint that exceeds the upper and lower limits; use Δf to adaptively adjust the value of ΔY through formula (19), and the adjusted The value of is kept within limits to ensure voltage constraints.

9. The method for solving AC optimal power flow based on distributed machine learning according to claim 8, characterized in that: It also includes S6, and verifies the effectiveness through the IEEE 30-node standard test system example, as follows: Based on the Louvain algorithm, branch reactance, branch resistance, branch impedance, branch active power, branch reactive power and branch apparent power were used as weights to obtain six types of grid area division results; under each type of division, DNN training and testing used the same data set, containing 12,500 samples, with a training-test ratio of 80-20%; the AC-OPF optimal solution obtained by the IPOPT solver was taken as the true value; the total load curve within a certain period of time was normalized and then multiplied by the default load value of the standard test system to obtain the daily load data; and the performance of DeepOPF-D was evaluated.

10. The AC optimal power flow solution method based on distributed machine learning according to claim 9, characterized in that: Each DNN model contains two hidden layers with 32 and 16 neurons respectively; the hidden layer uses the ReLU activation function, the output layer uses the Sigmoid activation function, and the maximum number of iterations, mini-batch size, and learning rate are set to 6000, 100, and 0.001, respectively.

Citation Information

Patent Citations

  • Power system state estimating method for taking zero injection measurement equality constraint into consideration

    CN102185308A

  • Convex distributed optimal power flow solving method for power system

    CN112072668A

  • Method for correcting alternating current power flow based on model information assisted deep learning

    CN114336632A

  • Toughness improvement-oriented distributed energy storage system multi-objective optimization configuration method

    CN115882479A

  • Large-scale software defined network performance prediction method

    CN116132310A

Cited By

  • Deep learning optimal power flow solution vector correction method considering feasible region

    CN119921336A

  • Distributed alternating current optimal power flow solving method based on multi-branch neural network

    CN120150147A