Method, device and equipment for planning asymmetric S-shaped motion trail and medium
By judging the maximum acceleration and deceleration, determining the new jerk and constructing a relationship, the actual maximum speed is analytically obtained to plan the asymmetric S-shaped motion trajectory, which solves the problems of computational complexity and time consumption in the existing technology and improves the efficiency of motion. Control system efficiency and stability.
Patent Information
- Application Number
- CN202411021790.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-10-11
AI Technical Summary
In motion control systems, S-shaped acceleration and deceleration planning has low efficiency, real-time performance and insufficient stability in trajectory planning due to computational complexity and time consumption of numerical calculations or iterative approximation methods.
By judging whether the maximum acceleration and maximum deceleration can be reached, the new jerk is determined, and based on this, the first and second relational expressions are constructed to analyze and obtain the actual maximum speed, thereby replacing the motion parameters to plan an asymmetric S-shaped motion trajectory.
It reduces the computational complexity, reduces the calculation time, improves the efficiency of trajectory planning, and improves the real-time performance and stability of the motion control system.
Smart Images

Figure CN118760188A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of motion control technology, and in particular to a planning method, device, equipment and medium for an asymmetric S-shaped motion trajectory. Background Art
[0002] In control systems such as general motion control cards / devices, CNC systems, and robot systems, in order to ensure the continuity of speed and reduce the impact of sudden acceleration changes on the motor, S-type acceleration and deceleration planning is usually used to achieve smooth changes in speed. The general S-type acceleration and deceleration curve is divided into seven sections: acceleration, uniform acceleration, deceleration, uniform speed, acceleration and deceleration, uniform deceleration, and deceleration. However, in the actual planning process, due to the influence of motion parameters such as trajectory length, acceleration and deceleration, and acceleration, there are many situations in the seven stages corresponding to the S-type acceleration and deceleration curve, and the calculation is very complicated and the implementation logic is cumbersome. When the distance is not enough to meet the acceleration to the target maximum speed, it is necessary to calculate the maximum speed that can be achieved, that is, the actual maximum speed, and then plan the trajectory. At present, numerical calculation or iterative approximation methods are mostly used to obtain the actual maximum speed, such as dichotomy, Newton iteration method, fitting method, etc. Using numerical calculation or iterative approximation will take up more computing time, increase the time of trajectory planning, and is not conducive to the real-time and stable operation of the motion control system.
[0003] Therefore, how to improve the efficiency of trajectory planning and enhance the real-time and stability of motion control systems has become a technical problem that needs to be urgently solved by technical personnel in this field. Summary of the invention
[0004] The purpose of this application is to provide a planning method, device, equipment and computer-readable storage medium for an asymmetric S-shaped motion trajectory, which can improve the efficiency of trajectory planning and enhance the real-time and stability of the motion control system.
[0005] In order to solve the above technical problems, the present application provides a planning method for an asymmetric S-shaped motion trajectory, comprising:
[0006] When it is determined that the target maximum speed cannot be reached according to the input motion parameters, it is determined whether the maximum acceleration and the maximum deceleration can be reached;
[0007] If the maximum acceleration and / or the maximum deceleration cannot be achieved, determining a new jerk;
[0008] Determine a first relational expression according to the new jerk; the first relational expression includes the new jerk and a first actual maximum speed; the first actual maximum speed refers to an actual maximum speed when the maximum acceleration and the maximum deceleration can be reached;
[0009] Obtaining a second actual maximum speed according to the first actual maximum speed, and determining a second relationship according to the second actual maximum speed and the new jerk; the second relationship including the new jerk and the second actual maximum speed;
[0010] Solving the first relational expression and the second relational expression to obtain the second actual maximum speed;
[0011] The target jerk is replaced by the new jerk, the target maximum speed is replaced by the second actual maximum speed, and an asymmetric S-shaped motion trajectory is obtained according to the replaced motion parameter planning.
[0012] In some embodiments, determining whether the maximum acceleration and the maximum deceleration can be achieved includes:
[0013] Assuming that the maximum acceleration and the maximum deceleration can be achieved, the jerk time is calculated according to the maximum acceleration and the target jerk;
[0014] Calculating the deceleration time according to the maximum deceleration and the target jerk;
[0015] Calculate the acceleration time and the deceleration time according to the motion parameters;
[0016] If the acceleration time is less than twice the acceleration time or the deceleration time is less than twice the deceleration time, at least one of the maximum acceleration and the maximum deceleration cannot be achieved.
[0017] In some embodiments, determining the new jerk includes:
[0018] According to the maximum acceleration, the initial velocity and the first actual maximum velocity, a first jerk is obtained when the acceleration time is equal to twice the jerk time;
[0019] According to the maximum deceleration, the final speed and the first actual maximum speed, a second jerk is obtained when the deceleration time is equal to twice the deceleration time;
[0020] A minimum value is selected from the first jerk and the second jerk as a new jerk.
[0021] In some embodiments, according to the new jerk, determining the first relationship includes:
[0022] Replacing the target jerk with the new jerk, and calculating a new acceleration time and a new deceleration time when the maximum acceleration and the maximum deceleration can be reached according to the motion parameters after the target jerk is replaced;
[0023] According to the new acceleration time, the movement distance in the acceleration time period is calculated;
[0024] According to the new deceleration time, the movement distance in the deceleration time period is calculated;
[0025] The first relationship is obtained by constructing a relationship between the movement distance in the acceleration time period, the movement distance in the deceleration time period, the distance difference and the target distance; the distance difference refers to the difference between the movement distance in the acceleration time period and the movement distance in the deceleration time period and the target distance.
[0026] In some embodiments, determining the second relationship according to the second actual maximum speed and the new jerk includes:
[0027] Calculate the movement distance in the acceleration time period according to the second actual maximum speed, the new jerk, the initial speed and the maximum acceleration;
[0028] Calculate the movement distance in the deceleration time period according to the second actual maximum speed, the new jerk, the final speed and the maximum deceleration;
[0029] A relationship between the movement distance in the acceleration time period, the movement distance in the deceleration time period, and the target distance is constructed to obtain the second relationship.
[0030] In some embodiments, according to the first relationship and the second relationship, solving the second actual maximum speed includes:
[0031] Subtract the first relational expression from the second relational expression to obtain a third relational expression;
[0032] According to the root-finding formula, the value of the speed increment in the third relational equation is obtained; the sum of the speed increment and the first actual maximum speed is the second actual maximum speed;
[0033] The second actual maximum speed is obtained according to the value of the speed increment and the first actual maximum speed.
[0034] In some embodiments, it also includes:
[0035] If the maximum acceleration and the maximum deceleration can be achieved, the first actual maximum speed is calculated according to the motion parameters;
[0036] The target maximum speed is replaced by the first actual maximum speed, and an asymmetric S-shaped motion trajectory is obtained according to the replaced motion parameter planning.
[0037] In order to solve the above technical problems, the present application also provides a planning device for an asymmetric S-shaped motion trajectory, comprising:
[0038] A judgment module, used to judge whether the maximum acceleration and the maximum deceleration can be achieved when it is judged that the target maximum speed cannot be achieved according to the input motion parameters;
[0039] a first determination module, configured to determine a new jerk if the maximum acceleration and / or the maximum deceleration cannot be reached;
[0040] A second determination module is used to determine a first relationship according to the new jerk; the first relationship includes the new jerk and a first actual maximum speed; the first actual maximum speed refers to an actual maximum speed when the maximum acceleration and the maximum deceleration can be reached;
[0041] a third determination module, configured to obtain a second actual maximum speed according to the first actual maximum speed, and determine a second relationship according to the second actual maximum speed and the new jerk; wherein the second relationship includes the new jerk and the second actual maximum speed;
[0042] A solving module, configured to solve the second actual maximum speed according to the first relationship and the second relationship;
[0043] A planning module is used to replace the target jerk with a new jerk, replace the target maximum speed with the second actual maximum speed, and obtain an asymmetric S-shaped motion trajectory according to the replaced motion parameters.
[0044] In order to solve the above technical problems, the present application also provides a planning device for an asymmetric S-shaped motion trajectory, comprising:
[0045] Memory for storing computer programs;
[0046] A processor is used to implement the steps of the above-mentioned asymmetric S-shaped motion trajectory planning method when executing the computer program.
[0047] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the planning method of the asymmetric S-shaped motion trajectory as described above are implemented.
[0048] In order to solve the above technical problems, the present application also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the planning method of the asymmetric S-shaped motion trajectory as described above.
[0049] The planning method of an asymmetric S-shaped motion trajectory provided in the present application includes: when it is determined that the target maximum speed cannot be reached according to the input motion parameters, determining whether the maximum acceleration and the maximum deceleration can be reached; if the maximum acceleration and / or the maximum deceleration cannot be reached, determining a new jerk; determining a first relationship according to the new jerk; the first relationship includes the new jerk and a first actual maximum speed; the first actual maximum speed refers to the actual maximum speed when the maximum acceleration and the maximum deceleration can be reached; obtaining a second actual maximum speed according to the first actual maximum speed, and determining a second relationship according to the second actual maximum speed and the new jerk; the second relationship includes the new jerk and the second actual maximum speed; solving the second actual maximum speed according to the first relationship and the second relationship; replacing the target jerk with the new jerk, replacing the target maximum speed with the second actual maximum speed, and planning an asymmetric S-shaped motion trajectory according to the replaced motion parameters.
[0050] It can be seen that the planning method of the asymmetric S-shaped motion trajectory provided by the present application determines a new jerk when the target maximum speed cannot be reached and the maximum acceleration and / or maximum deceleration cannot be reached, and determines the first relationship and the second relationship accordingly, and obtains the final actual maximum speed, i.e., the second actual maximum speed, through an analytical method based on the first relationship and the second relationship, and then replaces the target jerk in the motion parameters with the new jerk, replaces the target maximum speed with the second actual maximum speed, and plans the asymmetric S-shaped motion trajectory according to the replaced motion parameters. Compared with the solution of using numerical method and iterative approximation method to obtain the final actual maximum speed and plan the asymmetric S-shaped motion trajectory, the present application can greatly reduce the computational complexity, reduce the computational time, improve the efficiency of trajectory planning, and enhance the real-time and stability of the motion control system.
[0051] The apparatus, device and computer-readable storage medium provided in this application all have the above-mentioned technical effects. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the prior art and the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A schematic diagram of a flow chart of a method for planning an asymmetric S-shaped motion trajectory provided in an embodiment of the present application;
[0054] Figure 2 A schematic diagram of a planning device for an asymmetric S-shaped motion trajectory provided in an embodiment of the present application;
[0055] Figure 3 A schematic diagram of a planning device for an asymmetric S-shaped motion trajectory provided in an embodiment of the present application. DETAILED DESCRIPTION
[0056] The core of this application is to provide a planning method, device, equipment and computer-readable storage medium for an asymmetric S-shaped motion trajectory, which can improve the efficiency of trajectory planning and enhance the real-time and stability of the motion control system.
[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0058] Please refer to Figure 1 , Figure 1 A schematic diagram of a planning method for an asymmetric S-shaped motion trajectory provided in an embodiment of the present application is provided. Figure 1 As shown, the method includes:
[0059] S101: When it is determined that the target maximum speed cannot be reached according to the input motion parameters, determining whether the maximum acceleration and the maximum deceleration can be reached;
[0060] The motion control system determines the motion parameters of the current motion according to the instructions input by the user. The motion parameters include the initial velocity v s (mm / s), final speed v e (mm / s), target maximum speed v m (mm / s), target distance L (mm), maximum acceleration a m (mm / s 2 )、Maximum deceleration d m (mm / s 2 ) and the target jerk j m (mm / s 3 ).
[0061] When the motion parameters such as the target distance do not meet the acceleration to the target maximum speed, it is determined whether the controlled object can reach the maximum acceleration and the maximum deceleration. For how to determine whether the target maximum speed can be reached, reference can be made to the existing solutions, and this application will not elaborate on this.
[0062] In some embodiments, determining whether the maximum acceleration and the maximum deceleration can be achieved includes:
[0063] Assuming that the maximum acceleration and maximum deceleration can be achieved, the jerk time is calculated based on the maximum acceleration and the target jerk;
[0064] According to the maximum deceleration and the target jerk, the deceleration time is calculated;
[0065] The acceleration time and deceleration time are calculated based on the motion parameters;
[0066] If the acceleration time is less than twice the acceleration time or the deceleration time is less than twice the deceleration time, at least one of the maximum acceleration and the maximum deceleration cannot be reached.
[0067] This embodiment considers the situation that the target distance is not enough to achieve the target maximum speed, so there is no uniform speed segment, and therefore only the acceleration segment and the deceleration segment are considered.
[0068] Let T1 = T3, T5 = T7. T1 is the acceleration time, T3 is the deceleration time, T5 is the deceleration time, and T7 is the acceleration and deceleration time.
[0069] Assuming that the maximum acceleration am and the maximum deceleration dm can be achieved, we have:
[0070] …… (1)
[0071] The sum of the acceleration distance and the deceleration distance is the target distance L, from which the actual maximum speed v when the maximum acceleration am and the maximum deceleration dm can be calculated lim That is, the first actual maximum speed, acceleration time Ta, and deceleration time Td are as follows:
[0072] …… (2)
[0073] in, .
[0074] Since the acceleration section at least includes the acceleration section and the deceleration section, and the deceleration section at least includes the acceleration and deceleration section and the deceleration and deceleration section, if the maximum acceleration am and the maximum deceleration dm can be achieved, the acceleration time and deceleration time should meet the following conditions:
[0075] .
[0076] When Ta<2*T1 || Td<2*T5, it indicates that at least one of the acceleration or deceleration segments cannot reach the maximum acceleration / maximum deceleration.
[0077] In addition, when Ta<0 || Td<0, it indicates that there is only an acceleration section or only a deceleration section. In this case, the acceleration / deceleration process is performed, and this application will not repeat it here. When Ta≥2*T1 && Td≥2*T5, it indicates that both the acceleration section and the deceleration section can reach the maximum acceleration / deceleration speed. The first actual maximum speed and the acceleration time and deceleration time can be calculated according to the above formulas (1) and (2).
[0078] S102: If the maximum acceleration and / or the maximum deceleration cannot be reached, a new jerk is determined;
[0079] In the event that the maximum acceleration and / or the maximum deceleration cannot be achieved, a new jerk is determined.
[0080] In some embodiments, determining the new jerk includes:
[0081] According to the maximum acceleration, the initial velocity and the first actual maximum velocity, a first jerk is obtained when the acceleration time is equal to twice the jerk time;
[0082] According to the maximum deceleration, the final speed and the first actual maximum speed, a second jerk is obtained when the deceleration time is equal to twice the deceleration time;
[0083] The minimum value between the first jerk and the second jerk is selected as the new jerk.
[0084] Set the acceleration time equal to twice the jerk, and the deceleration time equal to twice the deceleration time. The new jerk is calculated; where, represents the new jerk, represents the maximum acceleration, Indicates the maximum deceleration, represents the first actual maximum speed, represents the initial velocity, Indicates final velocity.
[0085] Let Ta=2*T1, Td=2*T5 to calculate the new jerk ,have:
[0086] .
[0087] .
[0088] S103: Determine a first relational expression according to the new jerk; the first relational expression includes the new jerk and a first actual maximum speed; the first actual maximum speed refers to an actual maximum speed when the maximum acceleration and the maximum deceleration can be achieved;
[0089] This embodiment aims to determine the actual maximum speed by analytical means, and for this purpose, after determining the new jerk, a first relational expression is determined according to the new jerk. The first relational expression includes the new jerk and the first actual maximum speed.
[0090] In some embodiments, according to the new jerk, determining the first relationship includes:
[0091] The target jerk is replaced by the new jerk, and a new acceleration time and a new deceleration time are calculated based on the motion parameters after the target jerk is replaced, when the maximum acceleration and the maximum deceleration can be achieved;
[0092] According to the new acceleration time, the movement distance during the acceleration time period is calculated;
[0093] According to the new deceleration time, the movement distance during the deceleration period is calculated;
[0094] The relationship between the movement distance in the acceleration time period, the movement distance in the deceleration time period, the distance difference and the target distance is constructed to obtain the first relationship; the distance difference refers to the difference between the movement distance in the acceleration time period and the movement distance in the deceleration time period and the target distance.
[0095] Substituting the new jerk into the above formula (1) and formula (2), the new acceleration time and the new deceleration time are calculated. The new acceleration time is less than the acceleration time calculated according to the input target jerk in the above text, and the new deceleration time is less than the deceleration time calculated according to the input target jerk in the above text. Therefore, the sum of the movement distance in the acceleration time period and the movement distance in the deceleration time period is less than the target distance.
[0096] make: ; That is the distance difference.
[0097] Then there is, (a)
[0098] Formula (a) is the first relation.
[0099] S104: obtaining a second actual maximum speed according to the first actual maximum speed, and determining a second relationship according to the second actual maximum speed and the new jerk; the second relationship includes the new jerk and the second actual maximum speed;
[0100] In order to eliminate the distance difference, the first actual maximum speed and the speed increment can be summed. The speed increment can be positive, that is, the first actual maximum speed can be increased to obtain the second actual maximum speed. According to the second actual maximum speed and the new jerk, a second relationship is determined. The second relationship includes the new jerk, the first actual maximum speed, and the speed increment. It can be understood that in the second relationship, the speed increment is an unknown number to be solved.
[0101] In some embodiments, determining the second relationship according to the second actual maximum speed and the new jerk includes:
[0102] The movement distance in the acceleration time period is calculated according to the second actual maximum velocity, the new jerk, the initial velocity and the maximum acceleration;
[0103] The movement distance in the deceleration time period is calculated according to the second actual maximum speed, the new jerk, the final speed and the maximum deceleration;
[0104] A relationship between the movement distance in the acceleration time period, the movement distance in the deceleration time period, and the target distance is constructed to obtain a second relationship.
[0105] make , is the second actual maximum speed, is the speed increment.
[0106] have:
[0107] (b)
[0108] Substituting in:
[0109] (c)
[0110] Formula (c) is the second relationship.
[0111] S105: Solving the first relational expression and the second relational expression to obtain a second actual maximum speed;
[0112] In some embodiments, according to the first relational expression and the second relational expression, solving the second actual maximum speed includes:
[0113] Subtract the first relation from the second relation to obtain the third relation;
[0114] According to the root-finding formula, the value of the speed increment in the third relational expression is solved; the sum of the speed increment and the first actual maximum speed is the second actual maximum speed;
[0115] The second actual maximum speed is obtained according to the value of the speed increment and the first actual maximum speed.
[0116] Subtracting equations (a) and (c) yields:
[0117] ;
[0118] Use the root-finding formula to find the solution to the above equation, and then substitute it to get the second actual maximum speed.
[0119] S106: replacing the target jerk with the new jerk, replacing the target maximum speed with the second actual maximum speed, and obtaining an asymmetric S-shaped motion trajectory according to the replaced motion parameter planning.
[0120] The target jerk is replaced by the new jerk, and the target maximum velocity is replaced by the second actual maximum velocity. According to the initial velocity, final velocity, maximum acceleration, maximum deceleration, new jerk, target distance and the second actual maximum velocity, the time of each stage can be planned to obtain an asymmetric S-shaped motion trajectory.
[0121] In some embodiments, it also includes:
[0122] If the maximum acceleration and the maximum deceleration can be achieved, the first actual maximum speed is calculated according to the motion parameters;
[0123] The target maximum speed is replaced by the first actual maximum speed, and an asymmetric S-shaped motion trajectory is obtained according to the replaced motion parameter planning.
[0124] When Ta≥2*T1 && Td≥2*T5, it indicates that the maximum acceleration and maximum deceleration can be achieved. At this time, the first actual maximum speed is calculated according to the above formulas (1) and (2). The target maximum speed is replaced by the first actual maximum speed. According to the initial speed, final speed, maximum acceleration, maximum deceleration, jerk, target distance and the first actual maximum speed, the time of each stage can be planned to obtain an asymmetric S-shaped motion trajectory.
[0125] In summary, the planning method of the asymmetric S-shaped motion trajectory provided by the present application sets a new jerk when the target maximum speed cannot be reached and the maximum acceleration and / or maximum deceleration cannot be reached, and determines the first relationship and the second relationship accordingly, and obtains the final actual maximum speed, i.e., the second actual maximum speed, through an analytical method based on the first relationship and the second relationship, and then replaces the target jerk in the motion parameters with the new jerk, replaces the target maximum speed with the second actual maximum speed, and plans the asymmetric S-shaped motion trajectory according to the replaced motion parameters. Compared with the scheme of using numerical method and iterative approximation method to obtain the final actual maximum speed and plan the asymmetric S-shaped motion trajectory, the present application can greatly reduce the computational complexity, reduce the computational time, improve the efficiency of trajectory planning, and enhance the real-time and stability of the motion control system.
[0126] The present application also provides a planning device for an asymmetric S-shaped motion trajectory, and the device described below can be referred to in correspondence with the method described above. Figure 2 , Figure 2 A schematic diagram of a planning device for an asymmetric S-shaped motion trajectory provided in an embodiment of the present application, combined with Figure 2 As shown, the device comprises:
[0127] A determination module 10, for determining whether the maximum acceleration and the maximum deceleration can be achieved when it is determined that the target maximum speed cannot be achieved according to the input motion parameters;
[0128] A first determination module 20, for determining a new jerk if the maximum acceleration and / or the maximum deceleration cannot be reached;
[0129] The second determination module 30 is used to determine a first relationship according to the new jerk; the first relationship includes the new jerk and a first actual maximum speed; the first actual maximum speed refers to an actual maximum speed when the maximum acceleration and the maximum deceleration can be achieved;
[0130] A third determination module 40 is used to obtain a second actual maximum speed according to the first actual maximum speed, and determine a second relationship according to the second actual maximum speed and the new jerk; the second relationship includes the new jerk and the second actual maximum speed;
[0131] A solving module 50, configured to solve the first relational expression and the second relational expression to obtain a second actual maximum speed;
[0132] The planning module 60 is used to replace the target jerk with the new jerk, replace the target maximum speed with the second actual maximum speed, and plan an asymmetric S-shaped motion trajectory according to the replaced motion parameters.
[0133] Based on the above embodiment, as a specific implementation, the judgment module 10 includes:
[0134] A first calculation unit is used for assuming that the maximum acceleration and the maximum deceleration can be achieved, and calculating the acceleration time according to the maximum acceleration and the target jerk;
[0135] A second calculation unit is used to calculate the deceleration time according to the maximum deceleration and the target jerk;
[0136] A third calculation unit, used for calculating the acceleration time and the deceleration time according to the motion parameters;
[0137] The determination unit is used to determine that if the acceleration time is less than twice the acceleration time or the deceleration time is less than twice the deceleration time, at least one of the maximum acceleration and the maximum deceleration cannot be achieved.
[0138] Based on the above embodiment, as a specific implementation, the first determining module 20 includes:
[0139] a first jerk determination unit, configured to obtain, according to the maximum acceleration, the initial velocity and the first actual maximum velocity, a first jerk when the acceleration time is equal to twice the jerk time;
[0140] a second jerk determination unit, configured to obtain, according to the maximum deceleration, the final speed and the first actual maximum speed, a second jerk when the deceleration time is equal to twice the deceleration time;
[0141] The selection unit is used to select a minimum value from the first jerk and the second jerk as a new jerk.
[0142] Based on the above embodiment, as a specific implementation, the second determining module 30 includes:
[0143] A replacement unit, used for replacing the target jerk with the new jerk, and calculating a new acceleration time and a new deceleration time when the maximum acceleration and the maximum deceleration can be achieved according to the motion parameters after the target jerk is replaced;
[0144] A first acceleration section distance calculation unit, used for calculating the movement distance in the acceleration time period according to the new acceleration time;
[0145] A first deceleration section distance calculation unit, used to calculate the movement distance in the deceleration time period according to the new deceleration time;
[0146] The first construction unit is used to construct a relationship between the movement distance in the acceleration time period, the movement distance in the deceleration time period, the distance difference and the target distance to obtain a first relationship; the distance difference refers to the difference between the movement distance in the acceleration time period and the movement distance in the deceleration time period and the target distance.
[0147] Based on the above embodiment, as a specific implementation, the third determining module 40 includes:
[0148] A second acceleration segment distance calculation unit, used to calculate the movement distance in the acceleration time period according to the second actual maximum speed, the new jerk, the initial speed and the maximum acceleration;
[0149] A second deceleration distance calculation unit, used for calculating the movement distance in the deceleration time period according to the second actual maximum speed, the new jerk, the final speed and the maximum deceleration;
[0150] The second construction unit is used to construct a relationship between the movement distance in the acceleration time period, the movement distance in the deceleration time period, and the target distance to obtain a second relationship.
[0151] Based on the above embodiment, as a specific implementation, the solution module 50 includes:
[0152] A difference unit, used for subtracting the first relational expression from the second relational expression to obtain a third relational expression;
[0153] A solving unit is used to solve the value of the speed increment in the third relationship according to the root-finding formula; the sum of the speed increment and the first actual maximum speed is the second actual maximum speed;
[0154] The actual maximum speed calculation unit is used to obtain the second actual maximum speed according to the value of the speed increment and the first actual maximum speed.
[0155] Based on the above embodiment, as a specific implementation method, it also includes:
[0156] A first actual maximum speed calculation module, used for calculating the first actual maximum speed according to the motion parameters if the maximum acceleration and the maximum deceleration can be achieved;
[0157] The second replacement module is used to replace the target maximum speed with the first actual maximum speed, and obtain an asymmetric S-shaped motion trajectory according to the replaced motion parameter planning.
[0158] The present application also provides a planning device for an asymmetric S-shaped motion trajectory, referring to Figure 3 As shown, the device includes a memory 1 and a processor 2 .
[0159] Memory 1, used for storing computer programs;
[0160] Processor 2 is used to execute the computer program to implement the following steps:
[0161] When it is determined that the target maximum speed cannot be reached according to the input motion parameters, determine whether the maximum acceleration and the maximum deceleration can be reached; if the maximum acceleration and / or the maximum deceleration cannot be reached, determine a new jerk; according to the new jerk, determine a first relationship; the first relationship includes a new jerk and a first actual maximum speed; the first actual maximum speed refers to the actual maximum speed when the maximum acceleration and the maximum deceleration can be reached; according to the first actual maximum speed, obtain a second actual maximum speed, and according to the second actual maximum speed and the new jerk, determine a second relationship; the second relationship includes a new jerk and the second actual maximum speed; according to the first relationship and the second relationship, solve and obtain the second actual maximum speed; replace the target jerk with the new jerk, replace the target maximum speed with the second actual maximum speed, and plan an asymmetric S-shaped motion trajectory according to the replaced motion parameters.
[0162] For an introduction to the equipment provided in this application, please refer to the above method embodiments, and this application will not go into details here.
[0163] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the following steps can be implemented:
[0164] When it is determined that the target maximum speed cannot be reached according to the input motion parameters, determine whether the maximum acceleration and the maximum deceleration can be reached; if the maximum acceleration and / or the maximum deceleration cannot be reached, determine a new jerk; according to the new jerk, determine a first relationship; the first relationship includes a new jerk and a first actual maximum speed; the first actual maximum speed refers to the actual maximum speed when the maximum acceleration and the maximum deceleration can be reached; according to the first actual maximum speed, obtain a second actual maximum speed, and according to the second actual maximum speed and the new jerk, determine a second relationship; the second relationship includes a new jerk and the second actual maximum speed; according to the first relationship and the second relationship, solve and obtain the second actual maximum speed; replace the target jerk with the new jerk, replace the target maximum speed with the second actual maximum speed, and plan an asymmetric S-shaped motion trajectory according to the replaced motion parameters.
[0165] The computer-readable storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.
[0166] For an introduction to the computer-readable storage medium provided in this application, please refer to the above method embodiment, and this application will not go into details here.
[0167] The present application also provides a computer program product, including a computer program / instruction, which implements the following steps when the computer program / instruction is executed by a processor:
[0168] When it is determined that the target maximum speed cannot be reached according to the input motion parameters, determine whether the maximum acceleration and the maximum deceleration can be reached; if the maximum acceleration and / or the maximum deceleration cannot be reached, determine a new jerk; according to the new jerk, determine a first relationship; the first relationship includes a new jerk and a first actual maximum speed; the first actual maximum speed refers to the actual maximum speed when the maximum acceleration and the maximum deceleration can be reached; according to the first actual maximum speed, obtain a second actual maximum speed, and according to the second actual maximum speed and the new jerk, determine a second relationship; the second relationship includes a new jerk and the second actual maximum speed; according to the first relationship and the second relationship, solve and obtain the second actual maximum speed; replace the target jerk with the new jerk, replace the target maximum speed with the second actual maximum speed, and plan an asymmetric S-shaped motion trajectory according to the replaced motion parameters.
[0169] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the devices, equipment, and computer-readable storage media disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0170] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0171] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0172] The above is a detailed introduction to the planning method, device, equipment and computer-readable storage medium for the asymmetric S-shaped motion trajectory provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A planning method for an asymmetric S-shaped motion trajectory, characterized in that: include: When it is determined that the target maximum speed cannot be reached according to the input motion parameters, it is determined whether the maximum acceleration and the maximum deceleration can be reached; If the maximum acceleration and / or the maximum deceleration cannot be achieved, determining a new jerk; Determine a first relational expression according to the new jerk; the first relational expression includes the new jerk and a first actual maximum speed; the first actual maximum speed refers to an actual maximum speed when the maximum acceleration and the maximum deceleration can be reached; Obtaining a second actual maximum speed according to the first actual maximum speed, and determining a second relationship according to the second actual maximum speed and the new jerk; the second relationship including the new jerk and the second actual maximum speed; Solving the first relational expression and the second relational expression to obtain the second actual maximum speed; The target jerk is replaced by the new jerk, the target maximum speed is replaced by the second actual maximum speed, and an asymmetric S-shaped motion trajectory is obtained according to the replaced motion parameter planning.
2. The method for planning an asymmetric S-shaped motion trajectory according to claim 1, characterized in that: Determining whether the maximum acceleration and the maximum deceleration can be reached includes: Assuming that the maximum acceleration and the maximum deceleration can be achieved, the jerk time is calculated according to the maximum acceleration and the target jerk; Calculating the deceleration time according to the maximum deceleration and the target jerk; Calculate the acceleration time and the deceleration time according to the motion parameters; If the acceleration time is less than twice the acceleration time or the deceleration time is less than twice the deceleration time, at least one of the maximum acceleration and the maximum deceleration cannot be achieved.
3. The method for planning an asymmetric S-shaped motion trajectory according to claim 2, characterized in that: Determining the new jerk involves: According to the maximum acceleration, the initial velocity and the first actual maximum velocity, a first jerk is obtained when the acceleration time is equal to twice the jerk time; According to the maximum deceleration, the final speed and the first actual maximum speed, a second jerk is obtained when the deceleration time is equal to twice the deceleration time; A minimum value is selected from the first jerk and the second jerk as a new jerk.
4. The method for planning an asymmetric S-shaped motion trajectory according to claim 1, characterized in that: According to the new jerk, determining the first relationship includes: Replacing the target jerk with the new jerk, and calculating a new acceleration time and a new deceleration time when the maximum acceleration and the maximum deceleration can be reached according to the motion parameters after the target jerk is replaced; According to the new acceleration time, the movement distance in the acceleration time period is calculated; According to the new deceleration time, the movement distance in the deceleration time period is calculated; The first relationship is obtained by constructing a relationship between the movement distance in the acceleration time period, the movement distance in the deceleration time period, the distance difference and the target distance; the distance difference refers to the difference between the movement distance in the acceleration time period and the movement distance in the deceleration time period and the target distance.
5. The method for planning an asymmetric S-shaped motion trajectory according to claim 1, characterized in that: Determining the second relationship according to the second actual maximum speed and the new jerk includes: Calculate the movement distance in the acceleration time period according to the second actual maximum speed, the new jerk, the initial speed and the maximum acceleration; Calculate the movement distance in the deceleration time period according to the second actual maximum speed, the new jerk, the final speed and the maximum deceleration; A relationship between the movement distance in the acceleration time period, the movement distance in the deceleration time period, and the target distance is constructed to obtain the second relationship.
6. The method for planning an asymmetric S-shaped motion trajectory according to claim 1, characterized in that: According to the first relational expression and the second relational expression, solving the second actual maximum speed includes: Subtract the first relational expression from the second relational expression to obtain a third relational expression; According to the root-finding formula, the value of the speed increment in the third relational equation is obtained by solving; the sum of the speed increment and the first actual maximum speed is the second actual maximum speed; The second actual maximum speed is obtained according to the value of the speed increment and the first actual maximum speed.
7. The method for planning an asymmetric S-shaped motion trajectory according to claim 1, characterized in that: Also includes: If the maximum acceleration and the maximum deceleration can be achieved, the first actual maximum speed is calculated according to the motion parameters; The target maximum speed is replaced by the first actual maximum speed, and an asymmetric S-shaped motion trajectory is obtained according to the replaced motion parameter planning.
8. A planning device for an asymmetric S-shaped motion trajectory, characterized in that: include: A judgment module, used to judge whether the maximum acceleration and the maximum deceleration can be achieved when it is judged that the target maximum speed cannot be achieved according to the input motion parameters; a first determination module, configured to determine a new jerk if the maximum acceleration and / or the maximum deceleration cannot be reached; A second determination module is used to determine a first relationship according to the new jerk; the first relationship includes the new jerk and a first actual maximum speed; the first actual maximum speed refers to an actual maximum speed when the maximum acceleration and the maximum deceleration can be reached; a third determination module, configured to obtain a second actual maximum speed according to the first actual maximum speed, and determine a second relationship according to the second actual maximum speed and the new jerk; wherein the second relationship includes the new jerk and the second actual maximum speed; A solving module, configured to solve the second actual maximum speed according to the first relationship and the second relationship; A planning module is used to replace the target jerk with a new jerk, replace the target maximum speed with the second actual maximum speed, and obtain an asymmetric S-shaped motion trajectory according to the replaced motion parameters.
9. A planning device for an asymmetric S-shaped motion trajectory, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the steps of the method for planning an asymmetric S-shaped motion trajectory as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for planning an asymmetric S-shaped motion trajectory as described in any one of claims 1 to 7 are implemented.
