CN116183229A - Vibration data feature extraction method based on self-attention mechanism of sliding window - Google Patents
Vibration data feature extraction method based on self-attention mechanism of sliding window Download PDFInfo
- Publication number
- CN116183229A CN116183229A CN202310146293.3A CN202310146293A CN116183229A CN 116183229 A CN116183229 A CN 116183229A CN 202310146293 A CN202310146293 A CN 202310146293A CN 116183229 A CN116183229 A CN 116183229A
- Authority
- CN
- China
- Prior art keywords
- data
- attention
- sliding window
- dimension
- attention mechanism
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01M—TESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
- G01M13/00—Testing of machine parts
- G01M13/04—Bearings
- G01M13/045—Acoustic or vibration analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T90/00—Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Acoustics & Sound (AREA)
- Measurement Of Mechanical Vibrations Or Ultrasonic Waves (AREA)
Abstract
The invention belongs to the field of artificial intelligence health monitoring, and relates to a vibration data characteristic extraction method based on a sliding window self-attention mechanism, which comprises the following steps: firstly, collecting multichannel original vibration signals on complex equipment, and preprocessing signal data; step two, based on a sliding window self-attention mechanism, carrying out feature calculation and integration on the preprocessed data, and extracting key feature data; and thirdly, constructing a deep artificial neural network by referring to the residual neural network according to the preprocessing mode of the first step and the sliding window self-attention mechanism based on the second step, designing a classification head by combining specific tasks, analyzing key characteristic data and outputting specific analysis results. The invention can directly process the original vibration data with different sampling frequencies, different acquisition time lengths and different channel numbers, is convenient for generalized deployment in different equipment, different acquisition sensors and different data processing algorithms, has little influence by data distribution and modes and has strong self-adaptive capacity.
Description
Technical Field
The invention belongs to the field of artificial intelligence health monitoring, and relates to a vibration data characteristic extraction method based on a sliding window self-attention mechanism.
Background
Nondestructive testing is an important link and mode in complex equipment health monitoring, and through supervision and analysis of equipment states, the failure development condition of equipment can be effectively predicted, the equipment can be timely maintained and processed, and unnecessary damage and loss are reduced. The preliminary automated algorithm takes the labor of repeated boring and low intelligence, and liberates human beings. With the progress of intelligent algorithms, the more and more sophisticated is the demand for automatic intelligent analysis of the vibration state of equipment, the more and more desirable is the algorithm capable of automatically analyzing the damaged state of equipment.
The advent of artificial intelligence and deep neural network technology enabled the analytical processing of equipment vibration signals. With the development of computer vision and natural language processing technologies, the application of these new technologies in the emerging field to traditional vibration analysis is also becoming more and more important. At present, the analysis of equipment loss state still has the problems of inaccurate data result and lower applicability of the method.
Disclosure of Invention
In order to solve the technical problems in the prior art, the invention provides a vibration data feature extraction method based on a sliding window self-attention mechanism, which comprises the following specific technical scheme:
a vibration data characteristic extraction method based on a sliding window self-attention mechanism comprises the following steps:
firstly, collecting multichannel original vibration signals on complex equipment, and preprocessing signal data;
step two, based on a sliding window self-attention mechanism, carrying out feature calculation and integration on the preprocessed data, and extracting key feature data;
and thirdly, constructing a deep artificial neural network by referring to the residual neural network according to the preprocessing mode of the first step and the sliding window self-attention mechanism based on the second step, designing a classification head by combining specific tasks, analyzing key characteristic data and outputting specific analysis results.
Further, the first step specifically comprises: acquiring N-channel data acquired at a sampling frequency f in T time on complex equipment, forming training data by taking B groups of data as a batch, wherein the dimensions are (B, N, tf), mapping the data by adopting a layer of one-dimensional convolutional neural network to unify the dimensions to be (B, dh, tfN/dh), wherein d is the embedding dimension of a signal sequence, H is the head number of multi-head attention, and dividing the signal dimension by adopting a multi-head attention mechanism to integrate the signal dimension to be (B, H, d, H); where h=tfn/dh is the vibration characteristic length.
Further, the second step specifically includes:
1) Calculating QKV matrix: for the preprocessed data, mapping without changing data dimension for three times is carried out through three groups of different full connection layers, so that data expression of the data in three different spaces is obtained and is respectively called query data Q, value data V and key data K;
2) Calculating an attention matrix: determining the size w of a window, taking each data vector as a center on the vibration characteristic length, namely on the dimension H, carrying out similarity calculation on the surrounding w vectors, and recording all similarity values to obtain an attention matrix M, wherein the dimensions are (B, H, w and H), and the calculation expression is as follows:
where j=1, 2, … …, w;
the vector at each position of the characteristic length is calculated by dot product with w vectors around, and after the attention matrix M is obtained, normalization is carried out along w dimension;
3) Calculating a final value: after the attention matrix M is obtained, according to the degree of correlation between each vector and surrounding vectors, all vectors around each vector are weighted-averaged to be used as new values of the vectors, and the calculation expression is as follows:
where j=1, 2, … …, d.
Further, the constructing the deep artificial neural network in the third step specifically includes:
constructing a basic module:
the basic module consists of the following three parts: layer regularization, sliding window self-attention mechanism, and one-dimensional convolution layer; after data input, obtaining attention residual data through layer regularization and sliding window self-attention calculation respectively, and obtaining attention data after adding the attention residual data with input data; the attention data is subjected to layer regularization and one-dimensional convolution layer again to obtain convolution residual data, and the convolution residual data and the attention data are added to obtain output data;
constructing a hierarchy module:
the hierarchical module consists of two parts: a dimension conversion layer and a base module; the dimension conversion layer is responsible for completing dimension embedding and downsampling operations of the original vibration signal data, and then the dimension embedding and downsampling operations are transmitted to the base module for feature calculation and extraction;
and (3) constructing an output module:
and the output module performs two-classification or multi-classification tasks according to the actual network requirements, namely, performs fault prediction and motion analysis of the equipment.
The beneficial effects are that:
(1) The invention carries out the preprocessing of the self-adaptive method aiming at the original data signal, can directly process the original vibration data with different sampling frequencies, different acquisition time lengths and different channel numbers, is convenient for generalized deployment in different equipment, different acquisition sensors and different data processing algorithms, has little influence by data distribution and modes and has strong self-adaptive capacity; according to the data signals with different distributions, the window sliding mode is adopted for processing through the unified time node, so that the method can adapt to input data with different sizes and dimensions, balances the calculation time and the network receptive field size, and unifies the time dimensions of the data.
(2) Compared with a global self-attention mechanism, the self-attention mechanism based on the sliding window can greatly reduce the calculation time and occupied memory required by a network, and can meet the real-time compression, analysis and processing requirements of vibration signals.
(3) The invention adopts the modularized network construction, can adapt to different task demands in vibration signal analysis, and is convenient for transforming and compressing the feature vector dimension.
Drawings
FIG. 1 is a schematic diagram of a specific calculation flow of a vibration data feature extraction method of the present invention;
FIG. 2 is a schematic diagram of the process of information integration and feature extraction of acquired data according to the present invention;
FIG. 3 is a schematic diagram of a deep artificial neural network according to the present invention;
FIG. 4 is a schematic overall process diagram of vibration data feature extraction and analysis based on a sliding window self-attention mechanism in accordance with an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and technical effects of the present invention more apparent, the present invention will be further described in detail with reference to the drawings and examples of the specification.
According to the vibration data characteristic extraction method based on the sliding window self-attention mechanism, a large amount of known data, namely the vibration signals and the corresponding labels thereof, are utilized, the data characteristics are obtained based on deep learning summary data distribution rules, so that the known vibration characteristics are generalized to a wider working condition environment, the algorithm can adaptively perform characteristic extraction and analysis of the vibration signals, and in an unknown working condition environment, high-precision frequency spectrum analysis of the vibration signals is combined with high-robustness machine learning, so that intelligent and reliable characteristic signal extraction is realized.
Specifically, as shown in fig. 1 to 4, the method includes the steps of:
step one, collecting a multichannel original vibration signal on a complex device, and preprocessing signal data.
The pretreatment comprises the following steps: and carrying out self-adaptive segmentation and normalization on the data of the original vibration signal.
Specifically, in each group of data, acquiring N channel data acquired at a sampling frequency f in a time T, and taking the group B data as a Batch (Batch) to form training data, wherein in the actual test, B is 1. For the acquired data X, the dimensionality is (B, N, tf), a layer of one-dimensional convolutional neural network is adopted to map the data, so that the dimensionality is unified to be (B, dh, tfN/dh), d is the embedding dimensionality of the signal sequence, H is the head number of multi-head attention, and a multi-head attention mechanism is adopted to segment the signal dimensionality, so that the dimensionality is integrated to be (B, H, d, H); where h=tfn/dh is the vibration characteristic length.
The pretreatment of the invention adopts the modes of channel internal division and channel information reservation, reserves the space partition of the vibration signal sequence and integrates the time dimension of the vibration signal sequence.
Step two, based on a sliding window self-attention mechanism, carrying out feature calculation and integration on the preprocessed data, and extracting key feature data, wherein the specific flow is as follows:
1) Calculating QKV matrix: and (3) designing three groups of different full-connection layers according to the preprocessed data, and mapping the data without changing the data dimension for three times to obtain data expression of the data in three different spaces, which are respectively called query data (Q), value data (V) and key data (K).
2) Calculating an attention matrix: determining the size w of a window, taking each data vector as a center on the vibration characteristic length, namely on the dimension H, carrying out similarity calculation on the surrounding w vectors, and recording all similarity values to obtain an attention matrix M, wherein the dimension (B, H, w, H) is as follows:
where j=1, 2, … …, w;
i.e. for each position vector of the feature length, a dot product calculation is performed with the surrounding w vectors, and after the attention matrix M is obtained, normalization is performed along the w dimension.
3) Calculating a final value: after the attention matrix M is obtained, all vectors around each vector are weighted and averaged according to the degree of correlation between each vector and surrounding vectors, and as a new value of the vector, the expression is calculated as follows:
where j=1, 2, … …, d;
through the above calculation flow, feature remodeling and extraction can be performed for each input data X without changing its dimensions.
And thirdly, constructing a deep artificial neural network by referring to the residual neural network according to the preprocessing mode of the first step and the sliding window self-attention mechanism based on the second step, designing a classification head by combining specific tasks, analyzing key characteristic data and outputting specific analysis results.
Specifically, a deep artificial neural network is constructed, a residual error neural network is referenced, and the phenomenon of gradient disappearance is relieved through residual error learning, specifically comprising:
constructing a basic module:
the basic module consists of the following three parts: layer regularization, sliding window self-attention mechanism, and one-dimensional convolution layer. After data input, obtaining attention residual data through layer regularization and sliding window self-attention calculation respectively, and obtaining attention data after adding the attention residual data with input data; the attention data is subjected to layer regularization and one-dimensional convolution layer again to obtain convolution residual data, and the convolution residual data and the attention data are added to obtain output data.
Constructing a hierarchy module:
the hierarchical module consists of two parts: a dimension conversion layer and a base module; the dimension conversion layer is responsible for completing operations such as dimension embedding, downsampling and the like of original vibration signal data, and then the dimension conversion layer is subjected to feature calculation extraction by the base module;
by stacking hierarchical modules, a network backbone can be constructed.
And (3) constructing an output module:
and the output module performs two-classification (fault prediction) or multi-classification (motion analysis) tasks according to the actual network requirements.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the foregoing detailed description of the invention has been provided, it will be apparent to those skilled in the art that modifications may be made to the embodiments described in the foregoing examples, and that certain features may be substituted for those illustrated and described herein. Modifications, equivalents, and alternatives falling within the spirit and principles of the invention are intended to be included within the scope of the invention.
Claims (4)
1. The vibration data characteristic extraction method based on the sliding window self-attention mechanism is characterized by comprising the following steps of:
firstly, collecting multichannel original vibration signals on complex equipment, and preprocessing signal data;
step two, based on a sliding window self-attention mechanism, carrying out feature calculation and integration on the preprocessed data, and extracting key feature data;
and thirdly, constructing a deep artificial neural network by referring to the residual neural network according to the preprocessing mode of the first step and the sliding window self-attention mechanism based on the second step, designing a classification head by combining specific tasks, analyzing key characteristic data and outputting specific analysis results.
2. The method for extracting vibration data features based on a self-attention mechanism of a sliding window as claimed in claim 1, wherein said step one specifically comprises: acquiring N-channel data acquired at a sampling frequency f in T time on complex equipment, forming training data by taking B groups of data as a batch, wherein the dimensions are (B, N, tf), mapping the data by adopting a layer of one-dimensional convolutional neural network to unify the dimensions to be (B, dh, tfN/dh), wherein d is the embedding dimension of a signal sequence, H is the head number of multi-head attention, and dividing the signal dimension by adopting a multi-head attention mechanism to integrate the signal dimension to be (B, H, d, H); where h=tfn/dh is the vibration characteristic length.
3. The method for extracting vibration data features based on a self-attention mechanism of a sliding window according to claim 2, wherein the step two specifically comprises:
1) Calculating QKV matrix: for the preprocessed data, mapping without changing data dimension for three times is carried out through three groups of different full connection layers, so that data expression of the data in three different spaces is obtained and is respectively called query data Q, value data V and key data K;
2) Calculating an attention matrix: determining the size w of a window, taking each data vector as a center on the vibration characteristic length, namely on the dimension H, carrying out similarity calculation on the surrounding w vectors, and recording all similarity values to obtain an attention matrix M, wherein the dimensions are (B, H, w and H), and the calculation expression is as follows:
where j=1, 2, … …, w;
the vector at each position of the characteristic length is calculated by dot product with w vectors around, and after the attention matrix M is obtained, normalization is carried out along w dimension;
3) Calculating a final value: after the attention matrix M is obtained, according to the degree of correlation between each vector and surrounding vectors, all vectors around each vector are weighted-averaged to be used as new values of the vectors, and the calculation expression is as follows:
where j=1, 2, … …, d.
4. The method for extracting vibration data features based on a sliding window self-attention mechanism as recited in claim 3, wherein the constructing the deep artificial neural network in the third step specifically comprises:
constructing a basic module:
the basic module consists of the following three parts: layer regularization, sliding window self-attention mechanism, and one-dimensional convolution layer; after data input, obtaining attention residual data through layer regularization and sliding window self-attention calculation respectively, and obtaining attention data after adding the attention residual data with input data; the attention data is subjected to layer regularization and one-dimensional convolution layer again to obtain convolution residual data, and the convolution residual data and the attention data are added to obtain output data;
constructing a hierarchy module:
the hierarchical module consists of two parts: a dimension conversion layer and a base module; the dimension conversion layer is responsible for completing dimension embedding and downsampling operations of the original vibration signal data, and then the dimension embedding and downsampling operations are transmitted to the base module for feature calculation and extraction;
and (3) constructing an output module:
and the output module performs two-classification or multi-classification tasks according to the actual network requirements, namely, performs fault prediction and motion analysis of the equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310146293.3A CN116183229A (en) | 2023-02-22 | 2023-02-22 | Vibration data feature extraction method based on self-attention mechanism of sliding window |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310146293.3A CN116183229A (en) | 2023-02-22 | 2023-02-22 | Vibration data feature extraction method based on self-attention mechanism of sliding window |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116183229A true CN116183229A (en) | 2023-05-30 |
Family
ID=86434229
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310146293.3A Pending CN116183229A (en) | 2023-02-22 | 2023-02-22 | Vibration data feature extraction method based on self-attention mechanism of sliding window |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116183229A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116776086A (en) * | 2023-08-21 | 2023-09-19 | 太原重工股份有限公司 | Signal fault discriminating method and device based on self-attention mechanism self-encoder |
-
2023
- 2023-02-22 CN CN202310146293.3A patent/CN116183229A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116776086A (en) * | 2023-08-21 | 2023-09-19 | 太原重工股份有限公司 | Signal fault discriminating method and device based on self-attention mechanism self-encoder |
CN116776086B (en) * | 2023-08-21 | 2023-11-28 | 太原重工股份有限公司 | Signal fault discriminating method and device based on self-attention mechanism self-encoder |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112926641B (en) | Three-stage feature fusion rotating machine fault diagnosis method based on multi-mode data | |
CN111562108A (en) | Rolling bearing intelligent fault diagnosis method based on CNN and FCMC | |
CN114926746A (en) | SAR image change detection method based on multi-scale differential feature attention mechanism | |
CN113392931A (en) | Hyperspectral open set classification method based on self-supervision learning and multitask learning | |
CN113887136B (en) | Electric automobile motor bearing fault diagnosis method based on improved GAN and ResNet | |
CN111680788A (en) | Equipment fault diagnosis method based on deep learning | |
CN116183229A (en) | Vibration data feature extraction method based on self-attention mechanism of sliding window | |
CN114742211B (en) | Convolutional neural network deployment and optimization method facing microcontroller | |
CN115204368A (en) | Aircraft engine fault diagnosis method based on intelligent chip technology | |
CN115393631A (en) | Hyperspectral image classification method based on Bayesian layer graph convolution neural network | |
CN114881286A (en) | Short-time rainfall prediction method based on deep learning | |
CN116258914B (en) | Remote Sensing Image Classification Method Based on Machine Learning and Local and Global Feature Fusion | |
CN117219124A (en) | Switch cabinet voiceprint fault detection method based on deep neural network | |
CN117809164A (en) | Substation equipment fault detection method and system based on multi-mode fusion | |
CN115328661B (en) | Computing power balance execution method and chip based on voice and image characteristics | |
CN117079005A (en) | Optical cable fault monitoring method, system, device and readable storage medium | |
CN115810106A (en) | Tea tender shoot grade accurate identification method in complex environment | |
CN115880472A (en) | Intelligent diagnosis and analysis system for electric power infrared image data | |
CN116484513A (en) | Rolling bearing fault diagnosis method based on multi-level abstract time feature fusion | |
CN113705695A (en) | Power distribution network fault data identification method based on convolutional neural network | |
CN113935413A (en) | Distribution network wave recording file waveform identification method based on convolutional neural network | |
CN115374687A (en) | Numerical-shape combined intelligent diagnosis method for working conditions of oil well | |
CN117786507B (en) | Rolling bearing unknown fault detection method based on global and local feature coupling guidance | |
CN114663779B (en) | Multi-temporal hyperspectral image change detection method based on time-space-spectrum attention mechanism | |
Guan et al. | Lightweight refueling behavior recognition algorithm based on sequence diagrams |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |