A method for solving AC optimal power flow based on distributed machine learning

By employing a distributed machine learning-based AC optimal power flow method, the power system network is divided into multiple regions. The mapping relationship between feature variables and predictor variables in each region is independently trained using a DNN model. This solves the problems of high computational complexity and long training time in large-scale AC optimal power flow problems, and achieves efficient power system power balance and economical operation.

CN119341006BActive Publication Date: 2025-10-28深圳北航新兴产业技术研究院 +1
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently solve large-scale AC optimal power flow problems, especially in high-proportion renewable energy power systems. The high computational complexity and long training time negatively impact the stability and economy of the power system.

Method used

A distributed machine learning approach is adopted, which divides the power system network into multiple regions through a community detection algorithm. The mapping relationship between feature variables and predictor variables of each region is independently trained using a DNN model, and the zero-injection node is removed by combining the Kron simplification method, thereby realizing distributed learning and parallel training.

Benefits of technology

It improves the computational efficiency and training speed of AC optimal power flow problems, enabling real-time power balance in high-proportion renewable energy power systems and maintaining the stability and economical operation of the power system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119341006B_ABST
    Figure CN119341006B_ABST
Patent Text Reader

Abstract

This invention discloses a method for solving AC-OPF (Alternating Current Flow Optimization) problems based on distributed machine learning, comprising: establishing an AC-OPF model; modeling the power system network as a weighted graph based on complex network theory, and performing community partitioning on the weighted graph using the Louvain algorithm; dividing the power system network into multiple non-overlapping regions, and decomposing the feature variables and prediction variables in each region; independently training a DNN model for each region to learn the mapping relationship between the input feature vector and the output feature vector; using the trained DNN model to predict the voltage magnitude and angle of non-zero injection nodes in the region using the input feature vector, and obtaining the voltage magnitude and angle of all non-zero injection nodes by merging the prediction results of all DNN models. This invention can efficiently solve the AC-OPF problem, which is helpful for real-time power balance in high-proportion renewable energy power systems, maintaining the stability and economical operation of the power system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system technology, and in particular to a method for solving AC optimal power flow based on distributed machine learning. Background Technology

[0002] The AC Optimal Power Flow (AC-OPF) problem is a classic challenge in the field of power systems. Its goal is to optimize generation costs by adjusting controllable variables while satisfying all operational constraints. With the increasing proportion of renewable energy and power electronic equipment integrated into the grid, grid operating conditions will change more frequently, placing higher demands on the online and rapid solution of the AC-OPF problem to ensure the stability and cost-effectiveness of power system operation. However, due to its inherent nonlinearity and complex constraints, the AC-OPF problem has high computational complexity, posing a significant challenge to its efficient solution.

[0003] Existing AC-OPF optimization methods can be broadly categorized into traditional optimization methods and metaheuristic algorithms. Traditional optimization methods include linear programming, quadratic programming, gradient methods, Newton-Raphson methods, interior-point methods, etc. These methods typically provide accurate solutions, exhibiting good stability and interpretability, and are particularly suitable for small-scale systems and simple constraints. However, due to their high computational complexity and long iteration times, these methods may face challenges when dealing with large-scale systems. Metaheuristic methods, such as genetic algorithms, particle swarm optimization, and simulated annealing, possess advantages such as strong global search capabilities, good adaptability, and high robustness, making them suitable for complex problems and large-scale systems. However, metaheuristic algorithms such as simulated annealing and particle swarm optimization may face challenges in terms of solution optimality 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. Hybrid methods combine deep neural networks (DNNs) as auxiliary tools with traditional physics-based solvers to accelerate the optimization process. However, this approach still needs to solve constrained optimization problems, resulting in relatively slow computation speed. Independent methods can directly predict the optimal solution to 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, thus effectively reducing computation time. However, when dealing with large-scale systems, the training time for neural networks can be lengthy.

[0005] Therefore, how to provide a method for solving the optimal power flow problem based on distributed machine learning has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0006] In view of this, the purpose of this invention is to provide a method for solving AC-OPF problems based on distributed machine learning. By combining machine learning and community discovery algorithms, this method can efficiently solve the AC-OPF problem, which is helpful for real-time power balance in high-proportion renewable energy power systems and for maintaining the stability and economic operation of the power system.

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

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

[0009] S1, Establish the optimal power flow model for communication;

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

[0011] S3, Decompose the feature variables and predictor variables: The power system network is divided into multiple non-overlapping regions, and the feature variables and predictor variables in each region are decomposed.

[0012] S4, Distributed Machine Learning Method Based on Region Partitioning: For each region, an independent DNN model is trained 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 non-zero injection nodes in the region, and by merging the prediction results of all DNN models, the voltage amplitude and angle of all non-zero injection nodes are obtained.

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

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

[0015]

[0016] in, Represents the set of all nodes; Denotes the set of generator nodes; E represents the set of branches; P represents the set of generator nodes. gi C represents the active power of the generator at node i. i (P gi (i,j) represents the power generation cost; (i,j) represents the branch from node i to node j, G ij and B ij Let P represent the admittance and susceptance of branch (i,j), respectively; i and Qi Q represents the net injected active and reactive power; gi P di and Q di V represents the generator reactive power, load active power, and load reactive power at node i, respectively; i and θ i θ represents the voltage magnitude and voltage angle at node i, respectively; ij The voltage angle difference between node i and node j is represented by θ. ij =θ i -θ j ;P ij and Q ij Let i and j represent the active and reactive power of the branch (i,j), respectively. and x It represents the upper and lower bounds of a variable x; Let (i,j) represent the maximum apparent power flow of the branch; the optimization objective of the AC-OPF model is to minimize the total 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) can be expressed in Cartesian coordinates as follows:

[0018]

[0019] in, ZIBs are the set of 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 for dividing the weighted graph into communities using the Louvain algorithm 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 provides the maximum increase in modularity. Second, nodes with the same label are merged into a supernode to form a larger region. The above steps are iterated until no further improvement in modularity can be made.

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

[0023]

[0024] Where W represents the sum of all edge weights; A ijThese are the values ​​of vertices i and j in the adjacency matrix; s i and s j Let represent the strengths of vertices i and j, respectively, and let be their degree; when vertices i and j belong to the same region, i.e., c... i =c j At that time, δ(c) i ,c j The value of ) is 1, otherwise it is 0.

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

[0026] Suppose 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, This represents the set of nodes in region 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, Let ZIBs be the set of regions a.

[0032] In regions with balancing nodes, the voltage angle of the balancing nodes is set to zero, and it is then... Exclude from middle; output Further decomposed into voltage magnitude vector and voltage angle vector

[0033] Furthermore, in S4, the voltage magnitude of the zero-injection nodes ZIBs is calculated using the Kron simplification method. and angle Subsequently, 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 using the obtained left-side values. and auxiliary variables There is no need to solve the nonlinear power flow equations; for each node i: 1) if only generators or loads exist, directly obtain their predicted active and reactive power generation (i.e. and ) or active and reactive loads (i.e. and 1) If the generator and the load coexist, then... and Set to a given load value P di and Q di Then, calculate directly using equation (5). and In obtaining Then, the objective function is calculated using equation (1).

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

[0035]

[0036] in, and These represent the loss functions for voltage magnitude and angle in region a, respectively. and V represents the predicted voltage magnitude and angle of node i in region a, respectively; i and θ i represents the true voltage magnitude and angle 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 also included, which improves prediction performance through post-processing methods, as follows:

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

[0039]

[0040] in, This represents the output feature vector of the prediction process, containing the predicted voltage magnitude and angle. This 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; V and θ represent the voltage amplitude and angle, respectively; and x Let f represent the upper and lower bounds of a variable x; the inequality constraints (6)-(9) are expressed in compact form as equation (20), where f represents the inequality constraint vector and Y represents the output feature vector; for each inequality constraint fi (Y), equation error Δf i Defined as equation (21), the portion of each constraint exceeding the upper and lower limits is taken; the value of ΔY is adaptively adjusted using Δf through equation (19), and the adjusted value is... The value is kept within the limit to ensure voltage constraint.

[0043] Furthermore, S6's effectiveness was verified using a test case based on the IEEE 30-node standard test system, as follows:

[0044] Based on the Louvain algorithm, six types of power grid area divisions were obtained by using branch reactance, branch resistance, branch impedance, branch active power, branch reactive power, and branch apparent power as weights. Under each type of division, the same dataset containing 12,500 samples was used for DNN training and testing, with a training-to-test ratio of 80-20%. The optimal AC-OPF solution obtained by the IPOPT solver was used as the true value. The total load curve over 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. The performance of DeepOPF-D was evaluated.

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

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

[0047] This invention provides a method for solving AC optimal power flow problems based on distributed machine learning. It can perform distributed learning of the load-optimal solution mapping, which improves the computational and training efficiency of solving AC optimal power flow problems. This method is helpful for real-time power balance in high-proportion renewable energy power systems, and for maintaining the stability and economical operation of the power system. Attached Figure Description

[0048] Figure 1 This is a flowchart of the method of the present invention;

[0049] Figure 2 This is a schematic diagram of the 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 a weight in this invention;

[0051] Figure 4 This is a schematic diagram of the DeepOPF-D of the present invention;

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

[0053] Figure 6 For the present invention Q ij The intention of DeepOPF-D in dividing the power grid area as branch weights is to obtain the generation cost results. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, 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.

[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 the optimal power flow model for communication;

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

[0058]

[0059] in, Represents the set of all nodes; Denotes the set of generator nodes; E represents the set of branches; P represents the set of generator nodes. gi C represents the active power of the generator at node i. i (P gi (i,j) represents the power generation cost; (i,j) represents the branch from node i to node j, G ij and B ij Let P represent the admittance and susceptance of branch (i,j), respectively; i and Q i Q represents the net injected active and reactive power; gi P di and Q di V represents the generator reactive power, load active power, and load reactive power at node i, respectively; i and θ i θ represents the voltage magnitude and voltage angle at node i, respectively; ij The voltage angle difference between node i and node j is represented by θ.ij =θ i -θ j ;P ij and Q ij Let i and j represent the active and reactive power of the branch (i,j), respectively. and x It represents the upper and lower bounds of a variable x; Let (i,j) represent the maximum apparent power flow of the branch; the optimization objective of the AC-OPF model is to minimize the total 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 net injected power of the node; equation (6) is the active and reactive power constraints of the generator; 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) can be expressed in Cartesian coordinates as follows:

[0061]

[0062] in, ZIBs are the set of 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, Community-based power grid partitioning: Based on complex network theory, the power system network is modeled as a weighted graph, and the Louvain algorithm is used to partition the weighted graph into communities;

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

[0065]

[0066] Where W represents the sum of all edge weights; A ij These are the values ​​of vertices i and j in the adjacency matrix; s i and s j Let represent the strengths of vertex i and node j, respectively, and let be the node degree. When vertices i and j belong to the same region (i.e., c...),... i =cj When ), δ(c) i ,c j The value of ) is 1, otherwise it is 0.

[0067] The Louvain algorithm initializes each node as a separate region. First, as... 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 provides the maximum increase in modularity. Next, nodes with the same label are merged into a supernode, forming a larger region. These steps are iteratively calculated until no further improvement in modularity can be achieved. Figure 3 An example of the IEEE 30-node standard test system is shown, where the weights of the edges are set to the reactance of the branches.

[0068] S3, Decompose the feature variables and predictor variables: The power system network is divided into multiple non-overlapping regions, and the feature variables and predictor variables in each region are decomposed.

[0069] Without loss of generality, assume 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 represented as follows:

[0070]

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

[0072]

[0073] in, Let ZIBs be the set of regions a.

[0074] In regions with balancing nodes, the voltage angle of the balancing nodes is set to zero, and it is then... Exclude from the middle. Output It can be further decomposed into voltage magnitude vectors and voltage angle vector As shown in Equation (16). This decomposition enables distributed learning of the complex mapping relationship between load and non-ZIB voltage, and parallel training of the DNN model.

[0075] The reason for using the loads of the region and neighboring nodes as inputs is that, according to the power flow equations (2)-(5), the load at node i is... i and Qi The calculation is only related to the set and The nodes in G are related, while the remaining nodes are due to G. ij =0 and B ij =0, therefore it has no effect on the calculation at node i. Furthermore, this decomposition makes the load-optimal solution mapping smoother, thus making it easier to learn.

[0076] S4, Distributed Machine Learning Method Based on Region Partitioning: For each region, an independent DNN model is trained 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 non-zero injection nodes in the region, and by merging the prediction results of all DNN models, the voltage amplitude and angle of all non-zero injection nodes are obtained.

[0077] The schematic diagram of the proposed DeepOPF-D is as follows: Figure 4 As shown. The voltage magnitudes of zero-injection nodes ZIBs are calculated using the Kron simplified method. and angle Subsequently, 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 using the obtained left-side values. and auxiliary variables There is no need to solve nonlinear power flow equations; specifically, for each node i: 1) if only generators or loads exist, the predicted active and reactive power generation is directly obtained (i.e., and ) or active and reactive loads (i.e. and 1) If the generator and the load coexist, then... and Set to a given load value P di and Q di Then, calculate directly using equation (5). and In obtaining Then, the objective function is calculated using equation (1).

[0078] To improve training efficiency, the voltage amplitude and angle of each region are predicted separately, and the loss function is shown in the following formula:

[0079]

[0080] in, and These represent the loss functions for voltage magnitude and angle in region a, respectively. and V represents the predicted voltage magnitude and angle of node i in region a, respectively; i and θ i represents the true voltage magnitude and angle of node i in region a, respectively; the true values ​​are obtained by solving the AC-OPF problem using traditional solvers such as the 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 voltage of ZIBs is removed from the prediction variables by applying the Kron simplification method. Since there are usually a large number of ZIBs in the actual power system, the size 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 regions for distributed learning, which is the main improvement.

[0084] S5 improves prediction performance through post-processing methods, as follows:

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

[0086]

[0087] in, This represents the output feature vector of the prediction process, containing the predicted voltage magnitude and angle. This 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; V and θ represent the voltage amplitude and angle, respectively; and x Let f represent the upper and lower bounds of a variable x; the inequality constraints (6)-(9) are expressed in compact form as equation (20), where f represents the inequality constraint vector and Y represents the output feature vector; for each inequality constraint f i (Y), equation error Δfi Defined as equation (21), the portion of each constraint exceeding the upper and lower limits is taken; the value of ΔY is adaptively adjusted using Δf through equation (19), and the adjusted value is... The value is kept within the limit to ensure voltage constraint.

[0091] S6's effectiveness was verified using a computational example from the IEEE 30-node standard test system, as follows:

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

[0093] Each DNN model contains two hidden layers with 32 and 16 neurons respectively; the hidden layers use the ReLU (Rectified Linear Unit) activation function, and the output layer uses the 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 were used to evaluate the performance of DeepOPF-D:

[0095] 1) Optimality Loss: Evaluates the average relative deviation of DeepOPF-D from the optimal objective 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 constraints satisfied. This is achieved using... η V , and To represent P g Q g V represents the constraint satisfaction rate of branch power and branch angle.

[0097] 3) Load fulfillment rate: Used to assess the percentage of load fulfillment in a power system. and P d and Q d The 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 difference between the computation time of the IPOPT solver and the computation time t of DeepOPF-D. dnn The ratio η between sp .

[0100] The DeepOPF-D algorithm for optimal power flow based on distributed machine learning proposed in this invention is compared with different technical methods, including:

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

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

[0103] M2: Similar to DeepOPF-D, the only difference is that the features and predictor variables are randomly decomposed.

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

[0105] Due to the different dimensions of the input data, the neural network structure of DeepOPF-D may differ from the other three comparison methods, while other parameters remain the same for all comparison methods. The hidden layer structures of M1, M2, and M3 are 128-128 neurons, 32-16 neurons, and 8-8 neurons, respectively. 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 branch power is used as the branch weight for power system network area partitioning. However, the results for the X, R, and Z groups based on impedance parameters show higher optimality losses and lower generator reactive power constraint satisfaction rates and reactive load satisfaction rates. In the P group based on branch power partitioning... ij Q ij and S ij Of the three sets of results, especially in Q ijIn this study, the optimality loss is negligible (i.e., less than 0.39%). Furthermore, almost all load, generator, and branch power constraints are satisfied (i.e., greater than 99.7%).

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

[0110]

[0111] Table 2

[0112] Table 2 shows that DeepOPF-D performs better than M2 and M3 in terms of optimality loss, load satisfaction rate, and branch power constraint satisfaction rate. This indicates that reasonable and appropriate power system network 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 partitioning. Notably, as shown in the results for M3, the training time further decreases when the input and output dimensions are further reduced compared to the overall size. As the system size increases, the proportion of partition size to the overall power network size will further decrease, and the improvement in training efficiency is expected to become more significant. Furthermore, the computation time results in Table 2 show that DeepOPF-D significantly accelerates the solution speed of the AC-OPF problem compared to the IPOPT solver, with a three-order-of-magnitude improvement in computation speed.

[0113] This invention provides a method for solving AC optimal power flow problems based on distributed machine learning. It can perform distributed learning of the load-optimal solution mapping, which improves the computational and training efficiency of solving AC optimal power flow problems. This method is helpful for real-time power balance in high-proportion renewable energy power systems, and for maintaining the stability and economical 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, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate 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, Includes the following steps: S1, Establish the optimal power flow model for communication; S2, Community-based power grid partitioning: Based on complex network theory, the power system network is modeled as a weighted graph, and the Louvain algorithm is used to partition the weighted graph into communities; S3, Decompose the feature variables and predictor variables: The power system network is divided into multiple non-overlapping regions, and the feature variables and predictor variables in each region are decomposed. S4, Distributed Machine Learning Method Based on Region Partitioning: For each region, an independent DNN model is trained 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 non-zero injection nodes in the region, and by merging the prediction results of all DNN models, the voltage amplitude and angle of all non-zero injection nodes are obtained. In S2, the method for dividing the weighted graph into communities using the Louvain algorithm 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 provides the maximum increase in modularity. Second, nodes with the same label are merged into a supernode, forming a larger region. The above steps are iteratively calculated until no further improvement in modularity can be made. The effectiveness of the partitioning is evaluated using the modularity Q, calculated as follows: Where W represents the sum of all edge weights; A ij These are the values ​​of vertices i and j in the adjacency matrix; s i and s j Let represent the strengths of vertices i and j, respectively, and let be their degree; when vertices i and j belong to the same region, i.e., c... i =c j At that time, δ(c) i ,c j The value of ) is 1, otherwise it is 0.

2. The AC optimal power flow solution method based on distributed machine learning according to claim 1, characterized in that, In S1, the method for establishing the optimal power flow model is as follows: The standard AC-OPF model is adopted, as shown in equations (1)-(9): in, Represents the set of all nodes; Denotes the set of generator nodes; E represents the set of branches; P represents the set of generator nodes. gi C represents the active power of the generator at node i. i (P gi (i,j) represents the power generation cost; (i,j) represents the branch from node i to node j, G ij and B ij Let P represent the admittance and susceptance of branch (i,j), respectively; i and Q i Q represents the net injected active and reactive power; gi P di and Q di V represents the generator reactive power, load active power, and load reactive power at node i, respectively; i and θ i θ represents the voltage magnitude and voltage angle at node i, respectively; ij The voltage angle difference between node i and node j is represented by θ. ij =θ i -θ j ;P ij and Q ij Let i and j represent the active and reactive power of the branch (i,j), respectively. x and represent the upper and lower bounds of a variable x; Let (i,j) represent the maximum apparent power flow of the branch; the optimization objective of the AC-OPF model is to minimize the total 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) can be expressed in Cartesian coordinates as follows: in, ZIBs are the set of 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, characterized in that, In S3, the method for decomposing feature variables and predictor variables is as follows: Suppose 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, This represents the set of nodes in region a; Represents the set of neighboring nodes of region a; the output feature vector of region a It is expressed as follows: in, Let ZIBs be the set of regions a; In regions with balancing nodes, the voltage angle of the balancing nodes is set to zero, and it is then... Exclude from middle; output Further decomposed into voltage magnitude vector and voltage angle vector 4. The AC optimal power flow solution method based on distributed machine learning according to claim 3, characterized in that, In S4, the voltage magnitude of the zero-injection nodes ZIBs is calculated using the Kron simplified method. and angle Subsequently, 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 using the obtained left-side values. and auxiliary variables There is no need to solve the nonlinear power flow equations; for each node i: 1) if only generators or loads exist, directly obtain their predicted active and reactive power generation. and or active and reactive loads and 2) If the generator and load coexist, then... and Set to a given load value P di and Q di Then, calculate directly using equation (5). and In acquiring Then, the objective function is calculated using equation (1).

5. The AC optimal power flow solution method based on distributed machine learning according to claim 4, characterized in that, To improve training efficiency, the voltage amplitude and angle of each region are predicted separately, and the loss function is shown in the following formula: in, and These represent the loss functions for voltage magnitude and angle in region a, respectively. and V represents the predicted voltage magnitude and angle of node i in region a, respectively; i and θ i represents the true voltage magnitude and angle of node i in region a, respectively; the true values ​​are obtained by solving the AC-OPF problem using the IPOPT solver.

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

7. The AC optimal power flow solution method based on distributed machine learning according to claim 6, characterized in that, It also includes S6, whose effectiveness was verified through a test case of the IEEE 30-node standard test system, as follows: Based on the Louvain algorithm, six types of power grid area divisions were obtained by using branch reactance, branch resistance, branch impedance, branch active power, branch reactive power, and branch apparent power as weights. Under each type of division, the same dataset containing 12,500 samples was used for DNN training and testing, with a training-to-test ratio of 80-20%. The optimal AC-OPF solution obtained by the IPOPT solver was used as the true value. The total load curve over 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. The performance of DeepOPF-D was evaluated.

8. The AC optimal power flow solution method based on distributed machine learning according to claim 7, characterized in that, Each DNN model contains two hidden layers with 32 and 16 neurons respectively; the hidden layers use the ReLU activation function, and the output layer uses the Sigmoid activation function. 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