Space error compensation method, device and equipment and computer storage medium

Through offline modeling and online real-time compensation separation technology, combined with segmented error compensation model and working condition calibration coefficient, the real-time and accuracy of spatial error compensation during machine tool movement is solved, and efficient and high-precision processing effect is achieved.

CN120406306APending Publication Date: 2025-08-01ZHONGKE MICRO-ESSENCE (JIANGSU) PHOTONIC TECHNOLOGY CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202510555045.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-29
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The prior art cannot compensate dynamic spatial errors in real time during machine tool movement, resulting in low machining accuracy, especially in complex curved surfaces and fine feature processing without quality.

Method used

Through offline modeling, a high-precision spatial error compensation model is constructed, and the error analysis process is transferred to an offline environment, and the compensation amount is calculated and corrected in real time during the interpolation period. The segmented error compensation model and operating condition calibration coefficient are used to achieve online real-time compensation.

Benefits of technology

It significantly improves the machining accuracy and efficiency of the machine tool, reduces the compensation efficiency from milliseconds to microseconds, ensures the accuracy of motion trajectory and positioning accuracy, and adapts to changes in complex working conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406306A_ABST
    Figure CN120406306A_ABST
Patent Text Reader

Abstract

The invention provides a space error compensation method, device and equipment and a computer storage medium, and belongs to the technical field of precision machine manufacturing, and the space error compensation method comprises the steps: in an offline mode, based on target space error data, determining a compensation model; and in the current interpolation period of the machine tool, determining the compensated coordinate point of the current interpolation period based on the compensation model and the target position of the current interpolation period. The machining track of the machine tool can be corrected in real time in the machining process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of precision machinery manufacturing, and in particular, to a spatial error compensation method, device, equipment, and computer storage medium. Background Technique

[0002] In the field of laser precision machining, with the continuous improvement of the demand for micron / sub-micron machining accuracy, the three-dimensional spatial accuracy of machine tools has become the core factor determining the quality of machined workpieces. Especially in the fields of aerospace and precision mold manufacturing, the demand for high-efficiency and high-precision machining of complex curved surface structures and micro features is becoming increasingly urgent, which poses higher requirements for the real-time compensation ability of dynamic spatial errors during the movement of machine tools.

[0003] The current mainstream spatial error compensation technologies still have significant limitations: Traditional methods mostly adopt an offline mode, that is, directly embedding the compensation amount in the numerical control program generated by computer-aided manufacturing (CAM) software. However, the coordinate points in the numerical control program are only for positioning, and this method cannot perform real-time compensation control during the movement process, and can only solve the positioning accuracy during the machining process, and cannot improve the real-time trajectory accuracy during the operation of the equipment, resulting in low machining accuracy. Summary of the Invention

[0004] The present disclosure provides a spatial error compensation method, device, equipment, and computer storage medium, which can correct the machining trajectory of the machine tool in real time during the machining process.

[0005] The technical solution of the present disclosure is implemented as follows: In the first aspect, the present disclosure provides a spatial error compensation method, which includes: in the offline mode, determining a compensation model based on target spatial error data; and in the current interpolation cycle of the machine tool, determining the compensated coordinate point of the current interpolation cycle based on the compensation model and the target position of the current interpolation cycle.

[0006] In the second aspect, the present disclosure provides a spatial error compensation device, which includes: a determination module; the determination module is configured to determine a compensation path based on target spatial error data in the offline mode; and in the current interpolation cycle of the machine tool, determine the compensated coordinate point of the current interpolation cycle based on the compensation model and the target position of the current interpolation cycle.

[0007] In the third aspect, the present disclosure provides an electronic device, which includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the spatial error compensation method described in the first aspect are implemented.

[0008] Fourthly, the present disclosure provides a computer-readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the spatial error compensation method described in the first aspect are implemented.

[0009] Fifthly, the present disclosure provides a computer program product, wherein the computer program product includes a computer program or instruction, and when the computer program product runs on a processor, the processor is enabled to execute the computer program or instruction to implement the steps of the spatial error compensation method described in the first aspect.

[0010] Sixthly, the present disclosure provides a chip, which includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the spatial error compensation method described in the first aspect.

[0011] The present disclosure provides a spatial error compensation method, device, equipment and computer storage medium. By separating the offline analysis and modeling of spatial errors from online real-time compensation, the compensation efficiency and accuracy are significantly improved. Specifically, based on the target spatial error data, a high-precision spatial error compensation model is pre-constructed (offline analysis and modeling), and the complex error analysis process is transferred to the offline environment to complete, avoiding the real-time calculation burden during the interpolation cycle; during the interpolation cycle, the pre-stored compensation model is directly called to quickly calculate the compensation amount of the target position in the current interpolation cycle, and the compensated coordinate points are sent to the driver in real time, so that the time-consuming for calculating the compensation amount is reduced from milliseconds to microseconds. By pre-fusing the compensation amount in the motion instruction generation stage, the accuracy of the entire motion trajectory of the machine tool is guaranteed. Description of the Drawings

[0012] Figure 1 It is a schematic diagram of a machining trajectory determined by the CAM method.

[0013] Figure 2 It is a schematic flowchart of a spatial error compensation method provided by the present disclosure.

[0014] Figure 3 It is a schematic flowchart of another spatial error compensation method provided by the present disclosure.

[0015] Figure 4 It is a schematic diagram of the interaction process between the compensated coordinate points determined in the interpolation cycle and the driver and the motor provided by the present disclosure.

[0016] Figure 5 It is a schematic diagram of a machining trajectory compensated within the interpolation cycle provided by the present disclosure.

[0017] Figure 6 It is a schematic flowchart of a spatial error compensation method combined with working conditions provided by the present disclosure.

[0018] Figure 7 The flowchart of a spatial error compensation method for processing abnormal data points provided by the present disclosure.

[0019] Figure 8 The schematic diagram of abnormal data points provided by the present disclosure.

[0020] Figure 9 The schematic diagram after correcting abnormal data points provided by the present disclosure.

[0021] Figure 10 The structural block diagram of a spatial error compensation device provided by the present disclosure.

[0022] Figure 11 The schematic diagram of the hardware structure of an electronic device provided by the present disclosure. Detailed implementation manners

[0023] Next, the technical solutions in the embodiments of the present disclosure will be clearly described in conjunction with the accompanying drawings in the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present disclosure.

[0024] Spatial error is the comprehensive deviation between the actual position and the ideal position of the tool in the machine tool in three-dimensional space, which is caused by the superposition of the following factors: single-axis error transmission, for example, the positioning error (δxx) of the X-axis directly affects the accuracy in the X direction, and the straightness error (δyx) of the X-axis will cause an offset in the Y direction; angular error, such as pitch (εyx), will amplify the deviation through trigonometric functions, especially significant in long-stroke machining; multi-axis linkage coupling effect, when the X-axis, Y-axis, and Z-axis move in coordination, the errors of each axis interact with each other. For example, the rolling error (εxx) of the X-axis will change the tool attitude when the Y-axis moves, further affecting the position in the Z direction; amplification of the perpendicularity error between axes. If the perpendicularity error in the XY plane is Δ, when machining a diagonal trajectory, the actual path will deviate from the theoretical value, and the error increases linearly with the increase of the stroke.

[0025] For existing five-axis machine tools (numerical control machine tools with five degrees of freedom of motion), they usually include three linear axes (X-axis, Y-axis, Z-axis) and two rotary axes. The tool or workpiece can move synergistically in five directions (translation and rotation). The single-axis geometric errors (18 items) and the perpendicularity errors between axes (3 items) of five-axis machine tools will both cause the actual position of the tool in the three-dimensional space to deviate from the theoretical target, forming spatial errors. Among them, the single-axis geometric errors (6 items for each axis, a total of 18 items) include: positioning error (such as δxx of the X-axis), which refers to the deviation between the actual position and the commanded position during the axis movement, caused by lead screw pitch error, guide rail wear or servo control delay; straightness error (such as δyx, δzx of the X-axis), which refers to the deviation in the non-moving direction (Y / Z direction) during the axis movement, caused by uneven guide rail assembly, mechanical deformation or uneven load; angular error (such as pitch εyx, yaw εzx, roll εxx of the X-axis), the pitch or yaw error refers to the tilt around the Y-axis or Z-axis during the axis movement, caused by guide rail twist or uneven bearing preload, and the roll error refers to the rotational deviation around the axis' own center line, caused by lead screw torsion or coupling misalignment; the perpendicularity errors between axes (3 items) include XY perpendicularity error, XZ perpendicularity error, and YZ perpendicularity error, which reflect the deviation of the orthogonality of two axes in three coordinate planes (XY, XZ, YZ), caused by uneven base during machine tool assembly, structural deformation after long-term use or thermal expansion difference caused by temperature gradient.

[0026] If the spatial error in the machine tool is not compensated, it will lead to a decline in machining accuracy and quality, such as the deviation between the actual machining size and the design drawing exceeding the tolerance range; for the complex curved surface being machined, due to the coupling of the perpendicularity error between axes and the single-axis angular error, contour deformation occurs; the straightness error causes fluctuations in the cutting path and a relatively large surface roughness, etc.

[0027] Traditional spatial error compensation is to add compensation to the numerical control program generated by CAM software. The numerical control program is a series of instructions (G codes) generated by CAM software, used to guide the machine tool to move the tool, including the discrete coordinate points of the tool path (such as starting point, ending point, key turning points) and motion instructions (such as G01 linear interpolation, G02 or G03 circular interpolation). For example, G01 X100Y200 Z50 F500 means the tool moves linearly to the coordinate (100, 200, 50) at a speed of 500 mm / min. The coordinate points in the numerical control program define the ideal path of the tool, such as the starting point, ending point, and inflection point. The machine tool moves sequentially according to these points to form the machining trajectory.

[0028] The specific compensation process is as follows: measure the spatial error data (for example, when X = 100 mm, the deviation is +0.1 mm). When generating the numerical control program in the CAM software, reverse correct the target coordinate points (correct X = 100 mm to X = 99.9 mm). When the machine tool runs and moves to X = 99.9 mm, the actual position is exactly X = 100 mm, thus canceling out the error.

[0029] However, only the key point positions are marked in the numerical control program, and the intervals between coordinate points are relatively large (for example, one point every 10 mm), while during the actual movement of the machine tool, dense intermediate points are generated through interpolation (one point every 1 ms). For example, if the CAM corrects the point at X = 100 mm (set as X = 99.9), but the interpolation points between X = 90 and X = 100 are not corrected, resulting in deviation of the intermediate trajectory. As Figure 1 shown, the dashed line is the ideal machining path, the two hexagonal star points are the two coordinate points planned in the numerical control program, denoted as the planned points M, and the solid dots between the two planned points M are the interpolation points P determined within the interpolation period. The solid connection line between the planned points M and the interpolation points determined within the interpolation period is the final actual movement trajectory of the machine tool. It can be seen from the figure that by adding compensation to the generated numerical control program through the CAM, although it coincides with the ideal machining path at the planned point M, there is still a spatial error between the two planned points M, and the spatial error in this process is not corrected. In continuous trajectory machining, the machining trajectory does not meet the expectation (deviates from the dashed line in the figure), resulting in possible unqualified quality of the machined part.

[0030] Based on the above problems, the present disclosure aims to provide a spatial error compensation method capable of accurately calibrating the movement trajectory of a machine tool. The following will, in conjunction with the accompanying drawings, elaborate on the spatial error compensation method provided by the present disclosure through specific embodiments and their application scenarios. As Figure 2 shown, the spatial error compensation method may include the following steps 201 and 202.

[0031] In step 201, in the offline mode, based on the target spatial error data, determine the compensation model.

[0032] The offline mode refers to the process of preprocessing data and establishing a model through external software or tools when the machine tool is not running. The target spatial error data is determined based on the three-dimensional error values (such as positioning error, angular error) of the machine tool at different positions obtained by measuring devices (such as laser interferometers, ballbar testers). For example, if it is measured that the actual position of the X-axis at 100 mm is 100.05 mm, then the error is +0.05 mm. The compensation model refers to a mathematical model established based on the target spatial error data, used to predict the spatial error value at any position of the machine tool and generate the compensation amount.

[0033] Based on the target space error data (such as the position-space error mapping table), select a mathematical method to establish the mapping relationship between the error and the position, and ensure the prediction accuracy of the compensation model at the predicted position through cross-validation. When the prediction accuracy reaches the expectation, obtain the compensation model and store the compensation model.

[0034] In some embodiments, the compensation model is composed of multiple piecewise error compensation models. Figure 2 , such as Figure 3 As shown, in step 201 above, in the offline mode, based on the target space error data, determine the compensation model, which may specifically further include the following steps 201a to 201c.

[0035] In step 201a, according to the machine tool processing path, divide the target space error data into multiple compensation intervals.

[0036] The machine tool processing path refers to the route where the tool or workpiece moves along a preset trajectory during the machining process of the machine tool, including the movement range and trajectory characteristics of each axis (such as X / Y / Z). Divide the processing path of the machine tool into multiple continuous sub-regions according to the position or movement characteristics, and each sub-region is a compensation interval, and each sub-region corresponds to an independent piecewise error compensation model. For example, if the X-axis travel of the machine tool is 0 - 500 mm, it can be divided into 5 compensation intervals at every 100 mm.

[0037] In some implementable ways, according to the distribution characteristics of the machine tool processing path and the target space error data, dynamically divide the target space error data into multiple compensation intervals.

[0038] The distribution characteristics refer to the change law and statistical characteristics of the error data in space, such as the change trend, change rate, local aggregation, mean value, variance, etc. For example, divide the compensation interval based on the gradient of the space error data. In the region with a large error change rate (such as gradient ≥ 0.5 μm / mm), narrow the interval division (such as every 10 mm), and in the gentle region (such as gradient < 0.2 μm / mm), expand it to 50 mm; divide the compensation interval based on the statistical mutation point, and use the change point detection algorithm to locate the mutation position of the error mean value as the interval boundary point; divide the compensation interval based on physical constraints, and combine the machine tool mechanical structure (such as the guide rail joint position) to force the division of the compensation interval to avoid the compensation function crossing the physical discontinuity point.

[0039] Compared with dividing the target space error data into equal intervals at fixed intervals according to the machine tool processing path, dividing it into compensation intervals according to the distribution characteristics of the target space error data makes the space error data in each compensation interval have similar distribution characteristics, thereby reducing the complexity of modeling for each compensation interval. Densely divide the compensation intervals in the complex error region (the model is complex), and sparsely divide the compensation intervals in the simple region (the model is simple), which can also reduce the overall computational load.

[0040] In step 201b, within each compensation interval, a piecewise error compensation model that meets the preset constraint conditions is constructed.

[0041] Among them, the preset constraint conditions include: the output values of the piecewise error compensation models at the boundaries within adjacent compensation intervals are continuous; the first-order derivatives of the piecewise error compensation models at the boundaries within adjacent compensation intervals are continuous; the change rate of the second-order derivative of the piecewise error compensation model is less than or equal to the mechanical response threshold of the machine tool motion axis; the piecewise error compensation functions can be the same function, such as all quadratic functions, or different functions corresponding to different segments.

[0042] The preset constraint conditions are the connection rules that the piecewise error compensation model needs to meet, ensuring smooth transition of adjacent interval models and avoiding sudden changes in the compensation amount. Specifically, the continuity of the output values of the piecewise error compensation models at the boundaries within adjacent compensation intervals is to make the error prediction values of adjacent piecewise error models consistent at the boundaries of the compensation intervals. For example, if the predicted error at 100 mm in compensation interval 1 is +1 μm, the predicted error at 100 mm in compensation interval 2 must also be +1 μm; the continuity of the first-order derivatives of the piecewise error compensation models at the boundaries within adjacent compensation intervals is to make the change trends (slopes) of adjacent piecewise error models consistent at the compensation boundaries. For example, if the error change rate at 100 mm in compensation interval 1 is +0.01 μm / mm, the change rate at this point in compensation interval 2 also needs to be +0.01 μm / mm; the change rate of the second-order derivative of the piecewise error compensation model being less than or equal to the mechanical response threshold of the machine tool motion axis is to make the bending degree of the curve obtained by the piecewise error compensation model not exceed the response ability of the machine tool mechanical components. For example, if the maximum acceleration of the machine tool is 10 m / s², the second-order derivative of the model needs to ensure that the compensation will not cause motor overload.

[0043] It should be noted that the same piecewise error compensation model or different piecewise error compensation models can be adopted within different compensation intervals, which is specifically determined according to actual needs and is not limited in this disclosure.

[0044] In step 201c, the undetermined parameters of the piecewise error compensation model within each compensation interval are determined through an optimization algorithm.

[0045] The undetermined parameters refer to the unknown coefficients in the piecewise error compensation model that need to be determined through data fitting. For example, in the quadratic model error = a × position 2 + b × position + c, the undetermined parameters are a, b, c, and in the cubic model error = m × position 3 + n × position 2 + p × position + q, the undetermined parameters are m, n, p, q.

[0046] The optimization algorithm is a calculation method that automatically adjusts the model parameters by minimizing the prediction error and the actual error of the segmented error compensation model. For example, the least squares method minimizes the sum of the squares of the model prediction value and the measured error, and the genetic algorithm simulates the biological evolution process to search for the optimal parameter combination. The specific optimization algorithm adopted here will not be elaborated further.

[0047] In this way, in the present disclosure, the segmented modeling can be optimized for local error characteristics, is more adaptable to complex error distributions than the global model, different compensation intervals are adapted to different error characteristics (such as linear regions, non-linear regions), and the jump of the compensation amount at the junction of intervals is avoided through preset constraint conditions to prevent machine tool vibration or trajectory mutation. In addition, the segmented error model can not only improve the prediction accuracy, but also reduce the single calculation complexity, and is more suitable for system real-time processing.

[0048] In step 202, within the current interpolation cycle of the machine tool, based on the compensation model and the target position of the current interpolation cycle, the coordinate point after compensation for the current interpolation cycle is determined.

[0049] The interpolation cycle refers to the time interval (such as 1 ms) for the numerical control system to complete path decomposition and interpolation operations and generate the next theoretical displacement segment according to the current position of the machine tool and the machining instruction. The system needs to, within one interpolation cycle, based on the coordinates of the tool or workpiece (i.e., the current position of the machine tool) real-time fed back by sensors such as encoders and grating scales, determine the target position that the system expects to reach in the current interpolation cycle, determine the compensation amount corresponding to the target position based on the compensation model, compensate the compensation amount to the target position to obtain the coordinate point after compensation for the current interpolation cycle. Due to the spatial error of the machine tool, after running according to the compensated coordinate point, the actual reached position is the target position. The compensated coordinate point refers to the corrected target point dynamically calculated according to the compensation model and the current position, and is used to offset the error.

[0050] Exemplarily, taking linear motion as an example, assume that the machine tool moves from coordinate 0 mm to 10 mm, the feed rate is 12000 mm / min (i.e., 200 mm / s), and the interpolation period is 2 ms. Then the detailed calculation process for each interpolation period is as follows: In the first interpolation period, based on the current position of 0 mm and the feed rate, it is determined that 0.4 mm should be moved in this period, the target position is determined to be 0.4 mm, and an instruction to run 0.4 mm is sent to the driver; in the second interpolation period, based on the current position of 0.4 mm and the feed rate, it is determined that 0.4 mm should be moved in this period, the target position is determined to be 0.8 mm, and an instruction to run 0.4 mm is sent to the driver; and so on, until the last interpolation period. Based on the current position of 9.6 mm, the target position is determined to be 10 mm, and an instruction to run 0.4 mm is sent to the driver to complete the linear motion. However, in the actual operation process, due to errors in the machine tool, for example, when an instruction to run 0.4 mm is sent to the driver, the actual running distance is 0.38 mm. In order to make the actual running distance 0.4 mm, the compensation amount is determined to be 0.03 according to the error, and an instruction to run 0.43 mm is sent to the driver, and the machine tool finally actually runs exactly 0.4 mm.

[0051] During the machining process of the machine tool, error compensation data needs to be obtained and calculated in real time within the interpolation period (a very short time, such as 1 ms). If accessed through a database, the delay may exceed the tolerance range of the system (resulting in trajectory deviation) and the calculation cannot be completed within the interpolation period. Therefore, it is necessary to deploy the compensation model in the CPU of the machine tool numerical control system because the random access memory is directly connected to the CPU and is used to temporarily store the programs and data during operation, which can achieve nanosecond-level response, while the database is usually stored on the hard disk or network server and the response time is in milliseconds.

[0052] In some implementable ways, taking the compensation model including multiple segmented compensation error models as an example, the corresponding relationships among the compensation intervals, undetermined parameters, and segmented error compensation model identifiers are stored in the CPU in json format. During the current interpolation period of the machine tool, the target compensation interval and the target segmented error compensation model identifier to which the target position belongs are determined from multiple compensation intervals; according to the undetermined parameters corresponding to the target compensation interval, the compensation amount is determined through the model corresponding to the target segmented error compensation model identifier; based on the compensation amount and the target position, the coordinate point after compensation in the current period is determined.

[0053] It should be noted that although neural network models have shown significant advantages in non - linear data fitting and prediction accuracy (for example, the LSTM network can achieve a fitting degree of R²>0.95 in time - series prediction), their inherent characteristics lead to bottlenecks in real - time control scenarios. For example, the single - feedforward inference delay usually exceeds 200 μs (taking ResNet - 18 as an example, measured on a 1GHz embedded processor), while the high - precision industrial - level interpolation cycle generally requires within 1 ms. Just the inference link alone occupies more than 20% of the time margin. If data pre - processing and post - processing are added, the overall delay will further increase, making it difficult to ensure the calculation of the compensation amount within the interpolation cycle. Moreover, the calculation time of the neural network is affected by fluctuations in the input data dimension (such as changes in data characteristics under mutation working conditions), resulting in a ±15% jitter in the execution time of periodic tasks, while motion control requires the task - cycle jitter to be strictly controlled within ±1 μs (ISO 13849 - 1 standard). Therefore, the neural network model cannot meet the requirements of real - time and determinacy in compensation amount calculation.

[0054] As Figure 4 shown, within an interpolation cycle 401, the target position to be reached in the current cycle, the compensation amount, and the compensated coordinate point are determined based on the target position and the compensation amount, and the compensated coordinate point is sent to the driver 402. The driver 402 drives the motor 403 to work according to the compensated coordinate point. In traditional compensation methods, the driver controls the motor to move to the desired position, collects the actual position at the end of the motor through an encoder or sensor, calculates the compensation amount based on the deviation between the actual position and the desired position, and adds the compensation amount to the desired position in the next cycle. In the traditional method, compensation needs to wait for the position feedback after the actual movement of the motor is completed (usually with a delay of several milliseconds to dozens of milliseconds), and the compensation amount can only take effect in the next cycle, resulting in the compensation action lagging behind the actual movement demand. In high - speed or high - precision machining, the lag will cause the accumulation of trajectory - following errors and affect the machining accuracy. In the present disclosure, the compensation amount has been calculated before the motor movement, without waiting for the end - point feedback. The compensation calculation and trajectory planning are completed within the same interpolation cycle, eliminating the compensation lag, thereby improving the trajectory accuracy. At the same time, the fast data access of the CPU memory and the synchronous processing of the interpolation cycle also ensure the efficiency and real - time nature of the compensation action.

[0055] Exemplarily, the correspondence relationship between the compensation interval, undetermined parameters, and the segmented error compensation model identifier stored in the CPU in json format.

[0056] { "compensation_model": { { "start": 0, "end": 100, "model_type": "linear", "parameters": {"slope": 0.01, "intercept": 0.0} }, { "start": 100, "end": 200, "model_type": "spline", "parameters": {"a": 0.2, "b": -0.05, "c": 0.003} } } } Among them, compensation_model represents the compensation model, start represents the starting boundary point of the compensation interval, end represents the ending boundary point of the compensation interval, model_type represents the identifier of the piecewise compensation model, and parameters represent the undetermined parameters. The compensation interval 1 is from 0 mm to 100 mm, the piecewise compensation model is a linear function, the slope is 0.01, and the intercept is 0; the compensation interval 2 is from 100 mm to 200 mm, and the piecewise compensation model is a cubic spline interpolation function, and the coefficients are 0.2, -0.05, and 0.003 respectively.

[0057] Combined with Figure 1 , as Figure 5 shown, it is the trajectory after calibrating the points in each interpolation cycle provided by the present disclosure. It can be seen from the figure that since the interpolation points in the current interpolation cycle are compensated in each interpolation cycle, each interpolation point P shown in the figure is the compensated interpolation point, and finally the trajectory determined according to the compensated interpolation point P (the solid line in the figure) almost coincides with the ideal machining path shown by the dotted line.

[0058] In the present disclosure, the analytical analysis and correction of the spatial error are separated, and the compensation model is determined in an offline manner, which can greatly reduce the time for determining the compensation amount in the interpolation cycle, thereby making it possible to determine the compensation amount in the interpolation cycle; in the interpolation cycle, the compensation amount of the target position in the current interpolation cycle is determined through the compensation model, and the compensated coordinate points are determined, realizing preposed real-time compensation. In addition, compensating the coordinate points in one interpolation cycle not only ensures the accurate positioning during the movement of the machine tool, but also ensures that there is no deviation in the movement trajectory.

[0059] The present disclosure significantly improves the compensation efficiency and accuracy through the offline analytical modeling and online real-time compensation separation technology of spatial errors. Specifically, based on the target spatial error data, a high-precision spatial error compensation model is pre-constructed, transferring the complex error analysis process to the offline environment to avoid the real-time calculation burden within the interpolation cycle; within the interpolation cycle, the pre-stored compensation model is directly called, and the compensation amount for the target position in the current interpolation cycle is quickly calculated through the coordinate mapping relationship, and the compensated coordinate points are sent to the driver in real time, so that the calculation time of the compensation amount is reduced from the millisecond level to the microsecond level. By pre-fusing the compensation amount at the motion instruction generation stage, the accuracy of the entire motion trajectory of the machine tool is guaranteed.

[0060] In some embodiments, in combination with Figure 2 , such as Figure 6 shown, the target spatial error data includes the spatial errors of each processing axis of the machine tool under different working conditions; the spatial error compensation method further includes the following steps 203 and 204, and the above step 202 can be specifically implemented by the following step 202a.

[0061] In step 203, according to the target spatial error data, the correlation model between the working condition and the calibration coefficient is determined.

[0062] The working condition of the machine tool refers to the dynamic operating conditions during the machining process, including environmental parameters (such as temperature, humidity), mechanical loads (cutting force, motion speed), machining modes (such as rough machining, finish machining), etc. Different working conditions will cause changes in the geometric errors, thermal errors, etc. of the machine tool. For example, the temperature rise generated by the machine tool spindle during high-speed operation (such as rising from 25°C to 45°C) causes thermal expansion errors, and the positioning error differences caused by guide rail friction when the machine tool moves at high speed (such as 60 m / min) and low speed (10 m / min).

[0063] The calibration coefficient is a scaling factor that dynamically adjusts the compensation amount according to the current working condition, and is used to correct the output value of the compensation model to adapt to real-time working condition changes. According to the difference between the current working condition and the reference working condition, the calibration coefficient of the current working condition is determined through the correlation model. For example, if the reference compensation model (the compensation model under the preset standard working condition, and the calibration coefficient of the machine tool under the preset standard working condition is 1) outputs a compensation amount of +2 μm at a certain position, and the calibration coefficient is 1.2, then the final compensation amount is 2×1.2 = 2.4 μm. The calibration coefficient includes multi-dimensional adjustments, such as the linear calibration coefficients (scaling) of the X-axis, Y-axis, and Z-axis, and the angular compensation offsets (translation) of the X-axis, Y-axis, and Z-axis. If the correlation model includes multiple working condition parameter models under different working condition parameters, the product of the calibration coefficients determined by each working condition parameter model can be used as the final calibration coefficient.

[0064] The correlation model is used to characterize the mapping relationship between the working condition parameters and the calibration coefficient. If the correlation model is a linear model, for every 10°C increase in temperature, the calibration coefficient increases by 0.1, and the formula is expressed as: Calibration coefficient = 1.0 + 0.01 × (Temperature - Reference temperature). Different working condition parameters correspond to different correlation models. The correlation model includes at least one working condition parameter model, and the working condition parameters are such as temperature, humidity, mechanical load, speed, etc.; the correlation model can include a temperature correlation model for characterizing the influence of temperature change on the compensation amount, a speed correlation model for characterizing the influence of motion speed change on the compensation amount, a load correlation model for characterizing the influence of mechanical load change on the compensation amount, etc.

[0065] In step 204, within the current interpolation cycle of the machine tool, according to the correlation model between the working condition and the calibration coefficient, the calibration coefficient of the current working condition is determined.

[0066] In step 202a, within the current interpolation cycle of the machine tool, based on the compensation model, the target position, and the calibration coefficient of the current working condition, the coordinate point after compensation for the current interpolation cycle is determined.

[0067] The compensation amount of the target position is determined through the compensation model, and the compensation amount multiplied by the calibration coefficient is used as the final compensation amount. In this way, the compensation amount is calibrated by the calibration coefficient, further improving the accuracy of the machine tool running trajectory under different working conditions. In addition, the calibration coefficients can be flexibly superimposed (such as temperature coefficient × load coefficient) to handle the multi-working condition coupling scenario. The basic compensation model is independent of the working condition and only needs to be updated regularly once. The correlation model can be quickly iterated through new working condition data without reconstructing the basic model.

[0068] In some embodiments, in combination with Figure 2 , such as Figure 7 shown, the spatial error compensation method further includes the following steps 205 and 206.

[0069] In step 205, the abnormal data points in the original spatial error data are determined.

[0070] The original spatial error data is the spatial error values of each machining axis of the machine tool directly collected by measuring devices (such as laser interferometers, ballbar testers) at different positions, including geometric errors (positioning error, straightness error), angular errors (pitch, yaw, roll), etc. The user can upload the measured original spatial error data through the user interface of the control system of the machine tool.

[0071] The abnormal data points refer to the measured values in the original spatial error data that are significantly deviated from the normal range due to environmental interference (sudden temperature change, vibration), sensor noise, or mechanical failure. For example, the position error value at a certain position is -20μm, while the adjacent position errors are -3.2μm and -4.7μm, which significantly deviate from the trend; in the overall error distribution, the error value at a certain point exceeds the mean ± 3 times the standard deviation.

[0072] Specifically determining the abnormal data points in the original spatial data can adopt the 3σ criterion, K-Nearest Neighbors (KNN), machine learning methods, etc., which will not be elaborated here.

[0073] In some embodiments, determining the abnormal data points in the original spatial error data specifically means determining the data points with the number of neighboring points greater than or equal to the preset minimum number of neighboring points threshold within the preset neighborhood radius in the original spatial error data as the core data points; and determining the data points outside the preset neighborhood radius of the core data points as the abnormal data points.

[0074] The preset neighborhood radius is used to determine the neighborhood range of the data points, and the preset minimum number of neighboring points threshold is used to determine the number of points within the minimum neighborhood of the core points. For example, the preset neighborhood radius is within ±5μm of the error value difference, and the preset minimum number of neighboring points threshold is 3.

[0075] Exemplarily, taking the X-axis positioning error data as an example, setting the preset neighborhood radius Eps = 5μm and the preset minimum number of neighboring points threshold MinPts = 2, for the error of -3.2μm at the position of -440μm, there are -0.9μm and -4.7μm within the preset neighborhood radius, which are marked as core data points; for the error of -4.7μm at the position of -420μm, there are -3.2μm and -4.9μm within the preset neighborhood radius, which are marked as core data points; for the error of -20μm at the position of -400μm, there are no other points within the preset neighborhood radius, which is marked as an abnormal data point.

[0076] In step 206, filtering processing is performed on the abnormal data points to obtain the target spatial error data.

[0077] Filtering processing is a process of detecting, correcting, or removing the abnormal values in the original spatial error data through an algorithm to generate the target spatial error data that more conforms to the true error distribution.

[0078] In some embodiments, filtering processing is performed on the abnormal data points to obtain the target spatial error data, specifically by generating multiple candidate correction data points corresponding to each abnormal data point according to the neighborhood distribution of the abnormal data points; predicting the predicted error data of the next position corresponding to each candidate correction data point through a dynamic prediction model; determining the weight of the candidate correction data point corresponding to the predicted error value of the next position according to the predicted error value of the next position and the corresponding actual error data in the original spatial error data; determining the replacement value of the abnormal data point according to the multiple candidate correction data points and weights corresponding to each abnormal data point; and replacing the abnormal data points in the original spatial error data with the corresponding replacement values to obtain the target spatial error data.

[0079] Specifically, for each abnormal data point, determine the normal data points within its neighborhood, and generate multiple candidate correction points based on the normal data points (such as taking the mean of the normal data points, linear interpolation, or trend prediction, etc.). A dynamic prediction model is a prediction method that can automatically update parameters over time or with data changes, such as Kalman filtering, particle filtering, etc. Using the dynamic prediction model, combined with historical error data and the machine tool motion state (speed, load), predict the predicted error value at the next position; the closer the predicted error value at the next position is to the corresponding actual error data, the greater the weight of the candidate correction data point corresponding to the predicted error value at the next position. For example: for the abnormal data point 0.5, the determined candidate corrections are: 0.2, 0.22, 0.23. The predicted error value at the next position determined according to 0.2 is 0.3, the predicted error value at the next position determined according to 0.22 is 0.31, and the predicted error value at the next position determined according to 0.23 is 0.34. The actual error data at the next position is 0.33. Then it is determined that the weight of 0.23 is the largest, which is 0.6, the weight of 0.22 is the second largest, which is 0.3, and the weight of 0.2 is the smallest, which is 0.1. Accordingly, the finally determined replacement value is: 0.2×0.1 + 0.22×0.3 + 0.23×0.6 = 0.224, and replace the abnormal data point 0.5 with 0.224.

[0080] Exemplarily, taking the X-axis positioning error as an example, Table 1 shows the X-axis positioning error.

[0081] Table 1 X-axis positioning error

[0082] Among them, the first column represents the measurement position. In the second column to the seventh column, Run n represents the measurement result during the nth machine tool operation, + represents the measurement result of moving along the positive X-axis direction, and - represents the measurement result of moving along the negative X-axis direction.

[0083] Due to possible reasons such as temperature and mechanical failures during the measurement process, there may be a phenomenon of sudden changes in the measurement values at one or some points during the measurement process. For example Figure 8 As shown, the solid circles and stars represent the measured spatial error values. It can be seen from the figure that the stars are significantly deviated from other spatial error values and are determined as abnormal data points. The abnormal data points are processed through the above steps 205 and 206. After processing, as Figure 9 shown, the hollow circles in the figure correspond to the replacement values of the abnormal values represented by the stars. The corrected trajectory of the abnormal data points is as Figure 9 shown by the dotted line in

[0084] Based on the target spatial error data obtained after processing the original spatial error data, through the above steps 201 to 204, error compensation is performed within each interpolation cycle, thereby obtaining a corrected machining trajectory. As shown in Table 2, it is the compensation rate after compensation.

[0085] Table 2 Compensation rate after compensation

[0086] Comparing the positioning errors of the XTX, YTY, and ZTZ axes before and after compensation, they are reduced from 20μm, 14.5μm, and 39.5μm to 5.2μm, 2.2μm, and 3.7μm respectively. The compensation rate exceeds 74%, the straightness error compensation rate exceeds 40%, and the compensation rates of the three perpendicularities exceed 83.9%. The compensation effect is significant and the machine tool accuracy is improved.

[0087] The spatial error compensation method provided by the present disclosure realizes the comprehensive improvement of the machining accuracy and efficiency of the machine tool through the separation of offline modeling and online compensation, dynamic working condition adaptation, and abnormal data processing optimization. Specifically, the global error is decomposed into multiple compensation intervals, and local models are constructed for different regional characteristics (linear / non-linear) to adapt to complex error distributions; by processing abnormal data points, the influence of environmental interference and sensor noise is eliminated; the compensation model is pre-stored in the CPU memory, combined with a lightweight piecewise function, to complete the calculation of the compensation amount within the interpolation cycle, directly correct the target position in the trajectory planning stage, and avoid the trajectory stitching error of the post-compensation; in addition, a mapping relationship between parameters such as temperature and load and the calibration coefficient is established, and the calibration coefficient is generated in real time (for example, when the temperature rises by 10°C, the coefficient increases by 0.1), and the compensation amount is dynamically adjusted to adapt to complex working condition changes. The calibration coefficient supports superposition (such as temperature × load coefficient) to solve the error drift caused by multi-parameter coupling.

[0088] The present disclosure also provides a spatial error compensation device Figure 10 is a structural block diagram of a spatial error compensation device 100 shown in the present disclosure, as Figure 10 shown, including: a determination module 101; the determination module 101 is configured to determine a compensation path based on target spatial error data in an offline mode; and, within the current interpolation cycle of the machine tool, determine the coordinate point after compensation in the current interpolation cycle based on the compensation model and the target position of the current interpolation cycle.

[0089] In some embodiments, the compensation model includes multiple piecewise error compensation models; the determination module 101 is specifically configured to divide the target spatial error data into multiple compensation intervals according to the machining path of the machine tool; within each compensation interval, construct a piecewise error compensation model that satisfies preset constraint conditions, and the preset constraint conditions include: the output values of the piecewise error compensation models in adjacent compensation intervals are continuous at the boundary; the first-order derivatives of the piecewise error compensation models in adjacent compensation intervals are continuous at the boundary; the change rate of the second-order derivative of the piecewise error compensation model is less than or equal to the mechanical response threshold of the machine tool motion axis; determine the undetermined parameters of the piecewise error compensation model in each compensation interval through an optimization algorithm.

[0090] In some embodiments, the determination module 101 is specifically configured to dynamically divide the target spatial error data into multiple compensation intervals according to the distribution characteristics of the machining path of the machine tool and the target spatial error data.

[0091] In some embodiments, the compensation model includes the correspondence relationship between the compensation interval, the undetermined parameter, and the segmented error compensation model identifier; the determination module 101 is specifically configured to, within the current interpolation cycle of the machine tool, determine the target compensation interval and the target segmented error compensation model identifier to which the target position belongs from multiple compensation intervals; determine the compensation amount through the model corresponding to the target segmented error compensation model identifier according to the undetermined parameter corresponding to the target compensation interval; and determine the coordinate point after compensation in the current interpolation cycle based on the compensation amount and the target position.

[0092] In some embodiments, the target spatial error data includes the spatial errors of each machining axis of the machine tool under different working conditions; the determination module 101 is further configured to determine the association model between the working condition and the calibration coefficient according to the target spatial error data; determine the calibration coefficient of the current working condition according to the association model within the current interpolation cycle of the machine tool; and determine the coordinate point after compensation in the current interpolation cycle based on the compensation model, the target position, and the calibration coefficient of the current working condition.

[0093] In some embodiments, the spatial error compensation device 100 further includes a filtering processing module; the determination module 101 is further configured to determine the abnormal data points in the original spatial error data; and the filtering processing module is configured to perform filtering processing on the abnormal data points to obtain the target spatial error data.

[0094] In some embodiments, the determination module 101 is specifically configured to determine the core data points in the original spatial error data where the number of data points within the preset neighborhood radius is greater than or equal to the preset minimum number of neighboring points threshold; and determine the data points located outside the preset neighborhood radius of the core data points as abnormal data points.

[0095] In some embodiments, the filtering processing module is specifically configured to generate multiple candidate correction data points corresponding to each abnormal data point according to the neighborhood distribution of the abnormal data points; predict the predicted error data of the next position corresponding to each candidate correction data point through a dynamic prediction model; determine the weight of the candidate correction data point corresponding to the predicted error value of the next position according to the predicted error value of the next position and the corresponding actual error data in the original spatial error data; determine the replacement value of the abnormal data point according to the multiple candidate correction data points and weights corresponding to each abnormal data point; and replace the abnormal data points in the original spatial error data with the corresponding replacement values to obtain the target spatial error data.

[0096] In the embodiments of the present disclosure, each module can implement the spatial error compensation method provided in the above method embodiments and achieve the same technical effects. To avoid repetition, details are not described here again.

[0097] Please refer to Figure 11 , which shows a schematic diagram of the hardware structure of an electronic device provided by an exemplary embodiment of the present disclosure. In some examples, the electronic device can be at least one of devices such as a smart phone, a smart watch, a desktop computer, a laptop computer, a virtual reality terminal, an augmented reality terminal, a wireless terminal, and a laptop portable computer. The electronic device has a communication function and can access a wired network or a wireless network. The electronic device can generally refer to one of multiple terminals. Those skilled in the art can know that the number of the above terminals can be more or less. It can be understood that the electronic device undertakes the computing and processing work of the technical solution of the present disclosure, and the present disclosure does not limit this.

[0098] As Figure 11 shown, the electronic device in the present disclosure may include one or more of the following components: a processor 1110 and a memory 1120.

[0099] Optionally, the processor 1110 is connected to various parts within the entire electronic device through various interfaces and lines. By running or executing instructions, programs, code sets, or instruction sets stored in the memory 1120, and by calling data stored in the memory 1120, it executes various functions of the electronic device and processes data. Optionally, the processor 1110 can be implemented in at least one of the following hardware forms: Digital Signal Processing (DSP), Field Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 1110 can integrate one or a combination of several of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Neural-network Processing Unit (NPU), and a baseband chip. Among them, the CPU mainly processes the operating system, the user interface, and application programs, etc.; the GPU is responsible for rendering and drawing the content to be displayed on the touch display screen; the NPU is used to implement Artificial Intelligence (AI) functions; the baseband chip is used to process wireless communication. It can be understood that the above baseband chip may not be integrated into the processor 1110 and can be implemented separately by a single chip.

[0100] The memory 1120 may include a Random Access Memory (RAM), or may also include a Read Only Memory (ROM). Optionally, the memory 1120 includes a non-transitory computer-readable storage medium. The memory 1120 can be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1120 may include a program storage area and a data storage area. Among them, the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing each of the above method embodiments, etc.; the data storage area may store data created according to the use of the electronic device, etc.

[0101] In addition, those skilled in the art can understand that the structure of the electronic device shown in the above drawings does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the drawings, or combine certain components, or have different component arrangements. For example, the electronic device also includes components such as a display screen, a camera component, a microphone, a speaker, a radio frequency circuit, an input unit, sensors (such as an acceleration sensor, an angular velocity sensor, a light sensor, etc.), an audio circuit, a WiFi module, a power supply, a Bluetooth module, etc., which will not be elaborated here.

[0102] The present disclosure also provides a computer-readable storage medium storing at least one instruction for being executed by a processor to implement the spatial error compensation method in each of the above embodiments.

[0103] The present disclosure also provides a computer program product including computer instructions stored in a computer-readable storage medium. The processor of the electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to enable the electronic device to implement the spatial error compensation method in each of the above embodiments.

[0104] Another embodiment of the present disclosure provides a chip including a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above spatial error compensation method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0105] It should be understood that the chip mentioned in the embodiments of the present disclosure may also be referred to as a system-on-chip, a system chip, a chip system, or a system-on-chip, etc.

[0106] In several embodiments provided by the present disclosure, it should be understood that the disclosed systems, devices, servers, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical, or other forms.

[0107] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0108] In addition, in each embodiment of the present disclosure, the functional units can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.

[0109] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present disclosure. The foregoing storage medium includes: USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs, and other various media that can store program codes.

[0110] Those skilled in the art should be able to realize that in the above one or more examples, the functions described in the present disclosure can be implemented by hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. The computer-readable medium includes computer storage media and communication media, where the communication media includes any medium that facilitates the transmission of a computer program from one place to another. The storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0111] It should be noted that: Among the technical solutions recorded in this disclosure, they can be arbitrarily combined without conflict.

[0112] The above is only the specific implementation manner of this disclosure, but the protection scope of this disclosure is not limited thereto. Any person skilled in the art within the technical scope disclosed by this disclosure can easily think of changes or substitutions, which should all be covered within the protection scope of this disclosure.

Claims

1. A spatial error compensation method, characterized in that, The described spatial error compensation method includes: In the offline mode, based on the target spatial error data, determine the compensation model; During the current interpolation cycle of the machine tool, based on the compensation model and the target position of the current interpolation cycle, determine the compensated coordinate point of the current interpolation cycle.

2. The spatial error compensation method according to claim 1, wherein The compensation model includes multiple piecewise error compensation models; the step of determining the compensation model based on the target spatial error data in the offline mode includes: According to the machining path of the machine tool, divide the target spatial error data into multiple compensation intervals; Within each compensation interval, construct a piecewise error compensation model that satisfies the preset constraint conditions. The preset constraint conditions include: the output values of the piecewise error compensation models at the boundaries in adjacent compensation intervals are continuous; the first-order derivatives of the piecewise error compensation models at the boundaries in adjacent compensation intervals are continuous; the change rate of the second-order derivative of the piecewise error compensation model is less than or equal to the mechanical response threshold of the machine tool's moving axis; Determine the undetermined parameters of the piecewise error compensation model within each compensation interval through an optimization algorithm.

3. The spatial error compensation method according to claim 2, characterized in that The step of dividing the target spatial error data into multiple compensation intervals according to the machining path of the machine tool includes: According to the machining path of the machine tool and the distribution characteristics of the target spatial error data, dynamically divide the target spatial error data into multiple compensation intervals.

4. The spatial error compensation method according to claim 2, characterized in that The compensation model includes the corresponding relationship between the compensation interval, the undetermined parameters, and the piecewise error compensation model identifier; The step of determining the compensated coordinate point of the current interpolation cycle based on the compensation model and the target position of the current interpolation cycle during the current interpolation cycle of the machine tool includes: During the current interpolation cycle of the machine tool, determine the target compensation interval and the target piecewise error compensation model identifier to which the target position belongs from multiple compensation intervals; According to the undetermined parameters corresponding to the target compensation interval, determine the compensation amount through the model corresponding to the target piecewise error compensation model identifier; Based on the compensation amount and the target position, determine the compensated coordinate point of the current interpolation cycle.

5. The spatial error compensation method according to any one of claims 1 to 4, characterized in that The target spatial error data includes the spatial errors of each machining axis of the machine tool under different working conditions; the method further includes: According to the target spatial error data, determine the association model between the working condition and the calibration coefficient; During the current interpolation cycle of the machine tool, determine the calibration coefficient of the current working condition according to the association model; The step of determining the compensated coordinate point of the current interpolation cycle based on the compensation model and the target position of the current interpolation cycle during the current interpolation cycle of the machine tool includes: During the current interpolation cycle of the machine tool, based on the compensation model, the target position, and the calibration coefficient of the current working condition, determine the compensated coordinate point of the current interpolation cycle.

6. The spatial error compensation method according to claim 1, wherein The spatial error compensation method further includes: Determine the abnormal data points in the original spatial error data; Perform filtering processing on the abnormal data points to obtain the target spatial error data.

7. The spatial error compensation method according to claim 6, characterized in that The step of determining the abnormal data points in the original spatial error data includes: Determine the core data points as the data points in the original spatial error data where there are data points greater than or equal to the preset minimum adjacent point number threshold within the preset neighborhood radius; Determine the data points outside the preset neighborhood radius of the core data points as the abnormal data points.

8. The spatial error compensation method according to claim 7, wherein, Filtering the abnormal data points to obtain the target spatial error data includes: Generating multiple candidate correction data points corresponding to each abnormal data point according to the neighborhood distribution of the abnormal data points; Predicting the prediction error data of the next position corresponding to each candidate correction data point through a dynamic prediction model; Determining the weight of the candidate correction data point corresponding to the prediction error value of the next position according to the prediction error value of the next position and the corresponding actual error data in the original spatial error data; Determining the replacement value of the abnormal data point according to the multiple candidate correction data points and weights corresponding to each abnormal data point; Replacing the abnormal data points in the original spatial error data with the corresponding replacement values to obtain the target spatial error data.

9. A spatial error compensation device, characterized in that, The spatial error compensation device includes: a determination module; The determination module is configured to determine a compensation path based on the target spatial error data in an offline mode; And, within the current interpolation cycle of the machine tool, determining the coordinate points after compensation for the current interpolation cycle based on the compensation model and the target position of the current interpolation cycle.

10. An electronic device, characterized in that, It includes a processor, a memory, and a program or instruction stored on the memory and executable on the processor. When the program or instruction is executed by the processor, the steps of the spatial error compensation method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium, characterized in that, A program or instruction is stored on the readable storage medium. When the program or instruction is executed by a processor, the steps of the spatial error compensation method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Machining point position deviation compensation method and device, electronic equipment and storage medium

    CN121500879A

  • Vertical and horizontal integrated gantry boring, milling and grinding composite numerical control machine tool and control method

    CN121657571A

  • Dynamic error compensation and control method and system in multi-axis linkage tool machining

    CN122194845A