Data expansion and optimization method and equipment for transformer fault diagnosis
Through the data expansion and optimization method combined with CGAN and factor analysis, the data imbalance problem in transformer fault diagnosis is solved, invalid information is eliminated, data quality and model performance are improved, and the accuracy and classification accuracy of fault diagnosis are significantly improved.
Patent Information
- Application Number
- CN202411333418.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-09-24
AI Technical Summary
The existing data augmentation method for transformer fault diagnosis will retain invalid information in the data generated, resulting in a decline in data quality and affecting the performance of machine learning models. Especially when dealing with data imbalance, it is difficult to improve the identification of rare fault types. Accuracy.
Data augmentation using conditional generative adversarial network (CGAN) is used to expand data, and feature dimensionality reduction is performed through factor analysis to extract key features; then, through data optimization methods of multi-neighbor sample discrimination and normalized distance measurement, the duplication in the expanded data set is eliminated Data, boundary data and low-quality data, build the final data set for training convolutional neural networks (CNNs) for troubleshooting.
It effectively solves the problem of data imbalance, significantly improves the accuracy and classification performance of fault diagnosis, especially the recognition accuracy on a few types of data, and improves the robustness and adaptability of the model.
Smart Images

Figure CN119179899A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of transformer fault diagnosis, and in particular relates to a data processing method and device for transformer fault diagnosis. Background Art
[0002] As a key device in the power grid system, the oil-immersed transformer undertakes the important task of power conversion and transmission. Its health status is directly related to the safe and stable operation of the power grid system. Therefore, timely and accurate diagnosis of potential faults of the transformer is of vital importance for preventing power accidents, ensuring power supply safety and improving the reliability of the power system. Among the many transformer fault diagnosis methods, dissolved gas analysis (DGA) technology is a widely recognized and applied technology. This technology can effectively identify and predict the fault type of the transformer by analyzing the type and content of dissolved gas in the insulating oil of the transformer, because different fault types correspond to different gas generation modes.
[0003] With the rapid development of data science and artificial intelligence technology, machine learning, as an important branch, has shown great potential in dealing with complex data analysis and pattern recognition problems. Applying machine learning to DGA-based transformer fault diagnosis can further improve the accuracy and efficiency of fault diagnosis. By learning from a large amount of historical DGA data, the machine learning model can automatically identify the key features and complex patterns of fault diagnosis, thereby achieving rapid and accurate prediction of potential transformer faults. It is well known that sufficient data is required to train a machine learning model with good performance, and the amount of data in each category should be balanced. However, in real application scenarios, the probability of transformer failure is relatively low, and it is not easy to obtain sufficient fault data. In addition, affected by factors such as the transformer's own structure and working environment, some fault types are relatively rare, and the corresponding fault data are relatively scarce, while some fault types occur frequently, and the corresponding fault data are relatively abundant. This unbalanced data distribution will affect the training of the machine learning model, resulting in a significant decrease in its performance in identifying rare fault types. Therefore, neither the total data volume nor the balance between the data volumes of each fault type can meet the requirements of training a machine learning model with good performance. This leads to low accuracy in transformer fault diagnosis. More importantly, rare fault types in transformers are often more hidden, more destructive, and have more serious consequences. How to solve the data imbalance problem and improve the recognition accuracy of machine learning models on rare fault types, that is, to improve its classification accuracy on the corresponding smaller number of fault data, has become one of the key challenges to improving the diagnosis effect of transformer faults.
[0004] At present, undersampling, oversampling and cost-sensitive methods are the main methods for dealing with data imbalance. Among them, undersampling balances the proportion of each category in the data set by reducing the data in the category with a large amount of data (majority class data). The advantage of undersampling is that it reduces the total data volume of the data set and reduces the training time of the machine learning model. However, if some data are deleted at will, it will lead to data loss, destroy the data distribution, and affect the performance of the machine learning model. In transformer fault diagnosis, the volume of the fault data set is relatively small, so it is not suitable to use undersampling. The oversampling rule is to sample the data of the category with a small amount of data (minority class data) multiple times to increase the data volume of this category. The advantage of oversampling is that it increases the total data volume of the data set, but it also increases the training time of the machine learning model. In addition, if the same data is sampled multiple times, it will lead to overfitting and reduce the generalization ability of the machine learning model. The cost-sensitive method will increase the misclassification cost of minority class data, and its advantage is that it strengthens the learning effect of minority class data. However, this method requires setting the cost-sensitive matrix in advance, but it is difficult to set a suitable cost-sensitive matrix in real application scenarios.
[0005] In real-world application scenarios, data augmentation methods can also be used to solve the problem of data imbalance, especially for data sets with relatively small volumes. On the one hand, this method can increase the total amount of data in the data set, and on the other hand, it can expand the number of minority class data to balance the proportion of each category in the data set. Typical data augmentation methods include synthetic minority oversampling technology (SMOTE) and generative adversarial networks (GAN). SMOTE is mainly for minority class data, using the nearest neighbor algorithm to calculate the K nearest neighbors of each data in the category, and then arbitrarily selects N data for linear interpolation. On this basis, the newly generated data is added to the original data set to establish a new data set. GAN is a deep learning network model designed to solve the problem of generative modeling. The model is mainly composed of a generator and a discriminator. The goal of the generator is to generate new data similar to real data, while the goal of the discriminator is to distinguish between the new data generated by the generator and the real data. This process of confrontation between the generator and the discriminator enables the generator to gradually learn to generate more realistic data. Thus, the generator can be used to generate new data that approximates the minority class data. On this basis, the newly generated data is added to the original data set to create a new data set.
[0006] Many scholars have conducted relevant research and applied it to solve fault diagnosis problems, including transformer fault diagnosis. For example, Chen et al. proposed a Sequential Ensembled Extreme Learning Machine (SE-ELM) to solve the data imbalance problem in transformer fault diagnosis. It is essentially a novel undersampling method that achieves a balanced proportion of each category in the data set by processing the majority class data in sequence. Gao et al. used an effective digital oversampling method to balance the data volume of fault data and avoid invalid data to solve the data imbalance problem in complex equipment fault diagnosis. Zhu et al. proposed a synthetic minority sampling technique (SMOTE) based on K-medoid to generate work daily data with a small amount of data to solve the data imbalance problem in industrial process fault diagnosis. Kari et al. proposed an improved auxiliary classifier generative adversarial network (ACGAN) to solve the data imbalance problem in transformer fault diagnosis. It uses a multi-layer perceptron network as its discriminator to solve the problem of discriminator losing important data features when the network is too complex and the number of network layers is too large. Ren et al. proposed a few-shot GAN to solve the data imbalance problem in industrial machinery health management. It first pre-trains GAN using majority class data, and then develops a fine-tuning strategy based on anchor samples to make the generated data close to the real data on the one hand, and retain as much of the learned complex data distribution as possible on the other hand. Zhang et al. proposed a new imbalanced fault diagnosis method based on enhanced generative adversarial network to address the data imbalance problem in mechanical equipment fault diagnosis. It uses the spectrum normalization (SN) strategy to design a new discriminator and develops an enhanced Wasserstein GAN with gradient penalty to reduce the loss caused by the lack of real fault data and improve the quality of new data. Yang et al. used multiple generative adversarial networks to generate various fault data for harmonic drive fault diagnosis, and carefully designed a data selection module to filter and purify these data. On this basis, they combined the filtered generated data with the real data to establish a balanced dataset.
[0007] Although the existing data balancing or data augmentation methods for transformer fault diagnosis have alleviated the problem of data imbalance to a certain extent, there are still some problems. First, most of these methods do not perform feature selection or feature dimensionality reduction before data balancing or data augmentation. There may be irrelevant or redundant information in the original data set. If it is not effectively processed, it will cause the newly generated data to continue to retain this information, which will reduce the quality of the newly generated data and reduce the effectiveness of the established new data set. Feature selection and feature dimensionality reduction are key steps in data preprocessing. They can effectively reduce the complexity of the data, remove irrelevant or redundant features, and enable the model to focus more on features closely related to fault diagnosis. For example, the SE-ELM proposed by Chen et al. balances the data set by undersampling, but does not perform feature selection before that, which may result in a high degree of redundancy in the generated data. Similarly, the digital oversampling method proposed by Gao et al. and the K-medoid-based SMOTE method proposed by Zhu et al. did not consider feature selection or feature dimensionality reduction when augmenting minority class data, which may result in noisy data in the generated data set, increase the difficulty of model training, and may affect the robustness and generalization ability of the model. Secondly, although GAN and its variants are widely used to generate data, few studies have used the more advanced technology of conditional generative adversarial networks (CGAN). CGAN is a technology that can add conditional information to the data generation process, making the generated data more in line with specific needs and conditions, with higher quality and diversity. For example, although the ACGAN proposed by Kari et al. improved the structure of the discriminator, it still did not fully utilize the advantages of conditional generation, resulting in the generated data being inaccurate or biased in some cases. Although the few-shot GAN of Ren et al. adopted an anchor sample fine-tuning strategy, if CGAN is introduced, this fine-tuning strategy can more effectively generate high-quality data that meets specific conditions, thereby further improving the accuracy of fault diagnosis. Finally, in existing studies, the new datasets established after data balancing or data expansion are usually not effectively optimized, and often contain some noise data, boundary data, low-quality data, etc. These data may have an adverse effect on the training process of the model, resulting in a decrease in the robustness of the model. For example, although Yang et al. used multiple generative adversarial networks to generate fault data in harmonic drive fault diagnosis and designed a data selection module to filter and purify the generated data, most other studies did not perform similar optimization processing on the generated data. Summary of the invention
[0008] The present invention aims to solve the problem that invalid information is retained in the data generated by the existing data expansion method for transformer fault diagnosis, which may lead to a decrease in data quality.
[0009] A data expansion and optimization method for transformer fault diagnosis comprises the following steps:
[0010] S100, for the minority class data in the second original data set, using the CGAN network to expand to obtain an expanded data set; the second original data set is a data set corresponding to the data features for transformer fault diagnosis determined based on the concentration of hydrocarbon gas in the transformer fault; the minority class data refers to a data class in which the number of a certain class of data in the data set is less than K% of the mean number of all class data; the CGAN network is a conditional generative adversarial network;
[0011] S200, optimizing the expanded data set, including the following steps:
[0012] Step 1: Use statistical methods to calculate duplicate data in the expanded data set, retain one copy of the duplicate data, and remove the redundant duplicate data;
[0013] Step 2: Use support vector machine to classify the expanded data set processed in step 1, count the wrongly classified data, and construct an incorrectly classified data set; traverse each data in the incorrectly classified data set, count the categories of the five neighboring data of each data, and perform majority voting on the five categories. The voting category is called the majority category of the data; if the data's own category is inconsistent with the majority category, the data is considered to be boundary data and deleted;
[0014] Step 3: Get the data set after removing duplicate data and boundary data, which is called the transition data set; count the number of data in each category in the transition data set, and determine the category with the least amount of data, which is called the reference category. The amount of data it contains is called the reference number, expressed as R_num;
[0015] Step 4: Normalize the transition data set and limit all of them to the range of [0,1];
[0016] Step 5: Use K-means to determine the center x of the data of other categories in the transition data set except the reference category cen_i , i is the serial number of the category;
[0017] Step 6: Calculate the Euclidean distance from each data point in each category except the reference category to the corresponding center i is the serial number of the category, j is the serial number of each data in each category; according to the Euclidean distance, each data in each category is sorted in descending order;
[0018] Step 7: For the data of other categories except the reference category in the transition data set, delete the data with the highest ranking in turn according to the ranking of each data in each category until the number of data in the current category is consistent with R_num;
[0019] Step 8: The output data set is called the final data set.
[0020] A data expansion and optimization device for transformer fault diagnosis, the device comprising a processor and a memory, the memory storing at least one instruction, the at least one instruction being loaded and executed by the processor to implement the data expansion and optimization method for transformer fault diagnosis.
[0021] Beneficial effects:
[0022] The present invention preprocesses the original DGA data by factor analysis, performs feature dimension reduction and extracts key features, thereby simplifying data complexity and improving feature representativeness. By introducing category labels as conditional information, data that conforms to the distribution of minority class data is generated, and the number of each type of data in the data set is successfully balanced; then duplicate data, boundary data and low-quality data in the expanded data set are eliminated to ensure the purity and effectiveness of the data set. Therefore, the present invention can effectively solve the problem that the data generated by the existing data expansion method for transformer fault diagnosis retains invalid information, which will lead to a decrease in data quality. It has been verified that the present invention performs well in processing data imbalance problems, thereby significantly improving the accuracy of fault diagnosis, especially the classification performance on minority class data. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of the structure of CGAN;
[0024] Figure 2 It is a schematic diagram of the structure of CNN;
[0025] Figure 3 A schematic diagram of the data expansion and optimization process for transformer fault diagnosis;
[0026] Figure 4 The average F1 score achieved by the machine learning model on the original data set;
[0027] Figure 5 The scree plot for the twenty-one common factors;
[0028] Figure 6 This is the heat map after common factor rotation;
[0029] Figure 7 is the average F1 score obtained by the machine learning model on the second original data set;
[0030] Figure 8 Schematic diagram of the training process of CGAN;
[0031] Fig. 9 It is the loss function curve of the generator and the discriminator;
[0032] Fig.10 To generate the NLL graph of the data and the real data;
[0033] Fig.11 The average F1 score of the machine learning model on the expanded dataset;
[0034] Fig.12 It is the average F1 score achieved by the machine learning model on the final dataset. DETAILED DESCRIPTION
[0035] Based on the existing research on transformer fault diagnosis based on machine learning and DGA, in view of the shortcomings of the existing data balance or data expansion methods for transformer fault diagnosis, the present invention proposes a data expansion and optimization method based on conditional generative adversarial network and convolutional neural network for transformer fault diagnosis. First, in order to reduce the redundant information in the original data set and extract key features, the factor analysis method is used to convert the multidimensional gas features into factor features with slightly lower dimensions. This process not only effectively reduces the dimension of the data and reduces the computational complexity, but also retains and transforms key information, making the generated data more representative and effective. This feature conversion process lays a solid foundation for subsequent data generation and fault diagnosis. Secondly, CGAN is used to generate new data and construct a new data set. By introducing conditional information, CGAN can perform more precise control in the data generation process and generate data samples that are more in line with specific fault modes and conditions, thereby making up for the shortcomings of traditional GAN methods in data generation. This improvement helps to solve the common data imbalance problem in transformer fault diagnosis, provide more diverse training data, and improve the robustness of the model in dealing with complex fault conditions. Then, the present invention also proposes a data optimization method, which is also a data filtering method, to identify and eliminate duplicate data, boundary data and low-quality data in the new data set, and balance the amount of data in each category in the data set again. This process significantly improves the overall quality of the generated data, so that the model can be trained on a cleaner and balanced data set, thereby improving the effect of fault diagnosis. Finally, the proposed method uses a convolutional neural network (CNN) for fault diagnosis, making full use of its advantages in feature extraction. By combining the high-quality data generated by CGAN with CNN, the transformer fault characteristics can be captured more accurately and the overall performance of the diagnosis model can be improved. The introduction of CNN not only improves the accuracy of fault diagnosis, but also enhances the adaptability of the model when facing complex and diverse fault modes.
[0036] The main contributions of this invention are as follows: (1) Using factor analysis to transform gas features into factor features, data dimension reduction and information extraction are achieved simultaneously. (2) A new data optimization method for multi-neighbor sample discrimination and normalized distance measurement is proposed. (3) An effective "data expansion + model training" transformer fault diagnosis scheme is proposed and verified.
[0037] The following is a description of the specific implementation modes. Before the description is given, the relevant contents of the present invention are first described:
[0038] 1. Gas characteristics
[0039] As the transformer in the power system continues to work, under the action of electrical energy and thermal energy, the main components of the insulating oil and insulating oil paper inside the transformer will gradually decompose. The main components of insulating oil are hydrocarbons, while the main components of insulating oil paper are wood fiber insulating materials. The gases generated during their decomposition process will be dissolved in the insulating oil. The main gases are hydrocarbon gases such as H2, CH4, C2H6, C2H4 and C2H2. During the operation of the transformer, the type and content of the generated gas will change with the different working conditions of the transformer (including normal conditions and different types of fault conditions). Therefore, the type and content of the gas dissolved in the insulating oil can effectively feedback the fault type of the transformer, so monitoring the type and content of the gas in the transformer insulating oil has become an effective means to evaluate the fault type of the transformer. Usually, scholars regard the contents of the above five hydrocarbon gases as five gas characteristics, and regard the specific values of the contents of the five hydrocarbon gases recorded at different times, that is, the specific values of the five gas characteristics, as conventional DGA data. The number of five gas characteristics contained in conventional DGA data is small, and it is difficult to fully describe the fault type of the transformer. Zhang et al. proposed to use different gas ratios to expand the gas features of conventional DGA data to solve the problem of insufficient feature expression. In the present invention, the gas features are also expanded using gas ratios based on the five gas features, and a total of 21 gas features are obtained, as shown in Table 1.
[0040] Table 1 Characteristics of twenty-one gases
[0041]
[0042]
[0043] 1 TCDG=H2+CH4+C2H6+C2H4+C2H2
[0044] 2 TD=C2H4+CH4+C2H2
[0045] 2. Conditional Generative Adversarial Networks
[0046] GAN mainly consists of two parts: the generator G and the discriminator D. The basic process is that the generator continuously learns the distribution of real data to make the generated data more real, and the discriminator judges the authenticity of the generated data. The two compete with each other and eventually reach a dynamic balance of GAN. That is, the data generated by the generator is close to the distribution of real data, and the discriminator cannot distinguish true and false data. The objective function of the confrontation process between the two is as follows:
[0047]
[0048] In the formula, x is the real data, P data (x) is the distribution of real data, D(x) represents the probability that the discriminator D judges that the real data x is true. z is the noise data of the random input generator, P z (z) is the distribution of prior noise data, G(z) means that the generator G transforms the input noise data z into generated data, and D(G(z)) means the probability that the discriminator D judges that the generated data G(z) is true.
[0049] The advantage of GAN is that it does not require prior knowledge and can directly sample with a noise distribution, gradually approaching the real data. However, due to the lack of prior information, uncontrollable training results will be produced, so some studies have proposed CGAN with conditional variables. CGAN adds conditional variables y to both the generator G and the discriminator D, and its objective function is as follows:
[0050]
[0051] In the formula, y is a conditional variable, such as a category label or data of different modalities. D(x,y) means that the real data x and the conditional variable y are simultaneously input into the discriminator D, and the probability of it being true is judged. G(z,y) means that the noise data z and the conditional variable y are simultaneously input into the generator G and converted into generated data. Figure 1 A schematic diagram of the structure of CGAN is given.
[0052] 3. Convolutional Neural Networks
[0053] CNN is a typical feedforward neural network in deep learning, which has many advantages. The downsampling operation it uses can effectively reduce the size of the data, thereby reducing the computational complexity and improving the efficiency of the neural network in processing large-scale data. At the same time, its local connection characteristics enable it to better capture local features in the data, and the setting of shared parameters can further improve the training efficiency and generalization ability of the neural network. In addition, the "end-to-end" data processing mode it adopts can adaptively extract fault features, simplify the data processing process, and improve the accuracy of fault diagnosis.
[0054] CNN is usually composed of multiple components, including convolutional layers, pooling layers (downsampling layers), fully connected layers (also called dense layers, linear layers), and a softmax layer for classification tasks. Figure 2 A schematic diagram of the structure of CNN is given.
[0055] The convolution layer is one of the core components, responsible for extracting local features from the input data. Each convolution layer consists of multiple convolution kernels (also called filters or feature detectors), each of which performs a convolution operation on the input data to generate a corresponding feature output. The mathematical expression is as follows.
[0056] uj =f(x i × i +b j ) (3)
[0057] In the formula, u j is the output data, f(·) is the Relu function, x i is the input data, w i is the weight matrix, b j is the bias term.
[0058] As an effective dimensionality reduction strategy, the pooling layer significantly improves the computational efficiency and generalization ability of CNN by reducing the spatial resolution of the feature map and aggregating important information in the local area without losing the key feature representation. Its calculation formula is as follows.
[0059]
[0060] In the formula, u k is the output data, β j is the weight matrix, is the downsampling function, b j is the bias term.
[0061] After repeated convolution and pooling, the fully connected layer further integrates and clusters the fault information, and finally the Softmax layer outputs the category probability to achieve fault classification. Specific implementation method one:
[0063] This embodiment is a data augmentation and optimization method for transformer fault diagnosis, which mainly includes four parts: The first part is feature transformation, which is also the preprocessing of the original data set. The factor analysis method is used to transform the high-dimensional gas features of the constructed DGA data into low-dimensional factor features, achieving both reducing the data dimension and highlighting key information, and constructing a new original data set, that is, the second original data set. The second part is data generation, which is to augment the minority class data in the second original data set. The class label is introduced as conditional information, and CGAN is used to generate new data that conforms to the distribution of the minority class data, achieving the balance between the majority class data and the minority class data, and constructing an augmented data set. The third part is data filtering, which is the optimization and balance processing of the augmented data set. A new data optimization method of multi-nearest neighbor sample discrimination and normalized distance metric is proposed to eliminate duplicate data, boundary data and low-quality data in the augmented data set, and rebalance the data within the class, constructing the final data set. The fourth part is model training, which is to train a machine learning model suitable for transformer fault diagnosis based on the final data set. A convolutional neural network is trained on the final data set, and its recognition effect on rare fault types corresponding to the minority class data in the original data set is tested, and its classification performance on different state data sets is compared to verify the feasibility, practicability and superiority of the method proposed in this invention. The overall structure of the method proposed in this invention is as Figure 3 shown.
[0064] Minority class data refers to the data of a certain class in the data set whose quantity is less than 80% of the average value of the quantities of all classes of data. Minority class data is actually the data class that needs to be augmented; the data of classes other than the minority class data in the data set is majority class data.
[0065] The factor analysis method is based on the idea of feature dimensionality reduction. On the premise of尽可能不损失或者少损失原始数据包含的信息 (minimizing or reducing as little as possible the information contained in the original data), a large number of complex variables are aggregated into a few independent common factors. These common factors can reflect the main information contained in the original numerous variables. While reducing the number of variables, they also reflect the internal relationship between the variables. Therefore, for DGA data, the factor analysis method is used to transform the m gas features it contains into k (k < m) common factors, called factor features. The key steps are as follows:
[0066] Key step one: Conduct KMO and Bartlett spherical tests. This is regarded as a feasibility check for using the factor analysis method. The KMO test is used to evaluate the correlation of the gas features contained in the DGA data. The closer it is to 1, the stronger the correlation. Greater than 0.7 indicates that the factor analysis method is suitable. Similarly, the Bartlett spherical test is also used to evaluate the correlation of the gas features contained in the DGA data. Its detection indicators include three. Among them, significance is the most important. If its value is less than 0.05, it indicates that the factor analysis method is suitable.
[0067] Key Step 2: Calculate the variance of the contribution of gas characteristics to the common factor. This is regarded as the evaluation of the effectiveness of the estimated common factor. Calculating the variance of the contribution of gas characteristics to the common factor reflects the degree to which the common factor fully expresses the gas characteristics. The larger the variance of the contribution of a certain gas characteristic to the common factor, the more fully it is expressed by the common factor. Generally, when the variance of the contribution of a certain gas characteristic to the common factor is greater than 0.8, it is considered to be fully expressed.
[0068] Key Step 3: Determine the number of common factors. This is regarded as the core link of feature transformation. Calculate the total contribution of the common factors to the gas characteristics contained in the DGA data, which is called the eigenvalue. The larger the eigenvalue of a certain common factor, the greater its total contribution, indicating that it has higher independence as an individual to characterize the gas characteristics. Generally, when the proportion of the sum of the total contributions of the top n (n ≤ k) common factors with the largest eigenvalues in the sum of the total contributions of all common factors exceeds 95%, the top n (n ≤ k) common factors with the largest eigenvalues are identified as the selection results.
[0069] Key Step 4: Perform common factor rotation. This is regarded as the attribute analysis process of the common factors corresponding to the fault types. Use the varimax method to perform common factor rotation to obtain multiple common factor load values of the corresponding gas characteristics contained in each common factor. That is, the number of common factor load values contained in each common factor is the same as the number of gas characteristics. According to the eigenvalue sorting results of the common factors in Key Step 3, obtain multiple larger common factor load values in each common factor, and analyze the common gases contained in the multiple gas characteristics corresponding to them, thereby setting the attributes of the common factors as overheating factors, discharge factors, or normal factors.
[0070] Key Step 5: Apply factor analysis. This is regarded as transforming the eigenvectors of the source gas characteristics in the DGA data into source common factors. According to formula (5), multiply the values of the m gas characteristics contained in the DGA data by the adapted common factor load value matrix to obtain the values of k (k < m) factor characteristics, and construct a new eigenvector, that is, the new DGA data.
[0071]
[0072] In the formula, F0~F n represents the n common factors determined in Key Step 3, and w ij (i = 1, 2, …, n, j = 1, 2, …, 21) represents the common factor load value matrix adapted to twenty-one gas characteristics, and X1~X 21 represents the values of twenty-one gas characteristics.
[0073] The original DGA data is essentially the feature vector of the source gas characteristics, that is, each DGA data is a feature vector constructed by the numerical values of the twenty-one gas characteristics shown in Table 1. A large amount of original DGA data constructs the original data set. On this basis, the factor analysis method is used to analyze the original data set, determine the appropriate number of common factors, and convert the feature vector of the source gas characteristics into the feature vector of the source factor characteristics. In this way, all the original DGA data are updated to obtain a new original data set, which is recorded as the second original data set. The minority class data in the second original data set is analyzed, and an attempt is made to construct a suitable CGAN for data generation processing.
[0074] Specifically, in the present invention, for CGAN, a long short-term memory network (Long Short-Term Memory, LSTM) is used as the generator G, and a CNN is used as the discriminator D. The ReLU activation function has the advantages of being simple to calculate and not prone to gradient explosion, and the ReLU activation function is used as the activation function of the generator G. The Sigmoid activation function is used as the activation function of the output layer of the discriminator D, because the output of the Sigmoid activation function is between 0-1, which is a probability value that meets the requirements. It is worth noting that the network structure of LSTM and CNN, as well as the parameters that CGAN needs to learn, all need to be determined with reference to the scale of the original data set of the actual application. In addition, the conditional variable y of the input generator G and the discriminator D is set to the category label of the DGA data, "Adam" is set to the gradient optimization algorithm, the training batch is set to 10, and the maximum number of iterations is set to 400. On this basis, for the minority class data in the second original data set, the constructed CGAN is used to generate data close to the distribution of each minority class data, and these newly generated data are added to the second original data set to construct an extended data set.
[0075] In the original data set and the second original data set obtained after feature transformation, there may be identical data, called duplicate data, and there may be data at the boundary of the distribution of two categories of data, called boundary data. Duplicate data and boundary data reduce the quality of the data set and affect data expansion.
[0076] The impact of duplicate data and boundary data on data expansion:
[0077] Failure of augmentation effect: The purpose of data augmentation is to increase the diversity of data and improve the generalization ability of the model. However, the presence of duplicate data and boundary data will weaken the effect of augmentation. For example, if duplicate data is amplified during the augmentation process, the bias of the model will be strengthened instead of corrected.
[0078] Generate non-representative data: When expanding the boundary data, more abnormal data may be generated instead of effective training samples that can improve model performance. This will reduce the representativeness of the dataset and make the expansion process unable to achieve the expected effect.
[0079] The augmentation strategy deviates from the normal distribution: When the dataset contains too much boundary data, the augmentation algorithm may tend to generate samples close to these boundaries, thereby deviating from the normal distribution of the data and further reducing the predictive performance of the model.
[0080] In summary, the presence of duplicate data and boundary data will lead to a decline in the quality of the data set and cause problems during data expansion, which will have an adverse impact on model training and prediction. Therefore, cleaning and processing this data is a key step to improve the quality of the data set and the expansion effect.
[0081] For the expanded data set constructed after data expansion using CGAN, the number of duplicate data and boundary data may further increase, and the impact on the quality of the data set will further increase. Therefore, it is necessary to remove duplicate data and boundary data in the expanded data set. In addition, after data expansion, the number of minority class data will increase, but the number of new minority class data may not be exactly equal to or close to the number of majority class data, that is, there may still be a slight data imbalance problem in the expanded data set. What needs to be paid more attention to is that even if the number of new minority class data is exactly equal to or close to the number of majority class data, if the aforementioned duplicate data and boundary data are removed, it will still cause a slight data imbalance in the expanded data set. At this time, those data in the majority class data that are not at the boundary of the distribution of the two categories of data but are far away from the center of the class data can be removed until the number of majority class data in the data set is balanced with the number of minority class data. These data with a long distance are called low-quality data. In the present invention, a new data optimization method for multi-neighbor sample discrimination and normalized distance measurement is proposed, which mainly includes three parts: deduplication, denoising and rebalancing. The specific implementation steps are as follows:
[0082] Step 1: Use statistical methods to calculate duplicate data in the expanded data set, retain one copy, and remove the redundant data.
[0083] Step 2: Use Support Vector Machine (SVM) to classify the expanded data set processed in step 1, count the wrongly classified data, and construct an incorrectly classified data set; traverse each data in the incorrectly classified data set, count the categories of the five nearest neighboring data of each data, and perform majority voting on the five categories. The voting category is called the majority category of the data; if the data's own category is inconsistent with the majority category, the data is considered to be boundary data and deleted.
[0084] Step 3: Get the dataset after removing duplicate data and boundary data, which is called the transition dataset. Count the number of data in each category (a category is the label of a type of data) in the transition dataset, and determine the category with the least number of data, which is called the reference category (i.e., the reference label). The amount of data it contains is called the reference number, expressed as R_num.
[0085] Step 4: Perform min-max normalization on the transition data set, scale the data corresponding to each feature proportionally, and limit all of them to the range of [0,1].
[0086] Step 5: Use K-means to determine the center x of the data of other categories in the transition data set except the reference category cen_i , i is the serial number of the category.
[0087] Step 6: Calculate the Euclidean distance from each data point in each category except the reference category to the corresponding center i is the serial number of the category, j is the serial number of each data in each category. According to the Euclidean distance, each data in each category is sorted in descending order.
[0088] Step 7: For the data of other categories except the reference category in the transition data set, delete the data with the highest ranking in turn according to the ranking of each data in each category until the number of data in the current category is consistent with R_num.
[0089] Step 8: Output the data set after data filtering, which is called the final data set.
[0090] On the basis of obtaining the final data set, CNN is trained. Different from the common image data input to CNN at present, in the present invention, the DGA data input to CNN is a feature vector with only 1 (one row and multiple columns) in the vertical dimension. Therefore, CNN is set to treat the DGA data as image data of size 12×1, and extract features from the ConV convolution layer, followed by the BN batch normalization layer and the ReLU activation function layer. It is worth noting that the BN batch normalization layer of CNN is set to be used before the nonlinearity (activation function), which can effectively improve the learning rate and suppress the influence of the initial network weights, and the ReLU activation function layer is set to improve the nonlinear ability of the model. On this basis, CNN is set to be the Max-pooling maximum pooling layer after the ReLU activation function layer for subsampling, and then the Dropout layer is added to prevent the model from overfitting. Finally, the classification stage of CNN is set to be the FC fully connected layer, which maps the learned features into more comprehensive functions, and then adds the classification layer of the Softmax function to give the classification results. Thus, the conventional CNN is constructed. It should be added that, according to the scale of the original data set in actual application, the network structure of the conventional CNN can be adjusted to construct a suitable CNN. Finally, a CNN suitable for transformer fault diagnosis was constructed.
[0091] Example
[0092] 1 Original Dataset
[0093] Using the gas sensor developed by Suzhou Huiwen Nano Technology Co., Ltd., field tests were carried out in a number of power and oil companies to obtain conventional DGA data of 220kV oil-immersed transformers in different states (including normal states and different fault types), and a total of 5537 conventional DGA data were obtained. Based on the five gas features contained in the conventional DGA data, the gas ratio was used to expand it to twenty-one gas features to obtain new DGA data, thereby constructing the original data set. These DGA data correspond to six states, which are regarded as six labels of the DGA data set. Its detailed description is shown in Table 2. As can be seen from the table, the DGA data labeled "2", "4" and "6" are regarded as majority class data, and the data of the remaining labels are regarded as minority class data, and the corresponding fault types are also less frequent in actual situations.
[0094] Table 2 Detailed description of the original dataset
[0095]
[0096] Generally, machine learning models are divided into two types: those based on mathematical theory and those based on tree structure. In addition, as an important branch of machine learning, deep learning models are also an important part of machine learning models and are regarded as the third type. In the present invention, three representative machine learning models with default parameter configurations are selected, including: SVM, random forest and CNN. The CNN here is the conventional CNN mentioned in Section 3. Taking into account that the original data set contains six labels, this embodiment introduces the radial basis function (RBF) for SVM, thereby constructing RBF-SVM. RBF-SVM, random forest and CNN were respectively applied to carry out ten-fold cross validation on the original data set, and their average classification accuracy was calculated, which was 76.75%, 77.31% and 81.82%, respectively. At the same time, the average F1 scores obtained by the three machine learning models on the data of each label in the original data set were calculated, as shown in FIG. Figure 4 shown.
[0097] Figure 4 It can be seen that there are obvious differences between the average F1 scores of the three machine learning models on data with different labels, which is related to the amount of data for each label. That is, they all achieve higher average F1 scores on majority class data and lower average F1 scores on minority class data. As we all know, the average classification accuracy is used to evaluate the classification effect of the machine learning model on all the data in the data set, which is an overall level. The F1 score is used to evaluate the classification effect of the machine learning model on each label data in the data set, which can feedback internal details. Therefore, although the three machine learning models do not show much difference in terms of average classification accuracy, the differences in terms of average F1 score are more diverse. These differences effectively illustrate the necessity of conducting this study.
[0098] In statistics, the sum of deviations represents the sum of the differences between each data and the mean in a set of data. A set of data with a smaller sum of deviations indicates that the set of data is more balanced and less diverse. Therefore, the sum of deviations can be used to quantify the difference in the average F1 scores obtained by machine learning models on data with different labels, and indirectly reflect the imbalance of the data set. In this way, the smaller the sum of the deviations of the average F1 scores, the smaller the difference in the average F1 scores obtained by the machine learning model on the six labels in the original data set, and the more balanced the various types of data in the original data set. After calculation, the sum of the deviations of the average F1 scores obtained by RBF-SVM, random forest, and CNN are 0.33, 0.32, and 0.32, respectively. It can be seen that the differences in the average F1 scores obtained by the three machine learning models on the six labels in the original data set are large, indicating that the original data set is highly imbalanced.
[0099] 2 Feature Transformation
[0100] Based on the original data set, the factor analysis method is used to analyze the twenty-one gas features contained in the DGA data. It should be noted that the 5537 DGA data contained in the original data set are regarded as original feature vectors, which are standardized in terms of column features (i.e., single gas features), and then the mean and standard deviation of the data corresponding to the twenty-one gas features are calculated, thereby constructing a covariance matrix to estimate the common factors. On this basis, the variance contributed by the twenty-one gas features to the common factors is calculated, the number of common factors is determined, and the common factor loading value matrix is obtained. Finally, the twenty-one gas features are converted into k (k<21) factor features, and the feature vectors in the original data set are updated accordingly.
[0101] Key step 1: Perform KMO and Bartlett sphericity test. The results of KMO and Bartlett sphericity test of the original data set are shown in Table 3. The test results show that the quantitative value of the KMO test is greater than 0.7, and the significance of the Bartlett sphericity test is less than 0.05, indicating that it is suitable to use factor analysis to conduct subsequent analysis on the original data set.
[0102] Table 3 KMO and Bartlett sphericity test results
[0103]
[0104] Key step 2: Calculate the variance of the contribution of gas features to the common factors. The authors calculated the variance of the contribution of the 21 gas features shown in Table 1 to the common factors, as shown in Table 4. As can be seen from the table, the variance of the contribution of the 21 gas features to the common factors is greater than 0.8, which means that all gas features are fully expressed, and the common factors estimated based on the original feature vectors contained in the original data set are valid.
[0105] Table 4 Variance of gas characteristics contribution to common factors
[0106]
[0107] Key step three: determine the number of common factors. The scree plot can intuitively display the eigenvalues of common factors, especially highlighting the common factors with larger eigenvalues. The eigenvalue here is actually the overall contribution of the common factor to all gas characteristics. As mentioned above, the larger the eigenvalue of a common factor, the greater its overall contribution, and the higher its independence as an individual characterization of gas characteristics. In the present invention, scree plots of twenty-one common factors are drawn, as shown in Figure 1. Figure 5As shown. It should be noted that the number of common factors is usually less than the number of all gas features, but can be equal in extreme cases. In the process of estimating common factors, the number of common factors is assumed to be the number of all gas features. This is due to extreme cases and is reflected in the scree plot. As can be seen from the figure, the broken line becomes flat after the twelfth common factor. And, after calculation, the total contribution of these twelve common factors accounts for 99.13%, which is more than 95%. Therefore, these twelve common factors are used to fully characterize all gas features in the original data set.
[0108] Key step 4: Perform common factor rotation. After determining the number of common factors, use the maximum variance method to perform common factor rotation and obtain a heat map, such as Figure 6 As shown. In the figure, the ordinate represents the common factor load values of the twenty-one gas characteristics. The darker the color, the larger the common factor load value of the gas characteristic. In the first common factor, the top three common factor load values are 0.96, 0.96 and 0.93, corresponding to the three gas characteristics of C2H4 / TCDG, C2H4 / max(H2, CH4, C2H6, C2H4, C2H2) and C2H4 / TD respectively. These three gas characteristics all contain C2H4. According to the relevant manual, this situation corresponds to a medium-temperature heat release fault. Therefore, the first common factor is called the overheating factor. Following the same processing procedure, the second, fourth, fifth, sixth, seventh, ninth and tenth common factors are called discharge factors, the third, eighth and eleventh common factors are called overheating factors, and the twelfth common factor is called the normal factor.
[0109] Key step 5: Apply factor analysis. After the processing of the previous four key steps, twelve common factors are obtained to replace the original twenty-one gas features, which are called twelve factor features. In this way, the twenty-one-dimensional original feature vector in the original data set can be converted into a twelve-dimensional new feature vector. Referring to formula (5), formula (6) gives the conversion process of the twenty-one-dimensional gas feature to the twelve-dimensional factor feature.
[0110]
[0111] In the formula, F0~F 11 Represents twelve factor characteristics, X1~X 21 Numerical values representing twenty-one gas characteristics.
[0112] Thus, the second original data set is obtained. In order to verify the effectiveness of the factor analysis method, RBF-SVM, random forest and CNN were used to carry out ten-fold cross validation on the second original data set, and their average classification accuracy was calculated, which was 81.23%, 81.77% and 85.36%, respectively. Compared with the average classification accuracy of 76.75%, 77.31% and 81.82% achieved on the original data set, they were improved by 4.48%, 4.46% and 3.54%, respectively, and the improvement was significant. This shows that compared with the original data set, the quality of the second original data set is higher, the effective information is effectively highlighted, and the redundant information is effectively removed, which also effectively illustrates the necessity and effectiveness of feature transformation. At the same time, the average F1 scores of the three machine learning models on the data of each label in the second original data set are calculated, as shown Figure 7 shown.
[0113] Figure 7 It can be seen that there are also obvious differences between the average F1 scores of the three machine learning models on data with different labels. The sum of the deviations of the average F1 scores of the three machine learning models is calculated to be 0.29, 0.28, and 0.28, respectively. Compared with the sum of the deviations of the average F1 scores of 0.33, 0.32, and 0.32 obtained on the original data set, the improvement is not obvious. This shows that the feature conversion process can effectively improve the classification effect of the machine learning model on all the data and each labeled data in the data set, but it cannot balance the differences in their classification effects on data with different labels in the data set, that is, it cannot effectively alleviate the impact of the imbalance problem in the data set. This needs to be solved by essentially reducing the difference in the amount of data for each label, that is, data expansion.
[0114] 3. Data Augmentation
[0115] LSTM is used as the generator G, and CNN is used as the discriminator D. In addition, considering that the scale of the second original data set is not large, with only 5537 DGA data, the generator and discriminator are set to use shallow neural networks, and the parameters that need to be learned by the smaller-scale CGAN are set. The network structure and parameters of the generator and discriminator are shown in Table 5.
[0116] Table 5 Network structure and parameters of the generator and discriminator
[0117]
[0118] First, input the minority class data with label "1" into CGAN for training, with 10 data as a group and 400 training times. The training process is as follows: Figure 8 shown.
[0119] During the training process, the generator and the discriminator continue to compete with each other and eventually reach a Nash equilibrium. By observing the loss function graphs of the generator and the discriminator, you can intuitively observe the training speed of the network. Fig. 9 As shown in the figure, when the network is trained about 210 times, the loss functions of the generator and the discriminator have not changed, indicating that Nash equilibrium has been reached and new data with the label "1" can be generated.
[0120] The negative log-likelihood (NLL) function is used to measure the distribution difference between the generated data and the real data. Fig.10 The distribution difference diagram of the generated data and the real data during the training process is given. As shown in the figure, the difference between the two is large at the beginning of CGAN training. As the number of iterations increases, the generator can fully learn the distribution characteristics of the real data, so the similarity of the probability distribution of the two gradually increases, and the negative log-likelihood value between the generated data and the real data gradually decreases. This shows that the distribution of the newly generated data labeled "1" is close to the distribution of the real data labeled "1". Following the same process, new data labeled "3" and "5" are generated respectively, and the augmented data set is constructed from them, and its detailed description is shown in Table 6. Compared with the original data set and the second original data set, the augmented data set contains 7489 DGA data, an increase of 1952 DGA data, and is approximately evenly divided into three minority data. In this way, the difference between the number of data labeled "1", "3" and "5" and the number of data labeled "2", "4" and "6" is reduced.
[0121] Table 6 Detailed description of the expanded dataset
[0122]
[0123]
[0124] It is worth noting that there is no unified evaluation index for the quality of data generated by GAN and its extended models (including CGAN) at this stage. Therefore, the quality of generated data is analyzed from two perspectives: direct observation and indirect judgment. One is to directly judge by observing the difference between the distribution of data generated by CGAN and the distribution of real data, that is, Fig.10Related content. The second is to combine the data generated by CGAN with the real data and input them into the machine learning model to observe whether its classification performance has been improved to make an indirect judgment. Therefore, RBF-SVM, random forest and CNN were used to carry out ten-fold cross validation on the new expanded data set, and their average classification accuracies were calculated to be 83.49%, 84.03% and 86.81%, respectively. Compared with the average classification accuracies of 81.23%, 81.77% and 85.36% achieved on the second original data set, they have increased by 2.26%, 2.26% and 1.45%, respectively, and the improvement is quite obvious. This shows that compared with the second original data set, the quality of the expanded data set has been further improved, the impact of the data imbalance problem has been effectively alleviated, and it also effectively illustrates the feasibility and effectiveness of data expansion. At the same time, the average F1 scores of the three machine learning models on the data of each label in the expanded data set are calculated, as shown Fig.11 shown.
[0125] Compared to Figure 4 and Figure 7 ,from Fig.11 It can be seen that the difference between the average F1 scores of the three machine learning models on data with different labels has been significantly reduced. The sum of the deviations of the average F1 scores of the three machine learning models is calculated to be 0.09, 0.08, and 0.08, respectively. Compared with the sum of the deviations of the average F1 scores of 0.29, 0.28, and 0.28 they obtained on the second original dataset, they have all increased by 0.2, with a significant increase. This shows that the average F1 scores of the three machine learning models on data with different labels in the expanded dataset are relatively balanced, which shows that the quantity and quality of the majority class data and the minority class data in the expanded dataset are not much different, and the data imbalance problem existing in the second original dataset of the original dataset has been effectively solved.
[0126] 4. Data Filtering
[0127] On the basis of the expanded data set, duplicate data is found and removed, and the number of each label data in the expanded data set is re-counted. Next, the expanded data set is classified using SVM, and the misclassified data is counted. On this basis, the majority categories of the five neighboring data of each misclassified data are counted, and it is determined whether the label of the misclassified data is consistent with the majority category, thereby identifying the boundary data in the expanded data set and removing these boundary data. Thus, a transition data set is obtained, and the number of each label data therein is counted, as shown in Table 7.
[0128] Table 7 Detailed description of the transition dataset
[0129]
[0130]
[0131] After statistics, the transitional dataset contains 7135 DGA data. Compared with the 7489 DGA data in the expanded dataset, 354 duplicate data and boundary data are reduced. Referring to Table 7, the label "5" is identified as the reference category, and the number of data with the label "5" is identified as the reference number. On this basis, the transitional dataset is min-max normalized, and K-means is used to obtain the center of the data with labels "1", "2", "3", "4" and "6", respectively. The low-quality data far from the center of each type of data is calculated and removed, and the number of data with five labels is finally controlled to be 994, and the final dataset is constructed. RBF-SVM, random forest and CNN are used to carry out ten-fold cross validation on the final dataset, and their average classification accuracy is calculated, which is 84.39%, 84.51% and 87.22% respectively. Compared with the average classification accuracy of 83.49%, 84.03% and 86.81% obtained on the expanded dataset in Section 4.3, they have increased by 0.90%, 0.48% and 0.41% respectively, which is smaller than before but still significant. This effectively illustrates the necessity and superiority of data filtering. At the same time, the average F1 score of the three machine learning models on the data of each label in the final dataset is calculated, as shown in Figure 2. Fig.12 shown.
[0132] As can be seen from the figure, the differences in the average F1 scores of the three machine learning models on data with different labels are also very small, which is consistent with Fig.11 The differences shown are similar. The sum of the deviations of the average F1 scores of the three machine learning models is calculated to be 0.08, 0.07, and 0.07, respectively. Compared with the sum of the deviations of the average F1 scores of 0.09, 0.08, and 0.08 obtained on the expanded dataset, they have all increased by 0.01, and the increase is also small and almost negligible. This shows that data filtering can effectively remove duplicate data, boundary data, and low-quality data in the dataset, but does not destroy the existing balance of various types of data in the dataset. Its ultimate goal is to make the dataset balanced and high-quality.
[0133] The sum of the deviations of the average classification accuracy and average F1 score achieved by the three machine learning models at different stages is statistically calculated, as shown in Table 8.
[0134] Table 8 The sum of the deviations of the average classification accuracy and average F1 score achieved by the machine learning model at different stages
[0135]
[0136] It can be seen from the table that, based on the original data set, the average classification accuracy of the three machine learning models on the data set processed at each stage has been significantly improved, and the sum of the deviations of the average F1 scores obtained has also been significantly reduced. This illustrates the necessity and feasibility of the present invention, as well as the rationality of the research content of each stage of the method proposed in the present invention. After calculation, compared with the average classification accuracy of the three machine learning models on the original data set, their average classification accuracy on the final data set increased by 7.64%, 7.20% and 5.40%, respectively. Compared with the sum of the deviations of the average F1 scores of the three machine learning models on the original data set, the sum of the deviations of the average F1 scores obtained on the final data set decreased by 0.25, respectively. This effectively illustrates the feasibility, practicality and superiority of the method proposed in the present invention.
[0137] 5. Model Training
[0138] Referring to the description of the model training section, a conventional CNN is trained, which is a standard CNN with a five-layer structure. But even for conventional CNN, it achieves higher average classification accuracy than RBF-SVM and random forest, and achieves the sum of deviations of the average F1 score that is lower than or equal to the average classification accuracy of RBF-SVM and random forest. This shows its great potential as a machine learning model for fault diagnosis. As described in Section 3, the network structure of conventional CNN can be adjusted according to the scale of the data set in actual application. Therefore, the network structure of conventional CNN is changed in an attempt to obtain better classification performance. The network structure of CNN is set to five to ten layers respectively, and they are applied to the final data set for ten-fold cross validation respectively, and their average classification accuracy is calculated respectively. Table 9 shows the network structures of six CNNs and their average classification accuracy.
[0139] Table 9 Network structures of six CNNs and their average classification accuracy
[0140]
[0141] It can be seen from the table that when the number of network layers is 8, the average classification accuracy of the corresponding CNN is the highest, which is 88.60%. Thereafter, when the number of network layers increases again, the average classification accuracy of the corresponding CNN decreases instead. Therefore, it is determined that the number of network layers is 8 is optimal, and the corresponding CNN is the optimal machine learning model for fault diagnosis in the present invention, and the specific configuration of its network structure is shown in Table 10.
[0142] Table 10 Specific configuration of the optimal CNN network structure
[0143]
[0144]
[0145] Thus, the optimal machine learning model for fault diagnosis is obtained, which is an eight-layer CNN, and the highest classification accuracy achieved is 88.60%. At the same time, the sum of the deviations of the average F1 score obtained on the data of each label in the final data set is calculated to be 0.07. Compared with the average classification accuracy of 87.22% and the sum of the deviations of the average F1 score of 0.07 achieved by the conventional CNN in Section 4.4, the classification performance of the eight-layer CNN has been improved. This illustrates the feasibility of conducting research in this section. After calculation, compared with the average classification accuracy of 81.82% and the sum of the deviations of the average F1 score of 0.32 achieved by CNN on the original data set, the average classification accuracy achieved by the optimal machine learning model has increased by 6.48% and the sum of the deviations of the average F1 score has decreased by 0.25. At this point, all research contents of the method proposed in the present invention have been verified.
[0146] 6. Comparative Analysis
[0147] The original data set is processed by the existing data balancing or data expansion method, thereby constructing multiple data sets, and the optimal machine learning model is applied to these data sets to carry out ten-fold cross validation, and the sum of the deviations of the average classification accuracy and the average F1 score obtained by it is counted, thereby analyzing the processing effect of the corresponding method on the original data set, which is used for comparison with the method proposed in the present invention to verify the superiority of the method proposed in the present invention. Specifically, SMOTE, LR-SMOTE, GAN, ACGAN and WGAN are selected respectively, and the original data set is processed by data balancing or data expansion, thereby constructing five data sets, respectively referred to as: comparison data set 1, comparison data set 2, comparison data set 3, comparison data set 4 and comparison data set 5. The optimal machine learning model is applied to carry out ten-fold cross validation on the five comparison data sets, and the sum of the deviations of the average classification accuracy and the average F1 score obtained by it is counted, and compared with the sum of the deviations of the average classification accuracy and the average F1 score obtained on the final data set, as shown in Table 11.
[0148] Table 11 The sum of the deviations of the average classification accuracy and average F1 score of the optimal machine learning model on multiple data sets
[0149]
[0150] It can be seen from the table that the average classification accuracy achieved by the optimal machine learning model on the final data set is the highest, which is significantly higher than the average classification accuracy achieved on the other five comparison data sets. This shows that the quality of the final data set processed by the method proposed in the present invention is higher than the quality of the comparison data sets processed by the other five data balancing or data expansion methods, which effectively illustrates the superiority of the method proposed in the present invention over the existing data balancing or data expansion methods. At the same time, the sum of the deviations of the average F1 scores achieved by the optimal machine learning model on the final data set is the smallest, which is also significantly smaller than the sum of the deviations of the average F1 scores achieved on the other five comparison data sets. This shows that the average F1 scores achieved by the optimal machine learning model on each label in the final data set are relatively balanced, which further shows that the data imbalance problem in the original data set is effectively solved, and the quantity and quality of the data in the final data set are relatively balanced. Therefore, the feasibility, practicality and superiority of the method proposed in the present invention are once again fully demonstrated. In addition, it is worth mentioning that compared with the sum of the deviations of the average classification accuracy and the average F1 score achieved by the machine learning model on the original data set shown in Table 8, the sum of the deviations of the average classification accuracy and the average F1 score achieved by the optimal machine learning model on the five comparison data sets has obvious advantages, which shows the significance of scholars' continuous research on data balance or data expansion.
[0151] 7 Performance Evaluation Metrics
[0152] The performance evaluation indicators are used to evaluate the effect of ten-fold cross validation on the machine learning model. The performance evaluation indicators used mainly include classification accuracy and F1 score.
[0153] Assume that the data set is D = {(x1,y1),(x2,y2),…,(x n ,y n )}, where y i is the data x i The true label, R(x i ) is the predicted label given by the machine learning model R. The classification accuracy is expressed as the ratio of the number of data with correct label prediction to the total number of data. Its calculation formula is as follows.
[0154]
[0155] Where I is the indicator function. When R(x i )=y i When I(R(x i )=y i )=1.
[0156] In addition, Precision, Recall, and F1-score can evaluate the classification effect of the machine learning model on the data of a certain label in the data set. Among them, Precision indicates the proportion of data predicted as positive that is truly positive. Recall indicates the proportion of positive data in the data that is correctly predicted. F1-score is the weighted harmonic average of the two. Table 12 shows the confusion matrix of the binary classification results. The calculation formulas of Precision, Recall, and F1-score are as follows.
[0157]
[0158]
[0159] Table 12 Confusion matrix of binary classification results
[0160]
[0161]
[0162] Traditional machine learning methods often lead to low fault diagnosis accuracy due to data imbalance, especially the scarcity of data on a few fault types. Aiming at the data imbalance problem in oil-immersed transformer fault diagnosis, this paper proposes a data expansion and optimization method based on conditional generative adversarial networks and convolutional neural networks, which includes four parts: feature conversion, data expansion, data filtering and model training. First, the proposed method preprocesses the original DGA data by factor analysis, performs feature dimension reduction and extracts key features, thereby simplifying data complexity and improving feature representativeness. Secondly, the proposed method uses CGAN to generate new data, and by introducing category labels as conditional information, generates data that conforms to the distribution of minority class data, successfully balancing the number of various types of data in the data set. Then, the proposed method proposes a new data optimization method to eliminate duplicate data, boundary data and low-quality data in the expanded data set to ensure the purity and effectiveness of the data set. Finally, the proposed method uses CNN for fault diagnosis, giving full play to its advantages in feature extraction and pattern recognition. Experimental results show that the method performs well in dealing with data imbalance problems and significantly improves the accuracy of fault diagnosis, especially the classification performance on minority class data. Compared with existing methods, this paper has achieved many improvements in data generation and optimization, providing new ideas for improving the reliability of transformer fault diagnosis. Future research can further optimize the generation model and optimization algorithm, and explore more diverse data expansion and optimization strategies to cope with more complex fault diagnosis scenarios and the diversity of data set characteristics. Through these efforts, the safety and reliability of the power system will be further improved. Specific implementation method 2:
[0164] This embodiment is a data expansion and optimization device for transformer fault diagnosis, the device includes a processor and a memory. It should be understood that the device includes any device including a processor and a memory described in the present invention, and the device may also include other units and modules that perform display, interaction, processing, control, etc. and other functions through signals or instructions;
[0165] At least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to implement the data expansion and optimization method for transformer fault diagnosis.
[0166] It should be understood that the memory may include a readable medium on which instructions are stored, which may include but is not limited to a magnetic storage medium, an optical storage medium; the magneto-optical storage medium includes a read-only memory ROM, a random access memory RAM, an erasable programmable memory (e.g., EPROM and EEPROM) and a flash memory layer, or other types of media suitable for storing electronic instructions. It should be understood by those skilled in the art that at least one instruction stored is a computer program product corresponding to the method or system. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The scheme in the embodiment of the present application can be implemented in various computer languages, for example, an object-oriented programming language Java and a literal scripting language JavaScript, etc.
[0167] The present application is described with reference to the flowcharts and / or block diagrams of the methods, systems, and computer program products according to the embodiments of the present application, and may also be used for corresponding devices. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0168] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0169] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0170] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0171] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
[0172] The above calculation examples of the present invention are only used to explain the calculation model and calculation process of the present invention in detail, and are not intended to limit the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made based on the above description. It is impossible to list all the implementation methods here. All obvious changes or modifications derived from the technical solution of the present invention are still within the scope of protection of the present invention.
Claims
1. A data expansion and optimization method for transformer fault diagnosis, characterized in that: The following steps are involved: S100, for the minority class data in the second original data set, using the CGAN network to expand to obtain an expanded data set; the second original data set is a data set corresponding to the data features for transformer fault diagnosis determined based on the concentration of hydrocarbon gas in the transformer fault; the minority class data refers to a data class in which the number of a certain class of data in the data set is less than K% of the mean number of all class data; the CGAN network is a conditional generative adversarial network; S200, optimizing the expanded data set, including the following steps: Step 1: Use statistical methods to calculate duplicate data in the expanded data set, retain one copy of the duplicate data, and remove the redundant duplicate data; Step 2: Use support vector machine to classify the expanded data set processed in step 1, count the wrongly classified data, and construct an incorrectly classified data set; traverse each data in the incorrectly classified data set, count the categories of the five neighboring data of each data, and perform majority voting on the five categories. The voting category is called the majority category of the data; if the data's own category is inconsistent with the majority category, the data is considered to be boundary data and deleted; Step 3: Get the data set after removing duplicate data and boundary data, which is called the transition data set; count the number of data in each category in the transition data set, and determine the category with the least amount of data, which is called the reference category. The amount of data it contains is called the reference number, expressed as R_num; Step 4: Normalize the transition data set and limit all of them to the range of [0,1]; Step 5: Use K-means to determine the center x of the data of other categories in the transition data set except the reference category cen_i , i is the serial number of the category; Step 6: Calculate the Euclidean distance from each data point in each category except the reference category to the corresponding center i is the serial number of the category, j is the serial number of each data in each category; according to the Euclidean distance, each data in each category is sorted in descending order; Step 7: For the data of other categories except the reference category in the transition data set, delete the data with the highest ranking in turn according to the ranking of each data in each category until the number of data in the current category is consistent with R_num; Step 8: The output data set is called the final data set.
2. A data expansion and optimization method for transformer fault diagnosis according to claim 1, characterized in that: The generator G of the CGAN network uses a long short-term memory network, and the discriminator D uses a CNN network.
3. A data expansion and optimization method for transformer fault diagnosis according to claim 2, characterized in that: Step 4 uses min-max to perform normalization.
4. A data expansion and optimization method for transformer fault diagnosis according to any one of claims 1 to 3, characterized in that: The process of determining data characteristics for transformer fault diagnosis includes the following steps: Firstly, the concentration of hydrocarbon gas in transformer fault is obtained as the initial gas feature, and the ratio of the concentrations of different gases is used as the gas feature to expand the initial gas feature; then, the factor analysis method is used to reduce the feature dimension to obtain a new n'-dimensional feature vector, and the new n'-dimensional feature vector is used as the data feature for transformer fault diagnosis.
5. A data expansion and optimization method for transformer fault diagnosis according to claim 4, characterized in that: Hydrocarbon gases include hydrogen H2, methane CH4, ethane C2H6, ethylene C2H4 and acetylene C2H2.
6. A data expansion and optimization method for transformer fault diagnosis according to claim 4, characterized in that: The ratios of different gas concentrations include C2H6 / CH4, C2H2 / C2H4, CH4 / H2, H2 / TCDG 1 ×100, CH4 / TCDG 1 ×100, C2H6 / TCDG 1 ×100, C2H4 / TCDG 1 ×100, C2H2 / TCDG 1 ×100, H2 / max(H2, CH4, C2H6, C2H4, C2H2)×100, CH4 / max(H2, CH4, C2H6, C2H4, C2H2)×100, C2H6 / max(H2, CH4, C2H6 , C2H4, C2H2)×100, C2H4 / max(H2, CH4, C2H6, C2H4, C2H2)×100, C2H2 / max(H2, CH4, C2H6, C2H4, C2H2)×100, CH4 / TD 2 ×100, C2H4 / TD 2 ×100, C2H2 / TD 2 ×At least one of 100; TCDG 1 =H2+CH4+C2H6+C2H4+C2H2, TD 2 =C2H4+CH4+C2H2.
7. A data expansion and optimization method for transformer fault diagnosis according to claim 4, characterized in that: The process of feature dimensionality reduction using factor analysis includes: Calculate the variance of the contribution of gas characteristics to the common factors to determine the effectiveness of the common factors; then determine the number of common factors n based on the overall contribution of the common factors; after determining the number of common factors, use the maximum variance method to rotate the common factors to obtain the heat map corresponding to the gas characteristics and the gas characteristics, and then determine the factor type represented by the common factors; then convert the vector corresponding to the common factor load values of all gas characteristics into a new feature vector of n' dimensions.
8. A data expansion and optimization method for transformer fault diagnosis according to claim 7, characterized in that: Before conducting factor analysis, it is necessary to first conduct a correlation analysis on the expanded gas characteristics. When the expanded gas characteristics have a positive linear correlation, factor analysis is then used for analysis.
9. A data expansion and optimization method for transformer fault diagnosis according to claim 8, characterized in that: When factor analysis is used, KMO and Bartlett sphericity tests are first performed, and then the variance of the contribution of gas characteristics to the common factors is calculated.
10. A data expansion and optimization device for transformer fault diagnosis, characterized in that: The device includes a processor and a memory, wherein the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement a data expansion and optimization method for transformer fault diagnosis as described in any one of claims 1 to 9.
Citation Information
Patent Citations
Method and system for enhancing class imbalance encrypted traffic data based on WSAGAN
CN118643325A
A System and Method for Modelling System Behaviour
US20170147722A1
Method and system for automatic extraction of virtual on-body inertial measurement units
US20220066544A1
Image generation method and apparatus
WO2023030182A1
Cited By
Electric power engineering safety quality intelligent diagnosis system based on AI
CN120833085A
AI-based power engineering safety quality intelligent diagnosis system
CN120833085B
Transformer fault intelligent diagnosis system and method based on K-Medoid and SMOTE optimization support vector machine
CN121350798A
