CN116340750A - Fault diagnosis method and system for electromechanical equipment - Google Patents

Fault diagnosis method and system for electromechanical equipment Download PDF

Info

Publication number
CN116340750A
CN116340750A CN202310127054.3A CN202310127054A CN116340750A CN 116340750 A CN116340750 A CN 116340750A CN 202310127054 A CN202310127054 A CN 202310127054A CN 116340750 A CN116340750 A CN 116340750A
Authority
CN
China
Prior art keywords
feature
data
fault diagnosis
matrix
layer
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
Application number
CN202310127054.3A
Other languages
Chinese (zh)
Inventor
程良伦
张鳌
陈翀
王涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Nengge Knowledge Technology Co ltd
Guangdong University of Technology
Original Assignee
Guangdong Nengge Knowledge Technology Co ltd
Guangdong University of Technology
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Nengge Knowledge Technology Co ltd, Guangdong University of Technology filed Critical Guangdong Nengge Knowledge Technology Co ltd
Priority to CN202310127054.3A priority Critical patent/CN116340750A/en
Publication of CN116340750A publication Critical patent/CN116340750A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Artificial Intelligence (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Testing And Monitoring For Control Systems (AREA)

Abstract

The invention discloses a fault diagnosis method and system of electromechanical equipment, and relates to the technical field of computers. According to the fault diagnosis model, the fault related features of the electromechanical equipment are extracted through the residual error network, then the weighted bidirectional feature pyramid network is adopted to conduct multi-scale feature fusion so that the features have higher discrimination capability, the feature representation module of the circulating stacking structure based on the zooming dot product attention mechanism is adopted to conduct feature mining, time sequence information in the multi-scale features is learned under the condition that a fault sample is insufficient, and therefore accuracy and efficiency of fault diagnosis of the electromechanical equipment are improved.

Description

Fault diagnosis method and system for electromechanical equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a fault diagnosis method and system for an electromechanical device.
Background
Under the background of industrial big data nowadays, the rapid development of artificial intelligence and deep learning gradually leads the fault diagnosis to be intelligent, the fault diagnosis algorithm based on the neural network is more and more emphasized, and the method becomes a new research hotspot in the field of fault diagnosis. Deep learning techniques such as convolutional neural networks, cyclic neural networks, antagonistic neural networks and the like can automatically mine deep features of input information, input original information directly at an input end, and fault diagnosis results can be obtained at an output end. Such methods are gaining importance in the field of fault diagnosis today.
At present, fault diagnosis algorithms based on deep learning mostly adopt long-term and short-term memory to extract features through multi-layer convolution or full-connection attention recycling or circulating neural networks. There are the following problems: firstly, feature fusion is incomplete, the traditional neural network model does not perform feature fusion or only performs feature fusion from top to bottom, the information is transmitted based on one direction, and finally, common splicing operation is performed, so that sparsity of fusion features is easy to cause information loss, and fault diagnosis accuracy is reduced; second, data hunger and thirst, and the traditional deep learning algorithm requires a large amount of data to train due to the large amount of parameters. The faults of the electromechanical equipment are not generated frequently, so that fault data are extremely scarce, the model training effect is poor, and the fault diagnosis effect of the electromechanical equipment is further affected.
Disclosure of Invention
The present invention aims to solve at least one of the technical problems existing in the prior art. Therefore, the invention provides a fault diagnosis method and system for electromechanical equipment, which can improve the accuracy of fault diagnosis of the electromechanical equipment.
In one aspect, an embodiment of the present invention provides a fault diagnosis method for an electromechanical device, including the following steps:
acquiring electromechanical equipment data;
inputting the electromechanical equipment data into a fault diagnosis model to obtain a diagnosis result of the electromechanical equipment;
the fault diagnosis model comprises a residual error network, a weighted bidirectional feature pyramid network and a feature representation module, wherein the feature representation module adopts a cyclic stack structure based on a zoom dot product attention mechanism, and the construction process of the fault diagnosis model comprises the following steps:
acquiring a training data set;
inputting the training data set into the residual error network for feature extraction to obtain multi-layer first feature data;
performing feature fusion on multiple layers of the first feature data based on a weighted bidirectional feature pyramid network to obtain multiple layers of second feature data;
performing feature mining on multiple layers of the second feature data based on the feature representation module to obtain a prediction result of the training data set;
and carrying out back propagation on the basis of the prediction result to update model parameters, and obtaining a trained fault diagnosis model.
According to some embodiments of the invention, the construction process of the fault diagnosis model further includes:
acquiring historical data of electromechanical equipment, wherein the historical data comprises normal data and abnormal data of different fault types;
performing short-time windowing Fourier transform on the historical data to obtain a data sample;
dividing the data samples into a training data set, a verification data set and a test data set, wherein the training data set is used for training the fault diagnosis model, the test data set is used for detecting the generalization capability of the fault diagnosis model after training, and the verification data set is used for detecting whether the fault diagnosis model after training is overfitted or not.
According to some embodiments of the invention, the performing short-time windowed fourier transform on the historical data to obtain a data sample includes the following steps:
dividing the historical data on the whole time segment to obtain historical data of a plurality of short-time segments;
and carrying out Fourier transform on the historical data of the short-time fragments to obtain a data sample.
According to some embodiments of the invention, the short-time windowed fourier transform is formulated as:
Figure BDA0004082417990000021
where g (u-t) is a window function, f (u) is input history data, and f (w, t) is a two-dimensional signal comprising two dimensions, frequency and time.
According to some embodiments of the invention, the residual network employs ResNet, denoted as:
F(x)=H(x)+x;
wherein, H (x) is the feature extracted by the current layer, x is the feature extracted by the previous layer, namely the input feature of the current layer, and F (x) is the output feature of the current layer.
According to some embodiments of the invention, the weighted bi-directional feature pyramid network uses BiFPN, and the BiFPN is repeatedly used to perform feature fusion of a top-down path and a bottom-up path on the multiple layers of the first feature data.
According to some embodiments of the invention, biFPN is expressed as:
Figure BDA0004082417990000022
Figure BDA0004082417990000023
wherein,,
Figure BDA0004082417990000024
is the input characteristic of the x layer, namely the first characteristic data F output by the x layer of the residual network x (x),/>
Figure BDA0004082417990000025
Is an intermediate feature of the x-th layer on the top-down path, and +.>
Figure BDA0004082417990000031
Is the output feature of the x-th layer on the bottom-up path.
According to some embodiments of the present invention, the feature mining of the plurality of layers of the second feature data based on the feature representation module, to obtain the prediction result of the training data set, includes the following steps:
carrying out convolution marking on the second characteristic data of each layer to obtain a mark embedding matrix;
inputting the mark embedded matrix into the transducer encoder to obtain an encoder output matrix;
determining an importance weight value of each mark embedding matrix according to the encoder output matrix;
and outputting the importance weight value of each mark embedded matrix through the full-connection layer and then outputting by a softmax function to obtain a prediction result.
According to some embodiments of the invention, inputting the tag-embedded matrix into the transducer encoder to obtain an encoder output matrix comprises the steps of:
performing linear transformation on the input mark embedding matrix to obtain a query matrix, a key matrix and a value matrix;
an encoder output matrix is determined from the query matrix, the key matrix, and the value matrix based on a multi-headed attention mechanism.
On the other hand, the embodiment of the invention also provides a fault diagnosis system of the electromechanical equipment, which comprises the following components:
the first module is used for acquiring electromechanical equipment data;
the second module is used for inputting the data of the electromechanical equipment into a fault diagnosis model to obtain a diagnosis result of the electromechanical equipment;
the fault diagnosis model comprises a residual error network, a weighted bidirectional feature pyramid network and a feature representation module, wherein the feature representation module adopts a cyclic stack structure based on a zoom dot product attention mechanism, and the construction process of the fault diagnosis model comprises the following steps:
acquiring a training data set;
inputting the training data set into the residual error network for feature extraction to obtain multi-layer first feature data;
performing feature fusion on multiple layers of the first feature data based on a weighted bidirectional feature pyramid network to obtain multiple layers of second feature data;
performing feature mining on multiple layers of the second feature data based on the feature representation module to obtain a prediction result of the training data set;
and carrying out back propagation on the basis of the prediction result to update model parameters, and obtaining a trained fault diagnosis model.
The technical scheme of the invention has at least one of the following advantages or beneficial effects: according to the fault diagnosis model, the fault related features of the electromechanical equipment are extracted through the residual error network, then the weighted bidirectional feature pyramid network is adopted to conduct multi-scale feature fusion so that the features have higher discrimination capability, the feature representation module of the circulating stacking structure based on the zooming dot product attention mechanism is adopted to conduct feature mining, time sequence information in the multi-scale features is learned under the condition that a fault sample is insufficient, and therefore accuracy and efficiency of fault diagnosis of the electromechanical equipment are improved.
Drawings
FIG. 1 is a flow chart of a fault diagnosis model construction in a fault diagnosis method of an electromechanical device according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a fault diagnosis model processing procedure according to an embodiment of the present invention.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are illustrative only and are not to be construed as limiting the invention.
In the description of the present invention, the description of first, second, etc. is for the purpose of distinguishing between technical features only, and should not be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated or implicitly indicating the precedence of the technical features indicated.
In the related art, liu et al propose a fault diagnosis method based on WOA-GRNN aiming at the problem of low fault diagnosis precision of a complex system hydraulic pump in practical application. According to the method, a Generalized Regression Neural Network (GRNN) is adopted, trend characteristics of corresponding signal monitoring of the hydraulic pump are fully utilized, each signal sample is effectively represented, relevance among signals is fully excavated, and a Whale Optimization Algorithm (WOA) is utilized to optimize GRNN parameters, so that fault types of the hydraulic pump are effectively and accurately predicted. The main working flow of the method is as follows: analyzing, classifying and preprocessing monitoring parameter data of a certain hydraulic pump to construct monitoring parameter data of the hydraulic pump; a Generalized Regression Neural Network (GRNN) fault diagnosis model is designed by utilizing hydraulic pump health data and a fault sample data set. On the basis, optimizing GRNN parameters by using a Whale Optimization Algorithm (WOA), establishing an optimal GRNN fault diagnosis model WOA-GRNN, and finally testing the established WOA-GRNN fault diagnosis model by using a test sample data set. The method has the advantages of good local approximation, global optimality, high calculation speed and the like, but has the defects that the resolution of the low-level features is higher, detail information is contained, but the passing convolution is fewer, the semantics of the low-level features are lower, the noise is more, the high-level features have stronger semantic information, but the resolution is very low, the perception capability of the details is poor, and the information is lost.
Kang Tao et al propose a convolutional neural network adaptive noise-resistant Model (MACNN) that incorporates a multi-attention mechanism for the problem that the convolutional neural network has insufficient ability to learn key fault features, thereby affecting the accuracy of bearing fault diagnosis. The model utilizes a channel and time composite attention mechanism to optimize a learning mechanism, and the formed multi-attention mechanism module suppresses the influence of noise, irrelevant signal components and other interference information from different angles and adaptively enhances the response of fault characteristics. The main working flow of the method is as follows: analyzing, classifying and preprocessing the vibration signals of the rolling bearing to construct a rolling bearing monitoring parameter data set; training a multi-scale feature extractor layer by layer, calculating attention weight vectors c' and t, adjusting feature extraction sub-network parameters, associating features among different scales by using a channel attention mechanism, and delivering the features after information fusion to a classifier for rolling bearing fault diagnosis. The method utilizes a channel and time composite attention mechanism to restrain the influence of noise, irrelevant signal components and other interference information from different angles, adaptively enhances the response of fault characteristics, and has good noise immunity. However, there are the following disadvantages: the increase in computational effort makes model training more time necessary due to the introduction of multi-attentive mechanisms. In addition, the method effectively models a large-scale deep learning network through a large amount of sensor data, and the model has poor effect under the condition of small data quantity.
Based on this, the embodiment of the invention provides a fault diagnosis method of electromechanical equipment, including but not limited to step S110 and step S120.
Step S110, acquiring electromechanical equipment data;
and step S120, inputting the data of the electromechanical equipment into a fault diagnosis model to obtain a diagnosis result of the electromechanical equipment.
In some embodiments, the electromechanical device data may be operational parameters of the electromechanical device, such as voltage, current, temperature, etc. data of the electromechanical device.
In some embodiments, the fault diagnosis model includes a residual network, a weighted bi-directional feature pyramid network, and a feature representation module, the feature representation module employs a cyclic stack structure based on a scaled dot product attention mechanism, the residual network may be ResNet, the weighted bi-directional feature pyramid network may be BiFPN, the feature representation module is a lightweight Transformers module, the lightweight Transformers module includes a convolution labeling portion and a sequence pooling policy portion, the convolution labeling portion includes convolution, pooling, and sizing, the sequence pooling policy portion includes a Transformers encoder, sequence pooling, and a linear layer, and referring to fig. 2, the fault diagnosis process of the fault diagnosis model is: the sensor monitors electromechanical equipment, acquires electromechanical equipment data, performs short-time windowing Fourier transform on the electromechanical equipment data, performs feature extraction by ResNet, performs feature fusion by BiFPN, performs convolution, pooling, size adjustment and other operations in a lightweight trans-former module, inputs a position mark into a trans-former encoder, obtains the output of the lightweight trans-former module through sequential pooling and a linear layer by the output of the trans-former encoder, and obtains the prediction result of fault classification through a Softmax function after the output of the lightweight trans-former module passes through a fully-connected layer.
In other embodiments, the cyclic stack structure of the scaling dot product attention mechanism is optimized by maximum pooling, and the pre-training model parameters are migrated to the target domain and subjected to model fine tuning by adopting a pre-training-fine tuning migration learning method, so that the overfitting phenomenon caused by insufficient data can be avoided.
Referring to fig. 1, the construction process of the fault diagnosis model includes, but is not limited to, the following steps:
step S210, acquiring a training data set;
step S220, inputting the training data set into a residual error network for feature extraction to obtain multi-layer first feature data;
step S230, carrying out feature fusion on the multi-layer first feature data based on the weighted bidirectional feature pyramid network to obtain multi-layer second feature data;
step S240, feature mining is carried out on the multi-layer second feature data based on the feature representation module, and a prediction result of the training data set is obtained;
and step S250, back propagation updating model parameters are carried out based on the prediction result, and a trained fault diagnosis model is obtained.
Further, before step S210, the construction process of the fault diagnosis model further includes the following steps:
step S310, historical data of the electromechanical equipment is obtained, wherein the historical data comprises normal data and abnormal data of different fault types;
step S320, performing short-time windowing Fourier transform on the historical data to obtain a data sample;
step S330, dividing the data sample into a training data set, a verification data set and a test data set, wherein the training data set is used for training the fault diagnosis model, the test data set is used for detecting the generalization capability of the fault diagnosis model after training, and the verification data set is used for detecting whether the fault diagnosis model after training is over-fitted or not.
Specifically, normal data and abnormal data of different fault types are collected, and normalized, so that partial data is prevented from affecting the global effect. And carrying out short-time windowing Fourier transform on the data, and dividing the data into a training data set, a verification data set and a test data set according to a certain proportion.
And taking ResNet as a backbone network of the model, and extracting the characteristics of the input characteristics. And (3) taking the BiFPN as a characteristic network, and repeatedly using the BiFPN to perform feature fusion from top to bottom and from bottom to top on the first characteristic data { P3, P4, P5 and P6} of different layers coming out of the backbone network. And processing fusion characteristics extracted by the model through a lightweight Transformers module to obtain a prediction result of training data, and back-propagating and updating parameters in the ResNet, the BiFPN and the lightweight Transformers module until all data in the training data set participate in training to obtain a fault diagnosis model.
And importing the test data set into the trained fault diagnosis model to check the prediction effect, and detecting whether the fault diagnosis model has the fitting phenomenon or not by using the verification data set.
According to some embodiments of the present invention, the standard fourier transform transforms the signal from the time domain to the frequency domain, so as to mine out the fault features hidden in the time domain, but since the collected time period is long, the content of different frequencies is easy to be aliased, so that the features cannot be distinguished, and therefore, the standard fourier transform has a great limitation in practical application. The embodiment of the invention adopts short-time windowing Fourier transform, a plurality of small fragments are intercepted from the whole time fragment through a window function, and then Fourier transform is carried out on each small fragment, so that the change of frequency along with time can be obtained.
According to the embodiment of the invention, the Gaussian window is used as a window function, and compared with a common rectangular window, the Gaussian window is used as a smooth function, so that oscillation of a frequency domain can be avoided. The whole short-time windowed Fourier transform formula is:
Figure BDA0004082417990000061
where g (u-t) is a window function, f (u) is input history data, and f (w, t) is a two-dimensional signal comprising two dimensions, frequency and time.
According to some embodiments of the invention, the residual network employs ResNet, and in the neural network model, the depth of the network is critical to the performance of the model, and when the number of network layers is increased, the network can extract implicit features related to faults in the sensor data of the electromechanical device. Conventional deep networks often suffer from degradation problems, i.e., saturation or even degradation of network accuracy occurs as network depth increases. And the situation that important information is lost can appear in each convolution operation, when a deep network is built by stacking new layers upwards, the phenomenon that the characteristics cannot be extracted by a high layer easily occurs, even the degradation phenomenon occurs, and the residual block in ResNet can process the information processed in the previous step and the information needed in the previous step together, so that the effect of loss reduction is achieved, and the extracted characteristics have more valuable information.
The common neural network model is not connected in a cross-layer manner, when the input characteristic is x, the input characteristic is extracted, the output is H (x), and the input characteristic is transmitted to the next layer for characteristic extraction. And ResNet introduces cross-layer connection, the features after the extraction of the current layer are cross-layer connected with the extracted features of the previous layer, namely the input features of the previous layer, and the features are fused and then input into the next layer for feature extraction, wherein ResNet is expressed as follows:
F(x)=H(x)+x;
wherein, H (x) is the feature extracted by the current layer, x is the feature extracted by the previous layer, namely the input feature of the current layer, and F (x) is the output feature of the current layer.
According to some embodiments of the present invention, the weighted bi-directional feature pyramid network uses bippn, and repeatedly uses bippn to perform feature fusion of a top-down path and a bottom-up path on the multi-layer first feature data obtained by res net.
Specifically, the traditional feature fusion model only has feature fusion from top to bottom, is based on information flow transmission in one direction, and finally performs splicing operation, so that sparsity of fusion features is easily caused, information associated with faults is lost, and accurate fault diagnosis cannot be realized. The embodiment of the invention adopts BiFPN and has two characteristics: the bi-directional cross-scale connection is fused with the weighting features. With continued reference to the bipin portion of fig. 2, first, the node in the res net having only one input for the uppermost layer P6 (F6 (x)) and the lowermost layer P3 (F3 (x)) is removed because the node contains only one input, no feature fusion is performed, and the contribution to the feature network is minimal. Secondly, aiming at the same level, a connection from initial input to output is added, and the characteristic output of each layer is fused with the output characteristic of the upper layer and the output characteristic of the lower layer. When the characteristics with different resolutions are fused, the contribution degree of the characteristics with different resolutions is different, so that an additional weight is added to each input when the characteristics are fused, the network learns the importance of each input characteristic, the value range of each weight is limited by adopting weight normalization, and the weighted input characteristics are as follows:
Figure BDA0004082417990000071
wherein by at each w i Then add a relu to ensure w i >=0, epsilon=0.0001 is a small value to avoid numerical instability.
Finally, the BiFPN structure is repeated for a plurality of times to realize higher-level feature fusion, and the formula is as follows:
Figure BDA0004082417990000072
Figure BDA0004082417990000081
wherein,,
Figure BDA0004082417990000082
is an input feature of the x-th layer, i.e. F x (x),/>
Figure BDA0004082417990000083
Is an intermediate feature of the x-th layer on the top-down path,
Figure BDA0004082417990000084
is the output feature of the x-th layer on the bottom-up path. Further, depth separable convolutions may be used for feature fusion for optimal efficiency, and BN and activation functions are added after each convolution.
According to some embodiments of the present invention, in step S240, the step of performing feature mining on the multi-layer second feature data based on the feature representation module to obtain a prediction result of the training data set includes the following steps:
step S410, carrying out convolution marking on the second characteristic data of each layer to obtain a mark embedding matrix;
step S420, inputting the mark embedded matrix into a transducer encoder to obtain an encoder output matrix;
step S430, determining an importance weight value of each mark embedding matrix according to the encoder output matrix;
step S440, the importance weight value of each mark embedded matrix is output by a softmax function after passing through the full connection layer, and a prediction result is obtained.
In step S420, the step of inputting the tag embedding matrix to the transducer encoder to obtain an encoder output matrix includes the steps of:
step S421, performing linear transformation on the input mark embedding matrix to obtain a query matrix, a key matrix and a value matrix;
step S422, based on the multi-headed attention mechanism, determines an encoder output matrix from the query matrix, the key matrix, and the value matrix.
In this embodiment, the lightweight Transformers module performs dimension reduction on the features through convolution and inputs the features to the Transformers encoder, so as to achieve compression of the second feature data and effective extraction of the long time sequence. Specifically, the second characteristic data obtained from each layer in the BiFPN
Figure BDA0004082417990000085
As input to the lightweight Transformers module, it is expressed as: x epsilon R H×W×C And generating rich token information, namely a tag embedding matrix by using a convolution marker through operations such as convolution, activation, pooling and the like, wherein the formula is as follows:
x 0 =MaxPool(ReLU(Conv2d(x)));
in the Transformers encoder, three parameter matrices W are defined Q 、W K 、W V For x 0 Performing linear transformation to obtain corresponding query vector, key vector and value vector, and adding x 0 And splicing the corresponding vectors obtained by transformation to obtain a query matrix Q, a key matrix K and a value matrix V, thereby obtaining the attention weight of each mark embedded matrix. Using a scale factor
Figure BDA0004082417990000086
Scaling, multiplying the value matrix V after the softmax function, and obtaining the attention mechanism function:
Figure BDA0004082417990000087
wherein Attention represents the Attention mechanism function and Softmax is the normalized exponential function.
Sequence information is mined from multiple dimensions by adopting a multi-head attention mechanism, and the sequence information is specifically as follows:
MultiHead(Q,K,V)=Concat(head 1 ,...,head h );
Figure BDA0004082417990000088
Figure BDA0004082417990000091
wherein MultiHead is a multi-head attention mechanism, concat represents splicing, head i Represents the i-th head, h is the number of attention mechanism heads, O is the input matrix, d V For the dimension of the value matrix, d m Is the vector length.
This example introduces a novel sequence pooling strategy to replace the traditional class]The method comprises the steps of marking, reserving relevant information of different parts of input features contained in an output sequence, reducing the number of forwarding tokens, and mapping the output sequence into T:
Figure BDA0004082417990000092
encoder output matrix X L The following are provided:
X L =f(x)∈R b×n×d
wherein X is L Is the output of the L-layer encoder f (), b is the batch size, n is the sequence length, and d is the total embedding dimension.
After obtaining the encoder output matrix, X is calculated L Into the linear layer g (x L )∈R d×1 And output by softmax function:
X′ L =softmax(g(x L ) T )∈R b×1×n
and further obtaining importance weight z generated by each input token, wherein the formula is as follows:
z=X′ L X L =softmax(g(x L ) T )×X L ∈R b×1×d
finally, the result z is output by the softmax function after passing through the full junction layer.
The embodiment of the invention has the following beneficial effects:
1. realizing efficient feature fusion: and fusing the features of different scales through bi-FPN network bidirectional cross-scale connection and a weighted feature fusion strategy to obtain the features with more discrimination capability.
2. The problem that deep learning fault diagnosis performance is limited under a small sample is solved, and the introduced lightweight transducer module has the characteristics of low parameter and strong feature learning capability, so that time sequence information in multi-scale features can be learned under the condition that the fault sample is insufficient, and a good fault diagnosis effect is realized.
The embodiment of the invention also provides a fault diagnosis system of the electromechanical equipment, which comprises the following steps:
the first module is used for acquiring electromechanical equipment data;
the second module is used for inputting the data of the electromechanical equipment into the fault diagnosis model to obtain the diagnosis result of the electromechanical equipment;
the fault diagnosis model comprises a residual error network, a weighted bidirectional feature pyramid network and a feature representation module, wherein the feature representation module adopts a cyclic stack structure based on a scaled dot product attention mechanism, and the construction process of the fault diagnosis model comprises the following steps:
acquiring a training data set;
inputting the training data set into a residual error network for feature extraction to obtain multi-layer first feature data;
performing feature fusion on the multi-layer first feature data based on the weighted bidirectional feature pyramid network to obtain multi-layer second feature data;
performing feature mining on the multi-layer second feature data based on the feature representation module to obtain a prediction result of the training data set;
and carrying out back propagation on the basis of the prediction result to update model parameters, and obtaining the trained fault diagnosis model.
It can be understood that the foregoing embodiments of the fault diagnosis method for an electromechanical device are applicable to the embodiment of the system, and the functions specifically implemented by the embodiment of the system are the same as those of the embodiment of the fault diagnosis method for an electromechanical device, and the beneficial effects achieved by the embodiment of the fault diagnosis method for an electromechanical device are the same as those achieved by the embodiment of the fault diagnosis method for an electromechanical device.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: many changes, modifications, substitutions and variations may be made to the embodiments without departing from the spirit and principles of the invention, the scope of which is defined by the claims and their equivalents.
While the preferred embodiment of the present invention has been described in detail, the present invention is not limited to the embodiments described above, and those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention, and these equivalent modifications or substitutions are included in the scope of the present invention as defined in the appended claims.

Claims (10)

1. A fault diagnosis method for an electromechanical device, comprising the steps of:
acquiring electromechanical equipment data;
inputting the electromechanical equipment data into a fault diagnosis model to obtain a diagnosis result of the electromechanical equipment;
the fault diagnosis model comprises a residual error network, a weighted bidirectional feature pyramid network and a feature representation module, wherein the feature representation module adopts a cyclic stack structure based on a zoom dot product attention mechanism, and the construction process of the fault diagnosis model comprises the following steps:
acquiring a training data set;
inputting the training data set into the residual error network for feature extraction to obtain multi-layer first feature data;
performing feature fusion on multiple layers of the first feature data based on a weighted bidirectional feature pyramid network to obtain multiple layers of second feature data;
performing feature mining on multiple layers of the second feature data based on the feature representation module to obtain a prediction result of the training data set;
and carrying out back propagation on the basis of the prediction result to update model parameters, and obtaining a trained fault diagnosis model.
2. The method for diagnosing a fault in an electromechanical device according to claim 1, wherein the process of constructing the fault diagnosis model further includes:
acquiring historical data of electromechanical equipment, wherein the historical data comprises normal data and abnormal data of different fault types;
performing short-time windowing Fourier transform on the historical data to obtain a data sample;
dividing the data samples into a training data set, a verification data set and a test data set, wherein the training data set is used for training the fault diagnosis model, the test data set is used for detecting the generalization capability of the fault diagnosis model after training, and the verification data set is used for detecting whether the fault diagnosis model after training is overfitted or not.
3. The method for diagnosing a fault in an electromechanical device according to claim 2, wherein the performing short-time windowed fourier transform on the history data to obtain data samples includes the steps of:
dividing the historical data on the whole time segment to obtain historical data of a plurality of short-time segments;
and carrying out Fourier transform on the historical data of the short-time fragments to obtain a data sample.
4. The method for diagnosing a fault in an electromechanical device according to claim 2, wherein the equation of the short-time windowed fourier transform is:
Figure FDA0004082417980000011
where g (u-t) is a window function, f (u) is input history data, and f (w, t) is a two-dimensional signal comprising two dimensions, frequency and time.
5. The method of claim 1, wherein the residual network employs a res net, denoted as:
F(x)=H(x)+x;
wherein, H (x) is the feature extracted by the current layer, x is the feature extracted by the previous layer, namely the input feature of the current layer, and F (x) is the output feature of the current layer.
6. The method for diagnosing faults of an electromechanical device according to claim 1, wherein the weighted bi-directional feature pyramid network adopts BiFPN, and feature fusion of a top-down path and a bottom-up path is performed on multiple layers of the first feature data by repeatedly using BiFPN.
7. The method of fault diagnosis of an electromechanical device according to claim 6, characterized in that BiFPN is expressed as:
Figure FDA0004082417980000021
Figure FDA0004082417980000022
wherein,,
Figure FDA0004082417980000023
is the input characteristic of the x layer, namely the first characteristic data F output by the x layer of the residual network x (x),/>
Figure FDA0004082417980000024
Is an intermediate feature of the x-th layer on the top-down path, and +.>
Figure FDA0004082417980000025
Is the output feature of the x-th layer on the bottom-up path.
8. The method for diagnosing a fault in an electromechanical device according to claim 1, wherein the feature mining of the plurality of layers of the second feature data based on the feature representation module, obtaining the prediction result of the training data set, comprises the steps of:
carrying out convolution marking on the second characteristic data of each layer to obtain a mark embedding matrix;
inputting the mark embedded matrix into a transducer encoder to obtain an encoder output matrix;
determining an importance weight value of each mark embedding matrix according to the encoder output matrix;
and outputting the importance weight value of each mark embedded matrix through the full-connection layer and then outputting by a softmax function to obtain a prediction result.
9. The method of claim 8, wherein inputting the marker embedded matrix into the transducer encoder to obtain an encoder output matrix comprises the steps of:
performing linear transformation on the input mark embedding matrix to obtain a query matrix, a key matrix and a value matrix;
an encoder output matrix is determined from the query matrix, the key matrix, and the value matrix based on a multi-headed attention mechanism.
10. A fault diagnosis system for an electromechanical device, comprising:
the first module is used for acquiring electromechanical equipment data;
the second module is used for inputting the data of the electromechanical equipment into a fault diagnosis model to obtain a diagnosis result of the electromechanical equipment;
the fault diagnosis model comprises a residual error network, a weighted bidirectional feature pyramid network and a feature representation module, wherein the feature representation module adopts a cyclic stack structure based on a zoom dot product attention mechanism, and the construction process of the fault diagnosis model comprises the following steps:
acquiring a training data set;
inputting the training data set into the residual error network for feature extraction to obtain multi-layer first feature data;
performing feature fusion on multiple layers of the first feature data based on a weighted bidirectional feature pyramid network to obtain multiple layers of second feature data;
performing feature mining on multiple layers of the second feature data based on the feature representation module to obtain a prediction result of the training data set;
and carrying out back propagation on the basis of the prediction result to update model parameters, and obtaining a trained fault diagnosis model.
CN202310127054.3A 2023-02-15 2023-02-15 Fault diagnosis method and system for electromechanical equipment Pending CN116340750A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310127054.3A CN116340750A (en) 2023-02-15 2023-02-15 Fault diagnosis method and system for electromechanical equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310127054.3A CN116340750A (en) 2023-02-15 2023-02-15 Fault diagnosis method and system for electromechanical equipment

Publications (1)

Publication Number Publication Date
CN116340750A true CN116340750A (en) 2023-06-27

Family

ID=86883041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310127054.3A Pending CN116340750A (en) 2023-02-15 2023-02-15 Fault diagnosis method and system for electromechanical equipment

Country Status (1)

Country Link
CN (1) CN116340750A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116930741A (en) * 2023-07-19 2023-10-24 中国电子产品可靠性与环境试验研究所((工业和信息化部电子第五研究所)(中国赛宝实验室)) Switching device fault degree diagnosis method and device and computer equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116930741A (en) * 2023-07-19 2023-10-24 中国电子产品可靠性与环境试验研究所((工业和信息化部电子第五研究所)(中国赛宝实验室)) Switching device fault degree diagnosis method and device and computer equipment

Similar Documents

Publication Publication Date Title
CN110516718B (en) Zero sample learning method based on deep embedding space
CN109639739A (en) A kind of anomalous traffic detection method based on autocoder network
US11586838B2 (en) End-to-end fuzzy entity matching
CN113837000A (en) Small sample fault diagnosis method based on task sequencing meta-learning
CN112036167A (en) Data processing method, device, server and storage medium
CN110717554A (en) Image recognition method, electronic device, and storage medium
CN111275104A (en) Model training method and device, server and storage medium
CN111597340A (en) Text classification method and device and readable storage medium
CN110705646B (en) Mobile equipment streaming data identification method based on model dynamic update
CN111239137B (en) Grain quality detection method based on transfer learning and adaptive deep convolution neural network
CN111898704B (en) Method and device for clustering content samples
CN114842343A (en) ViT-based aerial image identification method
CN114993669A (en) Multi-sensor information fusion transmission system fault diagnosis method and system
CN116340750A (en) Fault diagnosis method and system for electromechanical equipment
CN116011507A (en) Rare fault diagnosis method for fusion element learning and graph neural network
CN112270334B (en) Few-sample image classification method and system based on abnormal point exposure
CN112766218A (en) Cross-domain pedestrian re-identification method and device based on asymmetric joint teaching network
CN112734037A (en) Memory-guidance-based weakly supervised learning method, computer device and storage medium
CN117197622A (en) Target detection label optimization method based on image-text multi-mode
CN117195031A (en) Electromagnetic radiation source individual identification method based on neural network and knowledge-graph dual-channel system
CN114357221A (en) Self-supervision active learning method based on image classification
CN113065520B (en) Multi-mode data-oriented remote sensing image classification method
KR101064256B1 (en) Apparatus and Method for Selecting Optimal Database by Using The Maximal Concept Strength Recognition Techniques
CN117033956A (en) Data processing method, system, electronic equipment and medium based on data driving
CN116955616A (en) Text classification method and electronic equipment

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