Multi-angle positioning anti-interference control method and system for five-axis machining center
By using parametric modeling of the entire moving body and adaptive look-ahead interpolation technology, combined with dynamic threshold and closed-loop feedback optimization, the interference problem in the multi-angle positioning switching process of the tool axis in the five-axis machining center was solved, realizing real-time control and efficient machining.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG MEISTER CNC TECH CO LTD
- Filing Date
- 2026-04-03
- Publication Date
- 2026-06-26
Smart Images

Figure CN122284501A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of five-axis CNC machining technology, specifically to a multi-angle positioning anti-interference control method and system for five-axis machining centers. Background Technology
[0002] Five-axis machining centers, with their multi-degree-of-freedom linkage capabilities, are widely used in the machining of complex curved surface parts in aerospace, automotive molds, and precision instruments. During the five-axis machining of complex parts, frequent switching of the tool axis at multiple angles is required to achieve cutting operations at different workstations and on different curved surface areas. However, during these rapid tool axis posture changes, spatial collisions and interferences can easily occur between the spindle head, rotary table, tool, fixture, and workpiece. This can lead to minor issues like tool breakage and workpiece scrap, or even permanent damage to core components such as the machine tool spindle and rotary axes, severely impacting machining efficiency and equipment safety.
[0003] In existing technologies, interference prevention and control solutions for five-axis machining are mostly offline toolpath interference checks and optimizations. These solutions require interference verification and correction of the toolpath using CAM software before machining, which cannot adapt to the real-time interference risks caused by machine tool motion dynamic errors, tooling clamping deviations, and changes in workpiece allowance during machining. Some online interference detection solutions use fixed safety thresholds for collision judgment, without considering the braking distance caused by the machine tool's current motion speed and acceleration / deceleration characteristics. This can easily lead to interference accidents due to untimely braking in high-speed positioning switching scenarios. At the same time, existing solutions lack linkage prevention and control for singularity areas in five-axis motion. Sudden changes in the rotational axis near singularities can easily trigger hidden interference risks, and the lack of closed-loop feedback and iterative optimization mechanisms makes them unsuitable for the prevention and control needs of different machining scenarios. Summary of the Invention
[0004] This invention aims to solve at least one of the technical problems existing in the prior art. To this end, this invention proposes a multi-angle positioning anti-interference control method and system for five-axis machining centers. Through parametric modeling of the entire moving body, adaptive look-ahead interpolation, dynamic threshold interference risk classification, and hierarchical anti-interference control strategy, combined with singular point linkage prevention and control and closed-loop feedback optimization, real-time anti-interference control of the multi-angle positioning switching process of the five-axis machining tool axis is achieved, balancing machining efficiency and equipment safety.
[0005] To solve the above problems, the technical solution adopted by the present invention is as follows: A method for preventing interference in multi-angle positioning of a five-axis machining center includes the following steps: S1. Construct a parameterized spatial envelope model of the entire motion chain components of a five-axis machining center; S2. Obtain the multi-angle positioning instructions of the current CNC machining program, and parse the target motion parameters of each motion axis during the positioning process, as well as the corresponding target tool position point and tool axis posture sequence; S3. Based on the preset number of look-ahead interpolation cycles N, perform look-ahead interpolation on the target motion parameters to generate the real-time motion pose sequence of each motion axis in the next N interpolation cycles, and the real-time pose of the parameterized spatial envelope model of the whole motion body corresponding to each interpolation cycle. S4. Perform global interference collision detection on the parameterized spatial envelope model of the whole moving body in each interpolation cycle, and calculate the minimum spatial distance between each moving body; combine the motion velocity and acceleration of each motion axis in the current interpolation cycle to calculate the dynamic interference risk threshold; compare the minimum spatial distance with the dynamic interference risk threshold to classify the interference risk level. S5. Match the corresponding anti-interference control strategy according to the interference risk level, correct the current positioning motion parameters in real time, generate the corrected interpolation control command and send it to the five-axis machining center CNC system to execute the positioning motion control.
[0006] Preferably, in step S1, constructing the parameterized spatial envelope model of the entire moving body includes: The cutting tool, spindle head, rotary motion unit, tooling fixture and workpiece to be processed are each divided into independent basic rigid body units; For each basic rigid body element, a hybrid bounding box method combining axial bounding box (AABB) and directional bounding box (OBB) is used to construct a parametric spatial envelope model. Among them, a high-precision capsule-shaped envelope model is constructed for the cutting edge and tool holder of the tool, and a simplified convex polyhedron envelope model is constructed for the irregular moving parts of the spindle head and rotary motion unit.
[0007] Preferably, in S3, the number of look-ahead interpolation cycles N is dynamically adjusted adaptively based on the maximum feed rate of the five-axis machining center, the maximum acceleration and jerk of each motion axis, and the interpolation cycle of the CNC system. The value of N ranges from 10 to 100 interpolation cycles, and the total look-ahead time is greater than or equal to the maximum braking time of the entire five-axis machining center.
[0008] Preferably, in step S4, calculating the dynamic interference risk threshold includes: For the current interpolation cycle, obtain the combined feed rate of each linear axis and the maximum angular velocity of the rotary axis; Calculate the linear braking distance under the current motion state based on the maximum permissible acceleration and the maximum permissible jerk of the linear axis; Calculate the braking angle of the rotating shaft based on the maximum permissible angular acceleration of the rotating shaft; A basic safety threshold is generated by combining linear braking distance and braking angle, and then a precision compensation coefficient is superimposed based on the envelope type corresponding to the whole moving body to obtain the final dynamic interference risk threshold.
[0009] Preferably, in S4, the interference risk level is divided into no risk, low risk, medium risk, high risk and critical interference level; Among them, the minimum spatial distance > the dynamic interference risk threshold is the risk-free level; ≤ the dynamic interference risk threshold and > 2 / 3 of the dynamic interference risk threshold is the low risk level; ≤ 2 / 3 of the dynamic interference risk threshold and > 1 / 3 of the dynamic interference risk threshold is the medium risk level; ≤ 1 / 3 of the dynamic interference risk threshold and > 0 is the high risk level; and ≤ 0 is the critical interference level.
[0010] Preferably, in step S5, the anti-interference control strategy matching rules include: No risk level; maintain the original target motion parameters and execute the original interpolation command. Low risk level, start attitude smoothing optimization, limit and smooth the rotary axis angular velocity, reduce the amplitude of tool axis attitude change, and keep the linear axis feed rate constant; For medium-risk levels, the feed rate is adaptively reduced by combining the ratio of minimum spatial distance to dynamic interference risk threshold for linear speed reduction, while slightly correcting the tool axis attitude transition path without changing the target tool position. High-risk level, initiate pre-deceleration control, reduce the feed rate of each axis to below the preset safe feed rate, and at the same time, under the constraint that the target tool position and target attitude remain unchanged, re-plan an interference-free positioning transition path; When the critical interference level is reached, the CNC system immediately triggers the feed hold command, stops all axis movements, and outputs interference alarm information, interference position, and interference body type.
[0011] Preferably, step S3 further includes a five-axis motion singularity prediction step: The rotation axis angle change rate is calculated based on the tool axis posture sequence. When the angle change rate exceeds the preset singularity judgment threshold, it is judged as a region near a singularity. The interference risk level of the interpolation cycle corresponding to this region is automatically increased by one level, and the corresponding anti-interference control strategy is matched.
[0012] Preferably, this method further includes a closed-loop feedback optimization step: Real-time acquisition of actual motion pose data of grating rulers and encoders on each axis of a five-axis machining center, and comparison with real-time motion pose sequence generated by look-ahead interpolation to calculate pose deviation; When the pose deviation exceeds the preset deviation threshold, update the current dynamic interference risk threshold and correct the subsequent look-ahead interpolation pose sequence; Based on historically processed interference detection data and anti-interference control effects, the compensation coefficient of the dynamic interference risk threshold and the boundary of the interference risk level division are iteratively optimized online through machine learning models.
[0013] A multi-angle positioning anti-interference control system for a five-axis machining center includes: The parametric modeling module is used to construct a parametric spatial envelope model of the entire motion chain components of a five-axis machining center. The instruction parsing module is used to obtain the multi-angle positioning instructions of the current CNC machining program, and parse the target motion parameters of each motion axis during the positioning process, as well as the corresponding target tool position point and tool axis posture sequence. The look-ahead interpolation module is used to perform look-ahead interpolation on the target motion parameters based on a preset number of look-ahead interpolation cycles N, and generate a real-time motion pose sequence for each motion axis in the next N interpolation cycles, as well as the real-time pose of the parameterized spatial envelope model of the whole moving body corresponding to each interpolation cycle. The Interference Detection and Risk Classification module is used to perform global interference collision detection on the parameterized spatial envelope model of the whole moving body in each interpolation cycle, calculate the minimum spatial distance between each moving body, calculate the dynamic interference risk threshold by combining the motion velocity and acceleration of each motion axis in the current interpolation cycle, and classify the interference risk level by comparing the minimum spatial distance with the dynamic interference risk threshold. The anti-interference control module is used to match the corresponding anti-interference control strategy according to the interference risk level, correct the current positioning motion parameters in real time, generate the corrected interpolation control command and send it to the five-axis machining center CNC system to execute the positioning motion control.
[0014] Preferably, the parametric modeling module is further used to: divide the cutting tool, spindle head, rotary motion unit, tooling fixture and workpiece to be processed into independent basic rigid body units respectively; For each basic rigid body element, a hybrid bounding box method combining axial bounding box (AABB) and directional bounding box (OBB) is used to construct a parametric spatial envelope model. Among them, a high-precision capsule-shaped envelope model is constructed for the cutting edge and tool holder of the tool, and a simplified convex polyhedron envelope model is constructed for the irregular moving parts of the spindle head and rotary motion unit. Compared with the prior art, the beneficial effects of the present invention are as follows: (1) This invention adopts a hybrid bounding box hierarchical parametric modeling scheme combining AABB and OBB. For the tool, spindle head, rotary motion unit, tooling fixture and workpiece to be processed in the whole motion chain of the five-axis machining center, the entire dimension is divided into independent basic rigid body units, realizing the coverage of the five-axis motion full space full domain interference detection, avoiding the hidden interference risk caused by the omission of local parts; at the same time, a high-precision capsule body envelope model is constructed for the tool cutting edge and tool holder, and a simplified convex polyhedral envelope model is constructed for irregular motion parts. Through differentiated hierarchical modeling, the computational amount of interference detection is greatly reduced while ensuring the detection accuracy of key motion parts. This solves the technical problem that detection accuracy and real-time performance cannot be achieved simultaneously in the traditional modeling method, and provides reliable computing power support for online real-time interference detection and closed-loop control.
[0015] (2) This invention uses an adaptive dynamic adjustment look-ahead interpolation mechanism. The number of look-ahead interpolation cycles N can be adaptively adjusted according to the maximum feed speed of the machine tool, the acceleration and deceleration characteristics of each motion axis, and the interpolation cycle of the CNC system. It also requires that the total look-ahead time be greater than or equal to the maximum braking time of the whole machine. This can generate the real-time motion pose sequence of each motion axis and the real-time pose of the entire motion body envelope in advance within the next N interpolation cycles, thus realizing the early prediction and prevention of interference risks. This avoids hard collision accidents caused by the untimely response and insufficient braking distance of traditional lag-type interference detection. At the same time, the look-ahead interpolation calculation is completed based on the S-curve acceleration and deceleration control algorithm, which can accurately restore the real-time motion state of each motion axis, ensuring the accuracy of pose prediction and interference detection, and providing an accurate data foundation for subsequent dynamic threshold calculation and hierarchical anti-interference control.
[0016] (3) This invention abandons the design defects of traditional fixed safety thresholds. Based on the linear axis composite feed rate and rotary axis angular velocity in the current interpolation cycle, the basic safety threshold is calculated by combining the linear braking distance and rotary axis braking angle. Then, the accuracy compensation coefficient of the corresponding envelope type is superimposed to generate a dynamic interference risk threshold that changes in real time with the machine tool motion state. This makes the safety protection margin and the real-time motion characteristics of the machine tool accurately matched. It not only eliminates the processing efficiency loss caused by the excessive fixed threshold margin, but also avoids the safety protection failure problem caused by insufficient margin. At the same time, based on the ratio of the minimum spatial distance to the dynamic interference risk threshold, the interference risk is divided into five levels and matched with differentiated anti-interference control strategies. In the no-risk state, the full-speed operation ensures the processing efficiency. In the low / medium risk state, the risk is controlled by attitude smoothing and adaptive speed reduction. In the high-risk state, the interference is eliminated from the root by pre-deceleration and path replanning. In the critical interference state, the emergency stop alarm realizes the safety bottom line. It forms a full-dimensional control system of "efficiency first, hierarchical prevention and control, and safety bottom line", which perfectly balances the operation efficiency and safety protection requirements of five-axis machining.
[0017] (4) The present invention embeds a five-axis motion singularity prediction step in the look-ahead interpolation process. By calculating the rotation axis angle change rate in real time through the tool axis posture sequence, it can accurately identify the nearby singularity area. By automatically upgrading the risk level, it can realize the linkage interference prevention and control of the singularity area. It effectively avoids the tool axis posture loss and hidden interference collision problems caused by the sudden movement of the rotation axis near the singularity of the five-axis machining. It greatly improves the anti-interference coverage capability of the five-axis multi-angle positioning full stroke and solves the problem of the lack of special prevention and control of singularity area in traditional anti-interference technology.
[0018] (5) This invention collects the actual motion pose data of the grating ruler and encoder of each axis of the machine tool in real time, compares it with the theoretical pose of the look-ahead interpolation to calculate the deviation, and constructs a full closed-loop control link of "pose prediction - actual operation - deviation compensation". When the pose deviation exceeds the limit, the dynamic interference risk threshold can be updated in real time and the subsequent look-ahead interpolation pose sequence can be corrected. This effectively compensates for the interference risk caused by the machine tool mechanical error and motion following error, and improves the actual operation accuracy of the anti-interference control. At the same time, based on the interference detection data of historical processing and the anti-interference control effect, the compensation coefficient of the dynamic interference risk threshold and the boundary of the interference risk level are iteratively optimized online through the machine learning model. This enables the anti-interference control strategy to continuously adapt to the changes of different tools, fixtures and processing scenarios. There is no need for manual repeated adjustment of parameters, which greatly reduces the threshold of field application and improves the system's scenario adaptability and long-term operation stability.
[0019] (6) The anti-interference control system of the present invention can be directly run on the CNC system of a five-axis machining center. Each module realizes real-time data communication through the internal bus of the CNC system. The data interaction delay does not exceed one interpolation cycle. It can be seamlessly connected with the existing G code decoding unit and interpolation control unit without the need for additional hardware equipment. It is compatible with the existing mainstream five-axis machining center CNC system. The transformation and upgrading cost is low and the deployment is convenient. It can be directly applied to the five-axis machining scenarios of complex irregular parts such as aerospace, automotive molds, and precision machinery.
[0020] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating the steps of the multi-angle positioning anti-interference control method for a five-axis machining center in an embodiment of the present invention. Figure 2 This is a schematic diagram of the overall process of the multi-angle positioning anti-interference control method for a five-axis machining center in an embodiment of the present invention; Figure 3 This is a module interaction diagram of the multi-angle positioning anti-interference control system for a five-axis machining center in an embodiment of the present invention.
[0022] The following are the symbol labels: 1. Parametric Modeling Module; 2. Command Parsing Module; 3. Look-Ahead Interpolation Module; 4. Interference Detection and Risk Classification Module; 5. Anti-Interference Control Module; 6. Singularity Prevention Module; 7. Closed-Loop Feedback Optimization Module. Detailed Implementation
[0023] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0024] At the same time, it should be understood that, for ease of description, the dimensions of the various parts shown in the accompanying drawings are not drawn according to actual scale.
[0025] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the scope of this application and its application or use.
[0026] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0027] Example 1 In this embodiment, the five-axis machining center is an AC dual-rotary-table five-axis linkage machining center, equipped with three linear motion axes (X, Y, and Z) and two rotary motion units (A and C rotary axes). The basic interpolation cycle of the machine tool CNC system is 1ms, the maximum feed rate of the linear axes is 60m / min, and the maximum allowable acceleration of the linear axes is a_max = 10m / s². 2 The maximum permissible jerk on the linear axis is j_max = 1000 m / s². 3 The maximum permissible angular acceleration along axis A is α_max = 10 rad / s². 2 The maximum permissible angular acceleration along the C-axis is α_max = 15 rad / s². 2 The maximum braking time for the entire machine tool is 50ms. This invention is also applicable to other types of five-axis machining equipment, such as double-swivel head five-axis machining centers and swivel head + rotary table five-axis machining centers, and is not limited to this implementation scenario.
[0028] See Figure 1 and 2 The multi-angle positioning anti-interference control method for five-axis machining centers in this embodiment is used for motion control of tool axis multi-angle positioning switching during five-axis machining, and specifically includes the following steps: S1. For the components of the entire kinematic chain in a five-axis machining center, construct a parametric spatial envelope model of the entire moving body: In this step, the entire moving body includes the cutting tool, spindle head, rotary motion unit, tooling fixture, and workpiece to be processed, covering all rigid body components that have relative motion and may collide or interfere during the five-axis machining process.
[0029] In practice, the cutting tool, spindle head, A / C rotary motion unit, tooling fixture, and workpiece to be processed are first divided into independent basic rigid body units. A unique identifier (ID) is assigned to each basic rigid body unit, and the linkage coordinate transformation relationship between each rigid body unit and the machine tool motion axis is established. Specifically: The tool unit is bound to the Z-axis and the spindle head's motion coordinates, and moves synchronously with the X, Y, Z linear axes and the oscillating head's rotation axis; The spindle head unit is bound to the motion coordinates of the machine tool bed and the Z-axis slide; The A / C rotary motion unit is bound to the motion coordinates of the machine tool table base, and its position is updated in real time with the rotation angle of the rotary axis; The tooling fixture and the workpiece to be processed are fixed on the rotary worktable, and their motion coordinates change synchronously with the A / C rotary axis.
[0030] For each basic rigid body element, a hybrid bounding box approach combining axial bounding boxes (AABB) and directional bounding boxes (OBB) is used to construct a parametric spatial envelope model, specifically as follows: For components with regular geometric structures, such as workbench bases, slides, and fixture bases, an AABB axial bounding box is used to construct a basic envelope model. The parameterization is completed by the minimum / maximum X, Y, and Z coordinate values, balancing computational efficiency and envelope accuracy. For irregularly moving parts that change attitude with the rotation axis, such as the spindle head, the swing arm of the A / C rotary motion unit, and the turntable boss, an envelope model is constructed using an OBB oriented bounding box. The optimal orientation of the bounding box is determined based on the principal component analysis of the parts, which reduces the envelope redundancy after the rotation attitude change and improves the accuracy of interferometric detection. For the cutting edge and tool holder of the cutting tool, a high-precision capsule-shaped envelope model is constructed. With the tool axis as the central axis, the parameterized model of the capsule is completed by combining the tool holder diameter, cutting edge length, and tool tip radius. This model adapts to the dimensional changes during the cutting process and significantly improves the accuracy of close-range interference detection between the cutting tool, workpiece, and fixture. For irregular and complex moving parts such as spindle heads and rotary motion units, a simplified convex polyhedron envelope model is constructed. Key feature vertices are extracted based on the shape contour of the parts to construct a closed convex polyhedron, thereby reducing the computational load of interference detection while ensuring the envelope fit.
[0031] After completing the envelope modeling of each basic rigid body element, a parametric spatial envelope model library for the entire moving body is established. The model parameters can be updated in real time as the tool is changed, the fixture is adjusted, and the workpiece is clamped, adapting to different machining scenarios.
[0032] S2. Obtain the multi-angle positioning instructions of the current CNC machining program, and parse them to obtain the target motion parameters of each motion axis during the positioning process, as well as the corresponding target tool position point and tool axis posture sequence: In this step, the CNC machining program being executed by the machine tool's CNC system is read in real time, and multi-angle positioning instructions (including G00 rapid positioning instructions, G01 linear positioning instructions, and five-axis tool axis attitude orientation instructions) in the G code are captured and decoded. Extract the target coordinate values of each motion axis in the positioning command, including the target position of the X, Y, and Z linear axes and the target rotation angles of the A and C rotation axes, and generate the target motion parameters of each motion axis during the positioning process; Based on the machine tool kinematics model, the target coordinates of each axis are converted into the target tool position point (three-dimensional coordinates of the tool tip) and the tool axis attitude vector (unit direction vector of the tool axis) in the workpiece coordinate system. For continuous multi-segment positioning commands, the corresponding target tool position and tool axis posture sequence are generated, clarifying the complete path and posture change process of tool axis multi-angle positioning switching.
[0033] S3. Based on the preset number of look-ahead interpolation cycles N, perform look-ahead interpolation on the target motion parameters to generate a real-time motion pose sequence for each motion axis within the next N interpolation cycles, as well as the real-time pose of the parameterized spatial envelope model of the entire moving body corresponding to each interpolation cycle: In this step, the number of look-ahead interpolation cycles N is dynamically adjusted adaptively based on the maximum feed rate of the five-axis machining center, the maximum acceleration and jerk of each motion axis, and the interpolation cycle of the CNC system. The value of N ranges from 10 to 100 interpolation cycles, and the total look-ahead time is greater than or equal to the maximum braking time of the entire five-axis machining center.
[0034] In this embodiment, the machine tool interpolation cycle is 1ms, and the maximum braking duration of the entire machine is 50ms. Therefore, the minimum value of N is 50 interpolation cycles to ensure that the look-ahead time covers the maximum braking duration of the entire machine, reserving sufficient response time for anti-interference control. When the maximum feed speed of the machine tool increases and the jerk of each axis increases, the value of N is adaptively increased, not exceeding 100 interpolation cycles, balancing the real-time performance and computational complexity of look-ahead control.
[0035] In practice, based on the S-curve acceleration / deceleration control algorithm, the target motion parameters obtained from the analysis are processed by look-ahead interpolation. The real-time position, feed rate, and acceleration of the X, Y, and Z linear axes, as well as the real-time rotation angle, angular velocity, and angular acceleration of the A and C rotation axes, are calculated cycle by cycle for the next N interpolation cycles, generating a real-time motion pose sequence for each motion axis. Simultaneously, based on the machine tool's forward kinematics model, the spatial pose transformation matrix of each basic rigid body element is calculated for each interpolation cycle, updating the real-time pose of the parameterized spatial envelope model of the entire moving body, providing real-time spatial pose data for subsequent interferometric detection.
[0036] Furthermore, this step also includes a five-axis motion singularity prediction step: Based on the tool axis attitude sequence generated by look-ahead interpolation, the rotation angle change rate of the rotation axis is calculated cycle by cycle, that is, the rotation angle increment Δθ / Δt of rotation axes A and C within a unit interpolation cycle; a singularity determination threshold is preset (in this embodiment, the singularity determination threshold is set to 0.5 rad / ms). When the rotation angle change rate of the rotation axis exceeds the preset singularity determination threshold within a certain interpolation cycle, it is determined to be a region near a singularity; the interference risk level of the interpolation cycle corresponding to the region near a singularity is automatically increased by one level, and a corresponding anti-interference control strategy is matched to realize the linkage interference prevention and control of the singularity region, and avoid the implicit interference caused by the sudden movement of the rotation axis near the singularity.
[0037] S4. Perform global interference collision detection on the parameterized spatial envelope model of the entire moving body for each interpolation cycle, and calculate the minimum spatial distance between each moving body; combine the motion velocity and acceleration of each motion axis in the current interpolation cycle to calculate the dynamic interference risk threshold; based on the comparison between the minimum spatial distance and the dynamic interference risk threshold, classify the interference risk level: This step is divided into three parts: global interference collision detection, dynamic interference risk threshold calculation, and interference risk level classification. The specific implementation is as follows: (1) Global Interference Collision Detection For the parameterized spatial envelope model of the whole moving body updated in each interpolation cycle, the Separated Axis Theorem (SAT) is used to perform global interference collision detection. All pairs of rigid body elements with relative motion (including tool-workpiece, tool-fixture, spindle head-workpiece, spindle head-fixture, rotary element-spindle head, etc.) are traversed, and the minimum spatial distance between the envelopes of each pair of rigid body elements is calculated. The minimum spatial distance among all pairs of rigid body elements is taken as the minimum spatial distance D of the whole moving body in the current interpolation cycle.
[0038] (2) Calculation of dynamic interference risk threshold For the current interpolation cycle, first obtain the combined feed rate v of each linear axis and the maximum angular velocity ω of the rotary axis; then calculate the linear braking distance L under the current motion state, using the following formula: L=v 2 / (2a_max)+j_max*v / a_max 2 ; Where a_max is the maximum permissible acceleration along the linear axis, and j_max is the maximum permissible jerk along the linear axis; in this embodiment, a_max = 10 m / s² 2 j_max=1000m / s 3 If the current linear axis composite feed rate v = 10 m / min (i.e. 0.167 m / s), substituting this into the calculation, the linear braking distance L ≈ (0.167) 2 / (2×10)+(1000×0.167) / (10) 2 ≈0.0014+1.67=1.6714m.
[0039] The braking angle Δθ of the rotating shaft is calculated using the following formula: Δθ=ω 2 / (2α_max); Where α_max is the maximum permissible angular acceleration of the rotation axis; in this embodiment, if the current angular velocity of the C-axis ω = 1 rad / s, then α_max = 15 rad / s. 2 Substituting the values, we get Δθ = 1. 2 / (2*15)≈0.033rad, which is converted to linear distance and then merged with the linear braking distance L.
[0040] A basic safety threshold is generated by combining the linear braking distance L and the braking angle Δθ. Then, based on the type of the envelope corresponding to the entire moving body, a precision compensation coefficient is superimposed to obtain the final dynamic interference risk threshold S. The precision compensation coefficient is set according to the envelope type: 1.2 for the tool capsule envelope model, 1.5 for the spindle head convex polyhedron envelope model, and 1.0 for the fixture and workpiece AABB / OBB envelope model, ensuring that components with different envelope accuracies have appropriate safety margins.
[0041] In this embodiment, the basic safety threshold is taken as the maximum value of the linear distance L corresponding to the linear distance Δθ of the braking angle. After superimposing the compensation coefficient, the dynamic interference risk threshold S of the current interpolation cycle is obtained, so as to realize the dynamic adjustment of the threshold that is adapted to the current motion state of the machine tool in real time, and avoid the problem that the fixed threshold is not timely in high-speed scenarios and excessively restricts the processing efficiency in low-speed scenarios.
[0042] (3) Classification of Interference Risk Levels Based on the comparison results between the minimum spatial distance D and the dynamic interference risk threshold S, the interference risk level is divided into no-risk level, low-risk level, medium-risk level, high-risk level, and critical interference level. The specific classification rules are as follows: When D > S, it is determined to be at a no-risk level; When 2S / 3 < D ≤ S, it is judged as a low-risk level; When S / 3 < D ≤ 2S / 3, it is classified as a medium-risk level; When 0 < D ≤ S / 3, it is judged as a high-risk level; When D≤0, it is determined to be a critical interference level.
[0043] S5. Match the corresponding multi-angle positioning anti-interference control strategy according to the interference risk level, correct the current positioning motion parameters in real time, generate the corrected interpolation control command and send it to the CNC system of the five-axis machining center to execute the positioning motion control: In this step, differentiated anti-interference control strategies are matched according to different levels of interference risk to maximize processing efficiency while ensuring no interference. The specific matching rules are as follows: For the no-risk level: keep the original target motion parameters unchanged, execute the original interpolation command, and do not make any corrections to ensure the machine tool's positioning and machining efficiency; For low-risk levels: Initiate attitude smoothing optimization, based on a fifth-order polynomial smoothing algorithm, to limit and smooth the angular velocity of the rotation axis, reduce the amplitude of abrupt changes in the tool axis attitude, and keep the linear axis feed rate constant, thereby reducing the interference risk caused by abrupt changes in attitude without affecting positioning efficiency; For medium-risk levels: Initiate adaptive feed rate reduction, and linearly reduce the feed rate of the linear axis and rotary axis by combining the ratio of the minimum spatial distance D to the dynamic interference risk threshold S. The reduction ratio k = D / S, that is, the feed rate is corrected to k times the original speed. At the same time, without changing the target tool position, the tool axis attitude transition path is slightly modified. By slightly adjusting the tool axis attitude, the minimum spatial distance between moving parts is increased, which reduces the interference risk while ensuring the accuracy of the tool position at the positioning endpoint. For high-risk levels: pre-deceleration control is activated to reduce the feed rate of each axis to below the preset safe feed rate (in this embodiment, the safe feed rate is set to 1m / min) within one interpolation cycle to ensure that the machine tool has sufficient braking response capability; at the same time, under the constraint that the target tool position and target posture remain unchanged, the interference-free multi-angle positioning transition path is re-planned based on the Rapid Extended Random Tree (RRT) algorithm to replace the original positioning path, thereby eliminating the interference risk from the root and ensuring the machining accuracy requirements of the positioning endpoint; For critical interference levels: immediately trigger the feed hold command of the CNC system to stop the movement of all axes. At the same time, output interference alarm information, interference position coordinates and interference body type through the human-machine interface of the CNC system to remind the operator to conduct on-site inspection and avoid collision accidents.
[0044] Example 2 This method also includes a closed-loop feedback optimization step to achieve online iterative optimization of anti-interference control, as detailed below: The actual motion pose data of the grating ruler and encoder of each axis of the five-axis machining center are collected in real time, compared with the real-time motion pose sequence generated by look-ahead interpolation, and the deviation value between the actual pose (actual motion pose data) and the theoretical pose (real-time motion pose sequence) is calculated. A preset pose deviation threshold is set (in this embodiment, the linear axis deviation threshold is set to 0.01mm and the rotation axis deviation threshold is set to 0.001°). When the pose deviation exceeds the preset deviation threshold, the current dynamic interference risk threshold is updated based on the deviation value to increase the safety margin. At the same time, the subsequent look-ahead interpolation pose sequence is corrected to compensate for the interference risk caused by the machine tool motion error. Meanwhile, based on historical interference detection data and anti-interference control effects, a machine learning dataset is constructed. Through the gradient boosting decision tree (GBDT) model, the compensation coefficient of the dynamic interference risk threshold and the boundary of the interference risk level are iteratively optimized online, so that the anti-interference control strategy can continuously adapt to different processing scenarios and different tooling and fixture states, further improving the accuracy and adaptability of anti-interference control.
[0045] Example 3 See Figure 3 The multi-angle positioning anti-interference control system for a five-axis machining center in this embodiment operates within the CNC system of the five-axis machining center. Each module communicates in real-time via the internal bus of the CNC system, with a data interaction delay not exceeding one interpolation cycle to ensure the real-time performance of the anti-interference control. The system specifically includes a parametric modeling module 1, an instruction parsing module 2, a look-ahead interpolation module 3, an interference detection and risk classification module 4, and an anti-interference control module 5. It also includes a singularity prevention module 6 and a closed-loop feedback optimization module 7. The specific implementation methods of each module are as follows: Parametric Modeling Module 1: Used to construct a parametric spatial envelope model of the entire motion body for the entire kinematic chain components of a five-axis machining center. The entire motion body includes the cutting tool, spindle head, rotary motion unit, tooling fixture, and workpiece to be processed.
[0046] In practical implementation, this module divides the cutting tool, spindle head, rotary motion unit, tooling fixture, and workpiece into independent basic rigid body units. For each basic rigid body unit, a hybrid bounding box method combining axial bounding boxes (AABB) and directional bounding boxes (OBB) is used to construct a parametric spatial envelope model. Specifically, a high-precision capsule-shaped envelope model is constructed for the cutting edge and tool holder of the cutting tool, while a simplified convex polyhedral envelope model is constructed for the irregular moving parts of the spindle head and rotary motion unit. This module supports real-time updates of model parameters to adapt to scenarios such as tool changes and tooling adjustments.
[0047] Instruction parsing module 2: Used to obtain the multi-angle positioning instructions of the current CNC machining program, and parse the target motion parameters of each motion axis during the positioning process, as well as the corresponding target tool position point and tool axis posture sequence.
[0048] This module communicates with the G-code decoding unit of the CNC system, reads and parses positioning commands in real time, extracts target motion parameters of each axis, and generates target tool position and tool axis posture sequences based on the machine tool kinematic model, providing basic data for look-ahead interpolation.
[0049] Look-ahead interpolation module 3: Based on a preset number of look-ahead interpolation cycles N, it performs look-ahead interpolation processing on the target motion parameters, generates a real-time motion pose sequence for each motion axis within the next N interpolation cycles, and the real-time pose of the parameterized spatial envelope model of the entire motion body corresponding to each interpolation cycle.
[0050] This module adaptively and dynamically adjusts the number of look-ahead interpolation cycles N based on the maximum feed rate of the five-axis machining center, the maximum acceleration and jerk of each motion axis, and the interpolation cycle of the CNC system. The value of N ranges from 10 to 100 interpolation cycles, and the total look-ahead time is greater than or equal to the maximum braking time of the entire five-axis machining center. In this embodiment, the module uses an S-curve acceleration / deceleration algorithm to complete the look-ahead interpolation calculation, synchronously updating the real-time pose of each envelope.
[0051] Interference Detection and Risk Classification Module 4: This module performs global interference collision detection on the parameterized spatial envelope model of the entire moving body for each interpolation cycle, calculates the minimum spatial distance between each moving body, calculates the dynamic interference risk threshold by combining the motion velocity and acceleration of each motion axis in the current interpolation cycle, and classifies the interference risk level based on the comparison between the minimum spatial distance and the dynamic interference risk threshold.
[0052] When calculating the dynamic interference risk threshold, this module performs the following steps: For the current interpolation cycle, obtain the combined feed rate v of each linear axis and the maximum angular velocity ω of the rotary axis; Calculate the linear braking distance L=v under the current motion state. 2 / (2a_max)+j_max*v / a_max 2 Where a_max is the maximum allowable acceleration along the linear axis, and j_max is the maximum allowable jerk along the linear axis; Calculate the braking angle Δθ=ω of the rotating shaft. 2 / (2α_max), where α_max is the maximum permissible angular acceleration of the rotation axis; A basic safety threshold is generated by combining the linear braking distance L and the braking angle Δθ. Then, based on the type of the envelope corresponding to the whole moving body, an accuracy compensation coefficient is superimposed to obtain the final dynamic interference risk threshold.
[0053] Meanwhile, this module classifies the interference risk level into no-risk, low-risk, medium-risk, high-risk, and critical interference levels, with the classification rules being consistent with the above-mentioned method implementation.
[0054] Anti-interference control module 5: It is used to match the corresponding multi-angle positioning anti-interference control strategy according to the interference risk level, correct the current positioning motion parameters in real time, generate the corrected interpolation control command and send it to the CNC system of the five-axis machining center to execute positioning motion control.
[0055] The control strategy matching rules of this module are consistent with the above method embodiments. It performs corresponding control actions such as smoothing, deceleration, path replanning, and emergency stop for different risk levels to achieve hierarchical anti-interference control.
[0056] Singularity Prevention Module 6: During the look-ahead interpolation process, it calculates the rotation angle change rate of the rotation axis based on the tool axis posture sequence. When the rotation angle change rate exceeds the preset singularity determination threshold, it is determined to be a region near a singularity. The interference risk level of the interpolation cycle corresponding to the region near the singularity is automatically increased by one level and sent to the anti-interference control module 5 to match the corresponding anti-interference control strategy, thereby realizing the linkage interference prevention and control of the singularity region.
[0057] Closed-loop feedback optimization module 7: It is used to collect the actual motion pose data of the grating ruler and encoder of each axis of the five-axis machining center in real time, and compare it with the real-time motion pose sequence generated by look-ahead interpolation to calculate the pose deviation; when the pose deviation exceeds the preset deviation threshold, it updates the current dynamic interference risk threshold and corrects the subsequent look-ahead interpolation pose sequence; among them, based on the interference detection data and anti-interference control effect of historical processing, the compensation coefficient of the dynamic interference risk threshold and the division boundary of the interference risk level are iteratively optimized online through machine learning model.
[0058] It should be noted that the above embodiments are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention. For example, the five-axis machining center type of the present invention is not limited to the AC double rotary table structure, but can also be applied to other five-axis machine tool structures such as BC double rotary table, AB double swivel head, and AC swivel head + rotary table; the look-ahead interpolation algorithm is not limited to S-curve acceleration and deceleration, but can also use other acceleration and deceleration control algorithms such as trapezoidal acceleration and deceleration and exponential acceleration and deceleration; the path replanning algorithm is not limited to the RRT algorithm, but can also use other path planning algorithms such as the A* algorithm and the artificial potential field method, all without departing from the core concept of the present invention.
Claims
1. A method for multi-angle positioning and anti-interference control of a five-axis machining center, characterized in that, Includes the following steps: S1. Construct a parameterized spatial envelope model of the entire motion chain components of a five-axis machining center; S2. Obtain the multi-angle positioning instructions of the current CNC machining program, and parse the target motion parameters of each motion axis during the positioning process, as well as the corresponding target tool position point and tool axis posture sequence; S3. Based on the preset number of look-ahead interpolation cycles N, perform look-ahead interpolation on the target motion parameters to generate the real-time motion pose sequence of each motion axis in the next N interpolation cycles, and the real-time pose of the parameterized spatial envelope model of the whole motion body corresponding to each interpolation cycle. S4. Perform global interference collision detection on the parameterized spatial envelope model of the whole moving body in each interpolation cycle, and calculate the minimum spatial distance between each moving body; combine the motion velocity and acceleration of each motion axis in the current interpolation cycle to calculate the dynamic interference risk threshold. By comparing the minimum spatial distance with the dynamic interference risk threshold, the interference risk level is classified. S5. Match the corresponding anti-interference control strategy according to the interference risk level, correct the current positioning motion parameters in real time, generate the corrected interpolation control command and send it to the five-axis machining center CNC system to execute the positioning motion control.
2. The method according to claim 1, characterized in that, In S1, constructing the parameterized spatial envelope model of the entire moving body includes: The cutting tool, spindle head, rotary motion unit, tooling fixture and workpiece to be processed are each divided into independent basic rigid body units; For each basic rigid body element, a hybrid bounding box method combining axial bounding box (AABB) and directional bounding box (OBB) is used to construct a parametric spatial envelope model. Among them, a high-precision capsule-shaped envelope model is constructed for the cutting edge and tool holder of the tool, and a simplified convex polyhedron envelope model is constructed for the irregular moving parts of the spindle head and rotary motion unit.
3. The method according to claim 1, characterized in that, In S3, the number of look-ahead interpolation cycles N is dynamically adjusted adaptively based on the maximum feed speed of the five-axis machining center, the maximum acceleration and jerk of each motion axis, and the interpolation cycle of the CNC system. The value of N ranges from 10 to 100 interpolation cycles, and the total look-ahead time is greater than or equal to the maximum braking time of the entire five-axis machining center.
4. The method according to claim 1, characterized in that, In step S4, calculating the dynamic interference risk threshold includes: For the current interpolation cycle, obtain the combined feed rate of each linear axis and the maximum angular velocity of the rotary axis; Calculate the linear braking distance under the current motion state based on the maximum permissible acceleration and the maximum permissible jerk of the linear axis; Calculate the braking angle of the rotating shaft based on the maximum permissible angular acceleration of the rotating shaft; A basic safety threshold is generated by combining linear braking distance and braking angle, and then a precision compensation coefficient is superimposed based on the envelope type corresponding to the whole moving body to obtain the final dynamic interference risk threshold.
5. The method according to claim 1, characterized in that, In S4, the interference risk level is divided into no risk, low risk, medium risk, high risk and critical interference level; Among them, the minimum spatial distance > the dynamic interference risk threshold is the risk-free level; ≤ the dynamic interference risk threshold and > 2 / 3 of the dynamic interference risk threshold is the low risk level; ≤ 2 / 3 of the dynamic interference risk threshold and > 1 / 3 of the dynamic interference risk threshold is the medium risk level; ≤ 1 / 3 of the dynamic interference risk threshold and > 0 is the high risk level; and ≤ 0 is the critical interference level.
6. The method according to claim 5, characterized in that, In S5, the anti-interference control strategy matching rules include: No risk level; maintain the original target motion parameters and execute the original interpolation command. Low risk level, start attitude smoothing optimization, limit and smooth the rotary axis angular velocity, reduce the amplitude of tool axis attitude change, and keep the linear axis feed rate constant; For medium-risk levels, the feed rate is adaptively reduced by combining the ratio of minimum spatial distance to dynamic interference risk threshold for linear speed reduction, while slightly correcting the tool axis attitude transition path without changing the target tool position. High-risk level, initiate pre-deceleration control, reduce the feed rate of each axis to below the preset safe feed rate, and at the same time, under the constraint that the target tool position and target attitude remain unchanged, re-plan an interference-free positioning transition path; When the critical interference level is reached, the CNC system immediately triggers the feed hold command, stops all axis movements, and outputs interference alarm information, interference position, and interference body type.
7. The method according to claim 1, characterized in that, The S3 also includes a five-axis motion singularity prediction step: The rotation axis angle change rate is calculated based on the tool axis posture sequence. When the angle change rate exceeds the preset singularity judgment threshold, it is judged as a region near a singularity. The interference risk level of the interpolation cycle corresponding to this region is automatically increased by one level, and the corresponding anti-interference control strategy is matched.
8. The method according to claim 1, characterized in that, It also includes closed-loop feedback optimization steps: Real-time acquisition of actual motion pose data of grating rulers and encoders on each axis of a five-axis machining center, and comparison with real-time motion pose sequence generated by look-ahead interpolation to calculate pose deviation; When the pose deviation exceeds the preset deviation threshold, update the current dynamic interference risk threshold and correct the subsequent look-ahead interpolation pose sequence; Based on historically processed interference detection data and anti-interference control effects, the compensation coefficient of the dynamic interference risk threshold and the boundary of the interference risk level division are iteratively optimized online through machine learning models.
9. A multi-angle positioning anti-interference control system for a five-axis machining center, characterized in that, include: The parametric modeling module is used to construct a parametric spatial envelope model of the entire motion chain components of a five-axis machining center. The instruction parsing module is used to obtain the multi-angle positioning instructions of the current CNC machining program, and parse the target motion parameters of each motion axis during the positioning process, as well as the corresponding target tool position point and tool axis posture sequence. The look-ahead interpolation module is used to perform look-ahead interpolation on the target motion parameters based on a preset number of look-ahead interpolation cycles N, and generate a real-time motion pose sequence for each motion axis in the next N interpolation cycles, as well as the real-time pose of the parameterized spatial envelope model of the whole moving body corresponding to each interpolation cycle. The Interference Detection and Risk Classification module is used to perform global interference collision detection on the parameterized spatial envelope model of the whole moving body in each interpolation cycle, calculate the minimum spatial distance between each moving body, and calculate the dynamic interference risk threshold by combining the motion velocity and acceleration of each motion axis in the current interpolation cycle. By comparing the minimum spatial distance with the dynamic interference risk threshold, the interference risk level is classified. The anti-interference control module is used to match the corresponding anti-interference control strategy according to the interference risk level, correct the current positioning motion parameters in real time, generate the corrected interpolation control command and send it to the five-axis machining center CNC system to execute the positioning motion control.
10. The system according to claim 9, characterized in that, The parametric modeling module is also used to: divide the cutting tool, spindle head, rotary motion unit, tooling fixture and workpiece to be processed into independent basic rigid body units respectively; For each basic rigid body element, a hybrid bounding box method combining axial bounding box (AABB) and directional bounding box (OBB) is used to construct a parametric spatial envelope model. Among them, a high-precision capsule-shaped envelope model is constructed for the cutting edge and tool holder of the tool, and a simplified convex polyhedron envelope model is constructed for the irregular moving parts of the spindle head and rotary motion unit.