Transient stability assessment model updating method and device, electronic equipment and storage medium
By generating fault test sets and training sets, and combining clustering memory playback and continuous learning strategies, the problems of forgetting and slow speed in updating power system transient stability assessment models are solved, achieving fast, low-cost model updates and high-precision assessments.
Patent Information
- Application Number
- CN202310899166.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-20
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-07-20
AI Technical Summary
Existing technologies suffer from catastrophic forgetting and slow update speed when updating power system transient stability assessment models, especially when the power grid topology changes frequently, making it difficult to guarantee the comprehensiveness of sample coverage and the sufficiency of model learning.
A transient stability assessment model update method is adopted. By generating fault test sets and fault training sets, combining clustering memory replay strategy and continuous learning training strategy, and using cross-entropy loss function and embedding regularization loss function, the transient stability assessment model is updated to prevent forgetting phenomenon and speed up the update.
It enables rapid model updates during power grid topology changes, avoids catastrophic amnesia, reduces model update costs, and improves evaluation accuracy.
Smart Images

Figure CN116933860B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system stability assessment technology, and in particular to a transient stability assessment model update method, apparatus, electronic device and storage medium. Background Technology
[0002] Transient stability assessment is a crucial tool for operators to ensure the safe operation of power systems. To anticipate potential instability incidents, operators need to perform transient stability assessments while monitoring system operation to examine the transient stability of anticipated faults under specific system conditions. Traditional transient stability assessment methods primarily utilize time-domain simulation techniques to solve detailed physical models and obtain the dynamic response of the power grid after disturbances; however, this method suffers from extremely high time costs.
[0003] In modern power systems, the massive integration of new energy generation and power electronic equipment has led to diverse system operation modes and complex transient mechanisms, resulting in shorter transient stability assessment execution cycles and longer simulation times. Therefore, transient stability assessments based on time-domain simulation can only examine a very limited set of faults, failing to meet the requirements for safe operation of large-scale systems. Numerous studies have shown that machine learning-based data-driven methods can directly establish a mapping relationship between original electrical characteristics and transient stable states, thus enabling rapid transient stability assessments.
[0004] Most existing methods involve generating large-scale labeled sample sets for centralized model training, thus considering very limited topology variations (usually less than "N-2"). However, real-world power grids are vast, and centralized pre-trained models struggle to guarantee comprehensive sample coverage and sufficient model learning. Furthermore, due to planned maintenance and unexpected outages, the power grid topology frequently changes, altering the system's transient stability characteristics. Consequently, stability assessment models require continuous updates. However, the sheer size of the input dataset slows down these updates and can lead to catastrophic forgetting during model learning. Summary of the Invention
[0005] This invention provides a method, apparatus, electronic device, and storage medium for updating a transient stability assessment model, which solves or partially solves the technical problems of catastrophic forgetting and slow update speed in the existing related technologies when updating power system transient stability assessment models.
[0006] This invention provides a method for updating a transient stability assessment model, the method comprising:
[0007] In response to the detection of a change in the operating topology of the power system, a fault test set corresponding to the changed operating topology is generated. The fault test set is used to test the evaluation accuracy of the transient stability assessment model.
[0008] If the accuracy test results do not meet the preset accuracy requirements, a fault training set is generated, and the embedded feature set generated by the transient stability evaluation model during the historical model learning process is obtained.
[0009] The embedded feature set is subjected to clustering memory playback processing to obtain a playback sample set;
[0010] The transient stability assessment model is updated based on the fault training set and the replay sample set, using a continuous learning training strategy.
[0011] Optionally, the step of performing clustering memory replay processing on the embedded feature set to obtain a replay sample set includes:
[0012] Step S1: Randomly select several data points from the embedded feature set as initial centroids;
[0013] Step S2: Calculate the distance from the other data points in the embedded feature set to the initial centroid, and assign each of the other data points to the cluster to which the initial centroid is closest to it.
[0014] Step S3: Calculate the cluster mean of each data point in each cluster, and redetermine the cluster centroids corresponding to the partitioned clusters based on the cluster mean.
[0015] Step S4: Repeat steps S2 to S3 until the cluster to which the data points in the embedded feature set belong no longer changes;
[0016] Step S5: Select the data point closest to the centroid of each cluster as the replay sample set corresponding to the embedded feature set. The replay sample set includes the sample input feature set for training the transient stability evaluation model and the embedded feature set generated during the model learning process.
[0017] Optionally, before applying the transient stability assessment model to the power system online, the method further includes:
[0018] A transient stability evaluation model is constructed, which consists of multiple graph convolutional layers, multiple graph pooling layers, and multiple fully connected layers stacked together.
[0019] Obtain a hypothetical failure dataset, which includes multiple sample input features and sample labels corresponding to the sample input features;
[0020] The sample input features are input into the transient stability evaluation model for feature training. A cross-entropy loss function is constructed based on the sample labels. At the same time, the network parameters of the transient stability evaluation model are trained using the backpropagation algorithm to optimize the transient stability evaluation model.
[0021] Optionally, the step of inputting the sample input features into the transient stability evaluation model for feature training includes:
[0022] The sample input features are subjected to feature merging processing to obtain graph feature input, which represents the combined power grid operation features of a single node in the power system at three moments: before the system fault, immediately after the fault occurs, and immediately after the fault is cleared.
[0023] The graph feature input is processed by the multiple graph convolutional layers, and the graph feature input processed by the graph convolutional layers is processed by the multiple graph pooling layers to extract multiple graph feature vectors.
[0024] Each graph feature vector is merged to obtain the merged graph features;
[0025] The merged graph features are extracted and classified through the multiple fully connected layers to output transient stability judgment. At the same time, the hidden layer features of the merged graph features are extracted as embedded feature vectors after processing by each fully connected layer.
[0026] The multiple embedded feature vectors are merged to output the embedded features corresponding to the sample input features;
[0027] The embedded features corresponding to the input features of multiple samples are used as the embedded feature set generated by the transient stability evaluation model during the model learning process.
[0028] Optionally, the step of merging multiple embedded feature vectors to output the embedded features corresponding to the sample input features includes:
[0029] The multiple embedded feature vectors are merged using the following formula to output the embedded features corresponding to the sample input features:
[0030]
[0031] Where h represents the embedded features corresponding to the sample input features, L is the number of fully connected layers, and || represents the juxtaposition operation on the vectors. l h0 represents the embedded feature vector output by the l-th fully connected layer in the model. In particular, when l = 0, h0 represents the input feature vector of the first fully connected layer.
[0032] Optionally, the evaluation parameters of the transient stability assessment model include the model output, which represents the transient stability judgment, wherein the transient stability judgment is transiently stable or transiently unstable, and the construction of the cross-entropy loss function based on the sample labels includes:
[0033] Based on the sample labels and model output, the cross-entropy loss function is constructed using the following formula:
[0034]
[0035] Among them, L CE Let y represent the cross-entropy loss function, n represent the number of faulty samples in the expected faulty dataset, and y represent the cross-entropy loss function. i g represents the sample label corresponding to the i-th fault sample. i Let represent the model output corresponding to the i-th fault sample, and log represents the logarithmic function.
[0036] Optionally, before obtaining the anticipated fault dataset, the method further includes:
[0037] Given the initial power grid operating topology, a set of operating modes is generated by combining load changes and power balance in the topology. The set of operating modes corresponds to multiple operating modes, each of which corresponds to a set of anticipated faults, and each set of anticipated faults contains multiple fault samples.
[0038] The transient response of the system after each operating mode failure is calculated by time-domain simulation. Based on the transient response, the sample input features and sample labels of each failure sample are extracted. The sample input features are the power grid operation features of a single node in the system at three moments: before the system failure, immediately after the failure, and immediately after the failure is cleared.
[0039] The sample input features and sample labels of each of the fault samples are used together as the expected fault dataset corresponding to the set of operating modes.
[0040] Optionally, updating the transient stability assessment model based on the fault training set and the replay sample set using a continuous learning training strategy includes:
[0041] A continuous learning loss function is constructed using the cross-entropy loss function and the embedding regularization loss function, and the transient stability evaluation model is updated based on the continuous learning loss function. The construction expression of the continuous learning loss function is as follows:
[0042] L CL =L CE +γL ER
[0043] The cross-entropy loss function is used to learn the fault training set, and the embedding regularization loss function is used to learn the replay sample set. The expression for the embedding regularization loss function is as follows:
[0044]
[0045] Among them, L CL L represents the continuous learning loss function. CE Let L represent the cross-entropy loss function, γ represent the tradeoff parameter, and L represent the cross-entropy loss function. ER Let O represent the embedding regularization loss function, M represent the number of historical datasets learned, L represent the number of replay samples in the historical replay sample set, and h represent the number of fully connected layers in the transient stability evaluation model. tij This represents the embedded feature vector of the i-th replay sample from the t-th historical dataset after the j-th fully connected layer in the current update model. This indicates that the corresponding h tij Embedded feature vectors in historical models, ||*|| denotes vector norm calculation.
[0046] Optionally, the method further includes:
[0047] If the evaluation accuracy of the updated transient stability assessment model meets the preset accuracy requirements, the updated transient stability assessment model will be applied to the online transient stability assessment of the power system. At the same time, the learned fault training set will be subjected to clustering memory playback processing to update the playback sample set.
[0048] The present invention also provides a transient stability assessment model update device, comprising:
[0049] The fault test set generation module is used to generate a fault test set corresponding to the changed operating topology in response to the detection of a change in the operating topology of the power system. The fault test set is used to test the evaluation accuracy of the transient stability assessment model.
[0050] The embedded feature set acquisition module is used to generate a fault training set and acquire the embedded feature set generated by the transient stability evaluation model during the historical model learning process if the accuracy test result does not meet the preset accuracy requirements.
[0051] The clustering memory playback processing module is used to perform clustering memory playback processing on the embedded feature set to obtain a playback sample set;
[0052] The continuous learning training model update module is used to update the transient stability assessment model based on the fault training set and the replay sample set, according to the continuous learning training strategy.
[0053] The present invention also provides an electronic device, the device comprising a processor and a memory:
[0054] The memory is used to store program code and transmit the program code to the processor;
[0055] The processor is configured to execute the transient stability assessment model update method as described above, according to the instructions in the program code.
[0056] The present invention also provides a computer-readable storage medium for storing program code for executing the transient stability assessment model update method as described in any of the preceding claims.
[0057] As can be seen from the above technical solutions, this invention has the following advantages: It proposes a continuous learning and updating method for transient stability assessment models. First, to address the slow updating problem during continuous learning, a clustering memory replay strategy is proposed. This involves using a clustering algorithm to select representative replay samples from historical datasets for use when the model learns new datasets, merging them with new samples for training, without needing to relearn all historical samples, thus minimizing model update costs. Simultaneously, to address the catastrophic forgetting phenomenon during continuous learning, a continuous learning training strategy is proposed. This strategy combines the cross-entropy classification loss function of new samples with the embedding regularization loss function of historical replay samples to train the model. Cross-entropy classification loss is used to learn new samples, while embedding regularization loss is used to review representative samples from historical datasets, and the embedding variation of historical replay samples in the fully connected layers of the model is limited to maintain old knowledge. Using the method provided by this invention, catastrophic forgetting can be prevented when the model learns multiple different power grid topology datasets, and the computational cost required for model updates each time a new dataset is learned is very small, thus accelerating the model update speed. Attached Figure Description
[0058] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1a This is a schematic diagram of the structure of a current conventional graph convolution model;
[0060] Figure 1b This is a schematic diagram of the structure of a transient stability evaluation model provided in an embodiment of the present invention;
[0061] Figure 2A flowchart illustrating the steps of a transient stability assessment model update method provided in this embodiment of the invention;
[0062] Figure 3 This is a schematic diagram of the overall process of a transient stability assessment model update method provided in an embodiment of the present invention;
[0063] Figure 4 This is a schematic diagram of the structure of an IEEE 39-node system provided in an embodiment of the present invention;
[0064] Figure 5 This is a schematic diagram showing the comparison between the anti-forgetting ability and the model update time corresponding to different model update methods provided in this embodiment of the invention;
[0065] Figure 6 This is a schematic diagram illustrating the comparison of accuracy metrics using different model update methods, provided as an embodiment of the present invention.
[0066] Figure 7 This is a structural block diagram of a transient stability evaluation model update device provided in an embodiment of the present invention. Detailed Implementation
[0067] This invention provides a method, apparatus, electronic device, and storage medium for updating a transient stability assessment model, which solves or partially solves the technical problems of catastrophic forgetting and slow update speed in the existing related technologies when updating the transient stability assessment model of a power system.
[0068] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0069] As an example, for modern power systems, machine learning-based data-driven methods can directly establish a mapping between raw electrical characteristics and transient stable states, thus enabling rapid transient stability assessment. Shallow machine learning models such as decision trees and support vector machines, as well as deep learning models such as convolutional neural networks, long short-term memory networks, and graph convolutional networks, have shown great potential in transient stability assessment.
[0070] Most existing methods rely on generating large-scale labeled sample sets for centralized model training, thus considering very limited topology variations (usually less than "N-2"). However, real-world power grids are vast, and centralized pre-trained models struggle to guarantee comprehensive sample coverage and sufficient model learning. Furthermore, planned maintenance and unexpected outages frequently alter the power grid topology, changing the system's transient stability characteristics and necessitating continuous updates to the stability assessment model. When new operating scenarios and datasets emerge, fine-tuning the model using only new samples leads to the model forgetting previously learned knowledge. Updating the model using both new and all historical samples results in a dramatic increase in training costs with data accumulation, ultimately causing model updates to outpace sample accumulation.
[0071] Therefore, one of the core inventive points of this invention is to propose an intelligent transient stability assessment model and a continuous learning and updating method applied to this assessment model. First, the intelligent transient stability assessment model adopts a stacked design of multiple graph convolutional layers, graph pooling layers, and fully connected layers to quickly scan the transient stability of the anticipated fault set following the power grid operation mode, and is applicable to power grid topologies with different node sizes. Second, to address the slow update problem in the continuous learning process, a clustering memory replay strategy is proposed. By using a clustering algorithm to select representative replay samples from the historical dataset, the model is combined with new samples to train the model when learning the new dataset, without needing to relearn all historical samples, thus reducing the model update cost. Simultaneously, to address the catastrophic forgetting phenomenon in the continuous learning process, a continuous learning training strategy is proposed. This strategy combines the cross-entropy classification loss function of new samples and the embedding regularization loss function of historical replay samples to train the model. The cross-entropy classification loss is used to learn new samples, while the embedding regularization loss is used to review representative samples from the historical dataset, and the embedding changes of historical replay samples in the fully connected layers of the model are restricted to maintain old knowledge. In summary, the method provided by this invention only imposes restrictions on the embedding space of deeper network layers in the model, without imposing restrictions on shallower feature extraction networks, thus making it applicable to most deep learning models. Furthermore, the method provided by this invention can prevent catastrophic forgetting when the model learns multiple different power grid topology datasets, while the computational cost required for model updates each time a new dataset is learned is very small, thereby accelerating model update speed.
[0072] For better comparison and explanation, refer to Figure 1a This shows a schematic diagram of the structure of a current conventional graph convolution model.
[0073] Current graph convolutional models mainly consist of multiple graph convolutional layers, multiple fully connected layers, and an output layer. In other words, most current graph convolutional models are directly used in conjunction with fully connected layers, using graph convolutional layers to extract node-level feature representations for each node, and then inputting them into downstream fully connected layers, without adopting graph pooling layer design.
[0074] In practical applications, the model needs to learn datasets from power grids with different node sizes. When the number of nodes in the power grid varies, the dimensions of the input graph features differ, as shown in the graph features N1×F and N2×F (N1≠N2). These two graph features are processed by feature extraction from graph convolutional layers, outputting feature 1×N1F corresponding to graph feature N1×F and feature 1×N2F corresponding to graph feature N2×F. It can be seen that these two features have different dimensions, meaning they cannot be simultaneously input into fully connected layers with the same number of neurons or parameters. Therefore, when using this model for transient stability assessment, the model cannot input graph features with different power grid node sizes to train the downstream fully connected layers and the output layer, resulting in poor stability judgment and low accuracy of the output stability judgment y. Thus, this model is only applicable to topology scenarios where the power grid node size remains constant.
[0075] In the application scenario of this invention, the model needs to continuously learn in power grids with different node sizes. Therefore, graph pooling layers are used to extract graph-level features of fixed dimensions to adapt to graph feature inputs of different dimensions, thereby enabling continuous learning in power grids with different node sizes.
[0076] Reference Figure 1b The diagram shows a schematic representation of a transient stability evaluation model provided in an embodiment of the present invention.
[0077] from Figure 1b As can be seen from the figure, unlike the conventional graph convolution model, the transient stability evaluation model provided by this invention adds a graph pooling layer. Specifically, the transient stability evaluation model is mainly composed of multiple graph convolution layers, multiple graph pooling layers, and multiple fully connected layers stacked together. The last fully connected layer connects to an output layer. For the sake of simplicity, the input layer of the model is not shown in the figure.
[0078] The model input can be set as the power grid operation characteristics (i.e., sample input features) at the instant before the system fault, immediately after the fault occurs, and immediately after the fault is cleared. This includes all data that can characterize the power grid operation, such as the node voltage magnitude and phase angle, active and reactive power of the load, and active and reactive power of the generators. The power grid operation characteristics of each node at these three moments are combined. Therefore, the model input can also be viewed as a multi-dimensional graph feature with dimensions of [missing information]. Where N represents the number of nodes in the power grid, and F represents the number of features of each node, such as the graph features N1×F and N2×F (N1≠N2) shown in the figure.
[0079] In contrast, the model's output can be set as a binary stability criterion, i.e., transiently stable or transiently unstable.
[0080] Among them, the graph features can be understood in conjunction with the topology diagram of the power system. The topology diagram is a schematic diagram of the physical layout structure composed of power grid nodes and the transmission lines connected to them. It can be understood as a set of branches and nodes that is a further abstraction of the circuit diagram. It reflects the connection relationship and properties of the circuit, that is, the connection relationship between branches and nodes.
[0081] Combination Figure 1b Before actual feature processing, the sample input features can be fed into the input layer for feature merging to obtain graph feature input. Graph feature input can be understood as the merging of the power grid operation features of a single node in the power system at three moments: before a system fault, immediately after the fault occurs, and immediately after the fault is cleared. The graph feature input is then passed to the graph convolutional layer for feature extraction. Each graph convolutional layer is followed by a graph pooling layer. The graph pooling layer is used to perform pooling processing (such as global max pooling and / or average pooling) on the graph feature input after feature extraction by the graph convolutional layer, outputting a graph feature vector.
[0082] Understandably, the graph pooling layer is mainly used to extract the graph-level features generated by each graph convolutional layer. After merging these graph-level features, a merged graph feature is output and fed into the fully connected layer for feature extraction and classification. The final stability judgment result is then output through the output layer. As shown in the figure, after processing by the graph convolutional layer, graph-level features corresponding to N1×F and N2×F can be output. The dimensions of the two graph-level features are the same, both being 1×nF. Therefore, the purpose of the graph pooling layer is to align the feature representation dimensions output by the graph convolutional layer after inputting graph data of different grid node scales into the model, so that the downstream fully connected layer and output layer of the model can be trained normally.
[0083] As can be seen, the input of the model is actually the graph-level features of the samples. After the model is processed, the final output is a stability classification that represents the transient stability assessment. Specifically, it can be divided into two categories: transiently stable and transiently unstable.
[0084] In this process, multiple fully connected layers are used to process the merged graph features. In addition to outputting the stability judgment result, each fully connected layer's feature extraction and classification process outputs a hidden layer feature as an embedded feature vector, as shown in h1,...,h in the figure. L-1 ,h L Specifically, h0 represents the input feature vector of the first fully connected layer. Then, the hidden features (i.e., the input feature vectors) of all fully connected layers are merged to output the embedded feature h. The hidden features refer to the features extracted and processed by the hidden layers in the fully connected layers. The role of the hidden layers is to abstract the features of the input data to another dimension space to show its more abstract features, which can be better divided linearly.
[0085] For example, the parameter settings of each layer of the transient stability evaluation model in this embodiment of the invention can be as follows: three graph convolutional layers with parameter scales of (18,48), (48,48), and (48,48), respectively; three graph pooling layers with no parameters; two fully connected layers with parameter scales of (288,128) and (128,64), respectively; and one output layer with parameter scale of (64,2).
[0086] It should be noted that those skilled in the art can set the number of layers, iteration step size, number of neurons, size of neural nuclei, number of filters, and other related parameters for each of the graph convolutional layers, graph pooling layers, and fully connected layers in the model according to the actual situation, and the present invention does not impose any restrictions on this.
[0087] In this embodiment of the invention, a transient stability assessment model is proposed. Because the model uses graph convolutional layers and graph pooling layers for graph-level feature processing, the trained intelligent transient stability assessment model can adapt to sample inputs of different grid node sizes, so that the model can continuously learn on sample datasets of different topologies. The embedded feature set generated during the model learning process is used to review the model when learning the next new dataset in combination with a clustering memory playback strategy. At the same time, the playback sample set generated according to the clustering memory playback strategy can be combined with a continuous learning training strategy to continuously update the model. Thus, while realizing continuous model learning, it can not only accelerate the model update speed, but also avoid the occurrence of catastrophic forgetting phenomenon of the model.
[0088] Reference Figure 2 The diagram illustrates a flowchart of a transient stability assessment model update method provided by an embodiment of the present invention, which may specifically include the following steps:
[0089] Step 201: In response to detecting a change in the operating topology of the power system, a fault test set corresponding to the changed operating topology is generated. The fault test set is used to test the evaluation accuracy of the transient stability assessment model.
[0090] In practical applications, in order to ensure the stable operation of the power system and ensure that it can return to normal operation in a short time even if it is subjected to a large disturbance during operation, it is usually necessary to conduct transient stability analysis on the operating status of the power system. Transient stability analysis refers to the analysis of whether a new stable operating state or the original operating state can be reached through a transient process after a sudden large disturbance under a certain operating condition.
[0091] Transient analysis results can be reflected through transient stability assessment. In this embodiment of the invention, the transient stability of the power system is assessed through the online application of the transient stability assessment model. Before the transient stability assessment model is applied to the power system online, an initial transient stability assessment model needs to be constructed and trained using a corresponding expected fault dataset. In the specific implementation, the model construction and training process may include the following steps:
[0092] Step S01: Construct a transient stability evaluation model, which consists of multiple graph convolutional layers, multiple graph pooling layers, and multiple fully connected layers stacked together;
[0093] The specific structure of the transient stability assessment model can be found in the relevant model descriptions in the foregoing embodiments, and will not be repeated here.
[0094] Step S02: Obtain the expected fault dataset, which includes multiple sample input features and sample labels corresponding to the sample input features;
[0095] First, we can consider load changes and adjust the power generation accordingly to balance the system power and generate a set of operating modes. The operating modes of the power system can reflect the entire process of distributed generation, transmission, distribution and consumption of the power system. Existing related technologies have already disclosed relevant content on the operating modes of the power system, which will not be repeated here.
[0096] Secondly, a corresponding set of anticipated faults can be set for each generated operating mode. The transient response of the system after each fault can be calculated using time-domain simulation, and the input features and stability labels of the samples can be obtained to form a dataset for model training.
[0097] Specifically, before obtaining the anticipated fault dataset, a set of operating modes can be generated based on the initial power grid operating topology, combined with load changes and power balance within the topology. This set of operating modes corresponds to multiple operating modes, each operating mode corresponds to a anticipated fault set, and each anticipated fault set contains multiple fault samples. If the anticipated fault sets corresponding to each of the multiple operating modes are aggregated, the aggregated dataset can be understood as the overall anticipated fault set corresponding to the entire set of operating modes. Next, time-domain simulation is used to calculate the transient response of the system after a fault in each operating mode. Based on the transient response, the sample input features and sample labels of each fault sample are extracted. The sample input features are the power grid operating features of a single node in the system at three moments: before the system fault, immediately after the fault occurs, and immediately after the fault is cleared. Finally, the sample input features and sample labels of each fault sample are used as the anticipated fault dataset corresponding to the set of operating modes.
[0098] Time-domain simulation analysis is a simulation technique based on the time domain. It can simulate the dynamic behavior of a power system after being disturbed and is one of the most important analysis methods in the field of power system transient stability analysis. Its basic idea is to construct a mathematical model of the whole system by modeling each component of the power system according to the topological relationship between the components, and obtain a set of simultaneous differential-algebraic equations. Then, using the steady-state condition or power flow solution as the initial value, the numerical integration method is used to solve the equations to obtain the numerical solution under disturbance, thereby gradually obtaining the curves of the change of system state variables and algebraic variables with time. Time-domain simulation analysis can accurately calculate the steady-state response and transient response of the power system.
[0099] Step S03: Input the sample input features into the transient stability evaluation model for feature training, construct the cross-entropy loss function based on the sample labels, and use the backpropagation algorithm to train the network parameters of the transient stability evaluation model in order to optimize the transient stability evaluation model.
[0100] Next, the sample input features can be fed into the transient stability evaluation model, and the cross-entropy loss function can be constructed using the model output and sample labels. Then, the network parameters of the model can be trained using the backpropagation algorithm.
[0101] The cross-entropy loss function can be understood as a function that helps machine learning models estimate the predicted probability density function that best approximates the target distribution from the training samples. Specifically, the cross-entropy loss function is mainly used to study the distance between two probability distributions. Therefore, in machine learning, it can be applied to deep learning applications such as image classification, natural language processing, and machine translation. In these tasks, the actual situation is modeled, and the cross-entropy loss function enables the model to more closely approximate the true result. In this embodiment of the invention, the cross-entropy function is used to predict the closest target result, which makes the model output result closer to the true result and improves the model's evaluation accuracy.
[0102] The backpropagation algorithm (BP) is a learning algorithm suitable for multi-layer neural networks. Based on gradient descent, the input-output relationship of a BP network is essentially a mapping relationship. A BP neural network with n inputs and m outputs performs a continuous mapping from n-dimensional Euclidean space to a finite field in m-dimensional Euclidean space. This mapping is highly nonlinear. Furthermore, the information processing capability of the BP network stems from the multiple composition of simple nonlinear functions, thus exhibiting strong function reproducibility. In this embodiment, the cross-entropy loss function combined with the backpropagation algorithm is used to train and optimize the network parameters of the model. This not only improves the model's output accuracy but also effectively utilizes the strong nonlinear mapping capability of the backpropagation algorithm, solving the problem of poor performance in nonlinear mapping for graph-level feature recognition that often occurs in traditional models during training.
[0103] As an optional embodiment, in conjunction with the aforementioned description of the transient stability assessment model, inputting sample input features into the transient stability assessment model for feature training may specifically include:
[0104] Step S31: Perform feature merging processing on the sample input features to obtain graph feature input. The graph feature input represents the merging of the power grid operation features of a single node in the power system at three moments: before the system fault, immediately after the fault occurs, and immediately after the fault is cleared.
[0105] Step S32: The graph feature input is processed by multiple graph convolutional layers for feature extraction, and the graph feature input processed by the graph convolutional layers is processed by multiple graph pooling layers for pooling to extract multiple graph feature vectors;
[0106] The graph pooling layer can perform global max pooling and average pooling on the graph feature input after processing by the graph convolutional layer. The specific expression is as follows:
[0107] hout = max(hin) || mean(hin)
[0108] Among them, h out h represents the graph feature vector output after pooling. in This represents the graph feature input before pooling, max(*) represents global max pooling, mean(*) represents average pooling, and || represents the parallel operation on the vectors.
[0109] Step S33: Merge the feature vectors of each image to obtain the merged image features;
[0110] Step S34: Extract and classify the features of the merged graph through multiple fully connected layers, output transient stability judgment, and extract the hidden features of the merged graph features as the embedded feature vector after processing each fully connected layer.
[0111] Step S35: Merge multiple embedded feature vectors and output the embedded features corresponding to the sample input features;
[0112] Furthermore, multiple embedded feature vectors are merged to output the embedded features corresponding to the sample input features. Specifically, the following formula can be used to merge multiple embedded feature vectors and output the embedded features corresponding to the sample input features:
[0113]
[0114] Where h represents the embedded features corresponding to the sample input features, L is the number of fully connected layers, and || represents the juxtaposition operation on the vectors. l h0 represents the embedded feature vector output by the l-th fully connected layer in the model. In particular, when l = 0, h0 represents the input feature vector of the first fully connected layer.
[0115] As mentioned above, the output of the transient stability evaluation model can be set as a binary stability criterion. That is, during model training, the evaluation parameters of the transient stability evaluation model can include the model output, where the model output represents the transient stability criterion, indicating whether the transient operation is stable or unstable. Therefore, a cross-entropy loss function can be constructed based on the sample labels, using the following formula:
[0116]
[0117] Among them, L CE Let y represent the cross-entropy loss function, n represent the number of faulty samples in the expected faulty dataset, and y represent the cross-entropy loss function. i g represents the sample label corresponding to the i-th fault sample. i Let represent the model output corresponding to the i-th fault sample, and log represents the logarithmic function.
[0118] Step S36: Use the embedded features corresponding to the input features of multiple samples as the embedded feature set generated by the transient stability evaluation model during model learning.
[0119] Next, multiple embedded features can be aggregated and used as an embedded feature set to serve as representative input sample features in the subsequent clustering memory replay strategy for clustering memory replay processing, thereby obtaining a replay sample set for model training and optimization learning.
[0120] As an optional implementation, once the model is trained, it can be used to scan the transient stability of anticipated faults online. The online application of the model mainly includes the following two steps:
[0121] 1) Construct sample input features.
[0122] Under the current power grid operation mode, the sample input characteristics of the expected fault sample are calculated using short-time simulation. The characteristics before the fault and the instant after the fault occurs can be obtained through power flow calculation, while the characteristics of the instant after the fault is cleared can be obtained through time-domain simulation approximation calculation with a large step size setting.
[0123] 2) Rapid assessment of transient stability.
[0124] Next, the sample input features of the expected failure sample (which correspond to the graph features generated after merging when processed in the model) can be input into the trained model. The features are forward propagated through the model parameters, and finally the transient stability judgment of the expected failure sample can be output.
[0125] Meanwhile, for the online application of the model, if the operating topology of the power grid changes, the model needs to be continuously learned and updated so that it can be adapted to transient stability assessment under the new topology. Therefore, when a change in the operating topology of the power grid is detected, a small number of fault samples and labels can be generated under the new topology using time-domain simulation as a fault test set to test the accuracy of the model, that is, the accuracy of the assessment of transient stable operating state.
[0126] Step 202: If the accuracy test results do not meet the preset accuracy requirements, a fault training set is generated, and the embedded feature set generated by the transient stability evaluation model during the historical model learning process is obtained.
[0127] When the model's accuracy on the test set does not meet the accuracy requirements set by the operators, a large number of fault samples and sample labels can be generated using time-domain simulation under the new operating topology as a fault training set to train and update the model. Simultaneously, the embedded feature sets generated by the model during its historical learning process can be obtained to implement clustering memory playback strategies.
[0128] Step 203: Perform clustering memory playback processing on the embedded feature set to obtain a playback sample set;
[0129] Specifically, the process of performing clustering memory replay processing on the embedded feature set to obtain the replay sample set may include the following steps:
[0130] Step S1: Randomly select several data points from the embedded feature set as initial centroids;
[0131] In practical applications, to enable continuous learning of the model while preventing catastrophic forgetting, a clustering memory replay stage can be set up to extract key knowledge from the currently learned dataset for replay when the model learns the next new dataset.
[0132] Therefore, after the model learns from a dataset, the dataset can be... Input the model to obtain the corresponding embedded feature set of the dataset in the fully connected layer of the model. x i Let h represent the i-th input sample in dataset X. i This indicates the number of embedded features output in the i fully connected layers of the embedded feature set H. It can be understood that the number of data sets X and H is different. In dataset X, n refers to the number of input samples in the dataset, while in embedded feature set H, n refers to the number of embedded features output by the corresponding n fully connected layers in the embedded feature set.
[0133] When performing clustering, the number of clusters can be set to M, and then M data points can be randomly selected from the embedded feature set H as the initial centroids.
[0134] Step S2: Calculate the distance from other data points in the embedded feature set to the initial centroid, and assign each of the other data points to the cluster to which the initial centroid is closest to it.
[0135] Then, calculate the distances from all other data points in the embedded feature set to the M initial centroids, and based on the calculated distances, assign each data point to the cluster to which its nearest centroid belongs.
[0136] Step S3: Calculate the cluster mean of each data point in each cluster, and redetermine the cluster centroids corresponding to the partitioned clusters based on the cluster mean;
[0137] Next, the cluster mean of each data point in each cluster can be calculated, and the cluster centroids corresponding to the clusters can be redefined based on the calculated cluster mean.
[0138] A cluster is the result of clustering calculation. The average value of all data points in a cluster is usually called the centroid of the cluster. In a two-dimensional plane, for a certain cluster, the x-coordinate of the centroid corresponding to its data points is the average x-coordinate of the data points in that cluster, and the y-coordinate of the centroid is the average y-coordinate of the data points in that cluster. Similarly, for high-dimensional spaces, the core task of clustering is to find the M best centroids based on the set number of clusters M, and to assign the data closest to these centroids to the clusters represented by these centroids.
[0139] Step S4: Repeat steps S2 to S3 until the cluster to which the data points in the embedded feature set belong no longer changes;
[0140] Step S5: Select the data point closest to the centroid of each cluster as the replay sample set corresponding to the embedded feature set. The replay sample set includes the sample input feature set for training the transient stability evaluation model and the embedded feature set generated during the model learning process.
[0141] For each cluster, the data point closest to the cluster centroid is selected, ultimately yielding a set that represents the current dataset (i.e., the embedded feature set). and dataset Given M samples from the overall distribution, use these M samples as the replay sample set for the current dataset. The input feature set and embedded feature set H corresponding to dataset X in the replay sample set are saved for review when the model learns the next new dataset. This enables the model to learn continuously while avoiding the catastrophic forgetting phenomenon.
[0142] Step 204: Update the transient stability assessment model based on the fault training set and the replay sample set using a continuous learning training strategy.
[0143] Then, a loss function can be constructed to continuously learn and update the model. The model can use the cross-entropy loss function to learn from the fault training set generated under the new running topology. To prevent the model from catastrophically forgetting the historical dataset it has already learned, the embedding regularization loss function can be used to learn from the replay sample set of the historical dataset. The embedding regularization loss can restrict the embedding variation of historical samples in the multi-layer neural network of the model. Compared with the cross-entropy loss, which only restricts the model output, it has a stronger effect on recalling old knowledge. At the same time, the embedding regularization loss does not directly impose restrictions on the model parameters, thus allowing the model parameters greater freedom to learn new knowledge.
[0144] Specifically, based on the fault training set and the replay sample set, the transient stability assessment model is updated using a continuous learning training strategy. This can be achieved by constructing a continuous learning loss function using the cross-entropy loss function and the embedding regularization loss function, and then updating the transient stability assessment model based on the continuous learning loss function. The expression for constructing the continuous learning loss function is as follows:
[0145] L CL =L CE +γL ER
[0146] The cross-entropy loss function is used to learn from the fault training set, and the embedding regularization loss function is used to learn from the replay sample set. The expression for the embedding regularization loss function is as follows:
[0147]
[0148] Among them, L CL L represents the continuous learning loss function. CE Let L represent the cross-entropy loss function, γ represent the tradeoff parameter, and L represent the cross-entropy loss function. ER Let O represent the embedding regularization loss function, M represent the number of historical datasets learned, L represent the number of replay samples in the historical replay sample set, and h represent the number of fully connected layers in the transient stability evaluation model. tij This represents the embedded feature vector of the i-th replay sample from the t-th historical dataset after the j-th fully connected layer in the current update model. This indicates that the corresponding h tij Embedded feature vectors in historical models, ||*|| denotes vector norm calculation.
[0149] After the model learns the training set data of the new topology, it can be checked again whether the accuracy of the model on the test set of the new topology meets the requirements. If it still does not meet the requirements, the steps of generating a large number of fault samples and sample labels as fault training sets using time-domain simulation under the new running topology, as well as constructing the model to continuously learn the loss function and update the model, are repeated until the test accuracy meets the requirements.
[0150] When the accuracy meets the requirements, it means that the model update is complete and the model can be applied to online transient stability assessment. At the same time, the clustering memory replay strategy can be used to generate a replay sample set for the newly learned running topology dataset, which can be used as reference replay data when the model is updated next time.
[0151] In the specific implementation, after the transient stability assessment model is updated and optimized by adopting a clustering memory playback strategy combined with a continuous learning training strategy, if the assessment accuracy of the updated transient stability assessment model meets the preset accuracy requirements, the updated transient stability assessment model is applied to the online transient stability assessment of the power system. At the same time, the fault training set that has been learned is subjected to clustering memory playback processing to update the playback sample set.
[0152] In this invention, a continuous learning update method for transient stability evaluation models is proposed. First, to address the slow update problem during continuous learning, a clustering memory replay strategy is proposed. This strategy uses a clustering algorithm to select representative replay samples from the historical dataset, which are then merged with new samples to train the model when learning a new dataset, eliminating the need to relearn all historical samples and thus reducing model update costs. Second, to address the catastrophic forgetting phenomenon during continuous learning, a continuous learning training strategy is proposed. This strategy combines the cross-entropy classification loss function for new samples with the embedding regularization loss function for historical replay samples. The cross-entropy classification loss is used to learn new samples, while the embedding regularization loss is used to review representative samples from the historical dataset. Furthermore, the embedding changes of historical replay samples in the fully connected layers of the model are restricted to preserve old knowledge. In summary, the method provided by this invention only requires restrictions on the embedding space of deeper network layers, without restrictions on shallower feature extraction networks, thus making it applicable to most deep learning models. Furthermore, the method provided by this invention can prevent catastrophic forgetting when the model learns multiple different power grid topology datasets, while the computational cost required for model updates each time a new dataset is learned is very small, thus accelerating the model update speed.
[0153] For better explanation, refer to Figure 3 This diagram illustrates the overall process of a transient stability assessment model update method provided by an embodiment of the present invention. This method is mainly used for online continuous learning and updating of an intelligent transient stability assessment model. The overall process mainly includes four parts: initial model training of the intelligent transient stability assessment model, online application, clustering memory playback, and continuous model learning and updating. It should be noted that this embodiment only briefly describes the overall key process of the transient stability assessment model update method in the power system. The details involved in each step can be referred to the relevant parts in the foregoing embodiments, and will not be repeated here. It is understood that the present invention does not limit this.
[0154] First, a stability assessment model for power system transient stability assessment can be constructed (see the model structure introduction section in the aforementioned embodiments for details). A dataset for model training and learning is generated under the initial running topology. Then, the model is pre-trained using this dataset to obtain the trained stability assessment model. During the model training and learning process, the input features in the dataset are processed by the fully connected layer to generate an embedded feature set. A replay sample set corresponding to the embedded feature set is generated through a clustering memory replay strategy for replay when learning new datasets.
[0155] Next, the trained stability evaluation model can be put into online application, mainly to scan the stability risk points under the current running topology. When a change in the current topology is detected, a small test set is generated under the new running topology to test the accuracy of the model. When the accuracy meets the requirements, it means that the model accuracy is high and there is no need to update the model at present.
[0156] When the accuracy does not meet the requirements, it means that the model accuracy has decreased and the model needs to be updated using continuous learning methods. At this time, a large training set (including sample labels) is generated under the new running topology. The training set is combined with the replay sample set to continuously learn and train the model and update the model to obtain an updated stable evaluation model.
[0157] When the updated model meets the accuracy requirements, it is put back into online application. When the updated model does not meet the accuracy requirements, the steps of generating a training set under the new running topology and continuously learning and training the model with the replay sample set are repeated until the model's accuracy meets the requirements. At the same time, clustering memory replay processing can be performed on the dataset that has been learned in the model to update the replay sample set.
[0158] For ease of understanding, the following description uses a specific example to illustrate an embodiment of the present invention.
[0159] Using the complete topology of the IEEE 39 (Institute of Electrical and Electronics Engineers) node system as the initial operating topology, refer to... Figure 4 The diagram shows a structural schematic of an IEEE 39-node system provided by an embodiment of the present invention.
[0160] The IEEE 39-node diagram is a planar representation of a power grid with 39 nodes (including 10 generator sets). It can be understood as a standard example in IEEE used for power system analysis and calculation. In the diagram, the components marked with "G" in the circle represent generator sets, the arrows represent loads, the slightly thicker black solid lines represent busbars, and the thinner black solid lines represent transmission lines.
[0161] To make the training data more relevant, in addition to the initial operating topology, three other topologies—bus, transmission line, and generator shutdowns caused by maintenance or faults—were also considered. In each operating topology, simulated expected faults were used to generate sample datasets. The structure of each topology and the composition of the datasets are shown in Table 1 below. The ratio of the training set to the test set was set to 8:2.
[0162] Dataset Topology Sample size training set test set D1 Initial System 6600 5280 1320 D2 Node 17 and its connected lines are out of service. 4800 3840 960 D3 Generator 31 and line 4-14 are out of service. 6400 5120 1280 D4 Generator 36 and its connected lines are out of service. 6600 5280 1320
[0163] Table 1: Dataset Setup for Continuous Model Learning
[0164] The next step involves generating the dataset and setting up related parameters:
[0165] 1) Load and power generation:
[0166] For each load / generator node, based on the baseline load / generation power, 10 power ranges are defined: [[0.75, 0.8], [0.8, 0.85], ..., [1.2, 1.25]]. Within each power range, the load / generation power is randomly regenerated according to a uniform distribution, and the resulting power imbalance is handled by a balancing machine. Following this rule, 10 operating modes with small power fluctuations are generated within each power range, resulting in a total of 100 different power flow operating modes.
[0167] 2) Fault and Time-Domain Simulation:
[0168] The fault type is considered to be an N-1 three-phase ground fault, the fault location is located at the beginning and end of all transmission lines, and the fault duration is set to 0.1 seconds.
[0169] The stability label for a fault can be obtained through time-domain simulation, where the simulation terminates 4 seconds after the fault occurs. The stability label y is based on the maximum power angle difference Δδ between the generators. max Obtain the maximum power angle difference Δδ between the generators. max When the angle is less than 180°, y takes the value of 1. When the maximum angle difference Δδ max For other values, y takes the value 0, as shown in the following expression:
[0170]
[0171] 3) Evaluation indicators:
[0172] When a model learns from multiple datasets consecutively, its performance can usually be evaluated by the model's Accuracy (Accuracy) and Against Forgetting (Against Forgetting) on the datasets.
[0173] Among them, the evaluation metric Acc refers to the accuracy of artificial intelligence (AI) or machine learning (ML) algorithms. It is one of the important indicators for evaluating the performance of algorithms and is used to evaluate the ability of a trained model to classify input samples. Acc is the classification accuracy of the model on a single dataset.
[0174] In incremental learning, the biggest challenge is how to suppress forgetting. In other words, the model cannot learn new things while forgetting what it has already learned. The evaluation metric AF is the average of the Acc of the model across multiple historical datasets it has learned from. It is used to test the model's resistance to catastrophic forgetting after learning from multiple datasets.
[0175] After the model has completed learning the dataset t, the AF metric is calculated as follows:
[0176]
[0177] 4) Model training:
[0178] The dataset is traversed 50 times (one epoch equals one training cycle using all samples in the training set), and the batch size (number of samples per training iteration) is 256 in each epoch. The parameter γ in the continuous learning loss function is set to 2, and the historical dataset playback sample size M for cluster memory replay is 100.
[0179] Next, the method provided in the embodiments of the present invention is compared with the joint training and fine-tuning training strategies. Joint training refers to using the new dataset and all historical datasets to jointly train the model when learning a new dataset. Fine-tuning refers to using only the new dataset to fine-tune the model when learning a new dataset, without learning historical data.
[0180] Reference Figure 5 This diagram illustrates a comparison of the anti-forgetting ability and model update time for different model update methods provided in an embodiment of the present invention.
[0181] As can be seen from the comparison diagrams, the joint training method gives the model the strongest anti-forgetting ability, but the training time is much longer than the other two methods. The fine-tuning method has the fastest training time, but the model's anti-forgetting ability is very weak. The method provided by the embodiments of the present invention can enable the model to have anti-forgetting ability comparable to the joint training method, and the model update time is only slightly longer than that of the fine-tuning method, resulting in the best overall effect.
[0182] Furthermore, referring to Figure 6This diagram illustrates a comparison of accuracy metrics using different model update methods, as provided in an embodiment of the present invention.
[0183] It can be seen that when updating the model using a joint training strategy, since the new dataset is used in conjunction with all historical datasets for joint training, the accuracy will be at a high level if the update time factor is not considered. However, when updating the model using a fine-tuning strategy, the model's performance on historical datasets will continuously deteriorate. The method provided in this embodiment of the invention, however, enables the model to maintain high accuracy on all learned historical datasets.
[0184] Next, we will verify the effectiveness of the clustering memory replay strategy and the embedding regular loss function.
[0185] To verify the effectiveness of the clustering memory playback and continuous learning training strategy, the method of this invention is compared with other different methods, as follows:
[0186] a) Random + Cross-Entropy: Randomly select replay samples from the dataset and continuously learn that the loss function is only cross-entropy loss.
[0187] b) Clustering + Cross-Entropy: Clustering methods are used to select replay samples, and the loss function is continuously learned to be only cross-entropy loss.
[0188] c) Random + Embedding Regularization: Randomly select replay samples from the dataset and continuously learn the loss function as cross-entropy loss and embedding regularization loss.
[0189] d) Clustering + Embedding Regularization: The method of this invention uses clustering to select replay samples from the dataset and continuously learns the loss function as cross-entropy loss and embedding regularization loss.
[0190] The comparison results are shown in Table 2 below:
[0191]
[0192] Table 2: Comparison of Forgetting Ability (AF) of Different Model Training and Learning Methods
[0193] As shown in Table 2, the replay samples selected using a random strategy cannot accurately represent the overall distribution of the dataset. Cross-entropy loss only restricts the model output, resulting in poor recall of old knowledge. Therefore, these training models have weak resistance to forgetting. In contrast, this invention employs a clustering method to select replay samples and incorporates a regularized embedding strategy into the continuous learning loss function, effectively preventing catastrophic forgetting of historical datasets.
[0194] Reference Figure 7The diagram illustrates a structural block diagram of a transient stability assessment model update device provided in an embodiment of the present invention, which may specifically include:
[0195] The fault test set generation module 701 is used to generate a fault test set corresponding to the changed operating topology in response to the detection of a change in the operating topology of the power system. The fault test set is used to test the evaluation accuracy of the transient stability assessment model.
[0196] The embedded feature set acquisition module 702 is used to generate a fault training set and acquire the embedded feature set generated by the transient stability evaluation model during the historical model learning process if the accuracy test result does not meet the preset accuracy requirements.
[0197] Clustering memory playback processing module 703 is used to perform clustering memory playback processing on the embedded feature set to obtain a playback sample set;
[0198] The continuous learning training model update module 704 is used to update the transient stability evaluation model based on the fault training set and the replay sample set, according to the continuous learning training strategy.
[0199] In one optional embodiment, the clustering memory playback processing module 703 includes:
[0200] The initial centroid selection module is used to perform step S1: randomly select several data points from the embedded feature set as initial centroids;
[0201] The cluster data point partitioning module is used to execute step S2: calculate the distance from other data points in the embedded feature set to the initial centroid, and partition the other data points into the clusters to which the initial centroids with the closest distance belong;
[0202] The cluster centroid re-division module is used to perform step S3: calculate the cluster average value of each data point in each cluster, and redetermine the cluster centroid corresponding to the re-divided cluster based on the cluster average value;
[0203] The clustering repetition module is used to execute step S4: repeat steps S2 to S3 until the cluster to which the data points in the embedded feature set belong no longer changes;
[0204] The replay sample set generation module is used to execute step S5: select the data point closest to the centroid of each cluster as the replay sample set corresponding to the embedded feature set. The replay sample set includes the sample input feature set for training the transient stability evaluation model and the embedded feature set generated during the model learning process.
[0205] In one alternative embodiment, the device further includes:
[0206] The transient stability evaluation model construction module is used to construct a transient stability evaluation model, which is composed of multiple graph convolutional layers, multiple graph pooling layers, and multiple fully connected layers stacked together.
[0207] The anticipated fault dataset acquisition module is used to acquire the anticipated fault dataset, which includes multiple sample input features and sample labels corresponding to the sample input features;
[0208] The model feature training module is used to input the sample input features into the transient stability evaluation model for feature training, construct a cross-entropy loss function based on the sample labels, and simultaneously use the backpropagation algorithm to train the network parameters of the transient stability evaluation model in order to optimize the transient stability evaluation model.
[0209] In one optional embodiment, the model feature training module includes:
[0210] The feature extraction and merging processing module is used to perform feature merging processing on the sample input features to obtain graph feature input. The graph feature input represents the merging of the power grid operation features of a single node in the power system at three moments: before the system fault, immediately after the fault occurs, and immediately after the fault is cleared.
[0211] The graph feature vector extraction module is used to perform feature extraction processing on the graph feature input through the multiple graph convolutional layers, and to perform pooling processing on the graph feature input after graph convolutional layer processing through the multiple graph pooling layers to extract multiple graph feature vectors.
[0212] The merged graph feature output module is used to merge the features of each graph feature vector to obtain merged graph features.
[0213] The feature extraction and classification module is used to extract and classify the features of the merged graph through the multiple fully connected layers, output transient stability judgment, and extract the hidden layer features of the merged graph features as embedded feature vectors after processing by each fully connected layer.
[0214] An embedded feature vector merging processing module is used to merge multiple embedded feature vectors and output the embedded features corresponding to the sample input features;
[0215] The embedding feature set determination module is used to take the embedding features corresponding to each of the multiple sample input features as the embedding feature set generated by the transient stability evaluation model during the model learning process.
[0216] In one optional embodiment, the embedded feature vector merging processing module is specifically used for:
[0217] The multiple embedded feature vectors are merged using the following formula to output the embedded features corresponding to the sample input features:
[0218]
[0219] Where h represents the embedded features corresponding to the sample input features, L is the number of fully connected layers, and || represents the juxtaposition operation on the vectors. l h0 represents the embedded feature vector output by the l-th fully connected layer in the model. In particular, when l = 0, h0 represents the input feature vector of the first fully connected layer.
[0220] In one optional embodiment, the evaluation parameters of the transient stability evaluation model include model output, which represents a transient stability judgment, wherein the transient stability judgment is transiently stable or transiently unstable, and the model feature training module includes:
[0221] The cross-entropy loss function construction module is used to construct the cross-entropy loss function based on the sample labels and model output, using the following formula:
[0222]
[0223] Among them, L CE Let y represent the cross-entropy loss function, n represent the number of faulty samples in the expected faulty dataset, and y represent the cross-entropy loss function. i g represents the sample label corresponding to the i-th fault sample. i Let represent the model output corresponding to the i-th fault sample, and log represents the logarithmic function.
[0224] In one alternative embodiment, the device further includes:
[0225] The operation mode set generation module is used to generate an operation mode set under the initial power grid operation topology, combined with load changes and power balance in the topology. The operation mode set corresponds to multiple operation modes, each operation mode corresponds to a set of expected faults, and each set of expected faults contains multiple fault samples.
[0226] The sample input number extraction module is used to calculate the transient response of the system after each operating mode failure using time-domain simulation, and extract the sample input features and sample labels of each failure sample based on the transient response. The sample input features are the power grid operation features of a single node in the system at three moments: before the system failure, immediately after the failure, and immediately after the failure is cleared.
[0227] The anticipated fault dataset determination module is used to take the sample input features and sample labels of each fault sample as the anticipated fault dataset corresponding to the set of operating modes.
[0228] In one optional embodiment, the continuous learning training model update module 704 is specifically used for:
[0229] A continuous learning loss function is constructed using the cross-entropy loss function and the embedding regularization loss function, and the transient stability evaluation model is updated based on the continuous learning loss function. The construction expression of the continuous learning loss function is as follows:
[0230] L CL =L CE +γL ER
[0231] The cross-entropy loss function is used to learn the fault training set, and the embedding regularization loss function is used to learn the replay sample set. The expression for the embedding regularization loss function is as follows:
[0232]
[0233] Among them, L CL L represents the continuous learning loss function. CE Let L represent the cross-entropy loss function, γ represent the tradeoff parameter, and L represent the cross-entropy loss function. ER Let O represent the embedding regularization loss function, M represent the number of historical datasets learned, L represent the number of replay samples in the historical replay sample set, and h represent the number of fully connected layers in the transient stability evaluation model. tij This represents the embedded feature vector of the i-th replay sample from the t-th historical dataset after the j-th fully connected layer in the current update model. This indicates that the corresponding h tij Embedded feature vectors in historical models, ||*|| denotes vector norm calculation.
[0234] In one alternative embodiment, the device further includes:
[0235] The online application module of the transient stability assessment model is used to apply the updated transient stability assessment model to the online transient stability assessment of the power system if the assessment accuracy of the updated transient stability assessment model meets the preset accuracy requirements. At the same time, it performs clustering memory playback processing on the fault training set that has been learned to update the playback sample set.
[0236] As the device embodiment is basically similar to the method embodiment, it is described in a relatively simple way. For relevant details, please refer to the description of the method embodiment above.
[0237] This invention also provides an electronic device, which includes a processor and a memory:
[0238] The memory is used to store program code and transfer the program code to the processor;
[0239] The processor is used to execute the transient stability evaluation model update method of any embodiment of the present invention according to the instructions in the program code.
[0240] This invention also provides a computer-readable storage medium for storing program code for executing the transient stability evaluation model update method of any embodiment of the invention.
[0241] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0242] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between apparatuses or units through some interfaces, and may be electrical, mechanical, or other forms.
[0243] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0244] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0245] If the integrated unit is implemented as 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, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0246] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for updating a transient stability assessment model, characterized in that, include: In response to the detection of a change in the operating topology of the power system, a fault test set corresponding to the changed operating topology is generated. The fault test set is used to test the evaluation accuracy of the transient stability assessment model. If the accuracy test results do not meet the preset accuracy requirements, a fault training set is generated, and the embedded feature set generated by the transient stability evaluation model during the historical model learning process is obtained. The embedded feature set is subjected to clustering memory playback processing to obtain a playback sample set; The transient stability assessment model is updated based on the fault training set and the replay sample set, using a continuous learning training strategy. The step of updating the transient stability assessment model based on the fault training set and the replay sample set, using a continuous learning training strategy, includes: A continuous learning loss function is constructed using the cross-entropy loss function and the embedding regularization loss function, and the transient stability evaluation model is updated based on the continuous learning loss function. The construction expression of the continuous learning loss function is as follows: ; The cross-entropy loss function is used to learn the fault training set, and the embedding regularization loss function is used to learn the replay sample set. The expression for the embedding regularization loss function is as follows: ; Among them, L CL L represents the continuous learning loss function. CE Represents the cross-entropy loss function. L represents the trade-off parameter. ER Let represent the embedding regularization loss function, O represent the number of historical datasets that have been learned, M represent the number of replay samples in the historical replay sample set, and L represent the number of fully connected layers in the transient stability evaluation model. This represents the embedded feature vector of the i-th replay sample from the t-th historical dataset after the j-th fully connected layer in the current update model. Then it means corresponding Embedded feature vectors in historical models, ||*|| denotes vector norm calculation.
2. The transient stability assessment model update method according to claim 1, characterized in that, The step of performing clustering memory playback processing on the embedded feature set to obtain a playback sample set includes: Step S1: Randomly select several data points from the embedded feature set as initial centroids; Step S2: Calculate the distance from the other data points in the embedded feature set to the initial centroid, and assign each of the other data points to the cluster to which the initial centroid is closest to it. Step S3: Calculate the cluster mean of each data point in each cluster, and redetermine the cluster centroids corresponding to the partitioned clusters based on the cluster mean. Step S4: Repeat steps S2 to S3 until the cluster to which the data points in the embedded feature set belong no longer changes; Step S5: Select the data point closest to the centroid of each cluster as the replay sample set corresponding to the embedded feature set. The replay sample set includes the sample input feature set for training the transient stability evaluation model and the embedded feature set generated during the model learning process.
3. The transient stability assessment model update method according to claim 2, characterized in that, Before applying the transient stability assessment model to the power system for online operation, the method further includes: A transient stability evaluation model is constructed, which consists of multiple graph convolutional layers, multiple graph pooling layers, and multiple fully connected layers stacked together. Obtain a hypothetical failure dataset, which includes multiple sample input features and sample labels corresponding to the sample input features; The sample input features are input into the transient stability evaluation model for feature training. A cross-entropy loss function is constructed based on the sample labels. At the same time, the network parameters of the transient stability evaluation model are trained using the backpropagation algorithm to optimize the transient stability evaluation model.
4. The transient stability assessment model update method according to claim 3, characterized in that, The step of inputting the sample input features into the transient stability evaluation model for feature training includes: The sample input features are subjected to feature merging processing to obtain graph feature input, which represents the combined power grid operation features of a single node in the power system at three moments: before the system fault, immediately after the fault occurs, and immediately after the fault is cleared. The graph feature input is processed by the multiple graph convolutional layers, and the graph feature input processed by the graph convolutional layers is processed by the multiple graph pooling layers to extract multiple graph feature vectors. Each graph feature vector is merged to obtain the merged graph features; The merged graph features are extracted and classified through the multiple fully connected layers to output transient stability judgment. At the same time, the hidden layer features of the merged graph features are extracted as embedded feature vectors after processing by each fully connected layer. The multiple embedded feature vectors are merged to output the embedded features corresponding to the sample input features; The embedded features corresponding to the input features of multiple samples are used as the embedded feature set generated by the transient stability evaluation model during the model learning process.
5. The transient stability assessment model update method according to claim 4, characterized in that, The step of merging multiple embedded feature vectors to output the embedded features corresponding to the sample input features includes: The multiple embedded feature vectors are merged using the following formula to output the embedded features corresponding to the sample input features: ; Where h represents the embedded features corresponding to the sample input features, and L is the number of fully connected layers. h represents the merging operation on vectors. l h0 represents the embedded feature vector output by the l-th fully connected layer in the model. In particular, when l=0, h0 represents the input feature vector of the first fully connected layer.
6. The transient stability assessment model update method according to claim 3, characterized in that, The evaluation parameters of the transient stability assessment model include the model output, which represents the transient stability judgment, i.e., transiently stable or transiently unstable operation. The construction of the cross-entropy loss function based on the sample labels includes: Based on the sample labels and model output, the cross-entropy loss function is constructed using the following formula: ; Among them, L CE Let y represent the cross-entropy loss function, n represent the number of faulty samples in the expected faulty dataset, and y represent the cross-entropy loss function. i g represents the sample label corresponding to the i-th fault sample. i Let represent the model output corresponding to the i-th fault sample, and log represents the logarithmic function.
7. The transient stability assessment model update method according to claim 3, characterized in that, Prior to obtaining the anticipated fault dataset, the method further includes: Given the initial power grid operating topology, a set of operating modes is generated by combining load changes and power balance in the topology. The set of operating modes corresponds to multiple operating modes, each of which corresponds to a set of anticipated faults, and each set of anticipated faults contains multiple fault samples. The transient response of the system after each operating mode failure is calculated by time-domain simulation. Based on the transient response, the sample input features and sample labels of each failure sample are extracted. The sample input features are the power grid operation features of a single node in the system at three moments: before the system failure, immediately after the failure, and immediately after the failure is cleared. The sample input features and sample labels of each of the fault samples are used together as the expected fault dataset corresponding to the set of operating modes.
8. The transient stability assessment model update method according to claim 1, characterized in that, Also includes: If the evaluation accuracy of the updated transient stability assessment model meets the preset accuracy requirements, the updated transient stability assessment model will be applied to the online transient stability assessment of the power system. At the same time, the learned fault training set will be subjected to clustering memory playback processing to update the playback sample set.
9. A transient stability assessment model update device, characterized in that, include: The fault test set generation module is used to generate a fault test set corresponding to the changed operating topology in response to the detection of a change in the operating topology of the power system. The fault test set is used to test the evaluation accuracy of the transient stability assessment model. The embedded feature set acquisition module is used to generate a fault training set and acquire the embedded feature set generated by the transient stability evaluation model during the historical model learning process if the accuracy test result does not meet the preset accuracy requirements. The clustering memory playback processing module is used to perform clustering memory playback processing on the embedded feature set to obtain a playback sample set; The continuous learning training model update module is used to update the transient stability assessment model based on the fault training set and the replay sample set, according to the continuous learning training strategy. The continuous learning and training model update module is specifically used for: A continuous learning loss function is constructed using the cross-entropy loss function and the embedding regularization loss function, and the transient stability evaluation model is updated based on the continuous learning loss function. The construction expression of the continuous learning loss function is as follows: ; The cross-entropy loss function is used to learn the fault training set, and the embedding regularization loss function is used to learn the replay sample set. The expression for the embedding regularization loss function is as follows: ; Among them, L CL L represents the continuous learning loss function. CE Represents the cross-entropy loss function. L represents the trade-off parameter. ER Let represent the embedding regularization loss function, O represent the number of historical datasets that have been learned, M represent the number of replay samples in the historical replay sample set, and L represent the number of fully connected layers in the transient stability evaluation model. This represents the embedded feature vector of the i-th replay sample from the t-th historical dataset after the j-th fully connected layer in the current update model. Then it means corresponding Embedded feature vectors in historical models, ||*|| denotes vector norm calculation.
10. An electronic device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the transient stability evaluation model update method according to any one of claims 1-8 according to the instructions in the program code.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the transient stability assessment model update method according to any one of claims 1-8.
Citation Information
Patent Citations
Transient stability evaluation method of electric power system based on graph attention network
CN111914486A
Power system transient stability assessment method combined with continuous learning update
CN115965272A