Workpiece machining digital twin system and method based on machining path simulation

CN122613894BActive Publication Date: 2026-10-13LASER FUSION RES CENT CHINA ACAD OF ENG PHYSICS
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202611079909.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-07-21
Publication Date
2026-10-13
Estimated Expiration
2046-07-21

AI Technical Summary

Technical Problem

但其主要不足在于:加工前的三维仿真与加工过程中的实时监控之间的衔接较为松散,仿真所依据的模型与加工过程中采集的实际数据之间缺乏实时融合与动态更新机制;预测模型的输出也未能反向作用于加工路径的实时优化调整

Benefits of technology

1、本发明将加工路径仿真作为数字孪生模型的核心驱动引擎,使仿真模型不仅在加工前用于路径验证,更在加工过程中持续运行、动态更新,实现仿真与监控的深度耦合,克服了现有技术中加工前仿真与加工中监控衔接松散、仿真模型与实际数据缺乏实时融合与动态更新机制的缺陷。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122613894B_ABST
    Figure CN122613894B_ABST
Patent Text Reader

Abstract

The present application relates to the field of numerical control machining and digital twin technology, specifically to a workpiece machining digital twin system and method based on machining path simulation. The system includes a trajectory comparison and geometric evolution module, which calculates the spatial deviation vector by real-time comparison of the actual tool trajectory and the theoretical trajectory, and uses the deviation to correct the tool swept volume, marking the voxel grid as removed, and dynamically generating a mirror model that evolves synchronously with the physical workpiece. The method also includes offline generation of reduced order models, multi-source data acquisition, state prediction and decision control, achieving real-time closed-loop optimization of the machining process. The present application solves the problems of simulation and monitoring separation, lack of dynamic synchronization, and imperfect closed-loop feedback in the prior art, and improves the predictability and intelligence level of the machining process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of CNC machining and digital twin technology, and more specifically, to a workpiece machining digital twin system and method based on machining path simulation. Background Technology

[0002] Numerical control (NC) machining path simulation technology is one of the fundamental technologies of this invention. Traditional NC machining path simulation mainly relies on computer-aided manufacturing systems (CAM systems). This involves reading the CAD model of the workpiece, generating the tool path using CAM software, and then converting it into G-code executable by the NC machine tool through post-processing. During this process, operators can perform preliminary geometric collision checks and interference verification on the tool path using a virtual simulation environment. However, this type of traditional simulation is essentially a pre-simulation. Its simulation input is manually configured, and the simulation environment is relatively idealized. It cannot reflect the complex factors such as the dynamic characteristics of the machine tool, tool wear, and workpiece clamping deformation during actual machining, resulting in significant distortion between the simulation results and the actual situation.

[0003] Machining process simulation can be broadly categorized into geometric simulation and physical simulation based on the simulation dimension. Geometric simulation primarily focuses on the relative motion between the tool and the workpiece in space. Physical simulation, on the other hand, builds upon geometric simulation by incorporating physical modeling techniques such as cutting mechanics models and finite element analysis. However, physical simulation typically involves large computational loads and poor real-time performance, making it difficult to run synchronously during actual machining processes. It is more often used for offline process analysis and parameter calibration.

[0004] Digital twin technology constructs a high-fidelity mapping model of a physical entity in virtual space, using real-time data to drive the virtual model to operate synchronously with the physical entity, enabling real-time monitoring, predictive analysis, and optimized control of the manufacturing process. In the field of CNC machining, digital twin technology has been used to build virtual mapping systems for CNC machine tools. Real-time data acquisition and monitoring of the machining process are prerequisites for realizing digital twin-driven machining process optimization.

[0005] The prior art solution most similar to this invention and its shortcomings are as follows: Technical Solution 1 (CN118940337A): It achieves an organic combination of pre-processing simulation and in-process monitoring. However, its main shortcomings are: the connection between the pre-processing 3D simulation and the real-time monitoring during the processing is relatively loose; there is a lack of real-time fusion and dynamic update mechanism between the model on which the simulation is based and the actual data collected during the processing; and the output of the prediction model fails to have a reverse effect on the real-time optimization and adjustment of the processing path.

[0006] Technical Solution 2 (CN202510580854.9): Closed-loop control is achieved through the mapping and comparison of simulation data and actual data. However, its main shortcomings are: the mapping between the simulation environment and the actual processing process is an offline comparison, lacking dynamic simulation driving capability for the processing path itself; the feedback method of optimization parameters is relatively indirect, failing to achieve direct correction of the processing path.

[0007] Technical Solution 3 (CN114580846B): This solution combines visual inspection with digital twin technology to achieve real-time correction of machining paths based on pose deviations. However, its main shortcomings are: relatively limited applicability; insufficient consideration of dynamic factors during machining (such as tool wear, changes in cutting force, etc.); and failure to establish a deep integration and bidirectional driving mechanism between machining path simulation and process digital twin.

[0008] Technical Solution 4 (CN121500891A): A trajectory optimization method based on area features is proposed. However, its main shortcomings are: the optimization method mainly focuses on the geometric features of the processing path and does not adequately consider the physical dynamic characteristics during the processing; and there is a lack of closed-loop linkage between the generation process of the optimized path and the real-time data feedback during the actual processing.

[0009] The existing technical solutions have the following common defects: First, the simulation of the processing path is separated from the digital twin of the process; second, the dynamic synchronization between the simulation model and the actual processing process is insufficient; third, the closed-loop feedback mechanism for processing path optimization is imperfect; fourth, it is difficult to balance the fusion of multi-source heterogeneous data and real-time simulation; and fifth, the predictive ability of the processing process is insufficient. Summary of the Invention

[0010] The purpose of this invention is to provide a digital twin system and method for workpiece machining based on machining path simulation, so as to solve the problems mentioned in the background art.

[0011] To achieve the above objectives, this invention provides a workpiece machining digital twin system based on machining path simulation, including a trajectory comparison and geometric evolution module 400; the trajectory comparison and geometric evolution module 400 includes a trajectory comparison module 410, a voxel modeling module 420, a swept volume calculation module 430, and a deviation compensation module 440; wherein, The trajectory comparison module 410 acquires the theoretical machining path point and the measured tool center point at the current moment, and compares the two to calculate the spatial deviation vector. The voxelization modeling module 420 discretizes the initial workpiece model into three-dimensional mesh elements; The sweep body calculation module 430 calculates the theoretical sweep body of the tool based on the measured tool position and tool shape; The deviation compensation module 440 uses the spatial deviation vector to correct the theoretical swept volume to obtain the actual swept volume; The voxel modeling module 420 marks the three-dimensional mesh units that fall into the actual swept body as removed, thereby dynamically updating the workpiece geometry model and generating a mirror model that evolves synchronously with the physical workpiece geometry.

[0012] As a further improvement to this technical solution, it also includes a data interface module 100, a reduced-order model generation module 200, a multi-source data acquisition module 300, a state prediction engine 500, and a decision control module 600; the state prediction engine 500 further includes an online calibration module 540. The second objective of this invention is to provide an execution method for a workpiece machining digital twin system based on machining path simulation, comprising the following steps: Import the workpiece CAD model and tool path through the data interface module 100, and establish the initial finite element model and generate the reduced-order model through the reduced-order model generation module 200. The multi-source data acquisition module 300 synchronously acquires multi-source physical quantity signals during the processing to generate real-time data vectors. The trajectory comparison and geometric evolution module 400 compares the measured tool trajectory with the theoretical trajectory in real time, and uses the obtained spatial deviation to dynamically correct the workpiece 3D model, generating a mirror model that evolves synchronously with the physical workpiece. The current mirror model and the real-time acquired process parameters are input into the reduced-order model through the state prediction engine 500 to predict the processing state within a future preset time window. The decision control module 600 compares the predicted state with the preset safety threshold and automatically adjusts the CNC system's multiplier register or triggers a shutdown alarm.

[0013] As a further improvement to this technical solution, the trajectory comparison and geometric evolution module 400 specifically includes the following steps: calculating the spatial deviation vector between the theoretical machining path point and the measured tool center point through the trajectory comparison module 410; discretizing the initial workpiece model into three-dimensional mesh elements through the voxel modeling module 420; calculating the tool sweeping body through the sweeping body calculation module 430 based on the measured tool position and tool shape; and correcting the theoretical sweeping body using the spatial deviation vector through the deviation compensation module 440 to obtain the actual sweeping body, and marking the mesh elements falling into the actual sweeping body as removed, thereby dynamically updating the workpiece geometric model to generate a mirror model.

[0014] As a further improvement to this technical solution, the step of generating a reduced-order model through the reduced-order model generation module 200 includes: sampling the process parameter space and performing high-fidelity finite element simulation, recording the output data to form a snapshot matrix; performing singular value decomposition on the snapshot matrix, projecting the original finite element equations onto a low-dimensional space to obtain a reduced-order system; and packaging the reduced-order model into a dynamic link library that can be called in real time.

[0015] As a further improvement to this technical solution, the steps of the multi-source data acquisition module 300 to synchronously acquire multi-source physical quantity signals include: acquiring the spindle coordinates, feed rate, cutting depth, spindle speed and spindle load inside the CNC system, and simultaneously acquiring the cutting zone temperature, vibration and cutting force signals from external sensors, and filtering and unifying the time reference of the original signals.

[0016] As a further improvement to this technical solution, the steps of the state prediction engine 500 in predicting the machining state within a future preset time window include: extracting local geometric parameters of the tool position from the mirror model, combining them with real-time acquired process parameters to form an input vector, and feeding it into a reduced-order model for solution to obtain the predicted cutting force, predicted workpiece deformation, and predicted chatter characteristics within the future preset time window; and updating the model online through the online calibration module 540 of the state prediction engine 500.

[0017] As a further improvement to this technical solution, the step of updating the model online through the online calibration module 540 of the state prediction engine 500 is as follows: the measured cutting force and vibration collected in real time are compared with the predicted values, the residuals are calculated, and the physical parameters of the reduced-order model are adaptively adjusted using the residuals, and the calibrated parameters are written back to the reduced-order model.

[0018] As a further improvement to this technical solution, the decision control module 600 specifically includes the following steps: pre-defining multiple safety thresholds through the threshold management module 610; when the predicted value exceeds the warning threshold but does not exceed the danger threshold, automatically reducing the feed rate register or spindle rate register through the CNC system interface module 630, and adjusting it through the PI controller module 620; when the predicted value exceeds the danger threshold or the critical threshold, sending a feed hold command to pause the tool movement and triggering an emergency stop or alarm signal.

[0019] As a further improvement to this technical solution, it also includes a human-computer interaction step: the three-dimensional rendering of the mirror model, the deviation curve between the actual and theoretical trajectories, the time trend graph of the predicted state, the current value of the multiplier register and the adjustment history are displayed in real time through the visual human-computer interface 700, and a manual intervention interface is provided.

[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention uses processing path simulation as the core driving engine of the digital twin model, so that the simulation model is not only used for path verification before processing, but also runs continuously and updates dynamically during processing, realizing deep coupling between simulation and monitoring. This overcomes the shortcomings of existing technologies, such as loose connection between pre-processing simulation and in-processing monitoring, and lack of real-time fusion and dynamic update mechanism between simulation model and actual data.

[0021] 2. This invention uses a trajectory comparison and geometric evolution module to compare the measured tool trajectory with the theoretical trajectory in real time, and uses spatial deviation to dynamically correct the three-dimensional model of the workpiece, generating a mirror model that evolves synchronously with the geometry of the physical workpiece, thus solving the problem of insufficient dynamic synchronization between the simulation model and the actual machining process in the prior art.

[0022] 3. This invention continuously injects real-time acquired processing data into the simulation model, enabling the simulation model to adaptively adjust physical parameters through an online calibration module. Based on the calibrated model, it predicts and optimizes the subsequent processing state, forming a complete closed loop of "perception-simulation-prediction-optimization-execution". This overcomes the shortcomings of the existing technology, such as the imperfect closed-loop feedback mechanism for processing path optimization and the indirect feedback method of optimization parameters.

[0023] 4. This invention reduces the high-fidelity finite element model to a lightweight simulation kernel that can be called in real time through a model reduction generation module. Combined with voxel modeling and swept volume calculation, it achieves high-fidelity simulation of the processing process while ensuring real-time performance. This solves the shortcomings of existing technologies, such as the difficulty in balancing multi-source heterogeneous data fusion and real-time simulation, and the large amount of physical simulation calculation and poor real-time performance.

[0024] 5. Based on machining path simulation, this invention introduces a state prediction engine and an online calibration module, which can predict the cutting force, workpiece deformation and chatter characteristics in real time within a preset time window during the machining process. This realizes a paradigm upgrade from passive monitoring to active prediction, effectively making up for the shortcomings of the prior art in terms of insufficient predictive ability of the machining process and insufficient consideration of dynamic factors such as tool wear and cutting force changes. Attached Figure Description

[0025] Figure 1 This is a diagram of the overall system architecture of the present invention; Figure 2 This is a flowchart illustrating the corresponding control method steps of the system of the present invention; In the diagram: 100 - Data Interface Module, 110 - CAD File Parser, 120 - G-Code Parser, 200 - Reduced-Order Model Generation Module, 210 - Finite Element Modeling Module, 220 - Sampling and Simulation Module, 230 - POD Reduced-Order Module, 240 - ROM Packaging Module, 300 - Multi-Source Data Acquisition Module, 310 - CNC System Communication Module, 320 - External Sensor Group, 330 - Data Acquisition Card and Driver, 340 - Data Preprocessing Module, 400 - Trajectory Comparison and Geometric Evolution Module, 410 - Trajectory Comparison Module, 420 - Voxelization Modeling Module. 430 - Sweep Volume Calculation Module, 440 - Deviation Compensation Module, 500 - State Prediction Engine, 510 - ROMEngine Call Interface, 520 - Input Feature Construction Module, 530 - Prediction Execution Module, 540 - Online Calibration Module, 600 - Decision Control Module, 610 - Threshold Management Module, 620 - PI Controller Module, 630 - CNC System Interface Module, 640 - Log Recording Module, 700 - Visual Human-Machine Interface, 710 - 3D Rendering Module, 720 - Curve Plotting Module, 730 - Status Display Module, 740 - Manual Control Module. Detailed Implementation

[0026] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0027] This invention provides a workpiece machining digital twin system based on machining path simulation, comprising the following modules: a data interface module 100, a reduced-order model generation module 200, a multi-source data acquisition module 300, a trajectory comparison and geometric evolution module 400, a state prediction engine 500, a decision control module 600, and a visual human-machine interface 700. Details are as follows: Data interface module 100: Responsible for importing workpiece CAD models and toolpaths (G-code), and preprocessing them to provide basic data for subsequent offline modeling and online path comparison. This module includes a CAD file parser 110 and a G-code parser 120.

[0028] The data interface module 100 outputs the parsed theoretical processing path point sequence and process parameter set to the trajectory comparison and geometric evolution module 400, and at the same time outputs the CAD model to the reduced-order model generation module 200.

[0029] The reduced-order model generation module 200 is responsible for offline creation of high-fidelity finite element models and generating a lightweight simulation kernel, i.e., a reduced-order model, that can be called online through model reduction, providing a fast calculation engine for state prediction. This module includes a finite element modeling module 210, a sampling and simulation module 220, a POD reduction module 230, and a ROM encapsulation module 240.

[0030] The reduced-order model generation module 200 receives the CAD model from the data interface module 100. The generated reduced-order model is encapsulated into a dynamic link library that can be called in real time, hereinafter referred to as ROMEngine. After the generated ROMEngine is deployed, it is called by the state prediction engine 500.

[0031] Multi-source data acquisition module 300: Responsible for synchronously acquiring multi-source physical quantity signals during the machining process, including internal data of the CNC system and external sensor data, providing real-time input for trajectory comparison, state prediction, and model calibration. This module includes a CNC system communication module 310, an external sensor group 320, a data acquisition card and driver 330, and a data preprocessing module 340.

[0032] The multi-source data acquisition module 300 outputs real-time data vectors to the trajectory comparison and geometric evolution module 400 to provide the measured tool center point coordinates, outputs them to the state prediction engine 500 to provide process parameters and state parameters, and outputs them to the decision control module 600 to provide measured values ​​for online model calibration.

[0033] The trajectory comparison and geometric evolution module 400 is responsible for calculating the spatial deviation between the measured trajectory and the theoretical trajectory, and using this deviation to dynamically correct the workpiece's 3D model in real time, generating a mirror model that is synchronized with the physical workpiece geometry. This module includes a trajectory comparison module 410, a voxel modeling module 420, a swept volume calculation module 430, and a deviation compensation module 440. The trajectory comparison module 410 obtains the theoretical machining path point and the measured tool center point at the current moment, and compares the two to calculate the spatial deviation vector; the voxel modeling module 420 discretizes the initial workpiece model into 3D mesh elements; the swept volume calculation module 430 calculates the theoretical swept volume of the tool based on the measured tool position and tool shape; the deviation compensation module 440 uses the spatial deviation vector to correct the theoretical swept volume to obtain the actual swept volume; the voxel modeling module 420 marks the 3D mesh elements falling into the actual swept volume as removed, thereby dynamically updating the workpiece geometric model and generating a mirror model that evolves synchronously with the physical workpiece geometry.

[0034] The trajectory comparison and geometric evolution module 400 receives the theoretical path point sequence from the data interface module 100 and the measured tool center point coordinates from the multi-source data acquisition module 300, and outputs a mirror model to the state prediction engine 500.

[0035] State Prediction Engine 500: Responsible for deploying the reduced-order model, receiving mirrored models and real-time data, quickly predicting the processing state within the next one to two seconds, and calibrating model parameters online. This module includes the ROMEngine call interface 510, the input feature construction module 520, the prediction execution module 530, and the online calibration module 540.

[0036] The state prediction engine 500 receives the trajectory comparison and mirror model of the geometric evolution module 400 and the real-time data from the multi-source data acquisition module 300, outputs the predicted state vector to the decision control module 600, and writes the calibrated parameters back to the ROMEngine.

[0037] Decision control module 600: Responsible for comparing the predicted state with the preset safety threshold, automatically adjusting the CNC system's multiplier register, or triggering a shutdown alarm. This module includes a threshold management module 610, a PI controller module 620, a CNC system interface module 630, and a log recording module 640.

[0038] The decision control module 600 receives the predicted state from the state prediction engine 500, outputs control commands to the CNC system, and sends alarm information to the visual human-machine interface 700.

[0039] Visualized human-machine interface 700: Responsible for displaying key information of the processing in real time and providing a manual intervention interface. This module includes a 3D rendering module 710, a curve drawing module 720, a status display module 730, and a manual control module 740.

[0040] The visual human-machine interface 700 receives deviation data and mirror model from trajectory comparison and geometric evolution module 400, prediction curve from state prediction engine 500, and multiplier adjustment history from decision control module 600 and displays them to the operator. At the same time, it sends manual instructions back to decision control module 600.

[0041] Based on the above system, the present invention provides a workpiece machining digital twin method based on machining path simulation, comprising the following steps: Import the workpiece CAD model and tool path through the data interface module 100, and establish the initial finite element model and generate the reduced-order model through the reduced-order model generation module 200. The multi-source data acquisition module 300 synchronously acquires multi-source physical quantity signals during the processing to generate real-time data vectors. The trajectory comparison and geometric evolution module 400 compares the measured tool trajectory with the theoretical trajectory in real time, and uses the obtained spatial deviation to dynamically correct the workpiece 3D model, generating a mirror model that evolves synchronously with the physical workpiece. The current mirror model and the real-time acquired process parameters are input into the reduced-order model through the state prediction engine 500 to predict the processing state within a future preset time window. The decision control module 600 compares the predicted state with the preset safety threshold and automatically adjusts the CNC system's multiplier register or triggers a shutdown alarm.

[0042] Specifically, it includes the following five steps: S1. Offline Preparation: Import the workpiece CAD model and toolpath, establish an initial finite element model, and generate a reduced-order model as the simulation kernel for online prediction. This step is completed collaboratively by the data interface module 100 and the reduced-order model generation module 200.

[0043] S1.1 Import CAD Model and Toolpath The CAD file parser 110 of the data interface module 100 reads the 3D CAD model of the workpiece to be processed and performs lightweight processing, namely voxelization or triangular facet simplification. Simultaneously, the G-code parser 120 reads the CNC program, i.e., G-code, and parses out the tool type, tool radius, spindle speed, feed rate, and the theoretical spatial trajectory of the tool center point corresponding to each line of code. and tool axis vector The G-code parser 120 preprocesses the G-code to generate a sequence of theoretical processing path points with timestamps. and the corresponding set of process parameters The data interface module 100 outputs the theoretical path point sequence and process parameter set to the trajectory comparison and geometric evolution module 400, and outputs the CAD model to the reduced-order model generation module 200.

[0044] S1.2 Establishing the initial finite element model Based on the received CAD model, the finite element modeling module 210 of the reduced-order model generation module 200 uses commercial finite element software or an open-source solver to establish a finite element model of the cutting process. This finite element model includes workpiece mesh generation, material constitutive model, chip separation criteria, tool-workpiece contact conditions, and boundary conditions.

[0045] Since the calculation of the complete finite element model is extremely time-consuming and cannot meet the real-time requirements, it is necessary to perform model reduction.

[0046] S1.3 Generates a Reduced-Order Model The steps for generating a reduced-order model using the reduced-order model generation module 200 include: sampling the process parameter space and performing high-fidelity finite element simulation, recording the output data to form a snapshot matrix; performing singular value decomposition on the snapshot matrix, projecting the original finite element equations onto a low-dimensional space to obtain a reduced-order system; and packaging the reduced-order model into a dynamic link library that can be called in real time.

[0047] The sampling and simulation module 220 of the reduced-order model generation module 200 uses Latin hypercube sampling in the process parameter space, namely spindle speed, feed rate, depth of cut, and tool position. It performs a high-fidelity finite element simulation once for each sampling point, and records the data of key outputs, namely nodal displacement, element stress, and cutting force components, as a function of time, to form a snapshot matrix. Where D is the degree of freedom and M is the number of snapshots.

[0048] The POD reduction module 230 performs singular value decomposition on the snapshot matrix. ,in The snapshot matrix consists of solution vectors from high-fidelity finite element simulations at different times or parameter sampling points; It is a left singular vector matrix, and the column vectors represent the spatial modal basis; It is a diagonal matrix, with the diagonal elements being singular values ​​that reflect the importance of each mode; The right singular vector matrix reflects the pattern in the time or parametric direction; the first r left singular vectors form the projection basis. r is much smaller than D, and the original finite element equations Projecting to a lower-dimensional space yields a reduced-order system. ,in The mass matrix, obtained by finite element discretization, reflects the inertial characteristics of the system. The damping matrix represents energy dissipation; is the stiffness matrix, representing material nonlinearity or geometric nonlinearity; This is the vector of external forces, which changes with time. For displacement vectors, It includes the degrees of freedom displacement of all finite element nodes; Let be the velocity vector, and be the first derivative of displacement with respect to time. Let be the acceleration vector, and be the second derivative of displacement with respect to time. For the reduced-order quality matrix, ; The reduced-order damping matrix, ; This is a reduced-order stiffness matrix; It is a generalized coordinate vector; For generalized speed; For generalized acceleration; This represents the reduced-order external force vector. Nonlinear terms are handled using discrete empirical interpolation methods. The ROM encapsulation module 240 packages the reduced-order model and its corresponding parameter range and boundary conditions into a dynamically linked library that can be called in real time, and deploys it on the edge computing terminal. The reduced-order model generation module 200 supplies the ROMEngine to the state prediction engine 500 for invocation.

[0049] S2. Real-time Data Acquisition: Synchronously acquire multi-source signals from the CNC machine tool, including spindle coordinates, feed rate, depth of cut, spindle speed, cutting zone temperature, spindle and tool vibration, and cutting force or pressure. This step is completed by the multi-source data acquisition module 300.

[0050] S2.1 Data Collection The steps of the multi-source data acquisition module 300 to synchronously acquire multi-source physical quantity signals include: acquiring the spindle coordinates, feed rate, depth of cut, spindle speed and spindle load inside the CNC system, and acquiring the cutting zone temperature, vibration and cutting force signals from external sensors, and filtering and unifying the time reference of the raw signals.

[0051] The CNC system communication module 310 of the multi-source data acquisition module 300 reads the current spindle coordinates in real time via the OPCUA or MTConnect protocol. Information includes feed rate, spindle rate, actual spindle speed, actual feed rate, and spindle load. The external sensor group 320 monitors vibration using a triaxial accelerometer mounted on the spindle housing or tool holder, collects cutting zone temperature using an infrared thermometer or thermocouple pointing towards the cutting zone, and collects triaxial cutting force using a rotary force gauge or strain gauge integrated into the tool holder or worktable. Optionally, it can also collect signals using an acoustic emission sensor for early chatter detection. The data acquisition card and driver 330 synchronously sample all sensor signals, align timestamps, and cache the data on a local edge computer, i.e., an industrial control computer.

[0052] S2.2 Data Preprocessing The data preprocessing module 340 of the multi-source data acquisition module 300 filters the acquired raw signals, using a bandpass filter to remove power frequency noise and high-frequency interference. The data preprocessing module 340 calculates vibration root mean square, peak cutting force, temperature change rate, and other characteristics in real time, and unifies all data to the same time reference, i.e., based on the interpolation cycle of the CNC system. Finally, a real-time data vector is generated. ,in The actual coordinates of the tool center. For feed rate, The depth of cut can be calculated from the spindle position and the workpiece surface model. Main spindle speed For temperature, For vibration acceleration, This is the cutting force.

[0053] The multi-source data acquisition module 300 outputs real-time data vectors as follows: the measured tool center point coordinates are output to the trajectory comparison and geometric evolution module 400; the process parameters and state parameters are output to the state prediction engine 500; and the measured values ​​are output to the decision control module 600 for online model calibration.

[0054] S3. Trajectory Comparison and Model Evolution: The measured tool trajectory is compared with the theoretical G-code trajectory in real time. The obtained spatial deviation is used to dynamically correct the workpiece's 3D model, generating a mirror model that evolves synchronously with the physical workpiece. This step is completed by the trajectory comparison and geometric evolution module 400. The specific steps of the trajectory comparison and geometric evolution module 400 include: calculating the spatial deviation vector between the theoretical machining path point and the measured tool center point through the trajectory comparison module 410; discretizing the initial workpiece model into 3D mesh elements through the voxel modeling module 420; calculating the tool sweep body through the sweep body calculation module 430 based on the measured tool position and tool shape; and correcting the theoretical sweep body using the spatial deviation vector through the deviation compensation module 440 to obtain the actual sweep body. Mesh elements falling into the actual sweep body are marked as removed, thereby dynamically updating the workpiece geometric model and generating a mirror model.

[0055] S3.1 Trajectory Comparison The trajectory comparison module 410 of the trajectory comparison and geometric evolution module 400 will compare the theoretical processing path points {P} theory (t k )} and the measured tool center point P at the current moment real (t k Compare the results and calculate the spatial deviation vector e(t). k )=P real (t k )-P theory (t k This deviation may originate from tool wear, thermal expansion, clamping errors, or kinematic errors. To obtain a continuous deviation field, the trajectory comparison module 410 uses Kalman filtering or local weighted regression to smooth the deviation sequence and predicts the deviation e(t) at the next time step. k+1 ).

[0056] S3.2 Real-time correction of the workpiece 3D model The voxel modeling module 420 defines the initial workpiece model as a voxel field or symbolic distance field, discretizes the workpiece into a structured or adaptive octree voxel mesh, and stores the remaining material thickness or a cut mark in each voxel. For each interpolation cycle, the sweep volume calculation module 430 calculates the sweep volume based on the measured tool position. The tool sweep volume is calculated based on the tool shape, such as a ball end mill or a flat end mill, and voxels within that volume are marked as removed. Simultaneously, the deviation compensation module 440 utilizes the deviation... The theoretical sweep path is corrected, and the actual swept volume is obtained by passing the theoretical swept volume through the deviation vector. The result is obtained after translation correction. The above processing dynamically updates the workpiece geometry model to generate a mirror model, ensuring that the geometric errors of the virtual workpiece and the real workpiece are synchronized. This mirror model is stored in memory in the form of a voxel field or STL mesh, with an update frequency of no less than 200Hz.

[0057] S3.3, Model Evolution Results The mirror model not only contains the current workpiece shape, but also records information such as the cumulative cutting time and cutting thickness at each machining position. The trajectory comparison and geometry evolution module 400 outputs the generated mirror model to the state prediction engine 500.

[0058] S4. State Prediction: The steps of the state prediction engine 500 in predicting the machining state within a future preset time window include: extracting local geometric parameters of the tool position from the mirror model, combining them with real-time acquired process parameters to form an input vector, and feeding it into the reduced-order model for solution to obtain the predicted cutting force, predicted workpiece deformation, and predicted chatter characteristics within the future preset time window; and updating the model online through the online calibration module 540 of the state prediction engine 500. The steps of updating the model online through the online calibration module 540 of the state prediction engine 500 are as follows: comparing the real-time acquired measured cutting force and vibration with the predicted values, calculating the residuals, and using the residuals to adaptively adjust the physical parameters of the reduced-order model, and writing the calibrated parameters back to the reduced-order model.

[0059] The predicted future preset time window width of this invention is determined comprehensively based on the real-time computing power of the reduced-order model, the dynamic change cycle of the machining process, and the closed-loop control response delay of the CNC system. In this embodiment, it is set to 1 to 2 seconds. It should be noted that the width of this time window can be adjusted according to machining requirements: shortening the time window, such as to 0.5 seconds, can improve the early warning sensitivity, while extending the time window, such as to 5 seconds, can cover a longer dynamic process. By adjusting the input sampling interval and prediction steps of the reduced-order model, the time window can be flexibly set within the range of 0.5 seconds to 5 seconds. The following explanation uses 1 to 2 seconds as an example.

[0060] The current mirror model and real-time acquired process parameters are input into the reduced-order model to quickly predict the machining state within a preset time window. The time window in this invention is 1-2 seconds and includes cutting force, workpiece deformation, chatter characteristics, etc. This step is completed by the state prediction engine 500, which deploys the ROMEngine generated by the reduced-order model generation module 200 and receives the mirror model from the trajectory comparison and geometry evolution module 400, as well as the real-time process parameters and state parameters from the multi-source data acquisition module 300.

[0061] S4.1, Predicting Input Construction The State Prediction Engine 500 predicts the machining state within a preset time window by: extracting local geometric parameters of the tool position from the mirror model, combining them with real-time acquired process parameters to form an input vector, and then feeding it into a reduced-order model for solution to obtain the predicted cutting force, predicted workpiece deformation, and predicted chatter characteristics within the preset time window. The training data for the CNN encoder can directly utilize the results of high-fidelity finite element simulation in S1.3: during the simulation at each sampling point, the local voxel field and its corresponding displacement field response at different tool positions are recorded to form a paired dataset.

[0062] The input feature construction module 520 of the state prediction engine 500 extracts local geometric parameters near the current tool position from the mirror model, including undeformed chip thickness, cutting width, and tool approach angle. The input feature construction module 520 also acquires the real-time acquired spindle speed. Feed rate , depth of cut and actual temperature Since the reduced-order model requires a fixed-dimensional input, the input feature construction module 520 uses principal component analysis to reduce the dimensionality of high-dimensional geometric features, or uses a convolutional neural network encoder to map the local voxel field into a low-dimensional vector, and then concatenates all features into the input vector. .

[0063] Convolutional neural network encoder; The input is a local voxel field, such as: Centered on the tool contact point, a 32×32×32 or 64×64×64 grid is cut out, and each voxel stores the remaining material thickness or the cut mark.

[0064] The convolutional layers consist of 3 to 5 three-dimensional convolutions, each followed by BatchNorm and ReLU, with progressive downsampling, such as stride 2 or pooling.

[0065] Global pooling uses global average pooling to compress the feature map into a one-dimensional vector.

[0066] The fully connected layer consists of 1 to 2 fully connected layers, and the final output is a low-dimensional vector, such as 16-dimensional or 32-dimensional, which is a compact encoding of geometric features.

[0067] Training datasets typically employ self-supervised or simulation-driven methods: High-fidelity finite element simulation is used: In the offline stage, simulations are performed on a large number of different local geometries, such as different chip thicknesses, cutting widths, and entry angles, and the corresponding cutting forces or deformation responses are recorded.

[0068] Geometric-response pairing: The local voxel field is used as input, and the corresponding reduced-order model input parameters or the direct target physical quantity is used as output.

[0069] Data augmentation: By randomly rotating, translating, and scaling the voxel field, different tool positions and workpiece shapes are simulated.

[0070] The above convolutional neural network encoder uses supervised training, and the loss function is defined as the mean squared error:

[0071] Where N is the total number of training samples. This is the low-dimensional vector output by the encoder. Let i be the target low-dimensional vector of the i-th training sample. , This is the displacement field vector output from the simulation. This serves as a reduced-order basis for POD. During training, the Adam optimizer is used with a batch size of 32 and an initial learning rate of [value missing]. Iterate until the loss on the validation set converges.

[0072] Fully connected mapping network It consists of 3 fully connected layers, each with 64 neurons, ReLU activation, and the input is... The output is a generalized external force term. The training labels were obtained through offline high-fidelity finite element simulation: recording the nodal external force vectors at each time step. Projected onto the POD substrate The mean square error loss function is used. Supervised training is performed, where N is the total number of training samples. The Adam optimizer is used, and the learning rate is... Train until convergence.

[0073] The low-dimensional vector output by the convolutional neural network encoder The relationship with the reduced-order physical equations of POD is as follows: Will Real-time acquisition of spindle speed Feed rate , depth of cut and temperature Concatenate to form the input vector of the reduced-order model Through an offline trained fully connected mapping network Mapped to the external force terms of a reduced-order system ,Right now:

[0074] in The generalized external force vector after projection, i.e. , For the external force terms in the original finite element equations, As the POD projection substrate, Substituting into the reduced-order system equations:

[0075] Solving for the generalized coordinates Thus, the displacement field is reconstructed. Furthermore, it extracts and predicts cutting force, deformation, and chatter features. Thus, the low-dimensional vector output by the CNN encoder injects local geometric information into the reduced-order POD physical model by parameterizing external force terms, achieving rapid prediction from geometry to physics coupling.

[0076] S4.2, Rapid Prediction The prediction execution module 530 will input vector The data is fed into the ROMEngine, which calls interface 510 to solve the reduced-order system, obtaining the state output for the next one to two seconds. ,in The value ranges from 0 to 2 seconds. The output includes the predicted cutting force component. It can predict the workpiece deformation, i.e., the normal displacement at the tool contact point, and predict chatter characteristics such as the vibration amplitude envelope or stability indicators based on the Lyapunov index.

[0077] Since the computational complexity of the reduced-order model is much lower than that of the full-order finite element model, single-step prediction can be completed within 1 millisecond, meeting the real-time requirements.

[0078] S4.3, Online Model Update To compensate for model errors, the online calibration module 540 compares the measured cutting force and vibration transmitted from the multi-source data acquisition module 300 with the predicted values ​​every 0.5 seconds, and calculates the residuals. The online calibration module 540 utilizes this residual to calculate the generalized external force compensation coefficient or state observer gain online, and performs adaptive model calibration using extended Kalman filtering or recursive least squares method. Taking recursive least squares method as an example, the core logic of parameter update is: new estimate = old estimate + gain coefficient × prediction error. The recursive update formula is expressed as: ,in, For the model parameters to be calibrated, The residual between the measured value and the predicted value. The adaptive gain matrix is ​​calculated recursively based on the covariance matrix. In this way, the matrix is ​​updated according to the above formula each time new measured data is obtained. The model will automatically adjust in the correct direction, gradually reducing the prediction error and bringing the error to an acceptable range. In other words, the model parameters are dynamically adjusted with the processing to maintain prediction accuracy.

[0079] The calibrated parameters are written back to the ROMEngine for subsequent predictions. The state prediction engine 500 outputs the predicted state vector to the decision control module 600.

[0080] S5. Decision and Control: If the predicted state exceeds the preset safety threshold, the spindle speed ratio and feed rate register of the CNC system will be automatically adjusted, or an emergency stop or alarm signal will be triggered. This step is completed collaboratively by the decision control module 600 and the visual human-machine interface 700. The decision control module 600 receives the predicted state from the state prediction engine 500.

[0081] S5.1, Security Threshold Setting The decision control module 600 specifically includes the following steps: pre-defining multi-level safety thresholds through the threshold management module 610; when the predicted value exceeds the warning threshold but does not exceed the danger threshold, automatically reducing the feed rate register or spindle rate register through the CNC system interface module 630, and adjusting it through the PI controller module 620; when the predicted value exceeds the danger threshold or the critical threshold, sending a feed hold command to pause the tool movement and triggering an emergency stop or alarm signal.

[0082] The threshold management module 610 of the decision control module 600 predefines multiple levels of safety thresholds, which can be set for different workpiece materials and tool types.

[0083] Threshold 1 is the warning threshold, which is the predicted cutting force exceeding 80% of the rated value or the chatter index reaching 0.6 dimensionless.

[0084] Threshold 2 is a danger threshold, which is when the predicted cutting force exceeds 95% of the rated value, the chatter index reaches 0.8, or the predicted deformation exceeds the dimensional tolerance.

[0085] Threshold 3 is the severe threshold, which means that the predictive force exceeds 120% of the tool fracture limit or the chatter index is ≥1.0.

[0086] S5.2 Automatic Adjustment Ratio Register When the predicted value exceeds threshold 1 but does not exceed threshold 2, the CNC system interface module 630 automatically reduces the feed rate register or spindle rate register through the OPCUA write node. The PI controller module 620 implements the proportional-integral control algorithm.

[0087] First, define a comprehensive scalar for predicting cutting forces. for The square root of the sum of the squares of the three directional components, i.e., the resultant force of the three components:

[0088] Then, adjust the magnification as follows:

[0089] in, This is the adjusted multiplier register value. The current scaling factor register value. The typical value is 0.8, with a range of 0.3 to 1.2. The lower limit of the range, 0.3, is determined by the lower limit of the adjustment capability, meaning that when the predictive power reaches the danger threshold, the rate reduction should not be less than 30%. The upper limit, 1.2, is determined by the adjustment saturation boundary, meaning that when the predictive power reaches the danger threshold, the rate adjustment will prematurely reach the preset lower limit of 0.5, and further increases will lead to... Premature saturation is prevented. A typical value of 0.8 is obtained through offline simulation calibration within the specified range to simultaneously meet the requirements of response speed and regulation stability. , These are the warning threshold and the danger threshold, respectively. Adjustment instructions are written to the register at a frequency of 200 milliseconds until the predicted value falls back to the safe range.

[0090] S5.3, Triggering a shutdown alarm When the predicted value exceeds threshold 2 or threshold 3, the CNC system interface module 630 immediately sends a feed hold command to the CNC system to pause the tool movement, and simultaneously triggers an emergency stop signal on the machine tool or outputs an alarm light and buzzer through the PLC. The log recording module 640 displays the predicted abnormality on the human-machine interface, such as excessive predicted depth of cut and excessive cutting force, and records the timestamp of this abnormal event, trigger threshold level, predicted value, measured value, current process parameters, and tool information to a local log file.

[0091] S5.4, Human-Computer Interaction Human-computer interaction steps: The 700-degree visual human-computer interface displays the 3D rendering of the mirror model, the deviation curve between the actual and theoretical trajectories, the time trend graph of the predicted state, the value of the current multiplier register and its adjustment history in real time, and provides a manual intervention interface.

[0092] The 3D rendering module 710 of the visual human-machine interface 700 displays in real time the 3D rendering of the mirror model and the measured tool position received from the trajectory comparison and geometric evolution module 400, based on Unity or Qt.

[0093] The curve plotting module 720 of the visual human-machine interface 700 displays the deviation curve between the actual and theoretical trajectories, as well as the time trend graphs of the predicted cutting force, deformation, and chatter indices received from the state prediction engine 500.

[0094] The status display module 730 of the visual human-machine interface 700 displays the current value of the multiplier register and the adjustment history received from the decision control module 600.

[0095] The manual control module 740 of the visual human-machine interface 700 provides operation buttons for canceling automatic adjustment and forcibly stopping the machine. The operator can manually intervene through the touch screen, and the manual command is sent back to the decision control module 600 to override the automatic decision.

[0096] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A workpiece machining digital twin system based on machining path simulation, characterized in that, It includes a data interface module (100), a multi-source data acquisition module (300), and a trajectory comparison and geometric evolution module (400); the trajectory comparison and geometric evolution module (400) includes a trajectory comparison module (410), a voxel modeling module (420), a swept volume calculation module (430), and a deviation compensation module (440); wherein, The data interface module (100) is responsible for importing the workpiece CAD model and tool path and performing preprocessing, and outputting the theoretical machining path point sequence to the trajectory comparison and geometric evolution module (400). The multi-source data acquisition module (300) is responsible for synchronously acquiring multi-source physical quantity signals during the machining process and outputting the measured tool center point coordinates to the trajectory comparison and geometric evolution module (400). The trajectory comparison module (410) obtains the theoretical machining path point and the measured tool center point at the current moment, and compares the two to calculate the spatial deviation vector; The voxel modeling module (420) discretizes the initial workpiece model into three-dimensional mesh elements; The sweep body calculation module (430) calculates the theoretical sweep body of the tool based on the measured tool position and tool shape; The deviation compensation module (440) uses the spatial deviation vector to correct the theoretical swept volume to obtain the actual swept volume; The voxel modeling module (420) marks the three-dimensional mesh units that fall into the actual swept body as removed, thereby dynamically updating the workpiece geometry model and generating a mirror model that evolves synchronously with the physical workpiece geometry.

2. The workpiece machining digital twin system based on machining path simulation according to claim 1, characterized in that: It also includes a reduced-order model generation module (200), a state prediction engine (500), and a decision control module (600); the state prediction engine (500) further includes an online calibration module (540), and the decision control module (600) further includes a threshold management module (610), a PI controller module (620), and a numerical control system interface module (630).

3. An execution method for a workpiece machining digital twin system based on machining path simulation, characterized in that: Includes the following steps: The workpiece CAD model and tool path are imported through the data interface module (100), and the initial finite element model is established and the reduced-order model is generated through the reduced-order model generation module (200). The multi-source physical quantity signals during the processing are synchronously acquired by the multi-source data acquisition module (300) to generate real-time data vectors; The trajectory comparison and geometric evolution module (400) compares the measured tool trajectory with the theoretical trajectory in real time, and uses the obtained spatial deviation to dynamically correct the three-dimensional model of the workpiece, generating a mirror model that evolves synchronously with the physical workpiece. The specific steps of the trajectory comparison and geometric evolution module (400) include: calculating the spatial deviation vector between the theoretical machining path point and the measured tool center point through the trajectory comparison module (410); discretizing the initial workpiece model into three-dimensional mesh units through the voxel modeling module (420); calculating the tool sweep body according to the measured tool position and tool shape through the sweep body calculation module (430); and using the spatial deviation vector to correct the theoretical sweep body through the deviation compensation module (440) to obtain the actual sweep body, and marking the mesh units falling into the actual sweep body as removed, thereby dynamically updating the workpiece geometric model to generate a mirror model. The current mirror model and the real-time acquired process parameters are input into the reduced-order model through the state prediction engine (500) to predict the processing state within a future preset time window; The decision control module (600) compares the predicted state with the preset safety threshold and automatically adjusts the CNC system's multiplier register or triggers a shutdown alarm.

4. The execution method for a workpiece machining digital twin system based on machining path simulation according to claim 3, characterized in that: The steps of generating a reduced-order model through the reduced-order model generation module (200) include: sampling the process parameter space and performing high-fidelity finite element simulation, recording the output data to form a snapshot matrix; performing singular value decomposition on the snapshot matrix, projecting the original finite element equations onto a low-dimensional space to obtain a reduced-order system; and packaging the reduced-order model into a dynamic link library that can be called in real time.

5. The execution method for a workpiece machining digital twin system based on machining path simulation according to claim 3, characterized in that: The steps of the multi-source data acquisition module (300) to synchronously acquire multi-source physical quantity signals include: acquiring the spindle coordinates, feed rate, cutting depth, spindle speed and spindle load inside the CNC system, and acquiring the cutting zone temperature, vibration and cutting force signals of external sensors, and filtering and unifying the time reference of the original signals.

6. The execution method for a workpiece machining digital twin system based on machining path simulation according to claim 3, characterized in that: The steps of the state prediction engine (500) in predicting the machining state within a future preset time window include: extracting local geometric parameters of the tool position from the mirror model, combining them with real-time acquired process parameters to form an input vector, and sending it to a reduced-order model for solution to obtain the predicted cutting force, predicted workpiece deformation, and predicted chatter characteristics for the future preset time window; and updating the model online through the online calibration module (540) of the state prediction engine (500).

7. The execution method for a workpiece machining digital twin system based on machining path simulation according to claim 6, characterized in that: The steps of updating the model online through the online calibration module (540) of the state prediction engine (500) are as follows: the measured cutting force and vibration collected in real time are compared with the predicted values, the residuals are calculated, and the physical parameters of the reduced-order model are adaptively adjusted using the residuals, and the calibrated parameters are written back to the reduced-order model.

8. The execution method for a workpiece machining digital twin system based on machining path simulation according to claim 3, characterized in that: The specific steps of the decision control module (600) include: pre-defining multi-level safety thresholds through the threshold management module (610); when the predicted value exceeds the warning threshold but does not exceed the danger threshold, automatically reducing the feed rate register or spindle rate register through the CNC system interface module (630) and adjusting it through the PI controller module (620); when the predicted value exceeds the danger threshold or the critical threshold, sending a feed hold command to pause the tool movement and triggering an emergency stop or alarm signal.

9. The execution method for a workpiece machining digital twin system based on machining path simulation according to claim 3, characterized in that: It also includes human-computer interaction steps: the three-dimensional rendering of the mirror model, the deviation curve between the actual and theoretical trajectories, the time trend graph of the predicted state, the value of the current multiplier register and the adjustment history are displayed in real time through a visual human-computer interface (700), and a manual intervention interface is provided.

Citation Information

Patent Citations

  • A real-time processing path correction method combining vision and digital twins

    CN114580846B

  • Numerical control machining simulation and process monitoring method based on digital twinning

    CN118940337A

  • Anti-infection ointment for promoting healing of burns and scalds and other wound surfaces and preparation method thereof

    CN120381433A

  • Digital twinning real-time simulation optimization method for machining track of five-axis equipment of aviation part

    CN121500891A

  • Milling process simulation method and system considering machining dynamic deformation and cutter shaft jumping

    CN117973010A