A five-axis numerical control machine tool space geometric error compensation method and system
Patent Information
- Application Number
- CN202611159238.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-01
- Publication Date
- 2026-10-09
AI Technical Summary
从空间误差分布机理上看,该方案采用固定点位的采样模式,数据采集控制未结合未测区域的误差波动特性进行自适应调整,无法对高波动区域细化推算粒度,也不能对分区推算后的边界误差跳变做平滑过渡处理,导致远离校准点的区域补偿精度快速下降,且子区域衔接处误差值突变,全空间范围内的误差补偿效果均匀性差,无法稳定支撑全域高精度加工
(1)本发明通过对初始误差特征进行空间梯度计算得到误差波动序列,依据波动阈值划分高波动与平稳区域,对高波动区域进行网格细分并采用克里金插值推算,对平稳区域直接映射,通过差异化的数据采集控制策略适配不同区域的误差复杂度,解决了固定采样粒度下高波动区域推算偏差大的问题,有效提升了复杂误差区域的补偿精度。
Smart Images

Figure CN122883751A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine tool spatial geometric error compensation technology, and in particular to a method and system for spatial geometric error compensation of a five-axis CNC machine tool. Background Technology
[0002] Currently, five-axis CNC machine tools are the core processing platform in the high-end equipment manufacturing field, and the precise control of their spatial geometric errors directly determines the final forming quality of complex curved surface parts. Current machine tool error compensation generally relies on high-density measurements of local trajectories and fixed points. However, due to limitations in the travel and operating space of the measuring equipment, the coverage of data acquisition and control is very limited, only acquiring a small amount of real error data for discrete positions. The error state of a large number of unmeasured areas remains unknown, easily leading to tool tip deviation and surface defects during the machining of large blades and other workpieces, making it difficult to meet the requirements of high-precision machining.
[0003] In a conventional machine tool error compensation method, error data is collected at preset calibration points, and a local error mapping model is constructed using polynomial fitting to directly compensate the corresponding points numerically. From the perspective of spatial error distribution mechanisms, this scheme uses a fixed-point sampling mode, and the data acquisition control does not adaptively adjust to the error fluctuation characteristics of unmeasured areas. It cannot refine the calculation granularity for high-fluctuation areas, nor can it smoothly handle boundary error jumps after partitioned calculations. This leads to a rapid decrease in compensation accuracy in areas far from the calibration point, abrupt error values at sub-regional junctions, and poor uniformity of error compensation across the entire space, making it unable to stably support high-precision machining across the entire area.
[0004] In summary, existing technologies suffer from insufficient overall accuracy in full-space error compensation due to the lack of regional adaptive strategies and boundary smoothing mechanisms in data acquisition and control. Summary of the Invention
[0005] This invention provides a method and system for compensating spatial geometric errors in a five-axis CNC machine tool, so as to achieve high-precision machining in the entire space of the CNC machine tool under complex working conditions.
[0006] In a first aspect, to solve the above-mentioned technical problems, the present invention provides a method for compensating spatial geometric errors in a five-axis CNC machine tool, comprising: Acquire the actual error data and spatial coordinate data of the target machine tool, and perform noise reduction and alignment processing on the actual error data and the spatial coordinate data to obtain standard error data; Feature extraction is performed on the standard error data to obtain initial error features. Based on the initial error features, the error fluctuation degree of the preset unmeasured area is calculated. If the error fluctuation level is greater than the preset fluctuation threshold, the preset unmeasured area is divided into grids to obtain local unmeasured sub-regions, and spatial error is calculated for the local unmeasured sub-regions to obtain updated error features; If the degree of error fluctuation is less than or equal to the fluctuation threshold, feature mapping is performed directly based on the initial error characteristics to obtain the updated error characteristics; The updated error features are subjected to boundary smoothing to obtain node correction values. The node correction values are then globally accumulated to obtain the global error value. An error compensation matrix is constructed based on the global error value, and error mapping is performed based on the error compensation matrix to obtain the target error distribution.
[0007] Preferably, the step of acquiring the actual error data and spatial coordinate data of the target machine tool, and performing noise reduction and alignment processing on the actual error data and the spatial coordinate data to obtain standard error data includes: Obtain the actual error data and spatial coordinate data of the target machine tool; The real error data is subjected to low-pass filtering to obtain denoised error data; The denoising error data and the spatial coordinate data are time-series aligned to obtain the spatial position deviation; The spatial position deviation is smoothed to obtain standard error data.
[0008] Preferably, the step of extracting features from the standard error data to obtain initial error features, and calculating the error fluctuation degree of the preset unmeasured region based on the initial error features, includes: The standard error data are subjected to regression fitting to obtain the initial error distribution; Obtain the machining space of the target machine tool and perform mesh generation to obtain the coordinates of the mesh nodes; Based on the initial error distribution, the coordinates of the grid nodes are predicted to obtain an initial feature vector; The initial feature vector is subjected to principal component dimensionality reduction to obtain the initial error features; Spatial gradient calculation is performed on the initial error characteristics to obtain the error fluctuation sequence; Based on the error fluctuation sequence, the variance of the preset unmeasured region is calculated to obtain the degree of error fluctuation.
[0009] Preferably, if the error fluctuation level is greater than a preset fluctuation threshold, the preset unmeasured area is divided into grids to obtain local unmeasured sub-regions, and spatial error is calculated for the local unmeasured sub-regions to obtain updated error features, including: If the error fluctuation level is greater than a preset fluctuation threshold, the region boundary of the preset unmeasured area is extracted; The boundary of the region is divided into grids to obtain local unmeasured sub-regions; Extract the boundary coordinate data of the local unmeasured sub-region, and construct a spatial distribution point set based on the boundary coordinate data and the corresponding initial error features; Spatial error is calculated based on the spatially distributed point set to obtain updated error characteristics.
[0010] Preferably, the step of calculating spatial errors based on the spatially distributed point set to obtain updated error features includes: Perform semivariance analysis based on the spatially distributed point set to obtain the semivariance sequence; Feature fitting is performed on the semivariance sequence to obtain spatial autocorrelation features; The updated error features are obtained by weighting the error based on the spatial autocorrelation features.
[0011] Preferably, if the error fluctuation level is less than or equal to the fluctuation threshold, directly performing feature mapping based on the initial error features to obtain updated error features includes: If the degree of error fluctuation is less than or equal to the fluctuation threshold, the geometric center coordinates of the processing space are obtained as the mapping reference; Based on the mapping reference, the preset unmeasured region is spatially discretized to obtain a feature mesh; Based on the initial error characteristics, the feature grid is mapped to its nearest neighbor to obtain the node error values; Spatial reconstruction is performed on the node error values to obtain updated error features.
[0012] Preferably, the step of performing boundary smoothing processing on the updated error features to obtain node correction values, and then performing global accumulation based on the node correction values to obtain a global error value, includes: Gradient calculation is performed based on the update error characteristics to obtain the boundary abrupt change gradient; Anomaly nodes are filtered based on the boundary abrupt change gradient to obtain anomaly boundary nodes. Then, weights are assigned based on the anomaly boundary nodes to obtain neighborhood smoothing weights. The node error value is weighted and corrected according to the neighborhood smoothing weight to obtain the node correction value. Spatial reconstruction is then performed based on the node correction value to generate a continuous error field. The continuous error field is sampled and summarized to obtain the global error value.
[0013] Preferably, the step of constructing an error compensation matrix based on the global error value and performing error mapping based on the error compensation matrix to obtain the target error distribution includes: Based on the global error value, the machine tool machining space is divided into a three-dimensional mesh to obtain a three-dimensional node set; Error components are calculated on the three-dimensional node set to obtain node error vectors. The node error vectors are then assigned positions to obtain an initial compensation matrix. The initial compensation matrix is filled with missing values to obtain the full-space compensation matrix; The target error distribution is obtained by performing spatial mapping processing on the full-space compensation matrix.
[0014] Secondly, the present invention provides a spatial geometric error compensation system for a five-axis CNC machine tool, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described above.
[0015] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method described above.
[0016] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention obtains the error fluctuation sequence by performing spatial gradient calculation on the initial error characteristics, divides the high fluctuation and stable regions according to the fluctuation threshold, subdivides the high fluctuation region into grids and uses Kriging interpolation to calculate, and directly maps the stable region. By adapting the error complexity of different regions through differentiated data acquisition and control strategies, it solves the problem of large calculation deviation in the high fluctuation region under fixed sampling granularity and effectively improves the compensation accuracy of complex error regions.
[0017] (2) This invention calculates the boundary abrupt gradient of the update error characteristics of each region, constructs a spherical neighborhood for abnormal boundary nodes that exceed the gradient threshold and calculates Gaussian smoothing weights, and generates a continuous error field by weighted correction, thereby eliminating the boundary jump caused by partitioned calculation, solving the problem of compensation discontinuity caused by error abruptness at the splicing of sub-regions, and ensuring the smooth transition and uniform distribution of the error field in the whole space.
[0018] (3) The present invention obtains the global error value by sampling and summarizing the whole domain, constructs an error compensation matrix based on three-dimensional grid nodes, fills the missing elements with inverse distance weighted interpolation, and finally maps the target error distribution in the whole space. It establishes a complete compensation link from discrete measurement points to continuous processing space, and realizes the synchronous improvement of error compensation accuracy and uniformity in the whole processing space. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of a spatial geometric error compensation method for a five-axis CNC machine tool provided in the first embodiment of the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] Reference Figure 1 The first embodiment of the present invention provides a method for compensating for spatial geometric errors in a five-axis CNC machine tool, comprising the following steps: S11, acquire the actual error data and spatial coordinate data of the target machine tool, and perform noise reduction and alignment processing on the actual error data and the spatial coordinate data to obtain standard error data; S12, extract features from the standard error data to obtain initial error features, and calculate the error fluctuation degree of the preset unmeasured area based on the initial error features; S13, if the error fluctuation degree is greater than the preset fluctuation threshold, the preset unmeasured area is divided into grids to obtain local unmeasured sub-regions, and spatial error is calculated for the local unmeasured sub-regions to obtain updated error features; S14, if the error fluctuation level is less than or equal to the fluctuation threshold, perform feature mapping directly based on the initial error characteristics to obtain updated error characteristics; S15, perform boundary smoothing processing on the updated error features to obtain node correction values, and perform global accumulation based on the node correction values to obtain global error values; S16, construct an error compensation matrix based on the global error value, and perform error mapping based on the error compensation matrix to obtain the target error distribution.
[0023] In step S11, the actual error data and spatial coordinate data of the target machine tool are acquired, and the actual error data and spatial coordinate data are subjected to noise reduction and alignment processing to obtain standard error data, including: Obtain the actual error data and spatial coordinate data of the target machine tool; The real error data is subjected to low-pass filtering to obtain denoised error data; The denoising error data and the spatial coordinate data are time-series aligned to obtain the spatial position deviation; The spatial position deviation is smoothed to obtain standard error data.
[0024] It should be noted that the actual error data was acquired using a laser interferometer in conjunction with a rotary axis measurement component. The data collected covered various geometric errors of the target machine tool's three linear axes and two rotary axes. The linear axis error data included positioning error, straightness error, and angular error, while the rotary axis error data included rotational angle positioning error, axial runout, and radial runout. The acquisition frequency was fixed at 100 Hz. This parameter was determined based on the dynamic change frequency of the five-axis CNC machine tool's geometric errors and the micron-level precision control requirements, ensuring complete capture of error fluctuations during machine tool operation. Spatial coordinate data was read in real-time from the machine tool's CNC system's position feedback module, containing real-time position information for all five motion axes. The data update frequency was consistent with the error acquisition frequency. The unit of measurement for linear axes was millimeters, and the unit of measurement for rotary axes was degrees. Both types of data are aligned at the start time of acquisition through hardware synchronous trigger signals with a trigger delay of less than 1 microsecond. The acquired raw data are stored in local cache in a unified timestamp order. The acquisition accuracy of a single linear axis error is controlled within ±0.1 micrometers, and the acquisition accuracy of a rotary axis angle error is controlled within ±0.1 arcseconds. This can truly reflect the error and position correspondence of a five-axis machine tool under a specific pose, providing reliable raw input for subsequent noise reduction and alignment processing.
[0025] It is worth noting that the low-pass filtering is implemented using a Fast Fourier Transform (FFT) algorithm. First, the actual error data in the time domain is converted to the frequency domain to complete signal decomposition. During the frequency domain decomposition, a cutoff frequency of 50 Hz is set. This parameter is determined based on the statistical results of the noise spectrum of equipment vibration at the machining site. Signal components higher than 50 Hz are identified as high-frequency noise generated by environmental vibration and electrical interference, containing no effective geometric error information. After filtering out the high-frequency components above the cutoff frequency in the frequency domain, the processed frequency domain signal is converted back to the time domain using an inverse FFT to obtain the denoised error data. This filtering process can remove approximately 10% of the high-frequency noise components from the actual error data, effectively reducing the impact of random interference on the error data. The calculation time for a single filtering operation is controlled within 0.5 milliseconds, fully adapting to the real-time response requirements of machine tool error compensation and completely preserving the effective low-frequency variation trends of machine tool geometric and thermal errors.
[0026] It is worth further explaining that the timing alignment is achieved using a linear timestamp matching method to correct the microsecond-level fixed offset caused by differences in the transmission links between the two types of data. During the alignment process, the timestamp sequences of the denoised error data and the spatial coordinate data are extracted separately. Using the hardware synchronization trigger time as a reference, the fixed time offset of the two types of data is calculated and the offset correction is completed, ensuring that the error value and position coordinates at the same moment correspond precisely. The timing synchronization error of this alignment method is controlled within ±0.5 microseconds, and the calculation accuracy of the spatial position deviation is controlled within ±0.05 micrometers. After time synchronization is completed, based on the serial kinematic model of the five-axis machine tool, homogeneous coordinate transformation is used to complete the positive error mapping, converting the individual geometric errors of each motion axis into the three-dimensional spatial position deviation of the tool tip in the machine tool base coordinate system. The positive error mapping calculation is performed based on a complete kinematic model incorporating the structural parameters of the rotary axis. The specific calculation expression is as follows: In the formula, , , These are the individual geometric error values for the three linear axes X, Y, and Z, respectively, with the dimension being micrometers; , These are the individual geometric error values for the two rotation axes A and B, respectively, with the dimension being microradians; The distance from the A-axis rotation center to the tool tip is in millimeters. The distance from the B-axis rotation center to the tool tip is in millimeters. , , The linear displacement error of the tool tip in the X, Y, and Z directions, obtained through positive mapping, is measured in micrometers. and The calculations are obtained from the machine tool's structural parameter files to ensure that they accurately reflect the impact of the rotation axis angle error on the tool tip position, so that the error strictly corresponds to the physical pose, providing accurate deviation data for subsequent smoothing processing.
[0027] Subsequently, smoothing was achieved using third-order polynomial fitting. Third-order polynomials are a common fitting method in CNC machine tool error modeling. For each fixed combination of rotary axis postures, a complete three-dimensional polynomial containing first-order, second-order, third-order, and cross-terms is constructed using the three linear axis coordinates as independent variables, resulting in 20 undetermined coefficients. During processing, discrete spatial position deviation data is used as input, and the coefficients of each order of the polynomial are solved based on the least squares criterion to minimize the sum of squared errors between the polynomial surface and all input discrete points. Surface fitting is then performed on the discrete deviation points collected under that posture, generating a continuous error reference surface covering the measured spatial range under the corresponding posture. After fitting, the reference surface is uniformly sampled according to a fixed spatial step size to obtain the standard error value corresponding to any linear axis coordinate within the measured spatial range under that posture. The above fitting and sampling processing is performed on all collected rotary axis posture combinations to obtain the set of standard error values for each posture, which together constitute the standard error data. Each set of data in this dataset contains the corresponding five-axis pose coordinates and their three-dimensional error values. The spatial resolution is typically set to a step size of 1 mm. The standard deviation of the fitted error data can be controlled within ±0.2 micrometers, which can provide continuous and high-precision compensation basis for CNC systems and support subsequent error distribution modeling and extrapolation.
[0028] In step S12, feature extraction is performed on the standard error data to obtain initial error features. Based on the initial error features, the error fluctuation degree of the preset unmeasured area is calculated, including: The standard error data are subjected to regression fitting to obtain the initial error distribution; Obtain the machining space of the target machine tool and perform mesh generation to obtain the coordinates of the mesh nodes; Based on the initial error distribution, the coordinates of the grid nodes are predicted to obtain an initial feature vector; The initial feature vector is subjected to principal component dimensionality reduction to obtain the initial error features; Spatial gradient calculation is performed on the initial error characteristics to obtain the error fluctuation sequence; Based on the error fluctuation sequence, the variance of the preset unmeasured region is calculated to obtain the degree of error fluctuation.
[0029] It should be noted that the regression fitting uses the support vector regression algorithm to construct a nonlinear mapping relationship between spatial coordinates and error values. A single input sample contains five-axis pose coordinates and their corresponding three-dimensional error values at the tool tip. The sample size is determined by the number of actual measurement points, typically ranging from hundreds to thousands of sets. Training aims to minimize structural risk. A radial basis function kernel is introduced to map the low-dimensional coordinates and error data to a high-dimensional feature space. Iteratively solving in the high-dimensional space maximizes the fit to the regression hyperplane of all data points. The training terminates when the change in the loss function after 20 consecutive iterations is less than 1e^(-1 / 2). -6 The penalty parameter is fixed at 100, and the kernel function parameter is fixed at 5. This set of parameters is calibrated using five-fold cross-validation on 80 sets of standard machine tool error datasets, which can ensure fitting accuracy while avoiding overfitting. The final initial error distribution is a calculable mapping relationship. Inputting any five-axis pose will output the corresponding tool tip error value, which can reflect the overall mapping law between the machine tool's spatial position and geometric error. The fitting accuracy for known measurement points can reach ±0.15 micrometers, providing a basic model support for subsequent error prediction of full-space mesh nodes.
[0030] It is worth noting that the machining space of the target machine tool is obtained by extracting its parameters from the geometric accuracy manual and CNC system soft limit configuration provided by the machine tool manufacturer. This includes the maximum travel range of the three linear axes and the effective working angle range of the two rotary axes, representing the entire working domain that the tool tip can stably reach. The linear axis range of a typical five-axis machine tool corresponds to a cuboid space of 1000 mm long, 800 mm wide, and 600 mm high. The rotary axis range is determined by the machine tool structure type, commonly ±110 degrees for the A-axis and ±360 degrees for the B-axis. This range serves as the entire domain for all subsequent error calculations and compensations. Uniform division is performed within this range to obtain the grid node coordinates. A fixed step size of 50 mm is set in the linear axis direction, and a fixed step size of 5 degrees is set in the rotary axis direction. The grid is divided at equal intervals along each of the five axes. The spatial intersection of all grid lines represents the grid node coordinates, and all nodes are arranged sequentially according to their spatial index.
[0031] The step size was determined experimentally. On a five-axis machine tool, meshes were created using linear axis step sizes of 20mm, 50mm, 80mm, and 120mm, and rotary axis step sizes of 2°, 5°, 8°, and 12°. Full-space error reconstruction was performed for each step size combination, and the reconstruction error was calculated based on the measured values of the laser interferometer at independent test points. A total of 160 sets of step size combinations were collected for comparison, and the combination with the smallest error was selected as the fixed step size.
[0032] It is worth further explaining that the error prediction uses the obtained initial error distribution as the mapping calculation carrier, and takes the coordinates of all grid nodes as input, performing forward calculation node by node to obtain the initial feature vector. The prediction process traverses all grid nodes sequentially according to spatial index order. Each node inputs its corresponding five-axis pose coordinates, and after the initial error distribution mapping calculation, outputs the three-dimensional prediction error value of the tool tip at that position, with the unit of measurement uniformly set to micrometers. The prediction error values of all nodes are concatenated and combined in spatial order to form a one-dimensional initial feature vector, which fully presents the preliminary distribution of the machine tool's full-space error, providing high-dimensional raw data for subsequent feature dimensionality reduction processing.
[0033] Principal component analysis (PCA) dimensionality reduction is used to reduce the dimensionality of the initial eigenvectors, eliminate data redundancy, and improve subsequent computational efficiency. The process first performs zero-mean normalization on the initial eigenvectors, making the mean of each dimension zero. Then, the covariance matrix is calculated by multiplying the zero-mean sample matrix by its transpose and dividing by the total number of samples minus one. The covariance matrix reflects the correlation between error data in each dimension. Eigenvalue decomposition is then performed on the covariance matrix, yielding eigenvalues and their corresponding eigenvectors arranged in descending order of value. Each eigenvalue corresponds to the energy proportion of a principal component. The cumulative contribution rate of the eigenvalues is calculated, and the top k eigenvectors whose cumulative contribution rate first exceeds 85% are selected as the principal component projection matrix. The original high-dimensional vectors are projected onto this low-dimensional subspace to obtain the dimensionality-reduced initial error features. The initial error features are the dimensionality-reduced eigenvectors with dimension k, where each dimension represents a major error variation pattern. The cumulative contribution rate threshold can be adjusted between 80% and 95% according to requirements; 95% is selected for scenarios with high accuracy requirements, and 80% is selected for scenarios with high real-time requirements. This processing method can retain most of the valid information in the original data, while significantly reducing the data dimensionality and effectively reducing the computational load of subsequent fluctuation analysis.
[0034] It should be noted that the spatial gradient calculation is performed on discrete nodes reconstructed from the initial error features in the spatial domain. The calculation process first uses the initial error features after dimensionality reduction to reconstruct a spatial error distribution corresponding to each grid node through inverse principal component analysis, restoring its spatial coordinate information. Then, based on this spatial node distribution, with the difference step size consistent with the grid division step size at 50 mm, the rate of change of error values between adjacent nodes is calculated along the transverse, longitudinal, and vertical dimensions of the machine tool machining space. The gradient value of each node is taken as the magnitude of the gradients in the three axial directions. The gradient values of all nodes are concatenated in spatial coordinate order to obtain an error fluctuation sequence. Each value in the sequence corresponds to the degree of error change at a spatial location; the larger the value, the more significant the error fluctuation in that area. The gradient accuracy of this calculation method is controlled within ±0.02 micrometers per millimeter, which can accurately identify areas of drastic error change and fully present the error fluctuation distribution across the entire spatial range, providing a quantitative basis for determining the degree of fluctuation in unmeasured areas.
[0035] It is worth noting that the degree of error fluctuation is calculated based on the segment data corresponding to the unmeasured region in the error fluctuation sequence, using statistical variance. The preset unmeasured region is the continuous spatial range within the machine tool processing space where no actual error measurement has been performed. The actual error data acquired in step S11 only covers some discrete pose points within the machine tool processing space. These measured pose points are typically hundreds to thousands of sets of five-axis pose coordinates and their corresponding error values collected by the laser interferometer along a specific measurement path. The continuous spatial region between the measurement paths is the unmeasured region where no actual error measurement has been performed. The spatial division between measured data and unmeasured regions is determined by the grid nodes after grid division in step S12. Any grid node into which actual error data falls is designated as the measured region in its local space; the space where no actual error data covers the grid nodes is the preset unmeasured region. Extract error fluctuation sequence segments corresponding to all nodes within the region. Use the 3σ criterion to remove outlier noise points from the sequence. Values exceeding ±3 standard deviations of the sequence mean are identified as outliers and removed. Calculate the variance of the remaining valid values; this variance represents the degree of error fluctuation in the corresponding unmeasured region. The larger the fluctuation value, the more complex the error space variation within the unmeasured region, and the higher the difficulty of estimation.
[0036] In step S13, if the error fluctuation level is greater than a preset fluctuation threshold, the preset unmeasured area is divided into grids to obtain local unmeasured sub-regions. Spatial error estimation is performed on the local unmeasured sub-regions to obtain updated error features, including: If the error fluctuation level is greater than a preset fluctuation threshold, the region boundary of the preset unmeasured area is extracted; The boundary of the region is divided into grids to obtain local unmeasured sub-regions; Extract the boundary coordinate data of the local unmeasured sub-region, and construct a spatial distribution point set based on the boundary coordinate data and the corresponding initial error features; Spatial error is calculated based on the spatially distributed point set to obtain updated error characteristics.
[0037] In one implementation, the step of calculating spatial errors based on the spatially distributed point set to obtain updated error features includes: The semivariance sequence is obtained by calculating based on the spatially distributed point set; Feature fitting is performed on the semivariance sequence to obtain spatial autocorrelation features; The updated error features are obtained by weighting the error based on the spatial autocorrelation features.
[0038] It should be noted that the preset fluctuation threshold was obtained through statistical calibration of sample data from 120 sets of five-axis machine tools, covering error surfaces of varying complexity. During the calibration process, the error variance value was calculated for each sample region, and a precision loss curve was plotted with the variance value on the x-axis and the percentage difference in estimated precision obtained using direct mapping and refined interpolation methods under the same precision index on the y-axis. Analysis of the curve shows that when the variance value exceeds 15, the percentage of precision loss shows a significant inflection point and rises sharply, indicating that the complexity of the error fluctuation has exceeded the reliable processing range of direct mapping. Therefore, 15 was chosen as the dividing threshold for distinguishing the severity of fluctuations.
[0039] When the error fluctuation exceeds the fluctuation threshold, determining the error variation of the corresponding unmeasured region becomes complex, requiring refined calculation to extract the region boundary. During boundary extraction, the set of grid nodes corresponding to the unmeasured region is used as input. Each node is checked for the presence of nodes in its six orthogonal adjacent directions. If at least one direction lacks adjacent nodes in the same region, it is identified as an outer node. Connecting all outer nodes sequentially forms a closed three-dimensional geometric outline, which is the region boundary. The boundary data contains the three-dimensional coordinate information of all nodes on the outer outline, completely defining the spatial range of the unmeasured region. Under normal conditions, the extracted region is a cuboid shape, with dimensions determined based on the actual range of the unmeasured region, such as 200 mm long, 150 mm wide, and 100 mm high. The positioning accuracy of this boundary extraction is consistent with the spatial resolution of the grid nodes, accurately delineating the spatial range requiring refined processing and providing geometric constraints for subsequent sub-region division.
[0040] It is worth noting that the meshing within the region boundary decomposes the large unmeasured area into multiple small sub-regions, improving the accuracy of error estimation in highly volatile areas. The meshing process uses the extracted region boundary as a constraint, setting the side length of the sub-regions to 25 mm. The internal space of the unmeasured area is equally divided in three dimensions along three axes. Each independent cubic unit obtained after the division is a local unmeasured sub-region, and all sub-regions are arranged in spatial index order. The size of this sub-region has been calibrated through multiple batches of experiments, allowing control over the number of sub-regions while ensuring estimation accuracy, thus avoiding excessive computation. After meshing, multiple evenly distributed local unmeasured sub-regions are obtained, each containing an independent spatial range and boundary nodes. Error estimation can be performed separately for each sub-region. By reducing the estimation range, the accuracy of error calculation in highly volatile areas is improved, providing a foundation for subsequent point set construction and interpolation estimation.
[0041] It is worth further explaining that the spatial distribution point set is constructed based on the boundary coordinate data and initial error features of a single unmeasured sub-region as the processing unit. The initial error features can be reconstructed into spatial error distribution data corresponding one-to-one with grid nodes through principal component inverse transformation, restoring the three-dimensional spatial coordinates and corresponding error values of each node. In the processing, the coordinates of all spatial nodes on the boundary of a single unmeasured sub-region are first extracted, and then the predicted error value corresponding to each boundary node is obtained by matching from the reconstructed spatial error distribution data. The spatial coordinates and corresponding error values are associated and combined one-to-one to form a three-dimensional spatial distribution point set. The number of boundary nodes in a single sub-region is usually around 50. Each data point in the point set contains two types of information: three-dimensional coordinates and corresponding error values, with the units of millimeters and micrometers, respectively. This point set can completely characterize the known error distribution state at the boundary of the sub-region and serve as known sample points for subsequent interpolation calculations. All point set data have undergone coordinate verification and numerical integrity verification, with no missing or abnormal data.
[0042] Subsequently, spatial error estimation is based on a spatially distributed point set. By analyzing the spatial statistical characteristics of known boundary points and using Kriging interpolation, the error values of unmeasured nodes within the sub-region are estimated. After gridding, the spatial scale of the local sub-region is reduced to 25 cubic millimeters. Within this small range, the trend component of error variation can be approximated as constant, and the residual part satisfies the second-order stationarity assumption. Therefore, Kriging can be applied for local accurate interpolation. The estimation process first generates a semivariance sequence based on the spatially distributed point set. Specifically, it iterates through all known point pairs in the set, calculates the spatial distance (lag distance) for each pair, and the square of the corresponding error difference, taking half of this as the semivariance value for that pair. All point pairs are grouped according to fixed lag distance intervals, and the average semivariance within each group is calculated to obtain the semivariance sequence corresponding to different lag distances. The semivariance sequence can quantitatively describe the spatial autocorrelation characteristics of the error, typically increasing with increasing lag distance and then stabilizing after reaching a certain distance. The expression for calculating the semivariance is: In the formula, h is the spatial lag distance between two points, with the dimension of millimeters; This represents the total number of point pairs with a lag distance equal to h. For position The error value at that location is measured in micrometers. is the experimental semivariance value corresponding to the lag distance h.
[0043] The discrete semivariance sequence is fitted to a continuously computable function curve to obtain the semivariance values at arbitrary intervals. A spherical model, commonly used in spatial interpolation, is employed for this fitting. The variation pattern of the spherical model closely matches the spatial continuous decay characteristics of machine tool errors, yielding spatial autocorrelation features after fitting. These features include three spatial autocorrelation parameters: nugget constant, sill value, and range. The nugget constant corresponds to the semivariance value when the lag distance approaches zero, reflecting the random fluctuations caused by measurement noise and abrupt changes in microscale errors. The sill value is the maximum value when the semivariance rises to a stable state, reflecting the total fluctuation amplitude of the error within that sub-region. The range is the lag distance when the semivariance first reaches the sill value, reflecting the maximum effective distance of the error's spatial autocorrelation; beyond this distance, the errors between two points no longer exhibit correlation. The fitting process aims to minimize the overall deviation between the model curve and the experimental discrete points. The least squares criterion is used to adjust the values of the three parameters, ultimately determining the optimal parameter combination to extract the spatial autocorrelation features.
[0044] Based on this, a system of ordinary kriging linear equations is constructed to solve for the interpolation weights of the nodes to be extrapolated. For a single node to be extrapolated, the system of equations takes the following form: In the formula, n is the total number of known points in the spatial distribution point set; The semivariance between the i-th and j-th known points is calculated from the fitted variogram. Let be the semivariance value between the i-th known point and the node to be calculated; The interpolation weights are the values corresponding to the i-th known point. The Lagrange multipliers are used to ensure unbiased estimation constraints. By solving this system of linear equations, the interpolation weight sequence and Lagrange multipliers corresponding to all known points are obtained. After verifying that the sum of all weights equals 1, i.e., satisfying the unbiased estimation condition, the error values of each known point are multiplied by their corresponding weights and summed to obtain the error estimate of the node to be estimated. The error values of the known nodes at the boundary of the local unmeasured sub-region are combined with the error estimates of all nodes to be estimated within it in spatial coordinate order to form a complete error data set covering all nodes in the local unmeasured sub-region, which is the update error feature corresponding to the current local unmeasured sub-region.
[0045] In step S14, if the error fluctuation level is less than or equal to the fluctuation threshold, feature mapping is directly performed based on the initial error features to obtain updated error features, including: If the degree of error fluctuation is less than or equal to the fluctuation threshold, the geometric center coordinates of the processing space are obtained as the mapping reference; Based on the mapping reference, the preset unmeasured region is spatially discretized to obtain a feature mesh; Based on the initial error characteristics, the feature grid is mapped to its nearest neighbor to obtain the node error values; Spatial reconstruction is performed on the node error values to obtain updated error features.
[0046] It should be noted that when the error fluctuation is less than or equal to the fluctuation threshold, the error change in the corresponding unmeasured area is considered to be gradual. A rapid mapping method can be used to obtain the error distribution. First, the geometric center coordinates of the machine tool's machining table are extracted as the mapping reference. The geometric center coordinates are calculated based on the effective machining space dimensions of the machine tool, taking the midpoint coordinates of the X, Y, and Z axial travel. This point is the geometric symmetry center of the machine tool's machining space, exhibiting optimal uniformity in error distribution. Using this as a reference for discretization ensures uniformity in mesh generation. The coordinate accuracy of the mapping reference is controlled within ±0.1 mm, serving as the origin and reference for subsequent feature mesh generation. This ensures that the discretized mesh is perfectly aligned with the overall machine tool coordinate system, without spatial offset issues. This reference selection method requires no additional calibration calculations and can be directly obtained based on the machine tool's travel parameters, adapting to the efficiency requirements of rapid calculation in stable regions and providing a coordinate reference origin for subsequent spatial discretization processing.
[0047] It is worth noting that for spatial discretization, the internal space of the unmeasured region is first uniformly divided using the mapping datum as the coordinate starting point. The division process sets the side length of the grid cells to 10 mm, extending sequentially along three axes to cover the entire unmeasured region. All the resulting cubic cells together constitute the feature grid, and all vertices of the grid are grid nodes. This grid step size was obtained through calibration experiments. The experiments compared the mapping accuracy and computation time under different grid step sizes (5 mm, 10 mm, and 20 mm) on 120 standard test pieces. The results show that a 10 mm step size can control the mapping error within 3% while ensuring that the processing time of a single region meets the process cycle requirements, achieving a balance between accuracy and efficiency. Each node in the feature grid contains unique three-dimensional spatial coordinates. All nodes are arranged in spatial index order, and the total number of nodes is determined based on the actual size of the unmeasured region, completely covering the entire spatial range of the unmeasured region without sampling blind spots. The discretized grid nodes provide target sampling points for subsequent error mapping, ensuring that the final error distribution has sufficient spatial resolution.
[0048] It is worth further explaining that the nearest neighbor feature mapping is based on the known node data of the initial error features. The initial error features can be reconstructed into spatial error distribution data corresponding one-to-one with the grid nodes through principal component inverse transform, restoring the three-dimensional spatial coordinates and corresponding error values of each node. The error values of the feature grid nodes are obtained. During the mapping process, using the coordinates of a single node in the feature grid as the query point, the known node with the closest spatial Euclidean distance is searched in the set of known nodes of the initial error features, and the error value corresponding to that known node is directly assigned to the currently queried grid node. After traversing all nodes of the feature grid, the node error value corresponding to each node is obtained, with the unit of measurement unified to micrometers. Spatial reconstruction converts the discrete node error values into a continuous spatial error field. The reconstruction process uses the discrete coordinate points corresponding to all node error values as input, and constructs a continuous three-dimensional tetrahedral topology by connecting adjacent grid nodes. The error value within each tetrahedral unit is calculated using linear interpolation, ultimately forming a continuous error distribution covering the entire unmeasured area, which is the updated error feature. The reconstructed updated error features can fully characterize the error distribution in the stable, unmeasured region, and have a unified data format and spatial coordinate system with the calculation results for the high-fluctuation region, providing standardized error data input for subsequent boundary smoothing processing of the entire region.
[0049] In step S15, the updated error features are subjected to boundary smoothing processing to obtain node correction values. These node correction values are then globally accumulated to obtain a global error value, including: Gradient calculation is performed based on the update error characteristics to obtain the boundary abrupt change gradient; Abnormal nodes are filtered based on the boundary abrupt change gradient to obtain abnormal boundary nodes, and weights are assigned based on the abnormal boundary nodes to obtain neighborhood smoothing weights. The node error value is weighted and corrected according to the neighborhood smoothing weight to obtain the node correction value. Spatial reconstruction is then performed based on the node correction value to generate a continuous error field. The continuous error field is sampled and summarized to obtain the global error value.
[0050] It should be noted that the boundary abrupt change gradient calculation is based on the update error characteristics of all regions, and gradient calculation is performed on the nodes at the boundary of adjacent regions. Adjacent regions refer to two spatially adjacent local unmeasured sub-regions or feature grid blocks defined in steps S13 or S14. The calculation process extracts the node error data on both sides of the boundary of adjacent regions, sets the difference step size to be consistent with the grid step size, calculates the error change rate along the three axes, and takes the maximum change rate as the boundary abrupt change gradient at the corresponding boundary location, with units of micrometers per millimeter. A larger gradient value indicates a more significant jump in error values on both sides of the boundary, and a more significant boundary error resulting from the partitioned extrapolation.
[0051] The preset gradient threshold was obtained by calibrating 120 sets of five-axis machine tool machining error samples and corresponding workpiece surface quality data. 120 sets of five-axis machine tool machining error sample data covering different machine tool operating conditions and machining parameters were collected. Each set of data included the measured value of the boundary abrupt change gradient at the boundary of the sub-region and the surface quality detection result of the corresponding machined workpiece. All samples were sorted from smallest to largest according to the boundary abrupt change gradient value, and grouped into intervals of 2 mm each. The surface quality pass rate of the workpiece within each interval was calculated. A curve was plotted with the boundary abrupt change gradient as the x-axis and the workpiece pass rate as the y-axis. The trend of the curve was observed, and the inflection point where the workpiece pass rate dropped sharply was found. Finally, 10 mm corresponding to this inflection point was determined as the optimal gradient threshold.
[0052] It's worth noting that the selection of anomalous boundary nodes is based on the comparison between the gradient of abrupt boundary changes and the gradient threshold. When the gradient of abrupt change at a certain boundary location is greater than the gradient threshold, an error jump is determined to exist at that location, and the corresponding grid node is an anomalous boundary node. Weight allocation is performed on a single anomalous boundary node. A spherical search neighborhood with a spatial radius of 5 mm is constructed with that node as the center. All neighboring nodes within the neighborhood are traversed, and a Gaussian kernel function is used to calculate the smooth weight of each neighboring node. The weight calculation expression is: In the formula, Let be the spatial Euclidean distance between the i-th adjacent node and the abnormal boundary node, with the dimension in millimeters; The Gaussian kernel bandwidth is set to 2.5 mm to match the neighborhood radius; Let be the original weight value of the i-th neighboring node. After calculating the original weights of all neighboring nodes, normalization is performed to make the sum of all weight values equal to 1, thus obtaining the final neighborhood smoothing weights.
[0053] It is worth further explaining that the weighted correction uses neighborhood smoothing weights as the calculation basis to correct the original error values of anomalous boundary nodes. The calculation process multiplies the original error value of each neighboring node in the neighborhood by its corresponding smoothing weight and then sums the results to obtain the node correction value for that anomalous boundary node. This correction value replaces the original error value of the node, completing the error correction for all anomalous boundary nodes. After node correction, during spatial reconstruction, all corrected grid node data in the entire space are used as input. Smooth transition curves are sequentially fitted along the X, Y, and Z axes. Then, three sets of orthogonal curve families are stretched into a continuous surface to generate a continuous error field with a smooth transition across the entire domain.
[0054] Subsequently, sampling and summarization are performed on the continuous error field to obtain global error values characterizing the overall error state of the machine tool. The sampling process sets a fixed spatial sampling interval of 2 mm, uniformly sampling along the X, Y, and Z axes throughout the entire machine tool machining space, extracting the error value corresponding to each sampling point to obtain a discrete final error data set. The summarization processing uses a spatial volume-weighted root mean square calculation method. Since each sampling point corresponds to a spatial unit of the same volume under uniform sampling, the calculation first squares the magnitude of the error vector of all sampling points, multiplies it by the volume element corresponding to a single sampling point, sums them, divides by the total volume of the machining space, and then takes the square root to obtain the final result. The calculation expression is: In the formula, N is the total number of sampling points; Let i be the three-dimensional error vector of the i-th sampling point. The magnitude of the error vector is expressed in micrometers. The volume element corresponding to a single sampling point is calculated from the cube of the sampling interval, and its dimension is cubic millimeters. The total volume of the machine tool's machining space is expressed in cubic millimeters. This is the global error value, measured in micrometers. Under normal operating conditions, this value is approximately 45 micrometers. This value directly reflects the overall error level across the entire machine tool space, with sampling and calculation accuracy controlled within ±0.5 micrometers. This global error value provides global error data support for the subsequent construction of the full-space error compensation matrix.
[0055] In step S16, an error compensation matrix is constructed based on the global error value, and error mapping is performed based on the error compensation matrix to obtain the target error distribution, including: Based on the global error value, the processing space is divided into a three-dimensional mesh to obtain a three-dimensional node set; Error components are calculated on the three-dimensional node set to obtain node error vectors. The node error vectors are then assigned positions to obtain an initial compensation matrix. The initial compensation matrix is filled with missing values to obtain the full-space compensation matrix; The target error distribution is obtained by performing spatial mapping processing on the full-space compensation matrix.
[0056] It should be noted that during the 3D mesh generation process, the object being meshed is the effective machining space of the machine tool. The mesh generation step size is determined based on the overall magnitude of the global error, generally following the principle that the larger the error, the smaller the step size. Through extensive simulation and measurement data calibration, by traversing different error levels within the range of 0 to 100 micrometers, the compensation residual and matrix operation time under different mesh step size combinations were compared. The goal was to minimize the compensation residual while meeting real-time computation requirements, thus determining the correspondence between step size and error. In this example, when the global error value is less than 20 micrometers, the compensation accuracy is not sensitive to mesh density, so a step size of 80 millimeters is set; when the global error value is in the range of 20 to 60 micrometers, a step size of 50 millimeters is set to balance accuracy and efficiency; when the global error value is greater than 60 micrometers, the compensation resolution needs to be improved by reducing the step size, so a step size of 25 millimeters is set.
[0057] After determining the step size based on the obtained global error value, the machining space is divided into three dimensions at equal intervals along the X, Y, and Z linear axes. The spatial intersections of all grid lines are extracted to obtain a set of three-dimensional nodes. Each node in the set contains a unique three-dimensional spatial index and corresponding physical coordinates. The total number of nodes matches the machine tool travel size, and under normal operating conditions, there are approximately several thousand nodes.
[0058] It is worth noting that during the calculation of the node error vector, the spatial coordinates of a single 3D node are used as input. The three-dimensional linear displacement error of the tool tip at that node is obtained by interpolation from the continuous error field, namely the positioning error components along the X, Y, and Z axes. Then, by calculating the difference in linear displacement error between this node and its two adjacent nodes along each axis, and dividing it by the corresponding spatial step size, the angular error components at that node are obtained, including pitch, yaw, and roll angles. The linear displacement and angular error components are combined sequentially to form a 3D node error vector. The linear displacement component in the vector is measured in micrometers, and the angular error component is measured in microradians. After calculating the error vectors for all nodes, the error vectors are assigned as matrix elements to a preset 3D matrix structure according to the spatial index position of each node in the 3D mesh, resulting in the initial compensation matrix. The dimension of the matrix corresponds exactly to the number of mesh elements in the 3D node set, and each matrix element is mapped one-to-one with its spatial position, providing the initial matrix basis for subsequent filling of missing values.
[0059] It is worth further elaborating that the missing value filling is performed on the unassigned missing elements in the initial compensation matrix. These missing elements are typically caused by internal machine tool interference or measurement blind spots. The filling process extracts the known error vectors of the 26 neighboring nodes within the spatial neighborhood of the missing node as input, and assigns weights using an inverse distance weighting method. The weights are inversely proportional to the square of the spatial distance from the neighboring node to the missing node. The expression for calculating the weight of a single neighboring node is: In the formula, Let be the three-dimensional Euclidean distance from the j-th neighboring node to the missing node, with the dimension in millimeters; the denominator is the sum of the reciprocals of the squares of the distances to all 26 neighboring nodes, used for weight normalization. Let be the weight value of the j-th adjacent node, and the sum of all weights is 1.
[0060] The error vectors of each adjacent node are multiplied by their corresponding weights and summed to obtain the interpolation error vectors at the missing positions, which are then filled into the corresponding positions in the matrix. After traversing all missing elements, a full-space compensation matrix without any blank elements is obtained. This filling method can effectively complete the error data of the measurement blind zone, ensuring that the compensation matrix covers the entire effective machining space of the machine tool, and providing complete full-space compensation data for subsequent error mapping.
[0061] Subsequently, during the spatial mapping process, based on the full-space compensation matrix, and following the coordinate system rules of the machine tool CNC system, the real-time error compensation value for any coordinate point on the machining trajectory is obtained by trilinear interpolation using the error values of eight adjacent grid nodes. After traversing all machining trajectory points, a continuous error distribution covering the entire machine tool machining space is obtained, which is the target error distribution. This mapping method can adapt to machining trajectories of arbitrary shapes and can be directly imported into the machine tool CNC system for real-time error compensation. The target error distribution enables high-precision error mapping from finite measurement points to the entire machining space, significantly improving the overall machining accuracy and compensation reliability of a five-axis CNC machine tool.
[0062] In summary, this invention discloses a spatial geometric error compensation method for a five-axis CNC machine tool, comprising: acquiring the actual error data and spatial coordinate data of the target machine tool; performing denoising and alignment processing on the actual error data and the spatial coordinate data to obtain standard error data; extracting features from the standard error data to obtain initial error features; calculating the error fluctuation degree of a preset unmeasured region based on the initial error features; if the error fluctuation degree is greater than a preset fluctuation threshold, dividing the preset unmeasured region into a grid to obtain local unmeasured sub-regions; performing spatial error estimation on the local unmeasured sub-regions to obtain updated error features; if the error fluctuation degree is less than or equal to the fluctuation threshold, directly performing feature mapping based on the initial error features to obtain updated error features; performing boundary smoothing processing on the updated error features to obtain node correction values; performing global accumulation based on the node correction values to obtain a global error value; constructing an error compensation matrix based on the global error value; and performing error mapping based on the error compensation matrix to obtain the target error distribution. This invention uses measured error data from limited locations to extrapolate the error state of unmeasured areas, smoothly connects the overall error distribution, and constructs a compensation basis, thereby achieving high-precision machining of the entire space of CNC machine tools under complex working conditions.
[0063] The second embodiment of the present invention provides a spatial geometric error compensation system for a five-axis CNC machine tool, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps of the method described above.
[0064] It should be noted that the five-axis CNC machine tool spatial geometric error compensation system provided in this embodiment of the invention is used to execute all the process steps of the five-axis CNC machine tool spatial geometric error compensation method in the above embodiment. The working principle and beneficial effect of the two are one-to-one, so they will not be described again.
[0065] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0066] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A method for compensating spatial geometric errors in a five-axis CNC machine tool, characterized in that, include: Acquire the actual error data and spatial coordinate data of the target machine tool, and perform noise reduction and alignment processing on the actual error data and the spatial coordinate data to obtain standard error data; Feature extraction is performed on the standard error data to obtain initial error features. Based on the initial error features, the error fluctuation degree of the preset unmeasured area is calculated. If the error fluctuation level is greater than the preset fluctuation threshold, the preset unmeasured area is divided into grids to obtain local unmeasured sub-regions, and spatial error is calculated for the local unmeasured sub-regions to obtain updated error features; If the degree of error fluctuation is less than or equal to the fluctuation threshold, feature mapping is performed directly based on the initial error characteristics to obtain the updated error characteristics; The updated error features are subjected to boundary smoothing to obtain node correction values. The node correction values are then globally accumulated to obtain the global error value. An error compensation matrix is constructed based on the global error value, and error mapping is performed based on the error compensation matrix to obtain the target error distribution.
2. The spatial geometric error compensation method for a five-axis CNC machine tool according to claim 1, characterized in that, The process of acquiring the actual error data and spatial coordinate data of the target machine tool, and performing noise reduction and alignment processing on the actual error data and spatial coordinate data to obtain standard error data includes: Obtain the actual error data and spatial coordinate data of the target machine tool; The real error data is subjected to low-pass filtering to obtain denoised error data; The denoising error data and the spatial coordinate data are time-series aligned to obtain the spatial position deviation; The spatial position deviation is smoothed to obtain standard error data.
3. The spatial geometric error compensation method for a five-axis CNC machine tool according to claim 1, characterized in that, The step of extracting features from the standard error data to obtain initial error features, and calculating the error fluctuation degree of the preset unmeasured region based on the initial error features, includes: The standard error data are subjected to regression fitting to obtain the initial error distribution; Obtain the machining space of the target machine tool and perform mesh generation to obtain the coordinates of the mesh nodes; Based on the initial error distribution, the coordinates of the grid nodes are predicted to obtain an initial feature vector; The initial feature vector is subjected to principal component dimensionality reduction to obtain the initial error features; Spatial gradient calculation is performed on the initial error characteristics to obtain the error fluctuation sequence; Based on the error fluctuation sequence, the variance of the preset unmeasured region is calculated to obtain the degree of error fluctuation.
4. The spatial geometric error compensation method for a five-axis CNC machine tool according to claim 1, characterized in that, If the error fluctuation level is greater than a preset fluctuation threshold, the preset unmeasured area is divided into grids to obtain local unmeasured sub-regions. Spatial error is calculated for the local unmeasured sub-regions to obtain updated error features, including: If the error fluctuation level is greater than a preset fluctuation threshold, the region boundary of the preset unmeasured area is extracted; The boundary of the region is divided into grids to obtain local unmeasured sub-regions; Extract the boundary coordinate data of the local unmeasured sub-region, and construct a spatial distribution point set based on the boundary coordinate data and the corresponding initial error features; Spatial error is calculated based on the spatially distributed point set to obtain updated error characteristics.
5. The spatial geometric error compensation method for a five-axis CNC machine tool according to claim 4, characterized in that, The step of calculating spatial errors based on the spatially distributed point set to obtain updated error features includes: The semivariance sequence is obtained by calculating based on the spatially distributed point set; Feature fitting is performed on the semivariance sequence to obtain spatial autocorrelation features; The updated error features are obtained by weighting the error based on the spatial autocorrelation features.
6. The spatial geometric error compensation method for a five-axis CNC machine tool according to claim 3, characterized in that, If the error fluctuation level is less than or equal to the fluctuation threshold, feature mapping is directly performed based on the initial error features to obtain updated error features, including: If the degree of error fluctuation is less than or equal to the fluctuation threshold, the geometric center coordinates of the processing space are obtained as the mapping reference; Based on the mapping reference, the preset unmeasured region is spatially discretized to obtain a feature mesh; Based on the initial error characteristics, the feature mesh is mapped to its nearest neighbor to obtain the node error values; Spatial reconstruction is performed on the node error values to obtain updated error features.
7. The spatial geometric error compensation method for a five-axis CNC machine tool according to claim 1, characterized in that, The process of performing boundary smoothing on the updated error features to obtain node correction values, and then globally accumulating these node correction values to obtain a global error value, includes: Gradient calculation is performed based on the update error characteristics to obtain the boundary abrupt change gradient; Anomaly nodes are filtered based on the boundary abrupt change gradient to obtain anomaly boundary nodes. Then, weights are assigned based on the anomaly boundary nodes to obtain neighborhood smoothing weights. The node error value is weighted and corrected according to the neighborhood smoothing weight to obtain the node correction value. Spatial reconstruction is then performed based on the node correction value to generate a continuous error field. The continuous error field is sampled and summarized to obtain the global error value.
8. The spatial geometric error compensation method for a five-axis CNC machine tool according to claim 3, characterized in that, The step of constructing an error compensation matrix based on the global error value, and performing error mapping based on the error compensation matrix to obtain the target error distribution includes: Based on the global error value, the processing space is divided into a three-dimensional mesh to obtain a three-dimensional node set; Error components are calculated on the three-dimensional node set to obtain node error vectors. The node error vectors are then assigned positions to obtain an initial compensation matrix. The initial compensation matrix is filled with missing values to obtain the full-space compensation matrix; The target error distribution is obtained by performing spatial mapping processing on the full-space compensation matrix.
9. A spatial geometric error compensation system for a five-axis CNC machine tool, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the method described in any one of claims 1 to 8.