Multi-axis control system and method for CNC machine tools based on real-time optimization
By introducing technologies such as physical digital twin kernel and real-time dynamic path optimizer, the problems of dynamic response lag and contour accuracy in high-precision complex surface machining of CNC machine tool multi-axis control system are solved, realizing efficient and stable multi-axis collaborative control and improving machining accuracy and efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XIAN GUHE AVIATION TECH CO LTD
- Filing Date
- 2026-04-27
- Publication Date
- 2026-06-30
AI Technical Summary
Traditional CNC machine tool multi-axis control systems suffer from dynamic response lag and contour accuracy degradation in high-precision complex surface machining. They are difficult to balance acceleration response and trajectory fidelity during high-speed machining, which can easily lead to overshoot or lag. Furthermore, frequent acceleration and deceleration can cause machine tool chatter, making it difficult to balance machining efficiency and accuracy.
A real-time optimization-based multi-axis control system for CNC machine tools is adopted, including a physical digital twin kernel, a real-time dynamic path optimizer, an error compensation pre-simulation module, a data acquisition and feedback unit, and a servo drive execution unit. By sensing the physical state of the machine tool and the workpiece in real time, the motion trajectory is dynamically reconstructed, and the coordinated motion of each axis is optimized by combining reinforcement learning and feedforward compensation technology.
It achieves improved overall feed efficiency, reduced dynamic tracking error, suppressed machine tool chatter, extended tool and machine tool component life, improved part surface finish, and stable machining under complex working conditions during high-precision machining.
Smart Images

Figure CN122308259A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of CNC machine tool control systems, specifically relating to a multi-axis control system and method for CNC machine tools based on real-time optimization. Background Technology
[0002] With the continuous evolution of intelligent manufacturing and precision machining technologies, CNC machine tools, as core equipment in high-end manufacturing, have seen their multi-axis linkage control technology become a key indicator for measuring industrial manufacturing capabilities. In the field of machining high-precision, complex curved surfaces, the system's real-time planning of motion trajectories and coordinated control of each axis directly affect the geometric accuracy and surface quality of the parts. Addressing the stringent quality requirements of aerospace and precision mold industries, CNC systems must complete the calculation and execution of complex motion commands within extremely short control cycles, placing higher demands on the real-time performance and dynamic response capabilities of control algorithms.
[0003] Multi-axis control systems primarily analyze preset geometric path information, converting it into displacement and velocity commands for each feed axis, and then use a servo feedback mechanism to track a predetermined trajectory. Traditional CNC systems generally employ a hierarchical control architecture, where the host computer performs path planning based on an ideal geometric model, and the controller performs real-time drive compensation based on feedback signals.
[0004] Traditional layered architectures separate geometric path planning from physical execution, leading to an inherent technical contradiction between the system's dynamic response characteristics and contour accuracy. During high-speed machining, the lack of real-time awareness of physical limits such as motor electromagnetic saturation and mechanical inertia makes it difficult to balance acceleration response and trajectory fidelity at points of path curvature change, easily causing overshoot or hysteresis. Existing speed smoothing and look-ahead processing techniques are mostly based on linear corrections of geometric parameters, failing to address nonlinear interference from cutting force fluctuations and electromechanical coupling. The lack of online prediction and dynamic path shaping capabilities for physical execution states forces a trade-off between reduced machining efficiency and accuracy under complex conditions. Frequent acceleration and deceleration easily induce machine tool chatter, making it difficult to resolve the coordination challenges between the physical execution layer and the geometric planning layer in the time and force domains. Summary of the Invention
[0005] The purpose of this invention is to provide a multi-axis control system for CNC machine tools based on real-time optimization, which can effectively solve the contradiction between dynamic response lag and contour accuracy deterioration in the above-mentioned background technology.
[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows: The CNC machine tool multi-axis control system based on real-time optimization includes a physical digital twin kernel, a real-time dynamic path optimizer, an error compensation pre-simulation module, a data acquisition and feedback unit, and a servo drive execution unit. The physical digital twin kernel is used to run high-fidelity digital twin models of the machine tool, workpiece, and tool system in parallel within the controller. The model integrates the electromagnetic equations of the servo motor, the stiffness and inertia parameters of the mechanical transmission system, and integrates a real-time cutting force prediction model. The physical digital twin kernel dynamically calculates the physical limit performance surface of each drive axis at the current moment based on the real-time collected tool status information, workpiece material characteristic information, and real-time inertia data of each axis of the machine tool. The physical limit performance surface covers the dynamic constraint boundaries of maximum acceleration, maximum jerk, and maximum torque. The real-time dynamic path optimizer is connected to the physical digital twin kernel and is used to receive preset geometric path instructions and convert the geometric path instructions into high-level geometric constraints. In each preset control cycle, the real-time dynamic path optimizer reconstructs the motion trajectory of the next time period based on the physical limit performance surface provided by the physical digital twin kernel, combined with the current actual motion state of each axis and the geometric path points in the future predetermined time window, through a fusion algorithm of model predictive control and dynamic programming. The error compensation pre-simulation module adopts a reinforcement learning architecture to continuously monitor the residual between the reconstructed motion trajectory generated by the real-time dynamic path optimizer and the actual physical state fed back by the physical digital twin kernel. By performing pattern recognition on massive data at a preset sampling frequency, it extracts the systematic deviation patterns caused by nonlinear friction or thermal deformation and generates a forward-looking feedforward compensation signal. The feedforward compensation signal is injected into the speed loop or current loop of the servo drive execution unit. The data acquisition and feedback unit is used to acquire the position information, speed information, acceleration information and real-time mechanical signals of each motion axis of the machine tool in real time, and feed the signals back to the physical digital twin kernel and the real-time dynamic path optimizer to build a closed-loop feedback link between perception and execution. The servo drive execution unit drives the machine tool's axis motors to complete coordinated motion based on the optimized trajectory instructions generated by the real-time dynamic path optimizer and the compensation signals provided by the error compensation pre-simulation module.
[0007] Preferably, the electromagnetic equations of the servo motor in the physical digital twin kernel take into account the nonlinear effects of voltage saturation and current limits. By monitoring the relationship between the inverter output voltage and the bus voltage in real time, the torque output limit of the motor is dynamically corrected to ensure that the physical limit performance surface can truly reflect the instantaneous overload capacity of the electric drive system.
[0008] Furthermore, the mechanical transmission stiffness model in the physical digital twin kernel includes the axial stiffness of the lead screw, the support stiffness of the bearing, and the torsional stiffness of the coupling. By establishing a multi-degree-of-freedom mass spring damping system, the natural frequencies of each shaft at different position coordinates are calculated, and acceleration ranges that may induce resonance are automatically avoided in the physical limit performance surface.
[0009] Furthermore, the real-time cutting force prediction model in the physical digital twin kernel analyzes the minute fluctuations of the spindle current and the vibration signals obtained by the data acquisition feedback unit to invert the current cutting force. Combined with the constitutive characteristics of the workpiece material, it predicts the impact of the cutting load on the feed axis running resistance in the future control cycle and adjusts the torque reserve of each axis.
[0010] Preferably, when performing path reconstruction, the real-time dynamic path optimizer adopts a cost function based on the game between time optimization and contour error minimization. Within the preset geometric path error pipeline, it allows the actual planned trajectory to deviate slightly from the ideal geometric path in exchange for the smoothness of the motion of each drive shaft, thus avoiding acceleration jumps at the abrupt changes in path curvature.
[0011] Furthermore, the real-time dynamic path optimizer has a dynamic coupling compensation function. When it senses that a certain motion axis is about to reach the preset physical performance limit, the real-time dynamic path optimizer adjusts the multi-axis linkage ratio and allocates part of the deceleration task to the other motion axes with higher performance redundancy. Through the coordination between the axes, the overall synthetic feed rate is maintained in the preset high range, rather than adopting a global linear deceleration strategy.
[0012] Furthermore, the future predetermined time window processed by the real-time dynamic path optimizer contains a predetermined number of interpolation cycles. By pre-calculating the curvature of the future path, the real-time dynamic path optimizer can determine the optimal deceleration start point and acceleration end point in advance under physical limit constraints, ensuring a smooth speed transition before entering small rounded corner or sharp corner regions.
[0013] Preferably, the reinforcement learning agent in the error compensation pre-simulation module adopts a lightweight neural network structure. Its input vector includes the curvature of the current trajectory, feed rate, cutting force, and real-time tracking error of each axis. The output vector is the offset compensation amount for the current loop or speed loop. The reinforcement learning agent performs online strategy updates during machine tool operation to gradually approximate the true mapping relationship of the system's nonlinear deviation.
[0014] Furthermore, the auxiliary feedforward signal generated by the error compensation pre-simulation module is linearly superimposed with the traditional proportional-integral-derivative control feedback signal in the adder. By applying a reverse adjustment force before the physical deviation actually manifests, the transient error peak of the system during high-speed commutation or sudden load changes is significantly reduced.
[0015] Furthermore, the error compensation pre-simulation module also includes a thermal deformation prediction unit. This thermal deformation prediction unit calculates the spatial geometric displacement deviation between the spindle and the guide rail in real time based on the temperature sensing signals distributed in key parts of the machine tool and the thermodynamic coupling model in the physical digital twin kernel, and injects the spatial geometric displacement deviation compensation value into the geometric constraints of the real-time dynamic path optimizer.
[0016] Preferably, the data acquisition feedback unit uses a high-speed industrial bus for data transmission to ensure that the synchronization timestamp error between the position feedback signal and the mechanical sensing signal is within a preset extremely low range, so as to ensure the temporal consistency of the real-time dynamic path optimizer when performing multi-axis coupling calculations.
[0017] Furthermore, the data acquisition feedback unit also integrates tool wear condition assessment logic. By analyzing the energy distribution characteristics of the cutting force signal in a specific frequency domain, it identifies the degradation trend of the tool and transmits the wear degree as a parameter to the physical digital twin kernel to correct the coefficients of the cutting force prediction model.
[0018] Furthermore, the servo drive execution unit supports high-bandwidth current response, and its internal power unit dynamically adjusts the switching frequency of the power transistor within a preset fine-tuning range according to the instructions of the error compensation pre-simulation module, so as to optimize the output stability during low-speed cutting or high-precision positioning.
[0019] The real-time optimization-based CNC machine tool multi-axis control method uses the aforementioned real-time optimization-based CNC machine tool multi-axis control system to achieve real-time optimization of CNC machine tool multi-axis control.
[0020] Compared with the prior art, the present invention has the following beneficial effects: 1. This invention, by introducing a physical digital twin kernel and a real-time dynamic path optimizer, breaks the traditional trade-off between machining efficiency and contour accuracy in CNC systems. The system no longer blindly follows a preset static path, but instead dynamically reconstructs the trajectory based on the machine tool's actual physical limits, ensuring that geometric errors remain within a preset tolerance range. This allows for improved overall feed efficiency while maintaining extremely high contour accuracy when machining complex surfaces such as aerospace impellers and precision molds. 2. The integrated perception-prediction-planning-execution architecture constructed in this invention possesses strong dynamic robustness. Because the system can predict cutting force fluctuations and sense environmental changes in real time, when encountering non-ideal working conditions such as uneven workpiece material hardness, tool wear, or thermal fluctuations, the physical digital twin kernel can instantly capture the anomalies and drive the path optimizer to adjust its strategy. This avoids the risks of overcutting, vibration, or tool breakage caused by traditional fixed parameter control, ensuring a highly stable machining process. 3. Through an error compensation pre-simulation module, this invention enables reinforcement learning agents to identify and pre-counter complex nonlinear interferences, reducing the dynamic tracking error of the system to an extremely low level during high-speed operation. This deep force-position-shape coupling optimization smooths the machine tool's motion trajectory, suppresses body chatter and resonance, not only improving the surface finish of parts and eliminating tool marks caused by sudden speed changes, but also extending the service life of machine tool transmission components and cutting tools by reducing mechanical impact loads. 4. The system architecture of this invention achieves deep integration of the planning and execution layers. By performing dynamic path shaping and feedforward compensation within a microsecond-level control cycle, the system can fully exploit the dynamic potential of each execution axis. Without changing the physical hardware configuration, algorithm-driven improvements achieve a leap in machining performance, providing advanced technical means for the efficient manufacturing of complex and precision parts. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the overall technical solution architecture proposed in this invention; Figure 2 This is a schematic diagram of the core principle framework of this invention; Figure 3 This is a flowchart illustrating the logical process of dynamically solving the physical limit performance surface using a physical digital twin kernel fused with a multiphysics model in this invention. Figure 4 This is a flowchart illustrating the logical flow of the error compensation pre-simulation module in this invention, which uses a reinforcement learning architecture to generate feedforward compensation signals. Figure 5 This is a schematic diagram of the multi-level interaction relationships and data flow of each module in the perception-prediction-planning-execution closed loop of this invention; Figure 6 This is a schematic diagram comparing the optimization of dynamic response lag and contour accuracy in the machining of complex curved surfaces, which is the core principle of this invention. Detailed Implementation
[0022] Example 1: Please refer to the appendix Figure 1 To be continued Figure 6 The multi-axis control system for CNC machine tools based on real-time optimization includes a physical digital twin kernel, a real-time dynamic path optimizer, an error compensation pre-simulation module, a data acquisition and feedback unit, and a servo drive execution unit.
[0023] The physical-digital twin kernel, serving as the system's underlying computation and simulation core, integrates a computing array based on a high-performance real-time processor. This array is used to run high-fidelity digital twin models of the machine tool, workpiece, and cutting tool systems in parallel within the controller. The physical-digital twin kernel is not a simple static parameter repository, but rather a dynamic, evolving entity.
[0024] The digital twin model integrates the electromagnetic equations of the servo motor, the stiffness and inertia parameters of the mechanical transmission system, and incorporates a real-time cutting force prediction model. The physical digital twin kernel receives raw signals from the data acquisition feedback unit via a high-speed backplane bus, and dynamically calculates the physical limit performance surface of each drive axis at the current moment within a microsecond-level calculation cycle based on the real-time acquired tool status information, workpiece material characteristic information, and real-time inertia data of each axis of the machine tool.
[0025] The physical limit performance surface is no longer a fixed nominal value in traditional technology, but a dynamic constraint boundary that includes the maximum acceleration, maximum jerk, and maximum torque.
[0026] For the Each drive shaft, at any given time Its physical limit performance surface It consists of the intersection of three parts: electromagnetic limit, dynamic limit, and cutting disturbance limit, and is expressed as: ;in, For axial acceleration, For axial acceleration, For driving torque; These are the feasible domain sets for the corresponding physical quantities.
[0027] For the electromagnetic torque limit set The kernel solves the nonlinear motor equations in real time by introducing a consideration of voltage saturation: ;in, This represents the number of pole pairs of the motor. It is a permanent magnet flux linkage. For dq axis inductance, For the maximum permissible quadrature-axis current, This is the reference current for weak magnetic field. Bus voltage The current electric angular velocity of the motor, It is the nonlinear saturation coefficient calculated based on the ratio of inverter output voltage to bus voltage.
[0028] For the set of dynamic limits The kernel, combined with the mechanical transmission stiffness sub-model, calculates the current spatial position coordinates. The natural frequency below And based on this, set the acceleration constraint boundary: ;in, For static design of maximum acceleration, The vibration suppression safety factor (with a value ranging from 0.3 to 0.5) This represents the maximum permissible micro-displacement amplitude. Using the above formula, the physical-digital twin kernel transforms the acquired real-time voltage and position signals into explicit mathematical boundaries, which are then output to the real-time dynamic path optimizer as hard constraints.
[0029] When the physical digital twin kernel senses that the machine tool table has moved to a middle position where the lead screw support stiffness is low, it will automatically lower the acceleration limit of the axis to avoid inducing mechanical resonance.
[0030] The electromagnetic equations of the servo motor in the physical digital twin kernel not only describe the current-torque relationship under ideal conditions, but also deeply consider the nonlinear effects of voltage saturation and current limits. By monitoring the instantaneous ratio between the inverter output voltage and the bus voltage in real time, the physical digital twin kernel can dynamically correct the torque output limit of the motor, ensuring that the physical limit performance surface can truly reflect the instantaneous overload capacity of the electric drive system under various grid fluctuations or heavy load conditions.
[0031] The mechanical transmission stiffness model in the physical digital twin kernel has a multi-level subdivision structure, including an axial stiffness sub-model for the lead screw, a support stiffness sub-model for the bearing, and a torsional stiffness sub-model for the coupling. By establishing a multi-degree-of-freedom mass spring damping system, the kernel can calculate the natural frequency distribution of each axis in different spatial coordinates in real time, automatically avoiding acceleration ranges that may induce resonance in the mechanical structure within the generated physical limit performance surface. This constraint generation method based on physical essence eliminates the risk of vibration or loss of synchronization caused by traditional control systems exceeding physical load-bearing limits.
[0032] Furthermore, the real-time cutting force prediction model in the physical digital twin kernel is equipped with a feature extraction unit. By analyzing the minute high-frequency fluctuations of the spindle current and the mechanical vibration signal obtained by the data acquisition feedback unit, the current cutting force is calculated using inversion logic.
[0033] The real-time cutting force prediction model achieves the inverse calculation of cutting force by establishing an inverse dynamics model of the spindle drive system. Based on the torque balance equation of the spindle motor: ;in, The real-time electromagnetic torque output by the motor is obtained by the data acquisition and feedback unit. The equivalent rotational inertia of the main spindle system Main axis angular velocity, The viscous damping coefficient is...
[0034] This represents the nonlinear frictional torque estimated in real time using the Stribeck friction model.
[0035] By rearranging and inverting the above equation, the cutting torque is obtained. : Furthermore, by combining the current tool geometry parameters, the cutting torque is converted into the resultant cutting force in the feed direction. : ;in, Current cutting depth The equivalent cutting radius is as follows. This is the torque-force conversion factor related to the tool helix angle and the current spindle rotation angle. The calculated estimate of the current resultant cutting force.
[0036] On the one hand, it is passed to the physical digital twin kernel to correct the torque reserve boundary, and on the other hand, it is passed as a feature input to the reinforcement learning agent state vector of the error compensation pre-simulation module.
[0037] By combining the constitutive relation characteristics of the workpiece material stored in the local database, the prediction model can predict the trend of the influence of cutting load on the running resistance of the feed axis within several control cycles in the future. Based on this prediction result, the physical digital twin kernel adjusts the torque reserve of each axis in real time. That is, before the cutting force increases, more torque redundancy is reserved for the corresponding drive axis in the physical limit performance surface, ensuring that the dynamic response of the feed system still conforms to the expected motion trajectory under complex load disturbances.
[0038] The real-time dynamic path optimizer communicates with the physical digital twin kernel at high speed to receive preset geometric path instructions from the host computer or CAD / CAM system. Instead of directly converting G-code into interpolation pulses, the real-time dynamic path optimizer transforms it into high-level geometric constraints. Within each preset control cycle, the real-time dynamic path optimizer uses the real-time physical limit performance surface provided by the physical digital twin kernel as dynamic boundary conditions. It combines the current actual motion position, velocity, and acceleration state of each axis with the geometric path point sequence within a predetermined future time window, and reconstructs the motion trajectory for the next time period using a fusion algorithm of model predictive control and dynamic programming.
[0039] The real-time dynamic path optimizer introduces a cost function based on a game of time optimization and contour error minimization.
[0040] The real-time dynamic path optimizer, in each control cycle, is based on the front-end geometric path point sequence and the physical limit performance surface. Discrete-time state-space equations are constructed. Taking two-axis linkage machining as an example, the system's state vector is defined as follows: The control input vector is defined as The state-space expression is: ;in, The system matrix contains kinematic integral relations. For the input matrix, Index for the predicted step size within the future scheduled time window.
[0041] The cost function $J$ based on the game of time optimization and contour error minimization is specifically constructed as the following quadratic form: ;in, To predict the total number of interpolation periods in the time domain, The interpolation period; For the first The contour error vector of the predicted trajectory relative to the ideal geometric path; The contour error penalty weight matrix (its diagonal elements are strictly set according to the machining tolerance zone, and the weight increases exponentially as the tolerance narrows); The incremental penalty matrix is used to control and suppress sudden changes in jerk. This is a time efficiency weighting coefficient;
[0042] During the solution process, the optimizer will incorporate the aforementioned physical limit performance surfaces. Transform into a Linear Matrix Inequality (LMI) constraint: ;in, For the constraint matrix, This is the boundary vector composed of the current acceleration, jerk, and torque limit values obtained in real time from the physical digital twin kernel. The optimizer solves this constrained quadratic programming (QP) problem by calling the interior-point method solver, and the resulting optimal control sequence... This acceleration command, which is used to reconstruct the motion trajectory, is transmitted to the servo drive execution unit.
[0043] Within a pre-defined geometric path error pipeline, the real-time dynamic path optimizer allows for controlled, minor deviations from the ideal geometric path in the actually planned trajectory. When the system detects a sudden change in curvature in the path ahead, the optimizer, based on its current dynamic performance reserves, adjusts the curvature of the local trajectory to ensure smoother motion of each drive axis, while keeping the error within the error limit. This avoids abrupt acceleration jumps at path transitions.
[0044] The real-time dynamic path optimizer also possesses deep dynamic coupling compensation capabilities. During multi-axis linkage machining, when the optimizer senses through look-ahead prediction that a specific motion axis is about to reach its physical performance limit, it no longer simply performs global linear deceleration. Instead, it adjusts the linkage ratio between multiple axes, distributing some of the deceleration pressure or load to other motion axes with higher performance redundancy. Through this nonlinear coordination between axes, the system can maintain the overall composite feed rate within a preset high range, improving machining efficiency. To ensure the accuracy of this dynamic reconstruction, the future predetermined time window processed by the real-time dynamic path optimizer includes a predetermined number of interpolation cycles. By calculating the curvature of the future path in advance, the optimizer can determine the optimal deceleration start point and acceleration end point under physical limit constraints, ensuring that the machine tool has completed a smooth and efficient speed transition before entering areas with small fillets or complex sharp corners.
[0045] The error compensation pre-simulation module is configured between the real-time dynamic path optimizer and the servo drive execution unit, and adopts an advanced reinforcement learning architecture.
[0046] In a preferred implementation, the error compensation pre-simulation module employs the Deep Deterministic Policy Gradient (DDPG) algorithm to construct a reinforcement learning agent. This architecture includes an Actor network and a Critic network.
[0047] In terms of state space definition, the data of the preceding module is encapsulated as a state tensor. : ;in, The local trajectory curvature output by the real-time dynamic path optimizer. To synthesize the feed rate, This is the predicted value of the cutting force. The temperature rise output by the thermal deformation prediction unit. This represents the current actual tracking error for each axis.
[0048] In the definition of action space, the output tensor The compensation offset is directly mapped to the speed loop or current loop of the servo drive unit: ;in, This is the compensation current command for the $n$-th axis current loop.
[0049] To enable the agent to learn "forward feedforward compensation" to reduce residuals, the following hybrid reward function was designed. : The first term on the right side of the equation is the look-ahead penalty term. For the rehearsal time delay step, The first term is the number of steps to be sampled in the future, which incentivizes the model to reduce tracking errors in the next few steps; the second term is the motion smoothing regularization term, which prevents severe oscillations in the compensation signal from damaging the mechanical structure; the third term is a Boolean indicator reward, which is applied when the predicted contour error... Less than the set threshold Additional rewards will be given at that time; To balance the hyperparameters of the above objectives.
[0050] In the online policy update mechanism, the Critic network evaluates the value of the current action by minimizing the temporal difference (TD) error, and its loss function is... for: ;in, The batch size drawn from the experience replay pool. For the target Q value, As a discount factor, These are the parameters of the current and target Critic networks, respectively. The Actor network updates its parameters through policy gradient ascent. : ;in, The deterministic strategy is determined for the Actor network. Through the explicit loss function and gradient update formula described above, the reinforcement learning agent can achieve supervised parameter evolution during machine tool operation. The final output offset compensation amount $A_t$ is superimposed with the PID feedback signal and sent to the servo drive execution unit.
[0051] The task of this error compensation pre-simulation module is to identify and eliminate residual errors caused by model simplification or environmental changes. This module is configured to continuously monitor the residual between the reconstructed motion trajectory generated by the real-time dynamic path optimizer and the actual physical state fed back by the physical digital twin kernel. By performing pattern recognition on massive amounts of operational data sampled at a preset high frequency, the module can extract systematic deviation patterns caused by nonlinear friction, thermal deformation, or guide rail crawling.
[0052] The reinforcement learning agent in the error compensation pre-simulation module employs a lightweight deep neural network structure with a rich set of input vector components, including but not limited to the local curvature of the current trajectory, real-time feed rate, estimated cutting force, ambient temperature, and the current real-time tracking error of each axis. The agent's output vector is defined as the offset compensation amount for the current loop or speed loop within the servo drive execution unit. During the continuous operation of the machine tool, this reinforcement learning agent continuously fine-tunes its internal weight parameters through an online policy update mechanism, gradually approximating the true mapping relationship of the system's nonlinear deviation.
[0053] The forward-looking feedforward compensation signal generated by the error compensation pre-simulation module is dynamically superimposed linearly or nonlinearly with the traditional proportional-integral-derivative (PID) control feedback signal in a high-performance adder before being injected into the servo drive execution unit. The core significance of this approach is that the system has already applied an opposing and matched adjustment force through pre-simulation logic before the physical deviation truly manifests due to control lag. This reduces the transient error peaks during high-speed reversals, spindle start-ups / stops, or sudden changes in cutting load. The error compensation pre-simulation module also includes a dedicated thermal deformation prediction unit, which calculates and predicts the spatial geometric displacement deviation between the spindle end and the guide rail in real time based on multiple temperature sensor signals distributed in key components such as the machine tool spindle box, guide rails, and bed, combined with a multi-field thermodynamic coupling model in the physical digital twin kernel. The thermal displacement compensation value is injected into the geometric constraints of the real-time dynamic path optimizer in real time.
[0054] The data acquisition and feedback unit, acting as the system's sensory interface, acquires real-time position, velocity, and acceleration information of each motion axis of the machine tool, as well as various mechanical sensing signals during the cutting process. To ensure the real-time and deterministic transmission of massive amounts of data, the data acquisition and feedback unit employs a high-speed industrial bus architecture with hardware-level clock synchronization. This guarantees that the synchronization timestamp error between the position feedback signal and the high-frequency mechanical sensing signal is controlled within an extremely low nanosecond range, providing a strict temporal consistency guarantee for the real-time dynamic path optimizer to perform multi-axis coupled calculations.
[0055] Furthermore, the data acquisition and feedback unit also integrates tool wear condition assessment logic. This logic performs real-time frequency domain transformation on the acquired cutting force signal to analyze the energy distribution characteristics and trends within a specific frequency band. When it identifies an enhancement of specific harmonic components due to tool wear, the assessment logic quantifies the degree of tool degradation and transmits it back to the physical-digital twin kernel as a key correction parameter. The physical-digital twin kernel then corrects the coefficients of the cutting force prediction model accordingly.
[0056] The servo drive execution unit, as the final execution mechanism of the system, receives optimized trajectory instructions from the real-time dynamic path optimizer and precise compensation signals provided by the error compensation pre-simulation module. The servo drive execution unit supports extremely high bandwidth current response characteristics, and its internal power conversion unit can dynamically adjust the switching frequency of the power transistors within a fine-tuning range according to instructions. This feature enables the system to suppress torque pulsation and achieve excellent output stability during extremely low-speed cutting or ultra-high-precision positioning. Through deep collaboration with the aforementioned modules, the servo drive execution unit can drive the machine tool's axis motors to complete coordinated movements that surpass traditional response speeds.
[0057] The flow of data between modules forms a multi-level closed-loop system. First, the data acquisition and feedback unit extracts raw electrical, force, and thermal signals from the physical field; the physical digital twin kernel transforms these signals into performance surfaces describing physical limits; under the constraints of the performance surfaces, the real-time dynamic path optimizer dynamically shapes the geometric space defined by the G-code to generate a reconstructed trajectory; the error compensation pre-simulation module predictively eliminates potential dynamic deviations in the reconstructed trajectory, generating the final control flow instructions; and the servo drive execution unit transforms the control flow into precise mechanical motion. This integrated logic of perception-prediction-planning-execution eliminates the problem of the disconnect between the planning and execution layers in traditional layered architectures.
[0058] In this embodiment, the real-time dynamic path optimizer maintains a state-space equation internally when performing model predictive control. This state-space equation uses position, velocity, acceleration, and jerk as state variables. At the beginning of each control cycle, the optimizer predicts a series of candidate positions the system might reach within a predetermined time window after adopting different control law sequences, based on the current actual measured state.
[0059] The optimizer compares these candidate positions with a pre-defined geometric error pipeline, eliminating candidate sequences that might cause the contour error to exceed a threshold. Among the remaining valid candidate sequences, the optimizer uses a quadratic programming-based search algorithm to find the control sequence that minimizes the total machining time and achieves the most balanced energy consumption. Due to the introduction of soft constraints on jerk, the generated trajectory exhibits second-order continuity mathematically, reducing the impact on the machine tool's mechanical structure.
[0060] The physical digital twin kernel automatically considers the motor's thermodynamic state when calculating the maximum torque constraint. It integrates a thermal network model of the motor, calculating copper losses based on real-time collected winding current and iron losses based on rotational speed. As the motor temperature gradually increases during continuous high-intensity machining, the kernel shrinks the torque boundary in the physical limit performance surface in real time to prevent motor burnout or permanent magnet demagnetization. This deep integration of self-protection mechanism and path planning logic allows the system to maximize the machine tool's machining potential while protecting the hardware.
[0061] The error compensation pre-training module employs a strategy combining offline pre-training and online fine-tuning during reinforcement learning training. Before the machine tool leaves the factory, machining tests on standard parts enable the reinforcement learning agent to learn the machine tool's general nonlinear characteristics. During actual user field use, the agent focuses on learning specific operating condition deviations, such as the dynamic disturbances of different workpiece materials to the system. In this way, the system possesses extremely strong self-learning and evolutionary capabilities, and its contour accuracy shows a gradual optimization trend as machining time increases.
[0062] This system also provides an anomaly monitoring and degradation execution mechanism. When the data acquisition feedback unit detects a failure of a critical sensor or packet loss on the communication bus, the physical digital twin kernel immediately enters a safe mode. In safe mode, the system abandons dynamic optimization based on high-performance limits and instead adopts a conservative, traditional interpolation logic based on static safety parameters, issuing a warning to the operator. This multi-layered robust design ensures high reliability of the system operation in complex industrial environments.
[0063] By introducing the aforementioned technical means, the control system of this embodiment demonstrates technical advantages in machining complex thin-walled parts such as integral aero-machined impellers. Because the system can sense stiffness changes at the thin-walled section of the blade in real time, the physical digital twin kernel dynamically adjusts the physical limit performance surface of that region. This guides the real-time dynamic path optimizer to compensate for the stress deformation of the thin-walled section by optimizing the trajectory's slight advance and retreat avoidance without reducing the feed rate. Ultimately, this improves the machining accuracy of the parts and shortens the machining cycle.
[0064] Example 2: Based on the real-time optimized multi-axis CNC machine tool control system described in Example 1, this example provides an architectural variant based on edge computing and distributed computing power collaboration. In some ultra-large-scale or ultra-precision machine tool applications, the requirement for computational latency reaches the nanosecond level, and traditional centralized processors may face computing power bottlenecks.
[0065] In Example 2, the physical digital twin kernel is deployed on a dedicated cluster of FPGAs. Each motion axis corresponds to an independent FPGA computing core, used to process the specific electromagnetic equations and dynamic calculations for that axis. These independent computing cores are interconnected via a ring-shaped high-speed synchronous serial bus. This distributed architecture improves the computational parallelism of the physical digital twin kernel, enabling higher-frequency updates to the physical model, such as increasing the update frequency of the physical limit performance surface.
[0066] In Example 2, the real-time dynamic path optimizer employs a heterogeneous computing model, where a general-purpose processor (CPU) handles high-level task scheduling and geometric constraint resolution, while a high-performance graphics processing unit (GPU) handles large-scale model prediction and control computation. Since the MPC algorithm involves numerous matrix operations, the parallel acceleration provided by the GPU allows the system to search for more candidate paths within a very short time window and find the optimal trajectory within a broader solution space.
[0067] In Embodiment 2, the error compensation pre-simulation module further integrates a deep learning unit based on an acoustic emission sensor. The data acquisition feedback unit not only collects current and position data but also ultra-high frequency acoustic emission signals during the machining process. These acoustic emission signals contain extremely subtle physical changes such as tool micro-damage and initial cutting chatter. The error compensation pre-simulation module uses a specially designed temporal convolutional neural network (TCN) to extract features from these ultra-high frequency signals in real time and generate extremely high frequency fine-tuning compensation signals. These signals directly act on the current control loop of the servo drive execution unit, suppressing initial machining chatter within milliseconds and preventing it from evolving into destructive resonance.
[0068] In Embodiment 2, the data acquisition feedback unit employs a fiber optic bus architecture to address the complex electromagnetic interference environment in large machine tools. The fiber optic bus not only provides extremely high bandwidth but also, through its inherent electrical insulation properties, eliminates the interference of ground potential differences between electrical control cabinets on weak analog signals. The data acquisition feedback unit integrates a preprocessing unit at each sampling node, enabling local signal filtering, noise reduction, and timestamp annotation, thus reducing the data load on the central processing module.
[0069] In Embodiment 2, the servo drive execution unit is designed as an intelligent drive node. Each drive node stores a complete parameter library of the motor corresponding to the motion axis and has independent thermal modeling capabilities. When receiving instructions from the real-time dynamic path optimizer, the drive node performs secondary verification by combining locally sensed current, encoder position, and winding temperature. If it detects that the upper-level instruction may violate local hardware security limits, the intelligent drive node has the right to autonomously intercept it and will immediately feed back to the physical digital twin kernel for global policy adjustment. This dual verification mechanism further enhances the system's safety under extreme operating conditions.
[0070] The error compensation pre-simulation module in Example 2 also incorporates virtual sensor technology. In locations where physical temperature or force sensors cannot be installed, this module utilizes the state assessment values provided by the physical digital twin kernel, combined with existing physical sensor data, and generates virtual observation values for that location using estimation algorithms such as Kalman filtering. The system can estimate the temperature rise of the internal balls of the bearing based on the real-time load and speed of the spindle bearing without directly embedding sensors. Through this distributed and heterogeneous collaborative architecture, Example 2 can support the coordinated control of more axes. For example, in a large multi-head coordinated skin mirror milling system, the system needs to control more than 10 motion axes simultaneously, and there are complex flexible support couplings between these axes. Example 2, through distributed physical model calculation and parallel path shaping, can solve the coordination problem between multiple axes, ensuring the consistency of contour accuracy over a large stroke range while improving the upper limit of the system's dynamic response.
[0071] Example 3: Based on the above examples, this example further discloses the in-depth interaction details and parameter control strategies of each module in the system in specific complex surface processing tasks.
[0072] In the finishing process of complex mold surfaces, the path is usually composed of a massive number of tiny straight line segments. Traditional CNC systems, when handling such paths, often employ extremely low constant feed rates because they cannot accurately predict the impact of the angles between these micro-segments on acceleration. However, in Embodiment 3 of this invention, the real-time dynamic path optimizer is configured to use a curvature smoothing look-ahead logic. This logic first fits these tiny straight line segments into a high-order B-spline curve. The optimizer calculates the maximum permissible radius of curvature of this spline curve at each point based on the real-time residual torque limit output by the physical digital twin kernel.
[0073] During system operation, when the data acquisition and feedback unit detects an increase in the frictional torque of the machine tool transmission system due to changes in lubrication conditions, the physical digital twin kernel immediately updates its internal mechanical transmission sub-model. The kernel recalculates and generates a new, narrower physical limit performance surface. Upon sensing this change, the real-time dynamic path optimizer automatically fine-tunes the local shape of the B-spline curve, increasing the radius of curvature of the local trajectory while maintaining an error of no more than 3 micrometers from the original path. This allows the motor to maintain stable operation even with a smaller driving torque.
[0074] In Example 3, the error compensation pre-learning module employs a repetitive machining learning mode. For mass-produced parts, when the machine tool executes the same G-code program multiple times, the reinforcement learning agent identifies periodic errors that occur in each machining pass. For example, slight deflection of the machine tool column at a specific machining angle. The agent stores these strongly correlated error patterns in an experience replay pool. At the start of the next machining cycle, the error compensation pre-learning module retrieves the corresponding compensation sequence from the replay pool in advance.
[0075] In Example 3, the physical-digital twin kernel further integrates a functional unit called the machining stability prediction domain. This functional unit utilizes a digital implementation of the Nyquist stability criterion to evaluate in real time whether the current spindle speed-depth of cut-feed rate combination is in the unstable region of chatter. If the reconstructed trajectory generated by the real-time dynamic path optimizer causes the cutting parameters to enter the unstable region, the physical-digital twin kernel will immediately issue an intervention command to the optimizer. The optimizer will then actively avoid chatter points by fine-tuning the synthetic feed rate or by adjusting the multi-axis linkage ratio to change the actual cutting direction.
[0076] In Embodiment 3, the servo drive execution unit employs a technique called asymmetric current loop regulation. For the gravity axis, the drive unit uses different current loop gain parameters for upward and downward movement based on the gravity load compensation value provided by the physical digital twin kernel. This asymmetric control strategy, combined with the feedforward signal from the error compensation pre-simulation module, eliminates the sag or overshoot problem of the gravity axis during commutation, ensuring the high symmetry of the spatial curved surface machining.
[0077] In Example 3, the data acquisition and feedback unit also includes an environmental adaptive calibration subsystem. This subsystem automatically controls the machine tool to perform a series of specific calibration actions at predetermined time intervals, using the difference between a high-precision grating ruler and a motor encoder to calibrate the cumulative error of the transmission chain online. The resulting error distribution matrix is fed back to the physical digital twin kernel in real time to correct its mechanical transmission stiffness model. This online self-correction capability enables the system to maintain extremely high positioning accuracy over long periods, unaffected by long-term machine tool wear or environmental temperature fluctuations.
[0078] In summary, this embodiment, by deeply integrating the functional characteristics of each module in a complex processing scenario, transforms the system from a rigid actuator into an intelligent agent with perception, reasoning, and adaptive capabilities. For operators, only basic processing instructions need to be input, and the system can automatically find the optimal balance between complex physical constraints and precision requirements.
[0079] The physical digital twin kernel, real-time dynamic path optimizer, error compensation pre-simulation module, data acquisition feedback unit, and servo drive execution unit involved in this invention can all be implemented using industrial-grade embedded processors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or general-purpose computers running real-time operating systems, combined with corresponding industrial bus interfaces and sensor networks. Communication between modules can employ standard industrial communication protocols such as EtherCAT, CANopen, Profinet, and Fibre Channel. Those skilled in the art should understand that equivalent substitutions, functional reorganizations, or logical optimizations made to the above modules without departing from the inventive concept should be included within the scope of protection of this invention.
Claims
1. A multi-axis control system for CNC machine tools based on real-time optimization, characterized in that, It includes a physical digital twin kernel, a real-time dynamic path optimizer, an error compensation pre-simulation module, a data acquisition and feedback unit, and a servo drive execution unit; The physical digital twin kernel is used to run high-fidelity digital twin models of machine tools, workpieces and tool systems in parallel inside the controller, and dynamically calculate the physical limit performance surface of each drive axis at the current moment based on the working condition information collected in real time by the data acquisition feedback unit. The physical limit performance surface covers the dynamic constraint boundaries of maximum acceleration, maximum jerk and maximum torque. The real-time dynamic path optimizer is connected to the physical digital twin kernel and is used to receive preset geometric path instructions and convert them into geometric constraints. Within a preset control period, the real-time dynamic path optimizer reconstructs the motion trajectory of the next time period based on the physical limit performance surface through a fusion algorithm of model predictive control and dynamic programming. The error compensation pre-simulation module adopts a reinforcement learning architecture to monitor the residual between the reconstructed motion trajectory generated by the real-time dynamic path optimizer and the actual physical state fed back by the physical digital twin kernel, extract systematic deviation patterns and generate forward-looking feedforward compensation signals. The data acquisition and feedback unit is used to acquire motion information and real-time mechanical signals of each motion axis of the machine tool in real time, and feed the signals back to the physical digital twin kernel and the real-time dynamic path optimizer. The servo drive execution unit is used to drive the motors of each axis of the machine tool to complete coordinated motion according to the reconstructed motion trajectory and the feedforward compensation signal.
2. The CNC machine tool multi-axis control system based on real-time optimization according to claim 1, characterized in that: The physical digital twin kernel integrates the electromagnetic equations of the servo motor and the mechanical transmission stiffness model. The electromagnetic equation of the servo motor is configured to consider the nonlinear effects of voltage saturation and current limit. By monitoring the instantaneous ratio between the inverter output voltage and the bus voltage in real time, the torque output limit of the motor is dynamically corrected to ensure that the physical limit performance surface truly reflects the instantaneous overload capacity of the electric drive system. The mechanical transmission stiffness model includes an axial stiffness sub-model of the lead screw, a support stiffness sub-model of the bearing, and a torsional stiffness sub-model of the coupling. The physical digital twin kernel establishes a multi-degree-of-freedom mass spring damping system to calculate the natural frequency distribution of each drive shaft in different spatial coordinates in real time, and automatically avoids the acceleration range that induces mechanical structure resonance in the physical limit performance surface.
3. The CNC machine tool multi-axis control system based on real-time optimization according to claim 1, characterized in that: The physical digital twin kernel integrates a real-time cutting force prediction model, which is equipped with a feature extraction unit. By analyzing the high-frequency fluctuations of the spindle current and the mechanical vibration signal obtained by the data acquisition feedback unit, the current cutting force is calculated using inversion logic. The real-time cutting force prediction model combines the stored constitutive relation characteristics of the workpiece material to predict the trend of the influence of the cutting load on the running resistance of the feed axis within a predetermined control cycle in the future, and adjusts the torque reserve of each drive axis in real time accordingly. Before the cutting load increases, torque redundancy is reserved for the corresponding drive axis in the physical limit performance surface.
4. The CNC machine tool multi-axis control system based on real-time optimization according to claim 1, characterized in that: When performing path reconstruction, the real-time dynamic path optimizer adopts a cost function based on the game between time optimization and contour error minimization. Within the preset geometric path error pipeline, it is configured to allow the reconstructed motion trajectory to deviate slightly from the ideal geometric path within a controlled range. When a sudden change in curvature is detected in the path ahead, the real-time dynamic path optimizer, based on the current dynamic performance reserves, and on the premise of ensuring that the error does not exceed the error limit, fine-tunes the curvature of the local trajectory to improve the smoothness of the motion of each drive shaft, thereby avoiding step-like changes in acceleration at the path switching point. The reconstructed motion trajectory generated by the real-time dynamic path optimizer has second-order continuity in mathematics, which is used to reduce the impact on the machine tool's mechanical structure.
5. The CNC machine tool multi-axis control system based on real-time optimization according to claim 1, characterized in that: The real-time dynamic path optimizer has a dynamic coupling compensation function. During multi-axis linkage machining, when the real-time dynamic path optimizer senses that a certain motion axis is about to reach its physical performance limit through forward prediction, it will adjust the linkage ratio between multiple axes to distribute some deceleration pressure or load tasks to the other motion axes with higher performance redundancy. Through nonlinear coordination between the drive shafts, the overall synthetic feed rate is maintained in the preset high range; When the real-time dynamic path optimizer performs model predictive control, it maintains a state space equation internally, which uses position, velocity, acceleration, and jerk as state variables.
6. The CNC machine tool multi-axis control system based on real-time optimization according to claim 1, characterized in that: The real-time dynamic path optimizer processes a predetermined future time window containing a predetermined number of interpolation cycles. By calculating the curvature of the future path in advance, the real-time dynamic path optimizer determines the optimal deceleration start point and acceleration end point in advance under physical limit constraints, ensuring that the speed transition is completed before entering the small rounded corner or sharp corner region. The real-time dynamic path optimizer adopts a heterogeneous computing model, with a general-purpose processor responsible for geometric constraint analysis and a high-performance graphics processor responsible for large-scale model prediction control matrix operations, in order to search for candidate paths and determine the optimal motion trajectory within a predetermined time window.
7. The CNC machine tool multi-axis control system based on real-time optimization according to claim 1, characterized in that: The reinforcement learning architecture in the error compensation pre-simulation module includes a reinforcement learning agent. The reinforcement learning agent adopts a deep neural network structure. Its input vector includes the local curvature of the current trajectory, the real-time feed rate, the estimated cutting force, the ambient temperature, and the current real-time tracking error of each axis. Its output vector is defined as the offset compensation amount for the internal current loop or speed loop of the servo drive execution unit. The reinforcement learning agent fine-tunes its internal weight parameters through an online policy update mechanism during machine tool operation to approximate the true mapping relationship of the system's nonlinear deviation. The feedforward compensation signal and the proportional-integral-derivative control feedback signal are dynamically superimposed linearly or nonlinearly in the adder to apply an adjustment force with opposite directions and matching magnitudes before physical deviations appear.
8. The multi-axis control system for CNC machine tools based on real-time optimization according to claim 1, characterized in that: The error compensation pre-simulation module also includes a thermal deformation prediction unit. The thermal deformation prediction unit calculates and predicts the spatial geometric displacement deviation between the spindle end and the guide rail in real time based on multiple temperature sensing signals distributed in key parts of the machine tool and combined with the multi-field thermodynamic coupling model in the physical digital twin kernel. The displacement deviation compensation value generated by the thermal deformation prediction unit is injected into the geometric constraints of the real-time dynamic path optimizer in real time to compensate for the accuracy loss caused by thermal deformation from the geometric source.
9. The CNC machine tool multi-axis control system based on real-time optimization according to claim 1, characterized in that: The data acquisition feedback unit adopts a high-speed industrial bus architecture with hardware-level clock synchronization function to ensure that the synchronization timestamp error between the position feedback signal and the high-frequency mechanical sensing signal is within a preset nanosecond range. The data acquisition and feedback unit integrates tool wear condition assessment logic. By performing real-time frequency domain transformation processing on the acquired cutting force signal, it analyzes the energy distribution characteristics and trends within a specific frequency band and quantifies the degree of tool degradation. The tool wear condition assessment logic transmits the degree of wear as a key correction parameter to the physical digital twin kernel, which is used to correct the coefficients of the real-time cutting force prediction model.
10. A multi-axis control method for CNC machine tools based on real-time optimization, characterized in that, The real-time optimization of multi-axis control of CNC machine tools is achieved using the real-time optimization-based multi-axis control system for CNC machine tools as described in any one of claims 1-9.