Five-axis linkage CNC machining dynamic error compensation system based on industrial control system
By using the real-time residual error monitoring and feedback mechanism of the industrial control system, combined with the dynamic error compensation method of multiple modules, the coupling effect and nonlinear characteristics of multi-source dynamic errors in five-axis linkage CNC machining are solved, achieving high-precision and high-robust dynamic error compensation, and improving machining accuracy and stability.
Patent Information
- Application Number
- CN202510716908.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-30
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-05-30
AI Technical Summary
Existing five-axis linkage CNC machining technology has limitations in handling the coupling effects and nonlinear characteristics of multi-source dynamic errors, making it difficult to achieve high-precision and high-robust dynamic error compensation.
The five-axis linkage CNC machining dynamic error compensation system based on the industrial control system introduces a real-time residual error monitoring and feedback mechanism, combined with a split-axis error detection module, a dynamic compensation model construction module, an industrial control real-time compensation execution module, an RTCP dynamic calibration unit, and an adaptive learning optimization module, to achieve adaptive parameter adjustment and error compensation.
It improves the accuracy and stability of dynamic error compensation in five-axis linkage CNC machining, especially under complex and rapidly changing dynamic error conditions, and enhances the system's adaptability and compensation effect.
Smart Images

Figure CN120491550B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of five-axis linkage CNC machining technology, specifically relating to a dynamic error compensation system for five-axis linkage CNC machining based on an industrial control system. Background Technology
[0002] Five-axis CNC machining is a technology that achieves efficient and high-precision machining of complex geometric workpieces by simultaneously controlling the coordinated motion of five coordinate axes (usually three linear axes X, Y, and Z and two rotary axes A, B, and C). As the manufacturing industry develops towards high-end and precision, five-axis CNC machining technology has been widely used in aerospace, mold manufacturing, and precision parts processing due to its high efficiency and precision. However, during high-speed and high-precision machining, factors such as thermal deformation of the machine tool structure, load deformation, geometric errors, and tool wear can cause the machining trajectory to deviate from the ideal path, generating dynamic machining errors that seriously affect the machining accuracy and surface quality of parts. Therefore, how to effectively compensate for dynamic errors in five-axis CNC machining is a key technical issue for improving machining accuracy and meeting the needs of high-end manufacturing.
[0003] Problems with existing technology:
[0004] Currently, error compensation methods for five-axis CNC machining mainly include offline error compensation and online error compensation. Offline error compensation is usually performed before machining, based on a pre-measured static error model of the machine tool, but it is difficult to effectively compensate for dynamic errors during machining, such as thermal drift and deformation caused by cutting forces. Online error compensation methods attempt to detect and compensate for errors in real time during machining. Commonly used methods include compensation based on sensor measurements and compensation based on model predictions. For example, high-precision measuring equipment such as laser interferometers and ballbars are used for error detection, and compensation is performed through the control system. Other methods compensate for error changes based on the thermal characteristics or mechanical models of the machine tool. However, existing technologies still have limitations in handling the coupling effects of multi-source dynamic errors, nonlinear characteristics, and real-time performance, making it difficult to achieve high-precision and high-robust dynamic error compensation. Summary of the Invention
[0005] The purpose of this invention is to provide a dynamic error compensation system for five-axis linkage CNC machining based on an industrial control system. By introducing a real-time residual error monitoring and feedback mechanism and establishing a data connection with the original adaptive optimization module, the system can achieve adaptive parameter adjustment based on the actual compensation effect, thereby enhancing the system's adaptability and compensation accuracy under complex dynamic machining conditions.
[0006] The specific technical solution adopted by this invention is as follows:
[0007] A five-axis linkage CNC machining dynamic error compensation system based on an industrial control system includes:
[0008] Axis error detection module: A hybrid detection network consisting of a grating ruler, an infrared thermal imager, a cutting force sensor, and a contact probe collects dynamic error data for each axis and generates an independent error model for each axis based on the improved DH method;
[0009] Dynamic compensation model construction module: A single-axis compensation sub-model is generated by decoupling the S-shaped function and the inverse Jacobian matrix; the time-varying error is predicted by the LSTM neural network, and the multi-physics field error is fused by the tensor decomposition algorithm to form a global dynamic compensation vector, which is output to the five-axis linkage interpolator.
[0010] Industrial control real-time compensation execution module: Embedded in the CNC system PLC controller, it synchronously outputs independent compensation commands for each axis through a high-speed communication protocol. The rotary axis compensation command includes the axis direction error correction amount and dynamically adjusts the servo gain based on the sliding mode control algorithm.
[0011] RTCP dynamic calibration unit: integrates a contact probe online measurement system with a standardized workpiece, corrects tool center point trajectory deviation in real time, and dynamically updates RTCP compensation parameters;
[0012] Adaptive learning optimization module: Based on an online reinforcement learning controller, with the minimization of contour error as the objective function, it dynamically adjusts the compensation weight coefficients of each axis through a deep Q-network, prioritizing the optimization of compensation strategies for high-frequency dynamic errors.
[0013] The split-axis error detection module covers the entire range of motion of five-axis linkage through the combination structure of the spiral groove and inclined plane of the standardized workpiece, separates the axial direction error of the rotary axis and the positioning error of the translational axis, and generates an error separation database.
[0014] The split-axis error detection module includes a dual-channel data fusion submodule, wherein:
[0015] The first channel uses data from the grating ruler and the cutting force sensor to separate high-frequency vibration errors using a Kalman filter algorithm.
[0016] The second channel is based on data from an infrared thermal imager and a contact probe, and uses finite element analysis to reconstruct the thermal error field and the geometric error field.
[0017] The data fusion layer integrates dual-channel data using a weighted Hausdorff distance algorithm to generate a high-resolution error separation database.
[0018] The dynamic compensation model construction module includes a multiphysics tensor decomposition submodule, specifically comprising:
[0019] The thermal error, force error, and motion error are expressed in the form of third-order tensors.
[0020] The Tucker decomposition algorithm is used to extract the principal components of the error, and the first three feature modes are retained as the basis for the compensation vector.
[0021] Compensation commands are generated by combining the kinematic constraints of the five-axis linkage interpolator.
[0022] The industrial control real-time compensation execution module adopts a partitioned and hierarchical compensation architecture:
[0023] Core compensation zone: Directly corrects the axial direction error of the rotation axis based on sliding mode control algorithm;
[0024] Secondary compensation region: Adjust the translation axis servo gain using a fuzzy PID controller;
[0025] Communication redundancy zone: Compensation commands are transmitted using dual-channel EtherCAT protocol.
[0026] The RTCP dynamic calibration unit includes a feature region adaptive selection module, specifically comprising:
[0027] Ballbar Data Collaborative Calibration Submodule: Real-time acquisition of rotation axis motion error data via ballbar, generating an error spectrum diagram;
[0028] The LS-SVM dynamic fitting submodule uses a least squares support vector machine to perform nonlinear fitting on the tool center point trajectory deviation, where the kernel function type is dynamically selected based on the ballbar error spectrum.
[0029] Feature region weight allocation logic: The spiral groove and inclined plane regions of the standardized workpiece are preset with weight coefficients. The contact probe dynamically adjusts the weight allocation ratio based on the radius of curvature of the current machining path and the ballbar error spectrum. The formula is:
[0030] ,in, The calibration weights for the i-th feature region are... The standard deviation of the area error measured by the ballbar. It is the reciprocal of the radius of curvature of the path;
[0031] Collaborative compensation triggering mechanism: When the LS-SVM fitting residual exceeds the preset threshold, the ballbar data is automatically triggered to be transmitted back to the dynamic compensation model construction module to update the global dynamic compensation vector.
[0032] The adaptive learning optimization module includes a multi-objective reinforcement learning controller, specifically comprising:
[0033] The objective function is a weighted sum of minimizing contour error and maximizing processing efficiency;
[0034] The reward function of a deep Q-network includes a tool wear rate constraint.
[0035] A transfer learning strategy is adopted to transfer the compensation strategy of the verified workpiece to the new workpiece processing scenario.
[0036] The dynamic error compensation method for five-axis linkage CNC machining based on industrial control systems includes the following steps:
[0037] A distributed sensor model was constructed to obtain dynamic error data of each axis in a five-axis linkage, and an independent error model for each axis was established based on the improved DH method.
[0038] The inverse Jacobian matrix is used to decouple static and dynamic errors and separate the coupling effects of synchronization and asynchronous errors.
[0039] To address the nonlinear error of the rotating shaft, an S-shaped function is used to fit the error curve, and an LSTM neural network is combined to predict the time-varying error caused by cutting force fluctuations and temperature drift, generating feedforward compensation commands. Multi-physics field errors are then fused through a tensor decomposition algorithm to form a global dynamic compensation vector.
[0040] The industrial control system decomposes the compensation vector into independent compensation commands for each axis and sends them synchronously to the servo driver. The rotary axis compensation command includes the axis direction error correction amount and dynamically adjusts the servo gain based on the sliding mode control algorithm to suppress high-frequency vibration error.
[0041] The tool center point trajectory deviation is calibrated by using an online measurement system with a contact probe and a standardized workpiece, and the RTCP compensation parameters are dynamically updated by combining the ballbar calibration data.
[0042] Based on an online reinforcement learning controller, the compensation weight coefficients of each axis are dynamically adjusted. With the minimization of contour error as the objective function, the compensation strategy is optimized in real time through a deep Q-network to adapt to sudden changes in working conditions.
[0043] According to another aspect of the present invention, an electronic device is also provided, the electronic device including a memory and a processor; the memory is used to store a program; the processor executes the program to implement the method described in any one of the foregoing.
[0044] According to another aspect of the present invention, a computer-readable storage medium is also provided, the storage medium storing a computer program that, when executed by a processor, implements the method described in any one of the preceding embodiments.
[0045] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the method described in any one of the preceding embodiments.
[0046] The technical effects achieved by this invention are as follows:
[0047] This invention, by introducing a real-time residual error monitoring and feedback mechanism and establishing a data connection with the original adaptive optimization module, achieves adaptive parameter adjustment based on actual compensation effects. Furthermore, by refining the types of multi-source data acquisition and enhancing the execution method of compensation commands by the industrial control system, it further enhances the system's adaptability and compensation accuracy under complex dynamic machining conditions, improving the dynamic error compensation accuracy and stability in five-axis CNC machining, especially in handling complex and rapidly changing dynamic errors. This provides timely, reliable, and comprehensive input data for subsequent modeling, ensuring the accuracy of error modeling and thus enhancing the effectiveness of compensation.
[0048] This invention can effectively address multi-source, coupled dynamic errors during processing, thereby improving the accuracy and stability of dynamic error compensation. Attached Figure Description
[0049] Figure 1 This is a structural block diagram of the five-axis linkage CNC machining dynamic error compensation system of the present invention;
[0050] Figure 2 This is a schematic diagram of the partitioned and hierarchical compensation architecture in this invention;
[0051] Figure 3 This is a flowchart of the dynamic error compensation method for five-axis linkage CNC machining in this invention. Detailed Implementation
[0052] To make the objectives and advantages of this invention clearer, the invention will be specifically described below with reference to embodiments. It should be understood that the following text is merely used to describe one or more specific embodiments of the invention and does not strictly limit the scope of protection specifically claimed by the invention.
[0053] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0054] According to an embodiment of the present invention, a method embodiment of a five-axis linkage CNC machining dynamic error compensation method based on an industrial control system is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0055] like Figure 1 As shown, a five-axis linkage CNC machining dynamic error compensation system based on an industrial control system includes:
[0056] Axis error detection module: A hybrid detection network consisting of a grating ruler, an infrared thermal imager, a cutting force sensor, and a contact probe collects dynamic error data for each axis and generates an independent error model for each axis based on the improved DH method;
[0057] Dynamic compensation model construction module: A single-axis compensation sub-model is generated by decoupling the S-shaped function and the inverse Jacobian matrix; the time-varying error is predicted by the LSTM neural network, and the multi-physics field error is fused by the tensor decomposition algorithm to form a global dynamic compensation vector, which is output to the five-axis linkage interpolator.
[0058] Industrial control real-time compensation execution module: Embedded in the CNC system PLC controller, it synchronously outputs independent compensation commands for each axis through a high-speed communication protocol. The rotary axis compensation command includes the axis direction error correction amount and dynamically adjusts the servo gain based on the sliding mode control algorithm.
[0059] RTCP dynamic calibration unit: integrates a contact probe online measurement system with a standardized workpiece, corrects tool center point trajectory deviation in real time, and dynamically updates RTCP compensation parameters;
[0060] Adaptive learning optimization module: Based on an online reinforcement learning controller, with the minimization of contour error as the objective function, it dynamically adjusts the compensation weight coefficients of each axis through a deep Q-network, prioritizing the optimization of compensation strategies for high-frequency dynamic errors.
[0061] Based on the above, the improved DH method introduces a temperature drift coefficient and dynamic weight adjustment;
[0062] Furthermore, add a temperature-related correction term to the DH parameters, such as... , where α is the coefficient of thermal expansion and ΔT is the temperature difference, to dynamically correct the axis offset caused by thermal error;
[0063] During the dynamic weight adjustment process, the coupling weight of the DH parameter is adjusted in real time based on the data from the cutting force sensor. For example, when the servo gain changes, the compensation coefficient of the connecting rod length parameter is updated.
[0064] Based on the above, the problem of real-time compensation for thermal drift and force deformation is solved by dynamically coupling temperature and cutting force to improve the robustness of the model.
[0065] Furthermore, in the kinematic constraints combined with the five-axis linkage interpolator, according to the ISO230-2 compatibility rules, the first three feature modes after Tucker decomposition are mapped to compensation instructions conforming to the ISO230-2 standard. For example, the principal components are converted into displacement corrections for the X / Y / Z axes and angle compensation values for the rotation axes. This achieves direct mapping between tensor decomposition and the standard, ensuring the universality and verifiability of the compensation instructions and avoiding compatibility issues between the algorithm and the hardware.
[0066] It should be further explained that the split-axis error detection module covers the entire motion range of five-axis linkage through the combination structure of the spiral groove and inclined plane of the standardized workpiece, separates the axial direction error of the rotary axis and the positioning error of the translational axis, and generates an error separation database.
[0067] It should be further noted that the split-axis error detection module includes a dual-channel data fusion submodule, in which:
[0068] The first channel uses data from the grating ruler and the cutting force sensor to separate high-frequency vibration errors using a Kalman filter algorithm.
[0069] The second channel is based on data from an infrared thermal imager and a contact probe, and uses finite element analysis to reconstruct the thermal error field and the geometric error field.
[0070] The data fusion layer integrates dual-channel data using a weighted Hausdorff distance algorithm to generate a high-resolution error separation database.
[0071] It should be further noted that the dynamic compensation model construction module includes a multiphysics tensor decomposition submodule, specifically including:
[0072] The thermal error, force error, and motion error are expressed in the form of third-order tensors.
[0073] The Tucker decomposition algorithm is used to extract the principal components of the error, and the first three feature modes are retained as the basis for the compensation vector.
[0074] Compensation commands are generated by combining the kinematic constraints of the five-axis linkage interpolator.
[0075] It should be further noted that the industrial control real-time compensation execution module adopts a partitioned and hierarchical compensation architecture. Please refer to [the relevant documentation / reference]. Figure 2 :
[0076] Core compensation zone: Directly corrects the axial direction error of the rotation axis based on sliding mode control algorithm;
[0077] Secondary compensation region: Adjust the translation axis servo gain using a fuzzy PID controller;
[0078] Communication redundancy zone: Compensation commands are transmitted using dual-channel EtherCAT protocol.
[0079] Furthermore, the priority switching condition between sliding mode control and fuzzy PID is as follows: in the partitioned and hierarchical compensation architecture, when the axial direction error of the rotating axis is ≥Xμm (X is a positive number less than or equal to 10), the priority of the core compensation area is triggered, and the sliding mode control algorithm intervenes to correct it with a 1ms cycle; otherwise, the fuzzy PID of the secondary compensation area adjusts the translation axis servo gain with a 5ms cycle.
[0080] By determining the high-frequency error threshold, the threshold determination enables multi-timescale collaborative compensation, improves dynamic response speed, and shortens the high-frequency vibration error suppression time by at least 40%.
[0081] Based on the experimental results, the improvement effect of the partitioned and hierarchical compensation architecture on high-frequency vibration error suppression time was verified:
[0082] Experimental comparison items Error type Suppression time / ms This improvement plan Improved suppression time / ms Traditional PID control High-frequency vibration error (≥10μm) 25 Partitioned and hierarchical compensation architecture (sliding mode + fuzzy PID) 14 Fuzzy PID control Trajectory Deviation 18 Partitioned and hierarchical compensation architecture 10 Single sliding mode control Thermal drift error 16 Partitioned and hierarchical compensation architecture 9 Multi-timescale collaborative compensation (simulation) Servo hysteresis error 20 Partitioned and hierarchical compensation architecture 11 Actual machining scenario (spiral groove machining) Tool center point trajectory deviation 30 Feature region adaptive calibration + partitioned and hierarchical compensation 17
[0083] The table shows that the partitioned and hierarchical compensation architecture has been optimized in terms of high-frequency vibration error suppression, multi-timescale collaborative response, and adaptability to actual processing scenarios.
[0084] It should be further explained that the RTCP dynamic calibration unit includes a feature region adaptive selection module, specifically including:
[0085] Ballbar Data Collaborative Calibration Submodule: Real-time acquisition of rotation axis motion error data via ballbar, generating an error spectrum diagram;
[0086] The LS-SVM dynamic fitting submodule uses a least squares support vector machine to perform nonlinear fitting on the tool center point trajectory deviation, where the kernel function type is dynamically selected based on the ballbar error spectrum.
[0087] Feature region weight allocation logic: The spiral groove and inclined plane regions of the standardized workpiece are preset with weight coefficients. The contact probe dynamically adjusts the weight allocation ratio based on the radius of curvature of the current machining path and the ballbar error spectrum. The formula is:
[0088] ,in, The calibration weights for the i-th feature region are... The standard deviation of the area error measured by the ballbar. It is the reciprocal of the radius of curvature of the path;
[0089] Collaborative compensation triggering mechanism: When the LS-SVM fitting residual exceeds the preset threshold, the ballbar data is automatically triggered to be transmitted back to the dynamic compensation model construction module to update the global dynamic compensation vector.
[0090] Furthermore, if the proportion of high-frequency components in the ballbar error spectrum exceeds a threshold (the threshold being the proportion of high-frequency components, with a minimum of 60%), the RBF kernel is then switched to enhance the nonlinear fitting capability; otherwise, a polynomial kernel is used to reduce computational complexity.
[0091] By dynamically adjusting the kernel function and transmitting data back from the ballbar, a closed-loop calibration process is formed, overcoming the limitations of the fixed kernel function in LS-SVM.
[0092] Furthermore, in five-axis linkage machining, the impact mechanisms of high-frequency errors (such as servo vibration and sudden changes in cutting force) and low-frequency errors (such as thermal drift and geometric errors) on machining accuracy are different. When the proportion of high-frequency components exceeds 60%, the error fluctuates violently and the nonlinear characteristics are obvious. It is necessary to use kernel functions with strong nonlinear fitting capabilities (such as RBF kernels), while low-frequency dominant scenarios (such as thermal errors) are suitable for polynomial kernels with higher computational efficiency.
[0093] The 60% threshold setting is a systematic optimization result based on error spectrum characteristic analysis and kernel function performance matching. It solves the problem that fixed kernel functions cannot balance high-frequency error fitting accuracy and computational efficiency, achieving a breakthrough in dynamic calibration algorithms.
[0094] Furthermore, the RBF kernel has higher fitting accuracy when processing nonlinear and highly fluctuating data, but its computational complexity is high; the polynomial kernel is suitable for smoothing error fields, but it is sensitive to high-frequency noise. By using a 60% threshold division, the optimal balance between fitting accuracy and computational efficiency can be achieved.
[0095] Based on the above, when the high-frequency component is ≥60%, the local approximation characteristics of the RBF kernel can more accurately capture the abrupt deviation of the tool center point (TCP) trajectory (such as the micron-level jump caused by cutting force impact), thus reducing the fitting residual of LS-SVM. In low-frequency dominant scenarios (high frequency <60%), the use of a polynomial kernel can reduce the amount of computation (such as the number of floating-point operations) by about 40%, avoiding the real-time performance degradation caused by over-reliance on the RBF kernel, meeting the millisecond-level compensation requirements of industrial control systems. By triggering kernel function switching through a threshold, the system can dynamically adapt to changes in machining conditions (such as tool wear and material differences), avoiding the "overfitting" or "underfitting" problems caused by a single kernel function, and improving the compensation robustness.
[0096] It should be further noted that the adaptive learning optimization module includes a multi-objective reinforcement learning controller, specifically comprising:
[0097] The objective function is a weighted sum of minimizing contour error and maximizing processing efficiency;
[0098] The reward function of a deep Q-network includes a tool wear rate constraint.
[0099] A transfer learning strategy is adopted to transfer the compensation strategy of the verified workpiece to the new workpiece processing scenario.
[0100] In the multi-objective reinforcement learning controller, a cross-workpiece compensation parameter transfer rule is set. The compensation weight coefficients of the verified workpieces are used as prior knowledge. The Bayesian optimization algorithm is used to quickly adapt to the new workpiece processing scenario. For example, when the tool material changes, the reward function weight of the deep Q network is automatically adjusted. Through transfer learning, the debugging time for processing new workpieces is shortened, thereby improving production efficiency.
[0101] It should be noted that the above modules can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0102] Please refer to Figure 3 A dynamic error compensation method for five-axis linkage CNC machining based on an industrial control system includes the following steps:
[0103] S1. Construct a distributed sensor model to obtain dynamic error data of each axis in the five-axis linkage, and establish an independent error model for each axis based on the improved DH method;
[0104] S2. Use the inverse Jacobian matrix to decouple static and dynamic errors, and separate the coupling effects of synchronization and asynchronous errors.
[0105] S3. For nonlinear errors of the rotating shaft (such as pitch compensation error), the error curve is fitted with an S-shaped function and combined with an LSTM neural network to predict time-varying errors caused by cutting force fluctuations and temperature drift, generating feedforward compensation commands. Multi-physics field errors are fused through tensor decomposition algorithm to form a global dynamic compensation vector.
[0106] S4. The industrial control system decomposes the compensation vector into independent compensation commands for each axis and sends them synchronously to the servo driver. The rotary axis compensation command includes the axis direction error correction amount and dynamically adjusts the servo gain based on the sliding mode control algorithm to suppress high-frequency vibration error.
[0107] S5. The tool center point trajectory deviation is calibrated in conjunction with the online measurement system of the contact probe and the standardized workpiece (combination structure of spiral groove and inclined plane), and the RTCP compensation parameters are dynamically updated in combination with the ball bar calibration data.
[0108] S6. Based on the online reinforcement learning controller, the compensation weight coefficients of each axis are dynamically adjusted. With the minimization of contour error as the objective function, the compensation strategy is optimized in real time through a deep Q-network to adapt to sudden changes in working conditions.
[0109] In step S1, the distributed sensor model includes, but is not limited to, grating rulers, infrared thermal imagers, cutting force sensors, and contact probes, which collect dynamic error data of each axis, such as thermal error, geometric error, and servo error. The temperature drift coefficient is introduced by improving the DH method to dynamically correct the axis offset caused by thermal error, and the compensation coefficient of the connecting rod length parameter is adjusted by the cutting force sensor data.
[0110] In step S2, the synchronous error (such as servo gain mismatch) and the asynchronous error (such as the backlash of the rotating shaft) are separated by using an inverse Jacobian matrix to solve the compensation lag problem caused by multi-source error coupling, and further combined with real-time sensor data to achieve dynamic decoupling.
[0111] In step S3, the tensor decomposition algorithm represents thermal error, force error and motion error as third-order tensors, extracts principal components through Tucker decomposition and generates a global dynamic compensation vector.
[0112] In step S4, the core compensation zone corrects the axial direction error of the rotating axis based on the sliding mode control algorithm, the secondary compensation zone adjusts the servo gain of the translation axis through fuzzy PID, and the communication redundancy zone uses the dual-channel EtherCAT protocol to ensure the reliability of command transmission. Through partitioned and hierarchical design, multi-time-scale collaborative compensation is achieved to improve the dynamic response speed.
[0113] In step S6, the objective function is a weighted sum of minimizing contour error and maximizing machining efficiency. The reward function of the deep Q network includes a tool wear rate constraint term. The compensation strategy of the verified workpiece is transferred to the machining scenario of the new workpiece through the transfer learning strategy, and the debugging time of the new workpiece machining is shortened through the transfer learning.
[0114] According to another aspect of the present invention, an electronic device is also provided, the electronic device including a memory and a processor; the memory is used to store a program; the processor executes the program to implement the method of any of the foregoing.
[0115] According to another aspect of the present invention, a computer-readable storage medium is also provided, the storage medium storing a computer program that, when executed by a processor, implements the method of any of the foregoing.
[0116] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the method described in any of the foregoing.
[0117] The above description is merely a preferred embodiment of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention. Structures, devices, and operating methods not specifically described or explained in this invention are implemented according to conventional methods in the art unless otherwise specified or limited.
Claims
1. A dynamic error compensation system for five-axis linkage numerical control machining based on an industrial control system, characterized in that, Comprise: Shaft error detection module: a hybrid detection network composed of grating ruler, infrared thermal imager, cutting force sensor and contact probe, respectively collecting dynamic error data of each axis, and generating independent error model of each axis based on improved D-H method; Dynamic compensation model construction module: S-shaped function and inverse Jacobian matrix decoupling algorithm are used to generate single-axis compensation sub-model; time-varying error is predicted by LSTM neural network, and multi-physical field error is fused by tensor decomposition algorithm to form global dynamic compensation vector to output to five-axis linkage interpolator; Industrial real-time compensation execution module: embedded in the PLC controller of numerical control system, synchronously outputs independent compensation instructions of each axis through high-speed communication protocol, and the compensation instructions of rotary axis contain axis direction error correction amount, and dynamically adjusts servo gain based on sliding mode control algorithm; RTCP dynamic calibration unit: integrates online measurement system with contact probe and standardized workpiece, real-time corrects tool center point trajectory deviation, and dynamically updates RTCP compensation parameters; Adaptive learning optimization module: based on online reinforcement learning controller, taking contour error minimization as objective function, dynamically adjusting compensation weight coefficients of each axis by deep Q network, and preferentially optimizing compensation strategy of high-frequency dynamic error; The dynamic compensation model construction module comprises a multi-physical field tensor decomposition submodule, specifically comprising: Expressing thermal error, force error and motion error as third-order tensor form; Using Tucker decomposition algorithm to extract error principal components, and retaining the first three characteristic modes as compensation vector bases; Combined with the kinematic constraints of five-axis linkage interpolator, compensation instructions are generated; The industrial real-time compensation execution module adopts a partitioned and hierarchical compensation architecture: Core compensation area: directly corrects the rotary axis direction error based on the sliding mode control algorithm; Secondary compensation area: adjusts the servo gain of the translational axis through the fuzzy PID controller; Communication redundancy area: uses dual-channel EtherCAT protocol to transmit compensation instructions.
2. The industrial control system based dynamic error compensation system for five-axis linkage machining according to claim 1, characterized in that: The shaft error detection module covers the full motion range of five-axis linkage through the combination structure of helical groove and inclined plane of the standardized workpiece, separates the rotary axis direction error and the translational axis positioning error, and generates an error separation database.
3. The industrial control system based dynamic error compensation system for five-axis machining according to claim 1, wherein, The shaft error detection module comprises a dual-channel data fusion submodule, wherein: The first channel is based on grating ruler and cutting force sensor data, and separates high-frequency vibration error through Kalman filtering algorithm; The second channel is based on infrared thermal imager and contact probe data, and uses finite element analysis to reconstruct thermal error field and geometric error field; The data fusion layer integrates dual-channel data through weighted Hausdorff distance algorithm to generate a high-resolution error separation database.
4. The industrial control system based dynamic error compensation system for five-axis machining according to claim 1, wherein, The RTCP dynamic calibration unit comprises a feature area adaptive selection module, specifically comprising: Ballbar data collaborative calibration submodule: real-time acquisition of rotary axis motion error data through ballbar to generate error spectrum; LS-SVM dynamic fitting submodule: uses least squares support vector machine to nonlinearly fit the tool center point trajectory deviation, and the kernel function type is dynamically selected according to the ballbar error spectrum; Synergistic compensation trigger mechanism: when the LS-SVM fitting residual exceeds the preset threshold, the ball bar data is automatically triggered to return to the dynamic compensation model construction module, and the global dynamic compensation vector is updated.
5. The industrial control system based dynamic error compensation system for five-axis simultaneous machining according to claim 1, wherein, The adaptive learning optimization module includes a multi-objective reinforcement learning controller, specifically including: The objective function is the weighted sum of the minimum contour error and the maximum machining efficiency. The reward function of the deep Q network includes a tool wear rate constraint term. A transfer learning strategy is adopted to transfer the compensation strategy of the verified workpiece to the new workpiece machining scene.
6. A dynamic error compensation method for five-axis linkage numerical control machining based on an industrial control system, using the system as claimed in any one of claims 1 to 5, characterized in that, The method comprises the following steps: A distributed sensor model is constructed to obtain dynamic error data of each axis in five-axis linkage, and an independent error model of each axis is established based on an improved D-H method; Inverse Jacobian matrix is used to decouple static error and dynamic error, and separate the coupling effect of synchronous error and non-synchronous error; For nonlinear errors of rotary axes, an S-shaped function is used to fit the error curve, and an LSTM neural network is used to predict time-varying errors caused by cutting force fluctuations and temperature drift to generate feedforward compensation instructions. Tensor decomposition algorithm is used to fuse multi-physical field errors to form a global dynamic compensation vector; The compensation vector is decomposed into independent compensation instructions for each axis by the industrial control system, and is sent to the servo driver synchronously, wherein the compensation instruction for the rotary axis includes an axis direction error correction amount, and the servo gain is dynamically adjusted based on the sliding mode control algorithm to suppress high-frequency vibration error; A contact probe online measurement system is used to cooperate with a standardized workpiece to calibrate the tool center point trajectory deviation, and the RTCP compensation parameters are dynamically updated based on the ball bar calibration data; Based on the online reinforcement learning controller, the compensation weight coefficients of each axis are dynamically adjusted, the objective function is the minimum contour error, and the compensation strategy is optimized in real time through the deep Q network to adapt to sudden changes in working conditions.
7. A computer readable storage medium, the storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the method of claim 6.
8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the method of claim 6.
Citation Information
Patent Citations
Spatial positioning error compensation method based on Siemens system
CN111665784A
Method for quickly optimizing and compensating spatial positioning errors of rotating shaft of five-axis numerical control machine tool
CN112526927A