A model training method, motor fault diagnosis method and microcontroller
By optimizing resources, more efficient diagnosis and improved equipment reliability were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SUZHOU JIEJIE SENSOR TECH CO LTD
- Filing Date
- 2023-07-12
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies result in excessive computational resource consumption and increased power consumption in motor fault diagnosis, making it difficult to achieve real-time and efficient diagnosis at the device level.
A one-dimensional convolutional neural network model is adopted. By combining the input layer, one-dimensional convolutional layer, one-dimensional max pooling layer, random deactivation layer, flattening layer and fully connected layer, the model depth and complexity are reduced, the computational resource consumption is reduced, and the model is deployed on the device for fault diagnosis.
It improves the efficiency and accuracy of motor fault diagnosis, reduces resource utilization, achieves more efficient diagnostic capabilities, and enhances the operability and reliability of the equipment.
Smart Images

Figure CN117009841B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of vibration signal processing, and in particular to a model training method, a motor fault diagnosis method, and a microcontroller. Background Technology
[0002] In industrial settings, predictive diagnostics and maintenance of equipment can prevent hardware failures, reduce downtime and maintenance costs, and enhance workplace safety while mitigating the risk of personal injury. Traditional fault diagnosis methods largely rely on statistical analysis or signal processing. The core of these techniques is statistical analysis of historical process data to calculate the corresponding statistics for each sample to estimate the current operating state, as well as the detection and processing of extracted signals. This diagnostic process requires operators to possess extensive data processing skills and is highly dependent on experience, making it difficult to meet the demands of modern industry. Therefore, fault diagnosis methods should shift from traditional approaches to intelligent and efficient ones.
[0003] In recent years, AI-based fault diagnosis models have emerged rapidly. These big data-centric models and methods require extremely high computing power for training and analysis, especially in the field of deep learning. The complex and variable operating conditions of motors generate massive amounts of data, leading to excessive consumption of computing resources and increased power consumption. These issues affect diagnostic efficiency and make it difficult to achieve real-time analysis and monitoring of equipment data. Predictive maintenance in industry requires deploying numerous sensors at the IoT device level to collect data generated by equipment operation and monitor its status. Achieving real-time and efficient fault diagnosis on resource-constrained microcontrollers at the device level is a key focus and challenge in related research. Summary of the Invention
[0004] This invention provides a model training method, a motor fault diagnosis method, and a microcontroller, which reduces the depth and complexity of one-dimensional convolutional neural network models, alleviates excessive consumption of computing resources, and improves fault diagnosis efficiency.
[0005] The first aspect of this invention discloses a model training method, comprising:
[0006] The historical vibration signals of the motor and their corresponding fault type labels are obtained to generate a sample dataset; the historical vibration signals are three-dimensional vibration signals that are continuous in the time domain.
[0007] The one-dimensional convolutional neural network model is trained on at least a portion of the sample dataset to obtain the target one-dimensional convolutional neural network model. The layers of the one-dimensional convolutional neural network are, in order, an input layer, a one-dimensional convolutional layer, a one-dimensional max pooling layer, a random deactivation layer, a flattening layer, a first fully connected layer, and a second fully connected layer.
[0008] The system employs an input layer to receive historical vibration signals, a one-dimensional convolutional layer to extract features from the historical vibration signal data and output a feature map, a one-dimensional max pooling layer to sample the feature map, a random deactivation layer to remove some neurons from the one-dimensional convolutional neural network model, a flattening layer to reduce the feature map to one dimension, a first fully connected layer to perform a linear transformation on the reduced one-dimensional feature map, and a second fully connected layer to classify the linearly transformed feature map and output fault type labels.
[0009] Preferably, after acquiring the historical vibration signals of the motor and their corresponding fault type labels, the following preprocessing is performed:
[0010] A sliding window method is used to segment continuous historical vibration signals in the time domain to generate a sample dataset;
[0011] If the length of the sliding window for segmentation is a, the sliding step size is b, and the total number of sampling points of the historical vibration signal data is M, then the formula (1) for calculating the total number of samples N1 in the final sample dataset is:
[0012]
[0013] Preferably, the sliding window length 'a' is equal to the sample length, and the sample length is 2. n One sampling point;
[0014] or,
[0015] The sample length is 2n sampling points;
[0016] Where n is a positive integer.
[0017] Preferably, after acquiring the historical vibration signals of the motor and their corresponding fault type labels, the following preprocessing is also included:
[0018] The three-dimensional vibration signal that is continuous in the time domain is normalized according to formula (2);
[0019]
[0020] Among them, D raw Let D be a three-dimensional vibration signal, and D′ be the normalized three-dimensional vibration signal, with max D. raw Min D represents the maximum value of the three-dimensional vibration signal. raw This represents the minimum value of a three-dimensional vibration signal;
[0021] The normalized three-dimensional vibration signal data is transformed into a three-dimensional frequency domain signal by performing a Fourier transform according to formula (3);
[0022]
[0023] Where D′(t) represents the change of the three-dimensional vibration signal on the time axis, This represents the Fourier transform of a three-dimensional vibration signal that changes along the time axis, where D(ω) represents the three-dimensional frequency domain signal and ω represents the frequency of the three-dimensional frequency domain signal.
[0024] The three-dimensional frequency domain signal data is halved and then stitched together in the vertical direction to obtain a fused vibration signal as a sample dataset.
[0025] Furthermore, the constructed one-dimensional convolutional neural network model is trained using at least a portion of the sample dataset to obtain the target one-dimensional convolutional neural network model, including:
[0026] The cross-entropy loss function is used to calculate the loss value between the actual output fault type label probability and the predicted fault type label probability, and the parameters of the one-dimensional convolutional neural network model are optimized based on the loss value.
[0027] Training is stopped when the model training convergence condition is met, and the target one-dimensional convolutional neural network model is obtained.
[0028] The cross-entropy loss function is defined by formula (4):
[0029]
[0030] Where N² is the number of examples participating in model training, and each example has C possible fault types; y i =[y i1 ,y i2 ,…,y iC ] represents the true probability distribution of the i-th example in each fault type; when the j-th class is the true fault type of the i-th example, y ij =1, when the j-th type is not the true fault type of the i-th example, y ij =0; p i =[p i1 ,p i2 ,…,P iC ] represents the predicted probability distribution of the i-th example for each fault type, where p ij It is the predicted probability of the fault type of the j-th example.
[0031] Preferably, the process of calculating the loss value between the actual output fault type label probability and the predicted fault type label probability using the cross-entropy loss function, and optimizing the parameters of the one-dimensional convolutional neural network model based on the loss value, includes:
[0032] The cross-entropy loss function is used to calculate the loss value between the actual output fault type label probability and the predicted fault type label probability.
[0033] The Adam function is used to determine the gradient value corresponding to the loss value, and the parameters of the one-dimensional convolutional neural network model are updated based on the gradient value.
[0034] Iterate through the above process until the cross-entropy loss function is minimized.
[0035] Preferably, a model training method further includes: compressing the parameters of the target one-dimensional convolutional neural network;
[0036] And / or,
[0037] The one-dimensional convolutional layer and the one-dimensional max pooling layer of the target one-dimensional convolutional neural network are merged into a single one-dimensional pooling layer.
[0038] The compression of parameters in the target one-dimensional convolutional neural network includes:
[0039] The parameters of the target one-dimensional convolutional neural network model are extracted and flattened to obtain a one-dimensional parameter vector;
[0040] The K-means clustering algorithm is used to cluster all one-dimensional parameter vectors into K clusters and the centroid of each cluster is determined.
[0041] Replace the parameters in each one-dimensional parameter vector with the centroid of the corresponding cluster.
[0042] The second aspect of this invention discloses a motor fault diagnosis method, applied to the target one-dimensional convolutional neural network model of the first aspect, comprising:
[0043] The real-time vibration signal of the motor is collected, input into the target one-dimensional convolutional neural network model, and the predicted fault type label is output.
[0044] The layers of the target one-dimensional convolutional neural network are, in order: input layer, one-dimensional pooling layer, random deactivation layer, flattening layer, first fully connected layer, and second fully connected layer.
[0045] The system employs an input layer to receive real-time vibration signals, a one-dimensional merging layer to reduce the spatial size of the feature map while retaining the main feature information, a random deactivation layer to remove some neurons from the target one-dimensional convolutional neural network model, a flattening layer to reduce the feature map to one dimension, a first fully connected layer to perform a linear transformation on the reduced one-dimensional feature map, and a second fully connected layer to classify the linearly transformed feature map and output the predicted fault type label.
[0046] Preferably, the motor fault diagnosis method is applied to the device-side microcontroller, and the target one-dimensional convolutional neural network model is deployed on the device-side microcontroller.
[0047] Furthermore, the motor fault diagnosis method is applied to the device-side microcontroller, and the target one-dimensional convolutional neural network model is deployed on the device-side microcontroller, including:
[0048] Call the initialization function to initialize the target one-dimensional convolutional neural network model and communication interface;
[0049] Real-time vibration signal data is acquired using a communication interface;
[0050] The real-time vibration signal is preprocessed; the preprocessing includes: segmenting the real-time vibration signal and normalizing it, and then performing a Fourier transform on the normalized data to obtain frequency domain data.
[0051] A target one-dimensional convolutional neural network model is used to predict frequency domain data to obtain the predicted fault type label.
[0052] Preferably, real-time vibration signal data is acquired using a communication interface, including:
[0053] The communication interface collects real-time vibration signals from external sensors; the real-time vibration signals are obtained by the sensors after being collected and processed according to formula (6); the real-time vibration signals are triaxial vibration acceleration signals; the triaxial vibration acceleration signal data has a total of 16 bits, and the acceleration data of each axis is stored in two registers respectively;
[0054]
[0055] in, This represents the high-order data of the triaxial vibration acceleration signal on the X-axis. This refers to the low-order data of the triaxial vibration acceleration signal on the X-axis, acc x is the triaxial vibration acceleration signal data on the X-axis, Sensitivity is the weight of formula (6), and g is the Earth acceleration.
[0056] The third aspect of the present invention discloses a microcontroller arranged on a device, wherein the microcontroller is equipped with a target one-dimensional convolutional neural network model of the first aspect and is used to execute the motor fault diagnosis method of the second aspect.
[0057] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0058] This application provides a model training method, a motor fault diagnosis method, and a microcontroller. The model training method includes acquiring historical vibration signals of the motor and their corresponding fault type labels to generate a sample dataset; training a constructed one-dimensional convolutional neural network model with at least a portion of the sample dataset to obtain a target one-dimensional convolutional neural network model; the layers of the one-dimensional convolutional neural network are, in order, an input layer, a one-dimensional convolutional layer, a one-dimensional max-pooling layer, a random deactivation layer, a flattening layer, a first fully connected layer, and a second fully connected layer; wherein, the input layer is used to receive historical vibration signals, the one-dimensional convolutional layer is used to extract features from the historical vibration signal data and output a feature map, the one-dimensional max-pooling layer is used to sample the feature map, the random deactivation layer is used to remove some neurons in the one-dimensional convolutional neural network model, the flattening layer is used to reduce the feature map to one dimension, the first fully connected layer is used to perform a linear transformation on the reduced one-dimensional feature map, and the second fully connected layer is used to classify the linearly transformed feature map and output a fault type label. The one-dimensional convolutional neural network design provided by this invention is relatively resource-efficient. One-dimensional convolutional layers reduce the overall number of trainable parameters, and one-dimensional max-pooling layers help reduce the dimensionality of feature maps, lowering the computational cost of fully connected layers. Furthermore, the output size of the one-dimensional max-pooling layer is smaller than that of the one-dimensional convolutional layer, resulting in fewer parameters and less computational burden. Simultaneously, placing the random deactivation layer after the one-dimensional max-pooling layer allows it to be applied to the first and second fully connected layers, preserving the relative positional information of the pooling layer outputs. This reduces overfitting in the first and second fully connected layers, making more efficient use of training data, reducing computational load, improving computational speed, and enabling the processing of large-scale complex data and effective prediction. Optimizing the structure of the adopted one-dimensional convolutional neural network model reduces its depth and complexity, lowers resource consumption, and improves its robustness, allowing the model to be deployed on devices and improving the efficiency of model diagnostics.
[0059] Furthermore, collecting and fusing the three-dimensional vibration signals of the motor, compared to collecting only one vibration signal with a larger amplitude for analysis, is more accurate, detailed, and reliable, which is beneficial for more precise analysis of the characteristics of the motor's vibration signals. Attached Figure Description
[0060] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0061] Figure 1This is a diagram of the one-dimensional convolutional neural network model structure of the model training method provided in this embodiment of the invention;
[0062] Figure 2 This is a schematic diagram of data segmentation for the model training method provided in this embodiment of the invention;
[0063] Figure 3 This is a schematic diagram of the frequency domain transformation of the model training method provided in this embodiment of the invention;
[0064] Figure 4 This is a schematic diagram of the motor fault diagnosis method provided in the embodiment of the present invention;
[0065] Figure 5 This is a flowchart illustrating the actual use of the motor fault diagnosis method provided in this embodiment of the invention.
[0066] Figure 6 This is a flowchart of the predictive processing of the motor fault diagnosis method provided in this embodiment of the invention;
[0067] Figure 7 This is a confusion matrix of the identification results of the motor fault diagnosis method provided in the embodiments of the present invention;
[0068] Figure 8 This is a time distribution diagram of the real-time diagnosis of the motor fault diagnosis method provided in the embodiments of the present invention. Detailed Implementation
[0069] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments and the accompanying drawings. It should be understood that these descriptions are merely exemplary and not intended to limit the scope of the invention. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0070] The technical solution 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. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0071] In the description of this invention, it should be noted that the directions or positional relationships indicated by terms such as "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer" are based on the accompanying drawings and are used only for the convenience of describing the invention and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as limiting the invention. Furthermore, terms such as "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0072] In the description of this invention, it should be noted that, unless otherwise explicitly specified and limited, the terms "installation," "connection," and "joining" should be interpreted broadly. For example, they can refer to fixed connections, detachable connections, or integral connections; they can refer to mechanical connections or electrical connections; they can refer to direct connections or indirect connections through an intermediate medium; and they can refer to the internal communication between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention based on the specific circumstances.
[0073] The training and analysis of AI-based fault diagnosis models require extremely high computing power, especially in the field of deep learning. Due to the complex and variable operating conditions of motors, massive amounts of data are generated. As the depth and complexity of the diagnostic model increase, problems arise such as excessive consumption of computing resources and increased power consumption. These issues affect diagnostic efficiency and make it difficult to achieve real-time analysis and monitoring of equipment data. This invention provides a model training method, a motor fault diagnosis method, and a microcontroller. These methods reduce excessive consumption of computing resources and lower power consumption during model training. By employing a one-dimensional convolutional neural network model, the depth and complexity of the model are reduced, thereby improving diagnostic efficiency.
[0074] Example 1
[0075] Embodiment 1 of the present invention provides a model training method that uses historical data of a motor to train a neural network model to obtain a target neural network model after training.
[0076] Before training the neural network model, historical vibration signals of the motor and their corresponding fault type labels are obtained to generate a sample dataset. The historical vibration signals are continuous three-dimensional vibration signals in the time domain, where X represents the motor's vibration signal in the horizontal direction, Y represents the motor's vibration signal in the axial direction, and Z represents the motor's vibration signal in the vertical direction. That is, all three-dimensional vibration signals described in this application are continuous in the time domain.
[0077] The neural network model uses a one-dimensional convolutional neural network, which has the advantages of fast training speed and low depth and complexity, reducing excessive consumption of computing resources. For example... Figure 1As shown, the layers of the one-dimensional convolutional neural network model are, in order: input layer, one-dimensional convolutional layer, one-dimensional max pooling layer, random deactivation layer, flattening layer, first fully connected layer, and second fully connected layer.
[0078] The system employs an input layer to receive historical vibration signals, a one-dimensional convolutional layer to extract features from the historical vibration signal data and output a feature map, a one-dimensional max pooling layer to sample the feature map, a random deactivation layer to remove some neurons from the one-dimensional convolutional neural network model, a flattening layer to reduce the feature map to one dimension, a first fully connected layer to perform a linear transformation on the reduced one-dimensional feature map, and a second fully connected layer to classify the linearly transformed feature map and output fault type labels.
[0079] From the perspective of recognition accuracy, one-dimensional convolutional layers and one-dimensional max-pooling layers help extract features from the input signal. The convolutional layer applies a set of filters to the input real-time vibration signal, enabling it to learn different features and patterns in the signal. The one-dimensional max-pooling layer samples the output of the one-dimensional convolutional layer, reducing the dimensionality of the feature map while retaining the most important features. Random deactivation layers help prevent overfitting by gradually removing a portion of neurons during training, forcing the one-dimensional convolutional neural network to learn more robust features. The first and second fully connected layers are responsible for classifying the extracted features into different fault categories. The first fully connected layer acts as a bottleneck layer, reducing the dimensionality of the feature map before passing it to the second fully connected layer for final classification.
[0080] From a resource consumption perspective, the network design of the above layers is relatively resource-efficient. One-dimensional convolutional layers require only one input channel and use a small number of filters, reducing the overall number of trainable parameters. One-dimensional max-pooling layers help reduce the dimensionality of feature maps, which in turn reduces the computational cost of fully connected layers. Random deactivation layers also reduce the risk of overfitting, allowing for more efficient use of training data.
[0081] For motor fault diagnosis tasks, a one-dimensional convolutional neural network model containing an input layer, a one-dimensional convolutional layer, a one-dimensional max-pooling layer, a random deactivation layer, a flattening layer, and two fully connected layers is an efficient and resource-saving architecture. The one-dimensional convolutional layer and the one-dimensional max-pooling layer help extract robust features from the input signal, while the two fully connected layers provide accurate classification. The random deactivation layer prevents overfitting, thus making more effective use of real-time vibration signal data. The one-dimensional convolutional neural network model in Example 1 achieves a good balance between recognition accuracy and resource consumption.
[0082] Meanwhile, in neural network model training, more training samples often mean better training results. If the model has too many parameters and too few training samples, overfitting will occur. Placing the random deactivation layer after the one-dimensional max pooling layer allows the random deactivation layer to be applied to the first and second fully connected layers, preserving the relative position information of the pooling layer outputs and reducing overfitting in the first and second fully connected layers. Furthermore, the output size of the one-dimensional max pooling layer is smaller than that of the one-dimensional convolutional layer, resulting in fewer parameters and less computational burden. Therefore, using a random deactivation layer before the first fully connected layer can reduce computational cost, improve computational speed, maintain high performance, and improve the robustness of the trained model.
[0083] A one-dimensional convolutional neural network model is trained using at least a portion of the sample dataset to obtain a target one-dimensional convolutional neural network model. The target one-dimensional convolutional neural network model generated after training has higher diagnostic efficiency, can accurately diagnose faults in input vibration signals, and has high accuracy in predicting fault types, thereby improving the safety of industrial production.
[0084] Embodiment 1 of the present invention provides a model training method, which generates a sample dataset by acquiring the historical vibration signal of the motor and its corresponding fault type label; at least a portion of the sample dataset is input into a one-dimensional convolutional neural network model for training to obtain a target one-dimensional convolutional neural network model. This model has low depth and complexity, high diagnostic efficiency, and strong analytical capabilities. Furthermore, a random deactivation layer is added between the one-dimensional max pooling layer and the flattening layer to reduce overfitting and improve the robustness of the trained model.
[0085] Example 2
[0086] Embodiment 2 of the present invention provides a model training method. Based on Embodiment 1, after obtaining the historical vibration signal of the motor and its corresponding fault type label, the historical vibration data is preprocessed to transform it into a form that conforms to the input of a one-dimensional convolutional neural network model.
[0087] The preprocessing of historical vibration signal data is divided into two parts: data segmentation and frequency domain transformation. The frequency domain transformation includes the data normalization process.
[0088] In neural network training, more training samples often mean better training results, while insufficient sample size can easily lead to overfitting. Furthermore, for time-series signals like historical vibration signals, the characteristics of the vibration signals of a motor may differ significantly under different operating conditions. Therefore, it is necessary to segment and reconstruct the historical vibration signal data to facilitate the analysis and comparison of vibration signals under different operating conditions. Further, by segmenting the historical vibration signal data, a long-term signal can be divided into several short-term segments, thereby reducing the computational load of each segment and improving computational efficiency. A sliding window method is used to segment the continuous historical vibration signal in the time domain to generate a sample dataset. The length of the sliding window for segmentation is a, the sliding step size is b, and the total number of sampling points of the historical vibration signal data is M. The formula (1) for calculating the total number of samples N1 in the final sample dataset is:
[0089]
[0090] When the sliding step size b equals the sliding window length a, i.e. the sliding windows do not overlap, then a = b, and formula (1) becomes formula (1.1):
[0091]
[0092] The sliding window length 'a' is equal to the sample length, and the sample length is 2. n The sample length is 2n sampling points, or 2n sampling points; where n is a positive integer.
[0093] During the real-time vibration data acquisition of the motor, the motor speed is set to RS = 1485 r / min = 24.75 r / s, and the sampling frequency of the sensor for acquiring real-time vibration data is Fs = 3300 Hz. Then, the number of sampling points N per motor revolution is... per The calculation formula (1.2) is as follows:
[0094]
[0095] Therefore, the sensor sampling points are 133 points per motor revolution. Preferably, in this embodiment 2, the number of sensor sampling points per four motor revolutions is used as the sample length, i.e., n is 9, and the sample length is 512 sampling points. Figure 2 As shown, sample is the data set, and x, y, and z represent the vibration signals of the motor in the horizontal, axial, and vertical directions, respectively. When the sliding windows do not overlap, a = b = 512, and the sampling point is set to 512 to facilitate the subsequent frequency domain conversion process. Each sample contains data from approximately every four revolutions of the motor during continuous rotation, covering three vibration directions.
[0096] In motor fault diagnosis, the number of vibration signal sampling points used per training sample depends on several factors, including the nature of the signal and the specific requirements of the task. Generally, the number of sampling points should be large enough to capture sufficient three-dimensional vibration signal information, while also being small enough to keep resource consumption and response time manageable. The following three aspects form the basis for setting the number of sampling points per sample to 512:
[0097] First, the Fast Fourier Transform (FFT) is a commonly used technique for frequency analysis of three-dimensional vibration signals. In performing Fourier transforms on three-dimensional vibration signals, it is typically used with a sampling number of 23... n The highest efficiency is achieved when there are 512 sampling points. For signals with a large number of sampling points (e.g., 1024 sampling points), more computational resources are required for Fourier transform analysis compared to signals with 512 sampling points. For signals with a small number of sampling points (e.g., 256 sampling points), the frequency resolution decreases compared to signals with 512 sampling points, which may result in insufficient frequency information being captured, leading to reduced computational efficiency. Therefore, signals with 512 sampling points can be easily analyzed using Fourier transform to save computational resources and increase the speed of Fourier transform.
[0098] Second, in terms of resource consumption, the number of sampling points directly affects the computing resources required to process the signal. A signal with 512 sampling points requires less data storage space and computing resources than a signal with more sampling points (such as a signal with 1024 sampling points), thus saving computing resources and reducing power consumption.
[0099] Third, in terms of response time, for real-time applications, a signal with 512 sampling points can be processed faster than a signal with more sampling points (such as a signal with 1024 sampling points), thus enabling a faster response to motor fault diagnosis.
[0100] Furthermore, the three-dimensional vibration signal that is continuous in the time domain is normalized according to formula (2) to eliminate the adverse effects of some singular data in the three-dimensional vibration signal on subsequent processing, and to ensure the accuracy of the predicted fault type label and the stability of the result.
[0101]
[0102] Among them, D raw Let D be a three-dimensional vibration signal, and D′ be the normalized three-dimensional vibration signal, with max D. raw Min D represents the maximum value of the three-dimensional vibration signal. raw This represents the minimum value of the three-dimensional vibration signal. The normalized three-dimensional vibration signal data is distributed in the interval [0,1].
[0103] Furthermore, the normalized three-dimensional vibration signal data is subjected to Fourier transform according to formula (3) to transform it into a three-dimensional frequency domain signal;
[0104]
[0105] Where D′(t) represents the change of the three-dimensional vibration signal on the time axis, This represents the Fourier transform of a three-dimensional vibration signal that changes along the time axis, where D(ω) represents the three-dimensional frequency domain signal and ω represents the frequency of the three-dimensional frequency domain signal.
[0106] like Figure 3 The diagram shows the three-dimensional frequency domain signal of the motor under normal conditions and different fault types. The vertical axis, Amplitude, represents the amplitude of the three-dimensional vibration signal. NOR indicates a normal motor, RIB indicates rotor imbalance fault, LB indicates loose motor base fault, RMA indicates rotor misalignment fault, BRB indicates broken rotor bar fault, AGE0 indicates 0° air gap eccentricity fault, AGE23 indicates 23° air gap eccentricity fault, BFIR indicates bearing inner ring fault, BFOR indicates bearing outer ring fault, BFR indicates bearing roller fault, and BFM indicates mixed bearing fault. Each fault type corresponds to its own three-dimensional motor frequency spectrum.
[0107] Because of the symmetry of the Fourier transform, the data of the three-dimensional frequency domain signal is halved and then spliced in the vertical direction to obtain the fused vibration signal as a sample dataset.
[0108] The expression for the fused vibration signal D is given in formula (3.1);
[0109]
[0110] Among them, D x D y and D z The signal is a three-dimensional frequency domain signal, and the size of the fused vibration signal data is (3, 256).
[0111] Halving the data from the three-dimensional frequency domain signal and stitching it vertically yields more accurate and higher-resolution fused vibration data. This facilitates more precise extraction of vibration signal features, leading to more accurate fault location. Furthermore, fused vibration data exhibits stronger noise immunity compared to three-dimensional frequency domain signals, improving data quality and reliability.
[0112] Embodiment 2 of the present invention provides a model training method. After obtaining the historical vibration signal of the motor and its corresponding fault type label, the historical vibration signal is preprocessed. The preprocessing includes data segmentation and frequency domain transformation, and the frequency domain transformation includes a normalization process. The historical vibration signal is segmented into segments using the sliding window method, thereby reducing the computational load of each segment, reducing the occupation of computational resources, improving computational efficiency, and facilitating subsequent frequency domain transformation operations. Normalization is used to distribute the three-dimensional vibration signal data in the interval [0,1], eliminating the adverse effects of singular sample data on subsequent Fourier transforms. The time-domain signal is converted into a frequency-domain signal using Fourier transform, and the frequency-domain signal is halved and spliced vertically to obtain a fused vibration signal, which facilitates more accurate extraction of vibration signal features, unifies the signal form, and improves the accuracy of data input into the one-dimensional convolutional neural network model.
[0113] Example 3
[0114] Embodiment 3 of the present invention proposes a model training method. Based on Embodiment 2, it uses the cross-entropy loss function and the Adam function, which can improve the adaptive learning rate, to participate in the parameter update of the model training, so as to optimize the one-dimensional convolutional neural network model and improve the accuracy and diagnostic efficiency of the model.
[0115] Training a constructed one-dimensional convolutional neural network model using at least a portion of the sample dataset to obtain the target one-dimensional convolutional neural network model includes:
[0116] The cross-entropy loss function is used to calculate the loss value between the actual output fault type label probability and the predicted fault type label probability, and the loss value is used to optimize the parameters of the one-dimensional convolutional neural network model.
[0117] Training is stopped when the model training convergence condition is met, and the target one-dimensional convolutional neural network model is obtained.
[0118] Specifically, the conditions for model training convergence are convergence of the cross-entropy loss function, parameter stability, and validation set accuracy stability. Cross-entropy loss function convergence is defined as the model converging when the loss function reaches a stable value close to its minimum and remains unchanged. Parameter stability is defined as the model converging when the model's parameters change very little or reach a near-stable state. Validation set accuracy stability is defined as the model converging when its accuracy on the validation set remains stable over a period of time.
[0119] The cross-entropy loss function is commonly used in classification tasks in machine learning, especially when the model's output is a probability distribution for multiple classes. The optimization logic of the cross-entropy loss function involves minimizing the difference between the predicted probability distribution and the true probability distribution.
[0120] The cross-entropy loss function L is defined by formula (4):
[0121]
[0122] Where N² is the number of examples participating in model training, and each example has C possible fault types; y i =[y i1 ,y i2 ,…,y iC ] represents the true probability distribution of the i-th example in each fault type; when the j-th class is the true fault type of the i-th example, y ij =1, when the j-th type is not the true fault type of the i-th example, y ij =0; p i =[p i1 ,p i2 ,…,P iC ] represents the predicted probability distribution of the i-th example for each fault type, where p ij It is the predicted probability of the fault type of the j-th example.
[0123] The optimization process involves finding the model parameter values that minimize the cross-entropy loss function. This can be achieved using gradient descent or optimization algorithms such as Adam and RMSprop, thereby enabling faster model convergence and optimization. The gradient of the cross-entropy loss function relative to the predicted probability distribution can be derived using formula (4.1):
[0124]
[0125] The gradient of the cross-entropy loss function with respect to the parameters of a one-dimensional convolutional neural network model can be obtained using the chain rule of calculus. The single parameter w of the k-th layer of the model... kl1 The update rule can be expressed by formula (4.2):
[0126]
[0127] Among them, w kl2 The updated parameters are defined by lr, a hyperparameter used to control the update size in each iteration.
[0128] Specifically, the Adam function can be used to minimize the loss function, and the cross-entropy loss function can be used to calculate the loss value between the actual output fault type label probability and the predicted fault type label probability. Based on this loss value, the parameters of the one-dimensional convolutional neural network model can be optimized, including:
[0129] The cross-entropy loss function is used to calculate the loss value between the actual output fault type label probability and the predicted fault type label probability.
[0130] The Adam function is used to determine the gradient value corresponding to the loss value, and the parameters of the one-dimensional convolutional neural network model are updated based on the gradient value.
[0131] Iterate through the above process until the cross-entropy loss function is minimized.
[0132] Specifically, Adam is an optimization algorithm widely used in deep learning. It uses the Adam function combined with the cross-entropy loss function to continuously update the parameters of a one-dimensional convolutional neural network. It combines the advantages of stochastic gradient descent (SGD) and root mean square propagation (RMSprop) optimization methods and is designed to be computationally efficient and robust to noisy gradients.
[0133] The Adam algorithm calculates an adaptive learning rate for each parameter by storing past gradients and the exponentially decaying average of squared gradients, and then normalizes the learning rate using first and second moment estimates of the gradients. These normalized gradients are then combined with the previous update using a momentum term to calculate the parameter update.
[0134] The steps of the Adam algorithm can be summarized as follows:
[0135] S1: The network parameters θ t , including weights and biases, initialized to random values;
[0136] S2: The first-order moment variable m t and the second moment variable v t Initialize as a zero vector with the same dimensions as the parameter;
[0137] S3: Initialize the time step t to 0;
[0138] S4: For each training example mini-batch, calculate the gradient of the loss function with respect to the parameters using formula (5), and update the first moment variable m using formula (5.1). t and the second moment variable v t ;
[0139]
[0140]
[0141] Where, m t+1 It is the updated first moment, v t+1 β1 is the updated second moment, β2 is the decay rate estimated by the first moment, and β2 is the decay rate estimated by the second moment; β1 is usually set to 0.9, and β2 is usually set to 0.999.
[0142] The first moment estimate of the bias correction is calculated using formulas (5.2) and (5.3). and second-order moment estimation
[0143]
[0144]
[0145] Update the parameters using formula (5.4);
[0146]
[0147] Where, θ t+1 The updated parameters are: α is the learning rate, usually set to a small value, such as 0.001; ε is a small constant added to the denominator to maintain numerical stability, usually set to 10. -8 .
[0148] S5: Increase the time step t.
[0149] The Adam algorithm combines the advantages of SGD and RMSprop optimization methods, and can effectively update the parameters of a one-dimensional convolutional neural network, thereby achieving better training results.
[0150] Furthermore, the training data was divided into training, test, and validation sets in a 6:2:2 ratio. The one-dimensional convolutional neural network model was optimized using the Adam loss optimizer with a learning rate of 0.001. The cross-entropy loss function was used to calculate the loss value of the one-dimensional convolutional neural network model, continuously optimizing the model parameters during training to improve accuracy and robustness. Parameter validation was performed simultaneously with network training. Each time, 32 sets of data were randomly selected from the training set to form a batch of data input to the network, effectively reducing computational resource consumption and computational complexity. After each training epoch, the parameters were optimized and adjusted based on the model's performance on the validation set. A total of 20 epochs of training were conducted. During training, the model's loss value and accuracy were recorded after each epoch, and the trained model was saved, avoiding overfitting and improving the model's generalization ability.
[0151] Preferably, the model training method includes compressing the parameters of the target one-dimensional convolutional neural network, and / or merging the one-dimensional convolutional layers and one-dimensional max-pooling layers of the target one-dimensional convolutional neural network into a one-dimensional pooling layer. Specifically, compressing the parameters of the target one-dimensional convolutional neural network includes: extracting and flattening the parameters of the target one-dimensional convolutional neural network model to obtain a one-dimensional parameter vector; using the K-means clustering algorithm to cluster all one-dimensional parameter vectors into K clusters and determining the centroid of each cluster; and replacing the parameters in each one-dimensional parameter vector with the centroid of the corresponding cluster.
[0152] Specifically, the number of clusters K is selected through hyperparameter search, and the one-dimensional parameter vector is replaced with the centroids of K clusters. Hyperparameter search is a process of optimizing the model by trying different combinations of hyperparameters, such as learning rate and regularization coefficient. The centroid is the center point of each cluster, which is the average of all observations in that cluster. Replacing the one-dimensional parameter vector with the centroids of K clusters means compressing the original data to K points, which helps reduce redundant information in the model and improve computational efficiency. Merging the one-dimensional convolutional layer and the one-dimensional max pooling layer into a one-dimensional pooling layer effectively reduces the size of the target one-dimensional convolutional neural network model and improves prediction speed.
[0153] Embodiment 3 of this invention provides a model training method that utilizes the cross-entropy loss function to calculate the loss between the actual output fault type label probability and the predicted fault type label probability, thereby better measuring the difference between the true probability distribution and the predicted probability distribution. The Adam function is used to optimize the loss, improving the effectiveness and accuracy of model training. After the one-dimensional convolutional neural network model training is completed, the K-means clustering algorithm is used to replace the weights with the centroids of K clusters, reducing the high-dimensional data space to a low-dimensional data space and removing interference information. The one-dimensional convolutional layer and the one-dimensional max-pooling layer are then merged, improving the performance of the one-dimensional convolutional neural network model.
[0154] Example 4
[0155] Embodiment 4 of the present invention provides a motor fault diagnosis method, which uses the target one-dimensional convolutional neural network model in Embodiments 1-3 above to perform fault prediction, thereby improving the diagnostic efficiency of the model.
[0156] A method for diagnosing motor faults, such as Figure 4 As shown, it includes:
[0157] S11: Collects real-time vibration signals from the motor;
[0158] S12: Input to the target one-dimensional convolutional neural network model, output the predicted fault type label;
[0159] The layers of the target one-dimensional convolutional neural network are, in order: input layer, one-dimensional pooling layer, random deactivation layer, flattening layer, first fully connected layer, and second fully connected layer.
[0160] S12: Input to the target one-dimensional convolutional neural network model, including: S121: Using an input layer to receive real-time vibration signals; S122: Using a one-dimensional merging layer to reduce the spatial size of the feature map and retain the main feature information; S123: Using a random deactivation layer to reduce overfitting of the one-dimensional convolutional neural network model; S124: Using a flattening layer to reduce the feature map to one dimension; S125: Using a first fully connected layer to perform a linear transformation on the feature map reduced to one dimension; S126: Using a second fully connected layer to classify the linearly transformed feature map and output the predicted fault type label.
[0161] Preferably, a motor fault diagnosis method is applied to the equipment-side microcontroller. The target one-dimensional convolutional neural network model is deployed on the equipment-side microcontroller, realizing real-time analysis and monitoring of faults by the equipment, and improving the robustness and reliability of the system.
[0162] Embodiment 4 of the present invention provides a motor fault diagnosis method, which collects real-time vibration signals of the motor, inputs them into a target one-dimensional convolutional neural network model, and outputs predicted fault type labels. The layers of the target one-dimensional convolutional neural network are, in order, an input layer, a one-dimensional pooling layer, a random deactivation layer, a flattening layer, a first fully connected layer, and a second fully connected layer. The input layer is used to receive real-time vibration signals, the one-dimensional pooling layer is used to reduce the spatial size of the feature map and retain the main feature information, the random deactivation layer is used to reduce overfitting of the one-dimensional convolutional neural network model, the flattening layer is used to reduce the feature map to one dimension, the first fully connected layer is used to perform a linear transformation on the feature map reduced to one dimension, and the second fully connected layer is used to classify the linearly transformed feature map and output predicted fault type labels. The target one-dimensional convolutional neural network model has low power consumption and does not consume excessive computing resources. Furthermore, the structure of the target one-dimensional convolutional neural network model is optimized to reduce the model's depth and complexity, thereby improving the efficiency of model diagnosis. The first random deactivation layer is placed between the one-dimensional max pooling layer and the flattening layer, which improves model performance and reduces the risk of overfitting.
[0163] Meanwhile, the aforementioned one-dimensional convolutional neural network model has a simple structure and strong adaptability, and can process vibration signals in real time, which greatly reduces the computational load of model prediction. This allows the model to be deployed on the device controller, effectively preventing motor failures and reducing equipment downtime. Moreover, the collected motor data is stored on the local device without having to upload the data to the cloud platform, reducing data storage costs, reducing network traffic usage, reducing the risk of privacy leaks, and improving the robustness and reliability of the system.
[0164] Example 5
[0165] Embodiment 5 of the present invention provides a motor fault diagnosis method. Based on Embodiment 4, the motor fault diagnosis method is applied to a microcontroller and used to realize real-time analysis and monitoring of fault diagnosis data.
[0166] A method for diagnosing motor faults, such as Figure 5 As shown, it includes:
[0167] S21: Call the initialization function to initialize the target one-dimensional convolutional neural network model and communication interface;
[0168] S22: Real-time vibration signal data is acquired using a communication interface;
[0169] S23: Preprocess the real-time vibration signal; the preprocessing includes: segmenting the real-time vibration signal and normalizing it, and performing a Fourier transform on the normalized data to obtain frequency domain data;
[0170] S24: A target one-dimensional convolutional neural network model is used to predict the frequency domain data to obtain the predicted fault type label.
[0171] Specifically, S24 is to call the C model of the target one-dimensional convolutional neural network model to predict the frequency domain data and obtain the predicted fault type label; the C model is a model that converts the target one-dimensional convolutional neural network model into C language code.
[0172] The correlation settings of the three-dimensional vibration signal input to the target one-dimensional convolutional neural network model are set in the object tlsm6dsl defined by the structure T_LSM6DSL_TYPE, which includes the received signal, the receiving function, the receiving flag, etc.
[0173] The communication interface collects real-time vibration signals from external sensors; the real-time vibration signals are obtained by the sensor through the SPI communication protocol and after parsing and processing; the SPI communication is a serial peripheral device interface; the sensor can be an LSM6DSL smart sensor, and the real-time vibration signal is a triaxial vibration acceleration signal; the triaxial vibration acceleration signal data has a total of 16 bits, and the acceleration data of each axis is stored in two registers respectively. Thus, tlsm6dsl.reg_buf is a 512×6 vector, in which the low bit of the X-axis, the high bit of the X-axis, the low bit of the Y-axis, the high bit of the Y-axis, the low bit of the Z-axis, and the high bit of the Z-axis are stored from 0 to 5 respectively. To convert it into Earth acceleration, the high bit and the low bit data need to be merged. The sensor parses and processes the triaxial vibration acceleration signal according to formula (6);
[0174]
[0175] in, This is the high-order data on the X-axis. For the low-order data of the X-axis, Sensitivity is the weight of formula (6), g is the Earth's acceleration, and Sensitivity = 4.88 × 10 -4 g = 9.8 m / s 2 .
[0176] This process merges the low-order and high-order data of each axis according to certain rules. Taking the X-axis data as an example, the high-order data is merged... Shift left by 8 bits and merge with the lower-order data. Adding these values together and multiplying them by the weights Sensitivity and Earth acceleration g in formula (6), the acceleration values of the three axes can be combined into a three-dimensional vector, representing the acceleration of the motor on the X, Y, and Z axes. This makes it easier for the one-dimensional convolutional neural network model to better analyze the three-dimensional vibration signals collected by the sensor, and thus better apply it to various vibration monitoring and fault diagnosis control systems.
[0177] The real-time vibration signal is preprocessed, including segmenting and normalizing the signal, and then performing a Fourier transform on the normalized data to obtain frequency domain data. In the segmentation stage, the real-time vibration signal is segmented according to time sequence, facilitating the analysis of three-dimensional vibration signal data within different time periods. In the normalization stage, the segmented three-dimensional vibration signal data is standardized so that the data is distributed within the interval [0,1], allowing for comparison and analysis of data from different time periods. In the Fourier transform stage, the normalized three-dimensional vibration signal data is transformed from the time domain to the frequency domain, facilitating the analysis of its spectral characteristics, and then inputting it into the target one-dimensional convolutional neural network model.
[0178] When calling the C model of the target one-dimensional convolutional neural network model to predict frequency domain data, it can be achieved through a set of well-defined ai_mvsa_network_XXX() functions. The ai_mvsa_network_XXX() function includes multiple functions such as initialization, obtaining weight parameters, activation parameters, input and output, and commonly used functions are shown in Table (1).
[0179] function Function Prediction process ai_mvsa_network_create_and_init() Model creation and initialization ai_mvsa_network_inputs_get() Model input pointer definition initialization ai_mvsa_network_outputs_get() Model output pointer definition AI_HANDLE_PTR() Update I / O handler ai_mvsa_network_run() Model prediction predict ai_mvsa_network_get_error() Returning model running error
[0180] Table (1)
[0181] The prediction process of a target one-dimensional convolutional neural network model mainly consists of two parts: the initialization process and the prediction process.
[0182] Specifically, such as Figure 6As shown, the initialization process first uses the `create_and_init()` function to create and initialize the C model, and simultaneously uses `inputs / outputs_get()` to define input and output pointers to store input and output data. Then, during the prediction process, `AI_HANDLE_PTR()` updates the I / O handler, executes the prediction function `ai_mvsa_network_run()` to obtain the output data, and retrieves errors from the `get_error()` function. This implementation converts the target one-dimensional convolutional neural network model into a C language model, facilitating embedding into other systems and reducing the amount of coding work.
[0183] The obtained frequency domain data is flattened into a one-dimensional data structure of length 768 and assigned to the input pointer of the target one-dimensional convolutional neural network model. This effectively converts the frequency domain data into the input format required by the target one-dimensional convolutional neural network model, performs initialization and prediction operations, and finally obtains the output pointer. Since the second fully connected layer of the target one-dimensional convolutional neural network model is activated using the softmax (random deactivation) function, the output pointer points to a one-dimensional vector of length 11, which contains the comprehensive analysis results of 11 fault types. The position of the maximum value is the fault label predicted by the model. This method effectively utilizes the target one-dimensional convolutional neural network model to analyze the frequency domain data, improving the efficiency and accuracy of the target one-dimensional convolutional neural network model.
[0184] Preferably, a motor fault diagnosis method further includes converting the encoded fault type label into a string type fault type label and outputting it to Bluetooth. The fault type label corresponding to the position of the maximum value in the vector pointed to by the output pointer is converted into a string type for easy transmission to the Bluetooth Low Energy module SKB501 via USART serial communication. The predicted fault type is sent to Bluetooth in a blocking manner by calling the HAL library's transmission function HAL_UART_Transmit().
[0185] The nRF Connect APP is used on the mobile phone to achieve Bluetooth pairing and data reception. Once the MCU and the mobile phone are successfully paired, data can be sent and received via BLE connection. Finally, the smart sensor is installed on the motor, and the real-time analysis results of motor vibration can be obtained on the mobile phone, realizing real-time fault diagnosis and monitoring.
[0186] Embodiment 5 of the present invention provides a motor fault diagnosis method. The main process is as follows: calling an initialization function to initialize a target one-dimensional convolutional neural network model and a communication interface; using the communication interface to collect real-time vibration signal data; preprocessing the real-time vibration signal; the preprocessing includes: segmenting the real-time vibration signal and normalizing it; performing a Fourier transform on the normalized data to obtain frequency domain data; calling the C model of the target one-dimensional convolutional neural network model to predict the frequency domain data and obtain the predicted fault type label, so as to achieve accurate fault diagnosis and prediction, and improve the accuracy and real-time performance of the target one-dimensional convolutional neural network model.
[0187] Based on the above-described motor fault diagnosis method, this invention also discloses a microcontroller disposed at the device end. This microcontroller, incorporating the aforementioned motor fault diagnosis method, enables real-time analysis and monitoring of the motor's condition at the device end, reducing the impact of faults on the device and improving its operating efficiency and stability.
[0188] To verify the model's performance, a microcontroller (optional STM32) incorporating the aforementioned one-dimensional convolutional neural network model is placed within a smart sensor (optional LSM6DSL) on the device side. The smart sensor is used to monitor the motor in real time, obtaining the monitoring results. The monitoring results are analyzed from two aspects: the accuracy of motor fault type identification and the execution time of the smart sensor.
[0189] First, verify the accuracy of motor fault type identification. For example... Figure 7 The confusion matrix shown is an indicator for evaluating model results and is part of model evaluation, used to assess the model's performance. The horizontal axis represents the predicted fault type label, and the vertical axis represents the true fault type label. NOR indicates a normal motor, RIB indicates rotor imbalance, LB indicates a loose motor base, RMA indicates rotor misalignment, BRB indicates a broken rotor bar, AGE0 indicates 0° air gap eccentricity, AGE23 indicates 23° air gap eccentricity, BFIR indicates a bearing inner ring fault, BFOR indicates a bearing outer ring fault, BFR indicates a bearing roller fault, and BFM indicates a mixed bearing fault. From the 1200 data sets in the figure, only 94 data sets with the true fault type label "RMA" showed one incorrect prediction; the remaining 93 sets were correctly predicted. Therefore, the microcontroller's accuracy in identifying the motor state is approximately 1199 / 1200 ≈ 99.92%.
[0190] Table (2) shows a comparison of the performance of the C model deployed on the STM32 microcontroller (STM32 C-model) and the original model in the host computer, as well as the cross-validation (X-cross) of their outputs; where ACC is the accuracy, RMSE is the root mean square error, MAE is the mean absolute error, and L2R is the learning ranking index. Cross-validation uses the recognition result of the original model as a reference and is an indicator to evaluate the difference between the original model and the C model. Here, the cross-validation is 100%. Therefore, it can be considered that the recognition result of the one-dimensional convolutional neural network in the microcontroller is exactly the same as the verification result of the host computer.
[0191] ACC RMSE MAE L2R STM32 C-model 99.92% <![CDATA[1.141×10 -2 ]]> <![CDATA[1.923×10 -4 ]]> <![CDATA[3.784×10 -2 ]]> Original model 99.92% <![CDATA[1.141×10 -2 ]]> <![CDATA[1.923×10 -4 ]]> <![CDATA[3.784×10 -2 ]]> X-cross 100% <![CDATA[1.7×10 -8 ]]> <![CDATA[2×10 -9 ]]> <![CDATA[5.6×10 -8 ]]>
[0192] Table (2)
[0193] Second, the real-time performance of the smart sensor is analyzed. In a real-time diagnostic process according to one embodiment of the present invention, such as... Figure 8 As shown, the real-time monitoring process of the sensor is divided into three modules: data acquisition and preprocessing (acquire_and_preprocess_data), model prediction (aiRun), and data post-processing (post_process). Experiments showed that the average time for each real-time diagnostic operation was 219.84 ms. The data acquisition and preprocessing module took the longest, averaging 163.39 ms, followed by the data post-processing module at 39.30 ms, and finally the model prediction module at 17.15 ms.
[0194] Therefore, it can be seen that intelligent sensors have high real-time performance in motor fault monitoring. By instantly detecting and diagnosing the operating status of the motor, motor faults can be effectively prevented, equipment downtime can be reduced, and production efficiency can be improved.
[0195] This invention can process and analyze data in real time and quickly; it has low power consumption and cost; it is highly secure, eliminating the need to upload all data to a cloud platform, thus reducing privacy leaks and network traffic; and the fault diagnosis model can be specifically adjusted according to the technical characteristics of motor fault diagnosis and actual industrial needs, making it easy to update and iterate.
[0196] It should be understood that the specific embodiments described above are merely illustrative or explanatory of the principles of the invention and do not constitute a limitation thereof. Therefore, any modifications, equivalent substitutions, improvements, etc., made without departing from the spirit and scope of the invention should be included within the protection scope of the invention. Furthermore, the appended claims are intended to cover all variations and modifications falling within the scope and boundaries of the appended claims, or equivalent forms of such scope and boundaries.
Claims
1. A model training method, characterized in that, include: The historical vibration signals of the motor and their corresponding fault type labels are obtained to generate a sample dataset; the historical vibration signals are three-dimensional vibration signals that are continuous in the time domain. Training a constructed one-dimensional convolutional neural network model using at least a portion of the sample dataset to obtain a target one-dimensional convolutional neural network model includes: The cross-entropy loss function is used to calculate the loss value between the actual output fault type label probability and the predicted fault type label probability, and the parameters of the one-dimensional convolutional neural network model are optimized based on the loss value. Training is stopped when the model training convergence condition is met, and the target one-dimensional convolutional neural network model is obtained. The method further includes: Compression of the parameters of the target one-dimensional convolutional neural network includes: The parameters of the target one-dimensional convolutional neural network model are extracted and flattened to obtain a one-dimensional parameter vector; The K-means clustering algorithm is used to cluster all the one-dimensional parameter vectors into K clusters and the centroid of each cluster is determined. Replace the parameter in each of the one-dimensional parameter vectors with the centroid of the corresponding cluster; The layers of the one-dimensional convolutional neural network are, in order, an input layer, a one-dimensional convolutional layer, a one-dimensional max pooling layer, a random deactivation layer, a flattening layer, a first fully connected layer, and a second fully connected layer. The system employs the following steps: an input layer to receive the historical vibration signal; a one-dimensional convolutional layer to extract features from the historical vibration signal data and output a feature map; a one-dimensional max-pooling layer to sample the feature map; a random deactivation layer to remove some neurons from the one-dimensional convolutional neural network model; a flattening layer to reduce the feature map to one dimension; a first fully connected layer to perform a linear transformation on the reduced one-dimensional feature map; and a second fully connected layer to classify the linearly transformed feature map and output the fault type label.
2. The model training method according to claim 1, characterized in that, After acquiring the historical vibration signals of the motor and their corresponding fault type labels, the following preprocessing is included: The sample dataset is generated by segmenting the continuous historical vibration signal in the time domain using the sliding window method. The length of the sliding window for the segmentation is The sliding step size is The total number of sampling points for the historical vibration signal data is The total number of samples in the final sample dataset is then... The calculation formula (1) is: 。 3. The model training method according to claim 2, characterized in that, The length of the sliding window Equal to the sample length, the sample length is One sampling point; or, The sample length is One sampling point; in, It is a positive integer.
4. The model training method according to claim 1, characterized in that, After acquiring the historical vibration signals of the motor and their corresponding fault type labels, the following preprocessing is also included: The time-domain continuous three-dimensional vibration signal is normalized according to formula (2); in, The three-dimensional vibration signal, The normalized three-dimensional vibration signal, This represents the maximum value of the three-dimensional vibration signal. This represents the minimum value of the three-dimensional vibration signal; The normalized three-dimensional vibration signal data is subjected to Fourier transform according to formula (3) to transform it into a three-dimensional frequency domain signal; in, This represents the change of the three-dimensional vibration signal on the time axis. This indicates that the Fourier transform is performed on the three-dimensional vibration signal that varies along the time axis. This represents the three-dimensional frequency domain signal. Represents the frequency of a three-dimensional frequency domain signal; The three-dimensional frequency domain signal data is halved and then spliced in the vertical direction to obtain a fused vibration signal, which is used as the sample dataset.
5. The model training method according to claim 1, characterized in that, The cross-entropy loss function is defined by formula (4): in, The number of examples participating in model training, each example has One possible type of failure; Indicates the first The true probability distribution of each example for each fault type; when the... The class is the first When considering the actual fault types in a given example When the first Class is not the first When considering the actual fault types in a given example ; Indicates the first Examples of predicted probability distributions for each fault type, where It is the first The first example Predicted probability of fault type for each class.
6. The model training method according to claim 5, characterized in that, The step of calculating the loss value between the actual output fault type label probability and the predicted fault type label probability using the cross-entropy loss function, and optimizing the parameters of the one-dimensional convolutional neural network model based on the loss value, includes: The cross-entropy loss function is used to calculate the loss value between the actual output fault type label probability and the predicted fault type label probability. The Adam function is used to determine the gradient value corresponding to the loss value, and the parameters of the one-dimensional convolutional neural network model are updated based on the gradient value. Iterate the above process until the loss value of the cross-entropy loss function is minimized.
7. The model training method according to claim 6, characterized in that, Also includes: The one-dimensional convolutional layer and the one-dimensional max pooling layer of the target one-dimensional convolutional neural network are merged into a single one-dimensional pooling layer.
8. A method for diagnosing motor faults, applied to the target one-dimensional convolutional neural network model as described in claims 1-7, characterized in that, include: The real-time vibration signal of the motor is collected and input into the target one-dimensional convolutional neural network model, which outputs the predicted fault type label. The layers of the target one-dimensional convolutional neural network are, in order, an input layer, a one-dimensional pooling layer, a random deactivation layer, a flattening layer, a first fully connected layer, and a second fully connected layer. The input layer is used to receive the real-time vibration signal; the one-dimensional merging layer is used to reduce the spatial size of the feature map while retaining the main feature information; the random deactivation layer is used to remove some neurons in the target one-dimensional convolutional neural network model; the flattening layer is used to reduce the feature map to one dimension; the first fully connected layer is used to perform a linear transformation on the feature map reduced to one dimension; and the second fully connected layer is used to classify the feature map after the linear transformation and output the predicted fault type label.
9. The motor fault diagnosis method according to claim 8, characterized in that, The motor fault diagnosis method is applied to the device-side microcontroller, and the target one-dimensional convolutional neural network model is deployed on the device-side microcontroller.
10. The motor fault diagnosis method according to claim 9, characterized in that, The motor fault diagnosis method is applied to a device-side microcontroller, and the target one-dimensional convolutional neural network model is deployed on the device-side microcontroller, including: Call the initialization function to initialize the target one-dimensional convolutional neural network model and communication interface; The real-time vibration signal data is acquired using the communication interface. The real-time vibration signal is preprocessed; the preprocessing includes: segmenting the real-time vibration signal and normalizing it, and performing a Fourier transform on the normalized data to obtain frequency domain data. The target one-dimensional convolutional neural network model is used to predict the frequency domain data to obtain the predicted fault type label.
11. The motor fault diagnosis method according to claim 10, characterized in that, The real-time vibration signal data is acquired using the communication interface, including: The communication interface acquires the real-time vibration signal from an external sensor; the real-time vibration signal is acquired by the sensor and processed according to formula (6); the real-time vibration signal is a triaxial vibration acceleration signal; the triaxial vibration acceleration signal data has a total of 16 bits, and the acceleration data of each axis is stored in two registers respectively; in, This refers to the high-order data of the triaxial vibration acceleration signal on the X-axis. This refers to the low-order data of the triaxial vibration acceleration signal on the X-axis. The data of the triaxial vibration acceleration signal on the X-axis. is the weight of the formula (6), and g is the Earth's acceleration.
12. A microcontroller, disposed at the device end, characterized in that, The microcontroller is equipped with the target one-dimensional convolutional neural network model as described in any one of claims 1-7, and is used to execute the motor fault diagnosis method as described in any one of claims 8-11.