A method for predicting the long-range speed of a multi-axis machine based on multi-stage S-shaped rise
By dividing the trajectory into large sections of multi-level S-shaped ascent, and setting different levels of speed and acceleration, the problem of excessive acceleration changes in the existing technology is solved, and smoother and more efficient motion in multi-axis linkage control is achieved. .
Patent Information
- Application Number
- CN202410931086.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-07-12
AI Technical Summary
The existing S-type speed look-ahead method is difficult to adapt to complex motion situations in multi-axis linkage control, resulting in frequent speed oscillations, and the acceleration is proportional to the cube of the speed, causing the acceleration to change too fast and exceed the set value, affecting processing. Smoothness and efficiency.
The multi-level S-shaped ascending method is used to divide the trajectory into large segments, and set different upper speed limits, accelerations and jerks for each segment. The graded acceleration method allows the acceleration and jerk to exceed the set limit within a certain range. Fixed value for smoother motion.
It improves the motion smoothness and efficiency of multi-axis linkage control, provides an efficient and stable S-type speed forward universal solution, reduces the amount of calculation, and is suitable for multi-axis linkage processing.
Smart Images

Figure CN118466401B
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of multi-axis linkage robot control, and in particular relates to a method for long-segment speed preview of a multi-axis machine based on multi-stage S-shaped rise. 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] 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, polynomial acceleration and deceleration algorithms, etc. S-shaped acceleration and deceleration has attracted the most attention from scholars due to its practicality. The current main research hotspot of S-shaped acceleration and deceleration is its efficient and universal solution model. The ideal S-shaped acceleration and deceleration solution model should have a smaller computational complexity and a higher precision analytical solution. There is currently no perfect solution for solving the acceleration and deceleration model. In order to ensure machining stability, high-end CNC systems generally use flexible acceleration and deceleration, and S-shaped acceleration and deceleration is the most used in CNC systems due to its practicality. At present, the main problem with S-shaped acceleration and deceleration is that there is no efficient and universal solution method.
[0007] In terms of multi-axis linkage control, the most commonly used one is the five-axis linkage CNC system. It adds two rotation axes on the basis of three translation axes, making the processing of complex curved surfaces more flexible. However, the existing S-type speed forecast is mostly only for three-axis linkage processing equipment, and the acceleration, jerk and other physical quantities at a certain position are calculated based on the geometry of the spatial trajectory. An S-type speed curve calculation will be performed for one or several split micro-segments. The speed fluctuates frequently, the speed increases slowly, and it is difficult to adapt to various complex motion situations.
[0008] Secondly, for the velocity planning of a circular trajectory in space, due to the existence of curvature, there is a normal acceleration, and for a specific physical axis, there is a jerk because the direction of the normal acceleration is changing. Obviously, the faster the speed, the faster the acceleration changes, and the greater the jerk. For the micro-segment line[i], its jerk is proportional to the cube of the speed.
[0009] When the actual speed approaches the maximum speed MaxVByJerk of the jerk limit, the physical axis jerk approaches the maximum value. Since the speed is S-shaped, when it approaches MaxVByJerk, the virtual axis speed itself has a large jerk (acceleration decreases). At this time, the jerk caused by the shape of the motion trajectory of the physical axis and the jerk caused by the change in the virtual axis speed are superimposed, which may far exceed the set jerk (the maximum is twice the set jerk).
[0010] If the virtual axis jerk is set to a small value, the speed increase efficiency is low when the speed is low, and as long as the speed is close to MaxVByJerk, the sum of the jerk will always exceed the set value. Since the virtual axis inevitably has jerk, the jerk superposition of the physical axis will inevitably exceed the set value. If the speed does not reach MaxVByJerk, the jerk is guaranteed to meet the requirements, but the speed still does not reach MaxVByJerk, sacrificing the speed, which is not friendly to longer trajectories. This problem occurs not only in jerk, but also in acceleration. Summary of the invention
[0011] The object of the present invention is to provide a method for long-segment speed preview of a multi-axis machine based on multi-stage S-shaped rise, aiming to solve the above-mentioned problems.
[0012] The present invention is mainly achieved through the following technical solutions:
[0013] A method for predicting the large-segment speed of a multi-axis machine based on multi-stage S-shaped rise, which divides the trajectory into several micro-segments, and divides a plurality of continuous micro-segments into a large segment; then the speed increase of the large segment is divided into n-stage S-shaped speed increases, and the speed upper and lower limits, acceleration, and jerk of each stage are different; the method comprises the following steps:
[0014] Step A1: Initialize the upper speed limits {VRefer1, VRefer2, VRefer3, ..., VRefern}, the minimum accelerations {minA1, minA2, minA3, ..., minAn}, and the minimum jerk {minJ1, minJ2, minJ3, ..., minJn} of the large segment; wherein the minimum acceleration minAn of the large segment is equal to the minimum acceleration minA of all micro-segments of the large segment; the minimum jerk minJn of each level is equal to the maximum jerk wholeJerkmax of the entire continuous trajectory;
[0015] VRefern=min(MinVByAcc, MinVByJerk)×VreferScalen,
[0016] Among them: MinVByAcc is the minimum upper limit of the acceleration limit of all micro-segments of the large segment;
[0017] MinVByJerk is the minimum upper limit of the jerk limit for all micro-segments of the large segment;
[0018] VReferScalen is the maximum speed ratio of the nth level maximum speed to the acceleration and jerk limits;
[0019] Step A2: Calculate the current length of the large segment:
[0020] Line.L = Line.L 0+ line . l ,
[0021] in: Line.L 0 is the length of the large segment before the current micro segment;
[0022] Line.L The length of the current segment;
[0023] line . l is the length of the current micro-segment;
[0024] Step A3: Calculate the current minimum accelerations of each level {minA1, minA2, minA3, ..., minAn};
[0025] minAn=min(minAn,Acc),
[0026] Acc=wholeAxisVmax[k]×ratioA÷ratioL,
[0027] ratioA=1-ratioAn+AoverflowScale,
[0028] ratioAn=ratioVn 2 ,
[0029] ratioVn=VRefern÷VLimitByAcc,
[0030] Where: Acc is the acceleration of the virtual axis limited by the current physical axis k;
[0031] wholeAxisVmax[k] is the maximum speed of physical axis k;
[0032] ratioA is the ratio of the acceleration of the current physical axis k to the set acceleration;
[0033] ratioAn is the ratio of the acceleration of the physical axis k of the trajectory curvature uniform motion to the set acceleration when the nth level reaches the speed upper limit;
[0034] ratioVn is the ratio of the nth level speed VRefern to the upper speed limit of the acceleration limit of the current micro-segment;
[0035] ratioL is the ratio of the displacement of the physical axis k to the displacement of the virtual axis;
[0036] AOverflowScale is the ratio of the value by which the acceleration can exceed the set acceleration to the set acceleration;
[0037] VLimitByAcc is the upper speed limit of the acceleration limit of the current micro segment;
[0038] Step A4: Calculate the current minimum jerk of each level {minJ1, minJ2, minJ3, ..., minJn};
[0039] minJn=min(minJn,Jerk),
[0040] Jerk=wholeAxisJerkmax[k]×ratioJ÷ratioL,
[0041] ratioJ=1-ratioJn+JOverflowScale,
[0042] ratioJn=ratioVn 3 ,
[0043] ratioVn=VRefern÷VLimitByJerk,
[0044] Where: Jerk is the jerk of the current S-shaped velocity curve;
[0045] wholeAxisJerkmax[k] is the maximum jerk of physical axis k;
[0046] ratioJ is the ratio of the acceleration of the current physical axis k to the set acceleration;
[0047] ratioJn is the ratio of the jerk of the physical axis k of the trajectory curvature uniform motion to the set jerk when the nth level reaches the speed upper limit;
[0048] ratioVn is the ratio of the nth level speed VRefern to the upper speed limit of the jerk limit of the current micro-segment;
[0049] VLimitByJerk is the upper speed limit of the current micro segment's acceleration limit;
[0050] JOverflowScale is the ratio of the value by which the jerk can exceed the set jerk to the set jerk;
[0051] Step A5: If the current micro segment is the last micro segment of the large segment, proceed to step A6, otherwise proceed to step A2;
[0052] Step A6: Update the accelerations of each level of the large section {A1, A2, A3, ..., An} to the minimum accelerations of each level {minA1, minA2, minA3, ..., minAn} calculated in step A3; update the jerk of each level of the large section {J1, J2, J3, ..., Jn} to the minimum jerk of each level {minJ1, minJ2, minJ3, ..., minJn} calculated in step A4.
[0053] In order to better implement the present invention, further, in step A3, the formula of VLimitByAcc is as follows:
[0054] VLimitByAcc=min(AxisStartVLimitByAcc[k],AxisEndVLimitByAcc[k]),
[0055] Where: AxisStartVLimitByAcc[k] is the speed limit of the axis head node of the physical axis k caused by acceleration,
[0056] AxisEndVLimitByAcc[k] is the velocity limit of the end node of physical axis k caused by acceleration.
[0057] In order to better implement the present invention, further, in step A4, the calculation formula of VLimitByJerk is as follows:
[0058] VLimitByJerk=min(AxisStartVLimitByJerk[k],AxisEndVLimitByJerk[k]),
[0059] Where: AxisStartVLimitByJerk[k] is the speed limit of the axis head node of the physical axis k caused by the jerk.
[0060] AxisEndVLimitByJerk[k] is the velocity limit of the end node of physical axis k caused by jerk.
[0061] In order to better implement the present invention, further, for each level of the S-shaped curve, calculating the maximum speed Vemax at the end of each micro-segment includes the following steps:
[0062] Step B1: Compare the initial speed Vs with VRefern to obtain the level m of the S-shaped speed increase corresponding to the initial speed Vs, where m is less than or equal to n; and then determine the speed upper limit VReferm, acceleration Am and jerk Jm of the m-level corresponding to the initial speed Vs;
[0063] Step B2: If m is greater than 1, set Vs=VRefer(m-1), l = l -(m-1)×Lsvme; where Lsvme is the distance required to accelerate from the initial speed Vs to VReferm;
[0064] like l ≤Lsvme or Vmax≤VReferm, then calculate the speed upper limit Vsam of the mth stage:
[0065] Vsam=Vs+(Am) 2 ÷Jm,
[0066] Vm=min(Vmax,VReferm),
[0067] If the calculated Vsam is greater than Vm, proceed to step B3, otherwise proceed to step B4;
[0068] Step B3: Solve for dV:
[0069] ,
[0070] Vemax=Vs+dV;
[0071] Step B4: Calculate the distance Lsam required to accelerate from the initial speed Vs to Vsam. If the moving distance lIf it is less than Lsam, go to step B3; otherwise calculate Vemax:
[0072] ,
[0073] in: l is the movement distance;
[0074] dV is the speed at which it can rise;
[0075] Vm is the maximum speed that can actually be achieved during the movement;
[0076] Vmax is the maximum feed speed that can be achieved during the movement.
[0077] In order to better implement the present invention, further, in step B2, the calculation formula of Lsvme is as follows:
[0078] Lsvme=L1+L2,
[0079] Where: L1 is the minimum distance required for the starting speed Vs to rise to Vmax;
[0080] L2 is the minimum distance required for the terminal velocity Ve to rise to Vmax;
[0081] If L ≥ Lsvme, calculate L1 and L2 respectively:
[0082] Let dV = Vmax-Vs, if dV is less than A 2 ÷J, then the calculation formula of L1 is:
[0083] ,
[0084] Where: A is the acceleration from the initial velocity Vs to VReferm;
[0085] J is the jerk from the initial velocity Vs to VReferm;
[0086] If dV is greater than or equal to A 2 ÷J, then the calculation formula of L1 is:
[0087] ,
[0088] Let dV = max (Vmax-Ve, 0), if dV is less than A 2 ÷J, then the calculation formula of L2 is:
[0089] ,
[0090] If dV is greater than or equal to A 2 ÷J, then the calculation formula of L2 is:
[0091] ,
[0092] If L < Lsvme, calculate Vsam and Veam respectively:
[0093] ,
[0094] ,
[0095] If Vsam is less than Ve, let Lsam = L1'; otherwise, Lsam = L1' + L2';
[0096] Where: L1' is the minimum distance required for the initial velocity Vs to rise to the velocity Vsam;
[0097] L2' is the minimum distance required for the final velocity Ve to rise to the velocity Vsam;
[0098] L is the minimum distance required for the starting velocity Vs to rise to the velocity Vs + dV.
[0099] To better implement the present invention, further, the calculation formula of L is as follows:
[0100] If dV is less than A 2 ÷J, then:
[0101] ,
[0102] If dV is greater than or equal to A 2 ÷J, then:
[0103] .
[0104] To better implement the present invention, further, if the following conditions are satisfied simultaneously, then multiple consecutive micro - segments are divided into one large segment:
[0105] The difference between the maximum value tempMaxV of the temporary speed limit of the micro - segment and the minimum value tempMinV of the temporary speed limit of the micro - segment is less than or equal to the range VRang of the difference between the maximum value and the minimum value of the speed limits of all micro - segments;
[0106] The difference between the maximum value tempMaxVByAcc of the temporary speed limit restricted by the acceleration of the micro - segment and the minimum value tempMinVByAcc of the temporary speed limit restricted by the acceleration of the micro - segment is less than or equal to the range AccVRange of the difference between the maximum value and the minimum value of the speed limits restricted by the acceleration of all micro - segments;
[0107] The difference between the maximum value tempMaxVByJerk of the temporary speed upper limit of the micro-segment jerk limit and the minimum value tempMinVByJerk of the temporary speed upper limit of the micro-segment jerk limit is less than or equal to the range JerkVRange between the maximum value and the minimum value of the speed upper limit of all micro-segment jerk limits;
[0108] The difference between the temporary maximum acceleration value tempMaxA of the micro segment and the temporary minimum acceleration value tempMinA of the micro segment is less than or equal to the range AccRange between the maximum value and the minimum value of the acceleration upper limit of all micro segments virtual axes;
[0109] in:
[0110] ,
[0111] ,
[0112] ,
[0113] ,
[0114] ,
[0115] ,
[0116] ,
[0117] ,
[0118] Where: MaxV is the maximum speed limit of all micro-segments;
[0119] MinV is the minimum upper speed limit of all micro-segments;
[0120] line1.StartVLimit is the speed limit value of the head node of the next micro-segment line1 of the current micro-segment;
[0121] line1.EndVLimit is the speed limit value of the end node of the next micro-segment line1 of the current micro-segment;
[0122] MinVByAcc is the minimum upper speed limit of all micro-segments;
[0123] MaxVByAcc is the maximum upper limit of the acceleration limit of all micro-segments;
[0124] 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;
[0125] 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;
[0126] MinVByJerk is the minimum upper limit of the jerk limit for all micro-segments;
[0127] MaxVByJerk is the maximum speed limit of the acceleration limit of all micro-segments;
[0128] 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;
[0129] 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;
[0130] MaxA is the maximum acceleration of all micro-segments;
[0131] MinA is the minimum acceleration of all micro-segments;
[0132] line1.Acc is the acceleration of the next micro-segment line1 of the previous micro-segment.
[0133] The beneficial effects of the present invention are as follows:
[0134] The present invention adopts a graded S-type speed-up method, allowing physical axis acceleration and jerk to exceed the set value within a certain range or in some places. 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-type speed forward-looking general solution with good practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0135] Figure 1 is a flow chart of the present invention;
[0136] Figure 2 It is a schematic diagram of the three-stage S-shaped speed increase in Example 1;
[0137] Figure 3 It is the three-stage S-shaped speed curve in Example 2;
[0138] Figure 4 for Figure 3 A local enlarged schematic diagram of the . DETAILED DESCRIPTION
[0139] Embodiment 1:
[0140] A method for predicting the speed of a multi-axis machine in a large section based on a multi-stage S-shaped rise, wherein the speed increase of a large section is divided into a multi-stage S-shaped speed increase, and the upper and lower limits of the speed, acceleration, and jerk of each stage are different, and the S-shaped speed curve allows the acceleration and jerk to be smaller. The present invention adopts a graded speed increase method, allowing the acceleration and jerk of the physical axis to exceed the set value within a certain range or in some places.
[0141] Specifically, Figure 2 As shown, taking the three-stage graded rise as an example, different jerk and acceleration are set for different speeds. In order to reach the maximum speed (the jerk or acceleration reaches the maximum value when the virtual axis is at a constant speed), it is inevitable that the acceleration and jerk will exceed the set value when approaching this speed. We can set the maximum amount of the value, such as 10%.
[0142] like Figure 1 and Figure 2 As shown, the large section rises at a three-stage S-shaped speed, and the establishment of the acceleration and jerk of the large section includes the following steps:
[0143] 2.1 Initialize VRefer1, VRefer2, VRefer3. Initialize minA1, minA2, minA3. Initialize minJ1, minJ2, minJ3. The specific formula is as follows:
[0144] ,
[0145] ,
[0146] ,
[0147] ,
[0148] ,
[0149] Among them: MinVByAcc is the minimum upper limit of the speed limit of all micro-segment acceleration;
[0150] MinVByJerk is the minimum upper speed limit of all micro-segment acceleration limits;
[0151] MinA is the minimum acceleration of all micro-segments.
[0152] 2.2 Get the current length of the large segment:
[0153] Line.L=Line.L+line.l,
[0154] Among them: the current large segment is Line, and the current micro segment is line.
[0155] 2.3 Calculate new minA1, minA2, minA3 based on the physical axis information and acceleration of the current micro-segment.
[0156] For a specific physical axis k of the micro-segment, the ratio of the displacement of the physical axis k to the displacement of the virtual axis is:
[0157] ,
[0158] (1) Update the acceleration minA1-minA3 of the three levels by the physical axis k:
[0159] Assume that the upper speed limit of the micro-segment acceleration is:
[0160] ,
[0161] The ratio of the first-level speed VRefer1 to VLimitByAcc is:
[0162] ,
[0163] When the first level reaches the speed limit, calculate the ratio of the acceleration of the physical axis k of the uniform motion of the trajectory curvature to the set acceleration of the physical axis:
[0164] ,
[0165] When the virtual axis moves at a constant speed V, the acceleration of a specific physical axis is proportional to the square of the speed due to the curvature of the space curve.
[0166] Then the ratio of the acceleration that the physical axis can have to the set acceleration of the physical axis is:
[0167] ,
[0168] Transfer the acceleration of the physical axis k to the virtual axis. Then the acceleration of the virtual axis limited by the physical axis k is:
[0169] ,
[0170] Update the value of minA1:
[0171] .
[0172] Similarly, the ratio of the second-level speed VRefer2 to VLimitByAcc is:
[0173] ,
[0174] When the second level reaches the speed limit, the ratio of the acceleration of the physical axis k in uniform motion due to the curvature of the trajectory to the set acceleration of the physical axis is:
[0175] ,
[0176] The ratio of the acceleration that the physical axis can have to the set acceleration of the physical axis is
[0177] ,
[0178] Transfer the acceleration of the physical axis k to the virtual axis. Then the acceleration of the virtual axis limited by the physical axis k is:
[0179] ,
[0180] Update the value of minA2:
[0181] ,
[0182] Similarly, the ratio of the third-level speed VRefer3 to VLimitByAcc is:
[0183] ,
[0184] When the third level reaches the speed limit, the ratio of the acceleration of the physical axis k in uniform motion due to the curvature of the trajectory to the set acceleration of the physical axis is:
[0185] ,
[0186] Then the ratio of the acceleration that the physical axis can have to the set acceleration of the physical axis is:
[0187] ,
[0188] Transfer the acceleration of the physical axis k to the virtual axis. Then the acceleration of the virtual axis limited by the physical axis k is:
[0189] ,
[0190] Update the value of minA3:
[0191] ,
[0192] 2.4 Calculate new minJ1, minJ2, minJ3 based on the physical axis information and jerk of the current micro segment:
[0193] (1) Update the three-level acceleration minJ1, minJ2, minJ3 from the physical axis k:
[0194] Assume that the upper speed limit of the micro-segment acceleration limit is:
[0195] ,
[0196] The ratio of the first-level speed VRefer1 to VLimitByJerk is:
[0197] ,
[0198] When the first level reaches the speed limit, the ratio of the acceleration of the physical axis k in uniform motion due to the curvature of the trajectory to the set acceleration of the physical axis is:
[0199] ,
[0200] When the virtual axis moves at a constant speed of V, the acceleration of a specific physical axis is proportional to the cube of the speed due to the shape of the space curve.
[0201] Then the ratio of the jerk that the physical axis can have to the set jerk of the physical axis is:
[0202] ,
[0203] Transfer the acceleration of the physical axis k to the virtual axis. Then the acceleration of the virtual axis limited by the physical axis k is:
[0204] ,
[0205] Update the value of minJ1:
[0206] .
[0207] Similarly, the ratio of the second-level speed VRefer2 to VLimitByJerk is:
[0208] ,
[0209] When the second level reaches the speed limit, the ratio of the acceleration of the physical axis k in uniform motion due to the curvature of the trajectory to the set acceleration of the physical axis is:
[0210] ,
[0211] Then the ratio of the jerk that the physical axis can have to the set jerk of the physical axis is:
[0212] ,
[0213] Transfer the acceleration of the physical axis k to the virtual axis. Then the acceleration of the virtual axis limited by the physical axis k is:
[0214] ,
[0215] Update the value of minJ2:
[0216] .
[0217] Similarly, the ratio of the third-level speed VRefer3 to VLimitByJerk is:
[0218] .
[0219] When the third level reaches the speed limit, the ratio of the acceleration of the physical axis k in uniform motion due to the curvature of the trajectory to the set acceleration of the physical axis is:
[0220] ,
[0221] The ratio of the jerk that the physical axis can have to the set jerk of the physical axis is
[0222] ,
[0223] The acceleration of the physical axis k is transferred to the virtual axis. Then the acceleration of the virtual axis limited by the physical axis k is
[0224] ,
[0225] Update the value of minJ3:
[0226] .
[0227] 2.5 Determine whether the current micro-segment is the last micro-segment of a large segment. If yes, go to step 2.6. If no, go to step 2.7.
[0228] 2.6 Set the values of A1, A2, A3 of the large segment to minA1, minA2, minA3. Set the values of J1, J2, J3 to minJ1, minJ2, minJ3. The whole process is completed.
[0229] 2.7 The current micro-segment is set as the next micro-segment of the current micro-segment. Go to step 2.2.
[0230] At this point, all micro-segments have been divided into some large segments, and these large segments are multi-level rises. Of course, for some special curves such as long line segments, they are actually one-level rises, because their VRefer1, VRefer2, and VRefer3 are determined by the maximum speed limited by acceleration and jerk. For long line segments, VRefer1 can be infinite, which is greater than the maximum speed MaxV that can be achieved.
[0231] in:
[0232] AOverflowScale: The ratio of the value at which the acceleration can exceed the set acceleration to the set acceleration;
[0233] JOverflowScale: The ratio of the value at which the jerk can exceed the set jerk to the set jerk;
[0234] VReferScale1: The maximum speed ratio of the first level to the maximum speed limit of acceleration and jerk;
[0235] VReferScale2: The maximum speed ratio of the second level maximum speed to the acceleration and jerk limits;
[0236] VReferScale3: The maximum speed ratio of the third level to the maximum speed of the acceleration and jerk limits;
[0237] Each section has added three levels of maximum speed of physical quantity VRefer1, VRefer2, VRefer3;
[0238] The original acceleration Acc is replaced by three levels of acceleration A1, A2, A3;
[0239] The original jerk is replaced by three levels of jerk: J1, J2, and J3;
[0240] VRefer1, VRefer2, VRefer3: The upper limits of the first, second and third speeds of the large section;
[0241] minA1, minA2, minA3: minimum values of the first, second, and third level accelerations of the large segment limited by the current micro segments;
[0242] minJ1, minJ2, minJ3: minimum values of the first, second and third level jerk of the large segment limited by the current micro segments;
[0243] Embodiment 2:
[0244] This embodiment is further optimized on the basis of Embodiment 1. In the process of speed forward planning and backtracking, the most important step is how to obtain the maximum speed at the end of the micro-segment from the starting speed, micro-segment length, maximum speed, acceleration, and jerk information.
[0245] Assume that the three-level S-type speed curve has the following variables:
[0246] L: length;
[0247] StartV: initial velocity;
[0248] EndV: final velocity;
[0249] t: Micro-segment movement time;
[0250] MaxV: Maximum speed allowed for this micro-segment;
[0251] VRefer1, VRefer2, VRefer3: Maximum speeds of the three-stage S-curve;
[0252] A1, A2, A3: Maximum accelerations of the three-stage S-curve;
[0253] J1, J2, J3: Jerk of the three-stage S-curve;
[0254] Ts0, Ts1,..., Ts18: Movement times of each part;
[0255] totalTs0, totalTs1,..., totalTs17: Total movement times to each node;
[0256] Vss0, Vss1,..., Vss17: Speeds when moving to each node;
[0257] Ss0, Ss1,..., Ss17: Total movement distances when moving to each node;
[0258] Vm: Maximum speed that can actually be achieved during the movement.
[0259] 4.1 Specific calculation of obtaining the maximum end speed Vemax from the initial speed Vs, movement distance l , maximum acceleration, maximum speed, and jerk. Specifically, it includes the following steps:
[0260] (1) Determine the relationship between Vs and VRefer1, VRefer2, VRefer3.
[0261] If Vs < VRefer, go to step (2);
[0262] If Vs ≥ VRefer1 and Vs < VRefer2, go to step (3);
[0263] If Vs ≥ VRefer3, go to step (4).
[0264] (2) If Vs < VRefer1,
[0265] Let the acceleration be A1 and the jerk be J1, and calculate the distance Lsvme required to accelerate from Vs to VRefer1. If l ≤ Lsvme or Vmax ≤ VRefer1, go to step (2-1); otherwise, go to step (2-2).
[0266] (2-1) Calculate the upper limit of the speed in the first stage. Let Vsam = Vs + (A1) 2 ÷J1, Vm = min(Vmax, vRefer1)
[0267] If Vsam > Vm, it means that the maximum acceleration cannot be achieved, and go to step (2-1-1). Otherwise, go to (2-1-2).
[0268] (2-1-1) Solve the cubic equation of dV:
[0269] ,
[0270] Vemax = Vs + dV,
[0271] (2-1-2) Let the acceleration be A1 and the jerk be J1, and calculate the distance Lsam required for Vs to accelerate to Vsam. If l <Lsam, it means that the maximum acceleration cannot be achieved, and go to step (2-1-1); otherwise, it means that the maximum acceleration can be achieved, and calculate Vemax:
[0272] ,
[0273] (2-2) The second-stage speed can be achieved. At this time, let l (Current) = l (Original) - Lsvme, Vs = vRefer1. Go to step (3).
[0274] (3) Let the acceleration be A2 and the jerk be J2, and calculate the distance Lsvme required for Vs to accelerate to vRefer2 according to (4.5). If l ≤Lsvme or Vmax≤VRefer2, then go to step (3-1); otherwise, go to step (3-2).
[0275] (3-1) Calculate the upper limit of the speed Vsam in the second stage:
[0276] Vsam = Vs + (A2) 2 ÷J2,
[0277] Let Vm = min(Vmax, VRefer2),
[0278] If Vsam is greater than Vm, it means that the maximum acceleration cannot be achieved, and go to step (3-1-1); otherwise, go to step (3-1-2).
[0279] (3-1-1) Solve the cubic equation of dV:
[0280] ,
[0281] Vemax = Vs + dV,
[0282] (3 - 1 - 2) Let the acceleration be A2 and the jerk be J2, and calculate the distance Lsam required to accelerate from Vs to Vsam.
[0283] If l < Lsam, then the maximum acceleration cannot be reached, go to step (3 - 1 - 1); otherwise, the maximum acceleration can be reached, and calculate Vemax:
[0284] ,
[0285] (3 - 2) The speed can reach the third level. At this time, let l (Current) = l (Original) - Lsvme, Vs = vRefer2, go to step (4).
[0286] (4) Let the acceleration be A3 and the jerk be J3, and calculate the distance Lsvme required to accelerate from Vs to Vmax.
[0287] If l ≤ Lsvme, then go to step 4 - 1; otherwise, Vemax = Vmax.
[0288] (4 - 1) Calculate Vsam:
[0289] Vsam = Vs + (A3) 2 ÷ J3,
[0290] If Vsam > Vmax, then the maximum acceleration cannot be reached, go to step (4 - 1 - 1); otherwise, go to step (4 - 1 - 2).
[0291] (4 - 1 - 1) Solve the cubic equation of dV:
[0292] ,
[0293] Vemax = Vs + dV,
[0294] (4 - 1 - 2) Let the acceleration be A3 and the jerk be J3, and calculate the distance Lsam required to accelerate from Vs to Vsam.
[0295] If l < Lsam, it means the maximum acceleration cannot be reached, go to step (4 - 1 - 1); otherwise, the maximum acceleration can be reached, and calculate Vemax:
[0296] ,
[0297] 4.5 Based on the starting speed Vs and the rising speed dV, calculate the minimum distance L required to rise to the speed Vs+dV.
[0298] Assume acceleration is A, jerk is J, calculate the specific implementation of the minimum distance L required to rise to the speed of Vs+dV based on the starting speed Vs and the speed dV that can be risen.
[0299] if ,
[0300] if .
[0301] 4.6 Specific calculation of parameters of conventional 7-segment S-type speed curve.
[0302] The parameters of the conventional 7-segment S-shaped speed curve are calculated by using the starting speed Vs, the ending speed Ve, the acceleration A, the jerk J, and the maximum speed Vmax. Newton's method is used to solve the Ts0, ..., Ts6, totalTs0, ..., totalTs1, Vss0, ..., Vss5, Ss0, ..., Ss5, and Vm of this segment.
[0303] (1) If J ≤ 0 or Amax ≤ 0, handle the special case and go to step (2); otherwise go to step (3).
[0304] (2) T0...t6 are all assigned the value of 0, where t3 = L / Vs, totalTs0, totalTs1, totalTs2 are all assigned the value of 0, and totalTs3, ..., totalTs6 are all assigned the value of t3.
[0305] (3) Calculate the minimum distance L1 required for Vs to rise to Vmax speed according to step 4.5. Calculate the minimum distance L2 required for Ve to rise to Vmax speed according to step 4.5.
[0306] Let Lsvme=L1+L2. If L≥Lsvme, go to step (4); otherwise go to step (5).
[0307] (4) It can reach the maximum feed speed Vmax. Let dV = Vmax-Vs, if dV 2 / J, the maximum acceleration cannot be reached, and go to step (4-1); otherwise, the maximum acceleration can be reached, and go to step (4-2).
[0308] (4-1) , go to step (4-3).
[0309] (4-2) ,
[0310] ,
[0311] Go to step (4-3).
[0312] (4-3) dV = max(Vmax - Ve, 0). If dV < A 2 / J and the maximum acceleration cannot be achieved, go to step (4-4); otherwise, the maximum acceleration can be achieved, go to step (4-5).
[0313] (4-4) ,
[0314] Then, go to step (4-6).
[0315] (4-5) ,
[0316] .
[0317] Then, go to step (4-6).
[0318] (4-6) .
[0319] (5) The case where the maximum feed rate Vmax is not achieved.
[0320] In this step planning, it is assumed that Vs ≤ Ve. Let the variable isExchangeV mark whether to exchange Vs and Ve. If Vs > Ve, then exchange Vs and Ve, and set isExchangeV to 1; otherwise, set isExchangeV to 0.
[0321] Let ,
[0322] ,
[0323] If Vsam < Ve, then calculate the minimum distance L1 required for Vs to rise to the speed of Vsam in step 4.5, and set Lsam = L1. Otherwise, calculate the minimum distance L1 required for Vs to rise to the speed of Vsam and the minimum distance L2 required for Ve to rise to the speed of Vsam in step 4.5, and set Lsam = L1 + L2.
[0324] As Figure 3 and Figure 4 shown, the entire speed curve consists of three-level S-shaped speed curves, with a speed upper limit of 300 mm / s and an acceleration of 4000 mm / s 2 , and a jerk of 200000 mm / s 3 . The higher the level, the smaller the acceleration and jerk of the S-shape, and the smoother the virtual axis speed curve looks. The speeds of all physical axes including the virtual axis are also relatively smooth and compliant.
[0325] 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 method for predicting the long-range speed of a multi-axis machine based on multi-stage S-shaped rise, It is characterized in that The trajectory is divided into several micro-segments, and a plurality of continuous micro-segments are divided into a large segment; then the speed increase of the large segment is divided into n levels of S-shaped speed increase, and the speed upper and lower limits, acceleration, and jerk of each level are different; the following steps are included: Step A1: Initialize the upper speed limits {VRefer1, VRefer2, VRefer3, …, VRefern}, the minimum accelerations {minA1, minA2, minA3, …, minAn}, and the minimum jerk {minJ1, minJ2, minJ3, …, minJn} of the large segment; wherein the minimum acceleration minAn of the large segment is equal to the minimum acceleration minA of all micro-segments of the large segment; the minimum jerk minJn of each level is equal to the maximum jerk wholeJerkmax of the entire continuous trajectory; VRefern=min(MinVByAcc, MinVByJerk)×VreferScalen, Among them: MinVByAcc is the minimum upper speed limit of all micro-segments of the large segment; MinVByJerk is the minimum upper limit of the jerk limit for all micro-segments of the large segment; VReferScalen is the maximum speed ratio of the nth level maximum speed to the acceleration and jerk limits; Step A2: Calculate the current length of the large segment: Line.L = Line.L 0+ line . l , in: Line.L 0 is the length of the large segment before the current micro segment; Line.L The length of the current large segment; line . l is the length of the current micro-segment; Step A3: Calculate the current minimum acceleration of each level {minA1, minA2, minA3, …, minAn}; minAn=min(minAn,Acc), Acc=wholeAxisVmax[k]×ratioA÷ratioL, ratioA=1-ratioAn+AOverflowScale, ratioAn=ratioVn 2 , ratioVn=VRefern÷VLimitByAcc, Where: Acc is the acceleration of the virtual axis limited by the current physical axis k; wholeAxisVmax[k] is the maximum speed of physical axis k; ratioA is the ratio of the acceleration of the current physical axis k to the set acceleration; ratioAn is the ratio of the acceleration of the physical axis k of the trajectory curvature uniform motion to the set acceleration when the nth level reaches the speed upper limit; ratioVn is the ratio of the nth level speed VRefern to the upper speed limit of the acceleration limit of the current micro-segment; ratioL is the ratio of the displacement of the physical axis k to the displacement of the virtual axis; AOverflowScale is the ratio of the value by which the acceleration can exceed the set acceleration to the set acceleration; VLimitByAcc is the upper speed limit of the acceleration limit of the current micro segment; Step A4: Calculate the current minimum jerk of each level {minJ1, minJ2, minJ3, …, minJn}; minJn = min(minJn, Jerk), Jerk = wholeAxisJerkmax[k] × ratioJ ÷ ratioL, ratioJ = 1 - ratioJn + JOverflowScale, ratioJn=ratioVn 3 , ratioVn = VRefern ÷ VLimitByJerk, Where: Jerk is the jerk of the current S-shaped velocity curve; wholeAxisJerkmax[k] is the maximum jerk of physical axis k; ratioJ is the ratio of the acceleration of the current physical axis k to the set jerk; ratioJn is the ratio of the jerk of the physical axis k with uniform motion of the trajectory curvature to the set jerk when reaching the speed limit at the nth level; ratioVn is the ratio of the nth level speed VRefern to the speed limit restricted by the jerk of the current micro-segment; VLimitByJerk is the speed limit restricted by the jerk of the current micro-segment; JOverflowScale is the ratio of the value by which the jerk can exceed the set jerk to the set jerk; Step A5: If the current micro-segment is the last micro-segment of a large segment, go to Step A6, otherwise go to Step A2; Step A6: Update the accelerations {A1, A2, A3, …, An} of each level of the large segment to the minimum accelerations {minA1, minA2, minA3, …, minAn} calculated in Step A3; update the jerks {J1, J2, J3, …, Jn} of each level of the large segment to the minimum jerks {minJ1, minJ2, minJ3, …, minJn} calculated in Step A4; For each level of the S-shaped curve, calculating the maximum speed Vemax at the end of each micro-segment includes the following steps: Step B1: Compare the initial speed Vs with VRefern to obtain the level m of the S-shaped speed increase corresponding to the initial speed Vs, and m is less than or equal to n; further determine the speed limit VReferm, acceleration Am, and jerk Jm of the mth level corresponding to the initial speed Vs; Step B2: If m is greater than 1, set Vs=VRefer(m-1), l = l -(m-1)×Lsvme; where Lsvme is the distance required to accelerate from the initial speed Vs to VReferm; like l ≤Lsvme or Vmax≤VReferm, then calculate the speed upper limit Vsam of the mth stage: Vsam=Vs+(Am) 2 ÷Jm, Vm = min(Vmax, VReferm), Where: Vm is the maximum speed that can actually be reached during the movement; Vmax is the maximum feed speed that can be reached during the movement; If the calculated Vsam is greater than Vm, go to Step B3, otherwise go to Step B4; Step B3: Solve for dV: , Vemax = Vs + dV; Where: dV is the speed that can increase; Step B4: Calculate the distance Lsam required to accelerate from the initial speed Vs to Vsam. If the moving distance l If it is less than Lsam, go to step B3; otherwise calculate Vemax: , in: l is the movement distance; In the said Step B2, the calculation formula of Lsvme is as follows: Lsvme = L1 + L2, Where: L1 is the minimum distance required for the starting speed Vs to increase to Vmax; L2 is the minimum distance required for the end speed Ve to increase to Vmax; If L ≥ Lsvme, calculate L1 and L2 respectively: Let dV = Vmax-Vs, if dV is less than A 2 ÷J, then the calculation formula of L1 is: , Where: A is the acceleration for accelerating the initial speed Vs to VReferm; J is the jerk for accelerating the initial speed Vs to VReferm; If dV is greater than or equal to A 2 ÷J, then the calculation formula of L1 is: , Let dV = max (Vmax-Ve, 0), if dV is less than A 2 ÷J, then the calculation formula of L2 is: , If dV is greater than or equal to A 2 ÷J, then the calculation formula of L2 is: , If L < Lsvme, calculate Vsam and Veam respectively: , , If Vsam is less than Ve, then Lsam=L1'; otherwise, Lsam=L1'+L2'; Where: L1' is the minimum distance required for the initial speed Vs to rise to the speed Vsam; L2' is the minimum distance required for the terminal speed Ve to rise to the speed Vsam; L is the minimum distance required to rise from the initial speed Vs to the speed Vs+dV; The calculation formula of L is as follows: If dV is less than A 2 ÷J, then: , If dV is greater than or equal to A 2 ÷J, then: 。 2. A method for predicting the long-range speed of a multi-axis machine based on multi-stage S-shaped rise according to claim 1, It is characterized in that In step A3, the formula of VLimitByAcc is as follows: VLimitByAcc=min(AxisStartVLimitByAcc[k],AxisEndVLimitByAcc[k]), Where: AxisStartVLimitByAcc[k] is the speed limit of the axis head node of the physical axis k caused by acceleration, AxisEndVLimitByAcc[k] is the velocity limit of the end node of physical axis k caused by acceleration.
3. A method for predicting the long-range speed of a multi-axis machine based on multi-stage S-shaped rise according to claim 1, It is characterized in that In step A4, the calculation formula of VLimitByJerk is as follows: VLimitByJerk=min(AxisStartVLimitByJerk[k],AxisEndVLimitByJerk[k]), Where: AxisStartVLimitByJerk[k] is the speed limit of the axis head node of the physical axis k caused by the jerk. AxisEndVLimitByJerk[k] is the velocity limit of the end node of physical axis k caused by jerk.
4. A method for predicting the long-range speed of a multi-axis machine based on multi-stage S-shaped rise according to claim 1, It is characterized in that If the following conditions are met at the same time, multiple consecutive micro-segments are divided into one large segment: The difference between the maximum value tempMaxV of the temporary speed upper limit of the micro segment and the minimum value tempMinV of the temporary speed upper limit of the micro segment is less than or equal to the range VRang between the maximum value and the minimum value of the speed upper limit of all micro segments; The difference between the maximum value tempMaxVByAcc of the temporary speed upper limit of the acceleration limit of the micro-segment and the minimum value tempMinVByAcc of the temporary speed upper limit of the acceleration limit of the micro-segment is less than or equal to the range AccVRange between the maximum value and the minimum value of the speed upper limit of all micro-segment acceleration limits; The difference between the maximum value tempMaxVByJerk of the temporary speed upper limit of the micro-segment jerk limit and the minimum value tempMinVByJerk of the temporary speed upper limit of the micro-segment jerk limit is less than or equal to the range JerkVRange between the maximum value and the minimum value of the speed upper limit of all micro-segment jerk limits; The difference between the temporary maximum acceleration value tempMaxA of the micro segment and the temporary minimum acceleration value tempMinA of the micro segment is less than or equal to the range AccRange between the maximum value and the minimum value of the acceleration upper limit of all micro segments virtual axes; in: , , , , , , , , Where: 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; 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; 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; 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.
