Velocity planning method for position–velocity–time control based on a modified S-shaped acceleration/deceleration algorithm

Position–velocity–time control mode has been wildly used in industrial application. And velocity planning is one of the most important factors to determine the performance of position–velocity–time motion. To generate smooth trajectory while satisfying the kinematic constraints of the devices such as the maximum velocity, acceleration, and jerk, a novel velocity planning method is proposed. Firstly, a modified S-shaped acceleration/deceleration algorithm is designed to restrict the kinematic parameters. Meanwhile, a series of rules are specified to constrain the velocity profile to simplify the velocity planning process. On this basis, the velocity planning method is proposed based on the modified acceleration/deceleration algorithm. For reasonable position–velocity–time command, the given position–velocity–time conditions can be satisfied with smooth velocity profile, where the kinematic parameters can be limited in their allowable ranges. For unreasonable position–velocity–time commands, a series of planning strategies are designed to adjust the given conditions according to the user needs, which is suitable for the real application. The comparative experiments show that the proposed method can realize the velocity planning for position–velocity–time motion with smooth trajectory while restricting the kinematic parameters. The computational load is also tested to satisfy the real-time requirement. Therefore, the proposed velocity planning method has good performance and strong practicability.


Introduction
Position-velocity-time (PVT) control mode, where the motion axes can get to the specified position with desired velocity and time, has been wildly used in motion control. 1,2 In that mode, the controller conducts the velocity planning according to a series of points with PVT information which are called PVT commands. Compared with the position-velocity (PV) and position-time (PT) control modes, PVT mode has a stronger constraint on motion process. However, in some application situations, the PVT commands are send by the host computer with a certain beat rather than obtained by velocity look ahead. Hence, the given conditions might not match to the kinematic constraints of the devices such as the maximum velocity, acceleration, and jerk, which affects the motion smoothness and might cause damage to the drive and transmission components. Therefore, it is critical to develop an appropriate velocity planning method to guarantee the motion smoothness while restricting the motion parameters.
The most common used velocity planning methods for PVT control are cubic and quintic polynomial interpolation algorithms. [2][3][4][5][6][7] Each PVT command is used as the planning interval to construct the trajectory by cubic or quintic polynomial functions. And the conditions of PVT command at the end of command interval can always be satisfied. Meanwhile, polynomial interpolation algorithms is easy to conduct with small computational load.
However, the acceleration profiles obtained by the cubic polynomial method are discontinuous at the edges of each interval. Meanwhile, the Runge phenomenon 8 is obvious with the fifth-order polynomial function in some situations, which causes serious oscillations. Moreover, the velocity, acceleration, and jerk profiles in each interval obtained by polynomial methods are uncontrollable and might exceed the kinematic constraints, which might cause damage to devices and affect motion accuracy.
To restrict the motion parameters, various acceleration/ deceleration (ACC/DEC) algorithms can be used. Some jerk-limited ACC/DEC algorithms such as the S-shaped method [9][10][11] and the dynamic jerk constraint method 12 have been employed to generate continuous acceleration profile. To simplify the expression and calculation process of polynomial methods, some trigonometric ACC/DEC algorithms are developed such as the Sine-curve methods. 13,14 However, the motion efficiency is limited because the maximum velocity, acceleration, or jerk cannot be maintained in these trigonometric methods. 15 To further improve the motion smoothness, some jerk-continuous ACC/DEC algorithms [16][17][18][19] are proposed. However, their expressions and the computation process of velocity planning are complicated.
Among these algorithms, the S-shaped ACC/DEC has continuous acceleration and limited jerk 20,21 which is necessary and sufficient for smooth trajectory. Meanwhile, the specified rules with seven sections have strong constraint ability on kinematic parameters. 22,23 In addition, the calculation process of velocity planning is simple and standard. 24 However, the typical S-shaped ACC/DEC algorithm and the corresponding velocity planning method cannot consider the motion time condition, which cannot be used to PVT application directly and needs to be modified.
To cope with these problems, a velocity planning method is proposed in this paper for PVT control. The main contributions can be described as follows: 1. A modified S-shaped ACC/DEC algorithm is designed based on the typical algorithm, which can consider the time condition and maintain the properties in terms of smoothness, simplicity, and ability to constrain the kinematic parameters. 2. On this basis, a series of rules are specified to restrict the form of velocity profile to simplify the velocity planning process. 3. The velocity planning method is proposed base on the modified ACC/DEC algorithm. By the proposed method, smooth trajectory can be generated to satisfy the given PVT conditions while the kinematic parameters are restricted within their given ranges, which is suitable for the real application.
The remainder of this article is organized as follows. In the second section, the typical S-shaped ACC/DEC algorithm and its modification are illustrated. The third section describes the velocity planning method for PVT control based on the modified S-shaped ACC/DEC algorithm. Experiment results are analyzed and compared with previous works in the fourth section. The conclusion and future works are given in the fifth section.

Typical S-shaped ACC/DEC profile and its modification for PVT control
The typical S-shaped ACC/DEC profile As shown in Figure 1, the typical S-shaped ACC/DEC profile consists of seven sections which compose three phases namely ACC, constant velocity (CV), and DEC phase with fixed order. The corresponding velocity planning process is to calculate the minimum motion time T i according to the given conditions including the desired displacement S, start velocity v s , end velocity v e , and the kinematic constraint set F kc ¼ fJ max ; a max ; Fg, where J max , a max , and F are the maximum jerk, acceleration, and velocity, respectively. Continuous acceleration profile can be generated with simple calculation process while the motion parameters can be limited in their given ranges. However, the motion time condition is not considered, which is not suitable for PVT control.

The modified S-shaped ACC/DEC profile for PVT control
To satisfy the requirements of PVT control, the typical Sshaped ACC/DEC algorithm needs to be modified to consider the motion time condition while maintaining its properties in smoothness, simplicity, and ability to constrain the motion parameters within F kc . Hence, two modification principles are stipulated as follows: (1) The ACC, CV, and DEC phases can be combined in any order but each phase appears no more than once. (2) The jerk of each section in ACC and DEC phases no longer equals to fixed values and depends on velocity planning with the given conditions. But the symmetry of jerk profiles in ACC or DEC phase is still maintained.
Based on these principles, the typical S-shaped ACC/ DEC profile can be converted to different forms with same motion condition set F mc ¼ fT ; v s ; v e ; F kc g where T is the motion time and some of their velocity profiles are shown in Figure 2, where the area S is the corresponding displacement. The profiles shown in Figure 2(a) and (f) denote the maximum and minimum displacements S max and S min where the jerk of each section which is non-zero equals to J max or ÀJ max . The profiles shown in Figure 2(c) to (d) illustrate some other situations and their displacements all belong to ½S min ; S max . It can be seen that different displacements can be generated through different ACC/DEC forms with same F mc , which indicates that the modified Sshaped ACC/DEC algorithm can realize the PVT control to a certain extent.
However, there are too many kinds of profile forms in ½S min ; S max . And the corresponding solution of velocity planning is not unique, which complicates the calculation process. Therefore, some further rules are needed to constrain the form of ACC/DEC profile and simplify the velocity planning. As shown in Figure 3, between P1 and P5 profiles which are corresponding to Figure 2    With these five profiles, ½S min ; S max is divided into four regions. In each region, the rules of phase components, orders, and time are stipulated in Table 1. Based on these rules, the velocity profiles in each region, such as the example profiles PR1-PR4 shown in Figure 4, have fixed forms, which guarantees that the solution of velocity planning is unique and reduces the computational load significantly. The corresponding velocity planning method will be described in the third section.

Velocity planning method for PVT control based on the modified S-shaped ACC/DEC algorithm
Based on the modified S-shaped ACC/DEC algorithm, the velocity planning method is proposed to realize the PVT control. For the situations where the given conditions cannot be satisfied under the kinematic constraints, the corresponding processing procedures are also given. Based on Figure 4, the flowchart of velocity planning is depicted in Figure 5 and described in detail with eight steps as follows where assuming 0 v s v e F: (1) Step 1: judging the rationality of the given conditions preliminarily.
The given time T might be insufficient to accelerate v s to v e . Hence, the maximum reachable end velocity v max e under v s , T, and F kc should be calculated as follows After that, the following judgment should be performed: if v e v max e , it means that v e can be reached. Then, go to step 2.
if v e > v max e , it means T is too short and v e is unreachable. Then, go to step 5.
(2) Step 2: calculating the maximum velocity v max in P1 profile and the minimum v min in P5 profile shown in Figure 4 as well as the corresponding displacement S max and S min .
The calculation procedures of v max and v min are shown in Appendix 1. Meanwhile, each phase time can be calculated. Then, S max and S min can be obtained as follows

Region
Order of each phase

Rules of time Features
Example profile Figure 4. Example profile in each region.
Then, judge the relation between the given S and ½S min ; S max : if S 2 ½S min ; S max , it means the velocity can be planned under F mc and S. Then, go to Step 3. if S > S max , it means S is too long for the given F mc . There are two sub-cases which can be chosen according to the user needs. If the condition of end velocity has higher priority than displacement, then got to step 6. Else, go to step 7.
if S < S min , it means S is too short. Similarly, two subcases exist. If the condition of end velocity is more important than displacement, then got to step 6. Else, go to step 8.
Based on the specified rules given in subsection "The modified S -shaped ACC/DEC profile for PVT control," S 2 , S 3 , and S 4 can be calculated as follows Then, go to step 4. As the PR4 profile in Figure 6, the DEC, CV, and ACC phases all exist and the corresponding time is T P5 dec , T P5 cv , and T P5 acc , respectively. The actual minimum velocity v act min is selected as the variable and the following displacement equation can be constructed v s þ v act v act min can be solved as Step profiles shown in Fig. 4 Step 4 Judging the region number and velocity planning in the corresponding region Step 5 Adjusting to satisfy the time condition and velocity planning As shown in Figure 6, the actual jerk and duration of each section in DEC phase can be calculated based on v act min as follows The jerk and duration of each section in ACC phase can also be calculated by equation (9) similarly. Therefore, the velocity planning is finished.

Sub-step 4.2: Velocity planning in region R3
As the PR3 profile in Figure 4, only the CV and ACC phases exist. The time of CV phase T cv is selected as variable. And the displacement equation can be constructed as Then, T cv , the time of ACC phase T acc and its corresponding displacement S acc can be solved as follows Finally, similar to Sub-step 4.1, the jerk and duration of each section in ACC phase can be calculated based on equation (9).

Sub-step 4.3: Velocity planning in region R2
As the PR2 profile in Figure 4, only the ACC and CV phases exist and the time of CV phase T cv is selected as the variable to construct the following displacement equation T cv can be solved as Then, the time of ACC phase and other critical parameters can be calculated by equations (12) and (9).

Sub-step 4.4: Velocity planning in region R1
As the PR1 profile in Figure 4, the ACC, CV, and DEC phase are all existing and the corresponding time equals to T P1 acc , T P1 acc , and T P1 dec , respectively. The actual maximum velocity v act max can be the variable. Hence, the displacement equation can be constructed as Then, v act max can be solve as follows Similar to Sub-step 4.1, the time and jerk of each section in ACC and DEC phase can be calculated based on equation (9).
Then, the jerk and time of each section can be obtained with the same procedures in step 4. (6) Step 6: Abandoning the displacement condition When coming to this step, it means the displacement condition cannot be satisfied with F mc . Meanwhile, v e should be guaranteed. Therefore, the displacement condition should be abandoned. If S < S min ,Sshould be updated to S min . On the contrary, S should be replaced by S max when S > S max . Then, the jerk and time of each section in ACC and DEC phase can be calculated similar to substep 4.1 or 4.4.
Based on v min e , the corresponding DEC time T v min e dec and displacement S v min e , which is the minimum reachable displacement and consists of DEC phase, can be obtained as follows If S S v min e , it means that the displacement condition cannot be satisfied by reducing the end velocity. Therefore, S and v e should be replaced by S v min For steps 5-8, the PVT conditions cannot be both satisfied. When coming to the next command period, the target displacement S next should be recalculated according to the implementation of current period while the corresponding start velocity v next s is the end velocity of current period. And during the following motion, the tracking of end velocity and displacement can be conducted gradually, which is suitable for the real application. In particular, when there is no subsequent PVT command and the target end velocity or displacement is not reached, the velocity will be planned by the typical S-shaped ACC/DEC algorithm without considering the time condition.

Implementation and experimental results
In this section, the experiments are performed to evaluate the good performance of the proposed velocity planning method. Analysis and comparisons are also performed with some other representative methods such as the cubic and quintic polynomial interpolation algorithms.

Experimental setup
The experiments are conducted on a two-axis motion platform with Panasonic MBDH series servo derives and MHMD series motors. The layout of the experimental system is shown in Figure 7. The host computer generates PVT commands and sends them to the self-developed PC-based motion controller 10 through Ethernet where the command period is 50 ms. The PVT commands come from a tracking system guided by machine vision. The tracking target including PVT conditions is given by machine vision and the mechanical system completes tracking. The configurations of the motion controller are shown in Table 2. Meanwhile, the axis control data can be sent to the corresponding servo derives by EtherCAT and the interpolation period is set to 1 ms. In addition, kinematic constraint parameters are shown in Table 3. The two axes' PVT commands are shown in Figure 8(a) to (d).

Experiment results and comparisons
The target of velocity planning for PVT control is to satisfy the position, velocity, and time conditions under the kinematic constraints. Therefore, we judge the performance of velocity planning methods through comparing whether the motion parameters can be restricted in their allowable regions while complete the PVT motion.
According to the PVT command sequences, the experiment results of the proposed velocity planning method are shown in Figures 9 and 10. As can be seen, smooth velocity and continuous acceleration profiles can be generated while all the motion parameters are restricted in their given ranges. For the commands which cannot be satisfied under the kinematic constraints, the given conditions are adjusted to match the constraints where the end velocity is set to a higher priority. In the last part, the given end velocity and position are not reached but there is no subsequent PVT command. Hence, the two axes are moved to the target position and end velocity directly based on the typical Sshaped ACC/DEC algorithm without considering the time condition.
The experiment results obtained by the cubic and quintic polynomial interpolation methods are shown in Figures 11 and 12 and Figures 13 and 14, respectively. As shown in Figure 11(c) and 12(c), the acceleration profile obtained by the cubic polynomial method is discontinuous, which causes serious vibration and shock. Meanwhile, as can be seen form Figure 13(b) and 14(b), the velocity profile obtained by the quintic polynomial method has serious oscillations. Even in some interpolation periods, the velocity appears negative. In addition, the velocity, acceleration, and jerk obtained by the cubic and quintic polynomial methods are uncontrollable and     exceed the kinematic constraints, which affects the motion smoothness and might cause damage to the drive and transmission components. The real-time performance of the proposed velocity planning method is also tested during the experiments. The average and maximum computational time in each interpolation period are 1.562 ms and 10.523 ms, respectively, and much smaller than 1 ms. Therefore, the proposed method can always satisfy the real-time requirement with 1 ms interpolation period.

Conclusion and future works
In this article, a novel velocity planning method based on a modified S-shaped ACC/DEC algorithm is proposed for PVT control. For reasonable PVT commands, the given PVT conditions can be satisfied by this method with smooth velocity profile while the kinematic parameters can be limited in their allowable ranges. For unreasonable PVT commands, a series planning strategies are designed to adjust the given conditions according to the user needs, which is suitable for the real application. The comparative experiments have been conducted and validate the good performance and applicability of the proposed method.
For some devices, such as the serial industrial robots, their kinematic constraints are not fixed and vary with their position and posture. The proposed velocity planning method is only suitable for fixed constraints. Future work will focus on considering the variation characteristics of kinematic constraints during velocity planning to make full use of the motion performance of device. Therefore, the kinematic and dynamic models of devices need to be established to get accurate kinematic constraints.
else, it means that v max should be smaller than F. Then, go to Step A2. (2) Step A2: assuming v