Transformer fault diagnosis method based on deep belief network optimized by sparrow search method
The deep confidence network model is optimized through the sparrow search method, which solves the problem of parameter setting in the deep confidence network in the transformer fault diagnosis, optimizes the number of nodes and iterations of hidden layer, improves the diagnosis efficiency and accuracy, and achieves more efficient Transformer fault diagnosis.
Patent Information
- Application Number
- CN202210749388.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2042-06-28
AI Technical Summary
In the prior art, deep confidence networks are difficult to set parameters in transformer fault diagnosis, especially the lack of rules for setting the number of hidden layer nodes and iterations, resulting in long training time for model and low diagnostic efficiency.
The deep confidence network model is optimized by using the sparrow search method. By converting the sparrow population matrix into the parameter matrix to be optimized, using the error rate as the fitness function, updating the sparrow population position, optimizing the number of nodes and iterations of hidden layers, and building a more complete depth Confidence network model.
The model training cycle is shortened, the feature extraction capability is improved, more efficient and accurate transformer fault diagnosis is achieved, and more efficient diagnostic requirements are met.
Smart Images

Figure CN115099348B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of transformer fault diagnosis, and in particular to a transformer fault diagnosis method based on sparrow search method to optimize a deep belief network. Background Art
[0002] As the core equipment of the power system, the transformer plays an important role in power transmission and voltage level conversion. The internal faults of the transformer are hidden and complex. Therefore, it is particularly important to achieve fast and accurate fault diagnosis of the transformer to ensure the safe and stable operation of the power grid. When the transformer has an internal fault, the types and contents of the characteristic gases hydrogen (H2), methane (CH4), ethane (C2H6), ethylene (C2H4) and acetylene (C2H2) dissolved in the insulating oil are different. Based on the dissolved gas analysis method in oil, the transformer fault diagnosis can be achieved by analyzing the five characteristic gases dissolved in the insulating oil.
[0003] The deep belief network has strong feature extraction ability and is not easy to fall into local minima, but it is difficult to set parameters when establishing the model, especially the number of hidden layer nodes and the number of iterations. Since there is no specific setting rule and the parameters affect each other, it takes a lot of time to determine a suitable transformer fault diagnosis model. Therefore, a sparrow search method is proposed to optimize the transformer fault of the deep belief network. Summary of the invention
[0004] In view of the defects of the prior art, the present invention provides a transformer fault diagnosis method based on sparrow search method to optimize deep belief network.
[0005] In order to achieve the above invention object, the technical solution adopted by the present invention is as follows:
[0006] A transformer fault diagnosis method based on sparrow search method to optimize deep belief network includes the following steps:
[0007] Step 1: Collect the content of characteristic gases dissolved in the insulating oil under different operating conditions of the transformer;
[0008] Step 2: Build a deep belief network model and initialize the model parameters.
[0009] Step 3: Convert the sparrow population matrix into a matrix of parameters to be optimized - the number of hidden layer nodes and the number of iterations, and initialize the sparrow population.
[0010] Step 4: Use the error rate as the fitness function. The smaller the error rate, the better the fitness value.
[0011] Step 5: Use the initial parameters to pre-train the deep belief network model, calculate the fitness value of the sparrow population and sort it. Those with better fitness values are discoverers in the sparrow population, and those with worse fitness values are joiners in the sparrow population. Scouts are randomly distributed in the sparrow population.
[0012] Step 6: Update the positions of discoverers, joiners, and scouts in the sparrow population.
[0013] Step 7: Calculate the fitness values of the discoverer, joiner, and scout after the updated position. If the fitness value of the new position is better than the fitness value of the previous iteration, the optimal position of the sparrow is updated. Otherwise, no update is performed and the iteration is continued until the conditions are met, and finally the optimal position and fitness value of the sparrow are obtained.
[0014] Step 8: Output the optimal position, which is the number of hidden layer nodes and the number of iterations obtained after optimization. Assign the parameters determined after optimization to the deep belief network model to determine the final deep belief network model.
[0015] Step 9: Use the data training set to train the deep belief network to obtain the deep belief network model optimized by the sparrow search method, and use the test set to test the transformer fault diagnosis accuracy of the optimized deep belief network.
[0016] Furthermore, the characteristic gases in step 1 include: hydrogen H2, methane CH4, ethane C2H6, ethylene C2H4 and acetylene C2H2, and the characteristic gas content is normalized, and the different operating conditions of the transformer include: normal operation, low-temperature overheating, medium-temperature overheating, high-temperature overheating, partial discharge, low-energy discharge and high-energy discharge.
[0017] Furthermore, in step 2, the number of hidden layers is set to two, the pre-training learning rate is 0.001, the reverse fine-tuning learning rate is 0.001, and the training batch size is 50.
[0018] Furthermore, in step 3, the number of matrix rows represents the total number of sparrow populations, and the number of columns is determined by the number of parameters to be optimized. Therefore, each column of the sparrow population represents the number of nodes in the first hidden layer, the number of nodes in the second hidden layer, and the number of iterations. Set the total number of sparrow populations, the number of population iterations, the proportion of discoverers, the range of hidden layer nodes, and the range of iterations.
[0019] Furthermore, the fitness function in step 4 is expressed as:
[0020]
[0021] Where: y i To predict the type of failure; is the actual fault type; N is the number of samples; sum is the number of the same diagnosis results.
[0022] Furthermore, the specific sub-steps of step 6 are as follows:
[0023] Step 6.1 The discoverer position update formula is:
[0024]
[0025] In the formula, is the position of the i-th sparrow in the j-dimensional space at the t-th iteration; T is the maximum number of iterations; Q is a random number that follows a normal distribution; L is a 1*d-order matrix whose elements are all 1; R2 is the alarm value, and its interval is [0,1]; ST is the alarm threshold, i.e., the safety value, and its interval is [0.5,1]; α is a random number in the interval [0,1].
[0026] Step 6.2 The joiner position update formula is:
[0027]
[0028] In the formula, is the global worst position at the tth iteration; is the optimal position of the finder at the t+1th iteration; A is a 1*d-order matrix whose matrix elements are all 1 or -1, where A + =A T (AA T ) -1 .
[0029] Step 6.3 The scout position update formula is:
[0030]
[0031] In the formula, is the current global optimal position; β is the step size control parameter, which is a random number that obeys the standard normal distribution; ε is the minimum value that is not zero; K is the moving direction of the sparrow, with a value range of [-1,1]; f i is the fitness value of the i-th sparrow; f w is the current global worst fitness value; f g is the current global optimal fitness value.
[0032] Compared with the prior art, the advantages of the present invention are:
[0033] By constructing a sparrow search method to optimize the deep belief network model, the number of hidden layer nodes and the number of iterations obtained after optimization can make the structure of the deep belief network model more perfect, learn the training set data more fully, and have stronger feature extraction capabilities. This method combines the strong feature extraction capability of the deep belief network and is not easy to fall into local minima, and solves the problem of the difficulty in setting the number of hidden layer nodes and the number of iterations, greatly shortening the test cycle and meeting the requirements of more efficient and accurate transformer fault diagnosis. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 The flowchart of optimizing the deep belief network of the sparrow search method according to the embodiment of the present invention is as follows;
[0035] Figure 2 This is a diagnostic result diagram of the deep belief network model of the embodiment of the present invention with the same number of nodes in two hidden layers;
[0036] Figure 3 This is a diagnostic result diagram of a deep belief network model with two hidden layers with different numbers of nodes in an embodiment of the present invention;
[0037] Figure 4 A three-dimensional surface diagram of the number of nodes in the first hidden layer of the deep belief network model optimized by the sparrow search method according to an embodiment of the present invention;
[0038] Figure 5 A three-dimensional surface diagram of the number of nodes in the second hidden layer of the deep belief network model optimized by the sparrow search method according to an embodiment of the present invention;
[0039] Figure 6 A three-dimensional surface diagram of optimizing the number of iterations of a deep belief network model using a sparrow search method according to an embodiment of the present invention;
[0040] Figure 7 The statistical results of the deep confidence network transformer fault diagnosis test in the embodiment of the present invention;
[0041] Figure 8 A statistical graph of a transformer fault diagnosis test using a sparrow search method optimized deep belief network according to an embodiment of the present invention; DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples.
[0043] The present invention proposes a transformer fault diagnosis method based on sparrow search method to optimize the deep belief network, aiming to optimize the number of hidden layer nodes and the number of iterations so that the deep belief network can quickly determine the appropriate parameters. Figure 1 As shown in the figure, a transformer fault diagnosis method based on sparrow search method to optimize deep belief network is proposed. The specific process is as follows:
[0044] Step 1: Collect the contents of characteristic gases dissolved in insulating oil such as hydrogen (H2), methane (CH4), ethane (C2H6), ethylene (C2H4) and acetylene (C2H2) under different operating conditions of transformer normal operation, low temperature overheating, medium temperature overheating, high temperature overheating, partial discharge, low energy discharge and high energy discharge;
[0045] 500 groups of the collected data are used as training data groups, 100 groups are used as test data groups, and the data are normalized;
[0046] Table 1 shows the state representation of the deep belief network optimized by the sparrow search method.
[0047]
[0048] Step 2: Build a deep belief network model and initialize the model parameters;
[0049] Set the number of hidden layers to two, the pre-training learning rate to 0.001, the reverse fine-tuning learning rate to 0.001, and the training batch size to 50.
[0050] Figure 2 and Figure 3 These are the diagnostic results of the deep belief network model with different hidden layer node numbers at 1200 and 1300 iterations. For ease of observation, the accuracy corresponding to the number of hidden layer nodes at the same number of iterations is connected by a dotted line. Figure 2 and Figure 3 It can be seen that when the number of hidden layer nodes remains unchanged, the increase in the number of iterations does not necessarily improve the accuracy, and when the number of iterations remains unchanged, there is no specific rule for the impact of the number of hidden layer nodes on the accuracy. Since the number of hidden layer nodes and the number of iterations affect each other, and there is no regularity in the impact of the change of this parameter on the accuracy, it is more difficult to set the parameters of the DBN model. Therefore, it is necessary to optimize the number of hidden layer nodes and the number of iterations of the DBN model.
[0051] Step 3: Convert the sparrow population matrix into the matrix of the parameters to be optimized - the number of hidden layer nodes and the number of iterations, and initialize the sparrow population;
[0052] The number of rows in the matrix represents the total number of sparrow populations, and the number of columns is determined by the number of parameters to be optimized. Therefore, each column of the sparrow population represents the number of nodes in the first hidden layer, the number of nodes in the second hidden layer, and the number of iterations. The total number of sparrow populations is set to 5, the number of population iterations is set to 20, the proportion of discoverers is set to 20%, the range of hidden layer nodes is [5,40], and the range of iterations is [1100,1600].
[0053] Step 4: Use the error rate as the fitness function. The smaller the error rate, the better the fitness value. The fitness function is expressed as:
[0054]
[0055] Where: y i To predict the type of failure; is the actual fault type; N is the number of samples; sum is the number of the same diagnosis results.
[0056] Step 5: Use the initial parameters to pre-train the deep belief network model, randomly generate relevant parameters through the value range of the number of hidden layer nodes and the number of iterations, calculate the fitness value of each sparrow under the initial parameters and sort them in order. The ones with better fitness values are discoverers, and those with worse fitness values are joiners. Scouts are randomly distributed in the population, and the positions of the sparrows with the best and worst current fitness values are determined based on the sorting.
[0057] Step 6: Update the positions of discoverers, joiners, and scouts in the sparrow population;
[0058] Step 6.1 The discoverer position update formula is:
[0059]
[0060] In the formula, is the position of the i-th sparrow in the j-dimensional space at the t-th iteration; T is the maximum number of iterations; Q is a random number that follows a normal distribution; L is a 1*d-order matrix whose elements are all 1; R2 is the alarm value, and its interval is [0,1]; ST is the alarm threshold, i.e., the safety value, and its interval is [0.5,1]; α is a random number in the interval [0,1].
[0061] Step 6.2 The joiner position update formula is:
[0062]
[0063] In the formula, is the global worst position at the tth iteration; is the optimal position of the finder at the t+1th iteration; A is a 1*d-order matrix whose matrix elements are all 1 or -1, where A + =A T (AA T ) -1 .
[0064] Step 6.3 The scout position update formula is:
[0065]
[0066] In the formula, is the current global optimal position; β is the step size control parameter, which is a random number that obeys the standard normal distribution; ε is the minimum value that is not zero; K is the moving direction of the sparrow, with a value range of [-1,1]; f i is the fitness value of the i-th sparrow; f w is the current global worst fitness value; f g is the current global optimal fitness value.
[0067] Step 7: Calculate the fitness values of the discoverer, joiner, and scout after the updated position. If the fitness value of the new position is better than the fitness value of the previous iteration, the optimal position of the sparrow is updated. Otherwise, no update is performed and the iteration is continued until the conditions are met, and finally the optimal position and fitness value of the sparrow are obtained.
[0068] Step 8: Output the optimal position, which is the number of hidden layer nodes and the number of iterations obtained after optimization. Assign the parameters determined after optimization to the deep belief network model to determine the final deep belief network model.
[0069] Step 9: Use the data training set to train the deep belief network to obtain the deep belief network model optimized by the sparrow search method, and use the test set to test the transformer fault diagnosis accuracy of the optimized deep belief network.
[0070] In order to verify the optimization effect of the sparrow search method on the deep belief network transformer fault diagnosis, the relationship between the number of nodes and the number of iterations of the optimized two hidden layers and the diagnostic accuracy under 50 tests was statistically analyzed, as shown in Figure 2. Figure 4 , Figure 5 , Figure 6 As shown in the figure, the X-axis represents the current number of tests, the Y-axis represents the parameters to be optimized, and the Z-axis represents the diagnostic accuracy. Figure 4 , Figure 5 , Figure 6 It can be seen that the light gray area accounts for the largest proportion in the surface color of each figure, and there is a small amount of white area, which means that the number of nodes in each hidden layer and the number of iterations obtained after SSA optimization make the DBN model diagnosis accuracy rate approximately 93% and 94%, among which individual parameter combinations can achieve higher accuracy. Figure 2 , Figure 3 By manually setting relevant parameters and optimizing the DBN model using SSA, we can quickly determine parameters that are more suitable for the network model, thereby further improving the accuracy of fault diagnosis and achieving better optimization effects.
[0071] 4. Deep Belief Network Fault Diagnosis Results Before and After Optimization
[0072] For the unoptimized DBN model, the diagnosis results are relatively good when the number of iterations is set to 1200 and the number of nodes in the two hidden layers is set to 22 and 9 and 11 respectively. Figure 7The statistical results of 200 tests of random initial weights for transformer fault diagnosis in deep belief networks are shown in the figure. The horizontal axis represents the diagnostic accuracy, and the vertical axis represents the number of times each diagnostic accuracy appears in the 200 tests. As can be seen from the figure, the models with 9 and 11 nodes have the highest probability of a diagnostic accuracy of 90%, and the number of times the accuracy is lower than 90% is significantly higher; while the models with 22 nodes have the highest probability of a diagnostic accuracy of 91%, and the probability of an accuracy lower than 90% is relatively much lower, with a high probability of 90% to 92%. Therefore, the diagnostic results of multiple tests under different node number settings of the DBN model show that different node number settings have different effects on the accuracy of the diagnostic results, and the diagnostic accuracy is relatively low, which needs to be further improved.
[0073] Figure 8 This is a statistical chart of the transformer fault diagnosis test using the sparrow search method to optimize the deep belief network. The horizontal axis represents the diagnostic accuracy, and the vertical axis represents the number of times each diagnostic accuracy rate appears in 50 tests. As can be seen from the figure, the accuracy of the optimized DBN model is likely to be concentrated between 92% and 94%, and the probability of an accuracy rate of 94% is the highest. In addition, the highest accuracy rate during the test was 96%.
[0074] Table 2 shows the diagnostic accuracy of the two fault diagnosis methods.
[0075]
[0076] It can be seen from the above table that the diagnostic accuracy of SSA optimized DBN is higher. Therefore, the use of SSA to optimize the DBN model can play a better optimization role, quickly determine the number of hidden layer nodes and iterations suitable for the DBN model, shorten the test cycle, and effectively solve the problem of difficult setting of the number of hidden layer nodes and iterations of the DBN model, thus meeting the requirements of more efficient and accurate transformer fault diagnosis.
[0077] The method according to the present invention described above can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or as a computer code that is originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and will be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the processing method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the processing shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the processing shown here.
[0078] The sparrow search method proposed in the present invention optimizes the transformer fault diagnosis of the deep belief network, converts the sparrow population matrix into the deep belief network problem matrix to be optimized, updates the position of the individual sparrows according to the sparrows' foraging and anti-predation behaviors, and finally obtains the number of hidden layer nodes and iterations that are more suitable for the deep belief network model. This method can overcome the difficulty in setting the number of hidden layer nodes and iterations of the deep belief network, shorten the test and debugging cycle, and achieve higher accuracy requirements for transformer fault diagnosis.
[0079] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the implementation methods of the present invention, and should be understood that the protection scope of the present invention is not limited to such special statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A transformer fault diagnosis method based on sparrow search method to optimize deep belief network, characterized in that: The following steps are involved: Step 1: Collect the content of characteristic gases dissolved in the insulating oil under different operating conditions of the transformer; Characteristic gases include: hydrogen H2, methane CH4, ethane C2H6, ethylene C2H4 and acetylene C2H 2, The characteristic gas content is normalized, and the different operating conditions of the transformer include: normal operation, low temperature overheating, medium temperature overheating, high temperature overheating, partial discharge, low energy discharge and high energy discharge; Step 2: Build a deep belief network model and initialize the model parameters; set the number of hidden layers to two, the pre-training learning rate to 0.001, the reverse fine-tuning learning rate to 0.001, and the training batch size to 50; Step 3: Convert the sparrow population matrix into a matrix of parameters to be optimized - the number of hidden layer nodes and the number of iterations, and initialize the sparrow population; the number of rows in the sparrow population matrix represents the total number of sparrow populations, the number of columns is determined by the number of parameters to be optimized, and each column of the sparrow population represents the number of nodes in the first hidden layer, the number of nodes in the second hidden layer, and the number of iterations respectively; set the total number of sparrow populations, the number of population iterations, the proportion of discoverers, the range of hidden layer nodes, and the range of iterations; Step 4: Use the error rate as the fitness function. The smaller the error rate, the better the fitness value. The fitness function is expressed as: Where: y i To predict the type of failure; is the actual fault type; N is the number of samples; sum is the number of samples with the same diagnosis results; Step 5: Use the initial parameters to pre-train the deep belief network model, calculate the fitness value of the sparrow population and sort it. The ones with better fitness values are the discoverers in the sparrow population, and the ones with worse fitness values are the joiners in the sparrow population. The scouts are randomly distributed in the sparrow population. Step 6: Update the positions of discoverers, joiners, and scouts in the sparrow population; Step 7: Calculate the fitness values of the discoverer, joiner, and scout after the updated position. If the fitness value of the new position is better than the fitness value of the previous iteration, the optimal position of the sparrow is updated. Otherwise, no update is performed. Continue to iterate until the conditions are met, and finally obtain the optimal position and fitness value of the sparrow. Step 8: Output the optimal position, which is the number of hidden layer nodes and the number of iterations obtained after optimization. Assign the parameters determined after optimization to the deep belief network model to determine the final deep belief network model. Step 9: Use the data training set to train the deep belief network to obtain the deep belief network model optimized by the sparrow search method, and use the test set to test the transformer fault diagnosis accuracy of the optimized deep belief network.
2. According to claim 1, a transformer fault diagnosis method based on sparrow search method to optimize deep belief network is characterized in that: The specific sub-steps of step 6 are as follows: Step 6.1 The discoverer position update formula is: In the formula, is the position of the i-th sparrow in the j-dimensional space at the t-th iteration; T is the maximum number of iterations; Q is a random number that follows a normal distribution; L is a 1*d-order matrix whose matrix elements are all 1; R2 is the alarm value, and its interval is [0,1]; ST is the alarm threshold, i.e., the safety value, and its interval is [0.5,1]; α is a random number in the interval [0,1]; Step 6.2 The joiner position update formula is: In the formula, is the global worst position at the tth iteration; is the optimal position of the finder at the t+1th iteration; A is a 1*d-order matrix whose matrix elements are all 1 or -1, where A + =A T (AA T ) -1 ; Step 6.3 The scout position update formula is: In the formula, is the current global optimal position; β is the step size control parameter, which is a random number that obeys the standard normal distribution; ε is the minimum value that is not zero; K is the moving direction of the sparrow, with a value range of [-1,1]; f i is the fitness value of the i-th sparrow; f w is the current global worst fitness value; f g is the current global optimal fitness value.