Five-axis system cutter posture smoothing processing method and system

By introducing the concept of attitude gradient and filtering algorithm into the five-axis system, the problem of drastic or insufficient attitude changes in five-axis linkage CNC machining is solved, smooth control of tool attitude is achieved, and machining quality and efficiency are improved.

CN120848372BActive Publication Date: 2026-07-21NANJING CHAOYING NEW ENERGY TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NANJING CHAOYING NEW ENERGY TECH CO LTD
Filing Date
2025-07-04
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In existing five-axis linkage CNC machining technology, the tool posture change control method fails to effectively take into account the coupling relationship between spatial displacement and posture change, resulting in drastic or insufficient posture change, which affects machining quality and efficiency.

Method used

By introducing the concept of attitude gradient, the original motion trajectory is discretized into multiple six-dimensional line segments. The attitude deviation vector and spatial displacement are calculated. The attitude gradient is smoothed by combining a filtering algorithm, and the attitude adjustment at the end point and the correction and compensation of adjacent line segments are performed to achieve adaptive and continuous attitude control.

Benefits of technology

It effectively suppresses abrupt changes in the machining trajectory, reduces sudden loads on CNC axes, improves the continuity and surface quality of the machining trajectory, extends equipment life, and enhances machining efficiency and machine tool stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120848372B_ABST
    Figure CN120848372B_ABST
Patent Text Reader

Abstract

The application provides a five-axis system tool posture smoothing processing method and system, which is applied to the technical field of trajectory posture adjustment, and discrete original motion trajectories into a plurality of six-dimensional line segments connected in a head-to-tail manner, acquires a start point posture and an end point posture of each six-dimensional line segment; calculates a posture deviation vector and a spatial displacement amount, and further obtains a posture gradient; performs filtering processing on the posture gradient to generate a filtered posture gradient; based on the spatial displacement amount and the filtered posture gradient, calculates a current posture deviation vector of the six-dimensional line segment to adjust the end point posture of the six-dimensional line segment; based on the posture deviation values before and after filtering of the current six-dimensional line segment, corrects and compensates a posture deviation vector of an adjacent next six-dimensional line segment; sequentially completes adjustment of end point postures of all six-dimensional line segments, that is, realizes smoothing processing of the motion trajectory. The five-axis system tool posture smoothing processing method and system introduce the concept of the posture gradient, establish a dynamic proportional relationship between the posture change and the feed displacement, and realize smooth control of the tool posture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of trajectory attitude adjustment technology, specifically relating to a method and system for smoothing the attitude of a five-axis tool. Background Technology

[0002] Five-axis CNC machining technology, due to its high degree of freedom and flexibility, is widely used in the high-precision machining of complex curved parts. In a five-axis machining system, the control of tool posture changes is particularly critical, as its smoothness directly affects the acceleration and deceleration load of the machine tool actuator, the trajectory interpolation accuracy, and the quality of the final machined surface.

[0003] In existing technologies, toolpath planning is typically achieved through interpolation algorithms (such as linear interpolation and B-spline interpolation) to ensure smooth attitude control. While these methods can mitigate the rate of attitude change to some extent, they often neglect the coupling relationship between spatial displacement and attitude change. For example, over-adjustment can easily occur in shorter trajectory segments, leading to drastic attitude changes and increased interference risk; while under-adjustment may occur in longer trajectory segments, making it difficult to eliminate sharp turns or abrupt attitude changes. Furthermore, some filter-based attitude smoothing strategies (such as mean filtering and moving average) do not consider the local feature differences of trajectory segments, resulting in insufficient smoothing or loss of key attitude information.

[0004] To address the aforementioned issues, the key challenge lies in balancing spatial path and attitude changes, and in constructing an adaptive and continuous attitude adjustment mechanism. Summary of the Invention

[0005] In view of the above-mentioned problems in the prior art, the purpose of this invention is to provide a method for smoothing the tool posture of a five-axis system, which introduces the concept of posture gradient, establishes a dynamic proportional relationship between posture change and feed displacement, and realizes smooth control of tool posture.

[0006] A method for smoothing the attitude of a tool in a five-axis system includes the following steps: discretizing the original motion trajectory into multiple six-dimensional line segments connected end-to-end, obtaining the starting pose and ending pose of each six-dimensional line segment; calculating the attitude deviation vector and spatial displacement to obtain the attitude gradient; filtering the attitude gradient to generate a filtered attitude gradient; calculating the current attitude deviation vector of the six-dimensional line segment based on the spatial displacement and the filtered attitude gradient to adjust the ending pose of the six-dimensional line segment; correcting and compensating the attitude deviation vector of the next adjacent six-dimensional line segment based on the attitude deviation values ​​before and after filtering of the current six-dimensional line segment; and sequentially adjusting the ending pose of all six-dimensional line segments to achieve smoothing of the motion trajectory.

[0007] Preferably, the specific steps include:

[0008] S1. Divide the original motion trajectory into multiple six-dimensional line segments connected end to end, and configure the six-dimensional line segments. Starting position and final point pose ,in, For position vectors, This is the attitude vector;

[0009] S2, Calculate six-dimensional line segments The attitude deviation vector and spatial displacement of the two endpoints; where the six-dimensional line segment Starting position With the final point pose The formula for calculating the increment between them is as follows:

[0010]

[0011] starting position With the final point pose The attitude deviation vector between The calculation formula is as follows:

[0012]

[0013] starting position With the final point pose Spatial displacement The calculation formula is as follows:

[0014]

[0015] S3, Calculate six-dimensional line segments attitude gradients at the two endpoints The calculation formula is as follows:

[0016]

[0017] S4. Attitude gradient The filtered attitude gradient is obtained by performing filtering. The calculation formula is as follows:

[0018]

[0019] in, The filter weights are and the filter window size is . ;

[0020] S5. Based on the filtered attitude gradient Spatial displacement Calculate the filtered attitude deviation vector The calculation formula is:

[0021]

[0022] S6. Based on the filtered attitude deviation vector Obtain the filtered end point pose The calculation formula is as follows:

[0023]

[0024] in, .

[0025] Preferably, the following steps are also included:

[0026] S7, Based on the current six-dimensional line segment The attitude deviation before and after filtering affects the next adjacent six-dimensional segment. The attitude deviation vector is corrected using the following formula:

[0027]

[0028] in, a six-dimensional line segment The attitude deviation vector, a six-dimensional line segment Attitude deviation values ​​before and after filtering.

[0029] Preferably, when the starting pose With the final point pose Spatial displacement Greater than the threshold If so, the attitude of the endpoint of the current six-dimensional line segment is adjusted;

[0030] When starting position With the final point pose Spatial displacement Not greater than the threshold If the current six-dimensional line segment's endpoint attitude is not processed, then the attitude deviation vector and spatial displacement are calculated for the next adjacent six-dimensional line segment.

[0031] Preferably, the position vector The unit is mm, attitude vector The unit is °, attitude gradient. The unit is (° / mm).

[0032] Another objective of this invention is to provide a five-axis system tool attitude smoothing system for implementing the aforementioned five-axis system tool attitude smoothing method. The five-axis system tool attitude smoothing system includes:

[0033] The five-axis tool attitude smoothing system includes:

[0034] The line segment division module is used to divide the original motion trajectory into multiple six-dimensional line segments that are connected end to end;

[0035] The attitude gradient calculation module is used to calculate the attitude deviation vector, spatial displacement, and attitude gradient of each six-dimensional line segment.

[0036] The filtering module is used to filter the attitude gradient.

[0037] The attitude adjustment module is used to correct the attitude of the end point of the corresponding six-dimensional line segment based on the filtering results.

[0038] The compensation module is used to transfer the attitude error of the previous six-dimensional line segment to the next six-dimensional line segment for compensation and correction.

[0039] The line segment division module, attitude gradient calculation module, filtering module, attitude adjustment module, and compensation module work together to achieve continuous and smooth processing of the motion trajectory.

[0040] Preferably, it also includes a judgment module, used to determine whether the spatial displacement of the six-dimensional line segment is greater than a threshold. If it is greater, the attitude of the end point of the current six-dimensional line segment is adjusted; if it is not greater, the attitude of the end point of the current six-dimensional line segment is not processed, and the attitude deviation vector and spatial displacement are calculated for the next adjacent six-dimensional line segment.

[0041] The beneficial effects of this invention are as follows: This five-axis system tool attitude smoothing method and system discretizes the original tool motion trajectory into multiple six-dimensional line segments connected end to end, and introduces "attitude gradient" as a quantitative index of attitude change rate, effectively characterizing the sensitivity of attitude adjustment to spatial displacement. Based on this, a filtering algorithm is combined to smooth the attitude gradient, and the attitude of the final point of the current six-dimensional line segment is dynamically corrected, achieving a flexible transition in attitude control.

[0042] Furthermore, the degree of attitude change is dynamically assessed by the proportional relationship between spatial displacement and attitude change, avoiding over-adjustment in short segments and under-adjustment in long segments, and effectively suppressing abrupt changes in the machining trajectory. Attitude gradient filtering smooths acceleration and deceleration processes, reduces sudden loads on CNC axes, extends equipment life, and improves the stability and reliability of the overall motion system. In addition, by constructing a chain-like correction and compensation mechanism for attitude errors before and after filtering, attitude adjustment achieves progressive continuity, improving the continuity of the machining trajectory and surface quality. Attached Figure Description

[0043] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0044] Figure 1 This is a schematic diagram of the endpoints of a six-dimensional line segment in this invention;

[0045] Figure 2 This is a flowchart of the method of the present invention;

[0046] Figure 3 These are the velocity curves before and after trajectory optimization. Detailed Implementation

[0047] Example 1

[0048] like Figure 2 As shown, a method for smoothing the tool posture of a five-axis system specifically includes the following steps:

[0049] S1. Divide the original motion trajectory into multiple six-dimensional line segments connected end-to-end, and mark the two endpoints of each six-dimensional line segment as the start point and end point, respectively. It is important to note that since the six-dimensional line segments are connected sequentially, the end point of the previous line segment is the start point of the next line segment. Each endpoint of a six-dimensional line segment is equipped with a pose vector, including a position vector and an attitude vector.

[0050] Specifically, the original motion trajectory is a polyline, including line segments, arcs, Bezier curves, spline curves, etc. Line segments do not require further subdivision; arcs, Bezier curves, and spline curves can be subdivided based on factors such as bow height error or tangential angle variation. Different subdivision methods result in different numbers of six-dimensional line segments, and correspondingly, the length of each six-dimensional line segment may also differ. In practical implementation, the appropriate subdivision method needs to be selected based on the machine tool's functions and the actual tool motion trajectory; the subdivision method is not limited here.

[0051] like Figure 1 As shown, using six-dimensional line segments For example, it includes the starting pose. and final point pose ,in, This is a position vector, in millimeters. This is the attitude vector, measured in degrees.

[0052] S2. Calculate the attitude deviation vector and spatial displacement of the two endpoints of each six-dimensional line segment.

[0053] Among them, six-dimensional line segments Starting position With the final point pose The formula for calculating the increment between them is as follows:

[0054]

[0055] starting position With the final point pose The attitude deviation vector between The calculation formula is as follows:

[0056]

[0057] starting position With the final point pose Spatial displacement The calculation formula is as follows:

[0058]

[0059] S3. Calculate the attitude gradients of the two endpoints of each six-dimensional line segment. The calculation formula is as follows:

[0060]

[0061] in, It is the threshold for determining whether the value is non-zero, when the spatial displacement... Not greater than the judgment threshold If the six-dimensional line segment is considered to be a pure attitude adjustment segment, no processing is performed on the six-dimensional line segment.

[0062] Attitude gradient is used to characterize the amount of attitude change per unit displacement (° / mm), i.e., the "steepness" of the attitude change. To avoid division by zero, a threshold processing rule is set. When the spatial displacement is less than this threshold, it is considered a pure attitude adjustment segment and is skipped without further processing.

[0063] S4. Attitude gradient The filtered attitude gradient is obtained by performing filtering. Assuming the filter window size is For six-dimensional line segments The calculation formula for filtering is as follows:

[0064]

[0065] in, These are the filter weights.

[0066] In the specific implementation process, Gaussian filtering or mean filtering methods can be used.

[0067] S5. Based on the filtered attitude gradient Spatial displacement Calculate the filtered attitude deviation vector The calculation formula is:

[0068]

[0069] S6. Filtered attitude deviation vector calculated based on S5 Adjusting the six-dimensional line segment The final pose is obtained, thus yielding the filtered final pose. The calculation formula is as follows:

[0070]

[0071] in, .

[0072] S7. Correct the attitude deviation vector of the next adjacent six-dimensional line segment, and pass the deviation value before and after filtering of the current six-dimensional line segment to the next segment to realize the chain adjustment method of "correction-transmission", which is conducive to maintaining the consistency and smoothness of attitude throughout the entire processing trajectory.

[0073]

[0074] The above formula represents a six-dimensional line segment. The current attitude deviation vector is the filtered attitude deviation vector. The next six-dimensional line segment adjacent to the current six-dimensional line segment. The attitude deviation vector is its starting pose. With the final point pose The attitude deviation vector between Deviation value before and after the current six-dimensional line segment filtering sum.

[0075] The velocity curves before and after trajectory optimization are as follows: Figure 3 As shown, the horizontal axis represents time, and the vertical axis represents speed. Specifically, as can be seen from the speed curve above, the speed curve exhibits numerous frequent and dramatic fluctuations throughout the entire trajectory execution process, manifested as sharp increases or decreases in speed. This fluctuation reflects the frequent acceleration and deceleration of the tool during the execution of the original trajectory, resulting in numerous abrupt changes in posture and path discontinuities. This not only affects the smoothness of machining but may also lead to problems such as high machine tool load, high energy consumption, and long machining time.

[0076] As shown in the speed curves below, after applying the tool attitude smoothing method of this five-axis system, the speed curves exhibit a significantly smoother and more continuous trend. The curve shape tends to be "smooth and gradually changing," without any drastic speed jitter or abrupt changes, indicating that the attitude changes have been reasonably adjusted. The overall speed level is improved, the duration is longer, and the trend is more stable, indicating higher tool operating efficiency, a smoother machining process, and a more coordinated response from the motion control system. Compared to before trajectory smoothing, the time required to complete the entire trajectory is also significantly shortened, indicating that the overall machining efficiency of the system has been improved.

[0077] Example 2

[0078] A five-axis system tool attitude smoothing system is provided to implement the five-axis system tool attitude smoothing method as described in Embodiment 1. The five-axis system tool attitude smoothing system includes a line segmentation module, an attitude gradient calculation module, a filtering module, an attitude adjustment module, a compensation module, and a judgment module.

[0079] Specifically, the original motion trajectory is divided into multiple six-dimensional line segments connected end to end by a line segment segmentation module, and the starting pose and ending pose of each six-dimensional line segment are configured. The attitude gradient calculation module calculates the attitude deviation vector and spatial displacement based on the starting pose and ending pose of each six-dimensional line segment to obtain the attitude gradient. The judgment module determines whether the spatial displacement of the six-dimensional line segment is greater than a threshold. If it is greater, the ending pose of the current six-dimensional line segment is adjusted; if it is not greater, the ending pose of the current six-dimensional line segment is not processed, and the attitude deviation vector and spatial displacement are calculated for the next adjacent six-dimensional line segment.

[0080] When the spatial displacement of the current six-dimensional line segment meets the threshold condition, the attitude gradient obtained by the attitude gradient calculation module is filtered by the filtering module. Then, the attitude adjustment module adjusts the attitude of the end point of the current six-dimensional line segment based on the processing result of the filtering module. When the attitude of the end point of all six-dimensional line segments is adjusted, the smoothing of the original motion trajectory is achieved, thereby effectively improving the efficiency and quality of machine tool processing.

[0081] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for smoothing the tool posture of a five-axis system, characterized in that, Includes the following steps: The original motion trajectory is discretized into multiple six-dimensional line segments connected end to end, and the starting pose and ending pose of each six-dimensional line segment are obtained. Calculate the attitude deviation vector and spatial displacement, and then obtain the attitude gradient; The attitude gradient is filtered to generate a filtered attitude gradient; Based on the spatial displacement and the filtered attitude gradient, the current attitude deviation vector of the six-dimensional line segment is calculated to adjust the attitude of the end point of the six-dimensional line segment. The attitude deviation vector of the next adjacent six-dimensional line segment is corrected and compensated based on the attitude deviation value before and after the current six-dimensional line segment filtering. The attitude of the end points of all six-dimensional line segments is adjusted sequentially, thus achieving smoothing of the motion trajectory. Specifically, the steps include the following: S1. Discretize the original motion trajectory into multiple six-dimensional line segments connected end to end, and configure the six-dimensional line segments. Starting position and final point pose ,in, For position vectors, This is the attitude vector; S2, Calculate six-dimensional line segments The attitude deviation vector and spatial displacement of the two endpoints; where the six-dimensional line segment Starting position With the final point pose The formula for calculating the increment between them is as follows: starting position With the final point pose The attitude deviation vector between The calculation formula is as follows: starting position With the final point pose Spatial displacement The calculation formula is as follows: S3, Calculate six-dimensional line segments attitude gradients at the two endpoints The calculation formula is as follows: S4. Attitude gradient The filtered attitude gradient is obtained by performing filtering. The calculation formula is as follows: in, The filter weights are and the filter window size is . ; S5. Based on the filtered attitude gradient Spatial displacement Calculate the filtered attitude deviation vector The calculation formula is: S6. Based on the filtered attitude deviation vector Obtain the filtered end point pose The calculation formula is as follows: in, ; S7, Based on the current six-dimensional line segment The attitude deviation before and after filtering affects the next adjacent six-dimensional segment. The attitude deviation vector is corrected using the following formula: in, a six-dimensional line segment The attitude deviation vector, a six-dimensional line segment Attitude deviation values ​​before and after filtering.

2. The five-axis system tool posture smoothing method according to claim 1, characterized in that, When starting position With the final point pose Spatial displacement Greater than the threshold If so, the attitude of the endpoint of the current six-dimensional line segment is adjusted; When starting position With the final point pose Spatial displacement Not greater than the threshold If the current six-dimensional line segment's endpoint attitude is not processed, then the attitude deviation vector and spatial displacement are calculated for the next adjacent six-dimensional line segment.

3. The five-axis system tool posture smoothing method according to claim 1, characterized in that, Position vector The unit is mm, attitude vector The unit is °, attitude gradient. The unit is (° / mm).

4. A five-axis tool posture smoothing system, characterized in that, For implementing the five-axis system tool attitude smoothing method as described in any one of claims 1 to 3, the five-axis system tool attitude smoothing system comprises: The line segment division module is used to divide the original motion trajectory into multiple six-dimensional line segments that are connected end to end; The attitude gradient calculation module is used to calculate the attitude deviation vector, spatial displacement, and attitude gradient of each six-dimensional line segment. The filtering module is used to filter the attitude gradient. The attitude adjustment module is used to correct the attitude of the end point of the corresponding six-dimensional line segment based on the filtering results. The compensation module is used to transfer the attitude error of the previous six-dimensional line segment to the next six-dimensional line segment for compensation and correction. The line segment division module, attitude gradient calculation module, filtering module, attitude adjustment module, and compensation module work together to achieve continuous and smooth processing of the motion trajectory.

5. The five-axis system tool posture smoothing system according to claim 4, characterized in that, It also includes a judgment module, which is used to determine whether the spatial displacement of the six-dimensional line segment is greater than a threshold. If it is greater, the attitude of the end point of the current six-dimensional line segment is adjusted. If the value is not greater than the specified value, the attitude of the end point of the current six-dimensional line segment will not be processed, but the attitude deviation vector and spatial displacement will be calculated for the next adjacent six-dimensional line segment.