A Smart Fault Diagnosis Method for Rotating Machinery Based on Semantics and Capsule Networks

By combining semantic and capsule network approaches, the problems of scale invariance and small sample adaptability in rotating machinery fault diagnosis are solved, enabling the provision of efficient and intelligent diagnosis and fault repair strategies, and improving the intelligent management of rotating machinery equipment.

CN117113214BActive Publication Date: 2026-01-30CHONGQING UNIV OF POSTS & TELECOMM
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310884700.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-18
Publication Date
2026-01-30
Estimated Expiration
2043-07-18

AI Technical Summary

Technical Problem

Existing technologies for fault diagnosis of rotating machinery suffer from problems such as insufficient scale invariance of traditional convolutional neural networks, poor adaptability to small sample data, and difficulty in data collection, resulting in unsatisfactory diagnostic results.

Method used

We employ a semantic and capsule network-based approach, constructing convolutional layers, inception modules, low-level and high-level capsule layers, combining dynamic routing algorithms and marginal loss functions based on Euclidean distance for fault diagnosis, and utilizing semantic network technology for fault repair strategy reasoning.

Benefits of technology

It enables efficient and intelligent fault diagnosis with small sample data, reduces the demand for computing resources, improves the generalization and adaptability of the model, provides fault repair strategies, and enhances the intelligence level of equipment management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117113214B_ABST
    Figure CN117113214B_ABST
Patent Text Reader

Abstract

This invention claims protection for an intelligent fault diagnosis method for rotating machinery based on semantics and capsule networks. The algorithm is implemented using the Keras deep learning framework and semantic web technology, and includes the following steps: Step 1: Preprocessing the original acceleration signal to input into a pre-constructed convolutional layer for automatic feature learning; Step 2: Introducing an Inception module into the capsule network to extract feature representations at multiple scales, preserving the spatial pose information of the features to the greatest extent; Step 3: Constructing and introducing a low-level capsule layer based on weight sharing to share the affine transformation matrix, obtaining predicted feature vectors, and then weighted summing them before inputting them into a high-level capsule layer; Step 4: Introducing a protocol-based dynamic routing algorithm into the high-level capsule layer for iterative weight updates; Step 5: Using rule-based reasoning based on Prolog+Lisp, leveraging existing knowledge in the rotating machinery knowledge domain ontology and the results of IWSCN predictions, to infer the cause of the fault, improving the level of diagnostic intelligence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of Internet of Things, semantics and deep learning, and involves signal acquisition, data processing, knowledge domain ontology construction and semantic query reasoning. It belongs to the interdisciplinary field of deep learning and semantic web technology, and specifically is an intelligent diagnosis method for rotating machinery faults based on semantics and capsule networks. Background Technology

[0002] The statements in this section are merely background information relating to this disclosure, and these statements may constitute prior art. In the process of developing this invention, the inventors discovered at least the following problems in the prior art.

[0003] In the modernization process of industrial development, intelligent machinery is being applied in various fields, and machinery is developing towards greater complexity, digitalization, and intelligence. The long-term operation of these machines and their harsh and variable working conditions can lead to the degradation of critical components and a deterioration in their health. Rotating machinery, such as bearings, is a core component of many large intelligent machines in modern industry; any emergency failure could cause enormous damage and economic losses. Furthermore, to ensure the safety and reliability of these core components, an effective method for intelligent health assessment is needed.

[0004] Various measurement data (including sound, pressure, temperature, electrical signals, and vibration signals) are obtained through signal acquisition tools. The ultimate goal of intelligent diagnosis is to combine deep learning to automatically learn discriminative features from this data, provide accurate fault classification results, intelligently assess its health status, and provide a reference for its remaining service life. With the development of artificial intelligence technology, many diagnostic techniques have emerged, such as stacked autoencoders (SAE), deep belief networks (DBN), convolutional neural networks (CNN), and long short-term memory networks (LSTM). These technologies have achieved significant results in the field of rotating machinery fault diagnosis.

[0005] For example, the patent application number CN201810240234.1, entitled "An Intelligent Diagnosis Method for Rotating Machinery Fault Features Based on Deep Convolutional Neural Network Structure," employs convolutional neural network diagnostic technology. It proposes a fault diagnosis method based on a combination of short-time Fourier transform and a deep convolutional neural network model. This method uses the constructed deep convolutional neural network model to achieve rotating machinery fault diagnosis based on time-frequency feature extraction from unknown fault signals.

[0006] However, the inventors discovered through research that many problems still need to be solved regarding this type of patent.

[0007] First, the pooling layers in the traditional Convolutional Neural Network (CNN) it employs exhibit scale invariance, meaning each convolutional layer has a very uniform size. When the sample is a two-dimensional image, the correlation between different channels is weak. To obtain more comprehensive and richer features, the common approach is to increase the network bandwidth, but this has the negative impact of leading to too many parameters, which affects model training.

[0008] Secondly, in real industrial environments, machinery mostly operates in a healthy state, with relatively few instances of failure. Therefore, collecting sufficient data under different failure conditions is extremely difficult, limiting the effectiveness of most data-driven deep learning algorithms. This makes it difficult for traditional diagnostic techniques like neural networks, which require large amounts of data for training, to achieve ideal results with small sample sizes, and they are prone to underfitting. Furthermore, collecting sufficient labeled data across all operating conditions is expensive and impractical for improving the generalization of the diagnostic model. Therefore, there is an urgent need for an intelligent diagnostic method for rotating machinery faults. Summary of the Invention

[0009] In view of the above problems, the purpose of this invention is to solve some of the problems in the prior art, or at least alleviate these problems.

[0010] A method for intelligent fault diagnosis of rotating machinery based on semantics and capsule networks includes the following steps:

[0011] The collected raw data is preprocessed and then fed into the constructed convolutional layer to automatically learn features and obtain initial feature representations.

[0012] The obtained initial feature representation is input into the Inception module (multi-scale processing module) for vectorization processing to extract multi-channel feature information and obtain multi-scale initial feature representation;

[0013] The obtained multi-scale initial feature representation is input into the constructed low-level capsule layer to share the affine transformation matrix to obtain the prediction vector, and then the weighted sum is input into the high-level capsule layer.

[0014] A protocol-based dynamic routing algorithm is introduced into the high-level capsule layer, and a marginal loss function based on Euclidean distance is used to iteratively update the dynamic routing weights c. ij The final fault classification and prediction results are output.

[0015] The intelligent fault diagnosis method for rotating machinery based on semantics and capsule networks also includes rule reasoning based on Prolog+Lisp (a logic programming language + list processing language), and uses existing knowledge in the rotating machinery knowledge ontology and fault classification and prediction results of IWSCN (weight-shared capsule network) to infer the cause of the fault and query the corresponding fault repair strategy.

[0016] Furthermore, the cause of the fault is deduced and the corresponding fault repair strategy is retrieved, including the following steps:

[0017] Based on the fault classification and prediction results obtained from the IWSCN model, and utilizing the knowledge system of the constructed rotating machinery body, SPARQL query statements are written to obtain the corresponding fault maintenance strategies through querying.

[0018] The fault classification and prediction results are transformed into rule-based reasoning described in RDF (Resource Description Framework), Prolog, and Lisp (Logic Programming Language + List Processing Language). With the help of the Jena (a JAVA-based Semantic Web application framework) reasoning engine provided by AllegroGraph (a semantic graph database), fault diagnosis is performed through reasoning.

[0019] Furthermore, the collected raw data is preprocessed and input into the constructed convolutional layer to automatically learn features and obtain initial feature representations, including the following steps:

[0020] The original acceleration signals collected under different working conditions are normalized to zero mean, and the data are processed by overlapping the sliding window of the short time Fourier transform to form the frequency domain signals corresponding to different time windows. The time-frequency diagram is then obtained by splicing the signals together.

[0021] The time-frequency graph is passed through ReLU-Conv1 to perform an automatic feature learning task, and the initial feature representation is obtained and used as input to the inception module.

[0022] Furthermore, the time-frequency graph is processed through ReLU-Conv1 to perform a feature learning task, obtaining an initial feature representation, which is then used as input to the Inception module. This includes the following steps:

[0023] Step 1: Convolve the time-frequency graph using a two-dimensional convolution kernel, then follow it with a non-linear activation function to obtain a non-linear representation y. Conv The initial feature representation is given by the following formula:

[0024]

[0025] Among them, symbols Ker represents the convolution operation. i and b i represents the weights and biases of the corresponding convolutional kernels, respectively; f() represents the nonlinear activation function; i is the representation of the time-frequency plot;

[0026] Step 2: The multiple convolutional and pooling layers of the constructed Inception module reshape the initial feature representation learned in Step 1 into a feature matrix, obtaining a multi-scale initial feature representation, which is used as the input to the low-level capsule layer; input The initial feature representation y is calculated by performing a convolution operation with an f*f dimensional convolution kernel (filter), and the formula is as follows:

[0027]

[0028] Where x is a subset of the characteristic matrix, Let f be the n*n dimensional feature matrix, f be the dimension of the convolution kernel, s be the stride, and p be the padding size.

[0029] The lower-level capsule layer is a capsule layer based on weight sharing.

[0030] Furthermore, the obtained multi-scale initial feature representations are input into the constructed low-level capsule layer to share the affine transformation matrix to obtain the prediction vector, and then weighted and summed before being input into the high-level capsule layer, including the following steps:

[0031] Step 1: Input the multi-scale initial feature representation containing spatial position and pose information into the low-level capsule layer, and then transform it through the affine transformation matrix W. ij The connection is made to obtain the output of the lower-level capsule layer, i.e., the prediction vector.

[0032] Step 2: Perform a weighted summation of the prediction vectors to obtain the total input S of the higher-level capsule layer. j The formula is as follows:

[0033]

[0034]

[0035] Among them, u i It is the input to the lower-level capsule layer; W ij It is an affine transformation matrix; c ij The weights of dynamic routing are represented by the probability that capsule i activates capsule j; s j This represents the total input to the higher-level capsule layer;

[0036] Step 3: Obtain the total input S j After passing through a nonlinear squeezing activation function, it is transformed into the interval [0,1] and input into the higher-level capsule layer, as shown in the following formula:

[0037]

[0038] Among them, s j For the total input of the higher-level capsule layer, dj Let be the output vector of the j-th capsule after compression, which is also the prediction vector of the j-th capsule.

[0039] Furthermore, a protocol-based dynamic routing algorithm is introduced into the high-level capsule layer, along with a marginal loss function based on Euclidean distance for iteratively updating the dynamic routing weights c. ij The final fault classification and prediction results are output, including the following steps:

[0040] Step 1: Use a protocol-based dynamic routing algorithm to update and iterate the dynamic routing weights, i.e., c ij The value of is given by the following formula:

[0041]

[0042] Among them, b ij The logarithmic prior probability of capsule i coupled with capsule j is represented by the following, and as a key part of this algorithm, the protocol is defined as follows:

[0043]

[0044] Routing() represents a scalar product function, c represents the c-th capsule, and b' ij Let b' represent the log-prior probability of the updated coupling between capsule i and capsule j. ic b represents the log-prior probability of the updated coupling between capsule i and capsule c; ij Update using the following formula:

[0045] b' ij =b ij +a ij

[0046] c ij The above formulas are updated through iterative calculations.

[0047] Step 2: Simultaneously, a marginal loss function based on Euclidean distance is introduced as the cost function to optimize the parameters of the IWSCN network. The formula is as follows:

[0048]

[0049] Where n represents the nth class, L represents the marginal loss function, and Y n Y represents the sample label. n =1 indicates that the sample belongs to the nth class; otherwise, Y n =0 indicates that it does not belong to the nth class; λ is the regularization parameter; m - and m + These are the final prediction vectors d and d. Pred The upper and lower limits; where m +=0.9, m - =0.1, here we use λ=0.25; final prediction vector in This represents the probability of predicting the corresponding category;

[0050] Step 3: After the appropriate number of iterations, output the final classification and prediction results.

[0051] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the intelligent diagnostic method for rotating machinery faults based on semantics and capsule networks.

[0052] The present invention has the following beneficial effects:

[0053] 1. This algorithm can work on offline computer clients, is implemented based on the deep learning Keras framework, and can run on top of TensorFlow, CNTK or Theano. It is compatible with GPUs and CPUs and has low requirements for computer device performance. Especially for small sample data, the code runs at a relatively ideal speed after setting a certain number of iterations.

[0054] 2. By using a deep learning framework instead of traditional machine learning, there is no need to manually design features or rules. It can automatically perform feature learning tasks, making diagnosis more intelligent.

[0055] 3. As the number of fully connected capsule layers increases, the training parameters of a deep fully connected architecture grow exponentially, making it difficult to train such a deep framework that struggles to converge to the optimal minimum. The training process is not only time-consuming but also wastes computational resources. By developing various capsule layers based on multi-layer weight sharing, the shared weight architecture requires fewer parameters, shortening training time, converging to the minimum faster, and avoiding overfitting. Combined with the weight-sharing architecture network built after introducing the Inception module, the traditional approach of increasing bandwidth is abandoned. By introducing Inception modules with convolutional kernels of various sizes to extract feature information from different channels, the network's generalization ability is enhanced, solving potential gradient vanishing and model optimization difficulties. This reduces parameters while increasing model adaptability; furthermore, while increasing network bandwidth, it effectively reduces parameters and computational cost, mitigating the excessive computational burden and overfitting problems caused by expanding network bandwidth.

[0056] 4. A marginal loss function based on Euclidean distance is introduced as the cost function to optimize the proposed IWSCN network, thereby reducing intra-class variation and increasing inter-class differences.

[0057] 5. Introduce SPARQL query and semantic rule reasoning based on semantic web technology to provide a second method for fault diagnosis and improve the intelligent management of rotating machinery. Attached Figure Description

[0058] Figure 1 This is a schematic diagram of the short-time Fourier sliding window sampling method;

[0059] Figure 2 The structures are a fully connected capsule network layer (a) and a shared weight capsule network layer (b);

[0060] Figure 3 This is a schematic diagram of the Inception module;

[0061] Figure 4 This is a schematic diagram of the IWSCN operation process;

[0062] Figure 5 This is a schematic diagram of the IWSCN structure;

[0063] Figure 6 This is a schematic diagram of the IWSCN fault diagnosis process;

[0064] Figure 7 A knowledge domain ontology model graph of rotating machinery in the Allegro Graph database;

[0065] Figure 8 A diagram illustrating a semantically based SPARQL query example;

[0066] Figure 9 This is a flowchart of the semantic call process. Detailed Implementation

[0067] The present invention will be further described below with reference to the accompanying drawings. The embodiments of the present invention are only used to illustrate the present invention and not to limit the present invention. Various substitutions and modifications made based on ordinary technical knowledge and common practices in the art without departing from the technical concept of the present invention should be included within the scope of the present invention.

[0068] Capsule networks (CNs) are a novel type of neural network for classification and prediction, first proposed by Geoffrey Hinton in 2017, but have rarely been used in the field of fault diagnosis in recent years. The "intelligence" lies in the algorithm's ability to automatically learn and extract features from raw data.

[0069] Based on the applicant's long-term research, unlike the scalar output of CNNs, capsules are a group of vector neurons. The magnitude of the vector represents the probability of the feature's existence, and the direction of the vector represents the feature's pose information. Therefore, capsule networks do not rely on large amounts of training data, making it possible to diagnose faults in intelligent machinery where collecting large amounts of data is extremely difficult. Their application in the field of fault diagnosis shows great promise.

[0070] Based on this, the applicant proposes an intelligent fault diagnosis method for rotating machinery based on semantics and capsule networks. The technical solution of this invention is as follows:

[0071] A method for intelligent fault diagnosis of rotating machinery based on semantics and capsule networks, characterized by the following steps:

[0072] The collected raw data is preprocessed and then fed into the constructed convolutional layer to automatically learn features and obtain initial feature representations.

[0073] The initial feature representation is input into the Inception module (multi-scale processing module). (The Inception module combines different convolutional layers in parallel, and the matrices processed by different convolutional layers are concatenated along the depth dimension to form a deeper matrix. The Inception module can be repeatedly stacked to form a larger network, which can efficiently expand the depth and width of the network, improving the accuracy of deep learning networks while preventing overfitting.) This is then vectorized to extract multi-channel feature information, resulting in a multi-scale initial feature representation.

[0074] The obtained multi-scale initial feature representation is input into the constructed low-level capsule layer to share the affine transformation matrix to obtain the prediction vector, and then the weighted sum is input into the high-level capsule layer.

[0075] A protocol-based dynamic routing algorithm is introduced into the high-level capsule layer, and a marginal loss function based on Euclidean distance is used to iteratively update the dynamic routing weights c. ij The final fault classification and prediction results are output.

[0076] This method can effectively extract features and obtain fault classification results through diagnosis. Furthermore, it employs a deep learning framework instead of traditional machine learning, eliminating the need for manual feature and rule design; it can automatically perform feature learning tasks, resulting in more intelligent diagnosis.

[0077] It introduces a protocol-based dynamic routing algorithm in high-level capsule layers, aiming to establish complex nonlinear mapping relationships between capsule layers through clustering. In this way, capsule layers can work through "part-whole" relationships, with higher-level capsules showing greater "consistency" with the outputs of lower-level capsules in terms of input (prediction). For each potential part-whole relationship, based on the value 'a' of the "protocol"... ij The judgment then determines whether the dynamic routing weights between capsule layers should be increased or decreased.

[0078] The Euclidean distance-based marginal loss function is introduced as the cost function to optimize the "Inception-Introduced Weighted Shared Capsule Network (IWSCN)," reducing intra-class variation while amplifying inter-class differences. The similarity between different health conditions can be calculated using the Euclidean distance-based marginal loss function.

[0079] Furthermore, the capsule network abandons the pooling layer in traditional neural networks and adopts capsule layers instead, overcoming the lack of scale-invariant features caused by pooling layers in convolutional neural networks (CNNs).

[0080] The corresponding algorithm of this method can work on an offline computer client. It is implemented based on the Keras deep learning framework and can run on top of TensorFlow (deep learning framework), CNTK (deep neural network toolkit written in C++) or Theano (deep learning framework). It is compatible with GPUs and CPUs and has low requirements for computer device performance. Especially for small sample data, the code runs at a relatively ideal speed after setting a certain number of iterations.

[0081] Because the current IWSCN model can only be used for fault classification and cannot provide timely and intelligent maintenance strategies for rotating machinery faults, it leads to low management efficiency and high management costs for rotating machinery equipment. Therefore, the intelligent fault diagnosis method for rotating machinery based on semantics and capsule networks also includes rule reasoning based on Prolog+Lisp (a logic programming language + list processing language), and utilizes existing knowledge in the rotating machinery knowledge ontology and the prediction results of IWSCN (weight-shared capsule network) to infer the cause of the fault and query the corresponding fault maintenance strategy.

[0082] Deducing the cause of the fault and querying the corresponding fault repair strategy includes the following steps:

[0083] Based on the fault classification and prediction results obtained from the IWSCN model, and utilizing the knowledge system of the constructed rotating machinery body, SPARQL query statements are written to obtain the corresponding fault maintenance strategies through querying.

[0084] The fault classification and prediction results are transformed into rule-based reasoning described in RDF (Resource Description Framework), Prolog, and Lisp (Logic Programming Language + List Processing Language). With the help of the Jena (a JAVA-based Semantic Web application framework) reasoning engine provided by AllegroGraph (a semantic graph database), fault diagnosis is performed through reasoning. Figure 9 The semantic call flowchart information is displayed.

[0085] Ontology construction is a core technology in Semantic Web, aiming to describe the meaning between data, attributes, and relationships, as well as the essence and patterns of their existence. Employing ontology technology enables machines to understand and utilize knowledge, supporting collaborative work based on shared ontology libraries, thereby greatly improving information sharing and reusability. Currently, mature ontology construction methods include Top-Down and Bottom-Up approaches. In addition, there are various other methods such as schema (database organization and structure) learning and language models.

[0086] Semantic querying refers to using a built ontology library to perform semantic queries on data. Common technologies include SPARQL (Google Query Language), OWL-QL (Web Ontology Query Language), and RDF-QL (Resource Description Framework Query Language). The advantage of semantic querying is that it can obtain more accurate results through granular strategies, and its built-in inference algorithms can automatically expand the scope of results, thus more comprehensively showcasing the content and relationships involved.

[0087] Reasoning is another core technology of Semantic Web, referring to the use of existing knowledge and ontology to mine new knowledge or check for potential logical errors, while also ensuring the validity and integrity of semantic data. Reasoning enables functions such as category hiding, flexible querying, and inductive reasoning, and can be widely applied in data mining, intelligent search, ontology fusion, and complex event processing. Commonly used reasoning methods include rule-based, model-based, and view-based approaches. An example of writing a SPARQL query is as follows:

[0088]

[0089] Execute the query to obtain maintenance strategies for cage failures, such as... Figure 8 This demonstrates the expected results obtained by using semantic-based SPARQL queries on a constructed ontology of rotating machinery knowledge domain.

[0090] This application utilizes SPARQL query and semantic rule reasoning techniques from Semantic Web technology. For the obtained fault classification results, it leverages the existing knowledge system within the constructed knowledge ontology to perform SPARQL queries to derive corresponding fault maintenance strategies. Using rule reasoning based on Prolog+Lisp, and utilizing existing knowledge from the rotating machinery knowledge ontology and the results predicted by IWSCN, it infers the possible causes of faults in rotating machinery (such as bearings). The introduction of SPARQL query and semantic rule reasoning based on Semantic Web technology provides a second method for fault diagnosis, improving the intelligence level of equipment management. Figure 7 This displays a model diagram of the knowledge ontology of rotating machinery (such as bearings) visualized in AllegroGraph (an ontology visualization database).

[0091] The collected raw data is preprocessed and then fed into the constructed convolutional layer to automatically learn features, obtaining an initial feature representation. This includes the following steps:

[0092] The original acceleration signals collected under different working conditions are normalized to zero mean, and the data are processed by overlapping the sliding window of the short time Fourier transform to form the frequency domain signals corresponding to different time windows. The time-frequency diagram is then obtained by splicing the signals together.

[0093] The time-frequency graph is passed through ReLU-Conv1 to perform an automatic feature learning task, and the initial feature representation is obtained and used as input to the inception module.

[0094] Figure 1 This demonstrates the principle of short-time Fourier sliding window data processing. Before formal data processing, a preprocessing step is necessary. The raw acceleration signals collected under different operating conditions are normalized to zero mean using the following formula:

[0095]

[0096] In the formula: i is the original data; i * These are the processed data, where σ and u are the variance and mean of i, respectively.

[0097] The preprocessed data is subjected to Short Time Fourier Transform (STFT) and stitched together to obtain a two-dimensional time-frequency graph. The number of training iterations is increased by comparing the similarity between samples, thus addressing the problem of insufficient sample dataset. The STFT window size is 128×128, the time step is selected as 0.813ms, and the sliding window stride is calculated to be 0.813×10⁻⁶. -3 ×12000=9.756, and the size of the time-frequency diagram obtained after STFT is 128×128.

[0098] Table 1 shows the details of the IWSCN model.

[0099] Table 1. Detailed information about the IWSCN model

[0100]

[0101] The time-frequency graph obtained after STFT is input into the constructed Conv1 to perform feature learning. After several convolution operations and followed by a nonlinear activation function ReLU, a nonlinear representation y is obtained. Conv This refers to the initial feature representation. Specifically:

[0102] The time-frequency graph is processed through ReLU-Conv1 to perform a feature learning task, resulting in an initial feature representation, which is then used as input to the Inception module. This process includes the following steps:

[0103] Step 1: Convolve the time-frequency graph using a two-dimensional convolution kernel, then follow it with a non-linear activation function to obtain a non-linear representation y. Conv The initial feature representation is given by the following formula:

[0104]

[0105] Among them, symbols Ker represents the convolution operation. i and b i represents the weights and biases of the corresponding convolutional kernels, respectively; f() represents the nonlinear activation function; i is the representation of the time-frequency plot;

[0106] Step 2: The multiple convolutional and pooling layers of the constructed Inception module reshape the initial feature representation learned in Step 1 into a feature matrix, obtaining a multi-scale initial feature representation, which is used as the input to the low-level capsule layer; input The initial feature representation y is calculated by performing a convolution operation with an f*f dimensional convolution kernel (filter), and the formula is as follows:

[0107]

[0108] Where x is a subset of the characteristic matrix, Let f be the n*n dimensional feature matrix, f be the dimension of the convolution kernel, s be the stride, and p be the padding size.

[0109] f() represents a non-linear activation function, such as tanh, sigmoid, and ReLU (three commonly used activation functions); ReLU Conv1 uses the ReLU activation function.

[0110] Two-dimensional time-frequency maps obtained by stitching together short-time Fourier transforms (STFTs) may have weak correlations between different channels. Increasing the network width and depth could lead to excessive parameters, making model training difficult, and even causing the gradient vanishing problem, making it hard to achieve the desired model optimization effect. Therefore, to extract more comprehensive and richer features, convolutional kernels of different sizes are used for different channels.

[0111] Specifically, the initial feature representation is input into the Inception module for vectorization processing to extract multi-channel feature information and obtain multi-scale feature representation. Figure 3 The diagram displays information about the Inception module structure. By incorporating convolutional kernels of different sizes into the capsule layer, features from different channels are extracted. Performing convolution operations at multiple sizes allows highly correlated features to cluster together, resulting in receptive fields of varying sizes. This improves classification performance while increasing network bandwidth and reducing the number of parameters. Adding Inception modules with convolutional kernels of different sizes to the capsule layer to extract features from different channels enriches and improves feature information, enhancing the model's adaptability to some extent.

[0112] The added Inception network consists of four 1×1 convolutional kernels, one 3×3 convolutional kernel, one 5×5 convolutional kernel, and one 3×3 max-pooling layer, connected at the entrance channel of the lower-level capsule layer. After feature filtering and concatenation, a multi-scale initial feature representation containing spatial pose information is obtained, as shown in the attached figure. Figure 3 As shown, while increasing network bandwidth, the number of parameters and computational load were effectively reduced, mitigating the problems of excessive computational load and overfitting caused by expanding network bandwidth.

[0113] The applicant's experiments and research have revealed that if fully connected capsule layers are used in the low-level capsule layers, the training parameters of the deep fully connected architecture increase exponentially with the increase in the number of multiple capsule layers. Therefore, it is difficult to train such a deep framework that is difficult to converge to the optimal minimum value. The training process is not only time-consuming but also wastes computing resources.

[0114] Therefore, the low-level capsule layer is a weight-sharing-based capsule layer. This application uses the multi-scale initial feature representation as input to construct the weight-sharing-based low-level capsule layer, which is then used to share the affine transformation matrix W. ij Together with all the hidden representations in the lower-level capsule layers, we obtain the prediction vector for each capsule. The shared weight architecture requires fewer parameters, shortens training time, converges to the minimum faster, and avoids overfitting. Furthermore, the weight-sharing architecture built with the introduction of the Inception module increases network bandwidth, enhancing the model's generalization and adaptability to some extent.

[0115] Figure 2 Information on the layer structures of the Fully Connected Capsule Network (FCCN) and the Shared Weight Capsule Network (WSCN) is displayed. Figure 5 The structure of the Weight-Shared Capsule Network (IWSCN) with the Inception module is shown. After constructing the ReLU-Conv1 network, low-level capsule layers based on weight sharing are introduced to enhance the generalization performance of this fault diagnosis model. Increasing the number of capsule layers causes the training parameters of the fully connected architecture to grow exponentially, making the training process very time-consuming and the model's generalization ability weak. The shared weight architecture of the introduced Weight-Shared Capsule Network (WSCN) optimizes the number of parameters, speeds up the convergence to the minimum value, and avoids overfitting.

[0116] Figure 4 The entire capsule operation process is illustrated. The multi-scale initial feature representation obtained through the Inception module is input into the constructed low-level capsule layer to share the affine transformation matrix to obtain the prediction vector. After weighted summation, this vector is input into the high-level capsule layer, including the following steps:

[0117] Step 1: Input the multi-scale initial feature representation containing spatial position and pose information into the low-level capsule layer, and then transform it through the affine transformation matrix W. ij Connecting to the lower-level capsule layer yields the output of the lower-level capsule layer, i.e., the prediction vector.

[0118] Step 2: Perform a weighted summation of the prediction vectors to obtain the total input S of the higher-level capsule layer. j The formula is as follows:

[0119]

[0120]

[0121] Among them, u i It is the input to the lower-level capsule layer; W ij It is an affine transformation matrix; c ij The weights of dynamic routing are represented by the probability that capsule i activates capsule j; s j This represents the total input to the higher-level capsule layer;

[0122] Step 3: Obtain the total input S j After passing through a nonlinear squeezing activation function, it is transformed into the interval [0,1] and input into the higher-level capsule layer, as shown in the following formula:

[0123]

[0124] Among them, s jFor the total input of the higher-level capsule layer, d j Let be the output vector of the j-th capsule after compression, which is also the prediction vector of the j-th capsule.

[0125] A protocol-based dynamic routing algorithm is introduced into the high-level capsule layer, and a marginal loss function based on Euclidean distance is used to iteratively update the dynamic routing weights c. ij The final fault classification and prediction results are output, including the following steps:

[0126] Step 1: Use a protocol-based dynamic routing algorithm to update and iterate the dynamic routing weights, i.e., c ij The value of is given by the following formula:

[0127]

[0128] Among them, b ij The logarithmic prior probability of capsule i coupled with capsule j is represented by the following, and as a key part of this algorithm, the protocol is defined as follows:

[0129]

[0130] Routing() represents a scalar product function, c represents the c-th capsule, and b ij Let b' represent the log-prior probability of the updated coupling between capsule i and capsule j. ic b represents the log-prior probability of the updated coupling between capsule i and capsule c; ij Update using the following formula:

[0131] b' ij =b ij +a ij

[0132] c ij The above formulas are updated through iterative calculations.

[0133] Step 2: Simultaneously, a marginal loss function based on Euclidean distance is introduced as the cost function to optimize the parameters of the IWSCN network. The formula is as follows:

[0134]

[0135] Where n represents the nth class, L represents the marginal loss function, and Y n Y represents the sample label. n =1 indicates that the sample belongs to the nth class; otherwise, Y n =0 indicates that it does not belong to the nth class; λ is the regularization parameter; m - and m + These are the final prediction vectors d and d. Pred The upper and lower limits; where m+ =0.9, m - =0.1, here we use λ=0.25; final prediction vector in This represents the probability of predicting the corresponding category;

[0136] Step 3: After the appropriate number of iterations, output the final classification and prediction results.

[0137] Figure 4 In this paper, a protocol-based dynamic routing algorithm is introduced to update the connection strength between capsules, i.e., the dynamic routing weight c. ij This allows capsule networks to strengthen or weaken connections between capsule layers through protocol-based dynamic routing algorithms. The connection strength between capsule j in a higher-level capsule layer and all capsule i in a lower-level capsule layer is c. ij The sum is 1. For all input capsule i and output capsule j, define a parameter b. ij Set the initial value to 0. ij Update using the "routingsoftmax" (dynamic routing) feature.

[0138] Following the protocol-based dynamic routing algorithm, the L2 norm based on Euclidean distance is applied to calculate the final d of the capsule classifier. j The length of the final predicted vector, i.e., the value of the predicted vector:

[0139]

[0140] Each value in the formula represents the probability of predicting the corresponding category. Then, a confidence threshold is selected. This determines whether the classifier should output a label. The final capsule layer with L2 norm (Euclidean distance) operation and the capsule layer with confidence threshold can be defined as a capsule classifier. The introduced L2 function is used as the cost function to optimize the "Inception-Introduced Weighted Shared Capsule Network (IWSCN)," which reduces intra-class variation while amplifying inter-class differences.

[0141] The similarity between different health conditions can be calculated using a marginal loss function based on Euclidean distance. Mathematically, the parameters of IWSCN are optimized by minimizing the cost function, i.e., the marginal loss function. The regularization parameter λ is used to constrain the parameters in the model, preventing them from becoming too large.

[0142] Table 2. Pseudocode of the capsule classifier algorithm

[0143]

[0144] Figure 6 The document displays the specific process information for IWSCN's fault diagnosis of rotating machinery.

[0145] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the intelligent diagnostic method for rotating machinery faults based on semantics and capsule networks.

[0146] In summary, the intelligent fault diagnosis method for rotating machinery based on semantics and capsule networks designed in this invention can intelligently diagnose fault types, and the proposed improved method has a certain degree of generalization. This diagnostic algorithm can work on offline clients and has low requirements for computer equipment performance.

[0147] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0148] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0149] The above embodiments should be understood as illustrative only and not as limiting the scope of protection of the present invention. After reading the description of the present invention, those skilled in the art can make various alterations or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.

Claims

1. A method for intelligent diagnosis of rotating machinery faults based on semantics and capsule networks, characterized in that, The method comprises the following steps: The collected original data is preprocessed and input into the constructed convolutional layer to automatically learn features and obtain initial feature representation; The obtained initial feature representation is input into the inception module for vectorization processing to extract multi-channel feature information and obtain multi-scale initial feature representation; The obtained multi-scale initial feature representation is input into the constructed low-level capsule layer to share affine transformation matrix to obtain a prediction vector, and after weighted summation, the prediction vector is input into the high-level capsule layer; In the high level capsule layer, a protocol-based dynamic routing algorithm is introduced, and a marginal loss function based on Euclidean distance is introduced to iteratively update the dynamic routing weight , output the final fault classification and prediction result; including the following steps: Step 1: Update the iterative dynamic routing weights using a protocol-based dynamic routing algorithm, i.e. with the following formula: where, represents the logarithmic prior probability that capsule i is coupled with capsule j, as a key part of the algorithm, the protocol is defined as: where Routing() represents a scalar product function, c represents the cth capsule, represents the updated log prior probability that capsule i is coupled to capsule j, represents the updated log prior probability that capsule i is coupled to capsule c; is updated with the following equation: By the above several formulas, update through iterative operation; Step 2: A marginal loss function based on Euclidean distance is introduced as a cost function to optimize the parameters of the IWSCN network of the IWSCN, and the formula is as follows: where n represents the nth class, L represents a marginal loss function, represents a sample label, represents that the sample belongs to the nth class, otherwise, represents that it does not belong to the nth class; is a regularization parameter; and are the upper and lower limits of the final prediction vector , respectively; wherein, , , here ; the final prediction vector , wherein represents the probability of predicting the corresponding class. Step 3: After a corresponding number of iterations, the final classification and prediction results are output; The rule-based reasoning based on Prolog+Lisp language and the existing knowledge in the rotating machinery knowledge ontology and the fault classification and prediction results of the IWSCN are used to reason out the fault causes and query the corresponding fault maintenance strategies. 2.The semantic and capsule network-based rotating machinery fault intelligent diagnosis method of claim 1, wherein, The reasoning of the fault causes and the query of the corresponding fault maintenance strategies comprises the following steps: For the fault classification and prediction results obtained by the IWSCN model, the knowledge system of the constructed rotating machinery ontology is used to write a SPARQL query statement to obtain the corresponding fault maintenance strategy by querying; The fault classification and prediction results are converted into rule-based reasoning described by RDF, Prolog and Lisp languages, and the Jena reasoning engine provided by AllegroGraph is used for fault diagnosis through reasoning. 3.The semantic and capsule network based intelligent diagnosis method of rotating machinery faults according to claim 1, characterized in that, The collected original data is preprocessed and input into the constructed convolutional layer to automatically learn features and obtain initial feature representation, comprising the following steps: The original acceleration signals collected under different working conditions are subjected to zero-mean normalization, and the data are processed by short-time Fourier transform sliding window with partial overlap, i.e. forming frequency domain signals corresponding to different time windows, and then splicing to obtain a time-frequency graph; The time-frequency graph is subjected to automatic feature learning by ReLU-Conv1 to obtain initial feature representation as the input of the inception module.

4. The intelligent diagnosis method for rotating machinery faults based on semantic and capsule networks according to claim 3, characterized in that, The time-frequency graph is subjected to automatic feature learning by ReLU-Conv1 to obtain initial feature representation as the input of the inception module, comprising the following steps: Step 1: The time-frequency map is convolved with a two-dimensional kernel, followed by a non-linear activation function, resulting in a non-linear representation i.e., the initial feature representation, which is given by the formula: wherein the symbol represents a convolution operation, and represent the weights and bias of the corresponding convolution kernel, respectively, and f() represents a non-linear activation function; i is an index of the time-frequency map; Step 2: The multiple convolutional layers and pooling layers of the constructed inception module reshape the initial feature representation learned in step 1 into a feature matrix, obtaining a multi-scale initial feature representation, which is used as the input of the low-level capsule layer; the input and the convolution operation is performed on the multi-scale initial feature representation The calculation formula is as follows: wherein x is a subset of the feature matrix, is a feature matrix of n*n dimension, f is a dimension of the convolution kernel, is a step size, is a padding size.

5. The method according to claim 1, wherein, The low-level capsule layer is a weight-sharing-based capsule layer.

6. The method according to claim 5, wherein, The obtained multi-scale initial feature representation is input into the constructed low-level capsule layer to share affine transformation matrix to obtain a prediction vector, and after weighted summation, the prediction vector is input into the high-level capsule layer, comprising the following steps: Step 1: input the multi-scale initial feature representation containing spatial position pose information into the low-level capsule layer, and pass the affine transformation matrix connection to obtain the output of the low-level capsule layer, i.e. the prediction vector ; Step 2: Weighted sum of the prediction vectors to get the total input to the high level capsule layer The formula is as follows: wherein, is the input of the low-level capsule layer; is an affine transformation matrix; represents the weight of the dynamic routing, characterized by the probability of capsule i activating capsule j; represents the total input of the high-level capsule layer; Step 3: The total input obtained is passed through a non-linear squashing activation function to convert it to the interval [0, 1] before being input to the higher-level capsule layer, as follows: through a non-linear squashing activation function to convert it to the interval [0, 1] before being input to the higher-level capsule layer, as follows: wherein, is the total input of the high-level capsule layer, is the output vector of the j-th capsule, i.e., the prediction vector of the j-th capsule.

7. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the steps of the rotating machinery fault intelligent diagnosis method based on semantics and capsule network in any one of claims 1 to 6.

Citation Information

Patent Citations

  • A Smart Diagnosis Method for Rotating Machinery Fault Features Based on Deep Convolutional Neural Network Structure

    CN108830127B

  • Bearing fault diagnosis method based on improved convolutional capsule network

    CN113255882A

  • Planetary gearbox fault diagnosis method based on convolutional capsule network

    CN113591638A