Mechanical anomaly detection method and system based on learnable sparse regularized dictionary learning

By applying a method based on learning sparse regular dictionary learning in mechanical anomaly detection, the problems of limited feature extraction performance and poor interpretability of deep learning models in high-dimensional vibration signal analysis are solved, effective feature extraction and abnormality detection are achieved, and good interpretability is achieved.

CN119202908BActive Publication Date: 2025-04-29XI AN JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411698633.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-04-29
Estimated Expiration
2044-11-26

Smart Images

  • Figure CN119202908B_ABST
    Figure CN119202908B_ABST
Patent Text Reader

Abstract

A method and system for detecting mechanical anomalies based on learnable sparse regularized dictionary learning. In the method, vibration signals of a machine during normal operation are collected, and a training data set is further constructed; a dictionary learning model containing learnable sparse regularized terms is constructed, and the input signal is represented as a convolutional form of a dictionary and a sparse code; a semi-quadratic splitting algorithm is used to derive the iterative calculation formula of the model; a corresponding network module is designed for each variable and weight in the formula, the combination of modules represents an iterative calculation, and multiple iterative calculation processes are superimposed to form a learnable sparse regularized network; the network is trained using the training data set, normal sample features are extracted, and network parameters are updated using back propagation technology; a test sample is input into the trained network, the error between the reconstructed data and the input sample is calculated, and whether the machine is in a normal state is determined according to the size of the error value; the reconstructed output of the network is further analyzed, and a post-explainable explanation of the network is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mechanical anomaly detection, and in particular to a mechanical anomaly detection method and system based on learnable sparse regular dictionary learning. Background Art

[0002] Anomaly detection is a data mining technology that aims to identify abnormal patterns in data that are different from the majority of cases. Anomalies in mechanical equipment mean potential risks such as failures and performance degradation. By promptly discovering and resolving abnormalities in mechanical equipment, the reliability of the equipment can be effectively improved, the life of the equipment can be extended, and thus economic and production benefits can be improved. Therefore, anomaly detection of machinery is an important means to ensure the safe and stable operation of equipment, improve production efficiency and product quality, and reduce maintenance costs and production losses.

[0003] Various data-driven methods have been widely studied and used in the field of anomaly detection. These methods are highly adaptable and can quickly complete the diagnosis work even without sufficient theoretical reserves. Common methods such as the nearest neighbor method, support vector machine, random forest, PCA, etc. determine abnormal points by distance or density, so these detection results have sufficient theoretical support. However, it should be considered that high-dimensional vibration signals mixed with a lot of noise are usually used as the object of data analysis in mechanical equipment, and the feature extraction performance of these methods is very limited, so the detection results are often unsatisfactory. Some typical deep learning methods, such as variational autoencoder (VAE), generative adversarial network (GAN), deep belief network (DBN), etc. have also been applied to anomaly detection of mechanical equipment. However, the essence of deep learning models is often a "black box" mode, and its internal decision-making process is often difficult to explain. There is no way to know whether the algorithm has truly learned meaningful features or just randomly learned some "pseudo features" from a large amount of input data. Therefore, it is necessary to further seek explainable anomaly detection methods.

[0004] The classic dictionary learning method has the characteristics of strong interpretability. The iterative process of its solution algorithm is expanded into the form of a network. The final constructed network can achieve more flexible, powerful and efficient feature learning and representation capabilities, and it also has the characteristics of strong interpretability. The main idea of ​​this method is to regard each iteration of the optimization algorithm as a layer of the neural network, and optimize the parameters by training the neural network to further accelerate convergence and improve performance. However, such methods have some limitations: the regularization term constraints in the original model adopt a human-designed pattern, which cannot be adaptively adjusted according to the characteristics of the input data; the network expansion process is sparse coding during forward propagation and dictionary update during back propagation, which does not strictly follow the iterative process of dictionary learning, that is, the coding and dictionary should be updated alternately to achieve better feature extraction, so it is of great significance to develop anomaly detection methods based on dictionary learning.

[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the invention and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the invention

[0006] The present invention provides a mechanical anomaly detection method and system based on learnable sparse regular dictionary learning, establishes a learnable sparse regular dictionary learning model, transforms the model solution problem into four equations to be solved in sequence based on the semi-quadratic splitting algorithm, and designs corresponding network modules for each variable and parameter to solve; uses the least squares method to calculate the relevant data fidelity term equation, combines the transform domain and the unfolded convolution technology to complete the rapid solution; uses a convolutional neural network to replace the solution process of the regular term, wherein the sparse coding regular term learning network architecture is designed in combination with the input convex neural network and the autoencoder, so as to ensure that the network extracts valuable prior information; the combination of all submodules is a stage of the network, which is equivalent to a traditional iterative calculation process, and the superposition of multiple stages constitutes a deep neural network, and finally judges whether it is a normal sample according to the size of the network reconstruction error of the input signal. Finally, the overall output of the network and the reconstruction features of each dictionary atom are visualized and analyzed, so that the method has ex post interpretability.

[0007] A mechanical anomaly detection method based on learnable sparse regular dictionary learning, comprising:

[0008] In the first step, the vibration signal of the mechanical equipment under normal operation is collected , and construct a training data set;

[0009] In the second step, a dictionary learning model containing learnable sparse regularization terms is constructed, in which the sparse coding With dictionary The regularization term of is a constraint function of unknown form;

[0010] In the third step, two auxiliary variables are introduced in combination with the semi-quadratic splitting algorithm. and , the solution of the dictionary learning model is equivalent to four variables , , , The iterative solution process is used to derive the auxiliary variables and The closed-form solution of

[0011] In the fourth step, the four variables in the iterative calculation formula are , , , The network modules are designed with weight parameters for calculation or learning. The combination of all network modules represents one iteration. Multiple iterations are superimposed to form a learnable sparse regular network.

[0012] In the fifth step, the number of network layers and the number of cycles are set, the learnable sparse regular network is trained using the training data set, the feature information of normal samples is learned, and the update of the learnable parameters is completed through the back propagation mechanism of the network;

[0013] In the sixth step, the vibration signal of the mechanical equipment is collected to construct a test sample, the test sample is input into the trained learnable sparse regular network, and the reconstructed signal output by the learnable sparse regular network is calculated. The error between the input sample and the input sample is determined by whether the error value is greater than the threshold. Determine whether the machine is in normal or abnormal state.

[0014] The mechanical anomaly detection method based on learnable sparse regular dictionary learning also includes:

[0015] In the seventh step, the reconstructed signal Perform spectral analysis and view the spectrum of the reconstructed data of each dictionary atom, and realize post-interpretable analysis through spectrum visualization.

[0016] In the mechanical anomaly detection method based on learnable sparse regular dictionary learning, in the first step, the vibration signal Through the acceleration sensor to collect the harmonic information and noise The superposition composition is expressed as ; The length of a single sample signal in the data set is 1024,

[0017] In the second step, the dictionary learning model is:

[0018]

[0019] in, and is the sparse code and dictionary to be solved, represents the square of the L2 norm, which is the data fidelity term, represents the convolution operation, and About and The regularization term constraint function does not impose a clear constraint form. and is the weight parameter of the regularization term.

[0020] In the mechanical anomaly detection method based on learnable sparse regularized dictionary learning, in the third step, the equivalent solution equation group of the dictionary learning model is:

[0021]

[0022] According to the semi-quadratic splitting algorithm (HQS), the above formula is equivalent to the following form:

[0023]

[0024] in, and About and The weight parameter is and When large enough, two auxiliary variables can be satisfied and The equivalent condition for , , , The solution of , the iterative calculation formula for the i-th time is as follows:

[0025]

[0026] Solution The equation is a combination of two L2 norms, and there is a closed-form solution. Through transform domain operations, using fast Fourier transform and inverse Fourier transform, we can get The solution is:

[0027]

[0028] in, , and They are , and The frequency domain variable obtained after fast Fourier transform, yes The complex conjugate of , is the identity matrix, represents the inverse Fourier transform,

[0029] The solution is to pass and Expanded into a matrix form and implemented in combination with the least squares method, the closed-form solution is:

[0030]

[0031] in, and for and The expanded form of for The vectorized form of , represents inverse quantization, where and The calculation of is equivalent to the expansion convolution algorithm, where the vectorization of the dictionary refers to , where d is the number of dictionary atoms, k is the dimension of each dictionary atom, and each dictionary atom is copied k times to obtain a The inverse quantization is to convert each dimension of the three-dimensional matrix into The atomic matrix of is averaged to obtain the updated dictionary atoms, and the combination of dictionary atoms forms the updated dictionary.

[0032] In the mechanical anomaly detection method based on learnable sparse regular dictionary learning, the unfolded convolution algorithm is used to directly obtain calculate The values ​​include:

[0033] definition Indicates the filling operation. Perform mirror filling to obtain an enlarged feature map , is the size of dictionary atoms;

[0034] Will Considered as a convolution kernel and Perform convolution;

[0035] The convolution results are sorted by size Expand and superimpose to obtain a two-dimensional matrix;

[0036] Flip the two-dimensional matrix left and right to get , for the expanded convolution algorithm The calculation will As A special case implementation of .

[0037] In the mechanical anomaly detection method based on learnable sparse regular dictionary learning, in the fourth step, when the constraint function When non-convex, the constraint function The continuous proximal operator is characterized as the gradient of a convex differentiable function. The network output is relative to the input of the convex function. The convex neural network differentiates the convex function neural network to complete the function of the proximal operator. Design a network module constraint The prior information in completes the variables The network module is composed of an encoder and a decoder. The architecture of the encoder is designed according to the form of the input convex neural network. Its function expression is as follows:

[0038]

[0039] z k = R e L U ( W z k - 1 z k - 1 + W x k X ′ + b k ) ,  k ∈ [ 2 , K ]

[0040] in, is the input of the encoder, is the output, is a learnable parameter, b is a bias term, W is a non-negative weight parameter, and the ReLU activation function is a convex non-decreasing function. These constraints ensure the overall convexity of the encoder, and the decoder is constructed directly using the transpose of the corresponding weights. Design a convolutional neural network to complete the variables Solving and extracting The convolutional neural network is composed of multiple identical convolutional layers and ReLU activation functions. A residual connection is added between the last convolution layer and the input, and padding operations are used in each convolution layer to keep the dimensions of the input and output data the same. The weight learning network is designed to complete the weight parameters mentioned above. , , , The update of the weight parameter is rewritten as , , , , set an initialization parameter in the weight learning network , initialization parameters After the weight learning network, the corresponding four output values ​​are obtained, which are the learned , , , .

[0041] In the mechanical anomaly detection method based on learnable sparse regularized dictionary learning, in the fifth step, the loss function of the learnable sparse regularized network is designed to be the square of the L2 norm of the difference between the input data and the reconstructed data, thereby reducing the network's reconstruction error for normal samples, realizing feature extraction, and updating the weights in each network module through back propagation.

[0042] A mechanical anomaly detection system based on learnable sparse regular dictionary learning includes:

[0043] The collection unit is used to collect vibration signals of mechanical equipment under normal operation , and construct a training data set;

[0044] A modeling unit for constructing a dictionary learning model containing a learnable sparse regularization term, wherein the sparse coding With dictionary The regularization term of is a constraint function of unknown form;

[0045] Semi-quadratic splitting algorithm unit, which is used to combine the semi-quadratic splitting algorithm and introduce two auxiliary variables and , the solution of the dictionary learning model is equivalent to four variables , , , The iterative solution process is used to derive the auxiliary variables and The closed-form solution of

[0046] A learnable sparse regularized network unit is used to iterate the four variables in the formula , , , The network modules are designed with weight parameters for calculation or learning. The combination of all network modules represents one iteration. Multiple iterations are superimposed to form a learnable sparse regular network.

[0047] A training unit, which is used to set the number of network layers and the number of cycles, use the training data set to train the learnable sparse regular network, learn the characteristic information of normal samples, and complete the update of the learnable parameters through the back propagation mechanism of the network;

[0048] The judgment unit is used to input the test sample into the trained learnable sparse regular network and calculate the reconstructed signal output by the learnable sparse regular network. With input sample The error between the two is determined based on whether the error value is greater than the threshold. Determine whether the machine is in normal or abnormal state;

[0049] An analysis unit for reconstructing the signal Perform spectral analysis and view the spectrum of the reconstructed data of each dictionary atom, and realize post-interpretable analysis through spectrum visualization.

[0050] Compared with the prior art, the present invention has the following advantages: in the mathematical modeling stage, the present invention does not impose explicit regularization term constraints on sparse coding and dictionaries, but uses the CNN network to adaptively learn data information from training data, thereby overcoming the problem that artificially designed regularization terms cannot be adaptively adjusted for data features; when solving the model, it is expanded according to the semi-quadratic splitting algorithm, and the coding values ​​and dictionaries are alternately calculated and updated, strictly adhering to the framework of dictionary learning; the network adopts a block design, and the network module for learning coding regularization terms is designed as an input convex neural network, thereby approximating the proximal operator of its solution function and learning effective prior information; the overall network reconstruction data features and the data reconstruction features of different dictionary atoms are visualized, thereby verifying that the present invention has learned features that match the device mechanism, making it ex post interpretable, and realizing accurate and reliable anomaly detection of mechanical equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] By reading the detailed description of the preferred specific embodiments below, various other advantages and benefits of the present invention will become clear to those of ordinary skill in the art. The drawings in the specification are only for the purpose of illustrating the preferred embodiments and are not considered to be limitations of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without creative work. Moreover, the same reference numerals are used to represent the same components throughout the drawings.

[0052] In the attached picture:

[0053] Figure 1 A schematic diagram of the steps of the interpretable intelligent mechanical anomaly detection method based on learnable sparse regularized dictionary learning provided by the present invention;

[0054] Figure 2 A schematic diagram of the aviation bearing accelerated fatigue test bench provided by the present invention;

[0055] Figure 3 The network structure diagram of the interpretable intelligent mechanical anomaly detection method based on learnable sparse regularized dictionary learning provided by the present invention, wherein (a) the overall network structure diagram, (b) the initialization network structure diagram, (c) the weight parameter learning network structure diagram, and (d) the dictionary prior learning network structure diagram;

[0056] Figure 4 This is a schematic diagram of the operation of the unfolded convolution algorithm provided by the present invention;

[0057] Figure 5 A network structure diagram of the coding prior learning provided by the present invention;

[0058] Figure 6 A schematic diagram showing a comparison of the ability of the explainable intelligent mechanical anomaly detection method based on learnable sparse regularized dictionary learning provided by the present invention and other methods to distinguish between normal samples and abnormal samples, (a) the method provided by the present invention, (b) variational autoencoder, (c) multi-layer convolutional sparse coding unfolded network, (d) a network in which the input convex neural network architecture of the sparse coding regularization term learning network is changed to a common autoencoder architecture;

[0059] Figure 7 A spectrum diagram of the overall reconstruction result of a normal signal by the interpretable intelligent mechanical anomaly detection method based on learnable sparse regular dictionary learning provided by the present invention;

[0060] Figure 8 The spectrum diagram of the reconstruction result of 32 dictionary atoms of normal signal by the interpretable intelligent mechanical anomaly detection method based on learnable sparse regularized dictionary learning provided by the present invention;

[0061] Fig. 9 This is a spectrum diagram of the reconstruction results of two dictionary atoms of normal signals by the explainable intelligent mechanical anomaly detection method based on learnable sparse regularized dictionary learning provided by the present invention.

[0062] The present invention is further explained below in conjunction with the accompanying drawings and embodiments. DETAILED DESCRIPTION

[0063] The specific embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the specific embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.

[0064] It should be noted that certain words are used in the specification and claims to refer to specific components. Those skilled in the art should understand that technicians may use different nouns to refer to the same component. This specification and claims do not use the difference in nouns as a way to distinguish components, but use the difference in the functions of the components as the criterion for distinction. As mentioned throughout the specification and claims, "including" or "comprising" is an open term, so it should be interpreted as "including but not limited to". The subsequent description of the specification is a preferred embodiment of the present invention, but the description is based on the general principles of the specification and is not intended to limit the scope of the present invention. The scope of protection of the present invention shall be determined by the attached claims.

[0065] To facilitate understanding of the embodiments of the present invention, further explanation will be given below by taking specific embodiments as examples in conjunction with the accompanying drawings, and each of the accompanying drawings does not constitute a limitation on the embodiments of the present invention.

[0066] like Figures 1 to 9 As shown, the mechanical abnormality detection method includes the following steps:

[0067] In the first step S1, the vibration signal of the mechanical equipment under normal operation is collected , and construct a training data set;

[0068] In the second step S2, a dictionary learning model including a learnable sparse regularization term is constructed, wherein the sparse coding With dictionary The regularization term of is a constraint function of unknown form;

[0069] In the third step S3, two auxiliary variables are introduced in combination with the semi-quadratic splitting algorithm. and , the solution of the dictionary learning model is equivalent to four variables , , , The iterative solution process is used to derive the auxiliary variables and The closed-form solution of

[0070] In the fourth step S4, the four variables in the iterative calculation formula are , , , The network modules are designed with weight parameters for calculation or learning. The combination of all network modules represents one iteration. Multiple iterations are superimposed to form a learnable sparse regular network.

[0071] In the fifth step S5, the number of network layers and the number of cycles are set, the learnable sparse regular network is trained using the training data set, the feature information of normal samples is learned, and the update of the learnable parameters is completed through the back propagation mechanism of the network;

[0072] In the sixth step S6, the vibration signal of the mechanical equipment during operation is collected to construct a test sample, the test sample is input into the trained learnable sparse regular network, and the reconstructed signal output by the learnable sparse regular network is calculated. The error between the input sample and the input sample is determined by whether the error value is greater than the threshold. Determine whether the machine is in normal or abnormal state.

[0073] In a preferred implementation of the mechanical anomaly detection method based on learnable sparse regular dictionary learning, the method further includes:

[0074] In the seventh step S7, the reconstructed signal Perform spectral analysis and view the spectrum of the reconstructed data of each dictionary atom, and realize post-interpretable analysis through spectrum visualization.

[0075] In a preferred embodiment of the mechanical anomaly detection method based on learnable sparse regular dictionary learning, in the first step S1, the vibration signal Through the acceleration sensor to collect the harmonic information and noise The superposition composition is expressed as ; The length of a single sample signal in the data set is 1024,

[0076] In a preferred implementation of the mechanical anomaly detection method based on learnable sparse regularized dictionary learning, in the second step S2, the dictionary learning model is:

[0077]

[0078] in, and is the sparse code and dictionary to be solved, represents the square of the L2 norm, which is the data fidelity term, represents the convolution operation, and About and The regularization term constraint function does not impose a clear constraint form. and is the weight parameter of the regularization term.

[0079] In a preferred implementation of the mechanical anomaly detection method based on learnable sparse regularized dictionary learning, in the third step S3, the equivalent solution equation group of the dictionary learning model is:

[0080]

[0081] According to the semi-quadratic splitting algorithm (HQS), the above formula is equivalent to the following form:

[0082]

[0083] in, and About and The weight parameter is and When large enough, two auxiliary variables can be satisfied and The equivalent condition for , , , The solution of , the iterative calculation formula for the i-th time is as follows:

[0084]

[0085] Solution The equation is a combination of two L2 norms, and there is a closed-form solution. Through transform domain operations, using fast Fourier transform and inverse Fourier transform, we can get The solution is:

[0086]

[0087] in, , and They are , and The frequency domain variable obtained after fast Fourier transform, yes The complex conjugate of , is the identity matrix, represents the inverse Fourier transform,

[0088] The solution is to pass and Expanded into a matrix form and implemented in combination with the least squares method, the closed-form solution is:

[0089]

[0090] in, and for and The expanded form of for The vectorized form of , represents inverse quantization, where and The calculation of is equivalent to the expansion convolution algorithm, where the vectorization of the dictionary refers to , where d is the number of dictionary atoms, k is the dimension of each dictionary atom, and each dictionary atom is copied k times to obtain a The inverse quantization is to convert each dimension of the three-dimensional matrix into The atomic matrix of is averaged to obtain the updated dictionary atoms, and the combination of dictionary atoms forms the updated dictionary.

[0091] In the mechanical anomaly detection method based on learnable sparse regular dictionary learning, the unfolded convolution algorithm is used to directly obtain calculate The values ​​include:

[0092] definition Indicates the filling operation. Perform mirror filling to obtain an enlarged feature map , is the size of the dictionary atom;

[0093] Will Considered as a convolution kernel and Perform convolution;

[0094] The convolution results are sorted by size Expand and superimpose to obtain a two-dimensional matrix;

[0095] Flip the two-dimensional matrix left and right to get , for the expanded convolution algorithm The calculation will As A special case implementation of .

[0096] In a preferred implementation of the mechanical anomaly detection method based on learnable sparse regular dictionary learning, in the fourth step S4, when the constraint function When non-convex, the constraint function The continuous proximal operator can be completely characterized as the gradient of a convex differentiable function. Here, we select a convex neural network whose network output is a convex function relative to the input to differentiate the convex function neural network to complete the function of the proximal operator and design a network module constraint The prior information in completes the variables The network module is composed of an encoder and a decoder. The architecture of the encoder is designed according to the form of the input convex neural network. Its function expression is as follows:

[0097]

[0098] z k = R e L U ( W z k - 1 z k - 1 + W x k X ′ + b k ) ,  k ∈ [ 2 , K ]

[0099] in, is the input of the encoder, is the output, is a learnable parameter, b is a bias term, W is a non-negative weight parameter, and the ReLU activation function is a convex non-decreasing function. These constraints ensure the overall convexity of the encoder, and the decoder is constructed directly using the transpose of the corresponding weights. Design a convolutional neural network to complete the variables Solving and extracting The convolutional neural network is composed of multiple identical convolutional layers and ReLU activation functions. A residual connection is added between the last convolution layer and the input, and padding operations are used in each convolution layer to keep the dimensions of the input and output data the same. The weight learning network is designed to complete the weight parameters mentioned above. , , , The update of the weight parameter is rewritten as , , , , set an initialization parameter in the weight learning network , initialization parameters After the weight learning network, the corresponding four output values ​​are obtained, which are the learned , , , .

[0100] In a preferred implementation of the mechanical anomaly detection method based on learnable sparse regularized dictionary learning, in the fifth step S5, the loss function of the learnable sparse regularized network is designed to be the square of the L2 norm of the difference between the input data and the reconstructed data, thereby reducing the network's reconstruction error for normal samples, realizing feature extraction, and updating the weights in each network module through back propagation.

[0101] A mechanical anomaly detection system based on learnable sparse regular dictionary learning, comprising:

[0102] The collection unit is used to collect vibration signals of mechanical equipment under normal operation , and construct a training data set;

[0103] A modeling unit for constructing a dictionary learning model containing a learnable sparse regularization term, wherein the sparse coding With dictionary The regularization term of is a constraint function of unknown form;

[0104] Semi-quadratic splitting algorithm unit, which is used to combine the semi-quadratic splitting algorithm and introduce two auxiliary variables and , the solution of the dictionary learning model is equivalent to four variables , , , The iterative solution process is used to derive the auxiliary variables and The closed-form solution of

[0105] A learnable sparse regularized network unit is used to iterate the four variables in the formula , , , The network modules are designed with weight parameters for calculation or learning. The combination of all network modules represents one iteration. Multiple iterations are superimposed to form a learnable sparse regular network.

[0106] A training unit, which is used to set the number of network layers and the number of cycles, use the training data set to train the learnable sparse regular network, learn the characteristic information of normal samples, and complete the update of the learnable parameters through the back propagation mechanism of the network;

[0107] The judgment unit is used to input the test sample into the trained learnable sparse regular network and calculate the reconstructed signal output by the learnable sparse regular network. With input sample The error between the two is determined based on whether the error value is greater than the threshold. Determine whether the machine is in normal or abnormal state;

[0108] An analysis unit for reconstructing the signal Perform spectral analysis and view the spectrum of the reconstructed data of each dictionary atom, and realize post-interpretable analysis through spectrum visualization.

[0109] In one embodiment, Figure 1 It is a schematic diagram of the steps of the present invention, which includes the following steps:

[0110] S1: Collect vibration signals of mechanical equipment under normal operation , and construct a training data set;

[0111] S2: Construct a dictionary learning model with a learnable sparse regularization term, where the sparse coding With dictionary The regularization term of is a constraint function of unknown form;

[0112] S3: Use the semi-quadratic splitting algorithm and introduce two auxiliary variables and , the solution of the model is equivalent to four variables , , , The iterative solution process further derives the and The closed-form solution of

[0113] S4: Four variables in the iterative calculation formula , , , The network modules corresponding to the weight parameters are designed for calculation or learning. The combination of all modules represents one iteration. Multiple iterative processes are superimposed to form a learnable sparse regular network.

[0114] S5: setting the number of network layers and the number of cycles, using the training data set to train the learnable sparse regular network, learning the feature information of normal samples, and completing the update of the learnable parameters through the back propagation mechanism of the network;

[0115] S6: Design a judgment threshold , collect the vibration signal of the mechanical equipment during operation to construct a test sample, input the test sample into the trained learnable sparse regular network, and calculate the reconstructed signal output by the learnable sparse regular network With input sample The error between the two is determined based on whether the error value is greater than the threshold. Determine whether the machine is in normal or abnormal state.

[0116] S7: Signal for network reconstruction Perform spectral analysis and view the spectrum of the reconstructed data of each dictionary atom, and realize post-interpretable analysis through spectrum visualization.

[0117] Figure 2 This is a schematic diagram of an aviation bearing accelerated fatigue test bench. The entire test bench is driven by a high-speed electric spindle, and acceleration sensors are installed in the X horizontal direction and Y vertical direction of the test bearing. During the experiment, a radial load of 11kN and an axial load of 2kN are applied to the bearing. The bearing used is a H7018C high-speed bearing with the following parameters: inner diameter 90mm, outer diameter 120mm, contact angle 15°, number of rollers 27, and the bearing is a healthy bearing in the initial state.

[0118] In this embodiment, the bearing speed is set to be constant at 6000RPM, and the main shaft rotation frequency can be calculated to be 100Hz. The sampling frequency during the experiment is 20kHz, and data is recorded every five minutes. The data length is 32786, and a total of about 157.7 hours of vibration data are collected. In the later stage of the experiment, the bearing vibration increased significantly, and obvious periodic impact phenomena appeared in the signal. After stopping the machine for inspection, it was found that the inner ring of the bearing had peeling of about 3 square millimeters, and the corresponding fault characteristic frequency was 1491.7Hz. According to the effective value of the data, the data after 155.8 hours is regarded as abnormal data, and the data before this is regarded as normal data. Some files are selected for data set construction, and the data in each file is resampled by sliding window. The sampling window length is 1024, and the sliding window ratio is set to 0.8. A total of 8224 normal samples are obtained, and the sample label is marked as 0; 1936 abnormal samples, and the label is recorded as 1. 5000 normal samples are selected to form the training set, and the remaining 3224 normal samples and 1936 abnormal samples are jointly composed of the test set.

[0119] In this embodiment, corresponding to step S2, a convolutional sparse coding model is established, and the input signal is represented as and The goal of the convolution is to optimize the two variables:

[0120]

[0121] In this embodiment, corresponding to step S3, two auxiliary variables are introduced and , the model can be equivalent to the following form:

[0122]

[0123] Further, , , , Perform iterative solution. In the i-th solution process, the corresponding iterative formula is as follows:

[0124]

[0125] In this embodiment, corresponding to step S4, a corresponding network module is designed for each variable to solve, and the number of iterations is selected. , that is, the number of layers of the network is 2. At this time, the network will not be too simple to learn structural information, and the calculation speed of the car will not be slowed down due to too many layers. Figure 3 (a) shows the overall structure of the network. First, use Figure 3 The PreNet network module shown in (b) is and Initialization, with original data As input, Design random initialization, the size is 32×17, that is, there are 32 dictionary atoms in the dictionary, and the dimension is 17; By inputting Perform convolution-ReLU activation-convolution to achieve initialization, corresponding to Its number of channels is 32. Next and After multiple stages of learning and updating, as shown in the attached Figure 3 As shown in (a), and In the module, update according to the following formulas and :

[0126]

[0127]

[0128] in, , and They are , and The frequency domain variable obtained after fast Fourier transform, yes The complex conjugate of represents inverse Fourier transform; and for and The expanded form of for The vectorized form of represents inverse quantization, where and The calculation of will consume a lot of memory, which can be directly obtained by unfolding the convolution algorithm calculate The value of , in order to simplify the representation, the subscript is omitted here.

[0129] Attached Figure 4 Shown is a An example of an unfolded convolution operation. First, Perform k-1 mirror filling to As a convolution kernel Perform convolution with a step size of 1 to obtain the convolution result. Then, the convolution result is cut and superimposed according to the size of k. Construct a two-dimensional matrix, and then flip the resulting matrix left and right to obtain Furthermore, As A special case of Calculation.

[0130] Next, in Completed in module Update due to There is no clear regularization constraint form, so it is impossible to explicitly express the proximal operator when solving. is a non-convex function, so we can The solution function is characterized as the gradient of a convex differentiable function, and the input convex neural network is further combined with the autoencoder to realize the equivalent mapping of the solution process. The network architecture is as attached Figure 5 As shown, the encoder function is expressed as follows:

[0131]

[0132] z k = R e L U ( W z k - 1 z k - 1 + W x k X ′ + b k ) ,  k ∈ [ 2 , K ]

[0133] in, is the input of the encoder, is the output, is a learnable parameter, b is a bias term, and W is a non-negative weight parameter. These constraints ensure the overall convexity of the network. In the decoder, the same weights as the encoder are used to complete the decoding process of the latent variables, and finally a sparse code containing prior information is obtained. Specifically, the encoder achieves dimensionality reduction through convolution operations, and a ReLU activation layer is added after the convolution layer. The weights There are 33, 64, 128, and 512 channels, respectively, with weights There are 64, 128, and 512 channels respectively. The construction of the decoder can be completed directly by using the transpose of the corresponding encoder weights for deconvolution. The structural parameters of the network module are shown in Table 1. Updated by Module implementation, its structure is as shown in the attached Figure 3 As shown in (d), there are six convolutional layers. ReLU nonlinear activation is designed after the first five convolutional layers, and there is a residual connection between the last convolution layer and the input. Each convolutional layer contains 32 channels, the convolution kernel size is 3, the convolution step is 1, and the output dimension of the dictionary atom is kept unchanged by padding operation.

[0134] For the weight parameter in the iteration formula , , , , which can be directly written as , , , In the form of, and using HyperNet network for learning, its architecture is as shown in the attached Figure 3 As shown in (c). Set an initialization parameter After the convolution layer, Sigmoid activation layer, convolution layer and Softplus activation layer, four output values ​​are obtained, which are added to the network learning process as separate channel numbers and updated during back propagation. Finally, the ReconNet network is used to convert the output of the LRU-Net network into and Corresponding convolutions are performed and superimposed according to different channels to complete the reconstruction of the input data.

[0135] Table 1 Network structure parameters

[0136]

[0137] In this embodiment, in step S5, PyTorch is used to implement the construction of a learnable sparse regular dictionary learning anomaly detection network LRU-Net, and the training set is input into the network. The loss function of the network is It is designed as the square of the L2 norm of the difference between the input data and the reconstructed data, thereby reducing the network's reconstruction error for normal samples and achieving feature extraction. Its mathematical expression is as follows:

[0138]

[0139] in, For the dataset The number of samples contained in , when training the network, set the corresponding training parameters: use Adam optimizer to solve the network gradient and complete the parameter update, the batch size is 32, the learning rate is 0.001, and it decays with the training process, decaying to the original 0.5 after every 30 cycles, and the total number of cycles is set to 50.

[0140] In this embodiment, in step S6, the test sample is input into the adaptive prior dictionary learning anomaly detection network. It should be noted that at this time, only the code in the network is updated. and The values ​​in the dictionary are no longer updated, and the values ​​learned by the network during training are used. , ,and Then, the dictionary is convolved with the encoded value to obtain the reconstructed signal and the reconstruction error is calculated. And normalize the error value to the interval [0,1] for each batch ,

[0141]

[0142] in, Indicates taking the minimum value, Indicates taking the maximum value and judging the threshold The value is 0.5. When the data in is less than 0.5, the corresponding sample is normal data, and when it is greater than 0.5, the corresponding sample is abnormal data.

[0143] Furthermore, the performance differences of the LRU-Net network of the present invention and other three anomaly detection networks, including VAE, ML-ISTA, and LRU-normal, are compared. The input convex neural network architecture is changed to a common convolutional neural network structure. Table 2 shows the calculation results of the accuracy, detection rate and false alarm rate of the four methods on the aviation bearing accelerated fatigue data set, which shows that the method of the present invention shows the best performance in all three detection indicators, with the highest accuracy, detection rate and the lowest false alarm rate, which verifies the effectiveness of the present invention. By comparing the results of the two networks LRU-net and LRU-normal, it can be shown that the design of the input convex neural network architecture for the encoding prior learning part in the present invention is reasonable and effective.

[0144] Table 2 Comparison of detection indicators of four methods

[0145]

[0146] Afterwards, the probability distribution of the reconstruction errors of the four methods for normal and abnormal samples is statistically analyzed. The results are shown in the attached figure. Figure 6 As shown, it can be seen that this method can successfully divide normal samples and abnormal samples into two distributions, the overlap is minimal, the distance between the two distributions is maximized, and the distribution is more concentrated.

[0147] In this embodiment, in step S7, the obtained and Convolution calculation is performed to reconstruct the input signal. The spectrum of the reconstructed signal and the input signal is shown in the attached figure. Figure 7 As shown in the figure, since the network is trained with normal samples, the sparse regular dictionary learning expansion network can learn the characteristic information in normal data. It can be seen that LRU-net extracts the rotation frequency and its double frequency information on the aviation bearing accelerated fatigue data set, while the amplitudes of other frequency components are weakened. Since the network is an unsupervised learning method, no guiding information is given during the learning process, and the loss function is only constrained by the reconstruction error, it is easily affected by the noise in the sample. Combining this information with the visualization attachment Figure 7 The results show the effectiveness of the present invention in data feature extraction.

[0148] Attached Figure 8 It is a dictionary The spectrum of the data reconstructed by each dictionary atom in , a total of 32 atoms are set, and each atom is convolved with the corresponding encoding value to obtain the reconstruction of the dictionary atom. It can be seen that different dictionary atoms have different representations of data information. The features reconstructed by the 10th and 14th dictionary atoms are used as examples for explanation, as shown in the attached figure. Fig. 9 As shown. The 10th dictionary atom represents the frequency conversion and triple frequency conversion information, while the 14th dictionary atom can represent the frequency conversion, double frequency and triple frequency information. The visualization method and results show that the present invention can not only adaptively learn the features in the input sample, but also express certain specific components in each dictionary atom, ultimately achieving the effect of feature extraction and denoising.

[0149] Although the embodiments of the present invention are described above in conjunction with the accompanying drawings, the present invention is not limited to the above specific embodiments and application fields, and the above specific embodiments are only illustrative and instructive, rather than restrictive. A person of ordinary skill in the art can also make many forms under the guidance of this specification and without departing from the scope of protection of the claims of the present invention, all of which belong to the protection of the present invention.

Claims

1. A mechanical anomaly detection method based on learnable sparse regularized dictionary learning, characterized in that: The following steps are involved: In the first step (S1), the vibration signal of the mechanical equipment under normal operation is collected. , and construct a training data set, the vibration signal Through the acceleration sensor to collect the harmonic information and noise The superposition composition is expressed as ; The length of a single sample signal in the data set is 1024; In the second step (S2), a dictionary learning model containing a learnable sparse regularization term is constructed, wherein the sparse coding With dictionary The regular term is a constraint function of unknown form, and the dictionary learning model is: ; in, and is the sparse code and dictionary to be solved, represents the square of the L2 norm, which is the data fidelity term, represents the convolution operation, and About and The regularization term constraint function does not impose a clear constraint form. and is the weight parameter of the regularization term; In the third step (S3), two auxiliary variables are introduced in combination with the semi-quadratic splitting algorithm: and , the solution of the dictionary learning model is equivalent to four variables , , , The iterative solution process is used to derive the auxiliary variables and The closed-form solution of the dictionary learning model is equivalent to solving the equations: ; According to the semi-quadratic splitting algorithm (HQS), the above formula is equivalent to the following form: ; in, and About and The weight parameter is and When large enough, two auxiliary variables can be satisfied and The equivalent condition for , , , The solution of , the iterative calculation formula for the i-th time is as follows: ; Solution The equation is a combination of two L2 norms, and there is a closed-form solution. Through transform domain operations, using fast Fourier transform and inverse Fourier transform, we can get The solution is: ; in, , and They are , and The frequency domain variable obtained after fast Fourier transform, yes The complex conjugate of , is the identity matrix, represents the inverse Fourier transform, The solution is to pass and Expanded into a matrix form and implemented in combination with the least squares method, the closed-form solution is: ; in, and for and The expanded form of for The vectorized form of , represents inverse quantization, where and The calculation of is equivalent to the expansion convolution algorithm, where the vectorization of the dictionary refers to , where d is the number of dictionary atoms, k is the dimension of each dictionary atom, and each dictionary atom is copied k times to obtain a The inverse quantization is to convert each dimension of the three-dimensional matrix into The atomic matrix of is averaged to obtain updated dictionary atoms, and the combination of dictionary atoms forms an updated dictionary; In the fourth step (S4), the four variables in the iterative calculation formula are , , , The network modules are designed with weight parameters for calculation or learning. The combination of all network modules represents one iteration. Multiple iterations are superimposed to form a learnable sparse regular network. In the fifth step (S5), the number of network layers and the number of cycles are set, the learnable sparse regular network is trained using the training data set, the feature information of normal samples is learned, and the learnable parameters are updated through the back propagation mechanism of the network; In the sixth step (S6), the vibration signal of the mechanical equipment during operation is collected to construct a test sample, the test sample is input into the trained learnable sparse regular network, and the reconstructed signal output by the learnable sparse regular network is calculated. The error between the input sample and the input sample is determined by whether the error value is greater than the threshold. Determine whether the machine is in normal or abnormal state.

2. According to claim 1, a mechanical anomaly detection method based on learnable sparse regularized dictionary learning is characterized in that: Also includes, In the seventh step (S7), the reconstructed signal Perform spectral analysis and view the spectrum of the reconstructed data of each dictionary atom, and realize post-interpretable analysis through spectrum visualization.

3. The method for detecting mechanical anomalies based on learnable sparse regularized dictionary learning according to claim 1, characterized in that: Using the unfolded convolution algorithm, we can directly calculate The values ​​include: definition Indicates the filling operation. Perform mirror filling to obtain an enlarged feature map , is the size of dictionary atoms; Will Considered as a convolution kernel and Perform convolution; The convolution results are sorted by size Expand and superimpose to obtain a two-dimensional matrix; Flip the two-dimensional matrix left and right to get , for the expanded convolution algorithm The calculation will As A special case implementation of .

4. The method for detecting mechanical anomalies based on learnable sparse regularized dictionary learning according to claim 1, characterized in that: In the fourth step (S4), when the constraint function When non-convex, the constraint function The continuous proximal operator is characterized as the gradient of a convex differentiable function. The network output is relative to the input of the convex function. The convex neural network differentiates the convex function neural network to complete the function of the proximal operator. Design a network module constraint The prior information in completes the variables The network module is composed of an encoder and a decoder. The architecture of the encoder is designed according to the form of the input convex neural network. Its function expression is as follows: ; ; in, is the input of the encoder, is the output, is a learnable parameter, b is a bias term, W is a non-negative weight parameter, and the ReLU activation function is a convex non-decreasing function. These constraints ensure the overall convexity of the encoder, and the decoder is constructed directly using the transpose of the corresponding weights. Design a convolutional neural network to complete the variables Solving and extracting The convolutional neural network is composed of multiple identical convolutional layers and ReLU activation functions. A residual connection is added between the last convolution layer and the input, and padding operations are used in each convolution layer to keep the dimensions of the input and output data the same. The weight learning network is designed to complete the weight parameters mentioned above. , , , The update of the weight parameter is rewritten as , , , , set an initialization parameter in the weight learning network , initialization parameters After the weight learning network, the corresponding four output values ​​are obtained, which are the learned , , , .

5. The method for detecting mechanical anomalies based on learnable sparse regularized dictionary learning according to claim 1, characterized in that: In the fifth step (S5), the loss function of the learnable sparse regular network is designed to be the square of the L2 norm of the difference between the input data and the reconstructed data, thereby reducing the network's reconstruction error for normal samples, achieving feature extraction, and updating the weights in each network module through back propagation.

6. A mechanical anomaly detection system based on learnable sparse regularized dictionary learning, characterized in that: These include, The collection unit is used to collect vibration signals of mechanical equipment under normal operation , and construct a training data set, the vibration signal Through the acceleration sensor to collect the harmonic information and noise The superposition composition is expressed as ; The length of a single sample signal in the data set is 1024; A modeling unit for constructing a dictionary learning model containing a learnable sparse regularization term, wherein the sparse coding With dictionary The regular term is a constraint function of unknown form, and the dictionary learning model is: ; in, and is the sparse code and dictionary to be solved, represents the square of the L2 norm, which is the data fidelity term, represents the convolution operation, and About and The regularization term constraint function does not impose a clear constraint form. and is the weight parameter of the regularization term; Semi-quadratic splitting algorithm unit, which is used to combine the semi-quadratic splitting algorithm and introduce two auxiliary variables and , the solution of the dictionary learning model is equivalent to four variables , , , The iterative solution process is used to derive the auxiliary variables and The closed-form solution of the dictionary learning model is equivalent to solving the equations: ; According to the semi-quadratic splitting algorithm (HQS), the above formula is equivalent to the following form: ; in, and About and The weight parameter is and When large enough, two auxiliary variables can be satisfied and The equivalent condition for , , , The solution of , the iterative calculation formula for the i-th time is as follows: ; Solution The equation is a combination of two L2 norms, and there is a closed-form solution. Through transform domain operations, using fast Fourier transform and inverse Fourier transform, we can get The solution is: ; in, , and They are , and The frequency domain variable obtained after fast Fourier transform, yes The complex conjugate of , is the identity matrix, represents the inverse Fourier transform, The solution is to pass and Expanded into a matrix form and implemented in combination with the least squares method, the closed-form solution is: ; in, and for and The expanded form of for The vectorized form of , represents inverse quantization, where and The calculation of is equivalent to the expansion convolution algorithm, where the vectorization of the dictionary refers to , where d is the number of dictionary atoms, k is the dimension of each dictionary atom, and each dictionary atom is copied k times to obtain a The inverse quantization is to convert each dimension of the three-dimensional matrix into The atomic matrix of is averaged to obtain updated dictionary atoms, and the combination of dictionary atoms forms an updated dictionary; A learnable sparse regularized network unit is used to iterate the four variables in the formula , , , The network modules are designed with weight parameters for calculation or learning. The combination of all network modules represents one iteration. Multiple iterations are superimposed to form a learnable sparse regular network. A training unit, which is used to set the number of network layers and the number of cycles, use the training data set to train the learnable sparse regular network, learn the characteristic information of normal samples, and complete the update of the learnable parameters through the back propagation mechanism of the network; The judgment unit is used to input the test sample into the trained learnable sparse regular network and calculate the reconstructed signal output by the learnable sparse regular network. With input sample The error between the two is determined based on whether the error value is greater than the threshold. Determine whether the machine is in normal or abnormal state; An analysis unit for reconstructing the signal Perform spectral analysis and view the spectrum of the reconstructed data of each dictionary atom, and realize post-interpretable analysis through spectrum visualization.

Citation Information

Patent Citations

  • Mechanical anomaly interpretable intelligent detection method based on algorithm expansion adversarial learning

    CN115392395A

  • Image processing method, system, device and storage medium

    US20240029204A1