Power system relay protection fault identification method, system and device based on Bayesian optimization and storage medium

By using a Bayesian-optimized CBAM-CNN-LSTM hybrid deep learning model, the local and temporal features of power system faults are extracted collaboratively. This solves the identification problem of traditional relay protection technology after the grid connection of new energy sources, and achieves fault identification with high reliability and high mobility, thus meeting the requirements for safe and stable operation of the power grid.

CN121688709APending Publication Date: 2026-03-17YUNNAN POWER GRID CO LTD

Patent Information

Application Number
CN202610196213.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-02-11
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Traditional relay protection technology struggles to effectively identify weak faults and high-resistance faults with limited fault current amplitude and waveform distortion after new energy sources are connected to the grid, leading to false tripping or failure to trip. Existing deep learning models cannot collaboratively extract local and temporal features, resulting in low identification recall and failing to meet the reliability requirements of relay protection.

Method used

A hybrid deep learning model based on Bayesian optimization, CBAM-CNN-LSTM, is adopted. By converting electrical quantity data into labeled two-dimensional images, combining convolutional neural networks and long short-term memory networks, and using Bayesian optimization algorithm to automatically tune hyperparameters, a model that collaboratively extracts local features and temporal correlations is constructed to achieve fault identification.

Benefits of technology

In power grids with a high proportion of renewable energy, rapid and accurate identification of weak and high-resistance faults has been achieved, with a fault identification accuracy rate consistently above 99.7%, meeting the speed requirements of the main power grid protection and improving the safe and stable operation of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121688709A_ABST
    Figure CN121688709A_ABST
Patent Text Reader

Abstract

The invention discloses an electric power system relay protection fault identification method, system and device based on Bayesian optimization and a storage medium, and relates to the field of electric power system fault identification and relay protection, and the method comprises the steps: collecting original electric quantity data from a power grid fault recording system, and converting the original electric quantity data into a two-dimensional image with a label; based on the two-dimensional image with the label, constructing a hybrid deep learning model skeleton for cooperatively extracting local features and associating with a time sequence; based on the two-dimensional image with the label, a Bayesian optimization algorithm is adopted to carry out automatic hyper-parameter tuning and training on the constructed hybrid deep learning model skeleton, and a CBAM-CNN-LSTM model capable of being used for actual fault identification is obtained; the CBAM-CNN-LSTM model is used to carry out online fault identification on the electrical quantity data acquired in real time; according to the method, the weak fault and the high-resistance fault of the new energy power grid are accurately and rapidly identified, the accuracy rate exceeds 99.7%, the response time of the whole process is less than 10 milliseconds, and the safety of the power grid is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of power system fault identification and relay protection, and in particular to a power system relay protection fault identification method, system, device and storage medium based on Bayesian optimization. BACKGROUND

[0002] With the large-scale grid connection of wind power, photovoltaic and other new energy sources, the power system is undergoing a profound transformation from the traditional alternating current grid to the new high-proportion power electronic grid. This transformation fundamentally changes the characteristics of power grid faults: new energy units are connected to the grid through converters, resulting in limited fault current amplitude, waveform distortion and rich high-frequency transient components, which poses a serious challenge to the traditional relay protection technology that relies on power frequency steady-state electrical quantities (such as current amplitude and measured impedance) to build protection criteria. In distinguishing fault direction, identifying weak faults and high-resistance faults, the traditional relay protection technology is prone to misoperation or refusal, which seriously threatens the safe and stable operation of the power grid.

[0003] To address the above challenges, deep learning technology based on data-driven is introduced into the field of fault identification. However, existing deep learning solutions with single architecture have obvious limitations: convolutional neural networks can effectively extract local mutation features in fault waveforms, but they are difficult to model long-term sequence correlations in fault development; long short-term memory networks are good at handling sequence dependencies, but they are not sensitive enough to subtle local transient features in waveforms. Both of them fail to utilize local and temporal features cooperatively, resulting in incomplete representation of complex fault features of new energy sources. In addition, the configuration of hyperparameters of these models relies on manual experience and is blind, especially in weak fault scenarios where fault current amplitude is low and features are not significant. The identification recall rate is generally difficult to break through 90%, which cannot meet the stringent requirements of relay protection for reliability. SUMMARY

[0004] In view of the above problems, the present application provides a power system relay protection fault identification method, system, device and storage medium based on Bayesian optimization.

[0005] Therefore, the technical problem solved by the present application is: how to provide a new type of power system relay protection fault identification method that can cooperatively extract fault local and temporal features and adaptively optimize model parameters, to overcome the problems of invalidation of traditional protection criteria and incomplete feature capture and low weak fault identification accuracy of existing deep learning models.

[0006] To solve the above technical problems, the present application provides the following technical solutions: In a first aspect, the present application provides a power system relay protection fault identification method based on Bayesian optimization, comprising: Collect original electrical quantity data from a power grid fault recording system, and convert the original electrical quantity data into a labeled two-dimensional image; Based on the labeled two-dimensional image, a hybrid deep learning model skeleton that cooperatively extracts local features and time sequence correlation is constructed; Based on the labeled two-dimensional image, a Bayesian optimization algorithm is used to automatically optimize and train the constructed hybrid deep learning model skeleton, and a CBAM-CNN-LSTM model that can be used for actual fault identification is obtained; The CBAM-CNN-LSTM model is used for online fault identification of real-time collected electrical quantity data.

[0007] As an optimal solution of the power system relay protection fault identification method based on Bayesian optimization, wherein: The original electrical quantity data is collected from the power grid fault recording system, and the original electrical quantity data is converted into a labeled two-dimensional image, which includes: The original electrical quantity data including three-phase voltage, three-phase current and zero sequence component is collected from the power grid fault recording system; The collected original electrical quantity data is cleaned, the cleaned data is intercepted by a fixed time window, and the intercepted data is labeled, and the data segment is associated with a multi-class operating state label according to the fault trigger time recorded by the fault recording device; The labeled data is converted into a Gram angle field, and the samples converted by the Gram angle field are divided into a training set, a validation set and a test set; The training set and the test set are intercepted by different step lengths.

[0008] As an optimal solution of the power system relay protection fault identification method based on Bayesian optimization, wherein: The labeled two-dimensional image is used to construct a hybrid deep learning model skeleton that cooperatively extracts local features and time sequence correlation, which includes: A CBAM-CNN-LSTM basic architecture is constructed, a CNN local feature extraction module is set in the CBAM-CNN-LSTM basic architecture, the CNN local feature extraction module includes a CBAM attention submodule, a two-dimensional convolution layer and a maximum pooling layer; the two-dimensional image is input into the CBAM attention submodule to strengthen the key features, and then the features are extracted and the dimensions are transformed by the two-dimensional convolution layer and the maximum pooling layer in turn.

[0009] The beneficial effects of the preferred technical solution are: the CBAM-CNN-LSTM basic framework combines the ability of convolutional neural network (CNN) to extract local features and long short-term memory network (LSTM) to process time sequence information, which is suitable for the characteristics of power system fault data. The CBAM attention submodule can strengthen the key features in the image, so that the model focuses more on important information and improves the effectiveness of feature extraction. The two-dimensional convolution layer and the maximum pooling layer further extract and filter the features, reduce the data dimension, and reduce the calculation amount.

[0010] As a preferred scheme of the power system relay protection fault identification method based on Bayesian optimization, wherein: The mixed deep learning model skeleton for cooperatively extracting local features and time sequence correlation based on the labeled two-dimensional image further comprises: The CBAM attention submodule is arranged in the CBAM-CNN-LSTM basic framework, and the CBAM attention submodule is composed of a channel attention unit and a spatial attention unit; the channel attention unit generates channel attention weights through global average pooling, global maximum pooling, a shared fully connected layer and an activation function operation, and multiplies the channel attention weights with the original feature map; the spatial attention unit generates spatial attention weights through channel dimension pooling, a convolution layer and an activation function operation, and multiplies the spatial attention weights with the channel weighted feature map, and finally outputs the weighted feature map to the subsequent convolution layer.

[0011] The beneficial effects of the preferred technical solution are: the channel attention unit and the spatial attention unit of the CBAM attention submodule respectively weight the features from the channel and spatial dimensions, which can adaptively adjust the importance of the feature map, highlight the key features and suppress irrelevant information. This dual attention mechanism can enhance the perception ability of the model to different features, improve the expression ability of the model and the accuracy of fault identification.

[0012] As a preferred scheme of the power system relay protection fault identification method based on Bayesian optimization, wherein: The mixed deep learning model skeleton for cooperatively extracting local features and time sequence correlation based on the labeled two-dimensional image further comprises: The LSTM time sequence modeling module is arranged in the CBAM-CNN-LSTM basic framework, which is used to capture the long time sequence correlation of fault features and make up for the defect that CNN cannot model time sequence; the LSTM time sequence modeling module comprises an LSTM layer and a Dropout layer, the input is a vector obtained by flattening the CNN output feature map, the number of neurons of the LSTM layer is adjustable, and the Dropout layer is used to prevent overfitting.

[0013] As a preferred scheme of the power system relay protection fault identification method based on Bayesian optimization, wherein: The labeled two-dimensional image is used to automatically optimize and train the constructed mixed deep learning model skeleton by using a Bayesian optimization algorithm, and a CBAM-CNN-LSTM model that can be used for actual fault identification is obtained. Based on the constructed mixed deep learning model skeleton, the key hyperparameters to be optimized and the value range are determined. The optimization objective function is set, and the objective function takes into account the overall accuracy and weak fault identification ability of the model on the validation set.

[0014] As an optimal solution of the power system relay protection fault identification method based on Bayesian optimization, wherein: The labeled two-dimensional image is used to automatically optimize and train the constructed mixed deep learning model skeleton by using a Bayesian optimization algorithm, and a CBAM-CNN-LSTM model that can be used for actual fault identification is obtained. Multiple iterations are performed, and the hyperparameter combination that maximizes the objective function value in the iteration process is output. According to the determined optimal hyperparameter configuration, a CBAM-CNN-LSTM model that can be used for actual fault identification is obtained.

[0015] In a second aspect, the present application provides a power system relay protection fault identification system based on Bayesian optimization, comprising: A data image preprocessing module is used to collect original electrical quantity data from a power grid fault recording system, and convert the original electrical quantity data into labeled two-dimensional images. A mixed model skeleton construction module is used to construct a mixed deep learning model skeleton that cooperatively extracts local features and time sequence correlations based on the labeled two-dimensional images. A model hyperparameter optimization and training module is used to automatically optimize and train the constructed mixed deep learning model skeleton by using a Bayesian optimization algorithm based on the labeled two-dimensional images, and a CBAM-CNN-LSTM model that can be used for actual fault identification is obtained. A real-time fault online identification module is used to use the CBAM-CNN-LSTM model to perform online fault identification on real-time collected electrical quantity data.

[0016] In a third aspect, the present application provides a computer device, comprising: A memory and a processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions, which realize the steps of the power system relay protection fault identification method based on Bayesian optimization when the computer executable instructions are executed by the processor.

[0017] Fourthly, the present invention provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of a Bayesian-optimized power system relay protection fault identification method.

[0018] The beneficial effects of this invention are as follows: This invention effectively solves the industry problem of traditional relay protection being prone to false tripping and failure to trip due to the grid connection of new energy sources. It can accurately identify weak faults with fault current amplitudes only 1.5 times the rated value and high-resistance faults with transition resistances as high as 200 ohms. Under strong noise interference and different new energy proportions, the average fault identification accuracy rate is stable at over 99.7%. At the same time, the entire process time of single fault identification and clearing is controlled within 10 milliseconds, fully meeting the fast-acting requirements of the main power grid protection, and significantly improving the safe and stable operation level of power grids with a high proportion of new energy sources. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. 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.

[0020] Figure 1 This is an overall flowchart of a power system relay protection fault identification method based on Bayesian optimization provided by the present invention. Detailed Implementation

[0021] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0022] Example 1, referring to Figure 1 This is the first embodiment of the present invention, which provides a method for identifying faults in power system relay protection based on Bayesian optimization, including: S1: Collect raw electrical quantity data from the power grid fault recording system and convert the raw electrical quantity data into labeled two-dimensional images; S2: Based on labeled 2D images, construct the skeleton of a hybrid deep learning model that collaboratively extracts local features and temporal correlations; S3: Based on labeled two-dimensional images, the Bayesian optimization algorithm is used to automatically tune and train the constructed hybrid deep learning model skeleton to obtain a CBAM-CNN-LSTM model that can be used for actual fault identification. S4: Use the CBAM-CNN-LSTM model to perform online fault identification on real-time collected electrical quantity data.

[0023] It should be noted that through steps S1-S4, this invention constructs a closed-loop fault identification system from data to decision-making. Ultimately, in complex power grid scenarios with a high proportion of new energy sources, it achieves rapid and accurate identification of weak faults and high-resistance faults, effectively meeting the stringent requirements of new power systems for high reliability, high speed and strong adaptability of relay protection.

[0024] Example 2, refer to Figure 1 As an embodiment of the present invention, based on the previous embodiment, a power system relay protection fault identification method based on Bayesian optimization is provided, comprising: In this embodiment, step S1 above, which involves acquiring raw electrical quantity data from the power grid fault recording system and converting the raw electrical quantity data into a labeled two-dimensional image, includes: Raw electrical quantity data, including three-phase voltage, are collected from the power grid fault recording system. , , Three-phase current , , Zero-order component , ; Data cleaning is performed on the collected raw electrical quantity data: Noise Removal: The 3σ criterion is used to handle impulse noise (such as transient outliers caused by electromagnetic interference). The mean μ and standard deviation σ of a single sample are calculated. If a certain sampling point Satisfy | -μ|>3σ is considered noise and replaced with the mean of two adjacent sampling points. It should be noted that here... This represents any sampling point in the sample, which will be involved in the subsequent missing data completion process. , , , The continuous sampling points, represented by , are used for calculation.

[0025] Missing data completion: If ≤3 consecutive sampling points are missing, linear interpolation is used for completion (e.g., missing data). , ,pass and calculate: = +( - ) / 3, = +2( - If more than 3 samples are missing, the sample is discarded to ensure data integrity.

[0026] Sliding time window truncation: In the sliding time window truncation stage, a fixed time window length of 1 / 2 cycle is adopted. This parameter setting can achieve a balance between ensuring the integrity of fault features and improving model training efficiency (avoiding data redundancy and increased training time caused by excessively long time windows); Label the cleaned data: The fault recording data is categorized into 21 operating states, including 1 category of normal operation (data segments with the sliding window starting point in the [0,39] interval and no fault sampling points), 10 categories of external faults (covering four types: single-phase ground fault, two-phase short circuit, two-phase ground fault, and three-phase ground fault), and 10 categories of internal faults (fault types completely consistent with external faults, corresponding to data segments with fault sampling points within the tie line protection zone in the sliding window). Labeling must be based on the "fault trigger time" recorded by the fault recording device, directly establishing the association between the sliding window starting point and the fault type. For example, when the sliding window starting point is in the [40,79] interval and the fault actually occurs within the tie line protection zone, the data segment is labeled as "internal single-phase ground fault" or matches the corresponding label of the actual fault type.

[0027] Perform Gram field transformation on the labeled data: The electrical features are processed using Gramian Angular Field (GAF). First, the feature data is normalized to the interval [-1, 1]. Then, the normalized data is mapped to polar coordinates, ultimately forming a dual-channel two-dimensional image with dimensions [40, 40, 2], which is suitable for the spatial feature extraction requirements of CNN.

[0028] The samples transformed by Gram Field (GAF) were randomly divided into training set, validation set and test set in a ratio of 7:2:1; For the training set, a step size of 5 is used for truncation. For example, a single original sample containing 160 sampling points can generate (160-40) / 5+1=25 training segments (such as [0,39], [5,44], etc.). It should be noted that by setting a reasonable step size, the duplicate data of adjacent segments can be reduced, and the interference of data redundancy on the training process can be avoided. For the test set, a step size of 1 is used for truncation. A single original sample can generate 121 test segments, which can completely capture the feature changes at each sampling moment during the transition from "normal operation to failure". This ensures comprehensive verification of the model's identification performance at different stages of fault development and avoids performance evaluation bias caused by missing key transition features due to excessively large step sizes.

[0029] In this embodiment, step S2 above, which involves constructing the skeleton of a hybrid deep learning model for collaboratively extracting local features and temporal correlations based on labeled two-dimensional images, includes: Based on labeled 2D images, a hybrid deep learning model skeleton for collaborative extraction of local features and temporal correlations is constructed. This model skeleton mainly consists of two parts: the CBAM-CNN-LSTM basic architecture and Bayesian hyperparameter optimization. The construction process is as follows: CBAM-CNN-LSTM Infrastructure: This architecture aims to combine the local feature extraction capabilities of Convolutional Neural Networks (CNN) with the temporal modeling capabilities of Long Short-Term Memory Networks (LSTM) to achieve effective analysis of fault recording data.

[0030] The CBAM-CNN-LSTM architecture includes a CNN local feature extraction module: The structure consists of 1 CBAM attention submodule (Convolutional Block Attention Module) + 2 two-dimensional convolutional layers + 1 max pooling layer; The [40,40,2] dual-channel two-dimensional image after GAF conversion is first input into the CBAM attention submodule for feature enhancement, and the output is a [40,40,2] feature map after channel and spatial weighting. The first convolutional layer uses 32 3×3 convolutional kernels, with ReLU activation function, and the output feature map dimension is [38,38,32] (after input [40,40,2] is convolved by 3×3, the size = 40-3+1=38). The second convolutional layer uses 16 3×3 convolutional kernels with ReLU activation, and outputs [36,36,16]; the max pooling layer uses a 2×2 pooling window with a stride of 2, and outputs [18,18,16]; The CBAM-CNN-LSTM infrastructure also includes a CBAM attention submodule, which consists of channel attention units (CAM) and spatial attention units (SAM) to further enhance features; The Channel Attention Unit (CAM) has the following structure: Global Average Pooling (GAP) + Global Max Pooling (GMP) + 2 shared fully connected layers + Sigmoid activation; the processing steps include: For the input feature map [40,40,2], perform GAP and GMP operations respectively: GAP calculates the spatial mean of each channel (2 channels in total) to obtain the vector [1,1,2]; GMP calculates the spatial maximum value of each channel to obtain the vector [1,1,2]. The two vectors are concatenated into a vector [1,1,4], which is then input into a 2-layer shared fully connected layer: the number of neurons in the first layer is 2 (the number of input channels / 1, to adapt to scenarios with a small number of channels), and ReLU activation is used; the number of neurons in the second layer is 2, consistent with the number of input channels. The [1,1,2] channel attention weights are generated by sigmoid activation and multiplied by the original feature map channel by channel to obtain a [40,40,2] channel weighted feature map.

[0031] The Spatial Attention Unit (SAM) has the structure of channel-dimensional pooling + 1×1 convolutional layer + sigmoid activation; the processing steps include: The channel-weighted [40,40,2] feature map is subjected to average pooling and max pooling in the channel dimension to obtain two [40,40] spatial feature maps. The two spatial feature maps are concatenated to form a [40,40,2] feature map, which is then input into a 1×1 convolutional layer (number of convolutional kernels = 1) with 1 compressed channel to obtain a [40,40,1] feature map. The spatial attention weights [40,40,1] are generated by sigmoid activation, multiplied by the channel weighted feature map according to the spatial position, and the final weighted feature map [40,40,2] is output and fed into the subsequent convolutional layer.

[0032] The CBAM-CNN-LSTM infrastructure also includes an LSTM temporal modeling module, which is used to capture long-term temporal correlations of fault features, making up for the deficiency of CNN in modeling temporal sequences.

[0033] The LSTM temporal modeling module has a structure of 1 LSTM layer + 1 Dropout layer; the number of neurons in the LSTM layer is adjustable from 32 to 128, and the input is the vector (18×18×16=5184 dimensions) flattened from the CNN output feature map by the Flatten layer. The output dimension is consistent with the number of neurons; the probability of the Dropout layer is 0.1-0.3 to prevent overfitting. The CBAM-CNN-LSTM architecture also includes a classification output module, which maps the extracted "local-temporal" fusion features to the probabilities of 21 operating states, providing a basis for decision-making in fault identification.

[0034] The classification output module has a two-layer fully connected structure; the first layer has 128 neurons with ReLU activation; the second layer has 21 neurons with Softmax activation.

[0035] In this embodiment, in step S3 above, based on labeled two-dimensional images, the Bayesian optimization algorithm is used to automatically tune and train the constructed hybrid deep learning model skeleton, resulting in a CBAM-CNN-LSTM model that can be used for practical fault identification, including: Based on the constructed hybrid deep learning model skeleton, the key hyperparameters to be optimized and their value ranges are determined, including the number of convolutional kernels in the first layer of the CNN (16 / 32 / 64), the number of convolutional kernels in the second layer of the CNN (8 / 16 / 32), the number of neurons in the LSTM (32 / 64 / 128), the learning rate (1e-4 / 5e-4 / 1e-3 / 5e-3), the batch size (16 / 32 / 64), the Dropout probability (0.1 / 0.2 / 0.3), and the number of LSTM layers (1 / 2). The objective function is optimized by taking the weighted sum of "fault classification accuracy + weak fault recall" on the validation set as the objective, and the formula is: Obj =0.6×Acc+0.4×Recall in, Obj The objective function is represented by Acc, which represents the classification accuracy, and Recall, which represents the weak fault recall rate. Acc = (Number of correctly identified samples / Total number of validated samples) × 100%, and Recall = (Number of correctly identified weak fault samples / Total number of weak fault samples) × 100% (a weak fault is defined as a short-circuit fault with a fault current amplitude ≤ 1.5 times the rated current). This approach balances overall accuracy with weak fault identification capability.

[0036] The tree-structured Parzen estimator (TPE) is used as the surrogate model. The next set of hyperparameters is selected through the expectation improvement (EI) acquisition function. The number of iterations is 20-30. In each iteration, the model is trained and the surrogate model is updated. Finally, the combination of hyperparameters with the largest objective function value is output.

[0037] It should be noted that this method avoids the blindness and inefficiency of manual debugging, and determines the optimal hyperparameter configuration for the hybrid deep learning model skeleton, thus obtaining a CBAM-CNN-LSTM model that can be used for practical fault identification. This model performs excellently in balancing overall accuracy and weak fault identification capabilities, and can provide a more reliable and effective solution for fault identification in relay protection of new power systems, contributing to the safe and stable operation of power systems.

[0038] Example 3: The above is an illustrative scheme of a power system relay protection fault identification method based on Bayesian optimization in this embodiment. It should be noted that the technical solution of a power system relay protection fault identification system based on Bayesian optimization and the technical solution of the power system relay protection fault identification method based on Bayesian optimization described above belong to the same concept. Details not described in detail in the technical solution of the power system relay protection fault identification system based on Bayesian optimization in this embodiment can be found in the description of the technical solution of the power system relay protection fault identification method based on Bayesian optimization described above.

[0039] This embodiment also provides a power system relay protection fault identification system based on Bayesian optimization, including: The data image preprocessing module is used to collect raw electrical quantity data from the power grid fault recording system and convert the raw electrical quantity data into labeled two-dimensional images. The hybrid model skeleton construction module is used to construct a hybrid deep learning model skeleton that collaboratively extracts local features and temporal correlations based on labeled 2D images. The model hyperparameter tuning and training module is used to automatically tune and train the constructed hybrid deep learning model skeleton based on labeled two-dimensional images using the Bayesian optimization algorithm, so as to obtain a CBAM-CNN-LSTM model that can be used for actual fault identification. The real-time online fault identification module is used to identify faults in real-time electrical quantity data using the CBAM-CNN-LSTM model.

[0040] This embodiment also provides an electronic device applicable to a Bayesian optimization-based power system relay protection fault identification method, including: The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement a Bayesian-optimized power system relay protection fault identification method as proposed in the above embodiments.

[0041] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements a Bayesian optimization-based power system relay protection fault identification method as proposed in the above embodiment.

[0042] The storage medium proposed in this embodiment belongs to the same inventive concept as the Bayesian optimization-based power system relay protection fault identification method proposed in the above embodiment. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0043] Example 4, referring to Tables 1-4, is an embodiment of the present invention, providing a method for identifying faults in power system relay protection based on Bayesian optimization. To verify the beneficial effects of the present invention, a simulation experiment is conducted for scientific demonstration.

[0044] This embodiment takes the 220kV renewable energy grid connection line as the research object. Based on the simulation model of the renewable energy grid connection line and the simulation model of the photovoltaic power generation unit, an experimental platform is built to simulate the mixed grid connection scenario of wind power and photovoltaic (the grid connection ratio can be adjusted in the range of 30%-70%).

[0045] The simulation system consists of three core parts: the new energy power station side (wind power cluster + photovoltaic unit stepped up by 35kV box transformer), the 220kV interconnection line (total length 80km), and the system side (220kV main grid). The photovoltaic power generation unit adopts PWM inverter topology and achieves maximum power point tracking through control strategy. The sampling frequency of the fault recording device is set to 2kHz to ensure complete capture of the fault transient process (including high-frequency oscillation components).

[0046] The experimental data covers three operating states: outside the station side, inside the station side, and outside the system side. It includes single-phase ground faults: A-phase ground (ag), B-phase ground (bg), C-phase ground (cg); two-phase short-circuit faults: AB-phase short circuit (ab), AC-phase short circuit (ac), BC-phase short circuit (bc); two-phase ground faults: AB-phase ground (abg), AC-phase ground (acg), BC-phase ground (bcg); and three-phase ground faults: ABC... The system simulates complex operating conditions such as "weak fault (fault current ≤ 1.5 times rated current)" and "high resistance fault (transition resistance ≥ 120Ω)" under the new energy grid connection scenario by adjusting the fault insertion angle (0-315° / 0-330°), transition resistance (10-200Ω / 20-150Ω), and fault distance (8-72km / 15-55km for tie lines). Finally, a dataset containing 21 types of labels (1 type of normal + 10 types of in-area faults + 10 types of out-of-area faults) is generated, totaling 100,000 samples.

[0047] Data Acquisition and Cleaning: Acquiring the three-phase voltage of the tie line ( , , ), three-phase current ( , , ), zero-order component ( , A total of 8 electrical quantity data points were collected. The 3σ criterion was used to remove impulse noise caused by electromagnetic interference. For any sampling point in the sample... ( It can be , , , , , , , Calculate the mean μ and standard deviation σ of a sample from a given path at a given time. If | If -μ|>3σ, then the sampling point is determined to be a noise point and replaced with the mean of adjacent points. For example, the sampling point of phase A current at a certain moment. (at this time correspond The value of ) is 1.8kA, the sample mean μ = 0.6kA, and the standard deviation σ = 0.3kA, satisfying | -μ|>3σ, replace it with the mean of adjacent points, 1.2kA. Linear interpolation is used to complete the data for two consecutive missing sampling points.

[0048] Sliding Time Window and Labeling: The time window length is set according to 1 / 2 cycle (corresponding to 40 sampling points at a 2kHz sampling frequency). The training set is truncated with a step size of 5 (e.g., 160 original samples generate 25 segments: [0-39], [5-44]...[115-154]), and the test set is truncated with a step size of 1 (160 samples generate 121 segments). Labeling is based on the "fault trigger time" of the fault recording device. For example, if the fault occurs at 15km on the tie line (within the zone) and the trigger time corresponds to the 40th sampling point, then the segment starting at [40-79] is labeled as "ag fault within the zone" (if the actual fault type is single-phase grounding).

[0049] Gram Angular Field (GAF) Conversion: The cleaned electrical quantity data is normalized to the [-1,1] interval, and a [40,40,2] dual-channel two-dimensional image is generated through polar coordinate mapping (e.g., voltage is mapped to Gramian Angular Summation Field (GASF), and current is mapped to Gramian Angular Difference Field (GADF)).

[0050] Based on the data in Table 1, with Obj = 0.6 × Acc + 0.4 × Recall as the objective function, the optimal hyperparameter combination was determined through Bayesian optimization after 25 iterations. The results are shown in Table 2. Table 1. Simulation parameters of the training dataset for new energy grid-connected interconnection lines.

[0051] Table 2 Optimal Hyperparameter Combinations

[0052] The training process employs the AdamW optimizer (combining the Adam optimizer and weight decay, with a weight decay coefficient of 1e-4) and the cross-entropy loss function. The training run is set to 40 epochs, with the learning rate decaying at 0.9 per epoch starting from the 20th epoch. Early stopping is enabled (patience=5, monitoring weak fault recall on the validation set); training stops when recall shows no improvement for 5 consecutive epochs. In the CBAM attention submodule, the channel attention unit (CAM) uses "GAP+GMP+2 fully connected layers (2→2 neurons)," and the spatial attention unit (SAM) uses "channel pooling+1×1 convolution (1 kernel)." All weights are initialized using a He normal distribution.

[0053] Based on the data in Table 3, the method of the present invention is compared with that of a single CNN model and a single LSTM model, and the results are shown in Table 4: Table 3 Simulation parameters of the test dataset for new energy grid-connected interconnection lines

[0054] Table 4. Comparison metrics between the method of this invention and single CNN models and single LSTM models.

[0055] The results show that although the performance of a single CNN / LSTM model is improved through data-driven approaches, it still lacks accuracy in identifying weak faults and high-resistance faults because it can only extract single-type features (local / temporal). The method of this invention extracts "local-temporal" features through CBAM-CNN-LSTM collaboration and optimizes hyperparameters using Bayesian methods, thereby improving the overall accuracy to 99.7%, the recall rate of weak faults to over 98%, and the inference time to ≤7ms, which meets the speed requirement of "≤20ms" for main protection of power systems.

[0056] Adaptability verification of new energy grid connection ratios: Grid connection ratios of 30% (wind power 15% + photovoltaic 15%), 50% (wind power 25% + photovoltaic 25%), and 70% (wind power 35% + photovoltaic 35%) were set respectively. Based on the data in Table 3, the model performance was tested. The results show that the overall accuracy rates were 99.6%, 99.7%, and 99.5% respectively, with fluctuations ≤0.2%, proving that the model can adapt to different new energy grid connection ratios and solve the problem of "poor generalization" in existing AI solutions.

[0057] Anti-interference performance verification: When 20dB Gaussian noise (simulating strong electromagnetic interference) was added to the test data, the overall accuracy of the method of this invention still reached 99.2%, and the weak fault recall rate was 97.8%, while the accuracy of the single CNN / LSTM model dropped to 82.3% and 83.5%, respectively, and the accuracy of the traditional protection method dropped to 58.7%. This is due to the noise suppression effect of GAF conversion and the enhancement of key features by CBAM attention, which greatly improves the anti-interference ability.

[0058] Taking the "ag fault in the area at 55km of the tie line (transition resistance 90Ω, fault insertion angle 180°, grid connection ratio 50%)" as an example, the model identification process is analyzed: Data preprocessing: 8 electrical quantity data were collected 0.08s before and after the fault (160 sampling points). After 3σ cleaning (noise-free) and step size 1 truncation, the segment from point 40 to 79 was labeled as "ag fault in the area". GAF conversion was used to generate a two-dimensional image of [40,40,2]. The GASF layer clearly shows the voltage transient trend, and the GADF layer highlights the current sudden change peak.

[0059] Feature extraction: After the image is input into the model, the CBAM attention submodule weights and enhances the "current mutation region" and the "zero-sequence component channel". The CNN layer extracts local features such as current peak and voltage drop, and outputs a [18,18,16] feature map. After being flattened into a 5184-dimensional vector by the Flatten layer, the LSTM layer captures the temporal correlation of "stable voltage before the fault - sudden current increase during the fault - transient oscillation after the fault", generating a 64-dimensional fusion feature.

[0060] Classification output: The fused features are mapped to 21 probabilities through a fully connected layer. The probability of "intra-area ag fault" reaches 99.8%. The model outputs the identification result within 7ms, triggering the circuit breaker tripping on the station side. The fault clearing time is ≤15ms, preventing the fault from spreading to the system side.

[0061] In summary, compared with traditional technologies and single deep learning solutions, this method significantly improves the identification accuracy under weak fault, high-impedance fault, and strong interference conditions, with an overall accuracy of ≥99.5% and a weak fault recall rate of ≥97.8%, meeting the "zero failure to operate and high reliability" requirements of relay protection in new power systems. It can flexibly adapt to the grid connection ratio of 30%-70% of new energy sources, has strong anti-interference capabilities, and maintains high accuracy even under 20dB noise, solving the problem of "poor generalization" in existing technologies. The single sample response time is ≤10ms (including 1ms data acquisition + 7ms model inference + 2ms tripping), which is far lower than the "≤20ms" standard of main protection, enabling rapid fault isolation and ensuring the safe and stable operation of the system.

[0062] It should be noted that the above 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 preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A method for power system relay protection fault identification based on Bayesian optimization, characterized in that, The method comprises the following steps: Collecting original electrical quantity data from a power grid fault recording system and converting the original electrical quantity data into labeled two-dimensional images; Based on the labeled two-dimensional images, a hybrid deep learning model skeleton that cooperatively extracts local features and time sequence correlations is constructed; Based on the labeled two-dimensional images, a Bayesian optimization algorithm is used to automatically optimize and train the constructed hybrid deep learning model skeleton, and a CBAM-CNN-LSTM model that can be used for actual fault identification is obtained; The CBAM-CNN-LSTM model is used for online fault identification of real-time collected electrical quantity data.

2. A Bayesian optimization based power system relaying fault identification method as claimed in claim 1, wherein, The method comprises the following steps: Collecting original electrical quantity data including three-phase voltage, three-phase current and zero sequence component from a power grid fault recording system; Performing data cleaning on the collected original electrical quantity data, using a fixed time window to intercept the cleaned data, and labeling the intercepted data, and establishing an association between the data segment and the multi-class operating state label according to the fault trigger time recorded by the fault recording device; Converting the labeled data into a Gram angle field, and dividing the samples converted by the Gram angle field into a training set, a validation set and a test set; The training set and the test set are intercepted with different step lengths.

3. A Bayesian optimization based power system relaying fault identification method as claimed in claim 2, wherein, The method comprises the following steps: Constructing a CBAM-CNN-LSTM basic architecture, setting a CNN local feature extraction module in the CBAM-CNN-LSTM basic architecture, and the CNN local feature extraction module includes a CBAM attention submodule, a two-dimensional convolution layer and a maximum pooling layer; inputting a two-dimensional image into the CBAM attention submodule to strengthen the features, and then sequentially passing through the two-dimensional convolution layer and the maximum pooling layer for feature extraction and dimension transformation.

4. The Bayesian optimization based power system relaying and fault identification method of claim 3, wherein, The method further comprises the following steps: Setting a CBAM attention submodule in the CBAM-CNN-LSTM basic architecture, and the CBAM attention submodule is composed of a channel attention unit and a spatial attention unit; the channel attention unit generates channel attention weights through global average pooling, global maximum pooling, a shared fully connected layer and an activation function operation, and multiplies the channel attention weights with the original feature map; the spatial attention unit generates spatial attention weights through channel dimension pooling, a convolution layer and an activation function operation, and multiplies the spatial attention weights with the channel weighted feature map, and finally outputs the weighted feature map to the subsequent convolution layer.

5. A Bayesian optimization based power system relaying fault identification method as claimed in claim 4, wherein, The method further comprises the following steps: Setting an LSTM time sequence modeling module in the CBAM-CNN-LSTM basic architecture, and the LSTM time sequence modeling module includes an LSTM layer and a Dropout layer, the input is a vector flattened from the CNN output feature map, the number of neurons of the LSTM layer is adjustable, and the Dropout layer is used to prevent overfitting.

6. A Bayesian optimization based power system relaying fault identification method as claimed in claim 5 wherein, The CBAM-CNN-LSTM model for actual fault identification is obtained by using a Bayesian optimization algorithm to automatically optimize and train the constructed mixed deep learning model skeleton based on the labeled two-dimensional image. Based on the constructed mixed deep learning model skeleton, the key hyperparameters to be optimized and the value range are determined. The optimization objective function is set, and the objective function takes into account the overall accuracy and weak fault identification ability of the model on the validation set.

7. A Bayesian optimization based power system relaying fault identification method as claimed in claim 6 wherein, The CBAM-CNN-LSTM model for actual fault identification is obtained by using a Bayesian optimization algorithm to automatically optimize and train the constructed mixed deep learning model skeleton based on the labeled two-dimensional image. Multiple iterations are performed, and the hyperparameter combination that maximizes the objective function value in the iteration process is output. According to the determined optimal hyperparameter configuration, the CBAM-CNN-LSTM model for actual fault identification is obtained.

8. A Bayesian optimization based power system relay protection fault identification system, applying the method of any one of claims 1-7, characterized in that, It comprises: The data image preprocessing module is used to collect original electrical quantity data from the power grid fault recording system, and convert the original electrical quantity data into labeled two-dimensional images. The mixed model skeleton construction module is used to construct a mixed deep learning model skeleton that cooperatively extracts local features and time sequence correlation based on the labeled two-dimensional image. The model hyperparameter optimization and training module is used to automatically optimize and train the constructed mixed deep learning model skeleton based on the labeled two-dimensional image using a Bayesian optimization algorithm, and obtain a CBAM-CNN-LSTM model that can be used for actual fault identification. The real-time fault online identification module is used to use the CBAM-CNN-LSTM model to perform online fault identification on the real-time collected electrical quantity data.

9. An electronic device, comprising: It comprises: A memory and a processor; The memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions, which realize the steps of the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores computer executable instructions, which are executed by the processor to realize the steps of the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Deep learning power distribution network fault classification detection method and system based on attention mechanism

    CN119179970A

  • Marine ranch power supply system line fault diagnosis method based on MS-2DResNet and ICBAM

    CN119475124A

  • Power distribution network single-phase earth fault identification method, electronic equipment, storage medium and program product

    CN121479523A

  • Improved deep learning model-based refrigeration unit fault detection method

    WO2025241215A1

Cited By

  • Proportional servo valve intelligent diagnosis method based on multi-modal feature fusion

    CN121901931A