A Distributed Optimal Power Flow Solution Based on Multi-Branch Neural Networks
By using a distributed AC optimal power flow solution method based on multi-branch neural networks, the problems of high computational complexity and poor model expressiveness in existing technologies are solved, achieving efficient and accurate power system optimization and stability improvement.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-24
- Publication Date
- 2026-03-10
AI Technical Summary
Existing technologies suffer from high computational complexity, numerous local optima, and poor model expressiveness and generalization ability when dealing with high-dimensional or complex AC optimal power flow problems. In particular, they involve long training times and high optimization difficulty in large-scale power systems.
A multi-branch neural network is used to solve the optimal power flow problem in distributed AC circuits. The network modules are identified by dividing the power grid into regions and using the Louvain algorithm. A multi-branch DNN model is established, and the network size is reduced by using the Kron simplification method. The loss function and variable decomposition strategy are optimized by combining physical information, and the mapping relationship between input features and output features is trained.
It improves training efficiency and solution accuracy, enhances model flexibility and robustness, and is better able to handle complex power system optimization tasks, reduce power generation costs, and improve system operating efficiency and stability.
Smart Images

Figure CN120150147B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system optimization technology, and in particular to a distributed AC optimal power flow solution method based on a multi-branch neural network. Background Technology
[0002] AC Optimal Power Flow (AC-OPF) is a core problem in power system optimization. Its goal is to optimize system operation while meeting power demand and grid constraints, such as minimizing generation costs or achieving other objective functions. AC-OPF improves economy, reliability, and sustainability by comprehensively considering the physical characteristics of the power system, such as voltage, power factor, and network impedance. With the increasing proportion of renewable energy, AC-OPF is crucial for efficient management of power supply and demand, optimized resource allocation, and reduced operating costs, while also ensuring the stability and security of the power system.
[0003] Traditional AC-OPF solution methods are mostly based on mathematical models or metaheuristic algorithms, but these methods often face local optima or high computational complexity when dealing with high-dimensional or complex problems. To address these challenges, machine learning methods have gradually emerged in AC-OPF in recent years, demonstrating significant potential. Machine learning-based solutions can be mainly divided into hybrid methods and independent methods. Hybrid methods typically use deep learning models to assist traditional physics solvers, thereby accelerating the optimization process, such as predicting hot start points, simplifying constraints, or accelerating iterations. However, these methods still require solving power flow equations, limiting computational speed. In contrast, independent methods directly predict the optimal power flow solution through end-to-end learning, significantly improving computational efficiency and solving constraint problems through a "prediction-reconstruction" framework. However, their models are usually large-scale, resulting in long training times and high optimization difficulty when dealing with large-scale power systems. Furthermore, the aforementioned solution methods are all based on single-branch neural networks, which suffer from high non-convexity of the optimization process and poor model expressiveness and generalization ability.
[0004] Therefore, how to provide a distributed AC optimal power flow solution based on multi-branch neural networks has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a distributed AC optimal power flow solution method based on multi-branch neural networks, which can effectively reduce the network size, improve training efficiency, and enhance the accuracy of the solution. Furthermore, its flexibility and robustness make it more capable of handling future complex power system optimization tasks.
[0006] The present invention solves the technical problem by adopting the following technical solution:
[0007] A method for solving distributed AC optimal power flow based on multi-branch neural networks includes the following steps:
[0008] S1, Establish the optimal power flow model for communication;
[0009] S2, Power Grid Regional Division: Based on complex network theory, the power system is modeled as a weighted graph G(V,E), where V and E represent the set of nodes and edges, respectively. In this model, each node in the power system corresponds to a vertex of the graph, while branches are represented as edges in the graph, and the weight of the edge reflects the impedance or reactance of the branch. Subsequently, the Louvain algorithm is used to perform community division on this weighted graph to identify different network modules.
[0010] S3, a distributed machine learning method based on multi-branch neural networks: A multi-branch DNN model is trained on the entire power system, where sub-networks correspond to the divided regions, allowing for arbitrary architecture, depth, and continuous activation functions; in extreme cases, when a sub-network is selected as a single neuron, the multi-branch structure simplifies to a single-hidden-layer neural network; this model is used to learn the mapping relationship between input and output features; the trained DNN model uses input features to provide predicted voltages for non-zero injected nodes within a region; the voltages of ZIBs are calculated using the Kron simplification method; subsequently, based on the voltages of ZIBs and the provided load, predicted active and reactive load values are obtained, and demand load is obtained through the predicted load values.
[0011] In step S1, the method for establishing the optimal power flow model is as follows:
[0012]
[0013] in, Represents the set of all nodes; E represents the set of generating nodes; E represents the set of branches; P represents the set of generating nodes. gi C represents the active power generation of node i. i (P gi (i, j) represents its cost; (i, j) represents the branch from node i to node j, G ij and B ij P represents admittance and susceptance, respectively; i and Q i Indicates net active and reactive power injection; Q gi P di and Q di These represent reactive power generation, active load, and reactive load, respectively; V i and θ i These represent the voltage amplitude and phase angle, respectively; θ ij Representing the angular difference, by θij =θ i -θ j Calculation yielded; P ij Q ij and S ij These represent the active, reactive, and apparent power of branch (i,j), respectively. and x It represents the upper and lower bounds of a variable x;
[0014] By using the Kron simplification method, as shown in equations (10)-(12), equations (2)-(5) are expressed in Cartesian coordinates, thereby removing ZIBs from the AC-OPF model, as follows:
[0015]
[0016]
[0017] in, It is the set of ZIBs that are considered internal nodes in Kron simplification.
[0018] Furthermore, in step S2, the evaluation of the effectiveness of power grid area division depends on the modularity Q, which is calculated using the following formula:
[0019]
[0020] 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 The value of j) is 1, otherwise it is 0.
[0021] Furthermore, in step S2, the method for dividing this weighted graph into communities using the Louvain algorithm is as follows:
[0022] Treating each node as an independent region, first, calculate the increment of modularity when each node moves to an adjacent region, and select the region with the largest gain; then, nodes with the same label are merged into a super node to form a larger region; this process is iterated until the modularity can no longer be improved.
[0023] Furthermore, in step S3, the model is used to learn the input features X and the output features Y. α The mapping relationship between them is represented by the input feature vector X as follows:
[0024]
[0025] in, Represents the set of all nodes in the power grid;
[0026] Output feature Y α It is expressed as follows:
[0027]
[0028] in, The output of the subnetwork corresponding to each region a, Let be the set of all nodes in region a. Let ZIBs be the set of ZIBs in region a; V and θ are the nodal voltage magnitude and angle, respectively. In regions with slack nodes, the voltage angle of the slack nodes is set to zero, and it is removed from... Excluded from the middle; w and b are the scaling and offset coefficient matrices, respectively.
[0029] Furthermore, in step S3, the trained DNN model uses the input features X a To provide the predicted voltage of the non-zero injection node Calculate the voltage of ZIBs using the Kron simplified method. Subsequently, based on 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, then directly obtain their predicted active and reactive power generation, i.e. and Or the predicted active and reactive loads, i.e. 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).
[0030] Furthermore, the training loss function is shown in the following equation:
[0031]
[0032] Where, k obj and kd It is a positive number. It is the target loss in (1). It was designed to find feasible solutions that satisfy the inequality constraints (6)-(9), while Designed to meet the required load;
[0033] The penalty for violating the rules during training is shown as follows:
[0034]
[0035] Where, k g , and k z These are positive constants, calculated from the loss function value; and These are penalties for violations of constraints on power generation, branch flow, branch angle, and ZIBs voltage amplitude during training.
[0036]
[0037]
[0038] in, Here The active and reactive power of the branch are derived from the predicted voltage; It is the demand load (P) d Q d ) and forecast load The penalty for deviation between them is expressed as follows:
[0039]
[0040] Furthermore, it also includes S4, which improves prediction performance through post-processing:
[0041] 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:
[0042]
[0043] 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:
[0044]
[0045] in, F represents YThe 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 (26), 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 (27), the portion of each constraint exceeding the upper and lower limits is taken; the value of ΔY is adaptively adjusted using Δf through equation (25), and the adjusted value is... The value is kept within the limit to ensure voltage constraint.
[0046] Furthermore, S5 is also included, and the effectiveness of the invention is verified through a computational example using the IEEE 30-node standard test system:
[0047] First, based on the Louvain algorithm, the system is divided into corresponding partitions using branch reactive power as weights; the dataset used for DNN learning contains 1000 samples and is divided according to a training-test ratio of 80-20%; the optimal solution considered as the benchmark is calculated using the solver IPOPT and used as the true value of the benchmark; the total load curve over a certain period of time is normalized to obtain daily load data, and the performance of DeepOPF-MB is evaluated.
[0048] Furthermore, the hidden layers of the DNN model use the modified linear unit activation function, while the output layer uses the sigmoid activation function.
[0049] The present invention discloses a distributed AC optimal power flow solution method based on a multi-branch neural network, which has the following beneficial effects:
[0050] This invention proposes a distributed AC optimal power flow solution based on multi-branch neural networks. Utilizing multi-branch neural networks helps to better capture the complexity and nonlinear relationships of the system, improving optimization performance, reducing power generation costs, and increasing system operating efficiency. Secondly, this method enhances the system's constraint satisfaction rate, better handles load and branch constraints, and improves system stability and security. Through practical examples demonstrating accurate predictions of load, generator power, and power generation costs, this technical solution is expected to improve the accuracy and reliability of system decision-making and operation. Attached Figure Description
[0051] Figure 1 This is a flowchart of the method of the present invention;
[0052] Figure 2 This is an example diagram of the region division of the IEEE 9-node system of the present invention;
[0053] Figure 3 This is a schematic diagram of the DeepOPF-MB of the present invention;
[0054] Figure 4 This is a comparison chart of the results of DeepOPF-MB of the present invention;
[0055] Figure 5 This is a comparison chart of the predicted power generation cost and the actual power generation cost of this invention. Detailed Implementation
[0056] 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.
[0057] To further enhance the expressive power and solution efficiency of the model, this invention introduces a multi-branch neural network to solve practical engineering problems. This multi-branch design has the following significant advantages: First, compared with traditional single-branch neural networks, multi-branch neural networks exhibit lower non-convexity during optimization, which helps accelerate convergence and improve final performance. Second, multi-branch neural networks allow parallel processing of different features, enabling the network to independently learn diverse feature representations in each branch, thereby enhancing the model's expressive power and generalization ability. This characteristic not only reduces the risk of overfitting but also makes the model more adaptable to complex datasets. Furthermore, multi-branch neural networks are highly scalable; the model capacity can be increased by adding branches without significantly modifying the overall structure, thus flexibly adapting to different task requirements. Finally, because each branch processes features independently, multi-branch neural networks exhibit stronger robustness when dealing with noise or missing data. This invention, by combining physical information to optimize the loss function or designing variable decomposition strategies, can effectively reduce network size, improve training efficiency, and enhance solution accuracy. Its flexibility and robustness make it more capable of handling future complex power system optimization tasks.
[0058] refer to Figure 1 The present invention discloses a distributed AC optimal power flow solution based on a multi-branch neural network, comprising the following steps:
[0059] S1, Establish the optimal power flow model for communication;
[0060] The AC-OPF model is an important mathematical framework for optimizing power allocation in AC power grids. This model aims to effectively coordinate power generation, transmission, and distribution while considering various constraints and objectives such as cost minimization and system reliability. It describes strategies for achieving optimal power dispatch under the premise of satisfying grid constraints, covering key aspects such as power balance, network constraints, and generator output limitations, providing a theoretical foundation for efficient power system management and decision-making. The method for establishing the AC optimal power flow model is as follows:
[0061]
[0062] in, Represents the set of all nodes; E represents the set of generating nodes; E represents the set of branches; P represents the set of generating nodes. gi C represents the active power generation of node i. i (P gi (i, j) represents its cost; (i, j) represents the branch from node i to node j, G ij and B ij P represents admittance and susceptance, respectively; i and Q i Indicates net active and reactive power injection; Q gi P di and Q di These represent reactive power generation, active load, and reactive load, respectively; V i and θ i These represent the voltage amplitude and phase angle, respectively; θ ij Representing the angular difference, by θ ij =θ i -θ j Calculation yielded; P ij Q ij and S ij These represent the active, reactive, and apparent power of branch (i,j), respectively. and x The upper and lower bounds of a certain variable x are represented; the AC-OPF model minimizes the total generation cost in equation (1) while ensuring that all constraints in equations (2)-(9) are met; the branch power flow is given by equations (2)-(3); Kirchhoff's circuit laws are enforced by equation (4); the net power injection is given by equation (5), while equation (6) enforces active and reactive power generation limits, equation (7) guarantees voltage amplitude limits, and equations (8)-(9) limit voltage phase angle and branch flow respectively;
[0063] Since real power systems typically contain a large number of zero-injection buses (ZIBs), removing the voltages of ZIBs from the prediction can significantly reduce the size of the DNN model. Using the Kron simplification method, as shown in equations (10)-(12), equations (2)-(5) can be expressed in Cartesian coordinates, thus removing ZIBs from the AC-OPF model, as follows:
[0064]
[0065] in, It is the set of ZIBs that are considered internal nodes in Kron simplification.
[0066] S2, Power Grid Regional Division: Based on complex network theory, the power system is modeled as a weighted graph G(V,E), where V and E represent the sets of nodes and edges, respectively. In this model, each node in the power system corresponds to a vertex in the graph, while branches are represented as edges, with the edge weight reflecting the branch's impedance or reactance. Subsequently, the Louvain algorithm is used to perform community partitioning on this weighted graph to identify different network modules. The evaluation of the power grid regional division effect depends on the modularity Q, which is calculated as follows:
[0067]
[0068] 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.
[0069] The method for dividing this weighted graph into communities using the Louvain algorithm is as follows:
[0070] Treating each node as an independent region, first, calculate the increment of modularity when each node moves to an adjacent region, and select the region with the largest gain; then, nodes with the same label are merged into a super node to form a larger region; this process is iterated until the modularity can no longer be improved. Figure 2 This is an example of partitioning an IEEE 9-node system.
[0071] S3, Distributed Machine Learning Method Based on Multi-Branch Neural Networks: A schematic diagram of the proposed DeepOPF-MB is shown below. Figure 3As shown, by using the power network partitioning method in S2, the entire system can be divided into multiple regions. A multi-branch DNN model is trained on the entire power system, where the sub-networks correspond to the partitioned regions, allowing for arbitrary architectures, depths, and continuous activation functions; in the extreme case, when a sub-network is chosen as a single neuron, the multi-branch structure simplifies to a single-hidden-layer neural network; this model is used to learn the input features X and output features Y. α The mapping relationship between them; the trained DNN model uses input features to provide the predicted voltage of non-zero injected nodes in the region; the voltage of ZIBs is calculated using the Kron simplification method; then, based on the voltage of ZIBs and the provided load, the predicted active and reactive load values are obtained, and the demand load is obtained through the predicted load values.
[0072] Use this model to learn the input features X and the output features Y α The mapping relationship between them is represented by the input feature vector X as follows:
[0073]
[0074] in, Represents the set of all nodes in the power grid;
[0075] Output feature Y α It is expressed as follows:
[0076]
[0077] in, The output of the subnetwork corresponding to each region a, Let be the set of all nodes in region a. Let ZIBs be the set of ZIBs in region a; V and θ are the nodal voltage magnitude and angle, respectively. In regions with slack nodes, the voltage angle of the slack nodes is set to zero, and it is removed from... Excluded from the middle; w and b are the scaling and offset coefficient matrices, respectively.
[0078] The trained DNN model uses the input feature X a To provide the predicted voltage of the non-zero injection node Calculate the voltage of ZIBs using the Kron simplified method. Subsequently, based on 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, then directly obtain their predicted active and reactive power generation, i.e. and Or the predicted active and reactive loads, i.e. 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).
[0079] The training loss function is shown in the following equation:
[0080]
[0081] Among them, K obj and k d It is a positive number. It is the target loss in (1). It was designed to find feasible solutions that satisfy the inequality constraints (6)-(9), while Designed to meet the required load; Kirchhoff's circuit laws in equation (4) are automatically satisfied because the net power injection can always be calculated using the predicted node voltage. Specifically, The penalty for violating the rules during training is shown as follows:
[0082]
[0083] Where, k g , and k z These are positive constants, calculated from the loss function value; and These are penalties for violations of constraints on power generation, branch flow, branch angle, and ZIBs voltage amplitude during training.
[0084]
[0085]
[0086] in, Here The active and reactive power of the branch are derived from the predicted voltage; It is the demand load (P) d Q d ) and forecast load The penalty for deviation between them is expressed as follows:
[0087]
[0088] The invention also includes S4, which improves prediction performance through post-processing:
[0089] 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:
[0090]
[0091] 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:
[0092]
[0093] 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 (26), 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 (27), the portion of each constraint exceeding the upper and lower limits is taken; the value of ΔY is adaptively adjusted using Δf through equation (25), and the adjusted value is... The value is kept within the limit to ensure voltage constraint.
[0094] This invention also includes S5, which verifies the effectiveness of the invention through a computational example using the IEEE 30-node standard test system:
[0095] First, based on the Louvain algorithm, the system is divided into corresponding partitions using branch reactive power as weights. The dataset used for DNN learning contains 1000 samples, divided according to an 80-20% training-to-test ratio. This invention uses the solver IPOPT to compute the optimal solution considered as the baseline, which serves as the true value of the baseline. Load data was generated by scaling the default load using the normalized daily total load curve from the Bonneville Electricity Authority between 6:00 AM and 12:00 PM on August 2, 2016. This resulted in a high load variation rate exceeding 40%, validating the effectiveness of the proposed method in handling systems with significant load variations.
[0096] The following metrics were used to evaluate the performance of DeepOPF-MB:
[0097] 1) Optimality Loss: Evaluates the average relative deviation of DeepOPF-MB from the optimal objective obtained by the IPOPT solver. The deviation is denoted as η. opt .
[0098] 2) Constraint Satisfaction Rate: The effectiveness of DeepOPF-MB 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.
[0099] 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.
[0100] 4) Training time: This represents the time consumed by the DNN model during training, denoted as t. train .
[0101] The multi-branch neural network distributed machine learning method for solving the AC optimal power flow problem proposed in this invention is compared with different technical methods, including:
[0102] M0: DeepOPF-MB, a distributed AC optimal power flow solution method based on multi-branch neural networks, is proposed in this invention.
[0103] M1: Similar to DeepOPF-MB, the only difference is that the neural network used is a single-branch neural network.
[0104] M2: Similar to DeepOPF-MB, the only difference is the random decomposition of features and predictor variables.
[0105] The DNN model uses a modified linear unit activation function (MRJ) in the hidden layers and a sigmoid activation function in the output layer. The maximum number of iterations and the mini-batch size are set to 6000 and 50, respectively. The learning rate for all three methods is 0.0001, and the penalty term coefficient k in the objective function is... obj Set it to 0.0001, and the hidden layer parameter is 32-32.
[0106] Table 1 shows a comparison of simulation results for different technical methods.
[0107]
[0108] Table 1
[0109] Table 1 shows that in the IEEE 30-node system, DeepOPF-MB performs better than M1 in terms of optimality loss, load satisfaction rate, and branch constraint satisfaction rate. Meanwhile, the training time of DeepOPF-MB is reduced by 11.7% compared to M1. This indicates that multi-branch neural networks exhibit greater flexibility and modeling capabilities in DeepOPF-MB, helping to more accurately capture system complexity and nonlinear relationships. This allows DeepOPF-MB to optimize the system more effectively, improving optimality loss and constraint satisfaction rate. Its advantages are also reflected in better handling of system load and branch constraints, exhibiting stronger adaptability to more effectively adjust the system to meet various constraints. Compared to M2, DeepOPF-MB performs significantly better in terms of optimality loss, indicating that reasonable and appropriate power network partitioning can improve the performance of DNN models.
[0110] Figure 4 The image shows the predicted solutions and actual values of DeepOPF-MB in the IEEE 30-node system, including 10 samples randomly selected from the test dataset. Figure 4 (a) and Figure 4 In (b), taking the load of node 12 and the power of node 4 as examples, it was observed that the predicted values of load and generator power were extremely close to the actual values, with significant accuracy. Figure 5 The results demonstrate the high degree of approximation between the predicted target and the actual value, with the predicted generation cost showing a high degree of consistency with the actual generation cost, highlighting the model's reliability. These results collectively demonstrate the potential advantages and practical value of DeepOPF-MB in power system forecasting and optimization, and show significant application prospects.
[0111] This invention proposes a distributed AC optimal power flow solution based on multi-branch neural networks. Utilizing multi-branch neural networks helps to better capture the complexity and nonlinear relationships of the system, improving optimization performance, reducing generation costs, and increasing system operating efficiency. Secondly, this method can enhance the system's constraint satisfaction rate, better handle load and branch constraints, and improve system stability and security. Through practical examples demonstrating accurate predictions in load, generator power, and generation costs, this technical solution is expected to improve the accuracy and reliability of system decision-making and operation. In summary, the proposed technical solution may bring higher efficiency, reliability, and flexibility to power system optimization and management, providing important technical support and innovative ideas for the future development of power systems.
[0112] 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 distributed AC optimal power flow solving method based on a multi-branch neural network, characterized in that, Comprising the following steps: S1, establishing an alternating current optimal power flow model; S2, power grid region division: based on complex network theory, the power system is modeled as a weighted graph G(V, E), where V and E represent the set of nodes and edges, respectively; in this model, each node in the power system corresponds to a vertex of the graph, while the branches are represented as edges in the graph, and the weight of the edge reflects the impedance or reactance of the branch; then, the Louvain algorithm is used to divide the community of this weighted graph to identify different network modules; S3, distributed machine learning method based on multi-branch neural network: a multi-branch DNN model is trained for the entire power system, where the subnetworks correspond to the divided regions, allowing for any architecture, depth, and continuous activation function; in the extreme case, when the subnetwork is a single neuron, the multi-branch structure is simplified to a single hidden layer neural network; the model is used to learn the mapping relationship between input features and output features; the trained DNN model uses input features to provide predicted voltages for non-zero injection nodes within the region; the Kron reduction method is used to calculate the voltages of ZIBs; then, based on the voltages of ZIBs and the provided load, the predicted active and reactive load values are obtained, and the demand load is obtained through the predicted load values; In step S2, the evaluation of the effect of power grid region division depends on the modularity Q, whose 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 s j represent the strength of vertices i and j, respectively, which is the node degree; when vertices i and j belong to the same region, i.e., c i = c j , the value of δ(c i , c j ) is 1, otherwise 0; In step S2, the method of using the Louvain algorithm to divide the community of this weighted graph is as follows: Each node is considered as an independent region, first, the increment of modularity when each node moves to the adjacent region is calculated, and the region with the maximum gain is selected; then, nodes with the same label are merged into a super node to form a larger region; this process is iterated until the modularity cannot be further improved; In step S3, the model is used to learn a mapping relationship between the input feature X and the output feature Y α The input feature vector X is represented as follows: wherein denotes the set of all nodes in the grid; Output feature Y α is represented as follows: wherein, is the output of the subnetwork corresponding to each region a, is the set of all nodes in region a, is the set of ZIBs in region a; V and Θ are the voltage magnitude and angle of the nodes, respectively, in which the voltage angle of the balancing node is set to zero and it is excluded from ; w and b are the scaling and offset coefficient matrices, respectively.
2. The distributed AC optimal power flow solving method based on a multi-branch neural network according to claim 1, characterized in that, In step S1, the method of establishing an alternating current optimal power flow model is as follows: where N denotes the set of all nodes; G denotes the set of generation nodes; E denotes the set of branches; P gi P Gi denotes the active power generation at node i, C i (P gi ) denotes its cost; (i, j) denotes a branch from node i to node j, G ij and B ij denote the admittance and susceptance, respectively; P i and Q i denote the net active and reactive injection; Q gi , P di and Q di denote the reactive generation, active and reactive load, respectively; V i and θ i denote the voltage magnitude and phase angle, respectively; θ ij denotes the angle difference, calculated as θ ij = θ i - θ j ; P ij , Q ij and S ij denote the active, reactive and apparent power of branch (i, j); and x denote the upper and lower bounds of some variable x; From the Kron reduction method, as shown in equations (10)-(12), equations (2)-(5) are expressed in the Cartesian coordinate system, thereby removing ZIBs from the AC-OPF model, as follows: wherein, is a set of ZIBs that are considered as internal nodes in Kron reduction.
3. The distributed AC optimal power flow solving method based on multi-branch neural network according to claim 2, characterized in that, In step S3, the trained DNN model uses the input features X a to provide the predicted voltage of the non-zero injection nodes The Kron reduction method is used to calculate the voltage of ZIBs Subsequently, based on and the provided load P d , Q d , the left side of equation (5) is calculated; then by using the obtained left side value, the remaining solution variables and auxiliary variables are directly calculated and or the predicted active and reactive load, i.e. and 2) If both generators and loads exist, set and to the given load values P di and Q di , then directly calculate and After obtaining , the objective function is calculated using equation (1).
4. The distributed AC optimal power flow solving method based on a multi-branch neural network according to claim 3, characterized in that, The loss function of the training is as follows: where k obj and k d are normal numbers, is the target loss in (1), is designed to find a feasible solution that satisfies the inequality constraints (6)-(9), while is designed to meet the required load; is the penalty for violating the constraints in training, represented as follows: where k g , and k z are normal numbers, calculated from the loss function value; and are the penalty terms for the violation of the power generation, branch flow, branch angle, and ZIBs voltage amplitude constraints during training, respectively. where Here is the branch active and reactive power derived from the forecast voltage; is the penalty term for the deviation between the demand load (P d , Q d ) and the forecast load is given by:
5. The distributed AC optimal power flow solving method based on multi-branch neural network according to claim 4, characterized in that, It also includes S4, improving the prediction performance through post-processing: 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: wherein represents the output feature vector of the prediction process, comprising the predicted voltage amplitude and angle, represents the post-processed output feature vector, ΔY represents the correction quantity, which is determined as follows: where represents F Y represents the pseudo-inverse; 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 (26), where f represents the inequality constraint vector, Y represents the output feature vector; for each inequality constraint f i (Y), the equation error Δf i is defined as (27), taking the portion of each constraint that exceeds the upper and lower bounds; the value of ΔY is adjusted adaptively using (25) by Δf, and the adjusted value is kept within the limit range to ensure the voltage constraint.
6. The distributed AC optimal power flow solving method based on a multi-branch neural network according to claim 5, wherein, It also includes S5, verifying the effectiveness through the IEEE 30-node standard test system example: First, based on the Louvain algorithm, the system is divided into corresponding partitions using the branch reactive power as the weight; the data set used for DNN learning contains 1000 samples, which are divided according to an 80-20% training-test ratio; the solver IPOPT is used to calculate the optimal solution considered as the benchmark, as the true value of the benchmark; the total load curve within a certain time is normalized to obtain the daily load data, and the performance of DeepOPF-MB is evaluated.
7. The distributed AC optimal power flow solving method based on a multi-branch neural network according to claim 6, characterized in that, The hidden layer of the DNN model uses a rectified linear unit activation function, and the output layer uses a Sigmoid activation function.
Citation Information
Patent Citations
A method for quickly estimate that voltage of distribution network station area
CN109217305A
Power distribution network traveling wave fault positioning method and device
CN112444704A