Power head life prediction method and system based on cosine similarity constraint

CN122796436BActive Publication Date: 2026-11-03JILIN UNIVERSITY +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611245250.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-08-17
Publication Date
2026-11-03
Estimated Expiration
2046-08-17

AI Technical Summary

Technical Problem

Traditional methods for predicting the lifespan of servo tool holder power heads are difficult to accurately describe their dynamic behavior during degradation, and pure data-driven deep learning models suffer from limitations in feature extraction and a lack of physical constraints.

Method used

A power head lifetime prediction method based on cosine similarity constraints is adopted. Through adaptive feature extraction and perceptron prediction using channel attention mechanism, combined with gated demultiplexing and trapezoidal dimensionality reduction, an improved physical information neural network model is constructed. Cosine similarity constraints of high-dimensional features at adjacent time steps are introduced for joint loss training.

Benefits of technology

It improves the accuracy and noise robustness of servo tool holder power head life prediction, reduces maintenance costs, and enhances the model's prediction performance and stability under complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122796436B_ABST
    Figure CN122796436B_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of numerical control machine tool health monitoring and neural network, and provides a power head life prediction method and system based on cosine similarity constraint, which comprises the following steps: data acquisition and preprocessing; constructing an improved physical information neural network model based on multiple attention mechanisms and cosine similarity constraint, which comprises a channel attention mechanism feature extraction module and a perceptron prediction module; training the improved physical information neural network model based on a combined loss of multiple constraints; and predicting the remaining life of the servo tool rest power head online according to the trained improved physical information neural network model. The application can accurately predict the remaining life of the servo tool rest power head by introducing a front-end channel attention mechanism for adaptive degradation feature extraction and constructing an improved physical information neural network model based on multiple attention mechanisms and cosine similarity constraint.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of CNC machine tool health monitoring and neural network technology, and particularly relates to a method for predicting the life of a power head based on cosine similarity constraints. Background Technology

[0002] With the widespread application of CNC machine tools in modern manufacturing, their performance and stability are crucial to production efficiency and product quality. The servo turret power head system is an important component of CNC machine tools, and its lifespan directly affects the machine tool's operating efficiency and maintenance costs.

[0003] However, traditional methods for predicting the lifespan of servo tool turret power heads typically rely solely on empirical models or statistical analysis based on sensor data, making it difficult to accurately describe the dynamic behavior of the servo tool turret power head system during degradation. Meanwhile, conventional pure data-driven deep learning models often suffer from limitations in feature extraction and a lack of physical constraints. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for predicting the lifespan of a power head based on cosine similarity constraints. It aims to solve the problem that pure data-driven models cannot effectively filter high-confidence degenerate representations from sensor data through an adaptive feature extraction method using channel attention mechanisms. Furthermore, it addresses the difficulty of traditional fully connected networks in accurately modeling dynamic behavior under complex operating conditions through a perceptron prediction method using gated demultiplexing and trapezoidal dimensionality reduction. Finally, it solves the problem of pure data-driven models lacking physical constraints by constructing a physical loss method based on high-dimensional feature cosine similarity constraints at adjacent time points.

[0005] This invention is implemented as follows: a method for predicting the lifespan of a powered head based on cosine similarity constraints, comprising the following steps:

[0006] Data acquisition and preprocessing: Collect detection data of the servo tool holder power head throughout its entire life cycle and perform preprocessing to obtain raw working condition data;

[0007] An improved physical information neural network model based on a multiple attention mechanism and cosine similarity constraint is constructed; the improved physical information neural network model includes a channel attention mechanism feature extraction module and a perceptron prediction module;

[0008] The channel attention mechanism feature extraction module extracts features from degradation information based on the channel attention mechanism: it mines degradation characteristics from the original working condition data and filters feature channels to obtain high-dimensional target features containing high-confidence degradation information.

[0009] The perceptron prediction module is used to concatenate the high-dimensional target features with the time features to obtain composite features, and to map the composite features to the remaining lifetime prediction value based on the gating mechanism and gradient dimensionality reduction.

[0010] The improved physical information neural network model is trained using a joint loss method based on multiple constraints: a joint loss function is constructed to update the parameters of the improved physical information neural network model; wherein, the joint loss function is calculated by combining the cosine similarity based on the high-dimensional target features at adjacent time steps with the data degradation mode based on the critical attention mechanism.

[0011] Based on a trained improved physical information neural network model, the remaining lifespan of the servo tool holder power head is predicted online.

[0012] Furthermore, the detection data includes one or more monitoring data of vibration, temperature, current, and torque; the preprocessing method includes one or more of data cleaning, standardization processing, and frame-segmentation processing.

[0013] Furthermore, the step of extracting features from degradation information based on the channel attention mechanism specifically includes:

[0014] Degradation characteristics are extracted from the original working condition data and normalized to obtain a normalized feature matrix;

[0015] Based on layer normalization and Gaussian error linearity, the normalized feature matrix is ​​mapped to a high-dimensional space to obtain high-dimensional degenerate features;

[0016] The high-dimensional degenerate features are compressed and reduced in dimensionality by passing them through the first unbiased dimensionality reduction linear mapping layer and the linear rectified function to obtain low-dimensional features.

[0017] The low-dimensional feature is restored to the original input dimension by passing it through a second unbiased linear mapping layer and an activation function, generating attention weight matrices for each feature channel.

[0018] The attention weight matrix is ​​multiplied element-wise with the input high-dimensional degenerate features to obtain the channel-adaptive weighted high-dimensional target features.

[0019] Furthermore, the perceptron prediction module maps lifetime prediction based on gating mechanism and gradient dimensionality reduction: it concatenates high-dimensional target features with temporal features to construct a composite feature containing servo turret power head state information and temporal evolution information, and then inputs the composite feature into a linear fully connected layer to complete wide-dimensional space mapping. Through feature segmentation operator, the high-dimensional feature is divided into two independent branches along the dimension: a feature expression branch and a gating branch. Combining the large model gating idea, the gating branch is nonlinearly excited using an activation function and multiplied element-wise with the feature expression branch. Then, the filtered features are sent to the output layer, and the high-dimensional hidden features are smoothly mapped to scalar space based on the trapezoidal dimensionality reduction structure to obtain the remaining lifetime prediction result of the servo turret power head.

[0020] Furthermore, the method for mapping lifetime prediction based on gating mechanisms and gradient dimensionality reduction specifically includes:

[0021] High-dimensional target features and time features are taken as input, and wide-dimensional mapping is performed through the first linear fully connected layer. After being processed by layer normalization and Gaussian error linear unit smoothing activation function, wide-dimensional transition features are obtained.

[0022] The wide-dimensional transition features are mapped to a space with two times the dimension through a second linear fully connected layer and layer normalization is performed. Then, the output is divided into two independent latent variables in the feature dimension using a feature splitting operator: the feature expression branch and the gated branch.

[0023] The gated branch is nonlinearly activated using the Gaussian error linear unit smooth activation function and then multiplied element-wise with the feature expression branch to achieve dynamic gating of features that evolve over time.

[0024] The features after dynamic gating are reduced by trapezoidal dimension through the output linear layer and mapped to scalar space to output the remaining life prediction value of the servo tool holder power head.

[0025] The specific calculation formula is as follows:

[0026] ;

[0027] ;

[0028] ; ;

[0029] in, High-dimensional target features With time characteristics Composite features of splicing; and These are the weight parameters and biases of the first linear fully connected layer, respectively. and These represent the layer normalization operations of the first and second linear fully connected layers, respectively. The Gaussian error linear unit smoothing activation function; It is a wide-dimensional transition feature; and These are the weight parameters and biases of the second linear fully connected layer, respectively. This represents a uniform division operator along the feature dimension; and These are the feature representation branch and the gated branch after equal division, respectively; Represents the element-wise multiplication operation of a matrix; Features selected after dynamic gating; and These are the weight parameters and biases of the output linear layer, respectively; This is the predicted remaining lifespan.

[0030] Furthermore, the step of training the improved physical information neural network model based on the joint loss of multiple constraints specifically includes:

[0031] Obtain the high-dimensional target features at the current moment, and the high-dimensional target features at the next moment after adding a preset time step;

[0032] Introducing a critical proximity attention (CPA) mechanism, based on the actual remaining lifetime. By assigning dynamic, exponential weights to prediction errors, the model is forced to focus on the prediction accuracy at the end of life and quantifies the data degradation pattern.

[0033] Calculate the cosine similarity of the high-dimensional target features in the latent space at two adjacent time points to quantify the physical consistency of the feature state evolution direction;

[0034] The mean value of the cosine similarities calculated for all samples in the training batch is used to obtain the joint loss function for the smooth evolution of the degenerative state of the constrained servo tool holder power head. The specific calculation formula is as follows:

[0035] ;

[0036] in, For the joint loss function, This refers to the batch sample size. To penalize the amplification factor, For temperature decay parameters, This represents the true remaining lifetime of the i-th sample. Normalized prediction of remaining lifetime for the i-th sample; For the current moment The high-dimensional target features of the i-th sample; To add a preset time step The high-dimensional target features of the i-th sample;

[0037] Normalized error assessment: Extract the predicted remaining lifetime value at the normalized scale and the corresponding true remaining lifetime label, and calculate the normalized root mean square error.

[0038] Real physical quantity error assessment: Based on the inverse normalization function, the normalized remaining lifetime prediction value and the corresponding real remaining lifetime label are restored to physical scale values ​​with the actual operating cycle of the equipment, and the root mean square error of the real physical quantity is calculated.

[0039] The multi-prediction performance of the improved physical information neural network model was tested by comprehensively evaluating the normalized root mean square error, the root mean square error of the actual physical quantity, and the mean absolute percentage error of the safety threshold.

[0040] Furthermore, the specific calculation formulas for the normalized root mean square error, the root mean square error of the true physical quantity, and the mean absolute percentage error are as follows:

[0041] ;

[0042] ;

[0043] ;

[0044] In the formula, For normalized root mean square error, The root mean square error of the actual physical quantity. Mean absolute percentage error; This represents the total number of samples in the test set. For the first Normalized remaining lifetime prediction for each test sample; For the first Normalized true remaining lifetime labels for each test sample; To restore the remaining lifetime prediction to the physical scale; To restore the true remaining lifetime label to the physical scale; For the first The true label value of each test sample; For the first Predicted values ​​for each test sample; The total number of samples required to meet the safety threshold condition.

[0045] Another objective of this invention is to provide a power head life prediction system based on cosine similarity constraints, used to implement the aforementioned power head life prediction method based on cosine similarity constraints, specifically including:

[0046] The data acquisition and preprocessing module is used to collect detection data throughout the entire life cycle of the servo tool holder power head and perform preprocessing to obtain raw working condition data.

[0047] An improved physical information neural network model based on multiple attention mechanism and cosine similarity constraint includes a channel attention mechanism feature extraction module and a perceptron prediction module.

[0048] The channel attention mechanism feature extraction module is used to mine degradation characteristics from the original working condition data and filter feature channels to obtain high-dimensional target features containing high-confidence degradation information.

[0049] The perceptron prediction module is used to concatenate the high-dimensional target features with the time features to obtain composite features, and to map the composite features to the remaining lifetime prediction value based on the gating mechanism and gradient dimensionality reduction.

[0050] The model training module is used to train the improved physical information neural network model based on a joint loss with multiple constraints: a joint loss function including data loss and physical loss is constructed to update the parameters of the improved physical information neural network model; wherein, the physical loss is calculated based on the cosine similarity of high-dimensional target features at adjacent time points;

[0051] The remaining life prediction module is used to predict the remaining life of the servo tool holder power head online based on a trained improved physical information neural network model.

[0052] The cosine similarity constraint-based power head life prediction method provided by this invention introduces a front-end channel attention mechanism for adaptive degradation feature extraction and constructs an improved physical information neural network model based on multiple attention mechanisms and cosine similarity constraints. This effectively introduces continuously changing physical model constraints implicitly into the joint optimization process of machine learning. This method, which takes into account both pure data-driven and physical prior knowledge, has great advantages in solving complex engineering problems and can accurately predict the remaining life of the servo tool holder power head. Attached Figure Description

[0053] Figure 1 This is a schematic diagram of the structure of the power head life prediction system based on cosine similarity constraints provided in an embodiment of the present invention.

[0054] Figure 2 Fitting curves for the predicted remaining lifespan of the servo tool post power head. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0056] like Figure 1 As shown, in one embodiment of the present invention, a method for predicting the lifespan of a powered head based on cosine similarity constraints is provided, comprising the following steps:

[0057] S1. Data Acquisition and Preprocessing: Collect detection data of the servo tool holder power head throughout its entire life cycle and perform preprocessing to obtain raw working condition data;

[0058] S2. Construct an improved physical information neural network model based on a multiple attention mechanism and cosine similarity constraints; the improved physical information neural network model includes a channel attention mechanism feature extraction module and a perceptron prediction module;

[0059] The channel attention mechanism feature extraction module extracts features of degradation information based on the channel attention mechanism: it mines degradation characteristics from the original working condition data and filters feature channels to obtain high-dimensional target features containing high-confidence degradation information. The high-dimensional target features are preprocessed, and the data scale is unified and the value range is mapped by the normalization algorithm to generate the optimized normalized feature matrix.

[0060] The perceptron prediction module is used to concatenate the high-dimensional target features with the time features to obtain composite features, and to map the composite features to the remaining lifetime prediction value based on the gating mechanism and gradient dimensionality reduction.

[0061] S3. Training the improved physical information neural network model based on joint loss with multiple constraints: Constructing a joint loss function to update the parameters of the improved physical information neural network model; wherein, the joint loss function is calculated by combining the cosine similarity based on the high-dimensional target features at adjacent time points with the data degradation mode based on the critical attention mechanism;

[0062] S4. Based on the trained improved physical information neural network model, predict the remaining life of the servo tool holder power head online.

[0063] In this embodiment of the invention, the above method can be applied to the life prediction of a servo tool turret power head system, but is not limited thereto. In step S1, the detection data of the entire life cycle of the servo tool turret power head includes monitoring data from various sensors such as vibration, temperature, current, and torque during the entire life cycle operation of the servo tool turret power head. After data cleaning and standardization preprocessing, the time-series signals are processed by frame segmentation using sliding window technology to obtain the original operating condition data containing time-domain and frequency-domain information, which is the original feature set.

[0064] In a preferred embodiment of the present invention, the channel attention mechanism feature extraction module is based on linear mapping and nonlinear enhancement. Using a selected normalized feature matrix from the original working condition data as input, it first performs spatial mapping through a fully connected linear layer. Each layer employs a Gaussian error linear unit (GELU) as the activation function to enhance the network's ability to express the complex nonlinear degradation process of CNC machine tools. Next, feature stability processing is performed by introducing a layer normalization mechanism to normalize the neuron outputs, ensuring the stability of the feature distribution during large-scale iterations. Adaptive channel weighting is used, with the core incorporating a channel attention mechanism. By globally aggregating feature vectors, the importance of different sensor channels to lifetime decay is learned, and corresponding weight coefficients are assigned. A residual connection mechanism is used, constructing residual connections within the module to transfer the original features across layers and fuse them with the weighted features. This mechanism effectively prevents feature degradation problems in deep networks, outputting high-dimensional target features containing high-confidence degradation information.

[0065] The channel attention mechanism feature extraction module specifically includes an input layer, a basic mapping layer, and a channel attention mechanism sub-network. The input layer receives the optimized normalized feature matrix. The basic mapping layer maps the features to a high-dimensional space through the first linear mapping layer, stabilizes the data distribution by combining layer normalization, and enhances the nonlinear expression through Gaussian error linearization (GELU). The channel attention mechanism sub-network extracts adaptively weighted high-dimensional target features.

[0066] In practical applications, the steps for feature extraction of degraded information based on the channel attention mechanism specifically include:

[0067] (1) Extract degradation characteristics from the original working condition data and perform normalization processing to obtain the normalized feature matrix;

[0068] (2) By mapping the normalized feature matrix to a high-dimensional space through the basic mapping layer based on layer normalization and Gaussian error linearity, the high-dimensional degenerate features are obtained.

[0069] (3) The high-dimensional degenerate features output by the basic mapping layer are compressed and reduced in dimension by the first unbiased dimension reduction linear mapping layer and the linear rectified (ReLU) function to obtain low-dimensional features, thereby greatly reducing the computational cost;

[0070] (4) The low-dimensional feature is restored to the original input dimension by passing it through a second unbiased linear mapping layer and a sigmoid activation function, generating the attention weight matrix for each feature channel; the specific calculation formula is as follows:

[0071] ;

[0072] (5) Multiply the attention weight matrix element-wise with the input high-dimensional degenerate features to obtain the channel-adaptive weighted high-dimensional target features; the specific calculation formula is as follows:

[0073] ;

[0074] In the formula, For the high-dimensional degenerate features of the input, These are the weight parameters for the first unbiased dimension-reduced linear mapping layer. It is a linear rectified function. These are the weight parameters for the second unbiased, up-dimensional linear mapping layer. It is the Sigmoid activation function. For the generated attention weight matrix, This represents the element-wise multiplication operation of a matrix. This is the high-dimensional target feature output after adaptive weighting.

[0075] In addition, feature fusion and residual connection layers can be set up to retain the high-dimensional target features output after adaptive weighting as shortcut branches, while the main path continues to undergo linear mapping and normalization. Finally, the main features and shortcut branch features are added across layers (residual connection) and activated again through GELU to output the final extracted high-dimensional target features.

[0076] In a preferred embodiment of the present invention, the perceptron prediction module is based on gating mechanism and gradient dimensionality reduction for lifetime prediction mapping, abandoning the traditional multi-layer fully connected architecture: high-dimensional target features and time features are concatenated to construct composite features containing servo turret power head state information and time evolution information. The composite features are then input into a linear fully connected layer to complete wide-dimensional space mapping. The high-dimensional features are divided into two independent branches along the dimension: a feature expression branch and a gating branch, by a feature segmentation operator. Combining the large model gating idea, the GELU activation function is used to nonlinearly excite the gating branch and multiply it element-wise with the feature expression branch. The filtered features are then sent to the output layer. The high-dimensional hidden features are smoothly mapped to scalar space by relying on the trapezoidal dimensionality reduction structure to obtain the remaining lifetime prediction result of the servo turret power head.

[0077] In practical applications, the perceptron prediction module includes a smooth transition and wide-dimensional mapping layer, a gated decomposition computation layer, a dynamic gated coupling layer, and a trapezoidal dimensionality reduction output layer; the method for lifetime prediction mapping based on gating mechanisms and gradient dimensionality reduction specifically includes:

[0078] (1) Smooth transition and wide-dimensional mapping layer: The composite feature after splicing high-dimensional target features and time features is used as input. Wide-dimensional mapping is performed through the first linear fully connected layer. Layer normalization (LayerNorm) is combined to stabilize the data distribution. The smooth transition of time and space features is achieved through Gaussian error linear unit (GELU) to obtain wide-dimensional transition features.

[0079] (2) Gated branch computation layer: The wide-dimensional transition features are mapped to a space with two times the dimension through the second linear fully connected layer and the layer is normalized. Then, the output is divided into two independent latent variables in the feature dimension by the feature splitting operator: the feature expression branch and the gated branch.

[0080] (3) Dynamic gating coupling layer: The gating branch is nonlinearly activated by the Gaussian error linear unit (GELU) smooth activation function and multiplied element-wise with the feature expression branch. This mechanism uses the activated gating weights to adaptively amplify the core features of the current degradation stage and suppress redundant noise, thereby realizing dynamic gating screening of features that evolve over time.

[0081] (4) Trapezoidal dimensionality reduction output layer: The features after dynamic gating are reduced to trapezoidal dimensionality through the output linear layer and mapped to scalar space. Finally, the normalized remaining life prediction value of the servo tool holder power head is output.

[0082] The specific calculation formula for the above prediction is as follows:

[0083] ;

[0084] ;

[0085] ; ;

[0086] in, High-dimensional target features With time characteristics Composite features of splicing; and These are the weight parameters and biases of the first linear fully connected layer, respectively. and These represent the layer normalization operations of the first and second linear fully connected layers, respectively. The Gaussian error linear unit smoothing activation function; It is a wide-dimensional transition feature; and These are the weight parameters and biases of the second linear fully connected layer, respectively. This represents a uniform division operator along the feature dimension; and These are the feature representation branch and the gated branch after equal division, respectively; Represents the element-wise multiplication operation of a matrix; Features selected after dynamic gating; and These are the weight parameters and biases of the output linear layer, respectively; This is the predicted remaining lifespan.

[0087] In a preferred embodiment of the present invention, the channel attention mechanism feature extraction module and the perceptron prediction module in the improved physical information neural network model are jointly trained using training samples with a joint training loss (as the final optimization objective), and a cosine similarity constraint is added, employing a latent space trajectory continuity constraint. This constraint forces the network to ensure that the evolution direction of high-dimensional feature vectors at adjacent time points is highly consistent in the latent space, thereby embedding the continuous and irreversible physical degradation law of the dynamic head into the model. This embodiment of the present invention calculates the physical loss by introducing a latent space trajectory continuity constraint, whereby the physical loss is defined as a penalty term that ensures the feature evolution direction remains highly consistent at adjacent time points. The error is calculated between the obtained remaining lifetime prediction result conforming to physical laws and the actual remaining lifetime label corresponding to the test sample to evaluate the predictive performance of the improved physical information neural network model on the remaining lifetime prediction task.

[0088] In practical applications, the steps for training the improved physical information neural network model based on joint loss with multiple constraints specifically include:

[0089] (1) Obtain the high-dimensional target features at the current moment, and the high-dimensional target features at the next moment after adding a preset (small) time step;

[0090] (2) Introduce a critical proximity attention (CPA) mechanism, based on the actual remaining lifetime. By assigning dynamic, exponential weights to prediction errors, the model is forced to focus on the prediction accuracy at the end of life and quantifies the data degradation pattern.

[0091] (3) Calculate the cosine similarity of the high-dimensional target features in the latent space at the two adjacent time points to quantify the physical consistency of the feature state evolution direction;

[0092] (4) The mean of the cosine similarity calculated for all samples in the training batch is used to obtain the joint loss function for the smooth evolution of the degenerate state of the constrained servo tool holder power head. The specific calculation formula is as follows:

[0093] ;

[0094] in, For the joint loss function, This refers to the batch sample size. To penalize the amplification factor, For temperature decay parameters, This represents the true remaining lifetime of the i-th sample. Normalized prediction of remaining lifetime for the i-th sample; For the current moment The high-dimensional target features of the i-th sample; To add a preset time step The high-dimensional target features of the i-th sample are used; during training, the partial derivatives of the network gradient are calculated using the backpropagation algorithm, and the L2 norm gradient clipping technique is used to limit the gradient norm to within 1.0 in order to minimize... With the goal of optimizing the model's internal parameters through iterative updates (total training epochs 400), the predicted results are compared with the true labels, and the model's predictive performance is comprehensively evaluated through the following multiple validation metrics.

[0095] (4) Normalization error assessment: Extract the predicted remaining lifetime value at the normalization scale and the corresponding true remaining lifetime label, and calculate the normalized root mean square error.

[0096] (5) Real physical quantity error assessment: Based on the inverse normalization function, the normalized remaining life prediction value and the corresponding real remaining life label are restored to the physical scale value with the actual operating cycle of the equipment, and the root mean square error of the real physical quantity is calculated.

[0097] (6) The multi-prediction performance of the improved physical information neural network model is verified by comprehensively evaluating the normalized root mean square error, the root mean square error of the real physical quantity, and the average absolute percentage error of the safety threshold.

[0098] The specific formulas for calculating the normalized root mean square error, the root mean square error of the true physical quantity, and the mean absolute percentage error are as follows:

[0099] ;

[0100] ;

[0101] ;

[0102] In the formula, For normalized root mean square error, The root mean square error of the actual physical quantity. Mean absolute percentage error; This represents the total number of samples in the test set. For the first Normalized remaining lifetime prediction for each test sample; For the first Normalized true remaining lifetime labels for each test sample; To restore the remaining lifetime prediction to the physical scale; To restore the true remaining lifetime label to the physical scale; For the first The true label value (i.e., true remaining lifetime) of each test sample; For the first Predicted values ​​for each test sample (i.e., predicted remaining lifetime); The total number of samples required to meet the safety threshold condition.

[0103] Through the above multiple evaluations, not only was the model's fitting accuracy at the pure mathematical level quantified, but its engineering reliability in actual industrial deployment was also tested.

[0104] Example 1: To verify the performance of the improved physical information neural network model constructed in this embodiment of the invention, a set of full lifecycle detection data of a servo tool turret power head system was used to experimentally verify its practicality and performance in predicting the lifecycle of the servo tool turret power head system. The specific process and results are as follows:

[0105] During data collection, the servo tool turret power head system test bench used in the experiment operated at a motor speed of 1400 RPM, with a motor-to-tool transmission ratio of 1:1 and 25 teeth on both the driving and driven bevel gears within the turret. The tool cutting speed was 1400 RPM, and the torque was 10 N·m. The sampling frequency was 10000 Hz, with a designed sampling interval of 3 hours and a sampling duration of 5 seconds. The method provided in this embodiment of the invention was verified using full lifecycle testing data of the servo tool turret power head. The results are as follows: Figure 2 As shown, Figure 2 The figure shows the fitted curve of the prediction result obtained by using the method provided in the embodiments of the present invention to predict the above case data; where the blue curve represents the true value and the orange-yellow curve represents the predicted value. As can be seen from the figure, the distribution trends of the orange-yellow curve and the blue curve are almost the same. The calculated RMSE of the prediction result with respect to the true label is 14.345, and the MAPE of the prediction result with respect to the official label is 20.1945.

[0106] In summary, the method provided in this invention extracts features through a channel attention mechanism and predicts lifetime by combining cosine similarity. It fully utilizes physical laws to model the degradation process, enabling accurate prediction of the remaining lifetime of the servo tool turret power head system. This provides effective support for machine tool health management and fault early warning. The beneficial effects and advantages of this method compared to existing technologies are as follows:

[0107] 1. Without significantly increasing network computational complexity, the method improves the model's adaptive extraction and representation capabilities for multi-source heterogeneous degradation features: The method provided in this embodiment first designs a nonlinear mapping structure in the channel attention mechanism for high-dimensional degradation features extracted from multi-source sensor data such as vibration, temperature, current, and torque of the servo tool holder power head. This structure involves first reducing the dimensionality (to 1 / 4 of the original dimension) and then restoring it to its original dimension. Furthermore, by generating attention weight matrices for each feature channel, adaptive weighted fusion of key degradation channels is achieved. This not only breaks the limitations of static mapping in traditional fully connected networks but also greatly enhances the model's ability to perceive and represent multi-dimensional degradation states under complex working conditions with extremely low computational cost.

[0108] 2. Balancing pure data-driven approaches with prior physical knowledge, this invention significantly enhances the model's high-precision prediction performance and noise robustness during critical failure periods: The method provided in this embodiment innovatively constructs a multi-constraint mechanism for joint training: it introduces a latent space trajectory continuity constraint and utilizes the cosine similarity of high-dimensional feature vectors at adjacent time points to construct a penalty term. This mechanism forces the evolution direction of temporal features to remain highly consistent, enabling the network to autonomously learn continuous, smooth, and irreversible physical degradation patterns, thereby greatly improving the model's prediction stability under strong noise interference.

[0109] 3. Improved safety and fault tolerance of industrial deployment, significantly reduced maintenance costs of CNC machine tools: The method provided in this embodiment combines normalization and real physical quantity dual error evaluation to quantitatively verify the actual industrial deployment performance. It can output extremely stable remaining life prediction results with real physical meaning, providing high-fidelity multi-angle degradation information for maintenance decisions, effectively avoiding excessive maintenance or sudden downtime of servo tool holder power head, maximizing production safety and reducing overall operation and maintenance costs.

[0110] In another embodiment of the present invention, a power head life prediction system based on cosine similarity constraints is also provided to implement the above-described power head life prediction method based on cosine similarity constraints, specifically including:

[0111] The data acquisition and preprocessing module is used to collect detection data throughout the entire life cycle of the servo tool holder power head and perform preprocessing to obtain raw working condition data.

[0112] An improved physical information neural network model based on multiple attention mechanism and cosine similarity constraint includes a channel attention mechanism feature extraction module and a perceptron prediction module.

[0113] The channel attention mechanism feature extraction module is used to mine degradation characteristics from the original working condition data and filter feature channels to obtain high-dimensional target features containing high-confidence degradation information.

[0114] The perceptron prediction module is used to concatenate the high-dimensional target features with the time features to obtain composite features, and to map the composite features to the remaining lifetime prediction value based on the gating mechanism and gradient dimensionality reduction.

[0115] The model training module is used to train the improved physical information neural network model based on joint loss with multiple constraints: a joint loss function is constructed to update the parameters of the improved physical information neural network model; wherein, the joint loss function is calculated by combining the cosine similarity based on the high-dimensional target features at adjacent time steps with the data degradation mode based on the critical attention mechanism;

[0116] The remaining life prediction module is used to predict the remaining life of the servo tool holder power head online based on a trained improved physical information neural network model.

[0117] It should be understood that although the steps in the flowcharts of the embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in each embodiment may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.

[0118] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods.

[0119] The above embodiments merely illustrate several implementation methods of the present invention, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this patent should be determined by the appended claims.

Claims

1. A method for predicting the lifespan of a powered head based on cosine similarity constraints, characterized in that, Includes the following steps: Data acquisition and preprocessing: Collect detection data of the servo tool holder power head throughout its entire life cycle and perform preprocessing to obtain raw working condition data; An improved physical information neural network model based on a multiple attention mechanism and cosine similarity constraint is constructed; the improved physical information neural network model includes a channel attention mechanism feature extraction module and a perceptron prediction module; The channel attention mechanism feature extraction module extracts features from degradation information based on the channel attention mechanism; it mines degradation characteristics from the original working condition data and filters feature channels to obtain high-dimensional target features containing high-confidence degradation information. The perceptron prediction module is used to concatenate the high-dimensional target features with the time features to obtain composite features, and to map the composite features to the remaining lifetime prediction value based on the gating mechanism and gradient dimensionality reduction. The improved physical information neural network model is trained using a joint loss method based on multiple constraints: a joint loss function including data loss and physical loss is constructed to update the parameters of the improved physical information neural network model; wherein, the physical loss is calculated based on the cosine similarity of high-dimensional target features at adjacent time points. Based on a trained improved physical information neural network model, the remaining lifespan of the servo tool holder power head is predicted online.

2. The method for predicting the lifespan of a powered head based on cosine similarity constraints according to claim 1, characterized in that, The detection data includes one or more monitoring data of vibration, temperature, current, and torque; the preprocessing method includes one or more of data cleaning, standardization, and framing.

3. The method for predicting the lifespan of a powered head based on cosine similarity constraints according to claim 1, characterized in that, The step of extracting features from degradation information based on the channel attention mechanism specifically includes: Degradation characteristics are extracted from the original working condition data and normalized to obtain a normalized feature matrix; Based on layer normalization and Gaussian error linearity, the normalized feature matrix is ​​mapped to a high-dimensional space to obtain high-dimensional degenerate features; The high-dimensional degenerate features are compressed and reduced in dimensionality by passing them through the first unbiased dimensionality reduction linear mapping layer and the linear rectified function to obtain low-dimensional features. The low-dimensional feature is restored to the original input dimension by passing it through a second unbiased linear mapping layer and an activation function, generating attention weight matrices for each feature channel. The attention weight matrix is ​​multiplied element-wise with the input high-dimensional degenerate features to obtain the channel-adaptive weighted high-dimensional target features.

4. The method for predicting the lifespan of a powered head based on cosine similarity constraints according to claim 1, characterized in that, The perceptron prediction module uses gating and gradient dimensionality reduction to map the remaining life of the servo tool holder. It concatenates high-dimensional target features with temporal features to construct a composite feature containing both the servo tool holder's power head state information and temporal evolution information. This composite feature is then input into a fully connected linear layer to complete the wide-dimensional space mapping. A feature segmentation operator divides the high-dimensional feature into two independent branches along the dimension: a feature expression branch and a gating branch. Combining the large-model gating concept, an activation function is used to nonlinearly excite the gating branch, which is then multiplied element-wise with the feature expression branch. The filtered features are then fed into the output layer, and a trapezoidal dimensionality reduction structure smoothly maps the high-dimensional hidden features to the scalar space, yielding the remaining life prediction result for the servo tool holder's power head.

5. The method for predicting the lifespan of a powered head based on cosine similarity constraints according to claim 4, characterized in that, The method for mapping lifetime prediction based on gating mechanisms and gradient dimensionality reduction specifically includes: High-dimensional target features and time features are taken as input, and wide-dimensional mapping is performed through the first linear fully connected layer. After being processed by layer normalization and Gaussian error linear unit smoothing activation function, wide-dimensional transition features are obtained. The wide-dimensional transition features are mapped to a space with two times the dimension through a second linear fully connected layer and layer normalization is performed. Then, the output is divided into two independent latent variables in the feature dimension using a feature splitting operator: the feature expression branch and the gated branch. The gated branch is nonlinearly activated using the Gaussian error linear unit smooth activation function and then multiplied element-wise with the feature expression branch to achieve dynamic gating of features that evolve over time. The features after dynamic gating are reduced to trapezoidal dimension through the output linear layer and mapped to scalar space to output the remaining life prediction value of the servo tool holder power head. The specific calculation formula is as follows: ; ; ; ; in, High-dimensional target features With time characteristics Composite features of splicing; and These are the weight parameters and biases of the first linear fully connected layer, respectively. and These represent the layer normalization operations of the first and second linear fully connected layers, respectively. The Gaussian error linear unit smoothing activation function; It is a wide-dimensional transition feature; and These are the weight parameters and biases of the second linear fully connected layer, respectively. This represents a uniform division operator along the feature dimension; and These are the feature representation branch and the gated branch after equal division, respectively; Represents the element-wise multiplication operation of a matrix; Features after dynamic gating; and These are the weight parameters and biases of the output linear layer, respectively; This is the predicted remaining lifespan.

6. The method for predicting the lifespan of a powered head based on cosine similarity constraints according to claim 1, characterized in that, The steps of training the improved physical information neural network model based on the joint loss of multiple constraints specifically include: Obtain the high-dimensional target features at the current moment, and the high-dimensional target features at the next moment after adding a preset time step; Introducing a critical proximity attention mechanism, based on the actual remaining lifetime. By assigning dynamic, exponential weights to prediction errors, the model is forced to focus on the prediction accuracy at the end of life and the data degradation pattern is quantified. Calculate the cosine similarity of the high-dimensional target features in the latent space at two adjacent time points to quantify the physical consistency of the feature state evolution direction; The mean value of the cosine similarity calculated for all samples in the training batch is used to obtain the joint loss function for the smooth evolution of the degenerative state of the constrained servo tool holder power head. The specific calculation formula is as follows: ; in, For the joint loss function, This refers to the batch sample size. To penalize the amplification factor, For temperature decay parameters, This represents the true remaining lifetime of the i-th sample. Normalized prediction of remaining lifetime for the i-th sample; For the current moment The high-dimensional target features of the i-th sample; To add a preset time step The high-dimensional target features of the i-th sample; Normalized error assessment: Extract the predicted remaining lifetime value at the normalized scale and the corresponding true remaining lifetime label, and calculate the normalized root mean square error. Real physical quantity error assessment: Based on the inverse normalization function, the normalized remaining lifetime prediction value and the corresponding real remaining lifetime label are restored to physical scale values ​​with the actual operating cycle of the equipment, and the root mean square error of the real physical quantity is calculated. The multi-prediction performance of the improved physical information neural network model was tested by comprehensively evaluating the normalized root mean square error, the root mean square error of the actual physical quantity, and the mean absolute percentage error of the safety threshold.

7. The method for predicting the lifespan of a powered head based on cosine similarity constraints according to claim 6, characterized in that, The specific calculation formulas for the normalized root mean square error, the root mean square error of the true physical quantity, and the mean absolute percentage error are as follows: ; ; ; In the formula, To normalize the root mean square error, The root mean square error of the actual physical quantity. Mean absolute percentage error; This represents the total number of samples in the test set. For the first Normalized remaining lifetime prediction for each test sample; For the first Normalized true remaining lifetime labels for each test sample; To restore the remaining lifetime prediction to the physical scale; To restore the true remaining lifetime label to the physical scale; For the first The true label value of each test sample; For the first Predicted values ​​for each test sample; The total number of samples required to meet the safety threshold condition.

8. A power head life prediction system based on cosine similarity constraints, used to implement the power head life prediction method based on cosine similarity constraints as described in any one of claims 1-7, characterized in that, include: The data acquisition and preprocessing module is used to collect detection data throughout the entire life cycle of the servo tool holder power head and perform preprocessing to obtain raw working condition data. An improved physical information neural network model based on multiple attention mechanism and cosine similarity constraint includes a channel attention mechanism feature extraction module and a perceptron prediction module. The channel attention mechanism feature extraction module is used to mine degradation characteristics from the original working condition data and filter feature channels to obtain high-dimensional target features containing high-confidence degradation information. The perceptron prediction module is used to concatenate the high-dimensional target features with the time features to obtain composite features, and to map the composite features to the remaining lifetime prediction value based on the gating mechanism and gradient dimensionality reduction. The model training module is used to train the improved physical information neural network model based on joint loss with multiple constraints: a joint loss function is constructed to update the parameters of the improved physical information neural network model; wherein, the joint loss function is calculated by combining the cosine similarity based on the high-dimensional target features at adjacent time steps with the data degradation mode based on the critical attention mechanism; The remaining life prediction module is used to predict the remaining life of the servo tool holder power head online based on a trained improved physical information neural network model.

Citation Information

Patent Citations

  • Harmonic reducer life prediction method combining physical information neural network and domain generalization

    CN120524197A

  • Method for predicting residual life of rolling bearing based on degradation perception attention

    CN122112515A