A post-processing optimization method and system for five-axis machining

CN122923983APending Publication Date: 2026-10-16SHENZHEN JUNCHENG PRECISION MFG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611135366.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

该方案侧重于运动学奇异点的检测与补偿,但在干涉预判和轨迹平滑优化方面未做系统性整合,缺少基于刀具轨迹特征的干涉预判机制,也未将轨迹平滑与干涉规避进行协同处理,导致后置处理输出的加工代码在干涉安全性与轨迹平滑性之间难以兼顾

Benefits of technology

[0017] This invention discloses a post-processing optimization method and system for five-axis CNC machining. First, a kinematic model is constructed based on the structural parameters of the five-axis machine tool. Then, the geometric and attitude features of the tool trajectory are extracted, and interference prediction is performed based on the kinematic model. Subsequently, attitude correction is applied to trajectory segments with interference risk. Then, trajectory smoothing is performed to obtain the optimized tool trajectory, which is finally converted into CNC machining code output. By driving interference prediction and correction and trajectory smoothing through the kinematic model, this solution can avoid machining interference risks, improve tool trajectory smoothness and machining accuracy, and shorten the machining cycle. It is suitable for efficient five-axis CNC machining of complex parts in aerospace, precision mold, and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122923983A_ABST
    Figure CN122923983A_ABST
Patent Text Reader

Abstract

The application provides a post-processing optimization method and system for five-axis linkage, first constructs a kinematic model according to the structural parameters of a five-axis machine tool, then extracts geometric features and posture features of a tool path and performs interference pre-judgment based on the kinematic model, subsequently performs posture correction on the tool path segment with interference risk according to the kinematic model, then performs trajectory smoothing processing on the corrected tool path to obtain an optimized tool path, and finally converts the optimized tool path into numerical control machining code and outputs; the application drives the cooperative processing of interference pre-judgment and correction and trajectory smoothing through the kinematic model, effectively avoids machining interference risks, improves the smoothness of the tool path and machining precision, and shortens the machining cycle.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of CNC machining technology, and more specifically, to a post-processing optimization method and system for five-axis linkage. Background Technology

[0002] Five-axis CNC machining is a core technology for manufacturing complex curved surface parts in aerospace, precision mold making, and other fields. The post-processing stage is responsible for converting the tool position source file into CNC machining code adapted to the specific machine tool structure; its processing quality directly affects the final machining accuracy and efficiency. However, because five-axis machine tools add two rotational degrees of freedom, the tool's attitude adjustment range in space is significantly expanded, resulting in a significantly higher risk of interference during machining compared to three-axis machining. At the same time, the smoothness of the tool path also faces greater challenges.

[0003] Chinese patent CN102393678A discloses a trajectory smoothing method suitable for five-axis CNC devices. This method achieves smoothing of the motion curves of translational and rotary axes by performing sliding convolution filtering on the tool trajectory point series, thus improving the smoothness of the trajectory to a certain extent. However, this solution only focuses on the geometric smoothing of the trajectory and does not address interference detection and avoidance during the machining process. In the machining of complex curved surfaces, collisions and interference may still occur between the tool and the workpiece or fixture. Furthermore, its smoothing parameters are fixed and cannot be adaptively adjusted according to local trajectory features.

[0004] Chinese patent CN116400646A discloses a general post-processing method for five-axis CNC machine tools based on singularity compensation. This method establishes a general inverse kinematics model using screw theory and performs interpolation compensation for abrupt changes in rotational axes within singular regions. While this approach focuses on the detection and compensation of kinematic singularities, it lacks systematic integration in interference prediction and trajectory smoothing optimization. It also lacks an interference prediction mechanism based on tool trajectory characteristics and fails to coordinate trajectory smoothing and interference avoidance, resulting in a difficulty in balancing interference safety and trajectory smoothness in the post-processed machining code.

[0005] Therefore, there is an urgent need for a post-processing solution that can systematically integrate kinematic modeling, interference prediction and correction, and trajectory smoothing optimization, so as to improve trajectory smoothness and processing efficiency while ensuring processing safety. Summary of the Invention

[0006] In view of the above problems, the purpose of this invention is to provide a post-processing optimization method and system for five-axis linkage, which can improve the smoothness of tool path and machining accuracy while avoiding machining interference risks through the coordinated processing of interference prediction and trajectory smoothing driven by kinematic model.

[0007] The first aspect of this invention provides a post-processing optimization method for five-axis linkage, comprising: constructing a kinematic model of the five-axis machine tool based on its structural parameters; extracting the geometric and attitude features of the tool trajectory; performing interference prediction on the tool trajectory based on the kinematic model; for tool trajectory segments predicted to have interference risk, performing attitude correction based on the kinematic model to obtain a corrected tool trajectory; performing trajectory smoothing processing on the corrected tool trajectory to obtain an optimized tool trajectory; and converting the optimized tool trajectory into CNC machining code and outputting it.

[0008] In this solution, the interference prediction of the tool trajectory based on the kinematic model specifically includes: setting a first interference judgment threshold and a second interference judgment threshold, wherein the second interference judgment threshold is less than the first interference judgment threshold; calculating the minimum clearance distance between the tool and the workpiece; when the minimum clearance distance is greater than the first interference judgment threshold, it is determined that there is no interference risk; when the minimum clearance distance is less than or equal to the first interference judgment threshold and greater than the second interference judgment threshold, it is determined that there is an interference warning and triggers local attitude fine-tuning; when the minimum clearance distance is less than or equal to the second interference judgment threshold, it is determined that there is a serious interference risk and triggers full-segment attitude replanning.

[0009] In this scheme, the interference prediction includes: constructing a first interference detection path, which performs interference judgment based on the spatial overlap relationship between the geometric bounding body of the tool and the workpiece model, and outputs a first interference judgment result and a first confidence level; constructing a second interference detection path, which performs interference judgment based on the distance field analysis between the tool sweep body and the workpiece model, and outputs a second interference judgment result and a second confidence level; through a collaborative judgment module, when the first interference judgment result is consistent with the second interference judgment result and both the first confidence level and the second confidence level are higher than a preset confidence level threshold, a consistent judgment result is output; when the first interference judgment result is inconsistent with the second interference judgment result, the judgment result of the detection path with higher confidence level is selected as the final interference judgment result.

[0010] This solution also includes: detecting whether the current tool trajectory segment is in the vicinity of a kinematic singularity point of the machine tool; when it is determined that the tool trajectory segment is in the vicinity of a singularity point, identifying the type of singularity region; and, based on the type of singularity region, performing interpolation processing on the rotation axis angle using a preset interpolation strategy to avoid abrupt changes in the rotation axis within the singularity region.

[0011] This solution also includes: receiving actual machine tool motion data collected by an external measuring device; comparing the actual machine tool motion data with the output data of the kinematic model to obtain kinematic deviation information; and adaptively correcting the parameters of the kinematic model based on the kinematic deviation information.

[0012] This solution also includes: collecting positioning error data of the five-axis machine tool during the machining process; constructing an error compensation model, which maps the positioning error data into a compensation vector; and superimposing the compensation vector into the correction process when correcting the tool trajectory, so as to use the positioning error data as the basis for correction.

[0013] A second aspect of the present invention provides a post-processing optimization system for five-axis linkage, comprising a memory and a processor. The memory includes a post-processing optimization method program for five-axis linkage. When the post-processing optimization method program for five-axis linkage is executed by the processor, it performs the following steps: constructing a kinematic model of the five-axis machine tool based on the structural parameters of the machine tool; extracting the geometric and attitude features of the tool trajectory; performing interference prediction on the tool trajectory based on the kinematic model; for tool trajectory segments predicted to have interference risk, performing attitude correction based on the kinematic model to obtain a corrected tool trajectory; performing trajectory smoothing processing on the corrected tool trajectory to obtain an optimized tool trajectory; and converting the optimized tool trajectory into CNC machining code and outputting it.

[0014] In this solution, the interference prediction of the tool trajectory based on the kinematic model specifically includes: setting a first interference judgment threshold and a second interference judgment threshold, wherein the second interference judgment threshold is less than the first interference judgment threshold; calculating the minimum clearance distance between the tool and the workpiece; when the minimum clearance distance is greater than the first interference judgment threshold, it is determined that there is no interference risk; when the minimum clearance distance is less than or equal to the first interference judgment threshold and greater than the second interference judgment threshold, it is determined that there is an interference warning and triggers local attitude fine-tuning; when the minimum clearance distance is less than or equal to the second interference judgment threshold, it is determined that there is a serious interference risk and triggers full-segment attitude replanning.

[0015] In this scheme, the interference prediction includes: constructing a first interference detection path, which performs interference judgment based on the spatial overlap relationship between the geometric bounding body of the tool and the workpiece model, and outputs a first interference judgment result and a first confidence level; constructing a second interference detection path, which performs interference judgment based on the distance field analysis between the tool sweep body and the workpiece model, and outputs a second interference judgment result and a second confidence level; through a collaborative judgment module, when the first interference judgment result is consistent with the second interference judgment result and both the first confidence level and the second confidence level are higher than a preset confidence level threshold, a consistent judgment result is output; when the first interference judgment result is inconsistent with the second interference judgment result, the judgment result of the detection path with higher confidence level is selected as the final interference judgment result.

[0016] A third aspect of the present invention provides a computer-readable storage medium including a post-processing optimization method program for five-axis linkage, wherein when the post-processing optimization method program for five-axis linkage is executed by a processor, it implements the steps of the post-processing optimization method for five-axis linkage as described in any of the preceding claims.

[0017] This invention discloses a post-processing optimization method and system for five-axis CNC machining. First, a kinematic model is constructed based on the structural parameters of the five-axis machine tool. Then, the geometric and attitude features of the tool trajectory are extracted, and interference prediction is performed based on the kinematic model. Subsequently, attitude correction is applied to trajectory segments with interference risk. Then, trajectory smoothing is performed to obtain the optimized tool trajectory, which is finally converted into CNC machining code output. By driving interference prediction and correction and trajectory smoothing through the kinematic model, this solution can avoid machining interference risks, improve tool trajectory smoothness and machining accuracy, and shorten the machining cycle. It is suitable for efficient five-axis CNC machining of complex parts in aerospace, precision mold, and other fields. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope.

[0019] Figure 1 A flowchart of a post-processing optimization method for five-axis linkage according to the present invention is shown; Figure 2 The flowchart of interference prediction based on multi-level thresholds provided in the embodiment of the present invention is shown; Figure 3 The flowchart of multipath interference detection and collaborative determination provided in the embodiment of the present invention is shown; Figure 4A block diagram of a post-processing optimization system for five-axis linkage according to the present invention is shown. Detailed Implementation

[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0021] Unless otherwise defined, all terms used in embodiments of this invention, including technical and scientific terms, shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in a common dictionary shall be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as being interpreted in an idealized or highly formalized sense, unless expressly defined in this embodiment of the invention.

[0022] The terms "one," "two," and similar words used in the embodiments of this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. The terms "a," "one," or similar words do not indicate a quantity limitation, but rather indicate the presence of at least one. Similarly, terms such as "include" or "contain" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. The steps preceding or following the steps in the methods of the embodiments of this invention are not necessarily performed in precise order. Instead, various steps can be processed in reverse order or simultaneously. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.

[0023] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0024] Figure 1 A flowchart of a post-processing optimization method for five-axis linkage according to the present invention is shown.

[0025] like Figure 1 As shown, the first aspect of this invention discloses a post-processing optimization method for five-axis linkage, the method comprising: S102, construct the kinematic model of the five-axis machine tool based on its structural parameters; S104, Extract the geometric and attitude features of the tool trajectory, and perform interference prediction on the tool trajectory based on the kinematic model; S106, For tool trajectory segments that are predicted to have interference risks, the attitude is corrected according to the kinematic model to obtain the corrected tool trajectory; S108, Perform trajectory smoothing processing on the corrected tool trajectory to obtain the optimized tool trajectory; S110, the optimized tool path is converted into CNC machining code and output.

[0026] It should be noted that, in this embodiment, the structural parameters of the five-axis machine tool include geometric information such as machine tool type, stroke range of each motion axis, offset between rotary axis axes, and tool mounting length. When constructing the kinematic model, a homogeneous coordinate transformation matrix is ​​used to describe the complete motion chain from the workpiece coordinate system to the tool coordinate system. The forward kinematic model is used to verify the correctness of the tool pose calculation results, while the inverse kinematic model is used to convert the tool pose into motion quantities for each axis. In engineering practice, the motion chains of different models of five-axis machine tools differ; for example, the transformation order is reversed between a double rotary table machine tool and a double swivel head machine tool. Therefore, the multiplication order of the transformation matrices needs to be configured according to the actual machine tool topology during the model construction stage. Through the above scheme, this method can adapt to five-axis machine tools of different structural types, avoiding the need to develop a separate post-processor for each machine tool. Furthermore, the model accuracy directly affects the reliability of subsequent interference judgment and attitude correction; actual measurements show that the model calculation error can be controlled within the micrometer level.

[0027] Figure 2 The flowchart of the interference prediction based on multi-level thresholds provided in the embodiment of the present invention is shown.

[0028] like Figure 2 As shown in the embodiment of the present invention, the step of predicting the interference of the tool trajectory based on the kinematic model specifically includes: S202, set a first interference judgment threshold and a second interference judgment threshold, wherein the second interference judgment threshold is less than the first interference judgment threshold; S204, calculate the minimum clearance distance between the tool and the workpiece. When the minimum clearance distance is greater than the first interference judgment threshold, it is determined that there is no interference risk. S206, when the minimum gap distance is less than or equal to the first interference judgment threshold and greater than the second interference judgment threshold, it is determined to be an interference warning and triggers local attitude fine-tuning; S208, when the minimum gap distance is less than or equal to the second interference judgment threshold, it is determined to be a serious interference risk, triggering full-segment attitude replanning.

[0029] It should be noted that existing post-processing solutions for interference detection generally use a single threshold for binary yes / no judgments. However, in actual machining, interference risk is a gradual process. If the threshold is set too high, the false negative rate is high, and collisions may occur suddenly during machining; if the threshold is set too low, frequent attitude replanning is triggered, resulting in high computational overhead and frequent trajectory jumps. Here, a dual-threshold hierarchical mechanism is adopted. The first interference judgment threshold is generally set to 0.5 to 1.0 times the tool diameter, with 0.8 times being commonly used as the default configuration in engineering. The second interference judgment threshold is more conservative, usually set to 0.1 to 0.3 times the tool diameter. In actual parameter tuning, it was found that for ball end mills machining free-form surfaces, a first threshold of about 0.5 mm is more reasonable, and a second threshold of 0.1 mm is considered close to the limit. The advantage of hierarchical processing is that only severe interference risks are replanned across the entire segment, while minor risks are only fine-tuned locally. This ensures interference safety and compresses the computational load of trajectory correction to the actual required position, reducing the average time of the entire post-processing by about 30% to 40%.

[0030] Figure 3 A flowchart of multipath interference detection and collaborative determination provided by an embodiment of the present invention is shown.

[0031] like Figure 3 As shown in the embodiment of the present invention, the interference prediction includes: S302, construct a first interference detection path. The first interference detection path makes interference judgment based on the spatial overlap relationship between the geometric bounding body of the tool and the workpiece model, and outputs the first interference judgment result and the first confidence level. S304, Construct a second interference detection path. The second interference detection path performs interference judgment based on the distance field analysis between the tool sweep body and the workpiece model, and outputs the second interference judgment result and the second confidence level. S306, through the collaborative judgment module, when the first interference judgment result is consistent with the second interference judgment result and both the first confidence level and the second confidence level are higher than the preset confidence level threshold, a consistent judgment result is output; S308, when the first interference judgment result is inconsistent with the second interference judgment result, the judgment result of the detection path with higher confidence is selected as the final interference judgment result.

[0032] It is worth noting that single interferometric detection methods have inherent blind spots. Geometric bounding volume methods, such as bounding boxes or bounding spheres, are fast, but when the tool is slender or the workpiece cavity is narrow, false alarms can occur due to overlapping bounding volumes without actual interference, leading to a decrease in confidence. The distance field method is highly accurate but computationally intensive, and its real-time performance is insufficient during global traversal. This paper introduces two heterogeneous detection paths and coordinates their decision-making to address this contradiction. The first path uses hierarchical bounding boxes for progressive refinement; the outer bounding box quickly eliminates safe areas, while the inner, precise bounding volumes only perform overlap checks in suspicious areas. The second path constructs a signed distance field within the tool sweep area, with a mesh resolution typically between 0.01 mm and 0.05 mm. The confidence calculation is related to the tightness of the bounding volumes and the stability of the distance field gradient; the preset confidence threshold is generally set to 0.7. When the tool enters a deep cavity feature, the confidence of the bounding volume method may drop below 0.5. If the confidence of the distance field method remains above 0.8, the collaborative decision-making module will automatically adopt the conclusion of the distance field method. In this way, the accuracy of interference detection is improved by about 15% to 25% compared to single methods, and the false alarm rate is significantly reduced.

[0033] Furthermore, singularity scenarios require special attention. During inverse kinematics solving of a five-axis machine tool, when the rotary axes approach certain specific angle combinations, the condition number of the Jacobian matrix increases sharply. Even minor changes in tool posture can cause drastic jumps in the rotary axis angle, which is the kinematic singularity problem. In the vicinity of singularities, the rotary axis angle output by conventional post-processing can jump instantaneously from near 0 degrees to near 180 degrees, causing severe machine tool vibration during machining, seriously affecting surface quality and even damaging the workpiece. This solution, after constructing the kinematic model in step S102, simultaneously calculates the condition number of the Jacobian matrix. When the condition number exceeds a preset singularity threshold, the current trajectory segment is identified as being in the vicinity of a singularity. This threshold is typically between 100 and 500 in engineering practice, and 300 is commonly used for dual-rotor five-axis machine tools. After identifying the singular region, two types are distinguished based on the rotary axis path: the first type is singularities caused by both rotary axes simultaneously approaching zero, and the second type is singularities caused by a single-axis path crossing. For the first type, cubic spline interpolation is used to bridge the transition between the two axes, with the number of interpolation points controlled by the sweep error area, typically ranging from 5 to 15 points. For the second type, a fifth-order polynomial smooth approximation is used to ensure the continuity of angular velocity and angular acceleration. After the above processing, the peak value of the rotational axis acceleration in the singular region is reduced from approximately 500 degrees per square second in the conventional scheme to below 80 degrees per square second, and the measured machining vibration amplitude is reduced by approximately 60%.

[0034] This solution also introduces an external measurement feedback mechanism to correct the kinematic model. During operation, the actual kinematic parameters of a five-axis machine tool will deviate from the factory nominal values ​​due to factors such as thermal deformation, guideway wear, and foundation settlement. If a model with fixed parameters is used continuously, the machining code output by the post-processor will gradually accumulate deviations. After several hours of continuous machining, the workpiece contour error may expand from the initial 0.01 mm to more than 0.05 mm. Here, external measuring devices such as laser interferometers or ballbars are used to periodically collect the actual motion data of each axis of the machine tool, compare it with the theoretical position calculated by the model, and extract two types of information: positional deviation and angular deviation. Adaptive correction uses a weighted least squares method, assigning higher weights to axes with larger deviations. The correction cycle is flexibly set according to the machining task duration; generally, a full parameter check is triggered once continuous machining exceeds two hours. Specifically, the correction threshold for the translation axis is set to 0.005 mm, and the correction threshold for the rotation axis is set to 0.001 degrees. When the deviation exceeds the threshold, the corresponding translation vector or rotation center coordinates in the model are updated. In this way, the model maintains a high degree of consistency with the actual machine tool condition throughout the entire machining cycle, and the long-term machining accuracy can be maintained at more than 90% of the original accuracy level.

[0035] Furthermore, while the positioning error of a machine tool may seem like a defect, from another perspective, it contains systematic information about deviations from specific spatial positions. Traditional solutions attempt to eliminate this error by improving the manufacturing precision of the machine tool or through frequent calibration, which is costly and difficult to eradicate. Here, a different strategy is adopted: Beforehand, a laser interferometer is used to perform gridded measurements on each axis within the machine tool's commonly used travel space, collecting positioning error data at each grid node to construct an error compensation model. This error compensation model maps the positioning error to a compensation vector in three-dimensional space. When correcting the tool trajectory's attitude, the compensation vector is superimposed along the kinematic chain axis-by-axis into the theoretical pose calculation, so that the final output CNC machining code itself carries compensation information for the machine tool's inherent deviations. For example, a certain type of five-axis machine tool has a systematic overshoot of 0.012 mm on the X-axis at a positive travel of 400 mm. The error compensation model will generate a negative compensation of approximately 0.012 mm near this position, and after superposition, the actual tool movement is closer to the theoretical position. The key to this approach is not to eliminate the error itself, but to make the error a quantifiable basis for compensation. Compared with simple periodic precision calibration, it achieves dynamic compensation throughout the entire processing, and the measured contour error is reduced by an average of about 35%.

[0036] This solution also supports a smoothing strategy selection mechanism driven by machining intent. Different machining tasks have different priorities for trajectory smoothing: finishing stages prioritize contour accuracy, roughing stages prioritize machining efficiency, and semi-finishing requires a balance between the two. In practice, operators specify the machining stage type when planning toolpaths in the CAM software, and the post-processing module matches the corresponding parameter template from a pre-set smoothing strategy library accordingly. The contour accuracy priority strategy uses a small window high-order filter, with the filter window size typically set to 3 to 5 tool positions and a polynomial order of 3; the machining efficiency priority strategy uses a large window low-order filter, with the window size extended to 9 to 15 points and the order reduced to 1; the comprehensive balance strategy lies between the two, with a window size of 5 to 9 points and an order of 2. Actual measurements show that in finishing scenarios, using the accuracy priority strategy reduces the surface roughness Ra value from 1.6 micrometers to approximately 0.8 micrometers; in roughing scenarios, using the efficiency priority strategy shortens the machining time by about 20%. This intent-based strategy avoids the limitation of using a single smoothing parameter to handle all working conditions.

[0037] Another enhancement method is to use cutting force feedback to dynamically adjust trajectory smoothing parameters. Traditionally, cutting force data is only used to monitor tool status and prevent overload, which is a passive safety protection signal. Here, the real-time force signal collected by the cutting force sensor installed at the spindle or tool holder is used in reverse to affect the trajectory smoothing process. When the cutting force fluctuation amplitude is detected to be more than 1.5 times the normal fluctuation range, it indicates that the curvature change or feed direction switch of the current trajectory segment is too drastic. At this time, the smoothing window length is automatically narrowed to 3 to 5 tool position points, and the weight of the window center point is increased to more than 0.5 to prioritize ensuring trajectory following accuracy. When the cutting force is stable and the fluctuation amplitude is within the normal range, the smoothing window is appropriately widened to 7 to 11 points, and the weight distribution tends to be more uniform to improve the overall smoothness. In this way, the cutting force changes from a traditional passive monitoring role to an input signal for actively adjusting the trajectory smoothing strategy. The post-processing and machining process form a real-time feedback closed loop, reducing the peak force impact of the tool trajectory by about 25% and extending tool life by about 15%.

[0038] Regarding the specific algorithm for trajectory smoothing, this scheme adopts a sliding convolution filtering method. However, unlike fixed-parameter filtering, the filtering parameters are adaptively adjusted based on the local geometric features of the trajectory. The tool center point trajectory is used as the first signal channel, and the tool axis vector trajectory is used as the second signal channel. The two channels are independently convolved and smoothed but share a common adaptive window scheduling mechanism. In areas where the trajectory curvature change rate exceeds the preset curvature change threshold (usually corners or abrupt changes in surface curvature), the filtering window size is adaptively reduced to 3 to 5 sampling points to ensure that the contour accuracy at corners is not distorted due to excessive smoothing. In straight segments or large-radius arc segments where the trajectory curvature change rate is below the threshold, the filtering window size is increased to 9 to 15 sampling points to fully utilize the smoothing effect. The curvature change threshold is determined based on the minimum radius of curvature of the workpiece surface and is generally set to 0.01 per millimeter. The synchronization mechanism of the two channels ensures that the smoothing results of the tool position and attitude are aligned in time, preventing inconsistencies where the position is smoothed but the attitude lags behind. Practice has shown that this adaptive filtering method reduces the contour error in corner areas by about 40% compared to fixed parameter filtering, while improving the smoothness index of straight lines by about 30%.

[0039] Furthermore, the selection of interference judgment thresholds and smoothing parameters is closely related to the workpiece material and tool type. For example, for aluminum alloys, due to lower cutting forces and smaller tool deformation, the interference judgment threshold can be appropriately tightened to the 0.05 mm level; for titanium alloys, due to higher cutting forces and easier tool deflection, the threshold needs to be relaxed to 0.15 to 0.2 mm. Similarly, ball end mills and flat end mills have different effective cutting radii. Under the same minimum clearance distance, the former has a higher actual interference risk than the latter, so the corresponding first interference judgment threshold should also be set differently. This solution pre-establishes a process parameter library, indexed by material type and tool type, storing corresponding recommended threshold groups and smoothing parameter groups, which are automatically matched during use. For new materials not covered in the library, an interpolation estimation formula based on material hardness and tool length-to-diameter ratio is provided. Through this adaptive configuration mechanism, process engineers do not need to manually adjust post-processing parameters for each new working condition, significantly shortening the preparation time for the trial cutting stage of new parts.

[0040] Please see Figure 4The present invention also provides a post-processing optimization system 4 for five-axis linkage. The system includes a memory 401 and a processor 402. The memory includes a post-processing optimization method program for five-axis linkage. When the post-processing optimization method program for five-axis linkage is executed by the processor, it performs the following steps: constructing a kinematic model of the five-axis machine tool based on the structural parameters of the five-axis machine tool; extracting the geometric and attitude features of the tool trajectory; performing interference prediction on the tool trajectory based on the kinematic model; for tool trajectory segments predicted to have interference risk, performing attitude correction based on the kinematic model to obtain a corrected tool trajectory; performing trajectory smoothing processing on the corrected tool trajectory to obtain an optimized tool trajectory; and converting the optimized tool trajectory into CNC machining code and outputting it.

[0041] It should be noted that the processor in this system can be an embedded processor built into the CNC system or a general-purpose processor from the host computer. Figure 4 The system demonstrates a host computer architecture where the memory includes a non-volatile storage area for kinematic model parameters and a temporary buffer for intermediate calculations. During system operation, the system first reads machine tool structural parameters from memory to initialize the kinematic model. Then, it reads the tool position source file (CLSF) data output by the CAM system, extracts the coordinates of each tool position point and tool axis vector line by line, loads the workpiece 3D model, and enters the interference prediction process. The interference prediction module simultaneously initiates two paths: geometric bounding volume detection and distance field detection. The collaborative judgment module integrates the results of the two paths and outputs the final interference judgment conclusion. If an interference warning or severe interference risk is detected, the attitude correction module searches for an interference-free attitude solution within the feasible domain of the tool attitude based on the inverse kinematic model. The search step size is typically set to 0.5 degrees, and the search range is limited to a 15-degree sector to the left and right of the current attitude to avoid excessive attitude jumps. The corrected trajectory is sent to the trajectory smoothing module for sliding convolution filtering and adaptive parameter adjustment. Finally, the post-processing code generation module outputs the machining file according to the machine tool controller's instruction format, such as G-code. The entire process, from reading in CLSF to outputting machining code, takes about 1.5 seconds to process 1,000 tool points on a standard personal computer, meeting the needs of actual engineering applications.

[0042] According to an embodiment of the present invention, the step of predicting interference in the tool trajectory based on the kinematic model specifically includes: setting a first interference judgment threshold and a second interference judgment threshold, wherein the second interference judgment threshold is less than the first interference judgment threshold; calculating the minimum clearance distance between the tool and the workpiece; when the minimum clearance distance is greater than the first interference judgment threshold, it is determined that there is no interference risk; when the minimum clearance distance is less than or equal to the first interference judgment threshold and greater than the second interference judgment threshold, it is determined that there is an interference warning and triggers local attitude fine-tuning; when the minimum clearance distance is less than or equal to the second interference judgment threshold, it is determined that there is a serious interference risk and triggers full-segment attitude replanning.

[0043] One more point to add is that the dual threshold parameters are designed as configurable items in the system implementation and stored in the system configuration file. Process engineers can adjust them through the human-machine interface according to the specific processing scenario. The system provides a default function for quick configuration of recommended values ​​grouped by material type, reducing the workload of manual parameter adjustment.

[0044] According to an embodiment of the present invention, the interference prediction includes: constructing a first interference detection path, wherein the first interference detection path performs interference judgment based on the spatial overlap relationship between the geometric bounding body of the tool and the workpiece model, and outputs a first interference judgment result and a first confidence level; constructing a second interference detection path, wherein the second interference detection path performs interference judgment based on the distance field analysis between the tool sweep body and the workpiece model, and outputs a second interference judgment result and a second confidence level; through a collaborative judgment module, when the first interference judgment result is consistent with the second interference judgment result and both the first confidence level and the second confidence level are higher than a preset confidence level threshold, a consistent judgment result is output; when the first interference judgment result is inconsistent with the second interference judgment result, the judgment result of the detection path with higher confidence level is selected as the final interference judgment result.

[0045] In practical applications, the two detection paths run in parallel threads within the system. The first path, due to its smaller computational load, typically returns results within 0.1 milliseconds, while the second path, involving distance field construction, takes approximately 0.5 to 1 millisecond. The collaborative decision module performs a fusion judgment upon receiving the results from both paths. For cases of obvious safety or interference, a decision can be made immediately after the first path returns without waiting for the second path. This early decision-making mechanism reduces the average decision latency by approximately 40%.

[0046] The present invention also provides a computer-readable storage medium having a computer program stored thereon, the computer-readable storage medium including a post-processing optimization method program for five-axis linkage, wherein when the post-processing optimization method program for five-axis linkage is executed by a processor, the steps of the post-processing optimization method for five-axis linkage as described above are implemented.

[0047] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A post-processing optimization method for five-axis linkage, characterized in that, The method includes: Based on the structural parameters of the five-axis machine tool, a kinematic model of the five-axis machine tool is constructed; Extract the geometric and attitude features of the tool trajectory, and perform interference prediction on the tool trajectory based on the kinematic model; For tool trajectory segments where interference risk is anticipated, attitude correction is performed based on the kinematic model to obtain the corrected tool trajectory. Perform trajectory smoothing processing on the corrected toolpath to obtain the optimized toolpath; The optimized toolpath is converted into CNC machining code and output.

2. The post-processing optimization method for five-axis linkage according to claim 1, characterized in that, The interference prediction of the tool trajectory based on the kinematic model specifically includes: A first interference judgment threshold and a second interference judgment threshold are set, wherein the second interference judgment threshold is less than the first interference judgment threshold; Calculate the minimum clearance distance between the tool and the workpiece. When the minimum clearance distance is greater than the first interference judgment threshold, it is determined that there is no interference risk. When the minimum gap distance is less than or equal to the first interference judgment threshold and greater than the second interference judgment threshold, it is determined as an interference warning and triggers local attitude fine-tuning; When the minimum gap distance is less than or equal to the second interference judgment threshold, it is determined to be a serious interference risk, triggering a full-segment attitude replanning.

3. The post-processing optimization method for five-axis linkage according to claim 1, characterized in that, The interference prediction includes: Construct a first interference detection path, which performs interference judgment based on the spatial overlap relationship between the geometric bounding volume of the tool and the workpiece model, and outputs the first interference judgment result and the first confidence level; Construct a second interference detection path. The second interference detection path performs interference judgment based on the distance field analysis between the tool sweep body and the workpiece model, and outputs the second interference judgment result and the second confidence level. Through the collaborative judgment module, when the first interference judgment result is consistent with the second interference judgment result and both the first confidence level and the second confidence level are higher than the preset confidence level threshold, a consistent judgment result is output; When the first interference judgment result is inconsistent with the second interference judgment result, the judgment result of the detection path with higher confidence is selected as the final interference judgment result.

4. The post-processing optimization method for five-axis linkage according to claim 1, characterized in that, The method further includes: Detect whether the current tool path segment is in the vicinity of a kinematic singularity point of the machine tool; When it is determined that the tool trajectory segment is located in the region near a singular point, the type of singular region is identified; Based on the type of singular region, the rotation axis angle is interpolated using a preset interpolation strategy to avoid abrupt changes in the rotation axis within the singular region.

5. The post-processing optimization method for five-axis linkage according to claim 1, characterized in that, The method further includes: Receive actual motion data of the machine tool collected by external measuring devices; The actual motion data of the machine tool is compared with the output data of the kinematic model to obtain kinematic deviation information; The parameters of the kinematic model are adaptively corrected based on the kinematic deviation information.

6. The post-processing optimization method for five-axis linkage according to claim 1, characterized in that, The method further includes: The positioning error data of the five-axis machine tool during the machining process is collected; An error compensation model is constructed, which maps the positioning error data into a compensation vector. When correcting the attitude of the tool path, the compensation vector is superimposed on the correction process so as to use the positioning error data as the basis for correction.

7. A post-processing optimization system for five-axis linkage, characterized in that, The system includes a memory and a processor. The memory includes a post-processing optimization method program for five-axis linkage. When the processor executes the post-processing optimization method program for five-axis linkage, it performs the following steps: Based on the structural parameters of the five-axis machine tool, a kinematic model of the five-axis machine tool is constructed; Extract the geometric and attitude features of the tool trajectory, and perform interference prediction on the tool trajectory based on the kinematic model; For tool trajectory segments where interference risk is anticipated, attitude correction is performed based on the kinematic model to obtain the corrected tool trajectory. Perform trajectory smoothing processing on the corrected toolpath to obtain the optimized toolpath; The optimized toolpath is converted into CNC machining code and output.

8. The post-processing optimization system for five-axis linkage according to claim 7, characterized in that, The interference prediction of the tool trajectory based on the kinematic model specifically includes: A first interference judgment threshold and a second interference judgment threshold are set, wherein the second interference judgment threshold is less than the first interference judgment threshold; Calculate the minimum clearance distance between the tool and the workpiece. When the minimum clearance distance is greater than the first interference judgment threshold, it is determined that there is no interference risk. When the minimum gap distance is less than or equal to the first interference judgment threshold and greater than the second interference judgment threshold, it is determined as an interference warning and triggers local attitude fine-tuning; When the minimum gap distance is less than or equal to the second interference judgment threshold, it is determined to be a serious interference risk, triggering a full-segment attitude replanning.

9. The post-processing optimization system for five-axis linkage according to claim 7, characterized in that, The interference prediction includes: Construct a first interference detection path, which performs interference judgment based on the spatial overlap relationship between the geometric bounding volume of the tool and the workpiece model, and outputs the first interference judgment result and the first confidence level; Construct a second interference detection path. The second interference detection path performs interference judgment based on the distance field analysis between the tool sweep body and the workpiece model, and outputs the second interference judgment result and the second confidence level. Through the collaborative judgment module, when the first interference judgment result is consistent with the second interference judgment result and both the first confidence level and the second confidence level are higher than the preset confidence level threshold, a consistent judgment result is output; When the first interference judgment result is inconsistent with the second interference judgment result, the judgment result of the detection path with higher confidence is selected as the final interference judgment result.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer-readable storage medium includes a post-processing optimization method program for five-axis linkage, which, when executed by a processor, implements the steps of the post-processing optimization method for five-axis linkage as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Track smoothing method suitable for five-axis numerical control device

    CN102393678A

  • General post-processing method for five-axis numerical control machine tool based on singular compensation

    CN116400646A