A data-driven power angle stable online grouping method and system
By constructing a data-driven convolutional neural network model, the accuracy and computing efficiency problems of the power system's work angle stable online grouping method under limited time data are solved, and fast and accurate generator grouping is achieved, supporting stable control of the power system.
Patent Information
- Application Number
- CN202510155855.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2045-02-12
AI Technical Summary
The existing power system stable online grouping method has low accuracy when it is based on limited time state data, and the grouping calculation of large-scale power systems takes time, making it difficult to meet the needs of rapid control measures.
Using a data-driven method, a clustering model is constructed using a convolutional neural network (CNN), a clustering model is constructed by building a power grid operation and failure scenario set, recording instable scenario data, determining the relevant physical quantities, constructing sample sets and label sets, training the CNN network, and using generators to run data online for rapid clustering.
In a variety of fault scenarios, the real-time status information in a short time window is used to accurately and quickly identify the leading and lagging groups, avoid the dimensional disaster of calculation, improve the timeliness and accuracy of group calculations, and support the stable control of the new power system.
Smart Images

Figure CN119989918B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power system stability control, and in particular relates to a data-driven power angle stabilization online grouping method and system. Background Art
[0002] Renewable energy sources such as wind power and photovoltaics are experiencing rapid development, but this has drastically changed the structural complexity and stability of power systems. The dynamic characteristics of power systems are also becoming increasingly complex, placing increasing demands on system stability. Power system power angle stability, a crucial component of safe and stable power system operation, relies primarily on stability control. With the widespread installation and improvement of phasor measurement units (PMUs) and wide-area measurement systems (WAMS) in recent years, the difficulty of obtaining real-time time-series measurement information on power system operating conditions has been greatly reduced. Online control of power system power angle stability has become a major development direction. In the online control of power system power angle stability, grouping and equal-value aggregation of generators within the system are essential steps. The results are used for online determination of power angle stability and quantification of stability margins, providing data support for the selection of control measures. This also simplifies the system model, reduces computational cost, and improves computational efficiency. Generator grouping involves classifying generators into relatively advanced and relatively lagging groups based on the lead-lag relationship between their power angles in power angle instability scenarios. The accuracy of grouping directly affects the accuracy of stability judgment and the calculation of stability margin, which in turn affects the rationality of the selection of control measures.
[0003] At present, the main methods used for clustering are K-means clustering algorithm, maximum power angle difference algorithm, etc. The main idea is to analyze the power angle curves of each generator collected within a limited time, and directly divide each group by judging whether the power angle time series data between each generator meets the homology criterion. The above method directly uses the power angle time series data of the generator as the basis for clustering. After obtaining data points of sufficient time length, the clustering result is relatively accurate. However, when the time length of the collected data is short and insufficient to show an obvious clustering trend, the accuracy of clustering is difficult to guarantee. On the other hand, due to the complexity of the system structure, large-scale power systems often take a lot of time to solve and select stable control measures. Therefore, it is required to cluster and give control measures as soon as possible based on finite time data. In summary, the existing clustering methods have high requirements on data time length and computing power, while online stability control needs to cluster and give control measures based on finite time data as soon as possible. There is a significant contradiction between the two. There is an urgent need for an accurate clustering method based on finite time operation data. Summary of the Invention
[0004] In order to solve the above technical problems, the present invention proposes a data-driven power angle stable online grouping method and system, which can accurately and quickly identify the leading group and the lagging group under various fault scenarios by utilizing the real-time status information of each generator within a short time window.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] A data-driven power angle stable online grouping method includes the following steps:
[0007] Construct the operation scenarios of the power grid and the fault scenario sets under the operation scenarios; perform dynamic simulation of the fault processes of the generator under all operation scenarios and record the simulation data under the instability scenario;
[0008] Generators are grouped based on simulation data under instability scenarios, and group labels are added to each unit under each instability scenario based on the grouping results; physical quantities that are strongly correlated with generator grouping are determined, and the physical quantities form a sample set and label set used to construct a clustering network;
[0009] Constructing a convolutional neural network for power angle stabilization online clustering, selecting a preset proportion of sample sets and a preset proportion of label sets as training sets, and the remaining sample sets and the remaining label sets as test sets; adjusting the structure of the training sets to obtain a training set data matrix and training set labels, and adjusting the structure of the test sets to obtain a test set data matrix and test set labels; and training the convolutional neural network using the training set data matrix and training set labels to obtain a trained convolutional neural network;
[0010] The online operation data of the generator is obtained and input into the trained convolutional neural network. The output of the convolutional neural network is converted into a clustering result by setting a probability threshold, thereby completing the online clustering of the generator power angle stability.
[0011] The present invention also proposes a data-driven power angle stable online clustering system, comprising: a data acquisition module, a sample construction module, a network construction module and a clustering module;
[0012] The data acquisition module is used to construct the operation scenario of the power grid and the fault scenario set under the operation scenario; perform dynamic simulation of each fault process of the generator under all operation scenarios, and record simulation data under the instability scenario;
[0013] The sample construction module is used to group the generators based on the simulation data under the instability scenario, and add a grouping label to each unit under each instability scenario based on the grouping results; determine the physical quantities that are strongly related to the generator grouping, and the physical quantities form the sample set and label set used to construct the clustering network;
[0014] The network construction module is used to construct a convolutional neural network for power angle stabilization online clustering, select a preset proportion of sample sets and a preset proportion of label sets as training sets, and the remaining sample sets and the remaining label sets as test sets; adjust the structure of the training set to obtain a training set data matrix and training set labels, and adjust the structure of the test set to obtain a test set data matrix and test set labels; use the training set data matrix and training set labels to train the convolutional neural network to obtain a trained convolutional neural network;
[0015] The clustering module is used to obtain online operation data of the generator, input the online operation data of the generator into the trained convolutional neural network, set the probability threshold to convert the output of the convolutional neural network into a clustering result, and complete online clustering with stable generator power angle.
[0016] The effects provided in the summary of the invention are only the effects of the embodiments, not all the effects of the invention. One of the above technical solutions has the following advantages or beneficial effects:
[0017] The present invention proposes a data-driven online grouping method and system for power angle stability, which includes the following steps: constructing an operation scenario of power grid operation and a set of fault scenarios under the operation scenario; performing dynamic simulation of each fault process of the generator under all operation scenarios, and recording simulation data under the instability scenario; grouping the generators based on the simulation data under the instability scenario, and adding a grouping label to each unit under each instability scenario based on the grouping result; determining a physical quantity strongly related to the generator grouping, and the physical quantity forms a sample set and a label set used to construct a grouping network; constructing a convolutional neural network for online grouping of power angle stability, and selecting preset The proportional sample set and the preset proportional label set are used as the training set, and the remaining sample set and the remaining label set are used as the test set; the structure of the training set is adjusted to obtain the training set data matrix and the training set label, and the structure of the test set is adjusted to obtain the test set data matrix and the test set label; the convolutional neural network is trained using the training set data matrix and the training set label to obtain the trained convolutional neural network; the online operation data of the generator is obtained, and the online operation data of the generator is input into the trained convolutional neural network, and the probability threshold is set to convert the output of the convolutional neural network into a clustering result, thereby completing the online clustering of the generator power angle stability. Based on a data-driven online clustering method for power angle stability, a data-driven online clustering system for power angle stability is also proposed. The present invention can realize the accurate and rapid identification of leading and lagging groups of generators in a variety of fault scenarios by using the real-time status information of each generator in a short time window.
[0018] The present invention uses a data-driven clustering method to effectively avoid the computational dimensionality disaster caused by the clustering method based on generator coherence in large-scale power systems, improves the timeliness of clustering calculations, and avoids the problem of low accuracy of existing clustering methods. It can provide support for the stability judgment and emergency control system of new power systems with growing stability control needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 This is a flow chart of a data-driven online grouping method for power angle stabilization proposed in Example 1 of the present invention;
[0020] Figure 2 This is a schematic diagram of the structure of a sample data set for network training and testing proposed in Example 1 of the present invention;
[0021] Figure 3 This is a flow chart of the generator clustering network construction based on the CNN neural network proposed in Example 1 of the present invention;
[0022] Figure 4 This is a schematic diagram of the multi-label binary classification CNN neural network structure for generator clustering proposed in Example 1 of the present invention;
[0023] Figure 5 This is the IEEE standard 10-machine 39-node topology diagram;
[0024] Figure 6 This is a schematic diagram of the clustering effect of the generator 10 clustering network based on the CNN neural network;
[0025] Figure 7 This is a schematic diagram of the clustering effect of the generator 1 clustering network based on the CNN neural network;
[0026] Figure 8 A schematic diagram of a data-driven power angle stable online grouping system is proposed for Example 2 of the present invention. DETAILED DESCRIPTION
[0027] In order to clearly illustrate the technical features of this solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The disclosure below provides many different embodiments or examples for realizing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. In addition, the present invention may repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplicity and clarity and does not itself indicate the relationship between the various embodiments and / or settings discussed. It should be noted that the components illustrated in the accompanying drawings are not necessarily drawn to scale. The present invention omits descriptions of well-known components and processing technologies and processes to avoid unnecessary limitations on the present invention.
[0028] Example 1
[0029] Embodiment 1 of the present invention proposes a data-driven online grouping method for power angle stability, which is used to solve the problem of low accuracy of the online grouping method for power angle stability control in the prior art when grouping based on finite-duration state data.
[0030] The present invention is suitable for power system power angle stability control with high requirements on the time limit for generating control measures and a relatively complete state information acquisition system. Based on the multi-dimensional binary classification theory, the CNN neural network is used as the main framework of the data-driven model. The shortest possible operating state time series data of each unit in the system is used as input, and the leading / lagging grouping status of each unit is used as output. Machine learning training is used to establish a mapping between the time series information of the power system generator power angle instability state and the grouping status of each generator, thereby realizing real-time online grouping of generators. Firstly, commercial transient simulation software is used to generate the state curves of each generator under various fault scenarios. The unstable scenarios are selected as the basic sample data through preliminary stability judgment. Then, the K-means method is used to group the generators in each unstable scenario to form a cluster label for each sample. Then, through mechanism analysis, the generator state operation data directly related to the clustering results are selected, and these data types are used as the input and output of the training samples. Then, a data-driven model structure is designed according to the input data type, and a CNN neural network for multi-dimensional binary classification is constructed. The sample structure is adjusted to adapt to the network input, and the training parameters are set to train the neural network model to obtain the online clustering mapping network of power-angle stable generators. Finally, based on the measurement data obtained online, the online clustering network of power-angle stable generators is called to realize online clustering.
[0031] Figure 1 This is a flow chart of a data-driven online grouping method for power angle stabilization proposed in Example 1 of the present invention;
[0032] In step 1, the operation scenario of the power grid and the set of fault scenarios under the operation scenario are constructed; dynamic simulation of each fault process of the generator under all operation scenarios is performed, and the simulation data under the instability scenario is recorded.
[0033] This part generates basic scenario samples by randomly combining factors affecting network operation to form typical fault scenarios, simulating and recording them. This part then performs a preliminary stability assessment and selects unstable scenarios as the basic operating data for constructing a training sample set. This mainly involves constructing power angle stability control application scenarios and determining stability.
[0034] In step 1.1, a grid fault scenario is constructed and electromechanical transient simulation is performed, taking into account changes in influencing factors such as the power system topology, operation mode, fault location, and duration.
[0035] The grid topology is set according to the grid structure that the power angle stabilization control needs to deal with. The possible load levels, generator startup methods and output levels are set for the grid structure. The above three factors are cross-combined to form an operation scenario set.
[0036] A power flow calculation is performed for each operating scenario, and statistics are collected on the power of generators, loads, transformers, lines and buses, and the line load rate. Based on the statistical results, the top 10% of line power and load rate, the top 1% of bus power, the top 1% of node load power, the top 1% of generator output, and the top 1% of transformer power are selected as key components. The scope of protection of the present invention is not limited to the proportions listed in Example 1, and those skilled in the art can make adjustments based on actual conditions and select other proportions.
[0037] Faults closely related to power angle stability are applied to each key component one by one, including: three-phase short circuit and disconnection of key lines, three-phase short circuit and disconnection of key buses, 100% load surge, generator tripping without fault, and three-phase short circuit and disconnection on the high-voltage side of the transformer. Possible fault durations are also set, and each fault and duration are cross-combined to form a set of fault scenarios.
[0038] Step 1.2: For each fault scenario obtained through simulation, determine whether the generator power angle is unstable based on the maximum power angle difference method, and record the analysis results of the instability scenario as the basic data for constructing training samples.
[0039] Select a fault scenario and record the power angle time series data of all generators after fault removal obtained in each simulation as:
[0040] Among them, δ i is a one-dimensional time series vector, representing the power angle of the i-th generator; 1≤i≤N, N is the total number of generators; δ i,t represents the power angle of the i-th generator at the t-th moment after the fault is cleared; 1≤t≤N tm ; N tm Indicates the total number of simulation moments, with an interval of 1ms between adjacent time points;
[0041] Calculate the power angle difference between each generator at the same time, and record the maximum value in the form of a time series vector, that is:
[0042]
[0043] Among them, Δδ tmax is the maximum power angle difference between the i-th generator and the j-th generator at time t; δ i,t is the power angle of the i-th generator at time t; δ j,t is the power angle of the jth generator at time t; Δδ max is Δδtmax The time series vector formed by increasing the time number t;
[0044] Calculate the transient stability index (TSI) of the system at each moment, specifically:
[0045]
[0046] Among them, T SI,t represents the transient stability index of the system at time t;
[0047] T SI,t The records are time series vectors, specifically:
[0048]
[0049] like Determine whether power angle instability occurs in this scenario, and the number of instability samples N S Add 1 and take the running scenario as an unstable sample; proceed to the next step; otherwise, return to step 1.2 and continue to judge the power angle stability of the next sample;
[0050] The operating data of the power system under the instability scenario obtained by simulation is recorded in the following time series form:
[0051]
[0052] Among them, X i represents the physical quantity corresponding to the i-th generator; X l Indicates the physical quantity corresponding to the lth node; the physical quantities specifically include generator power angle, speed, electromagnetic power, mechanical power, and node voltage frequency, amplitude, and phase angle; where X i,t represents the value of the physical quantity corresponding to the i-th generator at time t; X l,t Indicates the value of the physical quantity corresponding to the lth node at the tth time; N bus Indicates the number of nodes in the system.
[0053] In step 2, the generators are clustered based on the simulation data under the instability scenario, and cluster labels are added to each unit under each instability scenario based on the clustering results; physical quantities that are strongly related to the generator clustering are determined, and these physical quantities form the sample set and label set used to construct the clustering network;
[0054] This part is based on the recorded instability scenario simulation data. First, K-means is used to cluster the generators. Based on the clustering results, leading / lagging clustering labels are added to each unit in each instability scenario. Then, through mechanism analysis, the physical quantities that are strongly correlated with the generator clustering are determined. Finally, based on the selected physical quantities, data sample inputs and outputs are formed for clustering network construction.
[0055] Step 2.1 Based on the recorded simulation curves of the generators during the entire simulation period under each instability scenario, the K-means method is used to cluster all the generator curves into two groups, where the group with relatively advanced phase angles is marked as the leading group, and the group with relatively lagging phase angles is marked as the lagging group.
[0056] Calculate the Euclidean distance between any two power angle curves:
[0057]
[0058] Among them, D ij is the Euclidean distance between the power angle curves of the i-th and j-th generators;
[0059] Select the two curves with the largest Euclidean distance as the initial cluster centers C1 and C2 of cluster 1 and cluster 2, and write the corresponding curve column index (i.e., generator group number) into the index sets Ω1 and Ω2 of cluster 1 and cluster 2;
[0060] Choose any delta from the power angle curves of the remaining generators m (m=1,2,...,N,m≠i,j), the Euclidean distance between it and the cluster centers C1 and C2 is calculated using the following formula:
[0061]
[0062] Among them, D m,1 , D m,2 are the Euclidean distances between the power angle curve of the mth generator and the cluster centers C1 and C2 respectively; 1,t , C 2,t are the values of cluster centers C1 and C2 at time t respectively;
[0063] Contrast D m,1 and D m,2 Size relationship, if D m,1 >D m,2 , then the mth generator is classified as group 2 and the curve column index is merged into the index set Ω2, otherwise it is classified as group 1 and the curve column index is merged into the index set Ω1;
[0064] Further update the aggregation center of the two clusters, and the updated cluster center corresponds to the value C at the tth moment 1,t and C 2,t for:
[0065]
[0066] Where, are the number of generators in cluster 1 and cluster 2 respectively;
[0067] Check whether there are any remaining generator sets corresponding to the power angle curve δk If not classified, return to step 2.1 and recalculate the Euclidean distance between it and the cluster centers C1 and C2. Otherwise, proceed to the next step.
[0068] The average value of the computer cluster centers C1 and C2, and the leading and lagging clusters are distinguished based on the positive and negative difference:
[0069]
[0070] Among them, δ C1 , δ C2 are the average power angles of group 1 and group 2 respectively; if δ C1 >δ C2 , then cluster 1 is the leading cluster Ω S , cluster 2 is the lagging cluster Ω A ; On the contrary, if δ C1 <δ C2 , then cluster 2 is the leading cluster Ω S , cluster 1 is the lagging cluster Ω A ;
[0071] remember is the clustering label, which represents the clustering result of the generator in the kth sample, where the element for:
[0072]
[0073] Indicates the clustering result of the i-th generator in the k-th sample. A value of 0 indicates that the generator belongs to the lagging group, and a value of 1 indicates that the generator belongs to the leading group.
[0074] Step 2.2: Define the generator power angle and speed as coherence theory variables and select the generator power angle and speed as the grouping input variables.
[0075] The dynamic equation of a single generator rotor is:
[0076]
[0077] Among them, δ is the generator power angle; ω is the generator speed; P M Input mechanical power to the generator; P E The generator outputs electromagnetic power; T j is the moment of inertia of the generator; the moment of inertia of each generator is a constant value;
[0078] Generator power angle δ, generator speed ω, generator input mechanical power P M and the generator output electromagnetic power P E Forming the original sample;
[0079] The time series vectors in the original samples are spliced in the direction of data type so that the sample set and label as input are adapted to the network structure. Each original sample forms the following matrix:
[0080]
[0081] Among them, T k (k=1,2,...,N S ) represents the original data matrix formed by the kth original sample; the column vector represents the power angle time series data of the i-th generator in the k-th sample; represents the speed time series data of the i-th generator in the k-th sample; represents the output electromagnetic power time series data of the i-th generator in the k-th sample; represents the input mechanical power time series data of the i-th generator in the k-th sample; N S represents the number of unstable samples; N represents the number of generators or labels;
[0082] The time series data matrix T formed for different samples k , in the third dimension, the number of layers is spliced into N tm ×4N×N S The three-dimensional matrix forms the sample data set T total ,Right now:
[0083]
[0084] The row index represents the time number, the column index represents the data type, and the layer index represents the sample index. The specific structure is as follows: Figure 2 As shown, Figure 2 This is a schematic diagram of the sample data set structure for network training and testing proposed in Example 1 of the present invention.
[0085] To M k Splice to form a size of N×N S The two-dimensional matrix is recorded as the original label set M out ,Right now:
[0086]
[0087] The column index represents the sample number, the row index represents the generator set number (i.e., the number of labels), and the column index is the same as the number of instability samples and corresponds one to one.
[0088] In step 3, a convolutional neural network for power angle stabilization online clustering is constructed, and a preset proportion sample set and a preset proportion label set are selected as training sets, and the remaining sample set and the remaining label set are selected as test sets; the structure of the training set is adjusted to obtain a training set data matrix and training set labels, and the structure of the test set is adjusted to obtain a test set data matrix and test set labels; the convolutional neural network is trained using the training set data matrix and training set labels to obtain a trained convolutional neural network;
[0089] In step 3.1, Figure 3 This is a flowchart for constructing a generator clustering network based on a CNN neural network, as proposed in Example 1 of the present invention. An improved two-dimensional convolutional neural network model for multi-label binary classification is formed based on an improved standard two-dimensional convolutional neural network. The overall structure of the multi-dimensional binary classification CNN neural network includes: an input layer, several convolutional layers and activation function layers, a pooling layer, a DropOut layer, a fully connected layer, a sigmoid activation layer, and an output layer. After passing through the input layer, the data passes through three two-dimensional convolution-ReLU layers and pooling, and then enters two fully connected layers. After passing through the sigmoid and output layers, an N×1-dimensional column vector is obtained, in which each element represents the probability that the corresponding indexed generator belongs to the leading group after being judged by the model.
[0090] Figure 4 This is a schematic diagram of the multi-label binary classification CNN neural network structure for generator clustering proposed in Example 1 of the present invention;
[0091] The input layer network structure is N tn ×4N×N channel , according to the sample set data structure, determine N channel Is 1, thus determining that the input layer is a single channel N tn ×4N two-dimensional matrix;
[0092] The convolution layer uses 32 convolution kernels of size 5×5 and a sliding step size of [1,1].
[0093] The activation function layer uses the ReLU function as the activation function
[0094] Combine the convolution layer in step (2) and the ReLU activation function layer in step (3) into a convolution-ReLU layer, and repeat twice. The structure and number of convolution kernels in each group are the same as the first group, and the sliding step size is [1,5].
[0095] The pooling layer uses the Max-Pooling method, sets the pooling window to 2×1 and the stride to [1,1], and retains and strengthens the strong features in the feature map obtained by the convolution-ReLU layer;
[0096] The DropOut layer uses random dropout, and the dropout rate is set to 0.5;
[0097] The fully connected layer 1 contains 40×N neure The fully connected layer of neurons is used to summarize the high-dimensional feature data of the learning input. The fully connected layer 2 uses N neure The fully connected layer of neurons completes the mapping to the output, and the two are connected through the ReLU layer, where N neure =N;
[0098] The sigmoid activation layer compresses the output of each neuron to the (0,1) interval using the following formula:
[0099]
[0100] Here, x is the input of the sigmoid activation layer, that is, the output of the previous fully connected layer. The output of the function is always between (0, 1). Its output result can be interpreted as the model's predicted probability that a unit belongs to category 1, that is, the leading unit group;
[0101] An output layer is set up to measure the network's prediction performance and perform backpropagation to update the network. Based on the label set structure, the network output is determined to be an N×1-dimensional probability column vector, where each element represents the probability label of the corresponding generator group. A binary cross-entropy loss function is used to measure the prediction performance of each machine. The formula is:
[0102] L n =-(T·log(Y)+(1-T)·log(1-Y)),1≤n≤N; (16)
[0103] Among them L n is the binary cross entropy loss corresponding to the nth label. The average value of the loss function of each label is used to measure the prediction effect of all generators, and the multivariate cross entropy loss is obtained as the loss function, that is:
[0104]
[0105] In step 3.2, randomly select sample set T total and label set M out α (0 < α < 1) is used as the training set, and the remaining 1-α is used as the test set. The sample structure is adjusted to construct the input data and input labels, and appropriate training parameters are set to train the network. Specifically:
[0106] According to the distribution of training set α and test set 1-α, the number of training set samples p and the number of test set samples q are obtained:
[0107]
[0108] In the formula Indicates rounding down;
[0109] Use the randperm function to generate the number of unstable samples N from 1 S A random sequence of positive integers, denoted as vector R, is formed by intercepting the first P elements of vector R: The remaining elements form subvectors: Sure is the training set data matrix, is the training set label; is the test set data matrix, is the test set label; and the training set data matrix and the sample index of the training set label correspond one to one; the test set data matrix and the sample index of the test set label correspond one to one;
[0110] right Cut in the data timing direction and intercept the first N tn The time length used as the network input forms the sample data matrix for input Right now:
[0111]
[0112] in:
[0113]
[0114] right Cut in the data timing direction and intercept the first N tn The time length used as the network input forms the sample data matrix for testing
[0115] use and As the input of the convolutional neural network, the convolutional neural network is trained to obtain a trained convolutional neural network.
[0116] Step 3.3 Set the training parameters, select the Adam optimization algorithm, use the segmented adjustment learning rate scheduling strategy, set the initial learning rate, drop factor and mini-batch size according to the sample size and number of labels, and and training set labels The network built is called as input, the network is trained, and a mapping network for online grouping of generators under power angle instability is obtained and saved.
[0117] In step 4, the online operation data of the generator is obtained and input into the trained convolutional neural network. A probability threshold is set to convert the output of the convolutional neural network into a clustering result, thereby completing the online clustering of the generator power angle stability.
[0118] Based on the measurement data obtained online, sample input data that conforms to the input layer structure of the mapping network is constructed. The constructed clustering network is called to map the clustering probability vectors of each unit. The probability vectors are converted into label vectors through threshold comparison to obtain the generator clustering results.
[0119] Step 4.1 Record the online operation data of the generator. After the fault is cleared, record the PMU and WAMS devices from the moment the fault is cleared to N seconds after the fault is cleared. tn The working status data of each generator collected at each moment, including generator power angle, angular velocity, mechanical power, and electromagnetic power, are stored in the following variable matrix:
[0120] The online power angle of the generator is:
[0121] The online angular velocity is:
[0122] The online electromagnetic power is:
[0123] Online mechanical power is:
[0124] δ 在线i,t is the online power angle of the i-th generator at the t-th moment after the fault is cleared; ω 在线i,t is the online angular velocity of the i-th generator at the t-th moment after the fault is cleared; P 在线Ei,t is the online electromagnetic power of the i-th generator at the t-th moment after the fault is cleared; P 在线Mi,t is the online mechanical power of the i-th generator at the t-th moment after the fault is cleared; i = 1, 2, ..., N, t = 1, 2, ..., N tn ; N tn Indicates the total number of sampling moments of fault data records.
[0125] Step 4.2: Splice the data matrix (21) obtained in the previous step into the corresponding form as the network input, set the probability threshold to convert the network output into the clustering result,
[0126] According to the sample structure in step 3.2, the generator online operation data is converted into a sample of size N tn ×4N two-dimensional matrix as the input matrix T 在线 ,Right now:
[0127] T 在线 =[δ 在线 ω 在线 P 在线E P 在线M ];(twenty two)
[0128] T 在线 As input, the trained network is called through the predict function, and the output is obtained after network mapping, in the form of a one-dimensional probability vector M P =[M P1 ,M P2 ,…M PN ] T , where each element 0≤M Pi ≤1(i=1,2,…,N), indicating the probability that the i-th generator belongs to the leading group.
[0129] Set the probability threshold P0 and output the probability vector M P Converted into label vector M output =[M1,M2,...M N ] T , the method is:
[0130]
[0131] The method for judging the leading and lagging groups is: if M i =1, then the i-th generator is determined to belong to the leading group; if M i =0, the i-th generator is determined to belong to the lagging group, and the online grouping of generator power angle stability is completed.
[0132] The data-driven power angle stable online clustering method proposed in Example 1 of the present invention can accurately and quickly identify the leading and lagging groups in various fault scenarios by using the real-time status information of each generator within a short time window.
[0133] Embodiment 1 of the present invention proposes a data-driven online clustering method for power angle stability. The clustering method is realized by data driving, which effectively avoids the computational dimensionality disaster caused by the clustering method based on generator coherence in large-scale power systems, improves the timeliness of clustering calculations, and avoids the problem of low accuracy of existing clustering methods. It can provide support for the stability judgment and emergency control system of new power systems with growing stability control needs.
[0134] In order to fully illustrate the effect of the data-driven power angle stabilization online grouping method proposed in Example 1 of the present invention, the online grouping of generator sets in the transient power angle instability scenario of the IEEE10-machine 39-node system is taken as an example to further illustrate the implementation effect. Figure 5 This is the IEEE standard 10-machine 39-node topology diagram; the IEEE 39-node system includes 39 nodes, including 10 generators, and a total of 46 branches. The steps of applying this method are:
[0135] (1) Sample generation and recording for network training
[0136] Only the original topology of the 10-machine, 39-node system was considered, without considering topology changes. The load variation curve for each node during the simulation was calculated by multiplying a baseline curve by the standard load value for each node. Five random load levels (90%, 100%, 110%, 120%, and 130%) were set. The output of each generator was distributed to ensure power flow convergence, resulting in a total of 289 initial operating modes.
[0137] Taking a three-phase short circuit and grounding on a single line as an assumed fault scenario, there are a total of 31 fault locations. Table 1 below is the IEEE standard 10-machine 39-node fault location table.
[0138] Table 1: IEEE standard 10-machine 39-node fault location table:
[0139] Fault number Starting Node Termination Node Fault number Starting Node Termination Node fault1 1 2 fault17 14 15 fault2 2 3 fault18 15 16 fault3 2 25 fault19 16 17 fault4 3 4 fault20 16 21 fault5 4 5 fault21 16 24 fault6 4 14 fault22 17 18 fault7 5 6 fault23 17 27 fault8 5 8 fault24 21 22 fault9 6 7 fault25 22 23 fault10 6 11 fault26 23 24 fault11 7 8 fault27 28 29 fault12 8 9 fault28 26 27 fault13 9 39 fault29 26 28 fault14 10 11 fault30 26 29 fault15 10 13 fault31 25 26 fault16 13 14
[0140] The fault duration was set to 0.1s-0.26s in 0.02s increments. Combining the three factors of operating mode, fault location, and fault duration, a total of 71,672 fault scenarios were generated.
[0141] Commercial transient simulation software was used to simulate all the above fault scenarios, and the maximum power angle difference method was used to determine the power angle stability of all fault scenarios. Finally, 10,066 power angle instability scenarios were obtained. The power system operation data including generator power angle, speed, electromagnetic power, mechanical power, and node voltage frequency, amplitude, and phase angle within 50 ms after the fault was removed in each operation scenario were recorded. The data were recorded at an interval of 1 ms for a total of N tn =50 time points.
[0142] (2) Construction of data samples for clustering neural networks
[0143] The K-means method is used to group all the generator power angle curves under each power angle instability scenario. The index of the leading group generator corresponds to 1, and the index of the lagging group generator corresponds to 0. 10066 label vectors containing 10 elements are obtained and combined into a two-dimensional matrix of size 10×10066 as the label set. The generator power angle δ, speed ω, and input mechanical power P are obtained by analyzing the generator coherence mechanism. M , output electromagnetic power P E The variables related to generator clustering are used as the input of online clustering, and the corresponding data recorded under the instability scenario are combined into a three-dimensional sample data set with a size of 50×40×10066;
[0144] (3) Design the network and train it
[0145] Follow the steps in step 3.1 to set up the basic network architecture: design the input layer network structure to be 50×40×1; set 32 5×5 convolution kernels in each of the three convolution-ReLU layers, with the convolution kernel stride of the first convolution layer being [1,1] and the convolution kernel stride of the second and third convolution layers being [1,5]; use the max pooling method in the pooling layer with a pooling window of 2×2; use random dropout in the DropOut layer with a dropout rate of 0.5; fully connected layer 1 contains 400 neurons and fully connected layer 2 contains 10 neurons, connected by ReLU; use a sigmoid layer to convert the multidimensional output into a probabilistic label; finally, set up the output layer with a multivariate cross entropy loss function.
[0146] Use the randperm function to generate shuffled sample indices, divide the first 90% of the indexes into the training set and the last 10% into the test set, and concatenate the samples and labels to form a training data matrix of size 50×40×9059. and training labels of size 10×9059 A test data matrix of size 50×40×1007 and a test label of size 10×1007 A total of 9059 samples are used for training and 1007 samples are used for testing.
[0147] The Adam optimization algorithm is selected, and the segmented adjustment learning rate scheduling strategy is adopted. The initial learning rate is set to 1e-4, the drop factor is 0.25, and the size of each small batch is 32. The training data matrix and training labels The training is performed as input to obtain a mapping network for clustering generators in power angle unstable state.
[0148] (4) Cluster network application
[0149] Several operation scenarios, fault locations, and fault durations are combined into fault operation scenarios and all scenarios are simulated. The power angle instability scenario is screened out using the maximum power angle difference method. The power angle δ, speed ω, and output electromagnetic power P of 10 generator sets within 50ms after the fault is cleared are recorded at 1ms intervals. E and input mechanical power P M Time series data, totaling N tn = 50 time points, combined to form the input matrix T * . The sample data matrix T * As input, the trained network is called through the predict function, and each sample is mapped by the network to obtain the output probability vector M p , set the probability threshold P0 = 0.5 to transform the probability vector to obtain the output label vector M out, which are combined to form the output label matrix M totalout ; Use the K-means method to cluster the generator power angle curves recorded in each scene, obtain the cluster label M of each sample, and combine them to form a label matrix M mark , M totalout and M mark The row index represents the generator number, the column index represents the sample number, M totalout and M mark The proportion of elements in the corresponding positions of any row that are exactly the same represents the clustering accuracy of the i-th generator; M totalout and M mark The ratio of the number of identical corresponding columns to the total number of columns represents the probability that all ten generators are grouped correctly.
[0150] Finally, the accuracy rates of the ten generator groupings were [98.21%, 99.80%, 99.80%, 98.41%, 98.41%, 99.70%, 99.80%, 99.40%, 98.71%, 99.90%], and the accuracy rate of all ten generators being correctly grouped was 95.43%. The units with the highest and lowest grouping accuracy were generator 10 and generator 1, respectively. Figure 6 This is a schematic diagram of the results of the grouping of 10 generators; Figure 7 This is a schematic diagram of the grouping results of generator 1.
[0151] Example 2
[0152] Based on the data-driven power angle stable online grouping method proposed in Example 1 of the present invention, Example 2 of the present invention further proposes a data-driven power angle stable online grouping system. Figure 8 A schematic diagram of a data-driven power angle stabilization online clustering system is proposed for embodiment 2 of the present invention. The system includes: a data acquisition module, a sample construction module, a network construction module, and a clustering module;
[0153] The data acquisition module is used to construct the operation scenario of the power grid and the fault scenario set under the operation scenario; perform dynamic simulation of each fault process of the generator under all operation scenarios, and record simulation data under the instability scenario;
[0154] The sample construction module is used to group the generators based on the simulation data under the instability scenario, and add a grouping label to each unit under each instability scenario based on the grouping results; determine the physical quantities that are strongly related to the generator grouping, and the physical quantities form the sample set and label set used to construct the clustering network;
[0155] The network construction module is used to construct a convolutional neural network for power angle stabilization online clustering, select a preset proportion of sample sets and a preset proportion of label sets as training sets, and the remaining sample sets and the remaining label sets as test sets; adjust the structure of the training set to obtain a training set data matrix and training set labels, and adjust the structure of the test set to obtain a test set data matrix and test set labels; use the training set data matrix and training set labels to train the convolutional neural network to obtain a trained convolutional neural network;
[0156] The clustering module is used to obtain online operation data of the generator, input the online operation data of the generator into the trained convolutional neural network, set the probability threshold to convert the output of the convolutional neural network into a clustering result, and complete online clustering with stable generator power angle.
[0157] In the data acquisition module, dynamic simulation of various generator fault processes under all operating scenarios is performed. The process of recording simulation data under instability scenarios includes:
[0158] Select a fault scenario and record the power angle time series data of all generators after fault removal obtained in each simulation as:
[0159] Among them, δ i is the power angle of the i-th generator; 1≤i≤N, N is the total number of generators; δ i,t represents the power angle of the i-th generator at the t-th moment after the fault is cleared; 1≤t≤N tm ; N tm Indicates the total number of simulation times;
[0160] Calculate the power angle difference between each generator at the same time, and record the maximum value in the form of a time series vector, that is:
[0161]
[0162] Among them, Δδ tmax is the maximum power angle difference between the i-th generator and the j-th generator at time t; δ i,t is the power angle of the i-th generator at time t; δ j,t is the power angle of the jth generator at time t; Δδ max is Δδ tmax The time series vector formed by increasing the time number t;
[0163] Calculate the transient stability coefficient of the system at each moment, specifically:
[0164]
[0165] Among them, T SI,t represents the transient stability index of the system at time t;
[0166] T SI,t The records are time series vectors, specifically:
[0167]
[0168] like Determine whether the power angle is unstable in this scenario, and the number of unstable samples N S Add 1 and use this running scenario as an unstable sample;
[0169] The operating data of the power system under the instability scenario obtained by simulation is recorded in the following time series form:
[0170]
[0171] Among them, X i represents the physical quantity corresponding to the i-th generator; X l Indicates the physical quantity corresponding to the lth node; X i,t represents the value of the physical quantity corresponding to the i-th generator at time t; X l,t Indicates the value of the physical quantity corresponding to the lth node at the tth time; N bus Indicates the number of nodes in the system.
[0172] In the sample construction module, the generators are grouped based on the simulation data under the instability scenario. The process of adding group labels to each unit under each instability scenario based on the grouping results includes:
[0173] Calculate the Euclidean distance between any two power angle curves:
[0174]
[0175] Among them, D ij is the Euclidean distance between the power angle curves of the i-th and j-th generators;
[0176] Select the two curves with the largest Euclidean distance as the initial cluster centers C1 and C2 of cluster 1 and cluster 2, and write the corresponding curve column indexes into the index sets Ω1 and Ω2 of cluster 1 and cluster 2;
[0177] Choose any delta from the power angle curves of the remaining generators m (m=1,2,...,N,m≠i,j), the Euclidean distance between it and the cluster centers C1 and C2 is calculated using the following formula:
[0178]
[0179] Among them, D m,1 , D m,2are the Euclidean distances between the power angle curve of the mth generator and the cluster centers C1 and C2 respectively; 1,t , C 2,t are the values of cluster centers C1 and C2 at time t respectively;
[0180] Contrast D m,1 and D m,2 Size relationship, if D m,1 >D m,2 , then the mth generator is classified as group 2 and the curve column index is merged into the index set Ω2, otherwise it is classified as group 1 and the curve column index is merged into the index set Ω1;
[0181] Update the aggregation center of the two clusters. The updated cluster center corresponds to the value C at the tth moment. 1,t and C 2,t for:
[0182]
[0183] Where, are the number of generators in cluster 1 and cluster 2 respectively;
[0184] The average value of the computer cluster centers C1 and C2, and the leading and lagging clusters are distinguished based on the positive and negative difference:
[0185]
[0186] Among them, δ C1 , δ C2 are the average power angles of group 1 and group 2 respectively; if δ C1 >δ C2 , then cluster 1 is the leading cluster Ω S , cluster 2 is the lagging cluster Ω A ; On the contrary, if δ C1 <δ C2 , then cluster 2 is the leading cluster Ω S , cluster 1 is the lagging cluster Ω A ;
[0187] remember is the clustering label, which represents the clustering result of the generator in the kth sample, where the element for:
[0188]
[0189] Indicates the clustering result of the i-th generator in the k-th sample. A value of 0 indicates that the generator belongs to the lagging group, and a value of 1 indicates that the generator belongs to the leading group.
[0190] The process of determining physical quantities that are strongly related to generator clustering and forming a sample set and a label set used to construct a clustering network includes:
[0191] Select the generator power angle and speed as the group input variables, and the dynamic equation of a single generator rotor is:
[0192]
[0193] Among them, δ is the generator power angle; ω is the generator speed; P M Input mechanical power to the generator; P E The generator outputs electromagnetic power; T j is the generator moment of inertia;
[0194] Generator power angle δ, generator speed ω, generator input mechanical power P M and the generator output electromagnetic power P E Forming the original sample;
[0195] The time series vectors in the original samples are spliced in the direction of data type so that the sample set and label as input are adapted to the network structure. Each original sample forms the following matrix:
[0196]
[0197] Among them, T k (k=1,2,...,N S ) represents the original data matrix formed by the kth original sample; the column vector represents the power angle time series data of the i-th generator in the k-th sample; represents the speed time series data of the i-th generator in the k-th sample; represents the output electromagnetic power time series data of the i-th generator in the k-th sample; represents the input mechanical power time series data of the i-th generator in the k-th sample; N S represents the number of unstable samples; N represents the number of generators or labels;
[0198] The time series data matrix T formed by different samples k , in the third dimension, the number of layers is spliced into N tm ×4N×N S The three-dimensional matrix forms the sample data set T total ,Right now:
[0199]
[0200] To M k Splice to form a size of N×N SThe two-dimensional matrix is recorded as the original label set M out ,Right now:
[0201]
[0202] In the network building module, the convolutional neural network includes an input layer, three convolution-ReLU layers, a pooling layer, a DropOut layer, two fully connected layers, a sigmoid activation layer, and an output layer;
[0203] After the input data passes through the input layer, it passes through three convolution-ReLU layers, a pooling layer, and a DropOut layer, and then passes through two fully connected layers. Finally, it passes through the sigmoid and output layers to obtain an N×1 dimensional column vector.
[0204] The input layer network structure is N tn ×4N×N channel , according to the sample set data structure, determine N channel Is 1, thus determining that the input layer is a single channel N tn ×4N two-dimensional matrix;
[0205] The convolution layer uses 32 convolution kernels of size 5×5 and a sliding step size of [1,1].
[0206] The activation function layer uses the ReLU function as the activation function
[0207] Combine the convolution layer in step (2) and the ReLU activation function layer in step (3) into a convolution-ReLU layer, and repeat twice. The structure and number of convolution kernels in each group are the same as the first group, and the sliding step size is [1,5].
[0208] The pooling layer uses the Max-Pooling method, sets the pooling window to 2×1 and the stride to [1,1], and retains and strengthens the strong features in the feature map obtained by the convolution-ReLU layer;
[0209] The DropOut layer uses random dropout, and the dropout rate is set to 0.5;
[0210] The fully connected layer 1 contains 40×N neure The fully connected layer of neurons is used to summarize the high-dimensional feature data of the learning input. The fully connected layer 2 uses N neure The fully connected layer of neurons completes the mapping to the output, and the two are connected through the ReLU layer, where N neure =N;
[0211] The sigmoid activation layer compresses the output of each neuron to the (0,1) interval using the following formula:
[0212]
[0213] Here, x is the input of the sigmoid activation layer, that is, the output of the previous fully connected layer. The output of the function is always between (0, 1). Its output result can be interpreted as the model's predicted probability that a unit belongs to category 1, that is, the leading unit group;
[0214] An output layer is set up to measure the network's prediction performance and perform backpropagation to update the network. Based on the label set structure, the network output is determined to be an N×1-dimensional probability column vector, where each element represents the probability label of the corresponding generator group. A binary cross-entropy loss function is used to measure the prediction performance of each machine. The formula is:
[0215] L n =-(T·log(Y)+(1-T)·log(1-Y)),1≤n≤N; (16)
[0216] Among them L n is the binary cross entropy loss corresponding to the nth label. The average value of the loss function of each label is used to measure the prediction effect of all generators, and the multivariate cross entropy loss is obtained as the loss function, that is:
[0217]
[0218] The number of training set samples p and the number of test set samples q are:
[0219]
[0220] Among them, α is the preset ratio; To round down;
[0221] Use the randperm function to generate the number of unstable samples N from 1 S A random sequence of positive integers, denoted as vector R, is formed by intercepting the first P elements of vector R: The remaining elements form subvectors: Sure is the training set data matrix, is the training set label; is the test set data matrix, is the test set label; and the training set data matrix and the sample index of the training set label correspond one to one; the test set data matrix and the sample index of the test set label correspond one to one;
[0222] right Cut in the data timing direction and intercept the first N tn The time length used as the network input forms the sample data matrix for input Right now:
[0223]
[0224] in:
[0225]
[0226] right Cut in the data timing direction and intercept the first N tn The time length used as the network input forms the sample data matrix for testing
[0227] use and As the input of the convolutional neural network, the convolutional neural network is trained to obtain a trained convolutional neural network.
[0228] In the clustering module, the generator online operation data specifically includes: generator online power angle, online angular velocity, online mechanical power and online electromagnetic power, which are stored in the following variable matrix:
[0229] The online power angle of the generator is:
[0230] The online angular velocity is:
[0231] The online electromagnetic power is:
[0232] Online mechanical power is:
[0233] δ 在线i,t is the online power angle of the i-th generator at the t-th moment after the fault is cleared; ω 在线i,t is the online angular velocity of the i-th generator at the t-th moment after the fault is cleared; P 在线Ei,t is the online electromagnetic power of the i-th generator at the t-th moment after the fault is cleared; P 在线Mi,t is the online mechanical power of the i-th generator at the t-th moment after the fault is cleared; i = 1, 2, ..., N, t = 1, 2, ..., N tn .
[0234] The process of inputting the generator online operation data into the trained convolutional neural network is as follows: converting the generator online operation data into a data set of size N tn ×4N two-dimensional matrix as the input matrix T 在线 ,Right now:
[0235] T 在线 =[δ 在线 ω 在线 P 在线E P 在线M ];(twenty two)
[0236] T 在线 As input, the trained network is called through the predict function, and the output is obtained after network mapping, in the form of a one-dimensional probability vector M P =[M P1 ,M P2 ,...M PN ] T , where each element 0≤M Pi ≤1(i=1,2,...,N), indicating the probability that the i-th generator belongs to the leading group.
[0237] The probability threshold is set to convert the output of the convolutional neural network into a clustering result. The process of completing the online clustering of the generator power angle stability includes: setting the probability threshold P0, converting the output probability vector M P Converted into label vector M output =[M1,M2,...M N ] T , the method is:
[0238]
[0239] If M i =1, then the i-th generator is determined to belong to the leading group; if M i =0, the i-th generator is determined to belong to the lagging group, and the online grouping of generator power angle stability is completed.
[0240] A data-driven power angle stabilization online clustering system proposed in Example 2 of the present invention can accurately and quickly identify leading and lagging groups of generators in various fault scenarios by using the real-time status information of each generator within a short time window.
[0241] Embodiment 2 of the present invention proposes a data-driven power angle stability online clustering system, which realizes clustering through data-driven method, effectively avoids the computational dimensionality disaster caused by the clustering method based on generator coherence in large-scale power systems, improves the timeliness of clustering calculations, and avoids the problem of low accuracy of existing clustering methods. It can provide support for the stability judgment and emergency control system of new power systems with growing stability control needs.
[0242] For the description of the relevant parts of the data-driven power angle stable online grouping system provided in Example 2 of the present application, please refer to the detailed description of the corresponding parts of the data-driven power angle stable online grouping method provided in Example 1 of the present application, which will not be repeated here.
[0243] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements are inherent to the elements. In the absence of further restrictions, the elements limited by the statement "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device comprising the elements. In addition, the above-mentioned technical solutions provided in the embodiments of the present application are not described in detail in accordance with the corresponding technical solutions in the prior art to achieve the same principle, so as to avoid excessive elaboration.
[0244] Although the above description is of specific embodiments of the present invention in conjunction with the accompanying drawings, it does not limit the scope of protection of the present invention. For those skilled in the art, other different forms of modifications or variations can be made based on the above description. It is not necessary and impossible to list all embodiments here. Based on the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without expending creative effort are still within the scope of protection of the present invention.
Claims
1. A data-driven power angle stable online grouping method, characterized in that: The following steps are involved: Construct the operation scenarios of the power grid and the fault scenario sets under the operation scenarios; perform dynamic simulation of the fault processes of the generator under all operation scenarios and record the simulation data under the instability scenario; Based on the simulation data under the instability scenario, the generators are grouped into leading and lagging groups. Based on the leading and lagging grouping results, group labels are added to each unit under each instability scenario. Determining physical quantities that are strongly correlated with generator clustering, where the physical quantities form a sample set and a label set used to construct a clustering network; the process of determining physical quantities that are strongly correlated with generator clustering, where the physical quantities form a sample set and a label set used to construct a clustering network, includes: Select the generator power angle and speed as the group input variables, and the dynamic equation of a single generator rotor is: ; (11) in, is the generator power angle; is the generator speed; Input mechanical power to the generator; Output electromagnetic power to the generator; is the generator moment of inertia; Generator power angle , generator speed , Generator input mechanical power and the generator output electromagnetic power Forming the original sample; The time series vectors in the original samples are spliced in the direction of data type so that the sample set and label as input are adapted to the network structure. Each original sample forms the following matrix: ; (12) in, Indicates the The original data matrix formed by the original samples; the column vector Indicates the In the sample The power angle timing data of the generator; Indicates the In the sample The speed time series data of the generator; Indicates the In the sample The output electromagnetic power time series data of the generator; Indicates the In the sample Input mechanical power time series data of the generator; represents the number of unstable samples; Indicates the number of generators or tags; Time series data matrix formed for different samples , in the third dimension, the number of layers is spliced into a size of A three-dimensional matrix forms a sample data set ,Right now: ; (13) right Splice to form a size of The two-dimensional matrix is recorded as the original label set ,Right now: ;(14) Constructing a convolutional neural network for power angle stabilization online clustering, selecting a preset proportion of sample sets and a preset proportion of label sets as training sets, and the remaining sample sets and the remaining label sets as test sets; adjusting the structure of the training sets to obtain a training set data matrix and training set labels, and adjusting the structure of the test sets to obtain a test set data matrix and test set labels; and training the convolutional neural network using the training set data matrix and training set labels to obtain a trained convolutional neural network; The online operation data of the generator is obtained and input into the trained convolutional neural network. The output of the convolutional neural network is converted into a clustering result by setting a probability threshold, thereby completing the online clustering of the generator power angle stability.
2. The data-driven power angle stable online grouping method according to claim 1, characterized in that: The process of dynamically simulating various fault processes of the generator under all operating scenarios and recording simulation data under instability scenarios includes: Select a fault scenario and record the power angle time series data of all generators after fault removal obtained in each simulation as: ; (1) in, For the The power angle of the generator; , is the total number of generators; Indicates the After the fault is cleared, the generator The power angle at each moment; ; Indicates the total number of simulation times; Calculate the power angle difference between each generator at the same time, and record the maximum value in the form of a time series vector, that is: ;(2) in, for Moment Generator and The maximum power angle difference of the generators; for Moment The power angle of the generator; for Moment The power angle of the generator; for The time series vector formed by increasing the time number t; Calculate the transient stability coefficient of the system at each moment, specifically: ;(3) in, Indicates the The transient stability index of the system at the moment; Will The records are time series vectors, specifically: ;(4) like , determine the power angle instability in this scenario, the number of instability samples Add 1 and use this running scenario as an unstable sample; The operating data of the power system under the instability scenario obtained by simulation is recorded in the following time series form: ;(5) in, Indicates the The physical quantity corresponding to each generator; Indicates the Each node corresponds to a physical quantity; Indicates the Moment The value of the physical quantity corresponding to each generator; Indicates the Moment Each node corresponds to the value of the physical quantity; Indicates the number of nodes in the system.
3. The data-driven power angle stable online grouping method according to claim 1, characterized in that: The process of grouping the generators based on the simulation data under the instability scenario and adding a grouping label to each unit under each instability scenario based on the grouping result includes: Calculate the Euclidean distance between any two power angle curves: ;(6) in, For the Taiwan and the first The Euclidean distance between the power angle curves of the generators; Select the two curves with the largest Euclidean distance as the initial cluster centers of cluster 1 and cluster 2 and , and write the corresponding curve column index into the index set of cluster 1 and cluster 2 and ; Select any one of the remaining generator power angle curves ,in, ; Use the following formula to calculate its relationship with the cluster center and The Euclidean distance between: ;(7) in, , Respectively The power angle curves and cluster centers corresponding to the generators and The Euclidean distance between , Cluster centers and In the The value of the moment; contrast and Size relationship, if > , then the The generators are classified as cluster 2 and the curve column index is merged into the index set Otherwise, it is classified as cluster 1 and the curve column index is merged into the index set ; Update the aggregation centers of the two clusters. The updated cluster centers are The corresponding value at each moment and for: ;(8) Where, 、 are the number of generators in cluster 1 and cluster 2 respectively; Computer Cluster Center and The average value of , distinguish the leading group and the lagging group according to the positive or negative difference: ;(9) in, , are the average power angles of group 1 and group 2 respectively; if , then cluster 1 is the leading cluster , Cluster 2 is the lagging cluster On the contrary, if , then cluster 2 is the leading cluster , Cluster 1 is the lagging cluster ; remember is the clustering label, indicating the The clustering results of the generator in samples, where the elements for: ; (10) Indicates the In the sample The value 0 indicates that the generator belongs to the lagging group, and the value 1 indicates that the generator belongs to the leading group.
4. The data-driven power angle stable online grouping method according to claim 1, characterized in that: The convolutional neural network includes an input layer, three convolution-ReLU layers, a pooling layer, a DropOut layer, two fully connected layers, a sigmoid activation layer and an output layer; After the input data passes through the input layer, it passes through three convolution-ReLU layers, pooling layers and DropOut layers, and then passes through two fully connected layers. Finally, it passes through the sigmoid and output layers to obtain a -dimensional column vector.
5. The data-driven power angle stable online grouping method according to claim 1, characterized in that: The preset proportion of sample sets and the preset proportion of label sets are selected as training sets, and the remaining sample sets and the remaining label sets are selected as test sets; The process of adjusting the structure of the training set to obtain a training set data matrix and a training set label, and adjusting the structure of the test set to obtain a test set data matrix and a test set label includes: Number of training set samples and the number of test set samples They are: ;(18) in, is the preset ratio; To round down; Use the randperm function to generate the number of samples from 1 to instability A random sequence of positive integers, denoted as vector , intercept vector forward Elements form a subvector: ; The remaining elements form subvectors: ;Sure is the training set data matrix, is the training set label; is the test set data matrix, is the test set label; and the training set data matrix and the sample index of the training set label correspond one to one; the test set data matrix and the sample index of the test set label correspond one to one; right Cut in the data timing direction, before interception The time length used as the network input forms the sample data matrix for input ,Right now: ; (19) in: ; (20) right Cut in the data timing direction, before interception The time length used as the network input forms the sample data matrix for testing ; use and As the input of the convolutional neural network, the convolutional neural network is trained to obtain a trained convolutional neural network.
6. The data-driven power angle stable online grouping method according to claim 5, characterized in that: The online operation data of the generator specifically includes: online power angle, online angular velocity, online mechanical power and online electromagnetic power of the generator, which are stored in the following variable matrix: The online power angle of the generator is: ; The online angular velocity is: ; The online electromagnetic power is: ; Online mechanical power is: ;(twenty one) For the After the fault is cleared, the generator The online power angle at each moment; For the After the fault is cleared, the generator The online angular velocity at a moment; For the After the fault is cleared, the generator Online electromagnetic power at a given moment; For the After the fault is cleared, the generator Online mechanical power at a given moment; , .
7. The data-driven power angle stable online grouping method according to claim 6, characterized in that: The process of inputting the generator online operation data into the trained convolutional neural network is as follows: Convert the generator online operation data into The two-dimensional matrix is used as the input matrix ,Right now: ;(22) Will As input, the trained network is called through the predict function, and the output is obtained after network mapping in the form of a one-dimensional probability vector , where each element , indicating the The probability that a generator belongs to the leading group.
8. The data-driven power angle stable online grouping method according to claim 7, characterized in that: Setting the probability threshold converts the output of the convolutional neural network into a clustering result. The process of completing the online clustering of the generator power angle stability includes: setting the probability threshold , the output probability vector Convert to label vector , the method is: ;(23) like , then determine the generators belong to the leading group; if , then determine the The generators belong to the lagging group, and online grouping is completed to ensure stable generator power angle.
9. A data-driven online grouping system for power angle stability, used to execute the data-driven online grouping method for power angle stability according to any one of claims 1 to 8, characterized in that: include: Data collection module, sample construction module, network construction module and clustering module; The data acquisition module is used to construct the operation scenario of the power grid and the fault scenario set under the operation scenario; perform dynamic simulation of each fault process of the generator under all operation scenarios, and record simulation data under the instability scenario; The sample construction module is used to group the generators into leading and lagging groups based on simulation data under instability scenarios, and add grouping labels to each unit under each instability scenario based on the leading and lagging grouping results; Determining physical quantities that are strongly correlated with generator clustering, wherein the physical quantities form a sample set and a label set used to construct a clustering network; The network construction module is used to construct a convolutional neural network for power angle stabilization online clustering, select a preset proportion of sample sets and a preset proportion of label sets as training sets, and the remaining sample sets and the remaining label sets as test sets; adjust the structure of the training set to obtain a training set data matrix and training set labels, and adjust the structure of the test set to obtain a test set data matrix and test set labels; use the training set data matrix and training set labels to train the convolutional neural network to obtain a trained convolutional neural network; The clustering module is used to obtain online operation data of the generator, input the online operation data of the generator into the trained convolutional neural network, set the probability threshold to convert the output of the convolutional neural network into a clustering result, and complete online clustering with stable generator power angle.
Citation Information
Patent Citations
Principle component analysis-based transient stability estimation method of power system
CN108054768A
Power system power angle stability control method and system based on combined stability margin
CN118199154A