BVT format high-speed motion instruction generation method based on time expression and related device
Through the BVT format generation method based on time expression, the problems of insufficient interpolation accuracy, insufficient trajectory smoothness and slow response speed in the traditional motion instruction format in high-speed and high-precision motion control are solved, higher motion control accuracy and stability are achieved, and the application scope of high-speed motion control is expanded.
Patent Information
- Application Number
- CN202510844886.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-10-10
AI Technical Summary
The traditional motion instruction format has insufficient interpolation accuracy, insufficient trajectory smoothness and slow response speed in high-speed, high-precision motion control, and cannot meet the smooth transition and high-speed interpolation requirements of complex motion trajectories.
A high-speed motion instruction generation method based on time expression BVT format is adopted. By defining the tool tip displacement instruction, segmented analysis of the trajectory curvature, selecting ten-order polynomial curve fitting, introducing Lagrange multipliers to construct the Lagrange function, and generating straight line, circular arc and NURBS interpolation instructions, the smoothness and accuracy of the motion trajectory are ensured.
It improves the accuracy and stability of motion control, reduces equipment vibration and impact, optimizes calculation complexity, and expands the application scope of high-speed and high-precision motion control.
Smart Images

Figure CN120763996A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of numerical control machining control, and in particular relates to a method for generating high-speed motion instructions in a BVT format based on time expression and a related device. Background Art
[0002] With the continuous advancement of CNC technology, the demand for high-speed, high-precision motion control is increasing. Traditional motion command formats often fail to meet the requirements for smooth transitions and high-speed interpolation of complex motion trajectories. These traditional formats are often based on simple linear or circular interpolation algorithms, which have shortcomings when handling complex motion trajectories. Specifically, their limitations are mainly reflected in the following aspects: Insufficient interpolation accuracy: Due to computing power and algorithm limitations, traditional motion command formats often cannot achieve high-precision interpolation at high speeds. This causes the motion trajectory to deviate from the expected, affecting the ultimate control accuracy and product quality. Insufficient trajectory smoothness: In applications requiring continuous, smooth motion, traditional motion command formats often fail to provide sufficient trajectory smoothness. This can cause vibration and shock in mechanical components during motion, affecting not only the stability and lifespan of the equipment but also the surrounding environment. Slow response speed: Due to the high computational effort and high algorithm complexity required to handle complex trajectories, traditional motion command formats often result in slow system response. This limits the application of motion control systems in high-speed, high-precision applications.
[0003] In recent years, with the rapid development of numerical control technology, both academia and industry have been actively exploring new motion command formats to meet the demands of high-speed, high-precision motion control. Among these, some advanced research directions include: Advanced interpolation algorithms: To overcome the shortcomings of traditional interpolation algorithms, researchers have proposed a variety of advanced interpolation algorithms, such as B-spline interpolation and quintic polynomial interpolation. While these algorithms theoretically achieve higher interpolation accuracy and trajectory smoothness, they still face challenges in practical applications, such as high computational complexity and real-time performance. Summary of the Invention
[0004] In response to the problems existing in the prior art, the present invention provides a method and related device for generating high-speed motion instructions in the BVT format based on time expression, which aims to solve the problems of insufficient interpolation accuracy, insufficient trajectory smoothness and slow response speed in the traditional motion instruction format in high-speed and high-precision motion control.
[0005] In order to solve the above technical problems, the present invention is implemented through the following technical solutions:
[0006] According to a first aspect of the present invention, a method for generating a high-speed motion instruction in a BVT format based on time expression is provided, comprising:
[0007] Define a tool tip displacement instruction, wherein the tool tip displacement instruction is a trajectory point sequence sampled at equal periods, and each sampling point is represented by a sampling time and a cumulative displacement value;
[0008] Segmenting the tool tip displacement command, dividing the continuous trajectory into multiple sub-segments by analyzing the geometric curvature of the time-displacement curve, ensuring that the curvature changes smoothly in each sub-segment and each sub-segment contains a predetermined number of sampling points;
[0009] A ten-order polynomial curve is selected as the fitting model, and under set constraints, the sampling points are fitted by the least squares method to ensure that the curve is smooth and the third-order derivative is continuous;
[0010] By introducing Lagrange multipliers and constructing Lagrange functions, the curve fitting problem with constraints is transformed into an unconstrained extreme value problem, and the coefficients of the ten-degree polynomial are solved;
[0011] Based on the fitted polynomial curve, a high-speed motion instruction is generated. The high-speed motion instruction includes a linear interpolation instruction, a circular interpolation instruction and a NURBS interpolation instruction. Each interpolation instruction includes a polynomial degree, a number of fitting points, an interpolation period and a polynomial coefficient.
[0012] In a possible implementation of the first aspect, segmenting the tool tip displacement instruction and dividing the continuous trajectory into multiple sub-segments by analyzing the geometric curvature of the time-displacement curve includes:
[0013] Calculate the kinematic parameters of each sampling point on the trajectory, including instantaneous velocity, instantaneous acceleration and curvature;
[0014] Combine the curve bow height error and the normal acceleration of the sampling point to calculate the segmentation curvature threshold, and select the extreme points whose curvature exceeds the segmentation curvature threshold as candidate segmentation points;
[0015] The trajectory is divided at the selected extreme curvature points to obtain multiple sub-segments.
[0016] In a possible implementation of the first aspect, the segmentation curvature threshold is calculated by combining the curve bow height error and the normal acceleration of the sampling point, specifically as follows:
[0017]
[0018] Among them, κ threshold is the segmentation curvature threshold; L is the arc length of the current sub-segment; v avg is the average speed of the sub-segment; δ is the curve bow height error; a n Normal acceleration at the sampling point.
[0019] In a possible implementation manner of the first aspect, each subsegment includes a predetermined number of sampling points, specifically:
[0020] If the number of sampling points in a sub-segment is less than the predetermined number, cubic spline interpolation is used to uniformly fill it to the predetermined number in the time domain;
[0021] If the number of sampling points in a sub-segment exceeds the predetermined number, the first predetermined number of points will be intercepted in chronological order, and the remaining sampling points will be assigned to the next sub-segment.
[0022] In a possible implementation of the first aspect, a decagram polynomial curve is selected as the fitting model, and the sampling points are fitted using a least squares method under set constraints, specifically as follows:
[0023] θ i =(R i -y i ) 2
[0024]
[0025] Where θ i is the square of the fitting error of the i-th sampling point; R i is a tenth-degree polynomial; x i is the sampling time; y i is the cumulative displacement value; b0, b1,…, b 10 are the coefficients of a ten-degree polynomial.
[0026] In a possible implementation manner of the first aspect, the set constraint conditions include a position constraint, a velocity constraint, an acceleration constraint, and a jerk constraint.
[0027] In a possible implementation of the first aspect, the Lagrange multiplier is introduced to construct a Lagrange function, thereby converting the curve fitting problem with constraints into an unconstrained extreme value problem, specifically:
[0028] F(b0,…,b 10 ,λ1,λ2,…,λ8)
[0029] =θ(b0,…,b 10 )+λ1*f1(b0,…,b 10 )+λ2*f2(b0,…,b 10 )+λ3*g1(b0,…,b 10 )+λ4*g2(b0,…,b 10 )+λ5*k1(b0,…,b 10 )+λ6*k2(b0,…,b 10 )+λ7*m1(b0,…,b 10 )+λ8*m2(b0,…,b 10 )
[0030]
[0031] where F(·) is the Lagrangian function; λ1, λ2, …, λ8 are Lagrangian multipliers; f1(·) and f2(·) are position constraints; g1(·) and g2(·) are velocity constraints; k1(·) and k2(·) are acceleration constraints; m1(·) and m2(·) are jerk constraints; v0 is the velocity of the end point of the previous subsegment; v is the average velocity of several adjacent sampling points; a0 is the acceleration of the end point of the previous subsegment; a is the acceleration of the intersection of two adjacent subsegments; j0 is the jerk of the end point of the previous subsegment; and j is the jerk of the intersection of two adjacent subsegments.
[0032] According to a second aspect of the present invention, there is provided a device for generating high-speed motion instructions in a BVT format based on time expression, comprising:
[0033] A definition module is used to define a tool tip displacement instruction, wherein the tool tip displacement instruction is a trajectory point sequence of equal-periodic sampling, and each sampling point is represented by a sampling time and a cumulative displacement value;
[0034] a segmentation module for segmenting the tool tip displacement instruction, dividing the continuous trajectory into a plurality of sub-segments by analyzing the geometric curvature of the time-displacement curve, ensuring that the curvature changes smoothly in each sub-segment and each sub-segment contains a predetermined number of sampling points;
[0035] A fitting module is used to select a ten-order polynomial curve as a fitting model, and fit the sampling points by the least squares method under set constraints to ensure that the curve is smooth and the third-order derivative is continuous;
[0036] The transformation and solution module is used to construct the Lagrange function by introducing Lagrange multipliers, transform the curve fitting problem with constraints into an unconstrained extreme value problem, and solve the coefficients of the ten-degree polynomial;
[0037] The instruction generation module is used to generate high-speed motion instructions based on the fitted polynomial curve. The high-speed motion instructions include linear interpolation instructions, circular interpolation instructions and NURBS interpolation instructions. Each interpolation instruction contains the polynomial degree, the number of fitting points, the interpolation period and the polynomial coefficient.
[0038] According to the third aspect of the present invention, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for generating high-speed motion instructions in the BVT format based on time expression is implemented.
[0039] According to a fourth aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for generating high-speed motion instructions in a BVT format based on time expression is implemented.
[0040] Compared with the prior art, the present invention has at least the following beneficial effects:
[0041] The present invention provides a method for generating high-speed motion instructions in the BVT format based on time expression. This method uses a decamorphic polynomial curve as a fitting model to perform segmented fitting of tool tip displacement instructions. The decamorphic polynomial can better adapt to complex curve shapes and approximate the actual motion trajectory with high accuracy, thereby effectively reducing deviations from the expected trajectory, significantly improving the accuracy of motion control, and meeting the interpolation accuracy requirements of high-speed, high-precision motion control. High-speed motion instructions can better ensure the continuity of kinematic parameters such as speed, acceleration, and jump during motion, effectively avoiding problems such as equipment vibration, impact, and reduced processing accuracy caused by parameter discontinuity. This greatly improves the stability of motion control, ensures the smoothness of the motion trajectory, and reduces adverse effects on the equipment and the surrounding environment. By introducing Lagrangian multipliers to construct a Lagrangian function, the constrained curve fitting problem is transformed into an unconstrained extreme value problem to solve the polynomial coefficients. While ensuring high accuracy and trajectory smoothness, the calculation process is optimized and the computational complexity is reduced. In summary, the present invention effectively solves the problems of insufficient interpolation accuracy, insufficient trajectory smoothness, and slow response speed in traditional motion instruction formats for high-speed, high-precision motion control.
[0042] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the specific embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the specific embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0044] Figure 1 This is a flow chart of a method for generating high-speed motion instructions in BVT format based on time expression according to the present invention;
[0045] Figure 2 This is the test trace of the instruction G64.3 of Example;
[0046] Figure 3 This is the machining kinematic curve of the G64.3 instruction in Example. DETAILED DESCRIPTION
[0047] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0048] BVT, namely B-spline velocity trajectory, B-spline velocity trajectory.
[0049] like Figure 1 As shown, an embodiment of the present invention provides a method for generating high-speed motion instructions in BVT format based on time expression, which specifically includes the following steps:
[0050] S1. Define a tool tip displacement instruction. The tool tip displacement instruction is a trajectory point sequence sampled at equal periods. Each sampling point is represented by a sampling time and a cumulative displacement value.
[0051] Specifically, in the complex scenarios of CNC machining, precise motion trajectory control is one of the core elements to achieve high-quality machining. To achieve this goal, this embodiment first generates a series of tool tip displacement instructions through velocity planning. The tool tip displacement instructions are closely related to the key trajectory positions in the CNC machining process. The tool tip displacement instructions are a sequence of trajectory points sampled at equal periods. Each sampling point can be represented as a set of binary data: (x i ,y i ), where x i Refers to the sampling time, y i Refers to the cumulative displacement value, i.e., the fitted arc length value. This sequence is the trajectory output after the previous path planning and velocity planning process. It takes into account the target velocity curve and maximum acceleration limit, and has the characteristics of equal period and continuous arc length.
[0052] This implementation first preprocesses the generated tool tip displacement instruction sequence, which originates from the upper-level path planning module and includes velocity planning but does not consider drive constraints. Unlike traditional approaches that directly segment and interpolate the spline trajectory, this implementation directly uses the velocity-planned tool tip displacement trajectory as a basis, segmenting the trajectory according to geometric curvature characteristics to facilitate subsequent targeted polynomial fitting and motion control instruction generation.
[0053] S2. Segment the tool tip displacement instruction, and divide the continuous trajectory into multiple sub-segments by analyzing the geometric curvature of the time-displacement curve, ensuring that the curvature changes smoothly in each sub-segment and each sub-segment contains a predetermined number of sampling points.
[0054] In one possible implementation, the tool tip displacement instruction is segmented, and the continuous trajectory is divided into multiple sub-segments by analyzing the geometric curvature of the time-displacement curve, as follows:
[0055] S21. Calculate the kinematic parameters of each sampling point on the trajectory, including instantaneous velocity, instantaneous acceleration, and curvature.
[0056] Specifically, kinematic parameter calculation and feature extraction are performed, and the velocity and acceleration are calculated using the difference method. The main reason is that the calculation of curvature depends on the velocity and acceleration parameters. The central difference method is now used to calculate the instantaneous velocity and acceleration of each sampling point, a total of N sampling points.
[0057] The central difference method is used to calculate the instantaneous velocity v of each sampling point i :
[0058]
[0059] Since the central difference cannot be applied to the first and last points, the forward / backward difference is used:
[0060]
[0061] Similarly, the acceleration a is calculated based on the velocity value i :
[0062]
[0063] Boundary point processing:
[0064]
[0065] S22. Calculate the segmentation curvature threshold by combining the curve bow height error and the normal acceleration of the sampling point, and select extreme points whose curvature exceeds the segmentation curvature threshold as candidate segmentation points.
[0066] Specifically, the extreme points of curvature correspond to areas in the trajectory where the geometric shape changes dramatically (such as inflection points and sharp corners). Segmentation can ensure that the curvature in each sub-segment is smooth, reducing the complexity of polynomial fitting. At the same time, it avoids the centrifugal force impact caused by sudden changes in curvature during high-speed movement, thereby improving processing stability.
[0067] The time-displacement curve is regarded as a two-dimensional parameterized curve r(x) = (x, y(x)), whose curvature κ(x i ) is calculated as:
[0068]
[0069] Calculate the curvature sequence {κ(x i), mark the local maximum point (κ(x i )>k(x i-1 ) i )>k(x i+1 ))).
[0070] The curve camber error and the normal acceleration of the sampling point are combined to calculate the segmentation curvature threshold, specifically as follows:
[0071]
[0072] wherein, κ threshold is the segmentation curvature threshold; L is the current sub-segment arc length; v avg is the average speed of the sub-segment; δ is the curve camber error; a n is the normal acceleration of the sampling point.
[0073] S23, segmenting the trajectory with the selected curvature extreme point to obtain a plurality of sub-segments.
[0074] In detail, each sub-segment contains a predetermined number of sampling points, specifically as follows:
[0075] If the sampling points of the sub-segment are less than the predetermined number, cubic spline interpolation is used to uniformly complete to the predetermined number in the time domain;
[0076] If the sampling points of the sub-segment exceed the predetermined number, the first predetermined number of points are extracted in time sequence, and the remaining sampling points are divided into the next sub-segment.
[0077] That is, the original data is divided into a plurality of sub-segments with the curvature extreme point as the segmentation point. Exemplarily, the predetermined number of sampling points is 25, if the sampling points of the sub-segment are less than 25, cubic spline interpolation is used to uniformly complete to 25 points in the time domain, the formula is: y(x)=a k (x-x k ) 3 +b k (x-x k ) 2 +c k (x-x k )+d k (x k ≤x≤x k+1 ), wherein the coefficients a k , b k , c k , d k are determined by the displacement and speed continuity constraints of adjacent data points.
[0078] If the sampling points of the sub-segment exceed 25, the first 25 points are extracted in time sequence, and the remaining sampling points are divided into the next sub-segment.
[0079] Preferably, for long sub-segments with gentle curvature (such as uniform straight line segments), equal arc length sampling is used to compress the data volume to ensure 25 points per segment. Fewer sampling points are easier to visualize. When drawing motion trajectories or other related graphics, the sampling data of 25 points per segment can present the curve shape in a more concise and clear way, which helps to intuitively observe and analyze the motion state, and facilitates researchers or operators to quickly obtain key information. When data needs to be transmitted remotely or shared between different devices, compressing the data volume can reduce the transmission bandwidth occupancy, reduce transmission costs and time, and improve the efficiency of data transmission. Calculate the total arc length of the sub-segment:
[0080]
[0081] Resample the data at intervals of equal arc length ΔL = L / 24 to generate 25 evenly distributed points. Furthermore, the velocity v, acceleration a, and jerk j of adjacent subsegments at the split points are recorded as boundary conditions for subsequent polynomial fitting to ensure continuity of kinematic parameters when connecting multiple segments.
[0082] S3. Select a ten-order polynomial curve as a fitting model, and fit the sampling points by the least squares method under set constraints to ensure that the curve is smooth and the third-order derivative is continuous.
[0083] Specifically, a polynomial curve is fitted to the segmented tool tip displacement instructions. For example, the current plan is to fit 25 sampling points each time. At the same time, the position constraints at the beginning and end of the curve need to be met to ensure position continuity between multiple curve segments. At the same time, the velocity, acceleration, and jump continuity constraints also need to be guaranteed, in order to fit and generate a smooth spline curve with continuous third-order derivatives. At the same time, to improve the dynamic adaptability of fitting in high-speed CNC systems, multiple levels of weight factors are introduced in the fitting process, including: the weight of position error, the weight of velocity error, the weight of acceleration error, the weight of drive axis velocity error (obtained through the inverse kinematic solution), and the weight of drive axis acceleration error.
[0084] Use the least squares method to fit the sampling points:
[0085] θ i =(R i -y i ) 2
[0086]
[0087] Among them, for each 25 sampling points (x i ,y i ),(i∈[1,25]);b0,b1,…,b 10The coefficients are the key parameters that determine the shape and characteristics of the fitted curve, and subsequent steps will be determined through a series of complex calculations.
[0088] Preferably, in order to accurately evaluate the accuracy of the fitting, it is essential to calculate the fitting error. The total fitting error θ is defined as the sum of the squares of the fitting errors of each data point, and the calculation formula is as follows:
[0089]
[0090] By comparing the calculated y(x i ) with the fitted curve, the fitting deviation at each sampling point can be intuitively reflected, and the overall fitting error θ can be obtained by summation, which will be an important reference index for subsequent optimization fitting process.
[0091] In the process of polynomial curve fitting, in order to ensure the accuracy, continuity and smooth connection with adjacent curve segments in practical application, a series of strict constraint conditions need to be applied. From the accuracy point of view, the fitted curve must be as close as possible to the actual sampling points, avoiding excessive fitting or under-fitting, which will lead to the deviation of the curve from the true motion trajectory or shape, thereby affecting the subsequent curve-based calculation and analysis, such as in numerical control machining, if the fitted curve is not accurate, it will directly lead to the size and shape error of the machined parts, which cannot meet the design requirements.
[0092] In one implementation, the constraint conditions include position constraint, velocity constraint, acceleration constraint and jerk constraint.
[0093] Regarding the position constraint, in numerical control machining, the starting point and the ending point of the trajectory are directly related to the key geometric features of the workpiece. If the end points of the fitted curve deviate from the actual data points, it will cause the overall deviation of the machining path, and the cumulative error will seriously affect the accuracy of the workpiece. By forcing the fitted curve to pass through the first and last end points, the absolute position accuracy of the trajectory is ensured, and the machining error caused by the deviation of the end points is avoided, which lays the foundation for the seamless connection of multiple curve segments.
[0094] For example, to ensure that the fitted curve passes through the first and last end points (x 25 ,y 25 ), the constraint equation is obtained as follows:
[0095]
[0096] Two constraint conditions are obtained:
[0097]
[0098] The position constraint ensures the accuracy and continuity of the curve at the end points.
[0099] These two constraints mathematically force the fitting curve to exactly coincide with the actual key trajectory points at the start and end positions, avoiding deviations of the curve at the endpoints, thus ensuring the accurate continuity of the entire machining trajectory.
[0100] Regarding the speed constraint, a sudden change in speed will cause inertial impact of the mechanical system, resulting in equipment vibration, tool wear, and even processing surface vibration marks. Traditional methods are prone to such problems due to discontinuous speed when switching trajectories. By constraining the first derivative (speed) of the curve at the start and end to be consistent with the adjacent curve segment, the speed is ensured to be continuously smooth, eliminating mechanical impact and improving motion stability and equipment life.
[0101] The first derivative of the tenth-order polynomial is:
[0102] y ′ (x) = b1 + 2b2*x + 3b3*x 2 + 4b4*x 3 + 5b5*x 4 + 6b6*x 5 + 7b7*
[0103] x 6 + 8b8*x 7 + 9b9*x 8 + 10b 10 *x 9
[0104] For example, first calculate the average speed between the adjacent 5 points (T s is the interpolation period, which is an important parameter in numerical control systems for controlling the discretization of motion trajectories, determining the frequency of sampling and calculating motion trajectories within a certain time interval), set the equations y'(x1) = v0 (v0 is the speed of the last point of the previous quintic spline curve, if not, it is defaulted to 0) and y'(x 25 ) = v, get the speed constraints g1((b0,...,b 10 ) = y ′ ((x1)-v0 = 0 and g2(b0,...,b 10 ) = y ′ ((x 25 )-v = 0, thus obtaining the speed constraint:
[0105]
[0106] These speed constraint conditions ensure the continuity of the curve at the junction, so that there is no sudden change in speed during the motion, thus avoiding problems such as equipment vibration, reduced machining accuracy, etc. caused by discontinuous speed, ensuring the stability and high precision of the machining process.
[0107] Regarding acceleration constraints, discontinuous acceleration can cause sudden changes in inertial force, affecting machining stability. This can lead to servo motor overload or increased tracking error, especially at high speeds. Constraining the continuity of the second-order derivative (acceleration) suppresses sudden changes in inertial force and ensures a smooth change in driving force during motion, thereby improving machining surface quality and the system's dynamic response.
[0108] The second derivative of a decathlon polynomial is:
[0109] y ″ (x)=2b2+6b3x+12b4x 2 +20b5x 3 +30b6x 4 +42b7x 5 +56b8x 6 +72b9x 7 +90b 10 x 8
[0110] Calculate the intersection acceleration:
[0111]
[0112] From this we can get the equations y″(x1)=a0 (a0 is the acceleration of the end point of the previous quintic spline curve, if it is missing, it defaults to 0) and y″(x 25 )=a, and we get the acceleration constraint
[0113]
[0114] Ensure that the curve acceleration is continuous.
[0115] The role of acceleration constraint is to ensure the continuity of acceleration of the curve during motion, avoid the impact of sudden acceleration changes on the equipment and the impact on processing accuracy, and further improve the stability of motion control and processing quality.
[0116] Regarding jerk constraints: Discontinuities in jerk (acceleration rate of change) can exacerbate mechanical vibration, potentially leading to micron-level trajectory deviations during precision machining and affecting the quality of high-precision workpieces (such as optical components). By constraining the third-order derivative (jerk) to be continuous, the acceleration variation process is further smoothed, reducing the risk of high-frequency vibration and improving trajectory tracking accuracy and equipment reliability under high-speed motion.
[0117] The third derivative of a ten-degree polynomial is:
[0118] y″′(x)=6b3+24b4x+60b5x 2 +120b6x 3 +210b7x 4 +336b8x5 +504b9x 6 +720b 10 x 7
[0119] Compute the hop rate at the intersection of two splines:
[0120]
[0121] From this we can get the equations y″′(x1)=j0 (j0 is the jump of the end point of the previous quintic spline curve, if it is missing, it defaults to 0) and y″′(x 25 )=j, we get the jump constraint:
[0122]
[0123] The jump constraint ensures the continuity of the third-order derivative of the curve, making the curve smoother during high-speed motion and complex trajectory changes, effectively reducing the wear of mechanical components, and improving the service life of the equipment and the stability of processing accuracy.
[0124] S4. By introducing Lagrange multipliers and constructing Lagrange functions, the curve fitting problem with constraints is transformed into an unconstrained extreme value problem, and the coefficients of the tenth-order polynomial are solved.
[0125] Specifically, in complex curve fitting problems, it is often necessary to ensure that the fitting error is minimized while strictly satisfying various equality and inequality constraints. To effectively integrate these two key goals, the Lagrange multiplier is introduced to transform the curve fitting problem with constraints into an unconstrained extreme value problem, making it possible to handle the fitting error and constraints in a unified framework, and then use mature unconstrained optimization algorithms to solve them. In order to simultaneously meet the minimum fitting error and various constraints, a Lagrange function is constructed:
[0126] F(b0,…,b 10 ,λ1,λ2,…,λ8)
[0127] =θ(b0,…,b 10 )+λ1*f1(b0,…,b 10 )+λ2*f2(b0,…,b 10 )+λ3*g1(b0,…,b 10 )+λ4*g2(b0,…,b 10 )+λ5*k1(b0,…,b 10 )+λ6*k2(b0,…,b 10 )+λ7*m1(b0,…,b 10 )+λ8*m2(b0,…,b 10 )
[0128] There are 19 variables in total.
[0129] In order to find the optimal solution that satisfies the minimum fitting error and meets various constraints, it is necessary to further process the variables involved in the Lagrangian function. The partial derivatives of the above 19 variables are taken as 0 to find b0,…,b in this set of variables. 10 In the process of finding partial derivatives, according to the basic rules and formulas of differentiation, for each variable, treat other variables as constants, then perform derivative operations on the Lagrangian function, and then find the eleven coefficients of the decadic spline curve. The equation system is obtained:
[0130]
[0131] where F(·) is the Lagrangian function; λ1, λ2, …, λ8 are Lagrangian multipliers; f1(·) and f2(·) are position constraints; g1(·) and g2(·) are velocity constraints; k1(·) and k2(·) are acceleration constraints; m1(·) and m2(·) are jerk constraints; v0 is the velocity of the end point of the previous subsegment; v is the average velocity of several adjacent sampling points; a0 is the acceleration of the end point of the previous subsegment; a is the acceleration of the intersection of two adjacent subsegments; j0 is the jerk of the end point of the previous subsegment; and j is the jerk of the intersection of two adjacent subsegments.
[0132] Rewritten in matrix form, we obtain CX = B, where the matrix C is a 14 × 14 square matrix. Solving this system of equations yields the 11 coefficients b0, …, b10 of the 10-degree spline curve. Polynomial fitting not only requires minimizing the error of the least squares fitting method but also requires satisfying various constraints such as position, velocity, acceleration, and jerk. The matrix form allows these different types of constraints to be integrated into the equations in a unified manner. In the system of equations obtained by constructing the Lagrangian function and taking partial derivatives, each equation corresponds to a fitting condition. The matrix form clearly demonstrates the interrelationships between these conditions and their combined impact on the coefficient solution.
[0133] The comprehensive consideration of multiple constraints can be implemented more concisely and accurately in matrix form, ensuring that the fitted polynomial curve can not only fit the sampling points well, but also ensure the continuity and smoothness of various kinematic parameters of the curve at the beginning, end and connection points, thereby meeting the needs of precise control of motion trajectory in practical applications, and thus completing data fitting.
[0134] S5. Generate high-speed motion instructions based on the fitted polynomial curve, wherein the high-speed motion instructions include linear interpolation instructions, circular interpolation instructions, and NURBS interpolation instructions, and each interpolation instruction includes a polynomial degree, a number of fitting points, an interpolation period, and a polynomial coefficient.
[0135] In detail, compared with traditional G codes, the instruction format of the present invention has many advantages. When describing motion instructions, traditional G codes are usually based on simple linear or circular interpolation algorithms, and the information is relatively simple. The instruction format of the present invention not only covers basic geometric coordinate information, but also contains rich polynomial fitting information and coefficient data, which are directly derived from the in-depth analysis of the motion trajectory during the data fitting stage. When processing complex motion trajectories, traditional G codes are often difficult to achieve high-precision and high-smoothness motion control. For example, when processing workpieces with complex shapes, traditional G codes may cause the trajectory to deviate from expectations due to the inability to accurately describe the curve shape and motion characteristics, affecting the processing accuracy and surface quality. The instruction format of the present invention is closely integrated with data fitting, which can accurately control the motion trajectory, ensure the continuity of kinematic parameters such as speed, acceleration and jump during high-speed motion and complex curve changes, effectively reduce the vibration and wear of mechanical parts, improve the service life of the equipment and the stability of processing accuracy, and greatly expand the application scope of motion control systems in high-speed and high-precision occasions.
[0136] For example, the linear interpolation instruction is named G64.1
[0137] The G64.1 instruction format is defined as follows:
[0138] N00001 G64.1 BVTnum 1tcnt 8
[0139] N00002 x0y0z0
[0140] N00003 x1y1z1
[0141] N00004 POLYn 10m 25Ts t
[0142] N00005 S b0,b1,b2,b3
[0143] N00006 S b4,b5,b6,b7
[0144] N00007 S b8,b9,b 10
[0145] N00008 G64.1 BVT ENDN
[0146] The format of N+5 digits at the beginning of each line indicates the line number. Obviously, it can display a maximum of five valid integers, and overflow will occur if it exceeds the number. G64.1 marks the start of the instruction, BVTnum indicates the line segment number, and tcnt indicates the instruction line number. The subsequent lines define the starting coordinates (x0y0z0), the end coordinates (x1y1z1), the polynomial fitting information (such as POLYn 10m 81Ts0.0010, POLYn indicates the polynomial degree, m indicates the number of fitting points (25 numerical points are used in this example), and Ts t indicates the interpolation period), and the coefficients from high to low order (such as b0, ..., b 10 ), each line retains four coefficient values, and finally ends the command with G64.1BVT END.
[0147] Specifically, in actual application, the G64.1 instruction parsing process is as follows: In LinuxCNC, the read_g64_1 function parses the instruction according to the format. First, it determines whether it is a G64.1 instruction. If it is bvtnum, it reads the segment number. If it is polyn, it reads the polynomial degree, number of fitting points, and interpolation period. If it is x, it reads the coordinate point. If it is s, it reads the coefficient. The parsing result is stored in the GM_CODE_64_1 class structure, which contains member variables such as segment number, polynomial parameters, coordinate points, coefficients, and instruction reading completion flag.
[0148] The G64.1 instruction execution process is as follows: In the motion controller, the BVTLineSpeedPlanner function executes the instruction. It first obtains the instruction parameters. If the instruction is not parsed, it is parsed and relevant information (such as displacement derivatives and line unit vectors) is calculated. The interpolation point coordinates are then calculated based on the parsed results and the current interpolation point index. This is implemented using the tpBVTLineInterpPont function. This function calculates the displacement based on the unit vector and the starting coordinates, updates the current position, performs an inverse kinematic solution, and stores the result, completing the linear interpolation motion control.
[0149] For example, the 3.2 arc interpolation instruction is named G64.2
[0150] The G64.2 instruction format is defined as follows:
[0151] N00001 G64.2 BVTnum 1tcnt 9
[0152] N00002 C x0y0z0R
[0153] N00003 x1y1z1
[0154] N00004 x2y2z2
[0155] N00005 POLYn 10m 25Ts t
[0156] N00006 S b0,b1,b2,b3
[0157] N00007 S b4,b5,b6,b7
[0158] N00008 S b8,b9,b 10
[0159] N00009 G64.2 BVT END
[0160] The format of N+5 digits at the beginning of each line indicates the line number. Obviously, it can only display a maximum of five valid integers; any more than that will overflow. G64.2 marks the start of the instruction, BVTnum indicates the number of the entire arc instruction, and tcnt 9 indicates that this G64.2 instruction occupies 9 lines. C x0y0z0 represents the center point of the arc. R represents the radius. If it is greater than 0, the corresponding central angle of the arc is less than 180°; if it is less than 0, the corresponding central angle of the arc is greater than 180°. Lines 3-4 represent the start and end points of the arc, respectively. POLYn represents the degree of the fitted polynomial curve, m represents the number of fitting sampling points (25 sampling points are used in this example), and Ts t represents the interpolation period. S is followed by the coefficients of the polynomial curve, from high to low powers. G64.2 BVTEND indicates the end of the instruction.
[0161] Specifically, in actual application, the G64.2 instruction parsing process is as follows: the read_g64_2 function parses the instruction. Similar to the read_g64_1 function, it reads each field information according to the format and stores it in the GM_CODE_64_2 class structure. This class contains member variables such as segment number, polynomial parameters, circle center radius, coordinate point, coefficient, and instruction reading completion flag.
[0162] The G64.2 instruction execution process is as follows: The BVTArcSpeedPlanner function executes the instruction. First, the instruction parameters are retrieved. If unparsed, they are parsed and the arc radius, rotation axis, and other information are calculated. The arc length is then obtained based on the polynomial curve, and the center angle and rotation matrix are calculated. The interpolation point coordinates are calculated using the tpBVTArcInterpPoint and tpBVTArcCaluCirclePoint functions. The positions are updated and the inverse kinematic solution is performed to implement circular interpolation motion control. Care should be taken to avoid entering semicircular arcs to ensure that the rotation axis can be determined.
[0163] For example, the NURBS processing command is named G64.3
[0164] The G64.3 instruction format is defined as follows:
[0165] N00001 G64.3 BVTnum 1tcnt 15
[0166] N00002 POLYn 10m 25Ts t
[0167] N00003 Us u
[0168] N00004 NURBSn 3U 6P 4
[0169] N00005 U U0,U1,U2,U3
[0170] N00006 U U4,U5
[0171] N00007 P x0y0z0
[0172] N00008 P x1y1z1
[0173] N00009 P x2y2z2
[0174] N00010 P x3y3z3
[0175] N00011 S b0,b1,b2
[0176] N00012 S b3,b4,b5
[0177] N00013 S b6,b7,b8
[0178] N00014 S b9,b 10
[0179] N00015 G64.3 BVT END
[0180] The N+5 digits at the beginning of each line represent the line number, which is obviously a 5-digit integer, and if there are more than 5 digits, it will overflow. For a complete G64.3 instruction, BVTnum at the beginning of the instruction is used, and the number 1 after it indicates that this is the first G64.3 instruction, and BVT END is used to identify the end of a complete instruction. The identifier tcnt indicates how many lines the instruction occupies, and the number 15 after it indicates that the complete instruction occupies 15 lines. The identifier POLYn indicates the degree of the polynomial curve used by the instruction, and the number 10 after it indicates that the instruction uses a 10th-degree polynomial curve to fit the cumulative arc length of the NURBS. The identifier m indicates the number of value points fitted by the instruction, which, in combination with the identifier BVTnum, determines the number of output value points, i.e., if BVTnum is greater than 1, it indicates that the first point of the value points fitted this time is repeated, so it needs to be discarded. For example, this instruction fits 25 value points, but since it is the first instruction, the first output point does not need to be discarded, so 25 points can be finally output. The identifier Ts t indicates the interpolation period, and the identifier Us u indicates the starting U value of the instruction. U is a parameter in NURBS curves, which is used to define a point on the curve. The fourth line indicates some NURBS parameter information, and the number 3 after n indicates that the instruction uses a 3rd-degree NURBS. The number 6 after U indicates that the instruction needs 6 U nodes (U nodes constitute the node vector of the NURBS curve), and the number 4 after P indicates that the instruction needs 4 vertex coordinates (including XYZ). The fifth to sixth lines indicate the actual U value parameters, and each 4 U values form a line. The seventh to tenth lines indicate the vertex coordinates, and each line indicates a vertex, with three numbers representing XYZ. The eleventh to fourteenth lines indicate the coefficients of the polynomial curve, and since this instruction is a 10th-degree polynomial curve, there should be 11 coefficients, with 3 coefficients stored in each line, in the order from the highest power to the lowest power. The last 15 lines indicate the end of the instruction.
[0181] Specifically, in actual application, the G64.3 instruction parsing process is as follows: the read_g64_3 function parses the instruction. Each field information is read according to the format and stored in the GM_CODE_64_3 class structure, which includes line number, polynomial parameters, NURBS parameters, coordinate points, coefficients, starting u value, and instruction reading completion flag.
[0182] The G64.3 instruction execution process is as follows: The NURBS SpeeedPlanner function executes the instruction. First, the instruction parameters are retrieved. If unparsed, they are parsed and the relevant information is calculated. If this is the first execution, a spline curve is generated and discretized. Then, based on the arc length increment and related parameters, the interpolation point coordinates are calculated using the tpNurbsInterpPoint and parametric_Iter functions. The position is updated and the inverse kinematic solution is performed to implement NURBS curve interpolation motion control. The instruction structure differs from other instructions in different spaces to accommodate NURBS processing requirements.
[0183] In one embodiment, to verify the effectiveness of the BVT function development, this example used the developed G64.3 as an example. A system simulation model was constructed using Matlab and LinuxCNC software on a 1.8GHz processor-based GK1037 industrial computer platform. A three-dimensional butterfly trajectory was simulated using LinuxCNC, and the data was collected in Matlab for simulation analysis. The maximum feed rate was 31 mm / s, the maximum tangential acceleration was 80 mm / s², and the bow height error limit was 0.003 mm.
[0184] The simulation trajectory is as follows Figure 2 As shown in FIG, it can be seen that the BVT instruction developed in this embodiment can be run smoothly on the CNC platform and directly process the butterfly curve. Figure 3 As shown in the figure, the velocity curve is continuous without any sudden changes. This shows that the present embodiment can achieve high-precision, high-smoothness, and high-real-time motion control in complex trajectory processing, significantly improving processing quality and equipment life.
[0185] In another embodiment of the present invention, a device for generating high-speed motion instructions in a BVT format based on time expression is provided, comprising:
[0186] The definition module is used to define the tool tip displacement instruction, which is a trajectory point sequence sampled at equal periods, and each sampling point is represented by a sampling time and an accumulated displacement value.
[0187] The segmentation module is used to segment the tool tip displacement instruction and divide the continuous trajectory into multiple sub-segments by analyzing the geometric curvature of the time-displacement curve, ensuring that the curvature changes smoothly in each sub-segment and each sub-segment contains a predetermined number of sampling points.
[0188] The fitting module is used to select a ten-order polynomial curve as a fitting model, and fit the sampling points by the least square method under set constraints to ensure that the curve is smooth and the third-order derivative is continuous.
[0189] The transformation and solution module is used to construct the Lagrange function by introducing Lagrange multipliers, transform the curve fitting problem with constraints into an unconstrained extreme value problem, and solve the coefficients of the ten-order polynomial.
[0190] The instruction generation module is used to generate high-speed motion instructions based on the fitted polynomial curve. The high-speed motion instructions include linear interpolation instructions, circular interpolation instructions and NURBS interpolation instructions. Each interpolation instruction contains the polynomial degree, the number of fitting points, the interpolation period and the polynomial coefficient.
[0191] All relevant contents of each step involved in the embodiment of the aforementioned method for generating high-speed motion instructions in the BVT format based on time expression can be referred to the functional description of the functional module corresponding to the device for generating high-speed motion instructions in the BVT format based on time expression in the embodiment of the present invention, and will not be repeated here. The division of modules in the embodiment of the present invention is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, the functional modules in various embodiments of the present invention can be integrated into one processor, or they can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0192] In another embodiment of the present invention, a computer device is provided, which includes a processor and a memory, wherein the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in the computer storage medium to implement the corresponding method flow or corresponding function; the processor described in the embodiment of the present invention can be used for the operation of a BVT format high-speed motion instruction generation method based on time expression.
[0193] In another embodiment of the present invention, the present invention further provides a storage medium, specifically a computer-readable storage medium (Memory), which is a memory device in a computer device for storing programs and data. It is understandable that the computer-readable storage medium here can include both built-in storage media in the computer device and, of course, extended storage media supported by the computer device. The computer-readable storage medium provides a storage space that stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space. These instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor can load and execute one or more instructions stored in the computer-readable storage medium to implement the corresponding steps of the method for generating high-speed motion instructions in a BVT format based on time expression in the above embodiment.
[0194] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0195] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0196] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0197] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0198] The present invention also provides a computer program product for executing any of the above-described methods for generating high-speed motion instructions in a BVT format based on time expression. Because the computer program product provided by the present invention and the above-described method for generating high-speed motion instructions in a BVT format based on time expression are based on the same inventive concept, the computer program product provided by the present invention possesses all the advantages of the above-described method for generating high-speed motion instructions in a BVT format based on time expression. Therefore, the beneficial effects of the computer program product provided by the present invention will not be detailed here.
[0199] In the present invention, the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" mean that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.
[0200] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A method for generating high-speed motion instructions in BVT format based on time expression, characterized in that: include: Define a tool tip displacement instruction, wherein the tool tip displacement instruction is a trajectory point sequence sampled at equal periods, and each sampling point is represented by a sampling time and a cumulative displacement value; Segmenting the tool tip displacement command, dividing the continuous trajectory into multiple sub-segments by analyzing the geometric curvature of the time-displacement curve, ensuring that the curvature changes smoothly in each sub-segment and each sub-segment contains a predetermined number of sampling points; A ten-order polynomial curve is selected as the fitting model, and under set constraints, the sampling points are fitted by the least squares method to ensure that the curve is smooth and the third-order derivative is continuous; By introducing Lagrange multipliers and constructing Lagrange functions, the curve fitting problem with constraints is transformed into an unconstrained extreme value problem, and the coefficients of the ten-degree polynomial are solved; Based on the fitted polynomial curve, a high-speed motion instruction is generated. The high-speed motion instruction includes a linear interpolation instruction, a circular interpolation instruction and a NURBS interpolation instruction. Each interpolation instruction includes a polynomial degree, a number of fitting points, an interpolation period and a polynomial coefficient.
2. The method for generating high-speed motion instructions in BVT format based on time expression according to claim 1, characterized in that: The tool tip displacement instruction is segmented, and the continuous trajectory is divided into multiple sub-segments by analyzing the geometric curvature of the time-displacement curve, including: Calculate the kinematic parameters of each sampling point on the trajectory, including instantaneous velocity, instantaneous acceleration and curvature; Combine the curve bow height error and the normal acceleration of the sampling point to calculate the segmentation curvature threshold, and select the extreme points whose curvature exceeds the segmentation curvature threshold as candidate segmentation points; The trajectory is divided at the selected extreme curvature points to obtain multiple sub-segments.
3. The method for generating high-speed motion instructions in BVT format based on time expression according to claim 2, characterized in that: The segmentation curvature threshold is calculated by combining the curve height error and the normal acceleration of the sampling point, specifically: Among them, κ threshold is the segmentation curvature threshold; L is the arc length of the current sub-segment; v avg is the average speed of the sub-segment; δ is the curve bow height error; a n Normal acceleration at the sampling point.
4. The method for generating high-speed motion instructions in BVT format based on time expression according to claim 2, characterized in that: Each sub-segment contains a predetermined number of sampling points, specifically: If the number of sampling points in a sub-segment is less than the predetermined number, cubic spline interpolation is used to uniformly fill it to the predetermined number in the time domain; If the number of sampling points in a sub-segment exceeds the predetermined number, the first predetermined number of points will be intercepted in chronological order, and the remaining sampling points will be assigned to the next sub-segment.
5. The method for generating high-speed motion instructions in BVT format based on time expression according to claim 1, characterized in that: The decimal polynomial curve is selected as the fitting model, and the sampling points are fitted by the least square method under set constraints, specifically: i i =(R i -y i ) 2 Where θ i is the square of the fitting error of the i-th sampling point; R i is a tenth-degree polynomial; x i is the sampling time; y i is the cumulative displacement value; b0, b1,…, b 10 are the coefficients of a ten-degree polynomial.
6. The method for generating high-speed motion instructions in BVT format based on time expression according to claim 5, characterized in that: The set constraint conditions include position constraint, velocity constraint, acceleration constraint and jerk constraint.
7. The method for generating high-speed motion instructions in BVT format based on time expression according to claim 5, characterized in that: By introducing Lagrange multipliers and constructing Lagrange functions, the curve fitting problem with constraints is transformed into an unconstrained extreme value problem, specifically: F(b0,…,b 10 ,λ1,λ2,…,λ8) =θ(b0,…,b 10 )+λ1*f1(b0,…,b 10 )+λ2*f2(b0,…,b 10 )+λ3*g1(b0,…,b 10 )+λ4*g2(b0,…,b 10 )+λ5*k1(b0,…,b 10 )+λ6*k2(b0,…,b 10 )+λ7*m1(b0,…,b 10 )+λ8*m2(b0,…,b 10 ) where F(·) is the Lagrangian function; λ1, λ2, …, λ8 are Lagrangian multipliers; f1(·) and f2(·) are position constraints; g1(·) and g2(·) are velocity constraints; k1(·) and k2(·) are acceleration constraints; m1(·) and m2(·) are jerk constraints; v0 is the velocity of the end point of the previous subsegment; v is the average velocity of several adjacent sampling points; a0 is the acceleration of the end point of the previous subsegment; a is the acceleration of the intersection of two adjacent subsegments; j0 is the jerk of the end point of the previous subsegment; and j is the jerk of the intersection of two adjacent subsegments.
8. A device for generating high-speed motion instructions in BVT format based on time expression, characterized in that: include: A definition module is used to define a tool tip displacement instruction, wherein the tool tip displacement instruction is a trajectory point sequence of equal-periodic sampling, and each sampling point is represented by a sampling time and a cumulative displacement value; a segmentation module for segmenting the tool tip displacement instruction, dividing the continuous trajectory into a plurality of sub-segments by analyzing the geometric curvature of the time-displacement curve, ensuring that the curvature changes smoothly in each sub-segment and each sub-segment contains a predetermined number of sampling points; A fitting module is used to select a ten-order polynomial curve as a fitting model, and fit the sampling points by the least squares method under set constraints to ensure that the curve is smooth and the third-order derivative is continuous; The transformation and solution module is used to construct the Lagrange function by introducing Lagrange multipliers, transform the curve fitting problem with constraints into an unconstrained extreme value problem, and solve the coefficients of the decagonal polynomial; The instruction generation module is used to generate high-speed motion instructions based on the fitted polynomial curve. The high-speed motion instructions include linear interpolation instructions, circular interpolation instructions and NURBS interpolation instructions. Each interpolation instruction contains the polynomial degree, the number of fitting points, the interpolation period and the polynomial coefficient.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, it implements a method for generating high-speed motion instructions in a BVT format based on time expression as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements a method for generating high-speed motion instructions in a BVT format based on time expression as described in any one of claims 1 to 7.
Citation Information
Cited By
Dynamic characteristic modeling method and system for data physical combined drive feeding system
CN121596821A
