Optimal power flow solving method and device assisted by global attention graph neural network
Through the global attention graph neural network assisted method, the generator set point prediction model and redundancy constraint recognition model are constructed, which solves the problem of difficulty in using topological information in the optimal current problem of power system, and realizes rapid solution and efficient calculation when the operating conditions of the power grid are changed.
Patent Information
- Application Number
- CN202411937196.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2044-12-26
AI Technical Summary
When solving the optimal current problem of power system, it is difficult to effectively utilize grid topology information, resulting in the need for retraining when the grid operating conditions change, which increases calculation time and cost.
A global attention graph neural network assisted by optimal current solution method is proposed. By constructing a generator set point prediction model and redundant constraint recognition model with global attention, combining the graph neural network and self-attention mechanism, predicting generator set points and constraint dual variables, and identifying redundant constraints through dual variables, simplifying constraints, and achieving rapid solution to OPF problems.
By introducing a global attention mechanism, the model can be quickly applied in the new topological scenario with only a small number of parameters required to train, which improves computational adaptability and efficiency, and reduces training complexity and computational cost.
Smart Images

Figure CN119740488A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power system optimization and dispatching, and in particular to a method and device for solving optimal power flow assisted by a global attention graph neural network. Background Art
[0002] The optimal power flow problem (OPF) is a typical problem in power system optimization and dispatching, and is a key link in ensuring the efficient operation of the power system. With the continuous advancement of the construction of new power systems and the continuous increase in the penetration rate of renewable energy, the system structure and characteristic mechanism have undergone major changes, and the model-driven method based on expert experience is unsustainable. In recent years, with the rapid development of artificial intelligence technology, optimization solutions driven by data and models have attracted more and more attention from scholars at home and abroad.
[0003] The OPF problem is essentially a non-convex optimization problem. As the scale of the power system continues to expand and the flexibility resources continue to increase, the OPF problem often has the characteristics of huge scale, high-dimensional decision variables, and complex safety mechanisms. The traditional numerical solution method takes a long time to calculate and cannot meet the requirements of online applications. Therefore, it is necessary to accelerate the algorithm solution based on artificial intelligence technology.
[0004] At present, deep neural networks (DNNs) and convolutional neural networks (CNNs) are widely used in OPF calculations. However, these methods often directly fit the input and output of the OPF problem and fail to consider the grid topology. When the grid operating conditions change, the neural network needs to be retrained offline on a large scale, which greatly increases the time and computing cost. For data-driven methods that directly use graph neural networks (GNNs), since each node can only aggregate the features of neighboring nodes, it is difficult to fit the OPF problem with strong globality, and the prediction accuracy of the optimal solution to the problem is poor. Summary of the invention
[0005] The present application aims to solve one of the technical problems in the related art at least to some extent.
[0006] To this end, the purpose of this application is to propose an optimal power flow solving method and device assisted by a global attention graph neural network, to construct a generator set point prediction model and a redundant constraint identification model with global attention, to input the power system topology and node load structure into the model to obtain the predicted solution of the OPF problem and the predicted value of the dual variable, and then to use a mathematical solver to solve the OPF problem and initialize the primal variable and the dual variable with the predicted solution of the primal problem and the dual problem, and to remove redundant constraints based on the dual variables, thereby achieving accelerated solution of the OPF problem.
[0007] To achieve the above objectives, the first embodiment of the present application proposes a global attention graph neural network-assisted optimal power flow solution method, including:
[0008] Constructing the optimal power flow mathematical model;
[0009] Based on the optimal power flow model, construct an original variable prediction training data set D1;
[0010] Based on the optimal power flow model, construct a redundant constraint identification training data set D2;
[0011] Based on the original variable prediction training dataset D1 and the graph neural network, a generator set point prediction model M1 with global attention is constructed;
[0012] Based on the redundant constraint identification training data set D2 and the graph neural network, a redundant constraint identification model M2 with global attention is constructed;
[0013] Based on the load data of the actual power system, the generator set point prediction model M1 and the redundant constraint identification model M2 are used to predict the generator set point and the constraint dual variable respectively, and the redundant constraints are identified based on the constraint dual variable. After the optimal power flow problem is initialized and the constraints are simplified, the optimal power flow calculation is completed.
[0014] Optionally, the optimal power flow mathematical model includes:
[0015] Objective function:
[0016]
[0017] Constraints:
[0018]
[0019] In the formula, N is the set of all nodes; G is the set of generator nodes; E is the set of transmission lines; cost is the cost of generator power generation; is the active power from node i to node j; is the reactive power from node i to node j; v i is the voltage amplitude at node i, v i Represent their maximum and minimum values respectively; θ i is the voltage intersection of node i; is the active power output of the generator at node i, p i g Represent their maximum and minimum values respectively; is the reactive power output of the generator at node i, q i g Represent their maximum and minimum values respectively; is the active load of node i; is the reactive load of node i; is the maximum phase angle difference between node i and node j; is the active power flowing from node i to node j; is the reactive power flowing from node i to node j; is the maximum apparent power of the transmission line between nodes i and j.
[0020] Optionally, based on the optimal power flow model, constructing an original variable prediction training data set D1 includes:
[0021] During the first training, based on the historical operation data of the power grid or the public data set, m power grids with different topologies are extracted, and the load information under each topology is sampled. K load samples are generated according to the probability distribution as the input of the training set, with a total of m×k samples; the optimal power flow mathematical model is solved based on the interior point method, and the generator set point is obtained as the label. The training set generated under the i-th topology in the generator set point prediction training set is recorded as
[0022] If there is a trained generator set point prediction model M1, the grid load information under a given topology is sampled and k samples are generated according to the probability distribution; the optimal power flow mathematical model is solved for all samples based on the interior point method to obtain the generator set point as a label.
[0023] Optionally, based on the optimal power flow model, a redundant constraint identification training data set D2 includes:
[0024] During the first training, based on the historical operation data of the power grid or the public data set, m power grids with different topologies are extracted, and the load information under each topology is sampled. K load samples are generated according to the probability distribution as the input of the training set, with a total of m×k samples; the optimal power flow mathematical model is solved based on the interior point method, and each constraint dual variable is obtained as a label. The training set generated under the i-th topology in the redundant constraint identification training set is recorded as
[0025] If there is a trained redundant constraint identification model M2, the grid load information under a given topology is sampled and k samples are generated according to the probability distribution; the optimal power flow mathematical model is solved for all samples based on the interior point method to obtain each constraint dual variable as a label.
[0026] Optionally, based on the original variable prediction training dataset D1 and the graph neural network, a generator set point prediction model M1 with global attention is constructed, including:
[0027] Determine whether there is a generator set point prediction model M1 with trained parameters;
[0028] If it does not exist, the nodes and lines in the power system are used as nodes and edges of the graph to construct the graph structure. in, Representation diagram, Represent the node set and edge set respectively, and the node features are The edge feature is e ij =exp(-k log|z ij |), where k is a hyperparameter and z ij is the impedance of the line between nodes i and j;
[0029] Using a linear layer as an embedding layer of the generator set point prediction model M1 to map the input node features and edge features to a high-dimensional vector space, the output dimension of the embedding layer being an adjustable hyperparameter;
[0030] Connecting the embedding layer to a plurality of graph attention layers or graph convolutional layers, wherein the input dimension of the graph attention layer or graph convolutional layer is the same as that of the linear layer, and the output dimension is a specifiable hyperparameter;
[0031] An attention layer is connected after the graph attention layer or graph convolution layer, the input dimension of the attention layer is consistent with the output dimension of the previous layer, and the number of attention heads is a specifiable hyperparameter when multi-head attention is used;
[0032] After the attention layer, a fully connected network is constructed for each generator node according to the number of nodes in the power system. The output result of each fully connected network corresponds to the set point prediction value of each generator node. Each of the fully connected networks consists of a linear layer and a ReLU layer, and an activation function ReLU is constructed. bounded As the output layer of the fully connected network, the formula is:
[0033]
[0034] in, x are the maximum and minimum values of x respectively;
[0035] Based on the original variable prediction training data set D1, m corresponding network layers are constructed for m power system topologies in the data set, and m groups of training sets are trained in turn; After training, in the training set Continue training the parameters of the embedding layer, graph neural network layer, and attention layer of the generator set point prediction model M1, and retrain the fully connected network layer corresponding to the current topology;
[0036] The loss function of the generator set point prediction model M1 is set to:
[0037]
[0038] Among them, Loss mseis the mean square error loss function, for the predicted value and label y, Loss Pbalance is the power balance penalty term, in is the sum of the predicted active power values of the i-th sample generator, PD i is the sum of the load powers of the ith sample.
[0039] Optionally, also include:
[0040] If there is a parameter-trained generator set point prediction model M1, determine whether the power grid topology in the optimal power flow problem to be solved exists in the training set D1;
[0041] If it exists, the generator set point prediction model M1 will not be retrained; if it does not exist, the parameters of the embedding layer, graph neural network layer and attention layer will be frozen, and only the parameters of the fully connected network layer will be trained.
[0042] Optionally, based on the redundant constraint identification training data set D2 and the graph neural network, a redundant constraint identification model M2 with global attention is constructed, including:
[0043] Determine whether there is a redundant constraint identification model M2 that has been trained with parameters;
[0044] If it does not exist, the nodes and lines in the power system are used as nodes and edges of the graph to construct the graph structure. in, Representation diagram, Represent the node set and edge set respectively, and the node features are The edge feature is e ij =exp(-klog|z ij |), where k is a hyperparameter and z ij is the impedance of the line between nodes i and j;
[0045] Using a linear layer as an embedding layer of the redundant constraint identification model M2, mapping the input node features and edge features to a high-dimensional vector space, the output dimension of the embedding layer is an adjustable hyperparameter;
[0046] Connecting the embedding layer to a plurality of graph attention layers or graph convolutional layers, wherein the input dimension of the graph attention layer or graph convolutional layer is the same as that of the linear layer, and the output dimension is a specifiable hyperparameter;
[0047] An attention layer is connected after the graph attention layer or graph convolution layer, the input dimension of the attention layer is consistent with the output dimension of the previous layer, and the number of attention heads is a specifiable hyperparameter when multi-head attention is used;
[0048] The high-dimensional features processed by the attention layer are input into a fully connected network, the output result of which is a dual variable of each constraint. The fully connected network is composed of a linear layer and a ReLU layer, and the predicted value of each dual variable outputted by the fully connected network is used to determine whether the corresponding constraint is redundant;
[0049] Based on the redundant constraint identification training data set D2, m corresponding network layers are constructed for m power system topologies in the data set, and m groups of training sets are trained in turn; After training, in the training set The parameters of the embedding layer, graph neural network layer and attention layer of the redundant constraint identification model M2 are continued to be trained, and the fully connected network layer corresponding to the current topology is retrained.
[0050] Optionally, also include:
[0051] If there is a redundant constraint identification model M2 that has been trained with parameters, it is determined whether the power grid topology structure in the optimal power flow problem to be solved exists in the training set D2;
[0052] If it exists, the redundant constraint identification model M2 will not be retrained; if it does not exist, the parameters of the embedding layer, graph neural network layer and attention layer will be frozen, and only the parameters of the fully connected network layer will be trained.
[0053] Optionally, based on the load data of the actual power system, the generator set point prediction model M1 and the redundant constraint identification model M2 are used to respectively predict the generator set point and the constraint dual variable, and redundant constraints are identified based on the constraint dual variable, and the optimal power flow problem is initialized and the constraints are simplified to complete the optimal power flow calculation, including:
[0054] Sampling actual power system load data, inputting the sampled data into the generator set point prediction model M1 and the redundant constraint identification model M2, and obtaining the generator set point prediction value and each constraint dual variable prediction value of the optimal power flow problem;
[0055] Inputting the constructed optimal power flow mathematical model into a mathematical solver;
[0056] Initialize the solution of the optimal power flow problem using the generator set point prediction value; For the dual variable prediction value of the i-th constraint Initialize the corresponding dual variable λ in the optimal power flow problem i , and specify the critical value ∈ to determine whether there is If yes, the i-th constraint is considered redundant and removed from the optimal power flow problem;
[0057] A mathematical solver is used to solve the initialized and simplified optimal power flow problem to complete the optimal power flow calculation.
[0058] To achieve the above-mentioned purpose, the second embodiment of the present application proposes a global attention graph neural network-assisted optimal power flow solving device, comprising:
[0059] Optimal power flow mathematical model building module, used to build the optimal power flow mathematical model;
[0060] A data set construction module, used to construct an original variable prediction training data set D1 and a redundant constraint identification training data set D2 respectively based on the optimal power flow model;
[0061] A generator set point prediction model building module, used to build a generator set point prediction model M1 with global attention based on the original variable prediction training data set D1 and the graph neural network;
[0062] A redundant constraint identification model construction module, used to construct a redundant constraint identification model M2 with global attention based on the redundant constraint identification training data set D2 and the graph neural network;
[0063] The solution module is used to predict the generator set point and constraint dual variables respectively based on the load data of the actual power system using the generator set point prediction model M1 and the redundant constraint identification model M2, and identify redundant constraints based on the constraint dual variables, initialize the optimal power flow problem and simplify the constraints to complete the optimal power flow calculation.
[0064] To achieve the above-mentioned purpose, the third aspect of the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;
[0065] The memory stores computer-executable instructions;
[0066] The processor executes the computer-executable instructions stored in the memory to implement the method as described in any one of the first aspects.
[0067] To achieve the above-mentioned purpose, the fourth aspect embodiment of the present application proposes a computer-readable storage medium, in which computer-readable storage medium is stored computer execution instructions, and when the computer execution instructions are executed by a processor, they are used to implement the method as described in any one of the first aspects.
[0068] To achieve the above-mentioned purpose, the fifth aspect of the present application proposes a computer program product, which implements any method in the first aspect when executed by a processor.
[0069] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:
[0070] The method of the present application collects the load information of the power system as the input of the deep neural network, combines the graph convolution layer or the graph attention layer and the self-attention mechanism, incorporates the power system topology into the forward propagation process, enables each node to aggregate global information with weights, and then passes the mapping result through the fully connected layer to construct the generator set point prediction model and the redundant constraint identification model. Finally, in the actual power system, by collecting the load information and inputting it into the deep neural network, the generator set point prediction value and the optimal power flow (OPF) constraint dual variable prediction value are obtained. On the one hand, the method simultaneously initializes the original variable and the dual variable of the OPF problem; on the other hand, redundant constraints are identified through the dual variable prediction value, and the hot start mathematical solver is combined to accelerate the solution of the OPF problem. The method of the present application introduces the attention mechanism in the graph neural network, so that it can be quickly applied in the new topology scenario by training only a small number of parameters, and improves the computational adaptability of the method while ensuring the solution speed.
[0071] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0073] Figure 1 A schematic diagram of a flow chart of an optimal power flow solution method assisted by a global attention graph neural network provided in an embodiment of the present application;
[0074] Figure 2 A schematic diagram of a flow chart of an optimal power flow solution method assisted by a global attention graph neural network provided in an embodiment of the present application;
[0075] Figure 3 A schematic diagram of the structure of an optimal power flow solving device assisted by a global attention graph neural network provided in an embodiment of the present application. DETAILED DESCRIPTION
[0076] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0077] In view of the problems existing in the prior art, the present invention provides a method for solving optimal power flow assisted by a global attention graph neural network. Figure 1 and Figure 2All of them are flow charts of a global attention graph neural network assisted optimal power flow solution method provided in the embodiments of the present application, and their expressions are different. Figure 1 As shown, the method comprises the following steps:
[0078] Step (1), construct the optimal power flow mathematical model.
[0079] In the embodiment of the present application, an optimal power flow mathematical model is first constructed, the goal of which is to optimize the operating cost of the power system while satisfying the physical constraints of the power system operation. The optimal power flow mathematical model includes the following contents:
[0080] Objective function:
[0081]
[0082] Constraints:
[0083]
[0084]
[0085] In the formula, N is the set of all nodes; G is the set of generator nodes; E is the set of transmission lines; cost is the cost of generator power generation; is the active power from node i to node j; is the reactive power from node i to node j; v i is the voltage amplitude at node i, v i Represent their maximum and minimum values respectively; θ i is the voltage intersection of node i; is the active power output of the generator at node i, p i g Represent their maximum and minimum values respectively; is the reactive power output of the generator at node i, Represent their maximum and minimum values respectively; is the active load of node i; is the reactive load of node i; is the maximum phase angle difference between node i and node j; is the active power flowing from node i to node j; is the reactive power flowing from node i to node j; is the maximum apparent power of the transmission line between nodes i and j.
[0086] Through the above mathematical model, the cost and constraints of power system operation are comprehensively considered, providing a basis for optimization calculations in subsequent steps.
[0087] Step (2), based on the optimal power flow model, construct the original variable prediction training data set D1.
[0088] In the embodiment of the present application, in order to achieve efficient prediction of the generator set point, based on the optimal power flow mathematical model constructed in step (1), an original variable prediction training data set D1 is constructed, and the construction of the data set includes the following two cases:
[0089] (2.1) Construct a full parameter training dataset.
[0090] During the first training, all network layer parameters need to be fully trained. The steps are as follows:
[0091] Based on the historical operation data of the power grid or public data sets, m power grids with different topologies are extracted, and the load information under each topology is sampled. K load samples are generated according to the probability distribution as the input of the training set. There are a total of m×k samples, covering the changes in different topologies and load scenarios. Then, the optimal power flow mathematical model in step (1) is solved based on the interior point method to obtain the optimal solution of the generator set point, which is used as the label of the training set. The training set generated under the i-th topology in the generator set point prediction training set is denoted as
[0092] Through the above steps, a full-parameter training data set is constructed to ensure that the model can adapt to different power grid topologies and load changes.
[0093] (2.2) Construct a partial parameter training data set.
[0094] When it is necessary to solve the optimal power flow (OPF) problem with a topology different from the grid in the full parameter training set, some parameters of the model can be retrained based on the existing generator set point prediction model M1. The steps are as follows:
[0095] The grid load information under a given topology is sampled and k samples are generated according to the probability distribution. Then, the optimal power flow mathematical model is solved for all samples based on the interior point method to obtain the optimal solution of the generator set point as the label of the new sample. Finally, the generated new samples are input into the existing generator set point prediction model M1, and only the parameters of the specific network layer are trained to adapt to the new grid topology.
[0096] Through the above steps, we can not only meet the full coverage requirements during the first training, but also achieve rapid adaptation in new topology scenarios by adjusting some parameters.
[0097] By constructing the original variable prediction training dataset D1, a comprehensive and flexible training basis is provided for the generator set point prediction model M1. The full parameter training dataset is used to cover a variety of grid topologies and load scenarios, while the partial parameter training dataset provides support for rapid adaptation after topology changes, greatly improving the generalization ability and adaptability of the model.
[0098] Step (3), based on the optimal power flow model, construct a redundant constraint identification training data set D2.
[0099] In the embodiment of the present application, in order to realize the redundant identification of power system constraints, based on the optimal power flow mathematical model constructed in step (1), a redundant constraint identification training data set D2 is constructed, and the construction of the data set includes the following two cases:
[0100] (3.1) Construct a full parameter training dataset.
[0101] During the first training, all network layer parameters of the redundant constraint identification model M2 need to be fully trained. The steps are as follows:
[0102] First, based on the historical operation data of the power grid or public data sets, m power grids with different topologies are extracted, and the load information under each topology is sampled. K load samples are generated according to the probability distribution as the input of the training set. Finally, a total of m×k samples are generated, covering the changes in different topologies and load scenarios. Then, the optimal power flow mathematical model in step (1) is solved based on the interior point method, and the dual variables of each constraint are extracted and used as the labels of the training set. According to the value of the dual variable, it is determined whether the constraint is redundant. The dual variable value of the redundant constraint is 0, while the dual variable value of the non-redundant constraint is not 0. The training set generated under the i-th topology in the redundant constraint identification training set is denoted as
[0103] Through the above steps, a full-parameter training data set is constructed to provide comprehensive support for the initial training of the redundant constraint identification model M2.
[0104] (3.2) Construct a partial parameter training data set.
[0105] When it is necessary to solve the optimal power flow (OPF) problem of a power grid with a different topology from that in the full parameter training set, some parameters of the model can be retrained based on the existing redundant constraint identification model M2. The steps are as follows:
[0106] First, the grid load information under a given topology is sampled and k samples are generated according to the probability distribution. Then, the optimal power flow mathematical model is solved for all samples based on the interior point method, and the dual variables of each constraint are extracted as the labels of the new samples. Finally, the generated new samples are input into the existing redundant constraint identification model M2, and only the parameters of the specific network layer are trained to adapt to the new grid topology.
[0107] Through the above steps, we can not only meet the full coverage requirements during the first training, but also achieve rapid adaptation in new topology scenarios by adjusting some parameters.
[0108] By constructing the redundant constraint identification training dataset D2, accurate identification of redundant constraints for different power grid topologies and load scenarios is achieved. The full parameter training dataset is used to fully train the model for the first time to ensure coverage of a variety of possible topological scenarios; while the partial parameter training dataset is used for specific topological scenarios to achieve rapid model adaptation by updating some parameters. This method greatly improves the efficiency and flexibility of redundant constraint identification.
[0109] Step (4), based on the original variable prediction training dataset D1 and the graph neural network, a generator set point prediction model M1 with global attention is constructed.
[0110] In the embodiment of the present invention, in order to achieve high-precision prediction of the generator set point, a generator set point prediction model M1 with global attention is constructed based on the original variable prediction training data set D1 and the graph neural network. The specific steps are as follows:
[0111] Step (4.1), first determine whether there is a generator set point prediction model M1 that has been trained with parameters.
[0112] If it does not exist, perform full parameter training of the model and proceed to step (4.2). If it already exists, use the trained model directly and proceed to the subsequent step (4.9).
[0113] Step (4.2), if it does not exist, construct the graph structure with the nodes and lines in the power system as the nodes and edges of the graph respectively in, Representation diagram, Represent the node set and edge set respectively, and the node features are The edge feature is e ij =exp(-k log|z ij |), where k is a hyperparameter and z ij is the impedance of the line between nodes i and j.
[0114] In step (4.3), a linear layer is used as the embedding layer of the generator set point prediction model M1 to map the input node features and edge features into a high-dimensional vector space. The output dimension of the embedding layer is an adjustable hyperparameter to adapt to different grid topologies.
[0115] In one embodiment of the present application, the embedding layer can be expressed as Y1=w1X+b1, where X, Y1 are the input and output of the linear layer, the dimension of Y1 is 4 in an example of the present application, and w1, b1 are trainable parameters.
[0116] In step (4.4), the embedding layer is connected to multiple graph attention layers or graph convolution layers. The input dimension of the graph attention layer or graph convolution layer is the same as that of the linear layer, and the output dimension is a specifiable hyperparameter.
[0117] Specifically, the embedding layer is connected to several graph attention layers or graph convolution layers, the input feature dimension is the same as Y1, and the output dimension is a specifiable hyperparameter. In an example of this application, two graph attention layers (GAT) are used. The input feature dimension of the first GAT layer is 4, and the output feature dimension is 8; the input feature dimension and output feature dimension of the second GAT layer are both 8. The number of attention heads of both GAT layers is set to 8, and the output features of multi-head attention are averaged. For node i, let its input feature be The output feature Where N i is the set of neighbor nodes of node i, α ij is the attention coefficient of node i to node j, W is the linear transformation matrix, and is a trainable parameter.
[0118] In step (4.5), an attention layer is connected after the graph attention layer or graph convolution layer to extract global topological correlation information.
[0119] In an embodiment of the present application, the input dimension of the attention layer is consistent with the output dimension of the previous layer, and when multi-head attention is used, the number of attention heads is a specifiable hyperparameter.
[0120] In an example of the present application, the hidden layer dimension is set to 8 and the number of attention heads is set to 8.
[0121] In step (4.6), after the attention layer, a fully connected network is constructed for each generator node according to the number of nodes in the power system.
[0122] In the embodiment of the present application, the function ReLU is constructed bounded As the output layer of the fully connected network, in xare the maximum and minimum values of x, respectively, which ensures that the output of the neural network meets the upper and lower limit constraints. If there are ng generator nodes in the power system, ng fully connected networks can be constructed, each of which consists of a linear layer and a ReLU layer. The attention layer will pass the output result to each fully connected network as input, and the output result of each fully connected network corresponds to the set point prediction value of each generator node, which is the active and reactive output of the generator and the voltage amplitude and phase angle in the OPF problem.
[0123] Taking the New England 10-generator 39-node system as an example, 10 fully connected networks need to be built. The input of each network is the output feature of the attention layer. Each network has 2 hidden layers, both of which are composed of linear layers and ReLU functions. The input feature dimension of the first layer is 8, and the output feature dimension is 32. The input and output feature dimensions of the second layer are both 32. Finally, the output layer consists of a linear layer and ReLU bounded The linear layer has an input feature dimension of 32 and an output feature dimension of 4.
[0124] Step (4.7), based on the original variable prediction training data set D1, construct m corresponding network layers for the m power system topologies in the data set, and train the m groups of training sets in turn.
[0125] In the embodiment of the present application, in the training set After training, in the training set The parameters of the embedding layer, graph neural network layer, and attention layer of the generator set point prediction model M1 are continuously trained. In addition, each time the training is performed, the fully connected network layer corresponding to the current topology needs to be retrained to ensure the topological adaptability of the output results.
[0126] Step (4.8), set the loss function of the generator set point prediction model M1 as:
[0127]
[0128] Among them, Loss mse is the mean square error loss function, for the predicted value and label y, Loss Pbalance is the power balance penalty term, in is the sum of the predicted active power values of the i-th sample generator, PD i is the sum of the load powers of the ith sample.
[0129] It can be understood that adding the power balance penalty term will make the output of the neural network tend to meet the power balance constraint. After completing the training, proceed to step (5).
[0130] In step (4.9), if there is a generator set point prediction model M1 that has been trained with parameters, it is further determined whether the power grid topology structure in the optimal power flow problem to be solved exists in the training set D1.
[0131] If it exists, it means that the grid topology is already included in the training set, and the current parameters of the generator set point prediction model M1 can adapt to the topology, so there is no need to retrain, and the trained model can be used directly for prediction. Go to step (5).
[0132] If the grid topology is not in the training set, the training strategy of the generator set point prediction model M1 is adjusted: the parameters of the embedding layer, graph neural network layer and attention layer shown in steps (4.3)-(4-5) are frozen to keep their global feature extraction capabilities unchanged; only the parameters of the fully connected network layer shown in step (4-6) are retrained to adapt to the new grid topology, and the loss function setting is the same as step (4.8).
[0133] Through the optimization training strategy of the above steps (4.1) to (4.9), this application effectively constructs and applies the generator set point prediction model M1, and realizes efficient optimal power flow calculation. In the process of model construction, the grid topology characteristics and load scenarios are fully considered, and global features are extracted through graph neural networks and attention mechanisms to ensure that the model has strong feature expression capabilities and adaptability to complex topologies. For grid topologies that already exist in the training set, the trained model is used directly to avoid repeated training; for topologies that are not included, by freezing the parameters of the embedding layer, graph neural network layer, and attention layer, only the parameters of the fully connected network layer are adjusted to quickly adapt to new scenarios. This strategy not only greatly reduces the training complexity and computational cost, but also significantly improves the applicability and computational efficiency of the model in new topological scenarios, fully meeting the needs of actual power system optimization.
[0134] Step (5), based on the redundant constraint identification training dataset D2 and graph neural network, a redundant constraint identification model M2 with global attention is constructed.
[0135] In an embodiment of the present application, in order to achieve efficient identification of redundant constraints in the optimal power flow problem, a redundant constraint identification model M2 with global attention is constructed based on the redundant constraint identification training data set D2 and the graph neural network.
[0136] Step (5.1), determine whether there is a redundant constraint identification model M2 that has been trained with parameters.
[0137] Similar to step (4), if it does not exist, perform full parameter training of the model and proceed to step (5.2). If it already exists, use the trained model directly and proceed to the subsequent step (5.8).
[0138] Step (5.2), if it does not exist, construct the graph structure with the nodes and lines in the power system as the nodes and edges of the graph respectively in, Representation diagram, Represent the node set and edge set respectively, and the node features are The edge feature is e ij =exp(-k log|z ij |), where k is a hyperparameter and z ij is the impedance of the line between nodes i and j.
[0139] In step (5.3), the linear layer is used as the embedding layer of the redundant constraint identification model M2 to map the input node features and edge features to a high-dimensional vector space. The output dimension of the embedding layer is an adjustable hyperparameter to adapt to different power grid topology characteristics.
[0140] In one embodiment of the present application, the embedding layer can be expressed as Y2=w2X+b2, where X, Y2 are the input and output of the linear layer, the dimension of Y2 is 4 in an example of the present application, and w2, b2 are trainable parameters.
[0141] In step (5.4), the embedding layer is connected to multiple graph attention layers or graph convolution layers. The input dimension of the graph attention layer or graph convolution layer is the same as that of the linear layer, and the output dimension is a specifiable hyperparameter.
[0142] Specifically, the embedding layer is connected to several graph attention layers or graph convolution layers, the input feature dimension is the same as Y2, and the output dimension is a specifiable hyperparameter. In an example of this application, three graph attention layers (GAT) are used. The input feature dimension of the first GAT layer is 8, and the output feature dimension is 16; the input feature dimension and output feature dimension of the second and third GAT layers are both 16. The number of attention heads of the three GAT layers is set to 8, and the output features of the multi-head attention are averaged. For node i, let its input feature be The output feature Where N i is the set of neighbor nodes of node i, α ij is the attention coefficient of node i to node j, W is the linear transformation matrix, and is a trainable parameter.
[0143] In step (5.5), an attention layer is connected after the graph attention layer or the graph convolution layer. The input dimension of the attention layer is consistent with the output dimension of the previous layer, and the number of attention heads is a specifiable hyperparameter when multi-head attention is used.
[0144] In an embodiment of the present application, the input dimension of the attention layer is consistent with the output dimension of the previous layer, and when multi-head attention is used, the number of attention heads is a specifiable hyperparameter.
[0145] In an example of this application, the hidden layer dimension is set to 16 and the number of attention heads is set to 8.
[0146] In step (5.6), the high-dimensional features processed by the attention layer are input into the fully connected network. The output result of the fully connected network is the dual variable of each constraint. The fully connected network consists of a linear layer and a ReLU layer. The predicted value of each dual variable output by the fully connected network is used to determine whether the corresponding constraint is redundant.
[0147] In the embodiment of the present application, the high-dimensional features processed by the attention layer will be input into the fully connected network, and the output result of the fully connected network is the dual variable of each constraint. The output dimension of the fully connected network is the same as the number of constraints of the OPF problem of a specific power system, and the i-th item of the output vector of the fully connected network is the predicted value of the dual variable of the i-th constraint of the OPF problem.
[0148] According to the Carlo-Kuhn-Tucker condition (KKT condition), the optimal solution of OPF is x * , for the inequality constraint d of the OPF problem i (x)≤0, its dual variable is λ i , satisfying the following relationship:
[0149] There is i (x * )×λ i =0, so if λ i =0, then f i (x * )<0, indicating that the constraint is a redundant constraint; if λ i ≠0, then f i (x * )=0, indicating that the constraint is a non-redundant constraint.
[0150] In addition, in the embodiment of the present application, the fully connected network is composed of a linear layer and a ReLU layer. Since its output dimension is related to the number of constraints of the OPF problem of a specific power system, different fully connected neural networks need to be constructed for power systems with different topologies.
[0151] Taking the New England 39-node system as an example, two hidden layers are set after the attention layer. Both hidden layers are composed of linear layers and ReLU functions. The input feature dimension of the first layer is 16 and the output feature dimension is 32. The input and output feature dimensions of the second layer are both 32. The final output layer is composed of a linear layer with an input feature dimension of 32 and an output feature dimension of 1.
[0152] By inputting the high-dimensional features processed by the attention layer into the fully connected network, this application achieves efficient identification of redundant constraints. The fully connected network combines the KKT condition to make redundancy judgments for each constraint, and flexibly adjusts the design of the network layer according to different topologies, greatly improving the model adaptability and computing efficiency while ensuring the calculation accuracy.
[0153] Step (5.7), based on the redundant constraint identification training data set D2, construct m corresponding network layers for the m power system topologies in the data set, and train the m groups of training sets in turn.
[0154] In the embodiment of the present application, in the training set After training, in the training set The parameters of the embedding layer, graph neural network layer, and attention layer of the redundant constraint recognition model M2 are continued to be trained. In addition, each time the training is performed, the fully connected network layer corresponding to the current topology needs to be retrained to ensure the topological adaptability of the output results.
[0155] After the training is completed, go to step (6).
[0156] In step (5.8), if there is a redundant constraint identification model M2 that has been trained in parameters, it is further determined whether the power grid topology structure in the optimal power flow problem to be solved exists in the training set D2.
[0157] If it exists, it means that the power grid topology is already included in the training set, and the current parameters of the redundant constraint identification model M2 can adapt to the topology, so there is no need to retrain, and the trained model can be used directly for prediction. Go to step (6).
[0158] If the power grid topology is not in the training set, the training strategy of the redundant constraint identification model M2 is adjusted: freeze the parameters of the embedding layer, graph neural network layer and attention layer shown in steps (5.3)-(5-5) to keep their global feature extraction capabilities unchanged; only retrain the parameters of the fully connected network layer shown in step (5-6) to adapt to the new power grid topology.
[0159] Through the optimization strategy of the above steps (5.1) to (5.8), the present application realizes the efficient construction and flexible application of the redundant constraint identification model M2. This method combines the graph neural network with the attention mechanism, which can comprehensively extract the global topological characteristics of the power grid and efficiently predict the dual variables of each constraint. During the training process, for the topological structures that already exist in the training set, the trained model M2 is directly used to avoid repeated training; for the uncovered topological structures, it is only necessary to freeze the parameters of the embedding layer, the graph neural network layer, and the attention layer, and quickly adapt to the new topological scenario by adjusting the parameters of the fully connected network layer. This strategy significantly reduces the complexity and computational overhead of model retraining, while maintaining the high adaptability of the model to new topological scenarios, ensuring the accuracy and efficiency of redundant constraint identification, and effectively supporting the rapid solution of the optimal power flow problem.
[0160] Step (6), based on the load data of the actual power system, the generator set point prediction model M1 and the redundant constraint identification model M2 are used to predict the generator set point and the constraint dual variable respectively, and the redundant constraints are identified based on the constraint dual variable. After initializing and simplifying the optimal power flow problem, the optimal power flow calculation is completed.
[0161] In an embodiment of the present application, the actual power system load data is first sampled, and the sampled data is input into the generator set point prediction model M1 and the redundant constraint identification model M2, and the generator set point in the optimal power flow problem is predicted by model M1 to obtain the predicted value of the generator set point; the constraint dual variables in the optimal power flow problem are predicted by model M2 to obtain the predicted value of the dual variables of each constraint.
[0162] The constructed optimal power flow mathematical model is then input into the mathematical solver, and the solution of the optimal power flow problem is initialized using the generator set point prediction value. On the one hand, initialize the corresponding dual variable λ in the optimal power flow problem i On the other hand, specify the critical value ∈ to determine whether there is If yes, the i-th constraint is considered redundant and removed from the optimal power flow problem. If no, the constraint is retained in the optimal power flow problem.
[0163] Finally, the optimal power flow problem after initialization and constraint simplification is solved using a mathematical solver to complete the optimal power flow calculation and accelerate the problem solving. The simplification of constraints significantly reduces the computational complexity of the mathematical solver and speeds up the optimal power flow problem solving.
[0164] In one possible embodiment, a mathematical solver is used to solve the initialized and simplified OPF problem to accelerate the problem solving. In this example, a graph data with 39 nodes and 46 edges is first created, and then the load information of the 39 nodes is sampled. After inputting the generator set point prediction model and the redundant constraint identification model, the generator set point prediction value and the prediction value of each constraint dual variable can be obtained. After using the two to initialize the mathematical solver, the critical value ∈=10 is specified. -8 , predict the value of any dual variable If yes The corresponding constraint is considered to be a redundant constraint, which can be deleted from the OPF mathematical model and then solved.
[0165] Through the above steps, the present invention realizes the initialization and constraint simplification of the optimal power flow problem based on the load data of the actual power system by using the generator set point prediction model and the redundant constraint identification model. The generator set point prediction model M1 provides an efficient initial solution, and the redundant constraint identification model M2 accurately identifies and removes redundant constraints, thereby significantly reducing the computational burden of the mathematical solver. This method effectively improves the efficiency of the optimal power flow calculation, ensures the solution speed and accuracy in complex power grid scenarios, and provides reliable technical support for the operation optimization of the actual power system.
[0166] In order to implement the above embodiments, the present application also proposes an optimal power flow solving device assisted by a global attention graph neural network. Figure 3 A schematic diagram of the structure of an optimal power flow solving device assisted by a global attention graph neural network provided in an embodiment of the present application. Figure 3 As shown, the device comprises:
[0167] The optimal power flow mathematical model construction module 100 is used to construct the optimal power flow mathematical model;
[0168] A data set construction module 200 is used to construct an original variable prediction training data set D1 and a redundant constraint identification training data set D2 based on an optimal power flow model;
[0169] A generator set point prediction model building module 300 is used to build a generator set point prediction model M1 with global attention based on the original variable prediction training data set D1 and the graph neural network;
[0170] A redundant constraint identification model construction module 400 is used to construct a redundant constraint identification model M2 with global attention based on a redundant constraint identification training data set D2 and a graph neural network;
[0171] The solution module 500 is used to predict the generator set point and constraint dual variables based on the load data of the actual power system using the generator set point prediction model M1 and the redundant constraint identification model D2, and identify the redundant constraints based on the constraint dual variables, initialize the optimal power flow problem and simplify the constraints to complete the optimal power flow calculation.
[0172] In order to implement the above embodiments, the present application also proposes an electronic device, comprising: a processor, and a memory communicatively connected to the processor; the memory stores computer-executable instructions; the processor executes the computer-executable instructions stored in the memory to implement the method provided by the above embodiments.
[0173] In order to implement the above embodiments, the present application also proposes a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the methods provided by the above embodiments.
[0174] In order to implement the above embodiments, the present application also proposes a computer program product, including a computer program, which implements the methods provided by the above embodiments when executed by a processor.
[0175] The collection, storage, use, processing, transmission, provision and disclosure of user personal information involved in this application are in compliance with relevant laws and regulations and do not violate public order and good morals.
[0176] It should be noted that personal information from users should be collected for legitimate and reasonable purposes and should not be shared or sold outside of these legitimate uses. In addition, such collection / sharing should be carried out after receiving the user's informed consent, including but not limited to notifying the user to read the user agreement / user notice and sign the agreement / authorization including authorization of relevant user information before the user uses the function. In addition, any necessary steps should be taken to protect and safeguard access to such personal information data and ensure that others who have access to personal information data comply with its privacy policy and procedures.
[0177] The present application is expected to provide an implementation scheme for users to selectively block the use or access of personal information data. That is, the present disclosure is expected to provide hardware and / or software to prevent or block access to such personal information data. Once the personal information data is no longer needed, the risk can be minimized by limiting data collection and deleting the data. In addition, when applicable, such personal information is de-identified to protect the privacy of the user.
[0178] In the description of the aforementioned embodiments, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0179] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution of this application can be achieved, and this document is not limited here.
[0180] The above specific implementations do not constitute a limitation on the protection scope of this application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of this application should be included in the protection scope of this application.
Claims
1. A global attention graph neural network assisted optimal power flow solution method, characterized in that: The following steps are involved: Constructing the optimal power flow mathematical model; Based on the optimal power flow model, construct an original variable prediction training data set D1; Based on the optimal power flow model, construct a redundant constraint identification training data set D2; Based on the original variable prediction training dataset D1 and the graph neural network, a generator set point prediction model M1 with global attention is constructed; Based on the redundant constraint identification training data set D2 and the graph neural network, a redundant constraint identification model M2 with global attention is constructed; Based on the load data of the actual power system, the generator set point prediction model M1 and the redundant constraint identification model M2 are used to predict the generator set point and the constraint dual variables respectively, and the redundant constraints are identified based on the constraint dual variables. After the optimal power flow problem is initialized and the constraints are simplified, the optimal power flow calculation is completed.
2. The method according to claim 1, characterized in that The optimal power flow mathematical model comprises: Objective function: Constraints: In the formula, N is the set of all nodes; G is the set of generator nodes; E is the set of transmission lines; cost is the cost of generator power generation; is the active power from node i to node j; is the reactive power from node i to node j; v i is the voltage amplitude at node i, v i Represent their maximum and minimum values respectively; θ i is the voltage intersection of node i; is the active power output of the generator at node i, Represent their maximum and minimum values respectively; is the reactive power output of the generator at node i, Represent their maximum and minimum values respectively; is the active load of node i; is the reactive load of node i; is the maximum phase angle difference between node i and node j; is the active power flowing from node i to node j; is the reactive power flowing from node i to node j; is the maximum apparent power of the transmission line between nodes i and j.
3. The method according to claim 2, characterized in that Based on the optimal power flow model, an original variable prediction training data set D1 is constructed, including: During the first training, based on the historical operation data of the power grid or the public data set, m power grids with different topologies are extracted, and the load information under each topology is sampled. K load samples are generated according to the probability distribution as the input of the training set, with a total of m×k samples; the optimal power flow mathematical model is solved based on the interior point method, and the generator set point is obtained as the label. The training set generated under the i-th topology in the generator set point prediction training set is recorded as If there is a trained generator set point prediction model M1, the grid load information under a given topology is sampled and k samples are generated according to the probability distribution; the optimal power flow mathematical model is solved for all samples based on the interior point method to obtain the generator set point as a label.
4. The method according to claim 2, characterized in that: Based on the optimal power flow model, a redundant constraint identification training data set D2 includes: During the first training, based on the historical operation data of the power grid or the public data set, m power grids with different topologies are extracted, and the load information under each topology is sampled. K load samples are generated according to the probability distribution as the input of the training set, with a total of m×k samples; the optimal power flow mathematical model is solved based on the interior point method, and each constraint dual variable is obtained as a label. The training set generated under the i-th topology in the redundant constraint identification training set is recorded as If there is a trained redundant constraint identification model M2, the grid load information under a given topology is sampled and k samples are generated according to the probability distribution; the optimal power flow mathematical model is solved for all samples based on the interior point method to obtain each constraint dual variable as a label.
5. The method according to claim 3, characterized in that: Based on the original variable prediction training dataset D1 and the graph neural network, a generator set point prediction model M1 with global attention is constructed, including: Determine whether there is a generator set point prediction model M1 with trained parameters; If it does not exist, the nodes and lines in the power system are used as nodes and edges of the graph to construct the graph structure. in, Representation diagram, ε represents the node set and edge set respectively, and the node features are The edge feature is e ij =exp(-klog|z ij |), where k is a hyperparameter and z ij is the impedance of the line between nodes i and j; Using a linear layer as an embedding layer of the generator set point prediction model M1 to map the input node features and edge features to a high-dimensional vector space, the output dimension of the embedding layer being an adjustable hyperparameter; Connecting the embedding layer to a plurality of graph attention layers or graph convolutional layers, wherein the input dimension of the graph attention layer or graph convolutional layer is the same as that of the linear layer, and the output dimension is a specifiable hyperparameter; An attention layer is connected after the graph attention layer or graph convolution layer, the input dimension of the attention layer is consistent with the output dimension of the previous layer, and the number of attention heads is a specifiable hyperparameter when multi-head attention is used; After the attention layer, a fully connected network is constructed for each generator node according to the number of nodes in the power system. The output result of each fully connected network corresponds to the set point prediction value of each generator node. Each of the fully connected networks consists of a linear layer and a ReLU layer, and an activation function ReLU is constructed. bounded As the output layer of the fully connected network, the formula is: in, x are the maximum and minimum values of x respectively; Based on the original variable prediction training data set D1, m corresponding network layers are constructed for m power system topologies in the data set, and m groups of training sets are trained in turn; After training, in the training set Continue training the parameters of the embedding layer, graph neural network layer, and attention layer of the generator set point prediction model M1, and retrain the fully connected network layer corresponding to the current topology; The loss function of the generator set point prediction model M1 is set to: Among them, Loss mse is the mean square error loss function, for the predicted value and label y, Loss Pbalance is the power balance penalty term, in is the sum of the predicted active power values of the i-th sample generator, PD i is the sum of the load powers of the ith sample.
6. The method according to claim 5, characterized in that Also includes: If there is a parameter-trained generator set point prediction model M1, determine whether the power grid topology in the optimal power flow problem to be solved exists in the training set D1; If it exists, the generator set point prediction model M1 will not be retrained; if it does not exist, the parameters of the embedding layer, graph neural network layer and attention layer will be frozen, and only the parameters of the fully connected network layer will be trained.
7. The method according to claim 4, characterized in that Based on the redundant constraint identification training data set D2 and the graph neural network, a redundant constraint identification model M2 with global attention is constructed, including: Determine whether there is a redundant constraint identification model M2 that has been trained with parameters; If it does not exist, the nodes and lines in the power system are used as nodes and edges of the graph to construct the graph structure. in, Representation diagram, ε represents the node set and edge set respectively, and the node features are The edge feature is e ij =exp(-klog|z ij |), where k is a hyperparameter and z ij is the impedance of the line between nodes i and j; Using a linear layer as an embedding layer of the redundant constraint identification model M2, mapping the input node features and edge features to a high-dimensional vector space, the output dimension of the embedding layer is an adjustable hyperparameter; Connecting the embedding layer to a plurality of graph attention layers or graph convolutional layers, wherein the input dimension of the graph attention layer or graph convolutional layer is the same as that of the linear layer, and the output dimension is a specifiable hyperparameter; An attention layer is connected after the graph attention layer or graph convolution layer, the input dimension of the attention layer is consistent with the output dimension of the previous layer, and the number of attention heads is a specifiable hyperparameter when multi-head attention is used; The high-dimensional features processed by the attention layer are input into a fully connected network, the output result of which is a dual variable of each constraint. The fully connected network is composed of a linear layer and a ReLU layer, and the predicted value of each dual variable outputted by the fully connected network is used to determine whether the corresponding constraint is redundant; Based on the redundant constraint identification training data set D2, m corresponding network layers are constructed for m power system topologies in the data set, and m groups of training sets are trained in turn; After training, in the training set The parameters of the embedding layer, graph neural network layer and attention layer of the redundant constraint identification model M2 are continued to be trained, and the fully connected network layer corresponding to the current topology is retrained.
8. The method according to claim 7, characterized in that Also includes: If there is a redundant constraint identification model M2 that has been trained with parameters, it is determined whether the power grid topology structure in the optimal power flow problem to be solved exists in the training set D2; If it exists, the redundant constraint identification model M2 will not be retrained; if it does not exist, the parameters of the embedding layer, graph neural network layer and attention layer will be frozen, and only the parameters of the fully connected network layer will be trained.
9. The method according to claim 1, characterized in that: The method is based on the load data of the actual power system, using the generator set point prediction model M1 and the redundant constraint identification model M2 to respectively predict the generator set point and the constraint dual variable, and identifying the redundant constraint based on the constraint dual variable, initializing the optimal power flow problem and simplifying the constraints, and then completing the optimal power flow calculation, including: Sampling actual power system load data, inputting the sampled data into the generator set point prediction model M1 and the redundant constraint identification model M2, and obtaining the generator set point prediction value and each constraint dual variable prediction value of the optimal power flow problem; Inputting the constructed optimal power flow mathematical model into a mathematical solver; Initialize the solution of the optimal power flow problem using the generator set point prediction value; For the dual variable prediction value of the i-th constraint Initialize the corresponding dual variable λ in the optimal power flow problem i , and specify the critical value ∈ to determine whether there is If yes, the i-th constraint is considered redundant and removed from the optimal power flow problem; A mathematical solver is used to solve the initialized and simplified optimal power flow problem to complete the optimal power flow calculation.
10. A global attention graph neural network assisted optimal power flow solving device, characterized in that: include: Optimal power flow mathematical model building module, used to build the optimal power flow mathematical model; A data set construction module, used to construct an original variable prediction training data set D1 and a redundant constraint identification training data set D2 respectively based on the optimal power flow model; A generator set point prediction model building module, used to build a generator set point prediction model M1 with global attention based on the original variable prediction training data set D1 and the graph neural network; A redundant constraint identification model construction module, used to construct a redundant constraint identification model M2 with global attention based on the redundant constraint identification training data set D2 and the graph neural network; The solution module is used to predict the generator set point and constraint dual variables respectively based on the load data of the actual power system using the generator set point prediction model M1 and the redundant constraint identification model M2, and identify redundant constraints based on the constraint dual variables, initialize the optimal power flow problem and simplify the constraints to complete the optimal power flow calculation.
Citation Information
Patent Citations
Optimal power flow calculation method based on multi-task deep learning
CN113283547A
Optimal power flow calculation method and device based on pre-training model
CN116154779A
Data-driven optimal power flow calculation method considering topological feature learning
CN116316629A
Power system load flow calculation method of physical equation driven graph neural network
CN116345462A
Optimal power flow rapid solving method combining neural network and physical model
CN116720436A
Cited By
Electric power system end-to-end unit combination method for driving space-time attention graph neural network through object number fusion
CN120449698A
Active power distribution network dynamic reconstruction system oriented to typhoon disaster map neural network induction
CN121395576A
An electric-gas-heat integrated energy optimization scheduling and carbon flow calculation method and system
CN122549682A