A cutting process optimization method and system with automatic deviation correction
By constructing a digital twin model driven by multiple sensor sources and a hybrid prediction algorithm, real-time prediction and active correction of cutting errors are achieved, solving the problems of insufficient error prediction accuracy and response speed in existing technologies, improving machining accuracy and efficiency, and possessing self-learning capabilities.
Patent Information
- Application Number
- CN202611353808.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-02
- Publication Date
- 2026-11-17
AI Technical Summary
Existing digital twin-driven error compensation schemes lack active correction capabilities, fail to effectively address multi-physics coupling effects, and are mostly unidirectional or decoupled error prediction models, resulting in insufficient prediction accuracy and response speed, making them difficult to adapt to different processing conditions.
A digital twin model is constructed that includes geometric, kinematic, and force-thermal coupling physical models. Combined with real-time data from multiple sources, a hybrid prediction algorithm is used to predict errors. When the error exceeds the threshold, active correction is performed. The correction strategy is optimized through virtual simulation to form a closed-loop control.
It achieves accurate, real-time prediction and active correction of cutting errors, improving machining accuracy and efficiency. It has self-learning capabilities, adapts to different working conditions, and significantly improves the robustness and adaptability of the system.
Smart Images

Figure CN123113672A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cutting precision control technology, specifically to an automatic correction cutting optimization method and system. Background Technology
[0002] Machining accuracy is a core indicator for evaluating the performance and manufacturing level of CNC machine tools. With the increasing demands for precision and surface quality in high-end manufacturing fields such as aerospace and precision molds, effective control of various errors during machining has become a critical issue that the industry urgently needs to address. Among the various errors generated during machining, thermal error is a key factor affecting the stability of CNC machine tool machining accuracy. Meanwhile, tool wear, cutting force deformation, and system vibration also significantly affect the final machining quality. Traditional error compensation methods often employ offline measurement and post-processing compensation, i.e., detecting errors and correcting subsequent machining parameters after machining is completed. This approach struggles to cope with dynamic changes in errors during machining, and the real-time performance and effectiveness of compensation are limited.
[0003] In recent years, digital twin technology has provided a new technical path for real-time monitoring and intelligent prediction of machining processes by constructing high-fidelity mapping models of physical entities in virtual space. Existing research has applied digital twins to the machining accuracy control of CNC machine tools, achieving real-time mapping of machining states and online prediction of errors by constructing a digital twin model of the machine tool and combining it with sensor data. However, existing digital twin-driven error compensation schemes still have the following shortcomings: First, most schemes focus on monitoring and compensation after errors occur, lacking proactive correction capabilities based on prediction; second, existing schemes do not adequately consider the coupling effects between multiple physical fields (force, heat, vibration, etc.) during machining, and error prediction models are mostly unidirectional or decoupled; third, error compensation strategies are mostly targeted at a single error source (such as compensating only for thermal errors or only for tool wear), lacking a linkage optimization mechanism for the synergistic effects of multiple error sources. These limitations mean that the prediction accuracy, response speed, and adaptability to different machining conditions of existing digital twin error compensation systems still have considerable room for improvement. Summary of the Invention
[0004] To address the problems of the prior art, this invention provides an automatic correction method and system for optimizing cutting processes.
[0005] To solve the above-mentioned technical problems, the present invention is achieved through the following technical solution: Firstly, an automatic correction method for optimizing machining processes, comprising the following steps: Step S1: Obtain the geometric parameters, kinematic parameters, dynamic parameters, and cutting process parameters of the target CNC machine tool, and construct an initial digital twin model of the target CNC machine tool and its cutting process; the initial digital twin model includes a machine tool structure model, a tool model, a workpiece model, and a physical model of the cutting process; Step S2: During the cutting process, multi-source sensors deployed on the target CNC machine tool are used to collect machining status data in real time. The machining status data includes spindle speed, feed rate, cutting force, cutting temperature, vibration signal, spindle motor current, and tool position coordinates. The collected machining status data is mapped to the initial digital twin model in real time through a data communication interface, driving the initial digital twin model to run synchronously with the physical machining process, thereby obtaining a real-time updated digital twin model. Step S3: Based on the real-time updated digital twin model, combined with the current machining status data and historical machining data, a hybrid prediction algorithm integrating the mechanistic model and the data-driven model is used to predict the machining error that will occur in the current cutting process; the machining error includes at least one of contour error, dimensional error, position error, thermal deformation error and tool wear error; the hybrid prediction algorithm uses the theoretical machining error output by the mechanistic model as the benchmark prediction value, uses the data-driven model to model and predict the prediction residual of the mechanistic model, adds the benchmark prediction value and the prediction residual, and outputs the predicted value of the machining error and its confidence interval; Step S4: Based on the predicted value of the machining error obtained in Step S3, determine whether the predicted value exceeds a preset error tolerance threshold; if it exceeds the error tolerance threshold, perform virtual machining simulation on multiple candidate correction strategies based on the digital twin model, evaluate the correction effect of each candidate correction strategy, select the optimal correction strategy with the goal of minimizing machining error and maximizing machining efficiency, and generate active correction control commands; the active correction control commands include at least one of tool path correction commands, feed rate adjustment commands, spindle speed adjustment commands, tool posture adjustment commands, and cooling condition adjustment commands; Step S5: The active correction control command generated in step S4 is sent to the CNC system of the target CNC machine tool, and the CNC system executes the corresponding correction action; after the correction action is executed, steps S2 to S4 are continued to be executed, and the correction effect is monitored in real time; the actual machining result after correction is compared with the predicted correction effect, the correction deviation value is calculated, and the correction deviation value is used as a feedback signal to input the digital twin model, and the model parameters of the digital twin model and the hybrid prediction algorithm are updated online to form a closed-loop control.
[0006] In one specific embodiment of the first aspect, the prediction process of the thermal deformation error in step S3 and the acquisition process of the cutting force in step S2 are performed through data iteration in the following manner: Step S3 outputs the predicted value of thermal deformation error based on the current state of the digital twin model, and calculates the change in actual cutting depth based on the tool thermal elongation corresponding to the predicted value of thermal deformation error. The change in the actual cutting depth is used to measure the cutting force collected in real time in step S2. The correction is performed to obtain the compensated cutting force value. ,in This is the cutting force-depth of cut influence coefficient. The range of values is ; The compensated cutting force value Substitute the heat source intensity calculation formula of the physical model of the cutting process described in step S3 to correct the heat generation rate in the cutting region. ,in This is the cutting heat distribution coefficient. The value range is 0.7 to 0.95. The cutting speed is used; the predicted value of the thermal deformation error is recalculated using the corrected heat generation rate. The above process is repeated in each sampling period until the difference between the predicted values of the thermal deformation error obtained from two adjacent calculations is less than a preset convergence threshold. , The value range is 0.1 to 1.0 μm / cycle. The converged thermal deformation error prediction value is output to step S4. When the number of repeated executions reaches the preset maximum number of iterations N_max, the iteration is forcibly terminated and the current value is output. The value range of N_max is 5 to 20.
[0007] In one specific implementation of the first aspect, the data interaction between the cooling condition adjustment command in step S4 and the prediction of tool wear error in step S3 is performed in the following manner: The coolant pressure corresponding to the cooling condition adjustment command. and traffic The parameters are input to the thermal-fluid coupling simulation module of the cutting region of the digital twin model to calculate the dynamic changes in the temperature field of the cutting region. ; Based on the dynamic changes of the temperature field The correction value of the friction coefficient of the rake face was calculated using a temperature-friction coefficient correlation model. ,in The coefficient of friction at the reference temperature. The temperature-friction effect coefficient, The range of values is ; The corrected rake face friction coefficient The data is input into the tool wear prediction model in step S3 to correct the predicted rate of change of the current tool flank wear VB value. ,in The wear coefficient is... The range of values is ; The duration of the cooling condition adjustment command is adjusted using the corrected predicted rate of change.
[0008] In one specific implementation of the first aspect, after predicting the flutter error based on the vibration signal in step S3, the following operations are also performed when generating the active correction control command in step S4: With the goal of eliminating chatter, the spindle speed adjustment is calculated based on the aforementioned digital twin model. and depth of cut adjustment ; Under the premise of meeting the flutter suppression conditions, the material removal rate Maximizing the cutting width as the optimization objective, the critical stable cutting width is calculated based on the modal parameters of the current tool-workpiece system using the stability leaflobe diagram module in the digital twin model. and critical stable depth of cut ,in The feed per tooth is used; the stability lobe diagram module calculates the critical depth of cut at different spindle speeds based on the frequency response function of the tool-workpiece system and plots the stability lobe diagram. According to the critical stable cutting width and critical stable depth of cut Calculate the maximum allowable feed rate for the current process. ,in This is the current feed rate. This represents the current cutting depth. This is the current cutting width; Adjust the spindle speed Cutting depth adjustment amount and maximum allowable feed Combined commands generate composite correction and efficiency enhancement instructions.
[0009] In one specific implementation of the first aspect, the method for constructing the physical model of the cutting process in step S1 includes: An analytical model of cutting force is established based on Merchant cutting theory, with the depth of cut as the starting point. Feed per tooth Cutting speed and the rake angle of the cutting tool Input parameters, output theoretical calculated values of cutting force ,in The shear flow stress of the workpiece material. Obtained by consulting the workpiece material handbook. Let be the friction angle. Shear angle, _o and Obtained through cutting force calibration experiments; A cutting temperature field model was established based on the finite element method, with cutting speed as the reference. Feed rate Depth of cut The tool-workpiece material pairing is used as input parameters, and the output is the temperature distribution in the cutting zone. ; The analytical cutting force model is coupled with the cutting temperature field model, and the temperature distribution output by the cutting temperature field model is used to correct the shear flow stress in the analytical cutting force model. ,in The shear flow stress at room temperature, Obtained by consulting the workpiece material handbook. This is the temperature softening coefficient. The value range is 0.001~0.005 / ℃. A physical model of the force-thermal coupling cutting process is constructed at room temperature.
[0010] In one specific implementation of the first aspect, in the hybrid prediction algorithm of fusing the fusion mechanism model and the data-driven model in step S3, the data-driven model is a physical information neural network model, which includes an input layer, three hidden layers, and an output layer. The number of neurons in each hidden layer is 64, 128, and 64, respectively, and the activation function is a hyperbolic tangent function; the loss function of this model is... ,in The mean square error between the predicted and measured values. This refers to the residual term corresponding to the physical equation of the cutting process. These are the physical constraint weighting coefficients. The value range is 0.01 to 1.0; The input features of the physical information neural network model include spindle speed, feed rate, depth of cut, cutting force, cutting temperature, and cumulative cutting time of the tool, and the output is the predicted value of machining error; The model parameters of the hybrid prediction algorithm are updated online using the error correction value feedback signal from step S5, and a recursive least squares method with a forgetting factor. The value range is 0.95 to 0.999.
[0011] Secondly, an automatic deviation correction machining optimization system includes: A data acquisition unit, deployed on the target CNC machine tool, includes at least two of the following: force sensor, temperature sensor, vibration sensor, current sensor, and displacement sensor, as well as a data acquisition card, for real-time acquisition of machining status data during the cutting process; The data communication and preprocessing unit is communicatively connected to the data acquisition unit and is used to receive the machining status data and perform filtering, noise reduction, and time alignment preprocessing on the machining status data. The data communication and preprocessing unit interacts with the CNC system of the target CNC machine tool through the FOCAS protocol, OPCUA protocol, MTConnect protocol, or EtherCAT protocol, and the data communication delay is no more than 10 milliseconds. The digital twin modeling unit is communicatively connected to the data communication and preprocessing unit, and is used to store the geometric parameters, kinematic parameters, dynamic parameters and cutting process parameters of the target CNC machine tool, and to construct and update the digital twin model of the target CNC machine tool and its cutting process in real time. The error prediction unit is communicatively connected to the digital twin modeling unit and has a built-in hybrid prediction algorithm that integrates the mechanistic model and the data-driven model. It is used to output the predicted value of the processing error and its confidence interval based on the real-time status of the digital twin model. The correction decision unit is communicatively connected to the error prediction unit. It is used to receive the predicted value of the processing error, determine whether the predicted value exceeds the preset error tolerance threshold, and, if it does, perform correction strategy simulation optimization through the digital twin model to generate active correction control commands. The correction execution interface unit is communicatively connected to the correction decision unit and the CNC system of the target CNC machine tool, and is used to convert the active correction control command into CNC code or control signal executable by the CNC system and send it to the CNC system. The closed-loop feedback and self-learning unit is communicatively connected to the data acquisition unit, the digital twin modeling unit, the error prediction unit, and the correction execution interface unit. It is used to receive the actual processing results after correction, compare the actual processing results after correction with the predicted correction effect, calculate the correction deviation value, and update the model parameters of the digital twin model in the digital twin modeling unit and the hybrid prediction algorithm in the error prediction unit online based on the correction deviation value.
[0012] In one specific implementation of the second aspect, the digital twin modeling unit includes: The geometric model subunit is used to store the three-dimensional geometric model of the target CNC machine tool, cutting tool and workpiece, and the dimensional annotation accuracy of the three-dimensional geometric model is not less than 0.01mm; The kinematics sub-unit is used to store the kinematic chains and coordinate transformation relationships of each motion axis of the target CNC machine tool, with a coordinate transformation error of no more than 0.005 mm; The physical model sub-unit is used to store the cutting force model, cutting temperature model, and force-thermal coupling model. The data mapping subunit is used to map the real-time collected processing status data to the geometric model subunit, kinematic subunit, and physical model subunit, driving the digital twin model to run synchronously with the physical processing process, with a virtual-real synchronization delay of no more than 5 milliseconds.
[0013] In one specific implementation of the second aspect, the correction decision unit includes: The threshold determination subunit is used to determine the predicted value of the processing error. Compared with the preset error tolerance threshold When comparing, Time-triggered correction, the error tolerance threshold The value range is 0.01 to 0.10 mm; The strategy generation subunit is used to generate at least three candidate correction strategies based on the current processing state when correction is triggered. Each candidate correction strategy has a different combination of correction parameters. The strategy simulation subunit is used to perform virtual processing simulation of each candidate correction strategy in the digital twin model, and obtain the simulation processing error corresponding to each candidate correction strategy. , and simulation processing time , ,in for to integers, ; The strategy optimization subunit is used to comprehensively optimize the objective function. The optimal correction strategy is selected based on minimization, where... and These are the weighting coefficients. , The value range is 0.5 to 0.9. This represents the rated machining time for the current operation under standard cutting parameters; when multiple candidate strategies... The difference in values is less than a preset threshold. When, prioritize The minimum strategy.
[0014] Thirdly, a computer-readable storage medium storing a computer program that, when executed by a processor, implements a cutting process optimization method with automatic deviation correction.
[0015] The beneficial effects of this invention are as follows: 1. This invention constructs a digital twin model comprising a geometric model, a kinematic model, and a force-thermal coupling physical model. Processing status data acquired in real-time by multiple sensors is mapped to this digital twin model with a millisecond delay, enabling synchronous operation of the physical and virtual processing processes. This provides an accurate and real-time data foundation for error prediction. Based on this, a hybrid prediction algorithm integrating a mechanistic model and a data-driven model is employed for processing error prediction. The mechanistic model ensures the prediction results conform to physical laws, while the data-driven model corrects structural deviations in the mechanistic model. This overcomes the shortcomings of insufficient accuracy in pure mechanistic models and poor interpretability in pure data-driven models, significantly improving the accuracy and robustness of processing error prediction. When the prediction error exceeds a preset threshold, multiple candidate correction strategies are simulated in the digital twin model and the optimal strategy is selected for execution. This achieves proactive compensation before the actual error occurs. The corrected results are fed back to the digital twin model and prediction algorithm for online updates, forming a complete closed loop of "perception—prediction—decision—execution—evaluation." This enables the system to possess self-learning and self-evolution capabilities, maintaining high-precision correction performance over a long period.
[0016] 2. This invention addresses the complex characteristics of multi-physics coupling and multi-factor interaction in machining processes by establishing three collaborative optimization strategies with bidirectional linkage mechanisms. First, by establishing an iterative correction mechanism between predicted thermal deformation errors and acquired cutting forces, the measured cutting force is compensated using thermally induced depth-of-cut changes. The compensated cutting force is then used to correct the heat source intensity and temperature field distribution. This iterative process is repeated until convergence, effectively eliminating prediction inaccuracies and overcompensation caused by unidirectional thermo-mechanical coupling, significantly improving the accuracy of thermal deformation error prediction. Second, by establishing a closed-loop linkage between cooling condition adjustment commands and tool wear prediction, the tool wear rate prediction is corrected by using the modulation effect of temperature changes on the rake face friction coefficient. This achieves synergistic optimization of cooling strategies and tool life, effectively delaying tool wear while improving surface finish. Third, by establishing a linkage mechanism between chatter trend prediction and reverse optimization of machining efficiency, the stability lobe diagram module in the digital twin model is used to discover the maximum allowable feed rate while eliminating chatter. This transforms chatter, an unfavorable factor, into an opportunity to optimize machining parameters, achieving simultaneous improvement in machining accuracy and efficiency. The three linkage mechanisms mentioned above can be used independently or in combination depending on the error type and processing scenario, which significantly improves the adaptability and robustness of the present invention to different processing conditions. Attached Figure Description
[0017] Figure 1 This is a schematic diagram of the system architecture of the present invention.
[0018] Figure 2 This is a schematic diagram of the overall process of the method of the present invention.
[0019] Figure 3 This is a schematic diagram of the thermo-mechanical coupling iteration of the present invention. Detailed Implementation
[0020] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. 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 of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0021] like Figures 1 to 3 This paper presents an automatic correction method and system for optimizing machining processes.
[0022] I. Construction of Digital Twin Model The core of this invention lies in establishing a digital twin model that can reflect the physical processing in real time and has predictive capabilities. The construction of this model includes the following sub-steps.
[0023] (I) Establishment of the geometric model A 3D CAD model of the target CNC machine tool is obtained. This model includes geometric data for the machine tool bed, column, spindle box, worktable, feed axis assemblies, tool system, and fixture system. The 3D CAD model is then imported into a digital twin modeling platform, selected from NX / Siemens NX, ANSYS TwinBuilder, or MATLAB / Simulink. For machining scenarios primarily involving structural and thermal deformation analysis, ANSYS TwinBuilder is preferred; for scenarios primarily involving control system response and kinematic analysis, MATLAB / Simulink is preferred; and for comprehensive scenarios requiring both geometric accuracy and physical simulation, NX / Siemens NX is preferred.
[0024] The imported CAD model will be lightweighted, retaining geometric features that affect machining accuracy while removing decorative features unrelated to accuracy. The dimensional accuracy of the geometric model will be no less than 0.01mm.
[0025] The geometric parameters of the tool model include the tool diameter. Number of teeth on the cutting tool helix angle Rake angle of the cutting tool , back angle of the cutting tool and the overhang length of the cutting tool The geometric parameters of the workpiece model include the workpiece's outline dimensions and the geometric parameters of the features to be machined.
[0026] (II) Establishment of the kinematic model Based on the principle of homogeneous coordinate transformation, the kinematic chains of each motion axis of the target CNC machine tool are established. For a three-axis vertical machining center, its kinematic chain is expressed as:
[0027] in, Let be the pose transformation matrix of the tool relative to the workpiece. The initial pose matrix, , , They are respectively axis, axis, The homogeneous transformation matrix corresponding to the axis motion. The coordinate transformation error of each motion axis is no greater than 0.005mm.
[0028] For five-axis machine tools, it is also necessary to add homogeneous transformation matrices for the rotary axes (A-axis, C-axis, or B-axis) to form a complete kinematic chain.
[0029] (III) Establishment of the physical model The physical model is the core of the digital twin model, and its accuracy directly affects the precision of error prediction. The physical model of the cutting process in this invention includes a cutting force model, a cutting temperature model, and a force-thermal coupling model.
[0030] (1) Establishment of the cutting force model An analytical model of cutting force is established based on Merchant's cutting theory. The cutting depth is used as the basis for this model. Feed per tooth Cutting speed and the rake angle of the cutting tool For input parameters, output the theoretical calculated value of the cutting force:
[0031] in, This refers to the shear flow stress of the workpiece material, obtained by consulting the workpiece material handbook. Taking aluminum alloy 7075-T6 as an example... The pressure is 400-450 MPa; taking titanium alloy TC4 as an example, It is 800-900 MPa. Let be the friction angle. Shear angle, and The cutting force was obtained through a cutting force calibration experiment. Specifically, under the same tool-workpiece material pairing, orthogonal cutting experiments were conducted with different cutting parameters (cutting speed, feed rate, depth of cut), and the cutting force data was measured. The cutting force was then calculated using the least squares method. and .
[0032] For milling, the cutting force varies periodically, requiring the establishment of instantaneous cutting thickness and per-tooth cutting force models. Instantaneous cutting thickness... ,in The cutting tool rotation angle. Instantaneous cutting force. ,in The tangential cutting force coefficient was obtained through experimental calibration.
[0033] (2) Establishment of the cutting temperature model A cutting temperature field model was established based on the finite element method. The cutting speed was used as the reference. Feed rate Depth of cut The tool-workpiece material pairing is used as input parameters, and the output is the temperature distribution in the cutting zone. .
[0034] Cutting heat mainly originates from three deformation zones: plastic deformation heat in the first deformation zone (shear surface), frictional heat in the second deformation zone (tool-chip contact surface), and frictional heat in the third deformation zone (tool-workpiece contact surface). The total heat generation rate is expressed as:
[0035] in, Shear surface heat generation rate, The rate of frictional heat generation on the rake face. The frictional heat generation rate of the flank face.
[0036] The distribution of cutting heat among the tool, workpiece, and chips depends on cutting conditions, material thermophysical properties, and cooling conditions. (Cutting heat distribution coefficient) The value of (i.e., the proportion of heat transferred to the tool to the total heat) ranges from 0.7 to 0.95. For high-speed cutting, because the chips carry away a large amount of heat, Take a value of 0.7 to 0.8; for low-speed cutting, Take a value of 0.85 to 0.95.
[0037] (3) Establishment of the force-thermal coupling model The cutting force model is coupled with the cutting temperature model. Changes in cutting temperature affect the flow stress of the workpiece material, which in turn affects the cutting force; conversely, changes in cutting force affect the heat generation rate, which in turn affects the cutting temperature. This two-way coupling is achieved through the following method: The shear flow stress in the cutting force model is corrected using the temperature distribution T(x,y,z) output from the cutting temperature field model:
[0038] in, The shear flow stress at room temperature, Obtained by consulting the workpiece material handbook; This is the temperature softening coefficient, with a value ranging from 0.001 to 0.005 / ℃. Taking aluminum alloy 7075-T6 as an example, The value is 0.002~0.003 / ℃; taking titanium alloy TC4 as an example, It is 0.0015~0.0025 / ℃. The room temperature is 20–25°C.
[0039] Corrected shear flow stress Substitute the corrected cutting force back into the cutting force model to calculate the corrected cutting force; then substitute the corrected cutting force back into the heat source intensity calculation formula to calculate the corrected heat generation rate. The force-thermal coupling model is iteratively calculated within each calculation step until convergence.
[0040] (iv) Integration and initialization of the digital twin model The geometric, kinematic, and physical models are integrated into a unified digital twin modeling platform. The sub-models interact with each other through standardized data interfaces. During model initialization, the initial geometric, kinematic, dynamic, and cutting process parameters of the target CNC machine tool are input to construct the initial digital twin model.
[0041] II. Real-time Acquisition and Mapping of Multi-Source Data (a) Sensor Deployment A multi-source sensor is deployed on the target CNC machine tool. The multi-source sensor includes at least two of the following: force sensor, temperature sensor, vibration sensor, displacement sensor, and current sensor.
[0042] The force sensor is either a strain gauge or a piezoelectric force sensor, installed between the worktable and the fixture or between the tool and the tool holder. The sampling frequency of the force sensor is not less than 10kHz, the range is determined according to the machining conditions from 0 to 10kN, and the measurement accuracy is not less than ±0.5% of the full scale.
[0043] The temperature sensor employs either a thermocouple sensor or an infrared temperature sensor. Thermocouple sensors are positioned near the spindle bearing, the feed system leadscrew and nut assembly, and the cutting area, while infrared temperature sensors are positioned directly above the cutting area. The temperature sensor's measurement range is 0–1000℃, with a measurement accuracy of no less than ±1℃.
[0044] The vibration sensor is an accelerometer, mounted on the spindle box and worktable. The frequency response range of the vibration sensor is 0.5Hz to 10kHz, and the sensitivity is not less than 100mV / g.
[0045] The displacement sensor, employing either an optical or magnetic grating ruler, is mounted on each feed axis to provide real-time feedback on the actual position coordinates of the tool. The resolution of the optical grating ruler is no less than 0.001 mm, and the repeatability is no less than 0.003 mm.
[0046] The current sensor is installed on the power supply lines of the spindle motor and the feed servo motor to collect the current of the spindle motor and the feed servo motor. The sampling frequency of the current sensor is not less than 1kHz.
[0047] (II) Data Acquisition and Preprocessing The output signals of each sensor are acquired synchronously using a data acquisition card. The data acquisition card has multi-channel synchronous sampling capability, with a sampling delay between channels not exceeding 1μs.
[0048] The acquired raw signals undergo the following preprocessing: Filtering: A low-pass filter is used to remove high-frequency noise. For cutting force signals, the cutoff frequency is set to 3 to 5 times the cutting frequency; for vibration signals, the cutoff frequency is set to 10 kHz.
[0049] Denoising: Wavelet transform or adaptive filtering methods are used to remove power frequency interference and environmental noise.
[0050] Time alignment: Since different sensors have different sampling frequencies, interpolation methods are used to unify all signals to the same time base, with a time alignment accuracy of no less than 1ms.
[0051] Normalization: Normalizing each physical quantity to... The interval or standardization to zero mean and unit variance is used to facilitate subsequent processing by machine learning models.
[0052] Preprocessed machining status data includes spindle speed. Feed rate Cutting force Cutting temperature Vibration signal amplitude Spindle motor current and tool position coordinates .
[0053] (III) Data Mapping The pre-processed processing status data is mapped to the digital twin model in real time via a data communication interface. Data communication uses high-speed Ethernet or industrial real-time Ethernet, and the communication protocol is selected from any one of the following protocols: FOCAS, OPC UA, MTConnect, or EtherCAT.
[0054] The data communication latency is the end-to-end delay from the moment the sensor acquires data to the moment the digital twin model receives it, and this delay is no greater than 10 milliseconds. The virtual-physical synchronization latency is the time difference between the state of the digital twin model and the state of the physical processing process, and this delay is no greater than 5 milliseconds.
[0055] The specific process of data mapping is as follows: The acquired tool position coordinates are... Input the kinematics sub-unit to drive the virtual tool to move to the corresponding position in the virtual space; input the collected cutting force, cutting temperature and vibration signals into the physical model sub-unit to update the state parameters of the physical model; synchronize the updated state parameters to the geometric model sub-unit to realize the synchronous operation of the digital twin model and the physical machining process.
[0056] III. Online Prediction of Machining Errors (I) Error Types and Prediction Methods The machining errors predicted by this invention include contour error, dimensional error, positional error, thermal deformation error, and tool wear error.
[0057] (1) Prediction of thermal deformation error Based on the machine tool structure model and temperature field distribution in the digital twin model, the thermal deformation of the machine tool spindle, bed and feed system caused by temperature changes is calculated using the finite element thermal-structural coupling analysis method.
[0058] Taking the thermal expansion of the spindle as an example, the prediction method is as follows: During the cutting process, the spindle system is subjected to cutting heat and frictional heat, causing its temperature to rise and resulting in thermal expansion. Spindle thermal expansion amount. With spindle temperature The relationship between them is represented as follows:
[0059] in, The coefficient of thermal expansion of the spindle material, for steel, 11×10 -6 / ℃; The effective length of the spindle, in mm; This is the current temperature of the spindle, in °C. The initial ambient temperature is expressed in °C.
[0060] A more accurate prediction method is based on finite element thermal-structural coupling analysis: real-time temperature field distribution is used as boundary conditions, transient thermal analysis is performed in the digital twin model, and the temperature field distribution at each moment is calculated; the temperature field distribution is used as a load, and structural analysis is performed to calculate the thermal deformation.
[0061] Calculate the thermal displacement error of the tool center point relative to the workpiece based on the thermal deformation amount. ), which serves as a predicted value for thermal deformation error.
[0062] (2) Prediction of tool wear error Based on real-time acquired cutting force signals, vibration signals, and acoustic emission signals, characteristic parameters of tool wear status are extracted. These characteristic parameters include: the mean, peak, and spectral characteristics of the cutting force; the root mean square value and spectral characteristics of the vibration signal; and the energy and count rate of the acoustic emission signal.
[0063] The extracted feature parameters are input into a pre-trained tool wear prediction model, which outputs the current tool flank wear value (VB).
[0064] Based on the flank wear value VB, calculate the actual cutting position offset of the tool caused by tool wear. This is used as a predicted value for tool wear error.
[0065] (3) Prediction of contour error, dimensional error and positional error Contour error prediction is based on kinematic sub-units in a digital twin model: the actual position of the current tool is compared with its theoretical position to calculate the contour deviation. Contour error ,in This represents the actual position of the cutting tool. This represents the theoretical position of the cutting tool.
[0066] The prediction of dimensional errors is based on the geometric features of the workpiece model: the deviation between the actual dimensions of the machined surface and the design dimensions is predicted according to the current machining state.
[0067] Position error prediction is based on the deviation between the actual position feedback and the commanded position of each motion axis of the machine tool: .
[0068] (II) Hybrid prediction algorithm that integrates mechanistic model and data-driven model This invention employs a hybrid prediction algorithm that integrates mechanistic models and data-driven models. The core of this algorithm is to use mechanistic models to provide physical interpretability and data-driven models to provide adaptive capabilities.
[0069] (1) Mechanism prediction module Based on the aforementioned physical model of the cutting process, the theoretical machining error E_mechanism under the current machining state is calculated. The output of the mechanism model includes the theoretical cutting force, theoretical cutting temperature, theoretical thermal deformation, and theoretical tool wear.
[0070] (2) Data-driven prediction module The data-driven prediction module employs a Physical Information Neural Network (PINN) model. The structure of this model is as follows: Input layer: 6 neurons, corresponding to 6 input features, namely spindle speed, feed rate, depth of cut, cutting force, cutting temperature, and cumulative cutting time of the tool; First hidden layer: 64 neurons, activation function is hyperbolic tangent function; The second hidden layer consists of 128 neurons, with the hyperbolic tangent activation function. The third hidden layer consists of 64 neurons, with the hyperbolic tangent activation function. Output layer: 1 neuron, corresponding to the predicted processing error value.
[0071] The training dataset for the physical information neural network model was constructed as follows: Orthogonal cutting experiments were conducted on the target CNC machine tool, with cutting parameters (spindle speed, feed rate, and depth of cut) evenly distributed within their respective value ranges, for a total of no fewer than 200 sets of experiments. During each set of experiments, machining status data was recorded in real time through a data acquisition unit. After machining, the actual machining error of the workpiece was measured using a coordinate measuring machine. The machining status data was then paired with the measured error values to form a labeled dataset. The dataset was divided into a training set, a validation set, and a test set in a 7:2:1 ratio.
[0072] The loss function of the physical information neural network model is:
[0073] in, The mean square error between the predicted and measured values:
[0074] These are the residual terms corresponding to the physical equations of the cutting process. Taking thermal error prediction as an example, the physical equation residuals are expressed as the residuals of the heat conduction equation and the thermoelastic equation:
[0075] in, For the temperature field, Where is the thermal diffusivity, For stress field, It is a volume force. This represents the physical constraint weighting coefficient, with a value ranging from 0.01 to 1.0. When sufficient experimental data is available... Use values from 0.01 to 0.1; when experimental data are limited, Take a value of 0.5 to 1.0.
[0076] The PINN model is trained using a combination of offline training and online fine-tuning. In the offline training phase, the model is pre-trained using historical processed data to obtain initial model parameters. The Adam optimizer is used with a learning rate of 0.001, and the training run consists of 500 epochs. In the online fine-tuning phase, the model parameters are updated in small batches using stochastic gradient descent with real-time collected processed data.
[0077] (3) Fusion module Mechanism prediction value Predictive residuals from data-driven models Adding them together, we get the final predicted machining error value:
[0078] in, The prediction residuals of the mechanistic model are modeled and predicted by the PINN model.
[0079] The fusion module simultaneously outputs the confidence interval of the predicted processing error value, with the confidence interval based on the predicted value. Given in the form of, where This represents the predicted standard deviation.
[0080] (III) Thermo-mechanical coupling iteration For machining scenarios where thermal deformation error and cutting force are significantly coupled, a thermo-mechanical coupling iteration is performed. This thermo-mechanical coupling iteration is executed within each sampling period.
[0081] The specific iteration process is as follows: Step 1: Based on the current state of the digital twin model, output the predicted value of thermal deformation error through the thermal deformation error prediction module. .
[0082] Step 2: Based on the predicted value of thermal deformation error, determine the tool thermal elongation. Calculate the change in actual cutting depth :
[0083] in, This is the angle between the tool axis and the cutting depth direction. For side milling with an end mill, 0° equal For end milling, It is 90°. It is 0.
[0084] Step 3: Using the change in actual cutting depth Real-time acquisition of cutting force Make corrections:
[0085] in, This is the cutting force-depth of cut influence coefficient, in N / mm. The cutting force was determined through a cutting force calibration experiment: Under the same tool-workpiece material pairing, keeping other cutting parameters constant, the depth of cut was varied, and the change in cutting force was measured. Linear regression fitting was then used to determine the result. The slope of the curve is... . The value range is 50 to 500 N / mm.
[0086] Step 4: Set the compensated cutting force value Substitute the heat source intensity calculation formula into the physical model of the cutting process:
[0087] in, This is the cutting heat distribution coefficient, with a value ranging from 0.7 to 0.95; This represents the cutting speed, expressed in m / min.
[0088] Step 5: Using the corrected heat generation rate The temperature field distribution is recalculated, and therefore the predicted value of the thermal deformation error is recalculated. .
[0089] Step 6: Determine the convergence condition. If the difference between two consecutive calculated predicted values of thermal deformation error is less than the preset convergence threshold... ,Right now If the iteration terminates, the converged predicted value of the thermal deformation error is output. The value range is 0.1–1.0 μm / cycle. If the number of iterations reaches the preset maximum number of iterations... If the iteration is terminated, the current value will be output. The value range is 5 to 20.
[0090] For most processing scenarios, convergence can be achieved within 3 to 8 iterations.
[0091] IV. Proactive Corrective Decision-Making (a) Judgment of error tolerance threshold The predicted machining error value obtained in step S3 Compared with the preset error tolerance threshold Compare the error tolerance thresholds. The value is set according to the processing accuracy requirements, and the range is 0.01 to 0.10 mm.
[0092] For precision machining, Use 0.01–0.02 mm; for semi-finishing, Use 0.02–0.05 mm; for rough machining, Use 0.05 to 0.10 mm.
[0093] when At that time, the corrective decision-making process is triggered.
[0094] (ii) Generation of candidate correction strategies After triggering the correction, multiple candidate correction strategies are generated based on the current processing state. Each candidate correction strategy has a different combination of correction parameters, including: Toolpath correction strategy: Modify the toolpath by superimposing a compensation amount on the original toolpath. The compensation direction is opposite to the error direction, and the compensation amount is 1.0 to 1.2 times the error prediction value. Feed rate adjustment strategy: Adjust the feed rate, with an adjustment range of 50% to 150% of the current feed rate; Spindle speed adjustment strategy: Adjust the spindle speed to the stable region in the stability lobe diagram; Tool posture adjustment strategy: For multi-axis machining, adjust the tool axis direction to change the cutting force direction; Cooling condition adjustment strategy: Adjust coolant pressure and flow rate.
[0095] Generate at least three candidate correction strategies, each strategy containing a specific set of correction parameters.
[0096] (III) Virtual Manufacturing Simulation The candidate correction strategies are virtually simulated in a digital twin model. The simulation uses the following settings: Simulation time step: no more than 0.1ms; Simulation accuracy: Cutting force prediction error is no greater than 10%, and temperature prediction error is no greater than 5℃; Simulation duration: Covers the remaining processing time for the current process.
[0097] The simulation processing error corresponding to each candidate correction strategy is obtained through virtual machining simulation. and simulation processing time ,in From 1 to integers, The number of candidate strategies, .
[0098] (iv) Strategy Optimization Selection The optimal correction strategy is selected based on minimizing the overall optimization objective function.
[0099] in, and These are the weighting coefficients. The value range is 0.5 to 0.9; This is the rated machining time for the current process under standard cutting parameters, in minutes.
[0100] When multiple candidate strategies The difference in values is less than a preset threshold. When, prioritize The minimum strategy. The value range is 0.01 to 0.05, and in specific implementation... Take 0.02.
[0101] After selecting the optimal strategy, the corresponding active correction control command is generated.
[0102] (v) Flutter-efficiency inverse optimization When a flutter trend is predicted based on the vibration signal, the correction decision unit performs the following operations while generating correction instructions: Step 1: Calculate the spindle speed adjustment based on a digital twin model, with the goal of eliminating chatter. and depth of cut adjustment The goal of adjusting the spindle speed is to bring the current speed into the stable region of the stability lobe diagram.
[0103] Step 2: Under the premise of satisfying the flutter suppression condition, maximize the material removal rate as the optimization objective:
[0104] Using the stability lobe diagram module in the digital twin model, the critical stable cutting width is calculated based on the modal parameters of the current tool-workpiece system. and critical stable depth of cut .
[0105] The stability lobe diagram module is calculated based on the frequency response function of the tool-workpiece system. It calculates the critical depth of cut at different spindle speeds and plots the stability lobe diagram.
[0106] The frequency response function of the tool-workpiece system was obtained through a hammer impact modal experiment. The specific steps of the hammer impact modal experiment are as follows: with the tool-workpiece system in a static state, a pulse excitation is applied to the tool tip using a hammer. The response signal is collected by an accelerometer mounted on the spindle box, with a sampling frequency of not less than 10kHz. The excitation signal and the response signal are then subjected to a fast Fourier transform to calculate the frequency response function. ,in In response to the spectrum of the signal, The spectrum of the excitation signal. The natural frequency is identified by the peak value of the amplitude-frequency curve of the frequency response function. Damping ratio calculated using the half-power bandwidth method ,in The stiffness is calculated using the low-frequency asymptotes of the frequency response function at the half-power point frequency. .
[0107] Step 3: Calculate the maximum allowable feed rate for the current operation based on the critical stable cutting width and critical stable cutting depth.
[0108] in, This is the current feed rate, in mm / min; This represents the current cutting depth, in mm. This represents the current cutting width, in mm.
[0109] Step 4: Adjust the spindle speed Cutting depth adjustment amount and maximum allowable feed Combined commands generate composite correction and efficiency enhancement instructions.
[0110] (vi) Cooling-friction-wear linkage When the correction strategy includes a cooling condition adjustment command, the cooling-friction-wear linkage is executed.
[0111] Step 1: Adjust the coolant pressure corresponding to the cooling condition adjustment command. and traffic The parameters are input into the thermal-fluid coupling simulation module of the cutting region in the digital twin model to calculate the dynamic changes in the temperature field of the cutting region. The unit is ℃.
[0112] Step 2: Based on the dynamic changes in the temperature field The correction value of the friction coefficient of the rake face is calculated using a temperature-friction coefficient correlation model:
[0113] in, The coefficient of friction at the reference temperature is obtained through friction experiments between the tool and the workpiece materials. For a cemented carbide tool and an aluminum alloy workpiece, For cemented carbide cutting tools and titanium alloy workpieces, for . The temperature-friction effect coefficient represents the change in the coefficient of friction for every 1°C increase in temperature. The value range is 0.0005~0.005 / ℃.
[0114] Step 3: Adjust the friction coefficient of the corrected rake face. Input into the tool wear prediction model to correct the predicted rate of change of the current tool flank wear value VB:
[0115] in, The wear coefficient is expressed in mm. 3 / (N·m). The tool wear was calibrated through tool wear experiments: Under the same tool-workpiece material pairing, accelerated tool wear experiments were conducted with different cutting parameters. The flank wear value (VB) was measured periodically, and a VB-t curve was fitted. The VB-t value was then calculated by combining cutting force and cutting speed data. . The range of values is .
[0116] Step 4: Adjust the duration of the cooling condition adjustment command based on the corrected predicted rate of change. If the corrected wear rate is greater than the preset threshold, extend the coolant's action time or increase the coolant pressure; if the wear rate is less than the threshold, shorten the coolant's action time.
[0117] V. Corrective Action Implementation and Closed-Loop Feedback (a) Corrective Implementation The active correction control command generated in step S4 is sent to the CNC system of the target CNC machine tool. Specifically: Toolpath correction commands: These are implemented through the tool compensation function or G-code offset function of the CNC system. Feed rate adjustment command: This can be achieved through the feed rate adjustment function of the CNC system or by directly modifying the F value in the G code; Spindle speed adjustment command: Implemented through the spindle speed adjustment function of the CNC system or by directly modifying the S value in the G code; Tool posture adjustment commands: These are implemented through the rotary axis control function of the CNC system. Cooling condition adjustment instructions: These are implemented through the auxiliary functions of the CNC system or PLC control.
[0118] The correction execution interface unit converts the active correction control command into CNC code or control signal that can be executed by the CNC system, with a conversion delay of no more than 5ms.
[0119] (ii) Real-time monitoring After the corrective action is executed, the data acquisition, data mapping, error prediction, and corrective decision-making steps continue, and the corrective effect is monitored in real time. The monitoring frequency is consistent with the data acquisition frequency.
[0120] The monitoring content includes: the actual machining error after correction, the cutting force, cutting temperature, vibration signal and other machining status data after correction, and the execution status of the correction command.
[0121] (III) Closed-loop feedback and model self-learning The actual processing results after correction are compared with the predicted correction effect to calculate the correction deviation value:
[0122] in, This represents the actual machining error after correction. This refers to the predicted processing error before correction.
[0123] like This indicates insufficient correction; if This indicates excessive correction.
[0124] The correction error value is used as a feedback signal to input into the digital twin model, and the following updates are performed: (1) Online update of model parameters of hybrid prediction algorithm The model parameters of the hybrid prediction algorithm are updated online using a recursive least squares method with a forgetting factor.
[0125]
[0126]
[0127] in, for The model parameter vector at time step, for The input feature vector at time t, for The measured error value at time [time]. Here is the gain matrix. Let covariance matrix be the variance matrix. The forgetting factor has a value range of 0.95 to 0.999.
[0128] (2) Structural correction of digital twin models When the accumulated amount of error correction data reaches a preset threshold, structural correction of the digital twin model is triggered. Structural correction includes: recalibrating the cutting force coefficients in the cutting force model. and Recalibrate the thermal conductivity and thermal expansion coefficients, and update the wear coefficient of the tool wear model. Modal parameters in the stability lobe diagram are corrected.
[0129] The structural correction method is to use the accumulated error correction data as the target and employ a genetic algorithm or particle swarm optimization algorithm to globally optimize the model parameters, so as to minimize the cumulative sum of squared errors of the model prediction.
[0130] VI. System Architecture This invention also provides an automatic machining correction system based on digital twins, comprising the following units: (a) Data Acquisition Unit Deployed on the target CNC machine tool, it includes at least two of the following: force sensor, temperature sensor, vibration sensor, current sensor, and displacement sensor, as well as a data acquisition card.
[0131] The force sensor uses a Kistler 9257B three-dimensional force gauge, which is installed between the workbench and the fixture; the temperature sensor uses an OMEGA K thermocouple or a FLIR infrared thermal imager; the vibration sensor uses a PCB 352C33 accelerometer; the displacement sensor uses a HEIDENHAIN grating ruler; and the current sensor uses a LEM current transformer.
[0132] The sampling frequency of the data acquisition card shall not be less than twice the highest sampling frequency of each sensor.
[0133] (ii) Data Communication and Preprocessing Unit It communicates with the data acquisition unit to receive processing status data and perform filtering, noise reduction, and time alignment preprocessing.
[0134] The data communication and preprocessing unit exchanges data with the CNC system of the target CNC machine tool via the FOCAS protocol, OPC UA protocol, MTConnect protocol, or EtherCAT protocol. The data communication delay is no greater than 10ms.
[0135] (III) Digital Twin Modeling Unit It communicates with the data communication and preprocessing unit to store the geometric parameters, kinematic parameters, dynamic parameters and cutting process parameters of the target CNC machine tool, and to build and update the digital twin model in real time.
[0136] The digital twin modeling unit includes: Geometric model sub-unit: Stores a 3D geometric model with a dimensioning accuracy of no less than 0.01mm; Kinematic sub-unit: Stores the kinematic chain and coordinate transformation relationships, with a coordinate transformation error of no more than 0.005 mm; Physical model sub-unit: stores cutting force model, cutting temperature model and force-thermal coupling model; Data mapping sub-unit: Maps real-time collected processing status data to each sub-model, with a virtual-real synchronization delay of no more than 5ms.
[0137] (iv) Error Prediction Unit It communicates with the digital twin modeling unit and has a built-in hybrid prediction algorithm that integrates the mechanistic model and the data-driven model. This algorithm is used to output the predicted value of the processing error and its confidence interval based on the real-time status of the digital twin model.
[0138] (v) Corrective decision-making unit It communicates with the error prediction unit to receive the predicted value of the processing error, determine whether it exceeds the preset error tolerance threshold, and when it exceeds the threshold, perform error correction strategy simulation optimization through digital twin model to generate active error correction control command.
[0139] Corrective decision-making units include: Threshold judgment subunit: used to determine the predicted value of processing error. Compared with the preset error tolerance threshold When comparing, Time-triggered correction; Strategy generation subunit: used to generate at least three candidate correction strategies based on the current processing state when correction is triggered; Strategy simulation subunit: used to perform virtual processing simulation of each candidate correction strategy in the digital twin model; Strategy optimization subunit: used to select the optimal correction strategy based on minimizing the comprehensive optimization objective function.
[0140] (vi) Correction execution interface unit It communicates with the correction decision unit and the CNC system of the target CNC machine tool, and is used to convert active correction control commands into CNC codes or control signals that can be executed by the CNC system and send them to the CNC system.
[0141] (vii) Closed-loop feedback and self-learning unit It communicates with the data acquisition unit, digital twin modeling unit, error prediction unit, and correction execution interface unit to receive the actual processing results after correction, compare the actual processing results after correction with the predicted correction effect, calculate the correction deviation value, and update the model parameters of the digital twin model and the hybrid prediction algorithm online based on the correction deviation value.
[0142] VII. Parameter Calibration Method The key parameters involved in this invention are calibrated according to the following method: (a) Calibration of the cutting force-depth of cut influence coefficient K_f On the target CNC machine tool, using the same tool-workpiece material pairing as in the actual machining, and keeping the cutting speed and feed rate constant, 5 to 8 horizontal cutting depths (e.g., 0.2mm, 0.4mm, 0.6mm, 0.8mm, 1.0mm, 1.2mm, 1.5mm, 2.0mm) are uniformly selected within the range of the cutting depth a_p, and cutting experiments are conducted at each depth. The average cutting force at each cutting depth is recorded using a force gauge. A linear regression model was used. The slope obtained by fitting the experimental data and regressing is... .
[0143] (ii) Cutting heat distribution coefficient calibration A method combining cutting temperature measurement and thermal simulation inverse calculation was employed. In the cutting experiment, the temperature at a point near the tool rake face was measured using an embedded thermocouple. In the digital twin model, different settings are defined. Thermal simulation was performed using values (0.6–1.0, with a step size of 0.05) to obtain the simulated temperature at that point. .calculate and The error between them, the corresponding minimum error The value is the calibration value.
[0144] (iii) Wear coefficient calibration Accelerated tool wear experiments were conducted on the target CNC machine tool, using high cutting speeds and feed rates to accelerate tool wear. The tool was periodically removed (e.g., every 5 minutes of machining), and the flank wear value (VB) was measured using a tool microscope. The corresponding cumulative cutting time was recorded. and cutting force According to the wear rate formula The least squares method is used to fit the VB-t curve, and the inverse calculation is performed. value.
[0145] (iv) Temperature-friction influence coefficient calibration Variable-temperature friction experiments were conducted on a friction testing machine. Standard friction pairs were fabricated from tool and workpiece materials and subjected to friction experiments at different temperatures (room temperature, 50℃, 100℃, 150℃, 200℃, 300℃, and 400℃). The coefficient of friction μ_f(T) was measured at each temperature. A linear regression model was used. The slope obtained by fitting the experimental data and regressing is... .
[0146] (v) Temperature softening coefficient calibration Yield strength or flow stress data at different temperatures were obtained by consulting the workpiece material handbook, and a linear regression model was used. The coefficients obtained by fitting the data from the materials handbook and regressing are... For data not included in the manual, high-temperature tensile tests were conducted.
[0147] VIII. The Selection Logic of the Three Linkage Mechanisms In practical applications, three linkage mechanisms are selectively adopted based on the error type and processing scenario: When the prediction error is dominated by thermal deformation error, i.e., thermal deformation error accounts for more than 60% of the total prediction error, thermal-mechanical coupling iteration is preferred. This scenario is typically characterized by: long continuous cutting time (greater than 30 seconds), high cutting speed (greater than 100 m / min), and low thermal conductivity of the workpiece material (such as titanium alloys and stainless steel).
[0148] When the prediction error is mainly due to tool wear error, that is, when tool wear error accounts for more than 50% of the total prediction error, and the machine tool is equipped with adjustable cooling nozzles and variable frequency cooling pumps, the cooling-friction-wear linkage should be prioritized. This scenario is typically characterized by: a long cumulative cutting time (greater than 15 minutes), a gradually increasing cutting force, and a gradual deterioration of the machined surface quality.
[0149] When a chattering trend is detected in the vibration signal, that is, when a significant peak appears in the vibration signal spectrum at 0.5 to 1.5 times the frequency of the spindle speed, and the amplitude exceeds twice that of the normal machining state, chatter-efficiency inverse optimization is preferred.
[0150] The three linkage mechanisms can be used independently or in combination as needed. When multiple error types are significant simultaneously, they are processed in the order of priority: thermal deformation error, tool wear error, and chatter error. The next level of error is processed only after the previous level of error is effectively controlled.
[0151] Example Example 1: Thermo-mechanical coupling correction in milling of thin-walled aluminum alloy parts.
[0152] (a) Experimental conditions This embodiment uses a three-axis vertical machining center (model: VMC-850) as the implementation object to perform side milling on a thin-walled aluminum alloy 7075-T6 part. The thin-walled part has a wall thickness of 2mm and dimensions of 200mm×150mm×50mm.
[0153] Cutting tool selection diameter Four-flute carbide end mill, tool helix angle Rake angle of the cutting tool The back angle of the cutting tool Tool overhang length .
[0154] The cutting parameters are set as follows: spindle speed feed rate Cutting depth Cutting width .
[0155] Error tolerance threshold Set to 0.02mm.
[0156] The sensor configuration is as follows: the force sensor is a Kistler 9257B triaxial force gauge, installed between the worktable and the fixture; the temperature sensor is an OMEGA K thermocouple, arranged near the cutting area and at the spindle bearing; the vibration sensor is a PCB 352C33 accelerometer, installed in the spindle box; and the displacement sensor is a HEIDENHAIN grating ruler with a resolution of 0.001mm, installed on each feed axis.
[0157] (II) Construction of Digital Twin Model Import the 3D CAD model of the VMC-850 machine tool into the ANSYS Twin Builder platform to construct the geometric and kinematic models. The machine tool's kinematic chain is as follows: The coordinate transformation error is set to 0.005mm.
[0158] A cutting force model was established based on Merchant cutting theory. Shear flow stress of aluminum alloy 7075-T6 was determined. The friction angle was obtained by consulting the material handbook. It was calibrated through orthogonal cutting experiments. Shear angle Cutting force-depth of cut influence coefficient The value was obtained through a cutting force calibration experiment. In this embodiment, the calibration value is... .
[0159] A cutting temperature model was established based on the finite element method, and cutting simulation was performed using Deform 3D software to calibrate the cutting heat distribution coefficient. Temperature softening coefficient .
[0160] Construct a physical information neural network model: The input layer has 6 neurons, the three hidden layers have 64, 128, and 64 neurons respectively, the activation function is tanh, and the output layer has 1 neuron. Physical constraint weight coefficients. The model was pre-trained offline using 200 sets of historical processed data, employing the Adam optimizer with a learning rate of 0.001 and 500 training epochs.
[0161] (III) Processing procedure and corrective action implementation The CNC machine tool is started, and cutting begins. The data acquisition unit acquires cutting force signals at a sampling frequency of 10kHz, temperature signals at a sampling frequency of 100Hz, and vibration and position signals at a sampling frequency of 1kHz. The preprocessed data is mapped to the digital twin model via the EtherCAT protocol with an 8ms delay.
[0162] At the 15th second of processing, the error prediction unit outputs the predicted value of thermal deformation error. Exceeding the error tolerance threshold .
[0163] Triggering thermo-mechanical coupling iteration: First iteration: ,to ,to ,to Until recalculation .
[0164] Second iteration: ,to ,to Until recalculation .
[0165] 3rd iteration: ,to ,to Until recalculation .
[0166] The difference in error between two consecutive iterations is 0.001 mm, which is less than the convergence threshold. The cycle is iteratively converged, and the predicted value of thermal deformation error after convergence is 0.019 mm.
[0167] The toolpath correction decision unit generates a toolpath correction command: adding a compensation amount of +0.022mm in the Y-axis direction. The toolpath correction execution interface unit converts the command into a G-code offset and sends it to the CNC system for execution.
[0168] (iv) Experimental Results After the correction command is executed, the machining process continues to be monitored. Within the next 15 seconds, the thermal deformation error is controlled within the range of 0.015 to 0.022 mm.
[0169] After machining, the thin-walled part was inspected using a coordinate measuring machine. The inspection results are as follows: ; The thermo-mechanical coupling iteration improved the prediction accuracy of thermal deformation error from 72% to 91% with the simple mechanism model. The processing efficiency was not affected after correction, and the processing time was basically the same as before correction.
[0170] The closed-loop feedback and self-learning unit will calculate the deviation value for this correction. As a feedback signal, the recursive least squares method (forgetting factor) is used. The parameters of the PINN model were updated. The updated model further reduced the prediction error in subsequent processing.
[0171] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A cutting process optimization method with automatic deviation correction, characterized in that, Includes the following steps: Step S1: Obtain the geometric parameters, kinematic parameters, dynamic parameters, and cutting process parameters of the target CNC machine tool, and construct an initial digital twin model of the target CNC machine tool and its cutting process; the initial digital twin model includes a machine tool structure model, a tool model, a workpiece model, and a physical model of the cutting process; Step S2: During the cutting process, multi-source sensors deployed on the target CNC machine tool are used to collect machining status data in real time. The machining status data includes spindle speed, feed rate, cutting force, cutting temperature, vibration signal, spindle motor current, and tool position coordinates. The collected machining status data is mapped to the initial digital twin model in real time through a data communication interface, driving the initial digital twin model to run synchronously with the physical machining process, thereby obtaining a real-time updated digital twin model. Step S3: Based on the real-time updated digital twin model, combined with the current machining status data and historical machining data, a hybrid prediction algorithm integrating the mechanistic model and the data-driven model is used to predict the machining error that will occur in the current cutting process; the machining error includes at least one of contour error, dimensional error, position error, thermal deformation error and tool wear error; the hybrid prediction algorithm uses the theoretical machining error output by the mechanistic model as the benchmark prediction value, uses the data-driven model to model and predict the prediction residual of the mechanistic model, adds the benchmark prediction value and the prediction residual, and outputs the predicted value of the machining error and its confidence interval; Step S4: Based on the predicted value of the machining error obtained in Step S3, determine whether the predicted value exceeds a preset error tolerance threshold; if it exceeds the error tolerance threshold, perform virtual machining simulation on multiple candidate correction strategies based on the digital twin model, evaluate the correction effect of each candidate correction strategy, select the optimal correction strategy with the goal of minimizing machining error and maximizing machining efficiency, and generate active correction control commands; the active correction control commands include at least one of tool path correction commands, feed rate adjustment commands, spindle speed adjustment commands, tool posture adjustment commands, and cooling condition adjustment commands; Step S5: The active correction control command generated in step S4 is sent to the CNC system of the target CNC machine tool, and the CNC system executes the corresponding correction action; after the correction action is executed, steps S2 to S4 are continued to be executed, and the correction effect is monitored in real time; the actual machining result after correction is compared with the predicted correction effect, the correction deviation value is calculated, and the correction deviation value is used as a feedback signal to input the digital twin model, and the model parameters of the digital twin model and the hybrid prediction algorithm are updated online to form a closed-loop control.
2. The machining optimization method according to claim 1, characterized in that, The prediction process of thermal deformation error in step S3 and the data acquisition process of cutting force in step S2 are performed through data iteration in the following manner: Step S3 outputs the predicted value of thermal deformation error based on the current state of the digital twin model, and calculates the change in actual cutting depth based on the tool thermal elongation corresponding to the predicted value of thermal deformation error. The change in the actual cutting depth is used to measure the cutting force collected in real time in step S2. The correction is performed to obtain the compensated cutting force value. ,in This is the cutting force-depth of cut influence coefficient. The range of values is ; The compensated cutting force value Substitute the heat source intensity calculation formula of the physical model of the cutting process described in step S3 to correct the heat generation rate in the cutting region. ,in This is the cutting heat distribution coefficient. The value range is 0.7 to 0.
95. This refers to the cutting speed; The predicted value of the thermal deformation error is recalculated using the corrected heat generation rate; The above process is repeated in each sampling period until the difference between the predicted values of the thermal deformation error obtained from two adjacent calculations is less than a preset convergence threshold. , The value range is 0.1 to 1.0 μm / cycle. The converged thermal deformation error prediction value is output to step S4. When the number of repeated executions reaches the preset maximum number of iterations N_max, the iteration is forcibly terminated and the current value is output. The value range of N_max is 5 to 20.
3. The machining optimization method according to claim 1, characterized in that, The data exchange between the cooling condition adjustment command in step S4 and the tool wear error prediction in step S3 is performed in the following manner: The coolant pressure corresponding to the cooling condition adjustment command. and traffic The parameters are input to the thermal-fluid coupling simulation module of the cutting region of the digital twin model to calculate the dynamic changes in the temperature field of the cutting region. ; Based on the dynamic changes of the temperature field The correction value of the friction coefficient of the rake face was calculated using a temperature-friction coefficient correlation model. ,in The coefficient of friction at the reference temperature. The temperature-friction effect coefficient, The range of values is ; The corrected rake face friction coefficient The data is input into the tool wear prediction model in step S3 to correct the predicted rate of change of the current tool flank wear VB value. ,in The wear coefficient is... The range of values is ; The duration of the cooling condition adjustment command is adjusted using the corrected predicted rate of change.
4. The machining optimization method according to claim 1, characterized in that, After predicting the flutter error based on the vibration signal in step S3, the following operations are also performed when generating the active correction control command in step S4: With the goal of eliminating chatter, the spindle speed adjustment is calculated based on the aforementioned digital twin model. and depth of cut adjustment ; Under the premise of meeting the flutter suppression conditions, the material removal rate Maximizing the cutting width as the optimization objective, the critical stable cutting width is calculated based on the modal parameters of the current tool-workpiece system using the stability leaflobe diagram module in the digital twin model. and critical stable depth of cut ,in The feed per tooth is used; the stability lobe diagram module calculates the critical depth of cut at different spindle speeds based on the frequency response function of the tool-workpiece system and plots the stability lobe diagram. According to the critical stable cutting width and critical stable depth of cut Calculate the maximum allowable feed rate for the current process. ,in This is the current feed rate. This represents the current cutting depth. This is the current cutting width; Adjust the spindle speed Cutting depth adjustment amount and maximum allowable feed Combined commands generate composite correction and efficiency enhancement instructions.
5. The machining optimization method according to claim 1, characterized in that, The method for constructing the physical model of the cutting process in step S1 includes: An analytical model of cutting force is established based on Merchant cutting theory, with the depth of cut as the starting point. Feed per tooth Cutting speed and the rake angle of the cutting tool Input parameters, output theoretical calculated values of cutting force ,in The shear flow stress of the workpiece material. Obtained by consulting the workpiece material handbook. Let be the friction angle. Shear angle, _o and Obtained through cutting force calibration experiments; A cutting temperature field model was established based on the finite element method, with cutting speed as the reference. Feed rate Depth of cut The tool-workpiece material pairing is used as input parameters, and the output is the temperature distribution in the cutting zone. ; The analytical cutting force model is coupled with the cutting temperature field model, and the temperature distribution output by the cutting temperature field model is used to correct the shear flow stress in the analytical cutting force model. ,in The shear flow stress at room temperature, Obtained by consulting the workpiece material handbook. This is the temperature softening coefficient. The value range is 0.001~0.005 / ℃. A physical model of the force-thermal coupling cutting process is constructed at room temperature.
6. The machining optimization method according to claim 1, characterized in that, In the hybrid prediction algorithm that integrates the fusion mechanism model and the data-driven model described in step S3, the data-driven model is a physical information neural network model. This physical information neural network model includes an input layer, three hidden layers, and an output layer. The number of neurons in each hidden layer is 64, 128, and 64, respectively, and the activation function is the hyperbolic tangent function. The loss function of this model is... ,in The mean square error between the predicted and measured values. This refers to the residual term corresponding to the physical equation of the cutting process. These are the physical constraint weighting coefficients. The value range is 0.01 to 1.0; The input features of the physical information neural network model include spindle speed, feed rate, depth of cut, cutting force, cutting temperature, and cumulative cutting time of the tool, and the output is the predicted value of machining error; The model parameters of the hybrid prediction algorithm are updated online using the error correction value feedback signal from step S5, and a recursive least squares method with a forgetting factor. The value range is 0.95 to 0.
999.
7. A cutting process optimization system with automatic deviation correction, characterized in that, include: A data acquisition unit, deployed on the target CNC machine tool, includes at least two of the following: force sensor, temperature sensor, vibration sensor, current sensor, and displacement sensor, as well as a data acquisition card, for real-time acquisition of machining status data during the cutting process; The data communication and preprocessing unit is communicatively connected to the data acquisition unit and is used to receive the machining status data and perform filtering, noise reduction, and time alignment preprocessing on the machining status data. The data communication and preprocessing unit interacts with the CNC system of the target CNC machine tool through the FOCAS protocol, OPCUA protocol, MTConnect protocol, or EtherCAT protocol, and the data communication delay is no more than 10 milliseconds. The digital twin modeling unit is communicatively connected to the data communication and preprocessing unit, and is used to store the geometric parameters, kinematic parameters, dynamic parameters and cutting process parameters of the target CNC machine tool, and to construct and update the digital twin model of the target CNC machine tool and its cutting process in real time. The error prediction unit is communicatively connected to the digital twin modeling unit and has a built-in hybrid prediction algorithm that integrates the mechanistic model and the data-driven model. It is used to output the predicted value of the processing error and its confidence interval based on the real-time status of the digital twin model. The correction decision unit is communicatively connected to the error prediction unit. It is used to receive the predicted value of the processing error, determine whether the predicted value exceeds the preset error tolerance threshold, and, if it does, perform correction strategy simulation optimization through the digital twin model to generate active correction control commands. The correction execution interface unit is communicatively connected to the correction decision unit and the CNC system of the target CNC machine tool, and is used to convert the active correction control command into CNC code or control signal executable by the CNC system and send it to the CNC system. The closed-loop feedback and self-learning unit is communicatively connected to the data acquisition unit, the digital twin modeling unit, the error prediction unit, and the correction execution interface unit. It is used to receive the actual processing results after correction, compare the actual processing results after correction with the predicted correction effect, calculate the correction deviation value, and update the model parameters of the digital twin model in the digital twin modeling unit and the hybrid prediction algorithm in the error prediction unit online based on the correction deviation value.
8. The machining optimization system according to claim 7, characterized in that, The digital twin modeling unit includes: The geometric model subunit is used to store the three-dimensional geometric model of the target CNC machine tool, cutting tool and workpiece, and the dimensional annotation accuracy of the three-dimensional geometric model is not less than 0.01mm; The kinematics sub-unit is used to store the kinematic chains and coordinate transformation relationships of each motion axis of the target CNC machine tool, with a coordinate transformation error of no more than 0.005 mm; The physical model sub-unit is used to store the cutting force model, cutting temperature model, and force-thermal coupling model. The data mapping subunit is used to map the real-time collected processing status data to the geometric model subunit, kinematic subunit, and physical model subunit, driving the digital twin model to run synchronously with the physical processing process, with a virtual-real synchronization delay of no more than 5 milliseconds.
9. The machining optimization system according to claim 7, characterized in that, The corrective decision-making unit includes: The threshold determination subunit is used to determine the predicted value of the processing error. Compared with the preset error tolerance threshold When comparing, Time-triggered correction, the error tolerance threshold The value range is 0.01 to 0.10 mm; The strategy generation subunit is used to generate at least three candidate correction strategies based on the current processing state when correction is triggered. Each candidate correction strategy has a different combination of correction parameters. The strategy simulation subunit is used to perform virtual processing simulation of each candidate correction strategy in the digital twin model, and obtain the simulation processing error corresponding to each candidate correction strategy. , and simulation processing time , ,in for to integers, ; The strategy optimization subunit is used to comprehensively optimize the objective function. The optimal correction strategy is selected based on minimization, where... and These are the weighting coefficients. , The value range is 0.5 to 0.
9. This represents the rated machining time for the current operation under standard cutting parameters; when multiple candidate strategies... The difference in values is less than a preset threshold. When, prioritize The minimum strategy.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the automatic correction cutting optimization method as described in any one of claims 1 to 6.
