Three-coordinate measuring machine adaptive dynamic error compensation method

By using an adaptive dynamic error compensation method and leveraging multi-source data and a recurrent neural network model, high-precision dynamic error prediction and compensation for coordinate measuring machines are achieved. This solves the problem of insufficient error compensation under high-speed measurement conditions using traditional methods, thereby improving measurement accuracy and production efficiency.

CN121808620APending Publication Date: 2026-04-07XI AN DIPSEC MEASURING EQUIP CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-17
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

The dynamic errors of existing coordinate measuring machines are difficult to describe and compensate for accurately, especially under high-speed measurement conditions. Linear models or fixed compensation parameters are insufficient to cope with time-varying and uncertain errors caused by various factors.

Method used

An adaptive dynamic error compensation method is adopted. By acquiring multi-source state data, a recurrent neural network model is constructed. Incremental learning algorithm and sliding time window mechanism are used for real-time error prediction and compensation, forming a closed-loop optimization system to achieve advance prediction and compensation of dynamic errors.

Benefits of technology

It significantly improves measurement accuracy from the micrometer level to the submicrometer level, adapts to different workpieces and environmental changes, extends the equipment accuracy maintenance cycle, reduces maintenance costs, improves production line efficiency and yield, and achieves high reliability compensation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121808620A_ABST
    Figure CN121808620A_ABST
Patent Text Reader

Abstract

The invention provides a three-coordinate measuring machine adaptive dynamic error compensation method, and relates to the field of three-coordinate measuring machines, and the method comprises the steps: obtaining multi-source state data of a three-coordinate measuring machine, and calculating a real-time dynamic error, the state data comprising a motion state, a dynamic response and environment disturbance data; based on the real-time dynamic error, using a recurrent neural network to construct a virtual measuring machine model, and performing offline training to obtain an initial error prediction model; and acquiring real-time error feedback data, and performing fine adjustment on the initial error prediction model by using an incremental learning algorithm and a sliding time window mechanism to obtain a prediction model capable of dynamically evolving and aging adaptive parameters. The method is used for overcoming the defect that in the prior art, a linear model or a fixed compensation parameter is difficult to accurately describe and compensate all dynamic errors sometimes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of coordinate measuring machine (CMM) technology, and more particularly to an adaptive dynamic error compensation method for CMMs. Background Technology

[0002] Coordinate Measuring Machines (CMMs), as indispensable high-precision measurement tools in modern manufacturing, are widely used in many fields such as automotive assembly, machining and manufacturing, precision instrument testing, and aerospace. They are used to measure the dimensional and positional errors of parts and components, playing a crucial role in ensuring product quality. However, the measurement accuracy of CMMs is affected by various factors, resulting in various errors. Static errors refer to errors whose values ​​remain at a stable level. These errors are usually caused by external factors that have a transient impact on the equipment structure. Because such impacts are fleeting, they are not easily changed. Dynamic errors refer to errors that increase or change over time or during the measurement process. There are many causes for dynamic errors, such as external factors like temperature, dust, vibration, and human operation.

[0003] Dynamic errors are time-varying and uncertain. Under high-speed measurement conditions, existing linear models or fixed compensation parameters are sometimes difficult to accurately describe and compensate for all dynamic errors. Summary of the Invention

[0004] This invention provides an adaptive dynamic error compensation method for coordinate measuring machines, which solves the problem that linear models or fixed compensation parameters in the prior art are sometimes difficult to accurately describe and compensate for all dynamic errors.

[0005] On one hand, the present invention provides an adaptive dynamic error compensation method for a coordinate measuring machine, comprising: Acquire multi-source state data of a coordinate measuring machine and calculate real-time dynamic error. The state data includes motion state, dynamic response and environmental disturbance data. Based on real-time dynamic error, a virtual measurement machine model is constructed using a recurrent neural network and trained offline to obtain an initial error prediction model; Real-time error feedback data is obtained, and the initial error prediction model is fine-tuned using incremental learning algorithm and sliding time window mechanism to obtain a prediction model with dynamically evolving and aging adaptive parameters. Based on a prediction model with dynamically evolving and aging adaptive parameters, the dynamic error value at the next moment is predicted in real time to obtain the prediction error. The prediction error is inverted to generate a compensation amount, and the compensation amount is sent in advance to the control system to correct the target position command so as to obtain the compensated target position; The residual error of the actual position after compensation is calculated and fed back to the learning system to form a closed loop, driving the digital twin to continuously optimize itself to improve long-term compensation accuracy.

[0006] Furthermore, multi-source state data of the coordinate measuring machine is acquired, and real-time dynamic error is calculated. The state data includes motion state, dynamic response, and environmental disturbance data, including: The motion state data is obtained by reading the target position, velocity and acceleration command data of each axis of the coordinate measuring machine in real time from the CNC controller; Acceleration and strain sensors are used to collect vibration deformation signals at key structural points such as the crossbeam and spindle of a coordinate measuring machine, thus obtaining dynamic response data; By integrating temperature and vibration sensors, environmental temperature rise and external vibration interference sources can be monitored to obtain environmental disturbance data; Based on multi-source state data, the actual position of the probe is obtained using a grating system feedback, and the real-time dynamic error is calculated by comparing it with the target position.

[0007] Furthermore, based on real-time dynamic errors, a virtual measurement machine model is constructed using a recurrent neural network and trained offline to obtain an initial error prediction model, including: Based on real-time dynamic error, a virtual measurement machine model is constructed using a recurrent neural network; Based on a virtual measuring machine model, the measuring machine is controlled to perform multi-track motion, and a laser interferometer is used to collect high-precision error calibration data. Based on high-precision error calibration data, the virtual measuring machine model is trained offline using offline calibration data to establish an initial high-fidelity error prediction model.

[0008] Furthermore, real-time error feedback data is acquired, and the initial error prediction model is fine-tuned using an incremental learning algorithm and a sliding time window mechanism to obtain a prediction model with dynamically evolving and aging adaptive parameters, including: Acquire real-time error feedback data, compare the target position with the grating feedback position in real time, and calculate the instantaneous error as the true value label; Based on the ground truth labels, an incremental learning algorithm is used to dynamically update the model weights in short time windows. Based on the updated model weights, a sliding window mechanism is introduced to forget historical data, and reinforcement learning is performed on operating condition data with large prediction deviations to obtain a prediction model with dynamically evolving and aging adaptive parameters.

[0009] Furthermore, based on a prediction model with dynamically evolving and aging adaptive parameters, the dynamic error value at the next moment is predicted in real time, yielding the prediction error, including: Based on a prediction model with dynamically evolving and aging adaptive parameters, the multi-source state data stream at the current moment is input, and the predicted value of the three-axis dynamic error at the next moment is calculated, thus obtaining the real-time prediction value. Based on real-time predicted values, an advance prediction error command is output to the compensation control module.

[0010] Furthermore, the prediction error is inverted to generate a compensation amount, which is then sent in advance to the control system to correct the target position, thus obtaining the compensated target position, including: The prediction error is inverted to generate the spatial coordinate compensation amount; The compensation amount is sent to the control system of the measuring machine in advance; The control system adds the compensation amount to the target position command, and the drive motor executes the corrected trajectory to obtain the compensated target position.

[0011] Furthermore, the residual error of the compensated actual position is calculated and fed back to the learning system to form a closed loop, driving the digital twin to continuously self-optimize in order to improve long-term compensation accuracy, including: Real-time acquisition of the actual position data of the compensated grating system; Based on actual location data, calculate the compensation residual error and evaluate the compensation effect; The residual error is fed back to the online learning module as an optimization signal; Based on the optimized signal, it enters the next round of self-iterative optimization cycle.

[0012] On the other hand, the present invention also provides an electronic device, including 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 adaptive dynamic error compensation method for a coordinate measuring machine as described above.

[0013] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the adaptive dynamic error compensation method for a coordinate measuring machine as described above.

[0014] On the other hand, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the adaptive dynamic error compensation method for a coordinate measuring machine as described above.

[0015] The adaptive dynamic error compensation method for coordinate measuring machines (CMMs) provided by this invention abandons the traditional fixed model. The digital twin continuously updates through online learning, enabling it to track changes in the equipment's own state and environmental disturbances, thus achieving self-adaptation. Advance prediction compensation, based on a time series model, predicts the error at the next moment, achieving feedforward compensation and solving the compensation lag problem caused by computational delays in traditional methods. Multi-physics fusion integrates kinematic, dynamic, and thermodynamic information from multiple sources, enabling the modeling and compensation of complex coupled errors. Lightweight online learning employs an incremental learning algorithm, with controllable computational load, allowing real-time operation on industrial PCs or high-performance PLCs, resulting in strong engineering applicability. This method elevates the error compensation of CMMs from static, passive correction to dynamic, proactive immunity, making it suitable for high-cycle, high-precision modern intelligent manufacturing scenarios. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0017] Figure 1 This is a flowchart illustrating the adaptive dynamic error compensation method for a coordinate measuring machine provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0019] like Figure 1 As shown in the embodiment of the present invention, the adaptive dynamic error compensation method for a coordinate measuring machine mainly includes the following steps: Step 11: Acquire multi-source state data of the coordinate measuring machine and calculate real-time dynamic error. The state data includes motion state, dynamic response and environmental disturbance data. Step 12: Based on the real-time dynamic error, a virtual measurement machine model is constructed using a recurrent neural network and trained offline to obtain the initial error prediction model; Step 13: Obtain real-time error feedback data, and fine-tune the initial error prediction model using incremental learning algorithm and sliding time window mechanism to obtain a prediction model with dynamically evolving and aging adaptive parameters. Step 14: Based on the prediction model with dynamically evolving and aging adaptive parameters, infer and predict the dynamic error value at the next moment in real time to obtain the prediction error; Step 15: Invert the prediction error to generate a compensation amount, and send the compensation amount to the control system in advance to correct the target position command, so as to obtain the compensated target position. Step 16: Obtain the residual error of the actual position after compensation, and feed it back to the learning system to form a closed loop, driving the digital twin to continuously optimize itself to improve long-term compensation accuracy.

[0020] In this embodiment of the invention, through multi-source data fusion and high-fidelity modeling of the digital twin, nonlinear and time-varying dynamic errors that are difficult to handle by traditional methods can be accurately captured and predicted, improving the compensation accuracy from the micrometer level to the sub-micrometer level. It effectively solves the composite error problem caused by the coupling of multiple physical fields (thermal, mechanical, and vibration), maintaining stable high measurement accuracy even under high speed, high acceleration, and harsh operating conditions. Through online learning and aging adaptive mechanisms, it can automatically compensate for accuracy degradation caused by slow time-varying factors such as mechanical wear and structural creep, significantly extending the equipment accuracy maintenance cycle and reducing the frequency of periodic calibration and maintenance costs. The system abandons fixed models and possesses continuous learning and optimization capabilities, adapting to different workpieces, probes, measurement strategies, and environmental changes, achieving flexible high-precision measurement with multiple uses. The digital twin continuously compares predicted and measured errors during operation; if the residual error increases abnormally, it can provide early warning of potential mechanical failures (such as guide rail wear and bearing failure), transforming passive maintenance into proactive predictive maintenance. The advanced prediction and feedforward compensation mechanisms solve the problem of compensation caused by computational delays. The compensation for lag issues ensures the accuracy of the measuring machine even at high speeds (e.g., above 500mm / s) and high acceleration, effectively improving the inspection cycle time. High reliability compensation reduces measurement failures and product re-inspection rates caused by out-of-tolerance errors, directly improving the overall efficiency and yield of the production line. At the software level, intelligent compensation compensates for inherent defects in mechanical manufacturing, reducing the extremely high machining accuracy requirements for key components (such as guide rails and lead screws), potentially lowering the overall manufacturing cost. The paradigm of offline pre-training combined with online fine-tuning reduces long-term reliance on expensive calibration equipment such as laser interferometers, requiring only initial calibration and significantly reducing the complexity and cost of subsequent maintenance. The system forms an autonomous closed loop of perception-decision-execution-learning, ensuring that measurement accuracy not only remains consistent over long-term operation but may even continuously optimize with data accumulation, possessing the ability to evolve autonomously. This adaptive compensation system is the core technology for building intelligent measurement units, and the massive amounts of high-precision process data it generates can provide high-quality data input for digital twin factories, process optimization, etc., making it a key link in realizing intelligent manufacturing.

[0021] like Figure 1 As shown, step 11 involves acquiring multi-source state data from the coordinate measuring machine and calculating the real-time dynamic error. The state data includes motion state, dynamic response, and environmental disturbance data, including: Step 111: Read the target position, velocity, and acceleration command data of each axis of the coordinate measuring machine (CMM) in real time from the CNC controller to obtain motion state data. Specifically, this includes: establishing a real-time connection with the CMM controller via an industrial-grade data interface to ensure low latency in the communication link; after the connection is established, the system reads data at a preset sampling frequency, which is dynamically adjusted according to the CMM's operating speed, needing to be increased to above 1kHz during high-speed operation; the read content includes the target position data of each axis, i.e., the coordinates of the theoretical motion trajectory of the probe planned by the CNC; the real-time velocity commands of each axis, including the current instantaneous velocity and velocity change trend; and the acceleration commands of each axis, covering the acceleration maintenance during the initial acceleration and constant speed phase and the negative acceleration during the deceleration phase. During the reading process, the data is verified in real time, and timestamps are used to ensure the time consistency of each set of data. Abnormal values ​​caused by communication jitter, such as invalid commands with instantaneous jumps, are filtered out. Finally, a continuous and synchronous motion state data stream is formed as the ideal motion reference for subsequent error calculation.

[0022] Step 112 involves using accelerometers and strain sensors to collect vibration and deformation signals at key structural points of the coordinate measuring machine (CMM), such as the crossbeam and spindle, to obtain dynamic response data. Specifically, this includes: determining the placement of sensors at key structural points based on the CMM's structural dynamics characteristics through finite element analysis or modal testing. High-precision accelerometers are installed at the midpoint and both ends of the crossbeam in vibration-sensitive areas to capture vertical and torsional vibration signals during high-speed movement. Strain gauges are attached or miniature strain sensors are deployed at the connection between the spindle and the probe to monitor minute deformations of the spindle caused by load changes or high-speed movement, such as bending and stretching. Auxiliary accelerometers are installed near the contact area between the guide rail and the slider to capture the vibration transmission characteristics of the guide rail during movement. Sensor installation employs insulating and interference-resistant fixing methods, such as specialized adhesives or mechanical clamps, to avoid interference from the sensor's own vibration. The acquisition system uses a multi-channel signal conditioning module to amplify and filter the weak electrical signals output by the sensors (accelerometer signal at the mV level and strain signal at the μV level) to remove 50Hz power frequency interference and high-frequency noise, and then converts them into digital signals via a high-speed A / D converter. During the acquisition process, the dynamic response data and the motion state data in step 111 are synchronized in time through hardware triggering or high-precision clock calibration to ensure that each set of vibration deformation signals corresponds to a specific motion stage, such as acceleration, constant speed, and deceleration, and finally form a dataset reflecting the real-time dynamic behavior of the mechanical structure.

[0023] Step 113: Integrate temperature and vibration sensors to monitor ambient temperature rise and external vibration interference sources, thus obtaining environmental disturbance data. Specifically, this includes: deploying environmental sensors to cover the entire range of the external environment and key equipment components. Distribute 3-5 temperature sensors evenly around the working area of ​​the measuring machine, such as above the workbench or near the control cabinet, to monitor the spatial distribution and real-time changes of ambient temperature with a resolution of 0.1℃; install vibration sensors at the contact points between the measuring machine base and the ground, away from the measuring machine, on the workshop floor to distinguish between the equipment's own vibration and external environmental vibrations, such as vibrations generated by nearby machine tools or forklifts; attach temperature sensors to the surfaces of core transmission components such as lead screws and guide rails to monitor localized temperature rises caused by frictional heat, contrasting them with the ambient temperature to capture the source of thermal deformation; optional humidity sensors can be added to assist in analyzing the impact of condensation that may occur in high-humidity environments on accuracy. Sensor data is aggregated through a distributed acquisition module, with the acquisition frequency set according to the rate of environmental change: typically 10Hz for temperature data and 100Hz for vibration data. The system performs trend analysis on environmental data, identifies slow temperature drifts such as diurnal temperature differences or sudden vibrations such as equipment start-up and shutdown shocks, and marks different types of environmental disturbances such as temperature gradients and external vibration interference through tags.

[0024] Step 114: Based on multi-source state data, the actual position of the probe is obtained using a grating system feedback, and the real-time dynamic error is calculated by comparing it with the target position. Specifically, this includes: using the high-precision grating measurement system built into the coordinate measuring machine (CMM), typically with a resolution of 0.01 μm, to obtain the actual position of the probe in real time. The grating ruler converts the mechanical displacement of the probe into an electrical signal through the interference of optical signals or changes in moiré fringes. After processing by a subdivision circuit, submicron-level position data is obtained, i.e., the actual coordinates of each of the XYZ axes. After obtaining the actual position, it is time-aligned with the target position output by the CNC controller in step 111. A unified system clock, such as GPS synchronization or a high-precision crystal oscillator, ensures that the matching error between the two sets of data at the same time point is controlled within 1 ms, avoiding calculation deviations caused by time misalignment. Then, the real-time dynamic error is calculated. The difference between the actual position and the target position is calculated for each axis to obtain the single-axis dynamic error of each XYZ axis. Simultaneously, the comprehensive dynamic error of the probe in three-dimensional space is synthesized by combining the three-dimensional spatial geometric relationship, reflecting the spatial deviation between the actual trajectory and the ideal trajectory. During the calculation process, outliers are filtered out. When the grating system is contaminated with dust or oil, causing signal interruption or abrupt changes, the system automatically uses the error trend prediction value within the previous 10ms as a temporary replacement and marks the abnormal state for recalibration after cleaning. This ensures the continuity and reliability of error data and provides high-quality real error labels for subsequent model training.

[0025] In this embodiment of the invention, by directly reading CNC commands, the ideal motion intention is accurately captured, providing a benchmark for subsequent calculations of the deviation between the actual and the ideal. Accelerometers / strain sensors quantify the dynamic response of the mechanical structure (such as beam bending and spindle vibration) during the compensation process; these are the core physical sources of dynamic errors, which are difficult to measure and utilize directly using traditional methods. Environmental sensors actively sense external disturbances, transforming hidden error sources such as temperature drift and external vibration into visible and quantifiable data. The collected multi-source data (motion commands, structural responses, and environmental disturbances) provides the possibility for subsequent models to distinguish and establish the mapping relationship between different error sources and the final error. For example, the model can learn how much structural deformation a specific acceleration command will cause, ultimately resulting in an error of how many micrometers. The use of a grating system (the highest precision positioning system of the measuring machine) further enhances the accuracy of the measurement. The actual position of the coordinate measuring machine (CMM) is compared with the target position of the CNC machine to calculate the true and accurate real-time dynamic error value. All the collected data constitute the eyes and ears of the digital twin virtual model to perceive the physical world. Without this high-quality, multi-dimensional real-time data, the digital twin is like water without a source, unable to make accurate predictions and simulations. The continuously generated real-time dynamic error data stream is the fuel that drives the incremental learning algorithm to continuously fine-tune the prediction model, enabling the model to track the performance drift of the equipment caused by aging, wear, or environmental changes, thereby achieving long-term adaptive accuracy maintenance that traditional fixed models cannot achieve. The high-precision, multi-dimensional data obtained in this step enables the subsequent digital twin model to make more accurate predictions and compensations, thereby significantly improving the dynamic measurement accuracy and stability of the CMM under high speed, high acceleration, and complex working conditions.

[0026] like Figure 1 As shown, in step 12, based on the real-time dynamic error, a virtual measurement machine model is constructed using a recurrent neural network and trained offline to obtain an initial error prediction model, including: Step 121: Based on real-time dynamic errors, a virtual measuring machine model is constructed using a recurrent neural network. This includes analyzing the correlation characteristics between real-time dynamic errors and multi-source state data, and selecting a suitable recurrent neural network structure, such as LSTM or GRU, for handling temporal dependencies. The model input layer is designed as a fusion interface for multi-source state data, covering the velocity and acceleration of each axis in motion, vibration deformation signals in dynamic response, and temperature and vibration data in environmental disturbances. The hidden layer uses multiple neurons to capture complex mapping relationships between data through nonlinear activation functions, such as the coupling effect of motion acceleration and beam vibration on the correlation between temperature changes and guide rail deformation. The output layer corresponds to the predicted real-time dynamic errors, including single-axis errors and three-dimensional comprehensive errors. The model structure needs to match the dynamic response characteristics of the measuring machine. For example, to address inertial hysteresis during high-speed motion, the network time step is adjusted to ensure accurate capture of temporal features, ultimately constructing a virtual model that can simulate the dynamic error generation process of a physical measuring machine.

[0027] Step 122: Based on the virtual measuring machine model, control the measuring machine to execute multi-track motion, and simultaneously collect high-precision error calibration data using a laser interferometer. Specifically, this includes planning multiple types of motion trajectories covering the entire workspace of the measuring machine, including unidirectional linear motion along the XYZ axes at different speeds, diagonal motion such as high-speed and low-speed reciprocating motion from the origin to the apex of the workspace, and complex trajectories such as circular motion and spiral motion. Control the measuring machine to automatically run according to the preset trajectory. Simultaneously, laser interferometers are installed on each axis of the measuring machine, and the probe position is tracked in real time through an optical mirror group. The laser interferometers need to be pre-calibrated with high precision to ensure measurement accuracy at the nanometer level, and their acquisition frequency is increased to above 2kHz during high-speed motion to match the measuring machine's motion state. During the acquisition process, a hardware synchronous triggering mechanism binds the measuring machine motion commands, laser interferometer position data, and multi-source state data to the same time reference, ensuring that each motion position point corresponds to a complete set of state data and high-precision error values, ultimately forming an error calibration dataset containing multiple working conditions and positions.

[0028] Step 123: Based on high-precision error calibration data, offline calibration data is used to train the virtual measuring machine model offline, establishing an initial high-fidelity error prediction model. Specifically, this includes: forming a training sample set from the high-precision error data collected by the laser interferometer and the corresponding multi-source state data, dividing it into a training set and a validation set in a 7:3 ratio. The training set is used to train the recurrent neural network virtual model offline, iteratively optimizing and adjusting the network weights and bias parameters. During training, the model's prediction accuracy is continuously evaluated using the validation set. Training stops when the deviation between the prediction error and the measured error of the laser interferometer stabilizes within a preset threshold, such as below 0.1 μm. During training, outliers in the data, such as instantaneous jumps caused by vibration, need to be handled, maintaining data continuity through smoothing filtering. The final initial model must accurately reproduce the dynamic error characteristics under different motion trajectories, and the prediction accuracy across the entire workspace must meet sub-micron level requirements.

[0029] In this embodiment of the invention, a precise nonlinear mapping between errors and multi-source data is established. A recurrent neural network is employed to effectively capture the temporal characteristics and historical dependencies of dynamic errors. Compared with traditional linear models or polynomial fitting, it can more accurately describe the complex nonlinear relationships between motion states (velocity, acceleration), structural responses (vibration, strain), environmental disturbances (temperature), and dynamic errors, laying a theoretical foundation for high-precision prediction. A dedicated digital twin is created for each physical measuring machine, with a virtual copy tailored to its specific needs. The initial model includes the unique mechanical structural characteristics, assembly errors, and dynamic response characteristics of the device, enabling personalized and precise error compensation. An indisputable error truth value is obtained through synchronous calibration using a laser interferometer, a higher-precision benchmark instrument. This acquires the input-output data pairs required for training, ensuring the high authority and accuracy of the error data used to train the initial model, avoiding potential disputes arising from using only a grating system for feedback. The system covers the entire workspace and multiple operating conditions through execution... The method employs multi-path (e.g., diagonal, circular, high-speed, low-speed) motion, and the collected calibration data fully covers the entire workspace and various possible motion states of the measuring machine. This results in an initial model with excellent generalization ability, providing reliable initial predictions for different measurement paths. It avoids performance instability during the initial online learning phase. In an offline environment, a large amount of historical data and high computing power resources can be used to train the RNN model sufficiently and stably, directly obtaining a mature model with good convergence and high prediction accuracy. If an untrained model is directly used for online learning, the system will experience a learning period with inaccurate predictions and poor compensation effects in the initial stage. This method perfectly avoids this risk. It significantly reduces the burden of online learning. Since the initial model already has high accuracy, subsequent online learning only requires fine-tuning, rather than large-scale corrections starting from scratch. This greatly reduces the computational complexity of the online learning algorithm, enabling it to run stably under the limited computing power of the industrial control system, while also accelerating the model's adaptation to new changes.

[0030] like Figure 1 As shown, step 13 involves acquiring real-time error feedback data and fine-tuning the initial error prediction model using an incremental learning algorithm and a sliding time window mechanism to obtain a prediction model with dynamically evolving and aging adaptive parameters, including: Step 131: Acquire real-time error feedback data, compare the target position with the grating feedback position in real time, and calculate the instantaneous error as the truth label. Specifically, this includes: receiving the target position data of each axis output by the CNC controller in real time, and simultaneously reading the actual position data of the probe fed back by the grating system. The two sets of data are time-aligned using a unified system clock to ensure accurate matching between the target position and the actual position at the same moment. The difference between the actual position and the target position is calculated for each axis to obtain the single-axis instantaneous error, which is then combined with the three-dimensional spatial relationship to synthesize the probe's comprehensive instantaneous error. During the calculation process, the validity of the data is monitored in real time. When the grating signal becomes abnormal due to contamination or interference, the data for that period is automatically marked, and the error trend estimate from the previous moment is used as a temporary substitute to ensure that the output instantaneous error truly reflects the dynamic deviation of the current measuring machine, serving as the truth label for model fine-tuning.

[0031] Step 132: Based on the ground truth labels, an incremental learning algorithm is used to dynamically update the model weights in short time windows. Specifically, this includes processing real-time error feedback data in short time windows, with the window duration typically set to 1 to 5 seconds depending on the measuring machine's movement speed. The incremental learning algorithm integrates the new data within the window with the model's existing knowledge, fine-tuning only some key weights of the neural network instead of retraining the entire system. For example, adjusting the neuron connection weights related to the latest ambient temperature or vibration characteristics. During the update process, the magnitude of weight changes is constrained to prevent the model from overfitting the new data while retaining its predictive ability for historical typical operating conditions. After each window of learning is completed, the deviation between the model's prediction error and the ground truth labels is evaluated immediately. If the deviation exceeds a threshold, the learning weight of the data in that window is increased to ensure the model can quickly respond to subtle changes in the equipment's state.

[0032] Step 133: Based on the updated model weights, a sliding window mechanism is introduced to forget historical data, and reinforcement learning is applied to operating condition data with large prediction deviations. This results in a prediction model with dynamically evolving and aging-adaptive parameters. Specifically, this includes: introducing a sliding time window mechanism, with the window length covering the error data of the most recent 30 to 60 seconds. As new data is continuously input, the window automatically slides forward, gradually eliminating historical data exceeding the window range, ensuring that the model always learns based on the latest equipment state. The deviation between the model prediction error and the true value label is calculated in real time. When the deviation of a certain type of operating condition, such as high-speed reversing or high-temperature environment, continuously exceeds a set threshold, this type of operating condition data is marked as a key learning object, and its proportion in the training samples is increased in subsequent incremental updates, strengthening the model's adaptability to complex operating conditions. Through continuous iterative sliding window and reinforcement learning, the model parameters can dynamically evolve to adapt to slowly changing factors such as mechanical wear and temperature drift, ultimately forming a high-precision prediction model that can autonomously adapt to equipment aging and environmental changes.

[0033] In this embodiment of the invention, online learning and adaptive updating serve as the intelligent brain and self-evolutionary engine of the entire compensation system, breaking through the limitations of traditional compensation methods and achieving true self-adaptation. It tracks equipment performance degradation, extending accuracy lifespan by automatically adapting to slow processes such as mechanical wear, structural creep, and component aging. Traditional fixed models gradually fail due to these changes, while this method enables the prediction model to continuously track these changes and adjust its parameters, maintaining high compensation accuracy throughout the equipment's lifespan and effectively extending the accuracy retention period of the measuring machine. It adapts to slow-changing disturbances in the environment and operating conditions. For slow-changing disturbances such as seasonal changes in ambient temperature and foundation settlement, the system no longer requires manual recalibration; the model can automatically learn and absorb the effects of these changes, maintaining the accuracy of the output prediction error. It enhances prediction accuracy under complex operating conditions by using reinforcement learning on operating condition data with large prediction deviations (such as sudden starts and stops, high-speed reversals, and other extreme movements). The model focuses on learning these complex dynamic characteristics that are difficult to compensate for, enabling the system to handle non-standard and variable high-speed measurements. When navigating paths, it exhibits superior stability and accuracy compared to traditional models. It can quickly capture and incrementally update the model to handle sudden and transient disturbances, including temporary and severe external shocks (such as vibrations caused by the start-up and shutdown of nearby equipment) or changes in internal states, thus possessing a certain degree of resistance to sudden disturbances. To prevent catastrophic forgetting and obsolescence, the sliding window mechanism actively forgets expired data, ensuring that the model always learns based on the most recent and relevant equipment states. This avoids the model's importance being diluted by a large amount of historical data and prevents the problem of suddenly forgetting old knowledge while learning new knowledge, guaranteeing the stability of the learning process. The incremental learning algorithm only fine-tunes the model rather than retraining, resulting in low computational overhead and meeting real-time requirements. Simultaneously, the sliding window limits the amount of data used for learning, avoiding the computational burden caused by unlimited data growth, allowing the algorithm to be embedded stably in actual industrial control systems. It transforms the error prediction model from a static, offline, and general model into a dynamic, online, personalized, high-precision model specific to the current state of the particular equipment.

[0034] like Figure 1 As shown, in step 14, based on the prediction model with dynamically evolving and aging adaptive parameters, the dynamic error value at the next moment is predicted in real time to obtain the prediction error, including: Step 141: Based on the prediction model with dynamically evolving and aging adaptive parameters, input the multi-source state data stream of the current moment, calculate the predicted value of the three-axis dynamic error for the next moment, thus obtaining the real-time prediction value. Specifically, this includes: constructing a real-time data aggregation channel to synchronously input the multi-source state data of the current moment into the dynamically evolving prediction model. This data covers multi-dimensional information, including the target position, velocity, and acceleration commands of each axis output by the CNC controller; vibration deformation signals of key parts such as the beam and spindle collected by acceleration and strain sensors; and temperature field distribution and external interference data monitored by temperature and environmental vibration sensors.

[0035] Before data is input, it undergoes a preprocessing stage to remove outliers caused by sensor jitter and communication interference, and timestamp calibration is used to ensure time consistency of data from different sources. Subsequently, the model calls the parameter set optimized by incremental learning, and combines its stored historical time-series features and internal state to perform nonlinear mapping operations on the input data.

[0036] The calculation process focuses on capturing the coupling relationship between motion parameters, structural response, and environmental disturbances. For example, the correlation between high-speed acceleration commands and beam vibration amplitude, and the correspondence between temperature changes and guide rail deformation. Finally, it outputs the predicted dynamic errors for the X, Y, and Z axes at the next moment, forming a complete three-dimensional spatial error prediction result. Immediately after prediction, the results are validated. If the error value exceeds a reasonable range (preset according to the accuracy level of the measuring machine), temporary fine-tuning of model parameters and secondary prediction are triggered to ensure the reliability of the real-time prediction value.

[0037] Step 142: Based on the real-time predicted values, output the advanced prediction error command to the compensation control module. Specifically, based on the valid real-time predicted values ​​generated in step 141, the system encapsulates them into a standardized advanced prediction error command according to a preset format. The command includes triaxial error prediction data, the corresponding timestamp of the prediction (clearly pointing to the next moment), and a data confidence identifier. The confidence identifier is automatically generated by the model based on the deviation between the current operating conditions and historical predictions, and is used to assist the compensation control module in determining the command priority.

[0038] Commands are sent to the compensation control module via an industrial-grade high-speed communication interface (such as EtherCAT or Profinet). The communication process uses a real-time transmission protocol to ensure that the latency is controlled within milliseconds, matching the control cycle requirements of the measuring machine during high-speed movement. After the command is sent, a feedback confirmation mechanism is initiated. If no confirmation signal is received from the compensation control module within a preset time, a retransmission process is immediately triggered, and transmission anomaly information is recorded for subsequent troubleshooting.

[0039] After receiving the instruction, the compensation control module performs a secondary verification of the instruction's integrity and time validity. Once confirmed to be correct, it stores the instruction in a dedicated buffer, waiting to be invoked synchronously with the target position instruction at the next moment, thus preparing for subsequent compensation actions.

[0040] In this embodiment of the invention, proactive predictive compensation is achieved, fundamentally solving the lag problem. Utilizing a dynamic model optimized through online learning, the system proactively infers the dynamic error that will occur in the next moment, rather than waiting for the error to occur before reacting. This allows the compensation system to anticipate future events, transforming traditional lag-based feedback compensation into proactive feedforward compensation. This fundamentally solves the problem of compensation lag caused by system delays, with particularly significant effects under high-speed and high-acceleration conditions. It also enables high-precision dynamic trajectory correction; the output three-axis dynamic error prediction value is a high-precision spatial vector. After this command is issued to the control system, it can correct the original... The idealized motion trajectory is corrected in real time and inversely to match the error, ensuring that the probe ultimately executes the true high-precision trajectory after error compensation, thereby directly improving the accuracy of single-point measurement and scanning measurement. The multi-physics coupling effect is integrated to improve the reliability of prediction under complex working conditions. Since the input of the prediction model is a data stream that integrates multiple sources such as kinematics, dynamics and thermodynamics, its inference process inherently includes the coupling effect of multi-physics fields (thermal-mechanical-vibration). Therefore, its prediction results can more realistically reflect the comprehensive performance of the equipment under complex working conditions, and are more reliable and accurate than predictions based solely on kinematic models. The prediction model formula is: ; in, For at any time Predicted The dynamic error vector at time step, For prediction models, Let be the target position command vector for each axis at time t. Let be the target velocity command vector for each axis at time t. Let be the target acceleration command vector for each axis at time t. Let be the structural vibration acceleration response vector at time t. Let be the structural strain / deformation response vector at time t. Let be the temperature field distribution vector at time t. Let be the external environmental vibration disturbance vector at time t. This is the model's internal state vector. Let be the adaptive parameter set of the model at time t; Based on real-time predicted values Generate compensation instruction C(t+Δt): C(t+Δt)=- The compensation amount C is sent to the control system in advance to correct the target command at time t+Δt. The real-time sensed multi-physics data is mapped to the accurate prediction of future errors, realizing millisecond-level advance compensation. Furthermore, due to the inherent coupling characteristics and adaptive capabilities of the model, the robustness and reliability of the prediction are ensured throughout the entire equipment life cycle and under complex and variable operating conditions. It is the core execution link for the whole method to achieve ultra-high precision.

[0041] like Figure 1 As shown, step 15 involves inverting the prediction error to generate a compensation amount, and then sending the compensation amount in advance to the control system to correct the target position command, in order to obtain the compensated target position. This includes: Step 151 involves inverting the prediction error to generate spatial coordinate compensation. This includes retrieving the advanced prediction error instruction issued in step 142 from the buffer and reading the three-axis dynamic error prediction values. For each axis's error value, an inversion operation is performed, transforming the error data that originally reflected the deviation between the actual and ideal values ​​into compensation data to correct the deviation.

[0042] Since the error prediction value itself contains three-dimensional spatial coordinate information, the inverted compensation data must maintain the spatial vector characteristics to ensure that the compensation direction in the X, Y, and Z dimensions is completely opposite to the error generation direction. For example, if the predicted X-axis error will be 0.3 μm in the positive direction at the next moment, then a compensation amount of 0.3 μm in the negative direction of the X-axis will be generated.

[0043] After generating the compensation amount, the system performs coordinate mapping calibration on the data based on the geometric parameters of the measuring machine to ensure that the compensation amount is completely matched with the mechanical coordinate system of the measuring machine, avoiding compensation deviations caused by differences in coordinate systems. At the same time, the compensation amount is checked for range limitations. If the compensation amount of a certain axis exceeds the mechanical adjustment limit of the equipment, an early warning is triggered and the maximum allowable compensation value is adopted to prevent damage to the mechanical structure.

[0044] Step 152 involves sending the compensation amount to the measuring machine's control system in advance. This includes transmitting the calibrated and verified spatial coordinate compensation amount to the CNC controller via the high-speed data bus within the control system. The transmission process is precisely synchronized with the measuring machine's motion control cycle. A pre-set transmission lead is used based on the measuring machine's operating speed. During high-speed operation (e.g., above 500 mm / s), the transmission lead needs to be shortened to the microsecond level to ensure that the compensation amount is transmitted and prepared before the start of the corresponding motion cycle.

[0045] Data encryption and verification mechanisms are employed during transmission to prevent interference or tampering with the compensation amount. After receiving the compensation amount, the CNC controller immediately associates and binds it with the corresponding target position command for the next moment, ensuring strict synchronization between the two through timestamps to avoid mismatches between the compensation amount and the command.

[0046] If a delay or interruption occurs during transmission, the system will immediately use the compensation amount from the previous cycle as a temporary substitute and trigger a real-time alarm to notify the operations and maintenance personnel. At the same time, abnormal data will be recorded for subsequent analysis to ensure the continuity of the compensation process.

[0047] Step 153: The control system superimposes the compensation amount onto the target position command, and drives the motor to execute the corrected trajectory to obtain the compensated target position. Specifically, this includes: when the CNC controller starts the corresponding motion cycle, it calls the bound original target position command and the compensation amount, and performs vector superposition calculation on the two. During the calculation, the kinematic model of the measuring machine is used to optimize and adjust the superposition result to ensure that the corrected target position conforms to the motion constraints of the mechanical structure, such as avoiding interference between the motion trajectories of each axis.

[0048] After the superposition is completed, a corrected target position command is generated. This command contains compensated X, Y, and Z axis coordinate information, which can accurately offset the dynamic errors that may occur in the next moment. The controller sends the corrected command to the servo drivers of each axis in real time, and the drive motors run according to the new trajectory parameters, driving the probe to move along the compensated path.

[0049] During motion execution, the servo driver feeds back the motor's operating status (such as actual speed and position) to the CNC controller in real time. The controller compares the operating status with the correction target in real time. If a slight deviation is found, it is corrected by fine-tuning the motor control signal. Ultimately, it ensures that the actual position reached by the probe is highly consistent with the compensated target position, thus achieving high-precision trajectory control.

[0050] In this embodiment of the invention, feedforward compensation is implemented to completely eliminate system lag. By issuing compensation commands to the motion control system in advance, the compensation action and the generation of error occur synchronously or even ahead of each other, overcoming the lag problem caused by signal acquisition, calculation, and transmission delays in traditional feedback compensation, and achieving zero-clear compensation for dynamic errors. Real-time trajectory shaping with nanometer-level precision is achieved, and the original interpolation trajectory of the CNC is precisely corrected in real time at the micrometer to nanometer level. This is not a simple offset, but a spatial trajectory reshaping based on the predicted error vector, ensuring that the path finally traversed by the probe tip is the theoretically ideal path, thereby directly determining the final accuracy of single-point measurement and scanning measurement. A closed-loop control of the virtual-physical system is formed, seamlessly and losslessly injecting the predicted results in the digital twin virtual space into the physical control loop, completing the final step from perception-analysis-decision-execution, and forming a complete closed-loop control system that guides the physical world from the virtual world. The core compensation formula is: ; The formula for instruction correction and coordinate mapping is: ; in, for Spatial coordinate compensation vector at time step For prediction The dynamic error vector at any given time. for The target position command vector after compensation and correction at any given time. Generated for CNC interpolators The original target position command vector at time step. This is the geometric error transformation matrix of the measuring machine. To compensate for the gain matrix, For compensation terms based on kinematic models, For the current moment, The lead time for system prediction and compensation; The compensation amount is generated as follows: at time... The digital twin system calculates advanced predictions. And immediately generate compensation vectors. The instruction has been revised to: The control system receives the original instruction. and compensation amount The modified instructions are synthesized according to the above formula. The driver executes the corrected instructions. It is sent to the servo driver, which drives the motor. Execute the compensated trajectory at all times; By integrating geometric error, kinematic compensation, and dynamic prediction, the output is accurately transformed into control actions on the physical world, realizing prediction as compensation. Ultimately, the dynamic accuracy of the coordinate measuring machine approaches its static accuracy limit, meeting the stringent requirements of modern intelligent manufacturing for high-speed and high-precision measurement.

[0051] like Figure 1 As shown, step 16 involves obtaining the residual error of the compensated actual position, calculating it, and feeding it back to the learning system to form a closed loop. This drives the digital twin to continuously self-optimize in order to improve long-term compensation accuracy, including: Step 161: Real-time acquisition of the actual position data of the compensated grating system. Specifically, after the probe completes the compensated motion trajectory, the system immediately acquires the actual position data of the probe through the grating measurement system. The grating system serves as a high-precision position reference for the measuring machine, and its acquisition frequency is consistent with the motion control cycle to ensure that the actual position information at each moment of motion can be captured.

[0052] The acquired data undergoes filtering to remove high-frequency noise and interference signals from the grating signal. Simultaneously, it is correlated with the corresponding compensation and target position commands via timestamps, forming a complete data chain of command-compensation-actual position. For abnormal data (such as jump values ​​caused by grating contamination), the system uses an interpolation algorithm between adjacent time points to correct the data, ensuring continuity and accuracy.

[0053] The collected actual location data will be transmitted to the data processing module in real time and stored in the historical database for subsequent traceability and analysis. The database storage adopts a cyclic overwrite mechanism, giving priority to retaining recent data and data under abnormal operating conditions.

[0054] Step 162: Based on the actual location data, calculate the compensation residual error and evaluate the compensation effect. Specifically, the data processing module calls the ideal target position command associated with the actual location data (i.e., the theoretical position before compensation), compares the actual location data with the ideal target position, and calculates the difference to obtain the compensation residual error. The residual error calculation needs to be performed separately for the X, Y, and Z axes, and a comprehensive residual error value is generated by combining the three-dimensional spatial geometric relationship. The residual error is analyzed based on preset compensation effect evaluation indicators. Core indicators include the absolute value of the residual error (whether it is controlled within the sub-micron range), the error change trend (whether it is stable or decreasing), and the error distribution characteristics under different working conditions. If the residual error is within the allowable range and evenly distributed, the compensation effect is good; if the residual error exceeds the threshold or shows significant fluctuations, it is marked as a poor compensation effect, and the reasons need to be analyzed in detail. After the evaluation is completed, a compensation effect report is generated, which includes residual error data, evaluation conclusions, and corresponding working condition information (such as movement speed and ambient temperature), providing a basis for subsequent model optimization.

[0055] Step 163 involves feeding the residual error back to the online learning module as an optimization signal. Specifically, the data processing module integrates the calculated residual error with the corresponding operating condition data (including multi-source state data, compensation amounts, motion parameters, etc. at the current moment) to form a complete optimization signal data packet. This data packet is transmitted to the online learning module in real-time via an internal communication link, ensuring that the temporal correlation of the data is not disrupted during transmission, enabling the learning module to clearly define the correspondence between the residual error and specific operating conditions and model parameters. After receiving the optimization signal, the online learning module parses and classifies the data packet, categorizing the residual error according to its magnitude and operating condition type. Operating condition data with larger residual errors are marked as key learning samples; regular operating condition data with smaller residual errors are included in the learning scope with normal weights, preparing for differentiated model optimization. Simultaneously, the learning module compares the residual error with historical data, analyzes the pattern of error changes, and determines whether there is a trend of increasing error due to factors such as equipment aging or environmental changes, providing direction for subsequent model parameter adjustments.

[0056] Step 164: Based on the optimized signal, proceed to the next round of self-iterative optimization loop. Specifically, the online learning module uses residual error as the core optimization objective and calls the incremental learning algorithm to fine-tune the parameters of the prediction model. For the high-error operating condition data that is highlighted, a reinforcement learning strategy is adopted to increase the weight of this type of data in parameter updates, enabling the model to focus on learning the error generation patterns under complex operating conditions and improve the prediction accuracy for extreme operating conditions.

[0057] A sliding window mechanism is introduced during parameter updates, retaining only the most recent operating conditions and error data for learning while automatically discarding outdated historical data. This ensures that model parameters are always adjusted based on the current actual state of the equipment, avoiding performance degradation caused by historical data interference. Simultaneously, by constraining the parameter adjustment range, catastrophic forgetting of data is prevented, ensuring that existing effective predictive capabilities are retained while learning new knowledge. After parameter fine-tuning, the updated predictive model is immediately put into the next round of error prediction and compensation, starting a new prediction-compensation-feedback-optimization cycle. Through this continuous self-iteration, the system constantly improves the model's predictive accuracy and adaptability, maintaining a high level of compensation accuracy over long-term operation, achieving autonomous evolution.

[0058] In this embodiment of the invention, a final closed loop from execution to verification and back to learning is completed. Its effect is to ensure that the system can not only accurately compensate in the short term, but also achieve long-term performance maintenance and continuous optimization; to achieve real-time performance monitoring and quantitative evaluation, by collecting the actual position data of the compensated grating in real time and comparing it with the ideal target position, the residual error is calculated. The residual error is the only objective indicator for evaluating the compensation effect, providing the system with a real-time performance check report; to provide high-quality, unbiased optimization signals for online learning, the residual error is fed back to the online learning module in real time as a truth signal driving model parameter updates, reflecting the current model's prediction deficiencies; to drive the continuous evolution of the digital twin, combating performance degradation, and achieving the core of adaptive and aging-adaptive mechanisms, the system can automatically identify and adapt to two types of changes by continuously tracking the changing trend of the residual error, such as the slow degradation of equipment performance caused by mechanical wear and structural creep. The residual error will gradually increase, and the learning algorithm tracks and compensates for this degradation process by fine-tuning the model parameters, keeping the system accuracy at the original level; such as when the probe is replaced, key components become loose, or the environment changes drastically. Such changes lead to abrupt changes in residual error, triggering a reinforcement learning mechanism in the system to quickly adjust the model to adapt to the new state. This forms a never-ending self-optimization cycle, improving long-term reliability and making the entire system an intelligent agent capable of autonomous evaluation, learning, and optimization. Every measurement and every compensation becomes a learning opportunity, enabling the digital twin model to continuously iterate and evolve throughout its entire lifecycle. The system's long-term measurement accuracy and stability no longer solely rely on initial calibration and periodic manual maintenance, but possess an immunity that can autonomously resist interference from internal and external factors, thereby significantly reducing the maintenance cost throughout the lifecycle and improving the reliability and availability of the equipment. By using residual error as a yardstick, the system continuously measures its own performance and transforms the gaps into nutrients for growth, driving the digital twin to continuously iterate itself, ultimately achieving the revolutionary ability to surpass initial accuracy and maintain ultra-high accuracy over the long term.

[0059] Figure 2 This is a schematic diagram of the structure of the electronic device provided in an embodiment of the present invention.

[0060] like Figure 2 As shown, the electronic device may include a processor 610, a communication interface 620, a memory 630, and a communication bus 640. The processor 610, communication interface 620, and memory 630 communicate with each other via the communication bus 640. The processor 610 can call logical instructions from the memory 630 to execute the adaptive dynamic error compensation method for the coordinate measuring machine.

[0061] Furthermore, the logical instructions in the aforementioned memory 630 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0062] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the adaptive dynamic error compensation method for coordinate measuring machines provided by the above methods.

[0063] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the adaptive dynamic error compensation method for a coordinate measuring machine provided by the methods described above.

[0064] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. 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. Those skilled in the art can understand and implement this without any creative effort.

[0065] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0066] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An adaptive dynamic error compensation method for a coordinate measuring machine, characterized in that, include: Acquire multi-source state data of a coordinate measuring machine and calculate real-time dynamic error. The state data includes motion state, dynamic response and environmental disturbance data. Based on real-time dynamic error, a virtual measurement machine model is constructed using a recurrent neural network and trained offline to obtain an initial error prediction model; Real-time error feedback data is obtained, and the initial error prediction model is fine-tuned using incremental learning algorithm and sliding time window mechanism to obtain a prediction model with dynamically evolving and aging adaptive parameters. Based on a prediction model with dynamically evolving and aging adaptive parameters, the dynamic error value at the next moment is predicted in real time to obtain the prediction error. The prediction error is inverted to generate a compensation amount, and the compensation amount is sent in advance to the control system to correct the target position command so as to obtain the compensated target position; The residual error of the actual position after compensation is calculated and fed back to the learning system to form a closed loop, driving the digital twin to continuously optimize itself to improve long-term compensation accuracy.

2. The adaptive dynamic error compensation method for a coordinate measuring machine according to claim 1, characterized in that, Acquire multi-source state data of the coordinate measuring machine and calculate real-time dynamic error. The state data includes motion state, dynamic response, and environmental disturbance data, including: The motion state data is obtained by reading the target position, velocity and acceleration command data of each axis of the coordinate measuring machine in real time from the CNC controller; Acceleration and strain sensors are used to collect vibration deformation signals at key structural points such as the crossbeam and spindle of a coordinate measuring machine, thus obtaining dynamic response data; By integrating temperature and vibration sensors, environmental temperature rise and external vibration interference sources can be monitored to obtain environmental disturbance data; Based on multi-source state data, the actual position of the probe is obtained using a grating system feedback, and the real-time dynamic error is calculated by comparing it with the target position.

3. The adaptive dynamic error compensation method for a coordinate measuring machine according to claim 2, characterized in that, Based on real-time dynamic errors, a virtual measurement machine model is constructed using a recurrent neural network and trained offline to obtain an initial error prediction model, including: Based on real-time dynamic error, a virtual measurement machine model is constructed using a recurrent neural network; Based on a virtual measuring machine model, the measuring machine is controlled to perform multi-track motion, and a laser interferometer is used to collect high-precision error calibration data. Based on high-precision error calibration data, the virtual measuring machine model is trained offline using offline calibration data to establish an initial high-fidelity error prediction model.

4. The adaptive dynamic error compensation method for a coordinate measuring machine according to claim 3, characterized in that, Real-time error feedback data is acquired, and the initial error prediction model is fine-tuned using an incremental learning algorithm and a sliding time window mechanism to obtain a prediction model with dynamically evolving and aging adaptive parameters, including: Acquire real-time error feedback data, compare the target position with the grating feedback position in real time, and calculate the instantaneous error as the true value label; Based on the ground truth labels, an incremental learning algorithm is used to dynamically update the model weights in short time windows. Based on the updated model weights, a sliding window mechanism is introduced to forget historical data, and reinforcement learning is performed on operating condition data with large prediction deviations to obtain a prediction model with dynamically evolving and aging adaptive parameters.

5. The adaptive dynamic error compensation method for a coordinate measuring machine according to claim 4, characterized in that, Based on a prediction model with dynamically evolving and aging-adaptive parameters, the dynamic error value at the next moment is predicted in real time, resulting in the prediction error, which includes: Based on a prediction model with dynamically evolving and aging adaptive parameters, the multi-source state data stream at the current moment is input, and the predicted value of the three-axis dynamic error at the next moment is calculated, thus obtaining the real-time prediction value. Based on real-time predicted values, an advance prediction error command is output to the compensation control module.

6. The adaptive dynamic error compensation method for a coordinate measuring machine according to claim 5, characterized in that, The prediction error is inverted to generate a compensation value, which is then sent in advance to the control system to correct the target position, thus obtaining the compensated target position, including: The prediction error is inverted to generate the spatial coordinate compensation amount; The compensation amount is sent to the control system of the measuring machine in advance; The control system adds the compensation amount to the target position command, and the drive motor executes the corrected trajectory to obtain the compensated target position.

7. The adaptive dynamic error compensation method for a coordinate measuring machine according to claim 6, characterized in that, The residual error of the compensated actual position is calculated and fed back to the learning system to form a closed loop, driving the digital twin to continuously self-optimize in order to improve long-term compensation accuracy, including: Real-time acquisition of the actual position data of the compensated grating system; Based on actual location data, calculate the compensation residual error and evaluate the compensation effect; The residual error is fed back to the online learning module as an optimization signal; Based on the optimized signal, it enters the next round of self-iterative optimization cycle.

8. An electronic device 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 adaptive dynamic error compensation method for a coordinate measuring machine as described in any one of claims 1 to 7.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the adaptive dynamic error compensation method for a coordinate measuring machine as described in any one of claims 1 to 7.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the adaptive dynamic error compensation method for a coordinate measuring machine as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Prediction method of pre-stroke error of three-coordinate measuring machine probe based on hybrid modeling

    CN107480377A

  • Dynamic error real-time compensation method and system for heavy-load vertical machining center

    CN120762349A

  • High-precision two-dimensional motion error prediction compensation iteration method

    CN120972590A

Cited By

  • 5G base station phase compensation method and system based on network configuration information

    CN122120073A