CNN-BiLSTM-Attention-based multivariable time sequence fault diagnosis method and system
Through the CNN-BiLSTM-Attention model combined with the noise reduction processing technology of PSO-VMD and wavelet transform, the accuracy problem of multi-variable time series data fault diagnosis in complex industrial environments is solved, and the effective extraction and fault identification of nonlinear signals are achieved. Improved fault diagnosis accuracy and robustness.
Patent Information
- Application Number
- CN202410672921.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-28
- Publication Date
- 2024-08-30
AI Technical Summary
In complex industrial environments, it is difficult for existing fault diagnosis methods to accurately monitor and identify effective features in nonlinear, high-dimensional, dynamic signals in multi-variable time series data, especially when there is coupling between noise and equipment parameters, which affects Accuracy of fault diagnosis.
A multi-variable time series fault diagnosis method based on CNN-BiLSTM-Attention is used, combined with convolutional neural network (CNN) and bidirectional long short-term memory network (BiLSTM) to extract data features, and focus on important features through the attention mechanism, combined with PSO-VMD and Wavelet transform performs noise reduction processing and optimizes signal decomposition and feature extraction.
It improves the accuracy and robustness of fault diagnosis, can more effectively extract equipment status features in complex production environments, enhances the processing capabilities of nonlinear signals, reduces noise interference, and improves the accuracy of fault identification.
Smart Images

Figure CN118568608A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis, and in particular to a multivariate time series fault diagnosis method and system based on CNN-BiLSTM-Attention. Background Art
[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.
[0003] In recent years, with the large-scale production and development of modern industrial processes, the complexity of production processes has continued to increase. If operating equipment fails, it will not only affect the effective production but may also cause serious personal safety problems and property damage accidents.
[0004] Equipment failure refers to the state in which the production system deteriorates and loses its specified functions. The precursor of a failure corresponds to the abnormal change of the monitored parameters, and the recognition of the failure actually relies on the sensor signal to build a mapping relationship from the failure precursor to the failure. With the continuous development and expansion of science and technology and production scale, the complexity of factory production systems is also growing. For example, the production process of nuclear fuel pellets requires UO 2 Powder production, mixing, granulation, molding, sintering, grinding and other process, each process needs to monitor multiple equipment signals at the same time to detect abnormal process variables. 2 The chemical production line for powder production includes multiple positions such as gasification, hydrolysis, precipitation, and drying. Each position requires strict control of reaction temperature, reaction pressure, reaction rate, and reactant concentration. This makes equipment failure monitoring in complex industrial systems, including the nuclear fuel pellet production process, increasingly difficult. At the same time, there are many equipment parameters monitored in the workshop and there are couplings. The presence of noise will also affect the accuracy of abnormal monitoring.
[0005] At present, there are many methods in the field of fault diagnosis, which can be roughly divided into qualitative analysis methods and quantitative analysis methods. Among them, qualitative analysis refers to a method of fault diagnosis from the perspective of specific fault characteristics using non-numerical data or observation results, of which the most representative is the rule-based expert system technology. Quantitative analysis methods are methods of fault diagnosis based on data and mathematical models. Through statistical analysis methods, data is quantified and analyzed to discover abnormal characteristics and trends in the data, thereby locating possible causes of faults.
[0006] However, with the continuous expansion of production, the production workshop environment has become more complex, and the equipment parameters that need to be monitored in the workshop are numerous and coupled, and the presence of noise will also affect the accuracy of abnormal monitoring. This makes it difficult for existing methods to establish an accurate mathematical model of the factory environment and fully extract effective features from nonlinear, high-dimensional, and dynamic production signals. Summary of the invention
[0007] In order to solve the above problems, the present invention proposes a multivariate time series fault diagnosis method and system based on CNN-BiLSTM-Attention, which fully combines the fault data feature extraction capabilities of CNN and BiLSTM to realize fault diagnosis of multivariate time series data in complex industrial environments.
[0008] In some embodiments, the following technical solutions are adopted:
[0009] A multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention, comprising:
[0010] Obtain real-time monitoring data of multiple devices in industrial production and pre-process the data;
[0011] The preprocessed data is input into the trained multivariate time series fault diagnosis model to obtain the fault diagnosis results;
[0012] The multivariate time series fault diagnosis model processes data as follows:
[0013] The preprocessed data is input to the CNN layer, which includes two branches. Convolution and pooling operations with different parameters are performed on the input data in the two branches respectively, and then the outputs of the two branches are connected to obtain the longitudinal feature representation; the longitudinal feature representation is used as the input of the BiLSTM layer to realize the lateral feature extraction of the global time feature; the output of the BiLSTM layer is used as the input of the Attention layer to obtain the information at different positions in the input sequence; the output of the Attention layer is used as the input of the fully connected layer to finally obtain the equipment fault diagnosis result.
[0014] The specific process of denoising the data is as follows:
[0015] Taking the minimum envelope entropy as the objective function, the PSO algorithm is used to optimize the penalty factor α of VMD and the number of modal decomposition layers K;
[0016] Use VMD with optimized parameters to decompose the data signal and obtain K IMF components;
[0017] The IMF components are divided into pure components and noisy components, and the noisy components are decomposed using the wavelet transform method to achieve noise reduction.
[0018] The pure component and the noisy component after denoising are reconstructed to obtain the denoised signal.
[0019] The wavelet threshold function of the wavelet transform method is specifically:
[0020]
[0021] Among them, W j,k is the wavelet coefficient of the noisy signal; is the wavelet coefficient obtained by threshold processing; j is the decomposition scale; k is the coefficient number; λ is the wavelet threshold.
[0022] The Attention layer adopts an attention mechanism, which encodes the input sequence to obtain a set of query vectors; maps the input features into a key sequence vector and a value sequence vector; scores the correlation between the query vector and the key sequence vector according to a scoring function, normalizes the score using a Softmax function, and converts the score into an attention weight. Based on the attention weight, the features are weighted and summed to focus on important features.
[0023] In other embodiments, the following technical solutions are adopted:
[0024] A multivariate time series fault diagnosis system based on CNN-BiLSTM-Attention, comprising:
[0025] The data acquisition module is used to obtain the real-time operation monitoring data of multiple devices in industrial production and pre-process the data;
[0026] A fault diagnosis module is used to input the preprocessed data into the trained multivariate time series fault diagnosis model to obtain the fault diagnosis result;
[0027] The multivariate time series fault diagnosis model processes data as follows:
[0028] The preprocessed data is input to the CNN layer, which includes two branches. Convolution and pooling operations with different parameters are performed on the input data in the two branches respectively, and then the outputs of the two branches are connected to obtain the longitudinal feature representation; the longitudinal feature representation is used as the input of the BiLSTM layer to realize the lateral feature extraction of the global time feature; the output of the BiLSTM layer is used as the input of the Attention layer to obtain the information at different positions in the input sequence; the output of the Attention layer is used as the input of the fully connected layer to finally obtain the equipment fault diagnosis result.
[0029] In other embodiments, the following technical solutions are adopted:
[0030] A terminal device comprises a processor and a memory, wherein the processor is used to implement instructions; and the memory is used to store multiple instructions, wherein the instructions are suitable for being loaded by the processor and executing the above-mentioned multivariate timing fault diagnosis method based on CNN-BiLSTM-Attention.
[0031] In other embodiments, the following technical solutions are adopted:
[0032] A computer-readable storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor of a terminal device and executing the above-mentioned multivariate timing fault diagnosis method based on CNN-BiLSTM-Attention.
[0033] Compared with the prior art, the present invention has the following beneficial effects:
[0034] (1) The multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention in the present invention combines the static feature extraction capability of CNN, the dynamic feature recognition capability of BiLSTM, and the ability of the attention mechanism to focus on subtle differences in feature vectors, and has excellent effects on equipment status monitoring in complex production environments.
[0035] (2) The present invention proposes a noise reduction method based on PSO-VMD, which makes full use of the advantages of VMD that it can decompose according to the nonlinear characteristics of the signal, extract different frequency components, and is not restricted by linear assumptions; the PSO algorithm is used to optimize the VMD parameters, which can better distinguish the regular part and the random part of the signal, improve the accuracy and robustness of signal feature extraction, and achieve the optimal noise reduction effect. The noisy component is decomposed and denoised by wavelet transform, and the threshold function of wavelet transform is improved, which can not only achieve a good noise reduction effect, but also retain the effective information of the original data and improve the accuracy of fault diagnosis.
[0036] Other features and advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through the practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of the noise reduction process in an embodiment of the present invention;
[0038] FIG2(a)-(b) are waveform diagrams before and after superimposing noise in an embodiment of the present invention;
[0039] Figure 3 It is a process schematic diagram of a multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention in an embodiment of the present invention;
[0040] Figure 4 A schematic diagram of the structure of a multivariable time series fault diagnosis model in an embodiment of the present invention;
[0041] Figure 5 This is a schematic diagram of the CNN layer structure in an embodiment of the present invention;
[0042] Figure 6 This is a schematic diagram of the BiLSTM layer structure in an embodiment of the present invention;
[0043] Figure 7 This is a schematic diagram of the Attention layer in an embodiment of the present invention;
[0044] Figure 8 This is a confusion matrix diagram obtained by processing the TE data set in an embodiment of the present invention;
[0045] Fig. 9 TSNE diagram of the feature extraction process of the TE data set in an embodiment of the present invention;
[0046] Fig.10 A comparison diagram of the training iteration process of the method of the embodiment of the present invention and the other two methods;
[0047] Fig.11 This is a comparison chart of the F1 scores obtained by processing the TE dataset using the method of the embodiment of the present invention and the other two methods. DETAILED DESCRIPTION
[0048] It should be noted that the following detailed descriptions are illustrative and are intended to provide further explanation of the present application. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present application belongs.
[0049] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprise" and / or "include" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.
[0050] Embodiment 1
[0051] In one or more embodiments, a multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention is disclosed, which specifically includes the following process:
[0052] (1) Acquire the real-time operation monitoring data of multiple devices in industrial production and pre-process the data; specifically, the real-time operation monitoring data of multiple devices in industrial production includes the real-time operation data of different equipment in the production process; for example, in the fuel pellet production process, taking the chemical production line as an example, the positions in the workshop include gasification, hydrolysis, precipitation, drying, defluorination reduction, stabilization, dissolution, etc., and the reaction units used include vaporizers, reaction tanks, precipitation tanks, separators, cooling systems, drying converters, stabilized beds, etc. Some variables monitored at each position are listed in Table 1.
[0053] Table 1 Chemical workshop monitoring parameters
[0054]
[0055] There are many equipment parameters currently monitored in the workshop, some of which can be directly controlled by manual settings, while others are monitoring parameters that cannot be directly controlled and are affected by adjustment parameters. Abnormal changes in the pressure, temperature, material flow and other parameters monitored at each post will affect the quality of the products of each process, and may even cause leakage, damage, failure and other faults in material containers, conveying pipelines, reaction tanks, motors and other parts. Therefore, it is necessary to obtain real-time operating data of these monitoring devices.
[0056] After obtaining the real-time operating data of different equipment in the production process, this embodiment preprocesses the data, specifically including operations such as cleaning, standardization and noise reduction, so that the quality and accuracy of the data are improved to facilitate subsequent analysis.
[0057] Among them, data cleaning includes removing outliers, which refer to abnormal data points in the monitoring signal that deviate from most of the data, usually caused by abnormal conditions such as measurement errors. Although the proportion of outliers is usually small, it will greatly affect the accuracy of the data. This embodiment adopts the 3σ principle to identify and remove outliers, that is, the interval value range of the normal sample is retained as follows:
[0058] u-3σ <x<u+3σ;
[0059] Among them, u represents the mean of the sample data, σ represents the standard deviation of the sample data, and x represents normal data.
[0060] The presence of noise may interfere with the accurate analysis and determination of the equipment status, making it difficult to distinguish between abnormal and normal conditions.
[0061] During the manufacturing process, the collected equipment signals have complex and changeable spectral structures due to the interaction of complex physical processes such as friction, vibration, high temperature, and high pressure during the operation of the equipment. They have rich harmonic components and time-varying characteristics, which are difficult to describe simply with linear models. To analyze and process these signals with nonlinear characteristics, it is necessary to adopt appropriate nonlinear models and signal processing methods to more accurately understand the working status of the equipment and monitor abnormal operation. The wavelet threshold denoising method assumes that the signal is linear, that is, the signal can be superimposed and scaled, which makes this method have certain limitations and defects when processing nonlinear signals and cannot effectively remove the noise in these signals.
[0062] In order to remove the noise in the monitoring signal, this embodiment adopts a denoising method based on PSO-VMD and improved wavelet threshold, which takes advantage of VMD's ability to decompose the signal according to its nonlinear characteristics and extract different frequency components without being restricted by linear assumptions; it has a good denoising effect while retaining the effective information of the original data. Figure 1 , the specific process is as follows:
[0063] (1-1) Taking the minimum envelope entropy as the objective function, the PSO algorithm is used to optimize the decomposition parameters of VMD;
[0064] VMD (Variational Mode Decomposition) can decompose the signal into a series of localized oscillation components in time and frequency. This decomposition does not rely on the linear properties of the signal, but is gradually solved according to the local oscillation mode of the signal. This makes the method better adapted to the decomposition needs of nonlinear signals, thereby extracting the nonlinear components hidden in the signal. In order to ensure the effect of VMD decomposition, it is necessary to set an appropriate penalty factor α and the number of modal decomposition layers K. Among them, α is used to control the smoothness of the data and the sparsity of the decomposition. A larger α value will make the decomposed mode smoother, which is conducive to extracting the stable part of the signal. Conversely, it will be more sparse, which is conducive to extracting the peaks and mutations in the signal. Choosing a suitable K value can balance the decomposition accuracy and computational efficiency of the signal. If the K value is too large, it may lead to over-decomposition and increase the computational burden; if the K value is too small, the signal features may not be fully extracted.
[0065] The PSO algorithm is applied to the VMD method to perform parameter optimization. Envelope entropy is an indicator used to measure the complexity and regularity of a signal. For a signal, envelope entropy represents its sparse characteristics. The more noise in the decomposed components and the less feature information, the greater the envelope entropy value. Envelope entropy can describe the regularity of the signal in time or frequency, as well as the randomness in the signal. This embodiment uses the minimum envelope entropy as the objective function to optimize the VMD decomposition parameters α and K to better distinguish the regular part and the random part of the signal, improve the accuracy and robustness of signal feature extraction, and achieve the optimal noise reduction effect.
[0066] The specific optimization process of the PSO algorithm is as follows:
[0067] 1) Initialize the population, set the initial parameters of the PSO algorithm, such as population size, number of iterations, upper and lower limits of variables, randomly generate a group of particle swarm individuals, and initialize the particles;
[0068] 2) Perform VMD decomposition on the noisy signal according to each particle and calculate the fitness function value;
[0069] 3) Update the global optimal particle and the individual optimal particle by comparing the fitness values;
[0070] 4) Iteratively update the position and velocity of particles in the population until the iteration termination condition is met;
[0071] 5) Obtain the optimal combination of penalty factor α and modal decomposition layer number K that minimizes the envelope entropy for VMD signal decomposition.
[0072] (1-2) Decompose the data signal using the VMD with optimized parameters to obtain K IMF components;
[0073] (1-3) The IMF component is divided into a pure component and a noisy component, and the noisy component is decomposed using the wavelet transform method to achieve noise reduction;
[0074] In the process of using wavelet transform to decompose the original signal, this embodiment needs to use a suitable threshold function to achieve the stripping of useless noise in the high-frequency wavelet coefficients. In this process, if the amplitude of the noise in the wavelet coefficients of each layer is just less than the set threshold, then the noise reduction effect will be optimal. The traditional hard threshold method will cause mutations in the signal, while the soft threshold method may cause excessive smoothing of the signal. This embodiment designs an improved threshold function that can find a balance between the two, which can effectively remove noise and reduce mutations, better adapt to noise levels and signal characteristics, and thus achieve better noise reduction effects.
[0075] The improved threshold function of this embodiment thresholds the wavelet coefficient modulus value greater than the threshold value, which becomes the square root of the difference between the square of the modulus value and the square of the threshold value, while the wavelet coefficient modulus value threshold value less than the threshold value is still 0, and the improved soft threshold function expression is obtained as follows:
[0076]
[0077] Among them, W j,k is the wavelet coefficient of the noisy signal; is the wavelet coefficient obtained by threshold processing; j is the decomposition scale; k is the coefficient number; λ is the wavelet threshold.
[0078] (1-4) The pure component and the noisy component after denoising are reconstructed to obtain the denoised signal.
[0079] In order to verify the effectiveness of the noise reduction method of this embodiment, this embodiment generates a simulation signal composed of a sine wave and Gaussian white noise superimposed. The simulation formula is as follows:
[0080] y=3sin(2π×f 1 ×t+cos(2π×f 2 ×t))+0.2radon(length(t),1);
[0081] Among them, length is the signal length, which is set to 3000; f 1 is one of the sine wave frequencies, set to 1.2Hz; f 2 is another sine wave frequency, set to 0.1Hz; the sampling frequency of the simulation signal is 100Hz.
[0082] The waveforms before and after the superimposed noise are shown in Figure 2 (a)-(b). The above-mentioned simulation signals are denoised using the denoising method of this embodiment (hereinafter referred to as this method) and the wavelet denoising method (respectively using the wavelet threshold, hard threshold and soft threshold of this embodiment). The base wavelet selected is db2, and the number of decomposition layers is 3. In order to evaluate the denoising effect of each denoising method, the signal-to-noise ratio and mean square error are used to compare and analyze the denoising effect. The obtained denoising evaluation index data are shown in Table 2.
[0083] Table 2 Noise reduction index results
[0084]
[0085] Through comparative analysis, it can be seen that the wavelet denoising method using the improved threshold is superior to the wavelet denoising method using the soft and hard threshold functions in terms of both evaluation indicators; and the denoising method of this embodiment is superior to the wavelet denoising methods with three different thresholds. Therefore, it can be seen that the denoising method of this embodiment has a better denoising effect.
[0086] (2) Input the preprocessed data into the trained multivariate time series fault diagnosis model to obtain the fault diagnosis results;
[0087] In this embodiment, combined with Figure 3 ,The specific workflow of equipment condition monitoring includes two parts: offline ,modeling and online monitoring.
[0088] (2-1) Offline modeling. Model training, parameter adjustment and verification are performed based on historical data to establish an accurate and reliable fault diagnosis model. The key tasks of this stage include:
[0089] 1) Historical data collection: Collect historical operating data of monitoring equipment, including normal working data and fault data;
[0090] 2) Data preprocessing: cleaning, converting and feature extraction of historical data to prepare high-quality data for modeling;
[0091] 3) Model training: Use historical data to train the fault diagnosis model, optimize the model parameters and hyperparameters, and evaluate the model performance through cross-validation or test sets;
[0092] 4) Save the obtained optimal model parameters and model.
[0093] (2-2) Online monitoring. Use the trained model to implement online monitoring of equipment abnormalities. The tasks at this stage include:
[0094] 1) Collect real-time operating data of equipment.
[0095] 2) Preprocess the real-time data, and process the data into a form that is easy to be recognized by the model through steps such as noise reduction and standardization.
[0096] 3) Input the preprocessed monitoring data into the trained multivariate time series fault diagnosis model to predict the fault type of the current input data.
[0097] 4) Provide real-time equipment abnormality warning information and processing suggestions based on the diagnostic results and feedback to operators to promote timely maintenance and repair work.
[0098] When performing fault diagnosis, it is necessary to consider the high-dimensional and time-related characteristics of factory equipment operation data. CNN (convolutional neural network) can deeply extract the longitudinal features of fault data while compressing the data length, while BiLSTM (bidirectional long short-term memory network) is suitable for time series analysis and can handle the problem of long-term dependency of RNN. This embodiment proposes a multivariate time series fault diagnosis model based on CNN-BiLSTM-Attention. By further combining the attention mechanism, the model can pay more attention to the features related to the monitoring target and reduce the interference of irrelevant information, so as to better handle long-term dependencies.
[0099] This embodiment uses CNN and BiLSTM to perform multi-level feature extraction, aiming to fully capture the temporal and lateral features in the fault record data, thereby improving the model's ability to understand complex time series data. The introduction of the attention mechanism allows the model to pay more attention to the characteristic change rules of the data near the time when the fault occurs, thereby improving the model's sensitivity to key moments and accurately capturing the characteristics and rules of the fault.
[0100] Specifically, the structure of the multivariate time series fault diagnosis model is as follows: Figure 4 As shown in the figure, it includes: CNN layer, BiLSTM layer, Attention layer and fully connected layer. The CNN layer consists of two branches, in which two sets of convolution and pooling operations with different parameters are performed on the input data, aiming to obtain the characteristics of the signal from different angles while reducing the dimension and number of parameters of the features. By alternating between convolution layers and pooling layers, multi-layer feature extraction is performed on the input data to gradually improve the abstraction ability of local features, thereby improving the generalization ability of the model. The outputs of each convolution-pooling branch are then connected to form a comprehensive longitudinal feature representation.
[0101] The convolutional layer is the core of the convolutional neural network. Figure 5 , the convolution layer is composed of a set of weighted convolution kernels that match the input feature values. The mathematical model of each layer output is:
[0102]
[0103] in represents the input of the jth neuron in the i-th frame in the l+1-th layer, represents the weight of the ith filter kernel on layer l, * represents the dot product of the kernel area and the local area, X l (j) represents the jth local area in layer l, It represents the offset of the i-th filter kernel on the l-th layer.
[0104] After the convolution operation, the activation function is used to map the convolutional features to a nonlinear space, converting the original multi-dimensional features into different dimensions, thereby increasing the linear separability of these features. The ReLU activation function expression used is:
[0105]
[0106] in is the output value of the convolution operation, It represents its activation value. The ReLU function image is shown in the figure below.
[0107] The role of the pooling layer is to reduce the amount of data calculation in the subsequent layers through dimensionality reduction and subsampling, which is also helpful to reduce the risk of overfitting. Maximum pooling is to output the maximum of the neural units in the neighborhood. The mathematical formula is:
[0108]
[0109] in represents the value of the tth neuron of the i-th feature on the l-th layer; w represents the width of the pooling area; Indicates the output value.
[0110] The connected data will be input into the BiLSTM layer to realize horizontal feature extraction of global time features and capture the timing information and cross-features in the data. This embodiment uses the dropout technology in the BiLSTM layer, that is, during the training process, the output of some neurons is randomly set to 0 with a certain probability, thereby reducing the model's dependence on certain specific neurons, reducing the coupling between neurons, reducing the risk of overfitting, and increasing the robustness of the model. In addition, in the information transmission between the BiLSTM layer and the subsequent Attention layer, it can prevent excessive information leakage or information transmission from being too concentrated on certain specific features, so that the subsequent attention layer can play a better role.
[0111] Combination Figure 6 LSTM uses forget gate, input gate, and output gate to dynamically adjust the information flow in the memory unit, selectively retain and update memory, and realize the capture and control of long-term dependencies. BiLSTM is composed of two LSTMs in opposite directions. It can extract and utilize sample data in two directions at the same time, better retain important context information, improve the generalization ability of the model, and increase the accuracy of model classification.
[0112] The mathematical expressions of the forward and backward passes of the BiLSTM network are as follows.
[0113]
[0114] In the formula, h represents the calculation of the hidden layer vector; x t represents the input data at time t; w represents the input weight of LSTM; v represents the input weight at time t-1; b represents the bias of the LSTM layer; f(·) represents the activation function.
[0115] The calculation formula of the output layer is as follows:
[0116]
[0117] In the formula, It represents the final output result obtained by superimposing the output values of the two hidden layers at each moment.
[0118] The output of the BiLSTM layer is used as the input of the Attention layer. The Attention layer uses the attention mechanism to help the model dynamically focus on the information at different positions in the input sequence when processing sequence data, thereby achieving more refined feature selection and modeling.
[0119] Combination Figure 7 The attention mechanism is a method that imitates human vision or hearing mechanism to assign different attention weights to different parts of the input data. First, the input sequence y = [y 1 ,y 2 ,...,y n ] to obtain a set of query vectors q, and then the input features are mapped into a sequence of key-value pairs, respectively using Key = {k 1 ,k 2 ,...,k n} and Value = {v 1 ,v 2 ,...,v n} represents its key sequence vector and value sequence vector. Then the correlation between the query vector and the key sequence vector is scored according to the scoring function. The calculation formula is as follows:
[0120]
[0121] Here, d is the dimension of the input vector.
[0122] Finally, the scores are converted into attention weights by normalizing them using the Softmax function, and then the features are weighted summed to better focus on important features.
[0123] The function of the fully connected layer is to integrate the features extracted by the previous layers and map the integrated features to the final output space, ultimately achieving fault classification of the equipment status.
[0124] Taking the TE data set as an example, it includes normal data and several types of fault data. The fault data is a sign reflected by a combination of multiple variables, such as steps, slow drifts, and random changes. That is, if a step symptom occurs, then multiple monitored variables may produce a step phenomenon. Reflected in the core block production process, it is like a blockage in a certain part causing multiple variables to rise. As for the fault location, generally speaking, knowing the fault type, you can know the position where it occurred. If the fault type is more detailed, you can further know the more specific location. This is related to the fault data set used for training the model, and it depends on how specific the factory's fault data is.
[0125] In order to verify the effectiveness of the method of this embodiment, a TE dataset is selected to verify the method of this embodiment.
[0126] The TE dataset simulates an actual chemical joint reaction process of a chemical company. The dataset has the characteristics of high-dimensional coupling, dynamic nonlinearity and Gaussian noise, and is widely used in the verification of production process monitoring methods. A total of 53 variables were monitored in the TE process, of which 41 were measured variables and 12 were controlled variables. The TE simulation experiment can simulate 21 types of faults and production processes under normal conditions, which can basically cover all common fault types in complex chemical systems. Normal samples and 10 representative fault samples were selected as experimental analysis objects. The TE dataset used includes a training set and a test set. The total number of observation data for normal samples and various fault samples in the training set is 480, and the total number of observation data for normal samples and various fault samples in the test set is 960.
[0127] The data was cleaned, standardized, and denoised, and the preprocessed data was input into the multivariate time series fault diagnosis model of this embodiment. The model training used the Adam optimizer, which can adaptively adjust the learning rate during the training process and has good convergence performance and generalization ability. The loss function used is the cross entropy loss function, which has the advantages of simple gradient calculation and strong probability interpretation. During the model training process, 400 iterations were performed.
[0128] from Figure 8 It can be seen that the model has a good effect, and the classification accuracy rate for two difficult-to-detect random change faults has reached more than 80%. The classification effect for slow drift faults is lower, but it has also reached more than 70%.
[0129] In order to more intuitively reflect the effect of the proposed model on fault feature extraction, the t-SNE method is used to project the data distribution into a 2D space for observation, as shown in Fig. 9 In (a)-(e), data points of different colors represent samples of different fault types. Fig. 9(a) in the figure is the original data distribution. Fig. 9 (b) CNN layer output vector distribution, Fig. 9 (c) in the figure is the output vector distribution of the BiLSTM layer. Fig. 9 (d) in is the output vector distribution of the Attention layer. Fig. 9 (e) in the figure is the output vector distribution of the fully connected layer. As can be seen from the figure, the distribution of the initial data is relatively chaotic, and most of the feature vectors are aliased together. After passing through the CNN layer, feature vectors of the same type are obviously clustered, and the class spacing becomes larger and begins to disperse, but there is still obvious aliasing. After passing through the BiLSTM layer, most of the feature vectors are obviously separated, and the class spacing becomes significantly larger. After the Attention layer and the fully connected layer, the intra-class spacing is further reduced, and most of the feature vectors are obviously separated. This further verifies the effectiveness of the method of this embodiment. By combining different feature extraction methods, the information in multivariate time series data can be fully mined, with high classification accuracy.
[0130] The method of this embodiment was compared with the BiLSTM and CNN-BiLSTM methods. During the model training process, the fault recognition accuracy change curve of the model was recorded along the iteration process. Fig.10 It can be seen that compared with the BiLSTM model, the CNN-BiLSTM-Attention model and the CNN-BiLSTM model can converge to nearly 100% accuracy after multiple iterations. At the same time, in terms of convergence speed, the CNN-BiLSTM model is the fastest, reaching convergence in about 46 times, and the CNN-BiLSTM-Attention is slightly slower, reaching convergence in about 68 times, while the BiLSTM model has the slowest convergence speed. Analyzing the reasons, the attention mechanism increases the number of parameters and computational burden of the model, resulting in a slightly slower training speed than the CNN-BiLSTM model, and the BiLSTM model is not stable enough in extracting features during training, and there are problems with gradient disappearance or gradient explosion, resulting in the slowest training speed and failure to reach 100% convergence. This reflects that the method used in this embodiment can effectively capture the characteristics of the data, fit the training data quickly, and has strong learning and adaptability.
[0131] When comparing the fault classification effects of the evaluation model on the test set, this embodiment selects precision, recall, and F1 score as evaluation indicators. Precision refers to the proportion of samples predicted by the model as positive examples that are actually positive; recall refers to the proportion of samples predicted by the model as positive examples that are actually positive; and F1 score is the average of precision and recall. Their calculation formulas are as follows:
[0132]
[0133] In the formula, TP, FP, FN and TN represent the statistics of different category divisions. For a certain category m, TP represents the number of samples that the model correctly predicts to be of category m; FP represents the number of samples that the model incorrectly predicts to be of category m; FN represents the number of samples that the model incorrectly predicts to be of category m as non-category m; TN represents the number of samples that the model correctly predicts to be non-category m as non-category m.
[0134] After multiple experiments, the average precision, average recall and average F1 score of the three different models are obtained. The results are shown in Table 3. As can be seen from Table 3, the model in this embodiment has the best performance in all three evaluation indicators.
[0135] Table 3 Comparison results of different models
[0136]
[0137] This example uses the harmonic mean F1 score of precision and recall to compare the classification effects of the three models on the same fault. Fig.11 It can be seen that for each fault recognition effect, the model proposed in this embodiment is the best, and BiLSTM is the worst. This proves that this model combines the static feature extraction capability of CNN, the dynamic feature recognition capability of BiLSTM, and the attention mechanism's ability to focus on subtle differences in feature vectors, and has excellent effects on equipment status monitoring in complex production environments.
[0138] Embodiment 2
[0139] In one or more embodiments, a multivariate time series fault diagnosis system based on CNN-BiLSTM-Attention is disclosed, comprising:
[0140] The data acquisition module is used to obtain the real-time operation monitoring data of multiple devices in industrial production and pre-process the data;
[0141] A fault diagnosis module is used to input the preprocessed data into the trained multivariate time series fault diagnosis model to obtain the fault diagnosis result;
[0142] The multivariate time series fault diagnosis model processes data as follows:
[0143] The preprocessed data is input to the CNN layer, which includes two branches. Convolution and pooling operations with different parameters are performed on the input data in the two branches respectively, and then the outputs of the two branches are connected to obtain the longitudinal feature representation; the longitudinal feature representation is used as the input of the BiLSTM layer to realize the lateral feature extraction of the global time feature; the output of the BiLSTM layer is used as the input of the Attention layer to obtain the information at different positions in the input sequence; the output of the Attention layer is used as the input of the fully connected layer to finally obtain the equipment fault diagnosis result.
[0144] The specific methods of the above modules are the same as those in the first embodiment and will not be described in detail.
[0145] Embodiment 3
[0146] In one or more embodiments, a terminal device is disclosed, including a server, the server including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention in Example 1 when executing the program. For the sake of brevity, it will not be described here.
[0147] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0148] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0149] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.
[0150] Embodiment 4
[0151] In one or more embodiments, a computer-readable storage medium is disclosed, in which a plurality of instructions are stored, wherein the instructions are suitable for being loaded by a processor of a terminal device and executing the multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention described in Example 1.
[0152] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.
Claims
1. A multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention, characterized in that: include: Obtain real-time monitoring data of multiple devices in industrial production and pre-process the data; The preprocessed data is input into the trained multivariate time series fault diagnosis model to obtain the fault diagnosis results; The multivariate time series fault diagnosis model processes data as follows: The preprocessed data is input to the CNN layer, which includes two branches. Convolution and pooling operations with different parameters are performed on the input data in the two branches respectively, and then the outputs of the two branches are connected to obtain the longitudinal feature representation; the longitudinal feature representation is used as the input of the BiLSTM layer to realize the lateral feature extraction of the global time feature; the output of the BiLSTM layer is used as the input of the Attention layer to obtain the information at different positions in the input sequence; the output of the Attention layer is used as the input of the fully connected layer to finally obtain the equipment fault diagnosis result.
2. A multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention as claimed in claim 1, characterized in that: The data preprocessing includes: cleaning, standardizing and noise reduction of the data.
3. A multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention as claimed in claim 2, characterized in that: The specific process of denoising the data is as follows: Taking the minimum envelope entropy as the objective function, the PSO algorithm is used to optimize the decomposition parameters of VMD; Use VMD with optimized parameters to decompose the data signal and obtain K IMF components; The IMF components are divided into pure components and noisy components, and the noisy components are decomposed using the wavelet transform method to achieve noise reduction. The pure component and the noisy component after denoising are reconstructed to obtain the denoised signal.
4. A multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention as claimed in claim 3, characterized in that: Taking the minimum envelope entropy as the objective function, the PSO algorithm is used to optimize the decomposition parameters of VMD, specifically: Initialize population parameters, randomly generate a group of particle swarm individuals, and initialize the particles; Each particle performs VMD decomposition on the noisy signal and calculates the fitness function value; By comparing the fitness values, the global optimal particle and the individual optimal particle are updated; Iteratively update the positions and velocities of particles in the population until the iteration termination condition is met; The optimal combination of VMD penalty factor α and modal decomposition layer number K that minimizes the envelope entropy is obtained for VMD signal decomposition.
5. A multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention as claimed in claim 3, characterized in that: The wavelet threshold function of the wavelet transform method is specifically: Among them, W j,k is the wavelet coefficient of the noisy signal; is the wavelet coefficient obtained by threshold processing; j is the decomposition scale; k is the coefficient number; λ is the wavelet threshold.
6. A multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention as claimed in claim 1, characterized in that: During the training process, the BiLSTM layer randomly sets the output of some neurons to 0 with a set probability to reduce the model's dependence on certain specific neurons.
7. A multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention as claimed in claim 1, characterized in that: The Attention layer adopts an attention mechanism, which encodes the input sequence to obtain a set of query vectors; maps the input features into a key sequence vector and a value sequence vector; scores the correlation between the query vector and the key sequence vector according to a scoring function, normalizes the score using a Softmax function, and converts the score into an attention weight. Based on the attention weight, the features are weighted and summed to focus on important features.
8. A multivariate time series fault diagnosis system based on CNN-BiLSTM-Attention, characterized in that: include: The data acquisition module is used to obtain the real-time operation monitoring data of multiple devices in industrial production and pre-process the data; A fault diagnosis module is used to input the preprocessed data into the trained multivariate time series fault diagnosis model to obtain the fault diagnosis result; The multivariate time series fault diagnosis model processes data as follows: The preprocessed data is input to the CNN layer, which includes two branches. Convolution and pooling operations with different parameters are performed on the input data in the two branches respectively, and then the outputs of the two branches are connected to obtain the longitudinal feature representation; the longitudinal feature representation is used as the input of the BiLSTM layer to realize the lateral feature extraction of the global time feature; the output of the BiLSTM layer is used as the input of the Attention layer to obtain the information at different positions in the input sequence; the output of the Attention layer is used as the input of the fully connected layer to finally obtain the equipment fault diagnosis result.
9. A terminal device, comprising a processor and a memory, wherein the processor is used to implement instructions; and the memory is used to store multiple instructions, characterized in that: The instructions are suitable for being loaded by a processor and executing the multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention as described in any one of claims 1-7.
10. A computer-readable storage medium storing a plurality of instructions, characterized in that: The instructions are suitable for being loaded by a processor of a terminal device and executing the multivariate time series fault diagnosis method based on CNN-BiLSTM-Attention according to any one of claims 1 to 7.
Citation Information
Cited By
Aircraft simulation model confidence coefficient optimization method
CN119475567A
Power amplifier operating characteristic simulation method and device, computer equipment and medium
CN119692271A
Clean air switch equipment fault diagnosis method and system
CN120595097A
Combine harvester blockage detection method and system, electronic equipment and storage medium
CN120836281A
