A method and device for optimizing plane compensation trajectory considering milling cutter diameter

By considering the milling cutter diameter and introducing the tool radius offset coefficient in the plane compensation trajectory optimization, the problem of failing to effectively consider the influence of the milling cutter diameter in the existing technology is solved, and the surface accuracy and efficiency of the workpiece are improved.

CN113031516BActive Publication Date: 2024-10-22SHANGHAI PLATFORM FOR SMART MFG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110225505.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-01
Publication Date
2024-10-22
Estimated Expiration
2041-03-01

AI Technical Summary

Technical Problem

Existing plane compensation methods fail to effectively consider the impact of milling cutter diameter on the processing of large flat workpieces, resulting in undercutting or overcutting on the workpiece surface, reducing processing quality and efficiency.

Method used

By introducing the tool radius offset coefficient, the workpiece plane is divided into local areas, and the tool offset coefficient of each area is optimally solved. With the goal of minimizing the sum of square errors, the machining trajectory is corrected and real-time error compensation is achieved.

Benefits of technology

It effectively reduces surface errors caused by tool radius offset, improves workpiece plane accuracy and processing efficiency, and significantly improves surface quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113031516B_ABST
    Figure CN113031516B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for planning a plane compensation trajectory considering the diameter of a milling cutter, comprising: measuring and obtaining the plane error data of the plane to be processed of a workpiece as a reference, and obtaining the plane intensive error data information by interpolation; introducing a tool offset coefficient, dividing the plane to be processed of the workpiece into multiple local areas, taking the minimum sum of square errors in the local area after compensation as the optimization goal, and solving to obtain the better tool offset coefficient range of each local area; considering the interaction between the processing trajectories, taking the minimum sum of square errors of the entire plane to be processed after compensation as the goal, and calculating the optimal tool offset coefficient of each local area; by means of coordinate transformation, converting the optimal tool offset parameter and tool diameter information into the offset information of the machine tool coordinates, correcting the ideal trajectory of processing, and obtaining the actual compensation trajectory for compensation. Through the present invention, the surface error caused by the default tool radius offset can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of numerically controlled machine tools, and in particular to a method and a device for optimizing a plane compensation trajectory taking into account a milling cutter diameter. Background Art

[0002] The motion trajectory of the tool is a key technology for implementing CNC machining, which is directly related to the machining quality, cutting efficiency, and service life of the tool itself. However, the geometric simulation confirmed as a correct program in the machining software may not necessarily produce a qualified workpiece, especially for the surface machining of large flat workpieces. The reason is that large flat workpieces are affected by multiple factors including force and heat during the actual cutting process, resulting in a large difference between the actual formed surface and the ideal surface. Therefore, it is of great significance to improve the plane accuracy of the workpiece by establishing an error model and real-time compensation.

[0003] In production practice, in order to ensure the flatness accuracy of the workpiece, the method of controlling the cutting amount is usually adopted to gradually refine the workpiece surface through a small cutting depth to meet the accuracy requirements. However, this method of controlling the cutting depth is powerless against the deformation of the workpiece caused by the workpiece clamping force and the tool cutting force. Due to the existence of errors, the machined plane is similar to an irregular 3D surface. The current plane compensation method is to directly detect the surface size of the machined workpiece, compare it with the pre-set workpiece size, and then feed the difference back to the CNC system. The CNC system makes corresponding adjustments to the machine tool feed based on the feedback. This dynamic compensation method uses a small diameter milling cutter to achieve higher workpiece surface accuracy requirements, but it is obviously inefficient when applied to large plane processing.

[0004] The above flatness error compensation method idealizes the tool as a straight line and does not consider the effect of the machining tool diameter on the plane topography. However, when using a large-diameter face milling cutter for efficient machining compensation of a large flat workpiece surface, the tool diameter cannot be ignored. When the tool center runs along a smooth and continuous compensation trajectory, the face milling cutter tip will cause the workpiece plane to undercut or overcut at the reverse curvature, reducing the surface quality. Summary of the invention

[0005] In view of the problems existing in the above-mentioned prior art, the present invention proposes a plane compensation trajectory optimization method and device taking into account the milling cutter diameter. The milling cutter diameter is taken into account in the plane compensation trajectory optimization, and the tool radius offset coefficient is introduced and optimized, which can effectively reduce the surface error caused by the default tool radius offset.

[0006] In order to solve the above technical problems, the present invention is achieved through the following technical solutions:

[0007] The present invention provides a method for optimizing a plane compensation trajectory taking into account a milling cutter diameter, which comprises:

[0008] S11: Measure and obtain the plane error data of the to-be-processed plane of the workpiece as a reference, and obtain the plane dense error data information by interpolation;

[0009] S12: Introducing a tool offset coefficient, dividing the workpiece's to-be-processed plane into multiple local areas, generating simulation tool paths with different tool offset coefficients to compensate for the to-be-processed plane, taking the minimum sum of square errors in the compensated local area as the optimization goal, and solving to obtain a better tool offset coefficient range that meets the plane accuracy requirements for each local area;

[0010] S13: Considering the interaction between the machining trajectories, the optimal tool offset coefficient of each local area is calculated with the goal of minimizing the sum of square errors of the entire plane to be machined after compensation;

[0011] S14: The optimal tool offset parameters and tool diameter information obtained in S13 are converted into offset information of machine tool coordinates by means of coordinate transformation, and the ideal machining trajectory is corrected to obtain an actual compensation trajectory for compensation, which is used for real-time error compensation during machining.

[0012] Preferably, the S11 further comprises:

[0013] S111: obtaining plane error data of a plane to be processed of a workpiece by a measuring device as a reference, wherein the plane error data is a difference between a measured value and a preset standard size;

[0014] S112: Using an interpolation method based on spatial scattered points, the plane error data is condensed into plane intensive error data information with a preset recognition accuracy.

[0015] Preferably, the S12 further comprises:

[0016] S121: Set the tool diameter to D and introduce the tool offset coefficient k, then the machine tool introduces the offset coordinate D (k0+k) during the machining process, where k0 is the default fixed tool offset coefficient;

[0017] S122: Divide the plane to be processed of the workpiece into multiple local areas, traverse the tool offset coefficients of each local area, and calculate the meshing area between the tool trajectory under each tool offset coefficient and the plane to be processed to be compensated;

[0018] S123: extract the meshing area obtained in S122 and calculate the sum of square errors of the compensated plane to be processed, and take the minimum sum of square errors in the compensated local area as the optimization goal, that is, the objective function is:

[0019]

[0020] Among them, r iRepresents the calculated value after compensation of the local area of ​​the plane, Indicates the reference value of the local area of ​​the plane;

[0021] Under different tool offset coefficients k, if the objective function is smaller, it means that the tool offset coefficient corresponding to the objective function is closer to the ideal value;

[0022] S124: Obtaining an optimal tool offset coefficient range for each local area that meets the plane accuracy requirement according to the result of S123.

[0023] Preferably, the S13 further comprises:

[0024] S131: Considering the interaction between the trajectories, a weighted approach is adopted to adjust the tool offset coefficient of the local area by weighting the adjacent areas of the local area;

[0025] S132: traverse the optimal bias coefficient range of each local area and correct it, and calculate the error sum of the entire plane to be processed;

[0026] S133: extracting the optimal tool offset coefficients for each local area when the sum of square errors of the entire plane to be processed in S132 is minimized.

[0027] The present invention also provides a plane compensation trajectory optimization device considering the milling cutter diameter, which includes: a plane dense error data information acquisition module, a better tool offset coefficient range acquisition module, an optimal tool offset coefficient acquisition module and an actual compensation trajectory acquisition module; wherein,

[0028] The plane dense error data information acquisition module is used to measure and obtain the plane error data of the to-be-processed plane of the workpiece as a reference, and obtain the plane dense error data information by interpolation;

[0029] The module for obtaining the optimal tool offset coefficient range is used to introduce the tool offset coefficient, divide the plane to be processed of the workpiece into multiple local areas, generate simulation tool paths with different tool offset coefficients to compensate the plane to be processed, and take the minimum sum of square errors in the local area after compensation as the optimization goal, and solve and obtain the optimal tool offset coefficient range that meets the plane accuracy requirements of each local area;

[0030] The optimal tool offset coefficient acquisition module is used to consider the interaction between the processing trajectories, and to minimize the sum of square errors of the entire plane to be processed after compensation, and to calculate the optimal tool offset coefficient of each local area;

[0031] The actual compensation trajectory acquisition module is used to convert the optimal tool offset parameters and tool diameter information obtained by the optimal tool offset coefficient acquisition module into offset information of machine tool coordinates through coordinate transformation, correct the ideal trajectory of processing, and obtain the actual compensation trajectory for compensation, which is used for real-time error compensation during processing.

[0032] Preferably, the plane dense error data information acquisition module further comprises: a measuring device and an interpolation module; wherein,

[0033] The measuring device is used to measure and obtain plane error data of a plane to be processed of a workpiece as a reference, wherein the plane error data is the difference between a measured value and a preset standard size;

[0034] The interpolation module is used to condense the plane error data into plane dense error data information with a preset recognition accuracy by using an interpolation method based on spatial scattered points.

[0035] Preferably, the measuring equipment includes: a three-dimensional coordinate measuring machine, a laser interferometer and a CCD camera; wherein,

[0036] The three-dimensional coordinate measuring machine is used to obtain the spatial coordinate values ​​of each measuring point on the workpiece, and calculate the geometric size, shape and position of the workpiece according to the spatial coordinate values ​​of each measuring point;

[0037] The laser interferometer is used for universal length measurement of displacement using a Michelson interferometer system with the laser wavelength as a known length, and obtaining workpiece surface error data information;

[0038] The CCD camera is used to obtain the distance information of each measuring point by means of image processing calculation.

[0039] Preferably, the module for obtaining the optimal tool offset coefficient range further comprises: a module for introducing tool offset coefficients, a module for dividing a plane to be processed, an objective function module and a module for obtaining the optimal tool offset coefficient range; wherein,

[0040] The tool offset coefficient introduction module is used to set the tool diameter to D and introduce the tool offset coefficient k. Then, the machine tool introduces the offset coordinate D (k0+k) during the machining process, where k0 is the default fixed tool offset coefficient.

[0041] The to-be-processed plane division module is used to divide the to-be-processed plane of the workpiece into a plurality of local areas, traverse the tool offset coefficients of each local area, and calculate the meshing area between the tool trajectory under each tool offset coefficient and the to-be-processed plane to be compensated;

[0042] The objective function module is used to extract the meshing area obtained by the plane division module to be processed and calculate the sum of square errors of the plane to be processed after compensation, and the minimum sum of square errors in the local area after compensation is taken as the optimization goal, that is, the objective function is:

[0043]

[0044] Among them, r i Represents the calculated value after compensation of the local area of ​​the plane, Represents the reference value of the local area of ​​the plane,

[0045] Under different tool offset coefficients k, if the objective function is smaller, it means that the tool offset coefficient corresponding to the objective function is closer to the ideal value;

[0046] The preferred tool offset coefficient range acquisition module is used to obtain the preferred tool offset coefficient range that meets the plane accuracy requirements for each local area according to the result of the objective function module.

[0047] Preferably, the optimal tool offset coefficient acquisition module further comprises: a tool offset coefficient correction module, a square sum of errors calculation module of the entire plane to be processed and an optimal tool offset coefficient acquisition module; wherein,

[0048] The tool offset coefficient correction module is used to take into account the interaction between trajectories and correct the tool offset coefficient of the local area by weighting the adjacent areas of the local area;

[0049] The module for calculating the sum of square errors of the entire plane to be processed is used to traverse and correct the optimal bias coefficient range of each local area, and calculate the sum of square errors of the entire plane to be processed;

[0050] The optimal tool offset coefficient acquisition module is used to extract the optimal tool offset coefficient of each local area when the sum of squares of the overall error of the to-be-processed plane of the to-be-processed plane calculation module is minimized.

[0051] Compared with the prior art, the present invention has the following advantages:

[0052] (1) The method and device for optimizing the plane compensation trajectory considering the milling cutter diameter provided by the present invention can effectively reduce the surface error caused by the default tool radius offset by considering the milling cutter diameter in the plane compensation trajectory optimization, introducing the tool radius offset coefficient and optimizing the solution;

[0053] (2) The method and device for optimizing the plane compensation trajectory taking into account the milling cutter diameter provided by the present invention can significantly improve the calculation speed by adopting a strategy of optimizing and solving the tool radius offset coefficient locally first and then globally.

[0054] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] The embodiments of the present invention will be further described below in conjunction with the accompanying drawings:

[0056] Figure 1 A flow chart of a method for optimizing a plane compensation trajectory taking into account a milling cutter diameter according to an embodiment of the present invention;

[0057] Figure 2 A distribution diagram of measuring points for on-machine measurement according to an embodiment of the present invention;

[0058] Figure 3a An ideal processing surface diagram of an embodiment of the present invention;

[0059] Figure 3b It is a graph of an actual processed surface according to an embodiment of the present invention;

[0060] Figure 4 A machining error surface diagram according to an embodiment of the present invention;

[0061] Figure 5 A comparison diagram of a theoretical compensation value and an actual compensation value according to an embodiment of the present invention;

[0062] Figure 6a A processing error diagram before compensation according to an embodiment of the present invention;

[0063] Figure 6b FIG. 4 is a diagram of machining errors after compensation according to an embodiment of the present invention. DETAILED DESCRIPTION

[0064] The following is a detailed description of an embodiment of the present invention. This embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation method and a specific operation process are given, but the protection scope of the present invention is not limited to the following embodiment.

[0065] like Figure 1 Shown is a flow chart of a method for optimizing a plane compensation trajectory taking into account the diameter of a milling cutter according to an embodiment of the present invention.

[0066] Please refer to Figure 1 The plane compensation trajectory optimization method considering the milling cutter diameter of this embodiment includes:

[0067] S11: Measure and obtain the plane error data of the to-be-processed plane of the workpiece as a reference, and obtain the plane dense error data information by interpolation;

[0068] S12: Introducing a tool offset coefficient, dividing the workpiece's to-be-processed plane into multiple local areas, generating simulation tool paths with different tool offset coefficients to compensate for the to-be-processed plane, taking the minimum sum of square errors in the compensated local area as the optimization goal, and solving to obtain a better tool offset coefficient range that meets the plane accuracy requirements for each local area;

[0069] S13: Considering the interaction between the machining trajectories, the optimal tool offset coefficient of each local area is calculated with the goal of minimizing the sum of square errors of the entire plane to be machined after compensation;

[0070] S14: The optimal tool offset parameters and tool diameter information obtained in S13 are converted into the offset information of the machine tool coordinates by means of coordinate transformation, the ideal machining trajectory is corrected, and the actual compensation trajectory for compensation is obtained, which is used for real-time error compensation during machining.

[0071] In a preferred embodiment, S11 further includes:

[0072] S111: obtaining plane error data of a plane to be processed of a workpiece by a measuring device as a reference, wherein the plane error data is a difference between a measured value and a preset standard size;

[0073] In a specific embodiment, the OMP60 probe is used to uniformly sample the surface of the processed automobile gearbox valve body on the VMC850E vertical machining center. Figure 2 The distribution of measuring points for on-machine measurement is shown to obtain plane error data;

[0074] S112: using an interpolation method based on spatial scattered points, concentrating the plane error data into plane concentrating error data information of a preset recognition accuracy;

[0075] In a specific embodiment, the data is interpolated to the minimum recognition accuracy of the machine tool of 0.001 mm by using the interpolation method based on spatial scattered points. Figure 3a The figure shows the ideal machining surface. Figure 3b The actual machining surface diagram is shown in Figure 4 The figure shows the machining error surface.

[0076] Due to the combined influence of machine tool thermal and force errors, the plane of the workpiece actually processed is a 3D curved surface. In the process of plane error compensation, the tool offset coefficient defaults to a fixed value, which will cause overcutting on the workpiece surface, such as Figure 5 shown.

[0077] In a preferred embodiment, S12 further includes:

[0078] S121: Set the tool diameter to D and introduce the tool offset coefficient k, then the machine tool introduces the offset coordinate D (k0+k) during the machining process, where k0 is the default fixed tool offset coefficient;

[0079] In a specific embodiment, the tool diameter D = 100 mm, and the default fixed tool offset coefficient k0 = 0.5

[0080] S122: Divide the plane to be processed of the workpiece into multiple local areas, traverse the tool offset coefficients of each local area, and calculate the meshing area between the tool trajectory under each tool offset coefficient and the plane to be processed to be compensated;

[0081] S123: Extract the meshing area obtained in S122 and calculate the sum of square errors of the compensated plane to be processed, and take the minimum sum of square errors in the compensated local area as the optimization goal, that is, the objective function is:

[0082]

[0083] Among them, r i Represents the calculated value after compensation of the local area of ​​the plane, Represents the reference value of the local area of ​​the plane,

[0084] Under different tool offset coefficients k, if the objective function is smaller, it means that the tool offset coefficient corresponding to the objective function is closer to the ideal value;

[0085] S124: Obtaining a relatively optimal tool offset coefficient range that meets the plane accuracy requirement for each local area according to the result of S123;

[0086] The tool offset coefficient k range is set to [kmin, kmax], and the step size is set to ks. In a specific embodiment, the tool offset coefficient k range is set to [-0.2, 0.2], and the step size is set to 0.02. Four locally optimal k ranges are calculated to be [-0.12, -0], [-0.14, -0.08], [-0.12, -0.04], and [-0.16, 0].

[0087] In a preferred embodiment, S13 further includes:

[0088] S131: Considering the interaction between the trajectories, a weighted approach is adopted to adjust the tool offset coefficient of the local area by weighting the adjacent areas of the local area;

[0089] S132: traverse the optimal bias coefficient range of each local area and correct it, and calculate the error sum of the entire plane to be processed;

[0090] S133: extracting the optimal tool offset coefficients of each local area when the sum of square errors of the entire plane to be processed in S132 is minimized;

[0091] In a specific example, the optimal tool offset coefficients for each local area are finally determined to be: -0.1, -0.12, -0.1, -0.1.

[0092] In a preferred embodiment, S14 further includes: converting the planned trajectory into offset information of the machine tool coordinates by means of coordinate transformation, and finally sending a data offset instruction to the machine tool through a real-time compensator. A 100mm face milling cutter is used to compensate for the 0.5mm cutting depth of the automobile gearbox valve body plane. The compensation result is as follows: Figure 6b As shown, Figure 6a The above is the processing error before compensation. Figure 6a , 6b By comparison, it can be seen that the plane error range of the workpiece is greatly reduced after compensation, and the surface quality is significantly improved.

[0093] In one embodiment, a plane compensation trajectory optimization device considering the milling cutter diameter is also provided, which includes: a plane dense error data information acquisition module, a better tool offset coefficient range acquisition module, an optimal tool offset coefficient acquisition module and an actual compensation trajectory acquisition module; wherein,

[0094] The plane dense error data information acquisition module is used to measure and obtain the plane error data of the to-be-processed plane of the workpiece as a reference, and obtain the plane dense error data information by interpolation;

[0095] The module for obtaining the optimal tool offset coefficient range is used to introduce the tool offset coefficient, divide the workpiece's to-be-processed plane into multiple local areas, generate simulation tool paths with different tool offset coefficients to compensate the to-be-processed plane, and take the minimum sum of square errors in the compensated local area as the optimization goal, and solve to obtain the optimal tool offset coefficient range that meets the plane accuracy requirements for each local area;

[0096] The optimal tool offset coefficient acquisition module is used to consider the interaction between the machining trajectories, and to minimize the sum of square errors of the entire plane to be machined after compensation, and to calculate the optimal tool offset coefficients of each local area;

[0097] The actual compensation trajectory acquisition module is used to convert the optimal tool offset parameters and tool diameter information obtained by the optimal tool offset coefficient acquisition module into the offset information of the machine tool coordinates through coordinate transformation, correct the ideal trajectory of processing, and obtain the actual compensation trajectory for compensation, which is used for real-time error compensation during processing.

[0098] In a preferred embodiment, the plane dense error data information acquisition module further includes: a measurement device and an interpolation module; wherein,

[0099] The measuring device is used to measure and obtain the plane error data of the to-be-processed plane of the workpiece as a reference, wherein the plane error data is the difference between the measured value and the preset standard size;

[0100] The interpolation module is used to condense the plane error data into plane dense error data information with a preset recognition accuracy by using an interpolation method based on spatial scattered points.

[0101] In a preferred embodiment, the measuring equipment includes: a three-dimensional coordinate measuring machine, a laser interferometer and a CCD camera; wherein,

[0102] The three-dimensional coordinate measuring machine is used to obtain the spatial coordinate values ​​of each measuring point on the workpiece, and calculate the geometric size, shape and position of the workpiece according to the spatial coordinate values ​​of each measuring point;

[0103] Laser interferometer is used for general length measurement with laser wavelength as known length and displacement measured by Michelson interferometer system to obtain surface error data information of workpiece;

[0104] The CCD camera is used to obtain the distance information of each measuring point by image processing calculation.

[0105] In a preferred embodiment, the module for obtaining the optimal tool offset coefficient range further includes: a module for introducing tool offset coefficients, a module for dividing a plane to be processed, an objective function module, and a module for obtaining the optimal tool offset coefficient range; wherein,

[0106] The tool offset coefficient introduction module is used to set the tool diameter to D and introduce the tool offset coefficient k. Then the machine tool introduces the offset coordinate D (k0+k) during the machining process, where k0 is the default fixed tool offset coefficient;

[0107] The processing plane division module is used to divide the processing plane of the workpiece into multiple local areas, traverse the tool offset coefficients of each local area, and calculate the meshing area between the tool trajectory under each tool offset coefficient and the processing plane to be compensated;

[0108] The objective function module is used to extract the meshing area obtained by the plane division module to be processed and calculate the sum of square errors of the plane to be processed after compensation, and the minimum sum of square errors in the local area after compensation is taken as the optimization goal, that is, the objective function is:

[0109]

[0110] Among them, r i Represents the calculated value after compensation of the local area of ​​the plane, Represents the reference value of the local area of ​​the plane,

[0111] Under different tool offset coefficients k, if the objective function is smaller, it means that the tool offset coefficient corresponding to the objective function is closer to the ideal value;

[0112] The module for obtaining the optimal tool offset coefficient range is used to obtain the optimal tool offset coefficient range that meets the plane accuracy requirement for each local area according to the result of the objective function module.

[0113] In a preferred embodiment, the optimal tool offset coefficient acquisition module further includes: a tool offset coefficient correction module, a square error calculation module of the entire plane to be processed, and an optimal tool offset coefficient acquisition module; wherein,

[0114] The tool offset coefficient correction module is used to consider the interaction between trajectories and correct the tool offset coefficient of the local area by weighting the adjacent areas of the local area.

[0115] The module for calculating the sum of square errors of the entire plane to be processed is used to traverse and correct the optimal bias coefficient range of each local area, and calculate the sum of square errors of the entire plane to be processed;

[0116] The optimal tool offset coefficient acquisition module is used to extract the optimal tool offset coefficients of each local area when the sum of square errors of the entire plane to be processed of the sum of square errors calculation module is minimized.

[0117] The preferred embodiments of the present invention are disclosed herein. These embodiments are selected and specifically described in this specification in order to better explain the principles and practical applications of the present invention, but are not intended to limit the present invention. Any modifications and changes made by those skilled in the art within the scope of the specification should fall within the scope of protection of the present invention.

Claims

1. A plane compensation trajectory optimization method considering the milling cutter diameter, characterized in that: include: S11: Measure and obtain the plane error data of the to-be-processed plane of the workpiece as a reference, and obtain the plane dense error data information by interpolation; S12: Introducing a tool offset coefficient, dividing the workpiece's to-be-processed plane into multiple local areas, generating simulation tool paths with different tool offset coefficients to compensate for the to-be-processed plane, taking the minimum sum of square errors in the compensated local area as the optimization goal, and solving to obtain a better tool offset coefficient range that meets the plane accuracy requirements for each local area; S13: Considering the interaction between the machining trajectories, the optimal tool offset coefficient of each local area is calculated with the goal of minimizing the sum of square errors of the entire plane to be machined after compensation; S14: by means of coordinate transformation, the optimal tool offset parameter and tool diameter information obtained in S13 are converted into offset information of machine tool coordinates, the ideal machining trajectory is corrected, and an actual compensation trajectory for compensation is obtained, which is used for real-time error compensation during machining; The S12 further comprises: S121: Set the tool diameter to D and introduce the tool offset coefficient k, then the machine tool introduces the offset coordinate D (k0+k) during the machining process, where k0 is the default fixed tool offset coefficient; S122: Divide the plane to be processed of the workpiece into multiple local areas, traverse the tool offset coefficients of each local area, and calculate the meshing area between the tool trajectory under each tool offset coefficient and the plane to be processed to be compensated; S123: extract the meshing area obtained in S122 and calculate the sum of square errors of the compensated plane to be processed, and take the minimum sum of square errors in the compensated local area as the optimization goal, that is, the objective function is: Among them, r i Represents the calculated value after compensation of the local area of ​​the plane, Indicates the reference value of the local area of ​​the plane; Under different tool offset coefficients k, if the objective function is smaller, it means that the tool offset coefficient corresponding to the objective function is closer to the ideal value; S124: Obtaining a relatively optimal tool offset coefficient range that meets the plane accuracy requirement for each local area according to the result of S123; The S13 further comprises: S131: Considering the interaction between the trajectories, a weighted approach is adopted to adjust the tool offset coefficient of the local area by weighting the adjacent areas of the local area; S132: traverse the optimal bias coefficient range of each local area and correct it, and calculate the error sum of the entire plane to be processed; S133: extracting the optimal tool offset coefficients for each local area when the sum of square errors of the entire plane to be processed in S132 is minimized.

2. The method for optimizing the plane compensation trajectory considering the milling cutter diameter according to claim 1, characterized in that: The S11 further comprises: S111: obtaining plane error data of a plane to be processed of a workpiece by a measuring device as a reference, wherein the plane error data is a difference between a measured value and a preset standard size; S112: Using an interpolation method based on spatial scattered points, the plane error data is condensed into plane intensive error data information with a preset recognition accuracy.

3. A plane compensation trajectory optimization device considering the milling cutter diameter, characterized in that: include: Plane intensive error data information acquisition module, better tool offset coefficient range acquisition module, optimal tool offset coefficient acquisition module and actual compensation trajectory acquisition module; among them, The plane dense error data information acquisition module is used to measure and obtain the plane error data of the to-be-processed plane of the workpiece as a reference, and obtain the plane dense error data information by interpolation; The module for obtaining the optimal tool offset coefficient range is used to introduce the tool offset coefficient, divide the plane to be processed of the workpiece into multiple local areas, generate simulation tool paths with different tool offset coefficients to compensate the plane to be processed, and take the minimum sum of square errors in the local area after compensation as the optimization goal, and solve and obtain the optimal tool offset coefficient range that meets the plane accuracy requirements of each local area; The optimal tool offset coefficient acquisition module is used to consider the interaction between the processing trajectories, and to minimize the sum of square errors of the entire plane to be processed after compensation, and to calculate the optimal tool offset coefficient of each local area; The actual compensation trajectory acquisition module is used to convert the optimal tool offset parameters and tool diameter information obtained by the optimal tool offset coefficient acquisition module into offset information of machine tool coordinates by means of coordinate transformation, correct the ideal trajectory of machining, and obtain the actual compensation trajectory for compensation, which is used for real-time error compensation during machining; The module for obtaining the optimal tool offset coefficient range further comprises: a module for introducing tool offset coefficients, a module for dividing a plane to be processed, an objective function module and a module for obtaining the optimal tool offset coefficient range; wherein, The tool offset coefficient introduction module is used to set the tool diameter to D and introduce the tool offset coefficient k. Then, the machine tool introduces the offset coordinate D (k0+k) during the machining process, where k0 is the default fixed tool offset coefficient. The to-be-processed plane division module is used to divide the to-be-processed plane of the workpiece into a plurality of local areas, traverse the tool offset coefficients of each local area, and calculate the meshing area between the tool trajectory under each tool offset coefficient and the to-be-processed plane to be compensated; The objective function module is used to extract the meshing area obtained by the plane division module to be processed and calculate the sum of square errors of the plane to be processed after compensation, and the minimum sum of square errors in the local area after compensation is taken as the optimization goal, that is, the objective function is: Among them, r i Represents the calculated value after compensation of the local area of ​​the plane, Represents the reference value of the local area of ​​the plane, Under different tool offset coefficients k, if the objective function is smaller, it means that the tool offset coefficient corresponding to the objective function is closer to the ideal value; The preferred tool offset coefficient range acquisition module is used to obtain the preferred tool offset coefficient range that meets the plane accuracy requirements for each local area according to the result of the objective function module; The optimal tool offset coefficient acquisition module further includes: a tool offset coefficient correction module, a square error sum calculation module of the entire plane to be processed and an optimal tool offset coefficient acquisition module; wherein, The tool offset coefficient correction module is used to take into account the interaction between trajectories and correct the tool offset coefficient of the local area by weighting the adjacent areas of the local area; The module for calculating the sum of square errors of the entire plane to be processed is used to traverse and correct the optimal bias coefficient range of each local area, and calculate the sum of square errors of the entire plane to be processed; The optimal tool offset coefficient acquisition module is used to extract the optimal tool offset coefficient of each local area when the sum of squares of the overall error of the to-be-processed plane of the to-be-processed plane calculation module is minimized.

4. The plane compensation trajectory optimization device considering the milling cutter diameter according to claim 3 is characterized in that: The plane dense error data information acquisition module further includes: a measurement device and an interpolation module; wherein, The measuring device is used to measure and obtain plane error data of a plane to be processed of a workpiece as a reference, wherein the plane error data is the difference between a measured value and a preset standard size; The interpolation module is used to condense the plane error data into plane dense error data information with a preset recognition accuracy by using an interpolation method based on spatial scattered points.

5. The plane compensation trajectory optimization device considering the milling cutter diameter according to claim 4 is characterized in that: The measuring equipment includes: a three-dimensional coordinate measuring machine, a laser interferometer and a CCD camera; wherein, The three-dimensional coordinate measuring machine is used to obtain the spatial coordinate values ​​of each measuring point on the workpiece, and calculate the geometric size, shape and position of the workpiece according to the spatial coordinate values ​​of each measuring point; The laser interferometer is used for universal length measurement of displacement using a Michelson interferometer system with the laser wavelength as a known length, and obtaining workpiece surface error data information; The CCD camera is used to obtain the distance information of each measuring point by means of image processing calculation.