Minimum Energy Trajectory Optimization for Driving Systems of Palletizing Robot Joints

Palletizing robot is widely used in logistics operation. At present, people pay attention to not only the loading capacity and working efficiency of palletizing robots, but also the energy consumption in their working process. This paper takes MD1200YJ palletizing robot as the research object and studies the problem of low energy consumption optimization of joint driving system from the perspective of trajectory optimization. Firstly, a multifactor dynamic model of palletizing robot is established based on the conventional inverse rigid body dynamic model of the robot, the Stribeck friction model and the spring balance torque model. And then based on joint torque, friction torque, motion parameter, and joule’s law, the useful work model, thermal loss model of joint motor, friction energy consumption model of joint system, and total energy consumption model of palletizing robot are established, and through simulation and experiment, the correctness of the multifactor dynamic model and energy consumption model is verified. Secondly, based on the Fourier series approximation method to construct the joint trajectory expression, the minimum total energy consumption as the optimization objective, with coefficients of Fourier series as optimization variables, the motion parameters of initial and final position, and running time constant as constraint conditions, the genetic algorithm is used to solve the optimization problem. Finally, through the simulation analysis the optimized Fourier series motion law and the 3-4-5 polynomial motion law are comprehensively evaluated to verify the effectiveness of the optimization method.Moreover, it provides the theoretical basis for the follow-up research and points out the direction of improvement.


Introduction
Palletizing robots have been widely applied in logistics operations such as storage, handling, and transportation of materials.At the present, energy saving and green manufacturing are emphasized.Energy consumption index of mechanical equipment has become a new standard to judge the advanced technology of industrial equipment [1,2].The energy consumption of industrial robots is approximately 8% of the total electrical energy consumed in production processes.Therefore, besides repeatability, accuracy, speed, efficiency, and load capacity of industrial robots, energy consumption indicator which is in the manufacturing and operation of industrial robots process also has been the focus of attention [3][4][5].
There are many researches on reducing the energy consumption of robots.The main methods include optimization of robot structure [6][7][8], trajectory planning and so on.Optimization of robot structure method is especially suitable for robot structure design stage.Trajectory planning is more suitable to reduce the energy consumption of existing robots.This paper takes MD1200-YJ high speed and heavy load palletizing robot developed by Tianjin University in China as the research object and researches the minimum energy consumption of joint drive system which is the core of driving the manipulator to complete the motion control, and it is also the main link of energy consumption, from the perspective of trajectory planning.
The driving torque of each joint drive system servo motor is an important factor affecting its energy consumption, and different motion laws will result in different joint driving torque under the same load conditions.Robot dynamics analysis is a theoretical method to determine the dynamic relationship between robot motion and joint drive torque.The commonly used methods of robot dynamics analysis include Newton-Euler method, Lagrange method, Kane equation method, and so on [9][10][11][12].However, the conventional inverse rigid body dynamics model only contains the inertial term, gravity term, and centrifugal or Coriolis force term.And the energy consumption model derived from this dynamic model belongs to the useful work model, which is defined as the work done by the joints of robot in the process of carrying load in this paper.Nevertheless, in addition to the useful work, there are also various dissipative factors such as joint friction energy consumption and servo motor heat loss in the energy consumption of robot joint drive system, which cannot be ignored in energy consumption research.In addition, in order to reduce the load on the joint parts of heavy load robot, the balancing device, such as the balancing spring cylinder, is generally designed, which can effectively reduce the peak torque of the large arm drive joint [13], but this spring torque is not considered in the conventional rigid body dynamics model.Therefore, the conventional rigid body dynamic model cannot fully meet requirements of this research.A multifactor dynamic model of palletizing robot needs to be established; it is necessary to add friction torque and spring balance torque components on the conventional rigid body dynamic model basis.And combined with joule's law, the heat loss model and energy consumption model of multijoint motor of palletizing robot necessary be established.
Literatures [14,15] point out that about 20 percent of the robot's energy is used to overcome joint friction; therefore, friction is an important factor to consider when researching energy consumption problem of robot [16].Friction model is a mathematical description of friction behavior and also is a theoretical basis for correct understanding of friction mechanism and effective prediction of friction behavior.The friction behavior is very complex, and it has been the focus of many scholars to build a friction model that can fully describe the frictional behavior.Up to now, there have been more than 30 friction models.Friction models are usually divided into two types: static friction models and dynamic friction models.The static friction model describes friction as a function of relative velocity, including Coulomb model, static friction-Coulomb-viscosity-Stribeck model, Karnopp friction model, and so on.The dynamic friction model describes the friction as a function of relative velocity and displacement and can describe comprehensively static and dynamic characteristics of friction.The classical dynamic friction model mainly includes Dahl model, mane model, LuGre model, generalized Maxwell model, and so on [17].Compared with the static friction model, the dynamic friction model can describe the friction behavior more comprehensively, but the dynamic friction model is complex, and the difficulty of parameter identification is also significantly increased.Therefore, it should be reasonably selected according to the specific scope and precision of the research.Considering that this paper mainly researches the energy consumption of palletizing robot during high speed operation, the frictional influence in the dynamic process of low speed unsteady state can be ignored.Therefore, the friction model of each joint of palletizing robot is established based on the Stribeck model.
Parameter identification of friction model is the process of collecting and processing relevant data by experimental method to obtain the unknown parameters of friction model.The accuracy of parameter identification determines the accuracy of friction model.Parameter estimation often uses least square method [18,19].
As for the optimization of minimum energy consumption of robot joint drive system, scholars at home and abroad have made some explorations and researches.The main method is to optimize the motion rule with the minimum energy consumption as the objective [20].Wang zhe and Mei jiangping, respectively, researched the influence of 2 and 3 DOF parallel manipulator operating space and joint space trajectory planning on system energy consumption [21,22].Paes K et al. [4] to ABB's IRB1600 industrial robot as the research object and proposes a scene recognition and time and energy optimal trajectory planning method, to work space, joint speed acceleration and dynamic parameters as constraint conditions, the minimum cost function based on the energy as the optimization goal.The sequential quadratic programming method was used to solve the problem and achieved good effect.Wigstrom O et al. [23] proposed a method to generate energy optimal trajectories using dynamic time scales.Without changing the time sequence and trajectory of the robot system, the optimal control time sequence of robot energy is obtained through dynamic programming.Compared with the traditional linear time scale, the energy consumption is significantly reduced.The above optimization strategies are to reduce the useful work by trajectory planning the robot.However, the dissipation energy, such as friction and heat loss, widely exists in the robot joint system should not be ignored.Some scholars have also studied the dissipation energy of robot joint system.Jin bo et al. [24] established the six-legged walking robot dynamics model.Based on the useful work and heat loss of the motor, combined with the quadratic programming method, the optimal distribution of each joint torque was carried out, and the energy consumption of the system was reduced by 22% to 39%.Pellegrinelli S et al. [25] researched the analysis and optimization of the energy consumption related to auxiliary robotic assembly processes, a frictional model considering the coulomb-viscous friction and inverse dynamic model were established, and an energy consumption model including constant power mechanical power and copper loss of motor was established, a method for automatic generation of collision-free trajectories was proposed to reduce the energy of the work cycle by 12%.Datouo R et al. [26] proposed an optimal motion planning method aiming to achieve minimum energy consumption for a three-wheeled omnidirectional mobile robot (TOMR) named Robotino.The A * path planner and the heuristic function integrating energy saving criterion were used to generate energy-saved paths.And the effectiveness of the proposed motion planning was demonstrated by performing a series of simulations.Izumi T [27] researched the energy consumption of the robot's joint servo drive system under no-load conditions, clarified the effect of Coulomb friction, and proved the linear relationship between the optimal angular velocity cross time and the minimum energy consumption.Most of the above researches are focused on lightweight, light-loaded, and less joint mechanical arm.In this paper, the MD1200-YJ is a high speed and heavy load palletizing robot; it involved 4 joints and contains multiple constraint branches, which involves more factors, more variables, and more complicated problems.
In this paper, the minimum energy trajectory optimization of the joint drive system of MD1200-YJ palletizing robot is researched.Firstly, based on the conventional inverse rigid body dynamic model of the robot, the Stribeck friction model, and the spring balance torque model, a multifactor dynamic model of the palletizing robot is established.And then by combining joint torque, friction torque, and motion parameter with joule's law, the useful work model, thermal loss model of joint motor, friction energy consumption model of joint system, and total energy consumption model of palletizing robot are established.And through simulation and experiment, the correctness of the multifactor dynamic model and energy consumption model is verified.Secondly, the joint motion law is constructed by using the Fourier series approximation method, and taking the coefficients of Fourier series as optimization variables, the minimum energy consumption is taken as the optimization objective, the motion parameters of initial and final position and running time constant as constraint conditions, and the minimum energy consumption trajectory of the joint system is optimized by the genetic algorithm.Finally, the effectiveness of the optimization method is verified by simulation analysis.

Establishment of Energy Consumption Model of MD1200-YJ Palletizing Robot
Based on Kane equation method and the structural characteristics of MD1200

. . Introduction to the Mechanism of MD
-YJ Palletizing Robot.The MD1200-YJ palletizing robot is a 4-DOF multijoint robot, load capacity: 120kg, maximum turning radius: 2400mm, repeat positioning accuracy: ±0.4mm, waist maximum rotation speed: 85 ∘ /s, belonging to high speed and heavy load palletizing robot, its 3D model shown in Figure 1.It is mainly composed of machine base, waist joint, small arm joint, drive arm of small arm, balance spring cylinder, balancing weight, small arm drive link, attitude hold link1, attitude hold tripod, attitude hold link2, small arm link, big arm joint, big arm link, waist mounting bracket, end effector mounting bracket, and so on.The action of two parallelogram mechanical linkages (one consists of attitude hold link1, big arm link, attitude hold tripod, and waist mounting bracket, and the other consists of attitude hold tripod, attitude hold link2, small arm link, and end effector mounting bracket) makes undersurface of end effector keep parallel to the ground.

. . Establishment of Multifactor Dynamic Model of MD
-YJ Palletizing Robot.On the basis of the conventional rigid body inverse dynamics model of robot, the multifactor inverse dynamics model of palletizing robot with considering joint friction torque and spring balance torque is established.
. . .Rigid Body Dynamics Model.Rigid body dynamics model for MD1200-YJ palletizing robot is derived using Kane equation method in this paper.The basic idea of Kane equation method is to replace the generalized coordinate with the generalized velocity as the independent variable of the system.When using Kane method for dynamic modeling, it only involves the cross product operation of the vector's dot product, which greatly improves the calculation efficiency.Meanwhile, the speed and acceleration of connecting link parts solution have the recursive nature, which is convenient for the computer to carry out numerical calculation.
Literature [12,13] described derivation ideas of Kane equation method in detail, and here we will not repeat them, but directly give the derivation results.
Assuming that   represents the drive torque of joint i, and the rigid body inverse dynamics equation of the robot system is obtained,   () =   (  ()) θ  () +   (  () , θ  ()) where   (  ()) θ  (),   (  ()), and   (  (), θ  ()), respectively, represent inertia term, gravity term, centrifugal term, and coriolis force term in the joint drive torque.According to the motion characteristics of the palletizing robot, the model is considered to be simplified properly without affecting the accuracy of the dynamic modeling of the robot.Ignore the rotatory joint (i.e., the wrist) of the end effector and fix the end effector directly to the end of the small arm.Therefore, the dynamic model only describes the dynamic characteristics of the waist joints, shoulder joints, and elbow joints, and corresponding subscript i =1, 2, 3, respectively.

. . . Establishment of Joint Friction Model for Palletizing
Robot.The Stribeck models of the waist joint, shoulder joint, and elbow joint of the MD1200-YJ palletizing robot are established and their parameters are identified.
( ) Establishment of Joint Friction Torque Model of Robot.A single joint servo system mainly composed of AC servo motor and speed reducer is taken as an example, and its abstract model is shown in Figure 2. The speed reducer is divided into two parts according to the high-speed and low-speed  stages.The motor output shaft is connected with the highspeed stage, which is called the high-speed shaft.The low speed stage is connected to the load, called the low-speed shaft.
In Figure 2 , n is the deceleration ratio of the joint speed reducer;  motor is the output torque of the motor (N⋅m);  connect is output torque of high-speed level (N⋅m);  ⋅  connect is input torque of low-speed level (N⋅m); J h , J l are, respectively, the rotational inertia of the high-speed part and the low-speed part (kg⋅m 2 ); θ ℎ , θ  are, respectively, the angular acceleration of the high-speed part and the low-speed part (rad/s 2 );  ℎ ,  are, respectively, the friction torque of the high-speed part and the friction torque of the low-speed part (N⋅m);  load is load torque (N⋅m).
Here, Lagrange equation is used for dynamic modeling of low-speed shaft and high-speed shaft, respectively [17].
Dynamic Model of High-Speed Sha .As shown in Figure 2, the kinetic energy and potential energy of the high-speed part composed of motor and high-speed shaft are, respectively, (2) where, K h , P h , and L h are, respectively, the kinetic energy, the potential energy, and the Lagrange function of the high-speed part, and a is a constant.Calculate, respectively,  ℎ / θ ℎ , (/)( ℎ / θ ℎ ) and  ℎ / ℎ , results are as follows: The external force acting on this part has motor driving torque  motor , friction torque  ℎ , and restoring torque of the low-speed part  connect , according to the Lagrange method and has Substitute equations ( 5), (6), and ( 7) into (8), and the simplification is as follows: Stribeck model of friction torque  ℎ is as follows [16]: ) sgn ( θ ℎ ) +  2ℎ θ ℎ (10) where  ℎ ,  ℎ , θ ℎ and  2ℎ are, respectively, maximum static friction force, Coulomb friction force, Stribeck characteristic velocity, and viscosity friction coefficient for highspeed part.
Dynamic Model of Low-Speed Sha .As shown in Figure 2, the kinetic energy and potential energy of the low-speed part composed of load and low-speed shaft of the speed reducer are, respectively, where, K l , P l and L l are, respectively, the kinetic energy, the potential energy, and the Lagrange function of the low-speed part, and b is a constant.Calculate, respectively,   / θ  , (d/d)(  / θ  ), and   /  , and the results are as follows: The external force acting on this part has restoring torque of the low-speed part  ⋅  connect , friction torque   , and load torque  load , according to the Lagrange method and has Substitute equations ( 14), (15), and ( 16) into (17), and the simplification is as follows: Stribeck model of friction torque   is as follows: where   ,   , θ  , and  2 are, respectively, maximum static friction force, Coulomb friction force, Stribeck characteristic velocity, and viscosity friction coefficient for lowspeed part.
The expression for the load moment is as follows: where  load is the rotational inertia of the load; T is torque generated by gravity, friction, and so no.The combination of equation ( 9) and equation ( 18) is obtained, where friction term  ℎ +(1/)  is described by total friction   , mean ( ) Simplified Method for Parameter Identification of Friction Model.In literature [28], the high-speed shaft and low-speed shaft of the reducer are separately used for friction modeling, which brings great difficulties to the identification of friction parameters.On the one hand, it is necessary to detect the friction in the gear reducer; this detection has difficulty.On the other hand, the number of friction parameters needed to be identified is large and the difficulty of identification is also increased.
Literature [29] points out that surface topography, sliding speed, and contact pressure are important factors influencing friction behavior of sliding contact interface.Considering that material and lubrication conditions of high-speed shaft and low-speed shaft of the speed reducer are almost the same and friction behaviors are similar, in order to reduce the difficulty of parameter identification, both of them take the same static and dynamic friction parameters, mean The friction parameters of four equations in equation ( 23) are expressed as uniform symbols, which are expressed as follows  2 ,   ,   , and θ  .Friction torque is a function of the angular velocity of the joint.Therefore, the corresponding frictional torque of the system at different steady state velocities can be measured, and frictional model can be fitted with the least square method, so as to obtain its identification parameters.
Assuming that the observed value of the total friction torque is   , predictive value is τ , definition identification error is Definition the objective function for parameter identification: Motor RV speed reducer

Input gear
The second speed reduction part The first speed reduction part Spur gear Using the least square method, the friction parameters are obtained by fitting the measured speed-friction torque curve, and the minimum value of objective optimization function Je can be obtained.
( ) Establishment of Waist Joint Friction Model.Abstract model of waist joint system is shown in Figure 3.The speed reducer is composed of the first speed reduction part and the second speed reduction part.The first speed reduction part is composed of the input gear and the center gear, and its reduction ratio is  11 = 3.91.The second speed reduction part is input from spur gear to RV reducer.The RV reducer adopts the mode of shaft fixed and enclosure output, and its reduction ratio is n 12 =35.61.In addition, motor1 is output torque of waist motor (N⋅m);  connect1 is output torque of input gear (N⋅m). 1 is the total friction torque to the motor shaft,  11 is the friction torque on the high-speed shaft,  1Z is the total friction torque on the intermediate shaft,  12 is the friction torque on the intermediate shaft, and  13 is the friction torque on the second speed reduction part.
( ) Stribeck Friction Model of the Waist Joint System.Combined equations ( 10), (22), and (23) establish friction models for the first and second speed reduction parts, respectively.
Friction model of the second speed reduction part: ) sgn ( θ 1 ) +  21 θ 1 ]  12 (26) Friction model of the first speed reduction part, namely, the total frictional moment model of the waist joint: where θ 1 is angular velocity of the waist joint;  1 ,  1 , θ 1 , and  21 are, respectively, maximum static friction force, Coulomb friction force, Stribeck characteristic velocity, and viscosity friction coefficient, and these four parameters need to be identified.
( ) Parameter Identification of Waist Joint Friction Model.The waist joint rotates at a constant velocity, the inertial force is zero, and the shaft of the joint is parallel to the direction of gravity; the motor output torque is equal to the system friction torquel therefore, the friction torque can be obtained by measuring the motor output torque, namely, Therefore, it is necessary to measure the motor output torque at different steady speed by experiment.
The experiment mainly collects the motion parameters and output torque of the servo motor of the waist joint of MD1200-YJ palletizing robot.The main equipment of the experiment is shown in Table 1. Figure 4 shows the experimental environment and relations of data stream between   (a) The IPC, as the upper computer, writes the motion control commands of robot joint servo motors by programming software.
(b) The upper computer transfers control commands to the servo driver, and the servo driver drives the motion of each joint servo motor according to the commands.(d) Run data acquisition software on PC, establish communication, and collect the required physical data.
In the experiment, only the waist joint moves; other joints do not move.The range of angular velocity of the waist joint is [0 ∘ /s, 100 ∘ /s].In [0 ∘ /s, 1 ∘ /s], take a point every 0.2 ∘ /s, take a point every 1 ∘ /s in [1 ∘ /s, 5 ∘ /s], take a point every 10 ∘ /s in (5 ∘ /s, 80 ∘ /s), and measure the corresponding friction torque.The relationship between the two is shown in Figure 5.Then, the friction parameters are identified by using the least square method, and the results are shown in Table 2.

( ) Establishment of Shoulder and Elbow Joint Friction Models.
The system abstract model of shoulder and elbow joints is shown in Figure 2. The reduction ratio of their reducer is n 2 =n 3 =171.
( ) Establishment of Shoulder Joint Friction Model.Combining (10), (22) with (23), the shoulder joint friction model is established: where θ 2 is angular velocity of the shoulder joint;  2 ,  2 , θ 2 , and  22 need to be identified;  2 is friction torque of the shoulder joint.

( ) Parameter Identification of Shoulder Joint Friction Model.
Unlike the waist joint, the shaft of the shoulder joint is perpendicular to the direction of gravity.Therefore, when shoulder joint moves at a constant velocity, it needs to overcome both the friction torque and the gravitational torque of the load.In order to measure the data of friction torque, the reciprocating constant velocity motion test method is adopted here [30]; namely, the following two groups of experiments are conducted.
Experiment I.The shoulder joint constant speed moves from  2 to  2 ' , and the output torque u 1 of the motor is measured.
Experiment II.The shoulder joint constant speed moves from  2 ' to  2 , and the output torque u 2 of the motor is measured.
Assumption.The output torque of the motor in Experiment I is where   ( 2 ) is gravitational torque;   ( θ 2 ) is friction torque.The output torque of the motor in Experiment II is Because every joint of MD1200-YJ palletizing robot adopts high precision RV reducer; the friction difference in the positive and negative directions is very small.Therefore, From equations ( 30) ∼ (32), it can be obtained that the friction torque and the weight torque are, respectively: According to the experimental data, the friction torque at different angular velocities can be obtained from equation (33).
In the experiment, only the shoulder joint moves, while the other joints do not move.Within the angular velocity range of the shoulder joint [0 ∘ /s, 75 ∘ /s], a point is taken every 0.2 ∘ /s within [0 ∘ /s, 1 ∘ /s], and a point is taken every 1 ∘ /s within [1 ∘ /s, 5 ∘ /s].In the (5 ∘ /s, 75 ∘ /s), a point is taken every 10 ∘ /s, and the corresponding friction torque is measured.The relationship between the two is shown in Figure 6.The friction parameters are then identified, and the results are shown in Table 3.

( ) Establishment of Elbow Joint Friction Model. The elbow joint friction model is as follows:
) sgn ( θ 3 ) Mathematical Problems in Engineering 9   where θ 3 is angular velocity of the shoulder joint;  3 ,  3 , θ 3 , and  23 need to be identified;  3 is friction torque of the shoulder joint.
The shaft of elbow joint is also perpendicular to the direction of gravity.The measurement of friction torque and the recognition of friction parameters are the same as that of shoulder joint.Here, the experimental data is directly given, as shown in Figure 7 and friction parameters, as shown in Table 4.

( ) e Dynamic Model of MD -YJ Palletizing Robot considering Joint Friction Is
Established.Because the model of the friction torque derived in this paper is to convert the friction torque of the joint system to the motor shaft; therefore, it needs to be converted to the output end of the joint; there is ( θ  ()) is joint friction torque;   is reduction ratio of each joint.
On the basis of equation ( 1), the friction torque term   ( θ  ()) is added to obtain the dynamic model considering  friction of joint i: where  *  is joint driving torque considering joint friction.
. . .Establishment of Torque Model of Balance Spring Cylinder.The balancing spring cylinder of MD1200-YJ palletizing robot has inner and outer two springs, and the spring parameters are shown in Table 5.
The force of the spring cylinder is shown in Figure 8.The cylinder barrel of the balance spring cylinder is connected with the upper big arm by hinge (at point B), and its cylinder rod is connected with the waist mounting bracket by hinge (at point A).The distance between the spring cylinder mounting hole on the waist mounting bracket and the shoulder joint shaft is d (230mm), and the angle between the big arm and the vertical direction is  2 .When the big arm moves from the OB' vertical position to the OB position, the balance spring cylinder extends with the rotation of the big arm (that is, the increase of  2 ), while the internal spring is compressed, generating the balance spring force  T .
Figure 8: Force analysis on spring balance mechanism.
Spring stiffness K: Two springs are installed in parallel, the total spring stiffness K: Spring preload: Two springs are installed in parallel, the total preload F 0 : Working length of the spring  AB : Spring deformation ΔX: Then, spring tension force generated in the working process F is Force arm of spring tension l f is Balance torque of the spring M  is Therefore, the dynamic model of shoulder joint considering joint friction and spring moment is established.
. .Establishment of Energy Consumption Model of MD -YJ Palletizing Robot.In this paper, the energy consumption of the robot joint is divided into the useful work to drive the load and dissipation energy due to friction and heat loss of the motor.
Since this study is carried out in the no-load condition, compared with the other three joints, the load of the wrist joint is small and its movement speed is not high, so its energy consumption is less [18].In order to simplify problem, energy consumption of the wrist joint is ignored.Therefore, the total energy consumption is only the sum of the energy consumption of the waist joint (i =1), shoulder joint (i =2), and elbow joint (i =3).
The following energy consumption model can be established for the motion of joint i system in t 0 to t f time: where   ,  motor , θ  ,   , i i , and   are, respectively, energy consumption, motor torque, angular velocity, reduction ratio of reducer, effective value of motor current, torque constant of motor, and equivalent resistance of motor of joint i.
The motor torque model of the joint i can be obtained from equations (37) and ( 49) And  motor has the following relationship with the effective current i i of the motor where k i is the torque constant of the motor of joint i.
The thermal power model of joint motor i can be obtained by joule's law combined with equation ( 52) Thus, the total energy consumption model of palletizing robot in t 0 to t f time is established.
Friction energy model: The total dissipative energy consumption model of palletizing robot in t 0 to t f time is established: The mechanical power of joint i The total mechanical energy model of palletizing robot in t 0 to t f time is established:  6-8.

Problem Description of Calculation Example.
In the basic coordinate system, the end position and posture of the palletizing robot are represented by coordinates (, , , Φ).The torque and mechanical power of the joint motor at the end of the joint from the base coordinate S 0 (1200mm, 1800mm, 800mm, 0rad) to the pose coordinate S f (-1200mm, 1200mm, 500mm, 0rad) are discussed.The interval of starting and ending time of motion is [0s, 3.5s].Through the forward and inverse kinematics solution, the joint coordinates corresponding to S 0 and S f , and the motion parameters at the start and stop time, as shown in Tables 9 and 10, the whole process of no-load operation is conducted.
According to the conditions given in this example, the trajectory planning of 3-4-5 polynomial motion law commonly used in engineering is carried out, and the expression is as follows: 1 = 0.9828 + 0.3203 3 − 0.1373 4 + 0.0157 5  2 = 1.0251 + 0.0296 3 − 0.0127 4 + 0.0014 5 The curves of end trajectory and the angular position of waist joint, shoulder joint, and elbow joint are shown in Figures 9 and 10.

. . . Validation of Dynamic Model and Energy Consumption
Model.According to the 3-4-5 polynomial motion law and the known motion parameters, the motion of each joint of the palletizing robot is controlled, and the data acquisition software is used to collect the torque and mechanical power data of each joint motor within a motion period.
It should be noted that since the data acquisition software cannot directly measure the heat loss of the motor and friction energy consumption, therefore, the total energy consumption of the palletizing robot cannot be directly measured.However, according to equation (54), the accuracy of the energy consumption model can be indirectly verified by comparing the experimental value of mechanical power with the simulated value.The experimental data collected show a trend of high frequency oscillation, but the overall trend is regular.Therefore, the fitting curve of the experimental data is obtained by the polynomial curve fitting method, as shown in Figure 11, and the fitting curve of experimental data is compared with the simulation curve of the theoretical model, as shown in Figure 12.
It can be seen from Figure 12 that the variation trend of the motor torque simulation curve of the three joints is similar to that of the experimental curve, which indicates that the multifactor dynamics model has higher accuracy.However, it can be seen that there is a certain error between the two, which may be caused by (1) the scale parameters and inertia parameters of all parts of the simulation model are measured by the 3D model, which are different from the corresponding parts of the actual prototype; (2) there will be errors in the experimental curve fitting.
The influence of friction torque and spring torque on output torque of shoulder joint motor is analyzed, as shown in Figure 13.It shows that the friction torque and spring torque have obvious effects on the output torque of the motor.The conventional rigid body dynamics model cannot fully reflect components of the joint torque.The addition of friction torque and spring torque makes the output torque of the shoulder joint closer to the real situation.
Next, the mechanical power data of each joint are analyzed.The mechanical power experimental data of waist joint, shoulder joint, and elbow joint are obtained through data acquisition software.The phenomenon of high frequency oscillation still exists, and the fitting curve of the experimental data is obtained by the polynomial curve fitting method, as shown in Figure 14, and compared with the simulation curve of mechanical power, as shown in Figure 15.
As can be seen from Figure 15, the variation trend of the mechanical power simulation curve of the three joints is similar to that of the experimental curve.As can be seen from Table 11, the theoretical value of mechanical power consumption differs from the experimental value by 80.2988          Mathematical Problems in Engineering J, with an error of about 7.69%, which proves the accuracy of the energy consumption model.

Minimum Energy Optimization of the Joint Drive System of Palletizing Robot
The MD1200-YJ palletizing robot is a kind of multijoint tandem robot, and there is complex coupling relationship between each joint.Single-joint system is the basic component of multijoint system, and its structure is relatively simple.For convenience of description, a single-joint system is taken as an example to illustrate the research process, and then this method is extended to the multijoint system of palletizing robot; in other words, based on the energy consumption optimization method of single-joint system, energy consumption optimization of each joint of palletizing robot is conducted, respectively.
. .Research Method of Minimum Energy Optimization for Palletizing Robot Joint System.Taking a single-joint system as an example, the theory and method of its minimum energy consumption optimization are illustrated, and provides the research basis for the multi-joint minimum energy consumption optimization of palletizing robot.

. . . Motion Law of Joints Are Constructed Based on Fourier
Series Approximation Method.By (1), (37), (49), and (54), the palletizing robot joints system energy consumption is a function of motion parameters.Therefore, the minimum energy optimization of joint system can be attributed to the problem of finding a motion rule that minimizes the total energy consumption of joint system.Because W S is a nonlinear function of motion parameters, which is hard to obtain the analytic solution, therefore, a Fourier series approximation method is used to solve the problem.
The method is as follows: assume the conclusion () obtained by optimization, but its expression has not yet been determined, can use Fourier series structure in advance a function expression of θ(); in this way, the complex variational solving problem is transformed into the problem of finding the optimal parameter with known expression structure, namely, coefficients of Fourier series θ() under the lowest energy consumption are optimized.
There are numerous motion paths of the joint system from the angular position  0 at the moment of t 0 to the angular position  f at the moment of t f , and these paths are represented here by ().
The definitional domain of () is [ 0 ,   ], and () are extended to the continuous periodic function θ() that satisfies the Dirichlet condition [30].θ() can be represented by Fourier series ().Within interval [ 0 ,   ]: This moment, the energy consumption optimization problem of the joint driving system is transformed into the search for Fourier series () to obtain the minimum energy consumption  min problem of the joint system in the time interval [ 0 ,   ], and the coefficients of the Fourier series are the optimization variables.
The expression of () is where   and   are the coefficients of the Fourier series,  0 is the constant term, and  0 is the angular frequency,  0 = /(  −  0 ).The constraint conditions that this formula needs to satisfy: The Fourier series is infinite series.In order to facilitate the practical operation, the finite terms are intercepted to approximate ().When the number of intercepted terms is large enough, a better approximation can be obtained.
Therefore, formula (62) is truncated into formula (64) to obtain the expression of the function representing any path: where M is the number of truncated terms (for convenience, this formula is also referred to as the Fourier series).The first and second derivatives of () are solved to obtain the corresponding expressions of angular velocity and angular acceleration: Therefore, the specific expression of the function representing any path is obtained.

. . . Genetic Algorithm and Energy Optimization of Joint
Drive System.Genetic Algorithm (GA) [31,32], originated from Darwin's theory of evolution, is an adaptive probabilistic optimization method for complex and nonlinear system optimization.
The MD1200-YJ palletizing robot is a kind of nonlinear and strongly coupled complex system, and the minimum energy consumption optimization problem of its joint systems can be solved by genetic algorithm.
Here, a single-joint drive system is used as an example to introduce the minimum energy consumption optimization method.
Formula (64), (65), and (66) are expressed as matrix forms: where Combining the equality constraint conditions of equation (62), the equality constraint coefficient matrix  and the equality constraint vector  can be obtained.
The upper and lower limits of the variables in Table 12 are set to the default values of UB and LB.
Run GA function and the output parameters are shown in Table 14.
. .Minimum Energy Optimization of the Joint Drive System of Palletizing Robot.Based on the above theories and methods of the joint minimum energy optimization, and combining the multifactor dynamics model, energy consumption model, and corresponding motion law, the minimum energy consumption optimization of MD1200-YJ palletizing robot multiple joints system is studied.

. . . Establishment of Joint Motion Equation Based on Fourier
Series Method.It is assumed that end effector of the palletizing robot moves from the position [ 0 ,  0 ,  0 ,  0 ] T at the time of t 0 to the position [  ,   ,   ,   ] T at the time of t f in the operating space.When starting and stopping, the corresponding relation between the palletizing robot's operating space and the motion parameters under joint space is shown in Table 15.
In order to obtain the minimum energy consumption of  S min , the Fourier series of the four joints of the palletizing robot is constructed, and M finite terms are intercepted, and the motion equation of the joints is obtained as follows: Mathematical Problems in Engineering The four joint motion equations must satisfy the constraint conditions: . . .Optimization of Fourier Series Genetic Algorithm.The fitness function of genetic algorithm is energy consumption W S , and the variables of this fitness function are   ,    ,   ,    ,   ,    ,   , and    , ( = 1, 2, 3 . . ., ), and four constant terms  0 ,  0 ,  0 ,  0 and the number of variables is 8 ×  + 4. Therefore, the complexity of optimization will depend on the number of Fourier series terms M in formula (73).The process of optimization is shown in Figures 16 and 17.
For the convenience of genetic algorithm optimization, formula (73) is written into matrix form: where Here, () is shown in the equation (69).According to equation (74), the constraint conditions in the genetic algorithm are determined.Assuming the equality constraint matrix  and the equality constraint vector , there are . . .Optimization Results and Evaluation.In order to explore the law and characteristics of the method, the genetic algorithm is applied to optimize the item number M 0 =3∼ 600, respectively, and the energy consumption under the aforementioned 3-4-5 polynomial motion law is compared in the same conditions.The total energy consumption values corresponding to the optimization results of different item number are shown in Figure 18.Here, in order to simplify problem, the total energy consumption is still the sum of the energy consumption of the waist joint, shoulder joint, and elbow joint.
( ) Analysis of Optimization Results.The following can be seen from Figure 18.
(1) Except M 0 =3, the energy consumption values of the motion law obtained by the optimization of other terms are less than that of 3-4-5 polynomial motion law.
(2) As the value of M 0 increases, its total energy consumption decreases first and then increases and finally keeps fluctuating within a certain range; moreover, when the value of M 0 =8, the total energy consumption reaches the minimum value of 917.5 J.

( ) Comparison between the Optimal Motion Law of Fourier
Series and the --Polynomial Motion Law.Here, Fourier series trajectories of M 0 =8 (the smallest total energy consumption) and M 0 =600 (the largest number of intercepting terms) are compared with 3-4-5 polynomial motion law.The comparison of the terminal trajectories is shown in Figure 19.
It can be seen from Figure 19 that the terminal trajectory under the M 0 =600 motion law is similar to that under the 3-4-5 polynomial motion law, and the smoothness is higher than that under the M 0 =8 motion law.In the following part, the motion characteristics, energy consumption characteristics, and dynamic characteristics of M 0 =8, M 0 =600, and 3-4-5 polynomial motion laws are evaluated, respectively.Here, the dynamic characteristics can be represented by the joint jerk, which is the first derivative of joint angular acceleration, and is an important indicator to evaluate the stability of robot motion.The smaller the joint jerk value, the smaller the change rate of angular acceleration, the better the stability of motion.
The following conclusions can be drawn from Figures 20-26 and Table 16.(1) As can be seen from Figure 20, the smoothness of the Fourier series trajectories of lower number of terms is not as good as that of the 3-4-5 polynomial trajectories, while the smoothness of the Fourier series trajectories of higher number of terms is significantly improved.
(2) As can be seen from Figures 22 and 26, as the number of terms increases, the number of high harmonics increases, the angular acceleration, and jerk of the Fourier series motion law show obvious oscillations, especially violent oscillation of jerk of M 0 =600.Therefore, the practicability of the high term number Fourier series trajectory needs further consideration.The jerk of M 0 =8 motion law is greater than 3-4-5 polynomial motion law, which indicates that its motion stability is lower.In the next step, further optimization research can    be conducted by combining other optimization indexes or constraints.
(3) It can be seen from Figures 21, 23, 24, and 25 that they are significantly affected by angular velocity and have similar change trend.It can be seen from Table 16, compared with the 3-4-5 polynomial motion law, the energy consumption of the motion law obtained by the Fourier series optimization method is significantly reduced, among which the total energy consumption of M 0 =8 reduced by 13.1% and its dissipation energy reduced by 15.3%.The effectiveness of the optimization method is verified.Since this research is carried out under no-load conditions, the dissipation energy consumption accounted for larger proportion of the total energy consumption, which also reflected the principle that "a big horse hauls a small gharry is wasting" commonly used in engineering.It can be speculated that when the palletizing robot drives a large load similar to the load capacity, the useful work will take a large proportion.

Conclusion
The minimum energy trajectory optimization problem of the joint drive system of MD1200-YJ palletizing robot is researched in this paper.(2) The joint motion law is constructed by using the Fourier series approximation method, and taking the coefficients of Fourier series as optimization variables, the minimum energy consumption is taken as the optimization objective, the motion parameters of initial and final position, and running time constant as constraint conditions, and then the minimum energy consumption trajectory of the joint system is optimized by the genetic algorithm.
(3) Through the calculating example simulation, the optimized M 0 =8 and M 0 =600 Fourier series and the 3-4-5 polynomial motion law are comprehensively evaluated.The energy consumption of the optimized Fourier series is generally lower than that of the 3-4-5 polynomial motion law, especially energy consumption of M 0 =8, which is total energy consumption reduced by 13.1% and dissipation energy reduced by 15.3% under the same conditions, the effectiveness of the optimization method is verified.However, M 0 =8 has a larger jerk value, and its motion stability is less than 3-4-5 polynomial motion law.Moreover, because the coefficients of the Fourier series (that is, the number of optimization variables) increase multiply with the number of terms, the computational complexity of the optimization solution is large, the convergence speed is slow, and the configuration requirements of the computing equipment are higher, to some extent, this method may be restricted in practical engineering application.Therefore, in the next step, further optimization research can be conducted: on the one hand, combine more optimization indexes or constraint conditions to reduce the jerk value of each joint under the Fourier series motion law; on the other hand, based on the Fourier series optimization method, some new optimization strategies need be explored to improve the calculation efficiency and reduce the difficulty of solving, to improve the practicability of this optimization method.

Figure 2 :
Figure 2: Single joint system abstract model.

Figure 3 :
Figure 3: Abstract model of the waist joint system.
(b) Relations of data stream between the experimental units

Figure 4 :
Figure 4: Experiment scene and relations of data stream between the experimental units.
(c) During the operation, the rotary encoder feedback data signals such as angular position and angular velocity to the servo driver.

Figure 5 :
Figure 5: Relation between friction torque and angular velocity of waist joint.

Figure 6 :
Figure 6: Relation between friction torque and angular velocity of shoulder joint.

Figure 7 :
Figure 7: Relation between friction torque and angular velocity of elbow joint.
) . .Validation and Analysis of Dynamic Model and Energy Consumption Model.Based on the example of 3-4-5 polynomial motion law, the multifactor dynamic model and energy consumption model are verified and analyzed by experiment and simulation. . . .Description of Palletizing Robot Parameters and Calculation Examples.The main parameters of MD1200-YJ palletizing robot are shown in Tables

Figure 11 :
Figure 11: Experimental fitting curves of joint motor torque.

Figure 12 :
Figure 12: Comparison of joint motor torque experimental curve with simulation curve.

Figure 13 :
Figure 13: Comparison of shoulder joint motor torque experimental curve with simulation curve under different conditions.

Figure 14 :
Figure 14: Experimental fitting curves of joint mechanical power.

Figure 15 :
Figure 15: Comparison of joint mechanical power experimental curve with simulation curve.

Figure 17 :
Figure 17: Process of the Calculation GA individual fitness value.

Table 2 :
Result of friction parameters of waist joint identification.

Table 3 :
Result of static parameters identification.

Table 4 :
Result of static parameters identification.

Table 5 :
Main parameters of spring.

Table 6 :
Main function size and material of palletizing robot.

Table 7 :
Parameters of motors and reducer.

Table 8 :
Mass of the main part of palletizing robot.

Table 9 :
Joint position of S 0 .

Table 10 :
Joint position of   .