Power system stability evaluation method, device and system, and storage medium
By combining the time convolution network and adaptive graph convolution network, the timing characteristics and topological structure characteristics of the transient data of the power system are extracted, which solves the problem of insufficient rapidity and generalization capabilities of traditional evaluation methods in complex power systems, and achieves rapid and accurate evaluation of the transient stability of the power system.
Patent Information
- Application Number
- CN202411736492.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-29
- Publication Date
- 2025-03-21
AI Technical Summary
Traditional power system transient stability assessment methods cannot meet the needs of complex structures and rapidly changing topological structures of modern power systems, especially in terms of rapidity and generalization capabilities.
Using a combination of time convolution network and adaptive graph convolution network, a transient power system is extracted through transient data, a transient stability evaluation model is constructed, and a focus loss function is used during the model training process to improve the category imbalance problem.
It realizes a rapid and accurate evaluation of the transient stability of the power system, can adapt to changes in the power grid topology, and improves the generalization ability and evaluation performance of the model.
Smart Images

Figure CN119670552A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of power systems, and in particular relates to a method and device, a system, and a storage medium for evaluating the stability of a power system. Background Art
[0002] Traditional power system transient stability assessment (TSA) methods are divided into time domain simulation method and direct method. Among them, the time domain simulation method accurately models the system and has high assessment accuracy, but due to the long calculation time, it cannot meet the rapidity requirements of online assessment. The direct method can quickly give a stable assessment result, but the process of constructing the system energy function is more difficult and cannot be applied to complex power systems. As the power system structure and safe and stable operation mechanism become increasingly complex, the traditional TSA method is even more limited, and it has become a challenge to explore TSA methods suitable for modern power systems.
[0003] The rapid development of artificial intelligence and underlying measurement data acquisition technology has provided new ideas for power system TSA. Data-driven TSA methods include traditional machine learning and deep learning. Traditional machine learning such as random forest (RF), decision tree (DT), support vector machine (SVM), Bayesian neural network (BNN), etc. have been successfully applied to the field of power system TSA. Although such methods can achieve rapid evaluation, due to the insufficient feature extraction capability of their shallow network structure, they often require expert experience to assist in the design of input features, which results in a certain degree of subjectivity in the trained model and the results are not widely applicable. With the breakthrough progress of deep learning technology in the fields of natural language and image processing, many scholars have introduced it into the field of power system TSA. Due to its powerful data understanding ability, deep learning can directly face the underlying measurement data and automatically extract high-dimensional feature representation, avoiding the subjectivity brought by traditional machine learning. At present, the deep learning models applied to power system TSA mainly involve convolutional neural network (CNN), deep belief network (DBN), long short-term memory network (LSTM), stacked auto encoder (SAE), deep residual network (DRN), etc. Transient stability data is essentially a time series with strong temporal characteristics. The above research starts from the temporal characteristics of transient data and designs the corresponding network structure to fully extract its temporal characteristics, achieving good evaluation results. However, the topological structure of the power grid during operation has a significant impact on the dynamic characteristics and transient stability of the system. If only the temporal characteristics of transient data are considered, the potential problem is that when the topological structure of the power system changes, the performance of such models will be affected. To this end, some scholars combine deep learning with transfer learning (TL) to enhance the generalization ability of the model. Transfer learning includes model transfer and sample transfer. Its core idea is to obtain a pre-trained model by training before the system topology changes (source domain), and to update the pre-trained model after the system topology changes (target domain) to adapt to the transient stability assessment under the new topology. This idea can significantly reduce the time consumption of model retraining and restore the model evaluation performance to a higher level, but it is greatly affected by the migration strategy, and time domain simulation is still required to obtain target domain samples under each topology. Another idea is to directly model the power grid topology and use graph neural networks to mine the spatial structural characteristics of the power grid topology.In general, during the transient process of the power system, not only will the electrical quantity of the system change over time, but the topological structure of the system will also directly affect the system's ability to respond to disturbances. Therefore, studying an evaluation model that can simultaneously extract the temporal characteristics of transient data and the spatial structure characteristics of the power grid topology is an important way to improve the performance of the data-driven TSA model. Summary of the invention
[0004] The technical problem to be solved by the present invention is to provide a method and device, system and storage medium for evaluating the stability of an electric power system, which can realize accurate and rapid evaluation of the transient stability of the electric power system.
[0005] To achieve the above object, the present invention adopts the following technical solution:
[0006] A method for evaluating the stability of a power system, comprising:
[0007] Step S1, obtaining historical power system transient data;
[0008] Step S2: obtaining a transient stability assessment model based on historical power system transient data; wherein the transient stability assessment model includes: a time convolutional network and an adaptive graph convolutional network;
[0009] Step S3: input the real-time power system transient data into the transient stability assessment model to perform power system stability assessment.
[0010] Preferably, based on the historical power system transient data, the bus voltage amplitude and phase angle before, during and after the fault are used as input, a time convolutional network is used to extract the timing characteristics of the transient data, and an adaptive graph convolutional network is used to process the topological relationship between the grid nodes to mine their spatial structure characteristics and obtain a transient stability assessment model.
[0011] Preferably, a focal loss function is used as the objective function of the transient stability assessment model.
[0012] The present invention also provides a power system stability assessment device, comprising:
[0013] An acquisition module, used to acquire historical power system transient data;
[0014] A training module is used to obtain a transient stability assessment model based on historical power system transient data; wherein the transient stability assessment model includes: a time convolutional network and an adaptive graph convolutional network;
[0015] The evaluation module is used to input real-time power system transient data into the transient stability evaluation model to perform power system stability evaluation.
[0016] Preferably, the training module is used to extract the timing characteristics of transient data based on historical power system transient data, with the bus voltage amplitude and phase angle before, during and after a fault as input, using a time convolutional network, and processing the topological relationship between grid nodes through an adaptive graph convolutional network to mine their spatial structure characteristics and obtain a transient stability assessment model.
[0017] Preferably, a focal loss function is used as the objective function of the transient stability assessment model.
[0018] An embodiment of the present invention further provides a power system stability assessment system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a power system stability assessment method when executed by the processor.
[0019] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and the computer program executes the power system stability assessment method when running.
[0020] The present invention adopts transient stability assessment based on temporal convolutional network (TCN) and adaptive graph convolutional network (AGCN), models transient stability assessment as a sample space mapping problem, takes bus voltage amplitude and phase angle before, during and after fault as input, uses temporal convolutional network to extract time series characteristics of transient data, and uses adaptive graph convolutional network to process topological relationship between power grid nodes, so as to mine their spatial structural characteristics, and thus realize rapid and accurate judgment of system transient stability. In addition, in the model training process, focal loss function (FL) is used as the objective function to improve the model tendency problem caused by inherent category imbalance of transient samples and the problem of easy misjudgment of difficult-to-classify samples in the stable boundary area. Finally, simulation analysis is carried out in the IEEE 39-node system example to verify the effectiveness of the proposed method. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0022] Figure 1 This is a flow chart of a method for evaluating power system stability according to an embodiment of the present invention;
[0023] Figure 2 Schematic diagram of the temporal convolutional network structure;
[0024] Figure 3 Schematic diagram of transient stability assessment model. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. 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.
[0026] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0027] Embodiment 1:
[0028] like Figure 1 As shown, an embodiment of the present invention provides a method for evaluating the stability of a power system, comprising:
[0029] Step S1, obtaining historical power system transient data;
[0030] Step S2, obtaining a transient stability assessment model according to historical power system transient data; wherein the transient stability assessment model includes: a temporal convolutional network (TCN) and an adaptive graph convolutional network (AGCN);
[0031] Step S3: input the real-time power system transient data into the transient stability assessment model to perform power system stability assessment.
[0032] As an implementation method of the present invention, based on the historical power system transient data, the bus voltage amplitude and phase angle before, during and after the fault are used as input, and a time convolution network is used to extract the time series characteristics of the transient data. The topological relationship between the power grid nodes is processed by an adaptive graph convolution network to mine its spatial structure characteristics and obtain a transient stability assessment model. The focal loss function is used (focalloss,FL) As the objective function of the transient stability assessment model.
[0033] Further, the temporal convolutional network is as follows:
[0034] The temporal convolutional network uses causal dilated convolution as the temporal convolution layer to extract the temporal features of the time series. In causal convolution, all data in the time dimension follow a strict causal relationship. This design ensures the sequential nature of the time series information. However, to enhance the model's ability to remember time series, it is usually necessary to increase the depth of the convolution layer or expand the size of the convolution kernel, which will increase the number of model parameters and make model training more difficult. Dilated convolution can effectively solve the limitations of causal convolution. It introduces a dilation factor to implement discontinuous convolution operations within a longer time window, so that the convolution kernel can cover a time window wider than its own length, thereby extracting temporal features with a longer time span while maintaining a smaller number of convolution layers. The specific formula of causal dilated convolution can be expressed as:
[0035]
[0036] Among them, g(t) is the data output at time t; f n (i) is the i-th filter; x t-di is the data input at time t-di; d is the dilation factor; s is the size of the convolution kernel.
[0037] TCN is composed of stacked residual blocks, and its network structure is as follows Figure 2 As shown in the figure. Each residual block consists of two identical convolutional units, and each convolutional unit consists of causal dilated convolution, weight normalization unit, ReLU unit, and Dropout unit. In order to solve the gradient vanishing problem of deep neural networks, residual connections are introduced in the residual block, and the residual connection is used to sum the input data and the output of the deep neural network as the input of the next stage.
[0038] From the perspective of time sequence, the transient process of the power system can be divided into wave process, electromagnetic transient process and electromechanical transient process. In this process, the physical quantities of the power system, such as bus voltage amplitude and phase angle, have obvious time-varying characteristics, which is essentially a time series. TCN and LSTM both have great advantages in processing time series data, but TCN does not have complex gating mechanisms and loop structures. Compared with LSTM, TCN has a lower computational cost and better training stability. Therefore, the present invention uses TCN to fully extract the time series characteristics of transient data of the power system to ensure the performance of model evaluation.
[0039] Further, the adaptive graph convolutional network is as follows:
[0040] The buses in the power system are connected by lines, and the buses influence each other. In essence, it is a graph network structure. If each bus is regarded as a node and the connecting lines as an edge, the topological structure of the power system can be described as G = (V, E), where V represents the node set and E represents the edge set. The connection relationship between each node is represented by the adjacency matrix A∈R N×N Indicates, N indicates the number of nodes, and the value of the elements in the matrix A is as follows:
[0041]
[0042] The graph convolutional network (GCN) takes the node feature matrix and adjacency matrix as input, and outputs high-dimensional node feature representation after multiple layers of convolution. Its inter-layer propagation can be expressed as:
[0043] H (l+1) =f(H (l) ,A),l=0,1,2,.....,L (3)
[0044] Where f(·) represents the nonlinear mapping function, L is the number of hidden layers, H (l) represents the node feature matrix of the output of the lth hidden layer. If l = 0, then H (0) =X.
[0045] For each graph convolution layer, the process is to convert the adjacency matrix A and the node feature matrix H (l) After multiplication, the trainable parameter matrix W is used (l) Perform linear transformation, that is, inter-layer propagation can be written as:
[0046] H (l+1) =f(H (l) ,A)=σ(AH (l) W (l) ) (4)
[0047] Among them, σ(·) represents the activation function. Since there is no self-connection in the node itself when constructing the adjacency matrix in the topological graph, the node's own characteristics cannot be noticed, which is not conducive to the expression of node characteristics. Therefore, the node feature matrix is added to the N-order unit matrix, and the diagonal elements of the adjacency matrix are all changed to 1, which is equivalent to adding self-connection to each node, that is:
[0048]
[0049] in, is the adjacency matrix after adding self-connection, and I is the N-order identity matrix. Note that Without normalization, numerical instability will be introduced during inter-layer propagation, so further Do symmetric normalization, that is:
[0050]
[0051] in, is the adjacency matrix The degree matrix is a diagonal matrix whose diagonal elements satisfy At this point, the GCN inter-layer propagation process can be described as:
[0052]
[0053] It is crucial to use the GCN network to mine the spatial structural characteristics of the power grid topology and construct the adjacency matrix of the graph. For the power system, the degree of mutual influence between the buses is different, and even if there is no actual connection between two buses, there may be a mutual influence relationship. If the adjacency matrix is generated using the value principle of formula (2), the potential problem is that it is impossible to fully characterize the mutual influence relationship between nodes. Therefore, the present invention adopts an adaptive graph convolutional network (AGCN) to mine the spatial structural characteristics of the power grid topology. Its adaptability is reflected in the use of the internal graph learning layer to automatically learn the adjacency matrix of the graph from the data. The specific process is as follows:
[0054] M1=tanh(αE1Θ1) (8)
[0055] M2=tanh(αE2Θ2) (9)
[0056]
[0057] Among them, E1, E2 are randomly initialized node embedding features, Θ1, Θ2 are model trainable parameters, and α is a hyperparameter that controls the saturation rate of the activation function. The similarity matrix between nodes can be obtained, and then the adjacency matrix is obtained after the activation function is used for nonlinear operation. The elements in the matrix are in the range of (0,1). The more nodes that influence each other, the closer their values in the matrix are to 1. argtopm(·) means returning the vector index of the m neighbor nodes closest to the central node, and setting the elements in the remaining positions to zero. The purpose is to sparse the adjacency matrix, thereby reducing the computational complexity.
[0058] In addition, in order to prevent the AGCN network from converging to a single point during inter-layer propagation and causing information loss, it is considered to retain the original state of some nodes during the propagation process. The propagation process can be described as:
[0059]
[0060] Among them, H in Represents the original node feature matrix input to the AGCN network, Indicates A adpThe adjacency matrix after self-connection and symmetric normalization. β is the feature retention rate, which is used as a hyperparameter to control the degree of retention of the original node features.
[0061] Furthermore, the construction of input features needs to be able to reflect the transient process of the power system and have obvious time-varying characteristics. The present invention selects all bus voltage amplitudes and phase angles as initial input features, and the sampling window covers the steady state before the fault, during the fault, and after the fault is cleared. Since the dimensions of different features vary greatly at different stages, they need to be normalized to min-max before being input into the neural network. The transient stability assessment model of the power system based on TCN-AGCN is as follows: Figure 3 shown.
[0062] The transient data after min-max normalization is first processed by 1×1 convolution to the specified dimension, and then input into the TCN-AGCN module. TCN and AGCN are interwoven to form a spatiotemporal feature extraction layer, which extracts the temporal features and spatial structure features of the transient data respectively. The graph learning layer calculates the similarity between nodes through randomly initialized node embedding features, adaptively generates a sparse adjacency matrix, performs self-connection and symmetric normalization on it, and then inputs it into AGCN together with the output of TCN for graph convolution operation to realize the extraction of spatiotemporal features of transient data. In addition, to prevent the problem of gradient disappearance, the input of TCN and the output of AGCN are residually connected and then used as the input of the next spatiotemporal feature extraction layer. At the same time, a jump connection is added to the output of each TCN, which is essentially a 1×L i Convolution, L i Represents the input sequence length of the i-th skip connection, and sums each layer of skip connections in turn until the last layer of skip connections ends. Nonlinear operations and full connection operations are performed on the spatiotemporal features extracted by the model, and then combined with the transient stability index (TSI) to obtain the stability / instability evaluation result. The TSI expression is as follows:
[0063]
[0064] Δδ max is the maximum power angle difference between any two generators. For each sample, if η TSI If it is positive, the system is stable and the sample is marked as 1, otherwise the sample is unstable and marked as 0. Its essence is to judge the stability of the system by calculating whether the maximum power angle difference between any two generators in the system is greater than 180°.
[0065] Furthermore, FL is improved on the basis of the weighted cross entropy loss function. The expression of the weighted cross entropy loss function can be described as:
[0066]
[0067] Among them, y is the true label of the sample, 1 means stable, and 0 means unstable; p i The probability of the model predicting the category; w us 、w s They represent the weight factors of unstable samples and stable samples respectively, and their values are usually determined according to the ratio of unstable samples to stable samples in the sample set. In addition to the problem of sample category imbalance in the actual power system, some samples are at the stable boundary. Such samples are difficult to classify. When designing the loss function, their loss proportion should be increased, while the loss proportion of easy-to-classify samples should be reduced. FL introduces a difficult-easy sample modulation factor based on weighted cross entropy to improve the problem of easy misjudgment of difficult-to-classify samples at the stable boundary. The expression of FL is:
[0068]
[0069] Among them, γ is the modulation factor of the difficult and easy samples; when p i The closer it is to 0.5, the more difficult it is to classify the sample. i The closer it is to 0 or 1, the easier it is to classify the sample. By adjusting the value of γ, the loss ratio of difficult-to-classify samples during model training can be increased, while the loss ratio of easy-to-classify samples can be reduced.
[0070] Transient stability assessment is essentially a binary classification problem, and there is a class imbalance in transient samples. If only the global assessment accuracy is used as the evaluation index of the model, it is difficult to fully reflect the model performance. In addition, considering that the cost of judging an unstable sample as stable is greater than that of judging a stable sample as unstable, the evaluation index should pay more attention to the assessment accuracy of unstable samples. Therefore, the present invention uses the confusion matrix in the machine learning classification task and adopts the accuracy (A cc ), recall rate (R ec )、Accuracy(P re ) and F1 score to comprehensively evaluate the evaluation performance of the model, and the confusion matrix is shown in Table 1.
[0071] Table 1
[0072]
[0073] Among them, T s 、T us Represents the number of stable samples and unstable samples that are correctly evaluated, F s Indicates the number of unstable samples that are evaluated as stable samples (missed), F us It indicates the number of stable samples that are evaluated as unstable samples (false positives). The mathematical definitions of each evaluation index are shown in equations (16)-(19).
[0074]
[0075] Among them, A cc It represents the proportion of correctly evaluated samples to the total samples, reflecting the global accuracy of model evaluation; R ec R represents the ratio of correctly evaluated unstable samples to actual unstable samples. ec The higher it is, the fewer unstable samples are missed as stable samples; P re It represents the ratio of the correctly evaluated unstable samples to the samples evaluated as unstable. F1 is R ec and P re The harmonic mean of the two is used to comprehensively measure the two.
[0076] Embodiment 2:
[0077] The embodiment of the present invention further provides a power system stability assessment device, comprising:
[0078] An acquisition module, used to acquire historical power system transient data;
[0079] A training module is used to obtain a transient stability assessment model based on historical power system transient data; wherein the transient stability assessment model includes: a time convolutional network and an adaptive graph convolutional network;
[0080] The evaluation module is used to input real-time power system transient data into the transient stability evaluation model to perform power system stability evaluation.
[0081] As an implementation mode of an embodiment of the present invention, the training module is used to extract the timing characteristics of transient data based on historical power system transient data, with the bus voltage amplitude and phase angle before, during and after a fault as input, using a time convolutional network, and processing the topological relationship between power grid nodes through an adaptive graph convolutional network to mine their spatial structure characteristics and obtain a transient stability assessment model.
[0082] As an implementation manner of the embodiment of the present invention, a focal loss function is used as the objective function of the transient stability assessment model.
[0083] Embodiment 3:
[0084] An embodiment of the present invention further provides a power system stability assessment system, comprising: a memory and a processor, wherein the memory stores a computer program executed by the processor, and the computer program executes a power system stability assessment method when executed by the processor.
[0085] Embodiment 4:
[0086] An embodiment of the present invention further provides a storage medium, on which a computer program is stored, and the computer program executes the power system stability assessment method when running.
[0087] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.
Claims
1. A method for evaluating the stability of a power system, characterized in that: include: Step S1, obtaining historical power system transient data; Step S2: obtaining a transient stability assessment model based on historical power system transient data; wherein the transient stability assessment model includes: a time convolutional network and an adaptive graph convolutional network; Step S3: input the real-time power system transient data into the transient stability assessment model to perform power system stability assessment.
2. The power system stability assessment method according to claim 1, characterized in that: According to the historical power system transient data, the bus voltage amplitude and phase angle before, during and after the fault are used as input, and the time convolution network is used to extract the time series characteristics of the transient data. The topological relationship between the power grid nodes is processed through the adaptive graph convolution network to mine its spatial structure characteristics. The transient stability assessment model is obtained.
3. The power system stability assessment method according to claim 2, characterized in that: The focal loss function is adopted as the objective function of the transient stability assessment model.
4. A power system stability assessment device, characterized in that: include: An acquisition module, used to acquire historical power system transient data; A training module is used to obtain a transient stability assessment model based on historical power system transient data; wherein the transient stability assessment model includes: a time convolutional network and an adaptive graph convolutional network; The evaluation module is used to input real-time power system transient data into the transient stability evaluation model to perform power system stability evaluation.
5. The power system stability assessment device according to claim 4, characterized in that: The training module is used to extract the time series characteristics of transient data based on historical power system transient data, taking the bus voltage amplitude and phase angle before, during and after a fault as input, using a time convolutional network, and processing the topological relationship between power grid nodes through an adaptive graph convolutional network to mine its spatial structure characteristics. The transient stability assessment model is obtained.
6. The power system stability assessment device according to claim 5, characterized in that: The focal loss function is adopted as the objective function of the transient stability assessment model.
7. A power system stability assessment system, characterized in that: include: A memory and a processor, wherein the memory stores a computer program executed by the processor, and when the computer program is executed by the processor, the method for evaluating the stability of an electric power system according to any one of claims 1 to 3 is executed.
8. A storage medium, characterized in that: The storage medium stores a computer program, which executes the power system stability assessment method according to any one of claims 1 to 3 when running.
