A method and system for modeling machining errors in CNC machine tools
By using a thermal spectrum neural operator network model, combined with graph neural networks and frequency domain analysis techniques, the problem of not incorporating frequency domain energy characteristics in existing thermal error modeling is solved. This enables accurate prediction of the frequency domain characteristics of workpiece surface errors, improves the model's prediction accuracy and robustness, and provides a frequency domain basis for thermal error compensation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- XIHUA UNIV
- Filing Date
- 2026-01-27
- Publication Date
- 2026-04-21
AI Technical Summary
Existing thermal error modeling methods fail to effectively capture the nonlinear evolution characteristics of the workpiece surface error spectrum, especially the changes in energy distribution, peak position shift, and spectral distortion in the mid-frequency band. Furthermore, they lack physical constraints between frequency domain energy and thermal state, resulting in prediction results that lack physical interpretability and generalization ability.
A thermal spectrum neural operator network model is adopted, combined with graph neural network and frequency domain analysis technology. By using the temperature rise time series and the power spectral density (PSD) energy characteristics of the workpiece surface, a four-stage linkage structure is constructed to predict frequency domain features, including continuous time encoding, frequency registration, optimal transmission and energy calibration, so as to achieve accurate mapping between temperature rise evolution and frequency domain error.
It achieves accurate characterization and prediction of processing errors in the spatial frequency domain, and can accurately capture the key response characteristics of thermal errors such as changes in energy distribution in the mid-frequency band, spectral peak drift and spectral distortion, providing a frequency domain basis for thermal error compensation and improving the prediction accuracy and robustness of the model.
Smart Images

Figure CN121596823B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of precision manufacturing and intelligent equipment technology, and in particular to a method and system for modeling CNC machine tool machining errors based on temperature rise time sequence and workpiece surface power spectral density energy characteristics. Background Technology
[0002] As a key piece of equipment in modern manufacturing, CNC machine tools have a decisive impact on product quality due to their machining accuracy. During the machining process, the machine tool spindle system experiences uneven temperature rise due to various heat sources, leading to thermal deformation errors, which has become one of the main factors restricting high-precision machining. For a long time, thermal error modeling and compensation technology has been a research focus in the field of precision manufacturing.
[0003] Traditional thermal error modeling methods are primarily based on the temperature-deformation mapping relationship. They typically use temperature measurement points or temperature gradients at key locations as input and thermal deformation as output, employing statistical analysis or machine learning methods to construct predictive models. While these methods have achieved some success under stable operating conditions, they suffer from a fundamental limitation: they only focus on the correspondence between time-domain temperature characteristics and displacement deformation, neglecting the energy distribution characteristics of workpiece surface processing errors in the frequency domain. This limitation prevents the models from revealing the deep-seated impact of thermal deformation on the spectral structure of the workpiece surface morphology, making it difficult to analyze the generation mechanism of thermal errors from a frequency domain perspective.
[0004] In the field of surface quality evaluation, power spectral density (PSD), as a frequency domain analysis tool, has been used to characterize the surface morphology of workpieces. PSD can quantitatively describe the energy distribution of surface errors at different spatial frequencies, especially the energy concentration phenomenon in the mid-frequency band, which is often related to specific processing steps and error sources. However, existing PSD analyses are mostly at the post-hoc diagnostic stage, lacking feedforward correlation modeling with the machine tool's thermal state. Particularly noteworthy is that workpiece surface errors caused by thermal deformation often exhibit characteristics such as mid-frequency energy enhancement, spectral peak position shift, and spectral distortion in the frequency domain, and existing thermal error models cannot effectively predict and interpret these frequency domain characteristics.
[0005] With the development of artificial intelligence technology, deep learning methods have been increasingly applied to thermal error modeling, improving prediction accuracy by automatically extracting feature representations from temperature data. However, these methods remain limited to a time-domain prediction framework and do not incorporate frequency-domain features into the modeling system. Even in the few studies that focus on frequency-domain characteristics, there is a lack of systematic modeling of the physical laws governing the relationship between the PSD energy structure and thermal state evolution. This results in insufficient generalization ability of the models when applied across different operating conditions and makes it difficult to provide physically meaningful evidence for error attribution.
[0006] Existing thermal error modeling techniques have significant shortcomings in addressing the following key issues: First, the workpiece error spectrum caused by thermal deformation exhibits complex nonlinear evolution characteristics, especially the dynamic changes in energy distribution in the mid-frequency band are difficult to capture; second, the spectral migration effect caused by different heat sources and heat conduction paths manifests as the drift of spectral peak positions with temperature evolution, and traditional models lack the ability to characterize such dynamic characteristics; third, the spectral distortion caused by temperature field non-uniformity is difficult to describe through simple mapping relationships; finally, existing models rarely consider the physical consistency constraints between frequency domain energy and thermal state, resulting in a lack of physical interpretability in the prediction results.
[0007] Although some studies have attempted to combine frequency domain analysis with thermal error modeling and extract multi-scale features of thermal errors through signal processing techniques, these methods have still failed to establish an end-to-end mapping relationship between temperature rise time series and PSD energy structure, and lack specific designs for key phenomena such as spectral peak drift and spectral distortion. Furthermore, existing frequency domain prediction methods often ignore physical constraints such as energy conservation, resulting in deficiencies in the physical plausibility of the prediction results and making it difficult to support the formulation of accurate error compensation strategies.
[0008] Therefore, a novel modeling method is urgently needed that breaks through the traditional time-domain modeling paradigm and organically combines the temperature rise time series with the PSD energy characteristics of the workpiece surface. This method should be able to directly learn the mapping relationship between temperature rise evolution and frequency domain error distribution, accurately characterize key laws such as mid-frequency energy distribution changes, spectral peak drift, and spectral distortion, while satisfying physical constraints such as energy conservation, providing theoretical support for frequency domain tracing and accurate compensation of thermal errors. To address this technical challenge, this invention proposes a CNC machine tool machining error modeling method based on the temperature rise time series and the power spectrum (PSD) energy characteristics of the workpiece surface. Through an innovative thermal spectrum neural operator network model architecture, it achieves accurate mapping from thermal state to frequency domain energy structure, solving key problems existing in current technologies. Summary of the Invention
[0009] To address the shortcomings of existing technologies, this invention provides a method and system for modeling machining errors in CNC machine tools. By combining graph neural networks and frequency domain analysis techniques, a thermal spectrum neural operator network model is constructed to predict the frequency domain characteristics of workpiece surface errors caused by spindle thermal deformation, providing a frequency domain prior basis for thermal error compensation of high-precision CNC machine tools.
[0010] To achieve the above-mentioned objectives, the technical solution adopted by the present invention is as follows:
[0011] A method for modeling machining errors in CNC machine tools, the method comprising the following steps:
[0012] a) Arrangement on the spindle system of CNC machine tools There are 10 temperature sensors, at least one of which is used to collect ambient temperature, and the remaining temperature sensors are located at key locations on the spindle at sampling intervals. Temperature is sampled to obtain temperature rise time series data with a total duration of T, forming a temperature rise data matrix. ;
[0013] b) Inspect the surface morphology of the workpiece and obtain the surface profile function. The power spectral density (PSD) of the workpiece surface morphology was calculated based on Fourier transform, and the mid-frequency energy distribution, peak position, peak bandwidth and spectral shape characteristics were extracted.
[0014] c) Construct a thermal spectrum neural operator network model and use the temperature rise data matrix The graph-frequency-time angular frequency joint spectral tensor is obtained by using graph Laplace transform and time-spectral decomposition. ;
[0015] d) The joint spectral tensor is processed through the four-stage linkage structure of the aforementioned thermal spectral neural operator network model. The four-stage linkage structure, which is used for processing, includes:
[0016] The continuous-time encoding module is used to improve the ability to express non-uniform sampling and dynamic operating conditions;
[0017] The frequency registration module is used for explicit modeling of spectral peak drift and frequency axis misalignment.
[0018] The optimal transport metric module is used to characterize the overall migration and local deformation of the spectrum as it evolves with temperature rise;
[0019] The energy calibration module introduces energy constraints based on Parseval's theorem to ensure energy conservation and energy consistency in the PSD.
[0020] e) The processed joint spectral tensor is directly mapped to PSD feature prediction values using a learnable frequency domain kernel. The PSD features include mid-frequency energy distribution features, spectral peak shift features, and spectral distortion features;
[0021] f) The thermal spectrum neural operator network model is trained based on a preset total loss function, which includes PSD feature alignment loss, spectral domain reconstruction loss, energy consistency loss and spectral smoothing regularization term, to realize frequency domain characterization and prediction modeling of workpiece processing errors.
[0022] Furthermore, the graphical Laplace transform described in step c) specifically includes:
[0023] The arrangement of temperature sensors can be abstracted as a graph G=(V,E), where V is the set of nodes and E is the set of edges;
[0024] Constructing an adjacency matrix Sum-degree matrix Calculate the graph Laplacian matrix ;
[0025] Performing spectral decomposition on the graph Laplacian matrix L yields... ,in The matrix consists of orthogonal eigenvectors. It is an eigenvalue diagonal matrix;
[0026] Each moment Temperature data Projecting onto the spectral base, we obtain ,in Indicates the first The excitation amplitude at each spatial eigenmode at any given moment.
[0027] Furthermore, the learnable frequency domain kernel is parameterized using a low-rank decomposable parameterization:
[0028]
[0029] in, For channel For the The mixing coefficient of the passband, For the first Passband in the image frequency The shape function of the direction, For the first Passband in time and frequency The shape function of the direction, For the number of sensors, The number of time sampling points, This determines the number of output feature channels.
[0030] Furthermore, the energy calibration module achieves energy constraint in the following way:
[0031] Construct the energy consistency loss term: ;
[0032] in For the predicted spatial frequency PSD distribution, Spatial frequency coordinates The area of the frequency grid cell. For surface height variance;
[0033] The energy consistency loss term is added to the total loss function to ensure that the predicted PSD satisfies the energy conservation constraint.
[0034] Furthermore, the total loss function is defined as:
[0035]
[0036] in, For PSD feature alignment loss, For spectral domain reconstruction loss, For energy consistency loss, For spectral smoothing regularization, These are the weighting coefficients for each loss term.
[0037] Furthermore, the output of the thermal spectrum neural operator network model contains two parallel paths:
[0038] First approach: Directly map the joint spectral tensor Z to PSD semantic features using a learnable frequency domain kernel. ;
[0039] Second path: First generate the predicted spatial frequency PSD distribution Then, the frequency band energy features are extracted from them. and the position of the spectral peaks and bandwidth ,right , and By fusing statistical features, we can obtain ;
[0040] The final output is a weighted fusion of the two paths: ,in and For weight fusion.
[0041] Further, the temperature rise time series data acquisition parameters in step a) are set as follows:
[0042] Total sampling time It lasts for 400 minutes;
[0043] Sampling interval It lasts for 15 minutes;
[0044] The initial temperature of each temperature sensor is the ambient temperature.
[0045] Furthermore, the discretization calculation formula for the PSD mentioned in step b) is as follows:
[0046]
[0047] Where N is the number of sampling points, =L / N, where L is the sampling length. For the m-th order spatial frequency, , This represents the workpiece surface profile function at discrete sampling points. The value at that location, Represents the imaginary unit. Indicates the index of the discrete sampling point.
[0048] This invention also discloses a CNC machine tool machining error modeling system for implementing the above method, comprising:
[0049] Temperature sensing module, used to collect temperature rise time sequence data of key parts of CNC machine tool spindle system;
[0050] The surface morphology detection module is used to acquire workpiece surface morphology data;
[0051] The PSD feature extraction module is used to perform Fourier transform on surface topography data, calculate and extract PSD features;
[0052] The thermal spectrum neural operator network module includes a continuous-time coding unit, a frequency registration unit, an optimal transmission metric unit, and an energy calibration unit, which are used to establish the mapping relationship between the temperature rise time series and PSD features.
[0053] The loss calculation and optimization module is used to calculate the total loss function and optimize network parameters;
[0054] The error prediction module is used to predict the frequency domain characteristics of workpiece machining errors based on the optimized thermal spectrum neural operator network model.
[0055] This invention also discloses the application of the above method in thermal error compensation of CNC machine tools, including:
[0056] The PSD characteristics of workpiece machining errors are predicted using the aforementioned thermal spectrum neural operator network model.
[0057] Based on the predicted PSD characteristics, the frequency domain distribution characteristics of thermal errors are analyzed to identify the main error sources;
[0058] Design targeted compensation strategies based on the frequency domain characteristics of the error, and optimize processing parameters;
[0059] Compensation strategies are applied to the control system of CNC machine tools to reduce the impact of thermal deformation on machining accuracy.
[0060] Compared with the prior art, the advantages of the present invention are as follows:
[0061] 1. This invention breaks through the limitations of traditional thermal error modeling, which only focuses on the time-domain temperature-deformation mapping. For the first time, it incorporates the frequency-domain energy structure characteristics of workpiece surface errors into the modeling framework, achieving accurate characterization and prediction of processing errors in the spatial frequency domain. In particular, it can accurately capture key response characteristics of thermal errors in the frequency domain, such as mid-frequency energy distribution changes, spectral peak shifts, and spectral distortions, providing a completely new perspective for understanding the mechanism of thermal deformation.
[0062] 2. Through a four-stage linked structure of continuous-time encoding, frequency registration, optimal transmission, and energy calibration, this invention explicitly models the physical correlation mechanism between temperature rise evolution and frequency domain error. The frequency registration module directly characterizes the spectral peak drift phenomenon, while the optimal transmission metric module quantitatively describes the overall spectral shift and local deformation. This enables the model to not only have predictive capabilities but also the ability to causally explain the frequency domain evolution of thermal errors, providing direct evidence for error tracing.
[0063] 3. This invention innovatively introduces an energy constraint mechanism based on Parseval's theorem, which forces the total energy of the predicted PSD to remain consistent with the variance of the surface height during model training. This physical constraint not only improves the rationality of the prediction results and effectively avoids the overall energy drift problem common in traditional methods, but also significantly enhances the model's generalization ability and robustness under different operating conditions.
[0064] 4. By leveraging the continuous-time encoding module's ability to process non-uniformly sampled data and the graph Laplace transform's modeling of multi-sensor spatial correlation, this invention can adapt to error prediction requirements under varying operating conditions and unsteady thermal environments. Experiments show that this method maintains stable prediction accuracy under different processing durations and temperature rise rates, solving the problem of traditional models requiring recalibration when operating conditions change.
[0065] 5. The thermal spectrum neural operator network model used in this invention can accurately capture subtle frequency domain feature changes in the PSD curve, including the positional changes of the mid-frequency main peak and secondary peaks, the degree of energy concentration, and spectral asymmetry. This refined frequency domain characterization capability enables the model to distinguish the contribution of different heat sources to processing errors, providing a frequency domain basis for targeted thermal error compensation.
[0066] 6. The temperature rise and frequency domain error mapping model established in this invention provides prior support for source control and process optimization of thermal deformation errors. By analyzing the predicted PSD characteristics, engineers can identify the spatial frequency components that dominate thermal errors and then design targeted compensation strategies, such as optimizing spindle cooling parameters, adjusting machining sequence, or modifying toolpaths, to reduce the impact of thermal deformation on machining quality from the root.
[0067] 7. Through the synergistic effect of spectral smoothing regularization and energy consistency constraints, this invention effectively suppresses non-physical spikes and random fluctuations in the predicted PSD, enabling the mid-frequency energy to exhibit a continuous banded distribution that conforms to physical laws. This stability ensures that the model will not produce misleading predictions due to measurement noise in practical applications, thus improving the reliability of engineering applications.
[0068] 8. This invention effectively integrates spatially non-uniform temperature rise information collected by multiple temperature sensors through a graph neural network operator architecture, making full use of the spatial distribution characteristics and temporal evolution of the temperature field. This collaborative modeling of multi-dimensional information significantly improves the ability to identify complex thermal deformation patterns and avoids the limitations of traditional single-point or simple average temperature feature modeling.
[0069] 9. Compared with traditional methods that require a lot of finite element simulation or experimental calibration, the thermal spectrum neural operator network model of this invention can quickly predict the PSD characteristics under any temperature rise state once it is trained. It has low computational complexity and can be integrated into the CNC system to realize real-time thermal error compensation, significantly improving the efficiency of high-precision machining.
[0070] 10. The modeling framework of this invention has good technical compatibility and can be seamlessly integrated with existing CNC systems; at the same time, it has significant scalability and can adapt to different types of machine tool structures and different machining process conditions, providing a general technical foundation for active thermal error control of intelligent machine tools. Attached Figure Description
[0071] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0072] Figure 1 This is a network structure diagram of a CNC machine tool machining error modeling method according to an embodiment of the present invention;
[0073] Figure 2 This is a schematic diagram of PSD extraction of workpiece morphology in an embodiment of the present invention;
[0074] Figure 3 This is a temperature rise sequence curve of the 8-channel temperature sensor in an embodiment of the present invention;
[0075] Figure 4 These are PSD measurement curves at different times in an embodiment of the present invention;
[0076] Figure 5 These are PSD prediction curves at different times in an embodiment of the present invention;
[0077] Figure 6 This is a comparison chart of the workpiece PSD measurement curve and the PSD prediction curve obtained when the workpiece is processed starting at t=0min in an embodiment of the present invention.
[0078] Figure 7This is a comparison chart of the workpiece PSD measurement curve and the PSD prediction curve obtained when the workpiece is processed starting at t=75min in this embodiment of the invention;
[0079] Figure 8 This is a comparison chart of the workpiece PSD measurement curve and the PSD prediction curve obtained when the workpiece is processed starting at t=150min in this embodiment of the invention;
[0080] Figure 9 This is a comparison chart of the workpiece PSD measurement curve and the PSD prediction curve obtained when the workpiece is processed starting at t=240min in this embodiment of the invention;
[0081] Figure 10 This is a comparison chart of the workpiece PSD measurement curve and the PSD prediction curve obtained when the workpiece is processed starting at t=315min in this embodiment of the invention.
[0082] Figure 11 This is a comparison chart of the workpiece PSD measurement curve and the PSD prediction curve obtained when the workpiece is processed starting at t=390min in an embodiment of the present invention. Detailed Implementation
[0083] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0084] To overcome the problem that traditional CNC machine tool machining error modeling relies solely on time-domain temperature characterization and neglects the frequency-domain energy structure characteristics of workpiece surface errors, this invention proposes a CNC machine tool machining error modeling method based on temperature rise time sequence and workpiece surface power spectral density energy characteristics. Its structure is as follows: Figure 1 As shown, this method takes the temperature rise time series data of key parts of the spindle as input, and uses a structured neural operator network to directly learn the mapping relationship between temperature rise evolution and workpiece machining error in the frequency domain. It outputs PSD features that characterize the frequency domain distribution of machining error, focusing on depicting key laws such as mid-frequency energy distribution changes, spectral peak drift, and spectral distortion, thereby realizing the frequency domain characterization and prediction modeling of workpiece machining error.
[0085] To enhance the stability and interpretability of frequency domain prediction, the network employs continuous-time coding and frequency registration. A four-stage linked structure for optimal transmission and energy calibration is implemented: continuous-time coding improves the expressive power for non-uniform sampling and dynamic operating conditions; frequency registration explicitly models spectral peak drift and frequency axis misalignment; an optimal transmission metric is introduced to characterize the overall migration and local deformation of the spectrum as it evolves with temperature rise; and an energy constraint loss based on Parseval's theorem is introduced in the energy calibration stage to achieve physical constraint modeling of PSD energy conservation and energy consistency. This design not only improves the model's generalization ability and robustness across operating conditions but also enhances the causal explanation of the evolution of the processing error spectrum, providing prior support for subsequent error tracing, thermal deformation inference, and process compensation.
[0086] ① Extraction of workpiece morphology power spectral density
[0087] The workpiece morphology is inspected to obtain surface morphology data, which is then further processed using PSD curves. PSD is essentially a Fourier spectrum analysis method that can quantitatively describe the spatial frequency distribution characteristics of wavefront distortion. Its calculation method is shown below:
[0088] (1)
[0089] In the formula, L is the sampling length; x is the spatial position coordinate (one-dimensional coordinate along the measurement direction), z(x) represents the profile function of the measured workpiece surface, k is the wave number, exp(−ikx) is the complex exponential basis function, the kernel function used for Fourier transform; −i is the negative of the imaginary unit i; F z (k) is the complex amplitude of the Fourier transform (or Fourier integral) of the contour z(x) at wavenumber k under the condition of finite length L truncation. ||| is the complex modulus, ||| 2 The modulus squared corresponds to the spectral energy / power.
[0090] Discretizing equation (1), we have:
[0091]
[0092] (2)
[0093] Where N is the number of sampling points; Δx = L / N; f m The m-th spatial frequency, -N / 2 <m<N / 2。
[0094] like Figure 2 As shown, the PSD characteristics obtained by preprocessing and Fourier transforming the workpiece surface morphology measurement data show multiple significant peaks in the mid-frequency region (marked by the red dashed line), which intuitively reveals the typical frequency domain response under the action of spindle thermal error.
[0095] ② Thermal spectrum neural operator network model
[0096] The total sampling time for the deployed temperature sensor M is... Sampling interval Discrete time .
[0097] (3)
[0098] Abstract the sensor arrangement into a diagram ,
[0099] V is obtained directly from the sensor set; E can be obtained from a distance threshold, a structure connection threshold, or a correlation threshold.
[0100] If a total of M temperature sensors are deployed, then V = {v1, v2, ..., v...} M}; Each node v i The temperature sequence x corresponding to the i-th sensor i [n], x i [n] represents the temperature value obtained at n sampling times of the i-th sensor.
[0101] Thulaplatz and spectral decomposition:
[0102] (4)
[0103] In the formula, A is the adjacency matrix (edge weights can be given by distance / material thermal conductivity), D is the degree matrix, and D ii =∑Mj=1A ij Off-diagonal elements are 0; the column vectors of 𝑈 form a graph Fourier orthogonal basis, 𝜆 𝑚 It is the frequency of the graph.
[0104] At each time step n, the projection onto the spectral base is:
[0105] (5)
[0106] in, It is the excitation amplitude at time n in each spatial eigenmode, and the m-th component. Corresponding frequency Energy.
[0107] Perform a one-dimensional spectral decomposition in time to obtain the spatiotemporal joint spectrum, and then perform a spatial eigenmode analysis. Perform discrete-time Fourier transform:
[0108] (6)
[0109] Where Z(m,l) is the joint spectral tensor, representing the response intensity and phase information of the m-th spatial / graphic mode at the time angular frequency ωl, and the two coordinate axes are the graph frequencies. With time angular frequency Δt is the time sampling interval; j is the imaginary unit, satisfying j 2 =−1. This describes which type of spatial pattern is excited at what temporal frequency.
[0110] By introducing a spectral operator backbone composed of stacked Fourier layers and graph Fourier layers, the joint spectrum is encoded into an intermediate representation:
[0111] (7)
[0112] Φ θ (⋅) is the backbone network of the spectral operator, which is composed of several stacked Fourier layer / graph Fourier layer modules; θ is the set of learnable parameters of the backbone, and Z is the joint spectral tensor.
[0113] Each spectral operator block can be written as:
[0114] (8)
[0115] H l−1 H l These are the feature representations of the (l-1)th layer and the lth layer, respectively. ρ(⋅) is an element-wise nonlinear activation function, such as GELU / ReLU / SiLU, etc., and ReLU is selected in this invention; This represents the frequency domain representation obtained by performing a Fourier transform. The inverse Fourier transform maps the frequency domain result back to the original representation domain. ⊙ represents the Hadamard element-wise multiplication, indicating dot-matrix filtering in the frequency domain. kl(λ,ω) is the joint frequency domain kernel.
[0116] Position gating Take a ride or nucleus Above. Ul(loc) is the position gate function / gating mask generated by the l-th graph Fourier layer module, which is used to inject position information (loc) into the frequency domain calculation, so that the model still has spatial / positional selectivity when performing global frequency domain filtering;
[0117] This completes the process of obtaining the joint spectrum λ from multi-sensor temperature rise data λ through a graph-time joint transformation. Further, a neural operator is constructed to transform the joint spectrum into PSD features, using a graph-frequency... ×Time Frequency "On the plane, an interpretable frequency domain kernel is learned for each feature channel k." It performs a weighted integral / summation on the joint spectrum to obtain the response of the characteristic channel, and then uses non-negative activation to ensure physical meaning (energy / amplitude ≥ 0).
[0118] The joint temperature rise spectrum 𝑍 is directly mapped to 𝑃 via a learnable frequency domain kernel, which is an operator representation directly derived from the features:
[0119] (9)
[0120] in, This is the network estimate of the nth PSD semantic feature. It is a non-negative activation function (Softplus / ReLU / Identity). Let K represent the frequency domain kernel of the nth channel, with parameter set K. It is the offset of the nth channel, and the k output feature channel indices (such as "mid-frequency band energy 1 / 2 / 3, main peak position, bandwidth, spectral centroid, etc."), with a total of K. Indicates the first The frequency domain kernel of the channel, Indicates the feature channel index. Represents the set of model parameters. Indicates the frequency of the graph. It represents the time angular frequency.
[0121] To improve expression and generalization, Low-rank decomposable parameterization (neural operator kernel decomposition) is employed:
[0122] (10)
[0123] in, Let be the mixing coefficient of channel k with respect to the r-th passband. The shape function (spatial selection) of the r-th passband in the frequency direction. is the shape function (bandpass selection) of the r-th passband in the time-frequency direction. M is the number of image frequency points (number of sensors / number of Laplacian features); 𝑁 is the number of time-frequency points (number of FFT frequency points); 𝐾 is the number of output features.
[0124] Equation (8) writes the two-dimensional kernel as several "spatial mode selection" statements. ×Time Bandpass Selection The product of " and using Linear mixing; each output feature k is a weighted aggregation of several physically meaningful "spatiotemporal passbands" on the joint spectrum.
[0125] If multiple layers of operators are required, stacked equations (7)-(8) can be used, and point-state nonlinearity and residual connections can be added between layers.
[0126] We first need to obtain a PSD distribution map in the spatial frequency domain of the surface. For example, the power spectrum of 2D spatial frequency ξ=(u,v) can be used to aggregate several features from this graph according to windows / basis functions. This path of first generating the graph and then extracting features is more intuitive and conducive to physical interpretation, as it can directly show which spatial frequency regions the mid-frequency energy is concentrated in.
[0127] Spatial frequency PSD curves are generated from the joint spectrum:
[0128] (11)
[0129] in, These are spatial frequency coordinates.
[0130] Channelized features are aggregated from PSD curves:
[0131] (12)
[0132] In the formula, It is a spatial frequency grid; The weighted basis function for the k-th feature is, for example, a band energy window, a Gaussian / triangular window, or a learnable basis. Grid area / spacing.
[0133] Differentiable peak characteristics such as output peak position, centroid, and bandwidth can be achieved using Soft-Argmax / soft statistics.
[0134] (13)
[0135] In the formula, ξ is the spatial frequency coordinate. The output of the model is the two-dimensional spatial frequency domain PSD value. Depend on The weights of the probability patterns obtained through normalization, This is the sharpening factor, usually taken as 1 to 2; For the weighted centroid / peak position soft estimation of spatial frequency, It revolves around The weighted variance / bandwidth soft estimate, ||⋅|| is the 2-norm; This represents summing over all discrete spatial frequency points on the frequency domain grid. This represents the traversal variable in the summation of the denominator.
[0136] The statistical characteristics of P-band energy and peak position / bandwidth are fused together:
[0137] (14)
[0138] Equations (7) and (12) are combined to form a final, unique output:
[0139] (15)
[0140] In the formula, w1 and w2 are the fusion weights.
[0141] The target PSD features P (such as mid-frequency energy, peak position, bandwidth, etc.) have been extracted from the measured surface morphology using FFT and predetermined operators. Then, MSE is used to make the network output... Align with:
[0142] (16)
[0143] Introducing spectral domain reconstruction loss:
[0144] (17)
[0145] in, For frequency domain weights, This represents Hadamard (pointwise) multiplication. It is the Frobenius norm.
[0146] Energy uniformity (Parseval constraint): The sum of the energies of each frequency band in P should approximate the surface height variance.
[0147] (18)
[0148] In the formula, This represents the area of the frequency grid cell.
[0149] Avoid noise spikes and suppress The non-physical burrs make the mid-frequency energy appear as a continuous band:
[0150] (19)
[0151] in, It is the gradient of spatial frequency (the second normal form of Sobolev / TV-type regularization).
[0152] The total loss function is then:
[0153] (20)
[0154] In the formula, This represents the weighting coefficient for each loss.
[0155] To verify the effectiveness of the present invention, "A CNC machine tool machining error modeling method based on temperature rise time series and workpiece surface power spectrum (PSD) energy characteristics," the following example was constructed to perform data acquisition, PSD feature extraction of the machined workpiece, and frequency domain prediction comparison verification. The core verification objective of this embodiment is: under the condition of only inputting temperature rise time series data of key parts of the spindle, the proposed thermal spectrum neural operator network model can accurately reproduce the energy distribution pattern of workpiece machining error in the frequency domain, and can characterize the typical frequency domain response laws of thermal errors such as mid-frequency energy enhancement, spectral peak drift, and spectral distortion.
[0156] (1) Construction of temperature rise time series data and setting of operating conditions
[0157] Eight temperature sensors were installed on the CNC machine tool spindle system, including one ambient temperature sensor and seven temperature sensors for key parts of the spindle. The total sampling time was 400 minutes, with a sampling interval of 15 minutes, resulting in a discrete time sequence. The initial temperature was the ambient temperature, which was controlled at 25°C. The remaining seven sensors were located at different positions on the front and rear bearings of the spindle.
[0158] like Figure 3 As shown in the collected temperature rise curves, the ambient temperature remains relatively stable at around 25℃, accompanied by background thermal disturbances in the workshop, exhibiting superimposed small-amplitude random fluctuations. The temperature of key parts of the spindle shows a typical rapid rise followed by a slow stabilization over processing time. The temperature rise varies in degree and is accompanied by weak periodic drift and measurement noise, with the highest temperature reaching approximately 45℃. This reflects the differences in heat source intensity and thermal inertia at different locations. The temperature rise amplitude and time constant differ at different measuring points, resulting in significant temperature field nonuniformity. This nonuniform temperature rise provides a sufficiently identifiable excitation for the subsequent nonlinear mapping of temperature rise to frequency domain error (PSD).
[0159] (2) Generation of PSD characteristics of workpiece machining error and mid-spectral peak response
[0160] The surface morphology data of the processed workpiece is preprocessed and Fourier spectrum analysis is performed. PSD curve features are extracted based on the calculated and discretized PSD form, such as... Figure 4 As shown.
[0161] In this embodiment, the PSD consists of a background spectrum, mid-frequency main / secondary peaks, and random perturbations in the spectral domain. The background spectrum characterizes the low-frequency / global components, while the mid-frequency peaks represent the concentration and peak prominence of mid-frequency errors induced by thermal errors. As the temperature rises, the mid-frequency main and secondary peaks drift slightly on the frequency axis. Simultaneously, their peak amplitude and peak width change with the average temperature rise, the temperature dispersion at each measuring point, and the maximum temperature difference gradient, thus reflecting the key physical phenomenon that changes in the thermal state lead to changes in the workpiece error spectrum structure.
[0162] The results extracted from the PSD show that multiple significant peaks appear in the mid-frequency region, which can intuitively reveal the typical frequency domain response under the influence of spindle thermal error.
[0163] (3) Consistency between thermal spectrum neural operator network modeling and physical constraints
[0164] Using eight temperature rise time series as input, a proposed four-stage linked structure of continuous-time coding, frequency registration, optimal transmission, and energy calibration is employed for frequency domain prediction modeling. This structure explicitly characterizes spectral peak drift and frequency axis misalignment through frequency registration, introduces an optimal transmission metric to describe overall spectral shift and local deformation, and incorporates an energy consistency constraint based on Parseval's theorem in the energy calibration stage. This ensures that the total energy of the predicted PSD remains consistent with the surface height variance, thereby enhancing the physical interpretability and cross-condition generalization ability of the frequency domain prediction results. Figure 5 As shown.
[0165] During training / fitting, PSD feature alignment loss and spectral domain reconstruction loss are the main components. At the same time, energy consistency (Parseval) constraints and spectral smoothing regularization terms are added to form the total loss function. This ensures that the network output is not only "similar in form" but also satisfies the physical constraint of "energy conservation / consistency", thereby suppressing non-physical spikes and energy drift from a mechanistic perspective.
[0166] (4) Calculation results and validity verification of examples
[0167] 1) PSD heatmap evolution verification (overall trend)
[0168] As can be seen from the heatmap of PSD evolution over time, with the increase of processing time and temperature rise accumulation, the energy of the workpiece error PSD in the mid-frequency range gradually increases, and the energy peak position drifts slowly. This is consistent with the engineering principle that "changes in the spindle thermal state cause changes in the mid-frequency error distribution and spectral peak position." This result shows that using only time-domain temperature rise characterization is insufficient to reflect the error frequency domain structure, while this invention can explicitly express key frequency domain information through PSD feature modeling.
[0169] 2) Time-sharing curve comparison and verification (local details)
[0170] Select several typical moments (such as the initial stage, the middle stage of warming, and the end stage of stabilization), such as Figures 6-11As shown, a comparison chart (logarithmic coordinates) of the measured PSD curve and the predicted PSD curve is presented. The comparison reveals that the predicted curve can better reproduce the peak position, peak width variation, and energy fluctuation trend of the measured curve in the mid-frequency range; it also maintains consistency in the attenuation pattern of the low-frequency background spectrum and the energy level of the high-frequency tail. Due to the unavoidable measurement noise and operating condition disturbances in actual modeling, the predicted curve retains a moderate deviation from the measured curve. However, the deviation is mainly manifested as local amplitude perturbations rather than large peak position misalignments, reflecting the model's stable ability to characterize spectral peak drift and spectral shape variations.
[0171] 3) Multi-timeframe verification (robustness and discriminability)
[0172] Furthermore, the PSD curves at several time points were superimposed on the same graph and labeled with time points (logarithmic coordinates) for presentation. The superposition results show that the PSD curves at different time points exhibit clear layering and distinguishable spectral differences in the mid-frequency band: at higher temperature rise times, the mid-frequency peaks are more significant, the energy distribution is more concentrated, and the center position of the spectral peak shows a slight shift. This phenomenon corresponds to the evolution trend of the temperature rise sequence, indicating that the "temperature rise and PSD" mapping constructed in this invention can achieve a causal consistency explanation at the frequency domain level and provide a direct frequency domain prior for subsequent processing error tracing and compensation.
[0173] 4) Energy consistency verification (physical interpretability)
[0174] By introducing Parseval energy constraints during the energy calibration stage, the integral energy of the predicted PSD can remain consistent with the surface error variance, thus avoiding unreasonable phenomena such as overall curve rise / fall due to overall energy deviation in the predicted curve. Simultaneously, the spectral smoothing term effectively suppresses non-physical spikes, resulting in a continuous banded distribution of mid-frequency energy. These results collectively verify that this invention not only achieves PSD shape fitting but also meets physical consistency requirements at the energy level, enhancing the interpretability and credibility of the model output.
[0175] In summary, this embodiment demonstrates that, using the temperature rise time sequence as input, this invention can predict and model the frequency domain energy characteristics of workpiece machining errors (PSD), and stably characterize key frequency domain laws such as mid-frequency energy enhancement, spectral peak shift, and spectral distortion. Compared to traditional thermal error modeling methods based solely on time-domain temperature characteristics, this invention extends error characterization from time-domain temperature to frequency-domain energy structure, offering significant advantages in mechanistic explanation and cross-condition generalization. It can provide more physically meaningful prior support for subsequent thermal deformation inference, error tracing, and machining compensation.
[0176] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0177] In another embodiment, a CNC machine tool machining error prediction system is provided, which corresponds one-to-one with the CNC machine tool machining error modeling method based on temperature rise time series and workpiece surface power spectral density energy characteristics in the above embodiment. The system includes:
[0178] Temperature sensing module, used to collect temperature rise time sequence data of key parts of CNC machine tool spindle system;
[0179] The surface morphology detection module is used to acquire workpiece surface morphology data;
[0180] The PSD feature extraction module is used to perform Fourier transform on surface topography data, calculate and extract PSD features;
[0181] The thermal spectrum neural operator network model module includes a continuous-time coding unit, a frequency registration unit, an optimal transmission metric unit, and an energy calibration unit, which are used to establish the mapping relationship between the temperature rise time series and PSD characteristics.
[0182] The loss calculation and optimization module is used to calculate the total loss function and optimize network parameters;
[0183] The error prediction module is used to predict the frequency domain characteristics of workpiece machining errors based on the optimized network model.
[0184] Specific limitations regarding the CNC machine tool machining error prediction system can be found in the limitations of the CNC machine tool machining error modeling method described above, and will not be repeated here. Each module in the above system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0185] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0186] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for modeling machining errors in CNC machine tools, characterized in that, The method includes the following steps: a) Arrangement on the spindle system of CNC machine tools There are 10 temperature sensors, at least one of which is used to collect ambient temperature, and the remaining temperature sensors are located at key locations on the spindle at sampling intervals. Temperature is sampled to obtain temperature rise time series data with a total duration of T, forming a temperature rise data matrix. ; b) Inspect the surface morphology of the workpiece and obtain the surface profile function. The power spectral density (PSD) of the workpiece surface morphology was calculated based on Fourier transform, and the mid-frequency energy distribution, peak position, peak bandwidth and spectral shape characteristics were extracted. c) Construct a thermal spectrum neural operator network model and use the temperature rise data matrix The graph-frequency-time angular frequency joint spectral tensor is obtained by using graph Laplace transform and time-spectral decomposition. ; d) The joint spectral tensor is processed through the four-stage linkage structure of the aforementioned thermal spectral neural operator network model. The four-stage linkage structure, which is used for processing, includes: The continuous-time encoding module is used to improve the ability to express non-uniform sampling and dynamic operating conditions; The frequency registration module is used for explicit modeling of spectral peak drift and frequency axis misalignment. The optimal transport metric module is used to characterize the overall migration and local deformation of the spectrum as it evolves with temperature rise; The energy calibration module introduces energy constraints based on Parseval's theorem to ensure energy conservation and energy consistency in the PSD. e) The processed joint spectral tensor Z is mapped to PSD feature prediction values through a frequency domain mapping structure consisting of two parallel paths. The frequency domain mapping structure includes: The first approach involves using a low-rank, decomposable, parameterizable, learnable frequency domain kernel to perform weighted aggregation of the joint spectral tensor Z on the graph-frequency-time angular frequency plane, followed by non-negative activation to obtain the predicted PSD semantic features. ; Second path: Generate the predicted spatial frequency PSD distribution from the joint spectral tensor Z. Then, from the predicted spatial frequency PSD distribution Extracting frequency band energy features and spectral peak positions through polymerase chain reaction (PCR). and bandwidth And the frequency band energy characteristics and spectral peak positions and bandwidth Statistical feature fusion is performed to obtain the predicted values of PSD statistical features. ; The predicted values of the PSD semantic features and the predicted value of the PSD statistical features According to preset fusion weights and Weighted fusion is used to obtain the predicted PSD feature values. The PSD features include mid-frequency energy distribution features, spectral peak shift features, and spectral distortion features; f) The thermal spectrum neural operator network model is trained based on a preset total loss function, which includes PSD feature alignment loss, spectral domain reconstruction loss, energy consistency loss and spectral smoothing regularization term, to realize frequency domain characterization and prediction modeling of workpiece processing errors.
2. The method according to claim 1, characterized in that, The graphical Laplace transform mentioned in step c) specifically includes: The arrangement of temperature sensors can be abstracted as a graph G=(V,E), where V is the set of nodes and E is the set of edges; Constructing an adjacency matrix Sum-degree matrix Calculate the graph Laplacian matrix ; Performing spectral decomposition on the graph Laplacian matrix L yields... ,in The matrix of orthogonal eigenvectors It is an eigenvalue diagonal matrix; Each moment Temperature data Projecting onto the spectral base, we obtain ,in Indicates the first The excitation amplitude at each spatial eigenmode at any given moment.
3. The method according to claim 1, characterized in that, The learnable frequency domain kernel is parameterized using a low-rank decomposable parameterization: ; in, For channel For the The mixing coefficient of the passband, For the first Passband in the image frequency The shape function of the direction, For the first Passband in time and frequency The shape function of the direction, For the number of sensors, The number of time sampling points, This determines the number of output feature channels.
4. The method according to claim 1, characterized in that, The energy consistency loss term in step f) is: Construct the energy consistency loss term: ; in For the predicted spatial frequency PSD distribution, Spatial frequency coordinates The area of the frequency grid cell. For surface height variance; The energy consistency loss term is added to the total loss function to ensure that the predicted PSD satisfies the energy conservation constraint.
5. The method according to claim 1, characterized in that, The total loss function is defined as follows: ; in, For PSD feature alignment loss, For spectral domain reconstruction loss, For energy consistency loss, For spectral smoothing regularization, These are the weighting coefficients for each loss term.
6. The method according to claim 1, characterized in that, The output of the thermal spectrum neural operator network model contains two parallel paths: First approach: Directly map the joint spectral tensor Z to PSD semantic features using a learnable frequency domain kernel. ; Second path: First generate the predicted spatial frequency PSD distribution Then, the frequency band energy features are extracted from them. and the position of the spectral peaks and bandwidth ,right , and By fusing statistical features, we can obtain ; The final output is a weighted fusion of the two paths: ,in and For weight fusion.
7. The method according to claim 1, characterized in that, The temperature rise time series data acquisition parameters in step a) are set as follows: Total sampling time It lasts for 400 minutes; Sampling interval It lasts for 15 minutes; The initial temperature of each temperature sensor is the ambient temperature.
8. The method according to claim 1, characterized in that, The discretization calculation formula for PSD mentioned in step b) is as follows: ; Where N is the number of sampling points, =L / N, where L is the sampling length. For the m-th order spatial frequency, , This represents the workpiece surface profile function at discrete sampling points. The value at that location, Represents the imaginary unit. Indicates the index of the discrete sampling point.
9. A CNC machine tool machining error modeling system for implementing the method as described in any one of claims 1-8, characterized in that, include: Temperature sensing module, used to collect temperature rise time sequence data of key parts of CNC machine tool spindle system; The surface morphology detection module is used to acquire workpiece surface morphology data; The PSD feature extraction module is used to perform Fourier transform on surface topography data, calculate and extract PSD features; The thermal spectrum neural operator network module includes a continuous-time coding unit, a frequency registration unit, an optimal transmission metric unit, and an energy calibration unit, which are used to establish the mapping relationship between the temperature rise time series and PSD features. The loss calculation and optimization module is used to calculate the total loss function and optimize network parameters; The error prediction module is used to predict the frequency domain characteristics of workpiece machining errors based on the optimized thermal spectrum neural operator network model.
10. The application of the method according to claim 1 in thermal error compensation of CNC machine tools, characterized in that, include: The PSD characteristics of workpiece machining errors are predicted using the aforementioned thermal spectrum neural operator network model. Based on the predicted PSD characteristics, the frequency domain distribution characteristics of thermal errors are analyzed to identify the main error sources; Design targeted compensation strategies based on the frequency domain characteristics of the error, and optimize processing parameters; Compensation strategies are applied to the control system of CNC machine tools to reduce the impact of thermal deformation on machining accuracy.
Citation Information
Patent Citations
Machine tool thermal error compensation method and system based on data analysis
CN120143741A
Method and Apparatus for Estimating Error in Multi-Axis Controlled Machine
US20110218780A1