An Elman network-based power equipment fault diagnosis method and system, and a medium
By combining local mean decomposition and energy entropy for feature extraction, and optimizing the Elman network with an improved beetle whisker algorithm, the shortcomings of traditional power equipment fault diagnosis methods in terms of adaptability and accuracy are solved, and efficient fault diagnosis is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- STATE GRID JIBEI ELECTRIC POWER COMPANY LIMITED CHENGDE POWER SUPPLY
- Filing Date
- 2022-12-29
- Publication Date
- 2026-06-26
AI Technical Summary
Traditional power equipment fault diagnosis methods have limited detection efficiency in a wide range of situations, lack adaptability, and are insufficient in processing unstructured data.
Feature vectors are extracted by combining local mean decomposition and energy entropy, and the Elman network is optimized by improving the beetle whisker algorithm to enhance the adaptability and accuracy of the diagnostic model.
It significantly improves the accuracy and speed of fault diagnosis for power equipment, effectively distinguishes fault types, adapts to complex multi-component signal analysis, and reduces noise disturbance.
Smart Images

Figure CN116167277B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power equipment fault diagnosis technology, specifically to a power equipment fault diagnosis method, system, and medium based on Elman networks. Background Technology
[0002] Power equipment is a critical component of the power system, encompassing a wide variety and a vast number of devices. Numerous sensors are used for equipment condition monitoring, collecting data that forms a massive dataset, including a significant amount of unstructured data. Extracting information related to equipment status from this accumulated data to determine the presence of faults or to predict potential faults is crucial for ensuring the safe and stable operation of the power grid.
[0003] Traditionally, fault diagnosis methods for power equipment are mainly based on mathematical models. While these methods are highly accurate and targeted, their fault detection efficiency is limited when dealing with a wider range of situations, and they lack adaptability to real-world conditions. Summary of the Invention
[0004] This invention provides a power equipment fault diagnosis method and system based on Elman networks. By using local mean decomposition and energy entropy to extract feature vectors from power grid operation data, the adaptability of the diagnostic model is improved. The accuracy of the model is improved by optimizing the Elman network through an improved beetle whisker algorithm.
[0005] The solution of this invention to the above-mentioned technical problems is as follows: A method for fault diagnosis of power equipment based on Elman networks, comprising the following steps:
[0006] Obtain grid operation data of transformers in the target power equipment and normalize the grid operation data;
[0007] Feature vectors are constructed based on the normalized power grid operation data;
[0008] The feature vectors are divided into training and test sets;
[0009] The training set is input into the Elman network for training. Based on the training error, the parameters of the Elman network are optimized by improving the beetle beard algorithm to obtain the Elman network fault diagnosis model.
[0010] The test set is input into the Elman network fault diagnosis model for fault diagnosis.
[0011] Preferably, the method further includes, when the test set is input into the Elman network fault diagnosis model for fault diagnosis, and the error rate of the obtained diagnosis result is greater than a set threshold THr, then the training set is input into the Elman network for training. Based on the training error, the parameters of the Elman network fault diagnosis model are optimized using an improved beetle whisker algorithm until the diagnosis error rate of the Elman network fault diagnosis model is less than the set threshold THr. The set threshold THr is determined empirically.
[0012] Preferably, the step of constructing feature vectors based on the normalized power grid operation data includes:
[0013] The normalized power grid operation data is decomposed and dimension-reduced using the local mean decomposition method to obtain the product function components. The calculation formula is shown below:
[0014]
[0015] In the formula, v is the normalized data; PF i It is the i-th product function component; q is the total number of product function components obtained from the final decomposition; r q It is the residual signal obtained from the final decomposition;
[0016] Calculate the energy entropy of each component of the product function to construct the eigenvector. The formula for calculating the energy entropy is as follows:
[0017]
[0018] In the formula, N is the length of the signal, p i p is the ratio of the energy of the i-th component of the product function to the total energy. i =EN i / EN, p1 can take a small positive value, ranging from 0.01 to 0.04, preferably 0.02.
[0019] The feature extraction method, which combines local mean decomposition and energy entropy, extracts fault features that can determine the operating status of power equipment and significantly distinguish fault types. It has a high characterization ability for stationary signals, can be applied to the analysis of complex multi-component signals, and can effectively avoid noise disturbances.
[0020] Preferably, the improved beetle whisker algorithm is obtained by optimizing the step size of the beetle whisker algorithm using a quadratic rational function.
[0021] Preferably, the step of optimizing the moving step size of the beetle whisker algorithm using a quadratic rational function includes:
[0022] A quadratic rational function is introduced into the iteration step size factor of the beetle whisker algorithm, as shown in the following formula:
[0023]
[0024] In the formula, б is the hyperparameter of the quadratic rational function, ξ min For the minimum iteration step size, x l The x-coordinate represents the position of the left whisker. r Indicates the position coordinates of the right whisker;
[0025] The improved position update formula for the beetle whisker algorithm is:
[0026]
[0027] In the formula, x t ξ represents the position of the centroid of an individual when the iteration number is t; б represents the hyperparameter of the quadratic rational function; ξ min Indicates the minimum iteration step size; Represents a random unit vector; sign(·) represents the sign function; f(·) represents the fitness function; x l Indicates the position coordinates of the left whisker; x r This indicates the coordinates of the right whisker.
[0028] The step size of the beetle's movement is used to represent the distance the beetle moves, and it is a crucial control parameter in the beetle whisker search, determining the algorithm's search capability. However, the setting of the step size is currently mainly based on experience, and an unreasonable setting can significantly impact the algorithm's performance. For example, a larger step size gives the algorithm strong global optimization ability but may miss potential optimal solutions; a smaller step size gives the algorithm strong local optimization ability but may get stuck in local optima, affecting the algorithm's convergence speed. Optimizing the step size of the beetle whisker algorithm using a quadratic rational function can achieve the goal of enabling global search in the early stages and fine-grained local search in the later stages.
[0029] Preferably, the step of inputting the training set into the Elman network for training, and optimizing the parameters of the Elman network based on the training error using an improved beetle whisker algorithm to obtain the Elman network fault diagnosis model includes:
[0030] Set the initial parameters for the improved longhorn beetle whisker search algorithm;
[0031] The Elman network is trained based on the training set. The training error function of the Elman network is used as the fitness function of the improved beetle whisker search algorithm for global search, thereby optimizing the connection weights and thresholds of each network layer of the Elman network.
[0032] By incorporating the optimized connection weights and thresholds into the Elman network, an Elman network fault diagnosis model is obtained.
[0033] Preferably, the training error function of the Elman network is as follows:
[0034]
[0035] In the formula, P i PT represents the prediction value of the Elman network. i This represents the actual value of the sample.
[0036] Preferably, the expression for the Elman network fault diagnosis model is:
[0037]
[0038] In the formula, k represents the time node; s c (k) represents the feedback output of the connection layer at time k; s(k) represents the output of the hidden layer at time k; y(k) represents the output of the network at time k; u(k) represents the input of the network at time k; w1 is the connection weight from the connection layer to the hidden layer; w2 is the connection weight from the input layer to the hidden layer; w3 is the weight from the hidden layer to the output layer; b1 is the threshold of the input layer; b2 is the threshold of the hidden layer; f(·) represents the transfer function of the hidden layer neuron; g(·) represents the transfer function of the output layer neuron.
[0039] A power equipment fault diagnosis system based on Elman networks includes:
[0040] The data acquisition and processing module is used to acquire the power grid operation data of the transformer in the target power equipment and to normalize the power grid operation data.
[0041] The feature vector construction module is used to construct feature vectors based on the normalized power grid operation data.
[0042] The training and test set partitioning module is used to divide the feature vectors into training and test sets;
[0043] The Elman network optimization module is used to optimize the parameters of the Elman network by improving the beetle whisker algorithm.
[0044] The Elman network fault diagnosis model generation module is used to input the training set into the parameter-optimized Elman network for training, and obtain the Elman network fault diagnosis model.
[0045] The fault diagnosis module is used to input the test set into the Elman network fault diagnosis model for fault diagnosis.
[0046] A computer storage medium storing a computer program that, when executed by a processor, implements the steps of the power equipment fault diagnosis method based on Elman networks as described above.
[0047] The beneficial effects of this invention are as follows:
[0048] 1. This invention employs an improved beetle whisker algorithm to optimize Elman network parameters, facilitating the rapid and accurate establishment of fault diagnosis models using the Elman network. This effectively improves the accuracy and speed of fault diagnosis for power equipment, meeting the requirements of industrial sites for power equipment fault diagnosis.
[0049] 2. This invention designs a variable-step-size beetle whisker algorithm, which allows the beetle to iterate with a larger step size to ensure search speed, so as to achieve the goal of the algorithm being able to perform global search in the early stage and fine local search in the later stage.
[0050] 3. This invention extracts features by combining local mean decomposition and energy entropy. The extracted fault features can determine the operating status of power equipment and significantly distinguish fault types. It has a high characterization ability for stationary signals and can be applied to the analysis of complex multi-component signals, and can effectively avoid noise disturbances.
[0051] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it according to the contents of the specification, the preferred embodiments of the present invention are described in detail below with reference to the accompanying drawings. Specific embodiments of the present invention are given in detail below with reference to the accompanying drawings. Attached Figure Description
[0052] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this application, illustrate exemplary embodiments of the invention and, together with their description, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0053] Figure 1 This is a flowchart of a power equipment fault diagnosis method based on Elman networks in Embodiment 1 of the present invention;
[0054] Figure 2 This is a decomposition diagram of power grid operation data obtained by the local mean decomposition method in Embodiment 1 of the present invention;
[0055] Figure 3 This is the training error curve of the Elman network fault diagnosis model in Embodiment 1 of the present invention. Detailed Implementation
[0056] The principles and features of the present invention are described below with reference to the accompanying drawings. The examples given are only for explaining the present invention and are not intended to limit the scope of the present invention.
[0057] Example 1
[0058] like Figure 1 As shown, a power equipment fault diagnosis method based on Elman networks includes the following steps:
[0059] S1. Collect 500 sets of valid power grid operation data samples from the historical records of 20 similar power equipment, and normalize the power grid operation data samples.
[0060] S2. Construct feature vectors based on the normalized power grid operation data, including the following steps;
[0061] S21. The normalized power grid operation data is decomposed and dimension-reduced using the local mean decomposition method to obtain the product function components. The calculation formula is shown below:
[0062]
[0063] In the formula, v is the normalized data; PF i It is the i-th product function component; q is the total number of product function components obtained from the final decomposition; r q It is the residual signal obtained from the final decomposition;
[0064] S22. Calculate the energy entropy of each component of the product function to construct an eigenvector. The formula for calculating the energy entropy is as follows:
[0065]
[0066] In the formula, N is the length of the signal, p i p is the ratio of the energy of the i-th component of the product function to the total energy. i =EN i / EN, p1 can take a small positive value, ranging from 0.01 to 0.04, preferably 0.02.
[0067] S3. Divide the feature vectors into training and test sets;
[0068] S4. Input the training set into the Elman network for training. Based on the training error, optimize the parameters of the Elman network using the improved beetle whisker algorithm to obtain the Elman network fault diagnosis model. The specific steps include:
[0069] S41. Set the initial parameters of the improved beetle whisker search algorithm; set the transfer function between the input layer and the hidden layer of the Elman network to tansig, and the transfer function between the hidden layer and the output layer to purelin; set the initial step size of the improved beetle whisker algorithm to 60, the initial distance between the left and right whiskers to 7, and the number of iterations of the improved beetle whisker algorithm to 300.
[0070] S42. Train the Elman network based on the training set, and use the training error function of the Elman network as the fitness function of the improved beetle whisker search algorithm for global search, and optimize the connection weights and thresholds of each network layer of the Elman network.
[0071] The training error function of the Elman network is shown below:
[0072]
[0073] In the formula, P i PT represents the prediction value of the Elman network. i This represents the actual value of the sample.
[0074] Substituting the optimized connection weights and thresholds into the Elman network yields the Elman network fault diagnosis model, expressed as:
[0075]
[0076] In the formula, k represents the time node; s c (k) represents the feedback output of the connection layer at time k; s(k) represents the output of the hidden layer at time k; y(k) represents the output of the network at time k; u(k) represents the input of the network at time k; w1 is the connection weight from the connection layer to the hidden layer; w2 is the connection weight from the input layer to the hidden layer; w3 is the weight from the hidden layer to the output layer; b1 is the threshold of the input layer; b2 is the threshold of the hidden layer; f(·) represents the transfer function of the hidden layer neuron; g(·) represents the transfer function of the output layer neuron.
[0077] The improved beetle whisker algorithm is derived by optimizing the step size of the beetle whisker algorithm using a quadratic rational function, as detailed below.
[0078] A quadratic rational function is introduced into the iteration step size factor of the beetle whisker algorithm, as shown in the following formula:
[0079]
[0080] In the formula, б is the hyperparameter of the quadratic rational function, ξ min For the minimum iteration step size, x l The x-coordinate represents the position of the left whisker. r Indicates the position coordinates of the right whisker;
[0081] The improved position update formula for the beetle whisker algorithm is:
[0082]
[0083] In the formula, x t ξ represents the position of the centroid of an individual when the iteration number is t; б represents the hyperparameter of the quadratic rational function; ξ min Indicates the minimum iteration step size; Represents a random unit vector; sign(·) represents the sign function; f(·) represents the fitness function; x l Indicates the position coordinates of the left whisker; x r This indicates the coordinates of the right whisker.
[0084] S5. Input the test set into the Elman network fault diagnosis model for fault diagnosis. If the error rate of the obtained diagnosis result is greater than the set threshold THr, return to step S4 and continue to input the training set into the Elman network for training. Based on the training error, optimize the parameters of the Elman network fault diagnosis model by improving the beetle beard algorithm until the diagnosis error rate of the Elman network fault diagnosis model is less than the set threshold THr.
[0085] Example 2
[0086] A power equipment fault diagnosis system based on Elman networks includes:
[0087] The data acquisition and processing module is used to acquire the power grid operation data of the transformer in the target power equipment and to normalize the power grid operation data.
[0088] The feature vector construction module is used to construct feature vectors based on the normalized power grid operation data.
[0089] The training and test set partitioning module is used to divide the feature vectors into training and test sets;
[0090] The Elman network optimization module is used to optimize the parameters of the Elman network by improving the beetle whisker algorithm.
[0091] The Elman network fault diagnosis model generation module is used to input the training set into the parameter-optimized Elman network for training, and obtain the Elman network fault diagnosis model.
[0092] The fault diagnosis module is used to input the test set into the Elman network fault diagnosis model for fault diagnosis.
[0093] Example 3
[0094] A computer storage medium storing a computer program that, when executed by a processor, implements the steps of the power equipment fault diagnosis method based on Elman networks as described in Embodiment 1.
[0095] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Those skilled in the art can readily implement the present invention based on the accompanying drawings and the above description. However, any modifications, alterations, or variations made by those skilled in the art without departing from the scope of the present invention, utilizing the disclosed technical content, are equivalent embodiments of the present invention. Furthermore, any modifications, alterations, or variations made to the above embodiments based on the essential technology of the present invention are still within the protection scope of the present invention.
Claims
1. A method for fault diagnosis of power equipment based on Elman networks, characterized in that, Includes the following steps: Obtain grid operation data of transformers in the target power equipment and normalize the grid operation data; Feature vectors are constructed based on the normalized power grid operation data; The feature vectors are divided into training and test sets; The training set is input into the Elman network for training. Based on the training error, the parameters of the Elman network are optimized by improving the beetle beard algorithm to obtain the Elman network fault diagnosis model. Input the test set into the Elman network fault diagnosis model for fault diagnosis; The improved beetle whisker algorithm is derived by optimizing the step size of the beetle whisker algorithm using a quadratic rational function. The optimization steps are as follows: A quadratic rational function is introduced into the iteration step size factor of the beetle whisker algorithm, as shown in the following formula: In the formula, б Let be the hyperparameter of a quadratic rational function. ξ min To be the minimum iteration step size, x l Indicates the position coordinates of the left whisker. x r Indicates the position coordinates of the right whisker; The improved position update formula for the beetle whisker algorithm is: In the formula, x t Indicates the number of iterations. t The position of the individual's center of mass; б The hyperparameters of a quadratic rational function are denoted as . ξ min Indicates the minimum iteration step size; Represents a random unit vector; sign (·) denotes a sign function; f (·) represents the fitness function; x l Indicates the coordinates of the left whisker; x r This indicates the coordinates of the right whisker.
2. The method for fault diagnosis of power equipment based on Elman networks according to claim 1, characterized in that, It also includes the following: when the test set is input into the Elman network fault diagnosis model for fault diagnosis and the error rate of the obtained diagnosis result is greater than the set threshold THr, the training set is continued to be input into the Elman network for training. Based on the training error, the parameters of the Elman network fault diagnosis model are optimized by improving the beetle whisker algorithm until the diagnosis error rate of the Elman network fault diagnosis model is less than the set threshold THr.
3. The method for fault diagnosis of power equipment based on Elman networks according to claim 1, characterized in that, The steps for constructing feature vectors based on normalized power grid operation data include: The normalized power grid operation data is decomposed and dimension-reduced using the local mean decomposition method to obtain the product function components. The calculation formula is shown below: In the formula, v It is normalized data; PF i It is the first i Each component of the product function; q It is the total number of product function components obtained from the final decomposition; r q It is the residual signal obtained from the final decomposition; Calculate the energy entropy of each component of the product function to construct the eigenvector. The formula for calculating the energy entropy is as follows: In the formula, N The length of the signal, p i For the first i The ratio of the energy of each component of the product function to the total energy, i.e. p i = EN i / EN , , p The value of 1 ranges from 0.01 to 0.
04.
4. The power equipment fault diagnosis method based on Elman networks according to claim 1, characterized in that, The steps of inputting the training set into the Elman network for training, optimizing the parameters of the Elman network based on the training error using the improved beetle whisker algorithm, and obtaining the Elman network fault diagnosis model include: Set the initial parameters for the improved longhorn beetle whisker search algorithm; The Elman network is trained based on the training set. The training error function of the Elman network is used as the fitness function of the improved beetle whisker search algorithm for global search, thereby optimizing the connection weights and thresholds of each network layer of the Elman network. By incorporating the optimized connection weights and thresholds into the Elman network, an Elman network fault diagnosis model is obtained.
5. The method for fault diagnosis of power equipment based on Elman networks according to claim 4, characterized in that, The training error function of the Elman network is shown below: In the formula, P i These are the predictions from the Elman network. PT i This represents the actual value of the sample.
6. The method for fault diagnosis of power equipment based on Elman networks according to claim 5, characterized in that, The expression for the Elman network fault diagnosis model is: In the formula, k Indicates a time point; s c ( k )express k Feedback output of the connection layer at any time; s ( k )express k The output of the hidden layer at any given time; y ( k )express k Output of the time-based network; u ( k )express k Input to the time-based network; w 1 represents the connection weight from the connection layer to the hidden layer; w 2 represents the connection weight from the input layer to the hidden layer; w3 represents the connection weight from the hidden layer to the output layer; b 1 represents the threshold of the input layer; b 2 represents the threshold of the hidden layer; f (·) represents the transfer function of a hidden layer neuron; g (·) represents the transfer function of the output layer neuron.
7. A power equipment fault diagnosis system based on an Elman network that operates the method described in claim 1, characterized in that, include: The data acquisition and processing module is used to acquire the power grid operation data of the transformer in the target power equipment and to normalize the power grid operation data. The feature vector construction module is used to construct feature vectors based on the normalized power grid operation data. The training and test set partitioning module is used to divide the feature vectors into training and test sets; The Elman network optimization module is used to optimize the parameters of the Elman network by improving the beetle whisker algorithm. The Elman network fault diagnosis model generation module is used to input the training set into the parameter-optimized Elman network for training, and obtain the Elman network fault diagnosis model. The fault diagnosis module is used to input the test set into the Elman network fault diagnosis model for fault diagnosis.
8. A computer storage medium, wherein the computer-readable storage medium stores a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the power equipment fault diagnosis method based on Elman networks as described in any one of claims 1-6.