NURBS local support-based look-ahead interpolation method and system
By using a look-ahead interpolation method based on NURBS local support, local data sequences are obtained and segmentation points and geometric feature sequences are generated under an adaptive interval recursive mechanism. This solves the problems of large memory consumption and slow response speed in CNC machining, and achieves efficient utilization of memory resources and smooth and continuous trajectory speed.
Patent Information
- Application Number
- CN202511162937.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-19
- Publication Date
- 2025-11-11
AI Technical Summary
In existing CNC machining technologies, NURBS curve-based processing methods suffer from high memory consumption and slow response speed. Furthermore, existing methods are prone to forming non-smooth connection seams or redundant calculations during processing, resulting in low memory resource utilization.
A look-ahead interpolation method based on NURBS local support is adopted. By acquiring control point sequences and node information sequences, local data sequences are extracted, and segmented point sequences and geometric feature sequences are generated under an adaptive interval recursive mechanism. Combined with preset velocity constraints, a desired velocity set is generated, and finally, interpolation processing is performed, avoiding loading the entire NURBS curve into memory.
It effectively reduces memory resource consumption, improves the response speed and trajectory generation smoothness of the CNC machining system, overcomes the problems of memory waste and redundant calculation, and ensures the continuity of trajectory speed and machining stability.
Smart Images

Figure CN120928781A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of CNC machining technology, and in particular to a look-ahead interpolation method and system based on NURBS local support. Background Technology
[0002] Existing CNC machining technologies typically generate machining trajectories based on NURBS curve processing methods to improve machining trajectory accuracy and optimize feed rate. However, traditional NURBS curve processing methods require loading the complete NURBS curve segment into memory at once, which results in high memory consumption and reduced response speed of the CNC machining system.
[0003] To address the aforementioned issues, existing technologies have proposed a NURBS curve processing method based on subroutine segmentation. This method divides the NURBS curve into multiple sub-segments with fixed parameter intervals for interpolation calculations, thereby reducing memory usage. However, due to the lack of continuity constraints, non-smooth connection seams easily form between the sub-segments divided by the fixed parameter intervals, leading to sudden speed changes in the final generated machining trajectory. Furthermore, existing technologies have proposed a NURBS curve processing method based on trajectory look-ahead analysis. This method constructs look-ahead segments of the NURBS curve using a sliding window and performs path analysis and speed adjustment on the future machining trajectory based on the curvature, acceleration, and other geometric features of each look-ahead segment to improve the response speed of the CNC machining system. However, there are overlapping intervals between the look-ahead segments, resulting in a large amount of redundant calculation when processing the geometric features of each look-ahead segment, leading to low memory resource utilization. Summary of the Invention
[0004] The present invention aims to provide a look-ahead interpolation method and system based on NURBS local support to solve the above-mentioned technical problems and reduce memory resource consumption.
[0005] To address the aforementioned technical problems, this invention provides a look-ahead interpolation method based on NURBS local support, applied to motion controllers. The method includes:
[0006] Obtain the control point sequence and node information sequence of the NURBS curve, and extract the local data sequence within a preset sliding window based on the control point sequence and the node information sequence.
[0007] Based on the local data sequence, a segmented point sequence and a geometric feature sequence are obtained under a preset adaptive interval recursive mechanism.
[0008] Based on the segmented point sequence and the geometric feature sequence, a desired velocity set is generated under preset velocity constraints.
[0009] The structured trajectory dataset is obtained by binding the geometric feature sequence and the expected velocity set.
[0010] The motion controller is interpolated based on the structured trajectory dataset.
[0011] In the above scheme, it is not necessary to load the entire NURBS curve into memory. Subsequent processing operations can be completed based solely on the control point sequence and node information sequence of the NURBS curve, greatly reducing memory resource consumption. Furthermore, based on the geometric characteristics of the NURBS curve reflected in the local data sequence, the above scheme obtains a segmented point sequence under a preset adaptive interval recursive mechanism. This segmented point sequence concentrates more segmented points in areas of drastic curvature change in the NURBS curve. In other words, this scheme enables the segmented points to be concentrated in complex-shaped regions of the NURBS curve, making the velocity change process of the subsequently obtained desired velocity set smoother. This overcomes the problem of existing technologies adaptively shortening fixed segment lengths to smooth the desired velocity change, resulting in a large number of unnecessary endpoints and increased memory resource consumption. Therefore, this scheme can reduce memory resource waste and consumption.
[0012] Further, the step of obtaining the segmented point sequence and geometric feature sequence based on the local data sequence under a preset adaptive interval recursive mechanism includes: dividing the parameter interval of the local data sequence at a preset step size to obtain several sub-parameter intervals; for any sub-parameter interval among the several sub-parameter intervals, performing a preset adaptive integration step to obtain several sub-segmented point sequences and several geometric feature sub-sequences; using the several sub-segmented point sequences as segmented point sequences and the several geometric feature sub-sequences as geometric feature sequences.
[0013] Further, the adaptive integration step includes: performing Simpson integral calculation based on the local data sequence and the sub-parameter interval to obtain first Simpson integral data; performing Simpson integral calculation based on the local data sequence and the sub-parameter interval under a preset bisection method to obtain second Simpson integral data; obtaining an integration error based on the first Simpson integral data and the second Simpson integral data; and if the integration error meets a preset accuracy threshold, obtaining a sub-segmentation point sequence and a geometric feature sub-sequence corresponding to the sub-parameter interval.
[0014] Furthermore, the step of obtaining the sub-segment point sequence and geometric feature sub-sequence corresponding to the sub-parameter interval if the integration error meets the preset accuracy threshold further includes: if the integration error does not meet the preset accuracy threshold, then a set of second-order molecular parameter intervals is obtained based on the sub-parameter interval under a preset bisection method, and the adaptive integration step is recursively executed for each second-order molecular parameter interval in the set of second-order molecular parameter intervals to obtain the sub-segment point sequence and geometric feature sub-sequence of the sub-parameter interval.
[0015] Further, the step of performing Simpson integral calculation based on the local data sequence and the sub-parameter interval under a preset bisection method to obtain the second Simpson integral data includes: dividing the sub-parameter interval under a preset bisection method to obtain a first temporary sub-parameter interval and a second temporary sub-parameter interval; performing arc length estimation based on the first temporary parameter interval and the local data sequence under a preset Simpson formula to obtain first temporary Simpson integral data; performing arc length estimation based on the second temporary parameter interval and the local data sequence under a preset Simpson formula to obtain second temporary Simpson integral data; and integrating the first temporary Simpson integral data and the second temporary Simpson integral data to obtain the second Simpson integral data.
[0016] In the above scheme, if the integration error does not meet the preset accuracy threshold, it is considered that the NURBS curve shape represented by the local data sequence corresponding to the sub-parameter interval is relatively complex and requires further subdivision. Therefore, the sub-parameter interval is bisected, and the adaptive integration step is recursively executed on each bisected sub-parameter interval until the preset accuracy threshold is met. The process of subdividing the sub-parameter interval into a segmented point sequence is closely related to the geometric features of the corresponding NURBS curve. Key geometric features such as curvature changes, inflection points, and sharp angles directly affect the frequency of subdivision triggering, thus affecting the final sub-parameter interval division result, i.e., the distribution of segmented points in the obtained segmented point sequence. Therefore, the segmented point sequence obtained by this scheme can indirectly reflect the response behavior of the key geometric features of the corresponding NURBS curve, making the subsequently obtained structured trajectory dataset more accurate and robust, and reducing the computational load of the subsequent process of generating the desired velocity set under preset velocity constraints, saving computational resources and improving the overall response speed.
[0017] Further, generating the desired velocity set based on the segmented point sequence and the geometric feature sequence under preset velocity constraints includes: generating the desired interpolated velocity set based on the segmented point sequence and the geometric feature sequence under preset velocity constraints including preset bow height error constraints, preset centripetal acceleration constraints, preset forward velocity constraints, preset backward velocity constraints, and preset segment connection smoothness constraints; integrating the geometric feature sequence and the desired interpolated velocity set to obtain the desired velocity set; the bow height error constraint includes: based on the curvature K of the tail of segment i in the geometric feature sequence. i Under a preset interpolation period T, the desired interpolation speed V of the segment i to be generated is limited by a preset bow height error constraint formula. i To ensure that the bow height error δ meets the preset bow height error threshold; the bow height error constraint formula is as follows:
[0018]
[0019] The centripetal acceleration constraint includes: based on the tail curvature K of segment i in the geometric feature sequence. i At the preset centripetal acceleration a c Below, the desired interpolation velocity V of segment i is constrained by a preset centripetal acceleration constraint formula. i The centripetal acceleration constraint formula is as follows:
[0020]
[0021] The forward velocity constraint includes: the terminal velocity v based on segment i-1 of the geometric feature sequence. i-1 At the preset maximum tangential acceleration a max Below, the desired interpolation velocity V of segment i is limited by a preset forward velocity constraint formula. i Ensure forward velocity V forward The forward velocity threshold is satisfied; the forward velocity constraint formula is:
[0022] V forward =v i-1 +a max ·T;
[0023] The backward velocity constraint includes: the end velocity v based on segment i+1 of the geometric feature sequence. i+1 The length ΔL of segment i i At the preset maximum tangential acceleration a max Below, the desired interpolation velocity V of segment i is limited by a preset backward velocity constraint formula. i Ensure backward velocity V backward The preset backward velocity threshold is met; the backward velocity constraint formula is as follows:
[0024] Vbackward =min(V i V backmax );
[0025]
[0026] Among them, V backmax The calculated maximum velocity at the tail of segment i;
[0027] The segment connection smoothing constraint includes: calculating the included angle θ based on the unit tangent vector at the tail of segment i and the unit tangent vector at the head of segment i+1 in the geometric feature sequence, and limiting the expected interpolation speed V of segment i based on the included angle θ using a preset segment connection smoothing constraint formula. i Ensure the final velocity V of the connecting section joint The preset end-velocity threshold of the connection segment is met; the smooth connection constraint formula is as follows:
[0028]
[0029] Where, Δv max This is the calculated maximum permissible speed.
[0030] In the above scheme, the bow height error constraint constrains the desired interpolation speed by controlling the bow height error; the centripetal acceleration constraint limits the maximum tolerable desired interpolation speed by controlling the curvature of the current segment's tail, thus avoiding centripetal acceleration exceeding the system's response capability; the forward velocity constraint ensures that the inter-segment speed can increase smoothly and without sudden speed changes under limited acceleration capability; the backward velocity constraint constrains the desired interpolation speed by controlling the backward velocity to meet a preset backward velocity threshold; the segment connection smoothness constraint constrains the desired interpolation speed by limiting the maximum velocity change corresponding to the tangential direction change of adjacent segments, ensuring the continuity of inter-segment speed and overcoming the curvature jump problem caused by weight discontinuity or control point offset when NURBS curve segments are spliced from local control points in the prior art, thus ensuring the continuity of trajectory velocity changes in the subsequently generated structured trajectory dataset and controlled acceleration and deceleration, meeting the requirements of dynamic accuracy and machining stability in the field of CNC machining technology.
[0031] This invention also provides a look-ahead interpolation system based on NURBS local support, comprising: a local data sequence extraction module for acquiring control point sequences and node information sequences of NURBS curves, and extracting local data sequences within a preset sliding window based on the control point sequences and node information sequences; an adaptive recursive segmentation and feature generation module for obtaining segmented point sequences and geometric feature sequences based on the local data sequences obtained by the local data sequence extraction module under a preset adaptive interval recursive mechanism; a multi-constraint look-ahead velocity planning module for generating a desired velocity set under preset velocity constraints based on the segmented point sequences and geometric feature sequences obtained by the adaptive recursive segmentation and feature generation module; a structured trajectory dataset generation module for binding the geometric feature sequences obtained by the adaptive recursive segmentation and geometric feature generation module and the desired velocity set obtained by the multi-constraint look-ahead velocity planning module to obtain a structured trajectory dataset; and an interpolation processing module for performing interpolation processing on the motion controller based on the structured trajectory dataset obtained by the structured trajectory dataset generation module.
[0032] The above scheme can complete subsequent processing operations based solely on the control point sequence and node information sequence of the NURBS curve obtained by the local data sequence extraction module, greatly reducing memory resource consumption. Furthermore, the adaptive recursive segmentation and feature generation module of the above scheme, based on the geometric characteristic sequence of the NURBS curve reflected by the local data sequence, obtains a segmentation point sequence under a preset adaptive interval recursive mechanism. The segmentation points in this sequence are concentrated in regions where the curvature of the NURBS curve changes drastically and the shape is complex. This makes the velocity change process of the desired velocity set obtained by the subsequent multi-constraint look-ahead velocity planning module smoother, overcoming the problem of existing technologies that adaptively shorten the fixed segment length to smooth the desired velocity change, resulting in a large number of unnecessary endpoints and increased memory resource consumption. Therefore, this scheme can reduce memory waste and consumption.
[0033] Furthermore, the adaptive recursive segmentation and feature generation module is used to obtain segmentation point sequences and geometric feature sequences based on the local data sequence obtained by the local data sequence extraction module under a preset adaptive interval recursive mechanism. This includes: dividing the parameter interval of the local data sequence obtained by the local data sequence extraction module at a preset step size to obtain several sub-parameter intervals; for any sub-parameter interval among the several sub-parameter intervals, performing a preset adaptive integration step to obtain several sub-segmentation point sequences and several geometric feature sub-sequences; using the several sub-segmentation point sequences as segmentation point sequences and the several geometric feature sub-sequences as geometric feature sequences.
[0034] Further, the adaptive integration step includes: performing Simpson integral calculation based on the local data sequence and the sub-parameter interval to obtain first Simpson integral data; performing Simpson integral calculation based on the local data sequence and the sub-parameter interval under a preset bisection method to obtain second Simpson integral data; obtaining an integration error based on the first Simpson integral data and the second Simpson integral data; and if the integration error meets a preset accuracy threshold, obtaining a sub-segmentation point sequence and a geometric feature sub-sequence corresponding to the sub-parameter interval.
[0035] Furthermore, the step of obtaining the sub-segment point sequence and geometric feature sub-sequence corresponding to the sub-parameter interval if the integration error meets the preset accuracy threshold further includes: if the integration error does not meet the preset accuracy threshold, then a set of second-order molecular parameter intervals is obtained based on the sub-parameter interval under a preset bisection method, and the adaptive integration step is recursively executed for each second-order molecular parameter interval in the set of second-order molecular parameter intervals to obtain the sub-segment point sequence and geometric feature sub-sequence of the sub-parameter interval. Attached Figure Description
[0036] Figure 1 This is a flowchart illustrating the implementation of a look-ahead interpolation method based on NURBS local support, as provided in an embodiment of the present invention.
[0037] Figure 2 This is a schematic diagram of a look-ahead interpolation system architecture based on NURBS local support, provided as an embodiment of the present invention. Detailed Implementation
[0038] 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.
[0039] Please see Figure 1 This embodiment provides a look-ahead interpolation method based on NURBS local support, including the following steps:
[0040] Step S1: Obtain the control point sequence and node information sequence of the NURBS curve, and extract the local data sequence based on the control point sequence and the node information sequence within a preset sliding window;
[0041] Step S2: Based on the local data sequence, obtain the segmented point sequence and geometric feature sequence under the preset adaptive interval recursive mechanism;
[0042] Step S3: Based on the segmented point sequence and the geometric feature sequence, generate the desired velocity set under preset velocity constraints;
[0043] Step S4: Bind the geometric feature sequence and the desired velocity set to obtain a structured trajectory dataset;
[0044] Step S5: Perform interpolation processing on the motion controller based on the structured trajectory dataset.
[0045] In this embodiment, it is not necessary to load the entire NURBS curve into memory. Subsequent processing operations can be completed based solely on the control point sequence and node information sequence of the NURBS curve, greatly reducing memory resource consumption. Furthermore, this embodiment obtains a segmented point sequence based on the geometric characteristics of the NURBS curve reflected by the local data sequence, under a preset adaptive interval recursive mechanism. This segmented point sequence concentrates more segmented points in areas of drastic curvature change in the NURBS curve. In other words, this embodiment can distribute segmented points in complex-shaped regions of the NURBS curve, making the velocity change process of the subsequently obtained desired velocity set smoother. This overcomes the problem of existing technologies that adaptively shorten fixed segment lengths to smooth the desired velocity change, resulting in a large number of unnecessary endpoints and increased memory resource consumption. Therefore, this embodiment can reduce memory resource waste and consumption.
[0046] It should be noted that the NURBS curves processed in this embodiment are fourth-order NURBS curves, and this embodiment uses a fixed-size sliding window. This sliding window contains local data sequences of 8 consecutive NURBS curves, and the sliding window always moves forward, with a step size of 1. The local data includes control points and node information for the corresponding interpolation segments.
[0047] Further, the step of obtaining the segmented point sequence and geometric feature sequence based on the local data sequence under a preset adaptive interval recursive mechanism includes: dividing the parameter interval of the local data sequence at a preset step size to obtain several sub-parameter intervals; for any sub-parameter interval among the several sub-parameter intervals, performing a preset adaptive integration step to obtain several sub-segmented point sequences and several geometric feature sub-sequences; using the several sub-segmented point sequences as segmented point sequences and the several geometric feature sub-sequences as geometric feature sequences.
[0048] Further, the adaptive integration step includes: performing Simpson integral calculation based on the local data sequence and the sub-parameter interval to obtain first Simpson integral data; performing Simpson integral calculation based on the local data sequence and the sub-parameter interval under a preset bisection method to obtain second Simpson integral data; obtaining an integration error based on the first Simpson integral data and the second Simpson integral data; and if the integration error meets a preset accuracy threshold, obtaining a sub-segmentation point sequence and a geometric feature sub-sequence corresponding to the sub-parameter interval.
[0049] Furthermore, the step of obtaining the sub-segment point sequence and geometric feature sub-sequence corresponding to the sub-parameter interval if the integration error meets the preset accuracy threshold further includes: if the integration error does not meet the preset accuracy threshold, then a set of second-order molecular parameter intervals is obtained based on the sub-parameter interval under a preset bisection method, and the adaptive integration step is recursively executed for each second-order molecular parameter interval in the set of second-order molecular parameter intervals to obtain the sub-segment point sequence and geometric feature sub-sequence of the sub-parameter interval.
[0050] Further, the step of performing Simpson integral calculation based on the local data sequence and the sub-parameter interval under a preset bisection method to obtain the second Simpson integral data includes: dividing the sub-parameter interval under a preset bisection method to obtain a first temporary sub-parameter interval and a second temporary sub-parameter interval; performing arc length estimation based on the first temporary parameter interval and the local data sequence under a preset Simpson formula to obtain first temporary Simpson integral data; performing arc length estimation based on the second temporary parameter interval and the local data sequence under a preset Simpson formula to obtain second temporary Simpson integral data; and integrating the first temporary Simpson integral data and the second temporary Simpson integral data to obtain the second Simpson integral data.
[0051] In this embodiment, if the integration error does not meet the preset accuracy threshold, it is considered that the NURBS curve shape represented by the local data sequence corresponding to the sub-parameter interval is relatively complex and requires further subdivision. Therefore, the sub-parameter interval is bisected, and the adaptive integration step is recursively executed on each bisected sub-parameter interval until the preset accuracy threshold is met. The process of subdividing the sub-parameter interval to obtain the segmented point sequence in this embodiment is closely related to the geometric features of the corresponding NURBS curve. Key geometric features such as curvature changes, inflection points, and sharp angles directly affect the frequency of subdivision triggering, thus affecting the final sub-parameter interval division result, i.e., the distribution of segmented points in the obtained segmented point sequence. Therefore, the segmented point sequence obtained in this embodiment can reflect the response behavior of the key geometric features of the corresponding NURBS curve, resulting in higher accuracy and robustness of the subsequently obtained structured trajectory dataset. It also reduces the computational load of generating the desired velocity set under preset velocity constraints, saving computational resources and improving the overall response speed.
[0052] It should be noted that, in this embodiment, while obtaining the sub-segment point sequence corresponding to the sub-parameter interval, the geometric feature sub-sequence corresponding to the current segment is extracted. The geometric feature sub-sequence contains key geometric features, which include: the arc length of the current segment, the first derivative magnitude of the segment head, the first derivative magnitude of the segment tail, the radius of curvature of the segment tail, the unit tangent vector of the segment head, the unit tangent vector of the segment tail, the parameter value of the segment head, and the parameter value of the segment tail.
[0053] In this embodiment, the extracted geometric feature subsequence is stored in a rotating buffer, which is a fixed-length memory structure that supports beginning and end loops. Its data storage method uses First-In-First-Out (FIFO) logic and supports pointer wrap-around operations to avoid frequent memory allocation and deallocation. Furthermore, in this example, the rotating buffer uses a dual-pointer mechanism (read pointer and write pointer) to control the inflow and outflow of data, enabling continuous caching of geometric information related to the curve trajectory. In this embodiment, the rotating buffer can be used in conjunction with a sliding window to form a set of locally continuous geometric feature sequences of curve segments. Specifically, a fixed-length sliding window is set within the rotating buffer. Each time the curve trajectory is advanced, the sliding window slides forward one data unit at a preset step size, thereby extracting the geometric information of the next curve trajectory to be processed in real time. Therefore, this embodiment can achieve simultaneous data loading and computation processing, avoiding redundant calculations and resource waste, making it suitable for embedded CNC systems or machining platforms with limited memory resources.
[0054] Further, generating the desired velocity set based on the segmented point sequence and the geometric feature sequence under preset velocity constraints includes: generating the desired interpolated velocity set based on the segmented point sequence and the geometric feature sequence under preset velocity constraints including preset bow height error constraints, preset centripetal acceleration constraints, preset forward velocity constraints, preset backward velocity constraints, and preset segment connection smoothness constraints; integrating the geometric feature sequence and the desired interpolated velocity set to obtain the desired velocity set; the bow height error constraint includes: based on the curvature K of the tail of segment i in the geometric feature sequence. i Under a preset interpolation period T, the desired interpolation speed V of the segment i to be generated is limited by a preset bow height error constraint formula. i To ensure that the bow height error δ meets the preset bow height error threshold; the bow height error constraint formula is as follows:
[0055]
[0056] The centripetal acceleration constraint includes: based on the tail curvature K of segment i in the geometric feature sequence. i At the preset centripetal acceleration a c Below, the desired interpolation velocity V of segment i is constrained by a preset centripetal acceleration constraint formula. i The centripetal acceleration constraint formula is as follows:
[0057]
[0058] The forward velocity constraint includes: the terminal velocity v based on segment i-1 of the geometric feature sequence. i-1 At the preset maximum tangential acceleration a max Below, the desired interpolation velocity V of segment i is limited by a preset forward velocity constraint formula. i Ensure forward velocity V forward The forward velocity threshold is satisfied; the forward velocity constraint formula is:
[0059] V forward =v i-1 +a max ·T;
[0060] The backward velocity constraint includes: the end velocity v based on segment i+1 of the geometric feature sequence. i+1 The length ΔL of segment i i At the preset maximum tangential acceleration a max Below, the desired interpolation velocity V of segment i is limited by a preset backward velocity constraint formula. i Ensure backward velocity V backward The preset backward velocity threshold is met; the backward velocity constraint formula is as follows:
[0061] Vbackward =min(V i V backmax );
[0062]
[0063] Among them, V backmax The calculated maximum velocity at the tail of segment i;
[0064] The segment connection smoothing constraint includes: calculating the included angle θ based on the unit tangent vector at the tail of segment i and the unit tangent vector at the head of segment i+1 in the geometric feature sequence, and limiting the expected interpolation speed V of segment i based on the included angle θ using a preset segment connection smoothing constraint formula. i Ensure the final velocity V of the connecting section joint The preset end-velocity threshold of the connection segment is met; the smooth connection constraint formula is as follows:
[0065]
[0066] Where, Δv max This is the calculated maximum permissible speed.
[0067] In this embodiment, the bow height error constraint constrains the desired interpolation speed by controlling the bow height error; the centripetal acceleration constraint is the curvature of the current segment's tail to limit its maximum tolerable desired interpolation speed, avoiding centripetal acceleration exceeding the system's response capability; the forward speed constraint ensures that the speed between segments can increase relatively smoothly under limited acceleration capability, without sudden speed changes; the backward speed constraint constrains the desired interpolation speed by controlling the backward speed to meet a preset backward speed threshold; the segment connection smoothness constraint constrains the desired interpolation speed by limiting the maximum speed change corresponding to the tangential direction change of adjacent segments, ensuring continuous speed changes between segments and overcoming the curvature jump problem caused by weight discontinuity or control point offset when NURBS curve segments are spliced from local control points in the prior art, thus ensuring continuous trajectory speed changes in the subsequently generated structured trajectory dataset, and controlled acceleration and deceleration, to meet the requirements of dynamic accuracy and machining stability in the field of CNC machining technology.
[0068] It should be noted that in the case of linear machining without constraints during CNC machining, the machining speed will continuously accelerate according to the laws of kinematics. Therefore, this embodiment limits the expected interpolation speed based on various constraint speeds obtained from speed constraints, so that the expected interpolation speed is not greater than the various constraint speeds, which can ensure high machining accuracy and operational safety.
[0069] Please see Figure 2This embodiment also provides a look-ahead interpolation system based on NURBS local support, comprising: a local data sequence extraction module, used to acquire the control point sequence and node information sequence of the NURBS curve, and extract a local data sequence within a preset sliding window based on the control point sequence and the node information sequence; an adaptive recursive segmentation and feature generation module, used to obtain a segmented point sequence and a geometric feature sequence based on the local data sequence obtained by the local data sequence extraction module under a preset adaptive interval recursive mechanism; a multi-constraint look-ahead velocity planning module, used to generate a desired velocity set under preset velocity constraints based on the segmented point sequence and geometric feature sequence obtained by the adaptive recursive segmentation and feature generation module; a structured trajectory dataset generation module, used to bind the geometric feature sequence obtained by the adaptive recursive segmentation and geometric feature generation module and the desired velocity set obtained by the multi-constraint look-ahead velocity planning module to obtain a structured trajectory dataset; and an interpolation processing module, used to perform interpolation processing on the motion controller based on the structured trajectory dataset obtained by the structured trajectory dataset generation module.
[0070] This embodiment uses the control point sequence and node information sequence of the NURBS curve obtained by the local data sequence extraction module to complete subsequent processing operations, greatly reducing memory resource consumption. Furthermore, the adaptive recursive segmentation and feature generation module of this embodiment, based on the geometric characteristic sequence of the NURBS curve reflected by the local data sequence, obtains a segmentation point sequence under a preset adaptive interval recursive mechanism. The segmentation points in this sequence are concentrated in areas where the curvature of the NURBS curve changes drastically and the shape is complex. This makes the velocity change process of the desired velocity set obtained by the subsequent multi-constraint look-ahead velocity planning module smoother, overcoming the problem in existing technologies where adaptively shortening the fixed segment length to smooth the desired velocity change results in a large number of unnecessary endpoints and increased memory resource consumption. Therefore, this embodiment can reduce memory resource waste and consumption.
[0071] Furthermore, the adaptive recursive segmentation and feature generation module is used to obtain segmentation point sequences and geometric feature sequences based on the local data sequence obtained by the local data sequence extraction module under a preset adaptive interval recursive mechanism. This includes: dividing the parameter interval of the local data sequence obtained by the local data sequence extraction module at a preset step size to obtain several sub-parameter intervals; for any sub-parameter interval among the several sub-parameter intervals, performing a preset adaptive integration step to obtain several sub-segmentation point sequences and several geometric feature sub-sequences; using the several sub-segmentation point sequences as segmentation point sequences and the several geometric feature sub-sequences as geometric feature sequences.
[0072] Further, the adaptive integration step includes: performing Simpson integral calculation based on the local data sequence and the sub-parameter interval to obtain first Simpson integral data; performing Simpson integral calculation based on the local data sequence and the sub-parameter interval under a preset bisection method to obtain second Simpson integral data; obtaining an integration error based on the first Simpson integral data and the second Simpson integral data; and if the integration error meets a preset accuracy threshold, obtaining a sub-segmentation point sequence and a geometric feature sub-sequence corresponding to the sub-parameter interval.
[0073] Furthermore, the step of obtaining the sub-segment point sequence and geometric feature sub-sequence corresponding to the sub-parameter interval if the integration error meets the preset accuracy threshold further includes: if the integration error does not meet the preset accuracy threshold, then a set of second-order molecular parameter intervals is obtained based on the sub-parameter interval under a preset bisection method, and the adaptive integration step is recursively executed for each second-order molecular parameter interval in the set of second-order molecular parameter intervals to obtain the sub-segment point sequence and geometric feature sub-sequence of the sub-parameter interval.
[0074] The segmentation point sequence generated by the adaptive recursive segmentation and feature generation module in this embodiment can reflect the response behavior of the key geometric features of the corresponding NURBS curve. This makes the structured trajectory dataset obtained by the subsequent multi-constraint look-ahead velocity planning module more accurate and robust. It also reduces the computational load of the subsequent process of generating the desired velocity set under preset velocity constraints, saving computational resources, reducing memory consumption, and improving the overall response speed.
[0075] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A look-ahead interpolation method based on NURBS local support, characterized in that, Applied to motion controllers, the method includes the following steps: Obtain the control point sequence and node information sequence of the NURBS curve, and extract the local data sequence within a preset sliding window based on the control point sequence and the node information sequence. Based on the local data sequence, a segmented point sequence and a geometric feature sequence are obtained under a preset adaptive interval recursive mechanism. Based on the segmented point sequence and the geometric feature sequence, a desired velocity set is generated under preset velocity constraints. The structured trajectory dataset is obtained by binding the geometric feature sequence and the expected velocity set. The motion controller is interpolated based on the structured trajectory dataset.
2. The look-ahead interpolation method based on NURBS local support as described in claim 1, characterized in that, The process of obtaining segmented point sequences and geometric feature sequences based on the local data sequence under a preset adaptive interval recursive mechanism includes: Based on the parameter range of the local data sequence, the data is divided at a preset step size to obtain several sub-parameter ranges. For any one of the several sub-parameter intervals, a preset adaptive integration step is performed to obtain several sub-segment point sequences and several geometric feature sub-sequences: Several sub-segmentation point sequences are used as segmentation point sequences, and several geometric feature sub-sequences are used as geometric feature sequences.
3. The look-ahead interpolation method based on NURBS local support according to claim 2, characterized in that, The adaptive integration step includes: Based on the local data sequence and the sub-parameter interval, Simpson integral calculation is performed to obtain the first Simpson integral data; Based on the local data sequence and the sub-parameter interval, Simpson integral calculation is performed under the preset bisection method to obtain the second Simpson integral data. The integral error is obtained based on the first and second Pösen integral data; If the integral error meets the preset accuracy threshold, the sub-segment point sequence and geometric feature sub-sequence corresponding to the sub-parameter interval are obtained.
4. The look-ahead interpolation method based on NURBS local support according to claim 3, characterized in that, The step of obtaining the sub-segment point sequence and geometric feature sub-sequence corresponding to the sub-parameter interval if the integral error meets a preset accuracy threshold further includes: If the integration error does not meet the preset accuracy threshold, then a set of second-order molecular parameter intervals is obtained based on the sub-parameter intervals under the preset bisection method, and the adaptive integration step is recursively executed for each second-order molecular parameter interval in the set of second-order molecular parameter intervals to obtain the sub-segment point sequence and geometric feature sub-sequence of the sub-parameter interval.
5. The look-ahead interpolation method based on NURBS local support according to claim 3, characterized in that, The step of performing Simpson integral calculation based on the local data sequence and the sub-parameter interval under a preset bisection method to obtain the second Simpson integral data includes: Based on the sub-parameter interval, a division process is performed under a preset bisection method to obtain a first temporary sub-parameter interval and a second temporary sub-parameter interval. Based on the first temporary parameter interval and the local data sequence, arc length estimation is performed under the preset Simpson formula to obtain the first temporary Simpson integral data. Based on the second temporary parameter interval and the local data sequence, arc length estimation is performed under the preset Simpson formula to obtain the second temporary Simpson integral data. The second Simpson integral data is obtained by integrating the first temporary Simpson integral data and the second temporary Simpson integral data.
6. The look-ahead interpolation method based on NURBS local support according to claim 1, characterized in that, The step of generating a desired velocity set based on the segmented point sequence and the geometric feature sequence under preset velocity constraints includes: Based on the segmented point sequence and the geometric feature sequence, a desired interpolation velocity set is generated under preset velocity constraints, including preset bow height error constraints, preset centripetal acceleration constraints, preset forward velocity constraints, preset backward velocity constraints, and preset segment connection smoothness constraints. The expected velocity set is obtained by integrating the geometric feature sequence and the expected interpolation velocity set. The bow height error constraint includes: based on the segment tail curvature K of segment i in the geometric feature sequence. i Under a preset interpolation period T, the desired interpolation speed V of the segment i to be generated is limited by a preset bow height error constraint formula. i To ensure that the bow height error δ meets the preset bow height error threshold; the bow height error constraint formula is as follows: The centripetal acceleration constraint includes: based on the tail curvature K of segment i in the geometric feature sequence. i At the preset centripetal acceleration a c Below, the desired interpolation velocity V of segment i is constrained by a preset centripetal acceleration constraint formula. i The centripetal acceleration constraint formula is as follows: The forward velocity constraint includes: the terminal velocity v based on segment i-1 of the geometric feature sequence. i-1 At the preset maximum tangential acceleration a max Below, the desired interpolation velocity V of segment i is limited by a preset forward velocity constraint formula. i Ensure forward velocity V forward The preset forward velocity threshold is met; the forward velocity constraint formula is: V forward =v i-1 +a max ·T; The backward velocity constraint includes: the end velocity v based on segment i+1 of the geometric feature sequence. i+1 The length ΔL of segment i i At the preset maximum tangential acceleration a max Below, the desired interpolation velocity V of segment i is limited by a preset backward velocity constraint formula. i Ensure backward velocity V backward The preset backward velocity threshold is met; the backward velocity constraint formula is as follows: V backward =min(V i ,V backmax ); Among them, V backmax The calculated maximum velocity at the tail of segment i; The segment connection smoothing constraint includes: calculating the included angle θ based on the unit tangent vector at the tail of segment i and the unit tangent vector at the head of segment i+1 in the geometric feature sequence, and limiting the expected interpolation speed V of segment i based on the included angle θ using a preset segment connection smoothing constraint formula. i Ensure the final velocity V of the connecting section joint The preset end-velocity threshold of the connection segment is met; the smooth connection constraint formula is as follows: Where, Δv max This is the calculated maximum permissible speed.
7. A look-ahead interpolation system based on NURBS local support, characterized in that, A method for implementing a look-ahead interpolation method based on NURBS local support as described in any one of claims 1 to 6 includes: The local data sequence extraction module is used to obtain the control point sequence and node information sequence of the NURBS curve, and extract the local data sequence based on the control point sequence and the node information sequence within a preset sliding window. An adaptive recursive segmentation and feature generation module is used to obtain segmentation point sequences and geometric feature sequences based on the local data sequence obtained by the local data sequence extraction module under a preset adaptive interval recursive mechanism. The multi-constraint look-ahead velocity planning module is used to generate a desired velocity set under preset velocity constraints based on the segmentation point sequence and geometric feature sequence obtained by the adaptive recursive segmentation and feature generation module. The structured trajectory dataset generation module is used to bind the geometric feature sequence obtained by the adaptive recursive segmentation and geometric feature generation module and the expected velocity set obtained by the multi-constraint look-ahead velocity planning module to obtain a structured trajectory dataset. The interpolation processing module is used to perform interpolation processing on the motion controller based on the structured trajectory dataset obtained by the structured trajectory dataset generation module.
8. A look-ahead interpolation system based on NURBS local support according to claim 7, characterized in that, The adaptive recursive segmentation and feature generation module is used to obtain segmentation point sequences and geometric feature sequences based on the local data sequence obtained by the local data sequence extraction module, under a preset adaptive interval recursive mechanism, including: Based on the parameter range of the local data sequence obtained by the local data sequence extraction module, the data is divided at a preset step size to obtain several sub-parameter ranges. For any one of the several sub-parameter intervals, a preset adaptive integration step is performed to obtain several sub-segment point sequences and several geometric feature sub-sequences: Several sub-segmentation point sequences are used as segmentation point sequences, and several geometric feature sub-sequences are used as geometric feature sequences.
9. A look-ahead interpolation system based on NURBS local support according to claim 8, characterized in that, The adaptive integration step includes: Based on the local data sequence and the sub-parameter interval, Simpson integral calculation is performed to obtain the first Simpson integral data; Based on the local data sequence and the sub-parameter interval, Simpson integral calculation is performed under the preset bisection method to obtain the second Simpson integral data. The integral error is obtained based on the first and second Pösen integral data; If the integral error meets the preset accuracy threshold, the sub-segment point sequence and geometric feature sub-sequence corresponding to the sub-parameter interval are obtained.
10. A look-ahead interpolation system based on NURBS local support according to claim 9, characterized in that, The step of obtaining the sub-segment point sequence and geometric feature sub-sequence corresponding to the sub-parameter interval if the integral error meets a preset accuracy threshold further includes: If the integration error does not meet the preset accuracy threshold, then a set of second-order molecular parameter intervals is obtained based on the sub-parameter intervals under the preset bisection method, and the adaptive integration step is recursively executed for each second-order molecular parameter interval in the set of second-order molecular parameter intervals to obtain the sub-segment point sequence and geometric feature sub-sequence of the sub-parameter interval.