An uncertainty-weighted physical information milling roughness prediction method and system
Patent Information
- Application Number
- CN202611006493.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-07
- Publication Date
- 2026-10-27
AI Technical Summary
[0007]针对现有技术的缺陷,本申请的目的在于提供一种不确定性加权物理信息铣削粗糙度预测方法及系统,旨在解决现有技术因模型构建和训练过程中存在的缺陷,导致预测结果的可信性、准确性以及稳定性不足的问题
本申请通过物理模型约束提高预测过程的可解释性,通过动态损失权重平衡物理模型和数据驱动模型的贡献,通过分位数回归和自适应带宽核密度估计输出置信区间,提高小样本和噪声工况下的预测可信度;在训练过程中采用分阶段参数更新策略,在模型训练前期固定物理模型中的尺度修正系数,使预测网络先学习切削信号、工艺参数与表面粗糙度之间的基本映射;当训练达到预设热身轮数后,再解锁所述参数并采用较小学习率进行更新,使物理模型能够适应实际工况,同时避免物理参数过早偏移造成训练不稳定,进而提高了铣削粗糙度的预测结果的可信性、准确性以及稳定性。
Smart Images

Figure CN122986319A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of mechanical quality prediction technology, and more specifically, relates to an uncertainty-weighted physical information milling roughness prediction method and system. Background Technology
[0002] Surface roughness is a crucial indicator for evaluating the quality of milling processes, directly impacting the friction and wear, fatigue life, assembly accuracy, and service reliability of parts. Traditional roughness inspection primarily relies on offline measurements, which lack real-time capability and cannot meet the online quality control requirements of high-value parts machining processes.
[0003] Existing surface roughness prediction methods mainly include physical model methods and data-driven methods. Physical model methods are interpretable, but they usually rely on idealized assumptions and fixed empirical parameters, making it difficult to adapt to changes in materials, tools, and working conditions. Data-driven methods can build prediction models using cutting forces, vibrations, and process parameters, but they are prone to overfitting under small sample sizes, strong noise, and cross-condition conditions, and it is difficult to account for prediction uncertainties.
[0004] Physical information neural networks can embed physical constraints into the neural network training process, but existing methods usually use fixed physical loss weights, which cannot be dynamically adjusted according to data prediction errors and physical model errors. At the same time, most models only output point prediction values and lack confidence intervals, resulting in insufficient reliability of prediction results.
[0005] Furthermore, sensor signals during milling exhibit significant non-stationarity and multi-source coupling characteristics. Cutting force signals reflect the contact state between the tool and the workpiece, while vibration signals reflect the stability of the machining process. Process parameters such as spindle speed, feed rate, and depth of cut further alter the distribution patterns of cutting force and vibration. If only a simple data fusion method is used, the model struggles to distinguish between high-confidence samples and anomalous noise samples, thus affecting prediction stability.
[0006] Therefore, improving the reliability, accuracy, and stability of milling surface roughness prediction is a technical problem that urgently needs to be solved. Summary of the Invention
[0007] In view of the shortcomings of the prior art, the purpose of this application is to provide an uncertainty-weighted physical information milling roughness prediction method and system, which aims to solve the problems of insufficient reliability, accuracy and stability of prediction results caused by the defects in the model construction and training process of the prior art.
[0008] To achieve the above objectives, in a first aspect, this application provides an uncertainty-weighted physical information milling roughness prediction method, comprising: The cutting signals and process parameters during the milling process of the machine tool are collected, and the cutting signals are preprocessed to obtain a preprocessed sequence; The preprocessing sequence and process parameters are fused to obtain fused features, which are then used to make predictions using a constructed surface roughness prediction network to extract key features related to surface roughness. The surface roughness prediction network is constructed based on a convolutional network, a bidirectional long short-term memory network, an attention mechanism, and a prediction head network. The constructed physical model of surface roughness is embedded as a physical constraint into the training loss function of the surface roughness prediction network. The surface roughness prediction network is trained based on an uncertainty weighting strategy to obtain the trained surface roughness prediction network. Using a trained surface roughness prediction network, multiple quantile prediction values are output through quantile regression. The middle quantile is selected as the predicted value of the surface roughness point, and the confidence interval of the predicted surface roughness value is obtained by combining adaptive bandwidth kernel density estimation. The prediction result of milling roughness prediction is determined based on the predicted values of surface roughness points and the confidence interval.
[0009] Optionally, the surface roughness prediction network includes a convolutional submodule, a bidirectional long short-term memory submodule, an attention submodule, and a prediction head submodule; The convolutional submodule is used to extract local temporal features of multi-axis cutting force signals and multi-axis vibration signals; The bidirectional long short-term memory submodule is used to extract bidirectional temporal dependencies based on the local temporal features; The attention submodule is used to weight the key time step and key channel features in combination with the bidirectional temporal dependency to obtain the weighted key features; The prediction head submodule is used to output surface roughness point prediction values and multiple quantile prediction values based on weighted key features.
[0010] Optionally, the preprocessing of the cutting signal includes: Steady-state cutting segments are extracted based on the amplitude of the cutting signal, and signals from the feed stage, retraction stage, and non-cutting stages are removed. The steady-state cutting segment is low-pass filtered, and the filtered cutting signal is sampled at a fixed length or downsampled. The cutting signals and process parameters are normalized.
[0011] Optionally, training the surface roughness prediction network based on an uncertainty-weighted strategy includes: The physical model of surface roughness is used as a soft constraint embedding training loss function, and the weights of the data loss term and the physical constraint loss term are dynamically adjusted according to the variance of the data-driven prediction residual and the variance of the physical model prediction residual. In the early stage of training, the scale correction coefficient in the physical model is fixed so that the prediction network learns the basic mapping between cutting signals, process parameters and surface roughness. Once the training reaches the preset number of warm-up rounds, the scale correction coefficient is unlocked, and an update step size smaller than the predicted network learning rate is used for updating.
[0012] Optionally, the confidence interval for obtaining the predicted surface roughness value by combining adaptive bandwidth kernel density estimation includes: The global bandwidth is calculated based on the prediction residuals of each sample, and the local probability density of the residuals of each sample is estimated under the global bandwidth. Calculate the geometric mean of the local probability density of all samples, and determine the local adaptive bandwidth of each sample based on the ratio of the local probability density of each sample to the geometric mean. Based on the local adaptive bandwidth of each sample, the probability density function of the prediction error is reconstructed, and the upper and lower bounds of the confidence interval at a given confidence level are determined by the cumulative distribution function, thus obtaining the confidence interval of the surface roughness prediction value.
[0013] Optionally, the predicted surface roughness value output by the surface roughness physical model is determined based on the following process: The first physical model data is determined based on the cutting edge radius or equivalent contact radius of the tool and the ratio of the Brinell hardness of the workpiece material to the flow stress. Based on the cutting edge radius or equivalent contact radius of the tool, the Poisson's ratio and elastic modulus of the tool material and the workpiece material, and combined with the equivalent cutting force or normal contact force in the tool-workpiece contact area, the second physical model data is obtained. The surface roughness prediction value is obtained by subtracting the first physical model data and the second physical model data and multiplying it by the scale correction coefficient. The scale correction coefficient is used to characterize the comprehensive correction of roughness results by actual processing conditions, material state, and measurement scale.
[0014] Optionally, the total training loss function of the surface roughness prediction network is constructed by weighted summation of quantile regression loss term, physical constraint loss term, and network parameter regularization term; The method for constructing the total loss function includes: calculating the quantile regression loss term based on the actual surface roughness value, the predicted surface roughness value, and the sample noise weight; The physical constraint loss term is calculated based on the predicted surface roughness value and input features; The total loss function is obtained by multiplying the quantile regression loss term, the physical constraint loss term, and the network parameter regularization term by their respective weight coefficients and then summing them.
[0015] Optionally, it also includes: When the target milling material, tool material, or tool coating changes, the material parameters, tool parameters, and reference cutting force in the surface roughness physical model are updated to enable migration applications under different milling conditions.
[0016] Secondly, this application also provides an uncertainty-weighted physical information milling roughness prediction system, comprising: The data acquisition unit is used to acquire cutting signals and process parameters during the milling process of the machine tool, and to preprocess the cutting signals to obtain a preprocessed sequence; The network prediction unit is used to fuse the preprocessing sequence and process parameters to obtain fused features and use the constructed surface roughness prediction network to make predictions to extract key features related to surface roughness; the surface roughness prediction network is constructed based on convolutional networks, bidirectional long short-term memory networks, attention mechanisms, and prediction head networks; The physical constraint unit is used to embed the constructed physical model of surface roughness as a physical constraint into the training loss function of the surface roughness prediction network, and train the surface roughness prediction network based on the uncertainty weighting strategy to obtain the trained surface roughness prediction network. The uncertainty quantization unit is used to utilize the trained surface roughness prediction network to output multiple quantile prediction values through quantile regression, select the middle quantile as the surface roughness point prediction value, and combine it with adaptive bandwidth kernel density estimation to obtain the confidence interval of the surface roughness prediction value. The result output unit is used to determine the prediction result of milling roughness prediction based on the predicted value of the surface roughness point and the confidence interval.
[0017] Thirdly, this application provides an electronic device, comprising: at least one memory for storing a program; and at least one processor for executing the program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to execute the method described in the first aspect or any possible implementation thereof.
[0018] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to perform the method described in the first aspect or any possible implementation thereof.
[0019] Fifthly, this application provides a computer program product that, when run on a processor, causes the processor to perform the method described in the first aspect or any possible implementation thereof.
[0020] It is understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant descriptions in the first aspect mentioned above, and will not be repeated here.
[0021] Overall, the technical solutions conceived in this application have the following beneficial effects compared with the prior art: This application improves the interpretability of the prediction process by constraining the physical model, balances the contributions of the physical model and the data-driven model by using dynamic loss weights, and improves the prediction reliability under small sample and noisy conditions by using quantile regression and adaptive bandwidth kernel density estimation to output confidence intervals. During the training process, a phased parameter update strategy is adopted. In the early stage of model training, the scale correction coefficients in the physical model are fixed, allowing the prediction network to learn the basic mapping between cutting signals, process parameters and surface roughness. After the training reaches a preset number of warm-up rounds, the parameters are unlocked and updated with a smaller learning rate, enabling the physical model to adapt to actual working conditions and avoiding premature deviation of physical parameters that would cause training instability. This improves the reliability, accuracy and stability of the milling roughness prediction results. Attached Figure Description
[0022] Figure 1 This is a flowchart illustrating the uncertainty-weighted physical information milling roughness prediction method provided in the embodiments of this application; Figure 2 This is a diagram of the CNN-BiLSTM-Attention surface roughness prediction network structure according to an embodiment of this application; Figure 3 This is a diagram illustrating the formation mechanism of elastoplastic deformation of milled surface roughness according to an embodiment of this application. Figure 4 This is a flowchart of local adaptive noise weighting and uncertainty quantization according to an embodiment of this application; Figure 5 This is a schematic diagram of the structure of the uncertainty-weighted physical information milling roughness prediction system provided in the embodiments of this application; Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0024] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. The symbol " / " in this article indicates that the related objects are in an "or" relationship; for example, A / B means A or B.
[0025] The terms "first" and "second," etc., used in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects. For example, "first response message" and "second response message," etc., are used to distinguish different response messages, not to describe a specific order of response messages.
[0026] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0027] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.
[0028] The embodiments of this application are described below with reference to the accompanying drawings.
[0029] Reference Figure 1 This application provides an uncertainty-weighted physical information milling roughness prediction method, including: S101. Collect cutting signals and process parameters during the milling process of the machine tool, and preprocess the cutting signals to obtain a preprocessed sequence; S102. The preprocessing sequence and process parameters are fused to obtain fused features, and the constructed surface roughness prediction network is used for prediction to extract key features related to surface roughness; the surface roughness prediction network is constructed based on convolutional network, bidirectional long short-term memory network, attention mechanism and prediction head network; S103. The constructed surface roughness physical model is embedded as a physical constraint into the training loss function of the surface roughness prediction network, and the surface roughness prediction network is trained based on the uncertainty weighting strategy to obtain the trained surface roughness prediction network. S104. Using the trained surface roughness prediction network, multiple quantile prediction values are output through quantile regression. The middle quantile is selected as the surface roughness point prediction value, and the confidence interval of the surface roughness prediction value is obtained by combining adaptive bandwidth kernel density estimation. S105. Determine the prediction result of milling roughness prediction based on the predicted values of surface roughness points and the confidence interval.
[0030] Specifically, in this embodiment, step S101 first acquires cutting signals and process parameters during the milling process on the machine tool. The cutting signals include multi-axis cutting force signals and multi-axis vibration signals. The multi-axis cutting force signals include timing signals of cutting forces in at least the X, Y, and Z directions, which can be acquired by a force measuring platform and reflect the mechanical state of the contact area between the tool and the workpiece. The multi-axis vibration signals include timing signals of vibration acceleration in at least three directions, which can be acquired by acceleration sensors installed near the spindle, fixture, or workpiece, and reflect the stability of the machining process. Simultaneously, process parameters during machining are acquired, including spindle speed, feed rate, and depth of cut. Surface roughness measurements can be obtained after machining using a white light interferometer or profilometer and used as a monitoring label.
[0031] Secondly, the cutting signal is preprocessed to obtain a preprocessed sequence. The preprocessing process includes: extracting steady-state cutting segments based on the amplitude of the cutting signal, and removing signals from the feed stage, retraction stage, and non-cutting stages. Specifically, the effective cutting range can be determined first based on the root mean square value of the cutting force signal or vibration energy, and the pre-feed, post-retraction, and empty-cut ranges can be eliminated. Then, the retained steady-state cutting segments are low-pass filtered to reduce high-frequency noise and sampling interference. Subsequently, the filtered cutting signal is sampled at a fixed length or downsampled, and truncated or resampled according to a fixed window length to ensure that the input sequence length is consistent under different machining conditions. Finally, the cutting signal and process parameters are normalized, that is, the dynamic signals and static process parameters of different channels are normalized separately.
[0032] Further, in step S102, the preprocessed sequence and process parameters are fused to obtain fused features, which are then used to predict surface roughness using the constructed surface roughness prediction network to extract key features related to surface roughness. The surface roughness prediction network CNN-BiLSTM-Attention is constructed based on convolutional networks, bidirectional long short-term memory networks, attention mechanisms, and prediction head networks.
[0033] Specifically, the surface roughness prediction network includes a convolutional CNN submodule, a bidirectional long short-term memory (BiLSTM) submodule, an attention submodule, and a prediction head submodule.
[0034] like Figure 2As shown, the CNN module is used to extract local temporal patterns, the BiLSTM module is used to learn the temporal dependencies before and after the cutting process, and the Attention module is used to weight key time steps and key features. The prediction head outputs the predicted values of surface roughness points and multiple quantiles. Process parameters can be mapped to static features through fully connected layers and then concatenated with dynamic cutting signal features to simultaneously reflect the set process conditions and the actual machining state.
[0035] The convolutional submodule includes multiple one-dimensional convolutional layers, batch normalization layers, activation layers, and pooling layers, used to extract local temporal features of multi-axis cutting force signals and multi-axis vibration signals, and to extract local fluctuation patterns from the multi-axis cutting force and vibration sequences. The bidirectional long short-term memory submodule is used to extract bidirectional temporal dependencies based on the local temporal features, learning the time dependence during the cutting process from both forward and reverse directions. The attention submodule is used to weight key time steps and key channel features in conjunction with the bidirectional temporal dependencies, obtaining weighted key features. Weights are assigned according to the contribution of different time steps and different channels to surface roughness prediction, strengthening key time steps and key channel features and weakening redundant signals and short-term abnormal disturbances. Process parameters can be mapped to static features through a fully connected layer and then concatenated with dynamic cutting signal features to obtain fused features, simultaneously reflecting the set process conditions and the actual machining state. The prediction head submodule, based on the fused features, outputs predicted surface roughness points and multiple quantile predicted values based on the weighted key features.
[0036] Furthermore, in step S103, the constructed physical model of surface roughness is embedded as a physical constraint into the training loss function of the surface roughness prediction network. The surface roughness prediction network is trained based on an uncertainty weighting strategy to obtain the trained surface roughness prediction network. The surface roughness of milled surfaces is mainly formed by the elastoplastic deformation of the contact area between the tool and the workpiece.
[0037] Optionally, the predicted surface roughness value output by the surface roughness physical model is determined based on the following process: The first physical model data is determined based on the cutting edge radius or equivalent contact radius of the tool and the ratio of the Brinell hardness of the workpiece material to the flow stress. Based on the cutting edge radius or equivalent contact radius of the tool, the Poisson's ratio and elastic modulus of the tool material and the workpiece material, combined with the equivalent cutting force or normal contact force in the tool-workpiece contact area, the second physical model data is obtained. The surface roughness prediction value is obtained by subtracting the first physical model data and the second physical model data and multiplying it by the scale correction coefficient. The scale correction coefficient is used to characterize the comprehensive correction of roughness results by actual processing conditions, material state, and measurement scale.
[0038] Specifically, refer to Figure 3 The surface roughness of milled surfaces is mainly formed by the elastoplastic deformation of the tool-workpiece contact area, and the physical model expression is as follows:
[0039] in, This represents the predicted surface roughness value after milling. This is a scale correction factor, used to characterize the comprehensive correction of roughness results by actual processing conditions, material state, and measurement scale. The cutting edge radius or equivalent contact radius of the tool; HB The Brinell hardness of the workpiece material; The flow stress of the workpiece material; v 1 and v 2 represents the Poisson's ratio of the tool material and the workpiece material, respectively; E 1 and E 2 represents the elastic modulus of the tool material and the workpiece material, respectively; F This refers to the equivalent cutting force or normal contact force in the contact area between the tool and the workpiece. For the first physical model data mentioned above, This refers to the second physical model data mentioned above.
[0040] Furthermore, the training of the surface roughness prediction network based on the uncertainty weighted strategy includes: embedding the surface roughness physical model as a soft constraint into the training loss function, and dynamically adjusting the weights of the data loss term and the physical constraint loss term according to the data-driven prediction residual variance and the physical model prediction residual variance, so that the training process can adaptively balance between physical priors and sample data.
[0041] Specifically, this is manifested in the following way: the physical model of surface roughness is used as a soft constraint embedded training loss function, and the weights of the data loss term and the physical constraint loss term are dynamically adjusted according to the variance of the data-driven prediction residual and the variance of the physical model prediction residual. In the early stage of training, the scale correction coefficient in the physical model is fixed so that the prediction network learns the basic mapping between cutting signals, process parameters and surface roughness. Once the training reaches the preset number of warm-up rounds, the scale correction coefficient is unlocked, and an update step size smaller than the predicted network learning rate is used for updating.
[0042] Furthermore, the total training loss function of the surface roughness prediction network is constructed by weighted summation of a quantile regression loss term, a physical constraint loss term, and a network parameter regularization term. The method for constructing the total loss function includes: calculating the quantile regression loss term based on the true surface roughness value, the predicted surface roughness value, and the sample noise weights; calculating the physical constraint loss term based on the predicted surface roughness value and the input features; and summing the quantile regression loss term, the physical constraint loss term, and the network parameter regularization term after multiplying them by their respective weight coefficients to obtain the total loss function.
[0043] The training loss function is as follows:
[0044] in, This is the total loss function; This is the loss term for quantile regression; This represents the actual surface roughness value. To predict surface roughness values; For sample noise weights; This is the physical constraint loss term; X For input features; R(W) For network parameter regularization; and These are the weighting coefficients for the physical constraint loss term and the regularization term, respectively.
[0045] Preferably, a high physical constraint weight is maintained in the initial stage of training so that the model output satisfies the basic processing mechanism; as the prediction error of the data-driven model decreases, the data loss weight is gradually increased.
[0046] In the early stages of training, the scale correction coefficients in the physical model are fixed, allowing the prediction network to learn the basic mapping between cutting signals, process parameters, and surface roughness. After a preset number of warm-up rounds, the scale correction coefficients are unlocked, and updates are performed using an update step size smaller than the prediction network's learning rate. This allows the physical model to adapt to actual working conditions while preventing premature shifts in physical parameters that could lead to training instability. An optimizer can be used to optimize the prediction network; the trainable parameters of the physical model are unlocked after the warm-up training phase, and their learning rate can be set to half or lower than the neural network's learning rate; dynamic weights can be updated every few training rounds.
[0047] Reference Figure 4In this embodiment, the data loss term can employ a quantile loss function with sample weights. The local adaptive bandwidth is calculated based on the local probability density of each sample's residual, generating sample noise weights, which are then incorporated into the quantile regression loss term. For samples with smaller local adaptive bandwidths, indicating higher sample density and more stable residuals in their region, their loss weights are increased. Conversely, for samples with larger local adaptive bandwidths, suggesting they may be in noisy or sparse regions, their loss weights are decreased to reduce the impact of outlier and noisy samples on model training. This approach allows the model to prioritize learning from low-noise, high-information-density samples during training, while retaining its adaptability to complex working conditions.
[0048] Further, in step S104, the trained surface roughness prediction network is used to output multiple quantile prediction values through quantile regression. The median quantile is selected as the predicted surface roughness point value, and the confidence interval of the predicted surface roughness value is obtained by combining it with adaptive bandwidth kernel density estimation. The cutting signal to be predicted and the process parameters are input into the trained surface roughness prediction network, and multiple quantile prediction values are output through quantile regression. The prediction network outputs 5%, 25%, 50%, 75%, and 95% quantiles, with the 50% quantile being used as the predicted surface roughness point value. An adaptive bandwidth kernel density estimation function is constructed based on the quantile prediction results and sample residuals, and the upper and lower bounds of the confidence interval are obtained from the cumulative distribution function.
[0049] It should be noted that the adaptive bandwidth kernel density estimation process includes: calculating the global bandwidth based on the sample residuals; estimating the local probability density of each sample residual under the global bandwidth; calculating the geometric mean of the local probability density; determining the local adaptive bandwidth based on the ratio of the local probability density to the geometric mean; and reconstructing the prediction error probability density function based on the local adaptive bandwidth. For samples with low local density or abnormal residuals, their quantile loss weights can be reduced to minimize the impact of outlier samples on model training.
[0050] When the target milling material, tool material, or tool coating changes, the material parameters, tool parameters, and reference cutting force in the surface roughness physical model are updated to enable migration applications under different milling conditions.
[0051] The process of obtaining the confidence interval for the surface roughness prediction value by combining adaptive bandwidth kernel density estimation includes: calculating the global bandwidth based on the prediction residuals of each sample, and estimating the local probability density of the residuals of each sample under the global bandwidth; calculating the geometric mean of the local probability densities of all samples, and determining the local adaptive bandwidth of each sample based on the ratio of the local probability density of each sample to the geometric mean; reconstructing the probability density function of the prediction error based on the local adaptive bandwidth of each sample, and determining the upper and lower bounds of the confidence interval at a given confidence level by the cumulative distribution function, thus obtaining the confidence interval for the surface roughness prediction value. After the model training is completed, multiple quantile prediction values are output using quantile regression, and a prediction probability distribution is constructed by combining adaptive bandwidth kernel density estimation, finally obtaining the surface roughness prediction interval at a given confidence level.
[0052] Finally, in step S105, the prediction result of the milling roughness prediction is determined based on the predicted surface roughness point values and the confidence interval. The final prediction result is composed of the roughness center estimate given by the predicted surface roughness point values (i.e., the 50th quantile) and the prediction uncertainty range given by the confidence interval.
[0053] Compared to traditional methods that only output point prediction values, this application can simultaneously provide the predicted center value and the prediction confidence range. Model performance can be evaluated using the coefficient of determination, root mean square error, prediction interval coverage, and average prediction interval width. The coefficient of determination is used to evaluate the ability to fit the point prediction trend; the root mean square error is used to evaluate the magnitude of the prediction error; the prediction interval coverage is used to evaluate the proportion of the actual surface roughness falling within the prediction interval; and the average prediction interval width is used to evaluate the compactness of the prediction interval. Ideally, the method should maintain a high prediction interval coverage while minimizing the average prediction interval width.
[0054] In one embodiment, this embodiment can be used for predicting the surface roughness of milled materials such as silicon-aluminum alloys, titanium alloys, and high-strength steel. The inputs include triaxial cutting force, triaxial vibration acceleration, spindle speed, feed rate, and depth of cut. The outputs include predicted surface roughness points and confidence intervals at a given confidence level.
[0055] In another embodiment, the physical model parameters can be adjusted according to different workpiece materials and tool conditions. For example, when the workpiece material hardness, flow stress, elastic modulus, Poisson's ratio, or tool cutting edge radius changes, the corresponding material parameters and tool parameters can be updated; when the tool coating changes the contact friction or thermal properties, the scale correction coefficient and contact force related terms can be recalibrated to maintain the consistency between the physical model and the actual machining conditions.
[0056] It should be noted that this embodiment is not only applicable to milling, but can also be extended to turning, drilling, grinding and other machining methods by replacing the basic physical model. In different machining methods, the basic roughness term and cutting force correction term can be adjusted according to the corresponding machining mechanism, while retaining the dynamic weight training and uncertainty quantization structure.
[0057] Reference Figure 5 This application also provides an uncertainty-weighted physical information milling roughness prediction system, comprising: The data acquisition unit 510 is used to acquire cutting signals and process parameters during the milling process of the machine tool, and to preprocess the cutting signals to obtain a preprocessed sequence; The network prediction unit 520 is used to fuse the preprocessing sequence and process parameters to obtain fused features and use the constructed surface roughness prediction network to make predictions to extract key features related to surface roughness; the surface roughness prediction network is constructed based on convolutional networks, bidirectional long short-term memory networks, attention mechanisms, and prediction head networks; The physical constraint unit 530 is used to embed the constructed surface roughness physical model as a physical constraint into the training loss function of the surface roughness prediction network, and train the surface roughness prediction network based on the uncertainty weighting strategy to obtain the trained surface roughness prediction network. Uncertainty quantization unit 540 is used to utilize the trained surface roughness prediction network to output multiple quantile prediction values through quantile regression, select the middle quantile as the surface roughness point prediction value, and combine it with adaptive bandwidth kernel density estimation to obtain the confidence interval of the surface roughness prediction value. The result output unit 550 is used to determine the prediction result of the milling roughness prediction based on the predicted value of the surface roughness point and the confidence interval.
[0058] Reference Figure 6 Based on the methods in the above embodiments, this application provides an electronic device that may include: a processor 610, a communications interface 620, a memory 630, and a communication bus 640. The processor 610, communications interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions in the memory 630 to execute the methods in the above embodiments.
[0059] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application.
[0060] Based on the methods in the above embodiments, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, causes the processor to execute the methods in the above embodiments.
[0061] Based on the methods in the above embodiments, this application provides a computer program product that, when run on a processor, causes the processor to execute the methods in the above embodiments.
[0062] It is understood that the processor in the embodiments of this application can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor can be a microprocessor or any conventional processor.
[0063] The method steps in this application embodiment can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can reside in an ASIC.
[0064] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted through the computer-readable storage medium. The computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state disk (SSD)).
[0065] It is understood that the various numerical designations used in the embodiments of this application are merely for the convenience of description and are not intended to limit the scope of the embodiments of this application.
[0066] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A method for predicting milling roughness using uncertainty-weighted physical information, characterized in that, include: The cutting signals and process parameters during the milling process of the machine tool are collected, and the cutting signals are preprocessed to obtain a preprocessed sequence; The preprocessing sequence and process parameters are fused to obtain fused features, which are then used to make predictions using a constructed surface roughness prediction network to extract key features related to surface roughness. The surface roughness prediction network is constructed based on a convolutional network, a bidirectional long short-term memory network, an attention mechanism, and a prediction head network. The constructed physical model of surface roughness is embedded as a physical constraint into the training loss function of the surface roughness prediction network. The surface roughness prediction network is trained based on an uncertainty weighting strategy to obtain the trained surface roughness prediction network. Using a trained surface roughness prediction network, multiple quantile prediction values are output through quantile regression. The middle quantile is selected as the predicted value of the surface roughness point, and the confidence interval of the predicted surface roughness value is obtained by combining adaptive bandwidth kernel density estimation. The prediction result of milling roughness prediction is determined based on the predicted values of surface roughness points and the confidence interval.
2. The uncertainty-weighted physical information milling roughness prediction method according to claim 1, characterized in that, The surface roughness prediction network includes a convolutional submodule, a bidirectional long short-term memory submodule, an attention submodule, and a prediction head module; The convolutional submodule is used to extract local temporal features of multi-axis cutting force signals and multi-axis vibration signals; The bidirectional long short-term memory submodule is used to extract bidirectional temporal dependencies based on the local temporal features; The attention submodule is used to weight the key time step and key channel features in combination with the bidirectional temporal dependency to obtain the weighted key features; The prediction head submodule is used to output surface roughness point prediction values and multiple quantile prediction values based on weighted key features.
3. The uncertainty-weighted physical information milling roughness prediction method according to claim 1, characterized in that, The preprocessing of the cutting signal includes: Steady-state cutting segments are extracted based on the amplitude of the cutting signal, and signals from the feed stage, retraction stage, and non-cutting stages are removed. The steady-state cutting segment is low-pass filtered, and the filtered cutting signal is sampled at a fixed length or downsampled. The cutting signals and process parameters are normalized.
4. The uncertainty-weighted physical information milling roughness prediction method according to claim 1, characterized in that, The training of the surface roughness prediction network based on the uncertainty weighted strategy includes: The physical model of surface roughness is used as a soft constraint embedding training loss function, and the weights of the data loss term and the physical constraint loss term are dynamically adjusted according to the variance of the data-driven prediction residual and the variance of the physical model prediction residual. In the early stage of training, the scale correction coefficient in the physical model is fixed so that the prediction network learns the basic mapping between cutting signals, process parameters and surface roughness. Once the training reaches the preset number of warm-up rounds, the scale correction coefficient is unlocked, and an update step size smaller than the predicted network learning rate is used for updating.
5. The uncertainty-weighted physical information milling roughness prediction method according to claim 1, characterized in that, The confidence interval for the surface roughness prediction obtained by combining adaptive bandwidth kernel density estimation includes: The global bandwidth is calculated based on the prediction residuals of each sample, and the local probability density of the residuals of each sample is estimated under the global bandwidth. Calculate the geometric mean of the local probability density of all samples, and determine the local adaptive bandwidth of each sample based on the ratio of the local probability density of each sample to the geometric mean. Based on the local adaptive bandwidth of each sample, the probability density function of the prediction error is reconstructed, and the upper and lower bounds of the confidence interval at a given confidence level are determined by the cumulative distribution function, thus obtaining the confidence interval of the surface roughness prediction value.
6. The uncertainty-weighted physical information milling roughness prediction method according to claim 1, characterized in that, The predicted surface roughness value output by the physical model of surface roughness is determined based on the following process: The first physical model data is determined based on the cutting edge radius or equivalent contact radius of the tool and the ratio of the Brinell hardness of the workpiece material to the flow stress. Based on the cutting edge radius or equivalent contact radius of the tool, the Poisson's ratio and elastic modulus of the tool material and the workpiece material, and combined with the equivalent cutting force or normal contact force in the tool-workpiece contact area, the second physical model data is obtained. The surface roughness prediction value is obtained by subtracting the first physical model data and the second physical model data and multiplying it by the scale correction coefficient. The scale correction coefficient is used to characterize the comprehensive correction of roughness results by actual processing conditions, material state, and measurement scale.
7. The uncertainty-weighted physical information milling roughness prediction method according to claim 1, characterized in that, The total training loss function of the surface roughness prediction network is based on a weighted sum of quantile regression loss, physical constraint loss, and network parameter regularization. The method for constructing the total loss function includes: The quantile regression loss term is calculated based on the actual surface roughness value, the predicted surface roughness value, and the sample noise weights. The physical constraint loss term is calculated based on the predicted surface roughness value and input features; The total loss function is obtained by multiplying the quantile regression loss term, the physical constraint loss term, and the network parameter regularization term by their respective weight coefficients and then summing them.
8. The uncertainty-weighted physical information milling roughness prediction method according to claim 1, characterized in that, Also includes: When the target milling material, tool material, or tool coating changes, the material parameters, tool parameters, and reference cutting force in the surface roughness physical model are updated to enable migration applications under different milling conditions.
9. An uncertainty-weighted physical information milling roughness prediction system, characterized in that, include: The data acquisition unit is used to acquire cutting signals and process parameters during the milling process of the machine tool, and to preprocess the cutting signals to obtain a preprocessed sequence; The network prediction unit is used to fuse the preprocessing sequence and process parameters to obtain fused features and use the constructed surface roughness prediction network to make predictions to extract key features related to surface roughness; the surface roughness prediction network is constructed based on convolutional networks, bidirectional long short-term memory networks, attention mechanisms, and prediction head networks; The physical constraint unit is used to embed the constructed physical model of surface roughness as a physical constraint into the training loss function of the surface roughness prediction network, and train the surface roughness prediction network based on the uncertainty weighting strategy to obtain the trained surface roughness prediction network. The uncertainty quantization unit is used to utilize the trained surface roughness prediction network to output multiple quantile prediction values through quantile regression, select the middle quantile as the surface roughness point prediction value, and combine it with adaptive bandwidth kernel density estimation to obtain the confidence interval of the surface roughness prediction value. The result output unit is used to determine the prediction result of milling roughness prediction based on the predicted value of the surface roughness point and the confidence interval.
10. An electronic device, characterized in that, include: At least one memory for storing computer programs; At least one processor is configured to execute a program stored in the memory, wherein when the program stored in the memory is executed, the processor is configured to perform the method as described in any one of claims 1-8.