Transformer fault detection method and system based on machine learning

By constructing a transformer fault diagnosis model based on support vector machines and optimizing its parameters, the problem of relying on expert experience and a single algorithm in existing transformer fault diagnosis technologies is solved, and higher diagnostic accuracy and detection reliability are achieved.

CN120832585APending Publication Date: 2025-10-24HOHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510950789.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

The transformer fault diagnosis method in the existing technology relies too much on expert experience and a single machine learning algorithm, resulting in inaccurate diagnostic prediction results.

Method used

A fault diagnosis model based on support vector machine is adopted. By combining data preprocessing and feature expansion, the parameters of support vector machine are optimized using the gravity search algorithm, and an optimized support vector machine model is constructed for transformer fault type diagnosis.

Benefits of technology

The accuracy of transformer fault diagnosis is improved, the reliance on human experience and manual parameter debugging is reduced, and efficient and reliable fault detection is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832585A_ABST
    Figure CN120832585A_ABST
Patent Text Reader

Abstract

The invention provides a transformer fault detection method and system based on machine learning, and relates to the technical field of transformer fault detection. Comprising the following steps: acquiring dissolved gas data in transformer oil, and constructing an original feature data set; performing data preprocessing and feature expansion on the original feature data set to generate an expanded feature data set; dividing the extended feature data set into a training set and a test set; constructing a fault diagnosis model based on a support vector machine according to the training set and the test set, and optimizing parameters of the support vector machine by adopting a gravitational search algorithm to obtain an optimized support vector machine model; and using the optimized support vector machine model to diagnose the fault type of the transformer to obtain a diagnosis prediction result. The method solves the problem that the traditional method in the prior art excessively depends on expert experience and a single machine learning algorithm, so that the accuracy of a transformer fault diagnosis prediction result is low.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of transformer fault detection, in particular to a transformer fault detection method and system based on machine learning. BACKGROUND

[0002] As the core equipment in the power system, the running state of the transformer directly affects the safety and stability of the entire power grid. At present, the transformer fault diagnosis technology mainly judges the running state of the transformer by detecting the content of characteristic gases such as H2, CH4, C2H6, C2H4 and C2H2 in the transformer oil. The traditional diagnosis methods include three-ratio method, Rogers method, David triangle method, etc. The traditional diagnosis methods mainly rely on expert experience and fixed judgment rules for diagnosis to determine the fault type. The traditional method excessively depends on expert experience, resulting in strong subjectivity and unstable diagnosis and prediction results.

[0003] With the rapid development of artificial intelligence technology, machine learning algorithms are widely used in the field of transformer fault diagnosis. Support vector machine (SVM), artificial neural network (ANN) and random forest (RF) algorithms have been introduced into transformer fault diagnosis. However, single machine learning algorithm often has problems such as difficulty in parameter selection and easy to fall into local optimum, resulting in inaccurate diagnosis and prediction results. SUMMARY

[0004] In order to overcome the shortcomings of the prior art, the purpose of the present application is to provide a transformer fault detection method and system based on machine learning, which solves the problem of low accuracy of transformer fault diagnosis and prediction results caused by excessive dependence on expert experience and single machine learning algorithm in the prior art.

[0005] To achieve the above purpose, the present application provides the following scheme:

[0006] A transformer fault detection method based on machine learning, comprising:

[0007] Collecting dissolved gas data in transformer oil to construct an original feature data set;

[0008] Data preprocessing and feature expansion are performed on the original feature data set to generate an expanded feature data set;

[0009] The expanded feature data set is divided into a training set and a test set;

[0010] A fault diagnosis model based on support vector machine is constructed according to the training set and the test set, and the parameters of the support vector machine are optimized by using the gravitational search algorithm to obtain an optimized support vector machine model;

[0011] The optimized support vector machine model is used to diagnose the transformer fault type, and a diagnosis prediction result is obtained.

[0012] Preferably, the original feature dataset is constructed by:

[0013] The gas concentration feature dataset and the fault type label dataset are determined.

[0014] Each gas concentration data in the gas concentration feature dataset is corresponded to the fault type label dataset to construct the original feature dataset.

[0015] The gas concentration feature dataset includes H2 concentration data, CH4 concentration data, C2H6 concentration data, C2H4 concentration data and C2H2 concentration data in transformer oil.

[0016] The fault type label dataset includes:

[0017] Normal state, low temperature overheating, medium temperature overheating, high temperature overheating, partial discharge, low energy discharge and high energy discharge.

[0018] Preferably, the original feature dataset is preprocessed and feature augmented to generate an extended feature dataset, including:

[0019] The original feature data is normalized to obtain normalized data.

[0020] According to the normalized data, the ratio features between each feature gas are calculated, including:

[0021] CH4 / H2, C2H4 / C2H6, C2H2 / C2H4, C2H2 / CH4 and C2H4 / CH4.

[0022] According to the normalized data, the statistical features of each feature gas are calculated, including total hydrocarbon content and the proportion of each gas in total hydrocarbon.

[0023] According to the normalized data, the original features are polynomial transformed to generate quadratic term features to construct nonlinear combination features.

[0024] The original features, ratio features, statistical features and nonlinear combination features are combined to form an extended feature dataset.

[0025] Preferably, a support vector machine-based fault diagnosis model is constructed according to the training set and the test set, and the parameters of the support vector machine are optimized by using a gravitational search algorithm to obtain an optimized support vector machine model.

[0026] The support vector machine model is initialized, and a radial basis kernel function is set.

[0027] According to the radial basis kernel function, a search range of support vector machine parameters to be optimized is determined, wherein the parameters to be optimized include a penalty parameter and a kernel function parameter;

[0028] A cross-validation accuracy rate of the training set is taken as a fitness function, the penalty parameter and the kernel function parameter are jointly optimized according to a gravitational search algorithm, and an optimal parameter combination is obtained through iteration;

[0029] The support vector machine is trained according to the training set and the optimal parameter combination, and an optimized support vector machine model is constructed;

[0030] The test set is input into the optimized support vector machine model, and a fault type prediction result and a corresponding confidence degree are output;

[0031] An expression of the optimized support vector machine model is as follows:

[0032]

[0033] wherein,

[0034]

[0035] z is an extended feature vector of a sample to be tested; z i yi is an extended feature of the ith support vector; y ki ∈{+1,-1} is a class label of the ith support vector in the kth one-versus-rest classifier; α ki and b k are a Lagrange multiplier and a bias obtained through training, respectively; γ is an inverse of a width of a radial basis kernel function; and σ is a temperature constant for mapping an SVM interval into a probability weight; is a fault type set, is an output fault type prediction result.

[0036] Preferably, the cross-validation accuracy rate of the training set is taken as the fitness function, the penalty parameter and the kernel function parameter are jointly optimized according to the gravitational search algorithm, and the optimal parameter combination is obtained through iteration, including:

[0037] The training set is evenly divided and an average classification accuracy rate is calculated, and the average accuracy rate is set as the only fitness evaluation index;

[0038] Based on the search range of the support vector machine parameters to be optimized, a plurality of particle initial positions are randomly generated, a maximum iteration number and a convergence threshold are set, and an initial position set of output particles and global control conditions are obtained;

[0039] Based on the fitness evaluation index, the gravitational search iteration is performed according to the initial position set of the particles and the global control conditions, and a global optimal particle position is determined;

[0040] According to the global optimal particle position, a corresponding optimal parameter combination is determined.

[0041] Preferably, the gravity search iteration is performed according to the initial particle position set and the global control condition based on the fitness evaluation index, to determine the global optimal particle position, including:

[0042] The initial particle position set is subjected to fitness evaluation to obtain a fitness set;

[0043] The fitness set is normalized as particle mass, and the composite acceleration and velocity of each particle are calculated according to the rules of the gravity search algorithm to obtain a velocity update amount;

[0044] According to the velocity update amount, a new position of the particle is obtained by position migration;

[0045] According to the new position of the particle and the original search interval, a reflection or truncation operation is performed on the out-of-bound position to determine the output corrected position to obtain the global optimal particle position.

[0046] Preferably, it further includes:

[0047] The test set is input into the optimized support vector machine model to obtain a corresponding fault type prediction result;

[0048] The fault type prediction result is compared with the true fault type label in the test set one by one, the number of correctly predicted samples and the total number of samples are counted, and the overall classification accuracy is calculated;

[0049] Based on the correspondence between the predicted label and the true label, a multi-classification confusion matrix is constructed;

[0050] According to the confusion matrix, the precision, recall and F1 score of each fault type are calculated respectively, and the global precision, global recall and global F1 score are obtained by weighted average of all fault types;

[0051] According to the confusion matrix and the global precision, global recall and global F1 score, the diagnosis effect of each type of fault is determined.

[0052] A transformer fault detection system based on machine learning, comprising:

[0053] A data set construction module is used to collect dissolved gas data in transformer oil and construct an original feature data set;

[0054] An expansion module is used to perform data preprocessing and feature expansion on the original feature data set to generate an expanded feature data set;

[0055] A division module is used to divide the expanded feature data set into a training set and a test set;

[0056] a model construction module, configured to construct a support vector machine-based fault diagnosis model according to the training set and the test set, and to optimize parameters of the support vector machine by using a gravitational search algorithm to obtain an optimized support vector machine model;

[0057] a diagnosis module, configured to diagnose a transformer fault type by using the optimized support vector machine model to obtain a diagnosis prediction result.

[0058] Preferably, the method further comprises:

[0059] a prediction module, configured to input the test set into the optimized support vector machine model to obtain a corresponding fault type prediction result;

[0060] an accuracy rate calculation module, configured to compare the prediction result with real fault type labels in the test set one by one, to count a number of correctly predicted samples and a total number of samples, and to calculate an overall classification accuracy rate;

[0061] a confusion matrix generation module, configured to construct a multi-classification confusion matrix based on a corresponding relationship between prediction labels and real labels;

[0062] an evaluation index calculation module, configured to calculate precision, recall and F1 score of each fault type according to the confusion matrix, and to obtain global precision, global recall and global F1 score by weighted average of all fault types;

[0063] a diagnosis effect analysis module, configured to determine diagnosis effects of various faults according to the confusion matrix and the global precision, the global recall and the global F1 score.

[0064] The present application discloses the following technical effects:

[0065] The application provides a transformer fault detection method and system based on machine learning, and the method comprises the following steps: collecting dissolved gas data in transformer oil, and constructing an original feature data set; performing data preprocessing and feature expansion on the original feature data set to generate an expanded feature data set; dividing the expanded feature data set into a training set and a test set; constructing a support vector machine-based fault diagnosis model according to the training set and the test set, and optimizing the parameters of the support vector machine by using a gravitational search algorithm to obtain an optimized support vector machine model; and using the optimized support vector machine model to diagnose the transformer fault type to obtain a diagnosis prediction result. The original data of the dissolved gas is normalized, the ratio and statistical characteristics are extracted, and the nonlinear combination is expanded, so that the feature information is more comprehensive; the penalty parameter and the kernel parameter of the support vector machine are jointly optimized by using the gravitational search algorithm, the model performance is automatically adjusted to the optimal on the basis of the cross-validation of the training set, and finally the optimized support vector machine model is used to complete the fault type discrimination on the test set, thereby improving the diagnosis accuracy, reducing the dependence on artificial experience and parameter manual debugging, and realizing efficient and reliable detection of the transformer fault. BRIEF DESCRIPTION OF DRAWINGS

[0066] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0067] Figure 1 A flowchart of a transformer fault detection method based on machine learning is provided for the embodiments of the present application. DETAILED DESCRIPTION

[0068] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0069] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.

[0070] As shown in Figure 1 The present application provides a transformer fault detection method based on machine learning, which comprises the following steps:

[0071] Step 100: collect dissolved gas data in transformer oil, and construct an original feature data set;

[0072] Step 200: data preprocessing and feature expansion are performed on the original feature data set to generate an expanded feature data set;

[0073] Step 300: the expanded feature data set is divided into a training set and a test set;

[0074] Step 400: a support vector machine-based fault diagnosis model is constructed according to the training set and the test set, and the parameters of the support vector machine are optimized by using a gravitational search algorithm to obtain an optimized support vector machine model;

[0075] Step 500: the optimized support vector machine model is used to diagnose the transformer fault type, and a diagnosis prediction result is obtained.

[0076] Further, the original feature data set is constructed:

[0077] The gas concentration feature data set and the fault type label data set are determined;

[0078] Each gas concentration data in the gas concentration feature data set is corresponded to the fault type label data set to construct the original feature data set;

[0079] The gas concentration feature data set includes H2 concentration data, CH4 concentration data, C2H6 concentration data, C2H4 concentration data and C2H2 concentration data in transformer oil;

[0080] The fault type label data set includes:

[0081] Normal state, low temperature overheating, medium temperature overheating, high temperature overheating, partial discharge, low energy discharge and high energy discharge.

[0082] Specifically, the dissolved gas original data is collected:

[0083] Data source: the dissolved gas online monitoring device in transformer oil periodically outputs the concentration values of five gases of hydrogen, methane, ethane, ethylene and acetylene, and the concentration unit is unified as microliters per liter; the sampling period is automatically adjusted between one to three hours to ensure high-density sampling during the accident period.

[0084] Timestamp synchronization: the monitoring device is synchronized with the station clock to the second level of accuracy, and each record is attached with an absolute timestamp, which is used as a subsequent pairing anchor point with the fault label.

[0085] Fault type label generation:

[0086] The basis for sure: the use of parallel installation of partial discharge monitor, winding temperature detector and relay action record, the comprehensive diagnosis of transformer operation state; when any kind of high credibility diagnostic means determines that the transformer enters abnormal working condition, a label event is generated.

[0087] Label granularity: this embodiment adopts the "event driven + stable window" strategy. After determining the occurrence of the event, all gas concentration records within the previous and next thirty minutes are extracted and assigned the same fault type label to avoid labeling noise caused by transient drift.

[0088] Data pairing and integrity check:

[0089] Mapping mechanism: first, take the timestamp as the key value, hash match the gas concentration record with the fault label in the event window; if the same time point falls into multiple event windows, the priority is high energy discharge, partial discharge, high temperature overheating, medium temperature overheating, low temperature overheating, normal state in turn, to ensure the uniqueness of the label.

[0090] Missing elimination: if the concentration of two or more of the five gases is missing, or the record time deviates from the event window by more than five seconds, it is determined as unusable data and directly eliminated to prevent sample distortion.

[0091] Extreme value filtering: for any gas concentration exceeding the upper limit of the device range or below zero in a single record, automatic alarm is executed and written into the log, but does not participate in data set construction.

[0092] Original feature data set generation:

[0093] Through the above mapping and checking, the sample row vector set with the structure of 〈H2, CH4, C2H6, C2H4, C2H2, label〉 can be obtained. To ensure the balance of the samples, each type of fault is randomly down-sampled or up-sampled to approximately the same number, and finally the original feature data set which can be directly input into the preprocessing module is formed.

[0094] Further, the original feature data set is preprocessed and the feature is expanded to generate an extended feature data set, including:

[0095] The original feature data is normalized to obtain normalized data;

[0096] According to the normalized data, the ratio features between each feature gas are calculated, including:

[0097] CH4 / H2, C2H4 / C2H6, C2H2 / C2H4, C2H2 / CH4, C2H4 / CH4;

[0098] According to the normalization data, statistical features of each characteristic gas are calculated, the statistical features including total hydrocarbon content, proportion of each gas in total hydrocarbon;

[0099] According to the normalization data, polynomial transformation is performed on the original features to generate quadratic term features to construct nonlinear combination features;

[0100] The original features, ratio features, statistical features and nonlinear combination features are combined to form an extended feature dataset.

[0101] Specifically, the ratio feature construction includes:

[0102] Selecting the ratio: according to IEC60599 and Duval triangle diagnostic rules, CH4 / H2, C2H4 / C2H6, C2H2 / C2H2, C2H 2 / CH4, C2H4 / CH4 five groups of ratio highly related to fault mode.

[0103] Robustness: if the denominator of the ratio is less than 0.01 μL / L, it is smoothed to 0.01, and the ratio is calculated, and the result is taken logarithm to avoid abnormal amplification.

[0104] Total hydrocarbon content: the concentrations of the five gases are directly summed up to obtain a single total amount index.

[0105] Component proportion: the concentration of a single gas is divided by the total hydrocarbon content (plus ε to prevent division by zero) to obtain five proportion values.

[0106] Optional information entropy: the entropy value can be further calculated through the component proportion, which is used to measure the degree of chaos of gas distribution and verify whether to be included in the model after verification.

[0107] Quadratic term feature generation:

[0108] Self-multiplication term: square operation is performed on the five original concentrations respectively to obtain five-dimensional self-multiplication features.

[0109] Interaction term: the product of the concentrations of any two different gases is formed to form ten-dimensional interaction features.

[0110] Collinearity control: if the linear correlation degree of a certain interaction feature with the original feature is too high (the correlation coefficient exceeds 0.98), it is removed in the post-processing stage to prevent overfitting caused by high-dimensional redundancy.

[0111] Further, according to the training set and the test set, a fault diagnosis model based on support vector machine is constructed, and the parameters of the support vector machine are optimized by using the gravitational search algorithm to obtain an optimized support vector machine model:

[0112] Initializing the support vector machine model and setting the radial basis kernel function;

[0113] determine a search range of parameters to be optimized of the support vector machine according to the radial basis kernel function, wherein the parameters to be optimized include a penalty parameter and a kernel function parameter;

[0114] perform joint optimization of the penalty parameter and the kernel function parameter according to the gravitational search algorithm with cross-validation accuracy of the training set as a fitness function, and iteratively obtain an optimal parameter combination;

[0115] train the support vector machine according to the training set and the optimal parameter combination, and construct an optimized support vector machine model;

[0116] input the test set into the optimized support vector machine model, and output a fault type prediction result and a corresponding confidence level;

[0117] An expression of the optimized support vector machine model is as follows:

[0118]

[0119] wherein,

[0120]

[0121] z is an extended feature vector of a sample to be tested; z i yi is an extended feature of the ith support vector; y ki ei is a class label of the ith support vector in the kth one-versus-all classifier; α ki and b k are a Lagrange multiplier and a bias obtained by training, respectively; γ is an inverse of a width of a radial basis kernel function; and σ is a temperature constant for mapping an SVM interval into a probability weight; is a fault type set, is an output fault type prediction result.

[0122] Further, the joint optimization of the penalty parameter and the kernel function parameter according to the gravitational search algorithm with the cross-validation accuracy of the training set as the fitness function, and the iteratively obtaining of the optimal parameter combination, include:

[0123] perform average division of the training set and calculate an average classification accuracy, and set the average accuracy as a unique fitness evaluation index;

[0124] based on the search range of the parameters to be optimized of the support vector machine, randomly generate a plurality of sets of initial positions of particles, and set a maximum number of iterations and a convergence threshold to obtain an initial position set of output particles and global control conditions;

[0125] based on the fitness evaluation index, perform gravitational search iteration according to the initial position set of the particles and the global control conditions to determine a global optimal particle position.

[0126] According to the global optimal particle position, a corresponding optimal parameter combination is determined.

[0127] Further, the gravity search iteration is performed according to the initial particle position set and the global control condition based on the fitness evaluation index to determine the global optimal particle position, including:

[0128] The fitness of the initial particle position set is evaluated to obtain a fitness set;

[0129] The fitness set is normalized as the particle mass, and the composite acceleration and velocity of each particle are calculated according to the gravity search algorithm rule to obtain a velocity update amount;

[0130] The position migration is performed according to the velocity update amount to obtain a new position of the particle;

[0131] According to the new position of the particle and the original search interval, a reflection or truncation operation is performed on the out-of-bound position to determine the output corrected position to obtain the global optimal particle position.

[0132] Specifically, the penalty coefficient C and the radial basis kernel width γ of the support vector machine are uniformly coded by using two-dimensional particle positions; both parameters are defined in a logarithmic scale search interval. First, the complete training set is divided into five equal parts, and the average classification accuracy is obtained by performing five-fold cross-validation on each parameter combination. This average accuracy is used as the only fitness value of a single particle. Then, thirty particle initial positions are randomly and uniformly generated, the maximum number of iterations is set to sixty, the early convergence threshold is set to 0.1% when the global accuracy continuously improves for eight rounds, and an exponentially decaying gravitational constant is used as the global control condition. After entering the iteration stage, the system first performs cross-validation on all particles to obtain a fitness set, which is normalized into particle mass according to the fitness, and then the composite acceleration and velocity of each particle are calculated according to the gravity search algorithm rule. When the particle position is migrated according to the velocity update amount, if the new position exceeds the original search interval, a reflection or truncation is performed on the out-of-bound dimension to maintain feasibility. After completing the position update, the fitness is immediately re-evaluated and the global optimal particle record is refreshed. When the early convergence or the number of iterations is exhausted, the C and γ corresponding to the current global optimal particle position are taken as the optimal parameter combination, which is written into the model configuration file for subsequent training and deployment. This process drives the entire gravity search process through the single indicator of five-fold average accuracy, fully ensuring that the optimization target is clear, the convergence criterion is objective, and the implementation steps are programmable.

[0133] Further, it further includes:

[0134] The test set is input into the optimized support vector machine model to obtain the corresponding fault type prediction result;

[0135] The fault type prediction result is compared with the true fault type label in the test set one by one, the number of correctly predicted samples and the total number of samples are counted, and the overall classification accuracy is calculated;

[0136] Based on the correspondence between the predicted label and the true label, a multi-classification confusion matrix is constructed.

[0137] According to the confusion matrix, the precision, recall and F1 score of each fault type are calculated respectively, and the global precision, recall and F1 score are obtained by weighted average of all fault types;

[0138] According to the confusion matrix and the global precision, recall and F1 score, the diagnosis effect of each type of fault is determined.

[0139] Specifically, sample comparison and overall accuracy:

[0140] Correctness count: the system compares the predicted label with the true label by index in memory, and uses integer accumulators to count the "number of correctly predicted samples" and "total number of samples", respectively, to calculate the overall classification accuracy in real time and write it into the log; This accuracy is one of the reference benchmarks for setting the weight coefficient later.

[0141] Confusion matrix construction:

[0142] Coordinate mapping: a fixed order row-column index is established for the seven fault types (normal state, low temperature overheating, medium temperature overheating, high temperature overheating, partial discharge, low energy discharge and high energy discharge), to ensure that different experiments can be compared horizontally.

[0143] Counting strategy: use sparse matrix accumulation method to add one to the unit value of the row index of "true type" and the column index of "predicted type", to avoid performance bottleneck caused by double loop.

[0144] Single-class index calculation:

[0145] Precision (Precision): based on the column of a certain fault type in the confusion matrix, calculate the ratio of "true positive number" to "total number of predicted as this type"; if the denominator is zero, return the default value -1 to prompt insufficient samples.

[0146] Recall (Recall): based on the same fault type in the confusion matrix, calculate the ratio of "true positive number" to "total number of true", which is used to measure the risk of missed detection.

[0147] F1 score: use harmonic average form to ensure that when one of the precision and recall is high and the other is low, a balanced evaluation can still be given.

[0148] Global weighted summary:

[0149] Weight source: directly use the proportion of each fault type in the real sample in the test set as the weight, avoid artificial adjustment to cover the difficulty difference caused by sample imbalance.

[0150] Weighting process: multiply the single-class precision, recall, and F1 score by the corresponding weight and sum them up to get the global precision, recall, and F1 score; write the three indicators in the configuration file version header at the same time, which is convenient for automatic backtracking.

[0151] Diagnosis effect determination and threshold management:

[0152] Determination rule: if the global F1 score is greater than or equal to 0.90 and the minimum recall rate of the seven types of faults is greater than or equal to 0.80, it is marked as "production deployable"; otherwise, enter the "model retraining" process and record the weak fault type.

[0153] Error analysis: the system automatically extracts the three pairs of fault types with the highest misjudgment rate in the confusion matrix and outputs them to the analysis report for engineers to locate the reason for the overlap of gas characteristics.

[0154] Compliance archive: the final evaluation result together with the model file, confusion matrix and calculation script form an unalterable hash snapshot in the object storage, meeting the operation and maintenance audit and patent embodiment reproduction needs.

[0155] The embodiment also provides a transformer fault detection system based on machine learning, comprising:

[0156] A data set construction module is configured to collect dissolved gas data in transformer oil and construct an original feature data set;

[0157] An expansion module is configured to perform data preprocessing and feature expansion on the original feature data set to generate an expanded feature data set;

[0158] A division module is configured to divide the expanded feature data set into a training set and a test set;

[0159] A model construction module is configured to construct a support vector machine-based fault diagnosis model according to the training set and the test set, and to optimize parameters of the support vector machine by using a gravitational search algorithm to obtain an optimized support vector machine model;

[0160] A diagnosis module is configured to diagnose a transformer fault type by using the optimized support vector machine model to obtain a diagnosis prediction result.

[0161] Further, it further comprises:

[0162] A prediction module is configured to input the test set into the optimized support vector machine model to obtain a corresponding fault type prediction result;

[0163] An accuracy calculation module is configured to compare the prediction results with real fault type labels in a test set one by one, count the number of correct prediction samples and the total number of samples, and calculate the overall classification accuracy.

[0164] A confusion matrix generation module is configured to construct a multi-classification confusion matrix based on the correspondence between the prediction labels and the real labels.

[0165] An evaluation index calculation module is configured to calculate the precision, recall and F1 score of each fault type according to the confusion matrix, and perform weighted average on all fault types to obtain the global precision, global recall and global F1 score.

[0166] A diagnosis effect analysis module is configured to determine the diagnosis effect of each type of fault according to the confusion matrix and the global precision, global recall and global F1 score.

[0167] In the specification, each embodiment is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same or similar parts of each embodiment can be referred to each other.

[0168] The principles and implementation manners of the present application are described by applying specific examples in this paper. The above description of the embodiments is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manner and application range can be changed. In conclusion, the content of the specification should not be understood as a limitation of the present application.

Claims

1. A machine learning based transformer fault detection method, characterized by, The method comprises the following steps: Collecting dissolved gas data in transformer oil to construct an original feature data set; Performing data preprocessing and feature expansion on the original feature data set to generate an expanded feature data set; Dividing the expanded feature data set into a training set and a test set; Constructing a support vector machine-based fault diagnosis model according to the training set and the test set, and optimizing parameters of the support vector machine by using a gravitational search algorithm to obtain an optimized support vector machine model; Diagnosing the fault type of the transformer by using the optimized support vector machine model to obtain a diagnosis prediction result.

2. The method of claim 1, wherein, The original feature data set is constructed by: Determining a gas concentration feature data set and a fault type label data set; Corresponding each gas concentration data in the gas concentration feature data set to the fault type label data set to construct the original feature data set; The gas concentration feature data set comprises H2 concentration data, CH4 concentration data, C2H6 concentration data, C2H4 concentration data and C2H2 concentration data in the transformer oil; The fault type label data set comprises: Normal state, low-temperature overheating, medium-temperature overheating, high-temperature overheating, partial discharge, low-energy discharge and high-energy discharge.

3. The method of claim 1, wherein, The data preprocessing and feature expansion on the original feature data set to generate the expanded feature data set comprise: Performing normalization processing on the original feature data to obtain normalized data; According to the normalized data, calculating ratio features between each feature gas, wherein the ratio features comprise: CH4 / H2, C2H4 / C2H6, C2H2 / C2H4, C2H2 / CH4 and C2H4 / CH4; According to the normalized data, calculating statistical features of each feature gas, wherein the statistical features comprise total hydrocarbon content and the proportion of each gas in the total hydrocarbon; According to the normalized data, performing polynomial transformation on the original feature to generate a quadratic term feature to construct a nonlinear combination feature; Combining the original feature, the ratio feature, the statistical feature and the nonlinear combination feature to form the expanded feature data set.

4. The method of claim 1, wherein, The support vector machine-based fault diagnosis model is constructed according to the training set and the test set, and the parameters of the support vector machine are optimized by using the gravitational search algorithm to obtain the optimized support vector machine model: Initializing the support vector machine model and setting a radial basis kernel function; According to the radial basis kernel function, determining a search range of the support vector machine parameters to be optimized, wherein the parameters to be optimized comprise a penalty parameter and a kernel function parameter; Taking the cross-validation accuracy rate of the training set as a fitness function, jointly optimizing the penalty parameter and the kernel function parameter according to the gravitational search algorithm to obtain an optimal parameter combination through iteration; Training the support vector machine according to the training set and the optimal parameter combination to construct the optimized support vector machine model; Inputting the test set into the optimized support vector machine model to output a fault type prediction result and a corresponding confidence degree; The expression of the optimized support vector machine model is: Wherein, z is the extended feature vector of the sample to be tested; z i is the extended feature of the ith support vector; y ki ∈{+1,-1} is the class label of the ith support vector in the kth one-versus-all classifier; α ki and b k are the Lagrange multipliers and bias obtained by training, respectively; γ is the inverse of the width of the radial basis kernel function; σ is the temperature constant that maps the SVM margin into probability weights; is the set of fault types, is the output fault type prediction result.

5. The method of claim 4, wherein, Taking the cross-validation accuracy rate of the training set as a fitness function, jointly optimizing the penalty parameter and the kernel function parameter according to the gravitational search algorithm to obtain an optimal parameter combination through iteration, comprises: The training set is evenly divided and the average classification accuracy is calculated, and the average accuracy is set as the only fitness evaluation index; Based on the search range of the support vector machine parameters to be optimized, a plurality of sets of initial particle positions are randomly generated, and a maximum number of iterations and a convergence threshold are set to obtain an initial position set of output particles and global control conditions; Based on the fitness evaluation index, the initial position set of particles and the global control conditions are used for gravity search iteration to determine the global optimal particle position; The corresponding optimal parameter combination is determined according to the global optimal particle position.

6. The method of claim 5, wherein the method further comprises: Based on the fitness evaluation index, the initial position set of particles and the global control conditions are used for gravity search iteration to determine the global optimal particle position, including: The initial position set of particles is evaluated for fitness to obtain a fitness set; The fitness set is normalized to particle mass, and the composite acceleration and velocity of each particle are calculated according to the rules of the gravity search algorithm to obtain a velocity update amount; The new position of the particle is obtained by position migration according to the velocity update amount; The reflection or truncation operation is performed on the out-of-bound position according to the new position of the particle and the original search interval to determine the corrected position to obtain the global optimal particle position.

7. The method of claim 5, wherein the method further comprises: Further comprising: The test set is input into the optimized support vector machine model to obtain the corresponding fault type prediction result; The prediction result and the true fault type label in the test set are compared one by one to count the number of correctly predicted samples and the total number of samples, and the overall classification accuracy is calculated; Based on the correspondence between the predicted label and the true label, a multi-classification confusion matrix is constructed; According to the confusion matrix, the precision, recall and F1 score of each fault type are calculated respectively, and the global precision, global recall and global F1 score are obtained by weighted average of all fault types; According to the confusion matrix and the global precision, global recall and global F1 score, the diagnosis effect of each type of fault is determined.

8. A machine learning based transformer fault detection system, characterized in that, Comprising: A data set construction module for collecting dissolved gas data in transformer oil and constructing an original feature data set; An expansion module for data preprocessing and feature expansion of the original feature data set to generate an expanded feature data set; A division module for dividing the expanded feature data set into a training set and a test set; A model construction module for constructing a support vector machine-based fault diagnosis model according to the training set and the test set, and optimizing the parameters of the support vector machine using the gravity search algorithm to obtain an optimized support vector machine model; A diagnosis module for diagnosing the transformer fault type using the optimized support vector machine model to obtain a diagnosis prediction result.

9. The machine learning based transformer fault detection system of claim 8, wherein, Further comprising: A prediction module for inputting the test set into the optimized support vector machine model to obtain the corresponding fault type prediction result; An accuracy calculation module for comparing the prediction result with the true fault type label in the test set one by one to count the number of correctly predicted samples and the total number of samples, and calculate the overall classification accuracy; A confusion matrix generation module for constructing a multi-classification confusion matrix based on the correspondence between the predicted label and the true label; An evaluation index calculation module is configured to calculate the precision, recall and F1 score of each fault type according to the confusion matrix, and to obtain the global precision, global recall and global F1 score by weighted average of all fault types. A diagnosis effect analysis module is configured to determine the diagnosis effect of each fault type according to the confusion matrix and the global precision, global recall and global F1 score.