A Method of Energy-Optimal Trajectory Planning for Palletizing Robot

In this work, the energy-optimal trajectory planning and initial pick point searching problem for palletizing robot with high load capacity and high speed are studied, in which the pick point and place point of the robot are fixed to a desired location for each single task.These optimization problems have been transformed to ternary functional extremum problem and parameters optimal selection problem in which the performance index of the problems the rigid-flexible coupling dynamicsmodel of the robot, and the constraint and boundary conditions of the robot are given.The fourth-order Runge-Kutta method, multiple shooting method, and traversing method are used to solve these specific mathematical problems. The effectiveness of the trajectory planning method is validated by the experimental and simulating results; thus the research work done here provides important support for subsequent palletizing robot research.


Introduction
During the last years, the rapid increase of the energy price together with strictly international and national policies has pointed out the problem of energy efficiency [1].Reduction of our energy consumption, both on a household and on an industrial scale, therefore seems primordial from an economical as well as an ecological point of view [2].
With the development of social productive forces, the handling efficiency and loading capacity of the palletizing robots have put forward more and more requirement in the material handling areas.Thus the high-energy consumption problem of the palletizing robot has aroused great concern, moving companies' awareness from the reduction of the production time to the identification of an optimal tradeoff between production time and energy consumption.In this work a method of energy-optimal trajectory planning for palletizing robot with high load capacity and high speed is proposed to solve the problem.The subject about trajectory planning has been extensively studied.The problem of trajectory planning for a robot is a very complex task and plays a crucial role in design and application of robots.Most of the work in this area is focused on smoothness, time-optimal, and energy-optimal trajectory planning.
In the process of robotic trajectory planning, the continuity of the joint variables and their first two derivative must be ensured; otherwise vibration and impact will be produced; thus wear and consumption of the robot drive elements will be increased especially for high speed overloaded palletizing robot [3].Aiming at this problem, Boryga and Graboś present a planning mode of trajectory motion for serial-link manipulators with higher-degree polynomials application, which is planned as the polynomials of degrees 5, 7, and 9 for the acceleration profiles of end-effector [4].Azizi and Khani presented a new algorithm for smooth trajectory planning optimization of isotropic translational parallel manipulators that their Jacobian matrixes are constant and diagonal over the whole robot workspace [5].Gasparetto and Zanotto proposed a new methodology, which is based on minimization of an objective function taking into account the execution time and integral of squared jerk along a whole trajectory of robotic manipulators [6].
The above methods mainly considered the smoothness of robot trajectories under constraints of kinematics, dynamics, and control performances, which did not take into account time-optimal and energy-optimal aspects.Haddad et al. proposed an efficient stochastic scheme for minimum-time trajectory planning of a nonholonomic unicycle mobile robot under constraints on path curvature, velocities, and torques, which incorporated a trapezoidal-velocity-profile constraint that helps reduce the number of unknown parameters and speeds up the calculation steps [7].A polynomial basis function trajectory parametrization was presented in [8], which enables direct export to executable robot code and reduces the number of variables in the optimization problem.Biagiotti and Melchiorri developed the trajectory planning of desired motion profiles for actuation systems of automatic machines [9].Huang et al. proposed a novel minimum energy PTP trajectory planning method for a motor-toggle servomechanism [10].Rubio et al. proposed an analysis of productivity of the industrial robots trajectory planning, which posed a multiobjective optimization problem to assess the trade-offs between the economic variables by means of the Pareto fronts [11].Bonami et al. studied the energy-optimal motion planning problem for planar robot manipulators with two revolute joints [12].Fung and Cheng designed a novel point-to-point trajectory based on minimum absolute input energy for an LCD glass-handing robot, which is driven by a permanent magnet synchronous motor [13].Paes et al. presented a systematic methodology for on-site identification and energy-optimal path planning of an industrial robot, which was validated on an IRB1600 industrial ABB robot [14].The optimization of energy consumption in product manufacture was deeply analyzed in [15], mainly focusing on the energy directly absorbed by the manufacturing process.Wang et al. considered real-time energy-optimal trajectory generation for a servomotor system which performs a singleaxis point-to-point positioning task for a fixed time interval [16].Saramago and Steffen Jr. considered a solution to the problem of moving a robot manipulator with minimum cost along a specified geometric path.The optimal traveling time and the minimum mechanical energy of the actuators are considered together to build a multiobjective function and the results depend on the associated weighting factors [17].
Furthermore, there are many other research works about robotic trajectory planning [18][19][20]; however most of these research works still show some drawbacks.On the one hand, these research works are mostly based on specific functional form (such as B spline trajectory, etc.), which limits the concrete trajectory form and usually makes it hard to obtain global optimal solution.On the other hand, the weighting factors are frequently used to take off the objectives of time expending and energy consumption, which is too dependent on the selection of weight factors and lack of objectivity.This paper proposes a novel approach to solve the trajectory planning problem for palletizing robots.The planning objectives were mainly aimed at the optimal energy consumption, meanwhile the running time was set as constraint condition.In addition, this work considered the impacts of joint flexibility on the robot motion performance and innovatively proposed the initial pick point searching problem according to the working characteristics of palletizing robots.Many different calculation algorithms are used to solve these mathematical problems, and the effectiveness of the method is validated by the experimental and simulating results.The paper is structured as follows.Section 2 establishes the rigid-flexible coupling dynamics model of the robot.The mathematical description and analysis process of the energyoptimal trajectory planning problem and energy-optimal pick point searching problem are proposed in Sections 3 and 4, respectively.Section 5 shows the experimental results and the conclusions of this paper are drawn in Section 6.

Rigid-Flexible Coupling Dynamics Model
Figure 1 shows the three-dimensional model of the palletizing robot.The robot can be regarded as a series-parallel hybrid structure, which is composed of two groups of parallelogram mechanisms as shown in Figure 2. The red part is the main parallelogram, which can be used to determine the position of the end-effecter.And the green part is the subsidiary parallelogram, which can determine the orientation of the end-effecter.
Table 1 shows the definition of main structural physical parameters of the palletizing robot.The kinetic energy of all components can be calculated and the rigid-body dynamics equation can be obtained using the second-type Lagrange equation as follows: where () is the inertia matrix, (, θ ) is Coriolis force item and centrifugal force item, () is gravity item.The inertia matrix is as follows: where ( The matrix of Coriolis force item and centrifugal force item is as follows: (5) It is observed that the parameters in the matrixes of () and (, θ ) have the below relationship, which will bring convenient for the Euler equation simplification in Section 3.2.
Figure 3 exhibits the equivalence principle of the robot flexible joint.The reducer was equivalent to a stiffness reduction device and a flexible torsion bar.Combined with rigid-body dynamic equation, the rigidflexible coupling dynamics equation can be obtained as follows: where   is the output torque of motor,   is the output angle of motor,   is the output torque of robot,  l is the output angle of robot,   is the motor rotor inertia, K is the reducer stiffness, B is the damping ratio, and I is the reduction ratio.
In order to verify the correctness of the dynamic equations, the torque curves of rigid-body dynamics model (RDM) and rigid-flexible coupling dynamics model (RFCDM) and ADAMS-based virtual prototype model (VPM) are compared.The palletizing robot worked along door-shaped velocity trajectory.The torque errors between RDM and VPM are expressed in magenta chain lines (TERDM), and the torque errors between RFCDM and VPM are expressed in black chain lines (TERFCDM) as shown in Figure 4.
It can be observed that RFCDM can make the maximum torque error of joint 1 to joint 3 reduce from (647.06 Nm, 238.46 Nm, and 206.25 Nm) to (294.12 Nm, 230.77Nm, and 61.25 Nm), respectively, which can verify the correctness of the rigid-flexible coupling dynamics model.

Energy-Optimal Trajectory Planning
In this section, the energy-optimal trajectory planning problem for palletizing robot will be stated, where the endeffector is constrained to move between the pick point and place point.Then, based on the optimal trajectory for each handling task, the energy-optimal pick point searching problem will be introduced in Section 4.

Mathematical Description of the Problem.
This paper focuses on the robot energy consumption in pick-and-place task.The pick point and place point will be fixed for this problem, and the running time will be constrained as constant based on testing data and engineering requirement.In the process of calculation the following energy consumption will be neglected, such as mechanical friction, motor braking, and some affiliated electrical power, which is not much different under different trajectories.
The coordinates of pick point and place point are set as ( 10 ,  20 ,  30 ) and ( 1 ,  2 ,  3 ), respectively, in joint space.In order to ensure the rapidity of the robot, the running time is set as   = /V max , where d is the total distance and V max is the maximum average palletizing speed.The energy consumption of the robot can be obtained as follows: Since the above equation contains absolute value function which is not convenient to solve the functional extremum problem, the performance index J is selected as energy consumption index.
In addition, the output torque of the motors is selected as constraint condition, the initial velocity and acceleration are selected as initial conditions, and the terminal velocity and acceleration are selected as terminal conditions.So the energy-optimal trajectory planning problem can be described as follows: The robotic rigid-flexible coupling dynamics condition of the energy consumption index J is proposed in equation (8).
So the energy-optimal trajectory planning problem is transformed to a ternary functional extremum problem with mixed boundary conditions.

Solving and Analysis.
In this section the fourth-order Runge-Kutta method and multiple shooting method are used to solve the ternary functional extremum problem.
According to the Euler function of the functional extremum condition, the following equation can be obtained: where    () is the first-order partial derivative of F with respect to   () , F is the performance index of the extremum is the kth-order derivative of   with respect to time t; that is,   () = (  /  )  , and n is the order of the highest-order derivative.
According to (8),  equates 2; then (13) can be transformed as follows: Putting the rigid-flexible coupling dynamics equation ( 8) into ( 14) and using (6) for simplification, the fourthorder ordinary differential equations of  1 ,  2 , and  3 can be obtained as follows: Setting:  (15) can be converted into solving the vector X: The numerical solution of ( 16) is proceeded based on the four-level Runge-Kutta method: Since the constraint condition of trajectory planning problem is not exactly initial condition but mixed boundary condition, only using Runge-Kutta method is infeasible.So the multiple shooting method is introduced to solve the problem together.
( = 1, 2, 3) can be calculated by linear interpolation method: The procedure flow chart of the energy-optimal trajectory planning problem is shown in Figure 5.
In order to verify the effectiveness of the method, the comparison between the energy-optimal trajectory and seven-degree polynomial trajectory is proceeded as shown in Figure 6.The maximum output torques of the first three joints are set to 100 Nm, 70 Nm, and 70 Nm, respectively, and the running time is set to 1 second.
As can be seen from Figure 6, for the point-to-point task, the seven-degree polynomial trajectory is a straight line; however, the energy-optimal trajectory is a curve.And compared with seven-degree polynomial trajectory, the energy consumption of energy-optimal trajectory is reduced from 14.674 kJ to 12.702 kJ.The reduction rate can reach up to 13.44% which can verify the effectiveness of the method.

Energy-Optimal Pick Point Searching
Figure 5: Procedure flow chart of the energy-optimal trajectory planning problem.
of the materials is usually fixed within the robot workspace.However, the selection of the pick point of the materials is based on experience, which does not take into account the effect of the location selection on the energy consumption in the whole process of palletizing.
According to Section 3.1, the energy consumption is mainly related to the location of the pick-and-place points.So the optimal location of the pick point can make the energy consumption minimum.The schematic diagram of the problem is shown in Figure 7, where  0 is the pick point of the materials which usually is the end position of the conveyor belt,  ,, is the place point among the stack, and (, , ) are numerical symbols of the materials location.
The problem can be described as searching the optimal pick point  0 * = ( 0 * ,  0 * ,  0 * ) in order to minimize the energy consumption index of the whole stack   .
where  min ( 0 * ,  ,, ) is the energy consumption index for single task when the robot follow the trajectory mentioned in Section 3.1 and (, , V) are the number of materials in the stack along the direction of crosswise, lengthways, and vertical.
The constraint condition is Mathematical Problems in Engineering where d is the distance between the central point of the stack  mid ( mid ,  mid ,  mid ) and the pick point  0 ( 0 ,  0 ,  0 ) and  min is the minimum distance which can be calculated by the robot kinematics analysis.Since the smaller the distance, the lower the total energy consumption, d is set equal to  min .The optional position of  0 constitutes a spherical surface, and its parametric equation can be expressed as follows: where  and  are positional parameters of the spherical surface, −/2 ≤  ≤ /2, 0 ≤  ≤ 2.
So the energy-optimal pick point searching problem is transformed to a parameter (, ) optimal selection problem.

Solving and Analysis.
According to the solving procedure of Section 3.2, the lowest energy consumption of the robot is mainly related to the location of pick point and place point when the points are fixed and can be obtained by the algorithm mentioned in Section 3.2.However, the algorithm can only obtain the numerical solution instead of a certain functional relationship.Since there is no analytical solution for the optimal solution, the traversing method will be used to solve the energy-optimal pick point searching problem.
Firstly,  will be divided into  parts and  will be divided into  parts; that is, where 1 ≤  ≤ , 1 ≤  ≤ .So the spherical surface, taking  mid as sphere center and  min as radius, is divided into  ×  parts, and the position of  0 will change with  and .Then the energyoptimal trajectory from point  0 (, ) to point  ,, and the minimum energy consumption of the single task can be calculated as Section 3.2.Afterward   can be obtained by adding this minimum energy consumption of the whole stack of materials, and the optimal pick point can be selected by comparing the values of   under different choice of  0 .
Obviously the traversing method can only obtain an approximate solution of  0 , and the higher the value of  and , the greater the calculating precision.The procedure flow chart of the energy-optimal pick point searching problem is shown in Figure 8.
The stacking style of materials is selected as a cuboid centered at (1.5, 0, 1), as shown in Figure 9, the size of each material is 35 × 35 × 20 cm, with 10 layers and 9 materials on each layer, and the red part is the projection of the robotic workspace in  and  directions.Then the central point of the stack is  mid (0.8 + 0.35, −0.35 + 0.35, −0.1 + 0.2).And the relationship between the energy consumption and initial location of the pick point is shown in Figure 10.
In Figure 10, the spherical surface represents the optional position range of the pick points, and the corresponding energy consumption value is shown by cloud chart.According to the simulation result, when  = 90 and  = 1, that is,  0 * (1.8275, 0, 1.9448), the total energy consumption is minimum as 4.0092 × 10 5 J.However, when the pick point is set in the edge of the robotic workspace as (1.1543, 0.3440, 0.11428), the total energy consumption increases almost 20fold as 8.3747×10 6 J, which is because the pick point is adverse to the start and stop motion of the robot.So the selection of the materials pick point location is very necessary in the process of palletizing robot system design.

Experimental Verification
5.1.Experimental System.A servo control system based on EtherCAT bus and palletizing robot body experimental platform were built in this work.Figure 11 shows the entire experimental system which mainly consists of EtherCAT based servo control system and the robot mechanical system.Beckhoff IPC C6640 was used as industrial computer which installed TwinCAT3 programming software.TwinCAT software based on real-time operating system integrates the functionality of PLC and NC, and the real-time control cycle is only 50 s, which can meet the real-time requirements of the trajectory planning algorithm.The RS2 servo drives were applied in this work which supported EtherCAT bus communications.So real-time communication and motor control could be realized via high-speed EtherCAT bus.

Experimental Verification. The experimental verification
for the energy-optimal trajectory planning algorithm was accomplished in this work.The seven-degree polynomial trajectory and energy-optimal trajectory planning method were proceeded, respectively, in the condition of same pick point and place point.In the operational process, the actual output torque of the motors and actual speed of the joints can be real-time fed back using TwinCAT NCtoPLC function.Then the instantaneous power value of the motors can be recorded by Scope function.So the actual energy consumption can be calculated as follows: where   is the actual energy consumption of the robot,   is the instantaneous power value of the motors in the discrete point i, and Δ is control period which is set to 1 ms in this work.
The robot was controlled along the seven-degree polynomial trajectory and energy-optimal trajectory as Figure 6, and the running time is set to 1000 microsecond.In order to avoid the occasionality in the process of experiment, the test was proceeded 10 times for the two trajectories, and the test results are shown in Table 2.
The average values of the tests results were taken as the actual energy consumption of the robot, which were calculated as 14.428 kJ and 17.036 kJ under the conditions of energy-optimal trajectory and seven-degree polynomial trajectory, respectively.It shows that the energy-optimal trajectory planning method can make the energy consumption decrease by 15.309%.In addition, compared with the simulation results the actual energy consumption is slightly larger, which is because the friction is not considered in the process of simulation.
The palletizing experiments for a whole stack of materials were proceeded also, while the pick point is set in the optimal location of the robotic workspace as  0 * (1.8275, 0, 1.9448).The total energy consumption was tested as 4.7293 × 10 2 kJ and 5.8269 × 10 2 kJ under the conditions of energy-optimal trajectory and seven-degree polynomial trajectory respectively.That is to say, under the same initial conditions, the total energy consumption for the whole stack of materials was reduced by 30.21% while using the optimal trajectory planning method.

Conclusion
This work deals with trajectory planning of palletizing robots for stacking task; the main contents of the research include the following aspects: (1) The rigid-flexible coupling dynamics model of the 4-DOF palletizing robot is deduced and verified by virtual prototype model and mathematical tools, which can be used for energy-optimal trajectory planning.(2) The mathematical description of the energy-optimal trajectory planning problem is proposed, which is transformed to a ternary functional extremum problem with mixed boundary conditions and solved by the fourth-order Runge-Kutta method and multiple shooting method.The experimental and simulating results show that the energy consumption is reduced obviously compared with seven-degree polynomial trajectory.
(3) The energy-optimal pick point searching problem is introduced, which is transformed to a parameter optimal selection problem and solved by the traversing method.The calculation results validate that the materials pick point location has important effects on energy consumption of palletizing robots for stacking task.(4) The future work will be extended to deal with improved solving method of the energy-optimal problem for the conditions of the energy consumption and working speed are optimal simultaneously, which can improve the solution efficiency of the multiobjective optimization and enhance the applicability of the method.

Figure 2 :
Figure 2: Schematic of the robot mechanism.

Figure 3 :
Figure 3: The model of flexible joint.

Figure 6 :
Figure 6: Comparison between the energy-optimal trajectory and seven-degree polynomial trajectory.(a) Trajectory comparison; (b) energy consumption comparison.

Figure 7 :
Figure 7: Schematic diagram of the problem.

JFigure 8 :
Figure 8: Procedure flow chart of the energy-optimal pick point searching problem.

Figure 9 :
Figure 9: Relationship between stacking style and robotic workspace.

Figure 10 :Figure 11 :
Figure 10: Relationship between energy consumption and pick point location.

Table 1 :
Definition of main structural physical parameters.

Table 2 :
Energy consumption of the robot along the two trajectories.