A machine learning method for motor fault diagnosis
The motor fault diagnosis model trained by Fourier transform and multiple vibration training datasets solves the problem of low diagnostic accuracy in existing technologies and achieves high-precision diagnosis of motor faults.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUANENG JIAXIANG POWER GENERATION CO LTD
- Filing Date
- 2023-03-09
- Publication Date
- 2026-06-12
Smart Images

Figure CN116226743B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of motor fault technology, and more specifically, to a machine learning-based method for diagnosing motor faults. Background Technology
[0002] Vibration analysis is a common fault diagnosis technique for rotating equipment, particularly suitable for fault diagnosis of motors, pumps, and similar devices. Typically, by measuring the vibration of motors and pumps and converting the vibration data into spectral data, problems such as bearing failures, gear failures, and shaft failures can be identified. However, current techniques often use a single model to diagnose multiple faults. This requires training the model's parameters on numerous datasets until its output can distinguish between various faults, which is an ideal scenario. In reality, model training is often incomplete, leading to low diagnostic accuracy when using a single model to diagnose multiple faults. Common models used include linear regression, logistic regression, K-nearest neighbors, Bayesian methods, decision trees, and random forests. Summary of the Invention
[0003] To address the aforementioned shortcomings in existing technologies, this invention provides a machine learning-based motor fault diagnosis method that solves the problem of low diagnostic accuracy in existing methods that use a single model to diagnose multiple faults.
[0004] To achieve the above-mentioned objectives, the technical solution adopted by this invention is: a machine learning-based motor fault diagnosis method, comprising:
[0005] S1. Use Fourier transform to convert the vibration signal of the motor equipment into spectrum data;
[0006] S2. Label the normal and abnormal spectrum data to construct various vibration training datasets;
[0007] S3. The motor fault diagnosis model is trained using multiple vibration training datasets to obtain multiple trained motor fault diagnosis models.
[0008] S4. Input the spectrum data to be diagnosed into various trained motor fault diagnosis models to obtain the diagnosis results of the motor equipment to be diagnosed.
[0009] Further, step S2 includes the following steps:
[0010] S21. Label the normal and abnormal spectrum data;
[0011] S22. Construct the first vibration training dataset by combining the spectrum data labeled as normal and the spectrum data labeled as shaft imbalance.
[0012] S23. Construct a second vibration training dataset by combining the spectrum data labeled as normal and the spectrum data labeled as misaligned.
[0013] S24. Combine the spectrum data labeled as normal with the spectrum data labeled as shaft loosening to construct a third vibration training dataset;
[0014] S25. Combine the spectrum data labeled as normal with the spectrum data labeled as rotor rubbing to construct the fourth vibration training dataset;
[0015] S26. Combine the spectrum data labeled as normal with the spectrum data labeled as blade wear to construct the fifth vibration training dataset.
[0016] Furthermore, the motor fault diagnosis model in step S3 includes: a first feature extraction unit, a second feature extraction unit, an additive layer, an attention layer, an upsampling layer, and a fully connected layer;
[0017] The input of the first feature extraction unit is connected to the input of the second feature extraction unit for inputting the vibration training dataset; the output of the first feature extraction unit is connected to the input of the addition layer; the input of the upsampling layer is connected to the output of the addition layer, and its output is connected to the input of the fully connected layer; the output of the fully connected layer is used to output the diagnostic results; the output of the second feature extraction unit is connected to the input of the attention layer; and the output of the attention layer is connected to the input of the addition layer.
[0018] Furthermore, the first feature extraction unit includes: a first convolutional layer, a second convolutional layer, a first mean pooling layer, a first max pooling layer, and a first overlapping pooling layer;
[0019] The input of the first convolutional layer serves as the input of the first feature extraction unit, and its output is connected to the input of the second convolutional layer. The input of the second convolutional layer is connected to the input of the first average pooling layer, the input of the first max pooling layer, and the input of the first overlapping pooling layer, respectively. The outputs of the first average pooling layer, the first max pooling layer, and the first overlapping pooling layer all serve as the outputs of the first feature extraction unit.
[0020] Furthermore, the second feature extraction unit includes: a first LSTM layer, a second LSTM layer, a second mean pooling layer, a second max pooling layer, and a second overlapping pooling layer;
[0021] The input of the first LSTM layer serves as the input of the second feature extraction unit, and its output is connected to the input of the second LSTM layer. The output of the second LSTM layer is connected to the input of the second average pooling layer, the input of the second max pooling layer, and the input of the second overlapping pooling layer, respectively. The outputs of the second average pooling layer, the second max pooling layer, and the second overlapping pooling layer all serve as the outputs of the second feature extraction unit.
[0022] Further, step S3 specifically includes:
[0023] S31. The motor fault diagnosis model is trained using the first vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing shaft imbalance.
[0024] S32. The motor fault diagnosis model is trained using the second vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing shaft misalignment.
[0025] S33. The motor fault diagnosis model is trained using the third vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing shaft loosening.
[0026] S34. The motor fault diagnosis model is trained using the fourth vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing rotor rubbing.
[0027] S35. The motor fault diagnosis model is trained using the fifth vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing blade wear.
[0028] Furthermore, the method for training the motor fault diagnosis model using the vibration training dataset in step S3 to obtain the trained motor fault diagnosis model is as follows:
[0029] A1. Input the vibration training dataset into the first feature extraction unit to obtain the first data features;
[0030] A2. Input the vibration training dataset into the second feature extraction unit to obtain the second data features;
[0031] A3. An attention layer is used to assign attention weights to the second data features to obtain weighted data features;
[0032] A4. An additive layer is used to fuse the weighted data features and the first data features to obtain the fused features;
[0033] A5. An upsampling layer is used to upsample the fused features to obtain upsampled features;
[0034] A6. Use a fully connected layer to classify the upsampled features to obtain the output results of the motor fault diagnosis model;
[0035] A7. Calculate the loss value of the loss function based on the output results of the motor fault diagnosis model;
[0036] A8. Determine whether the current loss value of the loss function is lower than the upper limit threshold. If yes, the weight training of the motor fault diagnosis model is completed, and then proceed to step A10. If no, proceed to step A9.
[0037] A9. Adjust the weights of the motor fault diagnosis model according to the current loss value of the loss function, and return to step A1;
[0038] A10. Determine whether the current loss value of the loss function is lower than the lower threshold. If yes, the training of the motor fault diagnosis model is complete and ends. If no, proceed to step A11.
[0039] A11. Adjust the bias of the motor fault diagnosis model according to the current loss value of the loss function, and return to step A1.
[0040] The beneficial effects of the above-mentioned further scheme are: assigning attention weights to the second data features allows important features to be fully represented in the fused features, improving diagnostic accuracy. The training process of the motor fault diagnosis model is divided into two stages: first, training the weights; after the weights are trained, the loss value of the current loss function is relatively small; then, the bias is trained to approach the target value and achieve the ideal result.
[0041] Furthermore, the loss function in step A7 is:
[0042]
[0043] Among them, L i Y is the loss value of the loss function during the i-th training iteration. i Let y be the target value for the i-th training iteration. i This represents the actual value output by the motor fault diagnosis model during the i-th training iteration. Let be the target value from the most recent training iteration when normal spectrum data was input into the motor fault diagnosis model. This represents the actual value output by the motor fault diagnosis model when normal spectrum data was most recently input into the motor fault diagnosis model during the i-th training iteration. Let be the target value from the most recent training iteration when abnormal spectrum data was input into the motor fault diagnosis model. This represents the actual value output by the motor fault diagnosis model when the abnormal spectrum data was most recently input into the motor fault diagnosis model during the i-th training iteration.
[0044] The beneficial effects of the above-mentioned further scheme are as follows: In the loss function of the present invention, three parts of loss are considered: the loss between the current training target value and the actual value, the loss between the target value and the actual value of the most recent training normal data, and the loss between the target value and the actual value of the most recent abnormal data. The three losses are combined as the current loss, so that the loss of normal data and the loss of abnormal data can be considered each time the loss value is calculated, thereby enhancing the training effect on the parameters and making the actual value of the model output closer to the target value.
[0045] Furthermore, the formula for adjusting the weights of the motor fault diagnosis model in step A9 is as follows:
[0046]
[0047] The formula for adjusting the bias of the motor fault diagnosis model in step A11 is:
[0048]
[0049] Where, ω i Let ω be the weight for the i-th training iteration. i-1 For the weights of the (i-1)th training iteration, L i-1 Let be the loss value of the loss function during the (i-1)th training iteration, tanh be the activation function, and b be the value of the loss function. i b is the bias for the i-th training iteration. i-1 This is the bias for the (i-1)th training iteration.
[0050] The technical solution of this invention has at least the following advantages and beneficial effects: This invention uses multiple vibration training datasets to train motor fault diagnosis models respectively, resulting in multiple trained motor fault diagnosis models. After inputting the spectrum data to be diagnosed into the multiple trained motor fault diagnosis models respectively, since each trained motor fault diagnosis model is more sensitive to spectrum data of its own type, the motor fault diagnosis model corresponding to the fault type will accurately output its corresponding diagnosis result. This invention solves the problem of low diagnostic accuracy in existing methods that use one model to diagnose multiple faults. Attached Figure Description
[0051] Figure 1 A flowchart of a machine learning-based motor fault diagnosis method;
[0052] Figure 2 This is a schematic diagram of the motor fault diagnosis model. Detailed Implementation
[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0054] like Figure 1 As shown, a machine learning-based method for motor fault diagnosis includes:
[0055] S1. Use Fourier transform to convert the vibration signal of the motor equipment into spectrum data;
[0056] S2. Label the normal and abnormal spectrum data to construct various vibration training datasets;
[0057] Step S2 includes the following steps:
[0058] S21. Label the normal and abnormal spectrum data;
[0059] S22. Construct the first vibration training dataset by combining the spectrum data labeled as normal and the spectrum data labeled as shaft imbalance.
[0060] S23. Construct a second vibration training dataset by combining the spectrum data labeled as normal and the spectrum data labeled as misaligned.
[0061] S24. Combine the spectrum data labeled as normal with the spectrum data labeled as shaft loosening to construct a third vibration training dataset;
[0062] S25. Combine the spectrum data labeled as normal with the spectrum data labeled as rotor rubbing to construct the fourth vibration training dataset;
[0063] S26. Combine the spectrum data labeled as normal with the spectrum data labeled as blade wear to construct the fifth vibration training dataset.
[0064] S3. The motor fault diagnosis model is trained using multiple vibration training datasets to obtain multiple trained motor fault diagnosis models.
[0065] like Figure 2 As shown, the motor fault diagnosis model in step S3 includes: a first feature extraction unit, a second feature extraction unit, an additive layer, an attention layer, an upsampling layer, and a fully connected layer;
[0066] The input of the first feature extraction unit is connected to the input of the second feature extraction unit for inputting the vibration training dataset; the output of the first feature extraction unit is connected to the input of the addition layer; the input of the upsampling layer is connected to the output of the addition layer, and its output is connected to the input of the fully connected layer; the output of the fully connected layer is used to output the diagnostic results; the output of the second feature extraction unit is connected to the input of the attention layer; and the output of the attention layer is connected to the input of the addition layer.
[0067] The first feature extraction unit includes: a first convolutional layer, a second convolutional layer, a first mean pooling layer, a first max pooling layer, and a first overlapping pooling layer;
[0068] The input of the first convolutional layer serves as the input of the first feature extraction unit, and its output is connected to the input of the second convolutional layer. The input of the second convolutional layer is connected to the input of the first average pooling layer, the input of the first max pooling layer, and the input of the first overlapping pooling layer, respectively. The outputs of the first average pooling layer, the first max pooling layer, and the first overlapping pooling layer all serve as the outputs of the first feature extraction unit.
[0069] The second feature extraction unit includes: a first LSTM layer, a second LSTM layer, a second mean pooling layer, a second max pooling layer, and a second overlapping pooling layer;
[0070] The input of the first LSTM layer serves as the input of the second feature extraction unit, and its output is connected to the input of the second LSTM layer. The output of the second LSTM layer is connected to the input of the second average pooling layer, the input of the second max pooling layer, and the input of the second overlapping pooling layer, respectively. The outputs of the second average pooling layer, the second max pooling layer, and the second overlapping pooling layer all serve as the outputs of the second feature extraction unit.
[0071] Step S3 specifically involves:
[0072] S31. The motor fault diagnosis model is trained using the first vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing shaft imbalance.
[0073] S32. The motor fault diagnosis model is trained using the second vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing shaft misalignment.
[0074] S33. The motor fault diagnosis model is trained using the third vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing shaft loosening.
[0075] S34. The motor fault diagnosis model is trained using the fourth vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing rotor rubbing.
[0076] S35. The motor fault diagnosis model is trained using the fifth vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing blade wear.
[0077] The method for training the motor fault diagnosis model using the vibration training dataset in step S3 to obtain the trained motor fault diagnosis model is as follows:
[0078] A1. Input the vibration training dataset into the first feature extraction unit to obtain the first data features;
[0079] A2. Input the vibration training dataset into the second feature extraction unit to obtain the second data features;
[0080] A3. An attention layer is used to assign attention weights to the second data features to obtain weighted data features;
[0081] A4. An additive layer is used to fuse the weighted data features and the first data features to obtain the fused features;
[0082] A5. An upsampling layer is used to upsample the fused features to obtain upsampled features;
[0083] A6. Use a fully connected layer to classify the upsampled features to obtain the output results of the motor fault diagnosis model;
[0084] A7. Calculate the loss value of the loss function based on the output results of the motor fault diagnosis model;
[0085] The loss function in step A7 is:
[0086]
[0087] Among them, L i Y is the loss value of the loss function during the i-th training iteration. i Let y be the target value for the i-th training iteration. i This represents the actual value output by the motor fault diagnosis model during the i-th training iteration. Let be the target value from the most recent training iteration when normal spectrum data was input into the motor fault diagnosis model. This represents the actual value output by the motor fault diagnosis model when normal spectrum data was most recently input into the motor fault diagnosis model during the i-th training iteration. Let be the target value from the most recent training iteration when abnormal spectrum data was input into the motor fault diagnosis model. This represents the actual value output by the motor fault diagnosis model when the abnormal spectrum data was most recently input into the motor fault diagnosis model during the i-th training iteration.
[0088] The loss function of this invention considers three parts of loss: the loss between the current training target value and the actual value, the loss between the target value and the actual value of the most recent training normal data, and the loss between the target value and the actual value of the most recent abnormal data. The current loss is a combination of these three losses, which allows the loss of normal data and the loss of abnormal data to be considered each time the loss value is calculated, thereby enhancing the training effect on the parameters and making the actual value of the model output closer to the target value.
[0089] A8. Determine whether the current loss value of the loss function is lower than the upper limit threshold. If yes, the weight training of the motor fault diagnosis model is completed, and then proceed to step A10. If no, proceed to step A9.
[0090] A9. Adjust the weights of the motor fault diagnosis model according to the current loss value of the loss function, and return to step A1;
[0091] A10. Determine whether the current loss value of the loss function is lower than the lower threshold. If yes, the training of the motor fault diagnosis model is complete and ends. If no, proceed to step A11.
[0092] In this embodiment, the upper and lower thresholds are set based on experience.
[0093] A11. Adjust the bias of the motor fault diagnosis model according to the current loss value of the loss function, and return to step A1.
[0094] The formula for adjusting the weights of the motor fault diagnosis model in step A9 is as follows:
[0095]
[0096] The formula for adjusting the bias of the motor fault diagnosis model in step A11 is:
[0097]
[0098] Where, ω i Let ω be the weight for the i-th training iteration. i-1 For the weights of the (i-1)th training iteration, L i-1 Let be the loss value of the loss function during the (i-1)th training iteration, tanh be the activation function, and b be the value of the loss function. i b is the bias for the i-th training iteration. i-1 This is the bias for the (i-1)th training iteration.
[0099] The training methods shown in A1 to A11 are used in steps S31 to S35 above.
[0100] Attention weights are assigned to the second data features to ensure that important features are fully represented in the fused features, thereby improving diagnostic accuracy. The training process of the motor fault diagnosis model is divided into two stages: first, the weights are trained, which makes the loss value of the current loss function relatively small; then, the bias is trained to approach the target value and achieve the ideal result.
[0101] S4. Input the spectrum data to be diagnosed into various trained motor fault diagnosis models to obtain the diagnosis results of the motor equipment to be diagnosed.
[0102] In this embodiment, the spectrum data to be diagnosed is derived from the spectrum data of the vibration signal of the motor equipment to be diagnosed.
[0103] The spectrum data to be diagnosed is input into various trained motor fault diagnosis models. Motor fault diagnosis models belonging to the same type of fault will output predicted values. These predicted values are close to the target values of the same type of fault, thereby finding the corresponding fault type.
[0104] The technical solution of this invention has at least the following advantages and beneficial effects: This invention uses multiple vibration training datasets to train motor fault diagnosis models respectively, resulting in multiple trained motor fault diagnosis models. After inputting the spectrum data to be diagnosed into the multiple trained motor fault diagnosis models respectively, since each trained motor fault diagnosis model is more sensitive to spectrum data of its own type, the motor fault diagnosis model corresponding to the fault type will accurately output its corresponding diagnosis result. This invention solves the problem of low diagnostic accuracy in existing methods that use one model to diagnose multiple faults.
[0105] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A machine learning-based method for diagnosing motor faults, characterized in that, include: S1. Use Fourier transform to convert the vibration signal of the motor equipment into spectrum data; S2. Label the normal and abnormal spectrum data to construct various vibration training datasets; S3. The motor fault diagnosis model is trained using multiple vibration training datasets to obtain multiple trained motor fault diagnosis models. S4. Input the spectrum data to be diagnosed into various trained motor fault diagnosis models to obtain the diagnosis results of the motor equipment to be diagnosed. Step S2 includes the following steps: S21. Label the normal and abnormal spectrum data; S22. Construct the first vibration training dataset by combining the spectrum data labeled as normal and the spectrum data labeled as shaft imbalance. S23. Construct a second vibration training dataset by combining the spectrum data labeled as normal and the spectrum data labeled as misaligned. S24. Combine the spectrum data labeled as normal with the spectrum data labeled as shaft loosening to construct a third vibration training dataset; S25. Combine the spectrum data labeled as normal with the spectrum data labeled as rotor rubbing to construct the fourth vibration training dataset; S26. Combine the spectrum data labeled as normal with the spectrum data labeled as blade wear to construct the fifth vibration training dataset; The motor fault diagnosis model in step S3 includes: a first feature extraction unit, a second feature extraction unit, an additive layer, an attention layer, an upsampling layer, and a fully connected layer; The input of the first feature extraction unit is connected to the input of the second feature extraction unit, and is used to input the vibration training dataset; the output of the first feature extraction unit is connected to the input of the addition layer; the input of the upsampling layer is connected to the output of the addition layer, and its output is connected to the input of the fully connected layer; the output of the fully connected layer is used to output the diagnostic results; the output of the second feature extraction unit is connected to the input of the attention layer; the output of the attention layer is connected to the input of the addition layer. The first feature extraction unit includes: a first convolutional layer, a second convolutional layer, a first mean pooling layer, a first max pooling layer, and a first overlapping pooling layer; The input of the first convolutional layer serves as the input of the first feature extraction unit, and its output is connected to the input of the second convolutional layer. The input of the second convolutional layer is connected to the input of the first average pooling layer, the input of the first max pooling layer, and the input of the first overlapping pooling layer, respectively. The outputs of the first average pooling layer, the first max pooling layer, and the first overlapping pooling layer all serve as the outputs of the first feature extraction unit. The second feature extraction unit includes: a first LSTM layer, a second LSTM layer, a second mean pooling layer, a second max pooling layer, and a second overlapping pooling layer; The input of the first LSTM layer serves as the input of the second feature extraction unit, and its output is connected to the input of the second LSTM layer. The output of the second LSTM layer is connected to the input of the second average pooling layer, the input of the second max pooling layer, and the input of the second overlapping pooling layer, respectively. The outputs of the second average pooling layer, the second max pooling layer, and the second overlapping pooling layer all serve as the outputs of the second feature extraction unit. The method for training the motor fault diagnosis model using the vibration training dataset in step S3 to obtain the trained motor fault diagnosis model is as follows: A1. Input the vibration training dataset into the first feature extraction unit to obtain the first data features; A2. Input the vibration training dataset into the second feature extraction unit to obtain the second data features; A3. An attention layer is used to assign attention weights to the second data features to obtain weighted data features; A4. An additive layer is used to fuse the weighted data features and the first data features to obtain the fused features; A5. An upsampling layer is used to upsample the fused features to obtain upsampled features; A6. Use a fully connected layer to classify the upsampled features to obtain the output results of the motor fault diagnosis model; A7. Calculate the loss value of the loss function based on the output results of the motor fault diagnosis model; A8. Determine whether the current loss value of the loss function is lower than the upper limit threshold. If yes, the weight training of the motor fault diagnosis model is completed, and then proceed to step A10. If no, proceed to step A9. A9. Adjust the weights of the motor fault diagnosis model according to the current loss value of the loss function, and return to step A1; A10. Determine whether the current loss value of the loss function is lower than the lower threshold. If yes, the training of the motor fault diagnosis model is complete and ends. If no, proceed to step A11. A11. Adjust the bias of the motor fault diagnosis model according to the current loss value of the loss function, and return to step A1.
2. The machine learning-based motor fault diagnosis method according to claim 1, characterized in that, Step S3 specifically involves: S31. The motor fault diagnosis model is trained using the first vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing shaft imbalance. S32. The motor fault diagnosis model is trained using the second vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing shaft misalignment. S33. The motor fault diagnosis model is trained using the third vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing shaft loosening. S34. The motor fault diagnosis model is trained using the fourth vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing rotor rubbing. S35. The motor fault diagnosis model is trained using the fifth vibration training dataset to obtain a trained motor fault diagnosis model for diagnosing blade wear.
3. The machine learning-based motor fault diagnosis method according to claim 1, characterized in that, The loss function in step A7 is: in, For the first The loss value of the loss function for each training iteration. For the first The target value for this training session. For the first The actual value output by the motor fault diagnosis model during the second training session. For the distance from the first The target value for the most recent training iteration when normal spectrum data was input into the motor fault diagnosis model. For the distance from the first The last time normal spectrum data was input into the motor fault diagnosis model during training, the actual value output by the motor fault diagnosis model was displayed. For the distance from the first The target value for the most recent time when abnormal spectrum data was input into the motor fault diagnosis model during the training. For the distance from the first The actual value output by the motor fault diagnosis model when abnormal spectrum data was most recently input into the motor fault diagnosis model during the training.
4. The machine learning-based motor fault diagnosis method according to claim 1, characterized in that, The formula for adjusting the weights of the motor fault diagnosis model in step A9 is as follows: The formula for adjusting the bias of the motor fault diagnosis model in step A11 is: in, For the first Weights for each training iteration For the first Weights for each training iteration For the first The loss value of the loss function for each training iteration. For activation function, For the first The bias of the second training. For the first The bias of the second training.