Abstract
In order to reduce the energy consumption of the welding robot and ensure the cooperative movement of the robot joints, a trajectory planning method with optimal energy consumption based on improved sparrow search algorithm is proposed. Firstly, the trajectory planning model with optimal energy consumption is established based on the joint torque and angular velocity of the robot. To make the velocity, acceleration and jerk of each joint of the robot be bounded and continuous, the joint space trajectory is constructed with seventh degree B-spline curve. The total energy consumption of the robot is calculated by combining kinematic and dynamic parameters. On the basis of improved sparrow search algorithm, the time series corresponding to the optimal energy consumption is solved by using elite reverse learning, non-dominated sorting and Gaussian-Cauchy variation strategy, and then the optimal continuous motion trajectory of energy consumption is planned. The simulation results show that the proposed method can not only achieve continuous smooth control objective, but also effectively reduce energy consumption.
Keywords
Introduction
With the development of economy, energy shortage has become a global problem. Due to the increasingly prominent environmental problems and the demand for green manufacturing production, energy saving has become the development direction of the robot industry. 1 The optimization of robot motion process can not only save energy consumption and ensure work efficiency, but also has an important impact on the quality of work. 2 Therefore, the combination of intelligent methods for motion optimization and energy optimization of industrial robots has important theoretical research and practical application value.
Given the diversity and complexity of welding tasks, the number of robots performing welding related tasks accounts for almost half of the total number of industrial robots.3–5 Due to the harsh environment of traditional manual welding, it adds many potential hazards and difficulties to the task, and the welding efficiency is low. Therefore, welding robots have gained popularity. 6 Welding operations require high system execution accuracy, and how to find a reasonable welding path and reduce robot energy consumption while ensuring accuracy is the key to improving robot welding technology. 7 However, the reliability of the welding sequence planned by manual experience is low and cannot guarantee welding accuracy and efficiency. To address these issues, many scholars have conducted research on the time-consuming issue of welding operations. 8 In addition, the reasonable motion trajectory of the robot can ensure the smooth progress of welding tasks and improve the service life of the robot. 9 Therefore, studying appropriate welding trajectory planning methods is of great significance for the design and production of robot products.10,11
For some tasks with high precision requirements, they require the robot end effector to have strict attitude adjustment on the relevant path to accurately complete the welding task and avoid interference between the welding gun and the weld. This brings great challenges to the trajectory planning of robots. Trajectory planning generally requires path planning and interpolation operations, and trajectory planning is to develop to enable industrial robots to complete processing tasks faster and more smoothly. 12 Generally, robot trajectory planning can be divided into two categories: joint space planning 13 and Cartesian space planning. 14 The joint space planning only focuses on the joint motion without considering the robot singular pose and inaccessible space, etc., which is convenient for calculating robot energy consumption. Point to Point (PTP) trajectories are often used in joint space planning, including polynomial trajectories, Fourier trajectories, and linear trajectories fitting parabola, etc. The linear trajectories fitting parabola are mainly used in engineering applications, including trapezoidal velocity trajectories and S-shaped trajectories. At present, in the related research on trajectory planning aimed at reducing energy consumption, there are mainly two ways to evaluate energy consumption. One is to establish a robot power model based on robot joint torque and angular velocity, which is relatively simple, but does not take energy loss into account. 15 The other is to build a motor power model to reflect the system energy consumption according to the current and voltage in the motor, which is more accurate but the calculation is complicated.16–18
In contrast to (PTP) trajectories, 19 continuous motion trajectory planning enables the robot end-effector to work in the optimal position of a predefined path in its workspace (satisfying one or more given objectives and boundary conditions). 20 In order to smooth the robot through a predefined continuous motion path, B-spline curve 21 is often used in robot trajectory planning. At present, most studies are focus on the cubic spline trajectories or fifth spline trajectories. These trajectories cannot guarantee the smoothness of jerk trajectory and the non-mutation at the start and stop time of the robot, which has a great influence on the service life of the robot. In addition, the trajectory planning method only solves the continuous flat slip problem of discrete paths. Zhu et al. 22 apply seventh degree B-spline trajectory and sequence quadratic programing, which ensures manipulators to track any specified trajectory in joint space stably with the minimum running time. Kucuk 23 develop an optimal trajectory generation algorithm for generating minimum-time smooth motion trajectories for serial and parallel manipulators.
In order to meet the enterprise energy saving and consumption reduction goal, the trajectory should also meet the optimization criterion of the lowest energy consumption, and the quality of the trajectory directly affects the working energy consumption of the robot. 24 Finding the optimal trajectory for energy consumption has become one of the research focuses in the field of trajectory optimization. 25 proposes a 3-D subsea global path planning algorithm for path optimization of undersea operation of deep-sea landing vehicles. Pellicciari et al. derive the electromechanical model of series-parallel robots, and calculate the energy optimal trajectory by using the time-invariant scaling method from the predetermined trajectory. 26 Yokose propose the combination of gradient method and genetic algorithm to solve nonlinear problems quickly and minimize the friction energy consumption of the robot. 27 The path planning problem of welding robots can be changed into a typical TSP solving problem, the introduction of intelligent algorithm can solve this kind of problem well. 28 Some common optimization algorithms have the disadvantages of complex structure, too many parameters, and complicated adjustment mechanism, such as genetic algorithm, particle swarm optimization algorithm and convex optimization algorithm. Using these algorithms may not be able to obtain the global optimal solution when dealing with the trajectory planning problem of robot energy consumption. Gregory et al. 29 take both limitations of the actuators and the dynamics of the system into account and provide dynamically feasible and energy optimal trajectories. 29 Hansen et al. 30 propose a novel cost function formulation for minimization of the energy consumption of industrial robots. 28
The emerging sparrow search algorithm has the advantages of few adjustment parameters, simple structure, adaptive adjustment and information feedback mechanism, and this algorithm can balance the contradiction between local search and all search to a certain extent. 31 Aiming at the problems of slow convergence speed and low convergence accuracy in robot path planning, this paper proposes a trajectory planning method based on improved sparrow search algorithm for industrial robot energy consumption optimization. Firstly, the seventh degree B-spline trajectory is determined with UR5 robot as the research object. Secondly, the inverse dynamics equation of the robot is constructed by using the Newton-Euler method and the energy consumption equation is derived. Finally, the improved sparrow search algorithm is used to optimize the energy consumption under various constraints, and the optimal motion trajectory of the robot joints is determined accordingly.
The innovations of this paper are as follows:
(1) We propose a trajectory planning method based on seventh degree B-spline interpolation, which ensures continuous and smooth trajectory of joint velocity, acceleration, and jerk, and improves the smoothness of robot operation.
(2) We propose an improved sparrow search algorithm based optimal trajectory planning method for robot energy consumption, which improves the energy utilization efficiency of the robot.
(3) The optimal energy consumption robot motion trajectory planning method based on intelligent algorithms can not only ensure the continuity and smoothness of the trajectory, but also reduce energy consumption under various kinematic constraints.
Trajectory planning model with optimal energy consumption
In this section, the construction method of seventh degree B-spline trajectory is introduced, the robot dynamics are analyzed, and the optimization model is established.
Joint space trajectory planning
First, we convert the discrete Cartesian position points to a joint position time series through inverse kinematics:
where TP is joint position-time series;
The smooth trajectories of each joint corresponding to the joint angle set of the robot are obtained by B-spline interpolation. To ensure that the seventh degree B-spline trajectory passes through the first and last nodes, set 7 + 1 multiple nodes at the first node and last node. The B-spline trajectory can be expressed as:
where,
The velocity trajectory
According to the De-Boor recursion formula,
Kinetic analysis
The link of robot is regarded as the rigid body, then the robot is a multi-rigid series/parallel mechanism. If all joints of the robot are rotatory joints, then the general expression of the Newton-Euler inverse dynamics equation at point
where
in which,
Optimization model building
In order to enable the robot to perform more tasks more efficiently with limited energy, it becomes particularly important to reduce the energy consumed during its work, regardless of friction and motor heating, and regarding the mechanical energy consumed during the movement as the total energy consumption of the robot.
where
Improved sparrow search algorithm
Heuristic algorithm is usually used for parameter optimization in order to quickly find the appropriate trajectory parameters, optimize the robot’s energy consumption and meet the time requirements. The sparrow search algorithm (SSA) divides sparrows into three categories according to three behaviors: finding, foraging and observing. The renewal formulas of the three types of sparrows are shown in (9). However, SSA also has some defects, that is, the initial population quality is poor and it is easy to fall into the local optimal solution, which leads to the premature phenomenon of the algorithm. In order to improve the quality of the initial solution, accelerate the convergence speed and enhance the search ability of the whole office, the following improvement strategies are proposed.
Scheme 1
Compared with the standard SSA that generates the initial population randomly, using the elite reverse learning strategy to optimize the initial population can expand the search range of the algorithm and further accelerate the convergence rate of the algorithm.
If the robot contains
where
Scheme 2
In order to prevent the algorithm from falling into the local optimum and resulting in the premature phenomenon, and improve the accuracy of the algorithm, the Gauss-Cauchy mutation strategy is introduced in the iteration process to mutate the best individual of each generation. After the mutation, the sparrow position is updated as follows.
where
According to equation (12), Gaussian mutation has a strong local search ability, and Cauchy mutation has a strong global search ability. Therefore, when the change rate of energy reserve of the global optimal sparrow is less than the threshold
Scheme 3
The standard sparrow algorithm is a multidimensional unconstrained optimization method. The problem of optimal trajectory planning for robot energy consumption is a multi-kinematic constraint optimization problem. In order to make the algorithm have the ability to deal with constraint problems, the constraint conditions are first transformed into the target of constraint violation degree, and then all sparrows in the population are sorted and classified by using the non-dominated sorting strategy.
According to the above design, flowchart of the ISSA algorithm is shown in figure 1 and multiple kinematic constraints is as follows:
(1) Set the algorithm parameters to generate the initial population;
(2) Elite opposition-based learning optimizes the initial population and sorts the initial global optimal sparrow;
(3) Update the sparrow population and sort it;
(4) Contemporary optimal sparrow Gaussian Cauchy mutation;
(5) The fitness values of the contemporary best sparrow and the global best sparrow before and after mutation are compared, and the lowest fitness value is the global best sparrow;
(6) If the maximum number of iterations is reached, the algorithm is terminated and output the optimization result, otherwise, the new population is obtained by returning (3).

Flowchart of the ISSA algorithm.
Simulation and discuss
The welding robot has six rotating joints, which enables it to reach any position in the Cartesian workspace, so the UR5 robot is used to verify the proposed method. Taking the return trip after palletizing without load as an example, eight path points are predefined, and the corresponding angles of each joint are obtained after inverse solution, as shown in Table 1.
Joint angle sequence.
The number of iteration of the algorithm is set to 50, the population is 100, the number of discoverers accounted for
We compare the proposed ISSA with SSA and PSO algorithm. The optimal iteration curve of PSO algorithm and SSA algorithm is compared with the iteration curve of SSA algorithm to obtain the optimal individual evolution diagram as shown in Figure 2.

Total energy consumption.
As shown in Figure 2, compared with PSO and SSA algorithms, the total energy consumption of tracking robot trajectory planning based on the improved sparrow search algorithm is the least, the energy consumption based on SSA algorithm is the second, and the energy consumption based on PSO algorithm is the largest. We can also see that the convergence speed of PSO algorithm is the slowest, which converges after 43 iterations, and the optimal solution is
In order to verify the solving efficiency of ISSA, the average values of 20 operation times of the three algorithms were compared, and the results were shown in Table 2. The results show that the average running time of ISSA algorithm is significantly lower than that of the other two algorithms, which proves that ISSA algorithm has certain superiority in trajectory optimization.
The average running time of the algorithm.
The time series corresponding to the optimal energy consumption optimized by ISSA algorithm is shown in Table 3. In order to verify the feasibility of the solution obtained by ISSA algorithm, the position, velocity, acceleration and jerk curves of each joint are drawn as shown in Figures 3 to 6. Figure 3 shows that each joint trajectory of the robot obtained by planning can accurately pass through the preset target point.
Time series.

Joint position.

Joint angular velocity.

Joint acceleration.

Joint jerk.
According to Figures 3 to 6, seventh degree B-spline can smooth the trajectory while ensuring that the velocity, acceleration and jerk of each joint are 0 at the time that the robot starts and stops, which can effectively reduce the friction between joints and prolong the service life of the robot. Therefore, it is feasible to use ISSA algorithm for optimal trajectory planning of robot energy consumption.
Conclusions
(1) A trajectory planning method based on seventh-degree B-spline interpolation is proposed to ensure the continuous smoothness of each joint’s velocity, acceleration and acceleration, so that the robot can improve its running smoothness on the basis of passing through each specified waypoint.
(2) The sparrow search algorithm is improved, and the non-dominated sorting strategy is introduced to make the algorithm have the ability to solve nonlinear multi-constraint problems; At the same time, the elite opposition-based learning and Gauss Cauchy mutation strategies are added to improve the population diversity, avoid the algorithm falling into local optimum, and improve the solution quality, efficiency and convergence speed of the algorithm.
(3) The simulations are carried out in the joint space, and the results show the trajectory is continuous and smooth and meets the kinematic constraints, which verifies the feasibility of the proposed method.
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: This work is supported by: 1) Hubei Province Technology Innovation Key Research and Development Project (No. 2023BAB071); 2) National Natural Science Foundation of China (No. 52205536); 3) Hubei Province Central Government Guide Local Science and Technology Development Project (No. 2022BGE035); 4) Hubei Province Nature Science Foundation (No. 2023AFB380).
