A method and system for fault diagnosis of tunnel boring machines based on self-attention mechanism

By processing multi-dimensional sensor data from tunnel boring machines using a self-attention mechanism, the problems of high computational complexity and difficulty in data fusion are solved, enabling efficient and reliable fault detection and classification, and adapting to complex industrial environments.

CN119807894BActive Publication Date: 2025-10-31BEIHANG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411851830.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-10-31
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

Existing technologies suffer from high computational complexity, difficulty in fusing heterogeneous data, and insufficient real-time performance when processing multi-dimensional sensor data from tunnel boring machines. Furthermore, they lack effective sensor confidence and error processing mechanisms, resulting in insufficient accuracy and robustness in fault detection.

Method used

A self-attention mechanism is adopted, which combines data grouping, sliding window variance calculation and sensor confidence adjustment with in-group and between-group self-attention mechanisms to perform fault detection and classification, including data preprocessing, in-group self-attention calculation, between-group self-attention calculation and fault type assessment.

Benefits of technology

It reduces computational complexity, improves the accuracy and efficiency of fault detection, enhances data fusion capabilities, enables real-time fault detection and reliable fault diagnosis results, and adapts to complex industrial environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119807894B_ABST
    Figure CN119807894B_ABST
Patent Text Reader

Abstract

This invention discloses a method and system for fault diagnosis of tunnel boring machines (TBMs) based on a self-attention mechanism. The method includes the following steps: acquiring multi-dimensional sensor data from the TBM and performing data preprocessing to obtain multiple sets of coded data; calculating the sliding window variance of each set of coded data and adjusting the sensor confidence weights; calculating the intra-group self-attention of each set of coded data to obtain the intra-group self-attention output; concatenating the intra-group self-attention outputs and performing inter-group self-attention calculation to obtain the inter-group self-attention output; and classifying and evaluating the confidence of the inter-group self-attention outputs to obtain the fault type output and fault confidence output. This invention achieves efficient processing of multi-dimensional sensor data and real-time fault detection and classification through data grouping, a self-attention mechanism, sensor confidence adjustment, and sliding window variance calculation, thereby improving the accuracy and efficiency of fault management during the TBM tunneling process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of tunnel boring machine fault diagnosis technology, and more specifically to a fault data feature extraction and diagnosis identification method and system based on a self-attention mechanism. Background Technology

[0002] In modern industrial and engineering applications, real-time monitoring and analysis of sensor data are crucial for fault detection and prevention. This is especially true during tunnel boring machine (TBM) excavation, where timely and accurate fault identification is essential for ensuring construction safety and efficiency. With the increasing number and types of sensors in TBMs, massive amounts of multi-dimensional data are generated. This data contains a wealth of information that can be used to detect equipment operating status, identify potential faults, and predict system performance. However, existing technologies still have some problems and shortcomings in processing multi-dimensional sensor data and performing fault detection and classification, limiting their application in complex engineering environments.

[0003] Existing technologies typically employ traditional statistical analysis methods or simple machine learning models when processing multi-dimensional sensor data. These methods suffer from high computational complexity and struggle to provide real-time responses when dealing with high-dimensional data. Furthermore, sensor data often exhibits high dimensionality, temporal correlation, and nonlinear characteristics, making it difficult for traditional methods to fully capture the complex relationships and potential patterns within the data, resulting in insufficient accuracy and robustness in fault detection.

[0004] Different types of sensor data from tunnel boring machines exhibit significant differences in characteristics and data formats, making it difficult for existing technologies to effectively integrate and process them uniformly. Furthermore, sensor data often contains noise and errors, and current methods lack effective mechanisms to handle these noises and errors, thus limiting the accuracy of fault detection and classification.

[0005] During tunnel boring machine (TBM) excavation, fault detection systems require real-time monitoring and analysis of massive amounts of sensor data to promptly identify and address faults. However, existing technologies suffer from low computational efficiency in large-scale data processing and real-time analysis. Especially when dealing with large volumes and high-dimensional data, traditional methods struggle to meet real-time processing requirements.

[0006] Existing technologies for fault detection typically neglect the confidence level and error issues of sensor data. Sensor data is inherently unstable and prone to cumulative errors, problems that are not adequately considered in traditional methods, leading to a decrease in the reliability and accuracy of fault detection results.

[0007] In summary, existing technologies for fault detection and classification of multi-dimensional sensor data during tunnel boring machine (TBM) excavation suffer from problems such as high processing complexity, difficulty in fusing heterogeneous data, insufficient real-time performance and computational efficiency, and a lack of sensor confidence and error handling mechanisms. These are also problems that urgently need to be solved by those skilled in the art. Summary of the Invention

[0008] In view of this, the present invention provides a method and system for fault diagnosis of tunnel boring machines based on a self-attention mechanism. This method effectively processes multi-dimensional sensor data by introducing data grouping, self-attention mechanism, sensor confidence adjustment and sliding window variance calculation, and performs fault detection and classification, thereby significantly improving the accuracy and efficiency of fault management.

[0009] To achieve the above objectives, the present invention adopts the following technical solution:

[0010] In a first aspect, the present invention provides a method for diagnosing tunnel boring machine faults based on a self-attention mechanism, comprising the following steps:

[0011] S1. Acquire multi-dimensional sensor data of the tunnel boring machine and perform data preprocessing to obtain multiple sets of coded data; wherein, the data preprocessing includes data grouping and data encoding;

[0012] S2. Calculate the sliding window variance for each group of encoded data, and adjust the sensor confidence weights according to the sliding window variance; calculate the intra-group self-attention for each group of encoded data, and correct it according to the sensor confidence weights; obtain the intra-group self-attention output;

[0013] S3. Concatenate the intra-group self-attention outputs of each group, perform inter-group self-attention calculation on the concatenated features, and obtain the inter-group self-attention output based on the inter-group confidence weights.

[0014] S4. Perform fault classification and confidence assessment on the inter-group self-attention output to obtain fault type output and fault confidence output.

[0015] Furthermore, the data grouping in S1 specifically includes:

[0016] The multi-dimensional sensor data Divide into N groups according to dimension, with each group having dimension D. i The formula is expressed as:

[0017]

[0018] X i =X[:,:,d i-1 :d i ]

[0019] Where X represents multi-dimensional sensor data, L is the length of the time series, D is the dimension of the data, and N is the number of groups. i For the data in the i-th group, D i Let d be the data dimension of the i-th group. i Let i be the specific dimension value of the i-th data set, where 1 ≤ i ≤ N; the multi-dimensional sensor data of the tunnel boring machine includes: thrust, torque, cutterhead rotation speed, propulsion speed, hydraulic system pressure, temperature, vibration, displacement, gas composition, foam injection volume, tail seal pressure, and mud parameters.

[0020] Furthermore, the data encoding in S1 specifically includes:

[0021] For each group's data X i The encoder is used for dimensionality reduction and feature extraction, expressed by the following formula:

[0022] E i =Encoder(X) i )

[0023] The encoded features are as follows:

[0024]

[0025] Among them, E i The features are encoded from the i-th group of multi-dimensional sensor data of the tunnel boring machine. The Encoder is an encoder for dimensionality reduction and feature extraction. e The dimension of the data after dimensionality reduction.

[0026] Furthermore, the calculation of the sliding window variance for each group of encoded data in S2 specifically includes:

[0027] The encoded data E for each group is calculated using a cumulative sum method. i Sliding window variance:

[0028]

[0029]

[0030] Among them, S i (t) represents the cumulative sum at time t, where 0 ≤ j ≤ t. For the cumulative sum of squares, μ i (t) represents the mean within the sliding window. Let W be the variance within the sliding window, and W be the size of the sliding window.

[0031] In step S2, the sensor confidence weights are adjusted based on the sliding window variance; the formula is expressed as follows:

[0032]

[0033] Among them, C i For sensor confidence parameters, α i (t) represents the sensor confidence weight, and k is the adjustment coefficient. The variance within the sliding window. This represents the baseline variance.

[0034] Furthermore, the calculation of intra-group self-attention for each group of encoded data in S2 specifically includes:

[0035] The encoded feature E i Perform a linear transformation of the query, key, and value to obtain Q. i K i and V i The formula is:

[0036]

[0037] The formula for calculating the in-group self-attention is:

[0038]

[0039] The formula for the self-attention output within the group is as follows:

[0040] Z i =α i (t)·Attention i (Q i ,K i V i )

[0041] Among them, Q i Let K be the query matrix for the i-th group. i Let V be the key matrix of the i-th group. i Let i be the value matrix of the i-th group. Let K be the i-th linear transformation matrix. i T Let K be the i-th group of bond matrices. i transpose, Let K be the i-th group of bond matrices. i The dimension of Z i This 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] Where Z represents the concatenated feature, Z i Z is the self-attention output of the i-th group. N This is the self-attention output for the Nth group.

[0045] Furthermore, in S3, the inter-group self-attention calculation specifically includes:

[0046] The formulas for obtaining Q, K, and V by performing a linear transformation on the query, key, and value of the concatenated feature Z are as follows:

[0047] Q = ZW Q

[0048] K = ZW K

[0049] V = ZW V

[0050] The formula for calculating inter-group self-attention is:

[0051]

[0052] The inter-group confidence weight β i The formula is:

[0053]

[0054] The inter-group self-attention output is obtained as follows:

[0055]

[0056] Where Q is the query matrix, K is the key matrix, V is the value matrix, and W is the value matrix. Q W K W V K is a linear transformation matrix. T Let d be the transpose of the key matrix K. k Let K be the dimension of the key matrix, and β be the dimension of the key matrix. i For the confidence weights between groups, C m Let Y be the confidence parameter of the m-th sensor group, 1≤m≤N, and Y be the inter-group self-attention output.

[0057] Furthermore, in S4, the fault type output uses the softmax activation function to obtain the following formula:

[0058] FaultType(Y) = softmax(YW) class +b class )

[0059] Where FaultType(Y) is the fault classification output, W class Let b be the linear transformation matrix of the classification layer.class It is the bias vector;

[0060] The types of failures 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.

[0061] Furthermore, in S4, the fault confidence output uses the Sigmoid activation function, and the formula for the fault confidence output is as follows:

[0062] Confidence(Y)=σ(YW conf +b conf )

[0063] Where Confidence(Y) is the confidence assessment output, σ is the Sigmoid activation function, and W conf b is the linear transformation matrix for confidence assessment. conf This is the bias vector.

[0064] Secondly, the present invention provides a tunnel boring machine fault diagnosis system based on a self-attention mechanism, comprising the following modules:

[0065] Data preprocessing module: used to acquire multi-dimensional sensor data of the tunnel boring 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 weights according to the sliding window variance; calculate the intra-group self-attention of each group of encoded data and correct it according to the sensor confidence weights; and obtain the intra-group self-attention output;

[0067] Inter-group self-attention module: used to concatenate the intra-group self-attention outputs of each group, perform inter-group self-attention calculation on the concatenated features, and obtain the inter-group self-attention output according to the inter-group confidence weights;

[0068] Feature extraction module: used to extract features from the inter-group self-attention output;

[0069] Classification and confidence assessment module: This module is used to classify and assess the confidence of the features extracted by the feature extraction module, and to obtain the fault type output and fault confidence output.

[0070] As can be seen from the above technical solution, the present invention discloses a method and system for extracting and diagnosing fault features of tunnel boring machines, which has the following advantages compared with the prior art:

[0071] 1. Low processing complexity: By grouping and encoding data, the computational complexity of multi-dimensional sensor data processing is reduced, and the system's operating efficiency is improved.

[0072] 2. Precise 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 self-attention mechanism within and between groups can capture long-range dependencies in local data and integrate global features, thereby 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 promptly detect and warn of faults.

[0075] 5. High reliability: Through fault classification and confidence assessment, it provides accurate and reliable fault diagnosis results, which improves 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 issues, making it more robust when applied in complex industrial environments. Attached Figure Description

[0077] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0078] Figure 1 The present invention provides a flowchart of a tunnel boring machine fault diagnosis method based on a self-attention mechanism.

[0079] Figure 2 The present invention provides a connection diagram for a tunnel boring machine fault diagnosis system based on a self-attention mechanism. Detailed Implementation

[0080] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0081] Example 1

[0082] This invention discloses a method for diagnosing tunnel boring machine faults based on a self-attention mechanism, referring to... Figure 1 As shown, it includes the following steps:

[0083] S1. Acquire multi-dimensional sensor data from the tunnel boring machine and perform data preprocessing to obtain multiple sets of coded data; among which, data preprocessing includes data grouping and data encoding;

[0084] S2. Calculate the sliding window variance for each group of encoded data, and adjust the sensor confidence weights according to the sliding window variance; calculate the intra-group self-attention for each group of encoded data, and correct it according to the sensor confidence weights; obtain the intra-group self-attention output;

[0085] S3. Concatenate the intra-group self-attention outputs of each group, perform inter-group self-attention calculation on the concatenated features, and obtain the inter-group self-attention output based on the inter-group confidence weights.

[0086] S4. Perform fault classification and confidence assessment on the inter-group self-attention output to obtain fault type output and fault confidence output.

[0087] This embodiment is used for fault feature extraction and diagnosis identification during the tunneling process of a tunnel boring machine (TBM). It acquires data from various sensors installed on the TBM, including but not limited to thrust, torque, cutterhead speed, propulsion speed, hydraulic system pressure, temperature, vibration, displacement, gas composition, foam injection volume, tail seal pressure, and mud parameters.

[0088] The aforementioned multi-dimensional sensor data is divided into N groups according to dimensions, with each group containing specific types of sensor data. For example, thrust and propulsion speed can be grouped into the first group, torque and cutterhead speed into the second group, hydraulic system pressure, temperature, vibration, and displacement into the third group, and gas composition, foam injection volume, shield tail sealing pressure, and mud parameters into the fourth group.

[0089] For each group's data, an encoder is used for dimensionality reduction and feature extraction. The encoder can be PCA, an autoencoder, or other suitable dimensionality reduction techniques to obtain encoded, dimensionality-reduced features.

[0090] By grouping multi-dimensional sensor data by dimension, multiple datasets containing different data features are obtained. Each dataset is then encoded to reduce computational complexity and extract key features.

[0091] Furthermore, the changes in detection data are calculated using a sliding window variance, and the attention weights are adjusted in conjunction with sensor confidence parameters to improve the accuracy of fault detection. When data changes are significant, the attention weights are increased to enhance sensitivity to changing features. Self-attention mechanisms are applied within and between groups to capture long-range dependencies and inter-group relationships, enhancing the ability to extract fault features. Intra-group self-attention captures local features, while inter-group self-attention integrates global features for comprehensive analysis.

[0092] Finally, a classification layer and a confidence assessment layer are used to classify fault types and assess their confidence levels, providing accurate and reliable fault diagnosis results. The classification layer identifies fault types, while the confidence assessment layer measures the reliability of the prediction results. Possible fault types include, but are not limited to, tool wear, bearing failure, gearbox failure, and motor failure.

[0093] This method achieves 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 accuracy and efficiency of fault management during the tunnel boring machine excavation process.

[0094] In step S1, the multi-dimensional sensor data is collected through various sensors installed on the tunnel boring machine. The following is the multi-dimensional sensor data of the tunnel boring machine:

[0095] Thrust sensor: Monitors the thrust applied to the ground as the tunnel boring machine advances, helping to determine whether it encounters hard rock or other obstacles;

[0096] Torque sensor: measures the torque experienced by the cutter head during rotation to assess the difficulty of cutting the formation;

[0097] Cutter head speed sensor: records the rotation speed of the cutter head to ensure it remains within a safe operating range;

[0098] Propulsion speed sensor: monitors the overall forward propulsion speed of the tunnel boring machine;

[0099] Hydraulic system pressure sensor: Monitors the pressure status of the hydraulic system to ensure normal system operation and prevent overpressure damage to equipment;

[0100] Temperature sensor: measures the temperature of critical components such as motors and reducers to prevent malfunctions caused by overheating;

[0101] Vibration sensors: detect vibrations during tunnel boring machine operation to identify unbalanced loads or worn parts;

[0102] Displacement sensors: track changes in the position of the tunnel boring machine to ensure that the tunnel is excavated along the designed path;

[0103] Gas sensors: detect the composition of gases inside the tunnel, such as oxygen concentration and the content of toxic and harmful gases, to ensure construction safety;

[0104] Foam system flow sensor: If the tunnel boring machine is equipped with a foam injection system, it will monitor the amount of foam injected to improve the stability of the excavation face;

[0105] Pressure sensor for tail shield sealing system: monitors the pressure of the tail shield sealing ring to ensure the sealing of the rear of the tunnel boring machine;

[0106] Mud system parameter sensors: If a mud-water balance shield tunneling machine is used, it is necessary to monitor parameters such as mud pressure, flow rate, and density to maintain the stability of the excavation face.

[0107] These sensor data are collected in real time and continuously, with different data characteristics representing different dimensions, thereby obtaining comprehensive data characteristics of the tunnel boring machine.

[0108] In one embodiment, step S1, data preprocessing, involves grouping multi-dimensional sensor data by dimension and encoding each group to reduce computational complexity and extract key features; including:

[0109] S11, Data Grouping:

[0110] Input multi-dimensional sensor data Divide into N groups according to dimension, with each group having dimension D. i ,satisfy:

[0111]

[0112] X i =X[:,:,d i-1 :d i ]

[0113] Where X represents multi-dimensional sensor data, L is the length of the time series, D is the dimension of the data, and N is the number of groups. i For the data in the i-th group, D i Let d be the data dimension of the i-th group. i Let be the specific dimension value of the i-th data group, where 1 ≤ i ≤ N.

[0114] In this embodiment, at least two dimensions of multi-dimensional sensor data can be grouped together based on their correlation. This grouping method can effectively reduce the number of dimensions in a single calculation and lower the computational complexity.

[0115] S12, Data Encoding:

[0116] For each group's data X i The encoder is used for dimensionality reduction and feature extraction to obtain the encoded features:

[0117]

[0118] E i =Encoder(X) i )

[0119] Among them, E i The encoded features are represented by the encoder, which is the encoder for dimensionality reduction and feature extraction. e The dimension of the data after dimensionality reduction.

[0120] An encoder can transform high-dimensional data into low-dimensional features, extracting key information from the data. Encoders can be various types of algorithms, selected based on the data characteristics.

[0121] An autoencoder is an unsupervised learning method typically used for nonlinear dimensionality reduction. It consists of an encoder and a decoder. The encoder compresses 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): A classic linear dimensionality reduction technique that achieves dimensionality reduction by finding the principal direction of the data to preserve the maximum variance. It is suitable for data such as cutterhead rotation speed, propulsion speed, temperature, displacement, foam injection volume, and shield tail sealing pressure.

[0123] t-distributed neighborhood embedding (t-SNE) is a non-linear dimensionality reduction technique, particularly suitable for visualizing high-dimensional data because it can better preserve the local structure of the data. It is suitable for encoding data on gas composition and content within tunnels.

[0124] Convolutional Neural Networks (CNNs): When processing images or data with spatial structure, convolutional layers can effectively extract features and are suitable for encoding vibration data of tunnel boring machines.

[0125] In one embodiment, the encoded data of each group is used with an intra-group self-attention mechanism to capture local features; including step S2, calculating the sliding window variance of each group of encoded data, and adjusting the sensor confidence weights according to the sliding window variance;

[0126] Among them, the variance of the sliding window is calculated as follows:

[0127] The coded data E for each group is calculated using the cumulative sum method. i Sliding window variance:

[0128]

[0129] Among them, S i (t) represents the cumulative sum at time t, where 0 ≤ j ≤ t. For the cumulative sum of squares, μ i (t) represents the mean within the sliding window. The variance within the sliding window is S, where W is the size of the sliding window; the cumulative sum is S. i (t) and cumulative sum of squares Used to calculate statistical characteristics within a sliding window, including the mean μ. i (t) and variance This reflects the central tendency and dispersion of the data within the window. When the window size W increases, the range of data to be calculated increases, which can smooth out data fluctuations, but may mask significant short-term changes; when W decreases, the range of data to be calculated decreases, which can more sensitively capture short-term changes, but may be affected by noise.

[0130] Sensor confidence adjustment:

[0131] First, introduce the sensor confidence parameter. By definition, each sensor has a confidence parameter C. i This reflects the reliability or importance of the sensor data.

[0132] Weights are adjusted based on the sliding window variance:

[0133]

[0134] Where, α i (t) represents the adjusted weights, and C... i This is the sensor confidence parameter, and k is the adjustment coefficient. It is the variance within the sliding window. It is the baseline variance.

[0135] Adjusting weight α i (t) is derived from the sensor confidence parameter C i The weight α is determined by the change in variance. When the variance within the sliding window increases significantly, the weight α... i An increase in (t) indicates significant data variation, requiring a corresponding adjustment of the attention weights to focus more on the data exhibiting greater change. Conversely, when the variance changes relatively little, the weight α... i A decrease in (t) indicates that the data is relatively stable and the adjustment of attention weights is small.

[0136] By calculating changes in the detected data using a sliding window variance and adjusting the attention weights in conjunction with sensor confidence parameters, the weights of each sensor's data are dynamically adjusted, enabling a more intelligent response to data changes while also taking into account the sensor's own confidence level. This mechanism helps improve the system's robustness and adaptability, especially when facing changing environments or data sources.

[0137] Step S2 also includes:

[0138] Calculate the intra-group self-attention for each group of coded data and correct it according to the sensor confidence weight; obtain the intra-group self-attention output;

[0139] Self-attention calculation is performed on the data for each group. First, the encoded data E... i Perform a linear transformation of the query, key, and value to obtain Q. i K i and V i :

[0140]

[0141] Among them, Q i Let K be the query matrix for the i-th group. i Let V be the key matrix of the i-th group. i Let i be the value matrix of the i-th group. Let be the linear transformation matrix of the i-th group.

[0142] Then, calculate the self-attention within the group:

[0143]

[0144] Among them, K i T Let K be the i-th group of bond matrices. i transpose, Let K be the i-th group of bond matrices. i Dimensions.

[0145] Finally, consider confidence level adjustment:

[0146] Z i =α i (t)·Attention i (Q i ,K i V i )

[0147] Among them, Z i This is the self-attention output within the group. The query matrix Q for the i-th group... i Key matrix K i Sum matrix V iFrom the encoded feature E through linear transformation i Attention i A weighted matrix is ​​calculated by comparing the similarity between the query and the key. The weight of the corresponding value increases when the similarity between the query and the key is high. Confidence-adjusted weight α i (t) is determined based on sensor confidence and sliding window variance, and is used to correct the self-attention output Z. i This adjustment mechanism ensures that, when data changes significantly, the self-attention mechanism can more sensitively capture changing features and reflect the actual state of the sensor data.

[0148] Self-attention allows models to focus on local regions in the input data, thus better capturing local patterns and features. This is particularly useful for processing time series data, as the relationships between data points may change over time. Self-attention also effectively captures dependencies between different positions in the sequence, i.e., long-range dependencies, enabling the model to maintain good performance when processing long-term data. Furthermore, because self-attention can dynamically adjust weights, it can better adapt to input data under different conditions, enhancing its ability to extract fault features.

[0149] In one embodiment, the intra-group self-attention outputs of all groups are concatenated together, and the inter-group self-attention mechanism is used to integrate global features; including: S3, concatenating the intra-group self-attention outputs of each group, performing inter-group self-attention calculation on the concatenated features, and obtaining the inter-group self-attention output according to the inter-group confidence weight.

[0150] The output within the splicing group includes:

[0151] The output Z of all groups i When pieced together, we get Z:

[0152] Z = [Z1; Z2; ... Z] i …;Z N ]

[0153] Where Z represents the concatenated feature, Z i Z is the self-attention output of the i-th group. N This is the self-attention output for the Nth group. The concatenated feature Z integrates the features of each group's data and is used for subsequent processing.

[0154] Calculation of inter-group self-attention:

[0155] Perform a linear transformation on the concatenated feature Z using query, key, and value methods to obtain Q, K, and V:

[0156] Q = ZW Q

[0157] K = ZW K

[0158] V = ZW V

[0159] Where Q is the query matrix, K is the key matrix, V is the value matrix, and W is the value matrix. Q W K W V Let be a linear transformation matrix.

[0160] Next, the inter-group confidence weight β is introduced. i :

[0161]

[0162] Where, β i For the confidence weights between groups, C m Let N be the confidence parameter for the m-th sensor group, where 1 ≤ m ≤ N.

[0163] Calculate inter-group self-attention:

[0164]

[0165] Among them, K T Let d be the transpose of the key matrix K. k Let K be the dimension of the key matrix.

[0166] Finally, the inter-group self-attention output is obtained:

[0167]

[0168] Here, Y is the output of the inter-group self-attention. The query matrix Q, key matrix K, and value matrix V are obtained from the concatenated features Z through a linear transformation. The inter-group self-attention calculation is performed by weighting the value matrix by comparing the similarity between the query and the key, and then adjusting the weights based on the inter-group confidence weights β. i Summarize the attention results for each group to obtain the final output Y.

[0169] This mechanism enables the model to consider the importance and interrelationships of each data set when processing its features, thereby achieving more accurate fault detection and classification. The importance of a particular data set (determined by the confidence weight β) is considered. i When the weighting factor increases, its impact on the final output also increases accordingly, and vice versa. This weighting mechanism ensures that the model achieves a reasonable balance and integration among different data features, thereby improving the overall detection accuracy.

[0170] In one embodiment, step S4 performs fault classification and confidence assessment on the inter-group self-attention output to obtain fault type output and fault confidence output, including:

[0171] S41, Fault Classification Branch:

[0172] The fault types are categorized, and the softmax activation function is used to obtain the fault type output:

[0173] FaultType(Y) = softmax(YW) class +b class )

[0174] Where FaultType(Y) is the fault classification output, W class b is the linear transformation matrix of the classification layer. class This 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, used to predict the probability of each fault type. The SoftMax function ensures that the sum of the probabilities of each fault type in the output is 1, facilitating the identification of the most likely fault type.

[0175] The types of failures 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 non-linear function, primarily used in multi-class classification problems, especially in the output layer of neural networks. Its main function is to transform a set of real values ​​into a probability distribution, which can be used to represent the probability of each class. The SoftMax function guarantees that the sum of the output probabilities is 1, making it ideal for multi-class classification problems because it provides a definite probability to assign to each possible class.

[0177] Key features of the SoftMax function include:

[0178] The output is a probability distribution, and the sum of the probabilities of all outputs is 1.

[0179] Larger input values ​​result in higher output probabilities, while smaller input values ​​result in lower probabilities.

[0180] The output probabilities become more concentrated as the differences between the input values ​​increase. This means that if the raw score of a certain category is much higher than that of other categories, the SoftMax function will significantly increase the probability of that category while decreasing the probability of other categories.

[0181] In the fault classification branch, the SoftMax function receives the feature vector Y passed from the inter-group self-attention module and performs a linear transformation YW.class +b class An unnormalized score vector Z is obtained. Next, the SoftMax function transforms this score vector into a probability distribution, thus obtaining 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 that classification.

[0182] S42, Confidence Assessment Branch:

[0183] The fault confidence is evaluated using the Sigmoid activation function, and the fault confidence output is obtained:

[0184] Confidence(Y)=σ(YW conf +b conf )

[0185] Where Confidence(Y) is the confidence assessment output, W conf It is the linear transformation matrix for confidence assessment, b conf This 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 restricts the output to between 0 and 1, indicating the level of confidence in 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 between-group self-attention output Y and convert it into a scalar value representing the model's confidence in the 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 level.

[0188] Sigmoid activation: Next, the result of the linear transformation is passed through the Sigmoid function to obtain a value between 0 and 1. This value can be interpreted as the model's confidence in predicting a specific fault. The closer the value is to 1, the more confident the model is in the prediction; conversely, the closer the value is to 0, the less confident the model is in the prediction.

[0189] Example 2

[0190] This invention discloses a tunnel boring 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 acquire multi-dimensional sensor data of the tunnel boring 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 weights according to the sliding window variance; calculate the intra-group self-attention of each group of encoded data and correct it according to the sensor confidence weights; and obtain the intra-group self-attention output;

[0193] Inter-group self-attention module: This module is used to concatenate the intra-group self-attention outputs of each group, perform inter-group self-attention calculation on the concatenated features, and obtain the inter-group self-attention output based on the inter-group confidence weights.

[0194] Feature extraction module: used to extract features from the inter-group self-attention output;

[0195] Classification and Confidence Assessment Module: This module is used to classify and assess the confidence of the features extracted by the feature extraction module, and output the fault type and the fault confidence.

[0196] This embodiment is used for feature extraction and diagnostic identification of fault data during tunnel boring machine (TBM) excavation. Multiple sensors installed on the TBM collect multi-dimensional data such as vibration, temperature, and pressure in real time. This data is first preprocessed to remove erroneous data points and fill in missing data. Then, the data is input into an intra-group self-attention mechanism for preliminary feature extraction, capturing the correlation between sensor data within a group and extracting intra-group features by calculating the attention weights between sensor data within each group. Next, an inter-group self-attention mechanism is applied to capture the correlation between different groups, extracting interaction features between groups by calculating the data correlation weights between different groups. To identify sudden faults and persistent cumulative faults, a sliding window method is used to calculate variance variation. When the variance increases significantly within the sliding window, it is identified as a potential fault point and processed centrally. Sensor observation errors are introduced, and the feature extraction process is optimized by combining sensor confidence levels. Data weights are adjusted based on sensor confidence levels to reduce the impact of observation errors on feature extraction.

[0197] An improved Transformer model is used for feature extraction and fault classification, integrating within-group and between-group self-attention mechanisms, sensor confidence, and variance variation features. During model training, parameters are optimized by maximizing classification accuracy and minimizing error. Finally, the model outputs the fault type and its confidence level.

[0198] Through the above steps, the present invention can effectively extract fault characteristics during the tunneling process of a tunnel boring machine, achieve accurate fault classification and diagnosis, and provide reliable technical support for tunnel boring machine fault diagnosis.

[0199] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0200] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those 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 invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for diagnosing tunnel boring machine faults based on a self-attention mechanism, characterized in that, Includes the following steps: S1. Acquire multi-dimensional sensor data of the tunnel boring machine and perform data preprocessing to obtain multiple sets of coded data; wherein, the data preprocessing includes data grouping and data encoding; S2. Calculate the sliding window variance for each group of encoded data, and adjust the sensor confidence weights according to the sliding window variance; calculate the intra-group self-attention for each group of encoded data, and correct it according to the sensor confidence weights; obtain the intra-group self-attention output; The calculation of the sliding window variance for each group of encoded data in S2 specifically includes: The encoded data E for each group is calculated using a cumulative sum method. i Sliding window variance: Among them, E i S represents the encoded features of the i-th group of multi-dimensional sensor data from the tunnel boring machine. i (t) represents the cumulative sum of the encoded data at time t for the i-th group, where 0 ≤ j ≤ t. For the cumulative sum of squares, μ i (t) represents the mean within the sliding window. Let W be the variance within the sliding window, and W be the size of the sliding window. In step S2, the sensor confidence weights are adjusted based on the sliding window variance; the formula is expressed as follows: Among them, C i For sensor confidence parameters, α i (t) represents the sensor confidence weight, and k is the adjustment coefficient. The variance within the sliding window. The baseline variance; S3. Concatenate the intra-group self-attention outputs of each group, perform inter-group self-attention calculation on the concatenated features, and obtain the inter-group self-attention output based on the inter-group confidence weights. In S3, the inter-group self-attention calculation specifically includes: The formulas for obtaining Q, K, and V by performing a linear transformation on the query, key, and value of the concatenated feature Z are as follows: Q=ZW Q K=ZW K V=ZW V The formula for calculating inter-group self-attention is: The inter-group confidence weight β i The formula is: The inter-group self-attention output is obtained as follows: Where Z represents the concatenated features, Q is the query matrix, K is the key matrix, V is the value matrix, and W is the key matrix. Q W K W V K is a linear transformation matrix. T Let d be the transpose of the key matrix K. k Let K be the dimension of the key matrix, and β be the dimension of the key matrix. i For the confidence weights between groups, C m Let Y be the confidence parameter of the m-th sensor group, 1≤m≤N, and Y be the inter-group self-attention output. S4. Perform fault classification and confidence assessment on the inter-group self-attention output to obtain fault type output and fault confidence output.

2. The tunnel boring machine fault diagnosis method based on self-attention mechanism as described in claim 1, characterized in that, The data grouping in S1 specifically includes: The multi-dimensional sensor data Divide into N groups according to dimension, with each group having dimension D. i The formula is expressed as: X i =X[:,:,d i-1 :d i ] Where X represents multi-dimensional sensor data, L is the length of the time series, D is the dimension of the data, and N is the number of groups. i For the data in the i-th group, D i Let d be the data dimension of the i-th group. i Let be the specific dimension value of the i-th data set, 1≤i≤N; the multi-dimensional sensor data of the tunnel boring machine includes: thrust, torque, cutterhead rotation speed, propulsion speed, hydraulic system pressure, temperature, vibration, displacement, gas composition, foam injection volume, tail seal pressure, and mud parameters.

3. The tunnel boring machine fault diagnosis method based on self-attention mechanism as described in claim 2, characterized in that, The data encoding in S1 specifically includes: For each group's data X i The encoder is used for dimensionality reduction and feature extraction, expressed by the following formula: E i =Encoder(X i ) The encoded features are as follows: Where Encoder is the encoder for dimensionality reduction and feature extraction, d e The dimension of the data after dimensionality reduction.

4. The tunnel boring machine fault diagnosis method based on self-attention mechanism as described in claim 1, characterized in that, The calculation of intra-group self-attention for each group of encoded data in S2 specifically includes: The encoded feature E i Perform a linear transformation of the query, key, and value to obtain Q. i K i and V i The formula is: The formula for calculating the in-group self-attention is: The formula for the self-attention output within the group is as follows: Z i =α i (t)·Attention i (Q,K i ,V i ) Among them, Q i Let K be the query matrix for the i-th group. i Let V be the key matrix of the i-th group. i Let i be the value matrix of the i-th group. Let K be the i-th linear transformation matrix. i T Let K be the i-th group of bond matrices. i transpose, Let K be the i-th group of bond matrices. i The dimension of Z i This is the self-attention output within the group.

5. The tunnel boring machine fault diagnosis method based on self-attention mechanism as described in claim 4, characterized in that, In step S3, the self-attention outputs within each group are concatenated to obtain Z: Z=[Z1;Z2;…Z i …;WITH N ] Among them, Z i Z is the self-attention output of the i-th group. N This is the self-attention output for the Nth group.

6. The tunnel boring machine fault diagnosis method based on self-attention mechanism as described in claim 1, characterized in that, The fault type output in S4 uses the softmax activation function to obtain the following formula: FaultType(Y)=softmax(YW class +b class ) Where FaultType(Y) is the fault classification output, W class Let b be the linear transformation matrix of the classification layer. class It is the bias vector; The types of failures 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.

7. A method for diagnosing tunnel boring machine faults based on a self-attention mechanism as described in any one of claims 1-6, characterized in that, The fault confidence output in S4 uses the Sigmoid activation function, and the formula for the fault confidence output is as follows: Confidence(Y)=σ(YW conf +b conf ) Where Confidence(Y) is the confidence assessment output, σ is the Sigmoid activation function, and W conf b is the linear transformation matrix for confidence assessment. conf This is the bias vector.

8. A tunnel boring machine fault diagnosis system based on a self-attention mechanism, characterized in that, The method for diagnosing tunnel boring machine faults based on a self-attention mechanism as described in claim 1 includes the following modules: Data preprocessing module: used to acquire multi-dimensional sensor data of the tunnel boring 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 weights according to the sliding window variance; Calculate the intra-group self-attention for each group of encoded data and correct it according to the sensor confidence weight; thus obtaining the intra-group self-attention output. Inter-group self-attention module: used to concatenate the intra-group self-attention outputs of each group, perform inter-group self-attention calculation on the concatenated features, and obtain the inter-group self-attention output according to the inter-group confidence weights; Feature extraction module: used to extract features from the inter-group self-attention output; Classification and confidence assessment module: used to classify and assess the confidence of the features extracted by the feature extraction module, and to obtain the 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

  • Multi-scale feature fusion gearbox fault diagnosis method based on self-attention mechanism

    CN116010900A