Relay protection device fault rate prediction method based on CBAM-LSTM
Through the CBAM-LSTM-based method, the failure rate of the relay protection device is predicted, and the problem of inaccurate prediction of failure rate in the prior art is solved, the prediction accuracy and maintenance efficiency are improved, and the safe and stable operation of the power system is ensured.
Patent Information
- Application Number
- CN202411991016.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-05-02
AI Technical Summary
The prior art is difficult to effectively predict the failure rate of relay protection devices, resulting in insufficient maintenance and maintenance strategies, which affects the safe and stable operation of the power system.
Using a CBAM-LSTM-based method, by collecting temperature, humidity and vibration historical data, calculating the impact of environmental factors on the relay protection device, constructing a feature map, and using the CBAM module to extract feature information, combining the LSTM model for failure rate prediction.
It improves the accuracy of the failure rate prediction of relay protection devices, helps to adjust maintenance and maintenance plans, improves device utilization, reduces cost and losses, and ensures the safe and stable operation of the power system.
Smart Images

Figure CN119917802A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of relay protection device failure rate prediction, and in particular relates to a relay protection device failure rate prediction method based on CBAM-LSTM. Background Art
[0002] Relay protection plays a vital role in the power system safety protection system and plays an irreplaceable role in the safe and stable operation of the power system. Relay protection devices are composed of a large number of electronic components, which are easily affected by temperature and humidity during long-term operation, resulting in aging and damage of device plug-ins and components, unstable power supply, abnormal sampling of protection devices, abnormal output and device locking.
[0003] Taking into account the factors of temperature, humidity and vibration, the failure rate of the relay protection device is quickly predicted based on the neural network, and the maintenance and repair strategy of the relay protection device is adjusted in time to reduce the cost and loss of the relay protection device, which is of great significance to the safe and stable operation of the power station. Summary of the invention The technical problem of the present invention is: to propose a prediction method, calculate the correlation of the impact of environmental factors on the health of relay protection devices, and construct a feature map according to the correlation size, and use a CBAM-LSTM model to predict the failure rate of the relay protection device.
[0004] The technical solution of the present invention is a method for predicting the failure rate of a relay protection device based on CBAM-LSTM, comprising the following steps: S1: Collect the temperature, humidity and vibration history data of the environment around the relay protection device to form a data set D1; S2: Use the Pearson correlation coefficient to calculate the correlation value of the impact of environmental factors in the hydropower plant on the relay protection device in data set D1; S3: constructing a characteristic diagram of the relay protection device according to the correlation value of step S2; S4: Input the original feature map into the CBAM module, extract the temporal information and spatial information of the feature map, and obtain the optimized feature map; S5: Build an LSTM model and input the optimized feature map into the LSTM model for prediction.
[0005] Preferably, in step S2, the Pearson correlation coefficient is used, which includes the following sub-steps: 1) Calculate the mean of temperature, humidity and vibration historical data respectively; 2) Calculate the covariance of temperature, humidity and vibration data; 3) Calculate the standard deviation of temperature, humidity and vibration data; 4) Calculate the Pearson correlation coefficient.
[0006] Preferably, the calculation formula of the Pearson correlation coefficient is: ; In the formula, and represent the observed values of the variables, i and j Indicates the unit of count. and represent the means of the two variables.
[0007] Furthermore, in step S4, the CBAM module includes a channel attention module and a spatial attention module, which are used to enhance the performance of the convolutional neural network.
[0008] Preferably, the channel attention module comprises the following sub-steps: 1) Perform global maximum pooling and global average pooling operations on the input feature map, calculate the maximum eigenvalue and average eigenvalue on each channel, and generate two feature vectors containing the number of channels; 2) The two feature vectors are input into a shared fully connected layer to obtain two refined feature maps with average pooling and maximum pooling to extract important information; 3) Connect the two refined feature maps to obtain the feature map after feature extraction. The calculation formula is: ; In the formula, Represents the input feature map; The weight coefficient representing the importance of the feature map obtained through the average pooling layer; The weight coefficient that represents the importance of the feature map obtained through the maximum pooling layer.
[0009] Furthermore, in the spatial attention module, the feature map is processed separately by two pooling layers based on the spatial distribution of the second dimension, including the following sub-steps: 1) The feature map extracts implicit information from the feature map output in the previous link through the average pooling layer; 2) The maximum pooling layer extracts explicit information from the feature map output by the previous stage; 3) Use the two-dimensional convolution kernel to aggregate the extracted implicit information and explicit information, and combine the two channels into one channel. The calculation formula is: ; In the formula, represents the average operation, represents the maximum value operation, Represents the input feature map.
[0010] Preferably, step S5 includes inputting sample data of different time periods of the data set D1 into the LSTM model for prediction, including the following sub-steps: 1) Input the sample data of data set D1, the memory unit value of the hidden state calculated in the previous time step, the bias matrix and the weight matrix into the input gate, forget gate and output gate respectively; The calculation formula of the input gate is: ; In the formula, It represents the output of the input gate in the nth time period, where n represents the counting unit. and represents the input weight matrix, σ represents the sigmoid function, represents the input bias vector, represents the input of the nth time period, Represents the state of the previous time step; The calculation formula of the forget gate is: ; In the formula, represents the output of the forget gate in the nth time period, and The weight matrix representing the hidden state, Represents the bias vector of the forget gate; The calculation formula of the output gate is: ; In the formula, represents the output of the output gate in the nth time period, and represents the weighted evidence of the bias, represents the bias vector of the output gate; 2) Calculate the memory unit and the unit of the current time: The calculation formula of the memory unit is: ; In the formula, Represents the memory cell value of the nth time period, represents the activation function, and represents the weight value, represents the bias vector; The calculation formula for the current time unit is: ; In the formula, Indicates the current time unit value, Indicates the time unit value of the previous time period. Indicates fused multiplication calculation; 3) Calculate the input state and output: The calculation formula for the input state is: ; In the formula, Indicates the state of the input. The output of the output gate; The output calculation formula is: ; In the formula, represents the output of the model, represents the weight, Represents the bias vector.
[0011] Compared with the prior art, the beneficial effects of the present invention include: 1) The present invention uses the Pearson correlation coefficient to calculate the impact of temperature, humidity and vibration on the health of relay protection devices, uses CBAM to extract the temporal information and spatial information of the feature graph, and then predicts the failure rate of the relay protection device of the hydropower plant through the LSTM network, thereby improving the accuracy of the prediction of the failure rate of the relay protection device.
[0012] 2) The present invention comprehensively considers the factors affecting the relay protection device, and uses the Pearson correlation coefficient to calculate the coherence of the influence of each factor on the relay protection device, which helps to adjust the maintenance and overhaul plan, improve the utilization rate of the relay protection device, and reduce cost loss. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0014] Figure 1 This is a flowchart of the failure rate prediction of a relay protection device based on CBAM-LSTM in an embodiment of the present invention. DETAILED DESCRIPTION
[0015] like Figure 1 As shown, a method for predicting the failure rate of a relay protection device based on CBAM-LSTM includes the following steps: S1: Collect the temperature, humidity and vibration history data of the environment around the relay protection device to form a data set D1; The life of the relay protection device of the hydropower station is affected by the temperature, humidity and vibration factors at the installation site. The historical data of temperature, humidity and vibration intensity are divided into n time periods in a time series and used to predict the value of the next time period.
[0016] S2: Use the Pearson correlation coefficient to calculate the correlation value of the impact of environmental factors in the hydropower plant on the relay protection device in data set D1; In step S2, the Pearson correlation coefficient is used, which includes the following sub-steps: 1) Calculate the mean of temperature, humidity and vibration historical data respectively; 2) Calculate the covariance of temperature, humidity and vibration data; 3) Calculate the standard deviation of temperature, humidity and vibration data using the following formula: 4) Calculate the Pearson correlation coefficient.
[0017] The calculation formula of Pearson correlation coefficient is: ; In the formula, and represent the observed values of the variables, i Indicates the unit of count. and represent the means of the two variables.
[0018] The Pearson correlation coefficient is a linear correlation coefficient used to reflect the degree of linear correlation between variable X and variable Y. It is between -1 and 1. The larger the absolute value, the stronger the correlation.
[0019] S3: constructing a characteristic diagram of the relay protection device according to the correlation value of step S2; S4: Input the original feature map into the CBAM module, extract the temporal information and spatial information of the feature map, and obtain the optimized feature map; In step S4, the CBAM module includes a channel attention module CAM and a spatial attention module SAM, which respectively focus on the channel relationship and spatial position relationship of the input feature map to enhance the performance of the convolutional neural network.
[0020] The channel attention module CAM uses global average pooling and global maximum pooling to extract the channel information of the feature map, and learns the weights between different channels through a shared fully connected layer or convolutional layer, and then multiplies the learned weights with the channels of the original feature map to achieve weighted channel attention.
[0021] The spatial attention module SAM performs average pooling and maximum pooling on the input feature map in the spatial dimension, concatenates the two pooling results, and learns the spatial weights through the convolutional layer. The learned spatial weights are then multiplied by the spatial position of the original feature map to achieve weighted spatial attention.
[0022] The feature map passes through the CBAM module, and then passes through the channel attention module CAM and the spatial domain module SAM in turn to extract the sequence node information and spatial position information. At the same time, the detail information in the initial feature map is not discarded. The feature map obtained each time is aggregated with the initial input feature map, and the weight of the detail information is retained. The calculation formula is: ; In the formula, Represents feature aggregation operation; Represents the channel attention feature map; represents the spatial attention feature map, represents the spatial domain feature map, represents the channel attention operation, Represents spatial domain operations.
[0023] The channel attention module includes the following sub-steps: 1) Perform global maximum pooling and global average pooling operations on the input feature map, calculate the maximum eigenvalue and average eigenvalue on each channel, and generate two feature vectors containing the number of channels; 2) The two feature vectors are respectively input into a shared fully connected layer to obtain two refined feature maps with average pooling and maximum pooling to extract important information. The attribute expression of the shared fully connected layer is: ; In the formula, represents the output layer weight; is the hidden layer weight; C is the dimension of the input feature; r is the output feature dimension.
[0024] 3) Connect the two refined feature maps to obtain the feature map after feature extraction. The calculation formula is: ; In the formula, Represents the input feature map; The weight coefficient representing the importance of the feature map obtained through the average pooling layer; The weight coefficient that represents the importance of the feature map obtained through the maximum pooling layer.
[0025] In the spatial attention module, the feature map is processed separately by two pooling layers based on the spatial distribution of the second dimension, which includes the following sub-steps: 1) The feature map extracts implicit information from the feature map output in the previous link through the average pooling layer; 2) The maximum pooling layer extracts explicit information from the feature map output by the previous stage; 3) Use the two-dimensional convolution kernel to aggregate the extracted implicit information and explicit information, and combine the two channels into one channel. The calculation formula is: ; In the formula, represents the average operation, represents the maximum value operation, Represents the input feature map.
[0026] S5: Build an LSTM model and input the optimized feature map into the LSTM model for prediction.
[0027] Step S5 includes inputting sample data of different time periods of the data set D1 into the LSTM model for prediction, including the following sub-steps: 1) Input the sample data of data set D1, the memory unit value of the hidden state calculated in the previous time step, the bias matrix and the weight matrix into the input gate respectively , Forget Gate and output gate ; The input gate uses the input gate to decide which of the input information at the current time step should be added to the memory cell. LSTM uses the sigmoid and tanh functions to process the current input, generate a vector of new information, and add it to the memory cell state. The calculation formula is: ; In the formula, It represents the output of the input gate in the nth time period, where n represents the counting unit. and represents the input weight matrix, σ represents the sigmoid function, represents the input bias vector, represents the input of the nth time period, Represents the state of the previous time step; The forget gate receives the current input and the hidden state of the previous time step, and generates a vector between 0 and 1 through the sigmoid function. The calculation formula is: ; In the formula, represents the output of the forget gate in the nth time period, and The weight matrix representing the hidden state, Represents the bias vector of the forget gate; After being processed by the output gate, the information of the memory cell state is selectively output to the hidden state and used as the input of the next time step. The calculation formula is: ; In the formula, represents the output of the output gate in the nth time period, and represents the weighted evidence of the bias, represents the bias vector of the output gate; 2) Calculate the memory unit and the unit of the current time: After the memory unit is processed by the forget gate and the input gate, the memory unit state will be updated, and the calculation formula is: ; In the formula, Represents the memory cell value of the nth time period, represents the activation function, and represents the weight value, represents the bias vector; The calculation formula for the current time unit is: ; In the formula, Indicates the current time unit value, Indicates the time unit value of the previous time period. Indicates fused multiplication calculation; 3) Calculate the input state and output: The calculation formula for the input state is: ; In the formula, Indicates the state of the input. The output of the output gate; The output calculation formula is: ; In the formula, represents the output of the model, represents the weight, Represents the bias vector.
[0028] The above embodiments are only preferred technical solutions of the present invention and should not be regarded as limitations of the present invention. The protection scope of the present invention shall be the technical solutions recorded in the claims, including equivalent replacement solutions of the technical features in the technical solutions recorded in the claims. That is, equivalent replacement improvements within this scope are also within the protection scope of the present invention.
Claims
1. A method for predicting the failure rate of a relay protection device based on CBAM-LSTM, characterized in that: The following steps are involved: S1: Collect the temperature, humidity and vibration history data of the environment around the relay protection device to form a data set D1; S2: Use the Pearson correlation coefficient to calculate the correlation value of the impact of environmental factors in the hydropower plant on the relay protection device in data set D1; S3: constructing a characteristic diagram of the relay protection device according to the correlation value of step S2; S4: Input the original feature map into the CBAM module, extract the temporal information and spatial information of the feature map, and obtain the optimized feature map; S5: Build an LSTM model and input the optimized feature map into the LSTM model for prediction.
2. According to the CBAM-LSTM-based relay protection device failure rate prediction method of claim 1, it is characterized in that: In step S2, the use of the Pearson correlation coefficient includes the following sub-steps: 1) Calculate the mean of temperature, humidity and vibration historical data respectively; 2) Calculate the covariance of temperature, humidity and vibration data; 3) Calculate the standard deviation of temperature, humidity and vibration data; 4) Calculate the Pearson correlation coefficient.
3. According to the CBAM-LSTM-based relay protection device failure rate prediction method of claim 2, it is characterized in that: The calculation formula of the Pearson correlation coefficient is: ; In the formula, and represent the observed values of the variables, i and j Indicates the counting unit. and represent the means of the two variables.
4. According to the CBAM-LSTM-based relay protection device failure rate prediction method of claim 1, it is characterized in that: In step S4, the CBAM module includes a channel attention module and a spatial attention module, which are used to enhance the performance of the convolutional neural network.
5. According to claim 4, a method for predicting the failure rate of a relay protection device based on CBAM-LSTM is characterized in that: The channel attention module includes the following sub-steps: 1) Perform global maximum pooling and global average pooling operations on the input feature map, calculate the maximum eigenvalue and average eigenvalue on each channel, and generate two feature vectors containing the number of channels; 2) The two feature vectors are input into a shared fully connected layer to obtain two refined feature maps with average pooling and maximum pooling to extract important information; 3) Connect the two refined feature maps to obtain the feature map after feature extraction. The calculation formula is: ; In the formula, Represents the input feature map; The weight coefficient representing the importance of the feature map obtained through the average pooling layer; The weight coefficient that represents the importance of the feature map obtained through the maximum pooling layer.
6. According to the CBAM-LSTM-based relay protection device failure rate prediction method of claim 5, it is characterized in that: The spatial attention module, in which the feature map is processed by two pooling layers based on the spatial distribution of the second dimension, comprises the following sub-steps: 1) The feature map extracts implicit information from the feature map output in the previous link through the average pooling layer; 2) The maximum pooling layer extracts explicit information from the feature map output by the previous stage; 3) Use the two-dimensional convolution kernel to aggregate the extracted implicit information and explicit information, and combine the two channels into one channel. The calculation formula is: ; In the formula, represents the average operation, represents the maximum value operation, Represents the input feature map.
7. According to the CBAM-LSTM-based relay protection device failure rate prediction method of claim 1, it is characterized in that: The step S5 includes inputting sample data of different time periods of the data set D1 into the LSTM model for prediction, including the following sub-steps: 1) Input the sample data of data set D1, the memory unit value of the hidden state calculated in the previous time step, the bias matrix and the weight matrix into the input gate, forget gate and output gate respectively; The calculation formula of the input gate is: ; In the formula, It represents the output of the input gate in the nth time period, where n represents the counting unit. and represents the input weight matrix, σ represents the sigmoid function, represents the input bias vector, represents the input of the nth time period, Represents the state of the previous time step; The calculation formula of the forget gate is: ; In the formula, represents the output of the forget gate in the nth time period, and The weight matrix representing the hidden state, Represents the bias vector of the forget gate; The calculation formula of the output gate is: ; In the formula, represents the output of the output gate in the nth time period, and represents the weighted evidence of the bias, represents the bias vector of the output gate; 2) Calculate the memory unit and the unit of the current time: The calculation formula of the memory unit is: ; In the formula, Represents the memory cell value of the nth time period, represents the activation function, and represents the weight value, represents the bias vector; The calculation formula for the current time unit is: ; In the formula, Indicates the current time unit value, Indicates the time unit value of the previous time period. represents the output of the forget gate, represents fused multiplication calculation, represents the output of the input gate; 3) Calculate the input state and output: The calculation formula for the input state is: ; In the formula, Indicates the state of the input. represents the output of the output gate; The output calculation formula is: ; In the formula, represents the output of the model, represents the weight, Represents the bias vector.