1. Introduction
In recent years, robots have been utilized extensively in welding, spraying, handling, palletizing, and other forms of automated production [
1]. Trajectory planning is the foundation of motion control for robots. It generates the time series of the robot’s position, velocity, and acceleration at each point along the smooth path, based on the required performance index [
2]. The performance, motion stability, and energy consumption of industrial robots are strongly influenced by the quality of their planning. Therefore, trajectory planning has long been a topic of interest among experts at home and abroad [
3]. The planning of robot trajectories can be separated into cartesian space planning and joint space planning. Planning trajectories in cartesian space require a continuous correlation between the path of the end-effector and the path in joint space. Its inverse solution requires a great deal of calculation, and the process of solving [
4] involves singular-value problems. However, the inverse solution of joint space trajectory planning takes less computing, allowing the singular-value problem to be avoided during the solution process. Moreover, it can modify the time variation of the position, angular velocity, and angular acceleration of the robot joints in real time in accordance with the design specifications [
5]. Therefore, the joint space trajectory planning method is utilized in this paper.
Time-optimal trajectory planning aims to minimize the robot’s running time. Depending on the motion law, a time-optimal trajectory is planned based on the specified constraints. Industrial robots must increase job efficiency and economic benefits [
6]. In actual production, however, the central issue is ensuring that the robot end-effector completes the task smoothly and stably and reaches the specified position in the shortest time possible [
7]. The robot trajectory generation method includes the case where interpolation is required and the case where interpolation is not required [
8,
9]. The polynomial interpolation function makes it easy to determine the boundary state of a robot trajectory due to its simple and fast calculation and is frequently used for robot trajectory planning [
10]. Therefore, this paper primarily studies the time-optimal trajectory planning problem in the case of the polynomial interpolation function. Quintic polynomial interpolation not only solves the problems of cubic polynomial interpolation’s non-smooth angular velocity and jump acceleration but also avoids the problems of cubic polynomial interpolation’s complex calculation methods and many constraints [
11]. Therefore, it has apparent advantages.
The literature [
12] proposed a robot trajectory planning method based on piecewise continuous functions. This technique enhanced the velocity of quintic polynomial interpolation by combining the properties of the trapezoidal function and the trigonometric function. Finally, an experimental platform consisting of a 4-DOF manipulator was used to verify the trajectory. The results indicated that this strategy effectively reduces execution time. Analooee A. et al. [
13] proposed a novel trajectory planning method based on explicit quintic polynomial curves. The boundary curvature constraint conditions were constructed using the rotation coordinate reference for the border condition and standardized programming. It was demonstrated that the proposed method could create optimal trajectory running time compared to previous methods. In the literature [
14], the ideal robot time trajectory was determined by adding restrictions for torque and acceleration and using the convex optimization approach.
Although the methods mentioned above have yielded some results, it is difficult to determine the optimal time trajectory due to the limitations of polynomial interpolation trajectory planning [
15], such as its high order, lack of convex hull property, and a large number of setting parameters. The emergence of intelligent optimization algorithms has made time-optimal trajectory planning with intelligent algorithms a worthy objective. Li Y et al. [
16] proposed the improved cuckoo search technique to optimize polynomial interpolation time. A trajectory simulation was performed in a shared space using the UR robot as the research object. The suggested technique delivers a better time-optimal trajectory under velocity limitations than the traditional cuckoo search algorithm, particle swarm optimization algorithm, and genetic algorithm. The literature [
17] proposed the highly smoothing time-optimal trajectory approach of a manipulator based on the adaptive elite genetic algorithm. This strategy was combined with quintic polynomials. Experimental results demonstrated that the proposed method was more effective than the original genetic algorithm, ensuring the robot’s smooth and efficient operation. The literature [
18] indicated that variable weight particle swarm optimization was employed to optimize the robot’s running time. To ensure the accurate and secure operation of fracture reduction and orthopedic robots, it is possible to avoid the issue of unequal soft and hard traction rates.
Heidari et al. developed the Harris Hawks Optimization (HHO) algorithm in 2019 as a novel swarm intelligence optimization algorithm [
19]. Similar to other swarm intelligent optimization algorithms such as particle swarm optimization (PSO) and fruit fly optimization algorithms (FOA), it has the advantages of good applicability, robustness, and easy implementation [
20]. It is widely used in the fields of time series prediction, neural network parameter optimization, task cooperative planning, and other fields [
21]. The difference is that HHO adopts a multi-population search strategy. It can avoid problems such as single population diversity, low mutation probability, limited search space, and local extreme values of PSO and FOA. However, because some key parameters in HHO are simply set to constant or linear attenuation, efficient optimization cannot be achieved [
22]. Improved local and global optimization values were suggested as a means of enhancing the performance of basic HHO. The literature [
23] proposed the chaotic Harris hawks optimization. Utilizing chaos mapping and a simulated annealing approach, the existing optimal solution was optimized, and the HHO optimization accuracy was enhanced. Fan Q et al. coupled the HHO method and a quasi-reflection-based learning mechanism and evaluated it on 23 distinct benchmark function types and dimensions [
24]. The results indicated that it significantly enhanced the convergence rate and solving precision of basic HHO. In addition, hawks optimization was incorporated into HHO to improve the accuracy with which reliability problems might be solved [
25]. Many improvements focusing on HHO were elaborated in the past few years, but few researchers could balance both global and local extremes.
This paper proposes a robot time-optimal trajectory-planning approach based on quintic polynomial interpolation and the improved Harris hawks algorithm (IHHO). The starting point, two intermediate points, and the terminating point of the robot end-effector are provided. Inverse kinematics was used to determine the angular positions of each joint when the end-effector passed through the set path point. Each joint’s adjacent angular positions are related by quintic polynomials. The angular velocity curve and the angular acceleration curve can be derived from the diagonal position curve in the first and second orders. HHO was utilized to optimize the running time within the limitations of the maximum angular displacement, angular velocity, and angular acceleration of each joint to overcome the challenge of calculating the best running time of polynomial interpolation trajectory planning. Meanwhile, a nonlinear energy attenuation technique is presented to improve the energy attenuation factor E1 to adapt and transition global search and local mining and enhance convergence accuracy and speed. Finally, taking total running time synchronization as the criterion, the maximum time of each joint in the same stage was obtained. Each joint’s kinematic constraints can be satisfied, and the optimal-time trajectory can be planned.
The rest of the paper is organized as follows: The robot kinematics model, quintic polynomial interpolation algorithm, and objective function for trajectory optimization are introduced in
Section 2.
Section 3 introduces the fundamental principle of HHO, its improvement, and the planning procedure. In
Section 4, the strategies for time-optimal trajectory planning based on several biological algorithms are compared. Under optimal time, the trajectory of each joint and end-effector is analyzed. The superiority and efficacy of the proposed procedures are verified. Under optimal time, the trajectory of each joint and end-effector is analyzed.
Section 5 summarizes some conclusions and prospects.
3. Time-Optimal Trajectory Optimization Method of Robot
3.1. Harris Hawks Optimization Algorithm
HHO is a new algorithm for population evolution proposed by Heidari et al. in 2019 [
19]. The steps of the HHO process are as follows [
32]:
- (1)
First, the population position is initialized, and the target matrix is set up to store the fitness values of Harris hawks in each iteration. The initial position matrix
is:
where
represents the value of the
j-th dimension of the
i-th Harris hawk,
is the total number of Harris hawks, and
represents the dimension of the question. The target matrix
is:
where
is the fitness function.
- (2)
All individual position dimensions generated during each iteration are examined. The population position is updated, according to (12).
where
is the position of the
i-th updated Harris hawk,
X(
i,:) is the position of the
i-th Harris hawk,
is the matrix composed of a dimension of the
i-th Harris hawk position greater than the upper limit of the search space, and
is the matrix composed of a dimension of the
i-th Harris hawk position smaller than the lower limit of the search space.
- (3)
The value of the prey’s escape energy
determines the different behavior of Harris hawks. Formula
is:
where
x is the number of current iterations,
is the random number between (−1,1),
is the maximum number of iterations, and
represents the nonlinear energy attenuation factor.
- (4)
When
, the algorithm enters the stage of global search. Depending on whether
q is greater than 0.5, it is divided into two predation strategies. The formula for the global search stage is as follows:
where
represents the position of the next generation of Harris hawks.
is the position of prey.
represents the current average position of the Harris hawk group, referring to (15).
represents the position of random individuals in the Harris hawk group.
is the current position of the Harris hawks.
is the random number between (0, 1).
where
represents the position of each Harris hawk in iteration
x.
- (5)
When , the Harris hawk group enters the local search phase and has four round-up methods, given below.
Soft besiege: When
and
, the mathematical model at this stage is:
where
is the random jump intensity of the prey, and
is the random number in the interval
Hard besiege: When
and
, the model at this stage is:
Soft besiege with progressive rapid dives: When
and
, the model at this stage is:
where
represents the fitness value of the minimization problem and
and
are:
where
represents the random vector with size
,
denotes the dimension of the problem, and
is as follows:
where
and
are random numbers on (0,1), and
is set to 1.5.
Hard besiege with progressive rapid dives: When
and
, the mathematical model of this stage is:
where
and
are, respectively:
- (6)
Determine whether the current iteration times
x reaches the maximum iteration times
or the required precision. If so, output the current optimal solution; otherwise, continue searching. The hunting behavior of Harris hawks is shown in
Figure 3 [
33].
3.2. Improvement of HHO
From the basic HHO, it can be seen that the size of
plays an important role in adjusting and transitioning global search and local mining. The smaller
is, the more inclined HHO is to perform local mining, and the larger
is, the more inclined HHO is to explore globally [
34]. In addition, the prey energy decay factor
determines the overall trend of escape energy
[
35]. However, in the traditional HHO,
updates mode decreases linearly from 2 to 0, which does not accurately describe the real process of energy consumption of Harris eagles in nature when they hunt prey [
34]. In other words, the energy consumption of the prey during the initial days of the Harris hawks colony when it was spotted and pursued varied greatly. As the prey eventually entered the ring of encirclement, the Harris hawks group did nothing except circle around, and as the prey regained some resting energy and its consumption slowed. In later periods, Harris Hawks hunted prey, and the prey’s energy requirements were altered dramatically once more. Alternatively, in the process of improvement, it is necessary not only to ensure the global search capability in the early stage and the transition from global search to local search in the middle stage but also to ensure the local development capability in the late stage and accelerate the local search. Therefore, the nonlinear energy decline strategy is proposed to improve
, which is expressed as follows:
Then, the improved
is expressed as:
where
represents the number of iterations,
is the maximum number of iterations, and
denotes a random number of
.
Figure 4 shows the variation trend of the prey energy attenuation factor in the interval (0,2) before and after improvement when the number of iterations T = 600. Compared with the original
, the improved
decreases rapidly in the early stage from 0 to 200 generations, which controls the global search ability of the algorithm. The middle stage of 200 to 400 generations changes slowly, balancing global and local search capabilities. The later stages of 400 to 600 generations were rapidly reduced to speed up the local search while ensuring strong local development capabilities. The
updated pattern also matches the actual energy expenditure of hunted prey. As shown in
Figure 5, the overall change trend of
is the same as that of
. Processes and pseudocodes of IHHO are shown in
Figure 6 and Algorithm 1.
Algorithm 1. Pseudocode of IHHO. |
Inputs: N and T |
Outputs: Xrabbit |
Initialize Xi (i = 1, 2, …, N) |
While (Termination has not happened) do |
Calculate the fitness values |
Set Xrabbit as the best solution |
for (each solution (Xi)) do |
Update E0 and jump strength J E0 = 2 rand ()−1, J = 2(1-rand ()) |
Update E refer to (26). |
If (|E| ≥ 1) then Exploration phase (global search) |
Updating process performs referring to (14). |
If (|E| < 1) then Exploitation phase (local search) |
If (r ≥ 0.5 and |E| ≥ 0.5) then |
Updating process performs referring to (16). |
else if (r ≥ 0.5 and |E| < 0.5) then |
Updating process performs referring to (17). |
else if (r < 0.5 and |E| ≥0.5) then |
Updating process performs referring to (18). |
else if (r < 0.5 and |E| < 0.5) then |
Updating process performs referring to (22). |
Return Xrabbit |
3.3. Planning Process
IHHO is used to optimize the time of the joint within the constraints of the maximum angular position, angular velocity, and angular acceleration of each joint to produce the optimal running time of the robot trajectory. A robot time-optimal trajectory planning method is proposed based on quintic polynomial interpolation and the improved Harris hawks algorithm. The algorithm’s main flow is as follows:
Step 1. The parameters such as population size , maximum Iteration times , optimization dimension , the upper limit of search space , the lower limit of search space , and the initial fitness value are initialized. The population location is also initialized. In the optimal trajectory planning method based on quintic polynomial interpolation and IHHO, , , and are the parameters to be optimized and generated by IHHO.
Step 2. Check that all dimensions of the generated group of times fall within the specified range and adjust them for updates. Equation (8) is used to calculate the fitness value of the updated groups of time successively.
Step 3. The N sets of fitness values are compared with the initial fitness value . The in N sets of fitness values that is less than initial fitness value is retained. The corresponding time group is also preserved. Then the corresponding quintic polynomial coefficient matrix of is solved. Among them, the restrictions for solving are the angular position and the starting and ending angular velocity of the optimized joint. In the search dimension space of , and , the angular position , angular velocity , and angular acceleration equations in , and periods are established by . Then equations satisfying the constraints of maximum angular position , angular velocity , and angular acceleration are sought. The time group corresponding to the equations satisfying the constraints are preserved. The fitness values of the time group are traversed and compared in turn. The best time group and the best fitness value are retained. The best fitness value is assigned to .
Step 4. According to the escape energy of the prey, groups time of the next generation is generated, and steps 2 and 3 are repeated. The fitness value is less than and the corresponding time group is obtained. The time group corresponding to the equations satisfying the constraints is found. The optimal time group and the optimal fitness value of this generation are obtained by comparing the fitness of . The is assigned to , and the position of the population is updated.
Step 5. Determine whether the maximum number of iterations is reached or whether the error meets the preset accuracy. If so, the iteration will be terminated, and the optimal time group
and the optimal fitness value
of the optimized joint will be output. The flowchart of the process can be seen in
Figure 7.
5. Conclusions and Future Work
This paper proposes a time-optimal trajectory planning method for robots based on quintic polynomial interpolation and an improved Harris hawks algorithm. The nonlinear energy reduction strategy is introduced in the basic HHO to improve the convergence speed and precision. The PUMA560 robot serves as the platform for experimental verification. Using quintic polynomial trajectory interpolation, the starting point, intermediate point, and endpoint of each joint are fitted in the joint space. Under the constraints of angular displacement, angular velocity, and angular acceleration, the IHHO was utilized to optimize the trajectory time of each joint, with the target being the sum of each running time. Total running time synchronization was used to determine the optimal running time of the robot. The experimental results demonstrated that the proposed algorithm decreases the maximum time by 1.1062 s, 0.5705 s, and 0.3133 s, respectively, and improves by 33.39%, 19.66%, and 12.24% when compared to algorithms based on PSO, FOA, and HHO, respectively. In multiple groups of repeated experiments, the computational efficiency was reduced by 4.7019 s, 1.2016 s, and 0.2875 s relative to PSO, FOA, and HHO and increased by 52.40%, 21.96%, and 6.30%, respectively. It demonstrated that the proposed algorithm converges more quickly and precisely. The maximum angular position, angular velocity, and angular acceleration of each joint trajectory satisfy the constraint conditions under the optimal time. Their average values fell short of the maximum limit by 75.51%, 38.41%, and 28.73%, respectively. Under optimal time in cartesian space, the trajectory of the robot’s end-effector passed through the pose point continuously and continuously. Verification of the feasibility of the proposed algorithm.
However, this method also has some drawbacks, most notably the following: The proposed method only optimizes the robot’s running time for a single objective, but optimizing the robot for multiple objectives is a study-worthy problem. On the other hand, parameters in the optimization process are determined based on previous research and a large number of simulation experiments rather than a strict mathematical derivation. Several refinements and additional investigations of the proposed method are scheduled for the future. These include the determination of appropriate optimization parameters, multi-objective robot optimization, and physical robot testing.