A machine learning-based three-phase inverter device fault diagnosis method
By expanding the data using the improved SMOTE method and singular value clustering, and combining it with an improved PCNN network model and classifier, the problems of insufficient feature extraction and poor model matching in fault diagnosis of three-phase inverter equipment were solved, thereby improving the accuracy and precision of fault diagnosis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-09
- Publication Date
- 2026-03-27
AI Technical Summary
In the fault diagnosis of three-phase inverter equipment, the existing technology does not have enough fine feature extraction, resulting in insufficient classification accuracy. In addition, the feature extraction model has poor matching with the fault data, which affects the detection accuracy.
An improved SMOTE method is used to expand the sample. Combined with singular value clustering and an improved PCNN network model, an improved random forest classifier is constructed using the DEAF activation function and an improved weighted average cross-entropy loss function for feature extraction and fault classification.
It effectively solves the diagnostic error caused by sample class imbalance, improves feature representation ability and classification accuracy, and improves the precision of fault diagnosis.
Smart Images

Figure CN116776245B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of machine learning, in particular to a three-phase inverter equipment fault diagnosis method based on machine learning. BACKGROUND
[0002] Three-phase inverter is a kind of power electronic device, which is used to convert DC power into AC power. It is usually composed of three single-phase inverters, each of which converts DC power into an AC signal. By controlling the three AC signals, a three-phase AC output can be obtained. Three-phase inverters are widely used in industrial control, renewable energy and other fields. In practical application, fault diagnosis of three-phase inverter becomes very important, because fault will affect the normal operation of the equipment and may cause damage to the equipment.
[0003] Equipment fault diagnosis usually collects tens of signals or parameters for data analysis. The existing method is usually not fine enough in feature extraction of equipment fault diagnosis data in the design of equipment fault diagnosis algorithm model, which affects the classification accuracy of fault diagnosis.
[0004] In addition, in the use of equipment fault diagnosis model, the existing method is usually difficult to match the equipment fault data in the design of the activation function of the feature extraction model and the kernel function of the classification function, which further affects the detection accuracy of equipment fault diagnosis. SUMMARY
[0005] In view of the shortcomings of the existing method, the present application solves the problem that the feature extraction of equipment fault diagnosis data is not fine enough, which affects the classification accuracy of fault diagnosis, and the problem that the activation function of the feature extraction model and the classifier design are difficult to match the equipment fault data, which further affects the detection accuracy of equipment fault diagnosis.
[0006] The technical solution adopted by the present application is: a three-phase inverter equipment fault diagnosis method based on machine learning includes the following steps:
[0007] Step 1, collect the current signal characteristic value of three-phase inverter, and mark the fault type, construct the data set under different faults;
[0008] Step 2, pre-process the collected current signal characteristic value;
[0009] Further, the pre-processing includes: using mean value to fill in missing values; using non-parametric verification chi-square test to detect error values.
[0010] Step 3, use improved SMOTE method to expand the sample data set;
[0011] Further, the improved SMOTE method comprises:
[0012] Step 31, denoising the data samples by the mean filtering method;
[0013] Step 32, calculating the value of the aggregation degree by measuring the center deviation of each instance with the increase of k neighbors, and screening by the aggregation degree value greater than a threshold value to construct the minority class sample data set to be synthesized;
[0014] Further, the formula of the aggregation degree value is:
[0015]
[0016] Wherein, C cow (X d ) represents the aggregation degree value of the minority class sample, σ i+1 (X d ) is the migration measure coefficient corresponding to the neighbor distance value of i+1 of the k-neighbor algorithm, and σ i (X d ) is the migration measure coefficient corresponding to the neighbor distance value of i of the k-neighbor algorithm.
[0017] Step 33, synthesizing the constructed minority class sample data set to be synthesized by using the formula X new =X m +λ(X n -X m ), to generate new samples; wherein X new is the newly generated sample, X m is the minority class sample instance, X n is the nearest k-neighbor sample instance to X m , and λ∈[0, 1] represents a random number.
[0018] Step four, smoothing the expanded data, and then extracting features of the smoothed data by the SBC algorithm;
[0019] Further, the SBC algorithm comprises: singular value decomposition is performed on the data matrix to obtain the first r columns in the matrix U as the main feature vectors of the data; then, the main feature vectors are sorted according to the size of the singular values, and the feature vectors with similar singular values are clustered together.
[0020] Step five, training the data by using the improved PCNN network model to obtain the fault classification result of the three-phase inverter;
[0021] Further, the improved PCNN network model adopts the DEAF activation function, and the formula is:
[0022]
[0023] wherein a1 and a2 are control parameters of the double exponential function.
[0024] Further, the improved PCNN network model adopts an improved weighted average cross-entropy loss function, and the formula is as follows:
[0025]
[0026] wherein K represents the number of fault categories, N represents the number of samples, w k represents the weight of the kth fault category, y ik represents the real label of the sample i belonging to the kth fault category, represents the prediction probability of the model that the sample i belongs to the kth fault category.
[0027] Further, the improved PCNN network model adopts an improved random forest classifier, and the construction of the improved random forest classifier comprises the following steps:
[0028] Step 1, randomly selecting K samples from the training set and randomly selecting M features;
[0029] Step 2, calculating the similarity value between each sample and K-1 samples by using cosine similarity, and descending the similarity value;
[0030] Step 3, calculating the relative importance value between each feature and K-1 features by using the Gini coefficient, and descending the relative importance value;
[0031] Step 4, selecting the sample with the largest similarity value and the feature with the largest relative importance value as the root node of the decision tree;
[0032] Step 5, for each non-leaf node, repeating step 4 to select a sample and a feature from the remaining sample with the highest similarity value and the feature with the highest relative importance value as the child node;
[0033] Step 6, until the decision tree reaches the set depth or the number of samples in the node is less than a certain threshold.
[0034] The beneficial effects of the present application are as follows:
[0035] 1. The sample expansion method of the present application effectively solves the phenomenon that the diagnostic error becomes large due to the imbalance of sample categories in the three-phase inverter equipment fault diagnosis task of the traditional method.
[0036] 2. The singular value-based clustering method reduces the feature dimension and improves the expression ability of the features.
[0037] 3. The DEAF activation function of the improved PCNN network model better handles nonlinear relationships and improves classification accuracy;
[0038] 4. The improved weighted average cross-entropy loss function handles unbalanced classes, making the model's predictions more balanced across classes;
[0039] 5. The improved feature extraction and improved classifier are used for three-phase inverter equipment fault diagnosis, effectively improving the ability of feature adaptive refinement, and thereby improving the precision of the classifier for equipment fault diagnosis. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 is a flowchart of the three-phase inverter equipment fault diagnosis method based on machine learning of the present application;
[0041] Figure 2 is a fault sample example of a three-phase inverter;
[0042] Figure 3 is an improved PCNN network model structure diagram. DETAILED DESCRIPTION
[0043] The present application will be further described below in conjunction with the drawings and examples, which are simplified schematic diagrams and only illustrate the basic structure of the present application in a schematic manner, and therefore only show the components related to the present application.
[0044] As shown in Figure 1 , a three-phase inverter equipment fault diagnosis method based on machine learning includes the following steps:
[0045] Step 1: Collect the current signal of the three-phase inverter and label the fault type to build a data set under different faults.
[0046] Under different fault conditions and normal conditions, the current value of the three-phase inverter is collected by a sensor; for example, the sampling period of 1 current data is 1 second, and the 1-second current signal is feature-extracted at 10ms intervals, 1 current data has a total of 100 feature values; 1000 current data are collected at 3-second intervals.
[0047] Step 2: Preprocess the collected current signal feature values.
[0048] Most of the data in actual equipment fault diagnosis applications are redundant, missing, and incorrect. The purpose of data preprocessing is to ensure the quality of the data used to meet the subsequent learning model building tasks.
[0049] For missing values, the mean value is filled in; mean value filling is to analyze whether the data attribute characteristics are numerical characteristics or non-numerical characteristics, if they are numerical characteristics, the average value of the data attribute in all other remaining objects is calculated, and the average value is inserted into the blank; if they are non-numerical characteristics, the mode principle in statistics is used, the frequency of the occurrence of the data attribute in other objects is calculated, and finally the value with the most occurrence is selected to perform the interpolation work.
[0050] For error values, the chi-square test method of non-parametric verification is used for detection, and the deviation value between suspected error data and normal data is counted. The greater the deviation value, the higher the possibility of data anomaly, and the smaller the deviation value, the greater the possibility of normal data. The formula of chi-square statistics is as follows:
[0051]
[0052] Where f e is the normal data value, f o is the suspected error data value, and F s is the difference between normal data and suspected error data; if the difference is large, it can be determined as error data for direct elimination.
[0053] Then, the data is normalized to better reflect the relationship between the data and the fault type and reduce the influence of different magnitudes on the fault diagnosis result.
[0054] The range standardization method is used for data normalization, and the formula is:
[0055]
[0056] Where x min and x max represent the minimum and maximum values in the data sample respectively, x in represents the input data, and x out represents the normalized data.
[0057] Step three, using the improved SMOTE method to expand the sample data set;
[0058] Since the collected fault data of various categories usually has the sample imbalance phenomenon, the data set needs to be expanded.
[0059] The existing SMOTE method is a method for analyzing and generating new samples of minority class samples, which generates new samples by interpolating randomly selected minority class samples and k-nearest neighbors, and the principle is as follows:
[0060] X new =X m+λ(X n -X m (1)
[0061] In the formula, X new For the newly generated sample, X m For minority class sample instances, X n Distance X m The nearest k-nearest neighbor sample instance, λ∈[0,1] represents a random number.
[0062] Existing SMOTE methods can easily generate new data; however, it can be found from the principle of SMOTE that if the minority class samples contain outliers, assigning an oversampling weight to all minority class samples will produce redundant samples and noisy labels.
[0063] In practical applications of three-phase inverters, uneven data distribution also exists in a few types, such as... Figure 2 As shown, the minority class exhibits both dense and non-dense regions. Dense regions have a higher sample density and already contain a significant amount of classification information. Therefore, non-dense regions require more synthetic samples to increase their density and reduce intra-class imbalance. In other words, for SMOTE, minority class instances D are more important than C in non-dense regions. Without considering intra-class imbalance, SMOTE might generate overlapping synthetic samples in dense regions, and since few samples are identified in non-dense regions, no new useful information is added for classification; therefore, non-dense regions require more synthetic samples to increase their density and reduce intra-class imbalance.
[0064] Improvements to the SMOTE method include:
[0065] First, the data samples are denoised by mean filtering to remove outliers in minority classes and some boundary data, thereby reducing the chance of using them to generate new samples.
[0066] Secondly, by measuring the center offset of each instance's k-nearest neighbors as k increases, the clustering degree is calculated. Instances with high clustering degree values are used to select samples from non-dense areas in the minority class for synthesis, thereby increasing the number of minority class types.
[0067] The degree of clustering is defined as follows:
[0068] In an m-dimensional dataset, clustering degree is related to the number of minority class instances X. d The regional center C of its k nearest neighbor k (X d (Related to C) k (X d It can be calculated in the following way:
[0069]
[0070] where C k (X d ) is the region center, d is the number of minority class instances, k is the k-neighbor distance value of the k-neighbor algorithm, N k (X d ) is the set of k-neighbors of X d , X q is an instance in the set of N k (X d ), and q is the number of X q instances.
[0071] With the increase of the parameter k, the migration amount measurement coefficient σ i (X d ) is used to measure the migration amount of the region center C k (X d ), and the formula is:
[0072] σ i (X d ) = Dis(C i (X d ), C i+1 (X d ))
[0073] where σ i (X d ) is the migration amount measurement coefficient corresponding to the k-neighbor distance value i of the k-neighbor algorithm, Dis represents the calculation distance length, i = 1, 2, …, k-1, k is the k-neighbor distance value of the k-neighbor algorithm, C i (X d ) is the region center corresponding to the k-neighbor distance value i of the k-neighbor algorithm, C i+1 (X d ) is the region center corresponding to the k-neighbor distance value i+1 of the k-neighbor algorithm; σ i (X d ) usually has a larger value in a non-dense region than in a dense region.
[0074] In order to represent the influence of k on the k-neighbor center position of the data node, the absolute error of the center migration amount is used to represent the degree of change of the k-neighbor center position, and the aggregation degree is defined by accumulating the degree of change of the k-neighbor center position as follows:
[0075]
[0076] where C cow (X d ) represents the aggregation degree value of the minority class sample, σ i+1 (X d) is the migration measure coefficient corresponding to the neighbor distance value i+1 of the k-neighbor algorithm, and σ i (X d ) is the migration measure coefficient corresponding to the neighbor distance value i of the k-neighbor algorithm.
[0077] Since the outlier samples are in a non-dense area, they have a greater degree of aggregation than normal samples. Therefore, the non-dense samples in the minority class can be detected by a large degree of aggregation.
[0078] The degree of aggregation C of each instance in the de-noised minority class sample set is calculated cow (X d , and the sample instance with the aggregation value higher than the threshold COW f is selected to construct the minority class sample data set to be synthesized; wherein the threshold COW f is a preset value.
[0079] Finally, the constructed minority class sample data set to be synthesized is synthesized using the formula X new =X m +λ(X n -X m ), to generate new samples; the new samples and the original samples are merged as an expanded data set.
[0080] Step four, the expanded data is smoothed, and the smoothed data is extracted by the SBC algorithm.
[0081] The moving average filter is used for smoothing, and the formula of the moving average filter is:
[0082]
[0083] Wherein, y i is the smoothed signal value, x i is the original signal value, x i-j is the i-jth signal value of the data, and n is the window size; by adjusting the window size, the degree of signal smoothing can be controlled, and in the embodiment, n=5.
[0084] The existing feature extraction method includes time domain feature, frequency domain feature, wavelet transform, etc.
[0085] The singular value-based clustering method (SBC Singular Value-based Clustering) of the application is mainly based on singular value decomposition algorithm and clustering algorithm, and can automatically extract the main features in the device running state. Singular value decomposition is a linear algebra method for decomposing a matrix into the product of three parts, and the formula is:
[0086] sX=UΣVT
[0087] wherein sX is a m x n matrix, U is a m x r matrix, V is a n x r matrix, Σ is a r x r diagonal matrix, and r is the rank of the matrix sX.
[0088] The smoothed data is set as a matrix sX, each row of sX represents a sample, and each column represents a feature of a class; the first r columns of the matrices U and V are taken as the main features of the data matrix by singular value decomposition of the data matrix; therefore, the first r columns of the matrix U are taken as the feature vectors of the data.
[0089] In order to further reduce the feature dimension, a clustering operation is performed on the feature vectors, and a singular value-based clustering algorithm is used; since the main feature vectors in the data matrix have similar singular values, the feature vectors with similar singular values are clustered together.
[0090] Specifically, first, the first r columns of the matrix U are obtained as the main feature vectors of the data by singular value decomposition of the data matrix; then, the main feature vectors are sorted according to the size of the singular values, and the feature vectors with similar singular values are clustered together; the specific steps are as follows:
[0091] 1. Randomly selecting k initial cluster centers using the K-Means algorithm;
[0092] 2. Assigning the main feature vectors to the nearest cluster center;
[0093] 3. Recalculating the position of each cluster center according to the clustering result;
[0094] 4. Performing steps 2-3 until the position of the cluster center no longer changes;
[0095] By clustering the feature vectors, the sample points in the high-dimensional feature space can be mapped to the low-dimensional space, thereby reducing the feature dimension and improving the expression ability of the features.
[0096] Step five, training the data processed in step four using the improved PCNN network model to obtain the fault classification result of the three-phase inverter;
[0097] As shown in Figure 3 The PCNN network is composed of two parallel convolutional neural networks, and the structure of each network is: convolutional layer-pooling layer-convolutional layer-pooling layer; the output features of the two networks are input to a fusion layer for fusion, wherein the fusion layer is a fully connected neural network layer. The convolutional kernel size of the convolutional layer is 1 x 3, the number is 2, and the step is 3; the pooling layer is maximum pooling.
[0098] A two-dimensional convolution operation is used in each convolutional layer to extract features in the image; maximum pooling is used in the pooling layer to reduce the size of the feature map.
[0099] The PCNN network uses a DEAF activation function, and the formula of the DEAF activation function is:
[0100]
[0101] where a1 and a2 are control parameters of the double exponential function, both of which are adjustable parameters; the DEAF activation function can help the network better handle nonlinear relationships and improve classification accuracy.
[0102] The DEAF activation function includes a double exponential function and control parameters, has more rich nonlinear properties and flexibility, and can better fit the complex patterns of input data; the double exponential function can provide more complex nonlinear transformations, and the control parameters can adjust the shape and response degree of the function, which can better capture the nonlinear features of the input data, thereby improving the network's modeling ability for nonlinear relationships.
[0103] An improved weighted average cross-entropy loss function is used, and the formula of the improved weighted average cross-entropy loss function is:
[0104]
[0105] where K represents the number of fault categories, N represents the number of samples, w k represents the weight of the kth fault category, y ik represents the true label of sample i belonging to the kth fault category, represents the predicted probability of the model that sample i belongs to the kth fault category.
[0106] In the classification task, the number of samples of different categories may be unbalanced; in this case, simply using the average cross-entropy may cause the model to be biased towards the category with more number; by introducing the weight factor w k , the weighted average cross-entropy can appropriately weight the samples of different categories, thereby better handling unbalanced categories and making the model's prediction more balanced across categories.
[0107] An improved random forest classifier is used for fault classification, and the existing random forest classifier realizes classification by constructing multiple decision trees; each decision tree is obtained by randomly extracting a part of the samples and features in the training set, which can make each decision tree have different feature subsets and sample subsets, thereby reducing the risk of overfitting, and the final classification result is determined by the voting of all decision trees.
[0108] Existing random forest classifiers generate different decision trees by randomly sampling the data and features. However, this approach can result in some decision trees learning less diverse features, which can affect the accuracy of the entire classifier.
[0109] Improving the construction of random forest classifiers includes:
[0110] 1. Randomly selecting K samples and M features from the training set;
[0111] 2. Calculating the similarity values between each sample and K-1 samples using cosine similarity, and sorting the similarity values in descending order;
[0112] 3. Calculating the relative importance values between each feature and K-1 features using the Gini coefficient, and sorting the relative importance values in descending order;
[0113] 4. Selecting the sample with the highest similarity value and the feature with the highest relative importance value as the root node of the decision tree;
[0114] 5. For each non-leaf node, repeat step 4 to select a sample and a feature from the remaining samples with the highest similarity value and the features with the highest relative importance value as child nodes;
[0115] 6. Until the decision tree reaches the set depth or the number of samples in the node is less than a certain threshold.
[0116] When all the decision trees in the random forest are established, classify the faults; apply each test sample to each tree, then collect the classification results of each tree; the output of the classifier is a discrete class label of the fault type, and finally use majority voting to determine the final classification of each test sample.
[0117] Randomly selecting samples and features: In the process of constructing each decision tree, this method selects random K samples and M features. This randomness ensures that each tree is trained on a different subset of data, allowing each tree to focus on different features and feature combinations.
[0118] Calculating the similarity between samples and the relative importance of features: This step introduces another selection mechanism for samples and features. By selecting samples and features with high similarity and high relative importance as nodes, this method can more deeply learn the characteristics of the data.
[0119] Based on the above ideal embodiments according to the present application, through the above description, relevant personnel can make various changes and modifications without deviating from the scope of the technical idea of the present application. The technical scope of the present application is not limited to the contents of the specification, and must be determined by the scope of the claims.
Claims
1. A machine learning-based fault diagnosis method for a three-phase inverter device, characterized by, The method comprises the following steps: Step one, collect the current signal characteristic value of the three-phase inverter, mark the fault type, and construct the data set under different faults; Step two, pre-process the collected current signal characteristic value; Step three, use the improved SMOTE method to expand the sample data set; Step four, smooth the expanded data, and then extract features from the smoothed data through the SBC algorithm; Step five, use the improved PCNN network model to train the data, and obtain the fault classification result of the three-phase inverter; The improved PCNN network model is composed of two parallel convolutional neural networks, and the structure of each network is: convolutional layer-pooling layer-convolutional layer-pooling layer; The output features of the two networks are input into a fully connected neural network layer; The improved PCNN network model adopts DEAF activation function, and the formula is: wherein and are control parameters of the double exponential function. The improved PCNN network model adopts an improved random forest classifier, and the construction of the improved random forest classifier comprises: Step 1, randomly select K' samples from the training set, and randomly select M features; Step 2, calculate the similarity value between each sample and K'-1 samples by using cosine similarity, and sort the similarity values in descending order; Step 3, calculate the relative importance value between each feature and K'-1 features by using the Gini coefficient, and sort the relative importance values in descending order; Step 4, select the sample with the highest similarity value and the feature with the highest relative importance value as the root node of the decision tree; Step 5, for each non-leaf node, repeat step 4 to select a sample and a feature from the remaining sample with the highest similarity value and the feature with the highest relative importance value as the child node; Step 6, until the decision tree reaches the set depth or the number of samples in the node is less than a certain threshold. 2.The machine learning based three-phase inverter device fault diagnosis method of claim 1, wherein, The pre-processing includes: using mean value to fill in missing values; using chi-square test method to detect error values. 3.The machine learning based three-phase inverter device fault diagnosis method of claim 1, wherein, The improved SMOTE method comprises: Step 31, denoise the data samples by using mean filtering method; Step 32, calculate the value of the aggregation degree by measuring the center offset amount generated by the increase of the near neighbors of each instance, and screen by the aggregation degree value being greater than a threshold value to construct the minority class sample data set to be synthesized. near neighbors Step 32, calculate the value of the aggregation degree by measuring the center offset amount generated by the increase of the near neighbors of each instance, and screen by the aggregation degree value being greater than a threshold value to construct the minority class sample data set to be synthesized. Step 33, using the formula synthesizing, for a constructed minority class sample data set to be synthesized, a new sample; for the newly generated sample, for the minority class sample instance, for the distance the nearest nearest neighbor sample instance, represents a random number. 4.The machine learning based three-phase inverter device fault diagnosis method of claim 3, wherein, The formula of the aggregation value is: wherein, represents the aggregation value of the minority class sample, is the neighbor distance value of the neighbor algorithm is the migration measurement coefficient corresponding when the neighbor distance value of the neighbor algorithm is the migration measurement coefficient corresponding when is a class instance. 5.The machine learning based three-phase inverter device fault diagnosis method of claim 1, wherein, The SBC algorithm includes: First, performing singular value decomposition on the data matrix to obtain the matrix. The front of the middle The columns serve as the main feature vectors of the data; then, the main feature vectors are sorted according to the size of their singular values, and feature vectors with similar singular values are clustered together. 6.The machine learning based three-phase inverter device fault diagnosis method of claim 1, wherein, The improved PCNN network model adopts an improved weighted average cross-entropy loss function, and the formula is: wherein, denotes the number of failure classes, denotes the number of samples, denotes the weight of the th failure class, denotes the true label of the th sample belonging to the th failure class, denotes the predicted probability of the model that the th sample belongs to the th failure class.
Citation Information
Patent Citations
Current signal analysis method based on threshold-free recurrence plot and convolutional neural network
CN115097184A
Industrial internet platform intrusion detection method and device and electronic equipment
CN115801463A