Fault diagnosis method based on statistically constrained SMOTE and self-paced residuals
By generating a balanced data set based on statistical constraints, and training with self-step residual network, the problem of unbalanced data set category distribution in petrochemical equipment fault diagnosis is solved, and the classification accuracy is significantly improved.
Patent Information
- Application Number
- CN202410918342.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-10
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2044-07-10
AI Technical Summary
In the diagnosis of petrochemical equipment faults, the imbalance in the category distribution of the data set leads to a decrease in classification accuracy, especially the lack of recognition ability of a few categories of samples.
The SMOTE (Synthetic Minority Over-sampling Technique) algorithm based on statistical constraints is used to generate a balanced data set, and it is trained in combination with self-step residual network (SPLRN). The objective function is optimized through dynamic self-step functions to improve the model's feature learning ability of a few categories of samples.
The classification accuracy of fault diagnosis is significantly improved by generating high-quality balanced datasets and self-step learning to enhance residual network training process, especially when dealing with highly unbalanced datasets.
Smart Images

Figure CN118916666B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a fault diagnosis method based on statistically constrained SMOTE and self-paced residual. Background Art
[0002] Petrochemical equipment has the characteristics of high temperature, high pressure, flammability, explosion, toxicity, etc., which are very dangerous and have high safety risks. In recent years, as petrochemical equipment has become increasingly large-scale, integrated and complex, petrochemical safety work faces greater challenges. Real-time monitoring of petrochemical equipment and ensuring safe and stable operation are of great significance to the economic benefits and production safety of enterprises.
[0003] Due to the complex internal structure of large units in the petrochemical industry, most equipment fault diagnosis systems in the past relied heavily on the experience and expert knowledge of technicians to design feature extraction methods. However, there are problems such as uncertainty in manually selected features. Faced with fault data from different units, it is difficult to determine in time which feature extraction methods have better effects and applicability.
[0004] The continuous development of data-driven artificial intelligence technology has brought new opportunities for industrial unit fault diagnosis. How to apply intelligent technology to the fault diagnosis of petrochemical equipment has attracted the attention of many researchers. As the most popular sub-direction in the field of artificial intelligence, deep learning can adaptively learn hidden information from the vibration signal data of the unit and extract deep features, which is more conducive to fault diagnosis. In the case of many high-dimensional feature data, the use of deep learning to mine and identify these data has better diagnostic effects than traditional fault diagnosis methods. Many research teams have begun to study data-driven intelligent fault diagnosis technology, which has become an important research field for fault prediction and health management of industrial units. And it has begun to be widely used in specific industrialization and commercial projects. Enterprises can monitor the data generated by the production and operation of petrochemical machinery and equipment in real time, and timely discover equipment failures to avoid losses.
[0005] In actual industrial environments, since petrochemical equipment works in a healthy state most of the time, sufficient normal state data can be collected, but very little fault state data is collected. Therefore, the collected data set is often unbalanced, that is, the fault state data sample is much smaller than the normal state data sample, and there are also cases where even fewer specific fault types are collected.
[0006] Due to the complex structure and huge number of parameters of deep learning models, a large amount of labeled balanced data is required for training to achieve high diagnostic accuracy. When the number of samples of certain categories in the data set is small and the category distribution is unbalanced, it will lead to classification difficulties. The classification results are more inclined to normal samples and ignore fault samples, thus causing misclassification of minority categories. The class imbalance problem of the data set poses a challenge to the classification accuracy of fault diagnosis. Summary of the invention
[0007] The present invention provides a fault diagnosis method based on statistically constrained SMOTE and self-paced residual, which is used to solve the defect that the imbalanced distribution of data set categories in the prior art affects the classification accuracy of fault diagnosis, and improve the classification accuracy of fault diagnosis.
[0008] The present invention provides a fault diagnosis method based on statistically constrained SMOTE and self-paced residual, comprising:
[0009] Based on the SMOTE algorithm, generated sample data is obtained according to the unbalanced data set of the sample unit, and the generated sample data is screened according to the statistical characteristics of the generated sample data to obtain a balanced data set;
[0010] Obtaining a fault category prediction label corresponding to the balanced data set based on a residual network, and determining a loss value between the fault category prediction label and a true label of the fault category corresponding to the balanced data set;
[0011] The loss value is updated based on the dynamic self-stepping function to obtain an objective function, the objective function is optimized, and the residual network is trained using the optimized objective function;
[0012] The operating data of the target unit is input into the trained residual network to obtain a fault category prediction label of the target unit output by the residual network.
[0013] According to a fault diagnosis method based on statistically constrained SMOTE and self-paced residual provided by the present invention, the statistical features include one or more of peak factor, waveform factor, pulse factor, skewness and kurtosis.
[0014] According to a fault diagnosis method based on statistically constrained SMOTE and self-paced residual provided by the present invention, the generated sample data is screened according to the statistical characteristics of the generated sample data, including:
[0015] Determine a box plot of each statistical feature of each class of the imbalanced data set;
[0016] According to the lower quartile and upper quartile of the box plot of each statistical feature, the upper outlier cutoff point of each statistical feature is determined;
[0017] According to the lower quartile and upper quartile of the box plot of each statistical feature, the lower outlier cutoff point of each statistical feature is determined;
[0018] Determine the constraint region of each statistical feature according to the upper outlier cutoff point and the lower outlier cutoff point of each statistical feature;
[0019] In the case that the statistical features of each type of the generated sample data are within the constraint region of the statistical features, the generated sample data are retained; otherwise, the generated sample data are discarded.
[0020] According to a fault diagnosis method based on statistically constrained SMOTE and self-paced residual provided by the present invention, the residual network sequentially includes a convolutional layer, a batch normalization layer, a pooling layer, a plurality of residual blocks and a fully connected layer;
[0021] Each residual block includes a first convolutional layer, a first batch normalization layer, a Relu activation function, a second convolutional layer, and a second batch normalization layer in sequence, and each residual block also includes a skip connection.
[0022] According to a fault diagnosis method based on statistically constrained SMOTE and self-paced residual provided by the present invention, the loss value is updated based on a dynamic self-paced function to obtain an objective function:
[0023]
[0024] Where E is the objective function, W represents the parameters of the residual network, n is the total number of data in the balanced data set, V is the implicit weight vector of length n, and the value v of the i-th dimension in V is i For X i The weight, λ t is the control parameter value in the tth iteration, is the i-th data X in the balanced data set i The fault category prediction label f(X i , W) and the true label Y of the fault category i The loss value between , q(t)>1, is a monotonically decreasing function of time t, which is used to control the selection of the learning scheme of the self-paced learning.
[0025] According to a fault diagnosis method based on statistically constrained SMOTE and self-paced residual provided by the present invention, the calculation formula of q(t) is:
[0026]
[0027] Among them, N t With N maxis a value in a predefined sample sequence N, N = {[N1, N2, ..., N max ], (for i <j,N i <N j )},N i and N j are the i-th and j-th values in N, respectively, where N represents the number of samples selected in each round of training in the self-paced learning, and N t Represents the number of samples selected in the t-th training stage.
[0028] According to a fault diagnosis method based on statistically constrained SMOTE and self-paced residual provided by the present invention, λ t The calculation formula is:
[0029]
[0030] Among them, Lsort is the loss value L corresponding to n data in the tth iteration = [l1, l2…l n ] are sorted in ascending order, l1 is the loss value corresponding to the first data, l2 is the loss value corresponding to the second data, l n is the loss value corresponding to the nth data, is the Nth t A loss value.
[0031] According to a fault diagnosis method based on statistically constrained SMOTE and self-paced residual provided by the present invention, v i The update formula is:
[0032]
[0033] The present invention also provides a fault diagnosis device based on statistically constrained SMOTE and self-paced residual, comprising:
[0034] A generating module, configured to obtain generated sample data according to an unbalanced data set of a sample unit based on a SMOTE algorithm, and to screen the generated sample data according to statistical characteristics of the generated sample data to obtain a balanced data set;
[0035] A construction module is used to obtain a fault category prediction label corresponding to the balanced data set based on a residual network, and determine a loss value between the fault category prediction label and a true label of the fault category corresponding to the balanced data set;
[0036] A training module, used to update the loss value based on a dynamic self-paced function to obtain an objective function, optimize the objective function, and use the optimized objective function to train the residual network;
[0037] The diagnosis module is used to input the operating data of the target unit into the trained residual network to obtain the fault category prediction label of the target unit output by the residual network.
[0038] The fault diagnosis method based on SMOTE and self-paced residual with statistical constraints provided by the present invention, on the one hand, generates a balanced data set through the SMOTE algorithm based on statistical constraints, generates high-quality samples that are more in line with the statistical characteristic distribution of the original samples, and constrains the quality of the generated sample data through statistical characteristics, reduces the generated noise data, and improves the quality of the training samples; on the other hand, self-paced learning is added to the training process of the residual network, and the dynamic self-paced function is used to optimize the objective function, thereby improving the model's feature learning ability for minority class samples, thereby improving the recognition accuracy of minority class samples. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0040] Figure 1 It is one of the flow charts of the fault diagnosis method based on the statistically constrained SMOTE and self-paced residual provided by the present invention;
[0041] Figure 2 It is a box plot of five dimensionless statistical characteristic indicators of a certain type of fault in the fault diagnosis method based on statistical constraint SMOTE and self-step residual provided by the present invention;
[0042] Figure 3 It is a structural schematic diagram of a residual block in a residual network in a fault diagnosis method based on statistically constrained SMOTE and self-paced residual provided by the present invention;
[0043] Figure 4 This is the second flow chart of the fault diagnosis method based on the statistically constrained SMOTE and self-paced residual provided by the present invention;
[0044] Figure 5 This is the third flow chart of the fault diagnosis method based on statistically constrained SMOTE and self-paced residual provided by the present invention;
[0045] Figure 6 It is a structural schematic diagram of a fault diagnosis device based on statistically constrained SMOTE and self-paced residual provided by the present invention;
[0046] Figure 7 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] Combine the following Figure 1 The present invention describes a fault diagnosis method based on statistically constrained SMOTE and self-paced residual, comprising:
[0049] Step 101, obtaining generated sample data according to an unbalanced data set of a sample machine group based on a SMOTE (Synthetic Minority Oversampling) algorithm, and screening the generated sample data according to statistical characteristics of the generated sample data to obtain a balanced data set;
[0050] The unbalanced data set of the sample unit is the operating data of the sample unit, such as the vibration signal of the sample unit, wherein the operating data of the sample unit under normal conditions is mostly, and the operating data under fault conditions is very small.
[0051] In the field of fault diagnosis, there is a high class imbalance in the mechanical operation data set collected under actual working conditions, which leads to the problem that the deep learning network is not able to learn the features of minority class samples in the imbalanced data set during the fault diagnosis process.
[0052] The equipment fault signals collected under actual working conditions usually contain a large amount of noise data, which may cause the new sample data generated using the traditional SMOTE algorithm to also contain noise data. Therefore, this embodiment proposes a SMOTE algorithm based on statistical constraints (Statistical Constraints Synthetic Minority Over-Sampling Technique, SC-SMOTE), which combines the data imbalance algorithm with the statistical characteristics of the generated sample data, and can introduce statistical characteristics that are relatively stable for the distribution of fault data to constrain the quality of the generated sample data. The goal is to generate high-quality samples that are more consistent with the distribution of the statistical characteristics of the original samples, and reduce the generated noise data through the constraints of statistical characteristics.
[0053] At the data level, the unbalanced dataset X of the large unit is input into SC-SMOTE to balance the number of samples in each category in the training set, and finally the training set X is obtained. g .
[0054] Step 102, obtaining a fault category prediction label corresponding to the balanced data set based on a residual network, and determining a loss value between the fault category prediction label and a fault category true label corresponding to the balanced data set;
[0055] In order to extract rich feature information and further improve the classification performance of the model, a self-paced learning process is added to the residual network, and a self-paced learning residual network (SPLRN) is proposed, so that the sample to be learned next is determined at each step of the training phase. In other words, this method focuses more on finding instances with rich information and samples with higher learning difficulty, so as to improve the feature learning ability of the deep residual network model for minority class samples, thereby improving the recognition accuracy of minority class samples.
[0056] At the model level, a self-paced residual network is constructed. Specifically, the training set X g Input the residual network for classification diagnosis and output the fault category prediction label. The fault category prediction label includes normal category and various fault categories. Calculate the loss value (Loss) between the predicted label and the true label, and use self-paced learning to adjust the loss value to obtain the target loss function.
[0057] SPLRN uses the residual network as the backbone network of the model and adds the self-paced learning step to the training process of the residual network. Specifically, SPLRN can use the dual relationship between the loss size and the difficulty of learning fault samples for weighting, and assign a weight to each sample to reflect the difficulty of the sample, making the model more robust to the learning of data distribution.
[0058] Step 103, updating the loss value based on the dynamic self-stepping function to obtain an objective function, optimizing the objective function, and using the optimized objective function to train the residual network;
[0059] The samples for the next round of training are determined based on the loss value. The objective function is obtained by updating the loss value using the dynamic self-stepping function. The objective function can be optimized using the commonly used optimizer adam, and the parameters of the residual network can be adjusted using the optimized objective function until the residual network converges.
[0060] Step 104: input the operating data of the target unit into the trained residual network to obtain a fault category prediction label of the target unit output by the residual network.
[0061] The target unit is the unit that currently needs to be diagnosed for faults, and the trained residual network is used to perform fault diagnosis on the target unit.
[0062] On the one hand, this embodiment generates a balanced data set through the SMOTE algorithm based on statistical constraints, generates high-quality samples that are more in line with the statistical feature distribution of the original samples, and constrains the quality of the generated sample data through statistical features, reduces the generated noise data, and improves the quality of the training samples; on the other hand, self-paced learning is added to the training process of the residual network, and the objective function is optimized using a dynamic self-paced function to improve the model's feature learning ability for minority class samples, thereby improving the recognition accuracy of minority class samples.
[0063] The SC-SMOTE algorithm can generate samples that are highly similar to the original fault data, which can provide more discriminative information for the model. Self-paced learning enhances the ability of the residual network to learn the characteristics of minority class samples and improves the model's ability to identify fault signals of petrochemical equipment.
[0064] On the basis of the above embodiments, the statistical features in this embodiment include one or more of peak factor, waveform factor, pulse factor, skewness and kurtosis.
[0065] At the data level, the SC-SMOTE algorithm is proposed. For the fault signals of large petrochemical units, the use of the traditional SMOTE algorithm may generate noise data. Using the traditional fault signal recognition technology as a constraint item for the newly generated samples of the SMOTE algorithm can generate sample data with better quality.
[0066] Traditional fault signal recognition technology calculates some statistical features of fault signals and determines the type of fault based on the range of these index values. There are obvious differences in the dimensionless index values of normal samples and faulty samples. Therefore, in this embodiment, five dimensionless indicators can be selected as constraints, including peak factor, waveform factor, pulse factor, skewness and kurtosis, to determine whether the generated sample data meets the statistical characteristics of the original sample.
[0067] On the basis of the above embodiment, the method of screening the generated sample data according to the statistical characteristics of the generated sample data in this embodiment includes:
[0068] Determine a box plot of each statistical feature of each class of the imbalanced data set;
[0069] According to the lower quartile and upper quartile of the box plot of each statistical feature, the upper outlier cutoff point of each statistical feature is determined;
[0070] According to the lower quartile and upper quartile of the box plot of each statistical feature, the lower outlier cutoff point of each statistical feature is determined;
[0071] Determine the constraint region of each statistical feature according to the upper outlier cutoff point and the lower outlier cutoff point of each statistical feature;
[0072] In the case that the statistical features of each type of the generated sample data are within the constraint region of the statistical features, the generated sample data are retained; otherwise, the generated sample data are discarded.
[0073] Box plots can well reflect the characteristics of the original data distribution and are a commonly used method in statistics to display data distribution and detect outliers. In box plots, the upper and lower outlier cutoff points ε are usually set. u and ε l Perform outlier detection, and the calculation is shown in formulas (1) and (2):
[0074] ε u =Q3+k(Q3-Q1) (1)
[0075] ε l =Q1-k(Q3-Q1) (2)
[0076] Among them, (Q1, Q2, Q3) is called the interquartile range, which is often used to indicate data distribution. Q1 and Q3 are the lower and upper quartiles in the box plot, i.e., the boundary values of the one-quarter and three-quarter areas in the data domain where all data points are arranged in ascending order. k is the outlier factor. The larger the value, the farther the outlier cutoff point is from the box, and the more the detected point deviates from the main distribution area of the data.
[0077] When the statistical characteristics of the generated sample data are less than ε u or greater than ε l When , it is considered an outlier. The five dimensionless statistical characteristic indicators of a minority category fault can be calculated according to the five dimensionless indicator formulas, and then the upper and lower outlier cutoff points ε of these indicator values can be calculated according to formulas (1) and (2). u and ε l .
[0078] like Figure 2 As shown in Figure 1, a coefficient is assigned to each dimensionless statistical feature index for easy visualization. By calculating the five dimensionless index values of the minority class samples, five box plots can be obtained. l ,ε u ] is used as the constraint area of the method. Specifically, if the five dimensionless index eigenvalues of the generated sample data are respectively in the box area of the five calculated box plots, they are retained as newly generated high-quality samples, otherwise they are discarded until a balanced sample ratio is generated. The algorithm pseudo code is as follows:
[0079]
[0080]
[0081] On the basis of the above embodiment, the residual network described in this embodiment includes a convolutional layer, a batch normalization layer, a pooling layer, a plurality of residual blocks and a fully connected layer in sequence;
[0082] Each residual block includes a first convolutional layer, a first batch normalization layer, a Relu activation function, a second convolutional layer, and a second batch normalization layer in sequence, and each residual block also includes a skip connection.
[0083] The residual network is an improvement of CNN (Convolutional Neural Network), which has been proven to be effective in many tasks and has been widely used in the field of fault diagnosis. In a typical CNN deep network, as the network deepens, the gradient disappears, that is, the gradient becomes very small when propagating through many layers of the neural network. This will lead to slower learning speed and even complete loss of learning ability in very deep architectures.
[0084] The residual network introduces skip connections (also called residual connections) into the CNN network to form residual blocks to solve this problem. Figure 3 As shown in the figure, let the input of the convolution layer be x and the output be f(x). In the residual block, a jump connection is directly introduced from the input to the output of the convolution layer, so that the output of the residual block becomes f(x)+x.
[0085] The residual block allows the gradient to bypass certain layers in the network, making the network easier to train and allowing the network to be constructed deeper, that is, with more layers. Figure 4 As shown in the figure, the residual network includes convolutional layers, several residual blocks (ResidualBlocks), batch normalization layers (BN), ReLU activation functions, global average pooling layers, and fully connected output layers. The residual block consists of two BN layers, two convolutional layers, and a skip connection, which is activated by the Relu activation function. The introduction of residual connections is conducive to gradient back propagation, so the residual network is easier to train than the classic CNN, and also improves the classification performance.
[0086] The training set X g Input a convolutional layer (Covn) in the residual network, then pass through batch normalization (BN) and pooling layers, and then input into four residual blocks (Residual Block) in sequence to extract features, and finally pass through the fully connected layer (FC) for classification diagnosis and output the predicted label.
[0087] The total loss function of the residual network is shown in formula (3), where w is the model weight and y i is the sample label, f(x i , w) is the model’s predicted label for the sample.
[0088]
[0089] The softmax layer is the last layer of the residual network, and the output neurons are activated by it to obtain [α1,…,α K ], and the cross entropy calculation with the one-hot format of the label vector y is The optimization goal of the residual network is to minimize the above loss function. After calculating the loss, gradient backpropagation is applied to update the model parameters, and the iterations are repeated to fully optimize the model to obtain the minimum loss value.
[0090] The objective function obtained based on the loss value based on self-paced learning is:
[0091]
[0092] λ=λ+μ(6)
[0093] Wherein, E is the objective function, L represents the i-th data X in the balanced data set i The fault category prediction label f(X i , W) and the true label Y of the fault category i The loss value between , W represents the parameters of the residual network, n is the total number of data in the balanced data set, V is the implicit weight vector of length n, and the value v of the i-th dimension in V is i For X i The weight of v i The updated value, λ is the control parameter value, and μ is the update step size of λ in each stage of self-paced learning.
[0094] Self-paced learning can simulate human cognition and has the ability to gradually learn from simple to complex tasks. The metric of the sample is embedded in the optimization model. Therefore, self-paced learning can achieve adaptive sample sorting. The sorting course is a regularization term in the objective function of learning. Its overall optimization goal is shown in formula (4).
[0095] In formula (4), V = [v1, v2…v i ],v i ∈[0,1]. When v i =1 indicates a simple sample, which is selected for training; when v i = 0, it indicates a hard sample. It is not selected for training, and the loss it generates has no effect on the update of the model parameter W in this round of training. When the model parameter W is fixed, the weight vector V can be updated using formula (5). W and V are updated alternately and iteratively, and finally a set of model parameters W and weight vector V are optimized so that the sum of the training weighted loss and the negative L1 norm of the weight vector V are equal. Minimum. λ is a control parameter value that reflects the current learning stage (learning pace). As the training progresses, λ is updated according to the step size μ. The calculation formula is shown in formula (6).
[0096] Consider all samples whose loss is less than a certain threshold λ, that is, samples with smaller loss values correspond to samples that are easier to train (easy samples), and do not consider other samples whose loss is greater than the threshold λ. As the training process proceeds, the threshold λ will gradually approach 1 from 0. In this process, those harder samples (hard samples) will be gradually added to the model training process. The pseudo code of the specific process of self-paced learning is as follows:
[0097]
[0098] Combining the characteristics of residual networks and self-paced learning, and introducing a dynamic self-paced function, the SPLRN model is proposed. It can enhance the robustness of learning by assigning a weight to each sample to reflect the difficulty of the sample, and then incorporating the dynamic self-paced function into the learning objective of the residual network to jointly learn model parameters and potential weight variables. RN and E SPLRN They are the loss functions of the residual network and SPLRN model respectively. The two loss functions have the following relationship:
[0099]
[0100] Among them, w is the weight of a layer in the network, η is the learning rate. From the above formula, we can see that the sample weight v i The learning rate can be controlled, and the sample weight v i ∈[0, 1]. When the sample in this round of learning is a simple sample, the learning rate is high, and the network can update the parameters with a large step. When the sample is a difficult sample, the learning rate of the sample is small. With a small learning rate, the network updates the parameters with a small step to obtain a better weight parameter value.
[0101] On the basis of the above embodiment, the objective function obtained after updating the loss value based on the dynamic self-paced function in this embodiment is:
[0102]
[0103] Among them, λ t is the control parameter value in the tth iteration, is the i-th data X i The loss value at the tth iteration, q(t)>1, is a monotonically decreasing function of time t, which is used to control the selection of the learning scheme of the self-paced learning.
[0104] There are several effective self-pacing functions for various data with different characteristics, such as binary hard weighting, linear soft weighting, logarithmic soft weighting, and mixed weighting. However, these methods assign low weights to simple samples in the early stages of learning. To solve this problem, a dynamic self-pacing function is used to re-assign weights reasonably, as shown in formula (9):
[0105]
[0106] According to formula (4) and formula (9), the optimization target of SPLRN is shown in formula (8).
[0107] Based on the above embodiment, the calculation formula of q(t) in this embodiment is:
[0108]
[0109] Among them, N t With N max is a value in a predefined sample sequence N, N = {[N1, N2, ..., N max ], (for i <j,N i <N j )},N i and N j are the i-th and j-th values in N, respectively. N represents the number of samples selected for each round of training during the self-paced learning process. t Represents the number of samples selected in the t-th training stage.
[0110] In the early stage of SPLRN, only simple samples are involved in training, and their weights should be relatively large. In the iterative process, more difficult samples are gradually taken into consideration, and q(t) should be set to a smaller value. Its calculation formula is shown in formula (10). t =n means that all samples are selected for training.
[0111] Based on the above embodiment, in this embodiment, t The calculation formula is formula (11):
[0112]
[0113] Among them, Lsort is the loss value L corresponding to n data in the tth iteration = [l1, l2…l n ] are sorted in ascending order, l1 is the loss value corresponding to the first data, l2 is the loss value corresponding to the second data, l n is the loss value corresponding to the nth data, is the Nth t The loss value is taken as λt The value of .
[0114] Based on the above embodiment, the updating formula of the weight vector V in this embodiment is formula (12):
[0115]
[0116] The pseudo code of the self-paced learning algorithm of the dynamic self-paced function is as follows. N is predefined in the model initialization, and then q(t) and λ are calculated in the outer loop by formula (10) and formula (11) respectively. t The model parameters W and sample weight variables V use dynamic λ t and q(t) are iteratively updated in the inner loop.
[0117]
[0118]
[0119] In order to improve the diagnostic accuracy of the fault diagnosis model, the proposed SC-SMOTE algorithm is first used to preprocess the original vibration signal to generate minority class sample features so that the sample categories of the training set are balanced, and then the SPLRN model is used for the fault classification task. The specific flow chart is as follows Figure 5 The detailed description is as follows:
[0120] Preprocess the original vibration signal and divide it into the required training set, validation set and test set;
[0121] The training set is processed using the SC-SMOTE algorithm, and minority class samples are generated based on the training set to obtain a balanced training set;
[0122] Start training the diagnostic model and use the balanced training set feature values as the input of the SPLRN model. Use a dynamic self-paced function to control the learning progress. Each round of training determines the next round of training samples based on the calculated control parameters. Finally, the model parameters are determined by minimizing the value of the loss function.
[0123] Input the data of the validation set into the model in each round of training, calculate the validation loss, and determine whether the model has converged.
[0124] Save the model parameters obtained in each round of training. If the model converges, take the model with the best effect on the validation set and input it into the test set for testing to obtain the test results, so as to better verify the generalization of the model.
[0125] In order to ensure the stable operation of large-scale petrochemical equipment, which is a prerequisite for safe production, early fault diagnosis is of great significance. This embodiment proposes a fault diagnosis method for unbalanced data sets of large-scale petrochemical equipment, which has significantly improved the fault diagnosis accuracy compared with other comparative methods. It is proved that this method is effective in the fault diagnosis of large petrochemical units, especially on highly unbalanced data sets. In addition, the SC-SMOTE algorithm can generate samples that are highly similar to the original fault data, which can provide more discriminant information for the model. Self-paced learning enhances the ability of the residual network to learn the characteristics of minority class samples and improves the model's ability to recognize fault signals of petrochemical equipment.
[0126] The fault diagnosis device based on statistically constrained SMOTE and self-paced residual provided by the present invention is described below. The fault diagnosis device based on statistically constrained SMOTE and self-paced residual described below and the fault diagnosis method based on statistically constrained SMOTE and self-paced residual described above can be referenced to each other.
[0127] like Figure 6 As shown, the device includes a generating module 601, a constructing module 602, a training module 603 and a diagnosing module 604, wherein:
[0128] The generation module 601 is used to obtain generated sample data according to the unbalanced data set of the sample unit based on the SMOTE algorithm, and to filter the generated sample data according to the statistical characteristics of the generated sample data to obtain a balanced data set;
[0129] The construction module 602 is used to obtain the fault category prediction label corresponding to the balanced data set based on the residual network, and determine the loss value between the fault category prediction label and the fault category true label corresponding to the balanced data set;
[0130] The training module 603 is used to update the loss value based on the dynamic self-paced function to obtain the objective function, optimize the objective function, and use the optimized objective function to train the residual network;
[0131] The diagnosis module 604 is used to input the operating data of the target unit into the trained residual network to obtain the fault category prediction label of the target unit output by the residual network.
[0132] On the one hand, this embodiment generates a balanced data set through the SMOTE algorithm based on statistical constraints, generates high-quality samples that are more in line with the statistical feature distribution of the original samples, and constrains the quality of the generated sample data through statistical features, reduces the generated noise data, and improves the quality of the training samples; on the other hand, self-paced learning is added to the training process of the residual network, and the objective function is optimized using a dynamic self-paced function to improve the model's feature learning ability for minority class samples, thereby improving the recognition accuracy of minority class samples.
[0133] Figure 7 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 7 As shown, the electronic device may include: a processor 710, a communication interface 720, a memory 730 and a communication bus 740, wherein the processor 710, the communication interface 720 and the memory 730 communicate with each other through the communication bus 740. The processor 710 may call the logic instructions in the memory 730 to execute the fault diagnosis method based on the SMOTE and self-stepping residual of the statistical constraint, the method comprising: obtaining the generated sample data according to the unbalanced data set of the sample unit based on the SMOTE algorithm, screening the generated sample data according to the statistical characteristics of the generated sample data to obtain the balanced data set; obtaining the fault category prediction label corresponding to the balanced data set based on the residual network, determining the loss value between the fault category prediction label and the fault category true label; updating the loss value based on the dynamic self-stepping function to obtain the target function, optimizing the target function, and using the optimized target function to train the residual network; inputting the operating data of the target unit into the trained residual network to obtain the fault category prediction label of the target unit output by the residual network.
[0134] In addition, the logic instructions in the above-mentioned memory 730 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0135] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the fault diagnosis method based on the statistically constrained SMOTE and self-paced residual provided by the above methods. The method includes: generating sample data based on the unbalanced data set of the sample unit based on the SMOTE algorithm, and screening the generated sample data according to the statistical characteristics of the generated sample data to obtain a balanced data set; obtaining a fault category prediction label corresponding to the balanced data set based on the residual network, and determining the loss value between the fault category prediction label and the fault category true label; updating the loss value based on the dynamic self-paced function to obtain an objective function, and optimizing the objective function, and using the optimized objective function to train the residual network; inputting the operating data of the target unit into the trained residual network to obtain the fault category prediction label of the target unit output by the residual network.
[0136] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the fault diagnosis method based on the statistically constrained SMOTE and self-paced residual provided by the above-mentioned methods, the method comprising: obtaining generated sample data based on the unbalanced data set of the sample unit based on the SMOTE algorithm, and screening the generated sample data according to the statistical characteristics of the generated sample data to obtain a balanced data set; obtaining a fault category prediction label corresponding to the balanced data set based on a residual network, and determining a loss value between the fault category prediction label and the fault category true label; updating the loss value based on a dynamic self-paced function to obtain an objective function, optimizing the objective function, and using the optimized objective function to train the residual network; inputting the operating data of the target unit into the trained residual network to obtain a fault category prediction label of the target unit output by the residual network.
[0137] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0138] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A fault diagnosis method based on statistically constrained SMOTE and self-paced residual, characterized in that: include: Based on the SMOTE algorithm, generated sample data is obtained according to the unbalanced data set of the sample unit, and the generated sample data is screened according to the statistical characteristics of the generated sample data to obtain a balanced data set; Obtaining a fault category prediction label corresponding to the balanced data set based on a residual network, and determining a loss value between the fault category prediction label and a true label of the fault category corresponding to the balanced data set; The loss value is updated based on the dynamic self-stepping function to obtain an objective function, the objective function is optimized, and the residual network is trained using the optimized objective function; Inputting the operating data of the target unit into the trained residual network to obtain a fault category prediction label of the target unit output by the residual network; The formula of the dynamic self-paced function f(V, λ) is: Among them, V is the implicit weight vector of length n, v i is the value of the i-th dimension in V, λ is a control parameter value, which reflects the current stage of learning, q(t)>1, which is a monotonically decreasing function of time t, used to control the selection of learning schemes for self-paced learning; The calculation formula of q(t) is: Among them, N t With N max is a value in a predefined sample sequence N, N = {[N1, N2, ..., N max ], (for i <j,N i <N j )},N i and N j are the i-th and j-th values in N, respectively. N represents the number of samples selected for each round of training in self-paced learning. t Represents the number of samples selected in the t-th training stage.
2. The fault diagnosis method based on statistically constrained SMOTE and self-paced residual according to claim 1 is characterized in that: The statistical characteristics include one or more of peak factor, shape factor, pulse factor, skewness and kurtosis.
3. The fault diagnosis method based on statistically constrained SMOTE and self-paced residual according to claim 1, characterized in that: The screening of the generated sample data according to the statistical characteristics of the generated sample data includes: Determine a box plot of each statistical feature of each class of the imbalanced data set; According to the lower quartile and upper quartile of the box plot of each statistical feature, the upper outlier cutoff point of each statistical feature is determined; According to the lower quartile and upper quartile of the box plot of each statistical feature, the lower outlier cutoff point of each statistical feature is determined; Determine the constraint region of each statistical feature according to the upper outlier cutoff point and the lower outlier cutoff point of each statistical feature; In the case that the statistical features of each type of the generated sample data are within the constraint region of the statistical features, the generated sample data are retained; otherwise, the generated sample data are discarded.
4. The fault diagnosis method based on statistically constrained SMOTE and self-paced residual according to claim 1, characterized in that: The residual network includes a convolutional layer, a batch normalization layer, a pooling layer, a plurality of residual blocks and a fully connected layer in sequence; Each residual block includes a first convolutional layer, a first batch normalization layer, a Relu activation function, a second convolutional layer, and a second batch normalization layer in sequence, and each residual block also includes a skip connection.
5. The fault diagnosis method based on statistically constrained SMOTE and self-paced residual according to claim 1, characterized in that: The objective function is obtained by updating the loss value based on the dynamic self-stepping function: Where E is the objective function, W represents the parameters of the residual network, n is the total number of data in the balanced data set, V is the implicit weight vector of length n, and the value v of the i-th dimension in V is i For X i The weight, λ t is the control parameter value in the tth iteration, is the i-th data X in the balanced data set i The fault category prediction label f(X i , W) and the true label Y of the fault category i The loss value between , q(t)>1, is a monotonically decreasing function of time t, which is used to control the choice of learning scheme for self-paced learning; λ t The calculation formula is: Among them, Lsort is the loss value L corresponding to n data in the tth iteration = [l1, l2…l n ] are sorted in ascending order, l1 is the loss value corresponding to the first data, l2 is the loss value corresponding to the second data, l n is the loss value corresponding to the nth data, is the Nth t A loss value.
6. The fault diagnosis method based on statistically constrained SMOTE and self-paced residual according to claim 5, characterized in that: v i The update formula is: Among them, y i is the sample label.
7. A fault diagnosis device based on statistically constrained SMOTE and self-paced residual, characterized in that: include: A generating module, configured to obtain generated sample data according to an unbalanced data set of a sample unit based on a SMOTE algorithm, and to screen the generated sample data according to statistical characteristics of the generated sample data to obtain a balanced data set; A construction module is used to obtain a fault category prediction label corresponding to the balanced data set based on a residual network, and determine a loss value between the fault category prediction label and a true label of the fault category corresponding to the balanced data set; A training module, used to update the loss value based on a dynamic self-paced function to obtain an objective function, optimize the objective function, and use the optimized objective function to train the residual network; A diagnosis module, used for inputting the operating data of the target unit into the trained residual network to obtain a fault category prediction label of the target unit output by the residual network; The formula of the dynamic self-paced function f(V, λ) is: Among them, V is the implicit weight vector of length n, v i is the value of the i-th dimension in V, λ is a control parameter value, which reflects the current stage of learning, q(t)>1, which is a monotonically decreasing function of time t, used to control the selection of learning schemes for self-paced learning; The calculation formula of q(t) is: Among them, N t With N max is a value in a predefined sample sequence N, N = {[N1, N2, ..., N max ], (for i <j,N i <N j )},N i and N j are the i-th and j-th values in N, respectively. N represents the number of samples selected for each round of training in self-paced learning. t Represents the number of samples selected in the t-th training stage.
Citation Information
Patent Citations
Image classification method based on semi-supervised self-paced learning cross-task deep network
CN108764281A
Mechanical fault intelligent diagnosis method under class unbalanced data set
CN113935460A