Device fault diagnosis model training method based on lightweight meta-learning
By using a lightweight meta-learning approach, a fault diagnosis model for electromechanical equipment is trained using deep separable convolutional layers and lightweight convolutional transform networks. This solves the problem of insufficient sample size in the diagnosis of complex faults in electromechanical equipment and achieves a significant improvement in diagnostic performance under conditions of limited samples.
Patent Information
- Application Number
- CN202411223894.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-03
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-09-03
AI Technical Summary
Existing technologies suffer from insufficient sample size in the diagnosis of complex faults in electromechanical equipment, leading to a decline in diagnostic performance, especially when the sample quality is poor due to a small sample size.
A lightweight meta-learning-based approach is adopted. By acquiring the electrical signal sets of single and compound faults of electromechanical equipment, the data is converted into time-frequency atlases. The meta-stochastic gradient descent algorithm is used to train the fault diagnosis model of the electromechanical equipment. The model is trained and fine-tuned by combining deep separable convolutional layers and lightweight convolutional transform networks, thereby realizing the knowledge transfer from single faults to compound faults.
With fewer composite fault samples, the performance of equipment fault diagnosis is improved, the problem of scarce composite fault samples is reduced, and efficient diagnostic results are achieved.
Smart Images

Figure CN119337225B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of equipment fault detection, and in particular to a training method, diagnostic method, system, device and medium for equipment fault diagnosis models based on lightweight meta-learning. Background Technology
[0002] To address the problem of insufficient sample size in the diagnosis of complex faults in electromechanical equipment, researchers have focused on few-shot learning techniques. This research aims to solve the problems of scarce training data and unclear features. In traditional supervised learning, models typically require a large amount of labeled data to effectively learn the task. However, in practical applications, obtaining a large amount of labeled data can be expensive and time-consuming, or simply impractical for some tasks. Therefore, few-shot learning aims to enable models to learn and generalize to new, unseen samples with very limited labeled data.
[0003] Common few-shot learning methods based on deep learning include those based on generative adversarial networks (GANs). GANs require a certain number of composite fault samples to achieve equilibrium. When the sample size is too small, the quality of the generated samples is poor, and the diagnostic performance deteriorates. Summary of the Invention
[0004] To address the aforementioned issues, the present invention aims to provide a lightweight meta-learning-based method, diagnostic method, system, device, and medium for training equipment fault diagnosis models, which can improve diagnostic performance with fewer complex fault samples.
[0005] On the one hand, the present invention provides a method for training a device fault diagnosis model based on lightweight meta-learning, comprising the following steps:
[0006] Acquire sample single-fault electrical signal sets and sample composite fault electrical signal sets of electromechanical equipment;
[0007] The sample single-fault electrical signal set is converted into a sample single-fault time-frequency graph set, and the sample composite fault electrical signal set is converted into a sample composite fault time-frequency graph set.
[0008] The untrained electromechanical equipment fault diagnosis model is trained using the sample single-fault time-frequency image set and the meta-stochastic gradient descent algorithm to obtain a primary electromechanical equipment fault diagnosis model; the electromechanical equipment fault diagnosis model includes a deep separable convolutional layer and a lightweight convolutional transform network;
[0009] The primary electromechanical equipment fault diagnosis model is fine-tuned using the sample composite fault time-frequency map set and the meta-stochastic gradient descent algorithm to obtain the trained electromechanical equipment fault diagnosis model.
[0010] Optionally, the step of using the sample single-fault time-frequency image set and the meta-stochastic gradient descent algorithm to train the untrained electromechanical equipment fault diagnosis model to obtain a preliminary electromechanical equipment fault diagnosis model specifically includes:
[0011] The sample single-fault time-frequency image set is divided into a support set and a query set, and several tasks are constructed. For each task, the sample single-fault time-frequency image in the support set is input into the untrained electromechanical equipment fault diagnosis model to obtain the predicted fault on the support set.
[0012] A first loss function is constructed based on the predicted faults and actual faults on the support set, and the first loss function is processed using the metastochastic gradient descent algorithm to update the parameters of the untrained electromechanical equipment fault diagnosis model.
[0013] Input the sample single-fault time-frequency graph of the query set into the electromechanical equipment fault diagnosis model after updating the parameters to obtain the predicted fault on the query set;
[0014] A second loss function is constructed based on the predicted faults and actual faults on the query set, and the second loss function is processed using the metastochastic gradient descent algorithm to update the parameters of the electromechanical equipment fault diagnosis model, thereby obtaining the primary electromechanical equipment fault diagnosis model.
[0015] Optionally, the step of inputting the time-frequency map of the single fault sample in the support set into the untrained electromechanical equipment fault diagnosis model to obtain the predicted fault on the support set specifically includes:
[0016] The sample single-fault time-frequency map is input into the deep separation convolutional layer to perform the first feature extraction to obtain the first preliminary feature, and the first preliminary feature is restored to the second preliminary feature.
[0017] The second preliminary feature is input into the lightweight convolutional transform network to extract the second feature and obtain the predicted fault on the support set.
[0018] Optionally, the depthwise separation convolutional layer includes a depthwise convolutional layer and a pointwise convolutional layer; the sample single-fault time-frequency map is input into the depthwise separation convolutional layer to perform first feature extraction and obtain first preliminary features, specifically including:
[0019] The sample single-fault time-frequency map is input into the deep convolutional layer, and a deep convolution operation is performed to obtain the output of the deep convolutional layer;
[0020] The residual between the time-frequency map of the single fault sample and the output of the deep convolutional layer is calculated, and the residual is input into the pointwise convolutional layer to perform pointwise convolution operation to obtain the first preliminary feature.
[0021] Optionally, the lightweight convolutional transform network includes an overlapping input module, a linear space dimensionality reduction attention module, and an output module; the step of inputting the second preliminary feature into the lightweight convolutional transform network, performing second feature extraction, and obtaining the predicted fault on the support set specifically includes:
[0022] The second preliminary feature is input into the overlapping input module for third feature extraction to obtain the fused feature.
[0023] The fused features are input into the linear space dimensionality reduction attention module for fourth feature extraction to obtain pooled features.
[0024] The pooled features are input into the output module for fully connected classification to obtain the predicted faults on the support set.
[0025] Optionally, the overlapping input module includes an overlapping patch embedding layer, a layer normalization layer, and a positional encoding layer; the step of inputting the second preliminary feature into the overlapping input module and extracting the third feature to obtain the fused feature specifically includes:
[0026] The second preliminary feature is input into the overlapping patch embedding layer to obtain the patch feature;
[0027] The patch features are input into the normalization layer to obtain normalized features;
[0028] The normalized features are input into the location encoding layer to obtain the fused features.
[0029] On the other hand, the present invention provides a method for diagnosing electromechanical equipment faults based on lightweight meta-learning, comprising the following steps:
[0030] Acquire the feedback electrical signal from the electromechanical equipment and convert the feedback electrical signal into a time-frequency diagram for prediction;
[0031] The time-frequency graph used for prediction is input into the trained electromechanical equipment fault diagnosis model to obtain the prediction result; the trained electromechanical equipment fault diagnosis model is obtained by training the training method described above.
[0032] The prediction results are post-processed to obtain composite fault diagnosis results; the post-processing includes denoising and / or regularization.
[0033] On the other hand, the present invention provides a fault diagnosis device for electromechanical equipment based on lightweight meta-learning, comprising:
[0034] At least one processor;
[0035] At least one memory for storing at least one program;
[0036] When the at least one program is executed by the at least one processor, the at least one processor implements the training method or diagnostic method as fully described.
[0037] On the other hand, the present invention provides a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the training method or diagnostic method as described above.
[0038] On the other hand, the present invention provides a fault diagnosis system for electromechanical equipment based on lightweight meta-learning, including an electrical signal acquisition device and a computer device connected to the electrical signal acquisition device; wherein,
[0039] The electrical signal acquisition device is used to acquire a sample single fault electrical signal set, a sample composite fault electrical signal set, or a feedback electrical signal, and to upload the sample single fault electrical signal set, the sample composite electrical signal set, or the feedback electrical signal to the computer device.
[0040] The computer device includes:
[0041] At least one processor;
[0042] At least one memory for storing at least one program;
[0043] When the at least one program is executed by the at least one processor, the at least one processor implements the training method or diagnostic method as described above.
[0044] The implementation of this invention has the following beneficial effects: This invention acquires sample single-fault electrical signal sets and sample composite fault electrical signal sets of electromechanical equipment; converts the sample single-fault electrical signal sets into sample single-fault time-frequency maps, and converts the sample composite fault electrical signal sets into sample composite fault time-frequency maps; trains an untrained electromechanical equipment fault diagnosis model using the sample single-fault time-frequency maps and the meta-stochastic gradient descent algorithm, obtaining a primary electromechanical equipment fault diagnosis model; the electromechanical equipment fault diagnosis model includes a deep separable convolutional layer and a lightweight convolutional transform network; fine-tunes the primary electromechanical equipment fault diagnosis model using the sample composite fault time-frequency maps and the meta-stochastic gradient descent algorithm, obtaining a trained electromechanical equipment fault diagnosis model; by performing meta-training on the sample single-fault time-frequency maps to obtain model generalization parameters, and then fine-tuning on the sample composite fault electrical signal sets, knowledge transfer from single faults to composite faults is completed, reducing the problem of scarce composite fault samples and improving diagnostic performance with fewer composite fault samples. Attached Figure Description
[0045] Figure 1 This is a flowchart of the steps of a device fault diagnosis model training method based on lightweight meta-learning provided by the present invention;
[0046] Figure 2 This is a flowchart of another method for training a device fault diagnosis model based on lightweight meta-learning provided by the present invention;
[0047] Figure 3 This is a flowchart of the steps to obtain a preliminary fault diagnosis model for electromechanical equipment provided by the present invention;
[0048] Figure 4 This is a flowchart of the steps involved in processing a time-frequency graph using a fault diagnosis model for electromechanical equipment, provided by the present invention.
[0049] Figure 5 This is a flowchart of a deep separation convolutional layer processing time-frequency graph provided by the present invention;
[0050] Figure 6 This is a flowchart of the steps for processing a second preliminary feature using a lightweight convolutional transform network provided by the present invention;
[0051] Figure 7 This is a flowchart of the steps in a method for diagnosing mechanical and electrical equipment faults provided by the present invention;
[0052] Figure 8 This is a schematic diagram of the structure of a diagnostic device for electromechanical equipment faults provided by the present invention;
[0053] Figure 9 This is a schematic diagram of the structure of a fault diagnosis system for electromechanical equipment provided by the present invention. Detailed Implementation
[0054] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. The step numbers in the following embodiments are only for ease of explanation and do not limit the order of the steps. The execution order of each step in the embodiments can be adapted according to the understanding of those skilled in the art.
[0055] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the embodiments of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0056] In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims. In the description of this application, it should be understood that terms such as "first / S1000," "second / S20001," and "third / S3000," etc., are used only to distinguish similar objects and are not necessarily used to describe a specific order or sequence, nor should they be construed as indicating or implying relative importance. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0057] like Figure 1 and Figure 2 As shown, Figure 1 This is a flowchart illustrating the steps involved in training a device fault diagnosis model based on lightweight meta-learning. Figure 2 This invention provides a method for training a device fault diagnosis model based on lightweight meta-learning, comprising the following steps:
[0058] S1000: Obtain sample single fault electrical signal sets and sample composite fault electrical signal sets of electromechanical equipment.
[0059] Among them, the sample single fault electrical signal set includes, but is not limited to, several sample single fault electrical signals and actual faults, and the sample composite fault electrical signal set includes, but is not limited to, several sample composite fault electrical signals and actual faults.
[0060] S2000: Convert the sample single-fault electrical signal set into a sample single-fault time-frequency graph set, and convert the sample composite fault electrical signal set into a sample composite fault time-frequency graph set.
[0061] Specifically, each single fault electrical signal in the sample single fault electrical signal set is converted into a time-frequency diagram to obtain a sample single fault time-frequency diagram set; each composite fault electrical signal in the sample composite fault electrical signal set is converted into a time-frequency diagram to obtain a sample composite fault time-frequency diagram set.
[0062] The method for converting single-fault electrical signals and composite fault electrical signals into time-frequency diagrams is the same. Single-fault electrical signals or composite fault electrical signals x(t) of the motor in the motion system of electromechanical equipment are collected as the original signals. The original signal x(t) is divided into multiple segments, each containing N sampling points. Wavelet transform W is applied to each segment of signal x(t) using the wavelet transform formula to obtain its time-frequency diagram X. The wavelet transform is shown in formula (1):
[0063]
[0064] in, The mother wavelet function after scaling and translation is expressed as shown in formula (2):
[0065]
[0066] Where a is the scaling factor and b is the translation factor.
[0067] S3000. Using the sample single-fault time-frequency map set and the meta-stochastic gradient descent algorithm, train the untrained electromechanical equipment fault diagnosis model to obtain a primary electromechanical equipment fault diagnosis model.
[0068] Among them, the fault diagnosis model for electromechanical equipment includes deep separable convolutional layers and lightweight convolutional transform networks.
[0069] Specifically, such as Figure 3 As shown, Figure 3 This is a flowchart of the steps to obtain a preliminary electromechanical equipment fault diagnosis model, which includes step S3100: dividing the sample single fault time-frequency image set into a support set and a query set, constructing several tasks, and for each task, inputting the sample single fault time-frequency image in the support set into the untrained electromechanical equipment fault diagnosis model to obtain the predicted fault on the support set.
[0070] Specifically, the sample single-fault time-frequency graph set is divided into a support set S and a query set Q, and several tasks {T1, T2, ... T} are constructed. K In this model, each task can represent a single fault type. For each task, the time-frequency graph of the sample single fault in the support set S is input into the untrained electromechanical equipment fault diagnosis model to obtain the predicted fault on the support set.
[0071] S3200. Construct a first loss function based on the predicted faults and actual faults on the support set, and process the first loss function using the metastochastic gradient descent algorithm to update the parameters of the untrained electromechanical equipment fault diagnosis model.
[0072] Specifically, the first loss function is constructed based on the predicted faults and actual faults on the support set. The loss function is the same as that of the existing meta-training model, and the first loss function is processed using the meta-stochastic gradient descent algorithm to update the parameters of the untrained electromechanical equipment fault diagnosis model, as shown in formula (3):
[0073]
[0074] Where, θ i ′ is task T i The parameters of the updated electromechanical equipment fault diagnosis model; θ i These are the parameters before the update. The first loss function is represented by θ. i The gradient.
[0075] Each time a sample single-fault time-frequency diagram is input into an untrained electromechanical equipment fault diagnosis model, the parameters of the electromechanical equipment fault diagnosis model can be updated according to the above method.
[0076] The training objective of the support set is to minimize the cross-task loss, and its objective function is shown in Equation (4):
[0077]
[0078] Among them, T i ~p(T) represents T i Belonging to {T1, T2, ... T K}
[0079] S3300: Input the sample single-fault time-frequency diagram from the query set into the updated electromechanical equipment fault diagnosis model to obtain the predicted fault on the query set; construct a second loss function based on the predicted fault and the actual fault on the query set, and process the second loss function using the metastochastic gradient descent algorithm to update the parameters of the electromechanical equipment fault diagnosis model to obtain the primary electromechanical equipment fault diagnosis model.
[0080] The time-frequency graphs of single faults from the query set are input into the updated electromechanical equipment fault diagnosis model to obtain the predicted faults on the query set. A second loss function L is then constructed based on the predicted faults and actual faults on the query set. Q L Q As shown in formula (5):
[0081]
[0082] The meta-stochastic gradient descent algorithm is then used to process the second loss function and update the parameters of the electromechanical equipment fault diagnosis model, resulting in a preliminary electromechanical equipment fault diagnosis model. The formula for updating the parameters of the electromechanical equipment fault diagnosis model is shown in formula (6):
[0083]
[0084] Where, θ1′ i These represent the parameters of the updated electromechanical equipment fault diagnosis model. Representation of meta-tests with respect to θ i The gradient of ′.
[0085] It is worth noting that the method by which the electromechanical equipment fault diagnosis model processes the time-frequency graphs of single fault samples in the query set to obtain the predicted fault on the query set is the same as the method by which the electromechanical equipment fault diagnosis model processes the time-frequency graphs of single fault samples in the support set to obtain the predicted fault on the support set. That is, the processing flow of time-frequency graphs is the same for electromechanical equipment fault diagnosis models at different stages.
[0086] S4000. The primary electromechanical equipment fault diagnosis model is fine-tuned using the sample composite fault time-frequency map set and the meta-stochastic gradient descent algorithm to obtain the trained electromechanical equipment fault diagnosis model.
[0087] Specifically, the finite-sample composite fault time-frequency map set Dc contains M classes of composite faults, with k samples in each class. N few-sample tasks {T11, T12, ... T1} are constructed. N}, used for each task T1 i The composite fault time-frequency atlas is divided into a support set S and a query set Q, T1 i This indicates that a compound fault will affect each task T. i The composite fault time-frequency diagrams from the support set S and query set Q are input into the primary electromechanical equipment fault diagnosis model for model fine-tuning and meta-testing. This process is consistent with step S300, except that in this step, both the first and second loss functions use L... Q Using L Q Evaluation Model Performance in complex fault diagnosis. A well-trained electromechanical equipment fault diagnosis model, fine-tuned for complex faults, is obtained.
[0088] It is worth noting that the basic electromechanical equipment fault diagnosis model uses the same method to process the time-frequency diagram of composite faults as it does to process the time-frequency diagram of single faults, which will not be repeated here.
[0089] It is worth noting that the fine-tuning methods can be, but are not limited to, fine-tuning techniques such as Rola.
[0090] In some embodiments, such as Figure 4 As shown, Figure 4 This is a flowchart illustrating the steps of processing time-frequency maps in a fault diagnosis model for electromechanical equipment. Step S3100, which involves inputting the sample single-fault time-frequency map from the support set into the untrained fault diagnosis model for electromechanical equipment to obtain the predicted fault on the support set, specifically includes:
[0091] S3110. Input the sample single-fault time-frequency map into the deep separation convolutional layer, perform first feature extraction to obtain first preliminary features, and restore the first preliminary features to second preliminary features.
[0092] Among them, the depth separation convolutional layer includes, but is not limited to, a depth convolutional layer and a pointwise convolutional layer. The depth convolutional layer and the pointwise convolutional layer are connected by residuals. The residual connection can be interpreted as adding the output of the depth convolutional layer to the sample single fault time-frequency map and then inputting the result of the addition into the pointwise convolutional layer.
[0093] Specifically, such as Figure 5 As shown, Figure 5 This is a flowchart of a deep separation convolutional layer processing a time-frequency image. In step S3110, the sample single-fault time-frequency image is input into the deep separation convolutional layer for first feature extraction, yielding the first preliminary features, specifically including:
[0094] S3111. Input the sample single-fault time-frequency map into the deep convolutional layer, perform a deep convolution operation, and obtain the output of the deep convolutional layer.
[0095] Specifically, the deep convolutional layer first applies grouped convolution to the input image (e.g., a sample single-fault time-frequency map), where the number of groups equals the number of patches in the sample single-fault time-frequency map, denoted by N; the patch length is denoted by e. A larger kernel size is used to expand the model's receptive field, typically equal to the default patch stride S, i.e., K = S. Simultaneously, the stride S is set equal to the patch length, i.e., K = S = e, to prevent patch overlap. During this process, each of the N patches in the sample single-fault time-frequency map is convolved individually with a convolutional kernel. This operation generates N feature maps, each corresponding to a specific patch. These feature maps are then concatenated to generate a feature map with N channels.
[0096] Specifically as follows:
[0097] The time-frequency map X of a single fault sample is input into a deep convolutional layer of size H×W×C. A sliding window is used to divide X into N patches. Each patch is e×e in size and the patches do not overlap, as shown in formula (7):
[0098] X patch =patch(X,patch_len=e,strike=S) (7)
[0099] Among them, X patch This represents the time-frequency diagram of a single fault sample after being divided into N patches, with a size of N×E×C, where E=e 2 patch(X) means dividing X into N patches.
[0100] Using the convolution kernel, X is processed according to formula (8). patch Perform convolution to obtain N feature maps:
[0101]
[0102] Where BatchNorm(.) represents convolution, σ represents the element-wise non-linear activation function, and GELU activation function is used. Conv represents the feature map obtained after convolution. N→N This indicates convolution kernel processing.
[0103] Stack the N feature maps to obtain a feature map with N channels.
[0104] S3112. Calculate the residual between the sample single-fault time-frequency map and the output of the deep convolutional layer, input the residual into the pointwise convolutional layer, perform pointwise convolution operation, and obtain the first preliminary feature.
[0105] Specifically, the residual between the time-frequency plot of a single fault sample and the deep convolutional layer is calculated. As shown in formula (9):
[0106]
[0107] Among them, X patch This represents the time-frequency diagram of a single fault in a sample after it has been divided into N patches.
[0108] Then, the residuals are input into the pointwise convolutional layer for pointwise convolution to obtain the first preliminary features. The size is A×E×C as shown in formula (10):
[0109]
[0110] Where A represents the number of output channels of the pointwise convolutional layer, allowing the degree of information aggregation between patches to be controlled by adjusting the number of output channels A; σ represents the element-wise non-linear activation function, which adopts the GELU activation function; BtachNorm(.) has the same processing flow as the BtachNorm layer of existing neural networks.
[0111] The output of the pointwise convolutional layer Let it be X conv , for X conv Perform the inverse stacking operation to obtain the stacked features, as shown in formula (11):
[0112] X1 out =X conv .Reshape(A, e, e, C) (11)
[0113] The Reshape(.) function follows the same process as the existing Reshape function.
[0114] splicing X out All patches are concatenated to obtain the concatenated feature Y, as shown in formula (12):
[0115] Y = X1 out .Reshape(R, L, e, e, C)
[0116] Where R and L are two random numbers, satisfying A = R × L.
[0117] The concatenated feature Y is processed to obtain the second preliminary feature X2. out Its size is H′×W′×C, where A=R×L, H′=R×e, W′=L×e, as shown in formula (13):
[0118] X1 out =Y.Transpose(0,2,1,3,4)Reshape(R×e,L×e,C) (13)
[0119] Transpose(.) means transpose.
[0120] S3120. Input the second preliminary feature into the lightweight convolutional transform network to extract the second feature and obtain the predicted fault on the support set.
[0121] The lightweight convolutional transform network includes, but is not limited to, an overlapping input module, a linear space dimensionality reduction attention module, and an output module. The overlapping input module includes, but is not limited to, an overlapping patch embedding layer, a layer normalization layer, and a positional encoding layer.
[0122] Specifically, such as Figure 6 As shown, Figure 6 This is a flowchart of the steps involved in processing the second preliminary feature using a lightweight convolutional transform network. Step S3120 specifically includes:
[0123] S3121. Input the second preliminary feature into the overlapping input module to perform the third feature extraction and obtain the fused feature.
[0124] Specifically, the overlapping input module includes, but is not limited to, an overlapping patch embedding layer, a layer normalization layer, and a position encoding layer.
[0125] Step S3121 specifically includes the following steps:
[0126] S3121a. Input the second preliminary feature into the overlapping patch embedding layer to obtain the patch feature.
[0127] The overlapping patch embedding layer has a stride of s and a kernel size of 2s-1. The convolution with padding s-1 is used to segment and embed the input, and the number of output channels is C′.
[0128] Specifically, for the second preliminary feature X1 obtained from the aforementioned depthwise separation convolution... out The input is then fed into the overlapping patch embedding layer for segmentation and embedding to obtain the patch feature P0, as shown in formula (14):
[0129] P0 = Conv(X1) out )
[0130] P0∈R(H′ / s)×(W′ / s)×C′ (14)
[0131] S3121b. Input the patch features into the layer normalization layer to obtain normalized features.
[0132] Specifically, the patch feature P0 is input into the normalization layer and normalized to obtain the normalized feature P1, as shown in formula (15):
[0133] P1 = LayerNorm(P0) (15)
[0134] LayerNorm(.) represents layer normalization.
[0135] S3121c. Input the normalized features into the position encoding layer to obtain the fused features.
[0136] Specifically, the normalized feature P1 is input into the position encoding layer, and the normalized feature P1 is concatenated with the position encoding vector E to obtain the fused feature Z, as shown in formula (16):
[0137] Z = [P1; E] (16)
[0138] S3122. Input the fused features into the linear space dimensionality reduction attention module to perform fourth feature extraction and obtain pooling features.
[0139] The linear space dimensionality reduction attention module includes, but is not limited to, an input layer, an average pooling layer, a pointwise convolutional layer, and a multi-head self-attention (MSA) layer.
[0140] Specifically, the fused feature Z is input into the input layer. The input layer extracts the key matrix K, value matrix V, and matrix Q of the fused feature Z, and processes the key matrix K and value matrix V to obtain the output Z1 of the input layer. KV The average pooling layer and the pointwise convolutional layer affect the output Z of the input layer. KV The first attention feature Z2 is obtained by performing average pooling and pointwise convolution respectively. KV As shown in formula (17):
[0141] Z2 KV =PointwiseConv(AveragePool(Z1 KV (17)
[0142] Multi-head attention layer for first attention feature Z2 K V and Q are used to extract features to obtain the second attention feature H, as shown in formula (18):
[0143] H = Transformer(Z2) KV (18)
[0144] The second attention feature H is linearly processed and normalized to extract sequence patterns from the feature map and reduce its size. The feature map Z after linear processing and normalization is shown below. p The dimension is b×1×d, where b is the batch size and d is the embedding dimension, as shown in formula (19):
[0145] Z p =Softmax(Linear(H))×H (19)
[0146] In this context, Linear(.) represents a linear layer; Softmax(.) represents a normalized layer.
[0147] Feature maps Z after linear processing and normalization p Sequence pooling is performed to obtain the pooled feature S, as shown in formula (20):
[0148] S = Pooling(Z) p(20)
[0149] S3123. Input the pooled features into the output module and perform fully connected classification to obtain the predicted faults on the support set.
[0150] The output module may include, but is not limited to, a fully connected layer.
[0151] Specifically, the pooled features are input into the fully connected layer to obtain the predicted fault Y, as shown in formula (21):
[0152] Y = Linear(S) (21)
[0153] This invention constructs an efficient and lightweight convolutional Transformer network by designing a linear space dimensionality reduction attention module and a feedforward fully connected network, laying the foundation for meta-learning under few-shot conditions.
[0154] like Figure 7 As shown, Figure 7 This invention provides a method for diagnosing electromechanical equipment faults based on lightweight meta-learning, comprising the following steps:
[0155] S100: Obtain the feedback electrical signal from the electromechanical equipment and convert the feedback electrical signal into a time-frequency diagram for prediction.
[0156] Specifically, the method for converting the feedback electrical signal into a time-frequency diagram for prediction is the same as the method for converting the sample electrical signal in step S1000, and will not be repeated here.
[0157] S200. Input the time-frequency diagram used for prediction into the trained electromechanical equipment fault diagnosis model to obtain the prediction result Y.
[0158] The trained electromechanical equipment fault diagnosis model is obtained through the training method described above.
[0159] Specifically, the method for obtaining the prediction results is the same as that for obtaining the predicted faults on the support set. The difference is that the time-frequency graph used for prediction is input into the electromechanical equipment fault diagnosis model. For details, please refer to the training method mentioned above.
[0160] S300. Post-process the prediction results to obtain composite fault diagnosis results.
[0161] Post-processing includes denoising and / or regularization.
[0162] Specifically, the prediction result Y is post-processed to obtain the composite fault diagnosis result y, as shown in formula (22):
[0163] y = PostProcess(Y) (22)
[0164] The PostProcess() function can represent denoising the prediction result Y; it can also represent regularizing the prediction result Y; or it can represent denoising the prediction result Y first and then regularizing the denoised result.
[0165] Implementing this invention has the following beneficial effects: This invention obtains model generalization parameters by performing meta-training on a sample single-fault time-frequency graph set, and then fine-tunes it on a sample composite fault electrical signal set, thus completing the knowledge transfer from single fault to composite fault, reducing the problem of scarce composite fault samples, and improving diagnostic performance with fewer composite fault samples.
[0166] This invention constructs an efficient and lightweight convolutional Transformer network by designing a linear space dimensionality reduction attention module and a feedforward fully connected network, laying the foundation for meta-learning under few-shot conditions.
[0167] This invention achieves efficient training within a meta-learning framework by using deep separable convolutions as the initial feature extractor and a lightweight Transformer network as the base learner. It solves the problem that standard Transformers are too complex to be applicable to meta-learning scenarios and can reduce computational complexity.
[0168] like Figure 8 As shown, Figure 8 This invention provides a structural schematic diagram of a fault diagnosis device for electromechanical equipment based on lightweight meta-learning. The invention also provides a fault diagnosis device for electromechanical equipment, comprising:
[0169] At least one processor;
[0170] At least one memory for storing at least one program;
[0171] When the at least one program is executed by the at least one processor, the at least one processor implements the training method and / or diagnostic method steps described in the above method embodiments.
[0172] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. The memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include remote memory located remotely relative to the processor, which can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0173] It is evident that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented in this device embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0174] Furthermore, this application also discloses a computer program product or computer program stored in a computer-readable storage medium. A processor of a computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, causing the computer device to perform the described method. Similarly, the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0175] The present invention also provides a computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to implement the above-described method.
[0176] It is understood that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.
[0177] like Figure 9 As shown, Figure 9This invention presents a schematic diagram of a fault diagnosis system for electromechanical equipment based on lightweight meta-learning. The invention also provides a fault diagnosis system for electromechanical equipment, comprising an electrical signal acquisition device and a computer device connected to the electrical signal acquisition device; wherein...
[0178] The electrical signal acquisition device is used to acquire a sample single fault electrical signal set, a sample composite fault electrical signal set, or a feedback electrical signal, and to upload the sample single fault electrical signal set, the sample composite electrical signal set, or the feedback electrical signal to the computer device.
[0179] The computer device includes:
[0180] At least one processor;
[0181] At least one memory for storing at least one program;
[0182] When the at least one program is executed by the at least one processor, the at least one processor implements the training method and / or diagnostic method steps described in the above method embodiments.
[0183] Specifically, for electrical signal acquisition equipment, it is mainly achieved through sensors, and it may specifically include at least one voltage sensor or current sensor; while for computer equipment, it may be different types of electronic devices, including but not limited to desktop computers, laptops and other terminals.
[0184] It is evident that the content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.
[0185] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of the invention. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0186] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the embodiments described. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of this application.
Claims
1. A method for training a device fault diagnosis model based on lightweight meta-learning, characterized in that, Includes the following steps: Acquire sample single-fault electrical signal sets and sample composite fault electrical signal sets of electromechanical equipment; The sample single-fault electrical signal set is converted into a sample single-fault time-frequency graph set, and the sample composite fault electrical signal set is converted into a sample composite fault time-frequency graph set. The untrained electromechanical equipment fault diagnosis model is trained using the sample single-fault time-frequency image set and the meta-stochastic gradient descent algorithm to obtain a primary electromechanical equipment fault diagnosis model; the electromechanical equipment fault diagnosis model includes a deep separable convolutional layer and a lightweight convolutional transform network; The primary electromechanical equipment fault diagnosis model is fine-tuned using the sample composite fault time-frequency map set and the meta-stochastic gradient descent algorithm to obtain the trained electromechanical equipment fault diagnosis model. Specifically, the step of using the sample single-fault time-frequency image set and the meta-stochastic gradient descent algorithm to train an untrained electromechanical equipment fault diagnosis model to obtain a preliminary electromechanical equipment fault diagnosis model includes: The sample single-fault time-frequency image set is divided into a support set and a query set, and several tasks are constructed. For each task, the sample single-fault time-frequency image in the support set is input into the untrained electromechanical equipment fault diagnosis model to obtain the predicted fault on the support set. A first loss function is constructed based on the predicted faults and actual faults on the support set, and the first loss function is processed using the metastochastic gradient descent algorithm to update the parameters of the untrained electromechanical equipment fault diagnosis model. Input the sample single-fault time-frequency graph of the query set into the electromechanical equipment fault diagnosis model after updating the parameters to obtain the predicted fault on the query set; A second loss function is constructed based on the predicted faults and actual faults on the query set, and the second loss function is processed using the metastochastic gradient descent algorithm to update the parameters of the electromechanical equipment fault diagnosis model, thereby obtaining the primary electromechanical equipment fault diagnosis model.
2. The training method according to claim 1, characterized in that, The step of inputting the time-frequency graph of the single fault sample in the support set into the untrained electromechanical equipment fault diagnosis model to obtain the predicted fault on the support set specifically includes: The sample single-fault time-frequency map is input into the deep separation convolutional layer to perform the first feature extraction to obtain the first preliminary feature, and the first preliminary feature is restored to the second preliminary feature. The second preliminary feature is input into the lightweight convolutional transform network to extract the second feature and obtain the predicted fault on the support set.
3. The training method according to claim 2, characterized in that, The depthwise separable convolutional layer includes a depthwise convolutional layer and a pointwise convolutional layer; The time-frequency map of the single fault sample is input into the deep separation convolutional layer for first feature extraction to obtain first preliminary features, which specifically include: The sample single-fault time-frequency map is input into the deep convolutional layer to perform a deep convolution operation, and the output of the deep convolutional layer is obtained. The residual between the time-frequency map of the single fault sample and the output of the deep convolutional layer is calculated, and the residual is input into the pointwise convolutional layer to perform pointwise convolution operation to obtain the first preliminary feature.
4. The training method according to claim 2, characterized in that, The lightweight convolutional transform network includes an overlapping input module, a linear space dimensionality reduction attention module, and an output module; the step of inputting the second preliminary feature into the lightweight convolutional transform network to extract the second feature and obtain the predicted fault on the support set specifically includes: The second preliminary feature is input into the overlapping input module for third feature extraction to obtain the fused feature. The fused features are input into the linear space dimensionality reduction attention module for fourth feature extraction to obtain pooled features. The pooled features are input into the output module for fully connected classification to obtain the predicted faults on the support set.
5. The training method according to claim 4, characterized in that, The overlapping input module includes an overlapping patch embedding layer, a layer normalization layer, and a position encoding layer; the step of inputting the second preliminary feature into the overlapping input module for third feature extraction to obtain the fused feature specifically includes: The second preliminary feature is input into the overlapping patch embedding layer to obtain the patch feature; The patch features are input into the normalization layer to obtain normalized features; The normalized features are input into the location encoding layer to obtain the fused features.
6. A method for fault diagnosis of electromechanical equipment based on lightweight meta-learning, characterized in that, Includes the following steps: Acquire the feedback electrical signal from the electromechanical equipment and convert the feedback electrical signal into a time-frequency diagram for prediction; The time-frequency graph used for prediction is input into the trained electromechanical equipment fault diagnosis model to obtain the prediction result; the trained electromechanical equipment fault diagnosis model is obtained by training the training method described in any one of claims 1-5. The prediction results are post-processed to obtain composite fault diagnosis results; the post-processing includes denoising and / or regularization.
7. A fault diagnosis device for electromechanical equipment based on lightweight meta-learning, characterized in that, include: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor performs the method as described in any one of claims 1-6.
8. A computer-readable storage medium storing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to perform the method as described in any one of claims 1-6.
9. A fault diagnosis system for electromechanical equipment based on lightweight meta-learning, characterized in that, It includes an electrical signal acquisition device and a computer device connected to the electrical signal acquisition device; wherein, The electrical signal acquisition device is used to acquire a sample single fault electrical signal set, a sample composite fault electrical signal set, or a feedback electrical signal, and to upload the sample single fault electrical signal set, the sample composite electrical signal set, or the feedback electrical signal to the computer device. The computer device includes: At least one processor; At least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor performs the method as described in any one of claims 1-6.
Citation Information
Patent Citations
Wind turbine generator set mechanical fault audio identification and fault diagnosis method
CN114778112A
Method and system for forecasting non-stationary time-series
US20230108916A1