New energy power grid weak link identification method and system based on graph attention network
Through the method based on the graph attention network, the weak links of the new energy power grid are identified, which solves the problem that the deterministic optimization model is difficult to face multiple grid operation scenarios, and achieves rapid and real-time identification of weak links of the power grid, satisfying the power grid monitoring timeliness requirements.
Patent Information
- Application Number
- CN202411034021.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-22
AI Technical Summary
In the prior art, it is difficult to identify weak links of the power grid using deterministic optimization models, and the timeliness of the identification results of weak links is difficult to ensure.
Using a graph attention network method, by obtaining the ground state trend results of the new energy grid, and using a pre-trained graph attention network model, all lines in the new energy operation scenario are classified, and the risk of building graph attention network is weak. The link identification model is carried out and trained to identify weak links in the power grid.
It realizes rapid identification and real-time monitoring of weak links in the power grid, which can effectively reduce the complexity of analysis in high proportion of new energy scenarios and meets the timeliness requirements of power grid operation monitoring and decision-making.
Smart Images

Figure CN119005739A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system analysis, and relates to a method and system for identifying weak links in a new energy power grid based on a graph attention network. Background Art
[0002] With the large-scale centralized access of new energy sources to the power system, the steady-state operation of the power grid faces safety risks. The system may have the risk of node voltage exceeding the limit and line current exceeding the limit. The identification of weak links in the power grid is of great significance to the safety of the power system. Its purpose is to effectively monitor the weak links in the system and formulate effective measures in time for the operational risks brought by the weak links. This patent proposes a method for identifying weak links in power grid risks based on a graph attention network. By "offline training and online application" of power grid operation data, it transitions from the system level to the equipment level to identify the weak links and the degree of weakness of the power grid operation.
[0003] Identification of weak links in power systems refers to the identification of equipment that has a greater impact on the safe and stable operation of power systems. Its purpose is to effectively monitor the weak links in the system, formulate effective measures in a timely manner for the operational risks brought about by the weak links, and thus improve the safety level of the system.
[0004] At present, the research results on the identification of weak links in power grids mainly include two types of methods: those based on complex network theory and those based on power grid operation characteristics. The method based on complex network theory mainly analyzes the topological structure and node characteristics of the power grid, and uses indicators such as degree and betweenness to reflect the characteristics of the system grid structure, so as to identify the weak points of the power grid. The identification based on the operation characteristics of the power grid mainly analyzes the power flow characteristics of the system, and uses information entropy, singular value entropy, power flow entropy and other indicators to construct a comprehensive quantitative evaluation index, quantitatively analyze the balance of power distribution in the power grid, and identify the key nodes and key branches of the power grid.
[0005] In the face of uncertainty in new energy scenarios and the expansion of the power grid, both N-1 and probabilistic power flow technology will lead to a surge in computing time and are not suitable for intraday or real-time scenarios. Therefore, the technical characteristics of artificial intelligence algorithms, "offline training, online application", can be combined to achieve rapid identification of weak links and improve the timeliness of online applications.
[0006] The prior art proposes a method, device, equipment and medium for identifying weak links in a power system, establishes a basic operation model of the power system, obtains a planning scheme for the power grid to meet all loads when all lines are in normal operation, establishes a power system fault selection model to verify the accident tolerance of the planning scheme, establishes an operation model for the power system to cope with faults to obtain the amount of lost load, and finally performs simulation analysis in a standard system to output the weak link identification results of the power system. This patent identifies weak links by establishing a basic operation model of the power system, a fault selection model of the power system, and an operation model for the power system to cope with faults. However, with the large-scale access of a high proportion of new energy to the power grid, the randomness of the output of new energy will cause the power system to have various operating states. It is difficult to use a deterministic optimization model to identify weak links in the face of a large number of power grid operation scenarios, and in actual applications, it is difficult to guarantee the timeliness of the weak link identification results calculated by the three-layer optimization model. Summary of the invention
[0007] The purpose of the present invention is to provide a method and system for identifying weak links in a new energy power grid based on a graph attention network, so as to solve the technical problems in the prior art that the use of deterministic optimization models to identify weak links is difficult to cope with a large number of power grid operation scenarios, and the timeliness of the weak link identification results is difficult to guarantee.
[0008] In order to achieve the above object, the present invention adopts the following technical solutions:
[0009] The present invention proposes a method for identifying weak links in a new energy power grid based on a graph attention network, comprising the following steps:
[0010] Obtain the base state power flow results to be identified for the new energy grid;
[0011] The base state power flow results to be identified are input into the risk weak link identification model of the pre-trained graph attention network, and the weak lines of power grid operation risk are output to realize the identification of weak links in the power grid;
[0012] The risk weak link identification model of the pre-trained graph attention network is obtained through the following steps: obtaining the classification results of all lines under the new energy operation scenario; constructing the risk weak link identification model of the graph attention network, and inputting the classification results of all lines under the new energy operation scenario into the risk weak link identification model of the graph attention network for training, so as to obtain the risk weak link identification model of the pre-trained graph attention network.
[0013] Preferably, the classification results of all lines in the new energy operation scenario are obtained, specifically:
[0014] According to the historical forecast data and actual data of renewable energy power generation in the power grid, the probability distribution of forecast errors is statistically analyzed, and new energy scenarios are generated as data sources through sampling;
[0015] Perform base state power flow calculation on new energy scenario data to obtain power flow calculation results;
[0016] Analyze the heavy overload conditions of the lines in all scenarios in the tide calculation results. If the line is overloaded, it is a weak line and is placed in the weak line set. The lines in the corresponding scenarios are marked as weak and will not be identified as weak links in the future. If the line is not overloaded, the lines that are not identified as weak links constitute the line disconnection set as the candidate set of weak lines.
[0017] Traverse the new energy operation scenarios, disconnect the lines in the weak line candidate set in the scenario one by one, calculate the power flow after the line is disconnected, and count the heavy overload power flow transfer caused by the current line disconnection;
[0018] After the calculation of the disconnection flow of the candidate set of weak lines is completed, the flow transfer before and after the line is disconnected is compared to determine whether the disconnected line is a weak link. If so, it is marked as a weak link. If it is not a weak line, it is marked as a non-weak link. After the disconnected lines are traversed, the initial classification results of whether all lines are weak in the new energy operation scenario are obtained.
[0019] Preferably, the risk weak link identification model of building a graph attention network is specifically:
[0020] The risk weak link identification model of graph attention network includes graph attention network input features, loss function, Softmax function classifier and back propagation optimization.
[0021] Preferably, the graph attention network input features are specifically:
[0022] Determine the input information of the risk weak link identification model as the input of the graph attention network, including the initial attribute X and the association matrix A of the nodes in the graph network, divide the initial attribute information of the nodes in the graph network into topological importance features and flow condition features; select the initial attributes as the node initial feature vector of the graph network node;
[0023] Among them, the topological importance features include the edge degree index x of the line 1i and edge betweenness index x 2i ; The power flow characteristics include the line transmission capacity x 3i , transmission margin x 4i , load factor x 5i , power flow transfer degree x 6i .
[0024] Preferably, the loss function is specifically:
[0025] In the new energy operation scenario, the weighted cross entropy function is used to form the loss function:
[0026]
[0027] Where, loss is the loss function, t is the number of graph network nodes in a single training. If the weak lines of power grid operation risk are identified, t is the number of lines in a single training. If the weak nodes of power grid operation risk are identified, t is the number of nodes in a single training. c i is the category of the weak link of power grid operation risk. If the node or line involved in the training is the weak link of power grid operation, then c i The value is 1, otherwise the value is 0; p 1i and p 2i They respectively represent the probability value of sample i participating in the training being a weak link or a non-weak link with a high proportion of new energy operation risk; w weak is the weight when the sample is a weak point of power grid operation risk, w non-weak Represents the weight of the sample’s non-grid operation risk weaknesses.
[0028] Preferably, the Softmax function classifier is specifically:
[0029]
[0030] Among them, p i is the risk vulnerability probability vector of training sample i, p 1i represents the probability that node i in the graph network is a risk weak link, p 2i Represents the probability that node i in the graph network does not belong to the risk weak link, and the category with a larger probability value is taken as the category to which node i in the graph network belongs; y i is the node attribute vector after input X transformation and aggregation, with dimension set to 2, i.e. y i =[y 1i ,y 2i ] Τ ,y 1i and 2i All of them are aggregated attribute information.
[0031] Preferably, the back propagation optimization is specifically:
[0032] Using the SGD optimizer, the obtained graph network node features are optimized to obtain the optimal conversion matrix as follows:
[0033]
[0034] Among them, W j+1 is the model parameter matrix of the j+1th iteration, W jis the model parameter matrix of the jth iteration, W is the model parameter, γ is the learning rate, and j is the number of iterations.
[0035] Preferably, the classification results of all lines in the new energy operation scenario are input into the risk weak link identification model of the graph attention network for training, specifically:
[0036] Get the graph network nodes, calculate the attention coefficients of node i and its neighboring nodes in the graph network, perform weighted aggregation of node and neighbor node information, take the mean of node features under multi-head attention, iterate the risk weak link identification model of the graph attention network, output the optimal risk weak link identification model of the graph attention network when the validation set loss function remains unchanged, and complete the training of the risk weak link identification model of the graph attention network when the maximum number of iterations is reached.
[0037] The present invention proposes a new energy power grid weak link identification system based on graph attention network, comprising:
[0038] A data acquisition module is used to obtain the base state power flow results to be identified in the new energy power grid;
[0039] The data processing module is used to input the base state power flow results to be identified into the risk weak link identification model of the pre-trained graph attention network, output the risk weak lines of the power grid operation, and realize the identification of the weak links of the power grid;
[0040] The risk weak link identification model of the pre-trained graph attention network is obtained through the following steps: obtaining the classification results of all lines under the new energy operation scenario; constructing the risk weak link identification model of the graph attention network, and inputting the classification results of all lines under the new energy operation scenario into the risk weak link identification model of the graph attention network for training, so as to obtain the risk weak link identification model of the pre-trained graph attention network.
[0041] Preferably, the classification results of all lines in the new energy operation scenario are obtained, specifically:
[0042] According to the historical forecast data and actual data of renewable energy power generation in the power grid, the probability distribution of forecast errors is statistically analyzed, and new energy scenarios are generated as data sources through sampling;
[0043] Perform base state power flow calculation on new energy scenario data to obtain power flow calculation results;
[0044] Analyze the heavy overload conditions of the lines in all scenarios in the tide calculation results. If the line is overloaded, it is a weak line and is placed in the weak line set. The lines in the corresponding scenarios are marked as weak and will not be identified as weak links in the future. If the line is not overloaded, the lines that are not identified as weak links constitute the line disconnection set as the candidate set of weak lines.
[0045] Traverse the new energy operation scenarios, disconnect the lines in the weak line candidate set in the scenario one by one, calculate the power flow after the line is disconnected, and count the heavy overload power flow transfer caused by the current line disconnection;
[0046] After the calculation of the disconnection flow of the candidate set of weak lines is completed, the flow transfer before and after the line is disconnected is compared to determine whether the disconnected line is a weak link. If so, it is marked as a weak link. If it is not a weak line, it is marked as a non-weak link. After the disconnected lines are traversed, the initial classification results of whether all lines are weak in the new energy operation scenario are obtained.
[0047] Preferably, the risk weak link identification model of building a graph attention network is specifically:
[0048] The risk weak link identification model of graph attention network includes graph attention network input features, loss function, Softmax function classifier and back propagation optimization.
[0049] Preferably, the graph attention network input features are specifically:
[0050] Determine the input information of the risk weak link identification model as the input of the graph attention network, including the initial attribute X and the association matrix A of the nodes in the graph network, divide the initial attribute information of the nodes in the graph network into topological importance features and flow condition features; select the initial attributes as the node initial feature vector of the graph network node;
[0051] Among them, the topological importance features include the edge degree index x of the line 1i and edge betweenness index x 2i ; The power flow characteristics include the line transmission capacity x 3i , transmission margin x 4i , load factor x 5i , power flow transfer degree x 6i .
[0052] Preferably, the loss function is specifically:
[0053] In the new energy operation scenario, the weighted cross entropy function is used to form the loss function:
[0054]
[0055] Where, loss is the loss function, t is the number of graph network nodes in a single training. If the weak lines of power grid operation risk are identified, t is the number of lines in a single training. If the weak nodes of power grid operation risk are identified, t is the number of nodes in a single training. c iis the category of the weak link of power grid operation risk. If the node or line involved in the training is the weak link of power grid operation, then c i The value is 1, otherwise the value is 0; p 1i and p 2i They respectively represent the probability value of sample i participating in the training being a weak link or a non-weak link with a high proportion of new energy operation risk; w weak is the weight when the sample is a weak point of power grid operation risk, w non-weak Represents the weight of the sample’s non-grid operation risk weaknesses.
[0056] Preferably, the Softmax function classifier is specifically:
[0057]
[0058] Among them, p i is the risk vulnerability probability vector of training sample i, p 1i represents the probability that node i in the graph network is a risk weak link, p 2i Represents the probability that node i in the graph network does not belong to the risk weak link, and the category with a larger probability value is taken as the category to which node i in the graph network belongs; y i is the node attribute vector after input X transformation and aggregation, with dimension set to 2, i.e. y i =[y 1i ,y 2i ] Τ ,y 1i and 2i All of them are aggregated attribute information.
[0059] Preferably, the back propagation optimization is specifically:
[0060] Using the SGD optimizer, the obtained graph network node features are optimized to obtain the optimal conversion matrix as follows:
[0061]
[0062] Among them, W j+1 is the model parameter matrix of the j+1th iteration, W j is the model parameter matrix of the jth iteration, W is the model parameter, γ is the learning rate, and j is the number of iterations.
[0063] Preferably, the classification results of all lines in the new energy operation scenario are input into the risk weak link identification model of the graph attention network for training, specifically:
[0064] Get the graph network nodes, calculate the attention coefficients of node i and its neighboring nodes in the graph network, perform weighted aggregation of node and neighbor node information, take the mean of node features under multi-head attention, iterate the risk weak link identification model of the graph attention network, output the optimal risk weak link identification model of the graph attention network when the validation set loss function remains unchanged, and complete the training of the risk weak link identification model of the graph attention network when the maximum number of iterations is reached.
[0065] A terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of a method for identifying weak links in a new energy power grid based on a graph attention network are implemented.
[0066] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a method for identifying weak links in a new energy power grid based on a graph attention network.
[0067] Compared with the prior art, the present invention has the following beneficial effects:
[0068] The present invention proposes a new energy power grid weak link identification method based on graph attention network, which can be roughly divided into high-proportion new energy scene data generation, construction of graph attention network risk weak link identification model and model training, and online identification of risk weak links in power grid daily operation. Specifically, the present invention classifies all lines under the new energy operation scene, thereby greatly reducing the complexity of subsequent analysis. This classification not only takes into account the impact of new energy output, but also integrates other factors, so that the classification results can better reflect the operation status of the power grid in different scenarios, greatly shortening the time of preliminary data processing. Constructing a risk weak link identification model of the graph attention network can quickly process new input data after training is completed, and output weak lines of power grid operation risks. Since the model has the ability of parallel computing and fast reasoning, the identification process can be carried out in real time, meeting the timeliness requirements of power grid operation monitoring and decision-making. Therefore, the method proposed in the present invention can solve the problems existing in the prior art.
[0069] Furthermore, the topological importance index for weak line identification is selected from the perspective of network structure to obtain the edge degree index or edge betweenness index of the line to measure its importance in the entire power network. The flow condition is mainly considered from the operating status. For example, the transmission margin and load rate can reflect the line operation status. When the transmission margin is small or the load rate is too high, the line risk is greater.
[0070] The invention proposes a new energy grid weak link identification system based on graph attention network, which divides the system into data acquisition module, model building module and data processing module, and finally outputs the weak line of grid operation risk to realize the identification of grid weak link. The modularization idea is adopted to make each module independent of each other, which is convenient for unified management of each module. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0072] Figure 1 This is a flow chart of the method for identifying weak links in new energy power grids based on graph attention network of the present invention.
[0073] Figure 2 This is a flowchart of identifying weak links in power grid risks based on graph attention network of the present invention.
[0074] Figure 3 This is a flow chart of the construction and processing of high-proportion new energy scenario data of the present invention.
[0075] Figure 4 This is a graph showing the accuracy of the model proposed in the present invention.
[0076] Figure 5 This is a diagram of the model error loss results of the present invention.
[0077] Figure 6 This is a diagram of the new energy power grid weak link identification system based on graph attention network of the present invention.
[0078] Figure 7 The figure is a schematic diagram of the structure of an electronic device of the present invention. DETAILED DESCRIPTION
[0079] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0080] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0081] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0082] In the description of the embodiments of the present invention, it should be noted that if the terms "upper", "lower", "horizontal", "inner", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the drawings, or the orientation or positional relationship in which the product of the invention is usually placed when in use, it is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", etc. are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0083] The present invention is further described in detail below in conjunction with the accompanying drawings:
[0084] Example 1
[0085] The present invention proposes a new energy grid weak link identification method based on graph attention network, such as Figure 1 As shown, the following steps are included:
[0086] S1. Obtain the base state power flow results to be identified for the new energy power grid;
[0087] S2. Input the base state power flow results to be identified into the risk weak link identification model of the pre-trained graph attention network, output the weak lines of power grid operation risk, and realize the identification of weak links in the power grid;
[0088] The risk weak link identification model of the pre-trained graph attention network is obtained through the following steps: obtaining the classification results of all lines under the new energy operation scenario; constructing the risk weak link identification model of the graph attention network, and inputting the classification results of all lines under the new energy operation scenario into the risk weak link identification model of the graph attention network for training, so as to obtain the risk weak link identification model of the pre-trained graph attention network.
[0089] Get the classification results of all lines in the new energy operation scenario, specifically:
[0090] According to the historical forecast data and actual data of renewable energy power generation in the power grid, the probability distribution of forecast errors is statistically analyzed, and new energy scenarios are generated as data sources through sampling;
[0091] Perform base state power flow calculation on new energy scenario data to obtain power flow calculation results;
[0092] Analyze the heavy overload conditions of the lines in all scenarios in the tide calculation results. If the line is overloaded, it is a weak line and is placed in the weak line set. The line in the corresponding scenario is marked as "weak" and will not be identified as weak in the future. If the line is not overloaded, the lines that are not identified as weak links constitute the line disconnection set as the candidate set of weak lines.
[0093] Traverse the new energy operation scenarios, disconnect the lines in the weak line candidate set in the scenario one by one, calculate the power flow after the line is disconnected, and count the heavy overload power flow transfer caused by the current line disconnection;
[0094] After the calculation of the disconnection flow of the candidate set of weak lines is completed, the flow transfer before and after the line is disconnected is compared to determine whether the disconnected line is a weak link. If so, it is marked as "weak"; if it is not a weak line, it is marked as "non-weak"; after the disconnected lines are traversed, the initial classification results of whether all lines are weak in the new energy operation scenario are obtained.
[0095] The risk weak link identification model of the graph attention network is constructed as follows:
[0096] The risk weak link identification model of graph attention network includes graph attention network input features, loss function, Softmax function classifier and back propagation optimization.
[0097] The input features of the graph attention network are specifically:
[0098] Determine the input information of the risk weak link identification model as the input of the graph attention network, including the initial attribute X and the association matrix A of the nodes in the "graph network", and divide the initial attribute information of the nodes in the "graph network" into topological importance characteristics and flow condition characteristics; select the initial attribute as the node initial feature vector of the "graph network" node;
[0099] Among them, the topological importance features include the edge degree index x of the line 1i and edge betweenness index x 2i ; The power flow characteristics include the line transmission capacity x 3i , transmission margin x 4i , load factor x 5i , power flow transfer degree x 6i .
[0100] The loss function is specifically:
[0101] In the new energy operation scenario, the weighted cross entropy function is used to form the loss function:
[0102]
[0103] Where loss is the loss function, t is the number of “graph network” nodes in a single training. If the weak lines of power grid operation risk are identified, t is the number of lines in a single training. If the weak nodes of power grid operation risk are identified, t is the number of nodes in a single training. c i is the category of the weak link of power grid operation risk. If the node or line involved in the training is the weak link of power grid operation, then c i The value is 1, otherwise the value is 0; p 1i and p 2i They respectively represent the probability value of sample i participating in the training being a weak link or a non-weak link with a high proportion of new energy operation risk; w weak is the weight when the sample is a weak point of power grid operation risk, w non-weak Represents the weight of the sample’s non-grid operation risk weaknesses.
[0104] The Softmax function classifier is specifically:
[0105]
[0106] Among them, p i is the risk vulnerability probability vector of training sample i, p 1i represents the probability that node i in the “graph network” is a risk weak link, p 2i represents the probability that node i in the “graph network” does not belong to the risk weak link, and the category with a larger probability value is taken as the category to which node i in the “graph network” belongs; y i is the node attribute vector after input X transformation and aggregation, with dimension set to 2, i.e. y i =[y 1i ,y 2i ] Τ ,y 1i and 2i All of them are aggregated attribute information.
[0107] The back propagation optimization is specifically as follows:
[0108] Using the SGD optimizer, the node features of the obtained "graph network" are optimized to obtain the optimal conversion matrix as follows:
[0109]
[0110] Among them, W j+1is the model parameter matrix of the j+1th iteration, W j is the model parameter matrix of the jth iteration, W is the model parameter, γ is the learning rate, and j is the number of iterations.
[0111] The classification results of all lines under the new energy operation scenario are input into the risk weak link identification model of the graph attention network for training, specifically:
[0112] Get the "graph network" node, calculate the attention coefficient of node i and its neighboring nodes in the "graph network", perform weighted aggregation of node and neighboring node information, take the mean of node features under multi-head attention, iterate the risk weak link identification model of the graph attention network, output the optimal risk weak link identification model of the graph attention network when the validation set loss function remains unchanged, and complete the training of the risk weak link identification model of the graph attention network when the maximum number of iterations is reached.
[0113] The method for identifying weak links in new energy power grids based on graph attention network proposed in the present invention can be roughly divided into the steps of generating and processing high-proportion new energy scenario data, dividing training sets, validation sets, and test sets, constructing a risk weak link identification model of graph attention network, model training, and online identification of risk weak links in daily operation of power grids. The construction of high-proportion new energy scenarios and graph attention network model training can be performed offline, and weak link identification and quantitative evaluation can be performed online. For the specific process, see Figure 2 , the detailed steps are as follows:
[0114] Step 1: Construct and process high-proportion new energy scenario data to provide training samples for the graph attention network model.
[0115] The specific processing flow is as follows Figure 3 As shown, the detailed steps include:
[0116] 1) Based on the historical forecast and actual data of renewable energy power generation in the power grid, the statistical forecast error probability distribution is calculated, and a high proportion of renewable energy scenarios are generated as data sources through sampling:
[0117] Assume that the random variables x in each period of the new energy uncertain time series scenario i The cumulative distribution function is F(x i ), then the sampling value obtained by Latin hypercube (LHS) sampling is:
[0118] x=F i -1 (U')=F i -1 ((U+n-1) / N) In the formula, x is the sampling value, U'=(U+n-1) / N, which means the random number of the nth subinterval after dividing the [0,1] interval into N equal parts, U∈[0,1].
[0119] The sampling steps of time series scenes based on sampling probability interval correction are as follows:
[0120] (1) According to the cumulative distribution of the prediction error corresponding to the power of the new energy at the first moment, use LHS to sample n prediction error values, superimpose the prediction values and convert them into n initial scenario values;
[0121] (2) Use a random sampling method to sample the prediction error value of the power at the next moment, and superimpose the prediction value at the current moment to convert it into an output value, and judge whether the fluctuation between the current sampling value and the previous sampling value is within the limit fluctuation range of new energy on a day with similar weather. If it exceeds this range, the sampling is considered invalid and re-sampling is performed until the output value sampled at the current moment and the output value at the previous moment meet the constraint of the limit fluctuation;
[0122] (3) Repeat step (2) until sampling at all times is completed;
[0123] (4) Organize and generate n renewable energy output timing scenarios P new =[P1,...,P n ] Τ , LHS and random sampling are both equal probability sampling, so the probability of each time series scenario generated is 1 / n.
[0124] 2) Obtain grid topology data and conventional thermal power generation data P G =[P G1 ,...,P Gn ] Τ , load data P load =[P L1 ,...,P Ln ] Τ etc., to perform base state power flow calculations on high proportion of new energy scenario data;
[0125] 3) Analyze the heavy overload conditions of the line in all scenarios. If the line is overloaded, it is considered a weak line and put into the weak line set L. weak1 In the process of detecting and identifying weak lines in the corresponding scenarios, the lines are marked as "weak" and no weak lines need to be identified later.
[0126] 4) After analysis in step 3), the lines that are not identified as weak links constitute a line disconnection set, which is used as a candidate set of weak lines;
[0127] 5) Traverse the high-proportion new energy operation scenario, disconnect the lines of the weak line candidate set in the scenario one by one, calculate the power flow after the line is disconnected, and count the heavy overload power flow transfer caused by the current line disconnection;
[0128] 6) After the calculation of the disconnection flow of the candidate set of weak lines is completed, the flow transfer before and after the line is disconnected is compared to determine whether the disconnected line is a weak link. If so, it is marked as "weak". If not, it is marked as "non-weak".
[0129] 7) After the above steps are completed, the initial classification results of whether all lines are weak in the high-proportion new energy operation scenario can be obtained, which can be used as input data for the high-proportion new energy risk weak link identifier based on the graph attention algorithm.
[0130] Step 2: Divide the input data into training set, validation set and test set with a ratio of 7:2:1, which are used to train the model, verify and test the model effect respectively;
[0131] Step 3: Construct a risk weak link identification model of the graph attention network, which includes graph attention network input features, loss function, Softmax function classifier, and back propagation optimization;
[0132] 1) First, determine the input information of the risk weak link identification model as the input of the graph attention network. The input includes the initial attributes X and the association matrix A of the nodes in the "graph network". This method divides the initial attribute information of the nodes in the "graph network" into two aspects, namely topological importance and tidal conditions, and selects the appropriate initial attributes of the identification object as the node initial feature vector of the "graph network" node.
[0133] Topological importance feature: edge degree index x of the line 1i , edge betweenness index x 2i ;
[0134] Power flow condition characteristics: line transmission capacity x 3i , transmission margin x 4i , load factor x 5i , power flow transfer degree x 6i .
[0135] The topological importance index for weak line identification is selected from the perspective of network structure, and the edge degree index or edge betweenness index of the line is obtained to measure its importance in the entire power network. The flow condition is mainly considered from the operating status, such as transmission margin, load rate, etc., which can reflect the operation status of the line. When the transmission margin is small or the load rate is too high, the line risk is greater.
[0136] 2) Loss function and Softmax function classifier.
[0137] In the constructed high-proportion new energy operation scenario, there may be an imbalance between the number of samples of grid operation risk weaknesses. In practical applications, more attention is paid to the evaluation accuracy of grid operation risk weaknesses. The weighted cross entropy function is used to form the loss function in training:
[0138]
[0139] Where t is the number of “graph network” nodes in a single training. If the weak lines of power grid operation risk are identified, t is the number of lines in a single training. If the weak nodes of power grid operation risk are identified, t is the number of nodes in a single training. i is the category of the weak link of power grid operation risk. If the node or line involved in the training is the weak link of power grid operation, then c i The value is 1, otherwise the value is 0; p 1i and p 2i They respectively represent the probability value of the sample i participating in the training being a weak link or a non-weak link with a high proportion of new energy operation risk, which can be obtained by normalizing and calculating the Softmax function as follows:
[0140]
[0141] In the formula, p 1i 、p 2i They represent the probability that node i in the “graph network” belongs to a risk weak link or not, and the category with a larger probability value is taken as the category to which node i in the “graph network” belongs. i is the node attribute vector after input X transformation and aggregation, with dimension set to 2, i.e. y i =[y 1i ,y 2i ] Τ , w weak is the weight when the sample is a weak point of power grid operation risk, w non-weak Represents the weight of the sample’s non-grid operation risk weaknesses.
[0142] 3) Back propagation optimization.
[0143] The SGD (stochastic gradient descent) optimizer is used to optimize the node features of the obtained “graph network” to obtain the optimal transformation matrix W.
[0144]
[0145] Where W is the parameter of the model, γ is the learning rate, and j is the number of iterations.
[0146] Step 4, model training process: input the "graph network" information set, calculate the attention coefficient of node i and neighbor nodes in the "graph network", weighted aggregate node and neighbor node information, take the mean of node features under multi-head attention, iterate the risk weak link identification model, output the optimal model when the validation set loss function remains unchanged, and complete the model training when the maximum number of iterations J is reached. Input the test set data into the identification model, calculate the accuracy, precision and recall of the model identification results, and comprehensively evaluate the test results.
[0147] The parameters shown in the following table are used for model training. The configuration of the laboratory simulation server is as follows: the server model is Intel(R) Core(TM) i5-2400, the number of servers is 1, the server has 4 cores, the main frequency is 3.10GHz, and the memory is 32G.
[0148] Table 1 Model training parameters
[0149] epochs lr weight_decay hidden nb_heads dropout alpha 500 0.005 5e-4 16 8 0.1 0.2
[0150] As shown in Table 1, epochs is the number of model training times, lr stands for learn rate, which refers to the learning rate of the model, weight_decay is the weight decay coefficient, hidden is the number of hidden layers of the model, nb_heads is the number of attention heads, and dropout is the probability of randomly discarding hidden layer nodes. Based on the above parameters, the model training results are as follows Figure 4 and Figure 5 As shown in the figure, with the increase of the number of iterations, the accuracy of the training set and the validation set gradually increased, and the model error loss gradually decreased. The highest accuracy of the training set was 0.84, and the highest accuracy of the validation set was 0.86.
[0151] Step 5. Online identification of weak links in daily operation risks of the power grid: During the online application process, the new energy power generation forecast, load forecast, unit power generation plan and power grid topology data for a total of 16 points in the four hours of the power grid are obtained. The base state power flow results of 16 points are obtained through power flow calculation as the input of the model. The risk weak link identification model gives the weak lines of power grid operation risks at 16 time points in turn.
[0152] The grid risk weak link identifier based on the graph attention network of the present invention can be trained offline and applied online, effectively improving the efficiency of online identification of weak lines; by using high-proportion new energy scenario data for model training, weak lines in high-proportion new energy grid risk scenarios can be identified.
[0153] Example 2
[0154] The present invention proposes a new energy grid weak link identification system based on graph attention network, such as Figure 6 As shown, including:
[0155] A data acquisition module is used to obtain the base state power flow results to be identified in the new energy power grid;
[0156] The data processing module is used to input the base state power flow results to be identified into the risk weak link identification model of the pre-trained graph attention network, output the risk weak lines of the power grid operation, and realize the identification of the weak links of the power grid;
[0157] Get the classification results of all lines in the new energy operation scenario, specifically:
[0158] According to the historical forecast data and actual data of renewable energy power generation in the power grid, the probability distribution of forecast errors is statistically analyzed, and new energy scenarios are generated as data sources through sampling;
[0159] Perform base state power flow calculation on new energy scenario data to obtain power flow calculation results;
[0160] Analyze the heavy overload conditions of the lines in all scenarios in the tide calculation results. If the line is overloaded, it is a weak line and is placed in the weak line set. The line in the corresponding scenario is marked as "weak" and will not be identified as weak in the future. If the line is not overloaded, the lines that are not identified as weak links constitute the line disconnection set as the candidate set of weak lines.
[0161] Traverse the new energy operation scenarios, disconnect the lines in the weak line candidate set in the scenario one by one, calculate the power flow after the line is disconnected, and count the heavy overload power flow transfer caused by the current line disconnection;
[0162] After the calculation of the disconnection flow of the candidate set of weak lines is completed, the flow transfer before and after the line is disconnected is compared to determine whether the disconnected line is a weak link. If so, it is marked as "weak"; if it is not a weak line, it is marked as "non-weak"; after the disconnected lines are traversed, the initial classification results of whether all lines are weak in the new energy operation scenario are obtained.
[0163] The risk weak link identification model of the graph attention network is constructed as follows:
[0164] The risk weak link identification model of graph attention network includes graph attention network input features, loss function, Softmax function classifier and back propagation optimization.
[0165] The input features of the graph attention network are specifically:
[0166] Determine the input information of the risk weak link identification model as the input of the graph attention network, including the initial attribute X and the association matrix A of the nodes in the "graph network", and divide the initial attribute information of the nodes in the "graph network" into topological importance characteristics and flow condition characteristics; select the initial attribute as the node initial feature vector of the "graph network" node;
[0167] Among them, the topological importance features include the edge degree index x of the line 1i and edge betweenness index x 2i ; The power flow characteristics include the line transmission capacity x 3i , transmission margin x 4i , load factor x 5i , power flow transfer degree x 6i ;
[0168] The loss function is specifically:
[0169] In the new energy operation scenario, the weighted cross entropy function is used to form the loss function:
[0170]
[0171] Where loss is the loss function, t is the number of “graph network” nodes in a single training. If the weak lines of power grid operation risk are identified, t is the number of lines in a single training. If the weak nodes of power grid operation risk are identified, t is the number of nodes in a single training. c i is the category of the weak link of power grid operation risk. If the node or line involved in the training is the weak link of power grid operation, then c i The value is 1, otherwise the value is 0; p 1i and p 2i They respectively represent the probability value of sample i participating in the training being a weak link or a non-weak link with a high proportion of new energy operation risk; w weak is the weight when the sample is a weak point of power grid operation risk, w non-weak Represents the weight of the sample’s non-grid operation risk weaknesses.
[0172] The Softmax function classifier is specifically:
[0173]
[0174] Among them, p i is the risk vulnerability probability vector of training sample i, p 1i represents the probability that node i in the “graph network” is a risk weak link, p 2i represents the probability that node i in the “graph network” does not belong to the risk weak link, and the category with a larger probability value is taken as the category to which node i in the “graph network” belongs; y iis the node attribute vector after input X transformation and aggregation, with dimension set to 2, i.e. y i =[y 1i ,y 2i ] Τ ,y 1i and 2i All of them are aggregated attribute information.
[0175] The back propagation optimization is specifically as follows:
[0176] Using the SGD optimizer, the node features of the obtained "graph network" are optimized to obtain the optimal conversion matrix as follows:
[0177]
[0178] Among them, W j+1 is the model parameter matrix of the j+1th iteration, W j is the model parameter matrix of the jth iteration, W is the model parameter, γ is the learning rate, and j is the number of iterations.
[0179] The classification results of all lines under the new energy operation scenario are input into the risk weak link identification model of the graph attention network for training, specifically:
[0180] Get the "graph network" node, calculate the attention coefficient of node i and its neighboring nodes in the "graph network", perform weighted aggregation of node and neighboring node information, take the mean of node features under multi-head attention, iterate the risk weak link identification model of the graph attention network, output the optimal risk weak link identification model of the graph attention network when the validation set loss function remains unchanged, and complete the training of the risk weak link identification model of the graph attention network when the maximum number of iterations is reached.
[0181] Example 3
[0182] See also Figure 7 As shown, the present invention also provides an electronic device 100 for identifying weak links in a new energy power grid based on a graph attention network; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
[0183] The memory 101 can be used to store the computer program 103, and the processor 102 implements the steps of the weak link identification method of the new energy grid based on the graph attention network described in Example 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data (such as audio data) created according to the use of the electronic device 100. In addition, the memory 101 can include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0184] The at least one processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and uses various interfaces and lines to connect various parts of the entire electronic device 100.
[0185] The memory 101 in the electronic device 100 stores a plurality of instructions to implement a method for identifying weak links in a new energy grid based on a graph attention network, and the processor 102 can execute the plurality of instructions to implement:
[0186] Obtain the base state power flow results to be identified for the new energy grid;
[0187] The base state power flow results to be identified are input into the risk weak link identification model of the pre-trained graph attention network, and the weak lines of power grid operation risk are output to realize the identification of weak links in the power grid;
[0188] The risk weak link identification model of the pre-trained graph attention network is obtained through the following steps: obtaining the classification results of all lines under the new energy operation scenario; constructing the risk weak link identification model of the graph attention network, and inputting the classification results of all lines under the new energy operation scenario into the risk weak link identification model of the graph attention network for training, so as to obtain the risk weak link identification model of the pre-trained graph attention network.
[0189] Example 4
[0190] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory and read-only memory (ROM, Read-Only Memory).
[0191] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0192] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0193] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0194] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0195] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for identifying weak links in new energy power grids based on graph attention network, It is characterized in that The steps include: Obtain the base state power flow results to be identified for the new energy grid; The base state power flow results to be identified are input into the risk weak link identification model of the pre-trained graph attention network, and the weak lines of power grid operation risk are output to realize the identification of weak links in the power grid; The risk weak link identification model of the pre-trained graph attention network is obtained through the following steps: obtaining the classification results of all lines under the new energy operation scenario; constructing the risk weak link identification model of the graph attention network, and inputting the classification results of all lines under the new energy operation scenario into the risk weak link identification model of the graph attention network for training, so as to obtain the risk weak link identification model of the pre-trained graph attention network.
2. According to the method for identifying weak links in new energy power grids based on graph attention network according to claim 1, It is characterized in that Get the classification results of all lines in the new energy operation scenario, specifically: According to the historical forecast data and actual data of renewable energy power generation in the power grid, the probability distribution of forecast errors is statistically analyzed, and new energy scenarios are generated as data sources through sampling; Perform base state power flow calculation on new energy scenario data to obtain power flow calculation results; Analyze the heavy overload conditions of the lines in all scenarios in the tide calculation results. If the line is overloaded, it is a weak line and is placed in the weak line set. The lines in the corresponding scenarios are marked as weak and will not be identified as weak in the future. If the line is not overloaded, the lines that are not identified as weak links constitute the line disconnection set, which serves as the candidate set of weak lines; Traverse the new energy operation scenarios, disconnect the lines in the weak line candidate set in the scenario one by one, calculate the power flow after the line is disconnected, and count the heavy overload power flow transfer caused by the current line disconnection; After the calculation of the disconnection power flow of the candidate set of weak lines is completed, the power flow transfer before and after the line is disconnected is compared to determine whether the disconnected line is a weak link. If so, it is marked as weak. If not, it is marked as non-weak. After the disconnected lines are traversed, the initial classification results of whether all lines are weak in the new energy operation scenario are obtained.
3. According to the method for identifying weak links in new energy power grids based on graph attention network according to claim 1, It is characterized in that The risk weak link identification model of the graph attention network is constructed as follows: The risk weak link identification model of graph attention network includes graph attention network input features, loss function, Softmax function classifier and back propagation optimization.
4. According to claim 3, the method for identifying weak links in new energy power grids based on graph attention network, It is characterized in that The input features of the graph attention network are specifically: Determine the input information of the risk weak link identification model as the input of the graph attention network, the input includes the initial attribute X and the association matrix A of the nodes in the graph network, and divide the initial attribute information of the nodes in the graph network into topological importance features and flow condition features; Selecting initial attributes as initial feature vectors of nodes in the graph network; Among them, the topological importance features include the edge degree index x of the line 1i and edge betweenness index x 2i ; The power flow characteristics include the line transmission capacity x 3i , transmission margin x 4i , load factor x 5i , power flow transfer degree x 6i .
5. According to the method for identifying weak links in new energy power grids based on graph attention network according to claim 3, It is characterized in that The loss function is specifically: In the new energy operation scenario, the weighted cross entropy function is used to form the loss function: Where, loss is the loss function, t is the number of graph network nodes in a single training. If the weak lines of power grid operation risk are identified, t is the number of lines in a single training. If the weak nodes of power grid operation risk are identified, t is the number of nodes in a single training. c i is the category of the weak link of power grid operation risk. If the node or line involved in the training is the weak link of power grid operation, then c i The value is 1, otherwise the value is 0; p 1i and p 2i They respectively represent the probability value of sample i participating in the training being a weak link or a non-weak link with a high proportion of new energy operation risk; w weak is the weight when the sample is a weak point of power grid operation risk, w non-weak Represents the weight of the sample’s non-grid operation risk weaknesses.
6. According to claim 3, the method for identifying weak links in new energy power grids based on graph attention network, It is characterized in that The Softmax function classifier is specifically: Among them, p i is the risk vulnerability probability vector of training sample i, p 1i represents the probability that node i in the graph network is a risk weak link, p 2i Represents the probability that node i in the graph network does not belong to the risk weak link, and the category with a larger probability value is taken as the category to which node i in the graph network belongs; y i is the node attribute vector after input X transformation and aggregation, with dimension set to 2, i.e. y i =[y 1i ,y 2i ] Τ ,y 1i and 2i All of them are aggregated attribute information.
7. According to claim 3, the method for identifying weak links in new energy power grids based on graph attention network, It is characterized in that The back propagation optimization is specifically as follows: Using the SGD optimizer, the obtained graph network node features are optimized to obtain the optimal conversion matrix as follows: Among them, W j+1 is the model parameter matrix of the j+1th iteration, W j is the model parameter matrix of the jth iteration, W is the model parameter, γ is the learning rate, and j is the number of iterations.
8. The method for identifying weak links in new energy power grids based on graph attention network according to claim 1, It is characterized in that The classification results of all lines under the new energy operation scenario are input into the risk weak link identification model of the graph attention network for training, specifically: Get the graph network nodes, calculate the attention coefficients of node i and its neighboring nodes in the graph network, perform weighted aggregation of node and neighbor node information, take the mean of node features under multi-head attention, iterate the risk weak link identification model of the graph attention network, output the optimal risk weak link identification model of the graph attention network when the validation set loss function remains unchanged, and complete the training of the risk weak link identification model of the graph attention network when the maximum number of iterations is reached.
9. A new energy grid weak link identification system based on graph attention network, It is characterized in that include: A data acquisition module is used to obtain the base state power flow results to be identified in the new energy power grid; The data processing module is used to input the base state power flow results to be identified into the risk weak link identification model of the pre-trained graph attention network, output the weak lines of power grid operation risk, and realize the identification of weak links in the power grid; The risk weak link identification model of the pre-trained graph attention network is obtained through the following steps: obtaining the classification results of all lines under the new energy operation scenario; constructing the risk weak link identification model of the graph attention network, and inputting the classification results of all lines under the new energy operation scenario into the risk weak link identification model of the graph attention network for training, so as to obtain the risk weak link identification model of the pre-trained graph attention network.
10. The new energy grid weak link identification system based on graph attention network according to claim 9, It is characterized in that Get the classification results of all lines in the new energy operation scenario, specifically: According to the historical forecast data and actual data of renewable energy power generation in the power grid, the probability distribution of forecast errors is statistically analyzed, and new energy scenarios are generated as data sources through sampling; Perform base state power flow calculation on new energy scenario data to obtain power flow calculation results; Analyze the heavy overload conditions of the lines in all scenarios in the tide calculation results. If the line is overloaded, it is a weak line and is placed in the weak line set. The lines in the corresponding scenarios are marked as weak and will not be identified as weak in the future. If the line is not overloaded, the lines that are not identified as weak links constitute the line disconnection set, which serves as the candidate set of weak lines; Traverse the new energy operation scenarios, disconnect the lines in the weak line candidate set in the scenario one by one, calculate the power flow after the line is disconnected, and count the heavy overload power flow transfer caused by the current line disconnection; After the calculation of the disconnection power flow of the candidate set of weak lines is completed, the power flow transfer before and after the line is disconnected is compared to determine whether the disconnected line is a weak link. If so, it is marked as weak. If not, it is marked as non-weak. After the disconnected lines are traversed, the initial classification results of whether all lines are weak in the new energy operation scenario are obtained.
11. The new energy grid weak link identification system based on graph attention network according to claim 9, It is characterized in that The risk weak link identification model of the graph attention network is constructed as follows: The risk weak link identification model of graph attention network includes graph attention network input features, loss function, Softmax function classifier and back propagation optimization.
12. The new energy grid weak link identification system based on graph attention network according to claim 11, It is characterized in that The input features of the graph attention network are specifically: Determine the input information of the risk weak link identification model as the input of the graph attention network, the input includes the initial attribute X and the association matrix A of the nodes in the graph network, and divide the initial attribute information of the nodes in the graph network into topological importance features and flow condition features; Selecting initial attributes as initial feature vectors of nodes in the graph network; Among them, the topological importance features include the edge degree index x of the line 1i and edge betweenness index x 2i ; The power flow characteristics include the line transmission capacity x 3i , transmission margin x 4i , load factor x 5i , power flow transfer degree x 6i .
13. The new energy grid weak link identification system based on graph attention network according to claim 11, It is characterized in that The loss function is specifically: In the new energy operation scenario, the weighted cross entropy function is used to form the loss function: Where, loss is the loss function, t is the number of graph network nodes in a single training. If the weak lines of power grid operation risk are identified, t is the number of lines in a single training. If the weak nodes of power grid operation risk are identified, t is the number of nodes in a single training. c i is the category of the weak link of power grid operation risk. If the node or line involved in the training is the weak link of power grid operation, then c i The value is 1, otherwise the value is 0; p 1i and p 2i They respectively represent the probability value of sample i participating in the training being a weak link or a non-weak link with a high proportion of new energy operation risk; w weak is the weight when the sample is a weak point of power grid operation risk, w non-weak Represents the weight of the sample’s non-grid operation risk weaknesses.
14. The new energy grid weak link identification system based on graph attention network according to claim 11, It is characterized in that The Softmax function classifier is specifically: Among them, p i is the risk vulnerability probability vector of training sample i, p 1i represents the probability that node i in the graph network is a risk weak link, p 2i Represents the probability that node i in the graph network does not belong to the risk weak link, and the category with a larger probability value is taken as the category to which node i in the graph network belongs; y i is the node attribute vector after input X transformation and aggregation, with dimension set to 2, i.e. y i =[y 1i ,y 2i ] Τ ,y 1i and 2i All of them are aggregated attribute information.
15. The new energy grid weak link identification system based on graph attention network according to claim 11, It is characterized in that The back propagation optimization is specifically as follows: Using the SGD optimizer, the obtained graph network node features are optimized to obtain the optimal conversion matrix as follows: Among them, W j+1 is the model parameter matrix of the j+1th iteration, W j is the model parameter matrix of the jth iteration, W is the model parameter, γ is the learning rate, and j is the number of iterations.
16. The new energy grid weak link identification system based on graph attention network according to claim 9, It is characterized in that The classification results of all lines under the new energy operation scenario are input into the risk weak link identification model of the graph attention network for training, specifically: Get the graph network nodes, calculate the attention coefficients of node i and its neighboring nodes in the graph network, perform weighted aggregation of node and neighbor node information, take the mean of node features under multi-head attention, iterate the risk weak link identification model of the graph attention network, output the optimal risk weak link identification model of the graph attention network when the validation set loss function remains unchanged, and complete the training of the risk weak link identification model of the graph attention network when the maximum number of iterations is reached.
17. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method for identifying weak links in a new energy power grid based on a graph attention network as described in any one of claims 1 to 8 are implemented.
18. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the method for identifying weak links in a new energy power grid based on a graph attention network are implemented as described in any one of claims 1 to 8.
Citation Information
Cited By
Power grid resource planning method and system based on weak voltage region
CN120834574A
