Abstract
To improve the sorting accuracy and efficiency of sorting system with large inertia robot, this article proposes a novel trajectory planning method based on S-shaped acceleration/deceleration algorithm. Firstly, a novel displacement segmentation method based on assumed maximum velocity is proposed to reduce the computational load of velocity planning. The sorting area can be divided into four parts by no more than three steps. Secondly, since the positions of workpieces are dynamically changing, a dynamic prediction method of workpiece picking position has been presented to consider all the possible positions of the robot and the workpiece, so as to realize the picking position prediction of the workpiece at any positions. Each situation in this method can constitute an equation with only one solution, and the existence of the solution can be verified by the proposed graphical method. The simulations of the motion time of the sorting process show that the proposed method can significantly shorten the sorting time and improve the sorting efficiency compared with the previous method. Finally, this method was applied to the Selective Compliance Assembly Robot Arm (SCARA) robot for experiments. In the physical picking experiment, the missing-pick rate was less than 1%, which demonstrates the efficiency and effectiveness of this method.
Keywords
Introduction
The sorting for the moving workpieces, which is to identify, pick, and place the messy workpieces, 1 is one of the most common applications in modern industrial production. 2 Traditional offline programing is not applicable because the position of workpiece is random. 3 To achieve accurate positioning of the workpiece, machine vision is widely used in robot sorting system. 4 Meanwhile, the planning of sorting trajectory, which determines the smoothness, accuracy, and efficiency of sorting process, has become one of the most important factors in sorting system. 5
Much work has been done about the sorting of moving workpiece. Ni et al. 6 planned the sorting trajectory by establishing a dynamic sorting mathematical model based on Newton–Raphson iterative method. However, the sorting speed is slow, especially for large inertia robots. Zhang et al. 7 proposed a method to control the conveyor speed according to the distribution density of workpieces on the conveyor to ensure that the robot is always in the fastest sorting speed. But, it is a time-consuming process to ensure high-accuracy and high-speed performances by adjusting controller parameters, 8 and this method is difficult to achieve and does not meet the requirements of the production cycle. Jiao et al. 9 realized the tracking and sorting of workpiece using the Kalman filter. But, this method sets a fixed rectangular area, and only the workpiece inside the fixed rectangular area would be sorted by the robot. This method causes a long preparation time, and the sorting efficiency is lower. Tang 10 applied the image technology to the dynamic target tracking and proposed to extract the workpieces coordinates by the background difference method. The image processing in this method is complicated, and the calculation time is long. The sorting efficiency cannot meet the industrial requirements. Liu et al. 11 realized the issue of tracking and sorting dynamic workpieces on the production line and proposed a tracking algorithm for comprehensive application of prediction targets and searching targets, enabling dynamic tracking of workpieces on conveyor. However, the method is complicated and the amount of calculation is large.
Feed rate scheduling is another key issue in robot sorting system. A lot of feed rate scheduling methods based on various acceleration/deceleration (ACC/DEC) algorithms have been proposed. The particle swarm optimization techniques have been widely used to solving motion planning problems. 12,13 Ni et al. proposed some feed rate scheduling methods to improve motion smoothness and efficiency based on S-shaped ACC/DEC algorithm. 14,15 The linear ACC/DEC algorithm 16 and polynomial algorithm 17 are also utilized to generate smooth feed rate profile. Liu et al. 18 used modified trapezoidal ACC/DEC method to plan the sorting trajectory of the Delta parallel manipulator. The calculation of trapezoidal ACC/DEC is simple, and the acceleration and deceleration are smooth 19 but the jerk is easy to overrun and it is not suitable for robot with large inertia. When the robot moves at a high speed, the inertia of the end is large, and it is easy to bring about vibration and impact, which will cause serious damage to the body and motor. S-shaped ACC/DEC algorithm with seven sections has continuous acceleration, limited jerk, and the velocity planned by S-shaped method is more stable and can effectively reduce the vibration and shock. 20
To cope with these problems, this article proposes a novel trajectory planning method based on S-shaped ACC/DEC algorithm. Firstly, a novel displacement segmentation method based on assumed maximum velocity is proposed to reduce the computational load of velocity planning. The sorting area can be divided into four parts by no more than three steps. Secondly, since the positions of workpieces are dynamically changing, a dynamic prediction method of workpiece picking position is presented to consider all the possible positions of the robot and the workpiece, so as to realize the picking position prediction of the workpiece at any positions. Each situation in this method can constitute an equation with only one solution, and the existence of the solution can be verified by proposed graphical method. Finally, the simulations and experiments of the sorting process show that the proposed method can significantly shorten the sorting time and improve the sorting efficiency compared with the previous method.
The remainder of this article is structured as follows. In the second section, the overall structure of the robot sorting system is introduced briefly. Meanwhile, the S-shaped ACC/DEC algorithm and path planning of sorting trajectory are introduced briefly. The third section develops the proposed displacement segmentation method and dynamic prediction method of workpiece picking position. The simulation and experimental results are analyzed to verify the feasibility and stability of the proposed methods in the fourth section. Finally, the article is concluded in the fifth section.
Problem background
Robot sorting system
As shown in Figure 1, the robot sorting system is composed of a Selective Compliance Assembly Robot Arm (SCARA) robot, two conveyor belts, a pallet, an industrial camera, and some workpieces. The sorting process can be described as follows: the scattered workpieces move on the conveyor I with a constant speed. The industrial camera collects the position information of the workpiece and transmits it to the robot controller, then the robot picks the workpiece and place them to the pallets on the conveyor II. The workpiece on the conveyor must pass through three areas completely. Firstly, the workpiece will enter the visual identification area. Secondly, the workpieces move for a while to reach the picking area, where the robot performs the grasping action. Finally, after the grasping action is completed, the robot moves directly above the pallet and then places the workpiece in the pallet, which is workpiece placement area.

Robot sorting system model.
S-shaped ACC/DEC algorithm
To avoid vibration in the motion process and achieve a smoother motion curve, this article applies S-shaped ACC/DEC algorithm. The kinematic profiles of the algorithm are illustrated in Figure 2. The S-shaped curve can be divided into seven parts.
21
According to the specified motion parameters such as the maximum jerk

The S-shaped ACC/DEC profiles with seven sections. ACC/DCC: acceleration/deceleration.
Path planning
It is a typical point-to-point (PTP) process that picks the workpiece on the conveyor I and places it in the pallet of the conveyor II.
6
To prevent the vibration caused by the sudden change of the trajectory at the corner, and shorten the motion time, the arc transition mode is adopted at the corner.
23
As shown in Figure 3, the “door” path includes three segments:

PTP path planning. PTP: point-to-point.
Let motion time of
Sorting trajectory planning method based on S-shaped ACC/DEC algorithm
To simplify the amount of calculation in planning trajectory of sorting, a displacement segmentation method is proposed. In addition, a dynamic prediction method of workpiece picking position is presented in detail.
Displacement segmentation method based on the assumed maximum velocity
In general, a typical S-shaped ACC/DEC algorithm includes seven segments. However, depending on the giving
Firstly, if the uniform acceleration segment does not exist,
Secondly, if the uniform deceleration segment does not exist,
Thirdly, if the uniform velocity section exists,
Thus, different existences of S-shaped segments yield three different maximum velocities. The critical point of the proposed displacement segmentation method is to calculate the corresponding displacement based on the three special maximum velocities. Firstly, three possible maximum velocities

The flowchart of proposed displacement segmentation method.
The “door” path is widely used as the sorting trajectory of end-effector. It requires that

The diagram of displacement segmentation method.
The part I is from zero to
The part II is from
The part III starts from
The time of uniform section is set to be
Dynamic prediction method of workpiece picking position
To predict the picking position of moving workpiece, the prediction method proposed by Ni et al.
6
is used in this article. As shown in Figure 6, it creates a geometric triangle using the coordinates of end-effector

Geometric model of position prediction.
Based on the cosine theorem of triangle, the relationship between these coordinates can be written as
where
The dynamic change of the picking trajectory mainly comes from two aspects. On the one hand, the change of the

The intersection diagram of robot workspace and trajectory of workpiece.
Three kinds of trajectories of workpieces intersect with robot workspace in different parts and points, and in which, points
In this situation,
In this situation
In this situation
Based on the S-shaped displacement equations (5) to (9) and the prediction equations of picking position (10) to (14), the dynamic prediction equation of the workpiece picking position can be presented as follows:
Part I
where
Part II
where
Part III
where
In the actual process of picking, in order to pick more workpiece in the same time, the picking time for one single workpiece should be as shorter as possible. Therefore, the picking position of the workpiece should be as close as possible to the upper limit of the picking area. As can be seen from Figure 7, intersections

The diagram of dynamic calculation method of picking trajectory.
It is difficult to analyze the monotonicity of equation and existence of the solution from the mathematical point of view. To avoid the complex mathematical calculation, a method based on graphic analysis was proposed to help analyze the monotonicity of equation and the existence of solutions.
A simplified schematic of picking model is shown in Figure 9, the vertical segment

Simplified schematic of picking model.
Simulation and experiment
Simulation environment and operation procedure
When the sorting system is running, firstly, the camera captures the images of workpieces on the conveyor. Then the positions of workpieces are obtained by image processing, and its motion trajectory and the picking area are determined. After that, a dynamic prediction method of picking position is used to obtain picking trajectory in intervals shown in Figure 7. If there is a solution in the current interval, the parameters of the picking trajectory are calculated and would be sent to the robot controller. The robot performs the sorting operation. If there is no solution, it would be decided whether there are other picking intervals. The detailed procedure is shown in Figure 10.

The operation procedure of sorting system.
The simulations are conducted on a personal computer with Intel(R) Core(TM) i5-4460 3.20 GHz CPU, 6.00 GB SDRAM, and Windows 7 operating system. And all the algorithms for simulations are developed and implemented on Microsoft visual studio 2013 using C++ language. The interpolation parameters (a) to (e) are listed in Table 1.
Interpolation parameters.
Analysis of simulation
In the simulation, 36 sets of coordinate data including 4 coordinates of placing point and 9 coordinates of workpieces have been used. If the placing point is supposed to be fixed, the motion time of picking and placing process is equal. Therefore, the sorting efficiency can be expressed by calculating the picking time only. In most sorting applications, technicians generally set the conveyor speed to around 150 mm/s based on experience. Thus, the speed interval (100–200mm/s) of conveyor is chosen to test the method in practice.
To test the efficiency and robustness of the proposed method, method presented by Ni et al. 6 is chosen as a comparison. Ni et al. 6 planned the sorting trajectory by establishing a dynamic sorting mathematical model based on Newton–Raphson iterative method. The C++ programs are written by Visual studio 2013 to achieve the method presented by Ni et al. 6 in the same computer.
On the one hand, by substituting the same coordinate information and sampling period (

The motion time of picking calculated by proposed method and method proposed by Ni et al. 6
On the other hand, in the case where the up/down distance (
Picking time and shortened time.
To prove the stability and adaptability of the proposed method, all the picking trajectories of 36 sets of coordinate data are drawn in the Figure 12. The figure shows that a clear picking trajectory can be planned successfully for each workpiece, no matter where the robot is within the placement area.

The diagram of picking trajectory obtained by proposed method.
Experiment results
To analyze the performance of here proposed method, some picking experiments have been implemented. As shown in Figure 13, the experiment system consists of a robot system with a SCARA robot, a robot controller, a conveyor belt, and an industrial camera installed above the conveyor. The robot controller used in this article is the same as the controller used in Ni’s paper. 6

Layout of the experimental system.
The model of camera is Basler acA1300-30gm, which is equipped with Sony ICX445 CCD sensor and can deliver 30 frames per second at 1.3 MP resolution. The conveyor belt is powered by a servo motor made by Panasonic. The workpiece in the experiment is the soft printed circuit board (PCB) cable inside the phone, and the end-effector of sorting robot picks up or places the workpieces by controlling the pneumatic chuck through the vacuum generator. Except for the soft PCB cable, some other shape workpieces are also tested in the experiment to verify the adaptability of the proposed method by adjusting the visual processing program according to the shape of workpiece, such as white round sheet, green round sheet, red square sheet, and blue triangle sheet. Figure 14 shows the shapes of various workpieces, and Table 3 gives the dimensions of various workpieces. To achieve a better analysis, method proposed in this article and method presented by Ni et al. 6 are, respectively, implemented on the experimental system with different parameters (a) to (e) shown in Table 1.

Five kinds of workpieces used in the experiment.
Dimensions of workpieces.
PCB: printed circuit board.
The experimental results are shown in Table 4. For both approaches, the sorting experiment is conducted five times and 500 workpieces are sorted each time. During these experiments, the number of workpieces that robots sorted amounted to 2500. For the experiment of soft PCB cable, both methods have trapped some workpieces, which may be due to the complex shape of the soft PCB cable and the accuracy problem of the visual algorithm. But for other shapes of the workpieces, the method proposed in this article is superior to the method given by Ni et al. 6 in picking rate. Experimental results show that the trajectory planning method proposed in this article can ensure the sorting efficiency and accuracy of sorting system with different shaped workpieces and different interpolation parameters.
The result of sorting experiment.
Conclusion
The main contributions of this article include two aspects. Firstly, a novel displacement segmentation method based on assumed maximum velocity is proposed to reduce the computational load of velocity planning. The sorting area can be divided into four parts by no more than three steps. Secondly, a dynamic prediction method of workpiece picking position is presented to consider all the possible positions of the robot and the workpiece, so as to realize the picking position prediction of the workpiece at any position. Each situation in this method can constitute an equation with only one solution and the existence of the solution can be verified by proposed graphical method. The results of simulations and experiments are able to verify the high efficiency and high reliability of the proposed method. However, this study has not yet reached the end. There are still some problems that need to be studied. On the one hand, the introduction of artificial intelligence into the optimization of control parameters is an important research direction. On the other hand, it is also possible to study the method of improving the accuracy of the picking position by constructing a tracking motion strategy.
Footnotes
Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: The work is supported by Special Foundation for National Integrated Standardization and New Model of Intelligent Manufacturing, China (grant no. Z135060009002-132) and National Natural Science Foundation of China (grant no. 51405270).
