A gantry machining center adaptive positioning error compensation control method and system
By synchronously acquiring multi-source data and using a multi-field coupled positioning error prediction model, combined with online recursive least squares and fuzzy PID control, adaptive positioning error compensation for gantry machining centers was achieved, improving positioning accuracy and adaptability to working conditions. This solved the problems of incomplete error coverage, poor adaptability to working conditions, and weak accuracy retention in existing technologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG MEISTER CNC TECH CO LTD
- Filing Date
- 2026-05-08
- Publication Date
- 2026-06-26
AI Technical Summary
Existing positioning error compensation technologies for gantry machining centers suffer from incomplete coverage of error sources, poor adaptability to working conditions, insufficient real-time compensation, and weak accuracy retention. They are unable to effectively address the composite errors under the coupling of multiple physical fields and the characteristic drift of machine tools during long-term service.
A multi-source real-time data synchronous acquisition and multi-field coupled positioning error prediction model is adopted. Combined with the online recursive least squares algorithm of forgetting factor and fuzzy PID adaptive adjustment, dynamic compensation is generated for real-time compensation. Iterative correction is carried out through closed-loop feedback optimization mechanism to achieve adaptive compensation for multiple error sources.
It significantly improves the positioning error compensation accuracy and working condition adaptability, reduces machine tool maintenance costs and accuracy decay rate, improves processing quality and production efficiency, and is compatible with mainstream CNC systems such as Siemens, FANUC, and Huazhong CNC.
Smart Images

Figure CN122284498A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of high-end intelligent manufacturing technology, specifically to an adaptive positioning error compensation control method and system for gantry machining centers. Background Technology
[0002] Gantry machining centers are core processing equipment in the high-end equipment manufacturing industry, and their positioning accuracy directly determines the processing quality and assembly precision of large structural components. Current positioning error compensation technologies for gantry machining centers mainly suffer from the following limitations: Incomplete coverage of error sources: Traditional static compensation schemes only perform offline calibration compensation for quasi-static errors such as geometric errors, ignoring thermal errors caused by temperature field changes during processing, elastic deformation errors caused by cutting load and structural self-weight, dynamic following errors caused by servo system response lag, and composite errors under the coupling effect of multiple physical fields. The compensation accuracy is insufficient in actual processing scenarios.
[0003] Poor adaptability to working conditions: Existing compensation models mostly use fixed parameters, which cannot adapt to the dynamic changes in working conditions such as feed rate, spindle load, and temperature during machining. The model prediction deviation is large when switching working conditions, and the compensation effect deteriorates significantly in scenarios such as roughing and finishing switching and sudden load changes.
[0004] Insufficient real-time compensation: The compensation update cycle of traditional compensation schemes is usually on the order of seconds, which cannot be synchronized with the millisecond-level interpolation cycle of the CNC system. There is a compensation lag problem, making it difficult to track the dynamic changes of time-varying errors such as thermal deformation and dynamic following error.
[0005] Insufficient consideration of gantry structure characteristics: For gantry structures driven by dual Y-axis, most existing solutions ignore the synchronous positioning error of dual axes and the additional error caused by the beam sway, which can easily lead to problems such as excessive flatness of large-span machining surfaces and uneven wear of guide rails.
[0006] Weak accuracy retention: Existing models lack a closed-loop feedback optimization mechanism, making it impossible to adapt to the drift of characteristics such as component wear and stiffness reduction during long-term machine tool service. The compensation accuracy continuously decays with service time, requiring frequent shutdowns for recalibration, which affects production efficiency. Summary of the Invention
[0007] To overcome the shortcomings of the prior art, the present invention aims to provide an adaptive positioning error compensation control method and system for gantry machining centers. Without changing the original control logic of the CNC system or increasing the hardware cost significantly improves the dynamic positioning accuracy, working condition adaptability and machining quality stability of the gantry machining center, and reduces the maintenance cost and accuracy decay rate during long-term service of the machine tool.
[0008] To solve the above problems, the technical solution adopted by the present invention is as follows: An adaptive positioning error compensation control method for a gantry machining center includes the following steps: Simultaneously collect multi-source real-time operating condition data and position feedback data from the gantry machining center; Based on the collected multi-source data, a multi-field coupled positioning error prediction model is constructed to calculate the comprehensive positioning error value of each feed axis under the current working condition. Based on the deviation between the comprehensive positioning error value calculated in real time and the allowable positioning error threshold, the weight parameters of the multi-field coupled positioning error prediction model are corrected online using an online recursive least squares algorithm with a forgetting factor; and a dynamic compensation quantity is generated by a fuzzy PID adaptive adjustment algorithm, and the dynamic compensation quantity is subjected to amplitude constraint and smoothing filtering. The processed dynamic compensation amount is injected into the interpolation cycle of the CNC system in real time to pre-compensate the command position, generate the corrected motion control command and execute it. After compensation is performed, the actual position data of each feed axis is collected in real time, the positioning deviation after compensation is verified, and the data is fed back to the multi-field coupled positioning error prediction model for iterative correction or optimization of the model.
[0009] Preferably, the acquisition of multi-source real-time operating condition data and location feedback data adopts a hard-triggered synchronization mechanism, and the acquired raw data is preprocessed by filtering and denoising, removing outliers, and aligning timestamps. In this system, the trigger signal of the hard-triggered synchronization mechanism is generated by frequency division of the interpolation clock of the CNC system, and the data acquisition node, the grating ruler reading node, and the CNC system instruction output node share the same trigger clock.
[0010] Preferably, the construction of the multi-field coupled positioning error prediction model and the calculation of the integrated positioning error value include: The Sobol global sensitivity analysis method is used to rank all candidate influencing factors for each error term, screen out the core independent influencing factors for each error term, as well as the cross-coupled influencing factors that have a significant impact on two or more error terms, eliminate redundant influencing factors, and construct the input parameter set for each sub-item error. For geometric error, thermal error, load deformation error, and dynamic tracking error, independent sub-models for predicting sub-errors are constructed based on their respective input parameter sets, and the three-dimensional spatial error vectors of each sub-error at the target motion position of the feed axis are output. Based on the cross-coupling influence factor, a multi-error coupling mapping matrix is constructed. The cross-influence coefficient between each sub-error is quantified through the coupling mapping matrix, and the three-dimensional spatial error vector output by each sub-error prediction sub-model is corrected. The corrected three-dimensional spatial error vectors of each component error are uniformly transformed to the machine tool reference coordinate system.
[0011] Preferably, when the change in operating conditions exceeds a preset threshold for the change in operating conditions, the forgetting factor is lowered to the range of 0.90 to 0.95. When the change in operating conditions does not exceed the preset threshold for the change in operating conditions, the forgetting factor will be increased to the range of 0.96 to 0.99. The forgetting factor ranges from 0.90 to 0.99, and the variation range of the operating conditions is the weighted average of the rate of change of feed rate, spindle load, and core measuring point temperature.
[0012] Preferably, when performing amplitude constraint and smoothing filtering on the dynamic compensation amount, the following is included: the amplitude of the compensation amount does not exceed the maximum allowable feed step size within a single interpolation cycle of the corresponding feed axis, and the maximum allowable feed step size is the product of the machine tool's rated rapid traverse speed and the interpolation cycle; The smoothing filter uses a first-order low-pass filter, and the filter cutoff frequency does not exceed 1 / 5 of the position loop bandwidth of the servo system.
[0013] Preferably, the processed dynamic compensation amount is injected into the interpolation cycle through the external coordinate offset interface of the CNC system or the high-speed real-time bus. The interpolation cycle is 1 to 5 ms, and the compensation amount is updated and injected once in each interpolation cycle.
[0014] Preferably, when verifying the compensated positioning deviation, if the positioning deviation exceeds the preset allowable error threshold, an emergency iterative correction of the model is triggered, and the deviation data is stored in the working condition sample library; if the positioning deviation is within the preset allowable error threshold, the compensation data is stored as a positive sample in the working condition sample library for offline optimization and online incremental learning of the model.
[0015] Preferably, before collecting multi-source data, the following steps are also included: under the standard working conditions of no-load and constant temperature in the gantry machining center, the geometric error of each feed axis is calibrated for the entire stroke using a laser interferometer, the initial parameters of the multi-field coupled positioning error prediction model are obtained, and an initial error mapping table is constructed.
[0016] Preferably, the position feedback data also includes: position feedback data of the dual Y-axis grating ruler, and the comprehensive positioning error value also includes the synchronous positioning error of the dual Y-axis of the gantry; Among them, the synchronous positioning error is calculated in real time based on the position feedback data of the dual Y-axis grating ruler. The generated dynamic compensation includes the synchronous error compensation component of the dual Y-axis, which is used to correct the position synchronization deviation of the dual Y-axis.
[0017] An adaptive positioning error compensation control system for a gantry machining center includes: The data synchronization acquisition module is used to synchronously acquire multi-source real-time operating condition data and position feedback data of the gantry machining center; The multi-field coupling error prediction module is used to construct a multi-field coupling positioning error prediction model based on the collected multi-source data, and calculate the comprehensive positioning error value of each feed axis under the current working condition. The adaptive compensation adjustment module is used to correct the weight parameters of the multi-field coupled positioning error prediction model online based on the deviation between the comprehensive positioning error value calculated in real time and the allowable positioning error threshold. It also generates dynamic compensation amount through a fuzzy PID adaptive adjustment algorithm and performs amplitude constraint and smoothing filtering on the dynamic compensation amount. The real-time compensation injection module is used to inject the processed dynamic compensation into the interpolation cycle of the CNC system in real time, pre-compensate the command position, generate the corrected motion control command and execute it. The closed-loop feedback optimization module is used to collect the actual position data of each feed axis in real time after compensation is performed, verify the positioning deviation after compensation, and feed it back to the multi-field coupled positioning error prediction model for iterative correction or optimization of the model. Compared with the prior art, the beneficial effects of the present invention are as follows: Significantly improved compensation accuracy: Through multi-field coupling error modeling and multi-error source coverage, the dynamic positioning error compensation accuracy is significantly improved compared with the traditional static compensation scheme. In the precision machining scenario, the positioning error can be controlled within 5μm, the dual Y-axis synchronization error can be controlled within 2μm, the flatness of the large-span machining surface is greatly improved, and the machining defect rate of large structural parts is effectively reduced.
[0018] Significantly enhanced adaptability to working conditions: The dynamic parameter adjustment mechanism with forgetting factor can complete the adaptation to new working conditions within 10 to 20 sampling periods. The adaptation speed is significantly improved compared to the fixed parameter model. It can stably adapt to various complex processing scenarios such as roughing and finishing switching, load fluctuation, and temperature change, and there is no obvious compensation accuracy fluctuation when switching working conditions.
[0019] Production efficiency is effectively improved: the 1~5ms interpolation cycle synchronous compensation mechanism does not require interruption of the processing flow, the closed-loop feedback optimization mechanism supports online incremental learning, greatly reduces the number of downtime calibrations, significantly reduces annual downtime maintenance time, and significantly improves machine tool uptime.
[0020] Extended machine tool lifespan: The compensation amplitude constraint and smoothing filtering mechanism avoid servo oscillation and machine tool hard impact. The dual Y-axis synchronous error compensation reduces uneven wear of the guide rail and transmission pair. The accuracy decay rate during long-term machine tool service is significantly reduced, extending the service life of core transmission components.
[0021] Low implementation cost and strong adaptability: No need to modify the internal control logic of the CNC system, the system can be deployed simply by connecting external sensors and open interfaces. It is compatible with mainstream CNC systems such as Siemens, Fanuc, and Huazhong CNC, and can be directly applied to the factory configuration of new machine tools and the upgrading and transformation of in-service machine tools, which has high promotion and application value.
[0022] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0023] Figure 1 This is a flowchart illustrating the adaptive positioning error compensation control method for a gantry machining center according to an embodiment of the present invention. Figure 2 This is a flowchart of the error impact factor decoupling and screening process based on Sobol global sensitivity analysis according to an embodiment of the present invention. Figure 3 A flowchart illustrating the construction of the multi-component error independent prediction sub-model in this embodiment of the invention; Figure 4 This is a flowchart illustrating the construction and error correction of the multi-error coupling mapping matrix according to an embodiment of the present invention. Figure 5 This is a flowchart of the multi-item error vector synthesis and integrated positioning error calculation according to an embodiment of the present invention; Figure 6 This is an interactive diagram of the adaptive positioning error compensation control system module for a gantry machining center according to an embodiment of the present invention.
[0024] The following are the diagram labels: 1. Data Synchronization Acquisition Module; 2. Multi-Field Coupling Error Prediction Module; 3. Adaptive Compensation Adjustment Module; 4. Real-time Compensation Quantity Injection Module; 5. Closed-Loop Feedback Optimization Module. Detailed Implementation
[0025] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0026] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0027] Example 1, see Figure 1This invention provides an adaptive positioning error compensation control method for gantry machining centers, applicable to gantry machining centers including an X-axis beam feed axis, a Y-axis gantry longitudinal feed axis, and a Z-axis spindle vertical feed axis. This method is based on a CNC system and includes the following steps: S1. Synchronously collect multi-source real-time operating condition data and position feedback data of the gantry machining center. The multi-source real-time operating condition data includes at least multi-point temperature data, load data, vibration data, wear data, and feed speed and acceleration of each feed axis. The position feedback data includes the actual position data collected by the grating ruler of each feed axis and the command position data issued by the CNC system. S2. Based on the collected multi-source data, construct a multi-field coupled positioning error prediction model that integrates geometric error, thermal error, load deformation error and dynamic following error, and calculate the comprehensive positioning error value of each feed axis in the machine tool reference coordinate system corresponding to the target motion position under the current working condition. S3. Preset positioning error allowable threshold and working condition change range threshold. Based on the deviation between the comprehensive positioning error value calculated in real time and the positioning error allowable threshold, the weight parameters of the multi-field coupled positioning error prediction model are corrected online through an online recursive least squares algorithm with a forgetting factor. At the same time, combined with the motion state of the current feed axis and the dynamic response parameters of the servo system, a dynamic compensation amount is generated through a fuzzy PID adaptive adjustment algorithm, and the dynamic compensation amount is subjected to amplitude constraint and smoothing filtering. S4. The processed dynamic compensation amount is injected into the interpolation cycle of the CNC system in real time. Before the interpolation calculation, the command position is pre-compensated to generate the corrected motion control command and drive each feed axis to perform the corresponding feed action. S5. After compensation is executed, the actual position data of each feed axis is collected in real time, the positioning deviation after compensation is verified, and the verification result is fed back to the multi-field coupled positioning error prediction model for iterative correction or optimization of the model to achieve adaptive closed-loop compensation control of positioning error.
[0028] Specifically, this method is a dynamic error compensation technology developed for gantry machining centers that include the X-axis beam feed axis, the Y-axis gantry longitudinal feed axis, and the Z-axis spindle vertical feed axis. The core principle is to use a collaborative mechanism of multi-source data perception, multi-field coupling error modeling, adaptive parameter adjustment, and closed-loop feedback optimization to provide real-time and accurate compensation for multi-dimensional errors during machining. This offsets machine tool positioning deviations from the control level, improves machining accuracy and adaptability to working conditions, and follows a closed-loop control logic of "perception-prediction-adjustment-execution-feedback".
[0029] The positioning error of a gantry machining center is not caused by a single factor, but rather by the coupled effects of four types of errors in the spatial and temporal dimensions: geometric deviation of the mechanical structure, thermal deformation caused by temperature field changes, structural elastic deformation caused by cutting load and self-weight, and dynamic response lag of the servo system. Furthermore, the magnitude of the error dynamically changes with the machine tool's operating conditions and service life. This method overcomes the limitations of traditional static error compensation, which only targets a single error term and cannot adapt to changes in operating conditions, achieving dynamic compensation that covers multiple error sources and adapts to multiple operating conditions.
[0030] (1) High-synchronization sensing of multi-source data (S1 step) This step is a prerequisite for accurate error prediction. It employs a hard-triggered synchronization signal generated by frequency division of the CNC system's interpolation clock to drive multiple types of sensors, grating ruler reading nodes, and CNC system command output nodes to share the same clock reference. This enables synchronous acquisition of multiple measurement points' temperature, load, vibration, wear, feed motion parameters, and the actual position of the grating ruler and the system command position, with the time synchronization error controlled within 10μs. The raw acquired data undergoes filtering, noise reduction, outlier removal, and timestamp alignment preprocessing to ensure strict time matching of all input data, avoiding inaccurate error prediction due to data timing deviations. For the dual Y-axis gantry structure, position feedback data from the dual Y-axis gratings is also acquired synchronously to provide input for synchronization error compensation.
[0031] (2) Multi-field coupled positioning error modeling and solution (S2 step) This step is the core of the method, achieving accurate calculation of the comprehensive error through the logic of "decoupling-modeling-coupling-synthesis": Influence factor decoupling screening: The Sobol global sensitivity analysis method is used to rank the contribution of all operating parameters that may affect the error, eliminate redundant factors with a contribution rate of less than 5%, and screen out the core independent influence factors that only affect a single error term, as well as the cross-coupled influence factors that affect multiple errors. These are used to construct accurate input parameter sets for each subsequent sub-error model, avoiding redundant parameters from interfering with the model accuracy.
[0032] Independent modeling of sub-items: For four types of errors, namely geometric errors (static errors caused by machine tool manufacturing and assembly deviations and long-term service wear), thermal errors (structural thermal expansion and contraction caused by motor heating, cutting heat, and changes in ambient temperature), load deformation errors (structural elastic deformation caused by workpiece weight, cutting force, and the self-weight of moving parts), and dynamic tracking errors (servo system response lag and position tracking deviation during acceleration and deceleration), independent sub-prediction models are constructed based on their respective input parameter sets, and the three-dimensional spatial error vector of each error term at the target motion position is output.
[0033] Coupling effect quantification correction: Based on the cross-coupling effect factor, a multi-error coupling mapping matrix is constructed to quantify the degree of mutual influence between different error terms (cross-influence coefficient 0-1), and the output results of each sub-error sub-model are corrected to restore the true coupling relationship between errors. For example, the increase in temperature will change the structural stiffness at the same time, thus affecting the magnitude of the load deformation error.
[0034] Comprehensive error vector synthesis: The corrected individual error vectors are uniformly transformed into the machine tool reference coordinate system. The angular errors in the three linear directions (X / Y / Z) and around the three axes (X / Y / Z) are vector superimposed. The angular errors are converted into corresponding linear positioning error components using the Abbe error formula. Finally, the comprehensive positioning error value of the target position is obtained by synthesis. At the same time, the synchronous positioning error of the dual Y axes is additionally calculated.
[0035] (3) Adaptive parameter adjustment and compensation amount generation (S3 step) This step achieves dynamic model adaptation and stable output of compensation quantities, and includes two parallel adjustment paths: Online correction of prediction model weights: Preset thresholds for allowable positioning error and operating condition variation (20% of rated operating condition). Based on the deviation between the comprehensive error calculated in real-time and the allowable thresholds, an online recursive least squares algorithm with a forgetting factor is used to update the model weight parameters. The forgetting factor is dynamically adjusted in the range of 0.90-0.99: When the weighted rate of change of feed speed, load, and core measuring point temperature exceeds the operating condition threshold, the forgetting factor is lowered to 0.90-0.95 to reduce the weight of historical data and improve the model's adaptation speed to new operating conditions; when the operating conditions are stable, it is raised to 0.96-0.99 to retain the weight of historical data and improve model stability.
[0036] Dynamic compensation value optimization generation: Combining the current feed axis motion state and servo system dynamic response parameters, a fuzzy PID adaptive algorithm is used to generate a dynamic compensation value that adapts to the current working conditions. At the same time, the compensation value is subject to two constraints: First, amplitude constraint, the compensation value does not exceed the maximum allowable feed step size of the feed axis within a single interpolation cycle (rated rapid traverse speed × interpolation cycle), to avoid the compensation value exceeding the servo system response range; Second, smoothing filtering, a first-order low-pass filter with a cutoff frequency not exceeding 1 / 5 of the servo position loop bandwidth is used to process the compensation value, to avoid servo oscillation caused by sudden changes in the compensation value, and to ensure the stable operation of the machine tool.
[0037] (4) Real-time interpolation injection of compensation amount (S4 step) This step achieves seamless integration of compensation and CNC machining processes. The processed dynamic compensation amount (including dual Y-axis synchronous error compensation components) is synchronously injected through the CNC system's external coordinate offset interface or high-speed real-time bus with an interpolation cycle of 1-5ms. Before the CNC system's interpolation calculation, the original command position is pre-corrected, and after generating the adjusted motion control command, the feed axis is driven to execute the action, ensuring that the compensation action and machining motion are strictly synchronized and will not interrupt the normal machining process.
[0038] (5) Closed-loop feedback iterative optimization (S5 step) This step achieves continuous optimization of the compensation effect. After compensation is executed, the actual position data of the feed axis is collected in real time by the grating ruler to verify the positioning deviation after compensation. If the deviation exceeds the allowable threshold, the model is immediately triggered for emergency iterative correction, and the deviation data is stored in the working condition sample library. If the deviation is within the allowable range, the compensation data is stored as a positive sample in the sample library for offline optimization and online incremental learning of the model. This enables the model accuracy to be continuously improved by the service time of the bed and the accumulation of working condition samples, forming an adaptive closed-loop control mechanism of "compensation-verification-optimization".
[0039] In one possible embodiment, in step S1, the acquisition of multi-source real-time operating condition data and position feedback data adopts a hard-triggered synchronization mechanism, and the acquired raw data is preprocessed by filtering and denoising, removing outliers and aligning timestamps, so that the time synchronization error of the data is less than 10μs. In this system, the trigger signal of the hard-triggered synchronization mechanism is generated by frequency division of the interpolation clock of the CNC system. The data acquisition node, the grating ruler reading node, and the CNC system instruction output node share the same trigger clock so that the timestamps of the acquired data and the instruction data correspond one-to-one.
[0040] Specifically, this embodiment is a fundamental supporting link for positioning error compensation in gantry machining centers. Its core solution is to address the time synchronization problem of multi-source heterogeneous data, avoiding the calculation deviation of subsequent error prediction models due to data timing misalignment, and providing a highly reliable input data source for full-process compensation control.
[0041] Error compensation control in a gantry machining center is a highly real-time closed-loop system. The time synchronization accuracy of multi-source data directly determines the accuracy of error prediction and compensation. If there are deviations in the acquisition times of operating condition data (temperature, load, etc.), grating position feedback data, and CNC system command data, the matched machine tool motion state will not correspond, leading to a significant difference between the error calculation result and the actual deviation. The compensation effect may even introduce additional positioning errors. Traditional soft-trigger acquisition relies on independent clocks of different nodes. Affected by system scheduling delays, the synchronization error is usually in the millisecond range, which cannot meet the compensation requirements of high-precision machining. Therefore, this embodiment adopts a hard-trigger synchronization mechanism to eliminate clock deviation at the hardware level.
[0042] This embodiment uses the core clock of the CNC system as the sole time reference, and achieves strict synchronization of multi-node acquisition actions through clock frequency division and signal distribution: Unified trigger source generation: The interpolation clock of the CNC system is the core reference clock for controlling the machine tool's motion, directly determining the timing of motion command output in each interpolation cycle. In this embodiment, the interpolation clock is frequency-divided to generate a unified hard trigger signal. The trigger frequency matches the data acquisition requirements and the interpolation cycle, ensuring that the acquisition action is aligned with the CNC system's command output rhythm.
[0043] Multi-node clock source: The trigger signal is simultaneously distributed to three types of core nodes through hardware circuitry: multi-source working condition data acquisition node (acquisition unit of sensors such as temperature, load, vibration, etc.), grating ruler reading node (position sampling circuit of grating of each feed axis), and CNC system command output node (motion command sending port). The three types of nodes share the trigger clock as the sampling / output time reference, and there is no independent clock drift problem.
[0044] Strict timestamp alignment: Each node performs data sampling or command output operations at the same moment it receives the trigger signal, and the timestamps of all data are uniformly based on the clock cycle of the trigger clock. This ensures that the timestamps of working condition data, position feedback data, and command data correspond one-to-one. At the hardware level, the time synchronization error of each data is controlled within 10μs, which is far lower than the millisecond-level interpolation period. This ensures that all input data correspond to the actual working condition of the machine tool at the same moment during subsequent model solving.
[0045] The raw data contains issues such as noise, abnormal abrupt changes, and minute time-series shifts, requiring three preprocessing steps to further improve data quality: Filtering and denoising: Adaptive filtering algorithms are used for the noise characteristics of different types of data. For example, moving average filtering is used to suppress random fluctuations in temperature data, wavelet filtering is used to remove power frequency interference in vibration data, and Kalman filtering is used to filter high-frequency noise in grating ruler position data, thus preserving the true trend of data change.
[0046] Outlier removal: Thresholds are set based on the physical meaning of the data and the historical operating conditions. For example, the feed rate cannot exceed the machine tool's rated rapid traverse speed, and the temperature change rate cannot exceed the material's thermal conduction limit. Abnormal jump data that exceeds the threshold are removed to avoid invalid data interference with model input caused by sensor failure or electromagnetic interference.
[0047] Secondary timestamp alignment: For the minute time offsets that still exist after hard-triggered acquisition (such as the difference in response delay between different sensors), secondary interpolation alignment is performed based on the timestamp of the unified trigger clock to ensure that all data input to the error prediction model are completely matched in the time dimension.
[0048] In one possible embodiment, step S2, the construction of the multi-field coupled positioning error prediction model and the calculation of the integrated positioning error value, includes: S201. Impact Factor Decoupling and Screening: Using the Sobol global sensitivity analysis method, all candidate impact factors for each error term are ranked by sensitivity. Core independent impact factors whose contribution rate to the corresponding error term exceeds a preset contribution rate threshold are screened, as well as cross-coupled impact factors that have a significant impact on two or more error terms. Redundant impact factors are eliminated, and input parameter sets for each sub-item error are constructed. The preset contribution rate threshold is 5%. (See [reference]). Figure 2 ; S202. Construction of Sub-models for Specific Errors: For geometric errors, thermally induced errors, load deformation errors, and dynamic following errors, independent sub-models for predicting specific errors are constructed based on their respective input parameter sets. These models output the three-dimensional spatial error vector of each sub-error at the target motion position of the feed axis. (See reference...) Figure 3 ; S203. Quantification and Correction of Cross-Coupling Influence: Based on the cross-coupling influence factor, a multi-error coupling mapping matrix is constructed. The cross-influence coefficients between various sub-errors are quantified using this matrix. Based on these cross-influence coefficients, the three-dimensional spatial error vectors output by each sub-error prediction sub-model are corrected. The cross-influence coefficient ranges from 0 to 1 and is used to characterize the degree of influence of one sub-error on another. (See [reference needed]). Figure 4 ; S204. Comprehensive Positioning Error Vector Synthesis: The corrected three-dimensional spatial error vectors of each component error are uniformly transformed to the machine tool reference coordinate system. Vector superposition is then performed along the X, Y, and Z linear directions and the angular directions around the X, Y, and Z axes. The angular errors are converted into positioning error components in the corresponding linear directions using the Abbe error formula. Finally, the comprehensive positioning error value at the target's moving position is synthesized. (See reference...) Figure 5 .
[0049] Specifically, this embodiment addresses the core issue of coupling and accurate quantification of multi-source errors, overcoming the limitations of traditional error models that only consider a single error term and ignore the cross-effects of multiple physical fields. It enables high-precision prediction of comprehensive positioning errors under complex working conditions.
[0050] The positioning error of a gantry machining center is the result of the coupling effects of multiple physical fields, including geometry, heat, force, and dynamic control. On the one hand, increased temperature not only directly generates thermal deformation error but also reduces structural stiffness, thus altering the magnitude of load deformation error. Changes in feed rate simultaneously affect dynamic following error and thermal error caused by frictional heat generation; these different error terms are not independent. On the other hand, using all possible operating parameters as model inputs leads to a sharp increase in model complexity, a higher risk of overfitting, and a decrease in solution speed, failing to meet the requirements for real-time compensation. This embodiment follows the logic of "decoupling and screening first, then independent modeling, followed by coupling correction, and finally vector synthesis," accurately reproducing the true formation mechanism of the error while controlling model complexity.
[0051] (1) Decoupling and screening of impact factors (S201) The core of this step is to streamline high-value input parameters for subsequent models and avoid interference from redundant parameters: The Sobol global sensitivity analysis method is adopted to quantify the contribution of each candidate influencing factor (such as feed rate, measuring point temperature, spindle load, motion acceleration, etc.) to the output of each error term through Monte Carlo simulation. It can simultaneously analyze the independent contribution of single factors and the coupled contribution of multi-factor interactions, so as to achieve comprehensive quantification of error influencing factors.
[0052] Factors are categorized and screened based on a preset 5% contribution rate threshold: By eliminating redundant influencing factors with a contribution rate of less than 5% (such as temperature measurement points in non-critical locations and auxiliary axis parameters with extremely weak impact on error), the model input dimension is significantly reduced, and the solution efficiency is improved. Core independent influencing factors that contribute more than 5% to a single error term were selected. For example, geometric error is mainly affected by the position of the feed axis and the wear of the components, while thermal error is mainly affected by the temperature of each measuring point and the running time. These factors were used as the dedicated inputs for the corresponding sub-error sub-models. We screened out cross-coupled influencing factors that contribute more than 5% to two or more error items. For example, the feed rate simultaneously affects the dynamic following error and the thermal error caused by frictional heat generation, and the spindle load simultaneously affects the load deformation error and the thermal error caused by bearing heating. These factors are the core basis for quantifying the cross-effect of errors.
[0053] (2) Construction of sub-models for partial errors (S202) This step involves constructing appropriate prediction models for different error formation mechanisms to achieve accurate and independent prediction of each error term: For geometric errors: These are quasi-static errors with weak correlation to operating conditions, mainly caused by machine tool manufacturing and assembly deviations and long-term service wear. Based on the initial calibration data of the laser interferometer and real-time wear monitoring data, a polynomial mapping model between geometric errors and feed axis positions is constructed, and the corresponding three-dimensional vector of geometric error is output.
[0054] For thermally induced errors, which are typical temperature field-related dynamic errors, a prediction model (such as a finite element reduced-order model) is constructed based on multi-point temperature data and the physical laws of heat conduction and thermal expansion and contraction to predict the three-dimensional error vector of structural thermal deformation under different temperature distributions.
[0055] For load deformation error: which is a force field-related dynamic error, an elasticity mapping model is constructed based on the spindle load, feed axis position and structural stiffness parameters to predict the three-dimensional error vector of structural elastic deformation under different loads.
[0056] For dynamic tracking error: which is a dynamic error related to the control system, a servo system transfer function model is constructed based on the feed rate, acceleration and servo system dynamic parameters to predict the three-dimensional vector of tracking deviation between the command position and the actual position during the motion process.
[0057] The four sub-models are solved independently and in parallel, and output the three-dimensional spatial error vectors of the corresponding error terms at the target's motion position. The error components include six dimensions: deviations in the three linear directions (X, Y, and Z) and angular deviations around the three axes (X, Y, and Z).
[0058] (3) Quantification and correction of cross-coupling effects (S203) This step restores the true coupling effect between different error terms, making up for the limitations of independent modeling: Based on the selected cross-coupling influence factors, a multi-error coupling mapping matrix is constructed. The matrix elements are the cross-influence coefficients between the various sub-errors, with values ranging from 0 to 1: a coefficient of 0 indicates that there is no coupling effect between the two error terms, and a coefficient of 1 indicates that the change in one error term will be completely transmitted to the other error term. For example, an increase in temperature leads to a decrease in structural stiffness, which will increase the load deformation error under the same load. The cross-influence coefficient of thermal error on load error can be set to 0.2-0.3 (the specific value is determined through experiments).
[0059] Based on the cross-influence coefficient of the coupling mapping matrix, the output results of each sub-error sub-model are corrected: the final output value of a certain error term = the predicted value of the independent sub-model + Σ (the predicted values of other error terms × the corresponding cross-influence coefficient), quantifying the linkage effect between errors and improving the prediction accuracy of the model for multi-physics coupled scenarios.
[0060] (4) Synthesis of integrated positioning error vector (S204) This step involves transforming all individual errors to the same coordinate system and synthesizing them to obtain the final composite error. First, the corrected three-dimensional vectors of each sub-error are uniformly transformed to the machine tool reference coordinate system through a coordinate transformation matrix to eliminate the coordinate system differences output by each sub-model.
[0061] The error components in the six dimensions are vector-superimposed: the error components in the three linear directions X / Y / Z are directly added; the angular error components around the three axes X / Y / Z are converted into the corresponding linear positioning error components using the Abbe error formula (angular errors will be amplified into linear deviations due to the distance between the measurement point and the tool tip (Abbe arm)), and then superimposed into the error in the corresponding linear direction.
[0062] The final synthesis yields the comprehensive positioning error value at the target's moving position, which includes the final positioning deviation in three linear directions, serving as the core basis for generating subsequent compensation values.
[0063] In one possible embodiment, in step S3, the forgetting factor ranges from 0.90 to 0.99, and the change in operating conditions is the weighted average of the change rates of feed rate, spindle load, and core measuring point temperature. When the change in operating conditions exceeds the preset threshold for the change in operating conditions, the forgetting factor will be lowered to the range of 0.90 to 0.95 to improve the model's adaptation speed to new operating conditions. When the change in operating conditions does not exceed the preset threshold for the change in operating conditions, the forgetting factor is adjusted to the range of 0.96 to 0.99 to improve the stability of the model.
[0064] Specifically, this embodiment is the core adjustment mechanism for the multi-field coupled positioning error prediction model to achieve full-condition adaptiveness. It solves the problem of balancing the "adaptation speed of new conditions" and the "prediction accuracy of stable conditions" in scenarios with dynamic changes in operating conditions, avoiding the defects of traditional fixed parameter models that cannot adapt to operating condition drift or that frequent parameter updates lead to prediction fluctuations.
[0065] The operating conditions of a gantry machining center dynamically change with the machining task (e.g., switching from high load and low feed in roughing to low load and high feed in finishing), and the machine tool characteristics slowly drift over service time (e.g., increased component wear and slow decrease in stiffness). The online recursive least squares algorithm with a forgetting factor controls the weight of historical data when updating model parameters: the smaller the forgetting factor, the faster the weight of historical data decays, and the easier it is for the model to learn the characteristics of new operating conditions; the larger the forgetting factor, the more weight of historical data is retained, and the more stable the model output. Traditional algorithms with a fixed forgetting factor cannot simultaneously adapt to both drastic operating conditions and steady-state operation. This technology dynamically adjusts the forgetting factor based on the magnitude of operating condition changes to achieve adaptive switching of model characteristics.
[0066] (1) Quantification mechanism for changes in operating conditions This embodiment selects three core parameters that have the most significant impact on error as characterization indicators of operating condition changes: feed rate (reflecting dynamic motion characteristics), spindle load (reflecting force field load characteristics), and core measuring point temperature (reflecting temperature field thermal characteristics). The comprehensive operating condition change range is calculated by weighted averaging. First, calculate the real-time change rate of the three types of parameters respectively: Change rate = |Parameter value at current time - Parameter value in previous period| / Rated value of the parameter × 100%, to eliminate the differences in the dimensions and ranges of different parameters.
[0067] Weights are set according to the degree of influence of the three types of parameters on the positioning error (e.g., the maximum impact of load change on error can be set to 0.4, and feed speed and core temperature can each be set to 0.3; specific weights can be calibrated through experiments). The weighted sum of the change rates of the three types of parameters is used to obtain the comprehensive working condition change range, thereby realizing the quantitative characterization of working condition fluctuations.
[0068] (2) Dynamic regulation logic of forgetting factor The preset threshold for the change in operating conditions is 20% of the machine tool's rated operating parameters, serving as the boundary for judging whether the operating conditions are "steady-state" or "abrupt." The forgetting factor is dynamically and adaptively adjusted within the range of 0.90 to 0.99. Scenarios with drastic changes in operating conditions (change magnitude > preset operating condition change magnitude threshold): When the operating conditions change drastically due to switching of processing tasks or adjustment of parameters, the reference value of historical data under the old operating conditions is significantly reduced. At this time, the forgetting factor is lowered to the range of 0.90~0.95 to accelerate the weight decay speed of historical data, allowing the model to learn the error mapping relationship under the new operating conditions first, greatly improving the model's adaptation speed to the new operating conditions, and avoiding large prediction biases caused by the model's reliance on old data.
[0069] Steady-state operating conditions (variation amplitude ≤ preset operating condition variation amplitude threshold): When the processing conditions fluctuate stably, historical data has high reference value. At this time, the forgetting factor is increased to the range of 0.96~0.99 to retain the weight of historical data as much as possible, suppress the interference of random noise and small operating condition fluctuations on model parameters, improve the stability of model output, and avoid the decrease in prediction accuracy caused by frequent parameter oscillations.
[0070] In this embodiment, by adjusting the forgetting factor, the model can have two characteristics: when the operating conditions change drastically, the new operating conditions can be adapted in 10 to 20 sampling periods, which significantly improves the adaptation speed compared with a fixed forgetting factor; under steady-state operating conditions, the fluctuation range of the model prediction error is significantly reduced, achieving a balance between adaptability and stability.
[0071] In one possible embodiment, step S3, when performing amplitude constraint and smoothing filtering on the dynamic compensation amount, includes: the amplitude of the compensation amount does not exceed the maximum allowable feed step size within a single interpolation cycle of the corresponding feed axis, and the maximum allowable feed step size is the product of the machine tool's rated rapid traverse speed and the interpolation cycle; The smoothing filter uses a first-order low-pass filter, and the filter cutoff frequency does not exceed 1 / 5 of the servo system position loop bandwidth to avoid servo system oscillation caused by sudden changes in compensation.
[0072] Specifically, this embodiment is the core link to ensure the stable operation of the machine tool during the compensation execution phase. It solves the problem of the compatibility between the compensation amount and the servo system response capability, avoiding servo oscillation, deterioration of the machined surface quality, or even machine tool impact caused by unreasonable compensation amount, and ensuring the safety and stability of the machining process while achieving high-precision compensation.
[0073] The essence of dynamic compensation is to correct the original motion commands of the CNC system. Its output must match the servo system's response capability: if the compensation amplitude exceeds the servo system's maximum feed capacity per cycle, the command will fail to be executed, resulting in accumulated command deviation; if the frequency of the compensation change exceeds the servo system's response bandwidth, it will cause high-frequency oscillations in the servo system, leading to jitter in the feed motion, which in turn reduces machining accuracy and may even damage the machine tool's transmission components in severe cases. This embodiment constrains the compensation amount from two dimensions: amplitude and frequency, ensuring that the compensation action is fully adapted to the characteristics of the servo system.
[0074] (1) Compensation Amplitude Constraint Mechanism This constraint limits the upper limit of the single-cycle compensation amount in a spatial dimension, ensuring that the compensation command is within the execution capability of the servo system: First, calculate the maximum allowable feed step size for a single interpolation cycle of the feed axis: The rated rapid traverse speed of the machine tool is the highest movement speed of the feed axis hardware design. Multiply it by the interpolation cycle of the CNC system to obtain the maximum displacement that the feed axis can respond to within a single interpolation cycle, which serves as the upper limit of the compensation amplitude. For example, if the rated rapid traverse speed of the machine tool is 60m / min (i.e., 1m / s) and the interpolation cycle is 1ms, the maximum allowable feed step size per cycle is 1mm, that is, the absolute value of the compensation amount per cycle cannot exceed 1mm.
[0075] The amplitude of the original compensation amount output by the fuzzy PID algorithm is truncated: if the original compensation amount exceeds the maximum allowable feed step size, the compensation amount is limited to ± the maximum allowable feed step size to avoid response lag and instruction backlog caused by compensation instructions that exceed the servo capability, and at the same time to prevent machine tool hard impact caused by excessive compensation amount.
[0076] (2) Compensation quantity smoothing filtering mechanism This constraint limits the rate of change of the compensation amount in the frequency dimension to prevent servo oscillation caused by sudden changes in the compensation amount: A first-order low-pass filter is used to smooth the compensation amount. Its core function is to filter out high-frequency abrupt changes in the compensation amount that exceed the cutoff frequency, making the changes in the compensation amount smoother. The filter cutoff frequency is set to 1 / 5 or less of the servo system's position loop bandwidth: the servo system's position loop bandwidth is a core parameter characterizing the servo system's response speed, representing the highest frequency of commands the servo can stably follow. If the frequency of the compensation amount's change exceeds the position loop bandwidth, the servo system cannot follow accurately, resulting in position oscillations. Setting the cutoff frequency to 1 / 5 of the bandwidth allows for sufficient stability margin, ensuring that changes in the compensation amount always remain within the servo system's stable response range.
[0077] The two constraints work together to achieve a balance between compensation accuracy and operational stability: amplitude constraint prevents the compensation amount from exceeding the hardware capability under extreme conditions, and smoothing filtering avoids system oscillations caused by high-frequency fluctuations in the compensation amount. This can significantly reduce the fluctuation of the position tracking error of the servo system during the compensation process and reduce the additional vibration introduced by the compensation action.
[0078] In one possible embodiment, in step S4, the processed dynamic compensation amount is injected into the interpolation cycle through the external coordinate offset interface of the CNC system or the high-speed real-time bus. The interpolation cycle is 1 to 5 ms. Each interpolation cycle completes the update and injection of the compensation amount to achieve high-precision compensation.
[0079] This embodiment is the core link in realizing the implementation of dynamic error compensation. It solves the problem of synchronizing the compensation amount with the motion control timing of the CNC system, avoids the loss of compensation accuracy caused by compensation lag and timing misalignment, and ensures the precise coordination between compensation actions and the machine tool processing process.
[0080] The positioning error of a CNC machine tool changes dynamically in real time with the working conditions (such as thermal deformation and force-induced deformation that continuously evolve during machining). The injection of compensation must match the motion control cycle of the CNC system. If the compensation update cycle is much longer than the interpolation cycle, the compensation will be misaligned with the current actual machining position / working condition, resulting in compensation lag. If the compensation injection method conflicts with the internal control logic of the CNC system, the compensation cannot be executed accurately, or even interferes with normal machining instructions. This embodiment achieves synchronization between the compensation action and the machine tool movement through a highly time-matched injection method and update cycle setting.
[0081] (1) Compensation quantity injection link adaptation mechanism This embodiment uses an injection path compatible with the native control logic of the CNC system, avoiding modifications to the internal algorithms of the system while ensuring the reliability of compensation execution. The external coordinate offset interface of the CNC system is used as the preferred interface for injecting compensation. This interface is an external correction channel natively reserved by the CNC system. After the compensation is injected, it will be directly superimposed on the coordinate command of the current interpolation cycle. There is no need to modify the internal interpolation and servo control logic of the system. It has strong adaptability and low development threshold, and is suitable for the secondary development scenarios of most mainstream CNC systems. The compensation can be directly recognized and executed by the system without additional conversion delay.
[0082] For high-end CNC systems that support high-speed real-time buses (such as EtherCAT, Profinet IRT, SERCOS III, etc.), the compensation amount can be directly written into the interpolator's register via the real-time bus. This method has a transmission delay of less than 1μs, higher timing synchronization accuracy, and is suitable for compensation requirements in high-dynamic machining scenarios.
[0083] (2) Compensation update cycle matching mechanism This embodiment strictly binds the compensation update cycle with the CNC system interpolation cycle to ensure real-time matching between the compensation amount and the machining status: The interpolation period is set to a range of 1~5ms to adapt to the accuracy requirements of different processing scenarios: a 3~5ms interpolation period can be used for roughing scenarios to reduce the system's computational load; a 1~2ms interpolation period is used for finishing and high-dynamic processing scenarios to improve the compensation response speed. Each interpolation period completes an update of "working condition acquisition - compensation amount calculation - constraint filtering - compensation injection" to ensure that the command for each interpolation movement is superimposed with the latest error compensation value at the corresponding moment, thereby avoiding compensation lag problems.
[0084] Compared to the traditional "compensation is updated every few seconds" scheme, the compensation update frequency of this embodiment is higher, which can effectively track the changes in slow time-varying errors such as thermal deformation and force-induced deformation. It can also adapt to complex processing scenarios with frequent feed speed switching and dynamic load fluctuations. The compensation timing deviation can be controlled within one interpolation cycle.
[0085] This embodiment improves the execution accuracy of compensation quantities and reduces the accuracy loss caused by compensation lag by using a highly synchronous injection link and update mechanism. It can significantly improve the dynamic positioning accuracy of machine tools without changing the original control logic of the CNC system.
[0086] In one possible embodiment, in step S5, when verifying the compensated positioning deviation, if the positioning deviation exceeds a preset allowable error threshold, an emergency iterative correction of the model is triggered, and the deviation data is stored in the working condition sample library; if the positioning deviation is within the preset allowable error threshold, the compensation data is stored as a positive sample in the working condition sample library for offline optimization and online incremental learning of the model.
[0087] Specifically, this embodiment addresses the issues of model accuracy decay over time and compensation failure under abnormal operating conditions. Through a closed-loop mechanism of "verification-feedback-iteration," it achieves continuous improvement in model accuracy and long-term stability of compensation effects.
[0088] The characteristics of gantry machining centers are not static: during long-term service, component wear can cause a slow drift in geometric errors; changes in guide rail lubrication and increased clearance in transmission pairs can alter dynamic response characteristics; and models relying solely on initial calibration will experience accuracy degradation over time. Furthermore, extreme abnormal conditions (such as sudden cutting chatter or load abrupt changes) may lead to compensation failure, necessitating rapid model correction. This embodiment transforms actual operating data during machining into sample resources for model optimization through real-time verification of compensation effects, enabling iterative model optimization.
[0089] (1) Real-time verification mechanism for compensation effect After compensation is performed, the actual position data collected by the feed axis grating ruler is compared with the corrected command position data to calculate the actual positioning deviation after compensation. The deviation value is then compared with a preset allowable error threshold (set according to machining accuracy requirements, such as 5μm for precision machining scenarios) to achieve real-time closed-loop verification of the compensation effect. The verification results are processed separately for two scenarios: Deviation exceeding threshold scenario: If the positioning deviation still exceeds the allowable threshold after compensation, it indicates that the current model's prediction of the current working condition is inaccurate. This may be due to an abnormal working condition that has not been learned or the model characteristics have drifted. At this time, an emergency iterative correction of the model is immediately triggered. Based on the current working condition data and the actual deviation value, the model's weight parameters are quickly updated through an online recursive least squares algorithm to prioritize the correction of the current prediction deviation and avoid batches of defective parts in continuous processing. At the same time, this set of "working condition data - deviation data" is stored as an abnormal sample in the working condition sample library and marked as a key sample for model optimization.
[0090] Deviation Qualified Scenario: When the positioning deviation after compensation is within the allowable threshold range, it indicates that the current model prediction is accurate and the compensation effect meets the requirements. At this time, the set of "operating condition data - compensation amount - deviation data" is stored as a positive sample in the operating condition sample library as an effective sample resource for subsequent model optimization.
[0091] (2) Sample-driven model evolution mechanism The continuously accumulating working condition sample library provides the model with optimization data covering all working conditions, supporting two types of optimization modes: Online incremental learning: In machine tool idle or low-load processing scenarios, the model is updated incrementally in small steps based on recently added positive and abnormal samples, gradually adapting to the slow drift of machine tool characteristics, and completing the iterative improvement of model accuracy without stopping the machine.
[0092] Offline deep optimization: After accumulating a sufficient number of samples (usually thousands of samples covering different working conditions), during the machine tool shutdown and maintenance phase, the model is retrained and cross-validated based on the full sample library to optimize the model structure and initial parameters, further improving the prediction accuracy under multiple working conditions. Offline optimization is usually performed once every quarter or every six months.
[0093] This embodiment uses a closed-loop feedback mechanism to gradually improve the model prediction accuracy over time, control the decay rate of compensation accuracy during long-term service, shorten the recovery time of compensation failure under abnormal operating conditions, and significantly reduce the probability of producing defective products.
[0094] In one possible embodiment, before step S1, an initial model calibration step is also included: under the standard working conditions of no load and constant temperature in the gantry machining center, the geometric error calibration of each feed axis throughout its full stroke is completed by using a laser interferometer, the initial parameters of the multi-field coupled positioning error prediction model are obtained, and an initial error mapping table is constructed.
[0095] Specifically, this embodiment addresses the issue of the accuracy of the initial parameters of the model, providing a reliable reference benchmark for subsequent dynamic compensation and avoiding insufficient compensation accuracy caused by model initialization deviations.
[0096] The initial parameters of the multi-field coupled positioning error prediction model directly determine the compensation accuracy in the initial stage of system deployment. Geometric errors, as the basic static errors of machine tools, account for 30% to 50% of the total positioning error. Their initial values cannot be directly learned from operating data and must be calibrated using high-precision measuring equipment. If the initial parameter deviation of the model is too large, even subsequent online adjustments will require a long convergence period, and parameter oscillations may even lead to non-convergence. This embodiment provides the model with initial parameters close to the true values through high-precision calibration under standard operating conditions, significantly reducing the adaptation cost after the model goes online and ensuring initial compensation accuracy.
[0097] (1) Standard operating condition environmental control The calibration process is carried out under controlled standard operating conditions to eliminate interference from other error terms: The machine tool is in an unloaded state, without cutting load, workpiece weight or other additional loads, thus eliminating the influence of load deformation error; The environment is kept at a constant temperature (usually controlled at 20±0.5℃), and the machine tool is run idle in advance to reach thermal equilibrium to eliminate the influence of thermal errors; The machine tool operating parameters are set to the standard test state, and the feed rate and acceleration are set to 10%~20% of the rated value to eliminate the influence of dynamic following error.
[0098] Under this operating condition, the positioning error of the machine tool is mainly composed of geometric errors, and independent and accurate measurement of geometric errors can be achieved.
[0099] (2) High-precision measurement of geometric errors Using a laser interferometer as the measurement reference, its measurement accuracy can reach ±0.5ppm, making it the industry standard equipment for measuring machine tool geometric errors. Full-stroke calibration was carried out for the X-axis beam feed axis, Y-axis gantry longitudinal feed axis, and Z-axis spindle vertical feed axis. At least 20 measurement points were selected at equal intervals for each feed axis to cover all key positions of the full stroke. For each measurement point, the positioning error in the three linear directions (X, Y, and Z) and the pitch, yaw, and roll angle errors around the three axes (X, Y, and Z) are measured, totaling six error components. Geometric error distribution data for the entire feed axis stroke are collected. For the dual-Y-axis gantry structure, the synchronization position error of the dual Y-axis is also calibrated.
[0100] (3) Initial model construction Model initialization was completed based on measurement data from the laser interferometer. Polynomial fitting is performed on the measurement data to construct the mapping relationship between the position of each feed axis and the geometric error components, which serves as the initial parameters of the geometric error sub-model in the multi-field coupled prediction model. Generate an initial error mapping table for the entire stroke, and store the basic geometric error values corresponding to different positions of each feed axis. This serves as a benchmark reference for error calculation in the initial stage of system launch, ensuring that the system can provide an accuracy no less than that of static compensation after startup.
[0101] This embodiment ensures the accuracy of geometric error prediction and initial compensation in the early stages of model deployment through initial calibration, significantly shortening the convergence cycle of online model learning. After system startup, it can be put into normal processing and use without long-term debugging.
[0102] In one possible embodiment, the position feedback data further includes: position feedback data of the dual Y-axis grating ruler, and the comprehensive positioning error value also includes the synchronous positioning error of the dual Y-axis of the gantry. Among them, the synchronous positioning error is calculated in real time based on the position feedback data of the dual Y-axis grating ruler. The generated dynamic compensation includes the synchronous error compensation component of the dual Y-axis, which is used to correct the position synchronization deviation of the dual Y-axis.
[0103] Specifically, this embodiment addresses the issues of beam skewing and synchronization positioning deviation in dual Y-axis drive scenarios, avoiding problems such as machining surface tilting and accelerated guide rail wear caused by asynchrony between the two axes.
[0104] In gantry machining centers, the Y-axis longitudinal feed typically employs two independent servo drive systems to synchronously drive the crossbeam. Due to factors such as differences in response between the two servo systems, uneven load on the left and right guide rails, and inconsistent wear, deviations in the actual Y-axis positions occur, resulting in synchronization positioning error. This error not only causes positioning deviation in the Y-axis direction but also induces yaw angle error of the crossbeam around the Z-axis. Through the Abbe effect, this is amplified into additional positioning errors in the X and Z-axis directions, potentially leading to hardware damage such as crossbeam jamming and guide rail damage. Traditional compensation schemes usually only focus on single-axis positioning errors, ignoring the coupled effect of dual-axis synchronization deviations. This embodiment incorporates synchronization errors into the overall error compensation system, achieving multi-dimensional error coverage of the gantry structure.
[0105] (1) Real-time calculation mechanism for synchronization error The position feedback data now includes real-time position acquisition from two sets of grating rulers along the dual Y-axis, and the synchronous positioning error is calculated in real-time based on the dual-axis position feedback data. Synchronous positioning error = actual position value of the left Y-axis grating - actual position value of the right Y-axis grating, which directly represents the degree of positional deviation between the two Y-axis. Simultaneously, based on the motion parameters of the two axes and the stiffness parameters of the beam, the synchronous positioning error is converted into the yaw angle error of the beam. The additional Abbe error caused by this yaw angle in the X-axis and Z-axis directions is further calculated and included in the calculation range of the comprehensive positioning error value, thus fully restoring the impact of the synchronous error on the positioning accuracy of each axis.
[0106] (2) Synchronization error compensation component generation and execution mechanism In the process of calculating the dynamic compensation amount, a new dual Y-axis synchronous error compensation component is added: Based on the real-time calculated synchronous positioning error, a dual-axis differential correction compensation amount is generated through an independent fuzzy PID controller: if the left Y-axis position is ahead, the synchronous compensation component is the left axis minus and the right axis plus the corresponding compensation value, thereby reducing the dual-axis position difference without changing the overall feed position of the crossbeam. After the synchronous compensation component is superimposed with the single-axis positioning compensation component, motion control commands are injected into both Y-axis axes respectively. This corrects the single-axis positioning error while achieving real-time correction of the dual-axis synchronous deviation. The control accuracy of the synchronous error during the compensation process can reach within 2μm, which is far lower than the industry-standard 10μm synchronous error requirement.
[0107] This embodiment, through synchronous error compensation, not only controls the synchronous deviation of the dual Y-axis, reduces the wear of the guide rail and transmission pair, and extends the service life of the machine tool, but also eliminates the additional error caused by the beam runout, significantly improving the flatness of the large-span machining of the gantry milling machine, which is especially suitable for high-precision machining scenarios of large structural parts.
[0108] Example 2, see Figure 6The present invention also provides an adaptive positioning error compensation control system for a gantry machining center, which is applied to a gantry machining center including an X-axis beam feed axis, a Y-axis gantry longitudinal feed axis, and a Z-axis spindle vertical feed axis. The system is connected to the CNC system and includes: a data synchronization acquisition module 1, a multi-field coupling error prediction module 2, an adaptive compensation adjustment module 3, a compensation amount real-time injection module 4, and a closed-loop feedback optimization module 5.
[0109] The data synchronization acquisition module 1 is used to synchronously acquire multi-source real-time operating condition data and position feedback data of the gantry machining center. The multi-source real-time operating condition data includes at least multi-point temperature data, load data, vibration data, wear data, and feed speed and acceleration of each feed axis. The position feedback data includes the actual position data acquired by the grating ruler of each feed axis and the command position data issued by the CNC system. The multi-field coupling error prediction module 2 is used to construct a multi-field coupling positioning error prediction model based on the collected multi-source data, which integrates geometric error, thermal error, load deformation error and dynamic following error, and calculates the comprehensive positioning error value of each feed axis in the machine tool reference coordinate system corresponding to the target motion position under the current working condition. The adaptive compensation adjustment module 3 is used to preset the allowable threshold for positioning error and the threshold for the amplitude of working condition change. Based on the deviation between the comprehensive positioning error value calculated in real time and the allowable threshold for positioning error, the weight parameters of the multi-field coupled positioning error prediction model are corrected online through an online recursive least squares algorithm with a forgetting factor. At the same time, combined with the motion state of the current feed axis and the dynamic response parameters of the servo system, a dynamic compensation amount is generated through a fuzzy PID adaptive adjustment algorithm, and the dynamic compensation amount is subjected to amplitude constraint and smoothing filtering. The real-time compensation injection module 4 is used to inject the processed dynamic compensation into the interpolation cycle of the CNC system in real time. Before the interpolation calculation, the command position is pre-compensated to generate the corrected motion control command and drive each feed axis to perform the corresponding feed action. The closed-loop feedback optimization module 5 is used to collect the actual position data of each feed axis in real time after the compensation is executed, verify the positioning deviation after compensation, and feed the verification result back to the multi-field coupled positioning error prediction model for iterative correction or optimization of the model, so as to realize adaptive closed-loop compensation control of positioning error. The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention shall fall within the scope of protection claimed by the present invention.
Claims
1. An adaptive positioning error compensation control method for a gantry machining center, characterized in that, Includes the following steps: Simultaneously collect multi-source real-time operating condition data and position feedback data from the gantry machining center; Based on the collected multi-source data, a multi-field coupled positioning error prediction model is constructed to calculate the comprehensive positioning error value of each feed axis under the current working condition. Based on the deviation between the comprehensive positioning error value calculated in real time and the allowable positioning error threshold, the weight parameters of the multi-field coupled positioning error prediction model are corrected online using an online recursive least squares algorithm with a forgetting factor; and a dynamic compensation quantity is generated by a fuzzy PID adaptive adjustment algorithm, and the dynamic compensation quantity is subjected to amplitude constraint and smoothing filtering. The processed dynamic compensation amount is injected into the interpolation cycle of the CNC system in real time to pre-compensate the command position, generate the corrected motion control command and execute it. After compensation is performed, the actual position data of each feed axis is collected in real time, the positioning deviation after compensation is verified, and the data is fed back to the multi-field coupled positioning error prediction model for iterative correction or optimization of the model.
2. The method according to claim 1, characterized in that, The acquisition of multi-source real-time operating condition data and location feedback data adopts a hard-triggered synchronization mechanism, and the acquired raw data is preprocessed by filtering and denoising, removing outliers, and aligning timestamps. In this system, the trigger signal of the hard-triggered synchronization mechanism is generated by frequency division of the interpolation clock of the CNC system, and the data acquisition node, the grating ruler reading node, and the CNC system instruction output node share the same trigger clock.
3. The method according to claim 1, characterized in that, The construction of a multi-field coupled positioning error prediction model and the calculation of the integrated positioning error value include: The Sobol global sensitivity analysis method is used to rank all candidate influencing factors for each error term, screen out the core independent influencing factors for each error term, as well as the cross-coupled influencing factors that have a significant impact on two or more error terms, eliminate redundant influencing factors, and construct the input parameter set for each sub-item error. For geometric error, thermal error, load deformation error, and dynamic tracking error, independent sub-models for predicting sub-errors are constructed based on their respective input parameter sets, and the three-dimensional spatial error vectors of each sub-error at the target motion position of the feed axis are output. Based on the cross-coupling influence factor, a multi-error coupling mapping matrix is constructed. The cross-influence coefficient between each sub-error is quantified through the coupling mapping matrix, and the three-dimensional spatial error vector output by each sub-error prediction sub-model is corrected. The corrected three-dimensional spatial error vectors of each component error are uniformly transformed to the machine tool reference coordinate system.
4. The method according to claim 1, characterized in that, When the change in operating conditions exceeds the preset threshold for the change in operating conditions, the forgetting factor will be lowered to the range of 0.90 to 0.
95. When the change in operating conditions does not exceed the preset threshold for the change in operating conditions, the forgetting factor will be increased to the range of 0.96 to 0.
99. The forgetting factor ranges from 0.90 to 0.99, and the variation range of the operating conditions is the weighted average of the rate of change of feed rate, spindle load, and core measuring point temperature.
5. The method according to claim 1, characterized in that, When performing amplitude constraint and smoothing filtering on the dynamic compensation amount, the following applies: the amplitude of the compensation amount does not exceed the maximum allowable feed step size within a single interpolation cycle of the corresponding feed axis, and the maximum allowable feed step size is the product of the machine tool's rated rapid traverse speed and the interpolation cycle; The smoothing filter uses a first-order low-pass filter, and the filter cutoff frequency does not exceed 1 / 5 of the position loop bandwidth of the servo system.
6. The method according to claim 1, characterized in that, The processed dynamic compensation amount is injected into the interpolation cycle through the external coordinate offset interface of the CNC system or the high-speed real-time bus. The interpolation cycle is 1 to 5 ms, and the compensation amount is updated and injected once in each interpolation cycle.
7. The method according to claim 1, characterized in that, When verifying the positioning deviation after compensation, if the positioning deviation exceeds the preset allowable error threshold, the model is triggered to perform emergency iterative correction, and the deviation data is stored in the working condition sample library. If the positioning deviation is within the preset allowable error threshold, the compensation data will be stored as a positive sample in the working condition sample library for offline optimization and online incremental learning of the model.
8. The method according to claim 1, characterized in that, Before collecting multi-source data, the following steps are also taken: under the standard working conditions of no load and constant temperature in the gantry machining center, the geometric error of each feed axis is calibrated for the entire stroke using a laser interferometer, the initial parameters of the multi-field coupled positioning error prediction model are obtained, and the initial error mapping table is constructed.
9. The method according to claim 1, characterized in that, The position feedback data also includes: position feedback data of the dual Y-axis grating ruler; the comprehensive positioning error value also includes the synchronous positioning error of the dual Y-axis of the gantry. Among them, the synchronous positioning error is calculated in real time based on the position feedback data of the dual Y-axis grating ruler. The generated dynamic compensation includes the synchronous error compensation component of the dual Y-axis, which is used to correct the position synchronization deviation of the dual Y-axis.
10. An adaptive positioning error compensation control system for a gantry machining center, characterized in that, include: The data synchronization acquisition module is used to synchronously acquire multi-source real-time operating condition data and position feedback data of the gantry machining center; The multi-field coupling error prediction module is used to construct a multi-field coupling positioning error prediction model based on the collected multi-source data, and calculate the comprehensive positioning error value of each feed axis under the current working condition. The adaptive compensation adjustment module is used to correct the weight parameters of the multi-field coupled positioning error prediction model online based on the deviation between the comprehensive positioning error value calculated in real time and the allowable positioning error threshold. It also generates dynamic compensation amount through a fuzzy PID adaptive adjustment algorithm and performs amplitude constraint and smoothing filtering on the dynamic compensation amount. The real-time compensation injection module is used to inject the processed dynamic compensation into the interpolation cycle of the CNC system in real time, pre-compensate the command position, generate the corrected motion control command and execute it. The closed-loop feedback optimization module is used to collect the actual position data of each feed axis in real time after compensation is performed, verify the positioning deviation after compensation, and feed it back to the multi-field coupled positioning error prediction model for iterative correction or optimization of the model.