Five-axis numerical control machining G code rotating shaft abnormal feeding cutter location point recognition and correction method

By extracting and analyzing the G-code coordinate data of CNC machining, the defective tool sites of abnormal feeding of the rotation axis in five-axis CNC machining are accurately identified and corrected, and the problem of identification and correction in the prior art is solved, and the processing accuracy and efficiency are improved.

CN119511939AActive Publication Date: 2025-02-25XI AN JIAOTONG UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411646835.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-02-25
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

The prior art is difficult to accurately identify and correct defective tool sites caused by abnormal feeding of the rotation axis in five-axis CNC machining during CNC machining, resulting in an increase in nonlinear errors and affecting machining accuracy and efficiency.

Method used

By extracting coordinate data of the X-axis, Y-axis, Z-axis, A-axis, and C-axis from the G code, calculating the feed amount of each axis and the rotation axis speed, combining the extended line displacement and angle conversion, determining and classifying the abnormal feed tool points of the rotation axis, and using different correction methods to correct it.

Benefits of technology

It realizes the effective identification and correction of abnormal feed tool points of the rotating shaft before processing, improves machining accuracy and efficiency, reduces vibration of the machine tool mechanical structure, and ensures the surface quality of the workpiece.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119511939A_ABST
    Figure CN119511939A_ABST
Patent Text Reader

Abstract

The invention discloses a five-axis numerical control machining G code rotating shaft abnormal feeding cutter location point recognition and correction method. Firstly, five-axis coordinate data are extracted from a G code; calculating kinematics characteristics such as expansion line displacement and movement speed, judging the state of the cutter location point, and determining whether the cutter location point is an abnormal feeding cutter location point of the rotating shaft; then judging whether the cutter location point is a rotating shaft rotating speed overrun cutter location point or not based on whether the nonlinear error is out of tolerance or not, and classifying each abnormal feeding cutter location point; and finally, reselecting a correct rotation shaft angle to correct a multi-solution selection error cutter location point, obtaining a correct feed amount based on C-axis constant-speed rotation, reconstructing a C-axis rotation angle to correct a machine tool singular cutter location point, and reconstructing a linear axis and a rotation shaft coordinate based on an allowable value of a nonlinear error to correct a rotation shaft rotation speed over-limit cutter location point. According to the method, the kinematics characteristic defect cutter location point can be identified before machining, and intelligent diagnosis and optimization of the G code rotating shaft defect coordinate position are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of numerical control machine tools, and in particular relates to a method for identifying and correcting abnormal feed tool position points of a five-axis numerical control machining G code rotating axis. Background Art

[0002] CNC machining requires CAD 3D modeling, CAM post-processing to generate G code, and then inputting the G code into the CNC system for machining. During the CAM processing, the complex surface model will be discretized into a huge number of tiny straight line segments to approximate the original curve, and then form a G code composed of tiny straight line segments in the form of G1, that is, the tool machining path. For five-axis linkage machine tools, the G code coordinates include linear axis coordinates and rotary axis coordinates. The linear axis feed and rotary axis feed are coordinated and restricted with each other. The ratio of linear axis feed and rotary axis feed affects the efficiency and quality of part machining. However, in the CAM post-processing process, only the stroke and feed direction of the rotary axis are constrained, and the ratio of the feed amount of the rotary axis and the linear axis is not considered, which will cause defective tool positions where the rotary axis feeds abnormally, resulting in increased nonlinear errors and affected machining accuracy; abnormal feed G code segments of the rotary axis will also cause uneven feed of the rotary axis, drastic changes in acceleration and jerk, and induce vibration of the mechanical structure of the machine tool, affecting machining accuracy and efficiency; sometimes there is an excessive feed amount and excessive tool feed speed at the defective tool position, causing the rotation speed of the rotary axis to exceed the capability of the servo drive, and the various feed axes of the machine tool are in an unstable operating state.

[0003] At present, there are many mature studies on tool path micro-segment fitting, G code trajectory and tool axis vector smoothing, but there is a lack of accurate and effective identification and correction methods for kinematic feature defect tool position points. Some foreign CNC companies use visual integrated software identification methods (SIEMENS SINUMERIK Analyze My Workpiece / Toolpath Operating Manual) or can identify geometric feature defects based on defect feature parameter identification (Li Zhenhan, Jiang Haiqing, Hui Enming, etc. A method for obtaining machining feature points in tool path and its application: China, 104656558B

[0004] [P].2015-05-27), but it can only be simulated and analyzed after processing, and it is impossible to identify all defective tool positions, which cannot meet the purpose of effective preprocessing of G code micro-segment spline fitting. Summary of the invention

[0005] In order to overcome the shortcomings of the above-mentioned prior art, the purpose of the present invention is to provide a method for identifying and correcting abnormal feed tool position points of the G-code rotating axis in five-axis CNC machining, which can effectively solve the problem of identifying defective tool position points before machining, and at the same time screen the abnormal tool position points of the rotating axis and make corrections, thereby realizing intelligent diagnosis and analysis of the defective coordinate positions of the G-code.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is:

[0007] A method for identifying and correcting abnormal feed tool position points of a five-axis CNC machining G code rotary axis comprises the following steps:

[0008] 1) Extract the coordinate data of the X-axis, Y-axis, Z-axis, A-axis, and C-axis from the G code;

[0009] 2) Determination of abnormal feed tool position of rotary axis;

[0010] 3) Determination of abnormal feed tool position type of rotary axis;

[0011] 4) Correction of abnormal feed tool position of rotary axis.

[0012] The step 1) is specifically as follows: removing the address characters in the dimension characters from the G code .nc format file, and separating and extracting the coordinate data of the X-axis, Y-axis, Z-axis, A-axis, and C-axis.

[0013] The step 2) is specifically as follows: the feed amount of each axis is calculated by the coordinate data extracted in step 1), and then the rotation speed and extension line displacement of the rotating axis during the processing are calculated; a series of continuous adjacent tool position points in the G code are set as P 1 ,P 2 ,P 3 ......P i ,P n-1 ,P n , the i-th point is Its previous point, i-1th point, is The i+1th point is The motion speed is calculated according to formula (1), and the extension line displacement is calculated according to formula (2). The above formula (1) and formula (2) are combined to establish the relationship between the rotation axis speed, the G code coordinates, and the preset feed speed formula (3). The feed state of the tool position point is evaluated according to formula (4). If the formula (4) is not satisfied, the tool position point P is determined to be i It is the abnormal feed tool position of the rotary axis;

[0014]

[0015] In the formula, t i is the processing time, F 0 is the feed speed, vAi , v Ci is the rotation speed of the rotating shaft, ΔX i , ΔY i , ΔZ i , is the feed amount of each feed axis, Δs is the expansion line displacement, a 1 , a 2 is the coefficient for converting angle into displacement length, v Amax The maximum rotation speed of the rotating shaft allowed by the servo drive system. is the A-axis coordinate value at the tool position point, is the C-axis coordinate value of the tool position point, and Δθ is the angle change between two adjacent tool position points.

[0016] The step 3) is specifically as follows: classify and judge according to the characteristics of the abnormal feed tool positions of the three rotary axes:

[0017] 3.1) Determine whether the wrong tool position point is selected for multiple solutions: The tool axis vector is calculated by the screw theory, as shown in formula (5). When the rotation axis coordinates are inversely calculated according to the screw theory, there are two solutions corresponding to the A-axis and C-axis travel ranges, as shown in formulas (6) and (7). i , need to be consistent with the previous line of tool positions The rotation axis coordinates are compared; first identify the interval of the C-axis coordinate value of the abnormal feed tool position of the rotation axis, and when the C-axis coordinate value of the abnormal feed tool position of the rotation axis When , use formula (8) to determine whether the abnormal tool position point is a multi-solution selected wrong tool position point; when the C-axis coordinate value of the abnormal feed tool position point of the rotary axis Formula (9) is used to determine whether the abnormal feed tool position of the rotary axis is a multi-solution selection error tool position. When formula (8) or formula (9) is satisfied, the abnormal feed tool position P i That is, multiple solutions select the wrong tool position point. If both formulas are not satisfied, the abnormal feed tool position point P i It does not belong to the wrong knife point selection in multiple solutions;

[0018]

[0019] In the formula, (O x ,O y ,O z ) is the tool axis vector, O x is the coordinate value of the tool axis vector on the X axis, O y is the coordinate value of the tool axis vector on the Y axis, O z is the coordinate value of the tool axis vector on the Z axis, are two A-axis rotation angle values ​​calculated based on the inverse transformation of the tool axis vector. are two C-axis rotation angle values ​​calculated based on the inverse transformation of the tool axis vector. They are the A-axis and C-axis coordinate values ​​of the abnormal feed tool position of the rotary axis respectively; The A-axis coordinate value of the point before the abnormal feed position of the rotary axis. It is the C-axis coordinate value of the point before the abnormal feed tool position of the rotary axis;

[0020] 3.2) Determine whether it is a singular tool position of the machine tool: For the tool axis vector in a singular position, there are infinitely many sets of solutions corresponding to the two rotating axes. The extremely small swing of the tool axis vector will cause a large range of rotation of the two rotating axes. The tool axis vector calculation is analyzed from the differential angle, as shown in formula (10). When the A-axis rotation angle is 0°, the movement of the C-axis will not cause the tool axis direction to change. At this time, the tool axis is in a singular state, as shown in formula (11). According to formula (12), the expression of the tool axis vector at this time is calculated. Select the abnormal tool position P with an A-axis rotation angle of 0°. i , calculate the tool axis vector to determine whether it is a machine tool singularity point; in addition, it is also necessary to determine the front and back of this tool position point;

[0021]

[0022] In the formula, θ A ,θ C is the angle between the A axis and the C axis, dO x ,dO y ,dO z is the differential representation of the X, Y, and Z tool axis vectors, dθ A ,dθ C To differentiate the angle value, J(θ A ,θ C ) is the simplified Jacobian matrix;

[0023] 3.3) Determine whether the rotation axis speed exceeds the limit of the tool position: To determine whether the speed exceeds the limit of the tool position, it is necessary to calculate the nonlinear deviation first. The nonlinear error is coupled with the chord height error to obtain the contour error. To calculate the nonlinear error, it is necessary to first calculate the abnormal feed tool position P of the rotation axis. i , and the previous knife position P i-1 Extract the coordinate information, calculate the tool axis vectors of the two tool positions respectively, as shown in formula (13), calculate the tool axis vector of the middle position of the surface in the ideal case according to formula (14), and calculate the tool axis vector of the middle position of the two tool positions according to the linear interpolation principle, as shown in formula (15). Then, calculate the nonlinear error according to formula (16) and compare the allowable value of nonlinear deviation of the machining surface [H 3 ], and then judge whether it is the nonlinear rotation axis speed exceeding the limit tool position;

[0024]

[0025] In the formula, K 1 K is the tool axis vector of the abnormal feed tool position of the rotary axis, 2 K is the tool axis vector of the line before the abnormal feed tool position of the rotary axis. 3 K is the tool axis vector at the middle position of the ideal surface, 4 is the tool axis vector at the middle position of the two tool positions, H 3 is the nonlinear deviation, L is the tool length, α is K 3 With K 4 The angle between.

[0026] The step 4) is specifically as follows: according to the identification features of the abnormal feed tool positions of the three rotary axes, different correction methods are adopted:

[0027] 4.1) Correction of wrong tool position points selected by multiple solutions: i , when the C-axis coordinate value of the defective tool position When , use formula (17) to correct; when the C-axis coordinate value of the defective tool position Formula (18) is used to correct the multiple solutions to select the wrong knife position;

[0028]

[0029] In the formula, θ A修正 ,θ C修正 are the corrected A-axis and C-axis coordinate values;

[0030] 4.2) Correction of singular tool position of machine tool: Extract the coordinate information of singular tool position And the coordinate information of the singular points in the first n lines of G code The extended line displacement is calculated according to formula (2), as shown in formula (19); then, the theoretical feed time between adjacent tool positions is calculated, as shown in formula (20); finally, assuming that the C axis rotates at a constant speed, the total feed amount of the C axis of the n+1 row is calculated, and the C axis coordinates of the singular tool position of the machine tool are reconstructed, as shown in formula (21);

[0031]

[0032] In the formula, t k is the theoretical feed time between adjacent tool positions, F k is the preset feed rate for the kth tool position, Δs k is the extension line displacement between the kth tool position point and the previous point, is the correct C-axis feed between the kth tool position and the previous point, is the corrected C-axis coordinate value of the singular point of the machine tool;

[0033] 4.3) Correction of tool position when the rotation axis speed exceeds the limit: Based on the expression for determining whether the nonlinear error exceeds the tolerance, the nonlinear error formula is a function of the A-axis and C-axis coordinates of the two tool positions of the rotation axis, as shown in formula (22); Calculate the tool position P when the speed exceeds the limit i With P i-1 The tool axis vector between the planes is formed, as shown in formula (23). On this basis, the intermediate tool axis vector is reconstructed according to formula (24), and the reconstructed tool axis vector of the tool position point is obtained as a function of the characteristic parameter m, as shown in formula (25); the reconstructed tool axis vector is used as the final tool axis vector and substituted into formula (22), and the nonlinear error is obtained as a function of the characteristic parameter m, as shown in formula (26); then, according to the relationship between the nonlinear error and the contour error, the allowable value of the nonlinear error is calculated, thereby inversely calculating the characteristic parameter m, as shown in formula (27); then, the coordinate value of the reconstructed rotating axis is calculated according to formula (28); since the feed ratio of each axis between adjacent tool positions is approximately a constant, as shown in formula (29); therefore, the coordinate value of the reconstructed linear axis is calculated according to formula (30); finally, the tool feed speed is corrected according to formula (31);

[0034]

[0035] [H 1 ]=[H 3 ]+[H 2 ] (27)

[0036]

[0037] In the formula, the initial tool axis vector is set to The final tool axis vector is set to H 3 is the nonlinear error, H 2 is the chord height error, H 1 is the contour error, It is expressed as a function of the coordinate values ​​of the rotation axis of the two tool position points, m is the characteristic parameter, is the tool axis vector reconstructed from the intermediate tool position point, x 重构 ,y 重构 ,z 重构 , It is represented by the coordinate value of each axis after the tool position point is reconstructed, k is the approximate value of the feed amount of each axis, and F 重构 is the reconstructed tool feed speed.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] The present invention analyzes the abnormal feed tool position of the rotating axis, proposes a method for determining and correcting the wrong tool position, the singular tool position of the machine tool and the tool position with excessive rotation speed of the rotating axis, and provides an effective and accurate method for improving the five-axis G code tool position with defects in kinematic characteristics. Since the present invention adopts the correction of the kinematic abnormal tool position existing in the G code tool position before processing, it has the advantages of correcting the abnormal feed tool position in advance, and then obtaining high-quality five-axis CNC machining G code tool position, and improving the processing efficiency; the present invention adopts the analysis of the rotation speed and tool feed speed during the processing process, and the abnormal feed tool position of the rotating axis will affect the rotation speed and tool feed speed during the processing process. The abnormal feed tool position of the rotating axis is further classified according to the characteristics, and the three abnormal feed tool positions are respectively identified and corrected, which can improve the stability of the speed and acceleration during the processing process, so it has the advantages of improving the surface quality of the workpiece and improving the stability of the processing process. Therefore, the present invention can meet the requirements of effective preprocessing in the early stage of G code micro-segment spline fitting, and realize the intelligent diagnosis and analysis of the defective coordinate position of the G code rotating axis. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 This is a diagram showing the C-axis speed change at the abnormal feed tool position of the rotating axis in Example 1.

[0041] Figure 2 This is a diagram showing the tool feed speed change at the abnormal feed tool position of the rotating axis in Example 1.

[0042] Figure 3 Schematic diagram of the G code trajectory and tool axis sweep surface of Example 1.

[0043] Figure 4 This is the wrong tool location mark diagram selected by multiple solutions in Example 1.

[0044] Figure 5 This is a marking diagram of the singular tool position points of the machine tool in Example 1.

[0045] Figure 6 This is a schematic diagram of nonlinear error fitting in Example 1.

[0046] Figure 7 Schematic diagram of the middle tool axis vector in two situations of Example 1.

[0047] Figure 8 This is a diagram showing the tool position markings for the rotating shaft speed exceeding the limit in Example 1.

[0048] Fig. 9 This is a diagram showing the change in tool feed speed before and after correction of the abnormal feed tool position of the rotating axis in Example 1.

[0049] Fig.10 This is a diagram showing the change in tool feed speed before and after correction of the abnormal feed tool position of the rotating axis in Example 1.

[0050] Fig.11 This is a comparison diagram of the tool axis sweep surface before and after correction of the erroneous abnormal point selected in multiple solutions of Example 1.

[0051] Fig.12 This is a schematic diagram of the deviation of the swept surface of the tool axis in Example 2.

[0052] Fig.13 This is a diagram showing the change in tool feed speed before and after correction of the tool position where the rotation axis speed of a hub component exceeds the limit in Example 2. DETAILED DESCRIPTION

[0053] The present invention is described in detail below in conjunction with embodiments and drawings.

[0054] Example 1, taking the S specimen as an example, a method for identifying and correcting abnormal feed tool position points of a five-axis CNC machining G code rotary axis includes the following steps:

[0055] 1) Extract the coordinate data of the X-axis, Y-axis, Z-axis, A-axis, and C-axis from the G code:

[0056] The G code in .nc format includes dimension words, preparation function words, auxiliary function words, spindle speed function words and tool function words. To extract the coordinate information of the tool path in the G code, remove the address characters in the dimension words, such as X, Y, Z, etc., from the .nc format file; remove the preparation function words G..., auxiliary function words M..., feed function words F..., spindle speed function words S... and tool function words T... in the file, and separate and extract the coordinate data of the X-axis, Y-axis, Z-axis, A-axis and C-axis;

[0057] 2) Determination of abnormal feed tool position of the rotary axis: Calculate the feed amount of the adjacent tool positions of each axis through the coordinate data extracted in step 1), and then calculate the rotation speed and expansion line displacement of the rotary axis during the processing; let a series of continuous adjacent tool positions in the G code be P 1 ,P 2 ,P 3 ......P i ,P n-1 ,P n , the i-th point is Its previous point, i-1th point, is The i+1th point is Since the machining path between adjacent tool positions is very short and the machining time is usually 2ms, the movement between adjacent tool positions can be approximated as uniform motion. Therefore, the average speed calculation formula is used here to approximate the instantaneous speed at the equivalent tool position. Therefore, the movement speed is calculated according to formula (1), and the extended line displacement is calculated according to formula (2). The above formulas (1) and (2) are combined to establish the relationship between the rotation axis speed, the G code coordinates, and the preset feed speed. Formula (3) At the same time, the feed state of the tool position is evaluated according to formula (4). The ratio of the rotation angle of the rotation axis to the extended line displacement is defined as the rotation axis feed state evaluation parameter. When the rotation axis is in a stable operation state, the rotation axis speed should be less than the maximum speed allowed by the servo drive system. Therefore, the ratio of the rotation axis feed amount to the extended line displacement at any tool position should be less than the ratio between the maximum speed allowed by the servo system and the tool feed speed. If formula (4) is not satisfied, it is determined that the tool position P i It is the abnormal feed tool position of the rotary axis;

[0058] The S specimen was used as an example to determine the abnormal feed tool position of the rotating axis. After calculation, the S specimen had a total of 461 tool positions, the upper limit of the speed of the A axis was 6.4r / min, the upper limit of the speed of the C axis was 13.8r / min, and there were 22 abnormal feed tool positions of the rotating axis. The G code coordinate information of the defective points is shown in Table 1 below. The preset tool feed speed of each tool position is 5000mm / min; at the abnormal feed tool position of the rotating axis, the rotating axis speed and the tool feed speed changed dramatically, such as Figure 1 and Figure 2 As shown, tool positions 1-19 in the figure are tool positions where the rotation axis speed exceeds the limit; tool positions 20 and 22 are tool positions where multiple solutions select errors; and 21 is a singular tool position of the machine tool. It can be seen from the figure that the rotation axis speed and tool feed speed fluctuate violently at the tool positions where multiple solutions select errors and the singular tool positions of the machine tool, and the rotation axis speed approaches the limit speed, which seriously affects the machining stability and the coordination of the five-axis linkage. At the tool position where the rotation axis speed exceeds the limit, since the tool feed speed preset in the G code is too large, the speed is constrained by the boundary of the servo system, resulting in violent fluctuations in the speed of the C axis, a sudden drop in the tool feed speed, and machining at a speed far lower than the preset feed speed value, which seriously affects the machining efficiency and quality.

[0059]

[0060]

[0061] In the formula, t i is the processing time, F 0 is the feed speed, v Ai ,v Ci is the rotation speed of the rotating shaft, ΔX i , ΔYi , ΔZ i , is the feed amount of each feed axis, Δs is the expansion line displacement, a 1 , a 2 is the coefficient for converting angle into displacement length, v Amax The maximum rotation speed of the rotating shaft allowed by the servo drive system. is the A-axis coordinate value at the tool position point, is the C-axis coordinate value of the tool position point, Δθ is the angle change between two adjacent tool position points;

[0062] Table 1 G code defect recognition results of S-shaped specimen

[0063]

[0064]

[0065] 3) Determination of the type of abnormal feed tool position of the rotary axis: Classify and judge according to the characteristics of the three types of abnormal feed tool positions of the rotary axis:

[0066] 3.1) Determine whether the wrong tool position point is selected for multiple solutions: The maximum stroke of the A axis of the dual rotary table five-axis machine tool is [-π,π], and the maximum stroke of the C axis is [0,2π]. The kinematic model of the dual rotary table five-axis machine tool is established by the screw theory, and the conversion formula between the machine tool coordinate system and the workpiece coordinate system is obtained, thereby obtaining the kinematic transformation formula of the rotary axis, as shown in formula (5), and the tool axis vector is calculated; and when the rotary axis coordinates are inversely calculated according to the screw theory, there are two solutions corresponding to the A axis and C axis travel ranges, as shown in formulas (6) and (7). Although the tool axis vectors corresponding to different solutions are the same, different solutions correspond to different nonlinear errors and different sweep surfaces. Therefore, selecting the wrong rotary axis coordinate value will cause the surface quality to deteriorate; if the wrong A and C axis coordinates are selected, the A axis coordinate value in the two adjacent lines of G code may be reversed, and the C axis coordinate may jump by about 180 degrees. Ideally, the rotary axis coordinates of adjacent G codes are continuous. Therefore, an abnormal rotary axis feed tool position point P i , need to be consistent with the previous line of tool positions The rotation axis coordinates are compared; first identify the interval of the C-axis coordinate value of the abnormal feeding tool position of the rotation axis, then calculate the rotation axis coordinate change value between the abnormal feeding tool position of the rotation axis and the previous tool position, and determine whether the wrong tool position is selected by multiple solutions by comparing the correct angle change value; the C-axis coordinate value When , use formula (8) to determine whether the abnormal tool position point is a multi-solution selected wrong tool position point; when the C-axis coordinate value of the abnormal feed tool position point of the rotary axis Formula (9) is used to determine whether the abnormal feed tool position of the rotary axis is a multi-solution selection error tool position. When formula (8) or formula (9) is satisfied, the abnormal feed tool position P i That is, the multiple solution selection error tool position point, if both formulas are not satisfied, then the abnormal feed tool position point does not belong to the multiple solution selection error tool position point;

[0067]

[0068] In the formula, (O x ,O y ,O z ) is the tool axis vector, O x is the coordinate value of the tool axis vector on the X axis, O y is the coordinate value of the tool axis vector on the Y axis, O z is the coordinate value of the tool axis vector on the Z axis, are two A-axis rotation angle values ​​calculated based on the inverse transformation of the tool axis vector. are two C-axis rotation angle values ​​calculated based on the inverse transformation of the tool axis vector. They are the A-axis and C-axis coordinate values ​​of the abnormal feed tool position of the rotary axis respectively;

[0069] In the S specimen, there are multiple solutions and wrong tool position selection. The tool axis sweep surface is as follows Figure 3 As shown in the partial enlarged figure, the rotation axis feeds abnormally greatly. Due to the selection of the wrong rotation axis coordinate value, the nonlinear error becomes larger, and the actual processing trajectory deviates greatly from the theoretical tool path trajectory, which leads to obvious cuts on the workpiece surface, affecting the processing quality. For the 22 rows of the rotation axis abnormal feed tool position points of the example S test piece, two multi-solution selected wrong tool position points are identified. The tool position position positions are as follows Figure 4 As shown, the information of the wrong tool position selected by multiple solutions is shown in Table 2 below;

[0070] Table 2 Defect G codes of wrong tool position selection in multiple solutions of S-shaped specimen

[0071]

[0072]

[0073] 3.2) Determine whether it is a singular tool position of the machine tool: The singular point of the dual rotary table five-axis machine tool is mainly reflected in the rotation axis. It can be obtained from the kinematic model of the machine tool that the tool axis vector at the singular point of the dual rotary table five-axis machine tool is (0,0,1). When the tool axis vector is at a singular position, the inverse kinematic transformation equation of the machine tool has countless solutions. According to formulas (6) and (7), when the angle is solved in reverse from the tool axis vector, for the tool axis vector at a singular position, there are infinite sets of solutions corresponding to the two rotation axes. Therefore, The extremely small swing of the tool axis vector will cause a large rotation of the two rotating axes; the calculation formula of the tool axis vector is analyzed by differential angle, as shown in formula (10), and the Jacobian matrix is ​​simplified; when the A-axis rotation angle is 0°, as shown in formula (11), when the C-axis rotation angle changes, the change of the tool axis vector under the differential angle is 0. At this time, the movement of the C-axis will not cause the direction of the tool axis to change, that is, the tool axis is in a singular state. At this time, the expression of the tool axis vector is calculated using formula (12), and the tool axis vector (O x ,O y ,O z )=(0,0,1);

[0074] For the S specimen, the identified singular tool position of the machine tool is as follows: Figure 5 As shown in the figure, the tool position corresponding to the 348th line of G code belongs to the singular point of the machine tool, and from the G code coordinate value, the tool position corresponding to the 344-347 lines of code belongs to the singular area, the A-axis and C-axis feed are 0, and in this processing section, the logical position of the C-axis changes from 26.567 degrees to 14.032 degrees; the G code coordinate information is as follows:

[0075] N343 G1 X160.064 Y82.171 Z.007A-.039 C26.567 F5000.

[0076] N344 G1 X158.186 Y89.486 Z0.0 A0.0F5000.

[0077] N345 G1 X156.474 Y96.335 F5000.

[0078] N346 G1 X155.371 Y100.746 F5000.

[0079] N347 G1 X154.013 Y106.181 F5000.

[0080] N348 G1 X153.32 Y108.952 Z.004A.025 C14.032 F5000.

[0081]

[0082] In the formula, θ A ,θ C is the angle between the A axis and the C axis, dO x ,dO y ,dO z is the differential representation of the X, Y, and Z tool axis vectors, dθ A ,dθ C To differentiate the angle value, J(θ A ,θ C ) is the simplified Jacobian matrix;

[0083] 3.3) Determine whether it is the rotation axis speed exceeding the tool position: At the rotation axis speed exceeding the tool position, the rotation axis speed exceeds the maximum speed allowed by the servo drive, and the tool axis nonlinear error exceeds the accuracy requirement; to determine the speed exceeding tool position, it is necessary to first calculate the nonlinear deviation, and the nonlinear error is coupled with the chord height error to obtain the contour error. The relationship between the nonlinear error and the contour error is as follows: Figure 6 As shown in the figure, it can be obtained that to calculate the nonlinear error, it is necessary to find out the distance between the machining path of two adjacent G code tool positions in theory and the actual tool path. Therefore, according to the tool axis vectors at the first and last tool positions, the tool axis vectors at the intermediate positions of theory and reality are calculated. The distance between the tool axis vectors at the two intermediate positions is the nonlinear error. Then, according to the comparison between the nonlinear error and the allowable value, it can be judged whether the abnormal feed tool position of the rotary axis is the tool position where the rotary axis speed exceeds the limit. The specific calculation process is as follows: first, the abnormal feed tool position P of the rotary axis is calculated. i , and the previous knife position P i-1 , calculate the tool axis vector, as shown in formula (13). Specifically, the tool axis vector at the middle position of the surface under ideal conditions is obtained according to formula (14). In addition, according to the principle of linear interpolation, the tool axis vector at the middle position of the two tool positions is calculated, as shown in formula (15). Then, according to the geometric relationship between the height of the nonlinear error and the tool length, the nonlinear error is calculated using formula (16). Finally, it is compared with the allowable value of nonlinear deviation of the machining surface [H 3 ] to compare and then judge whether it is the nonlinear rotation axis speed exceeding the limit tool position; Figure 7 The two intermediate position tool axis vectors and the process of using the intermediate position tool axis vector to calculate the nonlinear error are described. For the S specimen, after characteristic analysis, 19 tool position locations where the rotation axis speed exceeds the limit are found. The tool position locations are as follows: Figure 8 The tool position coordinate information is shown in Table 3 below;

[0084]

[0085] In the formula, K 1K is the tool axis vector of the abnormal feed tool position of the rotary axis, 2 K is the tool axis vector of the line before the abnormal feed tool position of the rotary axis. 3 K is the tool axis vector at the middle position of the ideal surface, 4 is the tool axis vector at the middle position of the two tool positions, H 3 is the nonlinear deviation, L is the tool length, α is K 3 With K 4 The angle between.

[0086] Table 3 G codes for the tool position where the rotation axis speed of the S-shaped specimen exceeds the limit

[0087]

[0088]

[0089] 4) Correction of abnormal feeding tool position of rotating axis: According to the identification methods of three abnormal feeding tool position of rotating axis, different correction methods are proposed:

[0090] 4.1) Correction of wrong tool position points selected by multiple solutions: In the discretized machining trajectory, each tool position point corresponds to two sets of rotation axis coordinate solutions, among which the correct solution is the solution that is closest to the rotation axis coordinate value of the adjacent tool position point; according to the determination method of selecting the wrong tool position point by multiple solutions, the A-axis coordinate is inverted and the C-axis coordinate jumps 180° to correct it. The specific embodiment correction process is as follows: two wrong tool position points selected by multiple solutions are corrected. The first one is corrected by formula (18) and the second one is corrected by formula (17), so that the rotation axis feed amount between the two adjacent tool position points is reduced after correction. The corrected G code is shown in Table 4 below. The rotation axis speed and tool feed speed are improved after correction, as shown in Table 4. Fig. 9 and Fig.10 As shown in the figure, from the comparison of the speed before and after correction, the use of this correction method can effectively reduce the speed fluctuation, the speed is no longer close to the limit speed, and the speed curve of the adjacent processing section is smoother. From the perspective of the change in tool feed speed, the feed speed of the wrong tool position selected by multiple solutions will be sharply reduced to 0 before correction. After correction, the tool feed speed is significantly improved, the tool feed fluctuation of the adjacent processing section is reduced, and the feed stability is effectively improved. In addition, from Fig.11 Comparison of the tool axis sweep surface before and after correction shows that there are two obvious bulges on the tool axis sweep surface before optimization. After optimization, the bulges on the tool axis sweep surface disappear, the machining trajectory becomes smoother, and the surface quality of the workpiece is improved.

[0091]

[0092] In the formula, θ A修正 ,θ C修正 are the corrected A-axis and C-axis coordinate values;

[0093] Table 4 G code after correction of wrong tool position point selected by multiple solutions for S-shaped specimen

[0094]

[0095] 4.2) Correction of singular tool position of machine tool: Figure 1 and Figure 2 The rotation speed and tool feed speed change diagram show that at the singular tool position of the machine tool, the rotation speed of the rotary axis will exceed the upper limit of the servo drive system, and the tool feed speed will also be in an unstable state. Therefore, for the correction of the singular point of the machine tool, on the one hand, the rotation speed of the rotary axis should be controlled within the capacity of the servo drive, and on the other hand, the stability of the tool feed should be guaranteed as much as possible to control the instantaneous acceleration of the tool. According to the identification conditions of the singular tool position, it can be known that in the tool position file, several tool positions before the singular tool position are singular points. According to the differential motion formula (11) of the tool axis vector, at the singular point, the tool axis direction is not affected by the C-axis coordinate. Therefore, according to the total feed amount of the C-axis in the singular area, the C-axis coordinate value of the singular point is reconstructed, which can improve the abnormal feeding of the rotary axis without changing the direction of the tool axis. The G code of the singular area of ​​the S specimen is corrected, and the expansion is calculated according to formula (2). Line displacement, as shown in formula (19); then, the theoretical feed time between adjacent tool positions is calculated, as shown in formula (20); since the correction target is to make the C-axis feed speed change small, that is, the C-axis feeds at a constant speed under ideal conditions, the C-axis is assumed to rotate at a constant speed, and the total feed amount of the n+1 rows of C-axis is calculated to reconstruct the C-axis coordinates of the singular tool position of the machine tool, as shown in formula (21). The corrected G code coordinate information is shown in Table 5. After changing the C-axis coordinates, the abnormal tool position is effectively optimized. Comparing the speed and tool feed speed changes before and after the correction, the speed of the rotating axis in the singular area before the correction will change sharply, close to the limit speed. After the C-axis coordinate correction, the speed is significantly optimized, and the speed fluctuation of the tool position in the singular area is reduced. From the perspective of tool feed speed, the correction can reduce the change of tool feed speed, and even maintain the specified feed speed for processing, as shown in Fig. 9 and Fig.10 As shown;

[0096]

[0097] In the formula, t k is the theoretical feed time between adjacent tool positions, F k is the preset feed rate for the kth tool position, Δs k is the extension line displacement between the kth tool position point and the previous point, is the correct C-axis feed between the kth tool position and the previous point, is the corrected C-axis coordinate value of the singular point of the machine tool;

[0098] Table 5 G code after correction of singular tool position of S-shaped specimen machine tool

[0099]

[0100] 4.3) Correction of tool position where the rotation axis speed exceeds the limit: According to the determination method of tool position where the rotation axis speed exceeds the limit, when the tool position where the speed exceeds the limit occurs, not only the rotation axis speed reaches the upper limit, but it may even cause offset during machining and the nonlinear error exceeds the allowable value. Therefore, the tool position where the speed exceeds the limit should be corrected. On the one hand, the maximum allowable nonlinear error of the workpiece should be calculated, and then the coordinate values ​​of each axis of the tool position should be reconstructed to correct the tool position where the rotation axis speed exceeds the limit. From the expression for determining whether the nonlinear error exceeds the tolerance, it can be obtained that the nonlinear error formula is a function of the coordinates of the A-axis and C-axis of the two tool positions of the rotation axis, as shown in formula (22). Calculate the tool position where the speed exceeds the limit P i With P i-1 The tool axis vector between the planes is formed, as shown in formula (23). On this basis, the intermediate tool axis vector is reconstructed according to formula (24), and the reconstructed tool position point tool axis vector is a function of the characteristic parameter m, as shown in formula (25); the reconstructed tool axis vector is used as the final tool axis vector and substituted into formula (22), and the nonlinear error is a function of the characteristic parameter m, as shown in formula (26); then, according to the relationship between the nonlinear error and the contour error, the allowable value of the nonlinear error is calculated, thereby inversely calculating the characteristic parameter m, as shown in formula (27); then, the coordinate value of the reconstructed rotating axis is calculated according to formula (28); since the feed ratio of each axis between adjacent tool positions is approximately a constant, as shown in formula (29); therefore, the coordinate value of the reconstructed linear axis is calculated according to formula (30); finally, the tool feed speed is corrected according to formula (31);

[0101]

[0102] [H 1 ]=[H 3 ]+[H 2 ] (27)

[0103]

[0104] In the formula, the initial tool axis vector is set to The final tool axis vector is set to H 3 is the nonlinear error, H 2 is the chord height error, H 1 is the contour error, It is expressed as a function of the coordinate values ​​of the rotation axis of the two tool position points, m is the characteristic parameter, is the tool axis vector reconstructed from the intermediate tool position point, x重构 ,y 重构 ,z 重构 , It is represented by the coordinate value of each axis after the tool position point is reconstructed, k is the approximate value of the feed amount of each axis, and F 重构 is the reconstructed tool feed speed.

[0105] Example 2, taking a certain wheel hub as an example, compared with Example 1, a five-axis CNC machining G code rotary axis abnormal feed tool position point identification and correction method has the following differences: Step 2) When determining the rotary axis abnormal tool position point, 5 rotary axis abnormal feed tool position points appear, all of which belong to the rotary axis speed exceeding the tool position point; Step 3.3) When determining whether it is the rotary axis speed exceeding the tool position point, the G code is as follows. In this machining area, the feed amount of the rotary axis is large. The G code has a total of 5 lines. The A axis changes from -11.8495 degrees to -7.5925 degrees, and then to -13.6960 degrees. The C axis changes from 272.2918 degrees to 170.2152 degrees. The total length of the machining trajectory is 1.033 mm. According to the G code coordinates, the machining trajectory and the tool axis sweep surface are extracted, such as Fig.12 As shown in the figure, during linear interpolation, the coordinates of the command points are distributed linearly, and the nonlinear error of the actual surface is approximately symmetrically distributed. Between adjacent tool positions, the actual machining surface is an approximately symmetrical arched surface. When the rotary axis speed exceeds the tool position limit, there is an offset phenomenon in the tool axis sweep surface between adjacent tool positions. The essence of the offset is the nonlinear deviation of the tool axis vector. In the defect-free machining section, the feed amount of the rotary axis is small, and the nonlinear deviation is only on the order of tens of microns.

[0106] N55 G1 X7.7872 Y.7391 Z-29.9787 A-11.8495 C272.2918

[0107] N56 G1 X7.6641 Y.6248 Z-29.9864 A-9.4556 C259.9482

[0108] N57 G1 X7.4231 Y.3949 Z-29.9912 A-7.5925 C215.3108

[0109] N58 G1 X7.1857 Y.1606 Z-29.9815 A-11.0285 C178.9434

[0110] N59 G1 X7.0677 Y.0409 Z-29.9716 A-13.6960 C170.2152;

[0111] Step 4.3) When correcting the tool position where the rotating shaft speed exceeds the limit, the abnormal tool position where the rotating shaft speed exceeds the limit in a hub component in the above-mentioned embodiment 2 is corrected. The allowable value of nonlinear error is 60μm, and the maximum nonlinear error of the tool axis of the original tool position is 1.748mm. After optimization, the G code coordinates of the 5 tool positions where the rotating shaft speed exceeds the limit are reconstructed to obtain 126 new tool positions. Some tool position information is shown in Table 6 below. At this time, the nonlinear error is distributed in the range of 50-57μm, which meets the accuracy requirements of the part surface, and the tool axis sweep surface is smoother. Fig.13 As shown in the figure, before correction, the tool feed speed is relatively low. Although the feed process of each processing section is stable, the feed speed will drop sharply to 0 and then change sharply to the set tool feed speed. After correcting the excessive tool position of the rotating axis speed, the tool feed speed of each processing section has been significantly optimized and greatly improved, with a maximum increase of 70mm / min. At the same time, the speed fluctuation is significantly reduced, and the processing process is smoother.

[0112] Table 6 G code after correction of the tool position of a hub component with excessive rotation speed

[0113]

[0114]

Claims

1. A method for identifying and correcting abnormal feed tool position of a five-axis CNC machining G code rotary axis, characterized in that: The following steps are involved: 1) Extract the coordinate data of the X-axis, Y-axis, Z-axis, A-axis, and C-axis from the G code; 2) Determination of abnormal feed tool position of rotary axis; 3) Determination of abnormal feed tool position type of rotary axis; 4) Correction of abnormal feed tool position of rotary axis.

2. The method according to claim 1, characterized in that The step 1) is specifically as follows: removing the address characters in the dimension characters from the G code .nc format file, and separating and extracting the coordinate data of the X-axis, Y-axis, Z-axis, A-axis, and C-axis.

3. The method according to claim 1, characterized in that The step 2) is specifically as follows: the feed amount of each axis is calculated by the coordinate data extracted in step 1), and then the rotation speed and extension line displacement of the rotating axis during the processing are calculated; a series of continuous adjacent tool positions in the G code are denoted as P1, P2, P3, ... i ,P n-1 ,P n , the i-th point is Its previous point, i-1th point, is The i+1th point is The motion speed is calculated according to formula (1), and the extension line displacement is calculated according to formula (2). The above formula (1) and formula (2) are combined to establish the relationship between the rotation axis speed, the G code coordinates, and the preset feed speed formula (3). The feed state of the tool position point is evaluated according to formula (4). If the formula (4) is not satisfied, the tool position point P is determined to be i It is the abnormal feed tool position of the rotary axis; Where, t i is the processing time, F0 is the feed speed, v Ai , v Ci is the rotation speed of the rotating shaft, ΔX i , ΔY i , ΔZ i , is the feed amount of each feed axis, Δs is the displacement of the expansion line, a1 and a2 are the coefficients for converting angle into displacement length, and v Amax The maximum rotation speed of the rotating shaft allowed by the servo drive system. is the A-axis coordinate value at the tool position point, is the C-axis coordinate value of the tool position point, and Δθ is the angle change between two adjacent tool position points.

4. The method according to claim 1, characterized in that: The step 3) is specifically as follows: classify and judge according to the characteristics of the abnormal feed tool positions of the three rotary axes: 3.1) Determine whether the wrong tool position point is selected for multiple solutions: The tool axis vector is calculated by the screw theory, as shown in formula (5). When the rotation axis coordinates are inversely calculated according to the screw theory, there are two solutions corresponding to the A-axis and C-axis travel ranges, as shown in formulas (6) and (7); the abnormal feed tool position point P of the rotation axis appears. i , need to be consistent with the previous line of tool positions The rotation axis coordinates are compared; first identify the interval of the C-axis coordinate value of the abnormal feed tool position of the rotation axis, and when the C-axis coordinate value of the abnormal feed tool position of the rotation axis When , use formula (8) to determine whether the abnormal tool position is a wrong tool position selected by multiple solutions; When the rotary axis feeds the tool position abnormally, the C-axis coordinate value Formula (9) is used to determine whether the abnormal feed tool position of the rotary axis is a multi-solution selection error tool position. When formula (8) or formula (9) is satisfied, the abnormal feed tool position P i That is, multiple solutions select the wrong tool position point. If both formulas are not satisfied, the abnormal feed tool position point P i It does not belong to the wrong knife point selection in multiple solutions; In the formula, (O x ,O y ,O z ) is the tool axis vector, O x is the coordinate value of the tool axis vector on the X axis, O y is the coordinate value of the tool axis vector on the Y axis, O z is the coordinate value of the tool axis vector on the Z axis, are two A-axis rotation angle values ​​calculated based on the inverse transformation of the tool axis vector. are two C-axis rotation angle values ​​calculated based on the inverse transformation of the tool axis vector. They are the A-axis and C-axis coordinate values ​​of the abnormal feed tool position of the rotary axis respectively; The A-axis coordinate value of the point before the abnormal feed position of the rotary axis. It is the C-axis coordinate value of the point before the abnormal feed tool position of the rotary axis; 3.2) Determine whether it is a singular tool position of the machine tool: For the tool axis vector in a singular position, there are infinitely many sets of solutions corresponding to the two rotating axes. The extremely small swing of the tool axis vector will cause a large range of rotation of the two rotating axes. The tool axis vector calculation is analyzed from the differential angle, as shown in formula (10). When the A-axis rotation angle is 0°, the movement of the C-axis will not cause the tool axis direction to change. At this time, the tool axis is in a singular state, as shown in formula (11). According to formula (12), the expression of the tool axis vector at this time is calculated. Select the abnormal tool position P with an A-axis rotation angle of 0°. i , calculate the tool axis vector to determine whether it is a machine tool singularity point; in addition, it is also necessary to determine the front and back of this tool position point; In the formula, θ A ,θ C is the angle between the A axis and the C axis, dO x ,dO y ,dO z is the differential representation of the X, Y, and Z tool axis vectors, dθ A ,dθ C To differentiate the angle value, J(θ A ,θ C ) is the simplified Jacobian matrix; 3.3) Determine whether the rotation axis speed exceeds the limit of the tool position: To determine whether the speed exceeds the limit of the tool position, it is necessary to calculate the nonlinear deviation first. The nonlinear error is coupled with the chord height error to obtain the contour error. To calculate the nonlinear error, it is necessary to first calculate the abnormal feed tool position P of the rotation axis. i , and the previous knife position P i-1 Extract the coordinate information, calculate the tool axis vectors of the two tool positions respectively, as shown in formula (13), calculate the tool axis vector of the middle position of the surface in the ideal case according to formula (14), and in addition, calculate the tool axis vector of the middle position of the two tool positions according to the linear interpolation principle, as shown in formula (15), and then calculate the nonlinear error according to formula (16), compare the allowable value of nonlinear deviation of the machining surface [H3], and then judge whether it is the tool position where the rotation axis speed exceeds the limit due to nonlinear deviation; Where K1 is the tool axis vector of the abnormal feed tool position of the rotary axis, K2 is the tool axis vector of the line before the abnormal feed tool position of the rotary axis, K3 is the tool axis vector of the middle position of the ideal surface, K4 is the tool axis vector of the middle position of the two tool positions, H3 is the nonlinear deviation, L is the tool length, and α is the angle between K3 and K4.

5. The method according to claim 1, characterized in that The step 4) is specifically as follows: according to the identification features of the abnormal feed tool positions of the three rotary axes, different correction methods are adopted: 4.1) Correction of wrong tool position points selected by multiple solutions: i , when the C-axis coordinate value of the defective tool position When , use formula (17) to correct; when the C-axis coordinate value of the defective tool position Formula (18) is used to correct the multiple solutions to select the wrong knife position; In the formula, θ A修正 ,θ C修正 are the corrected A-axis and C-axis coordinate values; 4.2) Correction of singular tool position of machine tool: Extract coordinate information of singular tool position And the coordinate information of the singular points in the first n lines of G code The extended line displacement is calculated according to formula (2), as shown in formula (19); then, the theoretical feed time between adjacent tool positions is calculated, as shown in formula (20); finally, assuming that the C axis rotates at a constant speed, the total feed amount of the C axis of the n+1 row is calculated, and the C axis coordinates of the singular tool position of the machine tool are reconstructed, as shown in formula (21); Where, t k is the theoretical feed time between adjacent tool positions, F k is the preset feed rate for the kth tool position, Δs k is the extension line displacement between the kth tool position point and the previous point, is the correct C-axis feed between the kth tool position and the previous point, is the corrected C-axis coordinate value of the singular point of the machine tool; 4.3) Correction of tool position when the rotation axis speed exceeds the limit: Based on the expression for determining whether the nonlinear error exceeds the tolerance, the nonlinear error formula is a function of the A-axis and C-axis coordinates of the two tool positions of the rotation axis, as shown in formula (22); Calculate the tool position P when the speed exceeds the limit i With P i-1 The tool axis vector between the planes is formed, as shown in formula (23). On this basis, the intermediate tool axis vector is reconstructed according to formula (24), and the reconstructed tool axis vector of the tool position point is obtained as a function of the characteristic parameter m, as shown in formula (25); the reconstructed tool axis vector is used as the final tool axis vector and substituted into formula (22), and the nonlinear error is obtained as a function of the characteristic parameter m, as shown in formula (26); then, according to the relationship between the nonlinear error and the contour error, the allowable value of the nonlinear error is calculated, thereby inversely calculating the characteristic parameter m, as shown in formula (27); then, the coordinate value of the reconstructed rotating axis is calculated according to formula (28); since the feed ratio of each axis between adjacent tool positions is approximately a constant, as shown in formula (29); therefore, the coordinate value of the reconstructed linear axis is calculated according to formula (30); finally, the tool feed speed is corrected according to formula (31); [H1]=[H3]+[H2] (27) x 重构 =x1+m(x2-x1) yes 重构 =y1+m(y2-y1)(30) z 重构 =z1+m(z2-z1) In the formula, the initial tool axis vector is set to The final tool axis vector is set to is the nonlinear error, H2 is the chord height error, H1 is the contour error, It is expressed as a function of the coordinate values ​​of the rotation axes of the two tool position points, m is the characteristic parameter, is the tool axis vector reconstructed from the intermediate tool position point, x 重构 ,y 重构 ,z 重构 , It is represented by the coordinate value of each axis after the tool position point is reconstructed, k is the approximate value of the feed amount of each axis, F 重构 is the reconstructed tool feed speed.

Citation Information

Patent Citations

  • A Method and Its Application of Obtaining Machining Feature Points in Tool Trajectory

    CN104656558B

  • Error-control-based smooth interpolation method for five-axis NC (numerical control) system

    CN103801982A

  • Control method for nonlinear error between five-axis machining tool nose point and tool axis direction

    CN111913438A

  • Coarse and fine step-by-step screening method for G code defect coordinates in three-axis numerical control machining

    CN113485245A

  • Defect cutter location point identification method based on flaw type

    CN115016394A