A transformer fault diagnosis method, medium and system
By constructing a support vector machine model with multi-label classification structure and combining oversampling technology, the problems of low accuracy and sample imbalance in transformer fault diagnosis are solved, and higher diagnostic accuracy and generalization capabilities are achieved.
Patent Information
- Application Number
- CN202210581263.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-26
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2042-05-26
AI Technical Summary
The prior art has problems with low accuracy and excessively absolute criteria in transformer fault diagnosis, especially when facing unbalanced fault samples, the classification results are prone to bias towards most types of samples, resulting in the impact of diagnostic accuracy.
A transformer fault diagnosis method is adopted to construct a support vector machine model with multi-label classification structure, combining hierarchical directed acyclic graph and oversampling technology to optimize the training sample set to improve the accuracy and generalization ability of the diagnostic model.
Through oversampling technology and parameter optimization, the accuracy of transformer fault diagnosis is significantly improved, the bias towards most types of samples is reduced, and the generalization ability of the diagnostic model is enhanced.
Smart Images

Figure CN115146702B_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, medium and system. Background Art
[0002] As a key device for connecting different voltage levels, power transformers play an irreplaceable role in the transmission, transformation and distribution of power systems. Therefore, accurately understanding the health status of transformers, especially timely diagnosis when transformers are abnormal or fail, is of great significance to ensure the safe and stable operation of power systems.
[0003] Power transformers can be divided into oil-immersed transformers, dry-type transformers and SF6 gas-insulated transformers according to the insulating medium, among which oil-immersed transformers are the most common. For oil-immersed transformer faults, the traditional method mainly diagnoses by analyzing the ratio characteristics of the dissolved gas content in the transformer oil, which are represented by the IEC three-ratio method, the stereographic method, the David triangle method, etc. Such methods are simple and practical, but have problems such as low accuracy and too absolute criteria. In recent years, transformer fault diagnosis technology based on artificial intelligence algorithms has gradually developed. Such methods usually use the dissolved gas content in transformer oil as indicators, and use a large number of historical fault samples to train artificial intelligence models such as neural networks, extreme learning machines, relevance vector machines, and support vector machines (SVMs) to enable them to identify transformer fault types. Compared with traditional methods, artificial intelligence methods have greatly improved diagnostic accuracy. However, transformer fault samples usually have the problem of unbalanced sample numbers between classes. When artificial intelligence methods are used to classify unbalanced fault samples, the classification results are prone to bias towards the majority class samples, resulting in sample imbalance that affects the accuracy of fault diagnosis. Summary of the invention
[0004] The embodiments of the present invention provide a transformer fault diagnosis method, medium and system to solve the problem of inaccurate transformer fault diagnosis in the prior art.
[0005] In a first aspect, a transformer fault diagnosis method is provided, comprising:
[0006] Classify the transformer faults according to different fault types and construct a first multi-label classification structure diagnosis model, wherein the first multi-label classification structure diagnosis model includes a support vector machine based on a hierarchical directed acyclic graph;
[0007] Classify the samples in the first training sample set according to the two fault types corresponding to the support vector machine of each node in the first multi-label classification structure diagnosis model, to obtain a second training sample set for each node containing samples of the two fault types corresponding to the support vector machine of the node;
[0008] For the first multi-label classification structure diagnosis model, determining whether the number of samples of two fault types in the second training sample set input to the support vector machine of each node of each layer is the same;
[0009] For each node, if the judgment result of the node is different, the second training sample set is oversampled to generate a third training sample set, and the support vector machine of the node is trained by the third training sample set to obtain a trained second multi-label classification structure diagnosis model;
[0010] For each node, if the judgment result of the node is the same, the support vector machine of the node is trained by the second training sample set to obtain a trained second multi-label classification structure diagnosis model;
[0011] The sample set to be diagnosed is input into the second multi-label classification structure diagnosis model to obtain the fault type corresponding to each sample in the sample set to be diagnosed.
[0012] In a second aspect, a computer-readable storage medium is provided, on which computer program instructions are stored; when the computer program instructions are executed by a processor, the transformer fault diagnosis method as described in the embodiment of the first aspect is implemented.
[0013] In a third aspect, a transformer fault diagnosis system is provided, comprising: a computer-readable storage medium as described in the embodiment of the second aspect above.
[0014] In this way, the embodiment of the present invention can improve the accuracy of diagnosis through oversampling, and obtain a diagnosis model with stronger generalization ability by optimizing the oversampling ratio and SVM parameters. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0016] Figure 1 is a flow chart of a transformer fault diagnosis method according to an embodiment of the present invention;
[0017] Figure 2 is a structural diagram of a multi-class support vector machine based on a hierarchical directed acyclic graph according to an embodiment of the present invention;
[0018] Figure 3It is a schematic diagram of a curve showing a change in the average value of lower-layer fitness in step B of an application example of the present invention;
[0019] Figure 4 1 is a schematic diagram of the distribution curve of the indicators of each oversampling at the optimal oversampling ratio in step B of the application example of the present invention;
[0020] Figure 5 is a schematic diagram of confusion matrices of examples CE1 to CE3 of step C of an application example of the present invention;
[0021] Figure 6 Schematic diagram of confusion matrices of examples CE1, CE4, and CE5 of step C of an application example of the present invention;
[0022] Figure 7 It is a schematic diagram of confusion matrices of examples CE1, CE6, and CE7 of step C of an application example of the present invention. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] The embodiment of the present invention discloses a transformer fault diagnosis method. Figure 1 As shown, the method comprises the following steps:
[0025] Step S1: Classify the transformer faults according to their different fault types and construct a first multi-label classification structure diagnosis model.
[0026] The fault types described in the embodiment of the present invention are obtained according to the standard "Guidelines for Analysis and Judgment of Dissolved Gases in Transformer Oil DL / T 722-2014". In this standard, the fault types of oil-immersed transformers mainly include low-temperature overheating, medium-temperature overheating, high-temperature overheating, partial discharge, low-energy discharge, and high-energy discharge. The fault codes are T1, T2, T3, PD, D1, and D2, respectively. Among them, low-temperature overheating, medium-temperature overheating, and high-temperature overheating are overheating faults with a code of T, and partial discharge, low-energy discharge, and high-energy discharge are discharge faults with a code of D.
[0027] Since the transformer is a high-reliability device with a small number of fault samples, the transformer fault diagnosis problem belongs to a multi-label small sample classification problem, and it is suitable to use a support vector machine (SVM) as a benchmark classifier. Since SVM is a binary classification model, a certain SVM combination strategy needs to be adopted when dealing with multi-label classification problems. Therefore, the first multi-label classification structure diagnosis model of the embodiment of the present invention includes a support vector machine based on a hierarchical directed acyclic graph (HDAG-SVM), that is, in the diagnosis model, except for the bottom-level nodes, each node in other layers is provided with an SVM.
[0028] like Figure 2 FIG. 1 is a structural diagram of a multi-class support vector machine based on a hierarchical directed acyclic graph according to a specific embodiment. It should be understood that the two fault types corresponding to the support vector machine of each node will not be repeated. Figure 2 The model is divided into seven SVM classification groups, SVM1 to SVM7. SVM1 regards T1, T2, and T3 samples as one category (coded as T), and PD, D1, and D2 samples as another category (coded as D), and uses T and D samples for training.
[0029] In addition, the characteristic quantities used in the standard to determine whether a fault occurs mainly include the contents of five gases: H2, CH4, C2H6, C2H4, and C2H2. That is, the samples in the following training sample set and the sample set to be diagnosed are composed of the above characteristic quantities.
[0030] In the diagnosis stage, for any sample, HDAG-SVM only needs to call three classification groups to give a diagnosis result, and there are no problems such as classification overlap and unclassifiable problems.
[0031] Step S2: Classify the samples in the first training sample set according to the two fault types corresponding to the support vector machine of each node in the first multi-label classification structure diagnosis model to obtain a second training sample set containing samples of the two fault types corresponding to the support vector machine of each node.
[0032] The support vector machine of each node can classify two types of faults. As mentioned above, in order to more accurately determine the fault type, the two types of faults corresponding to the support vector machine of the root node in the model are overheating fault and discharge fault, and each support vector machine under the overheating fault branch and each support vector machine under the discharge fault branch, so that the two types of faults corresponding to the support vector machine of each node can divide the samples in the first training sample set into multiple second training sample sets corresponding to the two types of faults of each node.
[0033] The samples in the first training sample set are generally normalized samples. The normalization formula is as follows: Among them, x i,j represents the actual value of the jth feature value of sample i, represents the normalized value of the j-th feature value of sample i, i = 1, 2, ..., M, j = 1, 2, ..., 5, M is the total number of samples.
[0034] Step S3: for the first multi-label classification structure diagnosis model, determine whether the number of samples of the two fault types in the second training sample set input to the support vector machine of each node of each layer is the same.
[0035] For example, for Figure 2 The root node determines whether the number of samples of the two fault types of overheating fault and discharge fault is the same. Different processing is performed in step S4 and step S5 according to different judgment results.
[0036] Step S4: For each node, if the judgment result of the node is different, the second training sample set is oversampled to generate a third training sample set, and the support vector machine of the node is trained by the third training sample set to obtain a trained second multi-label classification structure diagnosis model.
[0037] If the judgment result of the node is different, it indicates that the number of samples of the two types of faults in the second training sample set is unbalanced. Therefore, it is necessary to balance the number of samples of the two types of faults by oversampling the minority class samples. The oversampling ratio β determines the number of newly added samples by oversampling. If β is too small, it is difficult to highlight the data characteristics of the minority class samples. If β is too large, it is easy to introduce noise. Therefore, the oversampling process also requires optimization of β. Based on this, the embodiment of the present invention proposes a transformer fault sample balanced oversampling method based on an improved synthetic minority oversampling method (SMOTEbased on nearest neighbor distribution, SMOTE-NND) based on the neighbor distribution characteristics in the step of generating the third training sample set, and an oversampling ratio optimization method based on a hierarchical search algorithm (hierarchical search, HS).
[0038] In addition, in addition to the oversampling ratio β, which has an important impact on the classification performance of the diagnostic model, the SVM error penalty parameter C and the Gaussian kernel width σ also have an important impact on the classification performance of the diagnostic model, so they need to be optimized. For the case where the number of samples of the two types of faults in the second training sample set is unbalanced, the randomness of oversampling makes the samples generated each time under the same β not completely the same, and the SVM parameter optimization values under different training sample sets are usually different. It is difficult to optimize β and SVM parameters at the same time. Therefore, the embodiment of the present invention adopts a two-layer optimization method to obtain the optimal solution of parameters. The upper layer uses the aforementioned HS to optimize β, and the lower layer uses the modified Harris Hawks optimization (MHHO) algorithm to optimize SVM parameters C and σ.
[0039] In the process of generating the third training sample set, the HS algorithm is used to optimize β. HS is an improvement on the traditional traversal search. It follows the principle of "from the whole to the part". First, a large step size is used to conduct a preliminary search in the global range to determine the point with the highest fitness. Then, a small step size is used to refine the search in the interval centered on the point, and finally the global optimal solution is obtained.
[0040] Specifically, generating the third training sample set includes the following process:
[0041] Step 1: Traverse the oversampling ratio range according to the step size to obtain multiple oversampling ratios.
[0042] Generally, the initial range of the oversampling ratio is [0,1]. The step size can be set based on experience. The initial value of the step size is Δβ w Let Δβ w =1 / T w , T w ∈N + , N + represents a set of positive integers, then T w represents a positive integer. Therefore, the initial number of β obtained is T w +1, then each β obtained initially is used express,
[0043] It should be understood that at t = 0, That is, it is equivalent to not performing oversampling. At this time, the fourth training sample set trained in the subsequent step is the second training sample set.
[0044] Step 2: For each node, the second training sample set is oversampled a first preset number of times at each oversampling ratio to generate a first preset number of fourth training sample sets at the oversampling ratio.
[0045] Since there is an imbalance between classes in transformer fault samples, it is necessary to oversample the minority class samples. The most commonly used method is the synthetic minority oversampling technique (SMOTE), which generates new samples between two minority class samples by linear interpolation. In view of the problems of fuzzy class boundaries, easy noise generation, and unevenness within the minority class in the SMOTE method of the prior art, the embodiment of the present invention proposes a SMOTE-NND method. This method comprehensively considers the number and Euclidean distance of each type of samples in the neighborhood of the minority class sample, and allocates the number of oversampled samples generated by each minority class sample accordingly.
[0046] The first preset number is represented by N, which can be determined according to actual conditions. Since oversampling is random, when oversampling is performed, the same oversampling ratio is oversampled N times, that is, the samples generated by each oversampling are not completely the same.
[0047] Specifically, this step includes the following process:
[0048] (1) For each node, the number of samples of each fault type in the second training sample set corresponding to the node is counted according to the two fault types corresponding to the support vector machine of the node, and the samples are divided into minority class samples and majority class samples.
[0049] (2) Calculating the Euclidean distance between each minority class sample and all other samples in the second training sample set, and screening out a second preset number of neighboring samples for each minority class sample.
[0050] The calculation of the Euclidean distance is a prior art and will not be described in detail here. The second preset number is represented by L. The second preset number of neighbor samples of the minority class sample refers to the Euclidean distance between the samples of the L neighbors and the minority class sample is less than the distance between other samples and the minority class sample. It should be understood that the Euclidean distances between the L neighbor samples and the minority class sample can be the same or different.
[0051] (3) Count the first number of majority class samples among the neighboring samples of each minority class sample.
[0052] The minority class sample is represented by i, and the first number corresponding to sample i is m i The L nearest neighbor samples of sample i may include minority class samples or majority class samples. This step only counts the first number of majority class samples.
[0053] (4) If the second preset number and the first number corresponding to the minority class samples are not equal, the minority class samples are screened into the non-noise minority class sample set.
[0054] Let S represent the non-noise minority class sample set, if L≠m i , that is, the number of the two types of faults is unbalanced, then sample i is classified into S.
[0055] (5) The first formula is used to normalize the first quantity of each sample in the non-noise minority class sample set to obtain a category index for each sample.
[0056] Specifically, the first formula is:
[0057] Among them, R i Represents the category index of sample i, i∈S.
[0058] (6) Calculate the Euclidean distance between each sample in the non-noise minority sample set and other samples in the non-noise minority sample set, and select a third preset number of neighboring samples for each sample.
[0059] The third preset number is represented by K. The Euclidean distance between sample i and each of the third preset number of neighboring samples is represented by D i,k Indicates that k=1, 2,…, K.
[0060] (7) The second formula is used to normalize the average value of the Euclidean distance between each sample in the non-noise minority class sample set and the third preset number of neighboring samples to obtain a distance index for each sample.
[0061] Specifically, the second formula is:
[0062] Among them, Q i represents the distance index of sample i, represents the average value of the Euclidean distance between sample i and the third preset number of neighboring samples,
[0063] (8) Based on the number of minority class samples, the number of majority class samples and the oversampling ratio, the third formula is used to calculate the number of additional minority class samples.
[0064] Specifically, the third formula is:
[0065] in, represents the number of new samples of minority class samples, β represents the oversampling ratio, β∈[0,1], M - Represents the number of minority class samples, M + Represents the number of majority class samples.
[0066] (9) For each sample in the non-noise minority class sample set, the fourth formula is used to calculate the second number of oversampled samples generated by each sample according to the category index, distance index and number of newly added minority class samples of each sample.
[0067] Specifically, the fourth formula is:
[0068] in, represents the second number of oversampled samples generated by sample i.
[0069] (10) For each sample in the non-noise minority class sample set, a third number of samples are randomly selected from a third preset number of neighboring samples corresponding to each sample as auxiliary samples.
[0070] It should be understood that after a sample is selected as an auxiliary sample, it is not eliminated, so the sample may be selected as an auxiliary sample again. The probability of the third preset number of neighboring samples being selected as auxiliary samples is: Among them, P i,k Represents the probability that a third preset number of neighbor samples are selected as auxiliary samples.
[0071] (11) For each sample in the non-noise minority sample set, based on each sample and each corresponding auxiliary sample, the fifth formula is used to calculate the third number of oversampled samples generated by each sample.
[0072] Since a third number of auxiliary samples are selected in the previous step, a third number of oversampled samples can be obtained through this step.
[0073] Specifically, the fifth formula is: x os =x root +r(x aux -x root ).
[0074] Among them, x os represents an oversampled sample generated by sample i, x root represents sample i, x aux represents an auxiliary sample corresponding to sample i, and r is a random number in the range of [0,1].
[0075] (12) The third number of oversampled samples generated by each sample is combined with the second training sample set to obtain a fourth training sample set for the node.
[0076] (13) Repeat the above process a first preset number of times to obtain a first preset number of fourth training sample sets.
[0077] Through the above steps, the minority class samples that are all majority class samples in the L nearest neighbors are identified as noise, and are not oversampled, which can avoid introducing new noise as much as possible; in addition, more oversampled samples are generated from the non-noise minority class samples with more majority class samples in the L nearest neighbors, so as to avoid the minority class samples at the class boundary from being submerged, which plays a role in strengthening the class boundary; furthermore, more oversampled samples are generated from the non-noise minority class samples with a larger average Euclidean distance in the K nearest neighbors, and the samples farther from the root sample in the K nearest neighbors are more likely to be selected as auxiliary samples, thereby reducing the uneven distribution of the minority class samples and improving the recognition rate of the classifier for the sparse areas of the minority class samples.
[0078] Step 3: For each oversampling ratio, use a first preset number of fourth training sample sets to respectively train the support vector machine of the node, and obtain the fitness corresponding to the first preset number of trained support vector machines of the node.
[0079] This step uses the aforementioned MHHO algorithm for training, and the specific process will be described later.
[0080] Step 4: For each oversampling ratio, calculate the average fitness and standard deviation of the fitness corresponding to the first preset number of trained support vector machines of the node.
[0081] Specifically, the formula for the average fitness is as follows:
[0082]
[0083] Specifically, the formula for the standard deviation of fitness is as follows:
[0084]
[0085] Among them, f t w,ave represents the average value of fitness under the tth oversampling rate. t w,std Represents the standard deviation of fitness under the tth oversampling ratio. It represents the fitness of the nth trained support vector machine under the tth oversampling ratio.
[0086] Step 5: Determine the optimal oversampling ratio based on the average fitness value, the standard deviation of the fitness and the oversampling ratio.
[0087] Specifically, this step includes the following process:
[0088] (1) Determine the number of average values of maximum fitness.
[0089] Depending on the difference in quantity, the following different steps (2) and (3) are performed respectively.
[0090] (2) If the number of average values of the maximum fitness is one, the oversampling ratio corresponding to the average value of the maximum fitness is used as the candidate oversampling ratio.
[0091] (3) If the number of average values of the maximum fitness is at least two, determine the number of standard deviations of the minimum fitness corresponding to the average values of at least two maximum fitness.
[0092] Depending on the difference in quantity, the following different steps (4) and (5) are performed respectively.
[0093] (4) If the number of standard deviations of the minimum fitness is one, the oversampling ratio corresponding to the standard deviation of the minimum fitness is used as the candidate oversampling ratio.
[0094] (5) If the number of standard deviations of the minimum fitness is at least two, the minimum oversampling ratio corresponding to the standard deviation of the minimum fitness is used as the candidate oversampling ratio.
[0095] (6) Determine whether the candidate oversampling ratio is the upper limit or the lower limit of the initial range of the oversampling ratio interval.
[0096] Depending on the judgment results, the following different steps (7), (8) and (9) are performed respectively.
[0097] (7) If it is not the upper limit or the lower limit of the initial range of the oversampling ratio interval, the alternative oversampling ratio is taken as the optimal oversampling ratio.
[0098] (8) If it is the upper limit of the initial range of the oversampling magnification interval, the difference between the upper limit of the initial range of the oversampling magnification interval and the initial value of the step size is taken as the optimal oversampling magnification.
[0099] (9) If it is the lower limit of the initial range of the oversampling ratio interval, the initial value of the step size is taken as the optimal oversampling ratio.
[0100] For (8) and (9), represents the optimal oversampling ratio, Δβ w represents the initial value of the step length, then:
[0101]
[0102] Step 6: After taking the optimal oversampling ratio as the midpoint of the oversampling ratio range and reducing the oversampling ratio range and step size, return to the step of obtaining multiple oversampling ratios, and repeat all the above steps until the optimal oversampling ratio is obtained again.
[0103] The lower limit of the reduced oversampling ratio interval is the difference between the initial value of the optimal oversampling ratio and the initial value of the step size, and the upper limit of the reduced oversampling ratio interval is the sum of the initial value of the optimal oversampling ratio and the initial value of the step size, that is, the reduced oversampling ratio interval is
[0104] The reduced step length is the product of a preset multiple and the initial value of the step length. In a specific embodiment of the present invention, the preset multiple is T p represents a positive integer, which can be preset based on experience, T p ∈N + . Δβ p is the reduced step size, then the reduced step size is Δβ p =2Δβ w / T p , then the tth oversampling ratio used for calculation in the reduced oversampling ratio interval is express, Total T p +1 new oversampling factor.
[0105] The oversampling factor will be obtained again Return to the aforementioned step 1, and repeat the subsequent steps to obtain the optimal oversampling ratio again.
[0106] It should be understood that in the process of obtaining the optimal oversampling ratio again, since the upper and lower limits of the reduced oversampling interval are no longer the upper and lower limits of the initial range of the oversampling ratio interval, steps (8) and (9) will not be performed after step (6) which is equivalent to step five, and only step (7) will be performed, that is, the alternative oversampling ratio is used as the optimal oversampling ratio.
[0107] Step 7: The fourth training sample set generated under the optimal oversampling ratio is used as the third training sample set.
[0108] Step S5: For each node, if the judgment result of the node is the same, the support vector machine of the node is trained by the second training sample set to obtain a trained second multi-label classification structure diagnosis model.
[0109] The method for training the support vector machine of this node is the same as the aforementioned method, which is the MHHO algorithm. The MHHO algorithm is based on the Harris Hawks Optimization (HHO) algorithm of the prior art, and is improved on the basis of the Harris Hawks algorithm of the prior art. The Harris Hawk algorithm is a swarm intelligence algorithm that simulates the group hunting behavior of Harris Hawks and combines levy flight to solve complex problems such as high-dimensional, non-continuous, and non-differentiable problems. The iterative solution process of HHO includes a global exploration phase and a local development phase. The switching of the phases is determined by the prey escape energy E. Specifically, the Harris Hawk algorithm of the prior art is as follows:
[0110] 1. Global Exploration Phase
[0111] Assume that the population of Harris's hawk is H, and the position of the g-th generation Harris's hawk is p h,g , h = 1, 2, ..., H, its dimension is the number of variables to be optimized, and its dimension is 2 for the SVM parameter optimization problem.
[0112] When |E|≥1, the prey is considered to be physically strong, and the Harris hawk will randomly inhabit the optimization space and execute different position update strategies depending on whether the prey is found, as shown in the following formula:
[0113] (1)
[0114] (2)
[0115] Among them, r0~r5 all represent random numbers in the range of [0,1]. represents the position of a random individual in the population at the gth generation. ceil(*) represents the upward rounding function. f h,g represents the fitness of individual h in the gth generation. It represents the fitness of the g-th generation of prey, that is, the optimal fitness of the population. Represents the position of the g-th generation of prey, that is, the position of the individual with the best fitness in the population. It represents the average value of all individual positions in the population of generation g. max 、p min They respectively represent the upper and lower limits of the individual position, that is, the range of the variables to be optimized.
[0116] 2. Local development stage
[0117] When |E|<1, the prey is considered to be exhausted, and the Harris Hawk will launch a siege and surprise attack to initiate hunting. Different position update strategies are implemented according to the remaining physical strength and breakout situation of the prey, as follows:
[0118] (1) 0.5≤|E|<1 and r0≥0.5
[0119] At this time, the prey still has enough energy to escape, but fails to break through (r0 ≥ 0.5). The prey is still in the Harris Hawk's encirclement. The Harris Hawk will adopt a soft encirclement strategy to update its position, as shown in the following formula:
[0120]
[0121] Where J is the prey jumping intensity, which is a random number in the range of [0,2].
[0122] (2)|E|<0.5 and r0≥0.5
[0123] At this time, the prey is not strong enough to continue to escape, and has failed to break through. The prey is still in the Harris Hawk's encirclement. The Harris Hawk will adopt a hard encirclement strategy to update the position, as shown in the following formula:
[0124]
[0125] (3)0.5≤|E|<1 and r0<0.5
[0126] At this time, the prey still has enough energy to escape, and successfully breaks through the hawks' encirclement (r0<0.5), and performs a deceptive escape behavior (simulated by levy flight). In this case, the Harris Hawk will take a gradual dive attack while executing the soft encirclement strategy, as shown in the following formula:
[0127]
[0128] in,
[0129] Where y represents the position of the Harris Hawk after soft encirclement. y represents the fitness of the soft encirclement position. Z represents the position of the Harris Hawk after taking a gradual dive attack. z represents the fitness of the progressive dive attack position. r represents a random number vector in the range [0,1]. levy represents the simulated value of the levy flight path. u and v represent random numbers in the range (0,1). δ represents a constant, usually 1.5. Γ(*) represents the Gamma function.
[0130] (4)|E|<0.5 and r0<0.5
[0131] At this point, the prey is not strong enough to continue escaping, but it still succeeds in breaking through the hawks' encirclement and performing a deceptive escape. In this case, the Harris hawk will take a gradual dive attack while executing the hard encirclement strategy, as shown in the following formula:
[0132]
[0133] in,
[0134] The HHO of the prior art has a large search range, high search efficiency, and shows good convergence performance in multi-extreme value problems, but it still has certain defects and shortcomings, which are mainly reflected in two aspects: First, the parameter setting is too simple, and the prey escape energy E is set to a simple linear attenuation. Only local development is carried out in the later stage of iteration, which is easy to fall into the local optimum; the prey jump intensity J is set to a random number, ignoring the relationship with E. Second, the position update only relies on the individual information of the population. When the population falls into the local optimum, it cannot generate a new position, causing the iteration to stagnate and the algorithm to converge prematurely. In response to the above problems, the embodiment of the present invention improves the Harris Eagle algorithm of the prior art. The key point of using MHHO to optimize the SVM parameters is the setting of the individual dimension and the fitness function, where the Harris Eagle individual is set as a two-dimensional vector, including the error penalty parameter C of the support vector machine and the Gaussian kernel width σ.
[0135] Specifically, the method for training the support vector machine of the node in the embodiment of the present invention includes the following steps:
[0136] (1) For the first individual position of each generation, the Harris Eagle algorithm is used to update it to obtain the second individual position of each generation.
[0137] The Harris Hawk algorithm is as described above, except that the individual initial positions of the Harris Hawk algorithm in the embodiment of the present invention are generated by the logistic chaos mapping algorithm. Chaotic mapping has good quasi-randomness, non-periodicity, and ergodicity, and is often used to generate the initial positions of the heuristic algorithm population to make the population as evenly distributed as possible, thereby expanding the search range and improving the global convergence performance. The initial position calculated by the logistic chaos mapping algorithm is shown in the following formula:
[0138]
[0139] in,
[0140] Among them, the operator Represents the Hadamard product of matrices. h represents the logistic mapping value of individual h. μ represents the logistic mapping control parameter, with a value range of (0,4]. When μ = 4, the logistic mapping tends to be full mapping and the distribution is most uniform. h The range becomes [0,1], so in the embodiment of the present invention, μ is set to 4. h,0 is the initial position of individual h.
[0141] In addition, the formula for the prey escape energy of the Harris Hawk algorithm in the prior art is:
[0142] E=2(2r-1)(1-g / G), where g represents the current number of iterations and G represents the upper limit of the number of iterations.
[0143] In view of the defects of the above-mentioned E and J, the embodiments of the present invention improve E and J, as follows:
[0144] The formula for the prey escape energy of the Harris Hawk algorithm is: E = 2(2r-1)[1-(g / G) 1 / e ] 1 / e Among them, E represents the prey escape energy, g represents the current number of iterations, G represents the upper limit of the number of iterations, and e represents the natural bottom number. After the improvement, the maximum value of E changes more slowly in the middle and late stages of the iteration, which retains the possibility of global exploration while carrying out local development, reducing the risk of falling into the local optimum.
[0145] The formula for the prey jump intensity of the Harris Hawk algorithm is: J = r(1 + |E|). Among them, J represents the prey jump intensity. The maximum value of the improved J is determined by the current E value, which helps to expand the search range in the early stage of the local development stage on the one hand, and helps to improve the search accuracy in the late stage of the local development stage on the other hand.
[0146] (2) For the second individual position of each generation, the individual random mutation mechanism is used to update it to obtain the third individual position of each generation.
[0147] Specifically, the formula for the individual random variation mechanism is as follows:
[0148] in,
[0149] Among them, p var Indicates the variation position of individual h. var It indicates the fitness of the mutation position. From the above two equations, it can be seen that whether the individual h mutates depends on the value of the random number r, and the mutation probability is greater in the later iteration, thereby improving the ability of HHO to jump out of the local optimum in the local development stage. By introducing the individual random mutation mechanism, the risk of HHO falling into the local optimum is reduced.
[0150] (3) The individual position with better fitness between the second individual position and the third individual position of each generation is taken as the fourth individual position of each generation.
[0151] (4) For the fourth individual position of each generation, the individual position with better fitness between the first individual position and the fourth individual position is used as the fifth individual position of each generation.
[0152] In the HHO iteration process of the prior art, the optimal fitness of the current generation of population is not compared with that of the previous generation, making it difficult to ensure that the optimal fitness of each generation of population is monotonically unchanged. To address this problem, the embodiment of the present invention introduces an elite retention strategy, which adds a judgment link after each generation of position update. If the fitness of the optimal individual position of the current generation of population deteriorates after the update, the individual position is not updated, thereby ensuring that the optimal fitness of the population continuously approaches the theoretical optimal value.
[0153] (5) Return the fifth individual position to the step of updating using the Harris Hawk algorithm, and repeat all the above steps until the optimal fitness is obtained.
[0154] Specifically, the fitness function used in the embodiment of the present invention is:
[0155] f=α Acc F Acc +α Sen F Sen +α Spe F Spe .
[0156] in, Therefore, F Acc It represents the accuracy, which is the ratio of correctly classified samples to the total number of samples. Therefore, F Sen It represents sensitivity, which is the proportion of minority class samples that are correctly classified. Therefore, F Spe Indicates the specificity, which is the proportion of samples in the majority class that are correctly classified. Acc Indicates F Acc The weight, α Sen Indicates F Sen The weight, α Spe Indicates F Spe The weight of M + represents the number of majority class samples in the two fault types of the second training sample set, M - represents the number of minority class samples in the two fault types of the second training sample set, represents the number of majority class samples in the two fault types that are correctly classified, Represents the number of minority class samples in the two fault categories that are correctly classified.
[0157] The accuracy, sensitivity and specificity are calculated by the leave-one-out method. Let the majority class original sample set, minority class original sample set and minority class oversampled sample set be X - , X + , Without repetition, from X-∪X + Take a sample from the test set as a validation sample. All samples (except the validation samples) are used as training samples, SVM is trained and the classification results of the validation samples are given. Repeat this step M - +M + times, traverse X - ∪X + All samples in the sample set are counted, and finally the accuracy, sensitivity and specificity are calculated according to the fitness function formula.
[0158] Therefore, through steps S4 and S5, among SVM1~SVM7, for the unbalanced classification groups in the second training sample set, it is necessary to oversample their samples, and finally the group contains N SVM classifiers with optimized parameters; for the balanced classification groups in the second training sample set, there is no need for oversampling, and there is only one SVM classifier with optimized parameters in the group.
[0159] Step S6: Input the sample set to be diagnosed into the second multi-label classification structure diagnosis model to obtain the fault type corresponding to each sample in the sample set to be diagnosed.
[0160] Through this step, for any sample, HDAG-SVM only needs to call three classification groups to obtain a diagnosis result, and there are no problems such as classification overlap and unclassifiable problems.
[0161] The embodiment of the present invention further discloses a computer-readable storage medium, on which computer program instructions are stored; when the computer program instructions are executed by a processor, the transformer fault diagnosis method as described in the above embodiment is implemented.
[0162] An embodiment of the present invention further discloses a transformer fault diagnosis system, comprising: a computer-readable storage medium as described in the above embodiment.
[0163] The technical solution of the embodiment of the present invention is further illustrated by taking a specific application example as follows.
[0164] Step A: Set the sample and parameters of this application example, as follows:
[0165] Transformer fault samples mainly come from State Grid Corporation of China and papers. A total of 721 sample data were collected. All samples are divided into training samples and test samples. The number of samples is shown in Table 1.
[0166] Table 1 Number of transformer fault samples
[0167] Fault type T1 T2 T3 PD D1 D2 total Number of training samples 50 100 150 50 100 150 600 Number of test samples 14 18 28 16 21 24 121
[0168] In the SMOTE-NND algorithm of this application example, the second preset number L and the third preset number K representing the nearest neighbors are both 5. In the HS algorithm, the initial range of the oversampling ratio β interval is [0,1], and the initial value Δβ of the step length used for the overall search isw Take 0.1, local search step Δβ p Take 0.01, and the first preset number N of oversampling at each oversampling ratio is 35. In the MHHO algorithm, the optimization range of the SVM error penalty parameter C is (0,100], the optimization range of the SVM Gaussian kernel width σ is (0,10], the upper limit of the number of iterations G is 100, and the population size H is 40; for the classification groups with different numbers of samples of the two fault types in the second training sample set, the weights α of the three fitness indicators are Acc , α Sen , α Spe Take 3, 2, and 1 respectively; for the classification groups with the same number of samples of two fault types in the second training sample set, do not distinguish between the majority class and the minority class, α Acc , α Sen , α Spe Take 1, 0, and 0 respectively.
[0169] Step B: Analyze the diagnostic model training results, as follows:
[0170] As shown in Table 1, the number of samples of the two types of faults in the training samples of classification group SVM1 is the same, so there is no need for oversampling. After optimizing the SVM parameters through MHHO, there is only one SVM in the group. The number of samples of the two types of faults in the training samples of classification groups SVM2 to SVM7 is different. SMOTE-NND is required for oversampling, and the oversampling ratio and SVM parameters are optimized through HS-MHHO. Finally, each classification group contains N, that is, 35 SVMs. The training results of the diagnosis model are shown in Table 2.
[0171] Table 2 Diagnosis model training results
[0172]
[0173]
[0174] As can be seen from Table 2, the optimal oversampling ratios of SVM2 to SVM7 are all between 0.85 and 1, which can fully enhance the characteristics of minority class sample data while avoiding the introduction of noise samples as much as possible. The accuracy of the leave-one-out verification in the training phase is basically above 90%, indicating that the double-layer optimization method of the embodiment of the present invention has a good effect. The following takes the classification group SVM2 as an example to further demonstrate the oversampling and parameter optimization effects. Among them, the average value change curve of the lower layer fitness is as follows Figure 3 As shown in the figure, the distribution of indicators of each oversampling under the optimal oversampling ratio is as follows Figure 4 shown.
[0175] Depend on Figure 3It can be seen that as the oversampling ratio increases, the average value of the lower layer fitness gradually increases, reaches a peak at 0.88, and then decreases slightly. This shows that the increase in the oversampling ratio makes the data features of the minority class samples continue to enhance. When the oversampling ratio reaches a certain value, the space that can be enhanced for the data features of the minority class samples tends to be saturated. Continuing to increase the ratio will not significantly increase the average value of the lower layer fitness, but may introduce noise samples, resulting in a decrease in classification performance.
[0176] Depend on Figure 4 It can be seen that the 35 times of oversampling and SVM parameter optimization under the optimal oversampling ratio of 0.88, the accuracy range of the lower layer optimization results is 90% to 96%, the sensitivity range is 90% to 100%, and the specificity range is 88% to 98%. This shows that after parameter optimization, under the optimal oversampling ratio of 0.88, each SVM in the classification group SVM2 has a good generalization ability for the diagnosis and classification of the overall sample, minority class samples, and majority class samples.
[0177] Step C, analyzing the diagnostic model test results, as follows:
[0178] (1) Comparative analysis of diagnostic tests with different oversampling ratios
[0179] In order to verify the influence of different oversampling ratios on the classification performance of the diagnostic model, three groups of examples CE1 to CE3 were designed. The oversampling ratio of CE1 is the optimization result of step B, CE2 is not oversampled, and the oversampling ratio of each classification group in CE3 is 1. The other parameter settings are the same as step A. The diagnostic models trained by CE1 to CE3 were used to classify 121 test samples, and the confusion matrix was obtained as shown in the figure. Figure 5 The specific diagnosis results are shown in Table 3.
[0180] Depend on Figure 5 It can be seen that the accuracy rates of CE1 to CE3 are 95.04%, 83.47%, and 92.56% respectively. Among them, CE1 has a higher ability to distinguish T2, T3, D1, and D2 type fault samples than CE2, and a higher ability to distinguish PD, D1, and D2 type fault samples than CE3. This shows that compared with no oversampling and fully balanced oversampling, the diagnostic model after optimizing the oversampling ratio has stronger classification performance, and the number of misclassifications of various fault samples is basically kept at 1 or less.
[0181] (2) Comparative analysis of diagnostic tests using different oversampling methods
[0182] In order to verify the influence of different oversampling methods on the classification performance of the diagnostic model, two groups of examples CE4 and CE5 were designed for comparison with CE1. Compared with CE1, the oversampling method of CE4 adopts SMOTE, and the oversampling method of CE5 adopts the adaptive synthetic sampling algorithm (ADASYN, which is an improved algorithm of SMOTE). The number of neighbors in both oversampling methods is 5. The diagnostic models trained by CE1, CE4, and CE5 were used to classify 121 test samples, and the confusion matrix was obtained as follows: Figure 6 The specific diagnosis results are shown in Table 3.
[0183] Depend on Figure 6 It can be seen that the accuracy rates of CE4 and CE5 are 88.43% and 84.3% respectively, which are lower than 95.04% of CE1. Among them, CE1 has a higher ability to distinguish fault samples of type T2, T3, PD, and D1 than CE4, and a higher ability to distinguish fault samples other than type D2 than CE5. This shows that SMOTE-NND reduces the risk of synthetic noise, strengthens class boundaries, and strengthens the sparse areas inside minority class samples, so that the quality of the generated oversampled samples is higher than that of the samples generated by SMOTE and ADASYN, thereby training a diagnostic model with stronger classification performance.
[0184] (3) Comparative analysis of diagnostic tests using different parameter optimization methods
[0185] In order to verify the influence of different parameter optimization methods on the classification performance of the diagnostic model, two groups of examples CE6, CE7 and CE1 were designed for comparison. Compared with CE1, the lower layer SVM parameter optimization method of CE6 adopts the standard HHO algorithm, while CE7 adopts the particle swarm algorithm (PSO). The parameters of the HHO algorithm are the same as those in step A. In the PSO algorithm, the population size is 40, the upper limit of the number of iterations is 100, and the self-learning factor and the group learning factor are both 2. The diagnostic models trained by CE1, CE6 and CE7 were used to classify 121 test samples, and the confusion matrix was obtained as shown in the figure. Figure 7 The specific diagnosis results are shown in Table 3.
[0186] Depend on Figure 7 It can be seen that the accuracy rates of CE6 and CE7 are 85.95% and 85.12% respectively, which are lower than 95.04% of CE1. Among them, CE1 has a higher ability to distinguish all types of fault samples than CE6 and CE7. This shows that compared with HHO and PSO, MHHO has stronger search ability and convergence performance, is not easy to fall into local optimum, and can search for SVM parameters that make the diagnosis model more generalizable.
[0187] (4) The specific diagnosis results of cases CE1 to CE7 are shown in Table 3, where the bold characters are the diagnosis errors.
[0188] Table 3 Test sample diagnosis results
[0189]
[0190]
[0191]
[0192]
[0193]
[0194]
[0195] It can be seen from the application examples that the transformer fault diagnosis method considering oversampler and classifier parameter optimization in the embodiment of the present invention can improve the diagnosis accuracy through oversampling, and obtain a diagnostic model with stronger generalization ability by optimizing the oversampling ratio and SVM parameters, in order to solve the problems of low fault diagnosis accuracy and diagnosis effect biased towards majority class samples caused by imbalanced transformer fault samples.
[0196] In summary, in the embodiments of the present invention, compared with no oversampling and fully balanced oversampling, the optimal oversampling ratio can fully enhance the data features of minority class samples and reduce the risk of introducing noise, and can effectively improve the quality of oversampling synthesized minority class samples; through the SMOTE-NND oversampling method, it is possible to avoid synthetic noise as much as possible, reduce the boundary fuzziness between minority class and majority class samples, and reduce the unevenness of the internal distribution of minority class samples, thereby synthesizing high-quality minority class samples; through the lower-layer SVM parameter optimization method based on MHHO, the convergence performance is good, and it is not easy to fall into the local optimum, so that the generalization ability of the optimized SVM is stronger.
[0197] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A transformer fault diagnosis method, characterized in that: include: Classify the transformer faults according to different fault types and construct a first multi-label classification structure diagnosis model, wherein the first multi-label classification structure diagnosis model includes a support vector machine based on a hierarchical directed acyclic graph; Classify the samples in the first training sample set according to the two fault types corresponding to the support vector machine of each node in the first multi-label classification structure diagnosis model, to obtain a second training sample set for each node containing samples of the two fault types corresponding to the support vector machine of the node; For the first multi-label classification structure diagnosis model, determining whether the number of samples of two fault types in the second training sample set input to the support vector machine of each node of each layer is the same; For each node, if the judgment result of the node is different, the second training sample set is oversampled to generate a third training sample set, and the support vector machine of the node is trained by the third training sample set to obtain a trained second multi-label classification structure diagnosis model; For each node, if the judgment result of the node is the same, the support vector machine of the node is trained by the second training sample set to obtain a trained second multi-label classification structure diagnosis model; Inputting the sample set to be diagnosed into the second multi-label classification structure diagnosis model to obtain the fault type corresponding to each sample in the sample set to be diagnosed; The method for training the support vector machine of the node comprises: For the first individual position of each generation, the Harris Eagle algorithm is used to update it to obtain the second individual position of each generation; For the second individual position of each generation, the individual random mutation mechanism is used to update it to obtain the third individual position of each generation; The individual position with better fitness between the second individual position and the third individual position of each generation is used as the fourth individual position of each generation; For the fourth individual position of each generation, the individual position with better fitness between the first individual position and the fourth individual position is used as the fifth individual position of each generation; Returning the fifth individual position to the step of updating using the Harris Hawk algorithm, and repeating all the above steps until the optimal fitness is obtained; The individuals of the Harris Hawk algorithm are two-dimensional vectors including the error penalty parameter of the support vector machine and the Gaussian kernel width, and the initial positions of the individuals of the Harris Hawk algorithm are generated by a logistic chaotic mapping algorithm.
2. The transformer fault diagnosis method according to claim 1, characterized in that: The fitness function is: ; in, , , , express The weight of express The weight of express The weight of represents the number of majority class samples in the two fault types of the second training sample set, represents the number of minority class samples in the two fault types of the second training sample set, represents the number of majority class samples in the two fault types correctly classified by the support vector machine, Represents the number of minority class samples in the two fault types correctly classified by the support vector machine.
3. The transformer fault diagnosis method according to claim 1, characterized in that: The formula for the prey escape energy of the Harris Hawk algorithm is: ,in, E Indicates the prey's escape energy, g Indicates the current iteration number, G represents the upper limit of the number of iterations, e represents the natural base, r Represents a random number in the range [0,1]; The formula for the prey jumping intensity of the Harris Hawk algorithm is: ,in, J Indicates prey jump intensity.
4. The transformer fault diagnosis method according to claim 1, characterized in that: The step of generating the third training sample set comprises: According to the step size, traverse the oversampling ratio range to obtain multiple oversampling ratios; For each node, performing oversampling processing on the second training sample set for a first preset number of times at each of the oversampling ratios to generate a first preset number of fourth training sample sets at the oversampling ratio; For each of the oversampling ratios, use a first preset number of the fourth training sample sets to respectively train the support vector machine of the node, and obtain the fitness corresponding to the first preset number of trained support vector machines of the node; For each of the oversampling ratios, calculating an average value and a standard deviation of the fitness corresponding to a first preset number of trained support vector machines of the node; Determining an optimal oversampling ratio according to the average value of the fitness, the standard deviation of the fitness and the oversampling ratio; After taking the optimal oversampling ratio as the midpoint of the oversampling ratio interval and reducing the oversampling ratio interval and the step size, returning to the step of obtaining multiple oversampling ratios, and repeating all the above steps until the optimal oversampling ratio is obtained again; The fourth training sample set generated under the optimal oversampling ratio obtained again is used as the third training sample set.
5. The transformer fault diagnosis method according to claim 4, characterized in that: The step of generating a fourth training sample set of a first preset number under the oversampling ratio comprises: For each node, according to the two fault types corresponding to the support vector machine of the node, the number of samples of each fault type in the second training sample set corresponding to the node is counted, and divided into minority class samples and majority class samples; Calculating the Euclidean distance between each of the minority class samples and all other samples in the second training sample set, and screening to obtain a second preset number of neighboring samples of each of the minority class samples; Counting a first number of majority class samples in neighboring samples of each of the minority class samples; If the second preset number corresponding to the minority class samples is not equal to the first number, screening the minority class samples into a non-noise minority class sample set; Normalizing the first quantity of each sample in the non-noise minority class sample set by using a first formula to obtain a category index of each sample; Calculating the Euclidean distance between each sample in the non-noise minority class sample set and other samples in the non-noise minority class sample set, and screening to obtain a third preset number of neighboring samples of each sample; The second formula is used to normalize the average value of the Euclidean distance between each sample in the non-noise minority class sample set and a third preset number of neighboring samples to obtain a distance index for each sample; Calculate the number of newly added samples of the minority class using a third formula according to the number of the minority class samples, the number of the majority class samples and the oversampling ratio; For each sample in the non-noise minority class sample set, according to the category index of each sample, the distance index and the number of newly added samples of the minority class samples, a fourth formula is used to calculate the second number of oversampled samples generated by each sample; For each sample in the non-noise minority class sample set, randomly selecting a third number of samples from a third preset number of neighboring samples corresponding to each sample as auxiliary samples; For each sample in the non-noise minority class sample set, according to each sample and each corresponding auxiliary sample, a third number of oversampled samples generated by each sample is calculated using the fifth formula; Merging the third number of oversampled samples generated by each sample with the second training sample set to obtain a fourth training sample set for the node; Repeat the above process for a first preset number of times to obtain a first preset number of fourth training sample sets; The first formula is: ,in, Representation sample i The category index of Representation sample i The first quantity, , S represents the non-noise minority class sample set; The second formula is: ,in, Representation sample i The distance indicator, Representation sample i the average value of the Euclidean distances between the samples and the third preset number of neighboring samples; The third formula is: ,in, represents the number of new samples of minority class samples, Indicates the oversampling ratio, represents the number of minority class samples, Represents the number of majority class samples; The fourth formula is: ,in, Representation sample i a second number of oversampled samples generated; The fifth formula is: ,in, Representation sample i An oversampled sample is generated, Representation sample i , Representation sample i The corresponding auxiliary sample, r is a random number in the range [0,1].
6. The transformer fault diagnosis method according to claim 4, characterized in that: The step of determining the optimal oversampling ratio comprises: determining a maximum number of average values of said fitness; If the number of the largest average values of the fitness is one, the oversampling ratio corresponding to the largest average value of the fitness is used as the candidate oversampling ratio; If the number of the largest average values of the fitness is at least two, determining the number of standard deviations of the smallest fitness corresponding to the at least two largest average values of the fitness; If the number of the minimum standard deviation of the fitness is one, the oversampling ratio corresponding to the minimum standard deviation of the fitness is used as the candidate oversampling ratio; If the number of the minimum standard deviations of the fitness is at least two, the minimum oversampling ratio corresponding to the minimum standard deviation of the fitness is used as an alternative oversampling ratio; Determining whether the candidate oversampling ratio is an upper limit or a lower limit of an initial range of the oversampling ratio interval; If it is not the upper limit or the lower limit of the initial range of the oversampling ratio interval, taking the candidate oversampling ratio as the optimal oversampling ratio; If it is the upper limit of the initial range of the oversampling ratio interval, the difference between the upper limit of the initial range of the oversampling ratio interval and the initial value of the step size is taken as the optimal oversampling ratio; If it is the lower limit of the initial range of the oversampling ratio interval, the initial value of the step size is used as the optimal oversampling ratio.
7. The transformer fault diagnosis method according to claim 4, characterized in that: The lower limit of the reduced oversampling ratio interval is the difference between the initial value of the optimal oversampling ratio and the initial value of the step size, the upper limit of the reduced oversampling ratio interval is the sum of the initial value of the optimal oversampling ratio and the initial value of the step size, and the reduced step size is the product of the preset multiple and the initial value of the step size.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the transformer fault diagnosis method according to any one of claims 1 to 7 is implemented.
9. A transformer fault diagnosis system, characterized in that: include: The computer readable storage medium of claim 8.