Speed planning method and device, storage medium and computer program
By obtaining the displacement difference value of the previous motion cycle in the CNC system and using dichotomy approximation to calculate the planned end velocity and acceleration, the problem of unsmoothing of the actual velocity curve caused by the velocity planning algorithm in the prior art is solved, and a smoother Movement curve and higher quality of processed products.
Patent Information
- Application Number
- CN202411484426.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-10-23
AI Technical Summary
In existing CNC systems, the speed planning algorithm causes the actual speed curve of the system to be not smooth enough, which easily causes vibration of the machine tool and affects the quality of the processed products.
By obtaining the actual displacement and planned displacement of the previous motion cycle, we can determine whether the end point parameters of the previous cycle need to be used. If it is not equal, use dichotomous approximation to find the planned end velocity and acceleration as the starting velocity and acceleration of the current cycle.
Make the actual motion curve of the system smoother, avoid machine tool vibration, and ensure the quality of the processed product.
Smart Images

Figure CN119472494A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of speed planning, and in particular to a speed planning method, device, storage medium and computer program. Background Art
[0002] In CNC systems, speed planning is an essential function of system motion. Common speed planning algorithms include trigonometric functions, polynomials, T-type, S-type, etc. In the speed planning algorithm, the system will calculate the displacement of the system in each cycle of motion based on the starting and ending conditions of each path.
[0003] Since the CNC system uses different speed planning algorithms, the speed of the system can only be represented by the displacement change of each cycle, and the speed change of each cycle represents the acceleration of the system. The displacement of the speed planning algorithm is obtained by integrating the speed-time curve, the speed is obtained by integrating the acceleration-time curve, and the acceleration is obtained by integrating the jerk-time curve. The displacement of each cycle is the integral value of the speed and time of the cycle on the speed-time curve. The speed on the speed curve is called the instantaneous speed, and the acceleration on the acceleration curve is called the instantaneous acceleration. The speed of the system is the displacement change, called the discrete speed, and the acceleration of the system is the system speed change, called the discrete acceleration.
[0004] Normally, the starting speed and acceleration of the speed planning algorithm are the speed and acceleration of the system. If the system uses the speed planning algorithm to plan a new motion time in each cycle, and maintains the original speed curve model for multiple consecutive cycles, since the system's motion will not use the value on the speed and time curve, the system's motion is only related to the displacement change, and the size of the displacement change represents the size of the system's speed. Therefore, the size of the displacement change at time T is not equal to the speed value at time T on the speed and time curve, and the displacement of the T+1 cycle is calculated by the speed value at time T on the speed and time curve. If the displacement is directly integrated using the system's speed, then the displacement change at time T+1 will no longer be the original value on the speed and time curve. Therefore, directly using the system's parameters will result in a large error, resulting in the system's actual speed curve not being smooth enough, which can easily cause the machine tool to vibrate, and is not conducive to ensuring the quality of processed products. Summary of the invention
[0005] In view of the above-mentioned deficiencies in the prior art, the present application provides a speed planning method, device, storage medium and computer program, which can use a more appropriate starting speed and starting acceleration for speed planning, so that the actual speed curve of the system is smoother.
[0006] This embodiment adopts the following technical solutions:
[0007] A speed planning method comprises the steps of:
[0008] Obtain the actual displacement and planned displacement of the system in the previous motion cycle, and determine whether the actual displacement of the system is equal to the planned displacement;
[0009] If they are equal, the actual terminal velocity and actual terminal acceleration of the previous motion cycle are used as the starting velocity and starting acceleration of the current motion cycle;
[0010] If they are not equal, determine whether the difference between the actual displacement and the planned displacement of the system in the previous motion cycle exceeds the preset difference;
[0011] If it does not exceed the preset difference, the speed planning model of the previous motion cycle is used in combination with the bisection approximation to calculate the planned endpoint speed and planned endpoint acceleration of the previous motion cycle, and these are used as the starting speed and acceleration of the current cycle.
[0012] Furthermore, in the speed planning method, the step of using the speed planning model of the previous motion cycle and combining the bisection approximation to calculate the planned endpoint speed and planned endpoint acceleration of the previous motion cycle, and using them as the starting speed and acceleration of the current cycle includes:
[0013] When the difference between the actual displacement and the planned displacement of the system in the previous motion cycle is greater than 0, the speed is taken as The acceleration is a0+j as the starting point, t is 1, and the final velocity on the velocity curve that satisfies the displacement of Δ is calculated by combining the dichotomy of t, and the final acceleration that satisfies the displacement of Δ is calculated by t;
[0014] Among them, v0 is the starting velocity of the previous motion cycle, a0 is the starting acceleration of the previous motion cycle, and the value of j is ±j max or 0,j max is the maximum jerk of the system and t is the cycle time.
[0015] Furthermore, in the speed planning method, the step of using the speed planning model of the previous motion cycle and combining the bisection approximation to calculate the planned endpoint speed and planned endpoint acceleration of the previous motion cycle, and using them as the starting speed and acceleration of the current cycle includes:
[0016] When the difference between the actual displacement and the planned displacement of the system in the previous motion cycle is less than 0, the velocity curve model of the previous motion cycle takes the velocity v0 and acceleration a0 as the starting point, takes t as 1, and combines the dichotomy of t to calculate the displacement on the velocity curve that satisfies The final velocity is calculated by t to satisfy the displacement. Final acceleration:
[0017] Among them, v0 is the starting velocity of the previous motion cycle, a0 is the starting acceleration of the previous motion cycle, and the value of j is ±j max or 0,j max is the maximum jerk of the system and t is the cycle time.
[0018] Furthermore, the speed planning method further includes the steps of:
[0019] If the difference exceeds the preset value, it is assumed that the acceleration of the current motion cycle continues to increase in the direction of the system acceleration, so as to calculate the starting speed and starting acceleration of the current motion cycle, and judge whether the assumption is met based on the final speed of the current motion cycle. If so, the calculated starting speed and starting acceleration of the current motion cycle are applied.
[0020] Furthermore, the speed planning method further includes the steps of:
[0021] If it is not satisfied, the new starting speed and starting acceleration of the current motion cycle are derived based on the reverse motion of the acceleration.
[0022] Furthermore, in the speed planning method, the step of assuming that the acceleration of the current motion cycle continues to increase along the direction of the system acceleration to calculate the starting speed and starting acceleration of the current motion cycle includes:
[0023] Assume that x represents the variable to be added when the system's current motion cycle speed is converted into the starting speed, and y represents the variable to be added when the system's current motion cycle acceleration is converted into the starting acceleration.
[0024]
[0025] a 系 =-a max In the above cases, the value of y is set and the value of x is calculated to obtain the starting speed and starting acceleration of the current cycle.
[0026] Furthermore, in the speed planning method, if the condition is not satisfied, the step of deriving a new starting speed and starting acceleration of the current motion cycle based on the reverse motion of acceleration comprises:
[0027] If the assumption based on the final velocity of the current motion cycle is not satisfied, the value of y is reset based on the reverse motion of the acceleration, and the value of x is calculated to obtain the starting velocity and starting acceleration of the current cycle.
[0028] A speed planning device comprises a processor and a memory; the memory is used to store a computer program, the computer program comprises program instructions; the processor is used to call the computer program to implement the above speed planning method.
[0029] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the speed planning method are implemented.
[0030] A computer program product stores computer instructions, which implement the steps of the above speed planning method when executed by a processor.
[0031] Compared with the prior art, the speed planning method, device, storage medium and computer program provided by the present application can combine the starting parameter conditions of each cycle and the displacement planned in the previous cycle to determine whether the current cycle needs to use the end point parameters of the speed planning of the previous motion cycle. If the actual displacement of the system is equal to the displacement of the speed planning, the end point parameters of the previous cycle can be directly used; if the actual displacement of the system is not equal to the displacement of the speed planning, then when the difference between the actual displacement and the planned displacement of the system in the previous motion cycle does not exceed the preset difference, the speed planning model of the previous motion cycle is used and combined with the dichotomy approximation to find the planned end point speed and planned end point acceleration of the previous motion cycle, and as the starting speed and acceleration of the current cycle, the actual motion curve of the system can be smoother, vibration of the machine tool can be avoided, and the quality of the processed products can be guaranteed. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A flow chart of the speed planning method provided for this application.
[0033] Figure 2 This is the system speed curve obtained by directly using system parameter planning.
[0034] Figure 3 This is the system acceleration curve obtained by directly using system parameter planning.
[0035] Figure 4 This is the system acceleration curve obtained by directly using system parameter planning.
[0036] Figure 5 This is a system speed curve diagram obtained after adopting the speed planning method provided by this application.
[0037] Figure 6 This is a system acceleration curve diagram obtained after adopting the speed planning method provided by this application.
[0038] Figure 7This is a system acceleration curve diagram obtained after adopting the speed planning method provided by this application.
[0039] Figure 8 This is a structural block diagram of the speed planning device provided in this application. DETAILED DESCRIPTION
[0040] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present application more clearly understood, the present application is further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0041] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0042] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0043] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0044] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0045] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0046] The present application provides a speed planning method, which is applied to a numerical control system, and includes an acceleration phase, a uniform acceleration phase, a deceleration phase, a uniform speed phase, an acceleration / deceleration phase, a uniform deceleration phase, and a deceleration / deceleration phase.
[0047] To plan a path through the speed planning method, we need the speed and acceleration of the starting point. According to the length of the path and the final speed and acceleration at the end of the path, the displacement and time curve, the speed and time curve, the acceleration and time curve, and the jerk and time curve are planned on the entire path. The relationship between these four curve models is a layer-by-layer integration relationship. The acceleration and time curve is obtained by integrating the jerk and time curve, the speed and time curve is obtained by integrating the acceleration and time curve, and the displacement and time curve is obtained by integrating the speed and time curve.
[0048] See also Figure 1 The speed planning method provided in this application includes the following steps:
[0049] S10, obtaining the actual displacement and planned displacement of the system in the previous motion cycle, and determining whether the actual displacement of the system is equal to the planned displacement;
[0050] S20, if they are equal, the actual terminal velocity and actual terminal acceleration of the previous motion cycle are used as the starting velocity and starting acceleration of the current motion cycle;
[0051] S30, if they are not equal, determining whether the difference between the actual displacement and the planned displacement of the system in the previous motion cycle exceeds a preset difference;
[0052] S40: If the difference does not exceed the preset value, the speed planning model of the previous motion cycle is used in combination with the bisection approximation to calculate the planned endpoint speed and planned endpoint acceleration of the previous motion cycle, and these are used as the starting speed and acceleration of the current cycle.
[0053] In the process of speed planning of each motion cycle of the system, the application combines the starting parameter conditions of each cycle and the displacement planned in the previous cycle, and determines whether the current cycle uses the end point parameters of the speed planning of the previous motion cycle. If the displacement of the actual motion of the system is equal to the displacement of the speed planning, the end point parameters of the previous cycle can be directly used; if the displacement of the actual motion of the system is not equal to the displacement of the speed planning, then when the difference between the actual displacement of the system and the planned displacement in the previous motion cycle does not exceed the preset difference, the speed planning model of the previous motion cycle is used and combined with the dichotomy approximation to find the planned end point speed and planned end point acceleration of the previous motion cycle, and as the starting speed and acceleration of the current cycle, the actual motion curve of the system can be smoother, vibration of the machine tool can be avoided, and the quality of the processed products can be guaranteed.
[0054] In specific implementation, the system can send instructions to the servo system. The servo system needs one cycle to control the system movement, and the actual displacement of the system can be fed back in the current cycle. That is, the actual displacement of the system is the difference between the motor feedback coordinates read in the current cycle and the motor feedback coordinates read in the previous movement cycle.
[0055] Similarly, the actual movement speed of the system is also calculated based on the motor feedback coordinates of the current cycle, and the acceleration of the system is the difference between the actual movement speed of the system in the current cycle and the actual movement speed of the previous cycle.
[0056] In step S20, during speed planning, the initial parameter conditions of the planning include displacement S 总 , starting speed v0, starting acceleration a0, maximum speed v max , maximum acceleration a max , maximum jerk j max The speed planning formula is as follows:
[0057] a=a0+jt
[0058]
[0059] The value of j is ±j max Or 0, t is the cycle time.
[0060] According to the speed planning formula, when t=1, the planned displacement of each cycle is The final speed is The final acceleration is a0+j. If the actual displacement of the system is the same as the planned displacement, the speed of the system is
[0061] Assuming the coordinates of the system end points remain unchanged, the total displacement is S 总 , the current cycle is the first cycle as an example: the total movement time is T 总 , the displacement of the current periodic motion is The total displacement to be planned for the next cycle is Each cycle s is obtained by integrating the vt curve from t to t+1. Therefore, the starting speed of the next cycle is the final speed of the current cycle. The initial acceleration is a0+j. Since the velocity of the system is and speed planning final speed Not equal, so use Planning may take too long, resulting in low efficiency, or the speed may decrease too slowly, resulting in movement beyond the end point. Therefore, it is the best choice to select the end speed and end acceleration of the current cycle as the starting parameters of the next cycle.
[0062] In step S30, it can be understood that in the case of cycle time t=1, that is, within one cycle, the acceleration of the system should be But when there is a deviation, the acceleration is The difference between the two accelerations is Δ, and the displacement of the theoretical motion at the last motion cycle t = 1 is Actually For the speed and acceleration of the system, the difference between the actual motion displacement and the planned displacement is the same as the difference in system acceleration, so the preset difference Δ can be set to j max .
[0063] In step S40, when the preset difference Δ does not exceed j max In the case of the system, the actual movement distance of the system is not much different from the theoretical distance. The change in acceleration per cycle of the speed planning does not exceed one j max , the speed of the system is Assume that the speed of the system in the previous motion cycle is v 系 , the acceleration is a 系 , then the acceleration of the system in the current cycle is The jerk is The system acceleration increases by Δ to the theoretical value. The starting speed of the current cycle is The initial acceleration is a0+j. The displacement planned makes the system's acceleration no more than jma. x , so the system motion does not deviate from the speed curve model planned in the previous motion cycle.
[0064] Furthermore, different speed planning may be performed according to whether the preset difference Δ is greater than 0. In some embodiments, step S40 specifically includes:
[0065] S41, when the difference between the actual displacement and the planned displacement of the system in the previous motion cycle is greater than 0, the speed is taken as The acceleration is a0+j as the starting point, t is 1, and the final velocity on the velocity curve that satisfies the displacement of Δ is calculated by combining the dichotomy of t, and the final acceleration that satisfies the displacement of Δ is calculated by t;
[0066] Among them, v0 is the starting velocity of the previous motion cycle, a0 is the starting acceleration of the previous motion cycle, and the value of j is ±j max or 0,j max is the maximum jerk of the system and t is the cycle time.
[0067] When Δ is greater than 0 but does not exceed j maxThe acceleration of the speed planning cannot exceed j in the unit period. max , here we can assume that Δ does not exceed j max In the case of , the entire motion is still based on the planning model of the previous motion cycle. In the previous motion cycle t = 1, the theoretical displacement of the motion is Actually The equivalent value of t is between t=1 and t=2. When t=1, the speed value of the speed curve model is The acceleration value of the acceleration curve model is a0+j.
[0068] The dichotomy process is:
[0069] (1) First, the starting speed is The starting acceleration is a0+j, and in the last week's motion planning model, the value of t is divided into three types: t1=0, t3=1.
[0070] (2) Calculate whether the displacements s1, s2, and s3 of the movement at the three values of t satisfy Δ, because when t1=0, s1=0, so s1<Δ.
[0071] (3) If s2>Δ, it means that the value of t is between [t1, t2]. Let t3=t2. Proceed to step (2).
[0072] (4) If s2 < Δ, it means that the value of t is between [t2, t3]. Let t1 = t2. Go to step (2). According to the above steps, the value of t is calculated to satisfy s=Δ, and the speed value and acceleration value at the current time t are calculated as the starting speed and starting acceleration of the current cycle speed planning.
[0073] Step S40 may further include:
[0074] S42. When the difference between the actual displacement and the planned displacement of the system in the previous motion cycle is less than 0, the velocity curve model of the previous motion cycle is used with velocity v0 and acceleration a0 as the starting point, t as 1, and the displacement on the velocity curve is calculated by combining the dichotomy of t. The final velocity is calculated by t to satisfy the displacement. Final acceleration;
[0075] Among them, v0 is the starting velocity of the previous motion cycle, a0 is the starting acceleration of the previous motion cycle, and the value of j is ±j max or 0,j max is the maximum jerk of the system and t is the cycle time.
[0076] When Δ is less than 0 but greater than jmax , the acceleration of the seven-stage speed planning cannot be less than -j in unit cycle max , here it can be assumed that Δ is not less than -j max In the case of , the entire motion is still based on the planning model of the previous motion cycle. In the previous motion cycle t = 1, the theoretical displacement of the motion is Actually -j max ≤Δ<0 is equivalent to the value of t being between t = 0 and t = 1. The starting velocity value of the velocity curve model is v0, and the acceleration value of the acceleration curve model is a0.
[0077] The dichotomy process is:
[0078] (1) First, the starting speed is v0, the starting acceleration is a0, and in the last week's motion planning model, the value of t is divided into three types: t1 = 0, t3=1.
[0079] (2) Calculate whether the displacements s1, s2, and s3 of the movement at the three values of t satisfy Δ, because when t1=0, s1=0, so s1<Δ.
[0080] (3) If s2>Δ, it means that the value of t is between [t1, t2]. Let t3=t2. Proceed to step (2).
[0081] (4) If s2 < Δ, it means that the value of t is between [t2, t3]. Let t1 = t2. Go to step (2). According to the above steps, the value of t is calculated to satisfy s=Δ, and the speed value and acceleration value at the current time t are calculated as the starting speed and starting acceleration of the current cycle speed planning.
[0082] In addition, when the difference between the actual displacement and the planned displacement of the system in the previous motion cycle exceeds a preset difference, the speed planning method provided by the present application may include the following steps:
[0083] S50. If the difference exceeds the preset value, assume that the acceleration of the current motion cycle continues to increase in the direction of the system acceleration, calculate the starting speed and starting acceleration of the current motion cycle, and determine whether the assumption is met based on the final speed of the current motion cycle. If so, apply the calculated starting speed and starting acceleration of the current motion cycle.
[0084] In some embodiments, step S50 specifically includes:
[0085] Assume that x represents the variable to be added when the system's current motion cycle speed is converted into the starting speed, and y represents the variable to be added when the system's current motion cycle acceleration is converted into the starting acceleration.
[0086] a 系 =-a max In the above cases, the value of y is set and the value of x is calculated to obtain the starting speed and starting acceleration of the current cycle.
[0087] Furthermore, when the final speed of the current motion cycle does not satisfy the assumption, the speed planning method provided by the present application may include the following steps:
[0088] S60: If not, taking the acceleration reverse motion as a condition, derive the new starting speed and starting acceleration of the current motion cycle.
[0089] In some embodiments, step S60 specifically includes:
[0090] If the assumption based on the final velocity of the current motion cycle is not satisfied, the value of y is reset based on the reverse motion of the acceleration, and the value of x is calculated to obtain the starting velocity and starting acceleration of the current cycle.
[0091] The detailed analysis of step S50 and step S60 is as follows:
[0092] The difference between the actual value and the theoretical value exceeds j max , it means that the actual motion of the system deviates from the speed curve model planned in the previous motion cycle. Assume is the displacement planned for the current cycle, v 当 is the speed of the system in the current cycle, a 当 is the acceleration of the system in the current cycle, j 当 is the jerk of the system in the current cycle, we can get:
[0093]
[0094]
[0095]
[0096] Among them, x represents the variable to be added when converting the system velocity into the starting velocity, and y represents the variable to be added when converting the system acceleration into the starting acceleration.
[0097] With a 当 No more than a max and not less than -a max ,so At the same time, 当 No more than j max The sum is not less than -j max ,so Combining these two formulas we get:
[0098] If v 系 =0,a 系 =0, then x=0, y=0. In the acceleration phase, is in v 系 =0 and a 系 =0 to the minimum value is The maximum value in uniformly accelerated motion is a max , so it can be obtained that in the acceleration stage From these two formulas, we can deduce
[0099] In the uniform acceleration phase, a 系 =a max , y=0, is the maximum value that x can take during the acceleration phase, so the range of y is
[0100] Similarly, during the deceleration phase, The maximum value is The minimum value is -a max , so it can be obtained that in the deceleration stage From these two formulas, we can deduce
[0101] In the uniform deceleration stage, a 系 =-a max , y=0, is the minimum value that x can reach during the deceleration phase, so the range of y is
[0102] In summary, When j = j max , When j=-j max , So the value of y is The displacement, final velocity and final acceleration of each cycle are as follows:
[0103] a=a 系 +y+j
[0104]
[0105]
[0106] And -a max ≤a≤a max, -v max ≤v≤v max .
[0107] 1. When
[0108] make From this we can get Starting speed Initial acceleration
[0109] (1) If the final velocity v of the current cycle satisfies There is acceleration motion or uniform motion in the current cycle, so the starting speed Initial acceleration
[0110] (2) If the final velocity v of the current cycle satisfies The converted starting speed and starting acceleration perform deceleration and acceleration and deceleration in the current cycle.
[0111] From this we can get
[0112] when if Starting speed Initial acceleration
[0113] if Starting speed Initial acceleration
[0114] when if Initial velocity v0 = 0, initial acceleration
[0115] if Starting speed Initial acceleration
[0116] 2. When
[0117] make From this we can get The starting speed is The initial acceleration is
[0118] (1) If the final velocity v of the current cycle satisfies There is acceleration motion in the current cycle, so the starting speed Initial acceleration
[0119] (2) If the final velocity v of the current cycle satisfies After the conversion, the starting speed and starting acceleration do not have jerk motion in the current cycle. From this we can get Starting speed Initial acceleration
[0120] 3. When
[0121] If a max -a 系 ≤j max , indicating that the system acceleration and maximum velocity do not exceed j max , y = a max -a 系 ,so From this we can get Starting speed Initial acceleration a0 = a max .
[0122] (1) The final velocity v of the current cycle satisfies There is uniform acceleration motion in the current cycle, so the starting speed Initial acceleration a0 = a max .
[0123] (2) The final velocity v of the current cycle satisfies The converted starting speed and starting acceleration only perform deceleration motion in the current cycle. From this we can get Initial acceleration If a max -a 系 >j max , indicating that the system acceleration exceeds j max , y = a max -a 系 -j max ,so From this we can get Starting speed Initial acceleration a0 = a max -j max .
[0124] (3) If the final velocity v of the current cycle satisfies There is acceleration motion in the current cycle, so the starting speed Initial acceleration a0 = a max -j max .
[0125] (4) If the final velocity v of the current cycle satisfies The converted initial velocity and initial acceleration only perform deceleration in the current cycle. From this we can get Starting speed Initial acceleration
[0126] 4. When a 系 =a max .
[0127] Let y = 0, From this we can get The starting speed is The initial acceleration is a0 = a 系 .
[0128] (1) If the final velocity v of the current cycle satisfies There is uniform acceleration in the current cycle, so the starting speed is The initial acceleration is a0 = a 系 .
[0129] (2) If the final velocity v of the current cycle satisfies The converted starting speed and starting acceleration have deceleration motion in the current cycle. From this we can get The starting speed is The initial acceleration is a0 = a 系 .
[0130] 5. When
[0131] make From this we can get Starting speed Initial acceleration
[0132] (1) If the final velocity v of the current cycle satisfies There is acceleration and deceleration in the current cycle, so the starting speed Initial acceleration
[0133] (2) If the final velocity v of the current cycle satisfies The converted initial velocity and initial acceleration only move with increasing acceleration in the current cycle. From this we can get Starting speed Initial acceleration
[0134] 6. When
[0135] make From this we can get Starting speed Initial acceleration
[0136] (1) If the final velocity v of the current cycle satisfies There is acceleration and deceleration in the current cycle, so the starting speed Initial acceleration
[0137] (2) If the final velocity v of the current cycle satisfies The converted starting speed and starting acceleration do not have acceleration and deceleration motion in the current cycle. From this we can get Starting speed Initial acceleration
[0138] 7. When
[0139] If a max +a 系 ≤j max , indicating that the system acceleration and maximum velocity do not exceed j max , y=-(a max +a 系 ),so From this we can get Starting speed Initial acceleration a0 = -a max .
[0140] (1) The final velocity v of the current cycle satisfies There is a uniform deceleration motion in the current cycle, so the starting speed Initial acceleration a0 = -a max .
[0141] (2) The final velocity v of the current cycle satisfies The converted starting speed and starting acceleration only perform deceleration motion in the current cycle. From this we can get Initial acceleration If a max +a 系 >j max , indicating that the system acceleration exceeds j max , y=-(a max +a 系 -jmax), so From this we can get Starting speed Initial acceleration a0 = -a max +j max .
[0142] (3) The final velocity v of the current cycle satisfies There is acceleration and deceleration in the current cycle, so the starting speed Initial acceleration a0 = -a max +j max .
[0143] (4) The final velocity v of the current cycle satisfies The converted starting speed and starting acceleration only perform deceleration in the current cycle. From this we can get Starting speed Initial acceleration
[0144] 8. When a 系 =-a max .
[0145] Let y = 0, From this we can get Starting speed Initial acceleration a0 = -a max .
[0146] (1) If the final velocity v of the current cycle satisfies There is uniform deceleration in the current cycle, so the starting speed Initial acceleration a0 = -a max .
[0147] (2) If the final velocity v of the current cycle satisfies The converted starting speed and starting acceleration perform deceleration motion in the current cycle, setting y = 0, From this we can get The starting speed is The initial acceleration is a0 = a 系 .
[0148] In order to better understand the solution of the present application, the displacement S 总 =10000, initial velocity v0=0, initial acceleration a0=0, final velocity v 终 =0, maximum speed v max =50, maximum acceleration a max =2.5, maximum jerk j max = 0.02, and the actual displacement is different from the planned displacement during the movement, see Figure 2-Figure 4 , which is the system motion curve obtained by directly using system parameters for planning. It can be seen from the figure that if the time used for speed planning using system parameters directly is too long, and the speed still exists when moving to the end point, overshoot will definitely occur in this case. Figure 5-Figure 7 , which is a diagram of the system motion curve obtained after adopting the speed planning method provided in this application. It can be seen that the system motion curve obtained after adopting the speed planning method provided in this application conforms to the seven-segment speed planning model. The motion curve is smoother, which can avoid vibration of the machine tool during the processing and ensure the quality of the processed products.
[0149] This application also provides a speed planning device, see Figure 8 The speed planning device includes at least one processor A1, a communication bus A2, a memory A3 and at least one communication interface A4.
[0150] The processor A1 may be a general-purpose central processing unit (CPU), a network processor (NP), a microprocessor, or may be one or more integrated circuits for implementing the solution of the present application, such as an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
[0151] The communication bus A2 is used to transmit information between the above components. The communication bus A2 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0152] The memory A3 may be a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable read-only memory (EEPROM), an optical disc (including a compact disc read-only memory (CD-ROM), a compressed optical disc, a laser disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory A3 may exist independently and be connected to the processor A1 via the communication bus A2. The memory A3 may also be integrated with the processor A1.
[0153] The communication interface A4 uses any transceiver-like device for communicating with other devices or communication networks. The communication interface A4 includes a wired communication interface and may also include a wireless communication interface. The wired communication interface may be, for example, an Ethernet interface. The Ethernet interface may be an optical interface, an electrical interface, or a combination thereof. The wireless communication interface may be a wireless local area network (WLAN) interface, a cellular network communication interface, or a combination thereof.
[0154] In a specific implementation, the processor A1 may include one or more CPUs.
[0155] In specific implementation, the speed planning device may include multiple processors. Each of these processors may be a single-core processor or a multi-core processor. The processor here may refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0156] In specific implementation, as an embodiment, the speed planning device may also include an output device A5 and an input device A6. The output device A5 communicates with the processor A1 to present various calculation result data or information in the form of numbers, characters, images, sounds, etc. For example, the output device A5 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device or a projector, etc. The input device A6 communicates with the processor A1 and may receive user input in a variety of ways. For example, the input device A6 may be a mouse, a keyboard, a touch screen device or other sensor device, etc.
[0157] In some embodiments, the memory A3 is used to store the program code A7 for executing the solution of the present application, and the processor A1 can execute the program code A7 stored in the memory A3. The program code A7 may include one or more software modules, and the speed planning device can implement the S-type seven-segment speed planning method provided in the above embodiment through the processor A1 and the program code A7 in the memory A3.
[0158] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a digital versatile disc (DVD)), or a semiconductor medium (e.g., a solid state disk (SSD)). It is worth noting that the computer-readable storage medium mentioned in the embodiment of the present application may be a non-volatile storage medium, in other words, a non-transient storage medium.
[0159] The present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the steps of the above-mentioned speed planning method.
[0160] The present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the above speed planning method. In other words, a computer program is provided, which, when executed on a computer, enables the computer to execute the steps of the above speed planning method.
[0161] It is understandable that those skilled in the art can make equivalent substitutions or changes based on the technical solution and application concept of the present application, and all these changes or substitutions should fall within the protection scope of the claims attached to the present application.
Claims
1. A speed planning method, characterized in that: Includes steps: Obtain the actual displacement and planned displacement of the system in the previous motion cycle, and determine whether the actual displacement of the system is equal to the planned displacement; If they are equal, the actual terminal velocity and actual terminal acceleration of the previous motion cycle are used as the starting velocity and starting acceleration of the current motion cycle; If they are not equal, determine whether the difference between the actual displacement and the planned displacement of the system in the previous motion cycle exceeds the preset difference; If it does not exceed the preset difference, the speed planning model of the previous motion cycle is used in combination with the bisection approximation to calculate the planned endpoint speed and planned endpoint acceleration of the previous motion cycle, and these are used as the starting speed and acceleration of the current cycle.
2. The speed planning method according to claim 1, characterized in that: The step of using the speed planning model of the previous motion cycle and combining the bisection method to approximate the planned endpoint speed and the planned endpoint acceleration of the previous motion cycle and using them as the starting speed and acceleration of the current cycle includes: When the difference between the actual displacement and the planned displacement of the system in the previous motion cycle is greater than 0, the speed is taken as The acceleration is a0+j as the starting point, t is 1, and the final velocity on the velocity curve that satisfies the displacement of Δ is calculated by combining the dichotomy of t, and the final acceleration that satisfies the displacement of Δ is calculated by t; Among them, v0 is the starting velocity of the previous motion cycle, a0 is the starting acceleration of the previous motion cycle, and the value of j is ±j max or 0,j max is the maximum jerk of the system and t is the cycle time.
3. The speed planning method according to claim 1, characterized in that: The step of using the speed planning model of the previous motion cycle and combining the bisection method to approximate the planned endpoint speed and the planned endpoint acceleration of the previous motion cycle and using them as the starting speed and acceleration of the current cycle includes: When the difference between the actual displacement and the planned displacement of the system in the previous motion cycle is less than 0, the velocity curve model of the previous motion cycle takes the velocity v0 and acceleration a0 as the starting point, takes t as 1, and combines the dichotomy of t to calculate the displacement on the velocity curve that satisfies The final velocity is calculated by t to satisfy the displacement. Final acceleration; Among them, v0 is the starting velocity of the previous motion cycle, a0 is the starting acceleration of the previous motion cycle, and the value of j is ±j max or 0,j max is the maximum jerk of the system and t is the cycle time.
4. The speed planning method according to claim 1, characterized in that: Also includes the steps: If the difference exceeds the preset value, it is assumed that the acceleration of the current motion cycle continues to increase in the direction of the system acceleration, so as to calculate the starting speed and starting acceleration of the current motion cycle, and judge whether the assumption is met based on the final speed of the current motion cycle. If so, the calculated starting speed and starting acceleration of the current motion cycle are applied.
5. The speed planning method according to claim 4, characterized in that: Also includes the steps: If it is not satisfied, the new starting speed and starting acceleration of the current motion cycle are derived based on the reverse motion of the acceleration.
6. The speed planning method according to claim 5, characterized in that: The step of assuming that the acceleration of the current motion cycle continues to increase along the direction of the system acceleration to calculate the starting speed and starting acceleration of the current motion cycle includes: Assume that x represents the variable to be added when the system's current motion cycle speed is converted into the starting speed, and y represents the variable to be added when the system's current motion cycle acceleration is converted into the starting acceleration. a 系 =-a max In the above cases, the value of y is set and the value of x is calculated to obtain the starting speed and starting acceleration of the current cycle.
7. The speed planning method according to claim 6, characterized in that: If the above condition is not satisfied, the steps of deriving the starting speed and starting acceleration of the new current motion cycle with the acceleration moving in reverse as a condition include: If the assumption based on the final velocity of the current motion cycle is not satisfied, the value of y is reset based on the reverse motion of the acceleration, and the value of x is calculated to obtain the starting velocity and starting acceleration of the current cycle.
8. A speed planning device, characterized in that: It comprises a processor and a memory; the memory is used to store a computer program, and the computer program includes program instructions; the processor is used to call the computer program to implement the speed planning method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the speed planning method according to any one of claims 1 to 7 are implemented.
10. A computer program product, characterized in that The computer program product stores computer instructions, and when the computer instructions are executed by a processor, the steps of the speed planning method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Speed control method and device of numerical control model, computer device and storage medium
CN113495531A
S-shaped curve speed planning method, control terminal and computer readable storage medium
CN114077226A
Single-axis high-order constraint acceleration and deceleration control method
CN115480481A
Method for controlling overlapping of laser cladding, and method and system for dynamically adjusting height of laser head
US20210197317A1
Method of planning machining and machining equipment
WO2003064107A1