A S-type velocity planning method for multi-axis machines based on secondary merging
By micro-segment classification and secondary merging of the motion trajectories of multi-axis machines, the problems of speed curve oscillation and large calculation amount in traditional S-type speed planning are solved, and smooth motion and efficient calculation in high-speed and high-precision machining are achieved, which is suitable for for multi-axis linkage control.
Patent Information
- Application Number
- CN202410851100.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-28
AI Technical Summary
The traditional S-shaped speed planning method is difficult to adapt to complex motion trajectories in high-speed and high-precision machining, resulting in frequent oscillations in the speed curve, a large amount of calculation, and slow speed increase in long line segments, making it difficult to achieve the maximum speed in one acceleration and deceleration.
By classifying and secondary merging multiple micro-segments with similar physical properties, large segments are formed, and speed planning is performed on these large segments to reduce the amount of calculation, improve motion efficiency, and provide an efficient and stable S-shaped speed forward solution.
It achieves smoother and more supple motion, reduces the amount of calculation, improves operating efficiency, makes S-shaped acceleration and deceleration suitable for various complex situations, and provides an efficient S-shaped speed forward-looking universal solution.
Smart Images

Figure CN118394144B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of multi-axis linkage robot control, and in particular relates to a multi-axis machine S-type speed planning method based on secondary merging. Background Art
[0002] Manufacturing is the foundation of national production capacity and economic and social development, and is the carrier of high-tech industrialization. It reflects the level of development of social productivity. In order to meet the development needs of the equipment manufacturing industry, a series of advanced processing technologies have sprung up and developed, among which the most representative is machine tool processing technology. The birth and rapid upgrading of advanced digital technology indicate that the machine tool field has entered the era of intelligent manufacturing with digital automatic control as the core. Especially in the past decade, with the rapid development of computer network technology, the machine tool manufacturing industry has also entered the era of CNC with high speed, high precision and high efficiency as the main characteristics.
[0003] With the continuous development of the economy and society, people's demand for personalized products is increasing. The supply and demand relationship has prompted product manufacturers to improve the speed and precision of processing. This is because the processing speed determines the production efficiency of the product, and the processing accuracy is an important guarantee of product quality. At the same time, the demand for high-speed and high-precision processing urgently requires the CNC system to further improve its computing and control capabilities. This is mainly reflected in two aspects:
[0004] First, the computing speed of the CNC system should be fast, including the simplicity and effectiveness of the core algorithm and the rapid response of each moving part, thus shortening the processing preparation time;
[0005] Secondly, each actuator is required not to produce impact, oscillation, or step-out during movement, so as to meet the needs of high-speed and high-precision processing.
[0006] At present, the premise of the look-ahead algorithm is to split the entire trajectory into many tiny straight micro-segments, and each micro-segment moves at a uniform speed - V does not change within a micro-segment, but it should be noted that the head node speed StartV and the tail node speed EndV can be different. V takes StartV, and the speed is changed by speed jump between different micro-segments. The reason why the virtual axis (on the motion trajectory) changes speed by speed jump between different micro-segments is that it is impossible to make the speed of each physical axis meet the speed continuity at the same time. It is better to make the virtual axis speed jump, and it is only necessary to make the virtual axis and each physical axis meet the conditions of acceleration, jerk, etc.
[0007] Common acceleration and deceleration control algorithms used in CNC systems include linear acceleration and deceleration algorithms, exponential acceleration and deceleration algorithms, S-shaped acceleration and deceleration algorithms, and polynomial acceleration and deceleration algorithms. Among them, the S-shaped acceleration and deceleration algorithm has received the most attention due to its practicality. Traditional S-shaped speed planning does not classify micro-segments, and requires an S-shaped speed planning for one or several micro-segments, which makes the speed curve oscillate frequently. Compared with T-shaped speed, the speed rise or fall process is slow, and it is difficult to adapt to various complex motion situations. For a long line segment, the ideal S-shaped speed curve is to be able to reach the maximum speed directly in one acceleration and deceleration. However, in order to adapt to various complex motion trajectories, the traditional S-shaped speed planning, even in the speed planning of long line segments, requires multiple S-shaped accelerations and decelerations to reach the maximum speed.
[0008] In order to allow longer trajectories to be planned in one S-shaped acceleration and deceleration process and to adapt to various motion trajectories, the present invention proposes to classify multiple micro-segments with similar physical properties to form a long segment with multiple micro-segments with similar physical properties. The present invention can be applied to multi-axis linkage control processing, making the movement smoother and more flexible, and greatly reducing the amount of calculation and improving the operating efficiency. It also provides an efficient and stable S-shaped speed forward general solution.
[0009] Secondly, for some special micro-segments, after the previous curve classification, there will be some continuous large segments with fewer classification results. In the S-curve mode, the speed of these micro-segments rises extremely slowly (the acceleration is always very small). Figure 3 and Figure 4 As shown, for the same trajectory speed curve, the S-type speed curve increases slowly in speed and has a longer movement time than the middle part of the T-type speed curve. The reason why the S-type speed curve increases slowly is that the motion trajectory is a corner-optimized spline curve, and there is a continuous gradual change in curvature at the corners. For this reason, it is believed that the micro-segments at the corners do not have similar physical properties during classification, and many large segments are composed of only a few micro-segments. In the S-type speed curve mode, it is difficult to increase the acceleration. In order to solve this problem, the present invention merges the large segments in the two parts that still have fewer micro-segments after the curve classification. Summary of the invention
[0010] The object of the present invention is to provide a multi-axis machine S-type speed planning method based on secondary merging, aiming to solve the above-mentioned problems.
[0011] The present invention is mainly achieved through the following technical solutions:
[0012] A multi-axis machine S-type speed planning method based on secondary merging, the motion trajectory of the multi-axis machine is known, and the motion trajectory is divided into a number of micro-segments, the several micro-segments are classified to obtain a number of large segments; then, the classified large segments are merged twice, and finally speed planning is performed; the secondary merging of the large segments includes the following steps:
[0013] Step S1: If the number of micro-segments of the current large segment is ≥ the threshold M, go to step S2; otherwise, go to step S3;
[0014] Step S2: If the current large segment is not the last large segment of the trajectory, the current large segment points to the next large segment and goes to step S1;
[0015] Step S3: If the current large segment is not the last large segment, go to step S4; otherwise go to step S6;
[0016] Step S4: if the number of micro-segments of the next large segment of the current large segment is greater than or equal to the threshold value M, go to step S5; otherwise, go to step S6;
[0017] Step S5: set the secondary merge end flag isEnd to 1, the secondary merge tail pointer curveFinalSegment points to the current large segment curSegment, and go to step S8;
[0018] Step S6: Determine whether the secondary merge start flag isFirst is 1. If so, set the secondary merge head pointer curveFirstSegment to point to the current large segment curSegment, set the micro segment count value num to 0, and set the start flag isFirst to 0, and then go to step S7; otherwise, go directly to step S7;
[0019] Step S7: the secondary merge tail pointer curveFinalSegment points to the current large segment curSegment, and updates the current micro-segment count value num = num (original) + the number of micro-segments of the current large segment curSegmenT.lineNum;
[0020] Step S8: If the current micro-segment count value is greater than or equal to the threshold value M, or the secondary merge end flag isEnd is 1, go to step S9; otherwise, go to step S2;
[0021] Step S9: merge all micro-segments between the secondary merge head pointer curveFirstSegment and the secondary merge tail pointer curveFinalSegment into one large segment again, and initialize num to 0, the secondary merge start flag isFirst to 1, and then go to step S2.
[0022] To better implement the present invention, further, in step S9, it is merged again into a large segment, including the following steps:
[0023] Step S91: Initialize the first micro-segment firstSegment as the first micro-segment of the large segment curveFirstSegment, and the last micro-segment finalSegment as the last micro-segment of the large segment curveFinalSegment; set isStartNode to 1 and CalcMethod to 0; the current large segment curSegment points to firstSegment, the minimum value of the speed limit minV of all micro-segments = the maximum speed wholeVmax of the continuous trajectory, and the current total length totalL = 0;
[0024] Among them: isStartNode = 1 means that the minimum node speed is the head node of the micro-segment;
[0025] isStartNode = 0 means that the minimum node speed is not the head node of the micro-segment;
[0026] CalcMethod = 0 means that the micro-segment calculation is performed after the first classification of this large segment;
[0027] CalcMethod = 1 means that the micro-segment calculation is performed after the secondary merger of this large segment;
[0028] Step S92: If the restricted speed curSegment.StartVLimit of the head node of the current large segment < minV, then go to step S93; otherwise go to step S94;
[0029] Step S93: Let minV = the head node speed of the current large segment curSegment,
[0030] The micro-segment Line.pMinSegment corresponding to the minimum value of the speed limit of the large segment = the current large segment curSegment;
[0031] The left half length Line.leftLength of the large segment = the current total length totalL;
[0032] Step S94: Let totalL (current) = totalL (original) + the length curSegment.L of the current large segment. If the current large segment curSegment is the last micro-segment finalSegment, then go to step S96; otherwise go to step S95;
[0033] Step S95: The current large segment curSegment points to the next micro-segment of the current micro-segment and goes to step S92;
[0034] Step S96: If the limit speed curSegment.EndVLimit of the current large segment tail node < minV, then go to Step S97; otherwise, go to Step S98;
[0035] Step S97: Let minV = the speed of the head node of the current large segment curSegment,
[0036] Line.pMinSegment = curSegment,
[0037] Line.leftLength = totalL,
[0038] Set isStartNode to 0,
[0039] Line.minSpeedLimit = minV;
[0040] Where: Line.minSpeedLimit is the minimum speed limit of the large segment after secondary merging;
[0041] Step S98: Obtain the total length L of all micro - segments of the large segment after secondary merging, and Line.rightLength = L - Line.leftLength;
[0042] Where: Line.rightLength is the length of the right half of the large segment.
[0043] To better implement the present invention, further, in Step S9, when the speed curve obtained by speed planning based on the large segment after secondary merging has a unidirectional increase in speed, forward planning is required. At this time, if the initial speed Vs ≤ the minimum value minSpeedLimit of the speed upper limit in the micro - segment, then use the first micro - segment on the left as the starting micro - segment and perform speed planning from beginning to end; when the speed curve obtained by speed planning based on the large segment after secondary merging has a unidirectional decrease in speed, reverse planning is required. At this time, if the initial speed Vs ≤ the minimum value minSpeedLimit of the speed upper limit in the micro - segment, then use the first micro - segment on the right as the starting micro - segment and perform speed planning from end to beginning; when the left part of the speed curve obtained by speed planning based on the large segment after secondary merging has a unidirectional decrease in speed and the right part has a unidirectional increase in speed, at this time, if the initial speed Vs > the minimum value minSpeedLimit of the speed upper limit in the micro - segment, then use the micro - segment with the minimum speed limit as the starting micro - segment, and the minimum speed limit as the starting speed, and perform forward planning or reverse planning to the micro - segments on both sides respectively.
[0044] To better implement the present invention, further, for forward planning, solving the acceleration includes the following steps:
[0045] Step a1: Parameter initialization:
[0046] Initialize the starting speed of the current micro-segment curVs = initial speed Vs, totalL = 0;
[0047] The previous minimum overall acceleration minX1 = the previous minimum local acceleration minX2 = the maximum acceleration of the continuous trajectory wholeAmax;
[0048] Step a2: Calculate the minimum overall acceleration minX1:
[0049] Update totalL (current) = totalL (original) + the length of the current micro segment, curline.L,
[0050] Update curVs = curline.end_limit × (1 + C),
[0051] Overall acceleration curA = (curVe 2 -curVs 2 )÷2÷totalL,
[0052] Get the minimum overall acceleration minX1=min(minX1(original),curA),
[0053] Where: curline.end_limit is the speed limit at the end of the current micro-segment;
[0054] C is the threshold value exceeding the limit;
[0055] Step a3: Calculate the minimum local acceleration minX2:
[0056] curVs(current) = min(curLine.StartVLimit, curVs(original))
[0057] Get the time t=curline.L÷curVs for the current micro segment to move at curVs.
[0058] Take curVs as the initial velocity and calculate the maximum value of the final velocity maxVe.
[0059] Calculate the local acceleration of the current micro segment curA1 = (maxVe-curVs) ÷ t,
[0060] The minimum local acceleration before updating minX2=min(minX2(original),curA1),
[0061] Update curVs = maxVe,
[0062] Step a4: Determine whether the current micro-segment is the last micro-segment. If so, acceleration_rate=min(minX1, minX2). If not, point to the next micro-segment and go to step a2.
[0063] In order to better implement the present invention, further, for forward programming, solving the jerk includes the following steps:
[0064] Step b1: Parameter initialization:
[0065] The current total length totalL=0;
[0066] Let minJ1=wholeJerkmax,
[0067] Step b2: Let the current speed curV = ,
[0068] Let the current jerk curMinJerk = m_fJerk,
[0069] Perform the following operations on all physical axes i:
[0070]
[0071] If k1 is not 0, then:
[0072]
[0073] Where: curMinJerk is the jerk limit of the current micro segment,
[0074] Update the current minimum value of jerk minJ1=min(curMinJerk, minJ1),
[0075] Update totalL = totalL (original) + the length of the current micro segment, curline.L.
[0076] curline.AxisL[i] is the length of the physical axis i of the current micro segment.
[0077] curline.AxisEndVLimitByJerk[i] is the speed limit caused by the jerk at the end node of physical axis i.
[0078] k1 is the ratio of the length of the physical axis i of the current micro segment, curline.AxisL[i], to the length of the current micro segment, curline.L.
[0079] kV is the absolute value of the ratio of the current velocity curV to the velocity limit curline.AxisEndVLimitByJerk[i] caused by the jerk at the end node of the physical axis i.
[0080] m_fJOverflowScale is the ratio of the value that the jerk can exceed the set jerk to the set jerk.
[0081] m_fJerk is the set maximum jerk;
[0082] Step b3: Determine whether the current micro-segment is the last micro-segment. If so, obtain the acceleration minJ1. If not, point to the next micro-segment and continue to step b2.
[0083] In order to better implement the present invention, further, for the speed planning of the micro-segments on both sides, it is known that the maximum speeds that the nodes from left to right of the large segment can reach are vNode[0], vNode[1], and vNode[2] respectively: the following steps are included:
[0084] Step c1: Forward planning for a micro-segment on one side:
[0085] If isCalcLeft is 1, there is a left half S-shaped speed curve, then the starting speed limit limitVs = vNode[0]; otherwise, the starting speed limit limitVs = vNode[1];
[0086] If the minimum planned starting speed minVs is greater than the starting speed limit limitVs of this section, backtracking is required:
[0087] minVe=min(limitVs,maxVs),
[0088] If isCalcRight is 1, and there is a right-half S-shaped velocity curve, the maximum velocity at the end, maxVe=vNode[2]; otherwise, the maximum velocity at the end, maxVe=vNode[1];
[0089] Step c2: Reverse planning for the micro-segment on one side:
[0090] If isCalcRight is 1, and there is a right-half S-shaped speed curve, the starting speed limit limitVs=vNode[2]; otherwise, the starting speed limit limitVs=vNode[1];
[0091] If minVs>limitVs, it means that the minimum planned starting speed is still greater than the starting speed limit of this section, and backtracking is required:
[0092] minVe=min(limitVs,maxVs),
[0093] If isCalcLeft is 1 and there is a left half S-shaped velocity curve, the maximum velocity at the end, maxVe=vNode[0]; otherwise, the maximum velocity at the end, maxVe=vNode[1].
[0094] In order to better implement the present invention, further, if the following conditions are met at the same time, multiple continuous micro segments are divided into one large segment:
[0095] tempMaxV-tempMinV≦VRange,
[0096] tempMaxVByAcc-tempMinVByAcc≦AccVRange,
[0097] tempMaxVByJerk-tempMinVByJerk≦JerkVRange,
[0098] tempMaxA-tempMinA≦AccRange,
[0099] ,
[0100] ,
[0101] ,
[0102] ,
[0103] ,
[0104] ,
[0105] ,
[0106] ,
[0107] in:
[0108] tempMinV is the minimum upper limit of the temporary speed of the micro segment;
[0109] temMaxV is the maximum value of the temporary speed limit of the micro-segment;
[0110] MaxV is the maximum speed limit of all micro-segments;
[0111] MinV is the minimum upper speed limit of all micro-segments;
[0112] line1.StartVLimit is the speed limit value of the head node of the next micro-segment line1 of the current micro-segment;
[0113] line1.EndVLimit is the speed limit value of the end node of the next micro-segment line1 of the current micro-segment;
[0114] tempMinVByAcc is the minimum upper limit of the temporary speed of the micro-segment acceleration limit;
[0115] tempMaxVByAcc is the maximum value of the temporary speed upper limit of the micro-segment acceleration limit;
[0116] MinVByAcc is the minimum upper speed limit of all micro-segments;
[0117] MaxVByAcc is the maximum upper limit of the acceleration limit of all micro-segments;
[0118] line1.StartVLimitByAcc is the speed limit value of the acceleration limit of the head node of the next micro-segment line1 of the current micro-segment;
[0119] line1.EndVLimitByAcc is the speed limit value of the acceleration limit of the end node of the next micro-segment line1 of the current micro-segment;
[0120] tempMinVByJerk is the minimum upper limit of the temporary speed of the micro-segment jerk limit;
[0121] tempMaxVByJerk is the maximum temporary speed limit of the micro-segment jerk limit;
[0122] MinVByJerk is the minimum upper limit of the jerk limit for all micro-segments;
[0123] MaxVByJerk is the maximum speed limit of the acceleration limit of all micro-segments;
[0124] line1.StartVLimitByJerk is the speed limit value of the jerk limit of the head node of the next micro-segment line1 of the current micro-segment;
[0125] line1.EndVLimitByJerk is the speed limit value of the acceleration limit of the end node of the next micro-segment line1 of the current micro-segment;
[0126] tempMaxA is the temporary maximum acceleration value of the micro segment;
[0127] tempMinA is the temporary minimum acceleration value of the micro segment;
[0128] MaxA is the maximum acceleration of all micro-segments;
[0129] MinA is the minimum acceleration of all micro-segments;
[0130] line1.Acc is the acceleration of the next micro-segment line1 of the previous micro-segment;
[0131] VRange is the range between the maximum and minimum upper limits of all micro-segment speeds;
[0132] AccVRange is the range between the maximum and minimum speed limits of all micro-segment acceleration limits;
[0133] JerkVRange is the range between the maximum and minimum speed limits of all micro-segment jerk limits;
[0134] AccRange is the range of the difference between the maximum and minimum upper limits of acceleration of all micro-segment virtual axes.
[0135] The beneficial effects of the present invention are as follows:
[0136] The present invention can be applied to multi-axis linkage control processing, classify micro-segments, and convert the micro-segment forward-looking into S-shaped speed forward-looking for the classified large segments, so that the movement is smoother and more flexible, and the movement efficiency is improved. At the same time, the amount of calculation is greatly reduced, and the operation efficiency is improved. Then, a second merger is performed for the large segments that still have only a small number of micro-segments after the first merger, so that the S-shaped acceleration and deceleration can be applied to various complex situations. The present invention provides an efficient and stable S-shaped speed forward-looking general solution to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0137] Figure 1 It is a flow chart of the S-type speed planning method of a multi-axis machine based on secondary merging of the present invention;
[0138] Figure 2 It is a flow chart of secondary merging of micro segments in large segments;
[0139] Figure 3 It is the S-shaped velocity curve after merging micro-segments once;
[0140] Figure 4 It is the S-shaped velocity curve after the secondary merging of micro-segments based on 10 micro-segments;
[0141] Figure 5 It is a T-shaped speed curve after merging micro-segments. DETAILED DESCRIPTION
[0142] Embodiment 1:
[0143] A multi-axis machine S-shaped speed planning method based on secondary merging. The physical properties of the secondary merging segment are consistent with those of the first classification segment. In order to better describe it, new variables are introduced into the secondary classification segment:
[0144] pMinSegment: micro-segment corresponding to the minimum speed limit;
[0145] minSpeedLimit: minimum speed limit after secondary merging;
[0146] leftLength: the length of the left half;
[0147] rightLength: the length of the right half;
[0148] splitNum: the number of split segments;
[0149] LeftLine: left half of the speed plan;
[0150] RightLine: the right half of the speed plan;
[0151] During the secondary merge, the minimum node speed limit of all micro-segments of the secondary merge will be found, which is the minSpeedLimit above. Suppose the corresponding node is node, then the sum of the lengths of all micro-segments to the left of node is leftLength, the sum of the lengths of all micro-segments to the right of node is rightLength, and pMinSegment is the micro-segment with node as the head node.
[0152] Assume that a large segment with less than 20 micro segments is merged twice, such as Figure 1 As shown, the present invention specifically comprises the following steps:
[0153] 3.1 Determine whether the number of current large segment micro segments is ≥ 20. If so, go to step 3.2; if not, go to step 3.3.
[0154] 3.2 Determine whether the current large segment is the last large segment. If not, the current large segment points to the next large segment of the current large segment, and go to step 3.1; if yes, the process ends.
[0155] 3.3 Determine whether the current large segment is the last large segment. If not, go to step 3.4; if yes, go to step 3.6.
[0156] 3.4 Determine whether the number of micro-segments under the current large segment is ≥ 20. If so, go to step 3.5; if not, go to step 3.6.
[0157] 3.5 The secondary merge end flag isEnd=1, and the secondary merge tail pointer curveFinalSegment points to the current large segment curSegment. Go to step 3.8.
[0158] 3.6 Determine whether the secondary merge start flag isFirst is 1. If so, set the secondary merge head pointer curveFirstSegment to point to the current large segment curSegment, set the micro segment count value num to 0, and set the start flag isFirst to 0. Go to step 3.7.
[0159] 3.7 The tail pointer curveFinalSegment of the secondary merge points to the current large segment curSegment, and the current micro-segment count value num is updated to num (original) + the number of micro-segments of the current large segment curSegmenT.lineNum. Go to step 3.8.
[0160] 3.8 Determine whether the secondary merge micro-segment count num≥20, or whether the secondary merge end flag isEnd is 1. If one or more of the conditions are met, go to step 3.9; otherwise, go to step 3.2.
[0161] 3.9 All micro-segments between the secondary merge head pointer curveFirstSegment and the secondary merge tail pointer curveFinalSegment are merged into one large segment again. And num is initialized to 0, and the secondary merge start flag isFirst is 1. Go to step 3.2.
[0162] Among them, Figure 2 As shown, the specific operation of merging all micro-segments between the pointer curveFirstSegment in step 3.9 above and the secondary merge tail pointer curveFinalSegment into one large segment again is as follows:
[0163] 3.9.1 Initialize the first micro-segment firstSegment as the first micro-segment of the large segment curveFirstSegment, and the last micro-segment finalSegment as the last micro-segment of the large segment curveFinalSegment. Set isStartNode to 1 (this variable indicates whether the minimum node speed is the head node of the micro-segment, used to distinguish cases in subsequent calculations), and set CalcMethod to 0 (this variable is used to distinguish whether to calculate this large segment as a micro-segment after the first classification or as a micro-segment after secondary merging during the speed look-ahead process, and the calculation methods for the two are different). The current large segment curSegment points to firstSegment, the minimum speed node minV = wholeVmax (the maximum speed of the continuous trajectory), and the current total length totalL = 0. Go to step 3.9.2.
[0164] 3.9.2 Determine whether the speed limit of the head node of the current large segment curSegment.StartVLimit < minV holds. If it does, go to step 3.9.3; otherwise, go to step 3.9.4.
[0165] 3.9.3 Set minV to the speed of the head node of the current large segment curSegment, and Line.pMinSegment = curSegment.
[0166] Line.leftLength = totalL.
[0167] 3.9.4 totalL (current) = totalL (original) + curSegment.L. If curSegment is finalSegment, go to step 3.9.6; if curSegment is not finalSegment, go to step 3.9.5.
[0168] 3.9.5 The current large segment curSegment points to the next micro-segment of the current micro-segment, and go to step 3.9.2.
[0169] 3.9.6 Determine whether the speed limit of the tail node of the current large segment curSegment.EndVLimit < minV holds. If it does, go to step 3.9.7; otherwise, go to step 3.9.8.
[0170] 3.9.7 Set minV to the speed of the head node of the current large segment curSegment, and Line.pMinSegment = curSegment.
[0171] Line.leftLength = totalL, isStartNode is set to 0, Line.minSpeedLimit = minV. Go to step 3.9.8.
[0172] 3.9.8 Get the total length L of all micro-segments of the secondary merged large segment, so that Line.rightLength=L-Line.leftLength, and the whole process ends.
[0173] The speed curve obtained by speed planning based on the secondary merging of large sections includes the following three cases:
[0174] ① The speed decreases in one direction, and the number of split segments splitNum is set to 1.
[0175] ② The left part is unidirectionally descending, and the right part is unidirectionally ascending. In this case, the minimum speed must be minSpeedLimit, and the middle node of the two parts is also the node above. LeftLine is the large segment of the left part, and RightLine is the large segment of the right part. The number of split segments splitNum is set to 2.
[0176] ③ The speed increases in one direction. The number of split segments splitNum is set to 1.
[0177] The large segment after secondary merging is composed of large segments with fewer micro-segments after primary classification, which means that the micro-segments in the large segment after secondary merging often have different physical properties. If we want to perform S-shaped velocity forecasting on the large segment after secondary merging, how to determine the acceleration, jerk, speed limit and other physical quantities of the large segment after secondary merging? How to get the final velocity Ve of the large segment from the initial velocity Vs.
[0178] For situation ③, during the specific forward planning, there is an initial speed. The initial speed Vs is compared with the minimum speed limit minSpeedLimit in the micro-segment. If Vs≤minSpeedLimit, the first micro-segment on the left is taken as the starting micro-segment, and the initial speed Vs is taken as the starting speed. Speed planning is performed from beginning to end. For situation ①, during the reverse planning, there is an initial speed. The initial speed Vs is compared with the minimum speed limit minSpeedLimit in the micro-segment. If Vs≤minSpeedLimit, the first micro-segment on the right is taken as the starting micro-segment, and the initial speed Vs is taken as the starting speed. Speed planning is performed from end to beginning. For situation ②, if the initial speed Vs>minSpeedLimit, the micro-segment with the minimum speed limit is taken as the starting micro-segment, and the minimum speed limit is taken as the starting speed. Speed planning is performed on both sides.
[0179] Embodiment 2:
[0180] A multi-axis machine S-type speed planning method based on secondary merging specifically comprises the following steps:
[0181] Assume that the current segment is curLine, the planned direction direction is known (direction 0 indicates forward planning, direction 1 indicates reverse planning), the minimum initial velocity minVs, and the maximum initial velocity maxVs are known. Since there may be two S-shaped velocity curves after the second merge, they are set as Line11 and Line12.
[0182] Initialize Line12 = curLine, set the first micro-segment startline of the plan to be the first micro-segment of the current large segment curLine, and endline to be the last micro-segment of the current large segment.
[0183] vmovemidsegment=startline,
[0184] Freesegment=curLine.
[0185] Specifically, if direction is 0, it indicates forward planning, go to step (1.1), otherwise it indicates reverse planning, go to step (1.2).
[0186] (1.1) Let Vs=maxVs, vmovemidsegment=startline,
[0187] If maxVs>curLine.minSpeedLimit, then set Vs=curLine.minSpeedLimit and vmovemidsegment=curLine.pMinSegment, and go to step (1.3).
[0188] (1.2) Let Vs=maxVs, vmovemidsegment=endline, isStartNode=0.
[0189] If maxVs>curLine.minSpeedLimit, then set Vs=curLine.minSpeedLimit and vmovemidsegment=curLine.pMinSegment, and go to step (1.3).
[0190] (1.3) If vmovemidsegment = startline, the current situation is a one-way ascent, forward planning, go to step (1.3.1); if vmovemidsegment = endline and isStartNode = 0, the current situation is a one-way ascent, reverse planning, go to step (1.3.2); if neither of the above two situations is satisfied, divide the large section into two S-shaped speed plans, go to step (1.3.3).
[0191] (1.3.1) The isCalcLeft flag indicates whether there is an S-shaped speed curve on the left (0 means no, 1 means yes).
[0192] The isCalcRight flag indicates whether there is an S-shaped speed curve on the right (0 means no, 1 means yes).
[0193] Let rightLength = curLine.L. Go to step (2).
[0194] (1.3.2)Where isCalcLeft=1, isCalcRight=0, let leftLength=curLine.L.
[0195] Assume that the temporary micro-segment freeSegment points to curLine and go to step (2).
[0196] (1.3.3)Where isCalcLeft=1, isCalcRight=1, curLine.splitNum=2.
[0197] leftLength=curLine.leftLength,
[0198] rightLength=curLine.rightLength.
[0199] Set the temporary micro-segment freeSegment to point to curLine. Go to step (2).
[0200] (2) Determine whether there is an S-shaped speed curve on the right side and whether the flag isCalcRight is 1. If it is 1, forward planning on the right side is required, and go to step (2.1); otherwise, go to step (3).
[0201] Set micro segment curLine = vmovemidsegment,
[0202] nextline=the next micro-segment of the current micro-segment curLine,
[0203] curVs=Vs.
[0204] The first node of Line12 points to curline, and the last node of Line12 points to endline. Go to step (2.1).
[0205] (2.1) Calculate the acceleration:
[0206] Let minX1=minX2=wholeAmax,
[0207] Where minX1 records the minimum value of the overall slope, and minX2 records the minimum value of the local slope. totalL=0.
[0208] Repeat the following calculation until the loop is exited:
[0209] (2.1.1) Calculate the overall acceleration:
[0210] totalL(current) = totalL(original) + the length of the current micro-segment curline.L.
[0211] Let curVs=curline.end_limit×1.05.
[0212] Assume that the speed can exceed the limit of 0.05. This is because there may be a few micro segments (especially with
[0213] The upper speed limit of the adjacent micro-segments of the curline is very small compared to the curline, thus limiting the overall acceleration.
[0214] Overall acceleration curA = (curVe 2 -Vs 2 )÷2÷totalL
[0215] Get the current minimum overall acceleration minX1=min(minX1(original), curA).
[0216] (2.1.2) Calculate the local acceleration:
[0217] Let the variable curVs be the starting velocity of the currently planned micro-segment.
[0218] curVs(current)=min(curLine.StartVLimit, curVs(original)),
[0219] Get the time t=curline.L÷curVs for the current micro segment to move at curVs.
[0220] With curVs as the initial velocity, the current micro segment curline is line, and the next micro segment nextline is line1.
[0221] Calculate the maximum end speed maxVe,
[0222] Calculate the local acceleration of the current micro segment curA1 = (maxVe-curVs) ÷ t,
[0223] The minimum local acceleration before updating minX2=min(minX2(original),curA1),
[0224] Update curVs=maxVe.
[0225] (2.1.3) Determine whether the current micro-segment curline is the last micro-segment endline. If so, then jump out of the loop and jump to step (2.2). If not, then make curline point to the next micro-segment of curline, nextline point to the next micro-segment of nextline, and go to step (2.1.1).
[0226] (2.2) Let acceleration_rate = min(minX1, minX2) and calculate the jerk.
[0227] The current micro segment curLine = the starting planned micro segment vmoveMidsegment, and the current total length totalL = 0;
[0228] Let minX1=wholeJerkmax, where minX1 is the minimum value of the current jerk.
[0229] Repeat the following calculations until the process ends.
[0230] (2.2.1) Let the current speed curV = .
[0231] (2.2.2) Let the current speed curMinJerk = m_fJerk,
[0232] Perform the following operations on all physical axes i:
[0233]
[0234] curMinJerk is the jerk limit of the current micro segment,
[0235] Update the current minimum value of jerk minX1=min(curMinJerk, minX1),
[0236] Update totalL = totalL (original) + the length of the current micro segment, curline.L.
[0237] Determine whether the current micro-segment curline is the last micro-segment endline. If so, the current process ends and goes to step (2.3). If not, update curline to the next micro-segment of the original curline and continue to go to step (2.2.1).
[0238] (2.3) Among them, Line12.A[0], Line12.A[1], and Line12.A[2] are all acceleration_rate.
[0239] Line12.J[0], Line12.J[1], and Line12.J[2] are all minX1.
[0240] Line12.L=rightLength.
[0241] Line12.VRefer[0], Line12.VRefer[1], and Line12.VRefer[2] are all wholeVmax.
[0242] Through the previous function, we know the current micro-segment starting speed Vs, the maximum speed wholeVmax, the acceleration Line12.A[0], A[1], A[2] and the jerk Line12.J[0], J[1], J[2], and calculate the maximum speed maxVe at the end.
[0243] vNode[1]=Vs, vNode[2]=maxVe.
[0244] Go to step (3).
[0245] (3) Determine whether there is an S-shaped speed curve on the left and whether the flag isCalcLeft is 1. If it is 1, reverse planning on the left is required and go to step (3.1); otherwise, go to step (4).
[0246] Determine whether the current large segment is the head node flag curLine.isStartNode is 0, if so, the micro segment curLine = vmoveMidSegment; if not, the micro segment curline points to the previous micro segment of vmoveMidSegment.
[0247] nextline points to the previous micro-segment of the current micro-segment curline, curVs=Vs.
[0248] The first segment of Line11 is set to point to the first micro-segment of the current large segment curLine, and the last segment of Line11 points to curline. Go to step (3.1).
[0249] (3.1) Calculate acceleration
[0250] Let minX1=minX2=wholeAmax, minX1 records the minimum value of the overall slope, minX2 records the local
[0251] Slope minimum. totalL=0.
[0252] Repeat the following calculation until the loop is exited.
[0253] (3.1.1) Calculate the overall acceleration
[0254] totalL(current) = totalL(original) + the length of the current micro-segment, curline.L.
[0255] Let curVe=curline.StartVLimit×1.05.
[0256] Assume that the speed can exceed the limit of 0.05. This is because there may be a few micro segments (especially with
[0257] The upper speed limit of the adjacent micro-segments of the curline is very small compared to the curline, thus limiting the overall acceleration.
[0258] The overall acceleration curA = (curVe2-Vs2) ÷ 2 ÷ totalL, and the current minimum overall acceleration minX1 = min (minX1 (original), curA) is obtained.
[0259] Go to step (3.1.2).
[0260] (3.1.2) Calculate the local acceleration and set the variable curVs to be the starting velocity of the current planned micro-segment.
[0261] curVs (current) = min (curLine.EndVLimit, curVs (original)), get the time t = curline.L ÷ curVs for the current micro segment to move at curVs,
[0262] Calculate the maximum end speed maxVe,
[0263] Calculate the local acceleration of the current micro segment curA1 = (maxVe-curVs) ÷ t,
[0264] The minimum local acceleration before updating minX2=min(minX2(original),curA1),
[0265] Update curVs=maxVe.
[0266] (3.1.3) Determine whether the current micro-segment curline is the last micro-segment endline. If so, then jump out of the loop and jump to step (3.2). If not, then make curline point to the previous micro-segment of curline, nextline point to the previous micro-segment of nextline, and go to step (3.1.1).
[0267] (3.2) Let acceleration_rate = min(minX1, minX2) and calculate the jerk.
[0268] Determine whether the current large segment is the head node flag curLine.isStartNode is 0, if it is, the micro segment curline points to vmoveMidSegment; if not, the micro segment curline = the previous micro segment of vmoveMidSegment.
[0269] The current total length totalL=0.
[0270] Let minX1=wholeJerkmax, where minX1 is the minimum value of the current jerk.
[0271] Repeat the following calculations until the process ends. Jump to step (3.2.1).
[0272] (3.2.1) Let the current velocity curV = .
[0273] (3.2.2) curMinJerk = m_fJerk, perform the following operations on all physical axes:
[0274]
[0275] curMinJerk is the jerk limit of the current micro segment,
[0276] Update the current minimum value of jerk minX1=min(curMinJerk, minX1),
[0277] Update totalL = totalL (original) + the length of the current micro segment, curline.L.
[0278] Determine whether the current micro-segment curline is the first micro-segment startline. If so, the current process ends and goes to step (3.3). If not, update curline to the previous micro-segment of the original curline and continue to go to step (3.2.1).
[0279] (3.3) Line11.A[0], Line11.A[1], and Line11.A[2] are all acceleration_rate.
[0280] Line11.J[0], Line11.J[1], and Line11.J[2] are all minX1.
[0281] Line11.L=leftLength.
[0282] Line11.VRefer[0], Line11.VRefer[1], and Line11.VRefer[2] are all wholeVmax.
[0283] Through the previous function, we know the current micro-segment starting speed Vs, the maximum speed wholeVmax, the acceleration Line11.A[0], A[1], A[2] and the jerk Line11.J[0], J[1], J[2], and calculate the maximum speed maxVe at the end.
[0284] vNode[1]=Vs, vNode[0]=maxVe.
[0285] Go to step (4).
[0286] (4) In the above, vNode[0], vNode[1], and vNode[2] represent the maximum speeds that the three nodes can reach.
[0287] The planning direction is determined by direction. If direction is 0, it is forward planning and go to step (4.1); otherwise, it is reverse planning and go to step (4.2).
[0288] (4.1) Forward Planning
[0289] If isCalcLeft is 1, it means that the left half of the S-shaped speed curve exists, and the starting speed limit limitVs=vNode[0]; otherwise, the left half of the S-shaped speed curve does not exist, and the starting speed limit limitVs=vNode[1]; if minVs>limitVs, it means that the minimum value of the planned starting speed is still greater than the starting speed limit of this section, and backtracking is required.
[0290] minVe=min(limitVs,maxVs).
[0291] If isCalcRight is 1, it means that the right half of the S-shaped speed curve exists, then the maximum speed at the end
[0292] maxVe=vNode[2]; otherwise, the right half of the S-shaped velocity curve does not exist, and the maximum velocity at the end, maxVe=vNode[1].
[0293] The calculation process of the parameters related to the secondary merged S-curve is completed.
[0294] (4.2) Reverse planning
[0295] If isCalcRight is 1, it means that the right half of the S-shaped speed curve exists, then the starting speed limit limitVs=vNode[2]; otherwise, the right half of the S-shaped speed curve does not exist, and the starting speed limit limitVs=vNode[1].
[0296] If minVs>limitVs, it means that the minimum planned starting speed is still greater than the starting speed limit of this section and backtracking is required.
[0297] minVe=min(limitVs,maxVs).
[0298] If isCalcLeft is 1, it means that the left half S-shaped speed curve exists, and the maximum speed at the end maxVe=vNode[0]; otherwise, the left half S-shaped speed curve does not exist, and the maximum speed at the end maxVe=vNode[1].
[0299] The calculation process of the parameters related to the secondary merged S-curve is completed.
[0300] In this way, the maximum and minimum values of the final velocity of the large segment after secondary classification are obtained, and it is determined whether backtracking is needed. At the same time, the large segment after secondary classification is planned with two S-shaped velocity curves on the left and right, and the physical information such as the maximum acceleration, jerk, and speed limit of the S-shaped velocity are determined, so that the speed of each micro segment in the large segment can be calculated.
[0301] like Figure 3 and Figure 4 As shown in the figure, the speed curve after the secondary merger of about 10 micro-segments is compared with the speed curve before the secondary merger. The parameters of the two speed curves are consistent and they are the same trajectory. It can be seen that the movement time is shortened from the original 3.6s to 3.0s, and the movement efficiency is greatly improved. Figure 3 and Figure 5As shown in the figure, the S-shaped speed curve of the first classification increases slowly in speed and takes a long time to move compared to the middle part of the T-shaped speed curve. The reason why the S-shaped speed curve increases slowly is that the motion trajectory is a corner-optimized spline curve, and there is a continuous gradual change in curvature at the corner. For this reason, when classifying, it is believed that the small micro-segments at the corner do not have similar physical properties, and many large segments are composed of only a few small micro-segments. In the S-shaped speed curve mode, the acceleration is difficult to increase. After the large segment is classified twice, the speed of the S-shaped speed curve will increase much faster.
[0302] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Any simple modification or equivalent change made to the above embodiment based on the technical essence of the present invention shall fall within the protection scope of the present invention.
Claims
1. A multi-axis machine S-type speed planning method based on secondary merging, characterized in that: The motion trajectory of a multi-axis machine is known, and the motion trajectory is divided into several micro-segments. The micro-segments are classified to obtain several large segments. Then, the classified large segments are merged twice, and finally the speed planning is performed. The secondary merging of the large segments includes the following steps: Step S1: If the number of micro-segments of the current large segment is ≥ the threshold M, go to step S2; otherwise, go to step S3; Step S2: If the current large segment is not the last large segment of the trajectory, the current large segment points to the next large segment and goes to step S1; Step S3: If the current large segment is not the last large segment, go to step S4; otherwise go to step S6; Step S4: if the number of micro-segments of the next large segment of the current large segment is greater than or equal to the threshold value M, go to step S5; otherwise, go to step S6; Step S5: set the secondary merge end flag isEnd to 1, the secondary merge tail pointer curveFinalSegment points to the current large segment curSegment, and go to step S8; Step S6: determine whether the secondary merge start flag isFirst is 1. If so, set the secondary merge head pointer curveFirstSegment to point to the current large segment curSegment, set the micro segment count value num to 0, and set the start flag isFirst to 0, and then go to step S7; Otherwise, go directly to step S7; Step S7: the secondary merge tail pointer curveFinalSegment points to the current large segment curSegment, and updates the current micro-segment count value num = num (original) + the number of micro-segments of the current large segment curSegmenT.lineNum; Step S8: If the current micro-segment count value is greater than or equal to the threshold value M, or the secondary merge end flag isEnd is 1, go to step S9; Otherwise go to step S2; Step S9: merge all micro-segments between the secondary merge head pointer curveFirstSegment and the secondary merge tail pointer curveFinalSegment into one large segment again, and initialize num to 0, the secondary merge start flag isFirst to 1, and then go to step S2.
2. The method for S-type speed planning of a multi-axis machine based on secondary merging according to claim 1, characterized in that: In step S9, merging into one large segment again includes the following steps: Step S91: Initialize the first micro-segment firstSegment as the first micro-segment of the large segment curveFirstSegment, and the last micro-segment finalSegment as the last micro-segment of the large segment curveFinalSegment; set isStartNode to 1, and CalcMethod to 0; the current large segment curSegment points to firstSegment, the minimum speed upper limit minV of all micro-segments = the maximum speed of the continuous trajectory wholeVmax, and the current total length totalL = 0; Among them: isStartNode=1, indicating that the minimum node speed is the micro-segment head node; isStartNode=0, indicating that the minimum node speed is not the micro-segment head node; CalcMethod = 0 indicates micro-segment calculation after the first classification of this large segment; CalcMethod = 1 indicates micro-segment calculation after the secondary merging of this large segment; Step S92: If the limit speed curSegment.StartVLimit of the head node of the current large segment < minV, go to Step S93; otherwise, go to Step S94; Step S93: Let minV = the speed of the head node of the current large segment curSegment, The micro-segment Line.pMinSegment corresponding to the minimum speed limit of the large segment = the current large segment curSegment; The length of the left half of the large segment Line.leftLength = the current total length totalL; Step S94: Let totalL (current) = totalL (original) + the length of the current large segment curSegment.L. If the current large segment curSegment is the last micro-segment finalSegment, go to Step S96; otherwise, go to Step S95; Step S95: The current large segment curSegment points to the next micro-segment of the current micro-segment and go to Step S92; Step S96: If the limit speed curSegment.EndVLimit of the tail node of the current large segment < minV, go to Step S97; otherwise, go to Step S98; Step S97: Let minV = the speed of the head node of the current large segment curSegment, Line.pMinSegment = curSegment, Line.leftLength = totalL, Set isStartNode to 0, Line.minSpeedLimit = minV; Where: Line.minSpeedLimit is the minimum speed limit of the large segment after secondary merging; Step S98: Obtain the total length L of all micro-segments of the secondary merged large segment, and Line.rightLength = L - Line.leftLength; Where: Line.rightLength is the length of the right half of the large segment.
3. A multi-axis machine S-type speed planning method based on secondary merging according to claim 1 or 2, characterized in that: In the step S9, when the speed of the speed curve obtained by speed planning based on the large segment after the secondary merger increases unidirectionally, forward planning is required. At this time, if the initial speed Vs≤minSpeedLimit, the minimum upper limit of the speed in the micro-segment, the first micro-segment on the left is used as the starting micro-segment, and speed planning is performed from the beginning to the end; when the speed of the speed curve obtained by speed planning based on the large segment after the secondary merger decreases unidirectionally, reverse planning is required. At this time, if the initial speed Vs≤minSpeedLimit, the minimum upper limit of the speed in the micro-segment, the first micro-segment on the right is used as the starting micro-segment, and speed planning is performed from the end to the beginning; when the speed of the left part of the speed curve obtained by speed planning based on the large segment after the secondary merger decreases unidirectionally and the speed of the right part increases unidirectionally, at this time, if the initial speed Vs>minSpeedLimit, the minimum upper limit of the speed in the micro-segment, the micro-segment with the minimum upper limit of the speed is used as the starting micro-segment, and the minimum upper limit of the speed is used as the starting speed, and forward planning or reverse planning is performed on the micro-segments on both sides.
4. The method for S-type speed planning of a multi-axis machine based on secondary merging according to claim 3 is characterized in that: For forward planning, solving the acceleration includes the following steps: Step a1: Parameter initialization: Initialize the starting speed of the current micro-segment curVs = initial speed Vs, totalL = 0; The previous minimum overall acceleration minX1 = the previous minimum local acceleration minX2 = the maximum acceleration of the continuous trajectory wholeAmax; Step a2: Calculate the minimum overall acceleration minX1: Update totalL (current) = totalL (original) + the length of the current micro segment, curline.L, Update curVs = curline.end_limit × (1 + C), Overall acceleration curA = (curVe 2 -curVs 2 )÷2÷totalL, Get the minimum overall acceleration minX1=min(minX1(original),curA), Where: curline.end_limit is the speed limit at the end of the current micro-segment; C is the threshold value exceeding the limit; Step a3: Calculate the minimum local acceleration minX2: curVs(current)=min(curLine.StartVLimit, curVs(original)), Get the time t=curline.L÷curVs for the current micro segment to move at curVs. Take curVs as the initial velocity and calculate the maximum value of the final velocity maxVe. Calculate the local acceleration of the current micro segment curA1 = (maxVe-curVs) ÷ t, The minimum local acceleration before updating minX2=min(minX2(original),curA1), Update curVs = maxVe, Step a4: Determine whether the current micro-segment is the last micro-segment. If so, acceleration_rate=min(minX1, minX2). If not, point to the next micro-segment and go to step a2.
5. The method for S-type speed planning of a multi-axis machine based on secondary merging according to claim 4, characterized in that: For forward planning, solving the jerk includes the following steps: Step b1: Parameter initialization: The current total length totalL=0; Let minJ1=wholeJerkmax, Step b2: Let the current speed curV = , Let the current jerk curMinJerk = m_fJerk, Perform the following operations on all physical axes i: , , If k1 is not 0, then: , Where: curMinJerk is the jerk limit of the current micro segment, Update the current minimum value of jerk minJ1=min(curMinJerk, minJ1), Update totalL = totalL (original) + the length of the current micro segment, curline.L. curline.AxisL[i] is the length of the physical axis i of the current micro segment. curline.AxisEndVLimitByJerk[i] is the speed limit caused by the jerk at the end node of physical axis i. k1 is the ratio of the length of the physical axis i of the current micro segment, curline.AxisL[i], to the length of the current micro segment, curline.L. kV is the absolute value of the ratio of the current velocity curV to the velocity limit curline.AxisEndVLimitByJerk[i] caused by the jerk at the end node of the physical axis i. m_fJOverflowScale is the ratio of the value that the jerk can exceed the set jerk to the set jerk. m_fJerk is the set maximum jerk; Step b3: Determine whether the current micro-segment is the last micro-segment. If so, obtain the acceleration minJ1. If not, point to the next micro-segment and continue to step b2.
6. The method for S-type speed planning of a multi-axis machine based on secondary merging according to claim 3, characterized in that: For the speed planning of the micro-segments on both sides, it is known that the maximum speeds that the nodes from left to right of the large segment can reach are vNode[0], vNode[1], and vNode[2] respectively: the following steps are included: Step c1: Forward planning for a micro-segment on one side: If isCalcLeft is 1, there is a left half S-shaped speed curve, then the starting speed limit limitVs = vNode[0]; otherwise, the starting speed limit limitVs = vNode[1]; If the minimum planned starting speed minVs is greater than the starting speed limit limitVs of this section, backtracking is required: minVe=min(limitVs,maxVs), If isCalcRight is 1, and there is a right-half S-shaped velocity curve, the maximum velocity at the end, maxVe=vNode[2]; otherwise, the maximum velocity at the end, maxVe=vNode[1]; Step c2: Reverse planning for the micro-segment on one side: If isCalcRight is 1, and there is a right-half S-shaped speed curve, the starting speed limit limitVs=vNode[2]; otherwise, the starting speed limit limitVs=vNode[1]; If minVs>limitVs, it means that the minimum planned starting speed is still greater than the starting speed limit of this section, and backtracking is required: minVe=min(limitVs,maxVs); If isCalcLeft is 1 and there is a left half S-shaped velocity curve, the maximum velocity at the end, maxVe=vNode[0]; otherwise, the maximum velocity at the end, maxVe=vNode[1].
7. The method for S-type speed planning of a multi-axis machine based on secondary merging according to claim 1, characterized in that: If the following conditions are met at the same time, multiple consecutive micro-segments are divided into one large segment: tempMaxV-tempMinV≦VRange, tempMaxVByAcc-tempMinVByAcc≦AccVRange, tempMaxVByJerk-tempMinVByJerk≦JerkVRange, tempMaxA-tempMinA≦AccRange, , , , , , , , , in: tempMinV is the minimum upper limit of the temporary speed of the micro segment; temMaxV is the maximum value of the temporary speed limit of the micro-segment; MaxV is the maximum speed limit of all micro-segments; MinV is the minimum upper speed limit of all micro-segments; line1.StartVLimit is the speed limit value of the head node of the next micro-segment line1 of the current micro-segment; line1.EndVLimit is the speed limit value of the end node of the next micro-segment line1 of the current micro-segment; tempMinVByAcc is the minimum upper limit of the temporary speed of the micro-segment acceleration limit; tempMaxVByAcc is the maximum value of the temporary speed upper limit of the micro-segment acceleration limit; MinVByAcc is the minimum upper speed limit of all micro-segments; MaxVByAcc is the maximum upper limit of the acceleration limit of all micro-segments; line1.StartVLimitByAcc is the speed limit value of the acceleration limit of the head node of the next micro-segment line1 of the current micro-segment; line1.EndVLimitByAcc is the speed limit value of the acceleration limit of the end node of the next micro-segment line1 of the current micro-segment; tempMinVByJerk is the minimum upper limit of the temporary speed of the micro-segment jerk limit; tempMaxVByJerk is the maximum temporary speed limit of the micro-segment jerk limit; MinVByJerk is the minimum upper limit of the jerk limit for all micro-segments; MaxVByJerk is the maximum speed limit of the acceleration limit of all micro-segments; line1.StartVLimitByJerk is the speed limit value of the jerk limit of the head node of the next micro-segment line1 of the current micro-segment; line1.EndVLimitByJerk is the speed limit value of the acceleration limit of the end node of the next micro-segment line1 of the current micro-segment; tempMaxA is the temporary maximum acceleration value of the micro segment; tempMinA is the temporary minimum acceleration value of the micro segment; MaxA is the maximum acceleration of all micro-segments; MinA is the minimum acceleration of all micro-segments; line1.Acc is the acceleration of the next micro-segment line1 of the previous micro-segment; VRange is the range between the maximum and minimum upper limits of all micro-segment speeds; AccVRange is the range between the maximum and minimum speed limits of all micro-segment acceleration limits; JerkVRange is the range between the maximum and minimum speed limits of all micro-segment jerk limits; AccRange is the range of the difference between the maximum and minimum upper limits of acceleration of all micro-segment virtual axes.
