Relay protection device wave recording file analysis method based on multi-dimensional feature extraction and intelligent analysis
Through the method of multi-dimensional feature extraction and intelligent analysis, the problems of differences in recording file formats and reliance on manual experience are solved, and efficient integration of recording files and improvement of the accuracy and real-time performance of fault diagnosis are achieved.
Patent Information
- Application Number
- CN202510770961.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-10
- Publication Date
- 2025-10-17
AI Technical Summary
Existing technologies make it difficult to integrate recording file formats from different manufacturers across platforms, and fault diagnosis relies on manual experience, resulting in low accuracy and real-time performance of power system fault diagnosis.
Multi-dimensional feature extraction and intelligent analysis methods are adopted, including regular expressions to identify recording file fields, the use of isolation forest algorithm to complete missing data, the construction of Transformer model for fault diagnosis, and the combination of historical cases to assist diagnosis.
It achieves efficient integration of cross-platform recording files and comprehensive reflection of fault characteristics, improves the accuracy and real-time performance of fault diagnosis, and meets the requirements of smart grids.
Smart Images

Figure CN120804037A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of power system relay protection, and particularly relates to a relay protection device recording wave file analysis method based on multi-dimensional feature extraction and intelligent analysis. BACKGROUND
[0002] The recording wave file of the fault of the relay protection device records important parameters such as current, voltage and switch quantity before and after the fault of the power system, and is core data for analyzing fault characteristics and ensuring the correctness of protection action. However, the recording wave file formats of different manufacturers are quite different, and the existing technology cannot integrate data across platforms. The existing method usually only extracts time domain or frequency domain features when performing fault analysis, the features are single, and it is difficult to fully reflect the fault characteristics. And when performing fault diagnosis, it often relies on artificial experience, which is time-consuming and low in accuracy, and cannot meet the real-time requirements of the smart grid.
[0003] In view of the above problems, the application provides an intelligent analysis method combining multi-modal data processing and dynamic feature fusion, which solves the problems of low accuracy and low real-time performance of the existing technology in power system fault diagnosis. SUMMARY
[0004] The application is to solve the problems of low accuracy and low real-time performance of the existing method in power system fault diagnosis, and proposes a relay protection device recording wave file analysis method based on multi-dimensional feature extraction and intelligent analysis.
[0005] A relay protection device recording wave file analysis method based on multi-dimensional feature extraction and intelligent analysis, comprising the following steps: Step one, obtaining the historical recording wave file of the substation relay protection device, preprocessing the recording wave file to obtain the preprocessed recording wave file.
[0006] Step one, collecting the fault recording wave file of the relay protection device, using the regular expression to identify the field boundary and data type of the recording wave file, and analyzing the recording wave file information.
[0007] Step two, using the isolation forest algorithm to detect the data segment of the recording wave file, marking the data segment with missing parameters, and manually completing it.
[0008] Step three, standardization processing: converting the timestamp of the recording wave file into a standard format, and standardizing the manufacturer's private device identifier.
[0009] Step four, using the sliding window filtering method to identify the noise interference of the recording wave file signal after standardization processing, eliminating invalid data segments, and obtaining the recording wave file with the invalid data segments removed.
[0010] Step one five, the current and voltage signals of the recording file with invalid data segments removed are subjected to Z-score standardization processing to obtain the processed recording file.
[0011] Step two, time domain, frequency domain and spatial correlation features of the pre-processed recording file are extracted.
[0012] Step two one, time domain features are extracted: the CUSUM algorithm is used to detect amplitude mutation of the signal, the mutation starting point and the mutation termination point are marked, and the time stamp difference between the mutation starting point and the mutation termination point is calculated to obtain the fault duration.
[0013] Step two two, frequency domain features are extracted: the sampling frequency, resolution and Hanning window function are set, and the 2-15th harmonic is extracted by fast Fourier transform; the high-frequency transient component energy proportion is extracted by Morlet wavelet base function.
[0014] Step two three, spatial correlation features are extracted: the substation topology graph is obtained, the adjacency matrix A is obtained according to the connection relationship of electrical equipment in the topology graph, each electrical equipment in the topology graph is a node, and the connection between the equipment is 1, and the non-connection is 0, so as to obtain the adjacency matrix A, and a fault propagation probability model is constructed based on the adjacency matrix A: , wherein, is the electrical distance between the equipment and , is calculated according to the equipment impedance parameter, and are empirical parameters, is set to 0.1, is set to 5.
[0015] Step three, the feature weight is calculated according to the entropy weight method , wherein the information entropy , is the information entropy of the feature , n is the sample number, m is the feature number, is the normalized value of the th sample in the th feature.
[0016] According to the calculated weight, the time domain, frequency domain and spatial correlation features described in step two are fused to obtain the fusion features.
[0017] Step four, a Transformer model is constructed, the model is pre-trained using a general fault sample library, and a Transformer pre-training model is obtained.
[0018] The Transformer model comprises an input layer, a position embedding layer, a LayerNorm layer, a ReLU activation function layer, a first layer encoder, a second layer encoder, a third layer encoder, a fourth layer encoder, a fifth layer encoder, a sixth layer encoder, a full connection layer, a Softmax layer, and an output layer.
[0019] The input of the Transformer model is connected to the input of the position embedding layer, the output of the position embedding layer is connected to the input of the LayerNorm layer, the output of the LayerNorm layer is connected to the input of the ReLU activation function layer, the output of the ReLU activation function layer is connected to the input of the first layer encoder, the output of the first layer encoder is connected to the input of the second layer encoder, the output of the second layer encoder is connected to the input of the third layer encoder, the output of the third layer encoder is connected to the input of the fourth layer encoder, the output of the fourth layer encoder is connected to the input of the fifth layer encoder, the output of the fifth layer encoder is connected to the input of the sixth layer encoder, the output of the sixth layer encoder is connected to the input of the full connection layer, the output of the full connection layer is connected to the input of the Softmax layer, and the output of the Softmax layer is the output of the Transformer model.
[0020] The first layer to the sixth layer encoder have the same structure, and the internal structure of the encoder is as follows: The input of the encoder is connected to the output of the multi-head self-attention layer, the output of the multi-head self-attention layer is connected to the input of the encoder in a residual manner, the result after the residual connection is input to the feedforward network, the output of the feedforward network is connected to the output of the multi-head self-attention layer in a residual manner, and the result after the residual connection is the output of the encoder.
[0021] The feedforward network comprises a first full connection layer and a second full connection layer, the input of the feedforward network is the input of the first full connection layer, the output of the first full connection layer is connected to the input of the second full connection layer, the output of the second full connection layer is the output of the feedforward network, and the activation function used by the feedforward network is a GeLU function.
[0022] Step five, freezing the first layer to the third layer encoder of the Transformer pre-training model, training the non-frozen layer of the Transformer pre-training model using the pre-processed wave recording file in step one, optimizing the model parameters through the Adam algorithm, and obtaining the trained Transformer model.
[0023] Step 6. Obtain the substation real-time recording file and perform the operations from step 1 to step 3. Input the trained Transformer model described in step 5 and output the fault type probability distribution and confidence level. If the confidence level is ≥ 95%, a fault exists in the substation and the specific fault type is output. If the confidence level is < 95%, calculate the cosine similarity between the fused feature vector and the historical case, find the three cases with the highest similarity, and weight the fault probability distributions of the three cases with the classification results of the Transformer model. The weight of the Transformer model is 0.7, and the weight of each of the three cases is 0.1. Output the fault type probability distribution.
[0024] Step 7: The fault type determined in step 6 is converted into a relay protection device fault diagnosis report.
[0025] The beneficial effects of the present invention are: This invention can identify recording files from different manufacturers, achieves high data integration, extracts time-domain, frequency-domain, and spatial correlation features from recording files for analysis, and comprehensively reflects their characteristics. It constructs a Transformer model for fault diagnosis and uses historical fault cases to aid diagnosis. This method achieves high accuracy and real-time performance, meeting the requirements of smart grids. This addresses the low accuracy and real-time performance issues of existing technologies in power system fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a diagram of the architecture of the present invention; Figure 2 This is the flow chart of the multi-dimensional feature fusion algorithm; Figure 3 Schematic diagram of fault diagnosis model training. DETAILED DESCRIPTION Specific implementation method one: This embodiment is a method for parsing a recording file of a relay protection device based on multi-dimensional feature extraction and intelligent analysis, which is characterized by comprising the following steps: Step 1: Obtain a historical recording file of the substation relay protection device, preprocess the recording file, and obtain a preprocessed recording file.
[0028] Step 11: Collect relay protection device fault recording files. For non-standard fields in recording files from different manufacturers, such as device identifiers and sampling rate differences, regular expressions are used to match key fields, identify field boundaries and data types in the recording files, and parse the recording file information. This method is compatible with international standard formats such as COMTRADE and IEC60255-24, and also supports proprietary formats from 18 major equipment manufacturers.
[0029] Step one two, use the isolation forest algorithm, set the number of sub-trees to 100, the threshold to 0.65, detect the data segment of the recording file, mark the missing fields of the parameters, and manually complete them.
[0030] Step one three, standardization processing: use the formula Calibrate the timestamp of the recording file, where represents the timestamp, represents the frequency, and converts the timestamp into the ISO8601 standard format.
[0031] Standardize the manufacturer's private device identifier to extract device attributes and ensure cross-platform integration.
[0032] When mixed formats of time stamps appear, first detect the minimum time unit accuracy, complete the missing bits of low-precision time stamps through linear interpolation, and unify the output to the ISO8601 standard format.
[0033] Step one four, use the sliding window filtering method to identify noise interference in the recording file signal after standardization processing, set the window length to 100 ms, the threshold to 3 times the historical normal data variance, and remove invalid data segments to obtain the recording file with invalid data segments removed.
[0034] Step one five, Z-score standardization processing of the current and voltage signals of the recording file with invalid data segments removed, the formula for Z-score standardization processing is , is the channel mean, is the standard deviation, and the processed recording file is obtained.
[0035] Step two, extract the time domain, frequency domain and spatial correlation features of the pre-processed recording file.
[0036] Step two one, extract the time domain features: use the CUSUM algorithm, set the threshold , is the rated current, detect the amplitude mutation of the signal, mark the mutation starting point and mutation termination point, calculate the timestamp difference between the mutation starting point and the mutation termination point, and obtain the fault duration.
[0037] Step two two, extract the frequency domain features: set the sampling frequency to 10 kHz and the resolution to 1 Hz, set the Hanning window function, and extract the 2-15th harmonic through fast Fourier transform. Use the Morlet wavelet basis function, set the scale parameter in the range of 1-50, and the center frequency to 0.8 Hz to extract the high-frequency transient component energy proportion.
[0038] Step two three, extract spatial correlation features: obtain the substation topology graph, and obtain the adjacency matrix A according to the connection relationship of electrical equipment in the topology graph. Each electrical equipment in the topology graph is a node, and the connection between the equipment is 1, and the disconnection is 0, so as to obtain the adjacency matrix A. The fault propagation probability model is constructed based on the adjacency matrix A: , Among them, is the electrical distance between the equipment and , which is calculated according to the equipment impedance parameter, and are empirical parameters, set to 0.1, set to 5.
[0039] Step three, fuse the time domain, frequency domain and spatial correlation features in step two to obtain the fusion features; According to the entropy weight method, the feature weight is calculated , wherein the information entropy , is the information entropy of the feature , n is the sample number, and m is the feature number, is the normalized value of the th sample in the th feature; According to the calculation result, the feature fusion weight distribution is obtained: the fault current feature is 40%±5%, the spatial correlation feature is 30%±3%, the frequency domain feature is 20%±2%, and the switch quantity feature is 10%±1%.
[0040] Step four, construct the Transformer model, and pre-train the model using the general fault sample library to obtain the Transformer pre-training model.
[0041] The Transformer model includes an input layer, a position embedding layer, a LayerNorm layer, a ReLU activation function layer, a first layer encoder, a second layer encoder, a third layer encoder, a fourth layer encoder, a fifth layer encoder, a sixth layer encoder, a full connection layer, a Softmax layer, and an output layer.
[0042] The input layer of the Transformer model is connected to the input of the position embedding layer, the output of the position embedding layer is connected to the input of the LayerNorm layer, the output of the LayerNorm layer is connected to the input of the ReLU activation function layer, the output of the ReLU activation function layer is connected to the input of the first layer encoder, the output of the first layer encoder is connected to the input of the second layer encoder, the output of the second layer encoder is connected to the input of the third layer encoder, the output of the third layer encoder is connected to the input of the fourth layer encoder, the output of the fourth layer encoder is connected to the input of the fifth layer encoder, the output of the fifth layer encoder is connected to the input of the sixth layer encoder, the output of the sixth layer encoder is connected to the input of the fully connected layer, the output of the fully connected layer is connected to the input of the Softmax layer, and the output of the Softmax layer is the output of the Transformer model.
[0043] The structures of the first layer to the sixth layer encoder are the same, and the internal structure of the encoder is as follows: The input of the encoder is connected to the multi-head self-attention layer, the output of the multi-head self-attention layer is connected to the input of the encoder in a residual manner, the result after the residual connection is input to the feedforward network layer, the output of the feedforward network layer is connected to the output of the multi-head self-attention layer in a residual manner, and the result after the residual connection is the output of the encoder.
[0044] The feedforward network includes a first fully connected layer and a second fully connected layer, the input of the feedforward network is the input of the first fully connected layer, the output of the first fully connected layer is connected to the input of the second fully connected layer, the output of the second fully connected layer is the output of the feedforward network, and the activation function used by the feedforward network is the GeLU function.
[0045] Step five, freeze the first layer to the third layer encoder of the Transformer pre-training model, use the pre-processed wave recording file in step one to train the non-frozen layer of the Transformer pre-training model, optimize the model parameters through the Adam algorithm, and obtain the trained Transformer model.
[0046] Step six, obtain the real-time wave recording file of the substation, perform the operations of steps one to three, input the trained Transformer model in step five, and output the fault type probability distribution and the confidence. If the confidence is greater than or equal to 95%, the substation has a fault and outputs the specific fault type; if the confidence is less than 95%, calculate the cosine similarity of the fusion feature vector and the historical cases, find the three cases with the highest similarity, weight the fault probability distribution of the three cases and the classification result of the Transformer model, and output the fault type probability distribution.
[0047] Step seven, form a relay protection device fault diagnosis report according to the fault type determined in step six.
[0048] Example One: In order to verify the beneficial effects of the present application, the method of the present application is used to diagnose faults in a 500kV intelligent substation in Heilongjiang, and the following table is a comparison of the test results of the present application and the traditional method:
Claims
1. A method for parsing a recording file of a relay protection device based on multi-dimensional feature extraction and intelligent analysis, characterized in that: The following steps are involved: Step 1: Obtain a historical recording file of the substation relay protection device, pre-process the recording file, and obtain a pre-processed recording file; Step 2: Extract the time domain, frequency domain and spatial correlation features of the pre-processed recording file; Step 3: Fusing the time domain, frequency domain and spatial correlation features described in step 2 to obtain fused features; Step 4: Build a Transformer model and pre-train the model using a common fault sample library to obtain a Transformer pre-trained model. Step 5: Freeze the encoders of the first to third layers of the Transformer pre-trained model in Step 4, use the pre-processed recording file in Step 1 to train the non-frozen layers of the Transformer pre-trained model, and optimize the model parameters using the Adam algorithm to obtain a trained Transformer model. Step 6: Obtain the substation real-time recording file and perform the operations from Steps 1 to 3. Input the trained Transformer model described in Step 5 and output the fault type probability distribution and confidence level. If the confidence level is ≥ 95%, a fault exists in the substation and the specific fault type is output. If the confidence level is < 95%, calculate the cosine similarity between the fused feature vector and the historical case, find the three cases with the highest similarity, weight the fault probability distributions of the three cases with the classification results of the Transformer model, and output the fault type probability distribution. Step 7: The fault type determined in step 6 is converted into a relay protection device fault diagnosis report.
2. The method for analyzing a recording file of a relay protection device based on multidimensional feature extraction and intelligent analysis according to claim 1, characterized in that: The specific process of step one is as follows: Step 11: Collect the fault recording file of the relay protection device, use regular expressions to identify the field boundaries and data types of the recording file, and parse the recording file information; Step 1 and 2: Use the isolation forest algorithm to detect the data segments of the recording file, mark the data segments with missing parameters, and manually complete them; Step 13: Standardization: Convert the timestamp of the recording file to a standard format and standardize the manufacturer's private device identifier; Step 14: using a sliding window filtering method to identify noise interference in the normalized recording file signal, eliminating invalid data segments, and obtaining a recording file from which the invalid data segments have been eliminated; Step 15: Perform Z-score normalization on the current and voltage signals of the recording file after invalid data segments are removed to obtain a processed recording file.
3. The method for analyzing a recording file of a relay protection device based on multi-dimensional feature extraction and intelligent analysis according to claim 1, characterized in that: The specific process of step 2 is as follows: Step 21: Extract time domain features: Use the CUSUM algorithm to detect signal amplitude mutations, mark the mutation start and end points, calculate the timestamp difference between the mutation start and end points, and obtain the fault duration; Step 22: Extract frequency domain features: Set the sampling frequency, resolution, and Hanning window function, extract the 2nd to 15th harmonics through fast Fourier transform, and extract the energy proportion of high-frequency transient components through Morlet wavelet basis function. Step 2 and 3: Extract spatial correlation features: Obtain the substation topology map and obtain the adjacency matrix A based on the connection relationship of the electrical equipment in the topology map. Each electrical equipment in the topology map is a node. If the equipment is connected, it is 1, and if it is not connected, it is 0. Based on the adjacency matrix A, a fault propagation probability model is constructed: , in, For devices and The electrical distance, and is an empirical parameter, Set to 0.1, Set to 5.
4. The method for analyzing a recording file of a relay protection device based on multi-dimensional feature extraction and intelligent analysis according to claim 1, characterized in that: The specific process of step three is as follows: Calculate feature weights based on entropy weight method , where information entropy , Features The information entropy of n is the number of samples, m is the number of features, For the The sample in The normalized value of the feature, The features include time domain, frequency domain and spatial correlation features; The time domain, frequency domain and spatial correlation features are fused according to the calculated weights to obtain fused features.
5. The method for analyzing a recording file of a relay protection device based on multi-dimensional feature extraction and intelligent analysis according to claim 1, characterized in that: The Transformer model described in step 4 includes an input layer, a position embedding layer, a LayerNorm layer, a ReLU activation function layer, a first encoder layer, a second encoder layer, a third encoder layer, a fourth encoder layer, a fifth encoder layer, a sixth encoder layer, a fully connected layer, a Softmax layer, and an output layer; The input layer of the Transformer model is connected to the input of the position embedding layer, the output of the position embedding layer is connected to the input of the LayerNorm layer, the output of the LayerNorm layer is connected to the input of the ReLU activation function layer, the output of the ReLU activation function layer is connected to the input of the first layer encoder, the output of the first layer encoder is connected to the input of the second layer encoder, the output of the second layer encoder is connected to the input of the third layer encoder, the output of the third layer encoder is connected to the input of the fourth layer encoder, the output of the fourth layer encoder is connected to the input of the fifth layer encoder, the output of the fifth layer encoder is connected to the input of the sixth layer encoder, the output of the sixth layer encoder is connected to the input of the fully connected layer, the output of the fully connected layer is connected to the input of the Softmax layer, and the output of the Softmax layer is the output of the Transformer model; The structures of the encoders from the first to the sixth layers are the same, and the internal structure of the encoder is: The input of the encoder is connected to the multi-head self-attention layer, the output of the multi-head self-attention layer is residually connected to the input of the encoder, and the result of the residual connection is input to the feedforward network. The output of the feedforward network is residually connected to the output of the multi-head self-attention layer, and the result of the residual connection is used as the output of the encoder; Among them, the feedforward network includes a first fully connected layer and a second fully connected layer. The input of the feedforward network is the input of the first fully connected layer, the output of the first fully connected layer is connected to the input of the second fully connected layer, and the output of the second fully connected layer is the output of the feedforward network. The activation function used by the feedforward network is the GeLU function.
6. The method for analyzing a recording file of a relay protection device based on multi-dimensional feature extraction and intelligent analysis according to claim 1, characterized in that: In step 6, the failure probability distributions of the three cases are weighted with the classification results of the Transformer model. The weight of the Transformer model is 0.7, and the weight of each of the three cases is 0.1.
Citation Information
Cited By
Secondary equipment hidden danger mining method and system based on wave recording file and monitoring data
CN121144833A
Secondary equipment hidden danger mining method and system based on recording wave file and monitoring data
CN121144833B