1. Introduction
As industrialization continues to evolve, nations worldwide are actively advancing the modernization of industrial production and automation upgrades. Industrial robots, as the primary equipment for substituting manual labor to enhance production efficiency, have garnered extensive attention and research within industrial automated production lines. The advancement of artificial intelligence-related technologies has ushered in a new era in the field of industrial production, with industrial robots that incorporate intelligent technologies representing a significant direction for future development. To ensure the efficient and stable completion of production tasks during the operation of industrial robots, it is imperative to conduct a comprehensive trajectory optimization study on these machines.
In recent years, researchers have conducted extensive research on trajectory planning for robotic arms [
1,
2]. In recent years, researchers have conducted extensive research on trajectory planning for robotic arms. The trajectory planning of a robotic arm in joint space requires representing the joint variables as time-dependent functions and then constraining their angles, angular velocities, and angular accelerations. Sabarigirish et al. [
3] presents the determination of the trajectory between the initial point and end point for a five-degree-of-freedom (DOF) robotic manipulator in the presence of obstacles. The path is determined using the cubic polynomial, which ensures the smooth motion of the robot. The nonlinear nature of the robotic manipulator is taken into consideration as well. Fang et al. [
4] performed trajectory planning of the robot arm using the cubic polynomial and the quintic polynomial function. The simulation results show that the quintic polynomial method effectively solves the problem of acceleration discontinuity and obtains a continuous smooth trajectory curve of each joint. Porawagama et al. [
5] combined cubic and fifth-degree polynomials and used the 5-3-5-degree polynomial interpolation algorithm to make the generated motion trajectory continuously differentiable in position, velocity, and acceleration.
The objectives of trajectory planning vary across different applications of robotic arms, which can be categorized into optimal operation time, optimal energy consumption, optimal impact, and multi-objective optimization [
6,
7]. Notably, the majority of scholarly research focuses on optimal trajectory planning for operational time [
8].
Concurrently, the integration of traditional trajectory planning methodologies with intelligent algorithms for robotic trajectory optimization is a pivotal concept in contemporary robot trajectory research. Markus [
9] introduced a novel hybrid time-optimal flexible joint trajectory planning algorithm. This approach employed a smooth time-optimal switching strategy as an alternative to the acceleration mutation, yielding notable results. The foundation of this work was built upon optimal time trajectory planning. Joonyoung et al. [
10] introduced a planning methodology designed for robots to execute spot welding tasks with the most efficient trajectory. This method not only efficiently computes the generated trajectory and dynamically approximates the optimal time but also ensures the integrity of path followed in high-frequency planning and control cycles. Luo et al. [
11] proposed an improved quantum particle swarm optimization algorithm to enhance convergence speed and avoid local optima. Lan et al. [
12] initially employed the seventh-order B-spline curve method to construct the joint trajectory of a robotic arm. They proposed a multi-objective particle swarm optimization algorithm for trajectory competition, aiming to solve the Pareto solution set for the optimal trajectory of the robotic arm in terms of time, energy, and impact. Experimental results demonstrated that this method effectively reduced the motion time, joint impact, and energy consumption of the robotic arm. However, it also increased the time complexity of the algorithm. Cao et al. [
13] proposed an enhanced multi-objective particle swarm optimization algorithm designed to optimize the time, energy, and impact functions of a fruit-picking robotic arm. The experimental results indicated that this algorithm facilitated the smooth and efficient execution of fruit-picking operations by the robotic arm. Xu et al. [
14] introduced an improved sparrow search algorithm (ISSA) with a fusion strategy to further improve the ability to solve challenging tasks. The results show that the proposed method is more effective, robust, and feasible in mobile robot path planning. Zhao et al. [
15] introduced an enhanced whale optimization algorithm to address the optimal trajectory planning issue associated with robot time jitter. This was achieved by constructing a robot joint space fifth-order B-spline interpolation trajectory. Zhao et al. [
16] introduced an optimization technique for the trajectory of a mechanical arm, focusing on minimizing both movement time and joint impact as objectives. This approach reframed the multi-objective optimization challenge into a single-objective problem by employing a weighted coefficient method. Additionally, they proposed a trajectory optimization method that integrates hybrid particle swarm optimization with whale optimization algorithms, leading to significant reductions in both movement time and joint impact of the mechanical arm. Wang et al. [
17] introduced an enhanced elite nondominated sorting genetic algorithm for the multi-objective trajectory optimization of robotic arms, incorporating three novel genetic operators. This approach yielded superior efficiency and more consistent solutions for point-to-point tasks executed by robotic arms. Ekrem et al. [
18] used the MATLAB program and particle swarm optimization (PSO) to carry out the trajectory planning of the robotic arm. Zhang et al. [
19] investigated the trajectory-planning problem of a six-axis robotic arm based on deep reinforcement learning. The proposed method demonstrated its effectiveness in comparison with the RRT algorithm, as evidenced by the simulations and physical experiments.
This paper builds upon the principles of mixed polynomial interpolation motion trajectory planning to introduce an enhanced multi-strategy improved sparrow search algorithm. This algorithm is specifically designed for time-optimal trajectory optimization:
1. A two-dimensional logistic system is utilized to initialize the sparrow population, with the objective of enhancing initial diversity and achieving equilibrium.
2. The Levy flight strategy and the nonlinear weighting factor method are utilized to refine the position update algorithm of discoverers within the sparrow population. This approach is designed to optimize the search capability of the algorithm, bolster its robustness, and enhance both the accuracy and speed of convergence.
3. The vigilant update algorithm of the sparrow population is augmented with a reverse learning strategy, thereby enhancing both local and global search capabilities.
The findings indicate that the enhanced sparrow search algorithm demonstrates superior convergence speed and accuracy in optimizing industrial robot trajectories, outperforming both the standard sparrow algorithm and the particle swarm algorithm.
This paper is structured as follows: The initial section provides an introduction. The
Section 2 presents the kinematic model of the robotic arm. The
Section 3 delineates the hybrid polynomial interpolated kinematic trajectory planning. The
Section 4 elaborates on the improved sparrow search algorithm. The
Section 5 offers the experimental simulation results of the algorithm. Finally, the conclusions are summarized in the concluding section.
2. Kinematics Analysis
This paper focuses on a six-axis industrial robot, independently developed by our research team. The overall structure of the robot is depicted in
Figure 1.
Figure 1a,b illustrate the dimensions of the robot’s connecting rod, while
Figure 1c depicts the positioning of each joint axis within the robot. The coordinate system for the connecting rod, as presented in
Figure 2, is constructed by utilizing the D-H parameter method. This construction also takes into account the mechanical structure’s dimensions and the positioning of each joint axis. The robot’s D-H parameters can be found in
Table 1. These parameters represent the link length, link twist, link offset, and joint angle [
20].
2.1. Forward Kinematic
By utilizing the D-H parametric method, the sub-transformation matrix between the robot’s adjacent linkage coordinate systems {i − 1} and {i} is represented in Equation (1) [
20].
For the sake of the simplicity of expression, and in Equation (1) are denoted as and , respectively. and are denoted as and , respectively. In Equation (1), .
The position matrix of the robot’s terminal point is depicted in Equation (2).
In Equation (2), P and R represent the position and attitude of the robot’s end, respectively, in relation to the base coordinate system. This equation serves as the positive kinematic equation for a six-axis industrial robot. The elements within Equation (2) can be expressed as per Equation (3).
2.2. Inverse Kinematics
Robot inverse kinematics is the process of obtaining the angles of each joint of the robot by transforming the matrix based on the known position and posture of the robot’s end effector. This study employs an analytical method [
21] to address the inverse kinematics of the robot.
Equation (4) is derived from Equation (2):
Given that the elements (2,4) at Equation (4) are equivalent as follows:
The value of
can be found by the following constant triangular transformation:
In Equation (6), the plus and minus signs indicate that has two solutions.
Upon establishing a solution for
, the elements (1,4) and (3,4) on both sides of Equation (4) are equal, and we can obtain the following:
Square both sides of Equation (5) and Equation (7), respectively, and subsequently add these equations to derive Equation (8).
where
.
The
term has been eliminated from the equation, thereby enabling the calculation of Equation (9) for
through trigonometric substitution.
The plus and minus signs in Equation (9) mean that has two roots.
After sorting out Equation (4), Equation (10) can be obtained:
Given that the elements (1,4) and (2,4) at Equation (10) are equivalent
can be obtained as follows:
Given that the elements (1,3) and (3,3) at Equation (10) are equivalent
If , the robot will assume a singularly shaped position. For singular forms, any value of can be selected to calculate the corresponding .
After sorting out Equation (10), Equation (19) can be obtained:
Given that the elements (1,3) and (3,3) at Equation (19) are equivalent
After sorting out Equation (19), Equation (23) can be obtained:
Given that the elements (3,1) and (1,1) at Equation (23) are equivalent
The closed-form solution for
is given by Equation (26).
3. Hybrid Polynomial Interpolation in Motion Trajectory Planning
3.1. 3-5-3 Mixed Polynomial Interpolation Functions
While conventional cubic and quintic polynomial interpolation algorithms are highly effective for motion paths between two points, robots often traverse more than two path points during operation [
22]. To enhance the efficiency and accuracy of robotic tasks, this paper introduces a hybrid trajectory planning method that combines cubic and quintic polynomial interpolations for multiple path point scenarios. The specific implementation method is tailored to fit the robot under study.
1. Two predetermined path points are determined to designate the initial and terminal positions of the robot arm’s movement.
2. The initial and terminal path points are divided into three distinct segments, as illustrated in
Figure 3. Within the segment
, cubic polynomial interpolation is employed, followed by quintic polynomial interpolation within the segment
. Cubic polynomial interpolation is utilized again in the segment
. These steps collectively constitute a hybrid “3-5-3” polynomial interpolant.
The relationship between the position of joint j and the motion time varies across different path segments.
(1) During the time period
, it can be expressed as in Equation (27):
(2) During the time period
, it can be expressed as in Equation (28).
(3) During the time period
, it can be expressed as in Equation (29).
In Equations (27)–(29), represents the current motion time. The variables , , and denote the motion times of joints within the three-segment path trajectories. Here, , , and (where j ranges from 1 to 6) signify the k-th interpolation coefficients of the function associated with the j-th joint in these trajectories. The terms , , and represent the velocity of joint j in the three-segment path trajectories. Conversely, , , and indicate the acceleration of joint j in the same trajectories.
The comprehensive path trajectory comprises four interpolation points, namely
,
,
, and
, which are further segmented into three distinct sections. The kinematic Equations (30)–(33) can be derived from Equations (27)–(29).
In the 3-5-3 mixed polynomial, the coefficients , , and (where j ranges from 1 to 6) can be determined by substituting them into Equations (30) through (33), based on the time points , , and of each path trajectory. This process allows the derivation of the relationship between the three path trajectories associated with joint j and time t.
3.2. Time-Optimal Fitness Function under Constraints
Within the confines of maximum speed and acceleration restrictions for robot joints, a fitness function is formulated with an emphasis on time optimization. Initially, the optimal value is determined within these constraints by utilizing a mathematical model, as depicted in Equation (34).
In Equation (34), x represents a vector [, , …], with and serving as constraints. The optimization objective function F(x) is constructed from .
In the context of mixed polynomial interpolation, the fitness function is delineated in Equations (35) and (36), taking into account the three stages of motion time.
In Equations (35) and (36), , , and represent the motion times of each joint across the three distinct motion paths, while denotes the joint motion speed. The term signifies the maximum constraint speed, which is determined by the joint motion acceleration . Additionally, represents the maximum allowable constraint acceleration.
5. Simulation Analysis
The six-axis industrial robot, designed for this study, is kinematically modeled using MATLAB. A trajectory for the robot’s end point is planned in Cartesian space, as depicted in
Figure 5. Within this Cartesian space, four path points are selected from the robot’s motion path, which extends from the start to the end point. The interval between these four path points is set at 2 s. Subsequently, an inverse kinematic solution is applied to these four path points to determine the joint angle values corresponding to each of the robot’s six joints. These values are presented in
Table 2. The kinematic constraints associated with each joint of the robot are detailed in
Table 3.
To ascertain the efficacy of the improved sparrow algorithm (ISSA) proposed in this study, it was compared with the standard sparrow algorithm (SSA) and the standard particle swarm optimization algorithm (PSO) for optimizing the “3-5-3” mixed polynomial interpolation trajectory. Subsequently, a comparative analysis of the optimization outcomes derived from these three algorithms was conducted. During the optimization phase, the ISSA and SSA algorithms were initialized with the following parameters: a sparrow population size of 30, a maximum iteration count of 1000, a discoverer proportion of 20%, a vigilant proportion of 10%, and a vigilance value of 0.8. Conversely, the PSO algorithm was initialized with the following parameters: a population size of 30, a maximum iteration count of 1000, an initial inertia weight of 0.9, and a final inertia weight of 0.4.
The convergence curves for the three algorithms, which are based on time-optimal trajectory planning for the robot’s six joints, are depicted in
Figure 6. As observed from this figure, the ISSA algorithm demonstrates superior performance in terms of both convergence speed and accuracy when compared to the PSO and SSA algorithms. Upon comparing the convergence curves of joints 2, 3, 4, 5, and 6, the ISSA algorithm significantly outperforms both the PSO and SSA algorithms in terms of convergence accuracy, as shown in
Table 4. Specifically, for joint 2, the ISSA algorithm demonstrates a convergence accuracy that is 13% higher than that of the SSA algorithm and 33% higher than that of the PSO algorithm. For joint 3, the ISSA algorithm demonstrates a similar convergence accuracy to the SSA algorithm and exhibits a convergence accuracy that is 6% higher than that of the PSO algorithm. In the case of joint 4, the convergence accuracy achieved through the implementation of the ISSA algorithm surpasses those of the SSA and PSO algorithms by 18.8% and 48%, respectively. For joint 5, the ISSA algorithm outperforms both the SSA and PSO algorithms by 6.5% and 9.3%, respectively. In the instance of joint 6, the ISSA algorithm demonstrates a 2.4% increase in convergence accuracy compared to the PSO algorithm. On a broader scale, it is evident that the ISSA algorithm consistently delivers superior convergence accuracy, exceeding those of the SSA and PSO algorithms by up to 18.8% and 48%, respectively.
Upon comparing joints 4, 5, and 6, it is evident that the ISSA algorithm exhibits a superior convergence rate in comparison to both the PSO and SSA algorithms, as shown in
Table 5. Specifically, for joint 4, the convergence rate achieved through the ISSA algorithm surpasses that of the SSA algorithm by 25% and outperforms the PSO algorithm by 16.7%. For joint 5, the ISSA algorithm demonstrates an 80% increase in convergence rate compared to the PSO algorithm. In the case of joint 6, the ISSA algorithm’s convergence rate exceeds that of the SSA algorithm by 44.4% and surpasses the PSO algorithm by 56%. On a broader scale, the ISSA algorithm’s convergence rate can be up to 73% higher than that of the SSA algorithm and up to 80% higher than that of the PSO algorithm.
Given the minimal interval between path points, the fitness curves of the two algorithms exhibit negligible differences in joint 1. Consequently, employing the ISSA algorithm for time-optimal trajectory planning of six-axis industrial robots is both feasible and efficient. Through the application of the ISSA algorithm, it becomes possible to effectively accomplish trajectory planning in the shortest timeframe, thereby enhancing the robot’s work efficiency and optimizing its performance. Simultaneously, the efficiency of the ISSA algorithm demonstrates strong practicality and promising application prospects in real-world engineering scenarios.
Figure 7 illustrates the curves for angular displacement, angular velocity, and angular acceleration obtained following the application of the ISSA, SSA, and PSO algorithms in time-optimal trajectory planning for an industrial robot with six joints. This process ensures compliance with kinematic constraints.
As illustrated in
Figure 7, the industrial robot optimized by the PSO algorithm operates at a time of approximately 3.77099 s. In contrast, the robot optimized by the SSA algorithm functions at an average time of 3.33759 s, while the one optimized by the ISSA algorithm operates at around 3.17564 s. The ISSA-optimized robot’s running time is notably shorter than that of the unoptimized model by 2.82436 s, which represents a reduction of 47%. Furthermore, the ISSA-optimized robot’s running time is 0.16195 s or 4.9% shorter than that of the robot optimized by the SSA algorithm, and it is 0.59535 s or 15.8% faster than that of the robot optimized by the PSO algorithm. This comparison indicates that each joint trajectory of the unoptimized robot experiences a significant reduction in running time when optimized by either the ISSA, SSA, or PSO algorithms. However, the optimization effect of the ISSA algorithm surpasses that of both the SSA and PSO algorithms, effectively enhancing the robot’s operational efficiency. Specifically, each joint’s running time is reduced by 0.59535 s compared to the unoptimized model. Post-optimization, the curves representing angular displacement, velocity, and acceleration for each joint of the robot are smoother and exhibit no abrupt changes, thereby mitigating any rigid or flexible impact on the robot’s performance.
6. Conclusions
This paper introduces an enhanced multi-strategy sparrow search algorithm, which is based on the 3-5-3 trajectory planning. The aim is to achieve time-optimal trajectory planning for industrial robots.
This paper proposes an enhanced multi-strategy sparrow search algorithm based on a 3-5-3 hybrid polynomial interpolation. The specific improvement strategies include initializing the population using a two-dimensional Logistic chaotic system to ensure diversity and balance, implementing a Levy flight strategy and nonlinear adaptive weighting to enhance the discoverer position updating operator, and introducing an inverse learning strategy to refine the vigilante position-updating operator. This approach ensures that during the early iterations of the algorithm, a larger weight boosts the global search capability. Conversely, in later iterations, a smaller weight augments the local search ability. This method simultaneously mitigates the issues of “precocity” and local optimization, thereby enhancing the robustness of the algorithm, as well as its convergence accuracy and speed.
A six-axis industrial robot independently developed by the laboratory is taken as the research object, and the improved sparrow search algorithm, traditional sparrow search algorithm, and particle swarm algorithm are, respectively, used to carry out time-optimal trajectory planning simulation experiments based on 3-5-3 hybrid polynomial interpolation. The numerical results demonstrate that the enhanced sparrow search algorithm outperforms both the standard sparrow algorithm and the particle swarm algorithm in terms of convergence speed and accuracy when optimizing a robot’s trajectory. This improved algorithm not only converges more rapidly but also achieves greater precision, thereby increasing the robot’s work efficiency and overall performance.