Workpiece surface roughness prediction method and system based on physical information neural network
By extracting and fusing features using parallel Fourier neural operators and short-sequence Transformer branches, and combining them with a neural network trained with physical constraints, the problems of insufficient high-frequency feature capture and long-term modeling in traditional physical information neural networks for workpiece surface roughness prediction are solved, thus achieving efficient and reliable surface roughness prediction.
Patent Information
- Application Number
- CN202511718470.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-13
AI Technical Summary
Traditional physical information neural networks suffer from problems such as insufficient high-frequency feature capture, weak long-term modeling ability, and low computational efficiency in predicting workpiece surface roughness, resulting in insufficient uncertainty in prediction results and making it difficult to achieve real-time monitoring and effective control.
Spatial frequency domain features and dynamic temporal features are extracted collaboratively by parallel Fourier neural operator branches and short sequence Transformer branches, and fused through a gating mechanism. Combined with a neural network model trained with physical constraints, the prediction results with confidence intervals are output.
It significantly improves the accuracy and generalization ability of the prediction model, enhances the adherence to the laws of cutting dynamics, realizes the effective quantification of prediction uncertainty, and improves the reliability and credibility of the prediction results.
Smart Images

Figure CN121524949A_ABST
Abstract
Description
Technical Field
[0001] This application generally relates to the field of workpiece surface roughness technology, and specifically to a workpiece surface roughness prediction method and system based on a physical information neural network. Background Technology
[0002] In the field of high-end equipment manufacturing, CNC machine tools are key equipment in the manufacturing industry. Their machining accuracy and stability determine the performance of components such as mechanical gears and aero-engine blades. Surface roughness measurement is one of the core standards for measuring the machining quality of components, affecting their fatigue, wear, and assembly accuracy. Vibration physical fields, as the most prominent dynamic physical phenomenon in machine tools, contain a large amount of key machining information in their output signals, serving as a crucial evaluation carrier for the interaction between the tool and the workpiece.
[0003] Traditional surface roughness measurement methods rely on measuring instruments, resulting in low computational efficiency and difficulty in real-time monitoring of part status and machining control. In recent years, using vibration signals for online surface roughness measurement—a soft measurement method—has emerged as a novel approach in equipment manufacturing. Combining vibration data with physical information neural networks (PINNs) for surface roughness prediction in industrial machining scenarios has become a popular soft measurement method. However, the PINN framework has significant limitations. Small perturbations in boundary conditions and insufficient high-frequency feature capture can lead to divergent solutions, resulting in computational efficiency bottlenecks. It also struggles to overcome gradient conflicts and weaknesses in long-term modeling, and uncertainty quantification does indeed lead to insufficient reliability. Summary of the Invention
[0004] In view of the above-mentioned defects or deficiencies in the prior art, it is desirable to provide a workpiece surface roughness prediction method and system based on physical information neural network that can solve the above-mentioned technical problems.
[0005] In a first aspect, this application provides a method for predicting the surface roughness of a workpiece based on a physical information neural network, comprising the following steps: The raw data of the workpiece is collected to generate an input feature sequence; wherein the raw data includes cutting parameters, multi-axis vibration signals and surface roughness measurements. The original data is preprocessed to obtain a preprocessed feature sequence; Spatial frequency domain features and dynamic temporal features are extracted from the preprocessed feature sequence by using parallel Fourier neural operator branches and short sequence Transformer branches, respectively. The spatial frequency domain features and dynamic temporal features are dynamically fused through a gating mechanism to generate fused features; The fused features are input into the predictive neural network model for processing, and the predicted surface roughness value and its confidence interval are output; the predictive neural network model is obtained by training with physical constraints.
[0006] According to the technical solution provided in this application, the surface roughness measurement value includes at least: the maximum profile peak height measurement value; The original data is preprocessed to obtain a preprocessed feature sequence, including the following steps: Robust statistical methods are used to perform advanced cleaning on the raw data to handle outliers. The preprocessed feature sequence is obtained by performing a logarithmic transformation on the measured maximum profile peak height.
[0007] According to the technical solution provided in this application, the predictive neural network model is trained under physical constraints, including the following steps: A loss function is constructed, which includes at least a data loss term and a physical constraint loss term; wherein, the data loss term is used to measure the error between the predicted surface roughness value and the measured surface roughness value; the physical constraint loss term is constructed based on the principle of cutting dynamics and is used to constrain the gradient relationship between the predicted surface roughness value and the cutting depth parameter. The predictive neural network model is trained by minimizing the loss function.
[0008] According to the technical solution provided in this application, the predicted surface roughness value includes at least: the predicted maximum profile peak height; The loss function also includes an RP-specific loss term; the RP-specific loss term is used to assign adaptive weight coefficients to the predicted value of the maximum profile peak height.
[0009] According to the technical solution provided in this application, the fused features are input into a predictive neural network model for processing, and the predicted surface roughness value and its confidence interval are output, including the following steps: Multiple forward propagation calculations are performed on the fused features to obtain multiple prediction samples; wherein, each calculation generates a corresponding prediction sample based on randomly selected weight coefficients; the weight coefficients are obtained by sampling through a reparameterized probability distribution; The mean of multiple predicted samples is calculated to obtain the predicted surface roughness value; Calculate the standard deviation of the multiple predicted samples, and generate the confidence interval based on the standard deviation.
[0010] According to the technical solution provided in this application, after calculating the mean of multiple predicted samples to obtain the predicted surface roughness value, the following steps are also included: An inverse exponential transform operation is performed on the maximum profile peak height prediction value in each of the predicted samples to generate the final maximum profile peak height prediction value restored to the original physical scale.
[0011] According to the technical solution provided in this application, dynamic temporal features are extracted from the preprocessed feature sequence using the short sequence Transformer branch, including the following steps: Detect the real-time length of the preprocessed feature sequence; Determine whether the real-time length is less than a preset threshold; If so, a pooling operation is performed on the preprocessed feature sequence to obtain a global feature vector; and a copy operation is performed on the global feature vector to generate the dynamic temporal feature; wherein the dynamic temporal feature is of the same length as the preprocessed feature sequence.
[0012] If not, the preprocessed features are calculated using a standard self-attention mechanism to generate the dynamic temporal features.
[0013] According to the technical solution provided in this application, the extraction of dynamic temporal features from the preprocessed feature sequence using the Fourier neural operator branch includes the following steps: Perform a Fourier transform on the preprocessed feature sequence to obtain the corresponding frequency domain signal; Perform a linear transformation operation on the frequency domain signal to obtain a frequency domain tensor; Perform an inverse Fourier transform on the frequency domain tensor to generate the spatial frequency domain features.
[0014] According to the technical solution provided in this application, the gating mechanism is a physical sensing gating mechanism, which dynamically allocates the fusion weights of the spatial frequency domain features and dynamic temporal features based on the physical field type of the multi-axis vibration signal.
[0015] Secondly, this application provides a method for predicting workpiece surface roughness based on a physical information neural network, including: The data acquisition module is used to acquire the raw data of the workpiece and generate an input feature sequence; wherein, the raw data includes cutting parameters, multi-axis vibration signals and surface roughness measurements. The preprocessing module is used to preprocess the original data to obtain a preprocessed feature sequence; The physical perception fusion module is used to extract spatial frequency domain features and dynamic temporal features from the preprocessed feature sequence by using parallel Fourier neural operator branches and short sequence Transformer branches respectively; and dynamically fuses the spatial frequency domain features and dynamic temporal features through a gating mechanism to generate fused features. A predictive neural network model is used to receive and process the fused features and output the predicted surface roughness value and its confidence interval; the predictive neural network model is trained with physical constraints.
[0016] The beneficial effects of this application are as follows: This application provides a workpiece surface roughness prediction method based on a physical information neural network. By using parallel Fourier neural operator branches and short-sequence Transformer branches, spatial frequency domain features and dynamic temporal features from the original data are extracted collaboratively, and a gating mechanism is used for dynamic fusion. This effectively overcomes the inherent defects of traditional physical information neural networks, such as insufficient capture of high-frequency features and weak long-term modeling capabilities, significantly improving the accuracy and generalization ability of the prediction model. The short-sequence Transformer branch, through an adaptive mechanism, efficiently improves training efficiency while retaining key temporal information. Furthermore, the neural network trained based on physical constraints outputs prediction results with confidence intervals. This not only enhances the adherence to the inherent laws of cutting dynamics but also effectively quantifies prediction uncertainty, thereby significantly improving the reliability and credibility of the prediction results. Attached Figure Description
[0017] Other features, objects, and advantages of this application will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a flowchart of a workpiece surface roughness prediction method based on a physical information neural network provided in Embodiment 1 of this application; Figure 2 This is a schematic diagram of a workpiece surface roughness prediction system based on a physical information neural network provided in Embodiment 2 of this application; Figure 3 This is a graph showing the predicted results of the arithmetic mean roughness. Figure 4 This is the predicted result of the maximum profile peak height without processing for the RP specific loss term. Figure 5 This is the prediction result of the maximum profile peak height after processing for the RP specific loss term.
[0018] In the diagram: 1. Acquisition module; 2. Preprocessing module; 3. Physical perception fusion module; 4. Predictive neural network model; 41. Physical constraint module; 42. Rp-specific processing module; 43. Training strategy module; 44. Uncertainty quantification module; 45. Output module. Detailed Implementation
[0019] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.
[0020] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0021] Example 1 Please refer to Figure 1 This application provides a method for predicting workpiece surface roughness based on a physical information neural network, comprising the following steps: S100: Acquires raw data of the workpiece and generates an input feature sequence; the raw data includes cutting parameters, multi-axis vibration signals, and surface roughness measurements. Specifically, all raw data were collected online in real time during the processing. The raw data includes: cutting parameters, multi-axis vibration signals, and surface roughness measurements; Among them, the cutting parameters, as the core physical quantities that directly control the machining process, are preset before machining and read in real time by the internal control unit of the CNC system. Specifically, they include cutting position, feed rate, spindle speed, process radius, and axial cutting depth. Multi-axis vibration signals are a direct manifestation of the dynamic physical field of the interaction between the tool and the workpiece. They are acquired by a three-axis accelerometer installed on a key part of the machine tool spindle or turret. The original vibration acceleration time-domain signals in the three orthogonal directions of X, Y, and Z are captured simultaneously at a high sampling rate. Furthermore, key statistical features are extracted through real-time signal processing, including the acceleration RMS value that characterizes the average vibration energy level in the three directions, as well as the acceleration peak value that captures transient impacts and extreme vibration times. Surface roughness measurements include: maximum profile peak height measurement. Contour valley depth measurement value Arithmetic mean roughness measurement value and root mean square roughness measurement value These measurements provide important quality supervision signals for the training of predictive neural network models; Finally, the cutting parameters, multi-axis vibration signals, and surface roughness measurements taken at the same processing time are time-aligned and stitched together to form a comprehensive multi-dimensional input feature vector. Multiple input feature vectors arranged in chronological order form an input feature sequence. The input feature sequence fully contains the physical conditions and dynamic response of the processing, laying a reliable data foundation for subsequent preprocessing and neural network prediction.
[0022] S200: Preprocess the original data to obtain the preprocessed feature sequence; Further, step S200 includes the following steps: S201: Use robust statistical methods to perform advanced cleaning of the raw data to handle outliers in the raw data; S202: Perform a logarithmic transformation on the measured maximum profile peak height to obtain a preprocessed feature sequence.
[0023] Specifically, a robust statistical method based on the median and absolute median difference is used to perform advanced cleaning on the maximum profile peak height measurement values in the original data to handle outliers. First, the median of the maximum profile peak height measurement values is calculated as the center estimate of the data distribution, and the absolute median difference is calculated as a robust measure of the degree of dispersion. Then, the lower limit threshold and upper limit threshold are calculated according to Formula 1 and Formula 2 respectively to determine the boundary of the dynamic threshold. Extreme vibration characteristic values that exceed the boundary range are subjected to amplitude limiting processing, thereby effectively eliminating the interference of outliers. Formula 1; Formula 2; in, The lower threshold is... The upper limit threshold, The median. This is the absolute median difference; Subsequently, to address the training instability caused by the long-tailed distribution of the maximum contour peak height measurement, a logarithmic transformation operation was performed on the cleaned maximum contour peak height measurement. The maximum contour peak height measurement was then nonlinearly compressed according to Formula 3, ultimately yielding a preprocessed feature sequence with a regular distribution and stable values, laying a reliable data foundation for the subsequent training of the neural network. Formula 3; in, This is the final maximum profile peak height measurement value obtained after transformation; This is the measured value of the maximum profile peak height.
[0024] S300: Using parallel Fourier neural operator branches and short sequence Transformer branches, spatial frequency domain features and dynamic temporal features are extracted from the preprocessed feature sequences, respectively. Specifically, this application extracts complementary physical features from preprocessed feature sequences through parallel Fourier neural operator branches and short-sequence Transformer branches. This design constitutes a collaborative feature extraction framework: the Fourier neural operator branch specializes in global modeling in the frequency domain to capture spatial frequency domain features related to surface formation mechanisms; simultaneously, the short-sequence Transformer branch focuses on modeling dynamic dependencies in the time domain to analyze dynamic temporal features in the signal. Both branches provide in-depth analysis of vibration signals from two orthogonal physical perspectives in the frequency and time domains, laying a comprehensive and reliable information foundation for subsequent feature fusion.
[0025] Furthermore, dynamic temporal features are extracted from the preprocessed feature sequence using a short sequence Transformer branch, including the following steps: S301: Detect the real-time length of the preprocessed feature sequence; S302: Determine whether the real-time length is less than the preset threshold; S303: If so, then perform pooling operation on the preprocessed feature sequence to obtain the global feature vector; and perform copy operation on the global feature vector to generate dynamic temporal features; wherein the dynamic temporal features are of the same length as the preprocessed feature sequence.
[0026] S304: If not, the preprocessed features are calculated using the standard self-attention mechanism to generate dynamic temporal features.
[0027] Specifically, the short sequence Transformer branch first detects the real-time length of the input preprocessed feature sequence and compares it with a preset threshold to intelligently select the optimal feature extraction strategy. When the real-time length is less than the preset threshold, it indicates that the sequence is short and has limited temporal dependence. In this case, the preprocessed feature sequence is first subjected to global pooling operation using Equation 4 to compress it into a global feature vector that represents global statistical properties. Formula 4; in, Here, T represents the global feature vector, and T is the real-time length of the preprocessed feature sequence. This is the feature vector at step t in the preprocessed feature sequence.
[0028] The global feature vector is then expanded into a feature sequence of the same length as the original sequence through a copy operation, thereby generating dynamic temporal features that maintain consistent dimensionality. This processing method effectively improves training efficiency while preserving key information. Conversely, when the sequence length is greater than or equal to a preset threshold, a standard self-attention mechanism is activated. By calculating the complex dependencies between features at each time step within the sequence, it adaptively captures multi-scale temporal patterns ranging from local fluctuations to long-term trends, thereby generating more expressive dynamic temporal features. This adaptive design ensures that the model can stably and efficiently extract representative temporal dynamic features under different operating conditions and sampling durations, providing a solid foundation for subsequent deep integration with spatial frequency domain features.
[0029] Furthermore, dynamic temporal features are extracted from the preprocessed feature sequence using Fourier neural operator branches, including the following steps: S305: Perform a Fourier transform on the preprocessed feature sequence to obtain the corresponding frequency domain signal; S306: Perform a linear transformation operation on the frequency domain signal to obtain a frequency domain tensor; S307: Perform an inverse Fourier transform on the frequency domain tensor to generate spatial frequency domain features.
[0030] Specifically, by utilizing Fourier neural operator branches to extract spatial frequency domain features from preprocessed features, a complete signal processing process from the time domain to the frequency domain and back to the time domain is realized.
[0031] First, a Fourier transform is performed on the input preprocessed feature sequence to convert the signal from the time domain to the frequency domain, resulting in a frequency domain signal containing rich frequency components. This transformation effectively decouples multi-scale features from the signal. Then, a learnable linear transformation operation is performed on the frequency domain signal within the frequency space. Different frequency components are selectively enhanced or suppressed using a frequency domain weight matrix, highlighting key frequency bands closely related to the surface roughness formation mechanism while filtering out noise interference, thus obtaining an optimized frequency domain tensor. Finally, an inverse Fourier transform is performed on this frequency domain tensor, remapping the frequency-processed signal back to the original spatiotemporal domain, generating spatial frequency domain features containing deep frequency domain information. This series of transformation-filtering-reconstruction operations enables the Fourier neural operator branch to effectively capture global frequency domain patterns related to processing dynamics in the vibration signal, providing supplementary physical information that is difficult to obtain in traditional time-domain analysis for subsequent feature fusion.
[0032] S400: Dynamically fuses spatial frequency domain features and dynamic temporal features through a gating mechanism to generate fused features; Furthermore, the gating mechanism is a physical sensing gating mechanism, which dynamically allocates the fusion weights of spatial frequency domain features and dynamic temporal features based on the physical field type of the multi-axis vibration signal.
[0033] Specifically, the gating mechanism employs physical perception gating to fuse spatial frequency domain features and dynamic temporal features. First, it identifies the physical field characteristics inherent in the multi-axis vibration signal, including but not limited to the natural frequency distribution of the cutting system, forced vibration characteristics, and random vibration modes. For the machining state reflected by different physical field types, physical perception gating automatically calculates the contribution of spatial frequency domain features and dynamic temporal features through a learnable weight matrix: when high-frequency components dominate the signal and exhibit obvious periodicity, physical perception gating assigns higher weights to the spatial frequency domain features extracted by the Fourier neural operator branch; while when the signal exhibits complex non-stationary characteristics and strong temporal dependence, it increases the fusion ratio of dynamic temporal features extracted by the short-sequence Transformer branch.
[0034] This adaptive weight allocation mechanism based on physical field characteristics ensures that the model can intelligently balance the contributions of global information in the frequency domain and local features in the time domain according to the dynamic physical phenomena in the actual processing, thereby generating fused features that can reflect both the inherent characteristics of the system and capture instantaneous dynamics, significantly improving the accuracy and adaptability of surface roughness prediction.
[0035] S500: The fused features are input into the predictive neural network model for processing, and the predicted surface roughness value and its confidence interval are output; the predictive neural network model is obtained by training with physical constraints.
[0036] Furthermore, the predictive neural network model is trained under physical constraints, including the following steps: Construct a loss function, which includes at least a data loss term and a physical constraint loss term. The data loss term measures the error between the predicted surface roughness value and the measured surface roughness value. The physical constraint loss term is constructed based on the principles of cutting dynamics and is used to constrain the gradient relationship between the predicted surface roughness value and the cutting depth parameter. The predictive neural network model is trained by minimizing the loss function.
[0037] Specifically, the predictive neural network model is obtained through training with constraints incorporating prior physical knowledge. Its core lies in constructing a dual-supervised loss function that integrates data-driven approaches and physical laws. The loss function L mainly consists of a data loss term. and physical constraint loss term Its composition, and its overall form can be represented as , where λ is the hyperparameter balancing the weights of the two terms.
[0038] The data loss function is used to measure the error between the predicted and measured surface roughness values. It typically uses mean squared error or mean absolute error to ensure that the model predictions have a basic fit to the experimental data.
[0039] Specifically, in this embodiment, the predicted surface roughness value includes: the predicted maximum profile peak height value. Contour valley depth prediction value Predicted arithmetic mean roughness value and root mean square roughness prediction value ; The physical constraint loss term is constructed based on the principles of cutting dynamics, embedding physical consistency as a strong constraint into the optimization process. First, based on the physical knowledge that "surface roughness deteriorates with increasing cutting depth," this constraint establishes a relationship between the predicted surface roughness and the cutting depth. The gradient relationship is used to ensure that the model's prediction trend conforms to physical laws by constraining the gradient to be non-negative. The arithmetic mean roughness prediction value is used as the basis for this calculation. For example, this constraint is achieved through Formula 5. This physical constraint loss term penalizes negative gradients that violate physical trends, driving the model to learn input-output mappings that conform to real-world laws during training.
[0040] Formula 5; Then, considering the dynamic relationship between the spindle speed n and the rate of change of the depth of cut, the following constraints are introduced: ,in This constraint, which is a constant related to the tool and workpiece materials, introduces temporal dynamics into the training process, enhancing the model's consistent description of the machining dynamics.
[0041] Specifically, a comprehensive training strategy integrating multi-objective optimization and stability control was employed during the training of the predictive neural network model by minimizing the loss function. In practice, the AdamW optimizer was used to perform parameter updates. This optimizer effectively improved the stability and generalization ability of parameter updates by decoupling the weight decay mechanism. The learning rate was dynamically adjusted using a cosine annealing restart strategy; for example, the initial learning rate was set to 0.0004, and the minimum learning rate was set to 2 × 10⁻⁶. -6 This mechanism allows the learning rate to decay and restart periodically according to a cosine curve during training. This helps the model escape local optima, promotes model convergence, and enhances its generalization performance.
[0042] To address the uneven distribution of vibration data, a stratified sampling mechanism based on the predicted maximum profile peak height was introduced during the training process. This mechanism stratifies the data according to its quartiles to ensure that the training set and the test set maintain consistency in the distribution of key features.
[0043] To further ensure training stability, dynamic gradient pruning technique was adopted. This technique prevents gradient explosion by constraining the gradient norm in real time. At the same time, gradient accumulation technique was combined to accumulate gradients over multiple training steps before parameter updates, which effectively balanced the differences between batches and significantly improved the convergence and robustness of the training process.
[0044] Furthermore, the loss function also includes an RP-specific loss term; the RP-specific loss term is used to assign adaptive weighting coefficients to the predicted value of the maximum profile peak height.
[0045] Specifically, for the key surface roughness evaluation index, maximum profile peak height, the loss function, in addition to the data loss term and the physical constraint loss term, further introduces an RP-specific loss term to focus on optimizing the characterization ability of this index. This RP-specific loss term is implemented through the following mechanism: First, a robust evaluation function based on Huber loss is adopted as the basic computational unit, and its mathematical expression is as follows: ; in, This represents the measured value of the maximum profile peak height. This represents the predicted maximum profile peak height output by the predictive neural network model. This function can effectively reduce the interference of abnormal prediction samples on the overall training process.
[0046] Furthermore, to address the issue of uneven distribution and long-tailed distribution of Rp values in actual data, this application innovatively designs a physics-guided dynamic importance allocation mechanism: the characteristics of the input vibration signal are analyzed in real time by a physics field type detector, and the weighting coefficient of the Rp loss is dynamically adjusted based on physical characteristics such as vibration intensity and signal stability. When the system identifies a severe vibration signal, the weighting coefficient of the Rp loss is automatically increased to enhance the model's ability to represent features under extreme conditions; when the signal is stable, the weighting is appropriately reduced to maintain a balance in overall prediction accuracy. Finally, the RP-specific loss term can be expressed as: ; in, It is represented as an adaptive weighting coefficient dynamically calculated based on the physical field characteristics.
[0047] This mechanism ensures that while the model performs specific optimization on the key indicator of maximum profile peak height prediction, it can still maintain a balance among various prediction objectives, significantly improving the accuracy of the maximum profile peak height prediction, and ensuring that the prediction results conform to the physical laws of processing.
[0048] Further, step S500 includes the following steps: S501: Perform multiple forward propagation calculations on the fused features to obtain multiple prediction samples; each calculation generates a corresponding prediction sample based on randomly selected weight coefficients; the weight coefficients are obtained by sampling through a reparameterized probability distribution; S503: Calculate the mean of multiple prediction samples to obtain the predicted surface roughness value; S504: Calculate the standard deviation of multiple predicted samples and generate confidence intervals based on the standard deviation.
[0049] Specifically, to quantify the uncertainty of surface roughness prediction, this method employs a Bayesian neural network architecture based on variational inference; the specific implementation process is as follows: First, during the model's forward propagation, multiple prediction samples are generated by randomly sampling the weight coefficients. The weight coefficients are obtained through sampling from a reparameterized probability distribution, where each weight coefficient is defined as: ; in, The mean parameter of the weights, The standard deviation parameter of the weights; Its non-negativity is guaranteed by using the softplus function: ,in This represents the auxiliary variables used by the neural network for indirect learning; this parameterization ensures the positive definiteness of the standard deviation while maintaining the computability of the gradient.
[0050] Based on this parameterized weight, multiple forward propagation calculations are performed on the fused features (e.g., 50 Monte Carlo samplings). Each calculation is based on weight coefficients from random sampling to obtain the corresponding set of predicted samples. .
[0051] Subsequently, the statistics of multiple predicted samples are calculated: the surface roughness prediction value is obtained by taking the sample mean value through Formula 6; Formula Six; Simultaneously, the standard deviation of the predicted sample is calculated using Formula 7; Formula 7; Finally, confidence intervals are constructed based on this standard deviation. Taking the 95% confidence interval as an example, its calculation method is as follows: ; like Figure 3 As shown in the figure, the arithmetic mean roughness prediction results generated based on the above method are all within the confidence interval. The confidence interval quantifies the uncertainty range of the prediction results, provides a reliable decision basis for process optimization and quality control, and significantly improves the practical value and credibility of the prediction system.
[0052] Furthermore, before calculating the mean of multiple predicted samples to obtain the predicted surface roughness value, the following steps are also included: S502: Perform an inverse exponential transform operation on the predicted maximum profile peak height in each predicted sample to generate the final predicted maximum profile peak height restored to the original physical scale.
[0053] Specifically, such as Figure 4 and Figure 5 As shown in the comparison, after obtaining multiple prediction samples, post-processing is performed on the predicted maximum profile peak height of each sample to restore it to its original physical scale. Specifically, since the original vibration signal underwent a logarithmic transformation during data preprocessing, to ensure that the final output prediction value has an intuitive physical meaning and is consistent with the actual measurement scale, the predicted maximum profile peak height output by the neural network needs to be post-processed using Formula 8. Perform the corresponding inverse exponential transform operation; Formula 8; This mathematical transformation effectively reverses the logarithmic compression process in the preprocessing stage, mapping the predicted values output by the model back to the original linear physical scale. After this inverse transformation, the final predicted value of the maximum profile peak height is obtained. Its physical units are completely consistent with the measured values obtained through measuring equipment such as contact profilometers.
[0054] Working Principle: This application utilizes parallel Fourier neural operator branches and short-sequence Transformer branches to collaboratively extract spatial frequency domain features and dynamic temporal features from the original data, and employs a gating mechanism for dynamic fusion. This effectively overcomes the inherent shortcomings of traditional physical information neural networks in capturing high-frequency features and their weak long-term modeling capabilities, significantly improving the accuracy and generalization ability of the prediction model. The short-sequence Transformer branch, through an adaptive mechanism, efficiently improves training efficiency while preserving key temporal information. Furthermore, the neural network trained based on physical constraints in this application ultimately outputs prediction results with confidence intervals. This not only enhances the adherence to the inherent laws of cutting dynamics but also effectively quantifies prediction uncertainty, thereby significantly improving the reliability and credibility of the prediction results.
[0055] Example 2 Please refer to Figure 2 This application provides a workpiece surface roughness prediction system based on a physical information neural network, comprising: Data acquisition module 1 is used to acquire the raw data of the workpiece and generate an input feature sequence; the raw data includes cutting parameters, multi-axis vibration signals and surface roughness measurements. Preprocessing module 2 is used to preprocess the original data to obtain a preprocessed feature sequence; The physical perception fusion module 3 is used to extract spatial frequency domain features and dynamic temporal features from the preprocessed feature sequence by using parallel Fourier neural operator branches and short sequence Transformer branches respectively; and dynamically fuses the spatial frequency domain features and dynamic temporal features through a gating mechanism to generate fused features; wherein, the gating mechanism is physical perception gating, which dynamically allocates the fusion weights of spatial frequency domain features and dynamic temporal features according to the physical field type of the multi-axis vibration signal.
[0056] Predictive neural network model 4 is used to receive and process fused features and output the predicted surface roughness value and its confidence interval; predictive neural network model 4 is obtained by physical constraint training.
[0057] Furthermore, the surface roughness measurement values include at least: the maximum profile peak height measurement value; the preprocessing module 2 is configured to perform advanced cleaning of the raw data using robust statistical methods to handle outliers in the raw data; and to perform a logarithmic transformation on the maximum profile peak height measurement value to obtain a preprocessed feature sequence.
[0058] Furthermore, the predictive neural network model 4 includes: a physical constraint module 41, configured to construct a loss function, the loss function including at least a data loss term and a physical constraint loss term; wherein, the data loss term is used to measure the error between the predicted surface roughness value and the measured surface roughness value; the physical constraint loss term is constructed based on the principle of cutting dynamics and is used to constrain the gradient relationship between the predicted surface roughness value and the cutting depth parameter. The predictive neural network model 4 also includes a training strategy module 43, which is configured to train the predictive neural network model 4 by minimizing a loss function.
[0059] Furthermore, the predictive neural network model 4 also includes: an Rp-specific processing module 42, which is configured to assign adaptive weight coefficients to the predicted value of the maximum profile peak height. Furthermore, the predictive neural network model 4 also includes: an uncertainty quantization module 44, which is configured to: Multiple forward propagation calculations are performed on the fused features to obtain multiple prediction samples; each calculation generates a corresponding prediction sample based on randomly selected weight coefficients; the weight coefficients are obtained by sampling from a reparameterized probability distribution. The mean of multiple prediction samples is calculated to obtain the predicted surface roughness value; Calculate the standard deviation of multiple predicted samples and generate confidence intervals based on the standard deviation. Furthermore, the uncertainty quantification module 44 is also configured to: perform an inverse exponential transform operation on the predicted maximum profile peak height in each predicted sample to generate the final predicted maximum profile peak height restored to the original physical scale.
[0060] Furthermore, the physical perception fusion module 3 is also configured for: Detect the real-time length of the preprocessed feature sequence; Determine if the real-time length is less than a preset threshold; If so, then pooling is performed on the preprocessed feature sequence to obtain the global feature vector; and copying is performed on the global feature vector to generate dynamic temporal features; wherein the dynamic temporal features are of the same length as the preprocessed feature sequence.
[0061] If not, the preprocessed features are calculated using the standard self-attention mechanism to generate dynamic temporal features.
[0062] Furthermore, the physical perception fusion module 3 is also configured for: Perform a Fourier transform on the preprocessed feature sequence to obtain the corresponding frequency domain signal; Perform a linear transformation operation on the frequency domain signal to obtain a frequency domain tensor; Perform an inverse Fourier transform on the frequency domain tensor to generate spatial frequency domain features.
[0063] Furthermore, the predictive neural network model 4 also includes an output module 45, which is used to output the predicted surface roughness value and its confidence interval.
[0064] The above description is merely a preferred embodiment of this application and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A method for predicting workpiece surface roughness based on a physical information neural network, characterized in that, Includes the following steps: The raw data of the workpiece is collected to generate an input feature sequence; wherein the raw data includes cutting parameters, multi-axis vibration signals and surface roughness measurements. The original data is preprocessed to obtain a preprocessed feature sequence; Spatial frequency domain features and dynamic temporal features are extracted from the preprocessed feature sequence by using parallel Fourier neural operator branches and short sequence Transformer branches, respectively. The spatial frequency domain features and dynamic temporal features are dynamically fused through a gating mechanism to generate fused features; The fused features are input into the predictive neural network model for processing, and the predicted surface roughness value and its confidence interval are output; the predictive neural network model is obtained by training with physical constraints.
2. The method for predicting workpiece surface roughness based on a physical information neural network according to claim 1, characterized in that, The surface roughness measurement values include at least: the maximum profile peak height measurement value; The original data is preprocessed to obtain a preprocessed feature sequence, including the following steps: Robust statistical methods are used to perform advanced cleaning on the raw data to handle outliers. The preprocessed feature sequence is obtained by performing a logarithmic transformation on the measured maximum profile peak height.
3. The method for predicting workpiece surface roughness based on a physical information neural network according to claim 2, characterized in that, The predictive neural network model is trained under physical constraints, including the following steps: A loss function is constructed, which includes at least a data loss term and a physical constraint loss term; wherein, the data loss term is used to measure the error between the predicted surface roughness value and the measured surface roughness value; the physical constraint loss term is constructed based on the principle of cutting dynamics and is used to constrain the gradient relationship between the predicted surface roughness value and the cutting depth parameter. The predictive neural network model is trained by minimizing the loss function.
4. The workpiece surface roughness prediction method based on a physical information neural network according to claim 3, characterized in that, The predicted surface roughness value includes at least: the predicted maximum profile peak height; The loss function also includes an RP-specific loss term; the RP-specific loss term is used to assign adaptive weight coefficients to the predicted value of the maximum profile peak height.
5. The method for predicting workpiece surface roughness based on a physical information neural network according to claim 1, characterized in that, The fused features are input into a predictive neural network model for processing, and the predicted surface roughness value and its confidence interval are output, including the following steps: Multiple forward propagation calculations are performed on the fused features to obtain multiple prediction samples; wherein, each calculation generates a corresponding prediction sample based on randomly selected weight coefficients; the weight coefficients are obtained by sampling through a reparameterized probability distribution; The mean of multiple predicted samples is calculated to obtain the predicted surface roughness value; Calculate the standard deviation of the multiple predicted samples, and generate the confidence interval based on the standard deviation.
6. The method for predicting workpiece surface roughness based on a physical information neural network according to claim 5, characterized in that, After calculating the mean of multiple predicted samples to obtain the predicted surface roughness value, the following steps are also included: An inverse exponential transform operation is performed on the maximum profile peak height prediction value in each of the predicted samples to generate the final maximum profile peak height prediction value restored to the original physical scale.
7. The method for predicting workpiece surface roughness based on a physical information neural network according to claim 1, characterized in that, Extracting dynamic temporal features from the preprocessed feature sequence using the short sequence Transformer branch includes the following steps: Detect the real-time length of the preprocessed feature sequence; Determine whether the real-time length is less than a preset threshold; If so, then the preprocessed feature sequence is pooled to obtain a global feature vector; and the global feature vector is copied to generate the dynamic temporal features. The dynamic temporal features are of the same length as the preprocessed feature sequence. If not, the preprocessed features are calculated using a standard self-attention mechanism to generate the dynamic temporal features.
8. The method for predicting workpiece surface roughness based on a physical information neural network according to claim 7, characterized in that, Extracting dynamic temporal features from the preprocessed feature sequence using the Fourier neural operator branches includes the following steps: Perform a Fourier transform on the preprocessed feature sequence to obtain the corresponding frequency domain signal; Perform a linear transformation operation on the frequency domain signal to obtain a frequency domain tensor; Perform an inverse Fourier transform on the frequency domain tensor to generate the spatial frequency domain features.
9. The method for predicting workpiece surface roughness based on a physical information neural network according to claim 1, characterized in that, The gating mechanism is a physical sensing gating mechanism, which dynamically allocates the fusion weights of the spatial frequency domain features and dynamic temporal features based on the physical field type of the multi-axis vibration signal.
10. A workpiece surface roughness prediction system based on a physical information neural network, comprising: The data acquisition module (1) is used to acquire the original data of the workpiece and generate an input feature sequence; wherein, the original data includes cutting parameters, multi-axis vibration signals and surface roughness measurement values; Preprocessing module (2), the preprocessing module (2) is used to preprocess the original data to obtain a preprocessed feature sequence; The physical perception fusion module (3) is used to extract spatial frequency domain features and dynamic temporal features from the preprocessed feature sequence by using parallel Fourier neural operator branches and short sequence Transformer branches respectively; and dynamically fuse the spatial frequency domain features and dynamic temporal features through a gating mechanism to generate fused features. The predictive neural network model (4) is used to receive and process the fused features and output the predicted surface roughness value and its confidence interval; the predictive neural network model (4) is obtained by physical constraint training.