Working condition self-adaptive excavator pressure sensor soft measurement method
By constructing a variable selection framework that adapts to working conditions and optimizing hyperparameters through hybrid networks, the problem of prediction accuracy and safety of excavator pressure sensors under complex working conditions was solved. This enabled efficient pressure signal prediction and sensor failure diagnosis, thereby improving the reliability and safety of the excavator hydraulic system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF INFORMATION SCI & TECH
- Filing Date
- 2026-04-03
- Publication Date
- 2026-05-01
AI Technical Summary
Excavator pressure sensors lack adaptability to various working conditions in complex and ever-changing real-world scenarios, resulting in insufficient flexibility and low prediction accuracy of traditional variable selection methods. Furthermore, the acquisition of model hyperparameters is inadequate, making it difficult to avoid hydraulic system failures and personnel safety risks.
A condition-adaptive variable selection framework is constructed using the Peter-Clark algorithm, Temporal Convolutional Network (TCN), Maximum Information Coefficient (MIC), and soft attention gate. This framework is combined with adaptive Kalman filtering and a hybrid network (CNN-GRU-MATT), and hyperparameters are optimized using an improved Pelican Optimization Algorithm (IPOA) to construct a condition-adaptive soft measurement method for pressure sensors, enabling real-time determination of sensor failure.
It achieves high-precision prediction of pressure signals, improves the reliability and safety of hydraulic systems under complex working conditions, ensures the continuous and stable operation of the control system, and reduces the risks caused by sensor failure.
Smart Images

Figure CN121958723A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of pressure sensor soft measurement technology, and in particular to a working condition adaptive soft measurement method for excavator pressure sensors. Background Technology
[0002] In the process of upgrading excavators to intelligent operation, pressure sensors have become a key element in ensuring the efficient operation and safe functioning of the equipment. By monitoring pressure parameters in real time, damage to the mechanical structure of the hydraulic system caused by overload or sudden pressure changes can be effectively avoided. Once a pressure sensor malfunctions, the entire hydraulic system will face the risk of going out of control, which will not only lead to prolonged equipment downtime and delay the overall progress of the project, but may also directly threaten the lives of personnel on site.
[0003] The characteristic variables of excavators exhibit high dimensionality and contain a large amount of redundant information, which can interfere with the prediction model's ability to capture key patterns, thereby reducing prediction accuracy. Furthermore, the actual operating scenarios of excavators are significantly complex and dynamically variable, while traditional variable selection methods are mostly customized for specific scenarios, lacking the ability to adaptively adjust to diverse working conditions and failing to meet actual needs.
[0004] Soft measurement methods for pressure sensors mainly fall into three categories: model-driven, knowledge-driven, and data-driven. The first two types heavily rely on accurate system modeling capabilities and extensive domain knowledge, resulting in insufficient flexibility and low prediction efficiency. In recent years, data-driven deep learning techniques have demonstrated significant advantages in prediction, learning complex nonlinear relationships between inputs and outputs directly from the data itself, providing a more efficient and accurate solution for soft measurement of pressure sensors. In particular, Convolutional Neural Networks (CNNs), Gated Recurrent Units (GRUs), and Multi-Head Attention Mechanisms (MATTs) have all exhibited unique advantages in prediction.
[0005] The quality of a model's hyperparameters is a key factor determining its performance. Traditional hyperparameter settings often rely on manual configuration, which is not only inefficient but also difficult to guarantee effectiveness. Using the Pelican Optimization algorithm to search for optimal parameters, however, is a highly efficient and feasible solution. The Pelican Optimization algorithm has the advantages of fewer parameters and high efficiency, but it also suffers from drawbacks such as premature convergence and getting trapped in local optima.
[0006] Therefore, how to select feature variables that are suitable for different working conditions, build a high-performance deep learning model, and efficiently optimize the model hyperparameters to improve prediction accuracy, and ultimately avoid hydraulic system failures and personal injury risks caused by pressure sensor malfunction, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0007] To address the shortcomings of existing technologies, this invention provides a working condition adaptive soft measurement method for excavator pressure sensors, which solves the technical problems of insufficient drive flexibility, low prediction accuracy, and poor model hyperparameter acquisition in existing technologies.
[0008] This invention provides a working condition adaptive soft measurement method for excavator pressure sensors, comprising the following steps:
[0009] Step 1: Acquire pressure sensor signals when the excavator is operating normally under various working conditions;
[0010] Step 2: Construct an adaptive variable selection framework based on operating conditions using the Peter-Clark algorithm, Temporal Convolutional Network (TCN), Maximum Information Coefficient (MIC), and soft attention gates. First, the Peter-Clark algorithm generates a causal graph among pressure sensor variables under any operating condition, forming the corresponding variable set. Then, the TCN identifies the operating condition type, and the MIC determines the optimal variable set for each condition. Finally, soft attention gates assign adaptive weights to each variable in the optimal variable set in relation to the target variable.
[0011] Step 3: Filter the weighted variables using the adaptive Kalman filter algorithm;
[0012] Step 4: Construct a hybrid network (CNN-GRU-MATT, CGM) that integrates convolutional neural networks, gated recurrent units, and multi-head attention mechanisms. This involves using convolutional neural networks to extract local features, gated recurrent units to capture long-term dependencies, and multi-head attention mechanisms to focus on historical information.
[0013] Step 5: The improved pelican optimization algorithm (IPOA) is used to optimize the hyperparameters in the hybrid network of Step 4, thereby constructing a hybrid network model (IPOA-CGM) based on the pelican optimization algorithm and predicting the target pressure signal.
[0014] Step 6: Determine in real time whether the pressure sensor is malfunctioning using the dynamic threshold method that adapts to the working conditions. When the pressure sensor is normal, use the actual measured value of the pressure sensor; when the pressure sensor is malfunctioning, use the predicted value of the IPOA-CGM model constructed in Step 5.
[0015] Furthermore, the specific steps of step 2 are as follows:
[0016] Step 21: Generate a causal graph between sensor variables under any working condition using the Peter-Clark algorithm, locate the target pressure node in the graph, and filter the parent and ancestor nodes of the target pressure signal node to form a variable set;
[0017] Step 22: Use TCN to identify the type of working condition at the current moment, calculate the maximum information coefficient between each variable in the variable set corresponding to the current working condition and the target pressure variable; filter the variables in the variable set whose maximum information coefficient value is greater than the preset maximum information coefficient threshold, and construct the optimal variable set corresponding to the working condition;
[0018] Step 23: Apply an adaptive weight to the target variable using a soft attention gate. The output formula of the soft attention gate is:
[0019] ;
[0020] X is the input vector of the soft attention gate; W1 and W2 are weight matrices; b1 and b2 are bias vectors; H and Z are the output vectors of the first hidden layer and the second hidden layer, respectively; W_attention is the weight vector, i.e., the output vector of the second hidden layer; ⊙ is the element-wise multiplication of the two vectors; X_weighted is the weighted feature vector, i.e., the output of the soft attention gate.
[0021] Furthermore, in step 22, the preset maximum information coefficient threshold is 0.6.
[0022] Furthermore, in step 3, the adaptive Kalman filter algorithm adjusts the process noise covariance matrix and the observation noise covariance matrix through a smooth transition mechanism, wherein the specific formula for the smooth transition mechanism is:
[0023] ;
[0024] In the formula, initial is the initial time; target is the target time; Q initial and R initial These are the process noise covariance matrix and the observation noise covariance matrix at the initial time, respectively; Q target and R targetThese are the process noise covariance matrix and the observation noise covariance matrix at the target time, respectively; L is the transition step size, L = target - initial; k is a certain time in the transition process, k = 1, ..., L; Q k and R k Let $k$ be the process noise covariance matrix and the observation noise covariance matrix at time $k$, respectively.
[0025] Furthermore, in step 5, the improvement process of the Pelican algorithm is specifically as follows:
[0026] Step 51: Initialize the pelican population size and maximum number of iterations;
[0027] Step 52: Generate a uniformly distributed population based on the Kent mapping and initialize the pelican locations;
[0028] Step 53: Randomly generate food location vectors;
[0029] Step 54: Update the pelican's exploration phase location using the Levy flight strategy and determine whether the pelican has moved to a new location;
[0030] Step 55: Update the pelican's development stage position using an adaptive t-distribution mutation strategy, and determine whether the pelican has moved to the new position;
[0031] Step 56: Determine if the maximum number of iterations has been reached. If the maximum number of iterations has been reached, terminate the process and output the optimal parameters; otherwise, return to step 53.
[0032] Furthermore, in step 52, the specific formula for generating a uniformly distributed population based on the Kent mapping is as follows:
[0033] ;
[0034] In the formula, N is the pelican population size; m is the dimension of the search space; x i,j Let l be the value of the j-th dimension of the i-th pelican; j u is the lower bound of the j-th dimension of the search space; j Let be the upper bound of the j-th dimension of the search space; a is the skewness of the Kent mapping, ranging from (0,1); z i,j It is a chaotic value, ranging from [0, 1].
[0035] Furthermore, in step 54, the specific formula for updating the pelican's position during the exploration phase using the Levy flight strategy is as follows:
[0036] ;
[0037] In the formula, It is x i,jUpdated value during the exploration phase; F i The fitness value represents the position vector of the i-th individual pelican, where the position vector of the i-th individual pelican is x. i =(x i,1 ,x i,2 ,…,x i,j ,…,x i,m p is the food position vector, p j F is the value of the j-th dimension of p; p is the fitness value for the food position; I is a random number with a value of 1 or 2; Levy_step is the step size.
[0038] Furthermore, in step 55, the specific formula for updating the pelican's development stage position using the adaptive t-distribution mutation strategy is as follows:
[0039] ;
[0040] In the formula, It is x i,j Updated value during the development phase; x i,j It is the value of the i-th pelican in the j-th dimension; iter is the current iteration number; T max It represents the maximum number of iterations; rand is a random number obtained from a uniform distribution in the interval (0,1); F i It is the fitness value of the position vector of the i-th individual pelican, where the position vector of the i-th individual pelican is x. i =(x i,1 ,x i,2 ,…,x i,j ,…,x i,m );F avg It is the average fitness value of the pelican population; t(iter) is a random number following a t-distribution with iter degrees of freedom; l j It is the lower bound of the j-th dimension of the search space; u j It is the upper bound of the j-th dimension of the search space.
[0041] Furthermore, in step 6, the specific steps for determining whether the pressure sensor has failed are as follows:
[0042] Step 61: Calculate the residual between the predicted value of the IPOA-CGM model and the measured value of the pressure sensor at time t;
[0043] Step 62: Set the sliding window size and calculate the standard deviation of the residuals within the sliding window at time t;
[0044] Step 63: Calculate the dynamic threshold at time t based on the threshold coefficient set according to the current working condition type;
[0045] Step 64: Determine if the pressure sensor is malfunctioning:
[0046] If the residual at time t is greater than the dynamic threshold, the pressure sensor is determined to have failed at time t.
[0047] If the residual at time t is less than or equal to the dynamic threshold, the pressure sensor is considered to be functioning normally at time t.
[0048] Furthermore, in step 63, the specific method for setting the threshold coefficient based on the current operating condition is as follows:
[0049] When the working condition is excavation, the threshold coefficient is set to 2.3.
[0050] When the operating condition is lifting and slewing, the threshold coefficient is set to 2.7.
[0051] When the operating condition is unloading, the threshold coefficient is set to 2.2.
[0052] When the operating condition is reset rotation, the threshold coefficient is 2.8.
[0053] The beneficial effects of this invention are:
[0054] This invention establishes a variable selection framework that adapts to working conditions, combining causal discovery, working condition classification, and attention mechanisms. This framework can dynamically select and weight the feature variables most relevant to the target stress, thereby improving the relevance and interpretability of feature engineering.
[0055] This invention employs adaptive Kalman filtering to match differentiated parameters for different operating conditions, thereby enhancing the system's ability to resist noise interference.
[0056] The prediction model of this invention integrates the advantages of CNN, GRU and multi-head attention mechanism, and can simultaneously capture short-term and long-term dependencies in time series. The improved pelican optimization algorithm ensures the efficiency and accuracy of global optimization of model parameters, thereby achieving high-precision prediction of pressure signals.
[0057] This invention performs real-time failure diagnosis through dynamic thresholds that are adaptive to working conditions. It can switch to soft measurement signals when a sensor fails, ensuring the continuous and stable operation of the control system and improving the reliability, safety, and intelligence of the excavator hydraulic system under various complex working conditions. Attached Figure Description
[0058] The features and advantages of the invention will be more clearly understood by referring to the accompanying drawings, which are schematic and should not be construed as limiting the invention in any way. In the drawings:
[0059] Figure 1 This is a flowchart illustrating a specific embodiment of the present invention;
[0060] Figure 2This is the TCN classification model in a specific embodiment of the present invention;
[0061] Figure 3 This is a soft attention gate model in a specific embodiment of the present invention;
[0062] Figure 4 This is a GRU model diagram in a specific embodiment of the present invention;
[0063] Figure 5 This is a MATT model diagram in a specific embodiment of the present invention;
[0064] Figure 6 This is a diagram of the hybrid network CGM model in a specific embodiment of the present invention;
[0065] Figure 7 This is a flowchart of the IPOA optimization parameters in a specific embodiment of the present invention;
[0066] Figure 8 This is the prediction curve of the CGM model in a specific embodiment of the present invention;
[0067] Figure 9 This is the prediction curve of the IPOA-CGM model in a specific embodiment of the present invention. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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, 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.
[0069] The present invention will be further illustrated below with reference to specific embodiments. Those skilled in the art should understand that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. Modifications to the present invention in various equivalent forms all fall within the scope defined by the appended claims.
[0070] like Figure 1 The present invention provides a working condition adaptive soft measurement method for excavator pressure sensors, comprising the following steps:
[0071] Step 1: Acquire pressure sensor signals when the excavator is operating normally under various working conditions;
[0072] In this embodiment, a SY1250H excavator was used as the research object. The sampling frequency was 10Hz, and 10,000 samples were collected. The collected signals included: multiple pressure signals such as boom large chamber pressure (bar), boom small chamber pressure (bar), stick large chamber pressure (bar), and bucket large chamber pressure (bar); multiple current signals such as boom lifting solenoid valve current (mA), stick digging solenoid valve current (mA), stick unloading solenoid valve current (mA), bucket digging solenoid valve current (mA), and left swing solenoid valve current (mA); multiple voltage signals such as boom lifting pilot voltage (mV), stick digging pilot voltage (mV), bucket digging pilot voltage (mV), and left swing pilot voltage (mV); and other signals such as engine speed (rpm).
[0073] Step 2: Construct a variable selection framework for work condition adaptation using the Peter-Clark algorithm, TCN, MIC, and soft attention gates. The specific process is as follows:
[0074] Step 21: Generate a causal graph between pressure sensor variables under arbitrary operating conditions using the Peter-Clark algorithm. This graph is a directed acyclic graph, which visually displays the causal relationships or structure between variables. Its directed edges can reveal the causal relationships between variables. The specific steps are as follows:
[0075] Step 211: Initialize the fully variable undirected graph:
[0076] Let the set of pressure sensor variables be V = {X1, X2, ..., Xq}, where q is the total number of variables, and G... 0 It is a completely undirected graph, where there is an undirected edge between any two variables;
[0077] Step 212: Conditional Independence Test
[0078] Use the Gaussian conditional independence test to determine X i and X j Whether a given set of conditional variables X is independent, i=1,…,q, j=1,…,q, and i≠j, is determined by the following principle: when variable X… i X i When the set of condition variables K follows a multivariate normal distribution, then X i and X i Conditional independence given K is equivalent to the partial correlation coefficient ρ. Xi,Xi|K =0, X i and X i The partial correlation coefficient given K is:
[0079] ;
[0080] In the formula, Σ is the set {X} i Xj The covariance matrix of the variables in ∪K; Σ -1 It is its inverse matrix;
[0081] Construct the t-statistic:
[0082] ;
[0083] In the formula, n is the number of sensor samplings, the degrees of freedom df = n - |K| - 2, and |K| represents the number of elements in the condition variable set K;
[0084] Calculate the p-value; if it is greater than the preset significance level α, then condition "X" is met. i and X j The condition that "independence holds" holds true under the given condition of K.
[0085] In this embodiment, the significance level α was set to 0.05.
[0086] Step 213: Iteratively delete conditionally independent edges. The specific steps are as follows:
[0087] Step 2131: Let λ=0, let G'=G 0 G' represents the predicted undirected skeleton graph;
[0088] Step 2132: Select from the undirected skeleton graph G' that satisfy the condition "|adj(G',X i )\X j |>=λ” adjacent ordered node pairs (X i ,X j );
[0089] adj(G',X i )\X j X represents the undirected skeleton graph G'. i Remove X from the set of adjacent nodes j , |·| Calculates the number of elements in a set;
[0090] Step 2133: Select Set And |K|=λ, "" represents the inclusion relationship of sets, that is, K is a set adj(G',X) i )\X j A subset of;
[0091] Step 2134: When X i and X j When independent given K, then delete edge X. i —X j Obtain the updated undirected skeleton graph G', and save K to S(X). i ,X j ) and S(Xj ,X i In S(X); if the condition is not met, skip this step; i ,X j ) and S(X j ,X i ) represents a split set, recording the set that makes X i and X j A set of conditionally independent nodes;
[0092] Step 2135: When edge X i —X j It has been deleted, or all of the conditions that are met are " If all sets K of "|K|=λ" have been selected, then proceed to step 2136; otherwise, proceed to step 2133.
[0093] Step 2136: When all elements in the undirected skeleton graph G' satisfy the condition "|adj(G',X)",... i )\X j |>=λ, The ordered pairs of adjacent nodes (X) of |K|=λ” i ,X j If the independence condition has been tested, proceed to step 2137; otherwise, proceed to step 2132.
[0094] Step 2137: When every pair of adjacent ordered nodes satisfies the condition "|adj(G',X i )\X j If |<λ”, then the process ends and returns the undirected skeleton graph G’, which is the final predicted undirected skeleton graph; otherwise, let λ=λ+1 and execute step 2132.
[0095] Step 214: Identify Structure and Orientation:
[0096] Traverse all networks with a common neighbor X k Non-adjacent node pairs (X) i ,X j When X k Not in the separating set S(X) i ,X j ) or S(X j ,X i In the case of an undirected skeleton graph G', the undirected edges X are... i —X k —X j Change to X i →X k ←X j ;
[0097] Step 215: Determine causal relationship:
[0098] Based on the already oriented edges, repeatedly apply the following rules to orient as many undirected edges as possible in the graph, ultimately obtaining a directed causal graph G, as follows:
[0099] When there is an edge X i →X j And X i and X k If they are not adjacent, then the undirected edge X will be... j —X k Oriented as X j →X k ;
[0100] When X exists i →X k →X j When, then the undirected edge X i —X j Oriented as X i →X j ;
[0101] When X exists i →X k →X j and X i →X l →X j And X k and X l If they are not adjacent, then the undirected edge X will be... i —X j Oriented as X i →X j ;
[0102] When X exists i →X k →X l and X k →X l →X j And X k and X l If they are not adjacent, then the undirected edge X will be... i —X j Oriented as X i →X j .
[0103] The above five steps (211-215) generate a directed causal graph G containing nodes. After locating the target pressure signal node in the directed causal graph G, its parent and ancestor nodes are selected. The variables represented by these nodes have a direct or indirect driving relationship with the target variable, and together they constitute the variable set SET_PC.
[0104] Step 22: In practical applications, the working mode of an excavator is dynamically changing, and the importance of variables varies under different modes. Therefore, an optimal set of variables that adapts to working conditions is constructed. Specifically, the working condition type is identified through TCN, and the optimal set of variables for each working condition is determined through MIC.
[0105] The specific process of identifying operating condition types using TCN is as follows:
[0106] Input to the TCN classification model:
[0107] Excavator operating conditions can be roughly divided into four categories: digging, lifting and slewing, unloading and resetting and slewing. The current operating condition can be identified by the hand lever signal. Therefore, the hand lever signals of skilled operators under different operating conditions are collected and used as input data for the model.
[0108] Classification of TCN classification models:
[0109] The TCN classification model consists of an input layer, residual blocks, fully connected layers, and an output layer. The residual blocks include causal dilated convolutions, weight normalization, ReLU layers, Dropout layers, and 1×1 convolutions. The core of the TCN classification model is the causal dilated convolution, which ensures that the value of the output sequence at a given time depends only on the values of the input sequence at the corresponding time and previous time steps. A dilation factor is introduced to control the sampling interval of the convolution kernel, and its calculation formula is as follows:
[0110] Let the total length of the time series be T, and the input sequence be (x1, x2, ..., x...). k ,…,x T The output sequence after causal dilation convolution is (y1, y2, ..., y). k ,…y T Then we have:
[0111] ;
[0112] In the formula, d is the inflation rate, which increases exponentially by 2; ks is the size of the convolution kernel; w i These are the kernel weights of the causal dilation convolution;
[0113] Output of the TCN classification model:
[0114] The TCN classification model outputs the probability of the working condition at each time point. Based on the probability, the time point is assigned to the corresponding working condition, thus completing the working condition classification of the entire sequence.
[0115] In this embodiment, the collected handle signals include: bucket digging handle signal (mA), left swing handle signal (mA), right swing handle signal (mA), boom lifting handle signal (mA), and bucket unloading handle signal (mA). Figure 2 As shown, the TCN classification model mainly consists of an input layer, three residual blocks, a fully connected layer, and an output layer. Each residual block contains two causal dilated convolutions, two weight normalization layers, two ReLU layers, two Dropout layers, and one 1×1 convolution. The dilation factors of the three residual blocks are (1, 2, 4) respectively, and the convolution kernel size is 3. The TCN classification model ultimately calculates and outputs the probability distribution of each category using the Softmax function.
[0116] The specific process of determining the optimal variable set for each working condition using MIC is as follows:
[0117] For specific operating condition data, calculate the minimum information coefficient (MIC) between the variables in SET_PC and the target pressure variable, set a preset maximum information coefficient threshold δ, and filter variables with MIC values greater than δ to form the optimal variable set for that operating condition. The MIC calculation formula is as follows:
[0118] ;
[0119] In the formula, X1 and X2 are two feature variables whose maximum information coefficient is to be calculated; a1 and a2 represent the binning number of variables X1 and X2, respectively, a1×a2≤B; B represents the number of samples raised to the power of 0.6; I(X1,X2|a1,a2) is the mutual information between variables in the corresponding binning; p(x1,x2) is the joint probability distribution function of variables X1 and X2, and p(x1) and p(x2) are the marginal probability distribution functions of variables X1 and X2, respectively.
[0120] In this embodiment, the preset maximum information coefficient threshold δ is preferably set to 0.6.
[0121] A dictionary DICT = {Working Condition: Optimal Variable Set} is created to store each working condition and its corresponding optimal variable set. During real-time operation, when the TCN classifier identifies the working condition type at the current moment, it automatically loads the optimal variable set corresponding to that working condition from DICT. This working condition adaptive mechanism ensures that the features input to the prediction model are always the signal variables most relevant to the current scenario, greatly improving the model's adaptability and prediction accuracy compared to simply using the MIC method.
[0122] Step 23: To address the issue that there are still subtle differences in the contribution value of different features to the working condition, soft attention gates are used to assign adaptive weights to each variable in the optimal variable set to the target variable, thereby achieving precise enhancement of key features;
[0123] The core structure of a soft attention gate is as follows: Figure 3As shown: First, the original features are linearly transformed and processed by the ReLU function to obtain the hidden layer result; then, through linear transformation and the Sigmoid function, the result is mapped to the [0,1] interval, and this mapped value is the weight of the corresponding feature; finally, the original feature vector and the weight vector are multiplied element-wise to obtain the output of the soft attention gate.
[0124] ;
[0125] In the formula, X is the input vector of the soft attention gate; W1 and W2 are weight matrices; b1 and b2 are bias vectors; H and Z are the result vectors of the first and second hidden layers, respectively; W_attention is the weight vector, where the closer the value is to 1, the more important the corresponding feature is, and the closer it is to 0, the weaker the importance is; the operator "⊙" represents the element-wise multiplication of two vectors; X_weighted is the weighted feature vector, which will be passed to the subsequent main model to carry out the prediction task.
[0126] The soft attention gate is trained together with the prediction model and its parameters are updated through backpropagation, thereby minimizing the loss function of the prediction task. The feature variables input to the main model are a feature set formed after triple optimization of causal screening, working condition adaptation, and importance weighting, which can maximize the prediction performance of the main model.
[0127] Step 3: Filter the weighted variables using the adaptive Kalman filter algorithm:
[0128] An adaptive Kalman filter method is designed to adaptively adjust the process noise covariance matrix Q and the observation noise covariance matrix R according to the characteristics of different operating conditions.
[0129] During the adjustment process, to avoid oscillations in the filtering results caused by sudden parameter changes, a smooth transition mechanism is used to ensure that the parameters change gradually rather than jumping abruptly. The specific calculation formula is as follows:
[0130] ;
[0131] In the formula, initial represents the initial time, and target represents the target time; Q initial and R initial These are the process noise and observation noise covariance matrices at the initial time, respectively; Q target and R target These are the covariance matrices of the process noise and observation noise at the target time, respectively; L is the transition step size, L = target - initial; k represents a certain time in the transition process, k = 1, ..., L; Q k and R k These represent the process noise and observation noise covariance matrices at time k, respectively.
[0132] In the embodiment, the signal changes drastically under the "digging" condition, so Q needs to take a large value: 1×10 -2 R takes a moderate value: 5 × 10 -3 To ensure the filtered signal can quickly track real changes and avoid over-smoothing; the "lifting and slewing" and "unloading" operating conditions are relatively stable, and the Q value is lowered to 1×10. -3 This increases the confidence in the model's predictions, while maintaining a moderate R-value: 5 × 10⁻⁶. -3 This results in a smoother, less noisy signal; the signal is stable and regular under the "reset rotation" condition, using a smaller Q value: 1×10⁻⁶. -4 R value: 5 × 10 -4 This enables high-precision smoothing of signals.
[0133] The adaptive Kalman filter formula is further obtained as follows:
[0134] ;
[0135] In the formula, x k - It is the predicted value of the state vector at the current moment; x k-1 F represents the state vector of the previous moment; k B represents the state transition matrix at the current moment; k with u k P represents the control input matrix and control input vector at the current time, respectively; k - K represents the predicted value of the covariance matrix at the current time. k It is the Kalman gain at the current moment; x k and P k These are the current state vector and covariance matrix, respectively; H k Z is the observation matrix at the current moment; k Q is the actual observed vector at the current moment; E is the identity matrix; Q k and R k These are the process noise covariance matrix and the observation noise covariance matrix, respectively, adapted to the corresponding operation stage.
[0136] Step 4: Construct a hybrid network that integrates convolutional neural networks, gated recurrent units, and multi-head attention mechanisms. The convolutional neural network is used to accurately capture short-term dependencies between adjacent time points; the hidden state is updated through the update gate and reset gate of the gated recurrent unit to capture long-term dependencies in the time series; and the multi-head attention mechanism is used to focus on historical information most relevant to the current prediction.
[0137] The update gate, reset gate, and hidden state update formulas for GRU are as follows:
[0138] ;
[0139] In the formula, h k-1 It is the hidden state from the previous moment; x k It represents the input variable at the current moment; "[ ; ]" represents concatenating vectors row by row; z k To update the gate output; W z With b z These are the update gate weight matrix and the bias vector, respectively; r k To reset the gate output; W r With b r These are the reset gate weight matrix and the bias vector, respectively; h̃ k It represents the candidate hidden state at the current moment; the operator "⊙" represents the element-wise multiplication of two vectors; W h It is a weight matrix; b h It is the bias vector; h k It is the hidden state at the current moment;
[0140] The core function of MATT is to focus on key variables, and its implementation principle is as follows:
[0141] First, input matrix X ATT The query matrix, key matrix, and value matrix are obtained by sequentially multiplying the matrix with three linear transformation matrices. Next, a query-key association matrix is constructed using matrix dot product operations. After scaling and normalization, an attention weight matrix is generated, which is then multiplied with the value matrix to obtain the single-head attention output matrix. Finally, multiple single-head attention output matrices are computed in parallel, linearly concatenated along the feature dimension, and then spatially transformed using a shared projection matrix to obtain the final output of the multi-head attention mechanism. The calculation formula is as follows:
[0142] ;
[0143] In the formula, X ATT It is the input matrix for the multi-head attention mechanism; W i Q W i K With W i V Q is the linear transformation matrix of the i-th attention head; i ATT K i ATT and V i ATT These are the query matrix, key matrix, and value matrix of the i-th attention head, respectively; It is the scaling factor, d k It is Q i ATT Feature dimension; W OIt is a shared projection matrix; Concat represents the concatenation operation; h represents the number of attention heads.
[0144] In the embodiments, GRU and MATT are respectively as follows: Figure 4 , Figure 5 As shown; Hybrid network CGM as Figure 6 As shown, in addition to integrating CNN, GRU and MATT, it also includes pooling layers, batch normalization layers, ReLU layers, fully connected layers and Dropout layers.
[0145] Step 5: The improved Pelican optimization algorithm, which incorporates Kent mapping, Levy flight strategy, and adaptive t-distribution mutation strategy, is used to optimize the hyperparameters in the hybrid network of Step 4, construct the IPOA-CGM model, and predict the target pressure signal.
[0146] like Figure 7 As shown, the improvement process of the Pelican algorithm is as follows:
[0147] Step 51: Initialize the pelican population size N, and the maximum number of iterations T. max ;
[0148] In this example, the pelican population size N is 100, and the maximum number of iterations T max It is 500;
[0149] Step 52: Generate a uniformly distributed population based on the Kent mapping and initialize the pelican locations;
[0150] Step 53: Randomly generate food location vectors;
[0151] Step 54: Update the pelican's exploration phase location using the Levy flight strategy and determine whether the pelican has moved to a new location;
[0152] Step 55: Update the pelican's development stage position using an adaptive t-distribution mutation strategy, and determine whether the pelican has moved to the new position;
[0153] Step 56: Determine if the maximum number of iterations has been reached. If the maximum number of iterations has been reached, terminate the process and output the optimal parameters; otherwise, return to step 53.
[0154] In step 52, the Kent mapping is used to generate a uniformly distributed population, avoiding the uneven distribution caused by random generation, thus laying the foundation for a broad search of the pelican population. The formula is as follows:
[0155] ;
[0156] In the formula, N is the pelican population size; m is the dimension of the search space; x i,jRepresents the value of the i-th pelican in the j-th dimension; l j with u j represents the lower and upper bounds of the j-th dimension of the search space, respectively; a represents the skewness of the Kent mapping, ranging from (0, 1); z i,j It is a chaotic value, ranging from [0, 1);
[0157] In this embodiment, the parameter α of the Kent mapping is 0.4, the search space dimension is 5, and the initial values of the Kent chaotic sequence in the five dimensions are 0.21, 0.68, 0.35, 0.82, and 0.17, respectively.
[0158] In step 54, Levy's flight, as a random walk strategy with heavy-tailed characteristics, exhibits a movement pattern that combines short-distance search with intermittent long-distance jumps. This effectively improves the algorithm's search capability in the solution space. Dense short-step movements ensure the development of potential optimal regions, while long-step movements provide jump displacements for pelican individuals trapped in local optima. The step length calculation formula is as follows:
[0159] ;
[0160] In the formula, β is the shape parameter; rand represents a random number obtained from a uniform distribution in the interval (0,1); Г(·) is the Gamma function; μ is a number that follows a distribution with a mean of 0 and a standard deviation of σ. μ ν is a random number distributed by a Gaussian distribution; ν is a number that follows a mean of 0 and a standard deviation of σ. ν The random numbers are generated from a Gaussian distribution; Levy_step represents the Levy step size.
[0161] After introducing the Levy flight strategy, the update formula for the exploration phase is:
[0162] ;
[0163] In the formula, It is x i,j Updated value during the exploration phase; F i The fitness value represents the position vector of the i-th individual pelican, where the position vector is x. i =(x i,1 ,x i,2 ,…,x i,j ,…,x i,m p is the food position vector, p j It is the value of the j-th dimension; F p is the fitness value for the food position; I is a random number with a value of 1 or 2; Levy_step is the step size.
[0164] In step 55, during the development phase, to prevent individual pelicans from getting trapped in local optima, when their fitness value is less than the population average fitness value, their neighborhood is explored; when their fitness value is higher than the population average fitness value, it indicates that the solution is performing poorly, and at this time, an adaptive t-distribution variation is introduced to help them escape the local region. The update formula is as follows:
[0165] ;
[0166] In the formula, It is x i,j The updated value during the development phase; iter is the current iteration number; T max It represents the maximum number of iterations; rand represents a random number obtained from a uniform distribution in the interval (0,1); F i The fitness value represents the position vector of the i-th individual pelican, where the position vector is x. i =(x i,1 ,x i,2 ,…,x i,j ,…,x i,m );F avg It is the average fitness value of the pelican population; t(iter) represents a random number following a t-distribution with iter degrees of freedom; l j It is the lower bound of the j-th dimension of the search space; u j It is the upper bound of the j-th dimension of the search space.
[0167] The adaptive t-distribution mutation uses the current iteration number iter as the degree of freedom. In the early stages of iteration, the degree of freedom is small, and the adaptive t-distribution mutation is close to the Cauchy mutation, which has a strong global search capability. As the number of iterations increases, the distribution curve gradually becomes more convex, and the local exploitation capability is enhanced accordingly.
[0168] In steps 54 and 55, the formula for determining whether the pelican has moved to the new location is:
[0169] ; ;
[0170] In the formula, x i F represents the position vector of the i-th pelican. i Its fitness value; x i 1 F is the updated position of the i-th pelican during the exploration phase. i 1 It is its fitness value; x i 2 F is the updated position of the i-th pelican during the development phase. i 2 It is its fitness value.
[0171] In this embodiment, the parameters to be optimized in the hybrid network include the number of GRU cells, the number of MATT attention heads, the L2 regularization coefficient, the initial learning rate, and the dropout rate. The optimization ranges for these five parameters are [16, 256], [4, 16], [1e-4, 1e-2], [1e-5, 1e-3], and [0.1, 0.3], respectively. The training set and the test set are split in an 8:2 ratio, and the root mean square error (RMSE) of the test set is used as the fitness function.
[0172] In this embodiment, since the boom structure is the most complex, the pressure signal of the boom's large cavity is used as the target signal. Fitting curves are plotted using the predicted and actual values from both the CGM model and the IPOA-CGM model. A higher degree of curve fitting indicates a better predictive performance. The fitting results of the two models are shown below. Figure 8 , Figure 9 As shown in the figure, the IPOA-CGM model achieves a better fit in its predictions. Furthermore, Mean Absolute Error (MAE) and Root Mean Square Error (RMSE) are used as evaluation metrics to quantify model performance. Smaller MAE and RMSE values indicate smaller prediction errors and better model performance. The experimental results are shown in Table 1 below:
[0173] Table 1 Experimental Results
[0174] MAE(bar) RMSE (bar) CGM 7.3637 12.5582 IPOA-CGM 4.1178 5.9384
[0175] Step 6: Determine in real time whether the pressure sensor is malfunctioning using a working condition adaptive dynamic threshold method. When the pressure sensor is functioning normally, use the actual measured value; when the pressure sensor is malfunctioning, use the predicted value from the IPOA-CGM model constructed in Step 5.
[0176] The specific steps for determining whether a pressure sensor has failed are as follows:
[0177] Step 61: Calculate the residual between the predicted value of the IPOA-CGM model and the measured value of the pressure sensor at time t. The specific formula is as follows:
[0178] ;
[0179] In the formula, p k This is the actual measured value from the sensor; p' k This is a prediction from the IPOA-CGM model; e k It is the absolute value of the residual between the two;
[0180] Step 62: Set the sliding window size to W, then the residual sequence within the window is: (e k-W ,⋯,e k-2 ,e k-1 Then the standard deviation of the residuals within the sliding window at time k is:
[0181] ;
[0182] In the formula, σ k The standard deviation of the sliding window residuals at time k reflects the degree of fluctuation of the residuals within the sliding window. It is a residual sequence (e k-W ,⋯,e k-2 ,e k-1 The average value of )
[0183] Step 63: Calculate the dynamic threshold at time t based on the threshold coefficient set according to the current operating condition type. The specific formula is as follows:
[0184] ;
[0185] In the formula, θ k γ is the threshold at time k; γ is the threshold coefficient, which depends on the current operating condition.
[0186] Step 64: Determine if the pressure sensor is malfunctioning:
[0187] If the residual at time t is greater than the dynamic threshold, the pressure sensor is determined to have failed at time t.
[0188] If the residual at time t is less than or equal to the dynamic threshold, the pressure sensor is considered to be functioning normally at time t.
[0189] In this embodiment, considering that the sampling frequency is 10Hz and the duration of "digging", "lifting and rotating", "unloading" and other working conditions is about 10 to 20 seconds, the sliding window size is set to 100, that is, to cover the most recent 100 sampling points.
[0190] In the embodiments, under the "excavation" condition, the hydraulic system load fluctuates drastically and is a high-risk area for failure. γ=2.3 avoids false alarms caused by drastic fluctuations. Under the "lifting and slewing" condition, the load changes continuously with the boom angle, and the slewing inertia easily causes non-faulty residual abrupt changes. γ=2.7 can filter instantaneous fluctuations and reduce the risk of false alarms. Under the "unloading" condition, the action is simple and the residual fluctuation is small. γ=2.2 can amplify small residual abnormalities and avoid missed reports of unloading jams, material leakage, and other problems. Under the "reset and slewing" condition, the mechanical clearance is prone to instantaneous fluctuations during start-up and shutdown, and the risk of failure is low. γ=2.8 can prioritize stability and reduce invalid alarms.
[0191] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A working condition adaptive soft measurement method for excavator pressure sensors, characterized in that, Includes the following steps: Step 1: Acquire pressure sensor signals when the excavator is operating normally under various working conditions; Step 2: Construct a variable selection framework for working condition adaptation using the Peter-Clark algorithm, temporal convolutional network, maximum information coefficient, and soft attention gate. First, the Peter-Clark algorithm generates a causal graph among pressure sensor variables under any working condition, forming the corresponding variable set. Then, the working condition type is identified using TCN, and the optimal variable set for each working condition is determined using MIC. Finally, the soft attention gate assigns adaptive weights to each variable in the optimal variable set for the target variable. Step 3: Filter the weighted variables using the adaptive Kalman filter algorithm; Step 4: Construct a hybrid network that integrates convolutional neural networks, gated recurrent units, and multi-head attention mechanisms. The convolutional neural network is used to extract local features; the gated recurrent unit is used to capture long-term dependencies; and the multi-head attention mechanism is used to focus on historical information. Step 5: The improved Pelican optimization algorithm, which incorporates Kent mapping, Levy flight strategy, and adaptive t-distribution mutation strategy, is used to optimize the hyperparameters in the hybrid network of Step 4, construct the IPOA-CGM model, and predict the target pressure signal. Step 6: Determine in real time whether the pressure sensor is malfunctioning using the dynamic threshold method that adapts to the working conditions. When the pressure sensor is normal, use the actual measured value of the pressure sensor; when the pressure sensor is malfunctioning, use the predicted value of the IPOA-CGM model constructed in Step 5.
2. The working condition adaptive soft measurement method for excavator pressure sensors as described in claim 1, characterized in that, The specific steps of step 2 are as follows: Step 21: Generate a causal graph between sensor variables under any working condition using the Peter-Clark algorithm, locate the target pressure node in the graph, and filter the parent and ancestor nodes of the target pressure signal node to form a variable set; Step 22: Use TCN to identify the type of working condition at the current moment, calculate the maximum information coefficient between each variable in the variable set corresponding to the current working condition and the target pressure variable; filter the variables in the variable set whose maximum information coefficient value is greater than the preset maximum information coefficient threshold, and construct the optimal variable set corresponding to the working condition; Step 23: Apply an adaptive weight to the target variable using a soft attention gate. The output formula of the soft attention gate is: ; X is the input vector of the soft attention gate; W1 and W2 are weight matrices; b1 and b2 are bias vectors; H and Z are the output vectors of the first hidden layer and the second hidden layer, respectively; W_attention is the weight vector, i.e., the output vector of the second hidden layer; ⊙ is the element-wise multiplication of the two vectors; X_weighted is the weighted feature vector, i.e., the output of the soft attention gate.
3. The working condition adaptive soft measurement method for excavator pressure sensors as described in claim 2, characterized in that, In step 22, the preset maximum information coefficient threshold is 0.
6.
4. The working condition adaptive soft measurement method for excavator pressure sensors as described in claim 1, characterized in that, In step 3, the adaptive Kalman filter algorithm adjusts the process noise covariance matrix and the observation noise covariance matrix through a smooth transition mechanism. The specific formula for the smooth transition mechanism is as follows: ; In the formula, initial is the initial time; target is the target time; Q initial and R initial These are the process noise covariance matrix and the observation noise covariance matrix at the initial time, respectively; Q target and R target These are the process noise covariance matrix and the observation noise covariance matrix at the target time, respectively; L is the transition step size, L = target - initial; k is a certain time in the transition process, k = 1, ..., L; Q k and R k Let $k$ be the process noise covariance matrix and the observation noise covariance matrix at time $k$, respectively.
5. The working condition adaptive soft measurement method for excavator pressure sensors as described in claim 1, characterized in that, In step 5, the improvement process of the Pelican algorithm is as follows: Step 51: Initialize the pelican population size and maximum number of iterations; Step 52: Generate a uniformly distributed population based on the Kent mapping and initialize the pelican locations; Step 53: Randomly generate food location vectors; Step 54: Update the pelican's exploration phase location using the Levy flight strategy and determine whether the pelican has moved to a new location; Step 55: Update the pelican's development stage position using an adaptive t-distribution mutation strategy, and determine whether the pelican has moved to the new position; Step 56: Determine if the maximum number of iterations has been reached. If the maximum number of iterations has been reached, terminate the process and output the optimal parameters; otherwise, return to step 53.
6. The working condition adaptive soft measurement method for excavator pressure sensors as described in claim 5, characterized in that, In step 52, the specific formula for generating a uniformly distributed population based on the Kent mapping is as follows: ; In the formula, N is the pelican population size; m is the dimension of the search space; x i,j Let l be the value of the j-th dimension of the i-th pelican; j u is the lower bound of the j-th dimension of the search space; j Let be the upper bound of the j-th dimension of the search space; a is the skewness of the Kent mapping, ranging from (0, 1); z i,j It is a chaotic value, ranging from [0, 1].
7. The working condition adaptive soft measurement method for excavator pressure sensors as described in claim 5, characterized in that, In step 54, the specific formula for updating the pelican's exploration phase position using the Levy flight strategy is as follows: ; In the formula, It is x i,j Updated value during the exploration phase; F i The fitness value represents the position vector of the i-th individual pelican, where the position vector of the i-th individual pelican is x. i =(x i,1 ,x i,2 ,…,x i,j ,…,x i,m p is the food position vector, p j F is the value of the j-th dimension of p; p is the fitness value for the food position; I is a random number with a value of 1 or 2; Levy_step is the step size.
8. The working condition adaptive soft measurement method for excavator pressure sensors as described in claim 5, characterized in that, In step 55, the specific formula for updating the pelican's development stage position using the adaptive t-distribution mutation strategy is as follows: ; In the formula, It is x i,j Updated value during the development phase; x i,j It is the value of the i-th pelican in the j-th dimension; iter is the current iteration number; T max It represents the maximum number of iterations; rand is a random number obtained from a uniform distribution in the interval (0,1); F i It is the fitness value of the position vector of the i-th individual pelican, where the position vector of the i-th individual pelican is x. i =(x i,1 ,x i,2 ,…,x i,j ,…,x i,m );F avg It is the average fitness value of the pelican population; t(iter) is a random number following a t-distribution with iter degrees of freedom; l j It is the lower bound of the j-th dimension of the search space; u j It is the upper bound of the j-th dimension of the search space.
9. The working condition adaptive soft measurement method for excavator pressure sensors as described in claim 1, characterized in that, In step 6, the specific steps for determining whether the pressure sensor has failed are as follows: Step 61: Calculate the residual between the predicted value of the IPOA-CGM model and the measured value of the pressure sensor at time t; Step 62: Set the sliding window size and calculate the standard deviation of the residuals within the sliding window at time t; Step 63: Calculate the dynamic threshold at time t based on the threshold coefficient set according to the current working condition type; Step 64: Determine if the pressure sensor is malfunctioning: If the residual at time t is greater than the dynamic threshold, the pressure sensor is determined to have failed at time t. If the residual at time t is less than or equal to the dynamic threshold, the pressure sensor is considered to be functioning normally at time t.
10. The working condition adaptive soft measurement method for excavator pressure sensors as described in claim 9, characterized in that, In step 63, the specific method for setting the threshold coefficient based on the current operating condition is as follows: When the working condition is excavation, the threshold coefficient is set to 2.
3. When the operating condition is lifting and slewing, the threshold coefficient is set to 2.
7. When the operating condition is unloading, the threshold coefficient is set to 2.
2. When the operating condition is reset rotation, the threshold coefficient is 2.8.
Citation Information
Patent Citations
Pressure soft sensor of excavator hydraulic system
CN115563475A
Diesel engine transient NOx emission prediction method and system, storage medium and equipment
CN116186602A
Method for automatically and accurately acquiring three control parameters of PID (Proportion Integration Differentiation) controller of excavator
CN116755322A
Modeling method for optimizing thermal error of main shaft of long short-term memory network by pelican algorithm
CN116861793A
MSADBO-CNN-GRU-Attention-based gas concentration time sequence prediction method
CN120105368A