Power system transient stability assessment method and system based on knowledge-data fusion
By adopting the knowledge-data fusion method in the transient stability evaluation of power system, the enhanced data set is constructed and the balanced supervision comparison loss is calculated, the problem of poor accuracy of the data-driven method in the case of sample imbalance is solved, and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202510321214.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-06-20
AI Technical Summary
The existing transient stability analysis methods for data-driven power systems have poor accuracy in sample imbalance, resulting in limited attention and prediction accuracy of a few samples.
Using a knowledge-data fusion method, the enhanced data set is constructed and the balanced supervision comparison loss is calculated, the model parameters are updated using the backpropagation algorithm to dynamically balance the weights of various types of samples to achieve knowledge-data fusion.
The prediction accuracy of the transient stability evaluation model of the power system in the case of sample imbalance is improved, especially in the correct recognition rate of instable samples.
Smart Images

Figure CN120180228A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power system automation, and particularly to a power system transient stability assessment method and system based on knowledge-data fusion. Background Art
[0002] In recent years, with the grid connection of large-scale renewable energy and distributed generating units, the complexity of power systems has increased significantly, which has led to difficulties in controlling their output power and increased the risk of instability in modern power systems.
[0003] To ensure the stable and normal operation of power systems, timely and effective transient stability assessment (TSA) is particularly crucial. However, traditional transient stability analysis methods cannot balance computational speed and accuracy, and thus face challenges in the application of modern power systems. In recent years, with the deployment of measurement systems, online monitoring of power system operation data has become possible. Therefore, data-driven methods with strong non-linear fitting capabilities can use the monitored power system operation data for online analysis and modeling, ensuring fast and accurate transient stability assessment.
[0004] However, data-driven transient stability assessment methods are usually affected by the training data set, and the quality and quantity of the training data set will limit their prediction accuracy. In particular, when there is a sample imbalance problem in the training data set, it will further limit the attention and prediction accuracy of data-driven transient stability assessment methods for minority samples. Summary of the Invention
[0005] The purpose of the present invention is to provide a power system transient stability assessment method and system based on knowledge-data fusion to improve the accuracy of data-driven transient stability analysis methods in the case of sample imbalance for the above problems in the prior art.
[0006] To achieve the above purpose, the present invention has the following technical solutions:
[0007] In the first aspect, a power system transient stability assessment method based on knowledge-data fusion is provided, including:
[0008] Collect power system simulation data to construct an original data set and a transient stability assessment data set;
[0009] Use the original data set to construct an augmented data set based on data augmentation methods;
[0010] Construct a transient stability assessment model based on knowledge-data fusion;
[0011] Calculate the balanced supervised contrastive loss based on the transient stability assessment dataset and the augmented dataset, and use the backpropagation algorithm to update the model parameters according to the calculated balanced supervised contrastive loss, so as to train the transient stability assessment model based on knowledge-data fusion under the fusion of knowledge and data;
[0012] Apply the trained transient stability assessment model based on knowledge-data fusion online to complete transient stability assessment.
[0013] As a preferred solution, in the step of collecting power system simulation data, constructing the original dataset and the transient stability assessment dataset, set different fault types, fault locations, fault durations and load conditions for time-domain simulation, collect power system simulation data once every set time interval, and label the collected power system simulation data to generate the original dataset;
[0014] Calculate the transient stability index TSI according to the following formula:
[0015]
[0016] where, Δδ max is the maximum rotor angle difference between units during simulation;
[0017] When TSI>0, it means that transient stability can be maintained; when TSI<0, it means that transient instability occurs;
[0018] Thus, the original dataset is expressed as:
[0019] [{S1,TSI1},{S2,TSI2},...,{S N ,TSI N}]
[0020] Select the data within 0.1 s before fault clearing and the corresponding transient stability index TSI from the obtained original dataset to generate the transient stability assessment dataset. The mathematical expression is as follows:
[0021]
[0022] where, for i∈{1…N},
[0023] As a preferred solution, in the step of constructing the augmented dataset based on the data augmentation method using the original dataset, select the data within 0.1 s after fault clearing and the corresponding transient stability index TSI from the original dataset to generate the augmented dataset. The mathematical expression is:
[0024]
[0025] Among them, is the augmented sample corresponding to the i-th original data sample, where i ∈ {1…N},
[0026] As a preferred solution, the steps of constructing a transient stability assessment model based on knowledge-data fusion include:
[0027] Construct a supervised contrastive learning model based on knowledge-data fusion using a Transformer encoder. The Transformer encoder consists of 8 stacked layers, each layer containing a multi-head attention layer and a fully connected feed-forward network layer. Among them, the multi-head attention layer consists of 8 attention perceptrons, with a total of 128 units. The fully connected feed-forward network layer consists of two fully connected layers, and ReLU is used as the activation function between the fully connected layers.
[0028] Based on the constructed Transformer encoder, construct a transient stability assessment model based on knowledge-data fusion, including an encoder Encoder and a decoder Decoder part. The encoder Encoder part includes 8 layers of multi-head attention layers and fully connected feed-forward network layers. Each multi-head attention layer consists of 8 attention perceptrons, with a total of 128 units. The decoder Decoder part is a fully connected multi-layer perceptron classifier, which outputs the transient stability index for the given data sample.
[0029] As a preferred solution, the steps of calculating the balanced supervised contrastive loss based on the transient stability assessment dataset and the augmented dataset and updating the model parameters using the backpropagation algorithm according to the calculated balanced supervised contrastive loss include:
[0030] Input the sample data into the model encoder to generate embeddings, which are used together with the sample labels to calculate the balanced supervised contrastive loss. The calculation expression of the balanced supervised contrastive loss function is as follows:
[0031]
[0032] In the formula, and are the average similarities of positive and negative samples, and their calculation expressions are as follows:
[0033]
[0034] In the formula, P(i) and N(i) respectively represent the index sets of all positive and negative samples corresponding to sample i in the corresponding batch. j(i) is the index of another augmented sample generated from the same source sample as i. z is the output of the encoder Encoder, representing 's embedding. τ is a scalar temperature parameter.
[0035] The back-propagation algorithm is used to update the model parameters according to the calculated contrast loss. During the model training process, the distance between the transient stability evaluation samples and the enhanced samples in the embedding space is shortened to achieve knowledge-data fusion.
[0036] As a preferred solution, the step of training the transient stability assessment model based on knowledge-data fusion includes:
[0037] Migrate the trained Transformer encoder parameters of the supervised contrastive learning model based on knowledge-data fusion to the encoder part of the transient stability assessment model based on knowledge-data fusion;
[0038] Inputting the sample data into the transient stability assessment model based on knowledge-data fusion, so that the transient stability assessment model based on knowledge-data fusion outputs the predicted transient stability index;
[0039] In the model training stage, the cross entropy loss function is used as the loss function during training. The predicted value of the model output and the actual transient stability index value are calculated, and back propagation is performed to update the model parameters.
[0040] As a preferred solution, in the step of applying the trained transient stability assessment model based on knowledge-data fusion online, the power system data 0.1s before the fault is cleared is used as input, and the transient stability prediction result is output.
[0041] In a second aspect, a power system transient stability assessment system based on knowledge-data fusion is provided, comprising:
[0042] Data acquisition module, used to collect power system simulation data, build original data sets and transient stability assessment data sets;
[0043] An enhanced dataset construction module is used to construct an enhanced dataset based on the original dataset and the data enhancement method;
[0044] Transient stability assessment model building module, used to build a transient stability assessment model based on knowledge-data fusion;
[0045] The transient stability assessment model training module is used to calculate the balanced supervision contrast loss based on the transient stability assessment data set and the enhanced data set, and use the back propagation algorithm to update the model parameters according to the calculated balanced supervision contrast loss, so as to realize the knowledge-data fusion and train the transient stability assessment model based on the knowledge-data fusion;
[0046] The transient stability evaluation result output module is used to apply the trained transient stability evaluation model based on knowledge-data fusion online to complete transient stability evaluation.
[0047] In a third aspect, an electronic device is provided, including:
[0048] A memory that stores at least one instruction; and a processor that executes the instructions stored in the memory to implement the method for transient stability evaluation of a power system based on knowledge-data fusion.
[0049] In a fourth aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the method for transient stability evaluation of a power system based on knowledge-data fusion.
[0050] Compared with the prior art, the present invention has at least the following beneficial effects:
[0051] Aiming at the problem of poor accuracy of the data-driven power system transient stability analysis model caused by sample imbalance, the method for transient stability evaluation of a power system based on knowledge-data fusion in the present invention calculates the balanced supervised contrast loss based on the transient stability evaluation data set and the enhanced data set, and uses the backpropagation algorithm to update the model parameters according to the calculated balanced supervised contrast loss, realizing the fusion of knowledge and data. During the training process of the transient stability evaluation model based on knowledge-data fusion, the weights of various types of samples can be dynamically balanced to ensure that both unstable and stable samples receive equal attention during the training process. The present invention constructs an enhanced data set based on the original data set using a data augmentation method, which can prompt the model to learn implicit knowledge more relevant to the transient stability form during the training process, and improve the effect of transient stability evaluation of the transient stability evaluation model in the case of sample imbalance. Through evaluation index verification, the present invention can significantly improve the correct recognition rate of unstable samples. Description of the Drawings
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required to be used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention, and those of ordinary skill in the art can obtain other relevant drawings without creative efforts based on these drawings.
[0053] Figure 1 is a flowchart of the method for transient stability evaluation of a power system based on knowledge-data fusion according to an embodiment of the present invention;
[0054] Figure 2 is an architecture diagram of a supervised contrast learning model based on knowledge-data fusion according to an embodiment of the present invention;
[0055] Figure 3 is the architecture diagram of the transient stability assessment model based on knowledge-data fusion in the embodiments of the present invention;
[0056] Figure 4 is the comparison diagram of the evaluation results of the transient stability assessment method of the power system based on knowledge-data fusion in the embodiments of the present invention and other algorithms;
[0057] Figure 5 is the comparison diagram when the transient stability assessment method of the power system based on knowledge-data fusion in the embodiments of the present invention uses different deep learning models as the backbone network. Detailed implementation manners
[0058] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, those of ordinary skill in the art can also obtain other embodiments without creative efforts.
[0059] Please refer to Figure 1 , the transient stability assessment method of the power system based on knowledge-data fusion in the embodiments of the present invention includes:
[0060] Collect power system simulation data, and construct an original data set and a transient stability assessment data set;
[0061] Use the original data set to construct an enhanced data set based on the data augmentation method;
[0062] Construct a transient stability assessment model based on knowledge-data fusion;
[0063] Calculate the balanced supervised contrast loss based on the transient stability assessment data set and the enhanced data set, and use the backpropagation algorithm to update the model parameters according to the calculated balanced supervised contrast loss, so as to train the transient stability assessment model based on knowledge-data fusion under the fusion of knowledge and data;
[0064] Online apply the trained transient stability assessment model based on knowledge-data fusion to complete the transient stability assessment.
[0065] In a possible implementation manner, in the step of collecting power system simulation data and constructing an original data set and a transient stability assessment data set, different fault types, fault locations, fault durations, and load conditions are set for time-domain simulation, and the power system simulation data is collected once every set time interval, and the collected power system simulation data is labeled to generate an original data set.
[0066] Further, in this embodiment, the set duration is 0.01 s. The power system simulation data includes real-valued data such as generators, buses, and branches in the power system, and the collected power system simulation data is preprocessed to obtain a transient stability assessment dataset and an enhanced dataset.
[0067] The collected power system simulation data is labeled to generate an original dataset. For each power grid power flow mode sample obtained by simulation, the transient stability index TSI (Transient Stability Index) is calculated according to the following formula:
[0068]
[0069] In the formula, Δδ max is the maximum generator power angle difference during the simulation; when TSI > 0, it means the corresponding sample can maintain transient stability; when TSI < 0, it means the corresponding sample has transient instability;
[0070] The original dataset obtained therefrom is expressed as:
[0071] [{S1, TSI1}, {S2, TSI2},..., {S N , TSI N}]
[0072] From the obtained original dataset, the data within 0.1 s (11 sampling points) before fault clearing and the corresponding transient stability index TSI are selected to generate a transient stability assessment dataset, and the mathematical expression is as follows:
[0073]
[0074] This dataset is used as the input data for subsequent transient stability assessment. For i ∈ {1…N},
[0075] In a possible implementation manner, in the step of constructing an enhanced dataset based on the original dataset using a data augmentation method, the data within 0.1 s (11 sampling points) after fault clearing and the corresponding transient stability index TSI are selected from the original dataset to generate an enhanced dataset, and the mathematical expression is:
[0076]
[0077] Among them, is the enhanced sample corresponding to the i-th original data sample. For i ∈ {1…N},
[0078] In a possible implementation manner, the step of constructing a transient stability assessment model based on knowledge-data fusion includes:
[0079] Please refer to Figure 2 , a supervised contrastive learning model based on knowledge-data fusion is constructed based on a Transformer encoder. The Transformer encoder consists of 8 stacked layers, and each layer contains a multi-head attention layer (Multi-Head Attention) and a fully connected feed-forward network layer (Feed-forward Network, FFN); among them, the multi-head attention layer consists of 8 attention perceptrons, with a total of 128 units; the fully connected feed-forward network layer consists of two fully connected layers, and ReLU is used as the activation function between the fully connected layers.
[0080] Please refer to Figure 3 , a transient stability assessment model based on knowledge-data fusion is constructed based on the constructed Transformer encoder, which includes an encoder Encoder and a decoder Decoder part. The encoder Encoder part includes 8 layers of multi-head attention layers and fully connected feed-forward network layers. Each multi-head attention layer consists of 8 attention perceptrons, with a total of 128 units; the decoder Decoder part is a fully connected multi-layer perceptron (multi-layer perceptron, MLP) classifier, which outputs the transient stability index for a given data sample.
[0081] In a possible implementation manner, the steps of calculating the balanced supervised contrast loss based on the transient stability assessment data set and the augmented data set and updating the model parameters according to the calculated balanced supervised contrast loss using the backpropagation algorithm include:
[0082] For the generated transient stability assessment data set and augmented data set, each contains sample data S and its transient stability index Y = {TSI}.
[0083] The sample data is input into the model encoder to generate embeddings, which are used together with the sample labels to calculate the balanced supervised contrast loss. The calculation expression of the balanced supervised contrast loss function is as follows:
[0084]
[0085] In the formula, and are the average similarities of positive and negative samples, and the calculation expressions are as follows:
[0086]
[0087] In the formula, P(i) and N(i) represent the index set of all positive samples and negative samples corresponding to sample i in the corresponding batch; j(i) is the index of another enhanced sample generated from the same source sample as i; z is the output of the encoder, which means is embedded in; τ is a scalar temperature parameter.
[0088] The back-propagation algorithm is used to update the model parameters according to the calculated contrast loss. During the model training process, the distance between the transient stability evaluation samples and the enhanced samples in the embedding space is shortened to achieve knowledge-data fusion.
[0089] In this embodiment, the training batch size of the supervised comparison model based on the knowledge-data fusion framework is 2048, and a total of 400 rounds of training are performed. After the model training is completed, the model parameters are saved.
[0090] In a possible implementation manner, the step of training the transient stability assessment model based on knowledge-data fusion includes:
[0091] For the generated transient stability assessment data sets, each contains sample data S and its transient stability index Y = {TSI}. The input data of the transient stability assessment model based on the knowledge-data fusion framework is the sample data S, and the output is the transient stability index of the sample.
[0092] Migrate the trained Transformer encoder parameters of the supervised contrastive learning model based on knowledge-data fusion to the encoder part of the transient stability assessment model based on knowledge-data fusion;
[0093] Inputting the sample data into the transient stability assessment model based on knowledge-data fusion, so that the transient stability assessment model based on knowledge-data fusion outputs the predicted transient stability index;
[0094] In the model training stage, the cross entropy loss function is used as the loss function during training (Cross EntropyLoss), the predicted value of the model output and the actual transient stability index value are calculated, and back propagation is performed to update the model parameters.
[0095] In this embodiment, the training batch size of the transient stability assessment model based on the knowledge-data fusion framework is 512, and a total of 100 rounds of training are performed. After the model training is completed, the model is saved.
[0096] In a possible implementation manner, in the step of online applying the trained transient stability assessment model based on knowledge-data fusion, power system data 0.1 s before fault clearing is used as input, and a prediction result of transient stability is output through the transient stability assessment model based on knowledge-data fusion.
[0097] The transient stability assessment method for power system based on knowledge-data fusion in the embodiment of the present invention is trained based on a balanced supervised contrastive learning loss function to ensure that unstable and stable samples receive equal attention during the training process, and to learn implicit knowledge more relevant to the transient stability form by narrowing the distance between the transient stability assessment data and this implicit knowledge of the augmented data during the training process, solving the problem of poor accuracy of existing data-driven transient stability analysis methods in the case of sample imbalance.
[0098] To verify the effectiveness of the transient stability assessment model, four evaluation indicators are selected in the embodiment of the present invention to verify and illustrate the effectiveness of the model, including:
[0099]
[0100] In the formula, TN is the unstable sample correctly predicted, TP is the stable sample correctly predicted, FN is the unstable sample wrongly predicted, and FP is the stable sample wrongly predicted. Among them, TUR and TSR respectively represent the prediction accuracies for unstable samples and stable samples, G-m is the comprehensive index of TUR and TSR, and ACC is the correct recognition rate for all samples.
[0101] To verify the effectiveness of the transient stability assessment method for power system based on knowledge-data fusion proposed in the embodiment of the present invention, the model is compared with other algorithms. As Figure 4 shown, compared with other algorithms, the transient stability assessment method for power system based on knowledge-data fusion proposed in this embodiment achieves higher prediction accuracy. Based on the traditional supervised contrastive learning algorithm, the balanced supervised contrastive loss function proposed in the present invention decomposes the supervised contrastive loss, balances the number difference between positive and negative samples by decoupling the similarity of positive and negative samples and calculating the average value respectively, and at the same time increases the weights related to the data and knowledge sample pairs to improve the learning ability of the model for augmented data. Further, the transient stability assessment method for power system based on knowledge-data fusion proposed in the present invention introduces and combines knowledge through a new data augmentation method, uses the post-fault observation data as augmented samples, captures the dynamic behavior of the system after disturbance, obtains the key information for determining the final stable state, achieves a higher recognition accuracy for unstable samples compared with data-driven algorithms in unbalanced samples, and improves the discrimination of stable samples while paying more attention to unstable samples.
[0102] To verify the generality of the power system transient stability assessment method based on knowledge-data fusion proposed in the embodiments of the present invention, the effects when different deep learning models are used as the backbone models are compared. As Figure 5 shown, when different deep learning models are used as the backbone models, compared with the case where the knowledge-data fusion framework is not utilized, the power system transient stability assessment method based on knowledge-data fusion proposed in this embodiment has achieved better prediction accuracy. In particular, compared with the models without using the knowledge-data fusion framework, the proposed knowledge-data fusion framework has significantly improved the correct recognition rate of unstable samples.
[0103] Another embodiment of the present invention proposes a power system transient stability assessment system based on knowledge-data fusion, including:
[0104] A data acquisition module, configured to acquire power system simulation data, construct an original data set and a transient stability assessment data set;
[0105] An enhanced data set construction module, configured to construct an enhanced data set based on the original data set using a data augmentation method;
[0106] A transient stability assessment model construction module, configured to construct a transient stability assessment model based on knowledge-data fusion;
[0107] A transient stability assessment model training module, configured to calculate a balanced supervised contrast loss based on the transient stability assessment data set and the enhanced data set, and use the backpropagation algorithm to update the model parameters according to the calculated balanced supervised contrast loss, so as to train the transient stability assessment model based on knowledge-data fusion under the fusion of knowledge and data;
[0108] A transient stability assessment result output module, configured to perform online application of the trained transient stability assessment model based on knowledge-data fusion to complete transient stability assessment.
[0109] Another embodiment of the present invention proposes an electronic device, including:
[0110] A memory, storing at least one instruction; and a processor, executing the instruction stored in the memory to implement the power system transient stability assessment method based on knowledge-data fusion.
[0111] Another embodiment of the present invention proposes a computer-readable storage medium, in which at least one instruction is stored, and the at least one instruction is executed by a processor in an electronic device to implement the power system transient stability assessment method based on knowledge-data fusion.
[0112] Exemplarily, the instructions stored in the memory can be divided into one or more modules / units, and the one or more modules / units are stored in a computer-readable storage medium and executed by the processor to complete the power system transient stability assessment method based on knowledge-data fusion of the present invention. The one or more modules / units can be a series of computer-readable instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program in the server.
[0113] The electronic device can be a computing device such as a smart phone, a notebook, a palm computer, and a cloud server. The electronic device may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the electronic device may further include more or fewer components, or combine certain components, or different components. For example, the electronic device may further include input / output devices, network access devices, a bus, etc.
[0114] The processor can be a Central Processing Unit (CPU), or can also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc.
[0115] The memory can be an internal storage unit of the server, such as the hard disk or memory of the server. The memory can also be an external storage device of the server, such as a plug-in hard disk equipped on the server, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory can also include both the internal storage unit and the external storage device of the server. The memory is used to store the computer-readable instructions and other programs and data required by the server. The memory can also be used to temporarily store the data that has been output or will be output.
[0116] It should be noted that for the content such as information interaction and execution process between the above-mentioned module units, since it is based on the same concept as the method embodiment, for its specific functions and the technical effects brought, reference can be specifically made to the method embodiment part, and details are not described herein again.
[0117] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0118] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above method embodiments of this application, a computer program can be used to instruct the relevant hardware to complete. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the photographing device / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disc, etc.
[0119] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0120] The above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of this application and should all be included in the protection scope of this application.
Claims
1. A method for evaluating transient stability of power systems based on knowledge-data fusion, characterized in that: include: Collect power system simulation data and construct original data sets and transient stability assessment data sets; Use the original dataset to build an enhanced dataset based on the data augmentation method; Construct a transient stability assessment model based on knowledge-data fusion; Based on the transient stability assessment data set and the enhanced data set, the balanced supervision contrast loss is calculated, and the back propagation algorithm is used to update the model parameters according to the calculated balanced supervision contrast loss, so as to realize the knowledge-data fusion and train the transient stability assessment model based on knowledge-data fusion; The trained transient stability assessment model based on knowledge-data fusion is applied online to complete the transient stability assessment.
2. The power system transient stability assessment method based on knowledge-data fusion according to claim 1 is characterized in that: In the steps of collecting power system simulation data and constructing an original data set and a transient stability assessment data set, different fault types, fault locations, fault durations, and load conditions are set for time domain simulation, power system simulation data is collected once at a set interval, and the collected power system simulation data is annotated to generate an original data set; Calculate the transient stability index TSI according to the following formula: In the formula, Δδ max is the maximum unit power angle difference during the simulation; When TSI>0, it means that transient stability can be maintained; when TSI<0, it means that transient instability occurs; The original data set is expressed as follows: [{S1,TSI1},{S2,TSI2},...,{S N ,NO N }] From the original data set obtained, the data within 0.1s before the fault is cleared and the corresponding transient stability index TSI are selected to generate a transient stability assessment data set. The mathematical expression is as follows: Where, for i∈{1…N}, 3. The power system transient stability assessment method based on knowledge-data fusion according to claim 2 is characterized in that: In the step of constructing an enhanced data set based on the data enhancement method using the original data set, data within 0.1s after the fault is cleared and the corresponding transient stability index TSI are selected from the original data set to generate an enhanced data set. The mathematical expression is: in, is the enhanced sample corresponding to the i-th original data sample, for i∈{1…N}, 4. The power system transient stability assessment method based on knowledge-data fusion according to claim 1 is characterized in that: The steps of constructing a transient stability assessment model based on knowledge-data fusion include: A supervised contrastive learning model based on knowledge-data fusion is constructed based on the Transformer encoder. The Transformer encoder consists of 8 stacked layers, each of which contains a multi-head attention layer and a fully connected feedforward network layer; wherein the multi-head attention layer consists of 8 attention sensors, containing a total of 128 units; the fully connected feedforward network layer consists of two fully connected layers, and ReLU is used as the activation function between the fully connected layers; A transient stability assessment model based on knowledge-data fusion is constructed based on the constructed Transformer encoder, which includes an encoder and a decoder. The encoder part contains 8 multi-head attention layers and a fully connected feedforward network layer. Each multi-head attention layer consists of 8 attention perceptrons, totaling 128 units; the decoder part is a fully connected multi-layer perceptron classifier, which outputs the transient stability index for a given data sample.
5. The power system transient stability assessment method based on knowledge-data fusion according to claim 4 is characterized in that: The step of calculating the balanced supervision contrast loss based on the transient stability assessment data set and the enhanced data set, and updating the model parameters according to the calculated balanced supervision contrast loss using the back propagation algorithm comprises: The sample data is input into the model encoder to generate an embedding, which is used together with the sample label to calculate the balanced supervised contrast loss. The calculation expression of the balanced supervised contrast loss function is as follows: In the formula, and is the average similarity between positive samples and negative samples, and the calculation expression is as follows: In the formula, P(i) and N(i) represent the index set of all positive samples and negative samples corresponding to sample i in the corresponding batch; j(i) is the index of another enhanced sample generated from the same source sample as i; z is the output of the encoder, which means The embedding of ; τ is the scalar temperature parameter; The back-propagation algorithm is used to update the model parameters according to the calculated contrast loss. During the model training process, the distance between the transient stability evaluation samples and the enhanced samples in the embedding space is shortened to achieve knowledge-data fusion.
6. The power system transient stability assessment method based on knowledge-data fusion according to claim 5 is characterized in that: The step of training the transient stability assessment model based on knowledge-data fusion includes: Migrate the trained Transformer encoder parameters of the supervised contrastive learning model based on knowledge-data fusion to the encoder part of the transient stability assessment model based on knowledge-data fusion; Inputting the sample data into the transient stability assessment model based on knowledge-data fusion, so that the transient stability assessment model based on knowledge-data fusion outputs the predicted transient stability index; In the model training stage, the cross entropy loss function is used as the loss function during training. The predicted value of the model output and the actual transient stability index value are calculated, and back propagation is performed to update the model parameters.
7. The power system transient stability assessment method based on knowledge-data fusion according to claim 1 is characterized in that: In the step of applying the trained transient stability assessment model based on knowledge-data fusion online, the power system data 0.1s before the fault is cleared is used as input, and the prediction result of transient stability is output.
8. A power system transient stability assessment system based on knowledge-data fusion, characterized in that: include: Data acquisition module, used to collect power system simulation data, build original data sets and transient stability assessment data sets; An enhanced dataset construction module is used to construct an enhanced dataset based on the original dataset and the data enhancement method; Transient stability assessment model building module, used to build a transient stability assessment model based on knowledge-data fusion; The transient stability assessment model training module is used to calculate the balanced supervision contrast loss based on the transient stability assessment data set and the enhanced data set, and use the back propagation algorithm to update the model parameters according to the calculated balanced supervision contrast loss, so as to realize the knowledge-data fusion and train the transient stability assessment model based on the knowledge-data fusion; The transient stability assessment result output module is used to apply the trained transient stability assessment model based on knowledge-data fusion online to complete the transient stability assessment.
9. An electronic device, characterized in that: include: A memory storing at least one instruction; and A processor executes instructions stored in the memory to implement the power system transient stability assessment method based on knowledge-data fusion as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and the at least one instruction is executed by a processor in an electronic device to implement the power system transient stability assessment method based on knowledge-data fusion as described in any one of claims 1 to 7.