Shield tunneling machine fault diagnosis method and system based on self-attention mechanism
By introducing technologies such as self-attention mechanism and data grouping in shield machine fault diagnosis, the problems of high complexity of multi-dimensional sensor data processing and difficulty in data fusion are solved, and efficient and accurate fault detection and classification are achieved.
Patent Information
- Application Number
- CN202411851830.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-16
AI Technical Summary
When processing multi-dimensional shield machine sensor data, the prior art has high computational complexity, difficult to respond in real time, and difficult to effectively integrate and uniformly process different types of sensor data. The lack of effective mechanisms to process noise and errors, resulting in insufficient accuracy and robustness of fault detection.
The fault diagnosis method based on the self-attention mechanism is adopted, and the multi-dimensional sensor data is processed and fault detection and classification is performed through data grouping, sliding window variance calculation, sensor confidence adjustment, and self-attention mechanism within and between groups.
It significantly reduces the computational complexity of multi-dimensional sensor data processing, improves the accuracy and efficiency of fault detection, enhances data fusion capabilities and robustness, and can process large amounts of sensor data in real time, providing accurate and reliable fault diagnosis results.
Smart Images

Figure CN119807894A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of fault diagnosis of shield machines, and more specifically to a fault data feature extraction and diagnosis identification method and system based on a self-attention mechanism. Background Art
[0002] In modern industrial and engineering applications, real-time monitoring and analysis of sensor data are essential for fault detection and prevention. Especially during the tunneling process of shield machines, timely and accurate fault judgment is crucial to ensure construction safety and efficiency. With the increase in the number and types of shield machine sensors, a huge amount of multi-dimensional data is generated. These data contain rich information that can be used to detect the operating status of equipment, identify potential faults, and predict system performance. However, existing technologies still have some problems and shortcomings in processing multi-dimensional sensor data, fault detection and classification, which limits their application in complex engineering environments.
[0003] Existing technologies usually use traditional statistical analysis methods or simple machine learning models to process multi-dimensional sensor data. These methods have high computational complexity and are difficult to respond in real time when processing high-dimensional data. In addition, sensor data often has high dimensionality, time series correlation, and nonlinear characteristics. Traditional methods are difficult to fully capture the complex relationships and potential patterns in the data, resulting in insufficient accuracy and robustness of fault detection.
[0004] Different types of sensor data of shield machines have significant differences in characteristics and data formats, and existing technologies are difficult to effectively integrate and uniformly process. In addition, sensor data often contains noise and errors, and existing methods lack effective mechanisms to deal with noise and errors in sensor data, resulting in limited accuracy of fault detection and classification.
[0005] During the tunneling process of the shield machine, the fault detection system needs to monitor and analyze a large amount of sensor data in real time in order to detect and handle faults in a timely manner. However, the existing technology has the problem of low computational efficiency in large-scale data processing and real-time analysis. Especially when the data volume is large and the dimension is high, traditional methods are difficult to meet the requirements of real-time processing.
[0006] Existing technologies usually ignore the confidence and error issues of sensor data when performing fault detection. Sensor data has instability and cumulative errors, which are not fully considered in traditional methods, resulting in a decrease in the reliability and accuracy of fault detection results.
[0007] In summary, the existing technology has problems such as high processing complexity, difficulty in fusion of heterogeneous data, insufficient real-time and computational efficiency, and lack of sensor confidence and error processing mechanism in fault detection and classification of multi-dimensional sensor data during shield machine excavation. These are also problems that technicians in this field need to solve urgently. Summary of the invention
[0008] In view of this, the present invention provides a shield machine fault diagnosis method and system based on the self-attention mechanism. The method effectively processes multi-dimensional sensor data, performs fault detection and classification, and significantly improves the accuracy and efficiency of fault management by introducing data grouping, self-attention mechanism, sensor confidence adjustment and sliding window variance calculation.
[0009] In order to achieve the above object, the present invention adopts the following technical solution:
[0010] In a first aspect, the present invention provides a shield machine fault diagnosis method based on a self-attention mechanism, comprising the following steps:
[0011] S1. Acquire multi-dimensional sensor data of a shield machine and perform data preprocessing to obtain multiple groups of coded data; wherein the data preprocessing includes data grouping and data coding;
[0012] S2, calculating the sliding window variance of each group of coded data, and adjusting the sensor confidence weight according to the sliding window variance; calculating the intra-group self-attention of each group of coded data, and correcting it according to the sensor confidence weight; obtaining the intra-group self-attention output;
[0013] S3, splicing the self-attention outputs within each group, performing inter-group self-attention calculation on the spliced features, and obtaining inter-group self-attention outputs according to the inter-group confidence weights;
[0014] S4. Perform fault classification and confidence evaluation on the inter-group self-attention output to obtain a fault type output and a fault confidence output.
[0015] Furthermore, the data grouping in S1 specifically includes:
[0016] The multi-dimensional sensor data Divide into N groups according to the dimension, each group has a dimension of D i , the formula is:
[0017]
[0018] X i =X[:,:,d i-1 :d i ]
[0019] Among them, X is the multi-dimensional sensor data, L is the length of the time series, D is the dimension of the data, N is the number of groups, X i is the data of group i, D i is the data dimension of the i-th group, d i is the specific dimension value of the i-th group of data, 1≤i≤N; the multi-dimensional sensor data of the shield machine includes: thrust, torque, cutter head speed, propulsion speed, hydraulic system pressure, temperature, vibration, displacement, gas composition, foam injection amount, shield tail sealing pressure and mud parameters.
[0020] Furthermore, the data encoding in S1 specifically includes:
[0021] For each group of data X i The encoder is used for dimensionality reduction and feature extraction, and the formula is expressed as:
[0022] E i =Encoder(X i )
[0023] The encoded features are:
[0024]
[0025] Among them, E i is the feature after encoding the i-th group of multi-dimensional sensor data of the shield machine, Encoder is the encoder for dimensionality reduction and feature extraction, d e is the dimension of the data after dimensionality reduction.
[0026] Furthermore, the sliding window variance of each set of encoded data is calculated in S2, specifically including:
[0027] Calculate the coded data E for each group using the cumulative sum method i The sliding window variance of :
[0028]
[0029]
[0030] Among them, S i (t) is the cumulative sum at the tth moment, 0≤j≤t, is the cumulative sum of squares, μ i (t) is the mean value in the sliding window, is the variance within the sliding window, W is the size of the sliding window;
[0031] In S2, the sensor confidence weight is adjusted according to the sliding window variance; the formula is expressed as:
[0032]
[0033] Among them, C i is the sensor confidence parameter, α i (t) is the sensor confidence weight, k is the adjustment coefficient, is the variance within the sliding window, is the baseline variance.
[0034] Furthermore, the calculation of the self-attention within each group of encoded data in S2 specifically includes:
[0035] The encoded characteristic E i Perform a linear transformation of query, key, and value to obtain Q i , K i and V i The formula is:
[0036]
[0037] The formula for calculating the self-attention within the group is:
[0038]
[0039] The formula for the self-attention output within the group is obtained as:
[0040] Z i =α i (t)·Attention i (Q i ,K i ,V i )
[0041] Among them, Q i is the query matrix of the i-th group, K i is the i-th group bond matrix, V i is the i-th group value matrix, is the i-th group of linear transformation matrices, K i T is the i-th group bond matrix K i The transpose of is the i-th group bond matrix K i The dimension, Z i is the self-attention output within the group.
[0042] Furthermore, in S3, the self-attention outputs within each group are concatenated to obtain Z:
[0043] Z=[Z1;Z2;…Z i …; Z N ]
[0044] Among them, Z is the feature after splicing, Z i is the self-attention output of the i-th group, Z N is the self-attention output of the Nth group.
[0045] Furthermore, in S3, the inter-group self-attention calculation specifically includes:
[0046] Perform linear transformation of query, key and value on the concatenated feature Z, and get the formulas of Q, K and V as follows:
[0047] Q=ZW Q
[0048] K=ZW K
[0049] V=ZW V
[0050] The inter-group self-attention calculation formula is:
[0051]
[0052] The inter-group confidence weight β i The formula is:
[0053]
[0054] The inter-group self-attention output is obtained:
[0055]
[0056] Among them, Q is the query matrix, K is the key matrix, V is the value matrix, and W Q , W K , W V is the linear transformation matrix, K T is the transpose of the key matrix K, d k is the dimension of the key matrix K, β i is the confidence weight between groups, C m is the confidence parameter of the mth group of sensors, 1≤m≤N, and Y is the inter-group self-attention output.
[0057] Furthermore, the fault type output in S4 uses a softmax activation function to obtain the fault type output formula:
[0058] FaultType(Y) = softmax(YW class +b class )
[0059] Among them, FaultType(Y) is the fault classification output, W class is the linear transformation matrix of the classification layer, bclass is the bias vector;
[0060] The fault types mentioned include tool wear, bearing failure, gearbox failure, motor failure, cable breakage, control system failure, hydraulic pump failure, hydraulic valve failure, hydraulic line leakage, propulsion cylinder failure, abnormal propulsion system pressure, shield tail seal failure, mud sealing system failure, foam injection system failure, ventilation system failure, drainage system failure and sensor system failure.
[0061] Furthermore, the fault confidence output in S4 uses the Sigmoid activation function to obtain the fault confidence output formula:
[0062] Confidence(Y)=σ(YW conf +b conf )
[0063] Among them, Confidence(Y) is the confidence assessment output, σ is the Sigmoid activation function, W conf is the linear transformation matrix for confidence assessment, b conf is the bias vector.
[0064] In a second aspect, the present invention provides a shield machine fault diagnosis system based on a self-attention mechanism, comprising the following modules:
[0065] Data preprocessing module: used to obtain multi-dimensional sensor data of the shield machine and perform data preprocessing to obtain multiple sets of coded data;
[0066] Intra-group self-attention module: used to calculate the sliding window variance of each group of encoded data, and adjust the sensor confidence weight according to the sliding window variance; calculate the intra-group self-attention of each group of encoded data, and modify it according to the sensor confidence weight; obtain the intra-group self-attention output;
[0067] Inter-group self-attention module: used to splice the self-attention outputs within each group, perform inter-group self-attention calculations on the spliced features, and obtain inter-group self-attention outputs based on the inter-group confidence weights;
[0068] Feature extraction module: used for extracting features from the inter-group self-attention output;
[0069] Classification and confidence assessment module: used to perform fault classification and confidence assessment on the features extracted by the feature extraction module to obtain fault type output and fault confidence output.
[0070] It can be seen from the above technical solutions that the present invention discloses a method and system for extracting and diagnosing fault features of a shield machine, which has the following beneficial effects compared with the prior art:
[0071] 1. Low processing complexity: Through data grouping and encoding, the computational complexity of multi-dimensional sensor data processing is reduced, and the operating efficiency of the system is improved.
[0072] 2. Accurate feature extraction: The sliding window variance calculation and sensor confidence adjustment mechanism can keenly capture data changes and enhance the accuracy of feature extraction.
[0073] 3. Strong data fusion capability: The intra-group and inter-group self-attention mechanisms can not only capture the long-range dependencies of local data, but also integrate global features, thus improving the overall performance of fault detection and classification.
[0074] 4. High real-time performance: Efficient computing methods and optimized attention mechanisms ensure that the system can process large amounts of sensor data in real time and detect and warn of faults in a timely manner.
[0075] 5. Strong reliability: Through fault classification and confidence assessment, it provides accurate and reliable fault diagnosis results, improving the credibility and practicality of the model in practical applications.
[0076] 6. Good robustness: The sensor confidence adjustment mechanism effectively handles data noise and error problems, making it more robust when used in complex industrial environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0078] Figure 1 A flow chart of a shield machine fault diagnosis method based on a self-attention mechanism provided by the present invention.
[0079] Figure 2 A connection diagram of a shield machine fault diagnosis system based on a self-attention mechanism provided by the present invention. DETAILED DESCRIPTION
[0080] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0081] Embodiment 1
[0082] The embodiment of the present invention discloses a shield machine fault diagnosis method based on a self-attention mechanism, referring to Figure 1 As shown, the following steps are included:
[0083] S1. Acquire multi-dimensional sensor data of the shield machine and perform data preprocessing to obtain multiple groups of coded data; wherein the data preprocessing includes data grouping and data coding;
[0084] S2, calculating the sliding window variance of each group of coded data, and adjusting the sensor confidence weight according to the sliding window variance; calculating the intra-group self-attention of each group of coded data, and correcting it according to the sensor confidence weight; obtaining the intra-group self-attention output;
[0085] S3, splicing the self-attention outputs within each group, performing inter-group self-attention calculation on the spliced features, and obtaining inter-group self-attention outputs according to the inter-group confidence weights;
[0086] S4. Perform fault classification and confidence evaluation on the inter-group self-attention output to obtain a fault type output and a fault confidence output.
[0087] This embodiment is used for fault feature extraction and diagnosis and identification during the tunneling process of the shield machine, and obtains data from various sensors installed on the shield machine, including but not limited to thrust, torque, cutter head speed, propulsion speed, hydraulic system pressure, temperature, vibration, displacement, gas composition, foam injection amount, shield tail sealing pressure and mud parameters.
[0088] The multi-dimensional sensor data are divided into N groups according to the dimensions, and each group contains a specific type of sensor data. For example, the thrust and propulsion speed can be divided into the first group, the torque and cutter head speed can be divided into the second group, the hydraulic system pressure, temperature, vibration and displacement can be divided into the third group, and the gas composition, foam injection amount, shield tail seal pressure and mud parameters can be divided into the fourth group.
[0089] The data of each group is subjected to dimensionality reduction and feature extraction using an encoder. The encoder can be PCA, autoencoder or other appropriate dimensionality reduction techniques to obtain features after encoding and dimensionality reduction.
[0090] By grouping the multi-dimensional sensor data by dimension, multiple data sets containing different data features are obtained, and each data set is encoded to reduce the computational complexity and extract key features.
[0091] The sliding window variance is used to calculate the detection data changes, and the attention weight is adjusted in combination with the sensor confidence parameter to improve the accuracy of fault detection; when the data changes significantly, the attention weight is increased to enhance the sensitivity to the change characteristics. The self-attention mechanism is applied within and between groups to capture the long-range dependency and inter-group relationship of the data and enhance the ability to extract fault features; the self-attention within the group captures local features, and the self-attention between groups integrates global features to achieve comprehensive analysis.
[0092] Finally, through the classification layer and confidence assessment layer, the fault type is classified and the confidence is assessed to provide accurate and reliable fault diagnosis results; the classification layer identifies the fault type, and the confidence assessment layer measures the reliability of the prediction results. Among them, possible fault types include but are not limited to tool wear, bearing failure, gearbox failure, motor failure, etc.
[0093] This method realizes efficient processing of multi-dimensional sensor data and real-time fault detection and classification through data grouping, self-attention mechanism, sensor confidence adjustment and sliding window variance calculation, thereby improving the fault management accuracy and efficiency during the tunneling process of the shield machine.
[0094] The multi-dimensional sensor data in step S1 is collected by various sensors installed on the shield machine. The following is the multi-dimensional sensor data of the shield machine:
[0095] Thrust sensor: monitors the thrust applied to the ground when the shield machine moves forward, helping to determine whether it encounters hard rock or other obstacles;
[0096] Torque sensor: measures the torque applied to the cutterhead during rotation to assess the difficulty of cutting the formation;
[0097] Cutter speed sensor: records the rotation speed of the cutter to ensure it remains within a safe working range;
[0098] Advance speed sensor: monitors the overall forward advancement speed of the shield machine;
[0099] Hydraulic system pressure sensor: monitors the pressure status of the hydraulic system to ensure the normal operation of the system and prevent overpressure from damaging the equipment;
[0100] Temperature sensor: measures the temperature of key components such as motors and reducers to prevent failures caused by overheating;
[0101] Vibration sensor: detects vibration during shield machine operation and is used to identify unbalanced loads or worn parts;
[0102] Displacement sensor: tracks the position changes of the shield machine to ensure that the tunnel is excavated according to the designed path;
[0103] Gas sensor: detects gas composition in the tunnel, such as oxygen concentration, toxic and harmful gas content, etc., to ensure construction safety;
[0104] Foam system flow sensor: If the TBM is equipped with a foam injection system, the amount of foam injected will be monitored to improve the stability of the excavation face;
[0105] Shield tail sealing system pressure sensor: monitors the pressure of the shield tail sealing ring to ensure the sealing of the rear of the shield machine;
[0106] Mud system parameter sensor: If a slurry shield is used, it is necessary to monitor the mud pressure, flow, density and other parameters to maintain the stability of the excavation face.
[0107] These sensor data are collected in real time and continuously, and different data features represent different dimensions, thereby obtaining comprehensive data features of the shield machine.
[0108] In one embodiment, step S1 data preprocessing, by grouping the multi-dimensional sensor data by dimension and encoding each group of data, reduces the computational complexity and extracts key features; includes:
[0109] S11, data grouping:
[0110] Input multi-dimensional sensor data Divide into N groups according to the dimension, each group has a dimension of D i ,satisfy:
[0111]
[0112] X i =X[:,:,d i-1 :d i ]
[0113] Among them, X is the multi-dimensional sensor data, L is the length of the time series, D is the dimension of the data, N is the number of groups, X i is the data of group i, D i is the data dimension of the i-th group, d i is the specific dimension value of the i-th group of data, 1≤i≤N.
[0114] In this embodiment, at least two dimensions of the multi-dimensional sensor data may be grouped together according to the degree of association; this grouping method can effectively reduce the dimensions of a single calculation and reduce the calculation complexity.
[0115] S12, data coding:
[0116] For each group of data X i Use the encoder to perform dimensionality reduction and feature extraction to obtain the encoded features:
[0117]
[0118] E i =Encoder(X i )
[0119] Among them, E i is the encoded feature, Encoder is the encoder for dimensionality reduction and feature extraction, d e is the dimension of the data after dimensionality reduction.
[0120] Through the encoder, high-dimensional data can be converted into low-dimensional features to extract key information from the data. The encoder can be a variety of types of algorithms that can be selected based on data features, such as:
[0121] Autoencoder: It is an unsupervised learning method, usually used for nonlinear dimensionality reduction. The autoencoder consists of an encoder and a decoder. The encoder is responsible for compressing the input data into a low-dimensional feature representation, while the decoder attempts to reconstruct the original input from this low-dimensional representation. It is suitable for data such as thrust, torque, hydraulic system pressure and mud parameters.
[0122] Principal component analysis (PCA): It is a classic linear dimensionality reduction technique that achieves dimensionality reduction by finding the main direction of the data to retain the maximum variance of the data. It is suitable for data such as cutter head speed, propulsion speed, temperature, displacement, foam injection volume and shield tail sealing pressure.
[0123] t-Distributed Neighbor Embedding (t-SNE): It is a nonlinear dimensionality reduction technique, which is particularly suitable for the visualization of high-dimensional data because it can better preserve the local structure of the data and is suitable for data encoding of gas composition and content in tunnels.
[0124] Convolutional Neural Network (CNN): When processing images or data with spatial structure, the convolution layer can effectively extract features and is suitable for encoding the vibration data of shield machines.
[0125] In one embodiment, the encoded data of each group is subjected to a self-attention mechanism within the group to capture local features; the method includes step S2, calculating a sliding window variance of each group of encoded data, and adjusting the sensor confidence weight according to the sliding window variance;
[0126] Among them, the sliding window variance is calculated:
[0127] Calculate the coded data E for each group using the cumulative sum method i The sliding window variance of :
[0128]
[0129] Among them, S i (t) is the cumulative sum at the tth moment, 0≤j≤t, is the cumulative sum of squares, μ i (t) is the mean value in the sliding window, is the variance within the sliding window, W is the size of the sliding window; the cumulative sum S i (t) and the cumulative sum of squares Used to calculate the statistical features within the sliding window, the mean μ i (t) and variance It reflects the central tendency and dispersion of the data in the window. When the window size W increases, the calculated data range increases, which can smooth the fluctuation of the data, but may cover up the significant changes in the short term; when W decreases, the calculated data range decreases, which can more sensitively capture short-term changes, but may be affected by noise.
[0130] Sensor confidence adjustment:
[0131] First, the sensor confidence parameter is introduced By definition, each sensor has a confidence parameter C i , which reflects the reliability or importance of the sensor data.
[0132] Adjust weights based on sliding window variance:
[0133]
[0134] Among them, α i (t) is the adjustment weight, C i is the sensor confidence parameter, k is the adjustment coefficient, is the variance within the sliding window, is the baseline variance.
[0135] Adjust the weight α i (t) is determined by the sensor confidence parameter C i and variance change. When the variance in the sliding window increases significantly, the weight α i (t) increases, indicating that the data changes greatly, and the corresponding attention weights also need to be adjusted accordingly to pay more attention to the data with large changes. Conversely, when the variance changes little, the weight α i (t) decreases, indicating that the data is relatively stable and the adjustment of attention weight is small.
[0136] By calculating the variance of the sliding window to detect data changes and adjusting the attention weights in combination with the sensor confidence parameters, the weight of each sensor data is dynamically adjusted to respond to data changes more intelligently while also taking into account the confidence of the sensor itself. This mechanism helps improve the robustness and adaptability of the system, especially when facing changing environments or data sources.
[0137] Step S2 also includes:
[0138] Calculate the intra-group self-attention of each group of encoded data and modify it according to the sensor confidence weight; obtain the intra-group self-attention output;
[0139] Perform self-attention calculation on the data of each group. First, the encoded data E i Perform a linear transformation of query, key, and value to obtain Q i , K i and V i :
[0140]
[0141] Among them, Q i is the query matrix of the i-th group, K i is the i-th group bond matrix, V i is the i-th group value matrix, is the i-th group of linear transformation matrices.
[0142] Then, calculate the self-attention within the group:
[0143]
[0144] Among them, K i T is the i-th group bond matrix K i The transpose of is the i-th group bond matrix K i Dimension.
[0145] Finally, consider the confidence adjustment:
[0146] Z i =α i (t)·Attention i (Q i ,K i ,V i )
[0147] Among them, Z i is the self-attention output within the group. The query matrix Q for the i-th group i , key matrix K i Sum value matrix V iThrough linear transformation from the encoded feature E i Get. Self-attention i The weight matrix is calculated by comparing the similarity of the query and the key. When the similarity between the query and the key is high, the weight of the corresponding value increases. The confidence adjustment weight α i (t) is determined based on the sensor confidence and sliding window variance and is used to correct the self-attention output Z i This adjustment mechanism ensures that when the data changes greatly, the self-attention mechanism can capture the change characteristics more keenly and reflect the actual state of the sensor data.
[0148] The self-attention mechanism allows the model to focus on local areas in the input data, thereby better capturing local patterns and features. This is particularly useful for processing time series data, because the relationship between data points may change over time. The self-attention mechanism can also effectively capture the dependencies between different positions in the sequence, that is, long-range dependencies, so that the model can still maintain good performance when processing long sequence data. At the same time, because the self-attention mechanism can dynamically adjust the weights, it can better adapt to input data under different conditions and enhance the ability to extract fault features.
[0149] In one embodiment, the intra-group self-attention outputs of all groups are spliced together, and the inter-group self-attention mechanism is used to integrate the global features; including: S3, splicing the intra-group self-attention outputs of each group, performing inter-group self-attention calculation on the spliced features, and obtaining the inter-group self-attention output according to the inter-group confidence weight;
[0150] Among them, the output in the splicing group is:
[0151] The output Z of all groups i Putting them together, we get Z:
[0152] Z=[Z1;Z2;…Z i …; Z N ]
[0153] Among them, Z is the feature after splicing, Z i is the self-attention output of the i-th group, Z N is the self-attention output of the Nth group. The concatenated feature Z integrates the features of each group of data for subsequent processing.
[0154] Inter-group self-attention calculation:
[0155] Perform linear transformation on the concatenated feature Z to obtain Q, K and V:
[0156] Q=ZW Q
[0157] K=ZW K
[0158] V=ZW V
[0159] Among them, Q is the query matrix, K is the key matrix, V is the value matrix, and W Q , W K , W V is the linear transformation matrix.
[0160] Next, the inter-group confidence weight β is introduced i :
[0161]
[0162] Among them, β i is the confidence weight between groups, C m is the confidence parameter of the mth group of sensors, 1≤m≤N.
[0163] Calculate the self-attention between groups:
[0164]
[0165] Among them, K T is the transpose of the key matrix K, d k is the dimension of the key matrix K.
[0166] Finally, we get the inter-group self-attention output:
[0167]
[0168] Among them, Y is the inter-group self-attention output. The query matrix Q, key matrix K and value matrix V are obtained from the concatenated features Z through linear transformation. The inter-group self-attention calculation weights the value matrix by comparing the similarity of the query and the key, and according to the inter-group confidence weight β i Summarize each set of attention results to get the final output Y.
[0169] This mechanism enables the model to consider the importance and interrelationship of each set of data when processing the features of each set of data, thereby achieving more accurate fault detection and classification. i When the weight (decision) increases, its influence on the final output also increases accordingly, and vice versa. This weight mechanism ensures that the model reasonably balances and integrates different data features, improving the overall detection accuracy.
[0170] In one embodiment, step S4 performs fault classification and confidence evaluation on the inter-group self-attention output to obtain a fault type output and a fault confidence output, including:
[0171] S41, Fault classification branch:
[0172] Classify the fault type and use the softmax activation function to get the fault type output:
[0173] FaultType(Y) = softmax(YW class +b class )
[0174] Among them, FaultType(Y) is the fault classification output, W class is the linear transformation matrix of the classification layer, b class is the bias vector. The fault classification output FaultType(Y) is obtained from the inter-group self-attention output Y through the SoftMax activation function to predict the probability of each fault. The SoftMax function ensures that the sum of the probabilities of each type of fault output is 1, which facilitates the identification of the most likely fault type.
[0175] Among them, the fault types include tool wear, bearing failure, gearbox failure, motor failure, cable damage, control system failure, hydraulic pump failure, hydraulic valve failure, hydraulic pipeline leakage, propulsion cylinder failure, abnormal propulsion system pressure, shield tail seal failure, mud sealing system failure, foam injection system failure, ventilation system failure, drainage system failure and sensor system failure.
[0176] The SoftMax activation function is a commonly used nonlinear function, mainly used in multi-classification problems, especially in the output layer of neural networks. Its main function is to convert a set of real values into a probability distribution, which can be used to represent the probability of each category. The SoftMax function can ensure that the sum of the output probabilities is 1, which makes it very suitable for multi-classification problems because it can provide a clear probability assigned to each possible category.
[0177] The key features of the SoftMax function include:
[0178] The output is a probability distribution where the sum of the probabilities of all outputs is 1.
[0179] Large input values result in a larger output probability, while small input values result in a smaller probability.
[0180] The output probabilities become more concentrated as the differences between the input values increase, which means that if the raw score of one class is much higher than that of other classes, the SoftMax function will significantly increase the probability of that class while reducing the probabilities of other classes.
[0181] In the fault classification branch, the SoftMax function receives the feature vector Y passed from the inter-group self-attention module and transforms YW through a linear transformationclass +b class Get an unnormalized score vector Z. Then, the SoftMax function converts this score vector into a probability distribution to obtain the probability of each fault type. Ultimately, this probability distribution can be used to determine which fault type is most likely to occur, and each probability value can also be used to evaluate the model's confidence in the classification.
[0182] S42, confidence assessment branch:
[0183] The fault confidence is evaluated and the Sigmoid activation function is used to obtain the fault confidence output:
[0184] Confidence(Y)=σ(YW conf +b conf )
[0185] Among them, Confidence(Y) is the confidence assessment output, W conf is the linear transformation matrix of confidence assessment, b conf is the bias vector. The fault confidence output Confidence(Y) is obtained from the inter-group self-attention output Y through the Sigmoid activation function and is used to evaluate the confidence of the fault prediction. The Sigmoid function limits the output to between 0 and 1, indicating the confidence of the prediction. The closer the value is to 1, the higher the confidence of the model in the prediction result.
[0186] In the confidence evaluation branch, the Sigmoid function is used to extract information from the inter-group self-attention output Y and convert it into a scalar value representing the model's confidence in fault prediction. The specific process is as follows:
[0187] Linear transformation: First, the inter-group self-attention output Y undergoes a linear transformation, namely YW conf +b conf The purpose of this linear transformation is to map the self-attention output to a suitable space so that the subsequent Sigmoid function can better evaluate the confidence.
[0188] Sigmoid activation: Next, the result of the linear transformation is passed through the Sigmoid function to obtain a value between 0 and 1, which can be interpreted as the confidence of the model in predicting a specific fault. The closer the value is to 1, the more confident the model is in the prediction result; conversely, the closer the value is to 0, the weaker the model's confidence in the prediction result.
[0189] Embodiment 2
[0190] The embodiment of the present invention discloses a shield machine fault diagnosis system based on a self-attention mechanism, referring to Figure 2As shown, it includes the following modules:
[0191] Data preprocessing module: used to obtain multi-dimensional sensor data of the shield machine and perform data preprocessing to obtain multiple sets of coded data;
[0192] Intra-group self-attention module: used to calculate the sliding window variance of each group of encoded data and adjust the sensor confidence weight according to the sliding window variance; calculate the intra-group self-attention of each group of encoded data and modify it according to the sensor confidence weight; obtain the intra-group self-attention output;
[0193] Inter-group self-attention module: used to splice the self-attention outputs within each group, calculate the inter-group self-attention on the spliced features, and obtain the inter-group self-attention output according to the inter-group confidence weight;
[0194] Feature extraction module: used to extract features from inter-group self-attention output;
[0195] Classification and confidence assessment module: used to perform fault classification and confidence assessment on the features extracted by the feature extraction module to obtain fault type output and fault confidence output.
[0196] This embodiment is used for feature extraction and diagnosis and identification of fault data during the tunneling process of the shield machine; multiple sensors installed on the shield machine collect multi-dimensional data such as vibration, temperature, and pressure in real time. These data are first preprocessed to remove erroneous data points and fill in missing data. Then, the data is input into the intra-group self-attention mechanism for preliminary feature extraction, capturing the correlation between the sensor data within the group, and extracting the intra-group features by calculating the attention weights between the sensor data within the group. Next, the inter-group self-attention mechanism is applied to capture the correlation between different groups, and the interactive features between the groups are extracted by calculating the data correlation weights between different groups. In order to identify sudden faults and continuous cumulative faults, a sliding window method is used to calculate the variance variation. When the variance increases significantly within the sliding window, it is identified as a potential fault point and processed centrally. The sensor observation error is introduced, and the feature extraction process is optimized in combination with the sensor confidence. The data weight is adjusted according to the sensor confidence to reduce the impact of the observation error on the feature extraction.
[0197] The improved Transformer model is used for feature extraction and fault classification, integrating the intra-group and inter-group self-attention mechanism, sensor confidence and variance variation features, and optimizing parameters by maximizing classification accuracy and minimizing error during model training. Finally, the model outputs the fault type and its confidence.
[0198] Through the above steps, the present invention can effectively extract the fault characteristics of the shield machine during the excavation process, realize accurate fault classification and diagnosis, and provide reliable technical support for the fault diagnosis of the shield machine.
[0199] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0200] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A shield machine fault diagnosis method based on self-attention mechanism, characterized in that: The following steps are involved: S1. Acquire multi-dimensional sensor data of a shield machine and perform data preprocessing to obtain multiple groups of coded data; wherein the data preprocessing includes data grouping and data coding; S2, calculating the sliding window variance of each group of coded data, and adjusting the sensor confidence weight according to the sliding window variance; calculating the intra-group self-attention of each group of coded data, and correcting it according to the sensor confidence weight; obtaining the intra-group self-attention output; S3, splicing the self-attention outputs within each group, performing inter-group self-attention calculation on the spliced features, and obtaining inter-group self-attention outputs according to the inter-group confidence weights; S4. Perform fault classification and confidence evaluation on the inter-group self-attention output to obtain a fault type output and a fault confidence output.
2. A shield machine fault diagnosis method based on self-attention mechanism as claimed in claim 1, characterized in that: The data grouping in S1 specifically includes: The multi-dimensional sensor data Divide into N groups according to the dimension, each group has a dimension of D i , the formula is: X i =X[:,:,d i-1 :d i ] Among them, X is the multi-dimensional sensor data, L is the length of the time series, D is the dimension of the data, N is the number of groups, X i is the data of group i, D i is the data dimension of the i-th group, d i is the specific dimensional value of the i-th group of data, 1≤i≤N; the multi-dimensional sensor data of the shield machine includes: thrust, torque, cutter head speed, propulsion speed, hydraulic system pressure, temperature, vibration, displacement, gas composition, foam injection amount, shield tail sealing pressure and mud parameters.
3. A shield machine fault diagnosis method based on self-attention mechanism as claimed in claim 2, characterized in that: The data encoding in S1 specifically includes: For each group of data X i The encoder is used for dimensionality reduction and feature extraction, and the formula is expressed as: E i =Encoder(X i ) The encoded features are: Among them, E i is the feature after encoding the i-th group of multi-dimensional sensor data of the shield machine, Encoder is the encoder for dimensionality reduction and feature extraction, d e is the dimension of the data after dimensionality reduction.
4. A shield machine fault diagnosis method based on self-attention mechanism as claimed in claim 3, characterized in that: The calculation of the sliding window variance of each group of encoded data in S2 specifically includes: Calculate the coded data E for each group using the cumulative sum method i The sliding window variance of : Among them, S i (t) is the cumulative sum of the coded data of the i-th group at time t, 0≤j≤t, is the cumulative sum of squares, μ i (t) is the mean value in the sliding window, is the variance within the sliding window, W is the size of the sliding window; In S2, the sensor confidence weight is adjusted according to the sliding window variance; the formula is expressed as: Among them, C i is the sensor confidence parameter, α i (t) is the sensor confidence weight, k is the adjustment coefficient, is the variance within the sliding window, is the baseline variance.
5. A shield machine fault diagnosis method based on self-attention mechanism as claimed in claim 4, characterized in that: The calculation of the intra-group self-attention of each group of encoded data in S2 specifically includes: The encoded characteristic E i Perform a linear transformation of query, key, and value to obtain Q i , K i and V i The formula is: The formula for calculating the self-attention within the group is: The formula for the self-attention output within the group is obtained as: Z i =α i (t)·Attention i (Q i ,K i ,V i ) Among them, Q i is the query matrix of the i-th group, K i is the i-th group bond matrix, V i is the i-th group value matrix, is the i-th group of linear transformation matrices, K i T is the i-th group bond matrix K i The transpose of is the i-th group bond matrix K i The dimension, Z i is the self-attention output within the group.
6. A shield machine fault diagnosis method based on self-attention mechanism as claimed in claim 5, characterized in that: In S3, the self-attention outputs within each group are concatenated to obtain Z: Z=[Z1;Z2;…Z i …;WITH N ] Among them, Z is the feature after splicing, Z i is the self-attention output of the i-th group, Z N is the self-attention output of the Nth group.
7. A shield machine fault diagnosis method based on self-attention mechanism as claimed in claim 6, characterized in that: In S3, the inter-group self-attention calculation specifically includes: Perform linear transformation of query, key and value on the concatenated feature Z, and get the formulas of Q, K and V as follows: Q=ZW Q K=ZW K V=ZW V The inter-group self-attention calculation formula is: The inter-group confidence weight β i The formula is: The inter-group self-attention output is obtained: Among them, Q is the query matrix, K is the key matrix, V is the value matrix, and W Q , W K , W V is the linear transformation matrix, K T is the transpose of the key matrix K, d k is the dimension of the key matrix K, β i is the confidence weight between groups, C m is the confidence parameter of the mth group of sensors, 1≤m≤N, and Y is the inter-group self-attention output.
8. A shield machine fault diagnosis method based on self-attention mechanism as claimed in claim 7, characterized in that: The fault type output in S4 uses a softmax activation function to obtain the fault type output formula: FaultType(Y)=softmax(YW class +b class ) Among them, FaultType(Y) is the fault classification output, W class is the linear transformation matrix of the classification layer, b class is the bias vector; The fault types mentioned include tool wear, bearing failure, gearbox failure, motor failure, cable breakage, control system failure, hydraulic pump failure, hydraulic valve failure, hydraulic line leakage, propulsion cylinder failure, abnormal propulsion system pressure, shield tail seal failure, mud sealing system failure, foam injection system failure, ventilation system failure, drainage system failure and sensor system failure.
9. A shield machine fault diagnosis method based on self-attention mechanism according to any one of claims 1 to 8, characterized in that: The fault confidence output in S4 uses the Sigmoid activation function to obtain the fault confidence output formula: Confidence(Y)=σ(YW conf +b conf ) Among them, Confidence(Y) is the confidence assessment output, σ is the Sigmoid activation function, W conf is the linear transformation matrix for confidence assessment, b conf is the bias vector.
10. A shield machine fault diagnosis system based on self-attention mechanism, characterized in that: Includes the following modules: Data preprocessing module: used to obtain multi-dimensional sensor data of the shield machine and perform data preprocessing to obtain multiple sets of coded data; Intra-group self-attention module: used to calculate the sliding window variance of each group of encoded data and adjust the sensor confidence weight according to the sliding window variance; Calculate the intra-group self-attention of each group of encoded data, and modify it according to the sensor confidence weight; obtain the intra-group self-attention output; Inter-group self-attention module: used to splice the self-attention outputs within each group, perform inter-group self-attention calculations on the spliced features, and obtain inter-group self-attention outputs based on the inter-group confidence weights; Feature extraction module: used for extracting features from the inter-group self-attention output; Classification and confidence assessment module: used to perform fault classification and confidence assessment on the features extracted by the feature extraction module to obtain fault type output and fault confidence output.
Citation Information
Patent Citations
Fault diagnosis method of classification parameter distribution based on cross attention and self-attention
CN112819037A
Coal mill fault early warning method based on attention mechanism
CN115730191A
Multi-scale feature fusion gearbox fault diagnosis method based on self-attention mechanism
CN116010900A
Dynamic process fault detection method based on novel self-attention mechanism
CN118797512A
Image encoder and image decoder
JP2006352261A
Cited By
Shield tunneling machine cutter cylinder state monitoring method based on multi-sensor information fusion technology
CN120724292A
Plug valve fault early warning method based on deep learning
CN121207533A