CNN-Transform-based motor fault diagnosis scheme and system
Through the deep learning architecture based on CNN-Transformer, combined with the self-attention mechanism of Convolutional neural network and Transformer, the problems of low efficiency and poor reliability of traditional motor fault diagnosis are solved, efficient fault identification and early warning are achieved, and industrial production is improved stability and equipment life.
Patent Information
- Application Number
- CN202410808830.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-11-12
AI Technical Summary
Traditional motor fault diagnosis methods rely on expert experience and human operation, and the diagnosis efficiency is low, the reliability is poor and the cost is high, so it is impossible to effectively and quickly identify motor faults.
Using a deep learning architecture based on CNN-Transformer, a convolutional neural network model is constructed by collecting motor production data, and combining Transformer's self-attention mechanism to diagnose motor faults, and using data enhancement to improve model accuracy.
It improves the accuracy and speed of motor fault diagnosis, can detect faults in early stages, shorten the fault recovery time, improves the professional capabilities of on-site maintenance personnel, ensures the stability of industrial production and extends the life of equipment.
Smart Images

Figure CN118937991A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of data processing and relates to a motor fault diagnosis system, specifically a motor fault diagnosis system based on CNN-Transformer. Background Art
[0002] With the rapid development of modern industrialization, motor equipment has been widely used in various industrial fields. However, due to the long operation time of the motor, the on-site environment or human operation factors, motor equipment failures frequently occur, and manual troubleshooting is required after the failure occurs, which is time-consuming and labor-intensive. Traditional motor fault diagnosis methods mainly come from expert experience and analysis of on-site operators, with low diagnostic efficiency, poor reliability and high cost. In recent years, with the rapid development of technologies such as artificial intelligence and machine learning, a new solution has been provided for fault diagnosis of motor equipment.
[0003] CNN-Transformer is a deep learning architecture that combines convolutional neural network (CNN) and Transformer model. This architecture aims to take full advantage of CNN's advantages in local feature extraction and Transformer's powerful capabilities in global information modeling and self-attention mechanism.
[0004] CNN usually consists of multiple convolutional layers, each of which extracts local features of the input data by sliding the convolution kernel. These features are gradually abstracted in the process of layer-by-layer transmission, so that key information such as edges, textures, and shapes in the image can be captured. However, CNN may have certain limitations in processing global information because it mainly relies on local receptive fields and hierarchical feature transmission. To make up for this deficiency of CNN, the Transformer model was introduced into the CNN-Transformer architecture. The Transformer model can directly model any position in the input sequence through the self-attention mechanism, thereby capturing global dependencies and information. This has enabled the Transformer to achieve remarkable results in processing sequence data, such as text in natural language processing tasks. In the CNN-Transformer architecture, the common practice is to first use CNN to extract features from the input image, and then pass the extracted features to the Transformer model for further processing. In this way, CNN-Transformer can simultaneously utilize the local feature extraction capabilities of CNN and the global information modeling capabilities of Transformer, thereby achieving better performance in computer vision tasks such as image recognition, object detection, and semantic segmentation.
[0005] In general, CNN-Transformer is a powerful deep learning architecture that combines the respective advantages of CNN and Transformer to more comprehensively process image data and improve the performance of the model. Summary of the invention
[0006] The present application provides a motor fault diagnosis system based on CNN-Transformer to improve the diagnosis accuracy and diagnosis rate.
[0007] A motor fault diagnosis method based on CNN-Transformer includes the following steps:
[0008] S1 first collects relevant production data of the motor, pre-processes the data and makes it into a production data set;
[0009] S2 builds a convolutional neural network model;
[0010] S3 imports the database, selects several sub-datasets from it, uses the sub-datasets to train the convolutional neural network model constructed in step S2, and improves the accuracy of the convolutional neural network model through data enhancement;
[0011] S4 inputs the production data set collected in step S1 into the convolutional neural network model after data enhancement in S3, and calculates the obtained diagnosis result;
[0012] S5 outputs the diagnosis results as a table or curve to analyze whether a fault will occur.
[0013] Moreover, the relevant production data described in step S1 include: current, voltage, magnetic flux, temperature, and vibration.
[0014] Moreover, the convolutional neural network model in step S2 is expressed by the formula:
[0015] S(i,j)=(I*K)(i,j)= m ∑ n ∑I(im,jn)K(m,n)
[0016] Among them, I is the input data, K is the convolution kernel, S is the output data feature, (i, j) is the position coordinate on the output feature, (m, n) is the position coordinate on the convolution kernel. After the convolution layer, an activation function is applied to increase the nonlinearity of the model. The activation function RELU function formula applied is:
[0017] f(x)=max(0,x)
[0018] Where x is the output of the convolutional layer and f(x) is the output of the activation function;
[0019] The formula representation of Transformer mainly involves its core mechanism - the self-attention mechanism. The self-attention mechanism allows the model to calculate the representation of each position based on the interactions between different positions in the input sequence. Its key steps include the calculation of query Query, key Key and value Value. For each position i in the input sequence, the query vector Q_i, key vector K_i and value vector V_i are calculated according to its characteristics. Secondly, the dot product of the query vector Q_i and all key vectors K_j is calculated to get the score, which is then normalized by the softmax function to get the correlation score between position i and other positions j. Finally, the correlation score is multiplied with the corresponding value vector V_j and summed to get the contextual representation of position i.
[0020] Furthermore, the database described in step S3 uses a bearing data set of the Rolling Bearing Center of Case Western Reserve University.
[0021] Moreover, the training process described in step S3 is specifically as follows:
[0022] First, the motor fault sample data is collected and preprocessed. After preprocessing, the data is merged with the bearing data set of the Rolling Bearing Center of Case Western Reserve University and divided into training set, validation set and test set for subsequent model training and evaluation.
[0023] Secondly, build a CNN-Transformer network model, combine the respective advantages of CNN and Transformer, and determine the parameters of the model, such as the size and number of convolution kernels and the network threshold;
[0024] Next, the CNN-Transformer model is trained using the training set data, the model output is calculated through forward propagation, and compared with the true label to calculate the loss function value;
[0025] Then use back propagation to update the model parameters, minimize the loss function value, set appropriate learning rate, batch size, number of iterations and other hyperparameters to ensure that the network model can learn correctly and avoid underfitting and overfitting;
[0026] Finally, a motor fault diagnosis system is built, and the CNN-Transformer model algorithm is used to diagnose motor faults and guide industrial production.
[0027] Moreover, the specific steps of data enhancement in step S3 are:
[0028] S321 adopts a window clipping method to continuously sample the historical database according to a specified length through a sliding window, thereby obtaining a series of sub-data sets;
[0029] S322 standardizes all sub-datasets to eliminate outlier data and excessive noise.
[0030] A motor fault diagnosis system based on CNN-Transformer, including
[0031] The acquisition module is used to collect relevant production data of the motors in response to possible motor failures on the production line, and then pre-process the data and create a data set;
[0032] The model building module builds a convolutional neural network and obtains a neural network model with high accuracy through training;
[0033] The diagnosis module inputs the data set obtained by the acquisition module, performs fault diagnosis control based on the convolutional neural network, and analyzes and diagnoses whether the motor on the production line has a fault.
[0034] An electronic device comprises a processor and a memory, wherein the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods described above.
[0035] A computer-readable storage medium stores instructions, and when the instructions are executed, any one of the above methods is executed.
[0036] In summary, the technical solution provided in the embodiments of the present application has the following technical effects or advantages:
[0037] 1. Use this system to diagnose motor equipment faults. Equipment diagnosis is to check whether there are any abnormalities or conduct preventive inspections on the diagnosed object, and to identify faults when the equipment is abnormal. Equipment diagnosis is to detect motor equipment faults and early warnings as early as possible, and to solve the faults immediately and in a targeted manner after the faults are found, shortening the recovery time of the faults and improving the professional capabilities of on-site maintenance personnel in fault diagnosis, data analysis, etc., thereby ensuring the stability of industrial production, extending the performance life of the equipment in use, and effectively improving the quality of industrial products.
[0038] 2. The advantage of the present invention is that the network has high accuracy, and can provide fault warning and fault judgment for the motor equipment on the production line, thus improving the work efficiency of on-site inspection personnel. When a fault occurs, the fault diagnosis system can also quickly trace back the fault data and locate the cause of the fault, thus providing reliable technical support for the smooth operation of the electrical equipment on the production line. The existing fault diagnosis method is the manual inspection method, which is not only time-consuming and labor-intensive, but also has safety hazards. It belongs to the traditional fault diagnosis scheme. This patent application is for an intelligent fault diagnosis scheme that integrates neural networks, which has achieved economical and efficient practical significance. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 is the accuracy of the convolutional neural network training of this system;
[0040] Figure 2 It is the main screen of the fault diagnosis system;
[0041] Figure 3 It is a visual signal curve chart of this system. DETAILED DESCRIPTION
[0042] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0043] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0044] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0045] A motor fault diagnosis method based on CNN-Transformer,
[0046] S1, for motor failures that may occur on the production line, collect relevant production data of the motor, pre-process the data and make it into a production data set; the relevant motor production data collected in this embodiment include: 1. Current: The stator current signal is the main parameter for diagnosing various motor faults, because it is least affected by the environment and other external factors, and the current sensor is easy to install and the easiest to obtain. 2. Voltage: Voltage data is also one of the important parameters in motor fault diagnosis. 3. Magnetic flux: Magnetic flux data can reflect the magnetic field state of the motor. If the magnetic flux is abnormal, it may indicate that the motor has problems such as magnetic circuit failure or winding failure. 4. Temperature: Temperature data is one of the commonly used parameters in motor fault diagnosis. By monitoring the temperature of various parts of the motor, faults such as motor overheating can be discovered in time. 5. Vibration: Vibration data is another important parameter in motor fault diagnosis. By detecting the vibration of the motor, the cause and location of the motor failure can be diagnosed.
[0047] After analysis, among all motor faults, bearing-related faults account for about 40% of all mechanical fault data. Therefore, this system selects bearing-related fault data as the basis for motor fault diagnosis. It can efficiently and accurately diagnose bearing-related motor equipment faults, which plays a vital role in ensuring the stable operation of the production line.
[0048] This embodiment uses the bearing data set of the Rolling Bearing Center of Case Western Reserve University for research, which is a recognized fault diagnosis data set in the current fault diagnosis industry. The bearing data set of the Rolling Bearing Center of Case Western Reserve University is a publicly available data set used to study and evaluate the fault diagnosis and prediction methods of rolling bearings. This data set contains rolling bearing vibration signal data collected under different operating conditions, which are very valuable for developing and verifying bearing fault diagnosis algorithms. The data set usually includes multiple sub-data sets, each of which corresponds to different bearing states and fault types. These data sets may contain data on bearings in normal operation and data under various fault states, such as inner ring faults, outer ring faults, rolling element faults, etc.
[0049] S2, build a convolutional neural network model, which is expressed by the formula:
[0050] In the convolutional neural network model, the convolution operation of the convolution layer is one of its core operations, which is used to extract features from the input data. The formula of the convolution layer is expressed as:
[0051] S(i,j)=(I*K)(i,j)= m ∑ n ∑I(im,jn)K(m,n)
[0052] Among them, I is the input data, K is the convolution kernel, S is the output data feature, (i, j) is the position coordinate on the output feature, and (m, n) is the position coordinate on the convolution kernel. After the convolution layer, an activation function is applied to increase the nonlinearity of the model. The activation function RELU function formula applied is:
[0053] f(x)=max(0,x)
[0054] Here, x is the output of the convolutional layer and f(x) is the output of the activation function.
[0055] The formula representation of Transformer mainly involves its core mechanism - the self-attention mechanism. The self-attention mechanism allows the model to calculate the representation of each position based on the interaction between different positions in the input sequence. Its key steps include the calculation of query, key and value. For each position i in the input sequence, the query vector Q_i, key vector K_i and value vector V_i are calculated according to its characteristics. Secondly, the dot product of the query vector Q_i and all key vectors K_j is calculated to obtain the score, which is then normalized by the softmax function to obtain the correlation score between position i and other positions j. Finally, the correlation score is multiplied and summed with the corresponding value vector V_j to obtain the contextual representation of position i.
[0056] S3, train the model:
[0057] First, the bearing dataset of the Rolling Bearing Center of Case Western Reserve University was imported as a database, from which a sub-dataset was selected;
[0058] Since the CNN model is insensitive to the global information of the data, the transformer attention mechanism is added when designing the convolutional neural network model to enhance its ability to capture global information. The accuracy of the neural network is closely related to the quality of the input data. The best way to enhance the ability of the neural network is to input more training data. Therefore, data enhancement is used to increase the accuracy of the convolutional neural network.
[0059] Currently, data enhancement methods include image translation, flipping, scaling, etc., but they are not applicable to the bearing fault data in this embodiment. For sequence data, this embodiment adopts the window cropping method, which continuously samples the data set according to the specified length through the sliding window, thereby obtaining a series of new data as a sub-data set;
[0060] Then, the data is standardized. Standardization can improve the accuracy of the model and eliminate the influence of outlier data and excessive noise on the accuracy of the neural network. Data standardization is the normalization of data, which uniformly maps the data to the interval [0,1]. The specific method is to convert the data into a standard normal distribution, that is, the mean is 0 and the standard deviation is 1. The calculation formula is:
[0061] z=(x-μ) / σ
[0062] Among them, x is the original data, z is the standardized data, μ is the mean of the data, and σ is the standard deviation of the data.
[0063] Finally, a fault diagnosis system based on convolutional neural network is established. The program is written in Python. The system screen is as follows: Figure 3 As shown, the whole system includes three parts: the system main screen, fault analysis in table form, and fault analysis in curve form. It provides on-site professionals with the ability to not only analyze data through tables, but also analyze the causes of motor failures more directly through signal curves.
[0064] See attached Figure 2 As shown in the figure, the upper left part is a statistical analysis of the total equipment failure rate in the system in the past 7 days, the past 1 day, and the past hour. The data is plotted into a curve for operators to analyze the equipment failure situation within 7 days;
[0065] See attached Figure 3 As shown in the figure, the horizontal axis of the curve shows time, and the vertical axis shows the relevant data of the signal selected by the operator. By checking the fluctuation or step of the curve and analyzing the trend of the curve, it can be known whether the signal data in this time period is normal.
[0066] The operator observes the relevant data curves to check whether there are any abnormalities in the relevant data.
[0067] This system is compatible with other intelligent fault diagnosis methods. By embedding the CNN-Transformer diagnosis model, comparative analysis shows that the diagnosis model designed by this patent is more accurate.
[0068] A motor fault diagnosis system based on CNN-Transformer, including
[0069] The acquisition module is used to collect relevant production data of the motors in response to possible motor failures on the production line, and then pre-process the data and create a data set;
[0070] The model building module builds a convolutional neural network and obtains a neural network model with high accuracy through training;
[0071] The diagnosis module inputs the data set obtained by the acquisition module, performs fault diagnosis control based on the convolutional neural network, and analyzes and diagnoses whether the motor on the production line has a fault.
[0072] The present application also provides an electronic device, which may include: at least one processor and at least one memory.
[0073] The processor may include one or more processing cores. The processor uses various interfaces and lines to connect various parts of the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory, and calling data stored in the memory.
[0074] Optionally, the processor can be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display; and the modem is used to process wireless communications. It is understandable that the above-mentioned modem may not be integrated into the processor, but may be implemented separately through a chip.
[0075] Among them, the memory may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory includes a non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, codes, code sets or instruction sets. The memory may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory may also be optionally at least one storage device located away from the aforementioned processor. The memory as a computer storage medium may include an operating system, a network communication module, a user interface module, and an application for a motor fault diagnosis system based on CNN-Transformer.
[0076] The present application also provides a computer-readable storage medium, which stores instructions. When executed by one or more processors, the electronic device executes one or more of the methods described in the above embodiments.
[0077] In addition, each functional unit in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0078] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0079] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, it will be easy for those skilled in the art to think of other embodiments of the present disclosure. This application is intended to cover any modification, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the technical field that are not recorded in the present disclosure. The description and examples are regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A motor fault diagnosis method based on CNN-Transformer, characterized in that: The following steps are involved: S1 first collects relevant production data of the motor, pre-processes the data and makes it into a production data set; S2 builds a convolutional neural network model; S3 imports the database, selects several sub-datasets from it, uses the sub-datasets to train the convolutional neural network model constructed in step S2, and improves the accuracy of the convolutional neural network model through data enhancement; S4 inputs the production data set collected in step S1 into the convolutional neural network model after data enhancement in S3, and calculates the obtained diagnosis result; S5 outputs the diagnosis results as a table or curve to analyze whether a fault will occur.
2. The motor fault diagnosis system based on CNN-Transformer according to claim 1, characterized in that: The relevant production data described in step S1 include: current, voltage, magnetic flux, temperature, and vibration.
3. The motor fault diagnosis system based on CNN-Transformer according to claim 1, characterized in that: The convolutional neural network model in step S2 is expressed as follows: S(i,j)=(I*K)(i,j)=m∑n∑I(im,jn)K(m,n) Among them, I is the input data, K is the convolution kernel, S is the output data feature, (i, j) is the position coordinate on the output feature, (m, n) is the position coordinate on the convolution kernel. After the convolution layer, an activation function is applied to increase the nonlinearity of the model. The activation function RELU function formula applied is: f(x)=max(0,x) Where x is the output of the convolutional layer and f(x) is the output of the activation function; The formula representation of Transformer mainly involves its core mechanism - the self-attention mechanism. The self-attention mechanism allows the model to calculate the representation of each position based on the interactions between different positions in the input sequence. Its key steps include the calculation of query Query, key Key and value Value. For each position i in the input sequence, the query vector Q_i, key vector K_i and value vector V_i are calculated according to its characteristics. Secondly, the dot product of the query vector Q_i and all key vectors K_j is calculated to get the score, which is then normalized by the softmax function to get the correlation score between position i and other positions j. Finally, the correlation score is multiplied with the corresponding value vector V_j and summed to get the contextual representation of position i.
4. The motor fault diagnosis system based on CNN-Transformer according to claim 1 is characterized in that: The database described in step S3 uses a bearing data set from the Rolling Bearing Center of Case Western Reserve University.
5. The motor fault diagnosis system based on CNN-Transformer according to claim 1 is characterized in that: The training process in step S3 is specifically as follows: First, the motor fault sample data is collected and preprocessed. After preprocessing, the data is merged with the bearing data set of the Rolling Bearing Center of Case Western Reserve University and divided into training set, validation set and test set for subsequent model training and evaluation. Secondly, build a CNN-Transformer network model, combine the respective advantages of CNN and Transformer, and determine the parameters of the model, such as the size and number of convolution kernels and the network threshold; Next, the CNN-Transformer model is trained using the training set data, the model output is calculated through forward propagation, and compared with the true label to calculate the loss function value; Then use back propagation to update the model parameters, minimize the loss function value, set appropriate learning rate, batch size, number of iterations and other hyperparameters to ensure that the network model can learn correctly and avoid underfitting and overfitting; Finally, a motor fault diagnosis system is built, and the CNN-Transformer model algorithm is used to diagnose motor faults and guide industrial production.
6. The motor fault diagnosis system based on CNN-Transformer according to claim 1 is characterized in that: The specific steps of data enhancement in step S3 are: S321 adopts a window clipping method to continuously sample the historical database according to a specified length through a sliding window, thereby obtaining a series of sub-data sets; S322 standardizes all sub-datasets to eliminate outlier data and excessive noise.
7. A motor fault diagnosis system based on CNN-Transformer, characterized in that: include The acquisition module is used to collect relevant production data of the motors in response to possible motor failures on the production line, and then pre-process the data and create a data set; The model building module builds a convolutional neural network and obtains a neural network model with high accuracy through training; The diagnosis module inputs the data set obtained by the acquisition module, performs fault diagnosis control based on the convolutional neural network, and analyzes and diagnoses whether the motor on the production line has a fault.
8. An electronic device, characterized in that: The electronic device comprises a processor and a memory, wherein the memory is used to store instructions, and the processor is used to execute the instructions stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 6 is performed.
Citation Information
Cited By
Synchronous motor rotor broken bar fault state identification method based on stator current
CN120195543A
A method for identifying rotor bar breakage faults in synchronous motors based on stator current.
CN120195543B
CNN-BCA-improved Self-Attention-based motor fault diagnosis system and method
CN121561551A
