Dynamic error cooperative compensation control method of numerical control machine tool adaptive to high-speed machining

By constructing a multi-source dynamic error sensing system and an attention mechanism-based LSTM network, synchronous sensing and hierarchical collaborative compensation of multi-source errors in high-speed machining of CNC machine tools were realized. This solved the bottleneck of machining accuracy improvement caused by the multi-source error coupling effect in the existing technology, and achieved efficient error compensation and accuracy improvement.

CN121578740APending Publication Date: 2026-02-27CHONGQING COLLEGE OF ELECTRONICS ENG

Patent Information

Application Number
CN202511951794.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

In the high-speed machining process of existing CNC machine tools, the coupling effect of multi-source dynamic errors limits the improvement of machining accuracy. Existing technologies are unable to achieve synchronous perception, accurate coupled modeling, and hierarchical collaborative compensation of multi-source errors.

Method used

A multi-source dynamic error sensing system is constructed, which collects data through a grating displacement sensor, a six-dimensional force sensor and a vibration acceleration sensor, and performs error coupling prediction by combining an attention mechanism LSTM network. It outputs multi-dimensional error compensation, and adjusts the feed axis motion and spindle speed in real time through servo-level and machining-level compensation mechanisms. The model is iteratively optimized using feedback data from a laser interferometer.

Benefits of technology

It achieves synchronous perception and hierarchical collaborative compensation of multi-source errors, significantly improving machining accuracy, stability and response efficiency, and enhancing the accuracy and efficiency of high-speed machining.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121578740A_ABST
    Figure CN121578740A_ABST
Patent Text Reader

Abstract

The invention discloses a numerical control machine tool dynamic error cooperative compensation control method adaptive to high-speed machining, and relates to the technical field of numerical control machine tool error control. According to the method, a multi-source dynamic error sensing system comprising a grating displacement sensor, a six-dimensional force sensor and the like is constructed to acquire data; after wavelet threshold denoising and Kalman filtering preprocessing, inputting a three-layer LSTM error coupling prediction model combined with an attention mechanism, embedding a servo motor load characteristic curve in the model, and outputting three types of error compensation amounts; through servo-level compensation and machining-level compensation, the position of a feed shaft, the rotating speed of a main shaft, the cutting feed rate and the behavior of a micro-displacement actuator are corrected, and machining errors caused by deflection and vibration conduction of the main shaft are counteracted. And iteratively updating model parameters by using a gradient descent algorithm. According to the method, through multi-source error synchronous sensing, error coupling modeling and hierarchical cooperative compensation, dynamic error cooperative control more adaptive to a high-speed processing scene is realized, and the method has a wide application value.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the technical field of error control of numerical control machine tools, and in particular to a dynamic error collaborative compensation control method of a numerical control machine tool suitable for high-speed machining. BACKGROUND

[0002] With the continuous improvement of the machining precision requirements of parts in high-end manufacturing fields such as aerospace and precision molds, high-speed machining technology has been widely used because it can significantly improve production efficiency. However, under the high-speed running state of the numerical control machine tool, the coupling effect of multi-source dynamic errors such as the motion error of the feed shaft, the dynamic deflection of the main shaft, the vibration transmission of the machine bed and the like is dramatically amplified, which becomes the core bottleneck restricting the improvement of machining precision. Therefore, a variety of error compensation technologies have been developed in the industry, and relevant patent achievements have formed technical accumulation in this field.

[0003] A dynamic positioning error compensation system of a numerical control machine tool feed drive system is disclosed in a Chinese patent (publication number CN120560158A). The system focuses on the compensation of thermal errors and geometric errors of the feed drive system. The positioning error is predicted by combining a mechanism model with residual correction. However, the system does not cover the synchronous collection of high-frequency vibration and cutting force, and the error perception dimension is incomplete and lacks collaboration.

[0004] A machine tool thermal error double closed loop modeling and compensation method based on model applicability evaluation index is disclosed in a Chinese patent (publication number CN115328025B). The method realizes adaptive compensation of thermal errors by constructing a model library and applicability evaluation index. However, the method only models thermal errors and lacks a synchronous perception mechanism for multi-node error sources of the feed shaft, main shaft and machine bed, making it difficult to capture the coupling effect of force, vibration and position in high-speed machining.

[0005] In view of the defects of the above-mentioned prior art, it is urgent to develop a control method that can realize synchronous perception of multi-source errors, accurate coupling modeling, hierarchical collaborative compensation and dynamic iterative optimization, to adapt to the high-precision error control requirements in high-speed machining scenarios. SUMMARY

[0006] Based on the above technical problems, the application discloses a dynamic error collaborative compensation control method of a numerical control machine tool suitable for high-speed machining, which specifically comprises:

[0007] A multi-source dynamic error perception system is constructed to collect real-time position deviation data of the feed shaft, dynamic cutting force data between the main shaft and the workpiece, high-frequency vibration data of the machine bed and column, and real-time load current and driving voltage data of the servo motor. The collected multi-source data is synchronously transmitted to an edge computing unit.

[0008] After preprocessing the multi-source data, input the long short-term memory network (LSTM) improved by combining attention mechanism, construct an error coupling prediction model, and embed the servo motor load characteristic curve to realize the collaborative prediction of the feed axis position error, the main shaft dynamic deflection error and the bed vibration transmission error, and output multi-dimensional error compensation;

[0009] By converting the feed axis position error compensation into a servo motor pulse correction signal, the position control unit of the numerical control system is injected in real time, and the feed axis motion trajectory is dynamically adjusted to realize servo-level compensation.

[0010] Through the macro program interface of the numerical control system, the main shaft speed is corrected in real time based on the main shaft dynamic deflection error compensation, and the cutting feed rate is corrected in real time based on the bed vibration transmission error compensation; the micro displacement actuator installed on the main shaft box generates a compensation displacement to offset the machining error caused by the main shaft deflection and vibration transmission, thereby realizing machining-level compensation.

[0011] The laser interferometer arranged in the machining area is used to detect the workpiece machining size precision in real time, and the detected size deviation data is fed back to the edge computing unit for comparison and analysis with the predicted error compensation, and the gradient descent algorithm is used to iteratively update the parameters of the improved LSTM error coupling prediction model.

[0012] Preferably, the multi-source dynamic error perception system specifically comprises: a grating displacement sensor arranged on the X / Y / Z axis feed transmission chain of the numerical control machine tool, used to collect real-time position deviation data of the feed axis; a six-dimensional force sensor installed at the end of the main shaft, used to collect dynamic cutting force data between the main shaft and the workpiece; a vibration acceleration sensor arranged at the joint of the bed and the column and at the bottom of the main shaft box, used to collect high-frequency vibration data of the bed and the column; a current and voltage monitoring module integrated in the servo driver of the numerical control system, used to collect real-time load current and driving voltage data of the servo motor.

[0013] Preferably, the preprocessing specifically comprises: noise suppression of the dynamic cutting force data and the high-frequency vibration data by a wavelet threshold denoising algorithm, wherein a hard threshold function is used as the threshold function of the wavelet threshold denoising algorithm, and the formula is:

[0014]

[0015]

[0016] wherein, is the wavelet coefficient after denoising, is the original wavelet coefficient, is the threshold value, is the noise standard deviation, is the data length.

[0017] The Kalman filter algorithm is used to smooth the real-time position deviation data of the feed axis, the load current of the servo motor, and the voltage data. The formula is as follows:

[0018]

[0019]

[0020] in, for The prior state estimate at time t. Here is the state transition matrix. for The posterior state estimate at time -1 To control the input matrix, for Control input at time -1 for The prior error covariance matrix at time t. for The posterior error covariance matrix at time -1 Let be the process noise covariance matrix.

[0021] Preferably, the error coupling prediction model is as follows: a 3-layer LSTM network is used as the basic architecture. In view of the strong coupling characteristics of dynamic cutting force, vibration and position error in high-speed machining, an attention layer is embedded after the output of the LSTM hidden layer to construct a feature processing layer, and the attention weight of the features at each time step is calculated.

[0022] In the coupled prediction layer, the load characteristic curve equation is used as a soft constraint and embedded into the output layer of the improved LSTM to achieve accurate modeling of the error coupling relationship.

[0023] After load constraint correction, three core error compensation quantities are predicted and output through a fully connected output layer: feed axis position error compensation quantity. Spindle dynamic runout error compensation amount Bed vibration transmission error compensation amount .

[0024] Preferably, the embedded attention layer is used to construct the feature processing layer as follows:

[0025] The calculation process of the attention layer is as follows: the feature vector output by the LSTM hidden layer is... Input to the fully connected layer to obtain the intermediate vector Then, the attention weights are calculated using the softmax function. The formula is:

[0026]

[0027]

[0028] in, This is the weight matrix from the hidden layer to the attention layer. The attention layer weight vector, intermediate vector The One element;

[0029] The attention-enhanced feature vector is obtained by weighted summation. , which serves as the core input feature for subsequent coupled prediction.

[0030] Preferably, the load characteristic curve equation is used as a soft constraint. Specifically, the speed and current relationship data of the servo motor under different load torques are collected, and the load characteristic curve equation is obtained by fitting using the least squares method. The formula is:

[0031]

[0032] in This is the motor load torque. For load current, Main spindle speed , , These are the fitting coefficients;

[0033] The equation is embedded as a constraint in the error coupling prediction model. When the dynamic yaw error of the main shaft predicted by the model exceeds the preset threshold, the load current and speed are adjusted in a coordinated manner.

[0034] Preferably, the servo-level compensation specifically involves converting the feed axis position error compensation amount into a servo motor pulse correction signal, using the following conversion formula:

[0035]

[0036]

[0037] in, This is the pulse correction amount, measured in pulses. This is the amount of compensation for the feed axis position error. This is the basic pulse equivalent of the servo motor. This is the motor's highest output frequency. This is the maximum speed of the feed axis.

[0038] Preferably, the machining-level compensation specifically involves: real-time correction of the spindle speed based on the spindle dynamic runout error compensation amount, using the following correction formula:

[0039]

[0040] in, The corrected spindle speed. This is the original spindle speed. This is the amount of compensation for the dynamic runout error of the main spindle. The maximum allowable yaw angle of the main spindle;

[0041] The cutting feed rate is corrected in real time based on the bed vibration transmission error compensation amount by a micro-displacement actuator installed in the spindle box. The formula is as follows:

[0042]

[0043] in, The corrected spindle speed. This is the original spindle speed. This is the amount of compensation for the vibration transmission error of the bed. It is a vibration-affected system.

[0044] Preferably, the gradient descent algorithm is used to iteratively update the parameters of the improved LSTM error coupling prediction model, and the parameter update formula is as follows:

[0045]

[0046] in, The model parameters at time t+1 are... Let be the model parameters at time t. For learning rate, The model loss function at time t gradient, The mean square error is used for calculation, and the formula is as follows:

[0047]

[0048] in, This represents the actual size deviation. This is the amount of compensation for the model's prediction error. This represents the number of samples.

[0049] Compared with the prior art, the technical solution of this application has the following technical effects:

[0050] This invention constructs a multi-source sensing system containing a grating displacement sensor, a six-dimensional force sensor, a vibration acceleration sensor, and a current / voltage monitoring module. It simultaneously collects four types of core data: feed axis position, dynamic cutting force, high-frequency vibration, and servo load. This solves the problem that existing technologies only focus on detecting a single error source and provides comprehensive and accurate raw data support for subsequent error modeling.

[0051] This invention constructs an error coupling model by combining a 3-layer LSTM network with an attention mechanism. The attention layer strengthens the weight of the influence of dynamic cutting force and vibration on position error. At the same time, the load characteristic curve of the servo motor is embedded as a soft constraint. This makes up for the shortcomings of existing technologies that do not optimize the model for coupling characteristics and lack working condition constraints, thus greatly improving the accuracy of error coupling modeling and making the prediction results more consistent with actual working conditions.

[0052] This invention adjusts the feed axis trajectory in real time based on the pulse correction formula through servo-level compensation and machining-level compensation. The machining-level compensation combines spindle speed correction, cutting feed rate correction and micro-displacement compensation to overcome the limitations of the single compensation dimension in the prior art. It can simultaneously offset three types of errors: feed axis, spindle and bed, and realize the efficient response of the hierarchical collaborative compensation mechanism, and synchronously offset multi-dimensional errors.

[0053] This invention uses a laser interferometer to provide real-time feedback on dimensional deviations and employs a gradient descent algorithm to directly iteratively update model parameters. This overcomes the shortcomings of existing technologies, such as reliance on model library switching and lack of stable judgment, and achieves a real-time iterative optimization mechanism that reduces resource consumption and ensures continuous and stable compensation accuracy.

[0054] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings.

[0055] The above and other objects, advantages and features of this application will become more apparent to those skilled in the art from the following detailed description of specific embodiments in conjunction with the accompanying drawings. Attached Figure Description

[0056] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. In all drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn to scale.

[0057] Based on the description of the figures and their corresponding technical content in the document, the titles of the figures are as follows:

[0058] Figure 1 A flowchart of a dynamic error collaborative compensation control method for CNC machine tools adapted to high-speed machining;

[0059] Figure 2This is a general architecture diagram of a dynamic error collaborative compensation control method for CNC machine tools adapted to high-speed machining.

[0060] Figure 3 This is a diagram of the neural network architecture for an error-coupled prediction model.

[0061] Figure 4 This is an experimental setup diagram for testing this method on a VMC-850 vertical machining center in a certain factory.

[0062] Figure 5 A comparison chart of the feed axis error prediction deviations for the three methods in the experiment;

[0063] Figure 6 A comparison chart of the predicted deviations of the spindle runout error for the three methods in the experiment;

[0064] Figure 7 This is a comparison chart of the probability density of part machining dimensional deviations for the three methods in the experiment.

[0065] Figure 8 This is a comparison chart showing the matching degree and accuracy improvement of the three methods in the experiment;

[0066] Figure 9 This is a comparison chart showing the data synchronization delay, compensation response delay, and model iteration optimization response time in the experiment. Detailed Implementation

[0067] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. In the following description, specific details such as specific configurations and components are provided merely to help fully understand the embodiments of this application. Therefore, those skilled in the art should understand that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this application. In addition, for clarity and brevity, descriptions of known functions and structures are omitted in the embodiments.

[0068] It should be understood that the phrase "an embodiment" or "this embodiment" throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of this application. Therefore, "an embodiment" or "this embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. Furthermore, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.

[0069] Furthermore, reference numerals and / or letters may be repeated in different examples within this application. Such repetition is for the purpose of simplification and clarity and does not in itself indicate a relationship between the various embodiments and / or settings discussed.

[0070] In this article, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" in this article describes another type of relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " in this article generally indicates that the related objects before and after it are in an "or" relationship.

[0071] In this article, the term "at least one" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, "at least one of A and B" can mean: A exists alone, A and B exist simultaneously, or B exists alone.

[0072] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion.

[0073] Example 1 mainly describes a dynamic error collaborative compensation control method for CNC machine tools adapted to high-speed machining, such as... Figure 1 , Figure 2 As shown, it specifically includes:

[0074] A multi-source dynamic error sensing system is constructed to collect real-time position deviation data of the feed axis, dynamic cutting force data between the spindle and the workpiece, high-frequency vibration data of the bed and column, and real-time load current and drive voltage data of the servo motor. The collected multi-source data is synchronously transmitted to the edge computing unit.

[0075] After preprocessing the multi-source data, the input is a Long Short-Term Memory (LSTM) network improved with an attention mechanism to construct an error coupling prediction model. At the same time, the load characteristic curve of the servo motor is embedded to achieve collaborative prediction of feed axis position error, spindle dynamic runout error, and bed vibration transmission error, and output multi-dimensional error compensation amount.

[0076] By converting the feed axis position error compensation amount into a servo motor pulse correction signal and injecting it into the position control unit of the CNC system in real time, the feed axis motion trajectory is dynamically adjusted to achieve servo-level compensation.

[0077] Through the macro program interface of the CNC system, the spindle speed is corrected in real time based on the spindle dynamic runout error compensation amount, and the cutting feed rate is corrected in real time based on the bed vibration transmission error compensation amount; the micro displacement actuator installed in the spindle box generates compensation displacement to offset the machining error caused by spindle runout and vibration transmission, thereby achieving machining-level compensation.

[0078] The workpiece machining dimensional accuracy is detected in real time by a laser interferometer set in the processing area. The detected dimensional deviation data is fed back to the edge computing unit. After comparison and analysis with the predicted error compensation amount, the parameters of the improved LSTM error coupling prediction model are iteratively updated using the gradient descent algorithm.

[0079] Furthermore, the multi-source dynamic error sensing system includes: an optical grating displacement sensor installed in the X / Y / Z axis feed transmission chain of the CNC machine tool, with a measurement accuracy of not less than ±1. m, used to collect real-time position deviation data of the feed axis; a six-dimensional force sensor installed at the end of the spindle, with a dynamic force measurement range of 0-50kN and a sampling frequency of not less than 2kHz, used to collect dynamic cutting force data between the spindle and the workpiece; a vibration acceleration sensor deployed at the junction of the bed and column and at the bottom of the spindle box, with a measurement frequency range of 0-5kHz, used to collect high-frequency vibration data of the bed and column; a current / voltage monitoring module integrated into the servo drive of the CNC system, with a current sampling accuracy of not less than 0.1A and a voltage sampling accuracy of not less than 0.5V, used to collect real-time load current and drive voltage data of the servo motor.

[0080] Furthermore, the preprocessing specifically involves: suppressing noise in the dynamic cutting force data and high-frequency vibration data using a wavelet thresholding denoising algorithm. The threshold function of the wavelet thresholding denoising algorithm is a hard threshold function, and the formula is:

[0081]

[0082]

[0083] in, These are the denoised wavelet coefficients. These are the original wavelet coefficients. For the threshold, The standard deviation of noise. For data length;

[0084] The Kalman filter algorithm is used to smooth the real-time position deviation data of the feed axis, the load current of the servo motor, and the voltage data. The formula is as follows:

[0085]

[0086]

[0087] in, for The prior state estimate at time t. Here is the state transition matrix. for The posterior state estimate at time -1 To control the input matrix, for Control input at time -1 for The prior error covariance matrix at time t. for The posterior error covariance matrix at time -1 Let be the process noise covariance matrix.

[0088] Furthermore, such as Figure 3 The neural network structure diagram shown is as follows: The error coupling prediction model is specifically designed as follows: a 3-layer LSTM network is used as the basic architecture. In view of the strong coupling characteristics of dynamic cutting force, vibration and position error in high-speed machining, an attention layer is embedded after the output of the LSTM hidden layer to construct a feature processing layer and calculate the attention weight of the features at each time step.

[0089] In the coupled prediction layer, the load characteristic curve equation is used as a soft constraint and embedded into the output layer of the improved LSTM to achieve accurate modeling of the error coupling relationship.

[0090] After load constraint correction, three core error compensation quantities are predicted and output through a fully connected output layer: feed axis position error compensation quantity. Spindle dynamic runout error compensation amount Bed vibration transmission error compensation amount .

[0091] Furthermore, the parameter settings for each layer of the 3-layer LSTM network as the basic architecture are as follows:

[0092] Input layer: The number of neurons is consistent with the dimension of the input data (e.g., 6-dimensional input data corresponds to 6 neurons).

[0093] Hidden layer 1: 64 neurons, activation function is tanh;

[0094] Hidden layer 2: 128 neurons, activation function is tanh;

[0095] Hidden layer 3: 64 neurons, activation function is tanh.

[0096] Furthermore, the embedded attention layer is used to construct the feature processing layer as follows:

[0097] The calculation process of the attention layer is as follows: the feature vector output by the LSTM hidden layer is... Input to the fully connected layer to obtain the intermediate vector Then, the attention weights are calculated using the softmax function. The formula is:

[0098]

[0099]

[0100] in, This is the weight matrix from the hidden layer to the attention layer. The attention layer weight vector, intermediate vector The One element;

[0101] The attention-enhanced feature vector is obtained by weighted summation. , which serves as the core input feature for subsequent coupled prediction.

[0102] Furthermore, the load characteristic curve equation serves as a soft constraint. Specifically, it involves collecting data on the speed and current relationship of the servo motor under different load torques, and then fitting the load characteristic curve equation using the least squares method. The formula is as follows:

[0103]

[0104] in This is the motor load torque. For load current, Main spindle speed , , These are the fitting coefficients;

[0105] The equation is embedded as a constraint in the error coupling prediction model. When the dynamic yaw error of the main shaft predicted by the model exceeds the preset threshold, the load current and speed are adjusted in a coordinated manner.

[0106] Furthermore, the servo-level compensation specifically involves converting the feed axis position error compensation amount into a servo motor pulse correction signal. The specific conversion formula is as follows:

[0107]

[0108]

[0109] in, This is the pulse correction amount, measured in pulses. This is the amount of compensation for the feed axis position error. This is the basic pulse equivalent of the servo motor. This is the motor's highest output frequency. This is the maximum speed of the feed axis.

[0110] Furthermore, the machining-level compensation specifically involves: real-time correction of the spindle speed based on the spindle dynamic runout error compensation amount, using the following correction formula:

[0111]

[0112] in, The corrected spindle speed. This is the original spindle speed. This is the amount of compensation for the dynamic runout error of the main spindle. The maximum allowable yaw angle of the main spindle;

[0113] The cutting feed rate is corrected in real time based on the bed vibration transmission error compensation amount by a micro-displacement actuator installed in the spindle box. The formula is as follows:

[0114]

[0115] in, The corrected spindle speed. This is the original spindle speed. This is the amount of compensation for the vibration transmission error of the bed. It is a vibration-affected system.

[0116] Furthermore, the gradient descent algorithm is used to iteratively update the parameters of the improved LSTM error coupling prediction model. The parameter update formula is as follows:

[0117]

[0118] in, The model parameters at time t+1 are... Let be the model parameters at time t. For learning rate, The model loss function at time t gradient, The mean square error is used for calculation, and the formula is as follows:

[0119]

[0120] in, This represents the actual size deviation. This is the amount of compensation for the model's prediction error. This represents the number of samples.

[0121] Furthermore, the measurement accuracy of the laser interferometer is no less than ±0.5. m, the measurement frequency is synchronized with the multi-source data acquisition frequency, and the synchronization error does not exceed 1ms; when the detected workpiece size deviation is less than the preset accuracy threshold of 0.002mm for 3 consecutive times, the model parameter iteration update is paused and the system enters the compensation stable operation stage.

[0122] This embodiment details a dynamic error collaborative compensation control method for CNC machine tools adapted to high-speed machining. Data is collected through a multi-source dynamic error sensing system including a grating displacement sensor and a six-dimensional force sensor. After wavelet threshold denoising and Kalman filtering preprocessing, the data is input into a three-layer LSTM error coupling prediction model incorporating an attention mechanism. A servo motor load characteristic curve is embedded in the model, and three types of error compensation are output. Through servo-level compensation and machining-level compensation, the feed axis position, spindle speed, cutting feed rate, and micro-displacement actuator behavior are corrected to offset machining errors caused by spindle runout and vibration transmission. Simultaneously, a gradient descent algorithm is used to iteratively update the model parameters, achieving high-precision dynamic error collaborative compensation.

[0123] Example 2 details the experiment conducted on a VMC-850 vertical machining center at a certain factory, where the method was tested. This vertical machining center is designed for high-speed milling of aerospace aluminum alloy parts. The alloy material is 7075-T6, the milling speed is 8000-12000 r / min, and the feed rate is 5000-8000 mm / min. The specific implementation steps are as follows:

[0124] like Figure 4 The experimental setup shown has HEIDENHAIN LS187 grating displacement sensors installed on the X / Y / Z axis feed transmission chains of the VMC-850. The sensors have a measurement accuracy of ±1μm and a sampling frequency of 1kHz, and are used to collect real-time position deviation data for each axis.

[0125] An ATI Mini45 six-dimensional force sensor is connected to the end of the spindle via a flange. Its dynamic force measurement range is 0-50kN and the sampling frequency is 2kHz. It is used to collect dynamic cutting force data in the X / Y / Z directions during milling.

[0126] One PCB356A11 vibration acceleration sensor is deployed at the junction of the bed and column and at the bottom of the spindle box. The measurement frequency range is 0-5kHz, which is used to collect high-frequency vibration data.

[0127] Extract current and voltage monitoring module data from the servo driver of the CNC system, and collect the load current (5-30A) and drive voltage (220-380V) of the X / Y / Z axis servo motors.

[0128] The above multi-source data is synchronously transmitted to the NVIDIA Jetson AGXXavier edge computing unit, with a data synchronization error set to ≤1ms, to ensure the time axis alignment of position, force, vibration and load data.

[0129] Dynamic cutting force data acquired by a six-dimensional force sensor and high-frequency vibration data acquired by a vibration acceleration sensor are processed using a db4 wavelet threshold denoising algorithm to remove high-frequency noise. This algorithm uses a data length of N=1000 and a noise standard deviation of [missing information]. =0.05, threshold = ×√(2lnN)=0.05×√(2×ln1000)≈0.38;

[0130] The position deviation data of the grating displacement sensor and the current and voltage data of the servo motor are smoothed by Kalman filtering algorithm. The state transition matrix A=[[1,0.001],[0,1]], the control input matrix B=[[0.5],[1]], and the process noise covariance matrix Q=[[1e-6,0],[0,1e-6]] are set to eliminate random fluctuations in the data.

[0131] A 3-layer LSTM network was constructed: the input layer had 6 neurons (corresponding to X / Y / Z axis position deviation, vibration acceleration, and motor current), and the 3 hidden layers had 64, 128, and 64 neurons respectively, with tanh as the activation function for all layers.

[0132] Calculate the attention weights, set the weight matrix W from the hidden layer to the attention layer, and the attention layer weight vector. Higher weights are assigned to the eigenvectors corresponding to dynamic cutting forces and vibration accelerations. Enhanced extraction of coupled features;

[0133] Load torque T data of the servo motor at speeds n=8000-12000r / min and currents I=5-30A were pre-collected. The load characteristic curve equation T=0.8I-0.002n+10 was obtained by fitting using the least squares method. =0.8, =-0.002, =10, when the model predicts the spindle dynamic yaw error Δθ>0.003rad, the linkage adjustment of current and speed is triggered, reducing the current by 5A and the speed by 500r / min;

[0134] Three core error compensation values ​​are obtained through the fully connected output layer: feed axis position error compensation value ΔL=0.001-0.005mm, spindle dynamic runout error compensation value Δθ=0.001-0.004rad, and bed vibration transmission error compensation value ΔA=1-5μm.

[0135] Convert the X-axis feed axis position error compensation ΔL = 0.003mm into a pulse correction signal: Given that the X-axis servo motor's maximum output frequency f_max = 2000Hz, maximum moving speed v_max = 10000mm / min, and basic pulse equivalent... Pulse / mm, Pulse Correction Amount The pulse is injected into the position control loop of the CNC system to adjust the X-axis motion trajectory in real time, offset the position error, and achieve servo-level compensation.

[0136] Spindle speed correction: Original spindle speed Maximum allowable spindle yaw angle Model prediction Corrected speed Speed ​​commands are issued in real time through the macro program M code of the CNC system;

[0137] Cutting feed rate correction: original feed rate Vibration influence coefficient Model prediction Corrected feed rate ;

[0138] Micro-displacement compensation: A PIP-841.40 piezoelectric ceramic micro-displacement actuator is installed on the spindle box, with a voltage displacement coefficient... ,according to Calculate the control voltage The actuator generates The compensation displacement offsets the vibration transmission error of the bed, thus realizing machining-level compensation.

[0139] A Renishaw XL-80 laser interferometer is deployed in the machining area to monitor the dimensional accuracy of the milled parts in real time. When an actual dimensional deviation is detected... Model prediction error compensation amount At that time, the learning rate is set according to the formula in claim 9. Calculate the loss function Update model parameters using gradient descent algorithm To optimize the model's prediction accuracy.

[0140] After implementing the method of this application, the dimensional deviation was stably controlled within ±0.002mm, while before the compensation was implemented, the dimensional deviation of the parts was 0.008-0.012mm, improving the machining accuracy by 75%. Moreover, during continuous 8 hours of high-speed milling, due to model iteration optimization, the dimensional deviation fluctuation was ≤0.0005mm. The following is a data comparison between this method and the FMS-Comp method and LSTM-Base method previously used by the factory:

[0141] Key indicators The method FMS-Comp LSTM-Base Error coverage type Position, cutting force, vibration, load Position, thermal error Position, vibration, thermal error Feed axis error prediction bias ±0.5 pm ±2.1 pm ±1.3 pm Spindle runout error prediction bias ±0.001 rad ±0.008 rad ±0.003 rad Part machining size deviation amplitude ±0.002 mm ±0.010 mm ±0.006 mm Model and actual working condition matching degree 98.5% 72.6% 85.7% Comparison of no compensation machining precision improvement 75% 32% 50% Average data synchronization delay 3 ms 10 ms 6 ms Average compensation response delay 0.5s 4.2s 1.8s Model iteration optimization response time 0.5s No iteration optimization 6.5s High-speed machining adaptive speed range 8000-12000 r / min ≤6000 r / min ≤8000 r / min Edge computing unit CPU occupancy rate 35%-40% 25%-30% 60%-65% Monthly average compensation system failure rate 0.2 times 1.5 times 0.8 times

[0142] As shown in the table above, this method covers four types of prediction errors, which is superior to the two previously used methods. Furthermore, the prediction deviation for feed axis errors is only ±0.5μm, spindle runout errors is only ±0.001rad, and part machining dimensions are only ±0.002mm. The model's matching accuracy with actual working conditions reaches 98.5%, and the improvement in machining accuracy compared to uncompensated machining is the highest among the three methods, verifying the modeling and compensation accuracy of this method. In addition, the data synchronization delay of this method is only 2-4ms, the compensation response delay is ≤0.5s, and the high-speed machining adaptability range reaches 8000-12000r / min, verifying the high-speed adaptability and stability of this method. The edge computing unit CPU utilization rate of 35%-40% and the average monthly compensation system failure rate of 0.2 times verify the engineering practicality of this method.

[0143] according to Figure 5 , Figure 6 The comparison of prediction biases shown demonstrates that the data from this method converges more effectively, and its model prediction performance is significantly better than the other two methods. According to... Figure 7 The comparison of the probability density of machining dimensional deviations in the shown parts demonstrates that the errors generated by this compensation method are more convergent, significantly outperforming previous methods in terms of production accuracy and stability. According to... Figure 8 The comparison charts showing the improvement in matching accuracy demonstrate that this method outperforms LSTM-Base and is significantly better than FMS-Comp in both aspects. Figure 9 As shown in the comparison chart of data synchronization delay, compensation response delay, and model iteration optimization response time, this method has made significant breakthroughs in real-time performance and efficiency compared to previous methods. The above examples fully demonstrate the significant advantages of this method in terms of efficiency, model matching degree, compensation accuracy, stability, and usability.

[0144] This embodiment describes in detail the experiment of testing the method on a VMC-850 vertical machining center in a certain factory. After implementing the method of this application, the dimensional deviation was stably controlled within ±0.002mm, while before the compensation was implemented, the dimensional deviation of the part was 0.008-0.012mm, and the machining accuracy was improved by 75%. The experiment was also compared with the data of the factory's previous methods, which fully verified the significant advantages of the method in terms of efficiency, model matching degree, compensation accuracy, stability and usability.

[0145] The above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. For those skilled in the art, the present invention can have various modifications and variations. Any changes, modifications, substitutions, integrations, and parameter changes made to these embodiments within the spirit and principles of the present invention, without departing from the principles and spirit of the present invention, through conventional substitutions or to achieve the same function, fall within the scope of protection of the present invention.

Claims

1. A method for collaborative compensation control of dynamic errors in CNC machine tools adapted to high-speed machining, characterized in that, include: A multi-source dynamic error sensing system is constructed to collect real-time position deviation data of the feed axis, dynamic cutting force data between the spindle and the workpiece, high-frequency vibration data of the bed and column, and real-time load current and drive voltage data of the servo motor. The collected multi-source data is synchronously transmitted to the edge computing unit. After preprocessing the multi-source data, the input is a Long Short-Term Memory (LSTM) network improved with an attention mechanism to construct an error coupling prediction model. At the same time, the load characteristic curve of the servo motor is embedded to achieve collaborative prediction of feed axis position error, spindle dynamic runout error, and bed vibration transmission error, and output multi-dimensional error compensation amount. By converting the feed axis position error compensation amount into a servo motor pulse correction signal and injecting it into the position control unit of the CNC system in real time, the feed axis motion trajectory is dynamically adjusted to achieve servo-level compensation. Through the macro program interface of the CNC system, the spindle speed is corrected in real time based on the spindle dynamic runout error compensation amount, and the cutting feed rate is corrected in real time based on the bed vibration transmission error compensation amount; the micro displacement actuator installed in the spindle box generates compensation displacement to offset the machining error caused by spindle runout and vibration transmission, thereby achieving machining-level compensation. The workpiece machining dimensional accuracy is detected in real time by a laser interferometer set in the processing area. The detected dimensional deviation data is fed back to the edge computing unit. After comparison and analysis with the predicted error compensation amount, the parameters of the improved LSTM error coupling prediction model are iteratively updated using the gradient descent algorithm.

2. The method according to claim 1, characterized in that, The multi-source dynamic error sensing system specifically includes: grating displacement sensors installed on the X / Y / Z axis feed transmission chain of the CNC machine tool to collect real-time position deviation data of the feed axes; a six-dimensional force sensor installed at the end of the spindle to collect dynamic cutting force data between the spindle and the workpiece; vibration acceleration sensors deployed at the junction of the bed and column and at the bottom of the spindle box to collect high-frequency vibration data of the bed and column; and a current and voltage monitoring module integrated into the servo driver of the CNC system to collect real-time load current and drive voltage data of the servo motor.

3. The method according to claim 1, characterized in that, The preprocessing specifically involves: suppressing noise in the dynamic cutting force data and high-frequency vibration data using a wavelet thresholding denoising algorithm. The threshold function of the wavelet thresholding denoising algorithm is a hard threshold function, and the formula is as follows: in, These are the denoised wavelet coefficients. These are the original wavelet coefficients. For the threshold, The standard deviation of noise. For data length; The Kalman filter algorithm is used to smooth the real-time position deviation data of the feed axis, the load current of the servo motor, and the voltage data. The formula is as follows: in, for The prior state estimate at time t. Here is the state transition matrix. for The posterior state estimate at time -1 To control the input matrix, for Control input at time -1 for The prior error covariance matrix at time t. for The posterior error covariance matrix at time -1 Let be the process noise covariance matrix.

4. The method according to claim 1, characterized in that, The error coupling prediction model is specifically designed as follows: a 3-layer LSTM network is used as the basic architecture. In view of the strong coupling characteristics of dynamic cutting force, vibration and position error in high-speed machining, an attention layer is embedded after the output of the LSTM hidden layer to construct a feature processing layer, and the attention weight of the features at each time step is calculated. In the coupled prediction layer, the load characteristic curve equation is used as a soft constraint and embedded into the output layer of the improved LSTM to achieve accurate modeling of the error coupling relationship. After load constraint correction, three core error compensation quantities are predicted and output through a fully connected output layer: feed axis position error compensation quantity. Spindle dynamic runout error compensation amount Bed vibration transmission error compensation amount .

5. The method according to claim 4, characterized in that, The embedded attention layer constructs a feature processing layer, specifically as follows: The calculation process of the attention layer is as follows: the feature vector output by the LSTM hidden layer is... Input to the fully connected layer to obtain the intermediate vector Then, the attention weights are calculated using the softmax function. The formula is: in, This is the weight matrix from the hidden layer to the attention layer. The attention layer weight vector, intermediate vector The One element; The attention-enhanced feature vector is obtained by weighted summation. , which serves as the core input feature for subsequent coupled prediction.

6. The method according to claim 4, characterized in that, The load characteristic curve equation serves as a soft constraint. Specifically, it involves collecting data on the speed and current relationship of the servo motor under different load torques, and then fitting the load characteristic curve equation using the least squares method. The formula is as follows: in This is the motor load torque. For load current, Main spindle speed , , These are the fitting coefficients; The equation is embedded as a constraint in the error coupling prediction model. When the dynamic yaw error of the main shaft predicted by the model exceeds the preset threshold, the load current and speed are adjusted in a coordinated manner.

7. The method according to claim 1, characterized in that, The servo-level compensation specifically involves converting the feed axis position error compensation amount into a servo motor pulse correction signal. The specific conversion formula is as follows: in, This is the pulse correction amount, measured in pulses. This is the amount of compensation for the feed axis position error. This is the basic pulse equivalent of the servo motor. This is the motor's highest output frequency. This is the maximum speed of the feed axis.

8. The method according to claim 1, characterized in that, The machining-level compensation specifically involves: real-time correction of the spindle speed based on the spindle dynamic runout error compensation amount, using the following correction formula: in, The corrected spindle speed. This is the original spindle speed. This is the amount of compensation for the dynamic runout error of the main spindle. The maximum allowable yaw angle of the main spindle; The cutting feed rate is corrected in real time based on the bed vibration transmission error compensation amount by a micro-displacement actuator installed in the spindle box. The formula is as follows: in, The corrected spindle speed. This is the original spindle speed. This is the amount of compensation for the vibration transmission error of the bed. It is a vibration-affected system.

9. The method according to claim 1, characterized in that, The gradient descent algorithm is used to iteratively update the parameters of the improved LSTM error coupling prediction model. The parameter update formula is as follows: in, The model parameters at time t+1 are... Let be the model parameters at time t. For learning rate, The model loss function at time t gradient, The mean square error is used for calculation, and the formula is as follows: in, This represents the actual size deviation. This is the amount of compensation for the model prediction error. This represents the number of samples.

Citation Information

Patent Citations

  • A double closed-loop modeling and compensation method for machine tool thermal errors based on model suitability evaluation index

    CN115328025B

  • Dynamic positioning error compensation system of numerical control machine tool feed driving system

    CN120560158A

Cited By

  • Cycloid cyclone anomaly monitoring system and method

    CN121881217A

  • Time grating position precision compensation device and method for numerical control rotary table

    CN121995851A