Cutter cutting path machining error compensation method based on online monitoring
Through the hybrid architecture of multimodal sensor real-time monitoring and dynamic time regularization and Kalman filtering, combined with the double-layer compensation mechanism and real-time control system, the problem of difficulty in monitoring and compensating multiple error sources in the existing technology is solved, and error compensation with high accuracy and high real-time performance is achieved, which significantly improves processing accuracy and surface quality.
Patent Information
- Application Number
- CN202510513450.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-05-27
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing CNC machining technology is difficult to effectively monitor and compensate for a variety of error sources, resulting in difficult processing accuracy and surface quality to meet high precision requirements.
The multimodal sensor component is used to collect tool position, cutting force and thermal deformation data in real time, combine a hybrid architecture of dynamic time regularization and Kalman filtering to establish a three-dimensional error state equation, and achieve high-precision and high-real-time error compensation through a double-layer compensation mechanism and a real-time control system.
It significantly improves processing accuracy and surface quality, meets the submicron processing requirements in the fields of aerospace and precision instruments, and achieves reduction of contour errors and improvement of surface roughness.
Smart Images

Figure CN120044877A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of numerical control machining, and particularly to a machining error compensation method for a tool cutting path based on online monitoring. Background Art
[0002] In modern high-precision numerical control machining, machining error is a key factor affecting the machining accuracy and surface quality of parts. Due to factors such as tool wear (diameter loss of 5 - 10 μm per hour) and thermal deformation of the machine tool (Z-axis positioning error of 10 - 20 μm / h caused by spindle temperature rise), there will be a deviation between the actual cutting path and the theoretical path, resulting in machining errors. Existing technologies usually adopt offline compensation (such as polynomial fitting based on pre-measurement, compensation accuracy of ±20 - 50 μm) or multiple dry-run toolpath trials (machining efficiency reduced by more than 40%) to reduce errors, but these methods have defects such as limited compensation accuracy and low machining efficiency. For example, the lack of multi-source error monitoring: only relying on a single sensor (such as a laser rangefinder) to monitor the tool position, it is impossible to synchronously obtain key data such as cutting force (affecting tool deflection) and machine tool temperature field (affecting structural thermal expansion), resulting in the disconnection between the compensation model and the actual working conditions; insufficient real-time performance: the control cycle exceeds 5 ms, it is impossible to respond to high-frequency errors (such as cutting vibration frequency of 100 - 500 Hz), and the compensation command does not consider the servo system delay (typical lag of 2 - 5 ms), which is prone to cause mechanical vibration.
[0003] In order to achieve high-precision machining, it is necessary to establish a real-time online monitoring system to dynamically detect and compensate various error sources during the machining process. However, the existing technologies cannot simultaneously monitor multiple error sources such as tool pose, cutting force, and thermal deformation, and lack a high-precision and high-response-speed error calculation and compensation control mechanism, making it difficult to meet the requirements of high-precision machining.
[0004] Therefore, there is an urgent need for a machining error compensation method for a cutting path based on online monitoring, which can integrate multiple sensors to collect error data in real time, establish an error state model, and adopt advanced digital signal processing and control algorithms to achieve high-precision and high-real-time error compensation, thereby improving the machining accuracy and surface quality of parts. Summary of the Invention
[0005] The purpose of the present invention is to provide a machining error compensation method for a tool cutting path based on online monitoring in view of the deficiencies of the prior art.
[0006] To solve the above technical problems, the following technical solutions are adopted: The present invention provides a machining error compensation method for a tool cutting path based on online monitoring, including the following steps: S1. Establish a cutting path data model; S2. Construct a multi-modal sensor component to collect error data in real time: The multi-modal sensor component includes a displacement sensor, a six-axis force sensor, and an infrared thermal imager. The tool position, cutting force, and thermal deformation data are collected through the multi-modal sensor component, and the time is synchronized through the Precision Time Protocol; S3. Establish an error state equation for error calculation; adopt a hybrid architecture of dynamic time warping and Kalman filtering. By calculating the multi-scale similarity between the real-time sensor data stream and the preset path, establish a three-dimensional error state equation including position deviation, velocity deviation, and acceleration deviation; S4. Construct a two-layer compensation mechanism; use the coarse compensation layer for model prediction to control the correction path; use the fine compensation layer, introduce a deep reinforcement learning algorithm, and train the compensation strategy network through historical machining data; S5. Use a real-time control system to execute the compensation instruction; execute the compensation instruction based on the Xenomai real-time system and the EtherCAT bus, decompose the compensation amount to each axis of the machine tool, consider the servo delay, and add acceleration-jerk constraints in the feedforward control.
[0007] On the basis of the above technical solution, a further improvement is that the establishment of the cutting path data model includes: Step S101. Use 3D modeling software to perform digital mapping of the geometric features of the blank and the finished workpiece; Step S102. Generate a theoretical cutting path through CAM software, calculate the cutting force on the tool-workpiece contact surface, and extract the dynamic parameters including tool deflection deformation; Step S103. Establish a transformation matrix for the path coordinate system to provide reference data for error compensation.
[0008] On the basis of the above technical solution, a further improvement is that the specific steps of S2 include: Step S201. Use a displacement sensor to obtain the spatial coordinates of the tool tip in real time and establish the spatial position relationship between the tool tip and the workpiece; Step S202. Based on the data information of the spatial position relationship, and monitor the change of the cutting force vector of the tool under the spatial position relationship by a six-axis force sensor to obtain the spindle tool energy consumption data under the spatial position relationship; Step S203. Integrate an infrared thermal imager to capture the thermal deformation of the machine tool; and achieve time synchronization through the Precision Time Protocol.
[0009] On the basis of the above technical solution, a further improvement is that the steps of S3 include: Step S301. Data preprocessing and synchronization: Calibrate the time through the Precision Clock Protocol to compensate for transmission delay and clock deviation; Denoise the original signal using the wavelet threshold method to remove noise interference; Step S302. Multi-scale path matching: Receive the theoretical cutting points generated by the CAM software, process them according to the kinematic attributes of the machine tool to make them adapt to the machine tool motion model; Perform wavelet multi-resolution decomposition on the theoretical and measured paths; Calculate the path deviation layer by layer; Weight and fuse the deviations of each layer to obtain the total deviation; Step S303. Construct a three-dimensional error state equation: Define a 9-dimensional state vector containing position, velocity, and acceleration deviations; Design a state transition matrix based on the machine tool kinematic model; Set the process noise covariance matrix according to the machine tool vibration spectrum; Step S304. Kalman filter real-time solution: In the prediction stage, predict the state and covariance by combining control inputs; In the observation stage, integrate multi-source data to update the state and correct it according to the observation noise covariance; Step S305. Dynamic threshold control: Calculate the norm of the position deviation, compare it with the dynamic threshold, and trigger deep reinforcement learning fine compensation when it exceeds the limit.
[0010] Based on the above technical solution, a further improvement is that step S301 further includes: Receiving the processing code from an external switch, parsing the device status data sent and / or received by the numerical control system, and providing basic data for subsequent processing.
[0011] Based on the above technical solution, a further improvement is that step S303 further includes: Kinematic calculation: Obtain the feed per unit time of each axis of the machine tool, calculate the cumulative feed of each axis feed position at different times, and respectively convert the cumulative feed of each axis at the current time into a pose vector, solve the inverse kinematic equations of each axis of the robotic arm to obtain the motion attitude vector of each axis; Calculate the actual cutting point pose based on the attitude vector and the theoretical cutting point extracted in the previous step. Based on the above technical solution, a further improvement is that step S303 further includes: Cutting force and error calculation: Calculate the cutting force vector during the cutting process based on the data; Homogeneously expand the position, velocity, and acceleration vectors sampled last time, and obtain the current physical quantity deviation through linear difference operations as the initial value of the forward and inverse solution algorithms for constructing a three-dimensional error state equation containing position, velocity, and acceleration deviations.
[0012] Based on the above technical solution, a further improvement is that step S4 specifically includes: Step S401. Coarse compensation layer path correction: Construct the machine tool kinematic model and coordinate transformation matrix; Set the MPC prediction time domain and the weighted optimization objective function; Solve the optimization in real time, output the compensation amount to generate the coarse adjustment path; Step S402. Fine compensation layer strategy training: Define the state space with position deviation and fine adjustment actions; Build the Actor-Critic network and set the exploration strategy; Design the reward function that fuses errors and actions; Train through the data in the experience pool, sample according to the rules and update the network parameters; Step S403. Dual-layer collaborative control: Dynamically update the threshold, switch between the MPC coarse compensation or DRL fine compensation mode according to the deviation size; Fuse the MPC and DRL compensation amounts, and adjust the weight according to the confidence of the DRL strategy.
[0013] On the basis of the above technical solution, a further improvement is that the step S5 includes: Construct the control framework using the Xenomai real-time operating system, and realize the μs-level instruction issuance through the EtherCAT bus; Decompose the compensation amount into the motion correction amounts of each axis of the machine tool, considering the response delay characteristics of the servo system; Introduce acceleration-jerk constraints in the feedforward control to avoid mechanical vibrations caused by sudden changes in compensation instructions; The specific process is as follows: Step S501. Build the real-time control system architecture: Select the industrial control host and EtherCAT master station module, divide the real-time domain and non-real-time domain through Xenomai, and use the RTDM interface to connect to the servo drivers of the six axes; Step S502. Decompose and issue the compensation instruction: First, convert the workpiece coordinate system compensation amount into the increment of each axis; Then establish the servo delay model and add the lead compensation before the instruction is issued; Then add a high-precision timestamp to the compensation instruction, and the EtherCAT slave station executes the motion according to the timestamp.
[0014] Step S503. Acceleration constraint in feedforward control: First, design the Jerk limiter to limit the jerk and smooth the compensation amount; Then construct the acceleration and jerk constraint conditions, and use the S-shaped curve to plan the change rate of the compensation amount.
[0015] On the basis of the above technical solution, a further improvement is that it further includes step S6, constructing a virtual-real combined test environment to verify the compensation effect, and the process is as follows: Step S601. First, perform digital twin testing through the cutting simulation software to verify the algorithm convergence and conduct virtual machining testing; Step S602. Select standard specimens for actual machining testing, and use a laser interferometer and a ballbar to compare the accuracy before and after compensation; Step S603. Conduct quantitative analysis of performance indicators, including calculating the reduction rate of contour error, evaluating the surface roughness, and testing the system delay.
[0016] Due to the above technical solutions, the following beneficial effects are achieved: 1. The present invention monitors error sources such as tool wear and machine tool thermal deformation in real time through multi-modal sensors, and dynamically compensates for machining errors based on intelligent algorithms, significantly improving machining accuracy (profile error ≤ ±7 μm) and surface quality (roughness Ra ≤ 0.65 μm), meeting the sub-micron machining requirements in fields such as aerospace and precision instruments.
[0017] 2. The present invention integrates a laser displacement sensor (accuracy ±1 μm), a six-axis force sensor (range 5 kN, resolution 0.1% FS), and an infrared thermal imager (temperature accuracy 0.03 °C) to construct a multi-modal online monitoring system, synchronously collecting tool pose coordinates (XYZ axes), cutting force vectors, and thermal deformation amounts of key components of the machine tool (such as the temperature rise rate of the spindle box ≤ 2 °C / h), providing multi-dimensional data support for error modeling with spatio-temporal alignment.
[0018] 3. The present invention constructs a hybrid solution architecture of dynamic time warping (DTW) and extended Kalman filter (EKF), defines a 9-dimensional state vector including three-dimensional position deviation, velocity deviation, and acceleration deviation, combines 10 kHz high-frequency sampling (meeting the 5-fold Nyquist theorem) with a 1 ms control cycle, and realizes real-time solution and compensation control of millimeter-level position deviation (≤ ±0.01 mm) and sub-millimeter-level velocity deviation (≤ ±0.5 mm / s).
[0019] 4. The present invention innovatively designs a double-layer compensation architecture: the coarse compensation layer is based on model predictive control (MPC), and generates path correction amounts in real time through a rolling optimization time domain (50 - 100 ms) and a weighted objective function (position deviation weight 10, control quantity weight 0.1); the fine compensation layer introduces the Actor-Critic network of deep reinforcement learning (DRL), trains the compensation strategy using 100,000 groups of historical machining data, and realizes adaptive switching between coarse and fine compensation modes through a dynamic threshold, ensuring that the compensation accuracy fluctuation ≤ 5% under complex working conditions.
[0020] 5. The present invention constructs a control architecture based on the Xenomai real-time operating system (hard real-time delay ≤ 5 μs) and the EtherCAT bus (communication cycle 100 μs), decomposes the compensation amount into axis increments through inverse kinematics, and performs lead compensation in combination with a servo delay model (lag 0.5 ms); a Jerk limiter (≤ 10000 mm / s³) is embedded in the feedforward control, and the S-curve is used to plan the change rate of the compensation amount, suppressing the mechanical vibration amplitude below 0.1 g and ensuring the trajectory smoothness during high-speed machining (acceleration fluctuation ≤ 8%).
[0021] 6. The present invention constructs a virtual-real fusion test platform: verify the algorithm convergence (root mean square error ≤ 0.015 mm) through AdvantEdge digital twin simulation (injecting ±3μm position noise and ±10% cutting force fluctuation), conduct physical machining tests in combination with ISO10791-6 standard specimens (aluminum alloy thin-walled parts), and use Renishaw XL-80 laser interferometer (resolution 0.001μm) and API ball bar (roundness measurement accuracy ±0.5μm) for quantitative detection, achieving a reduction rate of contour error and improvement of surface roughness (Ra reduced from 1.2μm to 0.66μm), and ensuring that the compensation effect meets the precision level standard of GB / T17421.1. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The present invention will be further described below with reference to the accompanying drawings: Figure 1 It is a flowchart of the machining error compensation method for the tool cutting path based on online monitoring according to an embodiment of the present invention.
[0023] Figure 2 It is an architecture diagram of the multi-axis collaborative control system according to an embodiment of the present invention.
[0024] Figure 3 It is a synthetic vector diagram of the helical motion according to an embodiment of the present invention.
[0025] Figure 4 It is a flowchart of the error compensation control according to an embodiment of the present invention.
[0026] Figure 5 It is a schematic diagram of the five-degree-of-freedom kinematic model according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] To make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below through the accompanying drawings and embodiments. However, it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the scope of the present invention. In addition, in the following description, the descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present invention.
[0028] Refer to Figures 1 - 5 , the present invention provides a machining error compensation method for the tool cutting path based on online monitoring, including the following steps: S1. Establish a cutting path data model: The specific process is as follows: Step S101. Use 3D modeling software to digitally map the geometric features of the blank and the finished workpiece, and establish 3D digital models of the blank and the finished workpiece. Use 3D modeling software such as UG and Pro / E to construct the 3D model of the workpiece, generate standard format files such as STEP and IGES, and synchronously create the theoretical motion trajectory of the cutting points of the tool. The established model also needs to include content such as machining parameter information, machine tool parameter information, tool parameter information, and process parameter information. The machining parameter information includes that the range of the cutting depth ap is 0.05 mm - 5 mm, the range of the feed rate f is 0.05 mm / r - 0.5 mm / r, and the range of the cutting speed vc is 10 m / min - 300 m / min; the machine tool parameter information includes the machine tool model such as XK7132, the running accuracy such as ±0.005 mm, etc.; the tool parameter information includes the tool material such as diamond coating, the range of the tool diameter is Φ3 mm - Φ20 mm, the range of the tool helix angle is 20° - 40°, etc.; the process parameter information includes the type of cutting fluid such as semi-synthetic cutting fluid, the range of the cutting fluid concentration is 3% - 8%, etc.
[0029] Step S102. Generate the theoretical cutting path based on CAM software (such as Mastercam / PowerMill), and calculate the three-directional cutting forces on the tool-workpiece contact surface through a cutting force model (such as Oxley cutting theory) ), and extract dynamic parameters such as the tool deflection amount (≤5 μm) and the contact stiffness (20 N / μm - 50 N / μm).
[0030] For example: The above CAM cutting path planning sets the machining strategy in the CAM software: specifically as shown in Table 1.
[0031] Table 1 parameter set value cutting step size 0.05 mm residual height ≤1 μm feed rate optimization based on material removal rate (MRR) The above CAM cutting path planning outputs a cutter location file (CLData): including the coordinates of the tool center point and the attitude angle.
[0032] Step S103. Establish the transformation matrix of the path coordinate system, convert the machine tool coordinate system to the workpiece coordinate system, and provide reference data for error compensation.
[0033] S2. Construct a multi-modal sensor component to collect error data in real time: The multi-modal sensor component includes a displacement sensor, a six-axis force sensor, and an infrared thermal imager. Construct a multi-modal sensor network including a laser displacement sensor, a six-axis force sensor, and an infrared thermal imager, and realize μs-level time synchronization based on the IEEE1588 Precision Clock Protocol to collect the tool tip coordinates, cutting force vector, and thermal deformation data of key machine tool components in real time. The specific steps of S2 include: Step S201. Use a displacement sensor to obtain the spatial coordinates of the tool tip in real time and establish the spatial position relationship between the tool tip and the workpiece.
[0034] Specifically, the displacement sensor is a laser displacement sensor with an accuracy of ≤1μm, such as Keyence LK-G5000, and a repeatability accuracy of 0.03μm. The sampling frequency of the laser displacement sensor is ≥10kHz (meeting the requirement of a 5kHz control cycle).
[0035] Specifically, three groups of Keyence LK-G5000 laser displacement sensors (accuracy ±1μm, repeatability accuracy 0.03μm, sampling frequency 10kHz) are orthogonally arranged along the X / Y / Z axis directions on the side of the machine tool spindle to construct a three-axis stereo measurement network to achieve real-time calculation of the spatial coordinates (XYZ) of the tool tip (calculation accuracy ≤2μm).
[0036] The calibration coordinate transformation matrix is as follows: , where is a 3×3 rotation matrix used to describe the rotation relationship of the tool coordinate system relative to the sensor coordinate system. It contains information about three rotation angles (e.g., rotations around the X, Y, and Z axes). Through matrix operations, vectors in the sensor coordinate system can be rotated in the direction of the tool coordinate system. The element values of the rotation matrix are determined according to the actual coordinate rotation situation, and these element values can be calculated through methods such as the three-point calibration method.
[0037] is a 3×1 translation vector used to describe the translation relationship of the tool coordinate system relative to the sensor coordinate system. It represents the displacement amounts of the origin of the tool coordinate system relative to the origin of the sensor coordinate system in the X, Y, and Z directions under the sensor coordinate system. Through this translation vector, the rotated vector can be further translated to the correct position in the tool coordinate system.
[0038] Step S202. Combine the tool-workpiece spatial position relationship obtained by the laser displacement sensor and, through the Kistler 9257B six-axis force sensor (range ±5kN, natural frequency 3kHz, temperature compensation error ≤0.1%FS) embedded at the spindle-tool holder connection, monitor the changes in three-axis cutting forces and three-axis torque vectors in real time and synchronously calculate the power consumption of the spindle motor (resolution 0.1W).
[0039] Specifically, the selection criteria for the six-axis force sensor are as follows: Range ±5kN (such as Kistler 9257B, natural frequency ≥3kHz) Integrated temperature compensation module (compensation error ≤0.1%FS) Specifically, the installation positions of the six-axis force sensors are as follows: Embedded at the spindle-toolholder connection to directly measure the cutting force vector.
[0040] Specifically, the tip force mapping model is established as follows: .
[0041] Where represents the force on the tool tip, which is a vector containing the force components in different directions (such as the X, Y, and Z directions).
[0042] is the force transfer Jacobian matrix (a 3×6 matrix, calibrated by tool modal tests with a transfer error ≤ 3%), which is a matrix used to describe the conversion relationship between the forces measured by the six-axis force sensor and the tip force.
[0043] represents the force measured by the six-axis force sensor, which is a vector and the actual force value measured by the sensor. The six-axis force sensor is used to monitor the force changes during the machining process in real time.
[0044] Synchronously collect the spindle current signal, calculate the real-time power consumption of the tool (accuracy 0.5% FS), and provide multi-dimensional data for tool wear prediction and cutting state evaluation.
[0045] Step S203. Integrate an infrared thermal imager to capture the thermal deformation of the machine tool.
[0046] Specifically, the standard of the infrared thermal imager is that the thermal sensitivity ≤ 0.03 °C (such as FLIR A8580, resolution 1024×768), and the frame rate ≥ 100 Hz (matching the thermal deformation time constant). The monitoring points of the infrared thermal imager are arranged at key heat sources such as the machine tool spindle box, guide rail, and lead screw nut.
[0047] All sensors achieve μs-level time synchronization through the IEEE1588 Precision Clock Protocol to ensure a strict correspondence between the spatial position data and the time series.
[0048] Specifically, the master clock is deployed in the Xenomai real-time controller, and the slave clocks are distributed at each sensor node.
[0049] Synchronization accuracy calibration: .
[0050] Specifically, the two-way delay measurement method is used to calculate the synchronization time. represents the synchronization time calculated by measuring the upward transmission delay ( ) and the downward transmission delay ( ) of the signal and combining with the master clock time ( ) ). Its purpose is to calibrate the time synchronization accuracy between different devices or sensors, ensuring that the time bases of each device are consistent during data acquisition and processing, thereby improving the accuracy and reliability of the system.
[0051] The two-way delay measurement method eliminates some errors caused by factors such as transmission line asymmetry and device processing speed differences by measuring the signal's upward and downward transmission delays separately and taking the average. This can calculate the synchronization time more accurately and improve the system's time synchronization accuracy.
[0052] Multi-source data fusion: The C language structure code for defining the data packet structure under a unified spatio-temporal coordinate system is as follows: struct SensorData { uint64_t timestamp; / / Accurate to 0.1 μs float tool_pos[3]; / / Tool tip coordinates (x, y, z) float force[6]; / / Fx, Fy, Fz, Mx, My, Mz float temp[8]; / / Temperature values at 8 temperature measurement points }; S3. Establish an error state equation for error calculation; adopt a hybrid architecture of dynamic time warping and Kalman filtering, and establish a three-dimensional error state equation including position deviation, velocity deviation, and acceleration deviation by performing multi-scale similarity calculations on the real-time sensor data stream and the preset path.
[0053] Specifically, the step S3 includes: Step S301. Data preprocessing and synchronization: Receive the machining code from an external switch, parse the device status data (including spindle speed, feed rate, alarm signal, etc.) sent and / or received by the numerical control system to provide basic data for subsequent processing. Receive the comparison data between the theoretical cutting point and the machining point generated by the CAM software, and process the theoretical cutting point to conform to the kinematic properties of the machine tool. Calibrate the time through the Precision Clock Protocol to compensate for transmission delay and clock deviation; use the wavelet threshold method to denoise the original signal and remove noise interference.
[0054] The time synchronization mechanism is as follows: Adopt the IEEE1588 clock protocol, and the IEEE1588 clock deviation compensation is as follows: .
[0055] Parameter meaning: : The finally synchronized time.
[0056] : The original time of the sensor.
[0057] : The optical fiber transmission length, which reflects the transmission distance of the signal in the physical line.
[0058] c: The speed of light, which is used to calculate the signal transmission delay .
[0059] : The clock phase difference, which reflects the phase difference of the clocks of different devices.
[0060] : The clock frequency, which is used to convert the phase difference into a time deviation .
[0061] The process of denoising the original signal using the wavelet threshold method is as follows: Perform wavelet threshold denoising on the original signal (select the sym4 wavelet basis and the decomposition level ).
[0062] : The pure signal after denoising.
[0063] : The k-th wavelet coefficient, which represents the characteristics of the signal at different scales.
[0064] : The k-th wavelet basis function, which is used for signal decomposition and reconstruction.
[0065] : The indicator function, which takes 1 (retains the coefficient and regards it as a valid signal) when the absolute value of the wavelet coefficient is greater than the threshold and takes 0 (discards or weakens and regards it as noise) otherwise.
[0066] Threshold calculation: , : The threshold for judging noise, which is calculated through the noise standard deviation reflecting the noise intensity and the number of data points N, and is adaptively adjusted to fit different signal lengths.
[0067] The wavelet denoising parameters are shown in Table 2 below: Table 2 parameter set value theoretical basis wavelet basis Daubechies 5 adapt to the characteristics of cutting impact signal decomposition level 5 match the 5 kHz sampling frequency (5 → 156 Hz fundamental frequency) threshold rule Rigorous SURE minimize Stein's unbiased risk estimate signal - to - noise ratio after denoising ≥35 dB meet the Kalman filter convergence condition Step S302. Multi-scale path matching: Receive the theoretical cutting points generated by the CAM software, process them according to the kinematic attributes of the machine tool to make them fit the machine tool motion model; perform wavelet multi-resolution decomposition on the theoretical and measured paths; calculate the path deviation layer by layer; and weighted fuse the deviations of each layer to obtain the total deviation.
[0068] The process of multi-scale decomposition is as follows: perform wavelet multi-resolution analysis (MRA) on the theoretical path Pref and the measured path Preal: .
[0069] Among them, A5 is the 5-layer approximation coefficient, which represents the coarse-grained features of the path (such as the overall shape trend).
[0070] D i is the detail coefficient. The detail coefficients (i = 1, 2, …, 5) reflect the detail features at different scales (such as local fluctuations of the path). Through decomposition, the path information is separated layer by layer from macro to micro, providing multi-scale data for subsequent matching.
[0071] The process of hierarchical DTW calculation is as follows: match the paths layer by layer from the coarse-grained level (A5 layer) to the fine-grained level (D1 layer): .
[0072] : The path deviation at the m-th decomposition layer.
[0073] π is the optimal bending path, and m is the decomposition level (5 → 1). By minimizing the feature distance between the theoretical path and the measured path at this layer, the optimal matching relationship is determined to achieve precise alignment of the paths at different scales.
[0074] Path deviation synthesis, weighted fusion of the deviations of each layer. The hierarchical weight strategy is as follows: .
[0075] The meaning is as follows: By calculating the path deviation layer by layer and weighted summation, the total path deviation is obtained . Among them, m is the decomposition level (a total of 5 layers), is the path deviation at the m-th layer, is the weight coefficient corresponding to the level. The weight decays exponentially as the level m decreases, reflecting the contribution differences of different levels to the total deviation.
[0076] The decomposition levels are shown in Table 3 below.
[0077] Table 3 decomposition hierarchy frequency band range weight coefficient m=5 0 - 156 Hz <![CDATA[0.5 0 =1]]> m=4 156 - 313 Hz <![CDATA[0.5 1 =0.5]]> ... ... ... Step S303. Construct a three-dimensional error state equation: Define a 9-dimensional state vector containing position, velocity, and acceleration deviations; design a state transition matrix based on the machine tool kinematic model; set the process noise covariance matrix according to the machine tool vibration spectrum.
[0078] Definition of state variables of the three-dimensional error state equation: .
[0079] is a 9-dimensional vector, including the position deviation in three-dimensional space ( ), velocity deviation ( ), and acceleration deviation ( ). Through these three types of deviations, the error state of the machining system is comprehensively described, providing a basis for subsequent dynamic analysis.
[0080] The state transition matrix is as follows: .
[0081] Matrix A describes the transfer relationship of state variables over time and is constructed based on kinematic principles. Among them, is a 3-order identity matrix, is the time interval, and the time interval is 0.2 - 2 ms. The matrix elements reflect the recurrence relationship of position, velocity, and acceleration deviations (such as the integral relationship between position deviation and velocity and acceleration deviations).
[0082] Matrix B represents the influence path of external inputs (such as cutting force) on state variables and maps the external inputs into the state space.
[0083] Specifically, matrix B is a cutting force coupling matrix. Through the tool tip force mapping model (the Jacobian matrix is calibrated by modal tests with an error ≤ 2%), the cutting force vector measured by the six-axis force sensor is converted into the input excitation of the state equation to quantify the dynamic influence of cutting force fluctuations on position / velocity deviations.
[0084] The cutting force coupling term is as follows: The data of the six-axis force sensor is converted into the tool tip force: , reflecting the force transmission relationship in actual machining.
[0085] Among them represents the force received by the tool tip, which is a vector and includes the force components in different directions (such as the X, Y, and Z directions).
[0086] is the force transmission Jacobian matrix, which is a matrix used to describe the conversion relationship between the force measured by the six-axis force sensor and the tool tip force.
[0087] represents the force measured by the six-axis force sensor, which is a vector and is the actual measured force value of the sensor. The six-axis force sensor is used to monitor the force changes in the machining process in real time.
[0088] Expansion of the state equation: .
[0089] Introduce the influence of the tool tip force into the state equation, is the cutting force correlation coefficient matrix, and w is the system noise. This equation describes the error state variables 's dynamic changes, which include both its own state transition , and the influence of the cutting force input , as well as the random noise interference (w), forming a complete three-dimensional error dynamic model.
[0090] Specifically, the step S303 further includes: Kinematics calculation: Obtain the feed per unit time of each axis of the machine tool, calculate the cumulative feed of each axis feed position at different times, and convert the cumulative feed of each axis at the current time into a pose vector respectively. Solve the inverse kinematics equations of each axis of the robotic arm to obtain the motion attitude vector of each axis; Calculate the actual cutting point pose based on the attitude vector and the theoretical cutting point extracted in the previous step. Cutting force and error calculation: Calculate the cutting force vector during the cutting process based on the data; Homogeneously expand the position, velocity, and acceleration vectors sampled last time, and obtain the current physical quantity deviation through linear difference operation, which is used as the initial value of the forward and inverse solution algorithms to construct a three-dimensional error state equation including position, velocity, and acceleration deviations.
[0091] Step S304. Kalman filter real-time solution: In the prediction stage, predict the state and covariance combined with the control input; In the observation stage, integrate multi-source data to update the state and correct it according to the observation noise covariance.
[0092] Specifically, the noise covariance matrix is as follows: , , .
[0093] Among them, Q is a diagonal matrix, representing the statistical characteristics of the system noise.
[0094] : The standard deviation of the position noise, reflecting the noise level of the position deviation.
[0095] : The standard deviation of the velocity noise, reflecting the noise intensity of the velocity deviation.
[0096] : The standard deviation of the acceleration noise, describing the noise magnitude of the acceleration deviation.
[0097] By defining the noise variances of each error quantity, the Kalman filter can more accurately process the system noise and improve the state estimation accuracy.
[0098] State prediction: .
[0099] Based on the state estimate value at the previous moment, through the state transition matrix A and the control input matrix B and the control input (compensation instruction from the MPC layer).
[0100] The formula for multi-source data fusion (H matrix) is as follows: .
[0101] is the force-velocity coupling matrix, calibrated through the hammer test, and is used to fuse the correlation between the force sensor data and the velocity error.
[0102] is the thermal deformation coefficient, determined by the coefficient of thermal expansion (CTE) of the material and the structural dimensions. Combining the temperature change amount, the thermal deformation data is incorporated into the filtering model.
[0103] Step S305. Dynamic threshold control: Calculate the position deviation norm, compare it with the dynamic threshold, and trigger the deep reinforcement learning fine compensation when it exceeds the limit.
[0104] Specifically, for error overrun judgment, calculate the position deviation norm in real time: Calculate the norm of the three-dimensional position deviation to measure the comprehensive deviation between the actual path and the ideal path.
[0105] Compare with the dynamic threshold: =0.5 · machine tool positioning accuracy · e -0.03t +0.1 · machine tool positioning accuracy.
[0106] When > the DRL fine compensation is triggered. The threshold decays exponentially with time t. In the initial stage (small t), larger deviations are allowed, and in the later stage, it approaches the stable minimum value (0.1 · machine tool positioning accuracy), taking into account the error tolerance requirements in the initial stage and the stable stage of machining.
[0107] Through hierarchical DTW matching, multi-dimensional state equation construction, and Kalman filtering of sensor fusion, accurate error calculation and real-time compensation are achieved.
[0108] S4. Construct a coarse compensation layer (MPC) for model predictive control, generate a path correction amount through rolling optimization; introduce deep reinforcement learning (DRL) in the fine compensation layer, and train an intelligent compensation strategy based on historical data.
[0109] The specific steps of S4 include: Step S401. Coarse compensation layer path correction: Construct the machine tool kinematic model and the coordinate transformation matrix; Set the MPC prediction time domain and the weighted optimization objective function; Solve the optimization in real time, and output the compensation amount to generate the coarse adjustment path.
[0110] Specifically, establish the kinematic chain model of each axis of the machine tool, and define the transformation matrix from the joint coordinate system to the workpiece coordinate system as follows: 。
[0111] Where is the actual position of the i-th axis, is the homogeneous transformation matrix of adjacent coordinate systems. The role of this transformation matrix is to convert the information in the joint coordinate system to the workpiece coordinate system for subsequent unified analysis and processing. It is the basis for subsequent path correction.
[0112] As a further description of this embodiment, the MPC prediction time domain and the optimization objective.
[0113] Prediction time domain: Set it to 3 - 6 control cycles. The prediction time domain refers to the time range for the model to predict future situations. Making predictions and optimizations within this range can make the control more timely and accurate.
[0114] Optimization objective function: Construct the optimization objective function 。
[0115] Where, is the predicted position deviation, is the control variable increment, and are the weight matrices. The purpose of this objective function is to make the predicted position deviation as small as possible by adjusting the control variable increment, while also considering the change range of the control variable increment to achieve a balanced optimization effect.
[0116] Real-time interpolation correction: Solve within each control cycle: , And satisfy the constraint condition 。By solving this optimization problem, the optimal control variable increment can be obtained, and then it is output to the servo axis to generate the path after coarse adjustment 。This process is carried out in real time and can adjust the path in a timely manner according to the current state to achieve coarse compensation.
[0117] Step S402. Fine compensation layer strategy training: Define the state space with position deviation and fine-tuning actions; Build an Actor-Critic network, set the exploration strategy; Design a reward function with an exponential decay factor, integrate the square term of position deviation, the penalty term for action smoothness, and the penalty term for over-threshold alarm, and strengthen the collaborative optimization of error convergence and mechanical protection. Train through the data in the experience pool, sample according to the rules, and update the network parameters.
[0118] Specifically, the state-action space definition: State s t : , which includes information such as 3D position deviation, speed deviation, cutting force, temperature, and wear amount. These state information can comprehensively reflect various situations in the machining process and provide rich input data for the deep reinforcement learning algorithm.
[0119] Action a t : , that is, the fine compensation fine-tuning amount. By adjusting these fine-tuning amounts, the path can be corrected more precisely.
[0120] Actor-Critic network: Actor network: It is a 4-layer fully connected network (9-dimensional state in the input layer, 256 neurons in the hidden layer, and 3-dimensional action in the output layer), using the ReLU activation function, and outputting a deterministic policy for the fine compensation fine-tuning amount.
[0121] Critic network: It is also a 4-layer fully connected network (with similar parameter meanings for 256V(s)). The Critic network is used to evaluate the value of the action output by the Actor network, that is, to judge how much benefit this action can bring.
[0122] Exploration strategy: , .
[0123] This exploration strategy combines the deterministic policy and noise , and as time t increases, the noise gradually decreases, enabling the algorithm to balance exploring new actions and exploiting existing experience.
[0124] Reward function design: .
[0125] Among them, α 1 = 0.8, α 2 = 0.2, β = 5, = 10, The indication function for detecting vibration overrun events by the acceleration sensor. The design of this reward function comprehensively considers errors , the amount of action , specific events (such as VB < 0.2mm and vibration overrun), etc. By giving different rewards or punishments, the deep reinforcement learning algorithm is guided to learn the optimal compensation strategy.
[0126] Historical data training mechanism: Experience replay pool: Store 100,000 groups of data , and the role of the experience replay pool is to store past experiences so that the subsequent algorithm can learn from these experiences to improve learning efficiency and stability.
[0127] Prioritized sampling: Allocate sampling probabilities according to the TD error , so that data with larger TD errors can be preferentially selected for learning, because these data often contain more useful information and can improve the performance of the algorithm faster.
[0128] Training frequency: Update the network parameters every 100 control cycles (20 - 200ms). By regularly updating the network parameters, the algorithm can continuously adapt to new situations and improve the accuracy of the compensation strategy.
[0129] Step S403. Dual - layer collaborative control: Dynamically update the threshold, switch between the MPC coarse compensation or DRL fine compensation mode according to the deviation size; fuse the compensation amounts of MPC and DRL, and the weight is adjusted according to the confidence of the DRL strategy.
[0130] Specifically, the dynamic threshold decay strategy is as follows: Threshold update rule: Among them, = 0.5 × machine tool positioning accuracy, = 0.02ms -1 , = 0.1 × machine tool accuracy.
[0131] This rule makes the threshold gradually decay over time and can adapt to the machining requirements at different stages.
[0132] Mode switching logic: When , only the MPC coarse compensation is enabled. When , the DRL fine compensation is activated.
[0133] Compensation amount synthesis: The final compensation instruction is .
[0134] Among them It is a dynamic weight coefficient, which is adjusted according to the confidence of the DRL strategy. The results of the coarse compensation and the fine compensation are synthesized. Through the dynamic weight coefficient, the proportion of the two can be reasonably allocated according to the confidence of the DRL strategy, so as to obtain the optimal compensation instruction.
[0135] Through the fast coarse adjustment of MPC and the intelligent fine adjustment of DRL, combined with the dynamic threshold attenuation mechanism, high-precision compensation is achieved while ensuring real-time performance.
[0136] S5. Use a real-time control system to execute the compensation instruction; execute the compensation instruction based on the Xenomai real-time system and the EtherCAT bus, decompose the compensation amount to each axis of the machine tool, consider the servo delay, and add acceleration-jerk constraints in the feedforward control.
[0137] Specifically, the step S5 includes: constructing a control framework using the Xenomai real-time operating system, realizing μs-level instruction issuance through the EtherCAT bus; decomposing the compensation amount into the motion correction amounts of each axis of the machine tool, considering the response delay characteristics of the servo system; introducing acceleration-jerk constraints in the feedforward control to avoid mechanical vibrations caused by sudden changes in the compensation instruction; the specific process is as follows: Step S501. Construction of the real-time control system architecture: Select an industrial control host and an EtherCAT master station module, divide the real-time domain and the non-real-time domain through Xenomai, and use the RTDM interface to connect to the servo drivers of the six axes.
[0138] Selection of the hardware platform: Use an industrial control host with a Xenomai + Cobalt kernel (such as Beckhoff CX2042). The EtherCAT master station module supports distributed clock (DC) synchronization and configures parameters.
[0139] Design of the software framework: The Xenomai dual-core mechanism divides the real-time domain and the non-real-time domain: Real-time domain: Run compensation instruction calculation and EtherCAT message processing (priority = 99).
[0140] Non-real-time domain: Data storage and status monitoring (priority = 50).
[0141] Realize communication with the servo driver through the RTDM (Real-Time Driver Module) interface.
[0142] Step S502. Decomposition and issuance of the compensation instruction: First, convert the workpiece coordinate system compensation amount into the increment of each axis; then establish a servo delay model and add lead compensation before instruction issuance; then add a high-precision timestamp to the compensation instruction, and the EtherCAT slave station executes the motion according to the timestamp.
[0143] Specifically, compensation amount coordinate transformation: Based on the inverse kinematic model of the machine tool, the compensation amount in the workpiece coordinate system is transformed into the increment of each axis: where J(q) is the Jacobian matrix and q is the current axis position, reflecting the mapping relationship between the axis position q and the spatial motion, ensuring that the compensation amount accurately matches the motion of each axis.
[0144] Servo delay compensation: Delay model: Establish a servo axis response delay model: , describing the response lag characteristic of the servo system.
[0145] Lead compensation: Add lead compensation before the instruction is issued: .
[0146] Timestamp queue management: Attach an accurate timestamp (accuracy ≤ 100 ns) to each compensation instruction. Manage the timestamp and axis increment data through the structure struct Command. The EtherCAT slave executes the interpolation motion according to the timestamp, ensuring strict timing synchronization of multi-axis motion and avoiding motion disorders.
[0147] Step S503. Feedforward control acceleration constraint: First, design a Jerk limiter to limit the jerk and smooth the compensation amount; then construct the acceleration and jerk constraint conditions, and use the S-curve to plan the change rate of the compensation amount.
[0148] Specifically, the Jerk limiter is designed as follows: Adopt a third-order trajectory planning filter to limit the maximum jerk value, smooth the compensation amount increment, reduce motion impact, and protect the machine tool structure.
[0149] Acceleration-jerk joint constraint Construct the phase plane of acceleration and jerk, use the S-curve to plan the change rate of the compensation amount, set the acceleration section time T1 = 0.2 ms and the constant speed section time T2 = 0.5 ms, realize smooth transition of motion, and reduce vibration.
[0150] S6. Build a virtual-real combined test environment to verify the compensation effect. The process is as follows: Step S601. First, perform digital twin testing through cutting simulation software to verify the algorithm convergence and conduct virtual machining testing.
[0151] Specifically, import the rigid body model of the machine tool, the geometric parameters of the cutting tool (rake angle / cutting edge angle / edge radius), and the workpiece material properties (such as the J-C constitutive model parameters of Ti-6Al-4V) into AdvantEdge.
[0152] Set the cutting conditions: spindle speed: 3000 rpm.
[0153] Feed rate: 0.1 mm / rev.
[0154] Cutting depth: 0.3 mm.
[0155] Verification of algorithm convergence: Inject a dynamic perturbation signal to simulate sensor noise: Position noise: ±3μm Gaussian white noise (frequency band 0 - 2 kHz) Cutting force noise: ±10% F_c fluctuation (frequency band 100 - 500 Hz) Virtual machining test: Execute the simulation of the ISO10791 standard helical milling path and record the following data: (1) The deviation curve between the theoretical path and the actual path.
[0156] (2) The convergence process of the reward value of the DRL network.
[0157] Reaching standard conditions: (1) The reduction rate of contour error ≥80% (in the simulation environment).
[0158] (2) The number of algorithm iterations ≤200 times for convergence.
[0159] Step S602. Select a standard specimen for actual machining test, and use a laser interferometer and a ballbar to compare the accuracy before and after compensation.
[0160] (1) Specimen preparation and clamping: Select an ISO10791-A5 standard aluminum alloy specimen (size: 100×100×30 mm).
[0161] Use a three-point hydraulic fixture to ensure that the clamping stiffness ≥5000 N / mm.
[0162] (2) Measurement equipment configuration: Laser interferometer (Renishaw XL-80): Install a linear reflector group to measure the positioning accuracy of each axis (resolution 0.001μm); set the sampling frequency to 10 kHz, covering the full stroke (500 mm for each of the X / Y / Z axes).
[0163] Ballbar (QC20-W): Perform roundness test (diameter 50 mm), analyze the radial deviation spectrum; the dynamic data recording interval ≤0.1°.
[0164] (3) Comparison of compensation effects: Execute respectively under the same cutting parameters: Uncompensated machining: Record the original error data.
[0165] Machining after compensation: Activate the MPC + DRL compensation system.
[0166] The data comparison items are shown in Table 4: Table 4 index test method target value profile error reduction rate compare the maximum deviation of the laser interferometer ≥70% surface roughness Ra white light interferometer (50X objective lens) ≤0.8 μm system response delay EtherCAT bus timestamp difference ≤1 ms Step S603. Perform quantitative analysis of performance indicators, including calculation of contour error reduction rate, surface roughness evaluation, and system latency test.
[0167] Specifically, the calculation of the contour error reduction rate is as follows: .
[0168] is the uncompensated path deviation.
[0169] is the path deviation after compensation.
[0170] Surface roughness evaluation Take 5 measurement lines (spacing 2 mm) along the feed direction and calculate the average value of Ra: , is the reference line.
[0171] System latency test Capture the instruction timing through the EtherCAT master diagnostic tool: .
[0172] Repeat the test 100 times and take the 99th percentile as the final result.
[0173] Through steps such as constructing an accurate cutting path data model, multi-sensor data acquisition, error calculation and adaptive reaction force calculation, and implementing error compensation speed regulation active control, the present invention effectively solves the problem that the prior art ignores the characteristics of multi-variables, strong non-linearity, hysteresis, etc. of high-precision CNC machine tools, improves the adaptability and robustness of the error compensation model, and can meet the requirements of complex working conditions; The error compensation method proposed by the present invention has generality and adaptability, is different from the error compensation architectures, error modeling, and error correction methods in the prior art that are targeted at specific problem characteristics and solution directions, and can be widely applied to different system equipment; Through the integration of online monitoring and advanced non-linear control algorithms, the present invention fully considers the coupling effects of factors such as the thermal deformation characteristics of the machine tool and workpiece, tool wear characteristics, and machine tool environmental disturbances, effectively overcomes the deficiencies of traditional offline programming methods, and improves the error compensation effect; In the error compensation process of the present invention, the calculation methods of factors such as cutting parameters, material properties, and tool angles of the tool are optimized, improving the accuracy of error compensation; In the error compensation model of the present invention, actual error factors such as machine tool machining accuracy and positioning pin wear are fully considered, expanding the accuracy and scope of error compensation.
[0174] The above are only specific embodiments of the present invention, but the technical features of the present invention are not limited thereto. Any simple changes, equivalent replacements, or modifications made based on the present invention to solve substantially the same technical problems and achieve substantially the same technical effects are all covered by the protection scope of the present invention.
Claims
1. A tool cutting path processing error compensation method based on online monitoring, characterized in that The following steps are involved: S1. Establish cutting path data model; S2. Construct a multimodal sensor assembly to collect error data in real time; the multimodal sensor assembly includes a displacement sensor, a six-axis force sensor and an infrared thermal imager, and the tool position, cutting force and thermal deformation data are collected through the multimodal sensor assembly, and the time is synchronized through a precision clock protocol; S3. Establish error state equation to solve the error; A hybrid architecture of dynamic time warping and Kalman filtering is adopted to establish a three-dimensional error state equation including position deviation, velocity deviation and acceleration deviation by performing multi-scale similarity calculation between real-time sensor data stream and preset path. S4. Construct a two-layer compensation mechanism; use a coarse compensation layer to predict the model and control the correction path; use a fine compensation layer, introduce a deep reinforcement learning algorithm, and train the compensation strategy network through historical processing data; S5. Use real-time control system to execute compensation instructions; execute compensation instructions based on Xenomai real-time system and EtherCAT bus, decompose the compensation amount to each axis of the machine tool, consider servo delay, and add acceleration-jerk constraint in feedforward control.
2. The tool cutting path processing error compensation method based on online monitoring according to claim 1 is characterized in that: The establishment of the cutting path data model comprises: Step S101. Using 3D modeling software, digitally map the geometric features of the blank and the finished workpiece; Step S102. Generate a theoretical cutting path through CAM software, calculate the cutting force on the tool-workpiece contact surface, and extract dynamic parameters including tool deflection deformation; Step S103: Establish a transformation matrix of the path coordinate system to provide reference data for error compensation.
3. The tool cutting path processing error compensation method based on online monitoring according to claim 1 is characterized in that: The step S2 specifically includes: Step S201. Using a displacement sensor to obtain the spatial coordinates of the tool tip in real time, and establish a spatial position relationship between the tool tip and the workpiece; Step S202. Based on the data information of the spatial position relationship, the six-axis force sensor monitors the change of the tool cutting force vector under the spatial position relationship to obtain the spindle tool energy consumption data under the spatial position relationship; Step S203: An integrated infrared thermal imager is used to capture the thermal deformation of the machine tool; and time synchronization is achieved through a precise clock protocol.
4. The tool cutting path processing error compensation method based on online monitoring according to claim 1, characterized in that: The step S3 comprises: Step S301. Data preprocessing and synchronization: calibrate the time through the precision clock protocol to compensate for transmission delay and clock deviation; use the wavelet threshold method to reduce the noise of the original signal and remove noise interference; Step S302. Multi-scale path matching: receiving the theoretical cutting points generated by the CAM software, processing them according to the machine tool kinematic properties to adapt them to the machine tool motion model; performing wavelet multi-resolution decomposition on the theoretical and measured paths; calculating the path deviation in layers; weighted fusion of the deviations of each layer to obtain the total deviation; Step S303. Construct a three-dimensional error state equation: define a 9-dimensional state vector containing position, velocity, and acceleration deviations; design a state transfer matrix based on the machine tool kinematic model; set a process noise covariance matrix based on the machine tool vibration spectrum; Step S304. Kalman filter real-time solution: in the prediction phase, the control input is combined to predict the state and covariance; in the observation phase, multi-source data is integrated to update the state, and the covariance correction is based on the observed noise; Step S305. Dynamic threshold control: Calculate the position deviation norm, compare it with the dynamic threshold, and trigger deep reinforcement learning precision compensation when it exceeds the limit.
5. The tool cutting path processing error compensation method based on online monitoring according to claim 4 is characterized in that: The step S301 also includes: receiving a processing code from an external switch, parsing device status data sent and / or received by the numerical control system, and providing basic data for subsequent processing.
6. The tool cutting path processing error compensation method based on online monitoring according to claim 4 is characterized in that: The step S303 further includes: Kinematic calculation: obtain the feed rate per unit time of each axis of the machine tool, calculate the cumulative feed rate of each axis feed position at different times, and convert the cumulative feed rate of each axis at the current moment into a posture vector, solve the inverse kinematic equation of each axis of the robot arm to obtain the motion posture vector of each axis; calculate the actual cutting point posture based on the posture vector calculated in the previous step and the theoretical cutting point.
7. The tool cutting path processing error compensation method based on online monitoring according to claim 4 is characterized in that: The step S303 further includes: Cutting force and error calculation: Calculate the cutting force vector during the cutting process based on the data; homogeneously expand the position, velocity, and acceleration vectors sampled last time, and obtain the current physical quantity deviation through linear difference operations as the initial value of the forward and inverse solution algorithm to construct a three-dimensional error state equation containing position, velocity, and acceleration deviations.
8. The tool cutting path processing error compensation method based on online monitoring according to claim 1, characterized in that: The step S4 specifically includes: Step S401. Rough compensation layer path correction: construct the machine tool kinematic model and coordinate transformation matrix; set the MPC prediction time domain and weighted optimization objective function; solve the optimization in real time, output the compensation amount to generate the rough adjustment path; Step S402. Fine compensation layer strategy training: define the state space containing position deviation and fine-tuning action; build the Actor-Critic network and set the exploration strategy; design the reward function of fusion error and action; train through the experience pool data, sample according to the rules and update the network parameters; Step S403. Two-layer collaborative control: dynamically update the threshold, switch the MPC coarse compensation or DRL fine compensation mode according to the deviation size; integrate the MPC and DRL compensation amounts, and adjust the weights according to the DRL strategy confidence.
9. The tool cutting path processing error compensation method based on online monitoring according to claim 1, characterized in that: The step S5 includes: using the Xenomai real-time operating system to build a control framework, and implementing μs-level instruction issuance through the EtherCAT bus; decomposing the compensation amount into motion correction amounts of each axis of the machine tool, considering the response delay characteristics of the servo system; introducing acceleration-jerk constraints in the feedforward control to avoid mechanical vibration caused by sudden changes in compensation instructions; the specific process is as follows: Step S501. Real-time control system architecture construction: select industrial control host and EtherCAT master module, divide the real-time domain and non-real-time domain through Xenomai, and use RTDM interface to connect the six-axis servo drive; Step S502. Decomposition and issuance of compensation instructions: first convert the workpiece coordinate system compensation amount into each axis increment; then establish a servo delay model, add advance compensation before issuing the instruction; then add a high-precision timestamp to the compensation instruction, and the EtherCAT slave executes the movement according to the timestamp; Step S503. Feedforward control acceleration constraint: first design a Jerk limiter to limit the jerk and smooth the compensation amount; then construct the acceleration and jerk constraint conditions, and use an S-curve to plan the compensation amount change rate.
10. The tool cutting path processing error compensation method based on online monitoring according to claim 1, characterized in that: The process also includes step S6, constructing a virtual-real test environment to verify the compensation effect. The process is as follows: Step S601. First, perform a digital twin test through cutting simulation software to verify the convergence of the algorithm and perform a virtual processing test; Step S602. Select a standard specimen to perform actual processing test, and use a laser interferometer and a ballbar to compare the accuracy before and after compensation; Step S603: Perform quantitative analysis of performance indicators, including contour error reduction rate calculation, surface roughness evaluation and system delay test.
Citation Information
Patent Citations
Gray model thermal error data processing method based on Kalman filtering
CN103885386A
Mission polar coordinate system-based three-dimensional contour control method and device
CN108536096A
Cutter cutting path machining error compensation method based on online monitoring
CN115562161A
Machine tool error control method and system based on laser interference tracker measurement field
CN116339233A
Machine tool dynamic error compensation method and system based on instruction sequence analysis
CN117170308A
Cited By
Additive forming part linear cutting and taking auxiliary system for rocket thrust chamber
CN120286800A
A wire cutting and removal auxiliary system for additively molded parts for rocket thrust chambers
CN120286800B
Method for self-adaptive precision machining of small-curvature structure
CN120370828A
Pentahedron machining center precision calibration method and system based on multi-sensor fusion
CN120480662A
Mobile phone middle frame CNC machining optimization method based on artificial intelligence
CN120491552A