Power system stability evaluation method and system based on spatial-temporal characteristics
The RNN-AGCN evaluation model combined with PMU data to extract the timing and spatial characteristics of the power system, solving the problem of existing methods ignoring the topological structure during feature extraction, and achieving high efficiency and accuracy of the transient stability evaluation of the power system.
Patent Information
- Application Number
- CN202411729073.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-28
AI Technical Summary
The existing power system transient stability evaluation method based on deep learning ignores the grid topological characteristics during feature extraction, making it difficult to take into account the timing correlation and spatial structure characteristics of the data, resulting in insufficient model adaptability and reduced evaluation accuracy.
The RNN-AGCN evaluation model is adopted to extract the timing characteristics of transient data through recurrent neural networks, and the spatial structural characteristics of the power grid topology are extracted by the adaptive graph convolutional network, and the spatial and temporal feature extraction layer is fused, and dynamic characteristics are captured throughout the process are combined with PMU data.
The full process automation of the power system's transient stability evaluation has been achieved, which significantly improves the accuracy and efficiency of the evaluation, has strong noise resistance and topological adaptability, and ensures the safe and stable operation of the power grid.
Smart Images

Figure CN119646614A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power grid technology, and in particular to a method and system for evaluating power system stability based on spatiotemporal characteristics. Background Art
[0002] Transient Stability Assessment (TSA) of power systems is a key technology to ensure the safe and stable operation of power grids. Traditional TSA methods mainly include time domain simulation method, direct method and energy function method. Although the time domain simulation method has high accuracy, its calculation is time-consuming and it is difficult to meet the needs of real-time evaluation; although the direct method and energy function method have fast calculation speed, they are highly dependent on system models and parameters, and the evaluation results are relatively conservative. With the development of artificial intelligence technology, TSA methods based on deep learning have gradually become a research hotspot. Existing deep learning evaluation methods mainly use convolutional neural networks (CNN), long short-term memory networks (LSTM) and other algorithms to build evaluation models, and realize rapid evaluation of system stability by learning the features of transient process data of power systems.
[0003] However, the existing TSA methods based on deep learning still have the following problems: First, most methods only focus on the time series characteristics of transient data, ignoring the inherent topological structure characteristics of the power system, resulting in insufficient adaptability of the model to changes in the system structure; second, in the feature extraction process, a single neural network structure is often used, which makes it difficult to take into account both the time series correlation and spatial structure characteristics of the data, limiting the feature expression ability of the model; third, due to the large difference in the number of stable samples and unstable samples in the transient samples of the power system, and some samples are in the stable boundary area, the model is prone to evaluation bias, especially in the presence of measurement noise, the evaluation accuracy is significantly reduced; finally, the existing evaluation methods generally lack an effective preprocessing mechanism for PMU collected data, and fail to fully consider the dimensional differences of different features at different stages, which affects the effect of subsequent feature extraction. These problems seriously restrict the practical application effect of deep learning methods in transient stability assessment of power systems. Summary of the invention
[0004] In view of the problems existing in the prior art, the present invention is proposed.
[0005] Therefore, the problem to be solved by the present invention is how to solve the problem that most methods only focus on the time series characteristics of transient data, ignoring the inherent topological structure characteristics of the power system, resulting in insufficient adaptability of the model to system structure changes; secondly, in the feature extraction process, a single neural network structure is often used, which makes it difficult to take into account both the time series correlation and spatial structure characteristics of the data at the same time, limiting the feature expression ability of the model; thirdly, due to the large difference in the number of stable samples and unstable samples in the transient samples of the power system, and some samples are in the stable boundary area, the model is prone to evaluation deviations, especially in the presence of measurement noise, the evaluation accuracy is significantly reduced; finally, the existing evaluation methods generally lack an effective preprocessing mechanism for PMU collected data, and fail to fully consider the dimensional differences of different features at different stages, affecting the effect of subsequent feature extraction.
[0006] In order to solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, an embodiment of the present invention provides a method for evaluating the stability of a power system based on spatiotemporal characteristics, which includes acquiring first evaluation data of the power system, wherein the first evaluation data includes bus voltage amplitude and phase angle data;
[0008] Inputting the first evaluation data into a preset RNN-AGCN evaluation model;
[0009] Based on the output results of the RNN-AGCN evaluation model, the stability of the power system is evaluated.
[0010] As a preferred scheme of the power system stability assessment method based on time-space characteristics described in the present invention, wherein: the first assessment data also includes: steady-state data before the fault, data during the fault, and data after the fault is cleared; the first assessment data is collected through a preset phasor measurement unit PMU.
[0011] As a preferred solution of the power system stability assessment method based on spatiotemporal characteristics described in the present invention, before inputting the first assessment data, it also includes: performing min-max normalization processing on the first assessment data; and processing the normalized data to a specified dimension through 1×1 convolution.
[0012] As a preferred solution of the power system stability assessment method based on spatiotemporal features described in the present invention, the RNN-AGCN assessment model includes: a recurrent neural network RNN, used to extract the timing features of transient data; an adaptive graph convolutional network AGCN, used to extract the spatial structure features of the power grid topology; the RNN and AGCN are interwoven to form a spatiotemporal feature extraction layer.
[0013] As a preferred solution of the power system stability assessment method based on spatiotemporal characteristics described in the present invention, the adaptive graph convolutional network AGCN includes: establishing a graph network structure including a node set and an edge set; automatically learning the adjacency matrix of the graph through an internal graph learning layer; and performing self-connection and symmetric normalization processing on the adjacency matrix.
[0014] As a preferred solution of the method for evaluating power system stability based on spatiotemporal features described in the present invention, it also includes: adding a jump connection to the output of each RNN, and summing up each layer of jump connections in turn; after performing a residual connection on the output of the RNN and the output of the AGCN, they are used as the input of the next spatiotemporal feature extraction layer.
[0015] As a preferred scheme of the power system stability assessment method based on spatiotemporal characteristics described in the present invention, the power system stability assessment based on the output results of the RNN-AGCN assessment model includes: calculating the maximum power angle difference between any two generators; substituting the calculated maximum power angle difference into the transient stability index TSI formula; and judging the system stability based on the positive or negative value of TSI.
[0016] In a second aspect, an embodiment of the present invention provides a power system stability assessment system based on spatiotemporal characteristics, which includes a data acquisition module for acquiring first assessment data of the power system, wherein the first assessment data includes bus voltage amplitude and phase angle data;
[0017] An evaluation module, inputting the first evaluation data into a preset RNN-AGCN evaluation model;
[0018] The result output module evaluates the stability of the power system according to the output result of the RNN-AGCN evaluation model.
[0019] In a third aspect, an embodiment of the present invention provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, the steps of the method for evaluating power system stability based on spatiotemporal characteristics as described in the first aspect of the present invention are implemented.
[0020] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, the steps of the method for evaluating power system stability based on spatiotemporal characteristics as described in the first aspect of the present invention are implemented.
[0021] The beneficial effects of the present invention are as follows: the present invention realizes the capture of dynamic characteristics of the whole process of the power system by acquiring complete time series features including steady-state data before the fault, data during the fault, and data after the fault is cleared, combined with the real-time acquisition technology of PMU. By performing min-max normalization processing and 1×1 convolution dimension adjustment on the acquired data, the problem of large differences in different feature dimensions is effectively solved. The spatiotemporal feature extraction layer composed of RNN and AGCN is adopted to realize the dual extraction of transient data time series features and grid topological spatial structure features, overcoming the limitation of only considering a single feature dimension in the prior art. The adjacency matrix is automatically learned through the internal graph learning layer in AGCN, which improves the model's adaptability to system topology changes. Combined with the optimization design of jump connections and residual connections output by RNN, the gradient vanishing problem in deep network training is effectively avoided. Finally, a clear evaluation standard is established by calculating the maximum power angle difference of the generator and combining it with the TSI transient stability index for comprehensive judgment. The present invention realizes the full process automation of power system stability assessment, significantly improves the accuracy and efficiency of the assessment, and at the same time has strong noise resistance and topological adaptability, providing a strong guarantee for the safe and stable operation of the power grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 It is a flow chart of the power system stability assessment method based on spatiotemporal characteristics;
[0024] Figure 2 A computer equipment diagram for a power system stability assessment method based on spatiotemporal characteristics;
[0025] Figure 3 The overall framework diagram of power system transient stability assessment based on the power system stability assessment method of spatiotemporal characteristics;
[0026] Figure 4 The schematic diagram of the cycle time network of the power system stability assessment method based on spatiotemporal characteristics;
[0027] Figure 5 The transient stability assessment model diagram of the power system based on RNN-AGCN is a power system stability assessment method based on spatiotemporal characteristics;
[0028] Figure 6 Confusion matrix diagram of different loss functions of power system stability assessment methods based on spatiotemporal characteristics;
[0029] Figure 7 This is a comparison chart of the evaluation performance of various models under different noise levels for the power system stability assessment method based on spatiotemporal characteristics;
[0030] Figure 8 This is a comparison diagram of the evaluation performance of various models under different topologies of the power system stability assessment method based on spatiotemporal characteristics. DETAILED DESCRIPTION
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.
[0032] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0033] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.
[0034] Example 1
[0035] Reference Figure 1-2 , which is the first embodiment of the present invention, and provides a method for evaluating the stability of a power system based on spatiotemporal characteristics, comprising:
[0036] S100: Acquire first evaluation data of the power system, the first evaluation data including bus voltage amplitude and phase angle data;
[0037] Specifically, bus voltage amplitude data may include real-time voltage values, average voltage values, maximum voltage values, etc. of key nodes in the power system; phase angle data may include bus phase angle, phase difference, power factor angle, etc.; power device junction temperature data may include temperature rise value, temperature threshold, thermal model parameters, etc. The sampling time window data includes steady-state data 2 seconds before the fault, data during the fault duration, and data 3 seconds after the fault is cleared.
[0038] In an optional embodiment, the first evaluation data may be any combination of data acquired by a variety of acquisition devices such as a PMU device, an intelligent terminal, a SCADA system, etc. For example, when the bus voltage amplitude data is high-precision real-time data acquired by a PMU device, the phase angle data may be phase angle data acquired by an intelligent terminal.
[0039] In an optional embodiment, the first evaluation data can also add or reduce other monitoring data according to different evaluation objectives. For example, when a more comprehensive evaluation of system stability is required, the generator speed and power data (i.e., the third type of monitoring data) can be added to capture the dynamic response characteristics of the unit, thereby further improving the accuracy and comprehensiveness of the evaluation. In addition, considering the diversity of the operating states of the power system, an adaptive sampling algorithm can also be introduced to dynamically adjust the collected monitoring data to ensure that high-quality system data can be obtained under various operating conditions.
[0040] In an optional embodiment, if the phase angle data is not needed, the relevant monitoring data can be omitted, thereby reducing the workload of data collection and processing. However, in this application, in order to ensure the comprehensiveness of the evaluation, such data is still retained.
[0041] It should be noted that the acquisition of the above monitoring data can fully cover the key nodes of the power system, including but not limited to important busbars, generator sets, load centers, etc., so as to ensure the accuracy and comprehensiveness of the evaluation results. At the same time, by introducing a variety of measuring devices and data acquisition systems, such as PMU devices, intelligent terminals, SCADA systems, etc., we can make full use of the advantages of various types of data, complement each other, and improve the efficiency and accuracy of the evaluation. In addition, according to different evaluation needs, the type and quantity of data can be flexibly adjusted to meet the needs of actual evaluation work. This multi-source data fusion strategy not only improves the flexibility and adaptability of the evaluation system, but also provides a rich data source for subsequent intelligent analysis.
[0042] S101: The first evaluation data also includes: steady-state data before a fault, data during a fault, and data after the fault is cleared; the first evaluation data is collected by a preset phasor measurement unit PMU.
[0043] S200: Inputting the first evaluation data into a preset RNN-AGCN evaluation model;
[0044] Specifically, the RNN-AGCN evaluation model includes basic structures such as input layer, time series feature extraction layer, spatial feature extraction layer and output layer. Among them, the input layer receives voltage amplitude and phase angle data after min-max normalization; the time series feature extraction layer is composed of a multi-layer RNN network to capture the dynamic characteristics of the system; the spatial feature extraction layer uses an AGCN network to analyze the topological relationship of the power grid; and the output layer gives the evaluation results of the system stability.
[0045] In an optional embodiment, the network structure of the RNN-AGCN evaluation model may include any combination of design schemes of different depths and widths. For example, when the system scale is small, a simplified structure of 3 layers of RNN and 2 layers of AGCN may be adopted; when facing a large-scale system, it may be expanded to a deep structure of 5 layers of RNN and 4 layers of AGCN to extract more complex features.
[0046] In an optional embodiment, the RNN-AGCN evaluation model can also adjust network parameters according to different application scenarios. For example, in a real-time evaluation scenario, the number of network layers can be reduced and the calculation structure can be simplified (i.e., a lightweight model) to increase the calculation speed; in an offline analysis scenario, a deeper network structure can be used to increase the number of hidden layers and neurons to improve the model's expressiveness. In addition, considering the diversity of power system operating characteristics, an adaptive learning mechanism can be introduced to dynamically adjust network parameters to ensure that the model can maintain good performance under different working conditions.
[0047] In an optional embodiment, if the evaluation task is simple, only a single network structure of RNN or AGCN can be used to simplify the model complexity. However, in this application, in order to fully integrate temporal and spatial features, a complete RNN-AGCN dual network structure is adopted.
[0048] It should be noted that the design of the RNN-AGCN evaluation model needs to comprehensively consider multiple factors, including but not limited to data characteristics, computational efficiency, and evaluation accuracy, so as to ensure the practicality and reliability of the model. At the same time, by reasonably configuring the network structure and parameters, such as the number of hidden layers, the number of neurons, the type of activation function, etc., the feature extraction ability of the model can be fully utilized and the accuracy of the evaluation can be improved. In addition, for power systems of different sizes, the network structure can be flexibly adjusted to balance the relationship between computational efficiency and evaluation accuracy. This adaptive network design strategy not only improves the generalization ability of the model, but also provides more optimization space for practical applications.
[0049] S201: Before inputting the first evaluation data, it also includes: performing min-max normalization processing on the first evaluation data; and processing the normalized data to a specified dimension through 1×1 convolution.
[0050] S300: Evaluate the stability of the power system based on the output results of the RNN-AGCN evaluation model.
[0051] Specifically, the stability assessment process includes core steps such as feature extraction, data fusion, and state judgment. In the feature extraction stage, the RNN network captures the dynamic response characteristics of the system, and the AGCN network analyzes the topological structure characteristics; the data fusion stage comprehensively processes the temporal and spatial features; the state judgment stage makes a final assessment of the stability of the system based on the transient stability index TSI.
[0052] In an optional embodiment, the stability assessment result may include any combination of multiple output forms. For example, when a quick decision is required, only the binary judgment result of stability / instability may be output; when a detailed analysis is required, quantitative indicators such as stability margin and critical failure time may be given at the same time to provide more references for system operation optimization.
[0053] In an optional embodiment, the evaluation process can also add auxiliary functions according to different application requirements. For example, in the monitoring and early warning scenario, the early warning level classification function can be added to subdivide the system status into multiple levels such as safety, attention, warning, and danger; in the fault analysis scenario, the fault feature recognition function can be added to assist operators to quickly locate the problem. In addition, considering the diversity of power system disturbances, an adaptive evaluation mechanism can also be introduced to dynamically adjust the evaluation strategy according to the type and degree of disturbance.
[0054] In an optional embodiment, for a simple evaluation task, only the TSI index may be used for judgment. However, in order to provide more comprehensive evaluation information in this application, a multi-index comprehensive evaluation scheme is adopted.
[0055] It should be noted that the generation of stability assessment results requires consideration of multiple technical links, including but not limited to feature fusion methods, criterion selection, threshold setting, etc., to ensure the reliability of the assessment results. At the same time, by rationally designing the assessment process, such as optimizing the configuration of feature extraction, data fusion, state judgment and other links, the feature information extracted by the model can be fully utilized to improve the accuracy of the assessment. In addition, for different application scenarios, the output form and assessment strategy can be flexibly adjusted to meet actual engineering needs. This comprehensive assessment scheme not only improves the credibility of the assessment results, but also provides strong support for system operation management.
[0056] S301: The RNN-AGCN evaluation model includes: a recurrent neural network RNN, which is used to extract the temporal features of transient data; an adaptive graph convolutional network AGCN, which is used to extract the spatial structural features of the power grid topology; RNN and AGCN are interwoven to form a spatiotemporal feature extraction layer.
[0057] S302: The adaptive graph convolutional network AGCN includes: establishing a graph network structure including a node set and an edge set; automatically learning the adjacency matrix of the graph through an internal graph learning layer; and performing self-connection and symmetric normalization processing on the adjacency matrix.
[0058] S303: Also includes: adding a skip connection to the output of each RNN, and summing up the skip connections of each layer in turn; performing a residual connection between the output of the RNN and the output of the AGCN, and using them as the input of the next spatiotemporal feature extraction layer.
[0059] S304: Evaluating the stability of the power system based on the output results of the RNN-AGCN evaluation model includes: calculating the maximum power angle difference between any two generators; substituting the calculated maximum power angle difference into the transient stability index TSI formula; and judging the system stability according to the positive or negative value of TSI.
[0060] Furthermore, this embodiment also provides a power system stability assessment system based on spatiotemporal characteristics, comprising:
[0061] A data acquisition module, which acquires first evaluation data of the power system, wherein the first evaluation data includes bus voltage amplitude and phase angle data;
[0062] An evaluation module, inputting the first evaluation data into a preset RNN-AGCN evaluation model;
[0063] The result output module evaluates the stability of the power system according to the output results of the RNN-AGCN evaluation model.
[0064] In summary, by collecting complete time series data including steady-state data before the fault, data during the fault, and data after the fault is cleared, and combining it with the PMU phasor measurement unit for real-time collection, the dynamic characteristics of the entire power system process are captured, thereby providing a complete and reliable data basis for subsequent stability evaluation, and effectively avoiding the evaluation deviation caused by incomplete data collection in traditional methods.
[0065] By performing min-max normalization on the input data and using 1×1 convolution to process the data to the specified dimension, the problem of large dimensional differences between different features at different stages is solved, the accuracy of subsequent feature extraction is improved, and the complexity of model training is reduced.
[0066] By innovatively designing a spatiotemporal feature extraction layer by interweaving the RNN recurrent neural network and the AGCN adaptive graph convolutional network, the dual extraction of transient data time series features and power grid topology spatial structure features is achieved, overcoming the limitation of the existing technology of only considering a single feature dimension and improving the comprehensiveness of feature extraction.
[0067] By establishing a graph network structure of node sets and edge sets in AGCN and automatically learning the adjacency matrix through the internal graph learning layer, adaptive learning of the power grid topology is achieved, which improves the model's adaptability and generalization performance to system topology changes.
[0068] By adding skip connections and summing the RNN outputs, as well as optimizing the residual connection between the RNN output and the AGCN output, the gradient vanishing problem in deep network training is effectively avoided, and the training stability and convergence speed of the model are improved.
[0069] By calculating the maximum power angle difference of the generator and making a comprehensive judgment based on the TSI transient stability index, a clear evaluation standard was established, which improved the interpretability and reliability of the evaluation results.
[0070] The entire assessment method realizes the automation of the entire process from data collection, feature extraction to stability assessment, significantly improving the efficiency and accuracy of power system stability assessment and providing a strong guarantee for the safe and stable operation of the power grid.
[0071] Example 2
[0072] Reference Figure 2 - Figure 8 , which is the second embodiment of the present invention, and this embodiment provides a method for evaluating the stability of a power system based on spatiotemporal characteristics. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.
[0073] The overall framework of power system transient stability assessment includes two stages: offline training and online evaluation. In the offline training stage, the training set is used to train the RNN-AGCN model, and the validation set is used to find the optimal loss value in the model training process. The test set is completely unknown during the offline training process. During the online evaluation, the test set comes from the measurement data of the PMU. Figure 3 shown.
[0074] A recurrent neural network is a neural network structure specifically designed to process sequence data. It can process time series data and predict future data change trends. RNN can handle time dependencies in sequences, making it very suitable for time series prediction.
[0075] The basic principle of RNN is to introduce the concept of time into the neural network so that the network can process sequence data. The basic structure of RNN is a recurrent unit, which consists of an input layer, a hidden layer and an output layer. At each time step, the network receives an input vector and a hidden state vector, combines them through a nonlinear function, and then generates an output vector and a new hidden state vector as the input and hidden state of the next time step. This feedback mechanism allows the network to remember previous information and take historical information into account when processing sequence data. Figure 4 shown.
[0076] RNN calculates the hidden state by the following formula:
[0077] h t =f(W·x t +U·h t-1 +b) (1)
[0078] Where W and U are the weight matrices from input to hidden and hidden to hidden, respectively, b is the bias term, and f is the activation function.
[0079] 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. Both RNN and LSTM have great advantages in processing time series data, but RNN does not have a complex gating mechanism and loop structure. Compared with LSTM, RNN has a lower computational cost and better training stability. Therefore, the present invention uses RNN to fully extract the time series characteristics of the transient data of the power system to ensure the performance of the model evaluation.
[0080] Adaptive Graph Convolutional Networks:
[0081] 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 based on:
[0082]
[0083] The graph convolutional network ((CN)) 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:
[0084] H(l+1) =f(H (l) ,A),l=0,1,2,.....,L (2)
[0085] In the formula, 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.
[0086] 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:
[0087] H (l+1) =f(H (l) ,A)=σ(AH (l) W (l) ) (3)
[0088] In the formula, σ(·) 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:
[0089]
[0090] In the formula, 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:
[0091]
[0092] In the formula, 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:
[0093]
[0094] 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 value of formula (2) is used to form an adjacency matrix, 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) (mining the spatial structural characteristics of the power grid), and 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:
[0095] M 1 =tanh(αE 1 Θ 1 ) (7)
[0096] M 2 =tanh(αE 2 Θ 2 ) (8)
[0097]
[0098]
[0099] In the formula, E 1 ,E 2 is the randomly initialized node embedding feature, Θ 1 , Θ 2 is a model trainable parameter, 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 values of the elements in the matrix are in the range of (0,1). The more mutually influential (high degree) nodes are, the closer the value in the influence matrix is to 1. argtopm(·) means returning the vector of the m neighbor nodes closest to the central node and setting the elements in the remaining positions to zero, in order to sparse the adjacency matrix and reduce the computational complexity.
[0100] 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:
[0101]
[0102] In the formula, 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.
[0103] TSA model based on RNN-AGCN:
[0104] 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 RNN-AGCN is as follows: Figure 5 shown.
[0105] The transient data after min-max normalization is first processed by 1×1 convolution to the specified dimension, and then input into the RNN-AGCN module. The RNN 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 RNN 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 RNN 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 RNN, which is essentially a 1×L i Convolution, L i represents the input sequence length of the i-th skip connection. Each layer of skip connections is summed up in turn until the last layer of skip connections is completed. 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)
[23] to obtain the stability / instability evaluation result. The TSI expression is as follows:
[0106]
[0107] Δδ 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°.
[0108] Focal loss function:
[0109] 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 follows:
[0110]
[0111] In the formula, y is the true label of the sample, 1 represents stability, and 0 represents instability; p i is the probability of the predicted class of the model; w us and w s represent the weight factors of unstable samples and stable samples respectively, and their values are usually determined according to the ratio of unstable samples and stable samples in the sample set. In the actual power system, in addition to the problem of sample class imbalance, there are also some samples on the stable boundary, and it is difficult to classify such samples. When designing the loss function, the loss proportion of such samples should be increased, and at the same time, the loss proportion of easy - to - classify samples should be reduced. FL introduces a difficult - easy sample modulation factor on the basis of the weighted cross - entropy to improve the problem of misjudgment of difficult - to - classify samples on the stable boundary. The expression of FL is:
[0112]
[0113] Among them, γ is the difficult - easy sample modulation factor; when p i is closer to 0.5, it indicates that the sample classification is more difficult. When p i is closer to 0 or 1, it indicates that the sample classification is easier. By adjusting the value of γ, the loss proportion of difficult - to - classify samples is increased during the model training process, and at the same time, the loss proportion of easy - to - classify samples is reduced.
[0114] Evaluation indicators:
[0115] Transient stability assessment is essentially a binary classification problem, and there is a class imbalance in transient samples. If only the global evaluation accuracy is used as the evaluation indicator of the model, it is difficult to comprehensively reflect the performance of the model. In addition, considering that the cost of misjudging an unstable sample as stable is greater than that of misjudging a stable sample as unstable, the evaluation indicator should pay more attention to the evaluation accuracy of unstable samples. Therefore, this invention uses the confusion matrix
[24] in the machine - learning classification task, and uses accuracy (A cc ), (recall) (R ec ), (precision) P re ) and (F1 - score) to comprehensively evaluate the evaluation performance of the model. The confusion matrix is shown in Table 1.
[0116] Table 1 TSA confusion matrixTable 1TSA confusion matrix
[0117]
[0118] Among them, T s and T usRepresents the number of stable samples and unstable samples that are correctly evaluated, F s Indicates that unstable samples are evaluated as stable samples (missed) (number) F us The mathematical definitions of various evaluation indicators indicating that a stable sample is evaluated as an unstable sample (false positive) (quantity) are shown in formula (16) ((1)).
[0119]
[0120] In the formula, 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 The ratio of correctly evaluated unstable samples to the samples evaluated as unstable, F 1 For R ec and P re The harmonic mean of the two is used to comprehensively measure the two.
[0121] Case Analysis
[0122] To verify the effectiveness of the proposed method, the present invention uses PSD-BPA simulation software to generate a sample set, and builds an RNN-AGCN evaluation model based on the pytorch framework under python3.8. In view of the fact that the hyperparameters of deep neural networks have a great influence on model performance, and there is currently no perfect theory to guide the selection of hyperparameters, the present invention sets the number of network layers of the spatiotemporal feature extraction layer to 3 after multiple experimental tests; adds dropout after each hidden layer of the RNN to prevent overfitting, the dropout value is set to 0.3, and the expansion factor is set to 2; the AGCN network depth is set to 3, the number of neighbor nodes is set to 8, the saturation rate of the activation function α=3, and the feature retention rate β=0.05; the unstable sample weight factor w us =0.75, stable sample weight factor w s =0.25, the difficult and easy sample modulation factor γ=2; the training batch size is set to 128, the training rounds are set to 120, the initial learning rate is set to 0.001, and the optimization algorithm uses the Adam algorithm.
[0123] Comparison of loss function effects
[0124] Binary cross entropy and weighted cross entropy loss functions are often used to guide deep learning evaluation model training. The two and the focal loss function are used to guide model training respectively. The performance indicators of the obtained training model on the test set are shown in Table 2 and Figure 7 shown.
[0125] Table 2 Test results of different loss functions
[0126] Loss Function <![CDATA[A cc / %]]> <![CDATA[R ec / %]]> <![CDATA[P re / %]]> <![CDATA[F 1 / %]]> Binary Cross Entropy 98.85 97.08 97.79 97.44 Weighted Cross Entropy 99.26 98.18 98.53 98.35 Focal Loss 99.51 98.54 99.26 98.90
[0127] Combining Table 2 and Figure 7 It can be seen that the TSA model has the best performance when trained with the focal loss function, with the least number of missed samples and misjudged samples. This is because the sample category weight factor is introduced into the focal loss function, which reduces the frequency of stable samples participating in the model parameter adjustment and improves the problem that the model tends to evaluate unknown samples as stable samples. At the same time, the existence of the difficult and easy sample modulation factor makes the model pay more attention to difficult-to-classify samples at the stable boundary during training. In the following analysis, the RNN-AGCN model refers to the model trained with the focal loss function.
[0128] 2.2 Model Evaluation Performance Comparison
[0129] In order to verify the effectiveness of the model proposed in the present invention, the same sample set is used to build deep learning evaluation models such as DT, SVM, CNN, LSTM, TCN, AGCN, etc. to compare with the model proposed in the present invention. Among them, DT selects the C5.0 algorithm, and the confidence factor adopts the default value of 0.25; SVM uses the radial basis function, and the optimal value of the relevant parameters is found through grid search method and five-fold cross validation; CNN sets 2 convolutional layers and 2 fully connected layers, and the convolution kernel size is set to 3; The number of hidden layer neurons of LSTM is {64, 128, 32}, and 1 fully connected layer is set. The evaluation performance of each model on the same test set is shown in Table 3.
[0130] Table 3 Test results of different evaluation models
[0131] Model <![CDATA[A cc / %]]> <![CDATA[R ec / %]]> <![CDATA[P re / %]]> <![CDATA[F 1 / %]]> DT 94.92 86.13 90.77 88.39 SVM 95.41 87.59 91.60 89.55 CNN 96.72 90.51 94.66 92.54 LSTM 98.03 94.89 96.30 95.59 TCN 98.28 95.62 96.68 96.15 AGCN 98.93 97.08 98.15 97.61 RNN-AGCN 99.51 98.54 99.26 98.90
[0132] As shown in Table 3, shallow neural networks such as DT and SVM have limited ability to understand the underlying data and have the worst accuracy. 1 The scores did not reach 90%. The feature extraction capabilities of deep learning algorithms such as CNN and LSTM are better than those of shallow neural networks, so the evaluation performance of the corresponding models is also higher. The RNN-AGCN evaluation model proposed in this invention fully integrates the temporal characteristics of transient data and the spatial structure characteristics of power grid topology. Its various evaluation indicators are better than those of RNN and AGCN, including accuracy, F 1 The scores reached 99.51% and 98.9% respectively. In particular, the recall rate reached 98.54%, which shows that the proposed model misses the least number of unstable samples as stable samples, ensuring the evaluation accuracy of unstable samples.
[0133] 2.3 Analysis of evaluation results when PMU measurement data contains noise
[0134] In actual power systems, the data collected by the phase measurement unit (PMU) may have measurement errors. According to the IEEE power system synchronous data transmission standard
[25] , the PMU measurement error should be less than 1%. The conversion formula between measurement error and signal-to-noise ratio is as follows:
[0135]
[0136] P s is the effective power of the signal, P n is the effective power of noise, η is the signal-to-noise ratio, and the smaller the signal-to-noise ratio, the more serious the noise interference. The present invention considers measurement errors of 0.2%, 0.4%, 0.6%, and 0.8%, and the corresponding noise signal-to-noise ratios are 26.99, 23.98, 22.22, and 20.97 dB, respectively. The test set after adding noise is used to test the evaluation performance of each model. The test results are shown in Figure 7 shown.
[0137] from Figure 7 It can be seen from the figure that after adding noise, the evaluation performance of each model has decreased, and the more serious the noise, the lower the accuracy and F 1 The accuracy of the RNN-AGCN model proposed in this invention can still be maintained at 98.17% under a noise level of 20.97dB, which is only 1.34% lower than that of the noise-free case. 1 The score can still reach 96%, which is a decrease of 2.89% compared to the noise-free case. Compared with the other 6 groups of comparison models, the performance of the proposed evaluation model is the best at each noise level, which shows that the proposed model has strong robustness to noise.
[0138] 2.5 Model generalization ability test under new topology
[0139] In the operation of the power system, the system usually does not maintain the full topology due to line maintenance or failure. If the model has a strong generalization ability for the topology change of the system, that is, the model still has good evaluation performance after the power system topology changes, the model update process can be avoided, thereby reducing the computational cost. To this end, this section will compare the generalization ability of different models under the new topology to verify the performance advantage of the evaluation model proposed in this invention after the system topology changes.
[0140] The new topology considers randomly disconnecting 1 transmission line in the IEEE 39-node system to form N-1 and N-2 topologies, and ensures that the number of nodes in the system does not change. Since there are too many combinations of N-1 and N-2 operating modes and the cost of complete traversal is too high, the present invention randomly selects 40 topology combinations and sets faults for time domain simulation. The fault setting conditions refer to Section 2.1, and a total of 4080 simulation samples are generated, of which 2448 are stable samples and 1632 are unstable samples. This sample set is used as a test set to test the evaluation performance of each model. The test results are shown in the figure. Figure 8 shown.
[0141] It can be seen that the RNN-AGCN model proposed in this invention has the best evaluation performance under the new topology, with the accuracy and F 1 The scores are 98.43% and 98.03% respectively, which are better than the other 6 groups of comparison models, indicating that the proposed model has good generalization ability for system topology changes. The performance of the AGCN model under the new topology is second only to RNN-AGCN, and is better than DT, SVM, CNN, LSTM and TCN models. This is because AGCN extracts the spatial structural characteristics of the power grid topology. When the system topology changes, it will be reflected in the adjacency matrix input to the model, so its performance is less affected by the topology change. RNN-AGCN further considers the time series characteristics of transient data on the basis of AGCN, so its performance on both the original topology and the new topology test sets is better than AGCN. Other conventional deep learning and shallow neural network models cannot reveal changes in the system topology, resulting in poor performance on the new topology test set.
[0142] 2.6 Model time analysis
[0143] In order to reflect the time efficiency of the RNN-AGCN evaluation model, the training time and online evaluation time of the RNN-AGCN evaluation model are compared with those of conventional deep learning models (CNN and LSTM). The offline training time is the sum of the time required to train the model on the training set and find the optimal loss value on the validation set. The test results are shown in Table 4.
[0144] Table 4 Comparison of time efficiency of different models
[0145] Model Training time / s Evaluation time / s Single sample evaluation time / ms CNN 97.32 0.035 0.029 LSTM 100.26 0.040 0.033 RNN-AGCN 1462.47 0.390 0.320
[0146] It can be seen that the offline training time of RNN-AGCN is much longer than that of CNN and LSTM models. This is because the RNN-AGCN model involves updating feature representations through connections between nodes, which increases the amount of calculation in the information transmission process, thereby increasing the model training time. It is worth noting that the RNN-AGCN model only takes 0.39s to perform online evaluation on 1220 samples, and the average evaluation time for a single sample is only 0.32ms. Although it is slightly higher than the conventional deep learning model, it is negligible compared to the time domain simulation method. Therefore, the RNN-AGCN model proposed in the present invention is still a TSA model that can meet the requirements of online evaluation.
[0147] Example 3
[0148] This embodiment also provides a computer device, which is applicable to a method for evaluating the stability of an electric power system based on spatiotemporal characteristics, and includes a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement a forced oscillation detection and positioning method for a distribution network as proposed in the above embodiment.
[0149] This embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, a forced oscillation detection and positioning method for a distribution network is implemented as proposed in the above embodiment.
[0150] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.
[0151] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0152] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0153] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.
[0154] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0155] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.
Claims
1. A method for evaluating power system stability based on spatiotemporal characteristics, characterized in that: include, Acquire first evaluation data of the power system, the first evaluation data including bus voltage amplitude and phase angle data; Inputting the first evaluation data into a preset RNN-AGCN evaluation model; Based on the output results of the RNN-AGCN evaluation model, the stability of the power system is evaluated.
2. The method for evaluating power system stability based on spatiotemporal characteristics according to claim 1, characterized in that: The first evaluation data also includes: steady-state data before the fault, data during the fault, and data after the fault is cleared; the first evaluation data is collected through a preset phasor measurement unit PMU.
3. The method for evaluating power system stability based on spatiotemporal characteristics according to claim 2, characterized in that: Before inputting the first evaluation data, the method further includes: performing min-max normalization processing on the first evaluation data; and processing the normalized data to a specified dimension through 1×1 convolution.
4. The method for evaluating power system stability based on spatiotemporal characteristics according to claim 3, characterized in that: The RNN-AGCN evaluation model includes: a recurrent neural network RNN, which is used to extract the temporal characteristics of transient data; an adaptive graph convolutional network AGCN, which is used to extract the spatial structural characteristics of the power grid topology; the RNN and AGCN are interwoven to form a spatiotemporal feature extraction layer.
5. The method for evaluating power system stability based on spatiotemporal characteristics according to claim 4, characterized in that: The adaptive graph convolutional network AGCN includes: establishing a graph network structure including a node set and an edge set; automatically learning the adjacency matrix of the graph through an internal graph learning layer; and performing self-connection and symmetric normalization processing on the adjacency matrix.
6. The method for evaluating power system stability based on spatiotemporal characteristics according to claim 5, characterized in that: Also includes: Add a skip connection to the output of each RNN and sum each layer of skip connections in turn; The output of the RNN and the output of the AGCN are residually connected and used as the input of the next spatiotemporal feature extraction layer.
7. The method for evaluating power system stability based on spatiotemporal characteristics according to claim 6, characterized in that: The evaluation of the stability of the power system based on the output results of the RNN-AGCN evaluation model includes: calculating the maximum power angle difference between any two generators; substituting the calculated maximum power angle difference into the transient stability index TSI formula; and judging the system stability according to the positive or negative value of the TSI.
8. A power system stability assessment system based on spatiotemporal characteristics, based on the power system stability assessment method based on spatiotemporal characteristics according to any one of claims 1 to 7, characterized in that: It also includes a data acquisition module, which acquires first evaluation data of the power system, wherein the first evaluation data includes bus voltage amplitude and phase angle data; An evaluation module, inputting the first evaluation data into a preset RNN-AGCN evaluation model; The result output module evaluates the stability of the power system according to the output result of the RNN-AGCN evaluation model.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for evaluating power system stability based on spatiotemporal characteristics according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for evaluating power system stability based on spatiotemporal characteristics according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Electric power system transient voltage stability evaluation method based on graph space-time network
CN111756034A
Power system transient stability monitoring method and device, terminal equipment and storage medium
CN112446171A
A transient stability evaluation method and device for a power system
CN113435113A
Transient evaluation method for power system in fusion attention mechanism deep residual error inversion network
CN115395508A
LSTM-based power system transient stability evaluation method and system, and storage medium
CN117078035A
Cited By
Power distribution network grounding line selection analysis and fault location method based on signal feature identification
CN119917917A